Changeset 38220 in vbox for trunk/src/VBox/Devices/PC
- Timestamp:
- Jul 28, 2011 2:09:57 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/PC/DevPcBios.cpp
r37917 r38220 50 50 * @verbatim 51 51 First CMOS bank (offsets 0x00 to 0x7f): 52 Floppy drive type: 53 0x10 54 Hard disk type (old): 55 0x12 56 Equipment byte: 57 0x14 52 58 Base memory: 53 59 0x15 … … 58 64 0x30 59 65 0x31 66 First IDE HDD: 67 0x19 68 0x1e - 0x25 69 Second IDE HDD: 70 0x1a 71 0x26 - 0x2d 72 Checksum of 0x10-0x2d: 73 0x2e 74 0x2f 60 75 Amount of memory above 16M and below 4GB in 64KB units: 61 76 0x34 62 77 0x35 63 Boot device (BOCHS bios specific): 64 0x3d 78 Boot device (BOCHS BIOS specific): 65 79 0x38 66 80 0x3c 81 0x3d 67 82 PXE debug: 68 83 0x3f 69 Floppy drive type: 70 0x10 71 Equipment byte: 72 0x14 73 First HDD: 74 0x19 75 0x1e - 0x25 76 Second HDD: 77 0x1a 78 0x26 - 0x2d 79 Third HDD: 80 0x67 - 0x6e 81 Fourth HDD: 82 0x70 - 0x77 83 Extended: 84 0x12 85 First Sata HDD: 84 First SATA HDD: 86 85 0x40 - 0x47 87 Second S ataHDD:86 Second SATA HDD: 88 87 0x48 - 0x4f 89 Third S ataHDD:88 Third SATA HDD: 90 89 0x50 - 0x57 91 Fourth S ataHDD:90 Fourth SATA HDD: 92 91 0x58 - 0x5f 93 92 Number of CPUs: … … 95 94 RAM above 4G in 64KB units: 96 95 0x61 - 0x65 96 Third IDE HDD: 97 0x67 - 0x6e 98 Fourth IDE HDD: 99 0x70 - 0x77 97 100 98 101 Second CMOS bank (offsets 0x80 to 0xff): … … 238 241 } 239 242 243 /** 244 * Read from CMOS memory. 245 * This is used by the init complete code. 246 */ 247 static uint8_t pcbiosCmosRead(PPDMDEVINS pDevIns, int off) 248 { 249 uint8_t u8val; 250 251 Assert(off < 256); 252 253 int rc = PDMDevHlpCMOSRead(pDevIns, off, &u8val); 254 AssertRC(rc); 255 256 return u8val; 257 } 258 240 259 /* -=-=-=-=-=-=- based on code from pc.c -=-=-=-=-=-=- */ 241 260 … … 631 650 } 632 651 } 652 653 /* Calculate and store AT-style CMOS checksum. */ 654 uint16_t cksum = 0; 655 for (i = 0x10; i < 0x2e; ++i) 656 cksum += pcbiosCmosRead(pDevIns, i); 657 pcbiosCmosWrite(pDevIns, 0x2e, cksum >> 8); 658 pcbiosCmosWrite(pDevIns, 0x2f, cksum & 0xff); 633 659 634 660 LogFlow(("%s: returns VINF_SUCCESS\n", __FUNCTION__));
Note:
See TracChangeset
for help on using the changeset viewer.