[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-arm] [Qemu-devel] [PATCH] hw/arm/boot: Increase compliance wit
From: |
Stewart Hildebrand |
Subject: |
Re: [Qemu-arm] [Qemu-devel] [PATCH] hw/arm/boot: Increase compliance with kernel arm64 boot protocol. |
Date: |
Tue, 16 Oct 2018 01:19:35 +0000 |
Hi Philippe,
On Monday, October 15, 2018 6:05 PM, Philippe Mathieu-Daudé wrote:
> Hi Stewart,
>
> On 15/10/2018 23:26, Stewart Hildebrand wrote:
> > + /* For the virt board, we write our startup "bootloader" at
> > the very
> > + * bottom of RAM, so that bit can't be used for the image. To
> > avoid
> > + * overlap in case the image requests to be loaded at an offset
> > + * smaller than our bootloader, we increment the load offset
> > to the
> > + * next 2MB.
> > + */
> > + if (kernel_load_offset < FIXUP_MAX) {
>
> I don't understand how this is related to FIXUP_MAX...
You're right, my apologies, it's not directly related.
write_bootloader() calculates the size of the bootloader like so:
len = 0;
while (insns[len].fixup != FIXUP_TERMINATOR) {
len++;
}
The size of the bootloader then would be len * sizeof(uint32_t)
It would be nice not to have to repeat that logic in load_aarch64_image(). I'll
send out a v2 after I take some time to wrap my head around it...
>
> > + kernel_load_offset += 2 << 20;
>
> You can use += 2 * MiB; which is easier to review.
OK, I will include this in v2.