[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH qboot] Place setup_data at location specified by host
From: |
Paolo Bonzini |
Subject: |
Re: [PATCH qboot] Place setup_data at location specified by host |
Date: |
Mon, 19 Sep 2022 15:35:37 +0200 |
On Fri, Sep 16, 2022 at 3:42 PM Jason A. Donenfeld <Jason@zx2c4.com> wrote:
> QEMU places setup_data at a particular location, which cannot be
> relocated due to it containing self references in absolute address
> terms. For this reason, it supplies the intended location in
> FW_CFG_SETUP_ADDR, which is what SeaBIOS uses.
(Technically not SeaBIOS, but rather the option rom provided in QEMU).
> So use this too in qboot.
> This also has the effect of removing the 8k limit on the copied size,
> since the header is copied to the right location from the beginning.
This was "intentional" to make qboot more similar to the edk2 linuxboot code.
At the time it seemed like a good idea; of course it was not.
If I understand correctly the bad situation cannot happen because
QEMU and fw_cfg share the same code to decide on the setup_addr.
Unlike with the UEFI handover protocol, qboot always boots the
real mode stub. Still it's a nice fix to remove the 8K limit.
Patch pushed to qboot.git, and the submodule update will be in the
next pull request.
Paolo