Name of user not set #1002476 has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/35310 )
Change subject: emulation/qemu-i440fx/northbridge.c: replace macro with enum ......................................................................
emulation/qemu-i440fx/northbridge.c: replace macro with enum
replace multiple existing FW_CFG_* defines with enum fw_cfg_enum.
Change-Id: I9699df4aeb2d8b18f933bb9aaed16008d10158ad Signed-off-by: Himanshu Sahdev himanshusah@hcl.com --- M src/mainboard/emulation/qemu-i440fx/fw_cfg_if.h 1 file changed, 28 insertions(+), 26 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/10/35310/1
diff --git a/src/mainboard/emulation/qemu-i440fx/fw_cfg_if.h b/src/mainboard/emulation/qemu-i440fx/fw_cfg_if.h index 46aee9b3d..5aac1cf 100644 --- a/src/mainboard/emulation/qemu-i440fx/fw_cfg_if.h +++ b/src/mainboard/emulation/qemu-i440fx/fw_cfg_if.h @@ -21,32 +21,34 @@
#include <stdint.h>
-#define FW_CFG_SIGNATURE 0x00 -#define FW_CFG_ID 0x01 -#define FW_CFG_UUID 0x02 -#define FW_CFG_RAM_SIZE 0x03 -#define FW_CFG_NOGRAPHIC 0x04 -#define FW_CFG_NB_CPUS 0x05 -#define FW_CFG_MACHINE_ID 0x06 -#define FW_CFG_KERNEL_ADDR 0x07 -#define FW_CFG_KERNEL_SIZE 0x08 -#define FW_CFG_KERNEL_CMDLINE 0x09 -#define FW_CFG_INITRD_ADDR 0x0a -#define FW_CFG_INITRD_SIZE 0x0b -#define FW_CFG_BOOT_DEVICE 0x0c -#define FW_CFG_NUMA 0x0d -#define FW_CFG_BOOT_MENU 0x0e -#define FW_CFG_MAX_CPUS 0x0f -#define FW_CFG_KERNEL_ENTRY 0x10 -#define FW_CFG_KERNEL_DATA 0x11 -#define FW_CFG_INITRD_DATA 0x12 -#define FW_CFG_CMDLINE_ADDR 0x13 -#define FW_CFG_CMDLINE_SIZE 0x14 -#define FW_CFG_CMDLINE_DATA 0x15 -#define FW_CFG_SETUP_ADDR 0x16 -#define FW_CFG_SETUP_SIZE 0x17 -#define FW_CFG_SETUP_DATA 0x18 -#define FW_CFG_FILE_DIR 0x19 +enum fw_cfg_enum { + FW_CFG_SIGNATURE, + FW_CFG_ID, + FW_CFG_UUID, + FW_CFG_RAM_SIZE, + FW_CFG_NOGRAPHIC, + FW_CFG_NB_CPUS, + FW_CFG_MACHINE_ID, + FW_CFG_KERNEL_ADDR, + FW_CFG_KERNEL_SIZE, + FW_CFG_KERNEL_CMDLINE, + FW_CFG_INITRD_ADDR, + FW_CFG_INITRD_SIZE, + FW_CFG_BOOT_DEVICE, + FW_CFG_NUMA, + FW_CFG_BOOT_MENU, + FW_CFG_MAX_CPUS, + FW_CFG_KERNEL_ENTRY, + FW_CFG_KERNEL_DATA, + FW_CFG_INITRD_DATA, + FW_CFG_CMDLINE_ADDR, + FW_CFG_CMDLINE_SIZE, + FW_CFG_CMDLINE_DATA, + FW_CFG_SETUP_ADDR, + FW_CFG_SETUP_SIZE, + FW_CFG_SETUP_DATA, + FW_CFG_FILE_DIR +};
#define FW_CFG_FILE_FIRST 0x20 #define FW_CFG_FILE_SLOTS 0x10
Hello Patrick Rudolph, build bot (Jenkins), Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/35310
to look at the new patch set (#2).
Change subject: emulation/qemu-i440fx/fw_cfg_if.h: replace macro with enum ......................................................................
emulation/qemu-i440fx/fw_cfg_if.h: replace macro with enum
replace multiple existing FW_CFG_* defines with enum fw_cfg_enum.
Change-Id: I9699df4aeb2d8b18f933bb9aaed16008d10158ad Signed-off-by: Himanshu Sahdev himanshusah@hcl.com --- M src/mainboard/emulation/qemu-i440fx/fw_cfg_if.h 1 file changed, 28 insertions(+), 26 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/10/35310/2
Martin Roth has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/35310 )
Change subject: emulation/qemu-i440fx/fw_cfg_if.h: replace macro with enum ......................................................................
Patch Set 2:
Since this is a copy of the QEMU file, do we really want to change away from matching the original? It'll make it harder to diff changes in the future.
Name of user not set #1002476 has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/35310 )
Change subject: emulation/qemu-i440fx/fw_cfg_if.h: replace macro with enum ......................................................................
Patch Set 2:
Patch Set 2:
Since this is a copy of the QEMU file, do we really want to change away from matching the original? It'll make it harder to diff changes in the future.
I have already been through the original qemu source tree, git diff with "include/hw/nvram/fw_cfg.h" is not as expected now, owing to much changes compared at the time of copying over the same into the coreboot. I think we should modify the comment accordingly as the file path should be "include/standard-headers/linux/qemu_fw_cfg.h" and mention the modification according to the coreboot.
Hello Patrick Rudolph, build bot (Jenkins), Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/35310
to look at the new patch set (#3).
Change subject: emulation/qemu-i440fx/fw_cfg_if.h: replace macro with enum ......................................................................
emulation/qemu-i440fx/fw_cfg_if.h: replace macro with enum
replace multiple existing FW_CFG_* defines with enum fw_cfg_enum.
Change-Id: I9699df4aeb2d8b18f933bb9aaed16008d10158ad Signed-off-by: Himanshu Sahdev himanshusah@hcl.com --- M src/mainboard/emulation/qemu-i440fx/fw_cfg_if.h 1 file changed, 31 insertions(+), 28 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/10/35310/3
Patrick Rudolph has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/35310 )
Change subject: emulation/qemu-i440fx/fw_cfg_if.h: replace macro with enum ......................................................................
Patch Set 3: Code-Review+2
Martin Roth has submitted this change. ( https://review.coreboot.org/c/coreboot/+/35310 )
Change subject: emulation/qemu-i440fx/fw_cfg_if.h: replace macro with enum ......................................................................
emulation/qemu-i440fx/fw_cfg_if.h: replace macro with enum
replace multiple existing FW_CFG_* defines with enum fw_cfg_enum.
Change-Id: I9699df4aeb2d8b18f933bb9aaed16008d10158ad Signed-off-by: Himanshu Sahdev himanshusah@hcl.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/35310 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_if.h 1 file changed, 31 insertions(+), 28 deletions(-)
Approvals: build bot (Jenkins): Verified Patrick Rudolph: Looks good to me, approved
diff --git a/src/mainboard/emulation/qemu-i440fx/fw_cfg_if.h b/src/mainboard/emulation/qemu-i440fx/fw_cfg_if.h index 46aee9b3d..de67f02 100644 --- a/src/mainboard/emulation/qemu-i440fx/fw_cfg_if.h +++ b/src/mainboard/emulation/qemu-i440fx/fw_cfg_if.h @@ -13,40 +13,43 @@ */
/* - * This are the qemu firmware config interface defines and structs. - * Copyed over from qemu soure tree, include/hw/nvram/fw_cfg.h + * These are the qemu firmware config interface defines and structs. + * Copied over from qemu soure tree, + * include/standard-headers/linux/qemu_fw_cfg.h and modified accordingly. */ #ifndef FW_CFG_IF_H #define FW_CFG_IF_H
#include <stdint.h>
-#define FW_CFG_SIGNATURE 0x00 -#define FW_CFG_ID 0x01 -#define FW_CFG_UUID 0x02 -#define FW_CFG_RAM_SIZE 0x03 -#define FW_CFG_NOGRAPHIC 0x04 -#define FW_CFG_NB_CPUS 0x05 -#define FW_CFG_MACHINE_ID 0x06 -#define FW_CFG_KERNEL_ADDR 0x07 -#define FW_CFG_KERNEL_SIZE 0x08 -#define FW_CFG_KERNEL_CMDLINE 0x09 -#define FW_CFG_INITRD_ADDR 0x0a -#define FW_CFG_INITRD_SIZE 0x0b -#define FW_CFG_BOOT_DEVICE 0x0c -#define FW_CFG_NUMA 0x0d -#define FW_CFG_BOOT_MENU 0x0e -#define FW_CFG_MAX_CPUS 0x0f -#define FW_CFG_KERNEL_ENTRY 0x10 -#define FW_CFG_KERNEL_DATA 0x11 -#define FW_CFG_INITRD_DATA 0x12 -#define FW_CFG_CMDLINE_ADDR 0x13 -#define FW_CFG_CMDLINE_SIZE 0x14 -#define FW_CFG_CMDLINE_DATA 0x15 -#define FW_CFG_SETUP_ADDR 0x16 -#define FW_CFG_SETUP_SIZE 0x17 -#define FW_CFG_SETUP_DATA 0x18 -#define FW_CFG_FILE_DIR 0x19 +enum fw_cfg_enum { + FW_CFG_SIGNATURE, + FW_CFG_ID, + FW_CFG_UUID, + FW_CFG_RAM_SIZE, + FW_CFG_NOGRAPHIC, + FW_CFG_NB_CPUS, + FW_CFG_MACHINE_ID, + FW_CFG_KERNEL_ADDR, + FW_CFG_KERNEL_SIZE, + FW_CFG_KERNEL_CMDLINE, + FW_CFG_INITRD_ADDR, + FW_CFG_INITRD_SIZE, + FW_CFG_BOOT_DEVICE, + FW_CFG_NUMA, + FW_CFG_BOOT_MENU, + FW_CFG_MAX_CPUS, + FW_CFG_KERNEL_ENTRY, + FW_CFG_KERNEL_DATA, + FW_CFG_INITRD_DATA, + FW_CFG_CMDLINE_ADDR, + FW_CFG_CMDLINE_SIZE, + FW_CFG_CMDLINE_DATA, + FW_CFG_SETUP_ADDR, + FW_CFG_SETUP_SIZE, + FW_CFG_SETUP_DATA, + FW_CFG_FILE_DIR +};
#define FW_CFG_FILE_FIRST 0x20 #define FW_CFG_FILE_SLOTS 0x10