fdpt->heads = nlh;
fdpt->sectors = nlspt;
- if (nlc == npc && nlh == nph && nlspt == npspt)
- // no logical CHS mapping used, just physical CHS
- // use Standard Fixed Disk Parameter Table (FDPT)
- return;
-
- // complies with Phoenix style Translated Fixed Disk Parameter
- // Table (FDPT)
- fdpt->phys_cylinders = npc;
- fdpt->phys_heads = nph;
- fdpt->phys_sectors = npspt;
- fdpt->a0h_signature = 0xa0;
-
- // Checksum structure.
- fdpt->checksum -= checksum(fdpt, sizeof(*fdpt));
+ if (nlc != npc || nlh != nph || nlspt != npspt) {
+ // Logical mapping present - use extended structure.
+
+ // complies with Phoenix style Translated Fixed Disk Parameter
+ // Table (FDPT)
+ fdpt->phys_cylinders = npc;
+ fdpt->phys_heads = nph;
+ fdpt->phys_sectors = npspt;
+ fdpt->a0h_signature = 0xa0;
+
+ // Checksum structure.
+ fdpt->checksum -= checksum(fdpt, sizeof(*fdpt));
+ }
if (hdid == 0)
SET_IVT(0x41, SEGOFF(get_ebda_seg(), offsetof(