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>
This commit is contained in:
Himanshu Sahdev 2019-09-10 16:03:13 +05:30 committed by Martin Roth
parent 71dbcf127a
commit 20667c59d8
1 changed files with 31 additions and 28 deletions

View File

@ -13,40 +13,43 @@
*/ */
/* /*
* This are the qemu firmware config interface defines and structs. * These are the qemu firmware config interface defines and structs.
* Copyed over from qemu soure tree, include/hw/nvram/fw_cfg.h * Copied over from qemu soure tree,
* include/standard-headers/linux/qemu_fw_cfg.h and modified accordingly.
*/ */
#ifndef FW_CFG_IF_H #ifndef FW_CFG_IF_H
#define FW_CFG_IF_H #define FW_CFG_IF_H
#include <stdint.h> #include <stdint.h>
#define FW_CFG_SIGNATURE 0x00 enum fw_cfg_enum {
#define FW_CFG_ID 0x01 FW_CFG_SIGNATURE,
#define FW_CFG_UUID 0x02 FW_CFG_ID,
#define FW_CFG_RAM_SIZE 0x03 FW_CFG_UUID,
#define FW_CFG_NOGRAPHIC 0x04 FW_CFG_RAM_SIZE,
#define FW_CFG_NB_CPUS 0x05 FW_CFG_NOGRAPHIC,
#define FW_CFG_MACHINE_ID 0x06 FW_CFG_NB_CPUS,
#define FW_CFG_KERNEL_ADDR 0x07 FW_CFG_MACHINE_ID,
#define FW_CFG_KERNEL_SIZE 0x08 FW_CFG_KERNEL_ADDR,
#define FW_CFG_KERNEL_CMDLINE 0x09 FW_CFG_KERNEL_SIZE,
#define FW_CFG_INITRD_ADDR 0x0a FW_CFG_KERNEL_CMDLINE,
#define FW_CFG_INITRD_SIZE 0x0b FW_CFG_INITRD_ADDR,
#define FW_CFG_BOOT_DEVICE 0x0c FW_CFG_INITRD_SIZE,
#define FW_CFG_NUMA 0x0d FW_CFG_BOOT_DEVICE,
#define FW_CFG_BOOT_MENU 0x0e FW_CFG_NUMA,
#define FW_CFG_MAX_CPUS 0x0f FW_CFG_BOOT_MENU,
#define FW_CFG_KERNEL_ENTRY 0x10 FW_CFG_MAX_CPUS,
#define FW_CFG_KERNEL_DATA 0x11 FW_CFG_KERNEL_ENTRY,
#define FW_CFG_INITRD_DATA 0x12 FW_CFG_KERNEL_DATA,
#define FW_CFG_CMDLINE_ADDR 0x13 FW_CFG_INITRD_DATA,
#define FW_CFG_CMDLINE_SIZE 0x14 FW_CFG_CMDLINE_ADDR,
#define FW_CFG_CMDLINE_DATA 0x15 FW_CFG_CMDLINE_SIZE,
#define FW_CFG_SETUP_ADDR 0x16 FW_CFG_CMDLINE_DATA,
#define FW_CFG_SETUP_SIZE 0x17 FW_CFG_SETUP_ADDR,
#define FW_CFG_SETUP_DATA 0x18 FW_CFG_SETUP_SIZE,
#define FW_CFG_FILE_DIR 0x19 FW_CFG_SETUP_DATA,
FW_CFG_FILE_DIR
};
#define FW_CFG_FILE_FIRST 0x20 #define FW_CFG_FILE_FIRST 0x20
#define FW_CFG_FILE_SLOTS 0x10 #define FW_CFG_FILE_SLOTS 0x10