Thomas Heijligen has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/30846
Change subject: mb/emulation/qemu-i449fx: prepare fw_cfg for romstage usage ......................................................................
mb/emulation/qemu-i449fx: prepare fw_cfg for romstage usage
Add separate functions for selecting the port and reading the port. Romstage can now read incremental from the data port.
Change-Id: I0ffde3bc2a4415a8af99af2275d16f6609099e37 Signed-off-by: Thomas Heijligen thomas.heijligen@secunet.com --- M src/mainboard/emulation/qemu-i440fx/fw_cfg.c 1 file changed, 11 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/46/30846/1
diff --git a/src/mainboard/emulation/qemu-i440fx/fw_cfg.c b/src/mainboard/emulation/qemu-i440fx/fw_cfg.c index 9b394f2..957e9d2 100644 --- a/src/mainboard/emulation/qemu-i440fx/fw_cfg.c +++ b/src/mainboard/emulation/qemu-i440fx/fw_cfg.c @@ -42,12 +42,22 @@ return fw_cfg_detected; }
-void fw_cfg_get(int entry, void *dst, int dstlen) +static void fw_cfg_select(int entry) { outw(entry, FW_CFG_PORT_CTL); +} + +static void fw_cfg_read(void *dst, int dstlen) +{ insb(FW_CFG_PORT_DATA, dst, dstlen); }
+void fw_cfg_get(int entry, void *dst, int dstlen) +{ + fw_cfg_select(entry); + fw_cfg_read(dst, dstlen); +} + static void fw_cfg_init_file(void) { u32 i, size, count = 0;
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/30846 )
Change subject: mb/emulation/qemu-i449fx: prepare fw_cfg for romstage usage ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/#/c/30846/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/#/c/30846/1//COMMIT_MSG@7 PS1, Line 7: i449fx i440fx
Patrick Rudolph has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/30846 )
Change subject: mb/emulation/qemu-i449fx: prepare fw_cfg for romstage usage ......................................................................
Patch Set 1: Code-Review+1
(2 comments)
https://review.coreboot.org/#/c/30846/1/src/mainboard/emulation/qemu-i440fx/... File src/mainboard/emulation/qemu-i440fx/fw_cfg.c:
https://review.coreboot.org/#/c/30846/1/src/mainboard/emulation/qemu-i440fx/... PS1, Line 45: static void fw_cfg_select(int entry) uint16_t
https://review.coreboot.org/#/c/30846/1/src/mainboard/emulation/qemu-i440fx/... PS1, Line 55: void fw_cfg_get(int entry, void *dst, int dstlen) uint16_t
Hello Patrick Rudolph, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/30846
to look at the new patch set (#2).
Change subject: mb/emulation/qemu-i440fx: prepare fw_cfg for romstage usage ......................................................................
mb/emulation/qemu-i440fx: prepare fw_cfg for romstage usage
Add separate functions for selecting the port and reading the port. Romstage can now read incremental from the data port.
Change-Id: I0ffde3bc2a4415a8af99af2275d16f6609099e37 Signed-off-by: Thomas Heijligen thomas.heijligen@secunet.com --- M src/mainboard/emulation/qemu-i440fx/fw_cfg.c M src/mainboard/emulation/qemu-i440fx/fw_cfg.h 2 files changed, 12 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/46/30846/2
Thomas Heijligen has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/30846 )
Change subject: mb/emulation/qemu-i440fx: prepare fw_cfg for romstage usage ......................................................................
Patch Set 3:
(3 comments)
https://review.coreboot.org/#/c/30846/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/#/c/30846/1//COMMIT_MSG@7 PS1, Line 7: i449fx
i440fx
Done
https://review.coreboot.org/#/c/30846/1/src/mainboard/emulation/qemu-i440fx/... File src/mainboard/emulation/qemu-i440fx/fw_cfg.c:
https://review.coreboot.org/#/c/30846/1/src/mainboard/emulation/qemu-i440fx/... PS1, Line 45: static void fw_cfg_select(int entry)
uint16_t
Done
https://review.coreboot.org/#/c/30846/1/src/mainboard/emulation/qemu-i440fx/... PS1, Line 55: void fw_cfg_get(int entry, void *dst, int dstlen)
uint16_t
Done
Patrick Rudolph has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/30846 )
Change subject: mb/emulation/qemu-i440fx: prepare fw_cfg for romstage usage ......................................................................
Patch Set 4: Code-Review+2
Patrick Georgi has submitted this change and it was merged. ( https://review.coreboot.org/c/coreboot/+/30846 )
Change subject: mb/emulation/qemu-i440fx: prepare fw_cfg for romstage usage ......................................................................
mb/emulation/qemu-i440fx: prepare fw_cfg for romstage usage
Add separate functions for selecting the port and reading the port. Romstage can now read incremental from the data port.
Change-Id: I0ffde3bc2a4415a8af99af2275d16f6609099e37 Signed-off-by: Thomas Heijligen thomas.heijligen@secunet.com Reviewed-on: https://review.coreboot.org/c/30846 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Patrick Rudolph siro@das-labor.org --- M src/mainboard/emulation/qemu-i440fx/fw_cfg.c M src/mainboard/emulation/qemu-i440fx/fw_cfg.h 2 files changed, 12 insertions(+), 2 deletions(-)
Approvals: build bot (Jenkins): Verified Patrick Rudolph: Looks good to me, approved
diff --git a/src/mainboard/emulation/qemu-i440fx/fw_cfg.c b/src/mainboard/emulation/qemu-i440fx/fw_cfg.c index 9b394f2..364221e 100644 --- a/src/mainboard/emulation/qemu-i440fx/fw_cfg.c +++ b/src/mainboard/emulation/qemu-i440fx/fw_cfg.c @@ -42,12 +42,22 @@ return fw_cfg_detected; }
-void fw_cfg_get(int entry, void *dst, int dstlen) +static void fw_cfg_select(uint16_t entry) { outw(entry, FW_CFG_PORT_CTL); +} + +static void fw_cfg_read(void *dst, int dstlen) +{ insb(FW_CFG_PORT_DATA, dst, dstlen); }
+void fw_cfg_get(uint16_t entry, void *dst, int dstlen) +{ + fw_cfg_select(entry); + fw_cfg_read(dst, dstlen); +} + static void fw_cfg_init_file(void) { u32 i, size, count = 0; diff --git a/src/mainboard/emulation/qemu-i440fx/fw_cfg.h b/src/mainboard/emulation/qemu-i440fx/fw_cfg.h index b5cdb92..91b758c 100644 --- a/src/mainboard/emulation/qemu-i440fx/fw_cfg.h +++ b/src/mainboard/emulation/qemu-i440fx/fw_cfg.h @@ -14,7 +14,7 @@ #define FW_CFG_H #include "fw_cfg_if.h"
-void fw_cfg_get(int entry, void *dst, int dstlen); +void fw_cfg_get(uint16_t entry, void *dst, int dstlen); int fw_cfg_check_file(FWCfgFile *file, const char *name); int fw_cfg_max_cpus(void); unsigned long fw_cfg_smbios_tables(int *handle, unsigned long *current);