Nico Huber has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/46767 )
Change subject: util/qemu: Add `qemu` make target
......................................................................
util/qemu: Add `qemu` make target
Add some mechanics to automatically have a `qemu` make target for
supported configurations. So with a QEMU target selected in Kconfig,
one would ideally only have to run `make qemu` to test things.
There are some notable variables that can be set or adapted in
`Makefile.inc` files, the make command line or the environment.
Primarily for `Makefile.inc` use:
QEMU-y the QEMU executable
QEMU_CFG-y a QEMU config that sets the available default devices,
used to run more comprehensive tests by default,
e.g. many more PCI devices
For general use:
QEMU_ARGS additional command line arguments (default: -serial stdio)
QEMU_EXTRA_CFGS additional config files that can add devices
QEMU_CFG_ARGS gathers config file related arguments,
can be used to override a default config (QEMU_CFG-y)
Examples:
$ # Run coreboot's default config with additional command line args
$ make qemu QEMU_ARGS="-cdrom site-local/grml64-small_2018.12.iso"
$ # Force QEMU's built-in config
$ make qemu QEMU_CFG_ARGS=
Change-Id: I658f86e05df416ae09be6d432f9a80f7f71f9f75
Signed-off-by: Nico Huber <nico.h(a)gmx.de>
---
M Makefile.inc
A util/qemu/Makefile.inc
2 files changed, 47 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/67/46767/1
diff --git a/Makefile.inc b/Makefile.inc
index 297f7b1..dbf702a 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -83,7 +83,7 @@
subdirs-y += $(wildcard src/drivers/*) $(wildcard src/drivers/*/*) $(wildcard src/drivers/*/*/*)
subdirs-y += src/cpu src/vendorcode
subdirs-y += util/cbfstool util/sconfig util/nvramtool util/pgtblgen util/amdfwtool
-subdirs-y += util/futility util/marvell util/bincfg util/supermicro
+subdirs-y += util/futility util/marvell util/bincfg util/supermicro util/qemu
subdirs-y += $(wildcard src/arch/*)
subdirs-y += src/mainboard/$(MAINBOARDDIR)
subdirs-y += src/security
diff --git a/util/qemu/Makefile.inc b/util/qemu/Makefile.inc
new file mode 100644
index 0000000..33463498
--- /dev/null
+++ b/util/qemu/Makefile.inc
@@ -0,0 +1,46 @@
+# SPDX-License-Identifier: BSD-3-Clause
+
+# This automatically adds a `qemu` make target if a compatible
+# configuration is selected. There are some notable variables
+# that can be set or adapted in `Makefile.inc` files, the make
+# command line or the environment:
+#
+# Primarily for `Makefile.inc` use:
+# QEMU-y the QEMU executable
+# QEMU_CFG-y a QEMU config that sets the available default devices,
+# used to run more comprehensive tests by default,
+# e.g. many more PCI devices
+#
+# For general use:
+# QEMU_ARGS additional command line arguments (default: -serial stdio)
+# QEMU_EXTRA_CFGS additional config files that can add devices
+#
+# QEMU_CFG_ARGS gathers config file related arguments,
+# can be used to override a default config (QEMU_CFG-y)
+#
+# Examples:
+#
+# $ # Run coreboot's default config with additional command line args
+# $ make qemu QEMU_ARGS="-cdrom site-local/grml64-small_2018.12.iso"
+#
+# $ # Force QEMU's built-in config
+# $ make qemu QEMU_CFG_ARGS=
+
+QEMU-$(CONFIG_BOARD_EMULATION_QEMU_X86_I440FX) ?= qemu-system-x86_64 -M pc
+QEMU-$(CONFIG_BOARD_EMULATION_QEMU_X86_Q35) ?= qemu-system-x86_64 -M q35
+
+ifneq ($(QEMU-y),)
+
+QEMU_ARGS ?= -serial stdio
+QEMU_EXTRA_CFGS ?=
+
+QEMU_CFG_ARGS ?= \
+ $(if $(QEMU_CFG-y),-nodefaults) \
+ $(addprefix -readconfig ,$(QEMU_CFG-y) $(QEMU_EXTRA_CFGS))
+
+qemu: $(obj)/coreboot.rom
+ $(QEMU-y) $(QEMU_CFG_ARGS) $(QEMU_ARGS) -bios $<
+
+.PHONY: qemu
+
+endif
--
To view, visit https://review.coreboot.org/c/coreboot/+/46767
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I658f86e05df416ae09be6d432f9a80f7f71f9f75
Gerrit-Change-Number: 46767
Gerrit-PatchSet: 1
Gerrit-Owner: Nico Huber <nico.h(a)gmx.de>
Gerrit-MessageType: newchange
Jacob Garber has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/46729 )
Change subject: soc/intel/xeon_sp: Pass IIO_RESOURCE_INSTANCE as pointer
......................................................................
soc/intel/xeon_sp: Pass IIO_RESOURCE_INSTANCE as pointer
IIO_RESOURCE_INSTANCE is a large struct, so it should be passed as a
constant pointer rather than making a copy.
Found-by: Coverity CID 1432759
Change-Id: Iebbb4d292f4d956e767bda28cbf20b0318586510
---
M src/soc/intel/xeon_sp/nb_acpi.c
1 file changed, 6 insertions(+), 6 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/29/46729/1
diff --git a/src/soc/intel/xeon_sp/nb_acpi.c b/src/soc/intel/xeon_sp/nb_acpi.c
index 1329feb..8bd8c41 100644
--- a/src/soc/intel/xeon_sp/nb_acpi.c
+++ b/src/soc/intel/xeon_sp/nb_acpi.c
@@ -195,16 +195,16 @@
* in the context of ATSR subtable, it adds ATSR subtable when it is first called.
*/
static unsigned long acpi_create_dmar_ds_pci_br_for_port(unsigned long current,
- int port, int stack, IIO_RESOURCE_INSTANCE iio_resource, uint32_t pcie_seg,
+ int port, int stack, const IIO_RESOURCE_INSTANCE *iio_resource, uint32_t pcie_seg,
bool is_atsr, bool *first)
{
if (get_stack_for_port(port) != stack)
return 0;
- const uint32_t bus = iio_resource.StackRes[stack].BusBase;
- const uint32_t dev = iio_resource.PcieInfo.PortInfo[port].Device;
- const uint32_t func = iio_resource.PcieInfo.PortInfo[port].Function;
+ const uint32_t bus = iio_resource->StackRes[stack].BusBase;
+ const uint32_t dev = iio_resource->PcieInfo.PortInfo[port].Device;
+ const uint32_t func = iio_resource->PcieInfo.PortInfo[port].Function;
const uint32_t id = pci_mmio_read_config32(PCI_DEV(bus, dev, func),
PCI_VENDOR_ID);
@@ -301,7 +301,7 @@
hob->PlatformData.IIO_resource[socket];
for (int p = PORT_0; p < MAX_PORTS; ++p)
current += acpi_create_dmar_ds_pci_br_for_port(current, p, stack,
- iio_resource, pcie_seg, false, NULL);
+ &iio_resource, pcie_seg, false, NULL);
// Add VMD
if (hob->PlatformData.VMDStackEnable[socket][stack] &&
@@ -365,7 +365,7 @@
if (socket == 0 && p == PORT_0)
continue;
current += acpi_create_dmar_ds_pci_br_for_port(current, p,
- stack, iio_resource, pcie_seg, true, &first);
+ stack, &iio_resource, pcie_seg, true, &first);
}
}
if (tmp != current)
--
To view, visit https://review.coreboot.org/c/coreboot/+/46729
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Iebbb4d292f4d956e767bda28cbf20b0318586510
Gerrit-Change-Number: 46729
Gerrit-PatchSet: 1
Gerrit-Owner: Jacob Garber <jgarber1(a)ualberta.ca>
Gerrit-MessageType: newchange
Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/46895 )
Change subject: soc/intel/xeon_sp/cpx: Align coreboot CAR symbols to FSP-T
......................................................................
soc/intel/xeon_sp/cpx: Align coreboot CAR symbols to FSP-T
The CAR set up by FSP-T is at base 0xfe800000 and has a 0x200000 size.
FSP-M seems to have a very large stack usage so it would overflow
other car symbols located below the coreboot stack such as timestamps
and the pre-ram console, which are now fixed.
TEST: boot with ocp/deltalake.
Change-Id: I886f9391ad79fcfa0724109393e3781a08d954b4
Signed-off-by: Arthur Heymans <arthur(a)aheymans.xyz>
---
M src/soc/intel/xeon_sp/cpx/Kconfig
1 file changed, 12 insertions(+), 7 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/95/46895/1
diff --git a/src/soc/intel/xeon_sp/cpx/Kconfig b/src/soc/intel/xeon_sp/cpx/Kconfig
index 975afc9..28e7b83 100644
--- a/src/soc/intel/xeon_sp/cpx/Kconfig
+++ b/src/soc/intel/xeon_sp/cpx/Kconfig
@@ -27,22 +27,25 @@
config DCACHE_RAM_BASE
hex
- default 0xfe8b0000
+ default 0xfe800000
config DCACHE_RAM_SIZE
hex
- default 0x170000
+ default 0x1fff00
help
The size of the cache-as-ram region required during bootblock
- and/or romstage.
+ and/or romstage. FSP-T reserves the upper 0x100 for
+ FspReservedBuffer.
config DCACHE_BSP_STACK_SIZE
hex
- default 0xA0000
+ default 0x140000
help
The amount of anticipated stack usage in CAR by bootblock and
other stages. It needs to include FSP-M stack requirement and
- CB romstage stack requirement.
+ CB romstage stack requirement. The integration documentation
+ says this needs to be 256KiB, but practice show this needs to
+ be a lot more.
config CPU_MICROCODE_CBFS_LOC
hex
@@ -67,11 +70,13 @@
config FSP_TEMP_RAM_SIZE
hex
depends on FSP_USES_CB_STACK
- default 0xA0000
+ default 0x40000
help
The amount of anticipated heap usage in CAR by FSP.
Refer to Platform FSP integration guide document to know
- the exact FSP requirement for Heap setup.
+ the exact FSP requirement for Heap setup. The FSP integration
+ documentation says this needs to be at least 128KiB, but practice
+ show this needs to be 256KiB or more.
config SOC_INTEL_COMMON_BLOCK_P2SB
def_bool y
--
To view, visit https://review.coreboot.org/c/coreboot/+/46895
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I886f9391ad79fcfa0724109393e3781a08d954b4
Gerrit-Change-Number: 46895
Gerrit-PatchSet: 1
Gerrit-Owner: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-MessageType: newchange