faults.hh (12174:102edff2bc9b) faults.hh (12517:77e8688fc670)
1/*
2 * Copyright (c) 2003-2005 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

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

52 {
53 U, User = U,
54 P, Privileged = P,
55 H, Hyperprivileged = H,
56 NumLevels,
57 SH = -1,
58 ShouldntHappen = SH
59 };
1/*
2 * Copyright (c) 2003-2005 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

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

52 {
53 U, User = U,
54 P, Privileged = P,
55 H, Hyperprivileged = H,
56 NumLevels,
57 SH = -1,
58 ShouldntHappen = SH
59 };
60 using PrivilegeLevelSpec = std::array<PrivilegeLevel, NumLevels>;
60 struct FaultVals
61 {
62 const FaultName name;
63 const TrapType trapType;
64 const FaultPriority priority;
61 struct FaultVals
62 {
63 const FaultName name;
64 const TrapType trapType;
65 const FaultPriority priority;
65 const PrivilegeLevel nextPrivilegeLevel[NumLevels];
66 const PrivilegeLevelSpec nextPrivilegeLevel;
66 FaultStat count;
67 FaultStat count;
68 FaultVals(const FaultName& name_, const TrapType& trapType_,
69 const FaultPriority& priority_, const PrivilegeLevelSpec& il)
70 : name(name_), trapType(trapType_), priority(priority_),
71 nextPrivilegeLevel(il)
72 {}
67 };
68 void invoke(ThreadContext * tc, const StaticInstPtr &inst =
69 StaticInst::nullStaticInstPtr);
70 virtual TrapType trapType() = 0;
71 virtual FaultPriority priority() = 0;
72 virtual FaultStat & countStat() = 0;
73 virtual PrivilegeLevel getNextLevel(PrivilegeLevel current) = 0;
74};

--- 286 unchanged lines hidden ---
73 };
74 void invoke(ThreadContext * tc, const StaticInstPtr &inst =
75 StaticInst::nullStaticInstPtr);
76 virtual TrapType trapType() = 0;
77 virtual FaultPriority priority() = 0;
78 virtual FaultStat & countStat() = 0;
79 virtual PrivilegeLevel getNextLevel(PrivilegeLevel current) = 0;
80};

--- 286 unchanged lines hidden ---