[PATCH 2/3] arm: qemu: Enable PRE_CONSOLE_BUFFER

Alper Nebi Yasak alpernebiyasak at gmail.com
Tue Aug 8 21:18:59 CEST 2023


Commit 608b80b5b855 ("riscv: qemu: Enable PRE_CONSOLE_BUFFER") enables
buffering console messages for QEMU RISC-V virtual machines so those
printed before the video console is available will still show up on the
display. Similarly, enable it for ARM virtual machines as well.

Signed-off-by: Alper Nebi Yasak <alpernebiyasak at gmail.com>
---
Not sure about the address, here are select values from bdinfo and env:

    DRAM bank   = 0x0000000000000000
    -> start    = 0x0000000040000000
    -> size     = 0x0000000008000000
    relocaddr   = 0x00000000476d6000
    fdt_blob    = 0x0000000046595d90
    lmb_dump_all:
     memory.cnt = 0x1 / max = 0x10
     memory[0]      [0x40000000-0x47ffffff], 0x08000000 bytes flags: 0
     reserved.cnt = 0x2 / max = 0x10
     reserved[0]    [0x45591000-0x47ffffff], 0x02a6f000 bytes flags: 0
     reserved[1]    [0x46591760-0x47ffffff], 0x01a6e8a0 bytes flags: 0
    TLB addr    = 0x0000000047fe0000
    irq_sp      = 0x0000000046595d80
    sp start    = 0x0000000046595d80

    fdt_addr        = 0x40000000
    scriptaddr      = 0x40200000
    loadaddr        = 0x40200000
    pxefile_addr_r  = 0x40300000
    kernel_addr_r   = 0x40400000
    ramdisk_addr_r  = 0x44000000
    fdtcontroladdr  =   465e5ea0

 arch/arm/Kconfig                 | 1 +
 board/emulation/qemu-arm/Kconfig | 4 ++++
 2 files changed, 5 insertions(+)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 0d4654fb9dfc..89b978797720 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -1040,6 +1040,7 @@ config ARCH_QEMU
 	imply VIDEO_BOCHS
 	imply SYS_WHITE_ON_BLACK
 	imply SYS_CONSOLE_IS_IN_ENV
+	imply PRE_CONSOLE_BUFFER
 
 config ARCH_RMOBILE
 	bool "Renesas ARM SoCs"
diff --git a/board/emulation/qemu-arm/Kconfig b/board/emulation/qemu-arm/Kconfig
index ed9949651c4b..09c95413a541 100644
--- a/board/emulation/qemu-arm/Kconfig
+++ b/board/emulation/qemu-arm/Kconfig
@@ -12,6 +12,10 @@ config BOARD_SPECIFIC_OPTIONS # dummy
 	imply VIRTIO_NET
 	imply VIRTIO_BLK
 
+config PRE_CON_BUF_ADDR
+	hex
+	default 0x40100000
+
 endif
 
 if TARGET_QEMU_ARM_64BIT && !TFABOOT
-- 
2.40.1



More information about the U-Boot mailing list