convert apic id to 32-bit -> pilot before x2apic merge
no functional change supposed to be seen yet
This commit is contained in:
parent
01d88bc155
commit
23927343d5
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: apic.cc,v 1.136 2010-03-26 11:17:02 sshwarts Exp $
|
||||
// $Id: apic.cc,v 1.137 2010-03-26 13:00:14 sshwarts Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (c) 2002-2009 Zwane Mwaikambo, Stanislav Shwartsman
|
||||
@ -38,7 +38,7 @@ extern Bit32u apic_id_mask;
|
||||
|
||||
///////////// APIC BUS /////////////
|
||||
|
||||
int apic_bus_deliver_interrupt(Bit8u vector, Bit8u dest, Bit8u delivery_mode, bx_bool logical_dest, bx_bool level, bx_bool trig_mode)
|
||||
int apic_bus_deliver_interrupt(Bit8u vector, Bit32u dest, Bit8u delivery_mode, bx_bool logical_dest, bx_bool level, bx_bool trig_mode)
|
||||
{
|
||||
if(delivery_mode == APIC_DM_LOWPRI)
|
||||
{
|
||||
@ -88,7 +88,7 @@ int apic_bus_deliver_interrupt(Bit8u vector, Bit8u dest, Bit8u delivery_mode, bx
|
||||
}
|
||||
}
|
||||
|
||||
int apic_bus_deliver_lowest_priority(Bit8u vector, Bit8u dest, bx_bool trig_mode, bx_bool broadcast)
|
||||
int apic_bus_deliver_lowest_priority(Bit8u vector, Bit32u dest, bx_bool trig_mode, bx_bool broadcast)
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -440,7 +440,7 @@ void bx_local_apic_c::write_aligned(bx_phy_address addr, Bit32u value)
|
||||
}
|
||||
}
|
||||
|
||||
void bx_local_apic_c::send_ipi(Bit8u dest, Bit32u lo_cmd)
|
||||
void bx_local_apic_c::send_ipi(Bit32u dest, Bit32u lo_cmd)
|
||||
{
|
||||
int dest_shorthand = (lo_cmd >> 18) & 3;
|
||||
int trig_mode = (lo_cmd >> 15) & 1;
|
||||
@ -801,7 +801,7 @@ void bx_local_apic_c::print_status(void)
|
||||
BX_INFO(("}"));
|
||||
}
|
||||
|
||||
bx_bool bx_local_apic_c::match_logical_addr(Bit8u address)
|
||||
bx_bool bx_local_apic_c::match_logical_addr(Bit32u address)
|
||||
{
|
||||
bx_bool match = 0;
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: apic.h,v 1.52 2010-03-26 11:17:02 sshwarts Exp $
|
||||
// $Id: apic.h,v 1.53 2010-03-26 13:00:14 sshwarts Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (c) 2002-2009 Zwane Mwaikambo, Stanislav Shwartsman
|
||||
@ -43,6 +43,7 @@ class BOCHSAPI bx_local_apic_c : public logfunctions
|
||||
unsigned mode;
|
||||
bx_bool xapic;
|
||||
Bit32u apic_id; // 4 bit in legacy mode, 8 bit in XAPIC mode
|
||||
// 32 bit in X2APIC mode
|
||||
Bit32u apic_version_id;
|
||||
|
||||
bx_bool software_enabled;
|
||||
@ -134,11 +135,11 @@ public:
|
||||
Bit8u acknowledge_int(void); // only the local CPU should call this
|
||||
int highest_priority_int(Bit8u *array);
|
||||
void receive_EOI(Bit32u value);
|
||||
void send_ipi(Bit8u dest, Bit32u lo_cmd);
|
||||
void send_ipi(Bit32u dest, Bit32u lo_cmd);
|
||||
void write_spurious_interrupt_register(Bit32u value);
|
||||
void service_local_apic(void);
|
||||
void print_status(void);
|
||||
bx_bool match_logical_addr (Bit8u address);
|
||||
bx_bool match_logical_addr(Bit32u address);
|
||||
bx_bool deliver(Bit8u vector, Bit8u delivery_mode, Bit8u trig_mode);
|
||||
Bit8u get_tpr(void) { return task_priority; }
|
||||
void set_tpr(Bit8u tpr);
|
||||
@ -152,8 +153,8 @@ public:
|
||||
void register_state(bx_param_c *parent);
|
||||
};
|
||||
|
||||
int apic_bus_deliver_lowest_priority(Bit8u vector, Bit8u dest, bx_bool trig_mode, bx_bool broadcast);
|
||||
int apic_bus_deliver_interrupt(Bit8u vector, Bit8u dest, Bit8u delivery_mode, bx_bool logical_dest, bx_bool level, bx_bool trig_mode);
|
||||
int apic_bus_deliver_lowest_priority(Bit8u vector, Bit32u dest, bx_bool trig_mode, bx_bool broadcast);
|
||||
int apic_bus_deliver_interrupt(Bit8u vector, Bit32u dest, Bit8u delivery_mode, bx_bool logical_dest, bx_bool level, bx_bool trig_mode);
|
||||
int apic_bus_broadcast_interrupt(Bit8u vector, Bit8u delivery_mode, bx_bool trig_mode, int exclude_cpu);
|
||||
|
||||
#endif // if BX_SUPPORT_APIC
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: ioapic.h,v 1.36 2010-02-28 14:52:17 sshwarts Exp $
|
||||
// $Id: ioapic.h,v 1.37 2010-03-26 13:00:14 sshwarts Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2002-2009 The Bochs Project
|
||||
@ -25,8 +25,8 @@
|
||||
|
||||
#if BX_SUPPORT_APIC
|
||||
|
||||
extern int apic_bus_deliver_lowest_priority(Bit8u vector, Bit8u dest, bx_bool trig_mode, bx_bool broadcast);
|
||||
extern int apic_bus_deliver_interrupt(Bit8u vector, Bit8u dest, Bit8u delivery_mode, bx_bool logical_dest, bx_bool level, bx_bool trig_mode);
|
||||
extern int apic_bus_deliver_lowest_priority(Bit8u vector, Bit32u dest, bx_bool trig_mode, bx_bool broadcast);
|
||||
extern int apic_bus_deliver_interrupt(Bit8u vector, Bit32u dest, Bit8u delivery_mode, bx_bool logical_dest, bx_bool level, bx_bool trig_mode);
|
||||
extern int apic_bus_broadcast_interrupt(Bit8u vector, Bit8u delivery_mode, bx_bool trig_mode, int exclude_cpu);
|
||||
|
||||
#define BX_IOAPIC_NUM_PINS (0x18)
|
||||
|
Loading…
Reference in New Issue
Block a user