APIC ID mask cleanup

This commit is contained in:
Stanislav Shwartsman 2010-05-14 12:10:00 +00:00
parent 9c69b15ecb
commit 35f8e91cad
2 changed files with 5 additions and 5 deletions

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: ioapic.cc,v 1.51 2010-02-28 14:52:17 sshwarts Exp $
// $Id: ioapic.cc,v 1.52 2010-05-14 12:10:00 sshwarts Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2002-2009 The Bochs Project
@ -34,6 +34,8 @@
bx_ioapic_c *theIOAPIC = NULL;
extern Bit32u apic_id_mask;
int libioapic_LTX_plugin_init(plugin_t *plugin, plugintype_t type, int argc, char *argv[])
{
theIOAPIC = new bx_ioapic_c();

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: ioapic.h,v 1.38 2010-03-27 09:56:30 sshwarts Exp $
// $Id: ioapic.h,v 1.39 2010-05-14 12:10:00 sshwarts Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2002-2009 The Bochs Project
@ -36,15 +36,13 @@ extern int apic_bus_broadcast_interrupt(Bit8u vector, Bit8u delivery_mode, bx_bo
// use the same version as 82093 IOAPIC (0x00170011)
#define BX_IOAPIC_VERSION_ID (((BX_IOAPIC_NUM_PINS - 1) << 16) | 0x11)
extern Bit32u apic_id_mask;
class bx_io_redirect_entry_t {
Bit32u hi, lo;
public:
bx_io_redirect_entry_t(): hi(0), lo(0x10000) {}
Bit8u destination() const { return (Bit8u)((hi >> 24) & apic_id_mask); }
Bit8u destination() const { return (Bit8u)(hi >> 24); }
bx_bool is_masked() const { return (bx_bool)((lo >> 16) & 1); }
Bit8u trigger_mode() const { return (Bit8u)((lo >> 15) & 1); }
bx_bool remote_irr() const { return (bx_bool)((lo >> 14) & 1); }