On 05/30/2012 06:00 AM, Alexander Graf wrote: > Signed-off-by: Alexander Graf <ag...@suse.de> > --- > hw/ppce500_mpc8544ds.c | 50 > ++++++++++++++++++++++++++++++++++++++++++++++++ > pc-bios/mpc8544ds.dtb | Bin 1810 -> 72 bytes > pc-bios/mpc8544ds.dts | 46 -------------------------------------------- > 3 files changed, 50 insertions(+), 46 deletions(-) > > diff --git a/hw/ppce500_mpc8544ds.c b/hw/ppce500_mpc8544ds.c > index 3f6c6e3..d9a3d50 100644 > --- a/hw/ppce500_mpc8544ds.c > +++ b/hw/ppce500_mpc8544ds.c > @@ -62,6 +62,27 @@ struct boot_info > uint32_t entry; > }; > > +static void pci_map_create(void *fdt, uint32_t *pci_map, uint32_t mpic) > +{ > + int i; > + const uint32_t tmp[] = { > + /* IDSEL 0x11 J17 Slot 1 */ > + 0x8800, 0x0, 0x0, 0x1, mpic, 0x2, 0x1, > + 0x8800, 0x0, 0x0, 0x2, mpic, 0x3, 0x1, > + 0x8800, 0x0, 0x0, 0x3, mpic, 0x4, 0x1, > + 0x8800, 0x0, 0x0, 0x4, mpic, 0x1, 0x1, > + > + /* IDSEL 0x12 J16 Slot 2 */ > + 0x9000, 0x0, 0x0, 0x1, mpic, 0x3, 0x1, > + 0x9000, 0x0, 0x0, 0x2, mpic, 0x4, 0x1, > + 0x9000, 0x0, 0x0, 0x3, mpic, 0x2, 0x1, > + 0x9000, 0x0, 0x0, 0x4, mpic, 0x1, 0x1, > + }; > + for (i = 0; i < (7 * 8); i++) { > + pci_map[i] = cpu_to_be32(tmp[i]); > + } > +} > + > static int mpc8544_load_device_tree(CPUPPCState *env, > target_phys_addr_t addr, > uint32_t ramsize, > @@ -86,6 +107,11 @@ static int mpc8544_load_device_tree(CPUPPCState *env, > char mpic[128]; > uint32_t mpic_ph; > char gutil[128]; > + char pci[128]; > + uint32_t pci_map[7 * 8]; > + uint32_t pci_ranges[12] = { 0x2000000, 0x0, 0xc0000000, 0xc0000000, 0x0, > + 0x20000000, 0x1000000, 0x0, 0x0, 0xe1000000, > + 0x0, 0x10000 };
At least put in a FIXME for dynamically generating this from the actual data QEMU uses. -Scott