qemu-e2k/hw/ppc
Markus Armbruster dd59bcae76 ppc405_boards: Don't size flash memory to match backing image
Machine "ref405ep" maps its flash memory at address 2^32 - image size.
Image size is rounded up to the next multiple of 64KiB.  Useless,
because pflash_cfi02_realize() fails with "failed to read the initial
flash content" unless the rounding is a no-op.

If the image size exceeds 0x80000 Bytes, we overlap first SRAM, then
other stuff.  No idea how that would play out, but useful outcomes
seem unlikely.

Map the flash memory at fixed address 0xFFF80000 with size 512KiB,
regardless of image size, to match the physical hardware.

Machine "taihu" maps its boot flash memory similarly.  The code even
has a comment /* XXX: should check that size is 2MB */, followed by
disabled code to adjust the size to 2MiB regardless of image size.

Its code to map its application flash memory looks the same, except
there the XXX comment asks for 32MiB, and the code to adjust the size
isn't disabled.  Note that pflash_cfi02_realize() fails with "failed
to read the initial flash content" for images smaller than 32MiB.

Map the boot flash memory at fixed address 0xFFE00000 with size 2MiB,
to match the physical hardware.  Delete dead code from application
flash mapping, and simplify some.

Cc: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20190308094610.21210-9-armbru@redhat.com>
2019-03-11 22:53:44 +01:00
..
Kconfig ppc: Express dependencies of the embedded machines with kconfig 2019-03-07 21:46:19 +01:00
Makefile.objs hw/ppc/Makefile.objs: Build all boards conditinally with CONFIG_* 2019-02-05 16:50:20 +01:00
e500-ccsr.h ppc: do not use ../ in include files 2013-03-01 13:57:33 +01:00
e500.c elf: Add optional function ptr to load_elf() to parse ELF notes 2019-02-05 16:50:16 +01:00
e500.h platform-bus-device: use device plug callback instead of machine_done notifier 2018-05-10 18:10:56 +01:00
e500plat.c hw/ppc: Use the IEC binary prefix definitions 2018-07-02 15:41:16 +02:00
fdt.c target/ppc: Split page size information into a separate allocation 2018-04-27 18:05:22 +10:00
mac.h macio: move MACIOIDEState type declarations to macio.h 2018-08-30 10:42:18 +10:00
mac_newworld.c hw/boards: Add a MachineState parameter to kvm_type callback 2019-03-05 15:55:09 +00:00
mac_oldworld.c hw/boards: Add a MachineState parameter to kvm_type callback 2019-03-05 15:55:09 +00:00
mpc8544_guts.c shutdown: Add source information to SHUTDOWN and RESET 2017-05-23 13:28:17 +02:00
mpc8544ds.c ppc: e500: switch E500 based machines to full machine definition 2018-04-27 18:05:23 +10:00
pnv.c ppc/pnv: use IEC binary prefixes to represent sizes 2019-02-26 14:20:30 +11:00
pnv_bmc.c Include qapi/error.h exactly where needed 2018-02-09 13:50:17 +01:00
pnv_core.c ppc/pnv: introduce a CPU machine_data 2019-02-04 18:44:18 +11:00
pnv_lpc.c ppc/pnv: check size before data buffer access 2018-11-08 12:04:40 +11:00
pnv_occ.c ppc/pnv: Add OCC model stub with interrupt support 2017-04-26 12:00:42 +10:00
pnv_psi.c hw/ppc: Use object_initialize_child for correct reference counting 2019-02-26 09:21:25 +11:00
pnv_xscom.c Include qapi/error.h exactly where needed 2018-02-09 13:50:17 +01:00
ppc.c target/ppc: Add POWER9 external interrupt model 2019-02-26 09:21:24 +11:00
ppc4xx_devs.c ppc4xx: Pass array index to function instead of pointer into the array 2019-02-04 18:44:17 +11:00
ppc4xx_pci.c ppc4xx_pci: convert SysBus init method to a realize method 2018-11-08 12:04:40 +11:00
ppc405.h ppc4xx: Export ECB and PLB emulation 2017-09-08 09:30:55 +10:00
ppc405_boards.c ppc405_boards: Don't size flash memory to match backing image 2019-03-11 22:53:44 +01:00
ppc405_uc.c hw/ppc: Move ppc40x_*reset() functions from ppc405_uc.c to ppc.c 2019-02-04 18:44:18 +11:00
ppc440.h ppc440_uc: Basic emulation of PPC440 DMA controller 2018-07-03 09:56:52 +10:00
ppc440_bamboo.c elf: Add optional function ptr to load_elf() to parse ELF notes 2019-02-05 16:50:16 +01:00
ppc440_pcix.c ppc440_pcix: convert SysBus init method to a realize method 2018-11-08 12:04:40 +11:00
ppc440_uc.c ppc440: Avoid reporting error when reading non-existent RAM slot 2019-02-04 18:44:17 +11:00
ppc_booke.c hw/ppc: Don't include m48t59.h if it is not necessary 2019-02-04 18:44:20 +11:00
ppce500_spin.c hw/ppc: Use the IEC binary prefix definitions 2018-07-02 15:41:16 +02:00
prep.c hw/ppc/prep: Drop useless inclusion of "hw/i386/pc.h" 2019-02-17 21:54:02 +11:00
prep_systemio.c prep: add PReP System I/O 2017-01-31 10:10:13 +11:00
rs6000_mc.c hw/ppc: Use the IEC binary prefix definitions 2018-07-02 15:41:16 +02:00
sam460ex.c sam460ex: Don't size flash memory to match backing image 2019-03-11 22:53:44 +01:00
spapr.c qdev: Let the hotplug_handler_unplug() caller delete the device 2019-03-06 11:51:08 -03:00
spapr_caps.c ppc/spapr_caps: Add SPAPR_CAP_NESTED_KVM_HV 2018-11-08 13:08:35 +11:00
spapr_cpu_core.c spapr: move the interrupt presenters under machine_data 2019-02-04 18:44:18 +11:00
spapr_drc.c spapr: add hotplug hooks for PHB hotplug 2019-02-26 09:21:25 +11:00
spapr_events.c spapr_events: add support for phb hotplug events 2019-02-26 09:21:25 +11:00
spapr_hcall.c target/ppc: Rename PATB/PATBE -> PATE 2019-02-26 09:21:25 +11:00
spapr_iommu.c qemu/queue.h: leave head structs anonymous unless necessary 2019-01-11 15:46:55 +01:00
spapr_irq.c spapr_irq: Expose the phandle of the interrupt controller 2019-02-26 09:21:25 +11:00
spapr_ovec.c spapr: support memory unplug for qtest 2019-02-26 09:21:25 +11:00
spapr_pci.c qdev: Let the hotplug_handler_unplug() caller delete the device 2019-03-06 11:51:08 -03:00
spapr_pci_vfio.c Include qapi/error.h exactly where needed 2018-02-09 13:50:17 +01:00
spapr_rng.c hw/ppc/spapr_rng: Introduce CONFIG_SPAPR_RNG switch for spapr_rng.c 2018-11-08 12:04:40 +11:00
spapr_rtas.c target/ppc/spapr: Set LPCR:HR when using Radix mode 2019-02-26 09:21:25 +11:00
spapr_rtas_ddw.c spapr-iommu: Always advertise the maximum possible DMA window size 2018-12-21 09:37:38 +11:00
spapr_rtc.c qapi: move RTC_CHANGE to the target schema 2019-02-18 14:44:05 +01:00
spapr_vio.c spapr: Rename xics to intc in interrupt controller agnostic code 2019-02-17 21:54:02 +11:00
trace-events ppc/spapr: Receive and store device tree blob from SLOF 2019-01-09 09:28:13 +11:00
virtex_ml507.c hw: Remove unused 'hw/devices.h' include 2019-03-07 22:16:11 +01:00