X86, Config: Make makeX86System consider the number of CPUs, and clean up interrupt assignment.
This commit is contained in:
@@ -34,6 +34,7 @@ from X86IntPin import X86IntSinkPin
|
||||
class I82094AA(BasicPioDevice):
|
||||
type = 'I82094AA'
|
||||
cxx_class = 'X86ISA::I82094AA'
|
||||
apic_id = Param.Int(1, 'APIC id for this IO APIC')
|
||||
pio_latency = Param.Latency('1ns', "Programmed IO latency in simticks")
|
||||
pio_addr = Param.Addr("Device address")
|
||||
int_port = Port("Port for sending and receiving interrupt messages")
|
||||
|
||||
@@ -40,7 +40,7 @@ X86ISA::I82094AA::I82094AA(Params *p) : PioDevice(p), IntDev(this),
|
||||
extIntPic(p->external_int_pic)
|
||||
{
|
||||
// This assumes there's only one I/O APIC in the system
|
||||
id = sys->numContexts();
|
||||
id = p->apic_id;
|
||||
assert(id <= 0xf);
|
||||
arbId = id;
|
||||
regSel = 0;
|
||||
|
||||
@@ -103,8 +103,8 @@ class I82094AA : public PioDevice, public IntDev
|
||||
void getIntAddrRange(AddrRangeList &range_list)
|
||||
{
|
||||
range_list.clear();
|
||||
range_list.push_back(RangeEx(x86InterruptAddress(1, 0),
|
||||
x86InterruptAddress(1, 0) + PhysAddrAPICRangeSize));
|
||||
range_list.push_back(RangeEx(x86InterruptAddress(id, 0),
|
||||
x86InterruptAddress(id, 0) + PhysAddrAPICRangeSize));
|
||||
}
|
||||
|
||||
void writeReg(uint8_t offset, uint32_t value);
|
||||
|
||||
Reference in New Issue
Block a user