Alper Nebi Yasak has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/80374?usp=email )
Change subject: drivers/qemu: Drop redundant vga_io addition to ramstage
......................................................................
drivers/qemu: Drop redundant vga_io addition to ramstage
While introducing driver support for QEMU Cirrus display device, commit
7905f9254ebc ("qemu: cirrus native video init") also explicitly adds
VGA I/O functions into ramstage class when Bochs display driver support
is enabled.
Later, commit db7d04d1b753 ("qemu: Support textmode gfx init.") makes
the related config option select CONFIG_VGA, which also adds the same
file into ramstage class (among other things) in another Makefile.
Doing this twice is unnecessary. Remove the addition based on the Bochs
display driver's config option. Adding it based on CONFIG_VGA is
clearer, and future patches will try to support a Bochs display without
legacy VGA support on non-x86 architectures.
Change-Id: Ib31344e242689682d74d8a83c97b6e8027641926
Signed-off-by: Alper Nebi Yasak <alpernebiyasak(a)gmail.com>
---
M src/drivers/emulation/qemu/Makefile.mk
1 file changed, 0 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/74/80374/1
diff --git a/src/drivers/emulation/qemu/Makefile.mk b/src/drivers/emulation/qemu/Makefile.mk
index 6f5ff3a..c9d94bd 100644
--- a/src/drivers/emulation/qemu/Makefile.mk
+++ b/src/drivers/emulation/qemu/Makefile.mk
@@ -7,4 +7,3 @@
ramstage-$(CONFIG_DRIVERS_EMULATION_QEMU_BOCHS) += bochs.c
ramstage-$(CONFIG_DRIVERS_EMULATION_QEMU_BOCHS) += cirrus.c
-ramstage-$(CONFIG_DRIVERS_EMULATION_QEMU_BOCHS) += ../../pc80/vga/vga_io.c
--
To view, visit https://review.coreboot.org/c/coreboot/+/80374?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: Ib31344e242689682d74d8a83c97b6e8027641926
Gerrit-Change-Number: 80374
Gerrit-PatchSet: 1
Gerrit-Owner: Alper Nebi Yasak <alpernebiyasak(a)gmail.com>
Gerrit-MessageType: newchange
Alper Nebi Yasak has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/80367?usp=email )
Change subject: mb/qemu/fw_cfg: Use fw_cfg_read() to read SMBIOS data
......................................................................
mb/qemu/fw_cfg: Use fw_cfg_read() to read SMBIOS data
The QEMU firmware configuration driver can help initialize SMBIOS tables
using the table data that QEMU provides over the device. While doing so,
it reads from the device "file" manually using port-based IO.
Use the fw_cfg_read() helper function to read the SMBIOS-related file,
so that the driver is easier to port the driver to other architectures.
Change-Id: I18e60b8e9de34f2b0ff67af4113beec1d7467329
Signed-off-by: Alper Nebi Yasak <alpernebiyasak(a)gmail.com>
---
M src/mainboard/emulation/qemu-i440fx/fw_cfg.c
1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/67/80367/1
diff --git a/src/mainboard/emulation/qemu-i440fx/fw_cfg.c b/src/mainboard/emulation/qemu-i440fx/fw_cfg.c
index 95f8968..ad664a6 100644
--- a/src/mainboard/emulation/qemu-i440fx/fw_cfg.c
+++ b/src/mainboard/emulation/qemu-i440fx/fw_cfg.c
@@ -365,9 +365,9 @@
fw_cfg_get(FW_CFG_SMBIOS_ENTRIES, &count, sizeof(count));
for (i = 0; i < count; i++) {
- insb(FW_CFG_PORT_DATA, &entry, sizeof(entry));
+ fw_cfg_read(&entry, sizeof(entry));
buf = malloc(entry.length - sizeof(entry));
- insb(FW_CFG_PORT_DATA, buf, entry.length - sizeof(entry));
+ fw_cfg_read(buf, entry.length - sizeof(entry));
if (entry.headertype == SMBIOS_FIELD_ENTRY &&
entry.tabletype == 1) {
switch (entry.fieldoffset) {
--
To view, visit https://review.coreboot.org/c/coreboot/+/80367?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I18e60b8e9de34f2b0ff67af4113beec1d7467329
Gerrit-Change-Number: 80367
Gerrit-PatchSet: 1
Gerrit-Owner: Alper Nebi Yasak <alpernebiyasak(a)gmail.com>
Gerrit-MessageType: newchange
Alper Nebi Yasak has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/80366?usp=email )
Change subject: mb/qemu/fw_cfg: Fix build when not generating SMBIOS tables
......................................................................
mb/qemu/fw_cfg: Fix build when not generating SMBIOS tables
Parts of the QEMU firmware configuration device driver refers to SMBIOS
related kconfig values. These depend on GENERATE_SMBIOS_TABLES and are
undefined if it isn't enabled, causing a build error.
Cover the SMBIOS-related region in this driver with an #if directive
checking the necessary config option. This is mostly to help port the
driver to non-x86 architectures where support for generating SMBIOS
tables isn't there yet.
Change-Id: I3ff388d4574eb52686a5dda3dcbc3d64a7ce6f7b
Signed-off-by: Alper Nebi Yasak <alpernebiyasak(a)gmail.com>
---
M src/mainboard/emulation/qemu-i440fx/fw_cfg.c
1 file changed, 2 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/66/80366/1
diff --git a/src/mainboard/emulation/qemu-i440fx/fw_cfg.c b/src/mainboard/emulation/qemu-i440fx/fw_cfg.c
index 3a1def3..95f8968 100644
--- a/src/mainboard/emulation/qemu-i440fx/fw_cfg.c
+++ b/src/mainboard/emulation/qemu-i440fx/fw_cfg.c
@@ -344,6 +344,7 @@
/* ---------------------------------------------------------------------- */
/* pick up smbios information from fw_cfg */
+#if CONFIG(GENERATE_SMBIOS_TABLES)
static const char *type1_manufacturer;
static const char *type1_product_name;
static const char *type1_version;
@@ -507,6 +508,7 @@
fw_cfg_smbios_init();
memcpy(uuid, type1_uuid, 16);
}
+#endif /* CONFIG(GENERATE_SMBIOS_TABLES) */
/*
* Configure DMA setup
--
To view, visit https://review.coreboot.org/c/coreboot/+/80366?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I3ff388d4574eb52686a5dda3dcbc3d64a7ce6f7b
Gerrit-Change-Number: 80366
Gerrit-PatchSet: 1
Gerrit-Owner: Alper Nebi Yasak <alpernebiyasak(a)gmail.com>
Gerrit-MessageType: newchange
Alper Nebi Yasak has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/80365?usp=email )
Change subject: mb/qemu/fw_cfg: Support using DMA to select fw_cfg file
......................................................................
mb/qemu/fw_cfg: Support using DMA to select fw_cfg file
Commit 8dc95ddbd4a935 ("emulation/qemu-i440fx: use fw_cfg_dma for
fw_cfg_read") adds DMA support to interface with the QEMU firmware
configuration device, and uses it to read from the "file"s exposed by
the device. However, the file selection step still uses port-based IO.
Use DMA for fw_cfg file selection when possible, as a step towards
porting this driver to other architectures.
Change-Id: I46f9915e6df04d371c7084815f16034c7e9879d4
Signed-off-by: Alper Nebi Yasak <alpernebiyasak(a)gmail.com>
---
M src/mainboard/emulation/qemu-i440fx/fw_cfg.c
1 file changed, 4 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/65/80365/1
diff --git a/src/mainboard/emulation/qemu-i440fx/fw_cfg.c b/src/mainboard/emulation/qemu-i440fx/fw_cfg.c
index 5c23988..3a1def3 100644
--- a/src/mainboard/emulation/qemu-i440fx/fw_cfg.c
+++ b/src/mainboard/emulation/qemu-i440fx/fw_cfg.c
@@ -44,7 +44,10 @@
static void fw_cfg_select(uint16_t entry)
{
- outw(entry, FW_CFG_PORT_CTL);
+ if (fw_ver & FW_CFG_VERSION_DMA)
+ fw_cfg_dma(FW_CFG_DMA_CTL_SELECT | entry << 16, NULL, 0);
+ else
+ outw(entry, FW_CFG_PORT_CTL);
}
static void fw_cfg_read(void *dst, int dstlen)
--
To view, visit https://review.coreboot.org/c/coreboot/+/80365?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I46f9915e6df04d371c7084815f16034c7e9879d4
Gerrit-Change-Number: 80365
Gerrit-PatchSet: 1
Gerrit-Owner: Alper Nebi Yasak <alpernebiyasak(a)gmail.com>
Gerrit-MessageType: newchange