From a0dae108231cdd929aff1f6551fcb70c806c0f99 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Thu, 19 Nov 2009 20:17:43 -0800 Subject: [PATCH] memdisk: pptr->cd_pkt.sect_count is in virtual sectors Per the El Torito spec, pptr->cd_pkt.sect_count are in virtual sectors, i.e. 512-byte sectors. Signed-off-by: H. Peter Anvin --- memdisk/setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/memdisk/setup.c b/memdisk/setup.c index 5a45f39..db986fa 100644 --- a/memdisk/setup.c +++ b/memdisk/setup.c @@ -1032,7 +1032,7 @@ void setup(const struct real_mode_args *rm_args_ptr) pptr->cd_pkt.start = boot_cat->initial_entry.load_block; boot_seg = pptr->cd_pkt.load_seg = boot_cat->initial_entry.load_seg; pptr->cd_pkt.sect_count = boot_cat->initial_entry.sect_count; - boot_len = pptr->cd_pkt.sect_count * 2048; + boot_len = pptr->cd_pkt.sect_count * 512; pptr->cd_pkt.geom1 = (uint8_t)(pptr->cylinders) & 0xFF; pptr->cd_pkt.geom2 = (uint8_t)(pptr->sectors) | (uint8_t)((pptr->cylinders >> 2) & 0xC0); -- 2.7.4