[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 066/101] ppc/ppc405: Change ppc405ep_init() return value
From: |
Cédric Le Goater |
Subject: |
[PULL 066/101] ppc/ppc405: Change ppc405ep_init() return value |
Date: |
Thu, 16 Dec 2021 21:25:39 +0100 |
I will be useful to rework the boot from Linux.
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Message-Id: <20211206103712.1866296-7-clg@kaod.org>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
---
hw/ppc/ppc405.h | 2 +-
hw/ppc/ppc405_boards.c | 6 +++++-
hw/ppc/ppc405_uc.c | 4 ++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/hw/ppc/ppc405.h b/hw/ppc/ppc405.h
index 4cb77aca5690..ad5f4026b5db 100644
--- a/hw/ppc/ppc405.h
+++ b/hw/ppc/ppc405.h
@@ -61,7 +61,7 @@ ram_addr_t ppc405_set_bootinfo(CPUPPCState *env,
ppc4xx_bd_info_t *bd);
void ppc4xx_plb_init(CPUPPCState *env);
void ppc405_ebc_init(CPUPPCState *env);
-CPUPPCState *ppc405ep_init(MemoryRegion *address_space_mem,
+PowerPCCPU *ppc405ep_init(MemoryRegion *address_space_mem,
MemoryRegion ram_memories[2],
hwaddr ram_bases[2],
hwaddr ram_sizes[2],
diff --git a/hw/ppc/ppc405_boards.c b/hw/ppc/ppc405_boards.c
index 2ac38c86a643..fcdb6d4cf8a0 100644
--- a/hw/ppc/ppc405_boards.c
+++ b/hw/ppc/ppc405_boards.c
@@ -145,6 +145,7 @@ static void ref405ep_init(MachineState *machine)
const char *initrd_filename = machine->initrd_filename;
char *filename;
ppc4xx_bd_info_t bd;
+ PowerPCCPU *cpu;
CPUPPCState *env;
DeviceState *dev;
SysBusDevice *s;
@@ -180,8 +181,11 @@ static void ref405ep_init(MachineState *machine)
memory_region_init(&ram_memories[1], NULL, "ef405ep.ram1", 0);
ram_bases[1] = 0x00000000;
ram_sizes[1] = 0x00000000;
- env = ppc405ep_init(sysmem, ram_memories, ram_bases, ram_sizes,
+
+ cpu = ppc405ep_init(sysmem, ram_memories, ram_bases, ram_sizes,
33333333, &uicdev, kernel_filename == NULL ? 0 : 1);
+ env = &cpu->env;
+
/* allocate SRAM */
sram_size = 512 * KiB;
memory_region_init_ram(sram, NULL, "ef405ep.sram", sram_size,
diff --git a/hw/ppc/ppc405_uc.c b/hw/ppc/ppc405_uc.c
index 6806d6be31d5..4ad81695e80a 100644
--- a/hw/ppc/ppc405_uc.c
+++ b/hw/ppc/ppc405_uc.c
@@ -1391,7 +1391,7 @@ static void ppc405ep_cpc_init (CPUPPCState *env,
clk_setup_t clk_setup[8],
#endif
}
-CPUPPCState *ppc405ep_init(MemoryRegion *address_space_mem,
+PowerPCCPU *ppc405ep_init(MemoryRegion *address_space_mem,
MemoryRegion ram_memories[2],
hwaddr ram_bases[2],
hwaddr ram_sizes[2],
@@ -1490,5 +1490,5 @@ CPUPPCState *ppc405ep_init(MemoryRegion
*address_space_mem,
/* CPU control */
ppc405ep_cpc_init(env, clk_setup, sysclk);
- return env;
+ return cpu;
}
--
2.31.1
- [PULL 055/101] target/ppc: Disable unused facilities in the e600 CPU, (continued)
- [PULL 055/101] target/ppc: Disable unused facilities in the e600 CPU, Cédric Le Goater, 2021/12/16
- [PULL 061/101] ppc/ppc405: Change kernel load address, Cédric Le Goater, 2021/12/16
- [PULL 053/101] target/ppc: Use helper_todouble/tosingle in helper_xststdcsp, Cédric Le Goater, 2021/12/16
- [PULL 064/101] ppc/ppc405: Convert printfs to trace-events, Cédric Le Goater, 2021/12/16
- [PULL 062/101] ppc: Mark the 'taihu' machine as deprecated, Cédric Le Goater, 2021/12/16
- [PULL 068/101] ppc/ppc405: Remove flash support, Cédric Le Goater, 2021/12/16
- [PULL 058/101] target/ppc: Remove 603e exception model, Cédric Le Goater, 2021/12/16
- [PULL 077/101] target/ppc: fix xscvqpdp register access, Cédric Le Goater, 2021/12/16
- [PULL 059/101] target/ppc: Set 601v exception model id, Cédric Le Goater, 2021/12/16
- [PULL 080/101] Revert "target/ppc: Move SPR_DSISR setting to powerpc_excp", Cédric Le Goater, 2021/12/16
- [PULL 066/101] ppc/ppc405: Change ppc405ep_init() return value,
Cédric Le Goater <=
- [PULL 071/101] ppc/ppc405: Fix boot from kernel, Cédric Le Goater, 2021/12/16
- [PULL 069/101] ppc/ppc405: Rework FW load, Cédric Le Goater, 2021/12/16
- [PULL 072/101] ppc/ppc405: Change default PLL values at reset, Cédric Le Goater, 2021/12/16
- [PULL 087/101] target/ppc/power8-pmu.c: add PM_RUN_INST_CMPL (0xFA) event, Cédric Le Goater, 2021/12/16
- [PULL 081/101] target/ppc: introduce PMUEventType and PMU overflow timers, Cédric Le Goater, 2021/12/16
- [PULL 091/101] ppc/pnv: Drop the "num-phbs" property, Cédric Le Goater, 2021/12/16
- [PULL 095/101] ppc/pnv: Introduce version and device_id class atributes for PHB4 devices, Cédric Le Goater, 2021/12/16
- [PULL 070/101] ppc/ppc405: Introduce ppc405_set_default_bootinfo(), Cédric Le Goater, 2021/12/16
- [PULL 076/101] target/ppc: Move xs{max,min}[cj]dp to decodetree, Cédric Le Goater, 2021/12/16
- [PULL 096/101] ppc/pnv: Introduce a "chip" property under the PHB4 model, Cédric Le Goater, 2021/12/16