[syslinux] Initial support for sector size >512

Frediano Ziglio frediano.ziglio at citrix.com
Mon Feb 10 07:33:47 PST 2014


On Wed, 2013-12-18 at 15:06 -0800, H. Peter Anvin wrote:
> On 12/16/2013 05:18 AM, Frediano Ziglio wrote:
> > 
> > Surely should apply to 4.xx where they was developed but I think I send
> > them for 5.xx. mbr part of patches was merged time ago.
> > Unfortunately I had no time to update other patches. If I remember there
> > was a problem on the way ADV was implemented (using the same sector).
> > 
> > Unfortunately my company business required to work on other things. We
> > actually have these patches in our product but would be very great to
> > upstream them.
> > 
> > Do you need some help testing? I should have some patches (like seabios)
> > somewhere.
> > 
> 
> That might help, but yes, there are certainly issues with the ADV (I
> think we should expand the ADV to 4K, but that means we need to do some
> size reduction to fit the btrfs area).
> 

Hi,
  I finally found some time to resume my test patches. Unfortunately
they does not work any more. Using Seabios with my patch and Qemu I used
does not work as Qemu start consuming all CPUs and do nothing. If I
update Seabios and apply my patch system start loading but after initrd
is loaded system stops. 

The command I'm trying to use is

./x86_64-softmmu/qemu-system-x86_64 -m 1024 -enable-kvm  -cdrom cd.iso
-boot d -bios ~/seabios/out/bios.bin -drive
if=none,media=disk,file=test.qcow,id=disk1 -device lsi,id=scsi0 -device
scsi-hd,logical_block_size=4096,physical_block_size=4096,drive=disk1,bus=scsi0.0

The patch was just

From: Frediano Ziglio <frediano.ziglio at citrix.com>
Date: Mon, 10 Feb 2014 15:17:04 +0000
Subject: [PATCH] Try sector size > 512.

---
 src/hw/blockcmd.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/hw/blockcmd.c b/src/hw/blockcmd.c
index eb531d4..e8e8cd7 100644
--- a/src/hw/blockcmd.c
+++ b/src/hw/blockcmd.c
@@ -161,7 +161,7 @@ scsi_drive_setup(struct drive_s *drive, const char
*s, int prio)
     // We do not bother with READ CAPACITY(16) because BIOS does not
support
     // 64-bit LBA anyway.
     drive->blksize = be32_to_cpu(capdata.blksize);
-    if (drive->blksize != DISK_SECTOR_SIZE) {
+    if (drive->blksize != DISK_SECTOR_SIZE && drive->blksize != 4096) {
         dprintf(1, "%s: unsupported block size %d\n", s,
drive->blksize);
         return -1;
     }
-- 
1.7.10.4



Frediano




More information about the Syslinux mailing list