From 19ffdc8218284937b1ac4fc8ef9a19a536b4a887 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Tue, 17 Jun 2025 23:56:50 +0200 Subject: fix: see below. fix: - match flash base address according to qemu `virt`. - make use of correct offsets in the firmware's entrypoint. refactor: - rename flash.c to flash-driver.c Signed-off-by: Amlal El Mahrouss --- src/coreboot-start.c | 2 +- src/hal/coreboot-flash-driver.c | 10 ++++++++++ src/hal/coreboot-flash.c | 10 ---------- 3 files changed, 11 insertions(+), 11 deletions(-) create mode 100644 src/hal/coreboot-flash-driver.c delete mode 100644 src/hal/coreboot-flash.c (limited to 'src') diff --git a/src/coreboot-start.c b/src/coreboot-start.c index da6da23..7a93744 100644 --- a/src/coreboot-start.c +++ b/src/coreboot-start.c @@ -108,7 +108,7 @@ void cb_start_exec(void) { cb_put_string("CB> Trying EPM partition...\r\n"); part_block_t* blk = - cb_parse_partition_block_at((voidptr_t) CB_FLASH_BASE_ADDR, EPM_PART_BLK_SZ, 0); + cb_parse_partition_block_at((voidptr_t) CB_BOOT_ADDR, EPM_PART_BLK_SZ, 0); if (blk) { cb_pci_append_tree("@stage2-epm", (cb_pci_num_t) blk, sizeof(part_block_t) * blk->num_blocks); diff --git a/src/hal/coreboot-flash-driver.c b/src/hal/coreboot-flash-driver.c new file mode 100644 index 0000000..d1b0907 --- /dev/null +++ b/src/hal/coreboot-flash-driver.c @@ -0,0 +1,10 @@ +/* ------------------------------------------- + +Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved. + +------------------------------------------- */ + +#include +#include +#include +#include diff --git a/src/hal/coreboot-flash.c b/src/hal/coreboot-flash.c deleted file mode 100644 index d1b0907..0000000 --- a/src/hal/coreboot-flash.c +++ /dev/null @@ -1,10 +0,0 @@ -/* ------------------------------------------- - -Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved. - -------------------------------------------- */ - -#include -#include -#include -#include -- cgit v1.2.3