diff options
author | Tom Rini <trini@konsulko.com> | 2025-04-03 11:43:38 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2025-04-03 11:43:38 -0600 |
commit | 1f2a3d066c99f57675162ce09586e9de30407f1b (patch) | |
tree | 40bfceab01cc1c6a035eb66792638149400db1ef /boot/bootdev-uclass.c | |
parent | 39ff722b3ee0bd569388a3b89c59899511ac1a24 (diff) | |
parent | a3d255d996b346c527962926ff80343e02ae8f00 (diff) |
Merge patch series "x86: Improve operation under QEMU"
Simon Glass <sjg@chromium.org> says:
U-Boot can start and boot an OS in both qemu-x86 and qemu-x86_64 but it
is not perfect.
With both builds, executing the VESA ROM causes an intermittent hang, at
least on some AMD CPUs.
With qemu-x86_64 kvm cannot be used since the move to long mode (64-bit)
is done in a way that works on real hardware but not with QEMU. This
means that performance is 4-5x slower than it could be, at least on my
CPU.
We can work around the first problem by using Bochs, which is anyway a
better choice than VESA for QEMU. The second can be addressed by using
the same descriptor across the jump to long mode.
With an MTRR fix this allows booting into Ubuntu on qemu-x86_64
In v3 some e820 patches are included to make booting reliable and avoid
ACPI tables being dropped. Also, several MTTR problems are addressed, to
support memory sizes above 4GB reliably.
Link: https://lore.kernel.org/all/20250315142643.2600605-1-sjg@chromium.org/
Diffstat (limited to 'boot/bootdev-uclass.c')
-rw-r--r-- | boot/bootdev-uclass.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/boot/bootdev-uclass.c b/boot/bootdev-uclass.c index c39147940b6..3791ebfcb42 100644 --- a/boot/bootdev-uclass.c +++ b/boot/bootdev-uclass.c @@ -168,8 +168,10 @@ int bootdev_find_in_blk(struct udevice *dev, struct udevice *blk, */ /* if there are bootable partitions, scan only those */ - } else if (iter->first_bootable >= 0 && + } else if ((iter->flags & BOOTFLOWIF_ONLY_BOOTABLE) && + iter->first_bootable >= 0 && (iter->first_bootable ? !info.bootable : iter->part != 1)) { + log_debug("Skipping non-bootable partition %d\n", iter->part); return log_msg_ret("boot", -EINVAL); } else { ret = fs_set_blk_dev_with_part(desc, bflow->part); @@ -577,6 +579,9 @@ int bootdev_next_label(struct bootflow_iter *iter, struct udevice **devp, struct udevice *dev; log_debug("next\n"); + if (iter->cur_label >= 0 && !iter->labels[iter->cur_label]) + return log_msg_ret("fil", -ENODEV); + for (dev = NULL; !dev && iter->labels[++iter->cur_label];) { const char *label = iter->labels[iter->cur_label]; int ret; |