VirtualBox

Changeset 39274 in vbox for trunk/src/VBox/Devices/PC


Ignore:
Timestamp:
Nov 11, 2011 3:03:47 PM (13 years ago)
Author:
vboxsync
Message:

Do not report nonexistent PIC->IOAPIC routing in MP tables; do report NMI->LAPIC connection.

File:
1 edited

Legend:

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

    r39264 r39274  
    861861    pCfgTab->u32OemTablePtr        =  0;
    862862    pCfgTab->u16OemTableSize       =  0;
    863     pCfgTab->u16EntryCount         =  cCpus /* Processors */
    864                                    +  1 /* ISA Bus */
    865                                    +  1 /* PCI Bus */
    866                                    +  1 /* I/O-APIC */
    867                                    + 16 /* Interrupts */
    868                                    +  1 /* Local interrupts */;
     863    pCfgTab->u16EntryCount         =  0;    /* Incremented as we go. */
    869864    pCfgTab->u32AddrLocalApic      = 0xfee00000;
    870865    pCfgTab->u16ExtTableLength     =  0;
     
    897892        pProcEntry->u32Reserved[1]     = 0;
    898893        pProcEntry++;
     894        pCfgTab->u16EntryCount++;
    899895    }
    900896
     
    908904    memcpy(pBusEntry->au8BusTypeStr, "ISA   ", 6);
    909905    pBusEntry++;
     906    pCfgTab->u16EntryCount++;
    910907
    911908    /* PCI bus */
     
    913910    pBusEntry->u8BusId             = iBusIdPci0; /* this ID can be referenced by the interrupt entries */
    914911    memcpy(pBusEntry->au8BusTypeStr, "PCI   ", 6);
     912    pCfgTab->u16EntryCount++;
    915913
    916914
     
    925923    pIOAPICEntry->u8Flags          = 1 /* enable */;
    926924    pIOAPICEntry->u32Addr          = 0xfec00000;
     925    pCfgTab->u16EntryCount++;
    927926
    928927    /* Interrupt tables */
    929928    /* Bus vectors */
     929    /* Note: The PIC is currently not routed to the I/O APIC. Therefore we skip
     930     * pin 0 on the I/O APIC.
     931     */
    930932    PMPSIOIRQENTRY pIrqEntry       = (PMPSIOIRQENTRY)(pIOAPICEntry+1);
    931     for (int iPin = 0; iPin < 16; iPin++, pIrqEntry++)
     933    for (int iPin = 1; iPin < 16; iPin++, pIrqEntry++)
    932934    {
    933935        pIrqEntry->u8EntryType     = 3; /* I/O interrupt entry */
     
    946948        pIrqEntry->u8DstIOAPICId   = iApicId;        /* destination IO-APIC */
    947949        pIrqEntry->u8DstIOAPICInt  = iPin;           /* pin on destination IO-APIC */
     950        pCfgTab->u16EntryCount++;
    948951    }
    949952    /* Local delivery */
     
    956959    pIrqEntry->u8DstIOAPICInt  = 0;
    957960    pIrqEntry++;
     961    pCfgTab->u16EntryCount++;
     962    pIrqEntry->u8EntryType     = 4; /* Local interrupt entry */
     963    pIrqEntry->u8Type          = 1; /* NMI */
     964    pIrqEntry->u16Flags        = (1 << 2) | 1; /* active-high, edge-triggered */
     965    pIrqEntry->u8SrcBusId      = iBusIdIsa;
     966    pIrqEntry->u8SrcBusIrq     = 0;
     967    pIrqEntry->u8DstIOAPICId   = 0xff;
     968    pIrqEntry->u8DstIOAPICInt  = 1;
     969    pIrqEntry++;
     970    pCfgTab->u16EntryCount++;
    958971
    959972    pCfgTab->u16Length             = (uint8_t*)pIrqEntry - pTable;
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