interrupts.hh (5646:0a488a147fb8) | interrupts.hh (5647:b06b49498c79) |
---|---|
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 * --- 44 unchanged lines hidden (view full) --- 53 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 54 * 55 * Authors: Gabe Black 56 */ 57 58#ifndef __ARCH_X86_INTERRUPTS_HH__ 59#define __ARCH_X86_INTERRUPTS_HH__ 60 | 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 * --- 44 unchanged lines hidden (view full) --- 53 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 54 * 55 * Authors: Gabe Black 56 */ 57 58#ifndef __ARCH_X86_INTERRUPTS_HH__ 59#define __ARCH_X86_INTERRUPTS_HH__ 60 |
61#include "arch/x86/apicregs.hh" |
|
61#include "arch/x86/faults.hh" 62#include "cpu/thread_context.hh" | 62#include "arch/x86/faults.hh" 63#include "cpu/thread_context.hh" |
64#include "params/X86LocalApic.hh" 65#include "sim/eventq.hh" 66#include "sim/sim_object.hh" |
|
63 | 67 |
68class ThreadContext; 69 |
|
64namespace X86ISA 65{ 66 | 70namespace X86ISA 71{ 72 |
67class Interrupts | 73class Interrupts : public SimObject |
68{ | 74{ |
75 protected: 76 uint32_t regs[NUM_APIC_REGS]; 77 78 class ApicTimerEvent : public Event 79 { 80 public: 81 ApicTimerEvent() : Event() 82 {} 83 84 void process() 85 { 86 warn("Local APIC timer event doesn't do anything!\n"); 87 } 88 }; 89 90 ApicTimerEvent apicTimerEvent; 91 |
|
69 public: | 92 public: |
70 Interrupts() | 93 typedef X86LocalApicParams Params; 94 95 const Params * 96 params() const |
71 { | 97 { |
98 return dynamic_cast<const Params *>(_params); 99 } 100 101 uint32_t readRegNoEffect(ApicRegIndex reg); 102 uint32_t readReg(ApicRegIndex miscReg, ThreadContext *tc); 103 104 void setRegNoEffect(ApicRegIndex reg, uint32_t val); 105 void setReg(ApicRegIndex reg, uint32_t val, ThreadContext *tc); 106 107 Interrupts(Params * p) : SimObject(p) 108 { 109 //Set the local apic DFR to the flat model. 110 regs[APIC_DESTINATION_FORMAT] = (uint32_t)(-1); 111 memset(regs, 0, sizeof(regs)); |
|
72 clear_all(); 73 } 74 75 int InterruptLevel(uint64_t softint) 76 { 77 panic("Interrupts::InterruptLevel unimplemented!\n"); 78 return 0; 79 } --- 45 unchanged lines hidden --- | 112 clear_all(); 113 } 114 115 int InterruptLevel(uint64_t softint) 116 { 117 panic("Interrupts::InterruptLevel unimplemented!\n"); 118 return 0; 119 } --- 45 unchanged lines hidden --- |