faults.hh (6009:74bc713c71ce) faults.hh (6023:47b4fcb10c11)
1/*
2 * Copyright (c) 2007 The Hewlett-Packard Development Company
3 * All rights reserved.
4 *
5 * Redistribution and use of this software in source and binary forms,
6 * with or without modification, are permitted provided that the
7 * following conditions are met:
8 *

--- 47 unchanged lines hidden (view full) ---

56 */
57
58#ifndef __ARCH_X86_FAULTS_HH__
59#define __ARCH_X86_FAULTS_HH__
60
61#include "base/bitunion.hh"
62#include "base/misc.hh"
63#include "sim/faults.hh"
1/*
2 * Copyright (c) 2007 The Hewlett-Packard Development Company
3 * All rights reserved.
4 *
5 * Redistribution and use of this software in source and binary forms,
6 * with or without modification, are permitted provided that the
7 * following conditions are met:
8 *

--- 47 unchanged lines hidden (view full) ---

56 */
57
58#ifndef __ARCH_X86_FAULTS_HH__
59#define __ARCH_X86_FAULTS_HH__
60
61#include "base/bitunion.hh"
62#include "base/misc.hh"
63#include "sim/faults.hh"
64#include "sim/tlb.hh"
64
65#include <string>
66
67namespace X86ISA
68{
69 // Base class for all x86 "faults" where faults is in the m5 sense
70 class X86FaultBase : public FaultBase
71 {

--- 254 unchanged lines hidden (view full) ---

326
327 Addr addr;
328
329 public:
330 PageFault(Addr _addr, uint32_t _errorCode) :
331 X86Fault("Page-Fault", "#PF", 14, _errorCode), addr(_addr)
332 {}
333
65
66#include <string>
67
68namespace X86ISA
69{
70 // Base class for all x86 "faults" where faults is in the m5 sense
71 class X86FaultBase : public FaultBase
72 {

--- 254 unchanged lines hidden (view full) ---

327
328 Addr addr;
329
330 public:
331 PageFault(Addr _addr, uint32_t _errorCode) :
332 X86Fault("Page-Fault", "#PF", 14, _errorCode), addr(_addr)
333 {}
334
334 PageFault(Addr _addr, bool present, bool write,
335 bool user, bool reserved, bool fetch) :
335 PageFault(Addr _addr, bool present, BaseTLB::Mode mode,
336 bool user, bool reserved) :
336 X86Fault("Page-Fault", "#PF", 14, 0), addr(_addr)
337 {
338 PageFaultErrorCode code = 0;
339 code.present = present;
337 X86Fault("Page-Fault", "#PF", 14, 0), addr(_addr)
338 {
339 PageFaultErrorCode code = 0;
340 code.present = present;
340 code.write = write;
341 code.write = (mode == BaseTLB::Write);
341 code.user = user;
342 code.reserved = reserved;
342 code.user = user;
343 code.reserved = reserved;
343 code.fetch = fetch;
344 code.fetch = (mode == BaseTLB::Execute);
344 errorCode = code;
345 }
346
347#if FULL_SYSTEM
348 void invoke(ThreadContext * tc);
349
350 virtual std::string describe() const;
351#endif

--- 82 unchanged lines hidden ---
345 errorCode = code;
346 }
347
348#if FULL_SYSTEM
349 void invoke(ThreadContext * tc);
350
351 virtual std::string describe() const;
352#endif

--- 82 unchanged lines hidden ---