VirtualBox

Changeset 34035 in vbox


Ignore:
Timestamp:
Nov 12, 2010 6:17:58 PM (14 years ago)
Author:
vboxsync
Message:

ACPI: added IRQ9 override (present on all real boxes I have), ignore bogus interrupt line

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/PC/DevACPI.cpp

    r33540 r34035  
    511511};
    512512AssertCompileSize(ACPITBLISO, 10);
    513 #define NUMBER_OF_IRQ_SOURCE_OVERRIDES 1
     513#define NUMBER_OF_IRQ_SOURCE_OVERRIDES 2
    514514
    515515/** HPET Descriptor Structure */
     
    945945{
    946946    uint16_t cpus = s->cCpus;
    947     AcpiTableMADT madt(cpus, 1 /* one source override */ );
     947    AcpiTableMADT madt(cpus, NUMBER_OF_IRQ_SOURCE_OVERRIDES);
    948948
    949949    acpiPrepareHeader(madt.header_addr(), "APIC", madt.size(), 2);
     
    976976
    977977    /* Interrupt Source Overrides */
     978    /* Flags:
     979        bits[3:2]:
     980          00 conforms to the bus
     981          01 edge-triggered
     982          10 reserved
     983          11 level-triggered
     984        bits[1:0]
     985          00 conforms to the bus
     986          01 active-high
     987          10 reserved
     988          11 active-low */
    978989    /* If changing, also update PDMIsaSetIrq() and MPS */
    979990    ACPITBLISO* isos = madt.ISO_addr();
     991    /* Timer interrupt rule IRQ0 to GSI2 */
    980992    isos[0].u8Type     = 2;
    981993    isos[0].u8Length   = sizeof(ACPITBLISO);
     
    984996    isos[0].u32GSI     = 2; /* connected to pin 2 */
    985997    isos[0].u16Flags   = 0; /* conform to the bus */
    986     Assert(NUMBER_OF_IRQ_SOURCE_OVERRIDES == 1);
     998
     999    /* ACPI interrupt rule - IRQ9 to GSI9 */
     1000    isos[1].u8Type     = 2;
     1001    isos[1].u8Length   = sizeof(ACPITBLISO);
     1002    isos[1].u8Bus      = 0; /* Must be 0 */
     1003    isos[1].u8Source   = 9; /* IRQ9 */
     1004    isos[1].u32GSI     = 9; /* connected to pin 9 */
     1005    isos[1].u16Flags   = 0xd; /* active high, level triggered */
     1006    Assert(NUMBER_OF_IRQ_SOURCE_OVERRIDES == 2);
    9871007
    9881008    madt.header_addr()->u8Checksum = acpiChecksum(madt.data(), madt.size());
     
    10771097    old_level = pm1a_level(s);
    10781098    new_level = (pm1a_pure_en(en) & pm1a_pure_sts(sts)) != 0;
     1099
     1100    Log(("update_pm1a() old=%x new=%x\n", old_level, new_level));
    10791101
    10801102    s->pm1a_en = en;
     
    11501172{
    11511173    ACPIState *s = IACPIPORT_2_ACPISTATE(pInterface);
     1174    Log(("acpiPowerButtonPress: handled=%d status=%x\n", s->fPowerButtonHandled, s->pm1a_sts));
    11521175    s->fPowerButtonHandled = false;
    11531176    update_pm1a(s, s->pm1a_sts | PWRBTN_STS, s->pm1a_en);
     
    17771800            break;
    17781801        default:
     1802            AssertMsgFailed(("PM1 status read: width %d\n", cb));
    17791803            return VERR_IOM_IOPORT_UNUSED;
    17801804    }
     
    17901814            break;
    17911815        default:
     1816            AssertMsgFailed(("PM1 control read: width %d\n", cb));
    17921817            return VERR_IOM_IOPORT_UNUSED;
    17931818    }
     
    23842409
    23852410    Log2(("acpi: PCI config write: 0x%x -> 0x%x (%d)\n", u32Value, Address, cb));
     2411
     2412    if (Address == 0x3c && u32Value == 0xff)
     2413    {
     2414        Log(("acpi: ignore bogus interrupt line settings\n"));
     2415        return;
     2416    }
     2417
    23862418    pThis->pfnAcpiPciConfigWrite(pPciDev, Address, u32Value, cb);
    23872419
     
    23942426            int rc;
    23952427
    2396             RTIOPORT uNewBase =
    2397                     RTIOPORT(RT_LE2H_U32(*(uint32_t*)&pPciDev->config[0x40]));
     2428            RTIOPORT uNewBase = RTIOPORT(PCIDevGetDWord(pPciDev, 0x40));
    23982429            uNewBase &= 0xffc0;
    23992430
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette