[PATCH] bios_emulator: fix incorrect printing of address in "jump near immediate"

2024-12-02 Thread Yuri Zaporozhets
x\n", ip); while it should be DECODE_PRINTF2("%04x\n", (u16)ip); Signed-off-by: Yuri Zaporozhets --- drivers/bios_emulator/x86emu/ops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/bios_emulator/x86emu/ops.c b/drivers/bios_emulator/x86emu/ops.c index 31b52df9bf..

[PATCH] bios_emulator: fix incorrect printing of address in "call near immediate"

2024-11-30 Thread Yuri Zaporozhets
t;. That's because of the following macro: DECODE_PRINTF2("%04x\n", ip); while it should be DECODE_PRINTF2("%04x\n", (u16)ip); Signed-off-by: Yuri Zaporozhets --- drivers/bios_emulator/x86emu/ops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -

[PATCH] bios_emulator: fix garbled printing of disassembled SET* instructions

2024-11-26 Thread Yuri Zaporozhets
. This patch adds missing DECODE_PRINTF("\n") calls to print newlines. Signed-off-by: Yuri Zaporozhets --- drivers/bios_emulator/x86emu/ops2.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/bios_emulator/x86emu/ops2.c b/drivers/bios_emulator/x86emu/ops2.c index

[PATCH] bios_emulator: fix garbled printing of disassembled BSF instruction

2024-11-26 Thread Yuri Zaporozhets
When DEBUG_DECODE_F is enabled in bios_emulator, the printing of BSF instructions is garbled because the '\n' symbol is used instead of the correct '\t'. Fix that. Signed-off-by: Yuri Zaporozhets --- drivers/bios_emulator/x86emu/ops2.c | 4 ++-- 1 file changed, 2 insert

Re: BUG: SiFive Unmatched: BAR0 on video card is never initialized

2024-11-19 Thread Yuri Zaporozhets
Hi Heinrich, On Tue, Nov 19, 2024 at 10:03:45PM +0100, Heinrich Schuchardt wrote: > Hello Yuri, > > Thank you for sharing your investigation results. Could you, please, send a > patch? > Sure. Already did. > Were you able to show output on HDMI? Oh, not that fast -- I'm working on it :-) . Cu

[PATCH] configs: enable CONFIG_PCI_REGION_MULTI_ENTRY=y in sifive_unmatched_defconfig

2024-11-19 Thread Yuri Zaporozhets
uot;region 1" instead (the one which starts at 0x6009), because it has much bigger size (0xFF7), and easily accomodates BAR0 of the video card. Linux kernel also uses 0x6009 as bus_start/phys_start. Signed-off-by: Yuri Zaporozhets --- configs/sifive_unmatched_defconfig | 1 + 1

BUG: SiFive Unmatched: BAR0 on video card is never initialized

2024-11-19 Thread Yuri Zaporozhets
Hi Heinrich; hi all owners of SiFive Unmatched + PCIe video card, Default U-Boot configuration for Unmatched always fails to initialize BAR0 of my video card (NVidia GT710), because the PCI driver selects the MEMORY region at 0x7000 for bus_start/phys_start ("region 2", according to decode_reg

BUG: U-Boot crashes on SiFive Unmatched when CONFIG_DM_DEBUG=y

2024-11-18 Thread Yuri Zaporozhets
Hi all, I enabled CONFIG_DM_DEBUG on my SiFive Unmatched, and U-Boot boot results in failed assertion ("ofnode_valid(node)"). I'm attaching the full log below. The same behavior is also for the 2024.10 stable version. == U-Boot SPL 2025.01-rc2-00111-g0135f0e2e8ce (Nov 18 2024 -

[PATCH] spl: increase SPL_SYS_MALLOC_SIZE when using BIOSEMU on RISC-V

2024-11-11 Thread Yuri Zaporozhets
If BIOSEMU is compiled for RISC-V (SiFive Unmatched board) and the function dm_pci_run_vga_bios() is executed, U-Boot stops with error message saying that the SPL malloc pool is too small. So increase the default pool size when both BIOSEMU and RISCV parameters are set. Signed-off-by: Yuri

[PATCH] bios_emulator: add missing includes to debug.c

2024-11-08 Thread Yuri Zaporozhets
When compiling with X86EMU_DEBUG, the compiler complains that debug.c misses two include files. Fix that. Signed-off-by: Yuri Zaporozhets --- drivers/bios_emulator/x86emu/debug.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/bios_emulator/x86emu/debug.c b/drivers/bios_emulator

SiFive Unmatched: Linux kernel doesn't start (U-Boot 2024.07)

2024-11-06 Thread Yuri Zaporozhets
Hi all, To all owners & active users of the SiFive Unmatched board: do you have success running any recent upstream U-Boot on your system? I use the default U-Boot from Ubuntu 24.04, and it boots GRUB and Linux kernel just fine. Today I flashed the unmodified U-Boot 2024.07 (compiled with "make s

[PATCH] bios_emulator: for non-x86, print warnings if PM_{inp, outp}* access is attempted

2024-11-05 Thread Yuri Zaporozhets
at least knows that the emulator attempted to access some x86 I/O port. Signed-off-by: Yuri Zaporozhets --- drivers/bios_emulator/biosemui.h | 41 1 file changed, 41 insertions(+) diff --git a/drivers/bios_emulator/biosemui.h b/drivers/bios_emulator/biosemui.h

[PATCH 2/2] bios_emulator: make CONFIG_BIOSEMU selectable in menuconfig

2024-11-03 Thread Yuri Zaporozhets
This allows selecting BIOSEMU in "make menuconfig", and provides one-line descriptions for all three configuration parameters in bios_emulator/Kconfig. Signed-off-by: Yuri Zaporozhets --- drivers/bios_emulator/Kconfig | 12 1 file changed, 8 insertions(+), 4 deletion

[PATCH 1/2] bios_emulator: don't select X86EMU_RAW_IO for BIOSEMU and SPL_BIOSEMU

2024-11-03 Thread Yuri Zaporozhets
The X86EMU_RAW_IO mode can be used only on x86, so don't select this option always, and allow correct compilation of BIOSEMU on other architectures too. Signed-off-by: Yuri Zaporozhets --- drivers/bios_emulator/Kconfig | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/bios_emu

bios_emulator: how LOG_inpb() is supposed to work on non-x86 systems?

2024-10-31 Thread Yuri Zaporozhets
Hi all, When trying to compile drivers/bios_emulator for RISC-V, I get a bunch of the following warnings: In file included from drivers/bios_emulator/besys.c:51: drivers/bios_emulator/besys.c: In function ‘BE_inb’: ./arch/riscv/include/asm/io.h:18:43: warning: cast to pointer fr

[PATCH] bios_emulator: fix first argument of pci_{read,write}_config_* function calls

2024-10-30 Thread Yuri Zaporozhets
When compiling for riscv64, a bunch of warning is produced for the file drivers/bios_emulator/besys.c. This patch fixes a portion of those warnings, caused by incorrect first argument to pci_{read,write}_config_* functions. Signed-off-by: Yuri Zaporozhets --- drivers/bios_emulator/besys.c | 20

[PATCH] bios_emulator: define the comment symbol for RISC-V assembler too

2024-10-30 Thread Yuri Zaporozhets
The bios_emulator driver cannot be compiled for RISC-V because the x86emu.h header file doesn't define the comment symbol ("#") for the assembler. With this patch, use the same symbol as for e.g. x86. Signed-off-by: Yuri Zaporozhets --- drivers/bios_emulator/include/x86emu.h

[PATCH] drivers/video/vesa: use MTRRs only on x86

2024-10-30 Thread Yuri Zaporozhets
MTRR functionality is available only on x86, so this driver cannot be compiled on other architectures. Fix this with preprocessor directives. Signed-off-by: Yuri Zaporozhets --- drivers/video/vesa.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/video