Attention is currently required from: Eric Lai, Kapil Porwal, Nick Vaccaro, SH Kim, Subrata Banik.
Jakub Czapiga has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/80326?usp=email )
Change subject: mb/google/brya/var/xol: Update memory configuration
......................................................................
Patch Set 5: Code-Review+2
--
To view, visit https://review.coreboot.org/c/coreboot/+/80326?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: I59aabe0870317092f59701bdf88b53bf9731377a
Gerrit-Change-Number: 80326
Gerrit-PatchSet: 5
Gerrit-Owner: SH Kim <sh_.kim(a)samsung.corp-partner.google.com>
Gerrit-Reviewer: Eric Lai <ericllai(a)google.com>
Gerrit-Reviewer: Jakub Czapiga <czapiga(a)google.com>
Gerrit-Reviewer: Kapil Porwal <kapilporwal(a)google.com>
Gerrit-Reviewer: Nick Vaccaro <nvaccaro(a)chromium.org>
Gerrit-Reviewer: Subrata Banik <subratabanik(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Eric Lai <ericllai(a)google.com>
Gerrit-Attention: Subrata Banik <subratabanik(a)google.com>
Gerrit-Attention: SH Kim <sh_.kim(a)samsung.corp-partner.google.com>
Gerrit-Attention: Kapil Porwal <kapilporwal(a)google.com>
Gerrit-Attention: Nick Vaccaro <nvaccaro(a)chromium.org>
Gerrit-Comment-Date: Wed, 07 Feb 2024 10:29:50 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: Philipp Hug, ron minnich.
Alper Nebi Yasak has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/80380?usp=email )
Change subject: mainboard/qemu-riscv: Select framebuffer related kconfigs
......................................................................
mainboard/qemu-riscv: Select framebuffer related kconfigs
Previous commits add PCI support to the qemu-riscv mainboard, and enable
building Bochs display driver for more architectures, so we can use a
display with QEMU RISC-V virtual machines in coreboot. Select display
related kconfig options for the qemu-riscv mainboard (which are also
selected in qemu-aarch64).
Change-Id: I2c6f3acbcf8fee47b072def30c85448122d3c0bc
Signed-off-by: Alper Nebi Yasak <alpernebiyasak(a)gmail.com>
---
M src/mainboard/emulation/qemu-riscv/Kconfig
1 file changed, 3 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/80/80380/1
diff --git a/src/mainboard/emulation/qemu-riscv/Kconfig b/src/mainboard/emulation/qemu-riscv/Kconfig
index a966967f..7f652ce 100644
--- a/src/mainboard/emulation/qemu-riscv/Kconfig
+++ b/src/mainboard/emulation/qemu-riscv/Kconfig
@@ -29,6 +29,9 @@
select MISSING_BOARD_RESET
select DRIVERS_UART_8250MEM
select RISCV_HAS_OPENSBI
+ select HAVE_LINEAR_FRAMEBUFFER
+ select MAINBOARD_FORCE_NATIVE_VGA_INIT
+ select MAINBOARD_HAS_NATIVE_VGA_INIT
select PCI
config ECAM_MMCONF_BASE_ADDRESS
--
To view, visit https://review.coreboot.org/c/coreboot/+/80380?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: I2c6f3acbcf8fee47b072def30c85448122d3c0bc
Gerrit-Change-Number: 80380
Gerrit-PatchSet: 1
Gerrit-Owner: Alper Nebi Yasak <alpernebiyasak(a)gmail.com>
Gerrit-Reviewer: Philipp Hug <philipp(a)hug.cx>
Gerrit-Reviewer: ron minnich <rminnich(a)gmail.com>
Gerrit-Attention: Philipp Hug <philipp(a)hug.cx>
Gerrit-Attention: ron minnich <rminnich(a)gmail.com>
Gerrit-MessageType: newchange
Alper Nebi Yasak has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/80376?usp=email )
Change subject: drivers/qemu/bochs: Allow building for non-x86 architectures
......................................................................
drivers/qemu/bochs: Allow building for non-x86 architectures
The Bochs display driver was written for x86 and is only allowed to
build only for that, but the devices can be used just fine on other
architectures on the QEMU side as long as the emulated platform supports
PCI. Commit efaf1b32ba1eb ("drivers/emulation/qemu/bochs: Rewrite
driver") adds support for using MMIO mapped Bochs display devices, which
would work for other architectures as well if not for the x86 parts.
The existing driver can use MMIO, but if the device is a legacy-capable
VGA device it defaults to using I/O ports. Add an additional CONFIG(VGA)
check to that so we can avoid x86-style I/O for architectures where that
is not implemented yet.
Allow the Bochs display driver to be built for non-x86 QEMU boards by
changing the Kconfig dependencies and using #if directives to avoid
port-based IO functions. Make VGA and text framebuffer support depend on
x86. Add a dependency on PCI since this is a PCI device and vexpress-a9
(qemu-armv7) doesn't have the (emulated) hardware for PCI.
Change-Id: I7f72d7ea13e54ecf89d067394c02b572c5f92d24
Signed-off-by: Alper Nebi Yasak <alpernebiyasak(a)gmail.com>
---
M src/drivers/emulation/qemu/Kconfig
M src/drivers/emulation/qemu/bochs.c
2 files changed, 19 insertions(+), 6 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/76/80376/1
diff --git a/src/drivers/emulation/qemu/Kconfig b/src/drivers/emulation/qemu/Kconfig
index e846a29..8e2dad9 100644
--- a/src/drivers/emulation/qemu/Kconfig
+++ b/src/drivers/emulation/qemu/Kconfig
@@ -1,11 +1,12 @@
config DRIVERS_EMULATION_QEMU_BOCHS
bool "bochs dispi interface vga driver"
default y
- depends on CPU_QEMU_X86
+ depends on PCI
+ depends on VENDOR_EMULATION
depends on MAINBOARD_DO_NATIVE_VGA_INIT
- select HAVE_VGA_TEXT_FRAMEBUFFER
+ select HAVE_VGA_TEXT_FRAMEBUFFER if CPU_QEMU_X86
select HAVE_LINEAR_FRAMEBUFFER
- select VGA
+ select VGA if CPU_QEMU_X86
help
VGA driver for qemu emulated vga cards supporting
the bochs dispi interface. This includes
diff --git a/src/drivers/emulation/qemu/bochs.c b/src/drivers/emulation/qemu/bochs.c
index 0650430..b8a6fa9 100644
--- a/src/drivers/emulation/qemu/bochs.c
+++ b/src/drivers/emulation/qemu/bochs.c
@@ -1,6 +1,10 @@
/* SPDX-License-Identifier: GPL-2.0-only */
+#if CONFIG(CPU_QEMU_X86)
#include <arch/io.h>
+#else
+#include <arch/mmio.h>
+#endif
#include <console/console.h>
#include <device/device.h>
#include <device/mmio.h>
@@ -45,8 +49,10 @@
static void bochs_write(struct resource *res, int index, int val)
{
if (res->flags & IORESOURCE_IO) {
+#if CONFIG(CPU_QEMU_X86)
outw(index, res->base);
outw(val, res->base + 1);
+#endif
} else {
write16(res2mmio(res, 0x500 + index * 2, 0), val);
}
@@ -55,8 +61,12 @@
static int bochs_read(struct resource *res, int index)
{
if (res->flags & IORESOURCE_IO) {
+#if CONFIG(CPU_QEMU_X86)
outw(index, res->base);
return inw(res->base + 1);
+#else
+ return 0;
+#endif
} else {
return read16(res2mmio(res, 0x500 + index * 2, 0));
}
@@ -64,9 +74,11 @@
static void bochs_vga_write(struct resource *res, int index, uint8_t val)
{
- if (res->flags & IORESOURCE_IO)
+ if (res->flags & IORESOURCE_IO) {
+#if CONFIG(CPU_QEMU_X86)
outb(val, index + 0x3c0);
- else
+#endif
+ } else
write8(res2mmio(res, 0x400 + index, 0), val);
}
@@ -103,7 +115,7 @@
/* MMIO bar supported since qemu 3.0+ */
res_io = probe_resource(dev, PCI_BASE_ADDRESS_2);
- if (((dev->class >> 8) == PCI_CLASS_DISPLAY_VGA) ||
+ if ((CONFIG(VGA) && (dev->class >> 8) == PCI_CLASS_DISPLAY_VGA) ||
!res_io || !(res_io->flags & IORESOURCE_MEM)) {
printk(BIOS_DEBUG, "QEMU VGA: Using legacy VGA\n");
res_io = &res_legacy;
--
To view, visit https://review.coreboot.org/c/coreboot/+/80376?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: I7f72d7ea13e54ecf89d067394c02b572c5f92d24
Gerrit-Change-Number: 80376
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/+/80375?usp=email )
Change subject: drivers/qemu: Split Cirrus display support from Bochs display support
......................................................................
drivers/qemu: Split Cirrus display support from Bochs display support
QEMU's Cirrus display device is supported along with the Bochs driver
since commit 7905f9254ebc ("qemu: cirrus native video init"). It is no
longer the default since QEMU 2.2. The code supporting it is quite
specific to x86, so split it from the Bochs display driver to make it
easier to support the latter in other architectures.
Change-Id: Ic9492b501ed4fdcbda6886db60b1e5348715e667
Signed-off-by: Alper Nebi Yasak <alpernebiyasak(a)gmail.com>
---
M src/drivers/emulation/qemu/Kconfig
M src/drivers/emulation/qemu/Makefile.mk
M src/drivers/emulation/qemu/cirrus.c
3 files changed, 27 insertions(+), 6 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/75/80375/1
diff --git a/src/drivers/emulation/qemu/Kconfig b/src/drivers/emulation/qemu/Kconfig
index c271825..e846a29 100644
--- a/src/drivers/emulation/qemu/Kconfig
+++ b/src/drivers/emulation/qemu/Kconfig
@@ -9,9 +9,7 @@
help
VGA driver for qemu emulated vga cards supporting
the bochs dispi interface. This includes
- standard vga, vmware svga and qxl. The default
- vga (cirrus) is *not* supported, so you have to
- pick another one explicitly via 'qemu -vga $card'.
+ standard vga, vmware svga, and qxl.
config DRIVERS_EMULATION_QEMU_BOCHS_XRES
int "bochs vga xres"
@@ -24,3 +22,26 @@
default 600
depends on LINEAR_FRAMEBUFFER
depends on DRIVERS_EMULATION_QEMU_BOCHS
+
+config DRIVERS_EMULATION_QEMU_CIRRUS
+ bool "cirrus svga driver"
+ default y
+ depends on CPU_QEMU_X86
+ depends on MAINBOARD_DO_NATIVE_VGA_INIT
+ select HAVE_VGA_TEXT_FRAMEBUFFER
+ select HAVE_LINEAR_FRAMEBUFFER
+ select VGA
+ help
+ VGA driver for qemu emulated cirrus svga card.
+
+config DRIVERS_EMULATION_QEMU_CIRRUS_XRES
+ int "cirrus svga xres"
+ default 800
+ depends on LINEAR_FRAMEBUFFER
+ depends on DRIVERS_EMULATION_QEMU_CIRRUS
+
+config DRIVERS_EMULATION_QEMU_CIRRUS_YRES
+ int "cirrus svga yres"
+ default 600
+ depends on LINEAR_FRAMEBUFFER
+ depends on DRIVERS_EMULATION_QEMU_CIRRUS
diff --git a/src/drivers/emulation/qemu/Makefile.mk b/src/drivers/emulation/qemu/Makefile.mk
index c9d94bd..619782f 100644
--- a/src/drivers/emulation/qemu/Makefile.mk
+++ b/src/drivers/emulation/qemu/Makefile.mk
@@ -6,4 +6,4 @@
ramstage-$(CONFIG_CONSOLE_QEMU_DEBUGCON) += qemu_debugcon.c
ramstage-$(CONFIG_DRIVERS_EMULATION_QEMU_BOCHS) += bochs.c
-ramstage-$(CONFIG_DRIVERS_EMULATION_QEMU_BOCHS) += cirrus.c
+ramstage-$(CONFIG_DRIVERS_EMULATION_QEMU_CIRRUS) += cirrus.c
diff --git a/src/drivers/emulation/qemu/cirrus.c b/src/drivers/emulation/qemu/cirrus.c
index 1dc8ac9..5f7b7ff 100644
--- a/src/drivers/emulation/qemu/cirrus.c
+++ b/src/drivers/emulation/qemu/cirrus.c
@@ -9,8 +9,8 @@
#include <pc80/vga_io.h>
#include <framebuffer_info.h>
-static int width = CONFIG_DRIVERS_EMULATION_QEMU_BOCHS_XRES;
-static int height = CONFIG_DRIVERS_EMULATION_QEMU_BOCHS_YRES;
+static int width = CONFIG_DRIVERS_EMULATION_QEMU_CIRRUS_XRES;
+static int height = CONFIG_DRIVERS_EMULATION_QEMU_CIRRUS_YRES;
static u32 addr = 0;
enum
--
To view, visit https://review.coreboot.org/c/coreboot/+/80375?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: Ic9492b501ed4fdcbda6886db60b1e5348715e667
Gerrit-Change-Number: 80375
Gerrit-PatchSet: 1
Gerrit-Owner: Alper Nebi Yasak <alpernebiyasak(a)gmail.com>
Gerrit-MessageType: newchange