i82094aa.hh (8711:c7e14f52c682) i82094aa.hh (8746:42d3554b1c35)
1/*
2 * Copyright (c) 2008 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;

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

65 EndBitUnion(RedirTableEntry)
66
67 protected:
68 Tick latency;
69 Addr pioAddr;
70
71 I8259 * extIntPic;
72
1/*
2 * Copyright (c) 2008 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;

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

65 EndBitUnion(RedirTableEntry)
66
67 protected:
68 Tick latency;
69 Addr pioAddr;
70
71 I8259 * extIntPic;
72
73 std::map<int, Interrupts *> localApics;
74
75 uint8_t regSel;
76 uint8_t initialApicId;
77 uint8_t id;
78 uint8_t arbId;
79
80 uint64_t lowestPriorityOffset;
81
82 static const uint8_t TableSize = 24;

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

98
99 I82094AA(Params *p);
100
101 void init();
102
103 Tick read(PacketPtr pkt);
104 Tick write(PacketPtr pkt);
105
73 uint8_t regSel;
74 uint8_t initialApicId;
75 uint8_t id;
76 uint8_t arbId;
77
78 uint64_t lowestPriorityOffset;
79
80 static const uint8_t TableSize = 24;

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

96
97 I82094AA(Params *p);
98
99 void init();
100
101 Tick read(PacketPtr pkt);
102 Tick write(PacketPtr pkt);
103
106 AddrRangeList getAddrRanges()
104 void addressRanges(AddrRangeList &range_list)
107 {
105 {
108 AddrRangeList ranges;
109 ranges.push_back(RangeEx(pioAddr, pioAddr + 4));
110 ranges.push_back(RangeEx(pioAddr + 16, pioAddr + 20));
111 return ranges;
106 range_list.clear();
107 range_list.push_back(RangeEx(pioAddr, pioAddr + 4));
108 range_list.push_back(RangeEx(pioAddr + 16, pioAddr + 20));
112 }
113
109 }
110
114 AddrRangeList getIntAddrRange()
111 void getIntAddrRange(AddrRangeList &range_list)
115 {
112 {
116 AddrRangeList ranges;
117 ranges.push_back(RangeEx(x86InterruptAddress(initialApicId, 0),
118 x86InterruptAddress(initialApicId, 0) +
119 PhysAddrAPICRangeSize));
120 return ranges;
113 range_list.clear();
114 range_list.push_back(RangeEx(x86InterruptAddress(initialApicId, 0),
115 x86InterruptAddress(initialApicId, 0) +
116 PhysAddrAPICRangeSize));
121 }
122
123 void writeReg(uint8_t offset, uint32_t value);
124 uint32_t readReg(uint8_t offset);
125
126 Port *getPort(const std::string &if_name, int idx = -1)
127 {
128 if (if_name == "int_port")
129 return intPort;
130 return PioDevice::getPort(if_name, idx);
131 }
132
133 void signalInterrupt(int line);
134 void raiseInterruptPin(int number);
135 void lowerInterruptPin(int number);
117 }
118
119 void writeReg(uint8_t offset, uint32_t value);
120 uint32_t readReg(uint8_t offset);
121
122 Port *getPort(const std::string &if_name, int idx = -1)
123 {
124 if (if_name == "int_port")
125 return intPort;
126 return PioDevice::getPort(if_name, idx);
127 }
128
129 void signalInterrupt(int line);
130 void raiseInterruptPin(int number);
131 void lowerInterruptPin(int number);
136 void registerLocalApic(int id, Interrupts *localApic);
137
138 virtual void serialize(std::ostream &os);
139 virtual void unserialize(Checkpoint *cp, const std::string &section);
140};
141
142} // namespace X86ISA
143
144#endif //__DEV_X86_SOUTH_BRIDGE_I8254_HH__
132
133 virtual void serialize(std::ostream &os);
134 virtual void unserialize(Checkpoint *cp, const std::string &section);
135};
136
137} // namespace X86ISA
138
139#endif //__DEV_X86_SOUTH_BRIDGE_I8254_HH__