[SeaBIOS] [PATCH] EDD fixes

Sebastian Herbszt herbszt at gmx.de
Sat Jul 31 17:26:09 CEST 2010


Fix data returned in the int13dpt structure.

Signed-off-by: Sebastian Herbszt <herbszt at gmx.de>

diff --git a/src/disk.c b/src/disk.c
index 242c742..d7fd6b3 100644
--- a/src/disk.c
+++ b/src/disk.c
@@ -603,14 +603,14 @@ disk_1348(struct bregs *regs, struct drive_s *drive_g)
         ebda_seg, (void*)offsetof(struct extended_bios_data_area_s, dpte), 15);
     SET_EBDA2(ebda_seg, dpte.checksum, -sum);
 
-    if (size < 66) {
+    if (size < 74) {
         disk_ret(regs, DISK_RET_SUCCESS);
         return;
     }
 
     // EDD 3.x
     SET_INT13DPT(regs, key, 0xbedd);
-    SET_INT13DPT(regs, dpi_length, 36);
+    SET_INT13DPT(regs, dpi_length, 44);
     SET_INT13DPT(regs, reserved1, 0);
     SET_INT13DPT(regs, reserved2, 0);
 
@@ -619,7 +619,7 @@ disk_1348(struct bregs *regs, struct drive_s *drive_g)
         SET_INT13DPT(regs, host_bus[0], 'P');
         SET_INT13DPT(regs, host_bus[1], 'C');
         SET_INT13DPT(regs, host_bus[2], 'I');
-        SET_INT13DPT(regs, host_bus[3], 0);
+        SET_INT13DPT(regs, host_bus[3], ' ');
 
         u32 path = (pci_bdf_to_bus(bdf) | (pci_bdf_to_dev(bdf) << 8)
                     | (pci_bdf_to_fn(bdf) << 16));
@@ -629,7 +629,7 @@ disk_1348(struct bregs *regs, struct drive_s *drive_g)
         SET_INT13DPT(regs, host_bus[0], 'I');
         SET_INT13DPT(regs, host_bus[1], 'S');
         SET_INT13DPT(regs, host_bus[2], 'A');
-        SET_INT13DPT(regs, host_bus[3], 0);
+        SET_INT13DPT(regs, host_bus[3], ' ');
 
         SET_INT13DPT(regs, iface_path, iobase1);
     }
@@ -637,16 +637,19 @@ disk_1348(struct bregs *regs, struct drive_s *drive_g)
     SET_INT13DPT(regs, iface_type[0], 'A');
     SET_INT13DPT(regs, iface_type[1], 'T');
     SET_INT13DPT(regs, iface_type[2], 'A');
-    SET_INT13DPT(regs, iface_type[3], 0);
-    SET_INT13DPT(regs, iface_type[4], 0);
-    SET_INT13DPT(regs, iface_type[5], 0);
-    SET_INT13DPT(regs, iface_type[6], 0);
-    SET_INT13DPT(regs, iface_type[7], 0);
+    SET_INT13DPT(regs, iface_type[3], ' ');
+    SET_INT13DPT(regs, iface_type[4], ' ');
+    SET_INT13DPT(regs, iface_type[5], ' ');
+    SET_INT13DPT(regs, iface_type[6], ' ');
+    SET_INT13DPT(regs, iface_type[7], ' ');
 
-    SET_INT13DPT(regs, device_path, slave);
+    SET_INT13DPT(regs, device_path1, slave);
+    SET_INT13DPT(regs, device_path2, 0);
+
+    SET_INT13DPT(regs, reserved3, 0);
 
     SET_INT13DPT(regs, checksum
-                 , -checksum_far(regs->ds, (void*)(regs->si+30), 35));
+                 , -checksum_far(regs->ds, (void*)(regs->si+30), 43));
 
     disk_ret(regs, DISK_RET_SUCCESS);
 }
diff --git a/src/disk.h b/src/disk.h
index 9e5b083..0ef849d 100644
--- a/src/disk.h
+++ b/src/disk.h
@@ -63,7 +63,8 @@ struct int13dpt_s {
     u8  host_bus[4];
     u8  iface_type[8];
     u64 iface_path;
-    u64 device_path;
+    u64 device_path1;
+    u64 device_path2;
     u8  reserved3;
     u8  checksum;
 } PACKED;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: seabios_edd_fixes.diff
Type: application/octet-stream
Size: 2811 bytes
Desc: not available
URL: <http://www.seabios.org/pipermail/seabios/attachments/20100731/efd97e20/attachment.obj>


More information about the SeaBIOS mailing list