VirtualBox

Changeset 27305 in vbox


Ignore:
Timestamp:
Mar 11, 2010 8:34:27 PM (15 years ago)
Author:
vboxsync
Message:

APIC: few todos and cleanups, nothing functional

File:
1 edited

Legend:

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

    r27221 r27305  
    4444#define MSR_IA32_APICBASE_BSP           (1<<8)
    4545#define MSR_IA32_APICBASE_ENABLE        (1<<11)
    46 #ifdef VBOX
    4746#define MSR_IA32_APICBASE_X2ENABLE      (1<<10)
    48 #endif
    4947#define MSR_IA32_APICBASE_BASE          (0xfffff<<12)
    5048
     
    6563#define APIC_SAVED_STATE_VERSION_ANCIENT    1
    6664
     65/* version 0x14: Pentium 4, Xeon; LVT count depends on that */
     66#define APIC_HW_VERSION                    0x14
    6767
    6868/** @def APIC_LOCK
     
    882882            break;
    883883        case 0x03: /* version */
    884             val = 0x11 | ((APIC_LVT_NB - 1) << 16); /* version 0x11 */
     884            val =   APIC_HW_VERSION                                     |
     885                    ((APIC_LVT_NB - 1) << 16) /* Max LVT index */       |
     886                    (0 << 24) /* Support for EOI broadcast supression */;
    885887            break;
    886888        case 0x08:
     
    939941            Log(("apicReadMSR: read from write-only register %d ignored\n", index));
    940942            break;
     943        case 0x2f:
     944            /**
     945             * Correctable machine check exception vector, @todo: implement me!
     946             */
    941947        default:
    942948            AssertMsgFailed(("apicReadMSR: unknown index %x\n", index));
     949            /**
     950             * @todo: according to spec when APIC writes to ESR it msut raise error interrupt,
     951             *        i.e. LVT[5]
     952             */
    943953            apic->esr |= ESR_ILLEGAL_ADDRESS;
    944954            val = 0;
     
    17091719        break;
    17101720    case 0x03: /* version */
    1711         val = 0x14 | ((APIC_LVT_NB - 1) << 16); /* version 0x14 */
     1721        val = APIC_HW_VERSION | ((APIC_LVT_NB - 1) << 16);
    17121722        break;
    17131723    case 0x08:
     
    17831793        val = s->divide_conf;
    17841794        break;
     1795    case 0x2f:
     1796        /**
     1797         * Correctable machine check exception vector, @todo: implement me!
     1798         */
    17851799    default:
    17861800        AssertMsgFailed(("apic_mem_readl: unknown index %x\n", index));
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