qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 7/8] vexpress: Make VEDBoardInfo extend arm_b


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH v2 7/8] vexpress: Make VEDBoardInfo extend arm_boot_info
Date: Sun, 14 Jul 2013 13:21:53 +0100

On 14 July 2013 12:36, Peter Crosthwaite <address@hidden> wrote:
> Hi Peter,
>
> On Sat, Jul 13, 2013 at 6:37 AM, Peter Maydell <address@hidden> wrote:
>> Make the VEDBoardInfo struct extend arm_boot_info; this will
>> allow us to get at the VEDBoardInfo information inside callbacks
>> from arm/boot code.
>>
>> Signed-off-by: Peter Maydell <address@hidden>
>> ---
>>  hw/arm/vexpress.c |   31 +++++++++++++++----------------
>>  1 file changed, 15 insertions(+), 16 deletions(-)
>>
>> diff --git a/hw/arm/vexpress.c b/hw/arm/vexpress.c
>> index fd18b60..d1c28aa 100644
>> --- a/hw/arm/vexpress.c
>> +++ b/hw/arm/vexpress.c
>> @@ -36,8 +36,6 @@
>>  #define VEXPRESS_FLASH_SIZE (64 * 1024 * 1024)
>>  #define VEXPRESS_FLASH_SECT_SIZE (256 * 1024)
>>
>> -static struct arm_boot_info vexpress_binfo;
>> -
>>  /* Address maps for peripherals:
>>   * the Versatile Express motherboard has two possible maps,
>>   * the "legacy" one (used for A9) and the "Cortex-A Series"
>> @@ -150,6 +148,7 @@ typedef void DBoardInitFn(const VEDBoardInfo 
>> *daughterboard,
>>                            qemu_irq *pic);
>>
>>  struct VEDBoardInfo {
>> +    struct arm_boot_info bootinfo;
>>      const hwaddr *motherboard_map;
>>      hwaddr loader_start;
>>      const hwaddr gic_cpu_if_addr;
>> @@ -269,7 +268,7 @@ static const uint32_t a9_clocks[] = {
>>      66670000, /* Test chip reference clock: 66.67MHz */
>>  };
>>
>> -static const VEDBoardInfo a9_daughterboard = {
>> +static VEDBoardInfo a9_daughterboard = {
>
> Wouldn't it be cleaner to just add opaque data to arm_boot_info?, then
> you don't have to promote this previously const struct to global state.

I thought about that but decided I didn't really want to throw an
opaque into the boot_info structure when the callbacks already
get a pointer to state.

-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]