VirtualBox

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


Ignore:
Timestamp:
Sep 29, 2010 4:25:16 PM (14 years ago)
Author:
vboxsync
Message:

PCI, PDM: initial drop of MSI support

File:
1 edited

Legend:

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

    r32779 r32820  
    14491449    index = (addr >> 4) & 0xff;
    14501450
     1451    if (addr > 0xfff || (index == 0))
     1452    {
     1453        /* MSR area read, undefined result by spec */
     1454        Log(("APIC: MSR area read: %x\n", index));
     1455        return 0;
     1456    }
     1457
    14511458    switch(index) {
    14521459    case 0x02: /* id */
     
    15231530    return val;
    15241531}
    1525 
     1532/**
     1533 * See chapter 10.11 MESSAGE SIGNALLED INTERRUPTS of IA-32 Intel Architecture
     1534 * Software Developer’s Manual, Volume 3A: System Programming Guide, Part 1
     1535 * for details on MSI and LAPIC interaction.
     1536 */
    15261537static int apicSendMsi(APICDeviceInfo* dev, RTGCPHYS addr, uint32_t val)
    15271538{
     
    15311542    uint8_t  trigger_mode = (val >> VBOX_MSI_DATA_TRIGGER_SHIFT) & 0x1;
    15321543    uint8_t  delivery_mode = (val >> VBOX_MSI_DATA_DELIVERY_MODE_SHIFT) & 0x7;
    1533 
     1544    /**
     1545     * This bit indicates whether the message should be directed to the
     1546     * processor with the lowest interrupt priority among
     1547     * processors that can receive the interrupt, ignored ATM.
     1548     */
     1549    uint8_t  redir_hint = (addr >> VBOX_MSI_ADDR_REDIRECTION_SHIFT) & 0x1;
    15341550    uint32_t deliver_bitmask = apic_get_delivery_bitmask(dev, dest, dest_mode);
    15351551
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