VirtualBox

Ignore:
Timestamp:
Jul 23, 2012 4:48:01 PM (12 years ago)
Author:
vboxsync
Message:

BIOS: Expanded PCI service, removed old 16-bit implementation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/PC/BIOS/pcibios.c

    r42127 r42332  
    9797typedef struct {
    9898    pushad_regs_t   gr;
     99    uint32_t        es;
    99100    uint32_t        flags;
    100101} pci_regs_t;
     
    157158
    158159#endif
     160
     161/* PCI IRQ routing expansion buffer descriptor. */
     162typedef struct {
     163    uint16_t        buf_size;
     164    uint8_t __far   *buf_ptr;
     165} pci_route_buf;
     166
     167/* Defined in assembler module .*/
     168extern char     pci_routing_table[];
     169extern uint16_t pci_routing_table_size;
    159170
    160171/* Write the CONFIG_ADDRESS register to prepare for data access. Requires
     
    293304void BIOSCALL PCIxx(function)(volatile pci_regs_t r)
    294305{
    295     uint16_t    device;
     306    pci_route_buf __far     *route_buf;
     307    uint16_t                device;
    296308
    297309    BX_DEBUG_PCI("PCI: AX=%04X BX=%04X CX=%04X\n", AX, BX, CX);
     
    367379        }
    368380        break;
     381    case GET_IRQ_ROUTING:
     382        route_buf = ES :> (void *)DI;
     383        if (pci_routing_table_size > route_buf->buf_size) {
     384            SET_AH(BUFFER_TOO_SMALL);
     385            SET_CF();
     386        } else {
     387            rep_movsb(route_buf->buf_ptr, pci_routing_table, pci_routing_table_size);
     388        }
     389        break;
    369390    default:
    370391        BX_INFO("PCI: Unsupported function AX=%04X BX=%04X called\n", AX, BX);
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