Revision 271dd5e0

b/hw/ppc_oldworld.c
32 32
#include "isa.h"
33 33
#include "pci.h"
34 34
#include "boards.h"
35
#include "fw_cfg.h"
35 36

  
36 37
#define MAX_IDE_BUS 2
37 38
#define VGA_BIOS_SIZE 65536
39
#define CFG_ADDR 0xf0000510
40

  
41
enum {
42
    ARCH_PREP = 0,
43
    ARCH_MAC99,
44
    ARCH_HEATHROW,
45
};
38 46

  
39 47
/* temporary frame buffer OSI calls for the video.x driver. The right
40 48
   solution is to modify the driver to use VGA PCI I/Os */
......
128 136
    int ppc_boot_device;
129 137
    BlockDriverState *hd[MAX_IDE_BUS * MAX_IDE_DEVS];
130 138
    int index;
139
    void *fw_cfg;
131 140

  
132 141
    linux_boot = (kernel_filename != NULL);
133 142

  
......
363 372

  
364 373
    /* Special port to get debug messages from Open-Firmware */
365 374
    register_ioport_write(0x0F00, 4, 1, &PPC_debug_write, NULL);
375

  
376
    fw_cfg = fw_cfg_init(0, 0, CFG_ADDR, CFG_ADDR + 2);
377
    fw_cfg_add_i32(fw_cfg, FW_CFG_ID, 1);
378
    fw_cfg_add_i64(fw_cfg, FW_CFG_RAM_SIZE, (uint64_t)ram_size);
379
    fw_cfg_add_i16(fw_cfg, FW_CFG_MACHINE_ID, ARCH_HEATHROW);
366 380
}
367 381

  
368 382
QEMUMachine heathrow_machine = {

Also available in: Unified diff