[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC PATCH 2/5] ppc/pegasos2: Introduce Pegasos2MachineState structu
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [RFC PATCH 2/5] ppc/pegasos2: Introduce Pegasos2MachineState structure |
Date: |
Sun, 6 Jun 2021 21:04:18 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 |
On 6/6/21 5:46 PM, BALATON Zoltan wrote:
> Add own machine state structure which will be used to store state
> needed for firmware emulation.
>
> Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
> ---
> hw/ppc/pegasos2.c | 50 +++++++++++++++++++++++++++++++++++------------
> 1 file changed, 37 insertions(+), 13 deletions(-)
> +struct Pegasos2MachineState {
> + MachineState parent_obj;
> + PowerPCCPU *cpu;
> + DeviceState *mv;
> +};
> +
> static void pegasos2_cpu_reset(void *opaque)
> {
> PowerPCCPU *cpu = opaque;
> @@ -51,9 +60,9 @@ static void pegasos2_cpu_reset(void *opaque)
>
> static void pegasos2_init(MachineState *machine)
> {
> - PowerPCCPU *cpu = NULL;
> + Pegasos2MachineState *pm = PEGASOS2_MACHINE(machine);
> + CPUPPCState *env;
> MemoryRegion *rom = g_new(MemoryRegion, 1);
It would be nice to have the 'rom' variable also in the machine state.
Can be done later...
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
- [RFC PATCH 0/5] ppc/Pegasos2 VOF, BALATON Zoltan, 2021/06/06
- [RFC PATCH 1/5] Misc VOF fixes, BALATON Zoltan, 2021/06/06
- [RFC PATCH 2/5] ppc/pegasos2: Introduce Pegasos2MachineState structure, BALATON Zoltan, 2021/06/06
- Re: [RFC PATCH 2/5] ppc/pegasos2: Introduce Pegasos2MachineState structure,
Philippe Mathieu-Daudé <=
- [RFC PATCH 5/5] ppc/pegasos2: Implement some RTAS functions with VOF, BALATON Zoltan, 2021/06/06
- [RFC PATCH 3/5] target/ppc: Allow virtual hypervisor on CPU without HV, BALATON Zoltan, 2021/06/06
- [RFC PATCH 4/5] ppc/pegasos2: Use Virtual Open Firmware as firmware replacement, BALATON Zoltan, 2021/06/06
Re: [RFC PATCH 0/5] ppc/Pegasos2 VOF, Alexey Kardashevskiy, 2021/06/09