diff options
author | blueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-12-24 20:29:16 +0000 |
---|---|---|
committer | blueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-12-24 20:29:16 +0000 |
commit | 271dd5e09ee1d8ad4438471211ffbf6b5a377084 (patch) | |
tree | c12a43122896ec4c3e12d6f44f0dd5b8408926f5 /hw/ppc_oldworld.c | |
parent | 95efd11c121ed5ba9677f9fbaf0cefa8e52cb02e (diff) |
Use the firmware configuration device
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6130 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/ppc_oldworld.c')
-rw-r--r-- | hw/ppc_oldworld.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/hw/ppc_oldworld.c b/hw/ppc_oldworld.c index 9d922be57a..5bf52eeb4b 100644 --- a/hw/ppc_oldworld.c +++ b/hw/ppc_oldworld.c @@ -32,9 +32,17 @@ #include "isa.h" #include "pci.h" #include "boards.h" +#include "fw_cfg.h" #define MAX_IDE_BUS 2 #define VGA_BIOS_SIZE 65536 +#define CFG_ADDR 0xf0000510 + +enum { + ARCH_PREP = 0, + ARCH_MAC99, + ARCH_HEATHROW, +}; /* temporary frame buffer OSI calls for the video.x driver. The right solution is to modify the driver to use VGA PCI I/Os */ @@ -128,6 +136,7 @@ static void ppc_heathrow_init (ram_addr_t ram_size, int vga_ram_size, int ppc_boot_device; BlockDriverState *hd[MAX_IDE_BUS * MAX_IDE_DEVS]; int index; + void *fw_cfg; linux_boot = (kernel_filename != NULL); @@ -363,6 +372,11 @@ static void ppc_heathrow_init (ram_addr_t ram_size, int vga_ram_size, /* Special port to get debug messages from Open-Firmware */ register_ioport_write(0x0F00, 4, 1, &PPC_debug_write, NULL); + + fw_cfg = fw_cfg_init(0, 0, CFG_ADDR, CFG_ADDR + 2); + fw_cfg_add_i32(fw_cfg, FW_CFG_ID, 1); + fw_cfg_add_i64(fw_cfg, FW_CFG_RAM_SIZE, (uint64_t)ram_size); + fw_cfg_add_i16(fw_cfg, FW_CFG_MACHINE_ID, ARCH_HEATHROW); } QEMUMachine heathrow_machine = { |