Changeset 43483 in vbox for trunk/src/VBox/Devices/PC/BIOS/ahci.c
- Timestamp:
- Oct 1, 2012 10:13:16 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/PC/BIOS/ahci.c
r43438 r43483 608 608 } 609 609 610 staticvoid ahci_port_detect_device(ahci_t __far *ahci, uint8_t u8Port)610 void ahci_port_detect_device(ahci_t __far *ahci, uint8_t u8Port) 611 611 { 612 612 uint32_t val; … … 651 651 uint32_t sectors; 652 652 uint16_t cylinders, heads, spt; 653 uint16_t lcylinders, lheads, lspt;653 chs_t lgeo; 654 654 uint8_t idxCmosChsBase; 655 655 … … 711 711 if (idxCmosChsBase && inb_cmos(idxCmosChsBase+7)) 712 712 { 713 l cylinders = inb_cmos(idxCmosChsBase + 0) + (inb_cmos(idxCmosChsBase + 1) << 8);714 l heads = inb_cmos(idxCmosChsBase + 2);715 l spt = inb_cmos(idxCmosChsBase + 7);713 lgeo.cylinders = inb_cmos(idxCmosChsBase + 0) + (inb_cmos(idxCmosChsBase + 1) << 8); 714 lgeo.heads = inb_cmos(idxCmosChsBase + 2); 715 lgeo.spt = inb_cmos(idxCmosChsBase + 7); 716 716 } 717 717 else 718 { 719 //@todo: What should we really do if logical geometry isn't in the CMOS? 720 lcylinders = cylinders; 721 lheads = heads; 722 lspt = spt; 723 } 718 set_geom_lba(&lgeo, sectors); /* Default EDD-style translated LBA geometry. */ 719 724 720 BX_INFO("AHCI %d-P#%d: PCHS=%u/%d/%d LCHS=%u/%u/%u %ld sectors\n", devcount_ahci, 725 u8Port, cylinders, heads, spt, lcylinders, lheads, lspt, sectors); 726 727 bios_dsk->devices[hd_index].lchs.heads = lheads; 728 bios_dsk->devices[hd_index].lchs.cylinders = lcylinders; 729 bios_dsk->devices[hd_index].lchs.spt = lspt; 721 u8Port, cylinders, heads, spt, lgeo.cylinders, lgeo.heads, lgeo.spt, sectors); 722 723 bios_dsk->devices[hd_index].lchs = lgeo; 730 724 731 725 /* Store the ID of the disk in the BIOS hdidmap. */
Note:
See TracChangeset
for help on using the changeset viewer.