interrupts.hh (4172:141705d83494) | interrupts.hh (5647:b06b49498c79) |
---|---|
1/* 2 * Copyright (c) 2006 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; --- 21 unchanged lines hidden (view full) --- 30 */ 31 32#ifndef __ARCH_SPARC_INTERRUPT_HH__ 33#define __ARCH_SPARC_INTERRUPT_HH__ 34 35#include "arch/sparc/faults.hh" 36#include "arch/sparc/isa_traits.hh" 37#include "cpu/thread_context.hh" | 1/* 2 * Copyright (c) 2006 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; --- 21 unchanged lines hidden (view full) --- 30 */ 31 32#ifndef __ARCH_SPARC_INTERRUPT_HH__ 33#define __ARCH_SPARC_INTERRUPT_HH__ 34 35#include "arch/sparc/faults.hh" 36#include "arch/sparc/isa_traits.hh" 37#include "cpu/thread_context.hh" |
38#include "params/SparcInterrupts.hh" 39#include "sim/sim_object.hh" |
|
38 39namespace SparcISA 40{ 41 | 40 41namespace SparcISA 42{ 43 |
42class Interrupts | 44class Interrupts : public SimObject |
43{ 44 45 private: 46 47 uint64_t interrupts[NumInterruptTypes]; 48 uint64_t intStatus; 49 50 public: | 45{ 46 47 private: 48 49 uint64_t interrupts[NumInterruptTypes]; 50 uint64_t intStatus; 51 52 public: |
51 Interrupts() | 53 typedef SparcInterruptsParams Params; 54 55 const Params * 56 params() const |
52 { | 57 { |
58 return dynamic_cast<const Params *>(_params); 59 } 60 61 Interrupts(Params * p) : SimObject(p) 62 { |
|
53 clear_all(); 54 } 55 56 int InterruptLevel(uint64_t softint) 57 { 58 if (softint & 0x10000 || softint & 0x1) 59 return 14; 60 --- 123 unchanged lines hidden --- | 63 clear_all(); 64 } 65 66 int InterruptLevel(uint64_t softint) 67 { 68 if (softint & 0x10000 || softint & 0x1) 69 return 14; 70 --- 123 unchanged lines hidden --- |