[SeaBIOS] Re: [PATCH 0/2] nvme fixes
On 5/26/21 3:49 AM, Gerd Hoffmann wrote: > > > > > Gerd Hoffmann (2): > > nvme: improve namespace allocation > > nvme: drive desc should not include the newline > > > > src/hw/nvme-int.h | 1 - > > src/hw/nvme.c | 44 ++-- > > 2 files changed, 18 insertions(+), 27 deletions(-) > > > Thanks, this fixes https://bugzilla.redhat.com/show_bug.cgi?id=1963255 for me - Cole ___ SeaBIOS mailing list -- seabios@seabios.org To unsubscribe send an email to seabios-le...@seabios.org
[SeaBIOS] Re: SeaBIOS fails to boot from NVMe controller with lots of namespaces
On 5/25/21 12:06 PM, Thanos Makatos wrote: >> -Original Message- >> From: Cole Robinson >> Sent: 25 May 2021 17:01 >> To: Gerd Hoffmann >> Cc: Thanos Makatos ; seabios@seabios.org; >> John Levon ; Swapnil Ingle >> ; Liu, Changpeng >> Subject: Re: [SeaBIOS] Re: SeaBIOS fails to boot from NVMe controller with >> lots of namespaces >> >> On 5/25/21 9:23 AM, Gerd Hoffmann wrote: >>> Hi, >>> >>>> Where can I file this so it doesn't get lost? >>>> Anyone know a qemu command line workaround? >>> >>> Does >>> https://urldefense.proofpoint.com/v2/url?u=https-3A__mail.coreboot.org >>> _hyperkitty_list_seabios- >> 40seabios.org_thread_2Q7NPH7TJNHK6JGPHQL7755H >>> >> ILO23ISN_=DwICAg=s883GpUCOChKOHiocYtGcg=XTpYsh5Ps2zJvtw6 >> ogtti46a >>> tk736SI4vgsJiUKIyDE=mdjJ1- >> 1RXDTbTR7f6XC83pvNxgTqd_Yz_1nmiNOsSqk=4E >>> z7Bvnncx71uPWLUTdweByMiN5ypl3-FzhmrDT2ZcY= >>> help? >>> >> >> No, tested with qemu.git. Plus the code the patch touches in >> nvme_controller_enable comes after where the alloc failure happens. > > I haven't upstreamed the relevant QEMU patch yet as I'm waiting for the > SeaBIOS part to be reviewed first. > > The alloc failure can be avoided be setting BUILD_MIN_BIOSTABLE to 32K. > Okay I just tried that, on top of master. It's still not enough for qemu's 256 namespace default, same reported error. If I override it with `identify->nn = 128;` in nvme_controller_enable then things start working. Thanks, Cole ___ SeaBIOS mailing list -- seabios@seabios.org To unsubscribe send an email to seabios-le...@seabios.org
[SeaBIOS] Re: SeaBIOS fails to boot from NVMe controller with lots of namespaces
On 5/25/21 9:23 AM, Gerd Hoffmann wrote: > Hi, > >> Where can I file this so it doesn't get lost? >> Anyone know a qemu command line workaround? > > Does > https://mail.coreboot.org/hyperkitty/list/seabios@seabios.org/thread/2Q7NPH7TJNHK6JGPHQL7755HILO23ISN/ > help? > No, tested with qemu.git. Plus the code the patch touches in nvme_controller_enable comes after where the alloc failure happens. - Cole ___ SeaBIOS mailing list -- seabios@seabios.org To unsubscribe send an email to seabios-le...@seabios.org
[SeaBIOS] Re: SeaBIOS fails to boot from NVMe controller with lots of namespaces
On 4/16/21 4:46 AM, Thanos Makatos wrote: > > >> -Original Message- >> From: Gerd Hoffmann >> Sent: 16 April 2021 08:15 >> To: Thanos Makatos >> Cc: Kevin O'Connor ; seabios@seabios.org; John >> Levon ; Swapnil Ingle >> ; Liu, Changpeng >> Subject: Re: [SeaBIOS] SeaBIOS fails to boot from NVMe controller with lots >> of namespaces >> >> Hi, >> >>> Regarding the failure cases, will things break during build >> (BUILD_MIN_BIOSTABLE=16K), e.g: >>> >>> [seabios] Error! ROM doesn't fit (135584 > 131072) >>> [seabios]You have to either increase the size (CONFIG_ROM_SIZE) >>> [seabios]or turn off some features (such as hardware support not >>> [seabios]needed) to make it fit. Trying a more recent gcc version >>> [seabios]might work too. >>> [seabios] make: *** [out/bios.bin.prep] Error 1 >>> >>> Or do we expect undefined behavior at run time? >> >> Running out of memory can lead to undefined behavior at run time, >> depending on which allocations fail. Typical error pattern is that seabios >> can't >> initialize all devices, leading to boot failures. >> >>> 256 namespaces is not an insanely huge number. >> >> Well, back in the 80ies when the BIOS interfaces have been created >> 256 was an insanely huge number ... >> >> Given we have a number of real mode constrains for compatibility reasons >> (like some data structures must live in the f segment) there is no easy way >> out, we simply can't support an unlimited number of disks (which btw is one >> of the reasons why the "skip non-bootable disks" code exists). > > SeaBIOS only tries to boot from the first namespace; if that fails other > namespaces aren't tried > (https://mail.coreboot.org/hyperkitty/list/seabios@seabios.org/thread/72LFLT7KFMWE4GVZHWF4G34PKLVG5LRD/). > If we stick to the current behavior, then there's no reason to probe any > other namespace apart from the first one. This greatly reduces memory > requirements so we should be able to support the max number of namespaces. > >> >> Of course there is the option to leave behind the 80ies and go for UEFI. > > Or can just live with it as you suggest and simply document it . Sorry for thread necro, but CoreOS devs are hitting this issue too, but using plain emulated qemu nvme. Fedora bug: https://bugzilla.redhat.com/show_bug.cgi?id=1963255 Originally a `-device nvme,...` would report only 1 namespace, and seabios could boot from it fine. After '7f0f1acedf hw/block/nvme: support multiple namespaces', the device now reports 256 namespaces, and seabios fails like described in this thread. Where can I file this so it doesn't get lost? Anyone know a qemu command line workaround? Thanks, Cole ___ SeaBIOS mailing list -- seabios@seabios.org To unsubscribe send an email to seabios-le...@seabios.org
[SeaBIOS] [PATCH v2] biostables: Support SMBIOS 2.6+ UUID format
SMBIOS 2.6+ stores the UUID in a different format, with the first 3 fields in little endian format. This is what modern qemu delivers and what dmidecode also handles, so let's follow suit too. More info at this thread: http://www.seabios.org/pipermail/seabios/2015-November/010031.html The only place this affects is when reporting the UUID at startup. https://bugzilla.redhat.com/show_bug.cgi?id=1284259 Signed-off-by: Cole Robinson <crobi...@redhat.com> --- v2: Update the comment src/fw/biostables.c | 47 --- 1 file changed, 36 insertions(+), 11 deletions(-) diff --git a/src/fw/biostables.c b/src/fw/biostables.c index cb74396..9fb9ff9 100644 --- a/src/fw/biostables.c +++ b/src/fw/biostables.c @@ -306,17 +306,42 @@ display_uuid(void) if (memcmp(uuid, empty_uuid, sizeof(empty_uuid)) == 0) return; -printf("Machine UUID" - " %02x%02x%02x%02x" - "-%02x%02x" - "-%02x%02x" - "-%02x%02x" - "-%02x%02x%02x%02x%02x%02x\n" - , uuid[ 0], uuid[ 1], uuid[ 2], uuid[ 3] - , uuid[ 4], uuid[ 5] - , uuid[ 6], uuid[ 7] - , uuid[ 8], uuid[ 9] - , uuid[10], uuid[11], uuid[12], uuid[13], uuid[14], uuid[15]); +/* + * According to SMBIOS v2.6 the first three fields are encoded in + * little-endian format. Versions prior to v2.6 did not specify + * the encoding, but we follow dmidecode and assume big-endian + * encoding. + */ +if (SMBiosAddr->smbios_major_version > 2 || +(SMBiosAddr->smbios_major_version == 2 && + SMBiosAddr->smbios_minor_version >= 6)) { +printf("Machine UUID" + " %02x%02x%02x%02x" + "-%02x%02x" + "-%02x%02x" + "-%02x%02x" + "-%02x%02x%02x%02x%02x%02x\n" + , uuid[ 3], uuid[ 2], uuid[ 1], uuid[ 0] + , uuid[ 5], uuid[ 4] + , uuid[ 7], uuid[ 6] + , uuid[ 8], uuid[ 9] + , uuid[10], uuid[11], uuid[12] + , uuid[13], uuid[14], uuid[15]); +} else { +printf("Machine UUID" + " %02x%02x%02x%02x" + "-%02x%02x" + "-%02x%02x" + "-%02x%02x" + "-%02x%02x%02x%02x%02x%02x\n" + , uuid[ 0], uuid[ 1], uuid[ 2], uuid[ 3] + , uuid[ 4], uuid[ 5] + , uuid[ 6], uuid[ 7] + , uuid[ 8], uuid[ 9] + , uuid[10], uuid[11], uuid[12] + , uuid[13], uuid[14], uuid[15]); +} + return; } } -- 2.5.0 ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios
Re: [SeaBIOS] [PATCH] biostables: Support SMBIOS 2.6+ UUID format
On 01/14/2016 12:22 PM, Kevin O'Connor wrote: > On Tue, Jan 12, 2016 at 02:22:41PM -0500, Cole Robinson wrote: >> SMBIOS 2.6+ stores the UUID in a different format, with the first 3 >> fields in little endian format. This is what modern qemu delivers >> and what dmidecode also handles, so let's follow suit too. More >> info at this thread: >> >> http://www.seabios.org/pipermail/seabios/2015-November/010031.html >> >> The only place this affects is when reporting the UUID at startup. >> >> https://bugzilla.redhat.com/show_bug.cgi?id=1284259 >> --- >> src/fw/biostables.c | 51 --- >> 1 file changed, 40 insertions(+), 11 deletions(-) >> >> diff --git a/src/fw/biostables.c b/src/fw/biostables.c >> index cb74396..2e15f82 100644 >> --- a/src/fw/biostables.c >> +++ b/src/fw/biostables.c >> @@ -306,17 +306,46 @@ display_uuid(void) >> if (memcmp(uuid, empty_uuid, sizeof(empty_uuid)) == 0) >> return; >> >> -printf("Machine UUID" >> - " %02x%02x%02x%02x" >> - "-%02x%02x" >> - "-%02x%02x" >> - "-%02x%02x" >> - "-%02x%02x%02x%02x%02x%02x\n" >> - , uuid[ 0], uuid[ 1], uuid[ 2], uuid[ 3] >> - , uuid[ 4], uuid[ 5] >> - , uuid[ 6], uuid[ 7] >> - , uuid[ 8], uuid[ 9] >> - , uuid[10], uuid[11], uuid[12], uuid[13], uuid[14], >> uuid[15]); >> +/* >> +* comment borrowed from dmidecode: >> +* >> +* As of version 2.6 of the SMBIOS specification, the first 3 >> +* fields of the UUID are supposed to be encoded on >> little-endian. >> +* The specification says that this is the defacto standard, >> +* however I've seen systems following RFC 4122 instead and use >> +* network byte order, so I am reluctant to apply the >> byte-swapping >> +* for older versions. >> +*/ > > I find this comment confusing - how about something like: > > According to SMBIOS v2.6 the first three fields are encoded in > little-endian format. Versions prior to v2.6 did not specify the > encoding, but we follow dmidecode and assume big-endian encoding. > That would be fine with me. If Gerd gives his ACK do you want to fix up the comment or should I post a v2? Thanks, Cole ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios
[SeaBIOS] [PATCH] biostables: Support SMBIOS 2.6+ UUID format
SMBIOS 2.6+ stores the UUID in a different format, with the first 3 fields in little endian format. This is what modern qemu delivers and what dmidecode also handles, so let's follow suit too. More info at this thread: http://www.seabios.org/pipermail/seabios/2015-November/010031.html The only place this affects is when reporting the UUID at startup. https://bugzilla.redhat.com/show_bug.cgi?id=1284259 --- src/fw/biostables.c | 51 --- 1 file changed, 40 insertions(+), 11 deletions(-) diff --git a/src/fw/biostables.c b/src/fw/biostables.c index cb74396..2e15f82 100644 --- a/src/fw/biostables.c +++ b/src/fw/biostables.c @@ -306,17 +306,46 @@ display_uuid(void) if (memcmp(uuid, empty_uuid, sizeof(empty_uuid)) == 0) return; -printf("Machine UUID" - " %02x%02x%02x%02x" - "-%02x%02x" - "-%02x%02x" - "-%02x%02x" - "-%02x%02x%02x%02x%02x%02x\n" - , uuid[ 0], uuid[ 1], uuid[ 2], uuid[ 3] - , uuid[ 4], uuid[ 5] - , uuid[ 6], uuid[ 7] - , uuid[ 8], uuid[ 9] - , uuid[10], uuid[11], uuid[12], uuid[13], uuid[14], uuid[15]); +/* +* comment borrowed from dmidecode: +* +* As of version 2.6 of the SMBIOS specification, the first 3 +* fields of the UUID are supposed to be encoded on little-endian. +* The specification says that this is the defacto standard, +* however I've seen systems following RFC 4122 instead and use +* network byte order, so I am reluctant to apply the byte-swapping +* for older versions. +*/ +if (SMBiosAddr->smbios_major_version > 2 || +(SMBiosAddr->smbios_major_version == 2 && + SMBiosAddr->smbios_minor_version >= 6)) { +printf("Machine UUID" + " %02x%02x%02x%02x" + "-%02x%02x" + "-%02x%02x" + "-%02x%02x" + "-%02x%02x%02x%02x%02x%02x\n" + , uuid[ 3], uuid[ 2], uuid[ 1], uuid[ 0] + , uuid[ 5], uuid[ 4] + , uuid[ 7], uuid[ 6] + , uuid[ 8], uuid[ 9] + , uuid[10], uuid[11], uuid[12] + , uuid[13], uuid[14], uuid[15]); +} else { +printf("Machine UUID" + " %02x%02x%02x%02x" + "-%02x%02x" + "-%02x%02x" + "-%02x%02x" + "-%02x%02x%02x%02x%02x%02x\n" + , uuid[ 0], uuid[ 1], uuid[ 2], uuid[ 3] + , uuid[ 4], uuid[ 5] + , uuid[ 6], uuid[ 7] + , uuid[ 8], uuid[ 9] + , uuid[10], uuid[11], uuid[12] + , uuid[13], uuid[14], uuid[15]); +} + return; } } -- 2.5.0 ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios
[SeaBIOS] bug: incorrect uuid in seabios output
Hi, The UUID seabios reports in its boot output doesn't match what is passed via qemu -uuid option. An example is reported here: https://bugzilla.redhat.com/show_bug.cgi?id=1284259 This is due to: commit caad057bb6ce86a9cb71520af395fd0bd04a659f Author: Eduardo HabkostDate: Wed Oct 29 11:26:08 2014 -0200 smbios: Encode UUID according to SMBIOS specification Differently from older versions, SMBIOS version 2.6 is explicit about the encoding of UUID fields: > Although RFC 4122 recommends network byte order for all fields, the PC > industry (including the ACPI, UEFI, and Microsoft specifications) has > consistently used little-endian byte encoding for the first three fields: > time_low, time_mid, time_hi_and_version. The same encoding, also known as > wire format, should also be used for the SMBIOS representation of the UUID. > > The UUID {00112233-4455-6677-8899-AABBCCDDEEFF} would thus be represented > as 33 22 11 00 55 44 77 66 88 99 AA BB CC DD EE FF. The dmidecode tool implements this and decodes the above "wire format" when SMBIOS version >= 2.6. We moved from SMBIOS version 2.4 to 2.8 when we started building the SMBIOS entry point inside QEMU, on commit c97294ec1b9e36887e119589d456557d72ab37b5. seabios doesn't seem to handle this special UUID format when reading from smbios. Thanks, Cole ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios
Re: [SeaBIOS] [Qemu-devel] seabios 1.7.3 breaks booting windows 7?
On 07/08/2013 08:41 PM, Kevin O'Connor wrote: On Mon, Jul 08, 2013 at 08:18:42PM -0400, Cole Robinson wrote: On 07/08/2013 07:18 PM, Kevin O'Connor wrote: On Mon, Jul 08, 2013 at 05:23:40PM -0400, Cole Robinson wrote: On 07/07/2013 11:41 PM, Kevin O'Connor wrote: The 1.7.3 version of SeaBIOS has now been released. For more information on the release, please see: Just gave it a spin, breaks booting a Windows 7 VM for me. Using qemu-1.4.2 from Fedora 19 as well as qemu.git. Here's the BSOD (F19 qemu and seabios 1.7.3): http://crobinso.fedorapeople.org/misc/seabios_1.7.3_windows_err.png Thanks for testing. I have a Windows 7 Ultimate beta (build 7100) that I tested with and I don't see this problem. (Nor do I see the problem on WinXP.) Can you try without smp and with a smaller memory size (eg, 512M) to see if the behavior changes. Hmm, my winxp 32 guest is reproducing as well. And I can reproduce with just the windows 7 media (mine is ultimate N, came off MSDN years ago): ~/src/qemu/x86_64-softmmu/qemu-system-x86_64 -m 512 -sdl -cdrom /mnt/data/devel/media/win7_64.iso -boot d -bios ~/src/seabios/out/bios.bin vista and windows 8 preview media are reproducing for me too. Maybe it's a toolchain thing, anyone else on Fedora 19 that can independently confirm? Ugh - make sure you aren't using an old acpi-dsdt.aml file. I suggest following the steps outlined in the SeaBIOS README file for creating a mybiosdir/ directory and use the QEMU -L option to point to that directory. Indeed that was it, thanks Kevin, sorry for the noise. - Cole ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios
[SeaBIOS] seabios 1.7.3 breaks booting windows 7? (was: [ANNOUNCE] SeaBIOS 1.7.3)
On 07/07/2013 11:41 PM, Kevin O'Connor wrote: The 1.7.3 version of SeaBIOS has now been released. For more information on the release, please see: http://seabios.org/Releases New in this release: * Initial support for using SeaBIOS as a UEFI Compatibility Support Module (CSM) * Support for detecting and using ACPI reboot ports. * By default, all 16bit entry points now use an internal stack to reduce stack footprint. * Floppy controller code has been rewritten to improve compatibility. Non-standard floppy sizes now work again with recent QEMU versions. * Several bug fixes and code cleanups Just gave it a spin, breaks booting a Windows 7 VM for me. Using qemu-1.4.2 from Fedora 19 as well as qemu.git. Here's the BSOD (F19 qemu and seabios 1.7.3): http://crobinso.fedorapeople.org/misc/seabios_1.7.3_windows_err.png I bisected to: commit 76e58028d28e78431f9de3cee0b3c88d807fa39d Author: Kevin O'Connor ke...@koconnor.net Date: Wed Mar 6 21:50:09 2013 -0500 acpi: Eliminate BDAT parameter passing to DSDT code. Reproducing command line: x86_64-softmmu/qemu-system-x86_64 \ -bios /usr/share/seabios/bios.bin \ -machine pc-i440fx-1.4,accel=kvm,usb=off \ -m 4096 -smp 4 \ -sdl -vga std \ win7.qcow2 Let me know if there's any more info I can provide. Thanks, Cole ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios
Re: [SeaBIOS] [Qemu-devel] seabios 1.7.3 breaks booting windows 7?
On 07/08/2013 07:18 PM, Kevin O'Connor wrote: On Mon, Jul 08, 2013 at 05:23:40PM -0400, Cole Robinson wrote: On 07/07/2013 11:41 PM, Kevin O'Connor wrote: The 1.7.3 version of SeaBIOS has now been released. For more information on the release, please see: Just gave it a spin, breaks booting a Windows 7 VM for me. Using qemu-1.4.2 from Fedora 19 as well as qemu.git. Here's the BSOD (F19 qemu and seabios 1.7.3): http://crobinso.fedorapeople.org/misc/seabios_1.7.3_windows_err.png Thanks for testing. I have a Windows 7 Ultimate beta (build 7100) that I tested with and I don't see this problem. (Nor do I see the problem on WinXP.) Can you try without smp and with a smaller memory size (eg, 512M) to see if the behavior changes. Hmm, my winxp 32 guest is reproducing as well. And I can reproduce with just the windows 7 media (mine is ultimate N, came off MSDN years ago): ~/src/qemu/x86_64-softmmu/qemu-system-x86_64 -m 512 -sdl -cdrom /mnt/data/devel/media/win7_64.iso -boot d -bios ~/src/seabios/out/bios.bin vista and windows 8 preview media are reproducing for me too. Maybe it's a toolchain thing, anyone else on Fedora 19 that can independently confirm? Otherwise, we'll need to iterate through each change in the 76e58028 commit and find out which part of the DSDT that your copy of Windows doesn't like. I'll probably need some hand holding through that, I can't tell from looking at the patch what parts are independent. - Cole ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios