IASL stores it's revision in each table header it generates.
That's a problem since guests see a change each time
they move between hypervisors.
We generally fill our own info for tables,
but we forgot to do this for the built-in DSDT.
Signed-off-by: Michael S. Tsirkin <mst(a)redhat.com>
---
src/fw/acpi.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/fw/acpi.c b/src/fw/acpi.c
index c29425c..0e3e3ad 100644
--- a/src/fw/acpi.c
+++ b/src/fw/acpi.c
@@ -689,13 +689,16 @@ acpi_setup(void)
if (CONFIG_ACPI_DSDT && fadt && !fadt->dsdt) {
/* default DSDT */
- void *dsdt = malloc_high(sizeof(AmlCode));
+ struct acpi_table_header *dsdt = malloc_high(sizeof(AmlCode));
if (!dsdt) {
warn_noalloc();
return;
}
memcpy(dsdt, AmlCode, sizeof(AmlCode));
fill_dsdt(fadt, dsdt);
+ /* Strip out compiler-generated header if any */
+ memset(dsdt, 0, sizeof *dsdt);
+ build_header(dsdt, DSDT_SIGNATURE, sizeof(AmlCode), 1);
}
// Build final rsdt table
--
MST
Hi,
I'm in the process of dusting off an old Geode GX1 thin client I have and upgrading it to coreboot v4. I had no problem building a new coreboot image (v4 is SO much easier than v2), but I'm having an issue with SeaBIOS and option ROMs. Since this is my first time working with SeaBIOS, I need a bit of help to bring this together.
I built a PXE ROM for the onboard NIC, which is a NatSemi DP83815 (DEV/DID 100b/0020). I've tried both an iPXE image built from scratch, as well as a GPXE ROM from rom-o-matic. I added the ROM with cbfstool as documented at coreboot.org, and also added a bootorder file that lists the NIC first. However, when SeaBIOS calls the ROM, nothing seems to happen. See below, where it tries to boot from the ROM but fails almost immediately. It boots successfully from the local disk after the ROM returns. Any pointers as to what the issue is are appreciated.
Start bios (version rel-1.7.2.1-0-g88cb66e-20130924_201442-test-f14)
Found mainboard DTRI WBTG
Ram Size=0x07de0000 (0x0000000000000000 high)
Relocating low data from 0x000e7330 to 0x000ef790 (size 2156)
Relocating init from 0x000e7b9c to 0x07dc61f0 (size 40164)
Found CBFS header at 0xfffffd30
CPU Mhz=295
Found 8 PCI devices (max PCI bus is 00)
No apic - only the main cpu is present.
Copying SMBIOS entry point from 0x07de1400 to 0x000fd6c0
Scan for VGA option rom
OHCI init on dev 00:13.0 (regs=0xfebf1000)
Found 1 lpt ports
Found 2 serial ports
ATA controller 1 at 1f0/3f4/0 (irq 14 dev 92)
ATA controller 2 at 170/374/0 (irq 15 dev 92)
ata0-0: FUJITSU MHT2060AT ATA-6 Hard-Disk (57231 MiBytes)
Searching bootorder for: /pci@i0cf8/*@12,2/drive@0/disk@0
Got ps2 nak (status=51)
All threads complete.
Scan for option roms
Running option rom at c000:0003
pnp call arg1=60
pmm call arg1=0
pmm call arg1=2
pmm call arg1=0
Searching bootorder for: /pci@i0cf8/*@15
Press F12 for boot menu.
Searching bootorder for: HALT
drive 0x000fd670: PCHS=16383/16/63 translation=lba LCHS=1024/255/63 s=117210240
Space available for UMB: 000c0800-000ef000
Returned 65536 bytes of ZoneHigh
e820 map has 5 items:
0: 0000000000000000 - 000000000009fc00 = 1 RAM
1: 000000000009fc00 - 00000000000a0000 = 2 RESERVED
2: 00000000000f0000 - 0000000000100000 = 2 RESERVED
3: 0000000000100000 - 0000000007de0000 = 1 RAM
4: 0000000007de0000 - 0000000007e00000 = 2 RESERVED
enter handle_19:
NULL
Booting from ROM...
Booting from c000:0336
enter handle_18:
NULL
Booting from Hard Disk...
Booting from 0000:7c00
Press any key to continue.
This is the seabios code that adds support for loading
acpi tables from QEMU.
Changes from v6:
- submission was botched, it didn't compile
fix up patch
biostables: support looking up RSDP
no changes to other patches
Changes from v5:
- address Kevin's comments:
move code to find rsdp to biostables.c
scan for RSDP at 0x10 intervals
Changes from v4:
- address Kevin's comments:
move loader to src/fw/
simplify some code
drop some unused code chunks
load from ROM even if !ACPI
rename option to make it non ACPI specific
Changes from v3:
- updated to latest bits
- add option to disable loading from QEMU
Changes from v2:
- addressed comments from Kevin: fixed coding style,
minimized changes to existing code
Changes from v1:
- simplified linker interfaces along the lines suggested
by Kevin
- fixed lots of bugs
Michael S. Tsirkin (3):
biostables: support looking up RSDP
romfile_loader: utility to patch in-memory ROM files
acpi: load and link tables through romfile loader
Makefile | 2 +-
src/fw/romfile_loader.h | 72 ++++++++++++++++++++
src/util.h | 1 +
src/fw/acpi.c | 21 ++++++
src/fw/biostables.c | 41 +++++++++--
src/fw/romfile_loader.c | 177 ++++++++++++++++++++++++++++++++++++++++++++++++
src/Kconfig | 11 +++
7 files changed, 317 insertions(+), 8 deletions(-)
create mode 100644 src/fw/romfile_loader.h
create mode 100644 src/fw/romfile_loader.c
--
MST
The BIOS that we ship in 1.7 does not use pci info
from host and so far isn't going to use it.
Taking in account problems it caused see 9604f70fdf and
to avoid future incompatibility issues, it's safest to
disable that interface by default for all machine types
including 1.7 as it was never exposed/used by guest.
And properly remove/cleanup it during 1.8 development cycle.
Signed-off-by: Igor Mammedov <imammedo(a)redhat.com>
---
hw/i386/pc_piix.c | 3 ++-
hw/i386/pc_q35.c | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index c6042c7..4a4d969 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -58,7 +58,8 @@ static const int ide_iobase2[MAX_IDE_BUS] = { 0x3f6, 0x376 };
static const int ide_irq[MAX_IDE_BUS] = { 14, 15 };
static bool has_pvpanic;
-static bool has_pci_info = true;
+/* TODO: remove unused "etc/pci-info" */
+static bool has_pci_info;
/* PC hardware initialisation */
static void pc_init1(QEMUMachineInitArgs *args,
diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
index ca84e1c..8e5c1ae 100644
--- a/hw/i386/pc_q35.c
+++ b/hw/i386/pc_q35.c
@@ -48,7 +48,8 @@
#define MAX_SATA_PORTS 6
static bool has_pvpanic;
-static bool has_pci_info = true;
+/* TODO: remove unused "etc/pci-info" */
+static bool has_pci_info;
/* PC hardware initialisation */
static void pc_q35_init(QEMUMachineInitArgs *args)
--
1.7.1
Hi,
It's probably going to be a bit tough this time. We are pretty late in
the qemu 1.7 devel cycle, soft freeze today, and a big chunk of code
(ahci-tables-from qemu) which needs seabios support[1] is just about to
be pulled.
That leaves only two weeks (with kvm forum in the middle!) until qemu
1.7 hard freeze with -rc0 (2013-10-29), which should ideally have a
seabios update so it can be tested in the rc phase.
There are two more interface updates (pass pcimem64-start address + e820
entries for ram regions) which would be good to get in while being at
it.
seabios patches are ready for the most part and just waiting for the
qemu counterparts to be merged first.
The timing constrains suggest we should tightly align the releases, with
seabios releases being a bit earlier, i.e. something like this:
(1) merge pending qemu patches
(2) merge pending seabios patches
(3) tag -rc0 seabios release [asap, no later than 2013-10-28]
(4) merge seabios update into qemu
(5) qemu hard freeze, -rc0 release with seabios update [2013-10-29]
(6) seabios freeze in parallel with qemu hard freeze
(7) apply seabios fixes if needed.
(8) tag final seabios release [targeting qemu -rc2 or -rc3 date here]
(9) merge seabios bugfix update into qemu
Qemu 1.7 schedule is here: http://wiki.qemu.org/Planning/1.7
Comments?
cheers,
Gerd
[1] Strictly speaking it isn't absolutely required, but would be very
good to have.
Remove the SET_GLOBAL macro - it is no longer used and since it was
only available in "32bit flat" mode it does not have much use.
Signed-off-by: Kevin O'Connor <kevin(a)koconnor.net>
---
README | 21 ++++++++++-----------
src/biosvar.h | 4 ----
2 files changed, 10 insertions(+), 15 deletions(-)
diff --git a/README b/README
index 6844e52..1e61e2f 100644
--- a/README
+++ b/README
@@ -104,23 +104,22 @@ mode instead of a segment/offset pair.
Most BIOS variables are stored in global variables, the "BDA", or
"EBDA" memory areas. Because this is common, three sets of helper
-macros (GET/SET_GLOBAL, GET/SET_BDA, and GET/SET_EBDA) are available
-to simplify these accesses. Also, an area in the 0xc0000-0xf0000
-memory range is made available for internal BIOS run-time variables
-that are marked with the VARLOW attribute. These variables can then
-be accessed with the GET/SET_LOW macros.
+macros (GET_GLOBAL, GET/SET_BDA, and GET/SET_EBDA) are available to
+simplify these accesses. Also, an area in the 0xc0000-0xf0000 memory
+range is made available for internal BIOS run-time variables that are
+marked with the VARLOW attribute. These variables can then be
+accessed with the GET/SET_LOW macros.
Global variables defined in the C code can be read in 16bit mode if
the variable declaration is marked with VAR16, VARFSEG, or VAR16FIXED.
The GET_GLOBAL macro will then allow read access to the variable.
Global variables are stored in the 0xf000 segment. Because the
f-segment is marked read-only during run-time, the 16bit code is not
-permitted to change the value of 16bit variables (use of the
-SET_GLOBAL macro from 16bit mode will cause a link error). Code
-running in 32bit mode can not access variables with VAR16, but can
-access variables marked with VARFSEG, VARLOW, VAR16FIXED, or with no
-marking at all. The 32bit code can use the GET/SET_GLOBAL macros, but
-they are not required.
+permitted to change the value of 16bit variables. Code running in
+32bit mode can not access variables with VAR16, but can access
+variables marked with VARFSEG, VARLOW, VAR16FIXED, or with no marking
+at all. The 32bit code can use the GET_GLOBAL macros, but they are
+not required.
GCC 16 bit stack limitations:
diff --git a/src/biosvar.h b/src/biosvar.h
index 051cd1e..58bcbce 100644
--- a/src/biosvar.h
+++ b/src/biosvar.h
@@ -99,10 +99,6 @@ static inline u16 get_global_seg(void) {
#define GET_GLOBAL(var) \
GET_VAR(GLOBAL_SEGREG, *(typeof(&(var)))((void*)&(var) \
+ get_global_offset()))
-#define SET_GLOBAL(var, val) do { \
- ASSERT32FLAT(); \
- (var) = (val); \
- } while (0)
#if MODESEGMENT
#define GLOBALFLAT2GLOBAL(var) ((typeof(var))((void*)(var) - BUILD_BIOS_ADDR))
#else
--
1.8.3.1