diff options
author | blueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-09-18 18:27:29 +0000 |
---|---|---|
committer | blueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-09-18 18:27:29 +0000 |
commit | 3cce62435ccdab61336c6b0ec709252c79f553ba (patch) | |
tree | e5eac803b085d5354ada0a8dfb3339b9f9c4de64 /hw/sun4u.c | |
parent | b03d0971b3744cf5778264c9aedb4084f779c774 (diff) | |
download | qemu-3cce62435ccdab61336c6b0ec709252c79f553ba.zip qemu-3cce62435ccdab61336c6b0ec709252c79f553ba.tar.gz qemu-3cce62435ccdab61336c6b0ec709252c79f553ba.tar.bz2 |
Key/value based qemu<->guest firmware communication mechanism (Gleb Natapov)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5256 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/sun4u.c')
-rw-r--r-- | hw/sun4u.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -31,6 +31,7 @@ #include "sysemu.h" #include "boards.h" #include "firmware_abi.h" +#include "fw_cfg.h" #define KERNEL_LOAD_ADDR 0x00404000 #define CMDLINE_ADDR 0x003ff000 @@ -44,6 +45,7 @@ #define PROM_FILENAME "openbios-sparc64" #define NVRAM_SIZE 0x2000 #define MAX_IDE_BUS 2 +#define BIOS_CFG_IOPORT 0x510 struct hwdef { const char * const default_cpu_model; @@ -270,6 +272,7 @@ static void sun4uv_init(ram_addr_t RAM_size, int vga_ram_size, int drive_index; BlockDriverState *hd[MAX_IDE_BUS * MAX_IDE_DEVS]; BlockDriverState *fd[MAX_FD]; + void *fw_cfg; linux_boot = (kernel_filename != NULL); @@ -415,6 +418,8 @@ static void sun4uv_init(ram_addr_t RAM_size, int vga_ram_size, graphic_width, graphic_height, graphic_depth, (uint8_t *)&nd_table[0].macaddr); + fw_cfg = fw_cfg_init(BIOS_CFG_IOPORT, BIOS_CFG_IOPORT + 1, 0, 0); + fw_cfg_add_i32(fw_cfg, FW_CFG_ID, 1); } static const struct hwdef hwdefs[] = { |