QEMU-Devel Archive mirror
 help / color / mirror / Atom feed
From: BALATON Zoltan <balaton@eik.bme.hu>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
Cc: Alexey Kardashevskiy <aik@ozlabs.ru>,
	qemu-ppc@nongnu.org, qemu-devel@nongnu.org,
	David Gibson <david@gibson.dropbear.id.au>
Subject: Re: [RFC PATCH 2/5] ppc/pegasos2: Introduce Pegasos2MachineState structure
Date: Sun, 6 Jun 2021 22:35:53 +0200 (CEST)	[thread overview]
Message-ID: <8bf1712-ac4-5a99-3698-e935a676c455@eik.bme.hu> (raw)
In-Reply-To: <0ac0e981-ca13-f70e-aa89-c051030cbe21@amsat.org>

[-- Attachment #1: Type: text/plain, Size: 1692 bytes --]

On Sun, 6 Jun 2021, Philippe Mathieu-Daudé wrote:
> 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...

I've only moved vars to the new machine state that will be needed outside 
of the init method for VOF and rom isn't so that's kept local. It could be 
put there for consistency but not really needed so I've left it here.

> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

Thanks. By the way, even though this series allows loading Linux and 
MorphOS without the board ROM I'd prefer to keep the test using the ROM as 
implemented in your series because that excercies the emulation more than 
booting without ROM as the firmware inits more devices and uses more 
facilities that VOF mostly bypasses so for a test the board firmware is 
more complete.

Regards,
BALATON Zoltan

  reply	other threads:[~2021-06-06 20:36 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-06 15:46 [RFC PATCH 0/5] ppc/Pegasos2 VOF BALATON Zoltan
2021-06-06 15:46 ` [RFC PATCH 2/5] ppc/pegasos2: Introduce Pegasos2MachineState structure BALATON Zoltan
2021-06-06 19:04   ` Philippe Mathieu-Daudé
2021-06-06 20:35     ` BALATON Zoltan [this message]
2021-06-06 15:46 ` [RFC PATCH 3/5] target/ppc: Allow virtual hypervisor on CPU without HV BALATON Zoltan
2021-06-06 15:46 ` [RFC PATCH 1/5] Misc VOF fixes BALATON Zoltan
2021-06-06 15:46 ` [RFC PATCH 5/5] ppc/pegasos2: Implement some RTAS functions with VOF BALATON Zoltan
2021-06-06 15:46 ` [RFC PATCH 4/5] ppc/pegasos2: Use Virtual Open Firmware as firmware replacement BALATON Zoltan
2021-06-15  7:09   ` Alexey Kardashevskiy
2021-06-15  9:44     ` BALATON Zoltan
2021-06-16  4:58       ` Alexey Kardashevskiy
2021-06-16 10:38         ` BALATON Zoltan
2021-06-09  7:39 ` [RFC PATCH 0/5] ppc/Pegasos2 VOF Alexey Kardashevskiy
2021-06-09 10:28   ` BALATON Zoltan
2021-06-10  7:14     ` Alexey Kardashevskiy
2021-06-10  8:25       ` David Gibson
2021-06-10 10:04         ` BALATON Zoltan
2021-06-10 10:37           ` David Gibson
2021-06-10 12:33           ` R: " luigi burdo
2021-06-10 12:52             ` BALATON Zoltan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8bf1712-ac4-5a99-3698-e935a676c455@eik.bme.hu \
    --to=balaton@eik.bme.hu \
    --cc=aik@ozlabs.ru \
    --cc=david@gibson.dropbear.id.au \
    --cc=f4bug@amsat.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).