VirtualBox

Changeset 50090 in vbox


Ignore:
Timestamp:
Jan 17, 2014 12:04:45 PM (11 years ago)
Author:
vboxsync
Message:

BIOS: Support second CMOS bank for reads/writes.

File:
1 edited

Legend:

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

    r48947 r50090  
    8181uint8_t inb_cmos(uint8_t cmos_reg)
    8282{
    83     outb(0x70, cmos_reg);
    84     return inb(0x71);
     83    uint8_t     cmos_port = 0x70;
     84
     85    if (cmos_reg >= 0x80)
     86        cmos_port += 2;
     87    outb(cmos_port, cmos_reg);
     88    return inb(cmos_port + 1);
    8589}
    8690
    8791void outb_cmos(uint8_t cmos_reg, uint8_t val)
    8892{
    89     outb(0x70, cmos_reg);
    90     outb(0x71, val);
     93    uint8_t     cmos_port = 0x70;
     94
     95    if (cmos_reg >= 0x80)
     96        cmos_port += 2;
     97    outb(cmos_port, cmos_reg);
     98    outb(cmos_port + 1, val);
    9199}
    92100
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