Re: [SeaBIOS] [PATCH 0/7] vgabios improvements

2014-04-14 Thread Gerd Hoffmann
Hi, > Oddly, I can't boot from a hard drive (-hda) when I use the > coreboot/seabios I built though. It keeps failing at "Booting from > Hard Disk...". I see that with my builds too, but only with -vga std (where coreboot vgabios is used). Same bios image with -vga cirrus works fine. So it s

Re: [SeaBIOS] [PATCH 0/7] vgabios improvements

2014-04-14 Thread Gerd Hoffmann
Hi, > Thanks. Looks like that set of options would have broken the build > even prior to the vga patch series. There was no reason to try though ;) > I can fix the compilation with > the patch below, but it wont actually permit the vgabios to use the > debug_io support. Reasonable. cheers,

Re: [SeaBIOS] [SeaBIOS v3 PATCH] SMBIOS: Check for full tables & entry point in fw_cfg

2014-04-14 Thread Kevin O'Connor
On Mon, Apr 14, 2014 at 03:30:14PM -0400, Gabriel L. Somlo wrote: > Check fw_cfg for the presence of a complete set of smbios > tables (etc/smbios/smbios-tables) and an entry point structure > (etc/smbios/smbios-anchor), and, if found, use them instead of > generating our own copies locally. > > W

[SeaBIOS] [QEMU v6 PATCH 17/17] SMBIOS: Update memory table types (16, 17, and 19) to smbios spec v2.8

2014-04-14 Thread Gabriel L. Somlo
This patch adds extended start/end address and extended size fields to each memory table type. Signed-off-by: Gabriel Somlo --- hw/i386/smbios.c | 52 include/hw/i386/smbios.h | 20 --- 2 files changed, 52 insertions(+), 20

[SeaBIOS] [QEMU v6 PATCH 16/17] SMBIOS: Update type 4 definition to smbios spec v2.6

2014-04-14 Thread Gabriel L. Somlo
With this update, we generate one type 4 (processor information) table per socket, calculated as "smp_cpus / (smp_cores * smp_threads)", which is in line with what happens on modern hardware. Signed-off-by: Gabriel Somlo --- hw/i386/smbios.c | 22 +- include/hw/i386/s

[SeaBIOS] [QEMU v6 PATCH 11/17] SMBIOS: Generate aggregate smbios tables, including entry point

2014-04-14 Thread Gabriel L. Somlo
Build a complete set of smbios tables as a monolithic blob; Also, build an entry point structure, and insert both the set of tables and the entry point into distinct fw_cfg files. This patch expects a SeaBIOS version equal or later than commit X. An earlier version will work, but without t

[SeaBIOS] [QEMU v6 PATCH 15/17] SMBIOS: Update type 3 definition to smbios spec v2.7

2014-04-14 Thread Gabriel L. Somlo
Signed-off-by: Gabriel Somlo --- hw/i386/smbios.c | 8 +++- include/hw/i386/smbios.h | 3 ++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/hw/i386/smbios.c b/hw/i386/smbios.c index eb11095..25d2aa3 100644 --- a/hw/i386/smbios.c +++ b/hw/i386/smbios.c @@ -52,7 +52,7 @

[SeaBIOS] [QEMU v6 PATCH 13/17] SMBIOS: Stop including type 20 tables

2014-04-14 Thread Gabriel L. Somlo
Table type 20 (memory device mapped address) is no longer required as of smbios spec v2.5. Leaving it out completely saves us from having to figure out how to connect type 17 devices to type 19 memory areas. Signed-off-by: Gabriel Somlo --- hw/i386/smbios.c | 99 +

[SeaBIOS] [QEMU v6 PATCH 14/17] SMBIOS: Use e820 memory map to generate type 19 tables

2014-04-14 Thread Gabriel L. Somlo
Build type 19 (memory array mapped address, a.k.a. memory area) tables by scanning the e820 map for E820_RAM entries. Since this supercedes below_4g and above_4g ram amounts, we no longer need them as arguments to smbios_set_defaults(). Signed-off-by: Gabriel Somlo --- hw/i386/pc.c |

[SeaBIOS] [QEMU v6 PATCH 09/17] SMBIOS: Build full smbios memory tables (type 16, 17, 19, and 20)

2014-04-14 Thread Gabriel L. Somlo
Build full smbios tables representing the system RAM: - type 16 (physical memory array): represents the entire system RAM; - type 17 (memory device) tables: one per virtual DIMM; - type 19 (memory array mapped address): represent major RAM areas (currently one for below-4G memory, and, if

[SeaBIOS] [QEMU v6 PATCH 10/17] SMBIOS: Build full tables for type 32 and 127

2014-04-14 Thread Gabriel L. Somlo
Build full smbios type 32 (system boot info) and 127 (end-of-table) tables, and make them available via fw_cfg. Signed-off-by: Gabriel Somlo --- hw/i386/smbios.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/hw/i386/smbios.c b/hw/i386/smbios.c index 6510ff3..b1f1d46 10

[SeaBIOS] [QEMU v6 PATCH 12/17] SMBIOS: Remove SeaBIOS compatibility quirks

2014-04-14 Thread Gabriel L. Somlo
- Replace some arbitrarily hardcoded fields with proper "n/a" or "unknown" values; - Use QEMU-supplied default manufacturer and version strings; - Count CPUs starting with 0 instead of 1, to maintain uniformity with other multiple-instance items. Signed-off-by: Gabriel Somlo --- hw

[SeaBIOS] [QEMU v6 PATCH 06/17] SMBIOS: Remove unused code for passing individual fields to bios

2014-04-14 Thread Gabriel L. Somlo
This patch removes smbios_add_field() and the old code to insert individual fields for types 0 and 1 into fw_cfg. Signed-off-by: Gabriel Somlo --- hw/i386/smbios.c | 80 1 file changed, 80 deletions(-) diff --git a/hw/i386/smbios.c b/hw/i

[SeaBIOS] [QEMU v6 PATCH 07/17] SMBIOS: Build full type 3 table

2014-04-14 Thread Gabriel L. Somlo
Build smbios type 3 (system enclosure) table, and make it available to the bios via fw_cfg. For initial compatibility with SeaBIOS, use "Bochs" as the default manufacturer string, and leave version unset. Signed-off-by: Gabriel Somlo --- hw/i386/smbios.c | 67

[SeaBIOS] [QEMU v6 PATCH 08/17] SMBIOS: Build full type 4 tables

2014-04-14 Thread Gabriel L. Somlo
Build full smbios type 4 (processor information) tables, and make them available to the bios via fw_cfg. For initial compatibility with SeaBIOS, use "Bochs" as the default manufacturer string, and leave version unset. Signed-off-by: Gabriel Somlo --- hw/i386/pc.c | 3 ++ hw/i386/smb

[SeaBIOS] [QEMU v6 PATCH 04/17] SMBIOS: Add code to build full smbios tables; build type 2 table

2014-04-14 Thread Gabriel L. Somlo
This patch adds a set of macros which build full smbios tables of a given type, including the logic to decide whether a given table type should be built or not. To illustrate this new functionality, we introduce and optionally build a table of type 2 (base board), which is required by some version

[SeaBIOS] [QEMU v6 PATCH 00/17] SMBIOS: build full tables in QEMU

2014-04-14 Thread Gabriel L. Somlo
New in version 6 of the patch set: - down to 17 patches (squashed adding spec v2.4 fields in together with adding v2.8 fields further down). - switching to monolithic aggregate tables plus entry point in patch 11/17, right after accomplishing full SeaBIOS compatibility (in 10/17).

[SeaBIOS] [QEMU v6 PATCH 02/17] SMBIOS: Use macro to set smbios defaults

2014-04-14 Thread Gabriel L. Somlo
The function smbios_set_defaults() uses a repeating code pattern for each field. This patch replaces that pattern with a macro. Signed-off-by: Gabriel Somlo --- hw/i386/smbios.c | 17 - 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/hw/i386/smbios.c b/hw/i386/smbio

[SeaBIOS] [QEMU v6 PATCH 05/17] SMBIOS: Build full tables for types 0 and 1

2014-04-14 Thread Gabriel L. Somlo
Build full tables for types 0 (bios information) and 1 (system information). Type 0 is optional, and a table will only be built if requested via the command line; the default is to leave type 0 tables up to the bios itself. Signed-off-by: Gabriel Somlo --- hw/i386/smbios.c | 63 +

[SeaBIOS] [QEMU v6 PATCH 01/17] SMBIOS: Rename smbios_set_type1_defaults() for more general use

2014-04-14 Thread Gabriel L. Somlo
Subsequent patches will utilize this function to set defaults for more smbios types than just type 1, so the function name should reflect this. Signed-off-by: Gabriel Somlo --- hw/i386/pc_piix.c| 12 ++-- hw/i386/pc_q35.c | 8 hw/i386/smbios.c | 4 ++--

[SeaBIOS] [QEMU v6 PATCH 03/17] SMBIOS: Use bitmaps to check for smbios table collisions

2014-04-14 Thread Gabriel L. Somlo
Replace existing smbios_check_collision() functionality with a pair of bitmaps: have_binfile_bitmap and have_fields_bitmap. Bits corresponding to each smbios type are set by smbios_entry_add(), which also uses the bitmaps to ensure that binary blobs and field values are never accepted for the same

[SeaBIOS] [SeaBIOS v3 PATCH] SMBIOS: Check for full tables & entry point in fw_cfg

2014-04-14 Thread Gabriel L. Somlo
Check fw_cfg for the presence of a complete set of smbios tables (etc/smbios/smbios-tables) and an entry point structure (etc/smbios/smbios-anchor), and, if found, use them instead of generating our own copies locally. We ensure the presence of a type 0 (bios information) structure by generating o

Re: [SeaBIOS] [PATCH 0/7] vgabios improvements

2014-04-14 Thread Kevin O'Connor
On Mon, Apr 14, 2014 at 02:22:51PM +0200, Gerd Hoffmann wrote: > So you can try this: > > qemu -vga std -bios /usr/share/coreboot.git/coreboot-i440fx-seabios.rom > > to see it live in action. > > Two problems spotted so far: > > (1) ipxe hangs at rom load time. > can be worked around by

Re: [SeaBIOS] [PATCH 0/7] vgabios improvements

2014-04-14 Thread Kevin O'Connor
On Mon, Apr 14, 2014 at 11:59:13AM +0200, Gerd Hoffmann wrote: > On Fr, 2014-04-11 at 11:31 -0400, Kevin O'Connor wrote: > > On Sun, Apr 06, 2014 at 06:59:53PM -0400, Kevin O'Connor wrote: > > > This patch series refactors the vgabios graphics mode framebuffer > > > manipulation code. It then adds

Re: [SeaBIOS] [PATCH 0/7] vgabios improvements

2014-04-14 Thread Gerd Hoffmann
On Fr, 2014-04-11 at 11:31 -0400, Kevin O'Connor wrote: > On Sun, Apr 06, 2014 at 06:59:53PM -0400, Kevin O'Connor wrote: > > This patch series refactors the vgabios graphics mode framebuffer > > manipulation code. It then adds in support for manipulating "direct" > > framebuffers that modern vga

Re: [SeaBIOS] [PATCH 0/7] vgabios improvements

2014-04-14 Thread Gerd Hoffmann
On Fr, 2014-04-11 at 11:31 -0400, Kevin O'Connor wrote: > On Sun, Apr 06, 2014 at 06:59:53PM -0400, Kevin O'Connor wrote: > > This patch series refactors the vgabios graphics mode framebuffer > > manipulation code. It then adds in support for manipulating "direct" > > framebuffers that modern vga

Re: [SeaBIOS] [QEMU v5 PATCH 00/18] SMBIOS: build full tables in QEMU

2014-04-14 Thread Gerd Hoffmann
Hi, > 2. QEMU only generates type 0 if explicitly told to do so on the > command line (i.e., *not* by default). In this case, SeaBIOS (or OVMF, > or any other BIOS) would have to scan the tables and insert its own > default type 0 if one was not purposely supplied by QEMU. (I know my > current S

Re: [SeaBIOS] [QEMU v5 PATCH 00/18] SMBIOS: build full tables in QEMU

2014-04-14 Thread Gerd Hoffmann
Hi, > harm in always producing type0). Also, it would be nice to move up > patch 18 to after patch 10 - that way an end-to-end test between > old/new smbios with the new interface could be done. Agree, that would be nice to have (although I wouldn't make that a hard requirement for merging).

Re: [SeaBIOS] [Qemu-devel] [QEMU v5 PATCH 00/18] SMBIOS: build full tables in QEMU

2014-04-14 Thread Markus Armbruster
"Gabriel L. Somlo" writes: > Kevin, > > Thanks for the comments. I'll work your feedback (and any other > feedback I get by early next week) into another iteration of smbios > patches for both SeaBIOS and QEMU. > > In the mean time, there's one remaining "big picture" design question: > > On Sat,