upl: Prerequite patches for updated spec
Subsystems (7)
v3 cover upl: Prerequite patches for updated spec
The current UPL spec[1] has been tidied up and improved over the last year, since U-Boot's original UPL support was written.
This series includes some prerequisite patches needed for the real UPL patches. It is split from [2]
[1] [email protected]:UniversalPayload/spec.git commit 3f1450d
[2] https://patchwork.ozlabs.org/project/uboot/list/?series=438574&state=*
Changes in v3:
- Use 'default' instead of reordering items
- Update the commit message
- Drop entire condition
- Reword commit message to clarify that the fault is with U-Boot
- Add new patch to avoid mapping the ACPI tables twice
- Be careful not to resend the bloblist license and get_size patches
Changes in v2:
- Fix 'Emable' typo
- Enable the command in cmd/Kconfig instead
- Fix unbalanced {}
- Add new patch to move x86 tables to use SZ macros
- Use 4K instead of 4KB
- Add new patch to enable bloblist on x86
- Split this into its own function
- Split prerequisite patches into their own series
Simon Glass (30):
bloblist: Make BLOBLIST_ALLOC the default
abuf: Provide a way to get the buffer address
abuf: Allow use in host tools
abuf: Provide a constant buffer
cpu: Provide a way to get the physical-address size
serial: Support info() method in ns16550 xPL with UPL
mkimage: Update map_to_sysmem() to match its prototype
x86: Enable meminfo command
x86: Show the timestamp counter with bdinfo
ofnode: Use 4K for a default tree-size
ofnode: Indicate when out of space in a few places
ofnode: Update of_add_subnode() to indicate name is alloced
boot: Rename fit_image_get_data()
boot: Rename fit_image_get_data_and_size()
boot: Use fit_image_get_data() to get data
test: Fix inpected typo in upl test
emulation: fdt: Relax condition for OF_HAS_PRIOR_STAGE
emulation: Use bloblist to hold tables
x86: Create more space for SPL with qemu-x86_64
pci: video: Set up the pixel-format field
x86: Show an error if video fails
x86: Support jumping to a UPL image
x86: Enable UPL handoff for SPL
x86: Move tables to use SZ macros
x86: Align the SMBIOS table to a 4K boundary
efi_loader: Avoid mapping the ACPI tables twice
x86: emulation: Enable bloblist
dm: core: Clarify behaviour of ofnode_name_eq()
dm: core: Provide ofnode_name_eq_unit() to accept a unit address
dm: core: Provide ofnode_find_subnode_unit()
arch/x86/include/asm/cpu.h | 9 ---- arch/x86/lib/bdinfo.c | 3 ++ arch/x86/lib/bootm.c | 15 +++++- arch/x86/lib/spl.c | 12 ++++- arch/x86/lib/tables.c | 11 +++-- boot/image-board.c | 4 +- boot/image-fit.c | 30 ++++++------ cmd/Kconfig | 4 +- cmd/ximg.c | 3 +- common/Kconfig | 2 + common/spl/spl_fit.c | 2 +- common/splash_source.c | 17 ++----- configs/chromebook_bob_defconfig | 1 + configs/chromebook_coral_defconfig | 1 + configs/chromebook_kevin_defconfig | 1 + configs/chromebook_samus_tpl_defconfig | 1 + configs/qemu-x86_64_defconfig | 6 ++- configs/qemu-x86_defconfig | 4 ++ configs/qemu_arm64_defconfig | 2 + configs/qemu_arm_defconfig | 2 + drivers/core/ofnode.c | 67 +++++++++++++++++++++----- drivers/misc/qfw_acpi.c | 37 +++++++++++++- drivers/misc/qfw_smbios.c | 45 ++++++++--------- drivers/pci/pci_rom.c | 3 ++ drivers/serial/ns16550.c | 2 +- drivers/video/bochs.c | 1 + drivers/video/video-uclass.c | 1 + dts/Kconfig | 1 - include/abuf.h | 25 ++++++++++ include/cpu.h | 14 ++++++ include/dm/ofnode.h | 35 ++++++++++++-- include/image.h | 8 +-- include/video.h | 2 + lib/Kconfig | 1 + lib/Makefile | 5 ++ lib/abuf.c | 12 +++++ lib/efi_loader/efi_acpi.c | 10 ++++ test/common/Makefile | 4 ++ test/dm/core.c | 20 ++++++++ test/dm/ofnode.c | 19 ++++++++ test/lib/abuf.c | 26 +++++++++- test/py/tests/test_upl.py | 2 +- tools/fit_image.c | 2 +- tools/image-host.c | 4 +- tools/mkimage.h | 2 +- 45 files changed, 369 insertions(+), 109 deletions(-)
Signature · 1 line
2.34.1
PATCH v3 1/30 bloblist: Make BLOBLIST_ALLOC the default
We want to encourage people to use an allocated bloblist since it is more flexible than a fixed one. Make this the default, being sure not to change existing users.
The unit tests require BLOBLIST_FIXED so add a dependency in the Makefile to avoid build errors.
All sandbox builds require BLOBLIST_FIXED so make that the default for sandbox.
---
Changes in v3:
- Use 'default' instead of reordering items
- Update the commit message
common/Kconfig | 2 ++ configs/chromebook_bob_defconfig | 1 + configs/chromebook_coral_defconfig | 1 + configs/chromebook_kevin_defconfig | 1 + configs/chromebook_samus_tpl_defconfig | 1 + configs/qemu-x86_64_defconfig | 1 + test/common/Makefile | 4 ++++ 7 files changed, 11 insertions(+)
common/Kconfig +2 -0
@@ -1047,6 +1047,8 @@ if BLOBLIST choice prompt "Bloblist location" + default BLOBLIST_FIXED if SANDBOX + default BLOBLIST_ALLOC help Select the location of the bloblist, via various means.
configs/chromebook_bob_defconfig +1 -0
@@ -36,6 +36,7 @@ CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-gru-bob.dtb" CONFIG_DISPLAY_BOARDINFO_LATE=y CONFIG_BOARD_EARLY_INIT_R=y CONFIG_BLOBLIST=y +CONFIG_BLOBLIST_FIXED=y CONFIG_BLOBLIST_ADDR=0x100000 CONFIG_BLOBLIST_SIZE=0x1000 CONFIG_SPL_MAX_SIZE=0x1e000
configs/chromebook_coral_defconfig +1 -0
@@ -44,6 +44,7 @@ CONFIG_LOGF_FUNC=y CONFIG_DISPLAY_BOARDINFO_LATE=y CONFIG_BLOBLIST=y # CONFIG_TPL_BLOBLIST is not set +CONFIG_BLOBLIST_FIXED=y CONFIG_BLOBLIST_ADDR=0x100000 CONFIG_BLOBLIST_SIZE=0x30000 CONFIG_SPL_NO_BSS_LIMIT=y
configs/chromebook_kevin_defconfig +1 -0
@@ -37,6 +37,7 @@ CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-gru-kevin.dtb" CONFIG_DISPLAY_BOARDINFO_LATE=y CONFIG_BOARD_EARLY_INIT_R=y CONFIG_BLOBLIST=y +CONFIG_BLOBLIST_FIXED=y CONFIG_BLOBLIST_ADDR=0x100000 CONFIG_BLOBLIST_SIZE=0x1000 CONFIG_SPL_MAX_SIZE=0x1e000
configs/chromebook_samus_tpl_defconfig +1 -0
@@ -34,6 +34,7 @@ CONFIG_SYS_CONSOLE_INFO_QUIET=y CONFIG_DISPLAY_BOARDINFO_LATE=y CONFIG_MISC_INIT_R=y CONFIG_BLOBLIST=y +CONFIG_BLOBLIST_FIXED=y CONFIG_BLOBLIST_ADDR=0xff7c0000 CONFIG_BLOBLIST_SIZE=0x1000 CONFIG_SPL_NO_BSS_LIMIT=y
configs/qemu-x86_64_defconfig +1 -0
@@ -34,6 +34,7 @@ CONFIG_SPL_LOG=y CONFIG_DISPLAY_BOARDINFO_LATE=y CONFIG_PCI_INIT_R=y CONFIG_BLOBLIST=y +CONFIG_BLOBLIST_FIXED=y CONFIG_BLOBLIST_ADDR=0x10000 CONFIG_SPL_NO_BSS_LIMIT=y CONFIG_SPL_BOARD_INIT=y
test/common/Makefile +4 -0
@@ -1,9 +1,13 @@ # SPDX-License-Identifier: GPL-2.0+ obj-y += cmd_ut_common.o obj-$(CONFIG_AUTOBOOT) += test_autoboot.o + ifneq ($(CONFIG_$(XPL_)BLOBLIST),) +ifdef CONFIG_BLOBLIST_FIXED obj-$(CONFIG_$(XPL_)CMDLINE) += bloblist.o endif +endif + obj-$(CONFIG_CYCLIC) += cyclic.o obj-$(CONFIG_EVENT_DYNAMIC) += event.o obj-y += cread.o
Signature · 1 line
2.34.1
PATCH v3 2/30 abuf: Provide a way to get the buffer address
In reply to Simon GlassIn many cases it is useful to get the address of a buffer, e.g. when booting from it. Add a function to handle this.
---
(no changes since v1)
include/abuf.h | 8 ++++++++ lib/abuf.c | 6 ++++++ test/lib/abuf.c | 4 +++- 3 files changed, 17 insertions(+), 1 deletion(-)
include/abuf.h +8 -0
@@ -42,6 +42,14 @@ static inline size_t abuf_size(const struct abuf *abuf)return abuf->size; } +/** +* abuf_addr() - Get the address of a buffer's data +* +* @abuf: Buffer to check +* Return: address of buffer +*/ +ulong abuf_addr (const struct abuf *abuf); +/** * abuf_set() - set the (unallocated) data in a buffer *
lib/abuf.c +6 -0
@@ -26,6 +26,12 @@ void abuf_map_sysmem(struct abuf *abuf, ulong addr, size_t size) {abuf_set (abuf,map_sysmem (addr, size), size); } + +ulong abuf_addr (const struct abuf *abuf) +{ +return map_to_sysmem (abuf->data); +} +#else /* copied from lib/string.c for convenience */ static char *memdup (const void *src,size_t len)
test/lib/abuf.c +3 -1
@@ -46,7 +46,7 @@ static int lib_test_abuf_set(struct unit_test_state *uts) }LIB_TEST (lib_test_abuf_set,0 ); -/* Test abuf_map_sysmem() */ +/* Test abuf_map_sysmem() and abuf_addr() */ static int lib_test_abuf_map_sysmem (struct unit_test_state *uts) {struct abuf buf;
@@ -60,6 +60,8 @@ static int lib_test_abuf_map_sysmem(struct unit_test_state *uts)ut_asserteq (TEST_DATA_LEN , buf.size);ut_asserteq (false, buf.alloced); +ut_asserteq (addr,abuf_addr (&buf)); +return 0 ; }LIB_TEST (lib_test_abuf_map_sysmem,0 );
Signature · 1 line
2.34.1
PATCH v3 3/30 abuf: Allow use in host tools
In reply to Simon GlassSome header files included on the host are moving to use abuf, so adjust the header-inclusion to bring in size_t correctly.
---
(no changes since v1)
include/abuf.h | 4 ++++ 1 file changed, 4 insertions(+)
include/abuf.h +4 -0
@@ -9,7 +9,11 @@#ifndef __ABUF_H#define __ABUF_H +#ifdef USE_HOSTCC +#include <sys/types.h> +#else #include <linux/types.h> +#endif /** * struct abuf - buffer that can be allocated and freed
Signature · 1 line
2.34.1
PATCH v3 4/30 abuf: Provide a constant buffer
In reply to Simon GlassAdd a new initialiser which can accept a constant pointer.
---
(no changes since v1)
include/abuf.h | 13 +++++++++++++ lib/abuf.c | 6 ++++++ test/lib/abuf.c | 22 ++++++++++++++++++++++ 3 files changed, 41 insertions(+)
include/abuf.h +13 -0
@@ -157,6 +157,19 @@ void abuf_init_move(struct abuf *abuf, void *data, size_t size);*/ void abuf_init_set (struct abuf *abuf,void *data,size_t size); +/** +* abuf_init_const() - Set up a new const abuf +* +* Inits a new abuf and sets up its (unallocated) data. The only current +* difference between this and abuf_init_set() is the 'data' parameter is a +* const pointer. At some point a flag could be used to indicate const-ness. +* +* @abuf: abuf to set up +* @data: New contents of abuf +* @size: New size of abuf +*/ +void abuf_init_const (struct abuf *abuf,const void *data,size_t size); +/** * abuf_uninit() - Free any memory used by an abuf *
lib/abuf.c +6 -0
@@ -119,6 +119,12 @@ void abuf_init_set(struct abuf *abuf, void *data, size_t size)abuf_set (abuf, data, size); } +void abuf_init_const (struct abuf *abuf,const void *data,size_t size) +{ +/* for now there is no flag indicating that the abuf data is constant */ +abuf_init_set (abuf, (void *)data, size); +} +void abuf_init_move (struct abuf *abuf,void *data,size_t size) {abuf_init_set (abuf, data, size);
test/lib/abuf.c +22 -0
@@ -46,6 +46,28 @@ static int lib_test_abuf_set(struct unit_test_state *uts) }LIB_TEST (lib_test_abuf_set,0 ); +/* Test abuf_init_const() */ +static int lib_test_abuf_init_const (struct unit_test_state *uts) +{ +struct abuf buf; +ulong start; +void *ptr; + + start =ut_check_free (); + + ptr =map_sysmem (0x100 ,0 ); + +abuf_init_const (&buf, ptr,10 ); +ut_asserteq_ptr (ptr, buf.data); +ut_asserteq (10 , buf.size); + +/* No memory should have been allocated */ +ut_assertok (ut_check_delta (start)); + +return 0 ; +} +LIB_TEST (lib_test_abuf_init_const,0 ); +/* Test abuf_map_sysmem() and abuf_addr() */ static int lib_test_abuf_map_sysmem (struct unit_test_state *uts) {
Signature · 1 line
2.34.1
PATCH v3 5/30 cpu: Provide a way to get the physical-address size
In reply to Simon GlassThis concept exists on x86. Declare it as a generic function so that the value can be accessed by UPL.
---
(no changes since v1)
arch/x86/include/asm/cpu.h | 9 --------- arch/x86/lib/bdinfo.c | 1 + include/cpu.h | 14 ++++++++++++++ 3 files changed, 15 insertions(+), 9 deletions(-)
arch/x86/include/asm/cpu.h +0 -9
@@ -284,15 +284,6 @@ u32 cpu_get_family_model(void);*/ u32 cpu_get_stepping (void ); -/** -* cpu_phys_address_size() - Get the physical address size in bits -* -* This is 32 for older CPUs but newer ones may support 36. -* -* Return: address size (typically 32 or 36) -*/ -int cpu_phys_address_size (void ); -void board_final_init (void );void board_final_cleanup (void );
arch/x86/lib/bdinfo.c +1 -0
@@ -5,6 +5,7 @@* Copyright 2021 Google LLC */ +#include <cpu.h> #include <efi.h> #include <init.h> #include <asm/cpu.h>
include/cpu.h +14 -0
@@ -179,4 +179,18 @@ struct udevice *cpu_get_current_dev(void);* @return 0 if OK, -ve on error */ int cpu_release_core (const struct udevice *dev,phys_addr_t addr); + +/** +* cpu_phys_address_size() - Get the physical-address size for the CPU +* +* x86 CPUs have a setting which indicates how many bits of address space are +* available on the CPU. This is 32 for older CPUs but newer ones may support 36 +* or more. +* +* For non-x86 CPUs the result may simply be 32 for 32-bit CPUS or 64 for 64-bit +* +* Return: address size (typically 32 or 36) +*/ +int cpu_phys_address_size (void ); +#endif
Signature · 1 line
2.34.1
PATCH v3 6/30 serial: Support info() method in ns16550 xPL with UPL
In reply to Simon GlassUPL needs to pass the serial details onto the next stage, so adjust the condition to support this.
---
(no changes since v1)
drivers/serial/ns16550.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/serial/ns16550.c +1 -1
@@ -473,7 +473,7 @@ static int ns16550_serial_getinfo(struct udevice *dev,struct ns16550_plat *plat = com_port->plat;/* save code size */ -if (!not_xpl ()) +if (!not_xpl () && !CONFIG_IS_ENABLED (UPL_OUT ))return -ENOSYS ; info->type =SERIAL_CHIP_16550_COMPATIBLE ;
Signature · 1 line
2.34.1
PATCH v3 7/30 mkimage: Update map_to_sysmem() to match its prototype
In reply to Simon GlassUpdate the version of this function in mkimage so that it uses a const pointer, as is done in the mapmem.h header file.
---
(no changes since v1)
tools/mkimage.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/mkimage.h +1 -1
@@ -37,7 +37,7 @@ static inline void *map_sysmem(ulong paddr, unsigned long len)return (void *)(uintptr_t )paddr; } -static inline ulong map_to_sysmem (void *ptr) +static inline ulong map_to_sysmem (const void *ptr) {return (ulong )(uintptr_t )ptr; }
Signature · 1 line
2.34.1
PATCH v3 8/30 x86: Enable meminfo command
In reply to Simon GlassEnable this command for x86 boards as it is quite useful for seeing where memory is.
---
(no changes since v2)
Changes in v2:
- Fix 'Emable' typo
- Enable the command in cmd/Kconfig instead
cmd/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
cmd/Kconfig +2 -2
@@ -905,14 +905,14 @@ config MD5SUM_VERIFY config CMD_MEMINFO bool "meminfo" - default y if SANDBOX + default y if SANDBOX || X86 help Display memory information. config CMD_MEMINFO_MAP bool "- with memory map" depends on CMD_MEMINFO - default y if SANDBOX + default y if SANDBOX || X86 help Shows a memory map, in addition to just the DRAM size. This allows seeing where U-Boot's memory area is, at the top of DRAM, as well as
Signature · 1 line
2.34.1
PATCH v3 9/30 x86: Show the timestamp counter with bdinfo
In reply to Simon GlassAdd a line to the 'bdinfo' command which shows the current value of the TSC.
---
(no changes since v1)
arch/x86/lib/bdinfo.c | 2 ++ 1 file changed, 2 insertions(+)
arch/x86/lib/bdinfo.c +2 -0
@@ -33,6 +33,8 @@ void arch_print_bdinfo(void)bdinfo_print_num_l (" high start" , gd->arch.table_start_high);bdinfo_print_num_l (" high end" , gd->arch.table_end_high); +bdinfo_print_num_ll ("tsc" ,rdtsc ()); +if (IS_ENABLED (CONFIG_EFI_STUB ))efi_show_bdinfo (); }
Signature · 1 line
2.34.1
PATCH v3 10/30 ofnode: Use 4K for a default tree-size
In reply to Simon GlassAt some point it would be nice to have the ofnode API automatically expand the tree as required, to accommodate new nodes. For now, expand the default size so that UPL can be supported.
---
(no changes since v1)
drivers/core/ofnode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/core/ofnode.c +1 -1
@@ -118,7 +118,7 @@ int oftree_new(oftree *treep)return log_msg_ret ("liv" , ret); tree =oftree_from_np (root); }else { -const int size =1024 ; +const int size =4096 ;void *fdt; ret =check_tree_count ();
Signature · 1 line
2.34.1
PATCH v3 11/30 ofnode: Indicate when out of space in a few places
In reply to Simon GlassUpdate ofnode_add_subnode() and ofnode_add_prop() to return a suitable error when space is exhausted in the FDT. This makes it easier to see what is going wrong.
---
(no changes since v1)
drivers/core/ofnode.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-)
drivers/core/ofnode.c +9 -4
@@ -1607,9 +1607,10 @@ ofnode ofnode_by_prop_value(ofnode from, const char *propname,int ofnode_write_prop (ofnode node,const char *propname,const void *value,int len,bool copy) { +int ret; +if (of_live_active ()) {void *newval; -int ret;if (copy) { newval =malloc (len);
@@ -1623,8 +1624,12 @@ int ofnode_write_prop(ofnode node, const char *propname, const void *value,free (newval);return ret; }else { -return fdt_setprop (ofnode_to_fdt (node),ofnode_to_offset (node), - propname, value, len); + ret =fdt_setprop (ofnode_to_fdt (node),ofnode_to_offset (node), + propname, value, len); +if (ret) +return ret == -FDT_ERR_NOSPACE ? -ENOSPC : -EINVAL ; + +return 0 ; } }
@@ -1897,7 +1902,7 @@ int ofnode_add_subnode(ofnode node, const char *name, ofnode *subnodep) ret = -EEXIST ; }if (offset <0 ) -return -EINVAL ; +return offset == -FDT_ERR_NOSPACE ? -ENOSPC : -EINVAL ; subnode =noffset_to_ofnode (node, offset); }
Signature · 1 line
2.34.1
PATCH v3 12/30 ofnode: Update of_add_subnode() to indicate name is alloced
In reply to Simon GlassThis function allocates memory for the node name, so mention this in the function comment.
---
(no changes since v1)
include/dm/ofnode.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/dm/ofnode.h +1 -1
@@ -1702,7 +1702,7 @@ static inline int ofnode_read_bootscript_flash(u64 *bootscr_flash_offset,* of_add_subnode() - add a new subnode to a node * * @parent: parent node to add to -* @name: name of subnode +* @name: name of subnode (allocated by this function) * @nodep: returns pointer to new subnode (valid if the function returns 0 * or -EEXIST) * Returns 0 if OK, -EEXIST if already exists, -ENOMEM if out of memory, other
Signature · 1 line
2.34.1
PATCH v3 13/30 boot: Rename fit_image_get_data()
In reply to Simon GlassThis function can only be used with FITs that use embedded data. Rename it so this is clear.
---
(no changes since v1)
arch/arm/cpu/armv8/sec_firmware.c | 4 ++-- arch/arm/mach-k3/r5/sysfw-loader.c | 2 +- arch/x86/lib/bootm.c | 6 +++--- boot/image-fit.c | 10 +++++----- common/spl/spl_fit.c | 2 +- common/splash_source.c | 4 +++- common/update.c | 2 +- include/image.h | 4 ++-- tools/image-host.c | 4 ++-- 9 files changed, 20 insertions(+), 18 deletions(-)
arch/arm/cpu/armv8/sec_firmware.c +2 -2
@@ -128,8 +128,8 @@ static int sec_firmware_check_copy_loadable(const void *sec_firmware_img,return -EINVAL ; } -if (fit_image_get_data (sec_firmware_img, ld_node_off, - &data, &size)) { +if (fit_image_get_emb_data (sec_firmware_img, ld_node_off, + &data, &size)) {printf ("SEC Loadable: Can't get subimage data/size" );return -ENOENT ; }
arch/arm/mach-k3/r5/sysfw-loader.c +1 -1
@@ -115,7 +115,7 @@ static int fit_get_data_by_name(const void *fit, int images, const char *name,if (node_offset <0 )return -ENOENT ; -return fit_image_get_data (fit, node_offset, addr, size); +return fit_image_get_emb_data (fit, node_offset, addr, size); } static void k3_start_system_controller(int rproc_id, bool rproc_loaded,
arch/x86/lib/bootm.c +3 -3
@@ -106,9 +106,9 @@ static int boot_prep_linux(struct bootm_headers *images) is_zimage =1 ;#if defined(CONFIG_FIT ) } else if (images->fit_uname_os && is_zimage) { - ret =fit_image_get_data (images->fit_hdr_os, - images->fit_noffset_os, - (const void **)&data, &len); + ret =fit_image_get_emb_data (images->fit_hdr_os, + images->fit_noffset_os, + (const void **)&data, &len);if (ret) {puts ("Can't get image data/size!\n" ); goto error;
boot/image-fit.c +5 -5
@@ -902,13 +902,13 @@ int fit_image_get_entry(const void *fit, int noffset, ulong *entry) }/** -* fit_image_get_data - get data property and its size for a given component image node +* fit_image_get_emb_data - get data property and its size for a given component image node * @fit: pointer to the FIT format image header * @noffset: component image node offset * @data: double pointer to void, will hold data property's data address * @size: pointer to size_t, will hold data property's data size * -* fit_image_get_data() finds data property in a given component image node. +* fit_image_get_emb_data() finds data property in a given component image node. * If the property is found its data start address and size are returned to * the caller. *
@@ -916,8 +916,8 @@ int fit_image_get_entry(const void *fit, int noffset, ulong *entry)* 0, on success * -1, on failure */ -int fit_image_get_data (const void *fit,int noffset, -const void **data,size_t *size) +int fit_image_get_emb_data (const void *fit,int noffset,const void **data, +size_t *size) {int len;
@@ -1074,7 +1074,7 @@ int fit_image_get_data_and_size(const void *fit, int noffset, *size = len; } }else { - ret =fit_image_get_data (fit, noffset, data, size); + ret =fit_image_get_emb_data (fit, noffset, data, size); }return ret;
common/spl/spl_fit.c +1 -1
@@ -289,7 +289,7 @@ static int load_simple_fit(struct spl_load_info *info, ulong fit_offset, src = src_ptr + overhead; }else {/* Embedded data */ -if (fit_image_get_data (fit, node, &data, &length)) { +if (fit_image_get_emb_data (fit, node, &data, &length)) {puts ("Cannot get image data/size\n" );return -ENOENT ; }
common/splash_source.c +3 -1
@@ -396,7 +396,9 @@ static int splash_load_fit(struct splash_location *location, u32 bmp_load_addr)/* Extract the splash data from FIT */ /* 1. Test if splash is in FIT internal data. */ -if (!fit_image_get_data (fit_header, node_offset, &internal_splash_data, &internal_splash_size)) +if (!fit_image_get_emb_data (fit_header, node_offset, + &internal_splash_data, + &internal_splash_size))memmove ((void *)(uintptr_t )bmp_load_addr, internal_splash_data, internal_splash_size);/* 2. Test if splash is in FIT external data with fixed position. */ else if (!fit_image_get_data_position (fit_header, node_offset, &external_splash_addr))
common/update.c +1 -1
@@ -200,7 +200,7 @@ static int update_fit_getparams(const void *fit, int noffset, ulong *addr, {const void *data; -if (fit_image_get_data (fit, noffset, &data, (size_t *)size)) +if (fit_image_get_emb_data (fit, noffset, &data, (size_t *)size))return 1 ;if (fit_image_get_load (fit, noffset, (ulong *)fladdr))
include/image.h +2 -2
@@ -1196,8 +1196,8 @@ int fit_image_get_type(const void *fit, int noffset, uint8_t *type);int fit_image_get_comp (const void *fit,int noffset,uint8_t *comp);int fit_image_get_load (const void *fit,int noffset,ulong *load);int fit_image_get_entry (const void *fit,int noffset,ulong *entry); -int fit_image_get_data (const void *fit,int noffset, -const void **data,size_t *size); +int fit_image_get_emb_data (const void *fit,int noffset,const void **data, +size_t *size);int fit_image_get_data_offset (const void *fit,int noffset,int *data_offset);int fit_image_get_data_position (const void *fit,int noffset,int *data_position);
tools/image-host.c +2 -2
@@ -574,7 +574,7 @@ int fit_image_cipher_data(const char *keydir, void *keydest, }/* Get image data and data length */ -if (fit_image_get_data (fit, image_noffset, &data, &size)) { +if (fit_image_get_emb_data (fit, image_noffset, &data, &size)) {fprintf (stderr,"Can't get image data/size\n" );return -1 ; }
@@ -654,7 +654,7 @@ int fit_image_add_verification_data(const char *keydir, const char *keyfile,int noffset;/* Get image data and data length */ -if (fit_image_get_data (fit, image_noffset, &data, &size)) { +if (fit_image_get_emb_data (fit, image_noffset, &data, &size)) {fprintf (stderr,"Can't get image data/size\n" );return -1 ; }
Signature · 1 line
2.34.1
PATCH v3 14/30 boot: Rename fit_image_get_data_and_size()
In reply to Simon GlassThis function is really just getting the data. The size comes along for the ride. In fact this function is only reliable way to obtain the data for an image in a FIT, since the FIT may use external data.
Rename it to fit_image_get_data()
---
(no changes since v1)
boot/image-board.c | 4 ++-- boot/image-fit.c | 20 +++++++++----------- cmd/ximg.c | 3 +-- include/image.h | 4 ++-- tools/fit_image.c | 2 +- 5 files changed, 15 insertions(+), 18 deletions(-)
boot/image-board.c +2 -2
@@ -1087,8 +1087,8 @@ fallback: }/* get script subimage data address and length */ -if (fit_image_get_data_and_size (fit_hdr, noffset, - &fit_data, &fit_len)) { +if (fit_image_get_data (fit_hdr, noffset, &fit_data, + &fit_len)) {puts ("Could not find script subimage data\n" );return 1 ; }
boot/image-fit.c +9 -11
@@ -509,7 +509,7 @@ void fit_image_print(const void *fit, int image_noffset, const char *p)fit_image_get_comp (fit, image_noffset, &comp);printf ("%s Compression: %s\n" , p,genimg_get_comp_name (comp)); - ret =fit_image_get_data_and_size (fit, image_noffset, &data, &size); + ret =fit_image_get_data (fit, image_noffset, &data, &size);if (!tools_build ()) {printf ("%s Data Start: " , p);
@@ -1031,14 +1031,14 @@ int fit_image_get_data_size_unciphered(const void *fit, int noffset, }/** -* fit_image_get_data_and_size - get data and its size including +* fit_image_get_data - get data and its size including * both embedded and external data * @fit: pointer to the FIT format image header * @noffset: component image node offset * @data: double pointer to void, will hold data property's data address * @size: pointer to size_t, will hold data property's data size * -* fit_image_get_data_and_size() finds data and its size including +* fit_image_get_data() finds data and its size including * both embedded and external data. If the property is found * its data start address and size are returned to the caller. *
@@ -1046,8 +1046,8 @@ int fit_image_get_data_size_unciphered(const void *fit, int noffset,* 0, on success * otherwise, on failure */ -int fit_image_get_data_and_size (const void *fit,int noffset, -const void **data,size_t *size) +int fit_image_get_data (const void *fit,int noffset,const void **data, +size_t *size) {bool external_data = false;int offset;
@@ -1432,7 +1432,7 @@ int fit_image_verify(const void *fit, int image_noffset) goto err; }/* Get image data and data length */ -if (fit_image_get_data_and_size (fit, image_noffset, &data, &size)) { +if (fit_image_get_data (fit, image_noffset, &data, &size)) { err_msg ="Can't get image data/size" ; goto err; }
@@ -1781,8 +1781,7 @@ int fit_conf_find_compat(const void *fit, const void *fdt) }/* search in this config's kernel FDT */ -if (fit_image_get_data_and_size (fit, kfdt_noffset, - &fdt, &sz)) { +if (fit_image_get_data (fit, kfdt_noffset, &fdt, &sz)) {debug ("Failed to get fdt \"%s\".\n" , kfdt_name);continue ; }
@@ -1941,7 +1940,7 @@ static int fit_get_data_tail(const void *fit, int noffset,if (!fit_image_verify (fit, noffset))return -EINVAL ; -if (fit_image_get_data_and_size (fit, noffset, data, size)) +if (fit_image_get_data (fit, noffset, data, size))return -ENOENT ;if (!fit_get_desc (fit, noffset, &desc))
@@ -2198,8 +2197,7 @@ int fit_image_load(struct bootm_headers *images, ulong addr,bootstage_mark (bootstage_id +BOOTSTAGE_SUB_CHECK_ALL_OK );/* get image data address and length */ -if (fit_image_get_data_and_size (fit, noffset, - (const void **)&buf, &size)) { +if (fit_image_get_data (fit, noffset, (const void **)&buf, &size)) {printf ("Could not find %s subimage data!\n" , prop_name);bootstage_error (bootstage_id +BOOTSTAGE_SUB_GET_DATA );return -ENOENT ;
cmd/ximg.c +1 -2
@@ -161,8 +161,7 @@ do_imgextract(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) }/* get subimage/external data address and length */ -if (fit_image_get_data_and_size (fit_hdr, noffset, - &fit_data, &fit_len)) { +if (fit_image_get_data (fit_hdr, noffset, &fit_data, &fit_len)) {puts ("Could not find script subimage data\n" );return 1 ; }
include/image.h +2 -2
@@ -1204,8 +1204,8 @@ int fit_image_get_data_position(const void *fit, int noffset,int fit_image_get_data_size (const void *fit,int noffset,int *data_size);int fit_image_get_data_size_unciphered (const void *fit,int noffset,size_t *data_size); -int fit_image_get_data_and_size (const void *fit,int noffset, -const void **data,size_t *size); +int fit_image_get_data (const void *fit,int noffset,const void **data, +size_t *size);/** * fit_image_get_phase() - Get the phase from a FIT image
tools/fit_image.c +1 -1
@@ -876,7 +876,7 @@ static int fit_image_extract(int ret;/* get the data address and size of component at offset "image_noffset" */ - ret =fit_image_get_data_and_size (fit, image_noffset, &file_data, &file_size); + ret =fit_image_get_data (fit, image_noffset, &file_data, &file_size);if (ret) {fprintf (stderr,"Could not get component information\n" );return ret;
Signature · 1 line
2.34.1
PATCH v3 15/30 boot: Use fit_image_get_data() to get data
In reply to Simon GlassUse this function instead of fit_image_get_emb_data() data, since it works will FITs that use external data.
---
(no changes since v2)
Changes in v2:
- Fix unbalanced {}
arch/arm/cpu/armv8/sec_firmware.c | 4 ++-- arch/arm/mach-k3/r5/sysfw-loader.c | 2 +- arch/x86/lib/bootm.c | 6 +++--- common/splash_source.c | 19 ++++--------------- common/update.c | 2 +- 5 files changed, 11 insertions(+), 22 deletions(-)
arch/arm/cpu/armv8/sec_firmware.c +2 -2
@@ -128,8 +128,8 @@ static int sec_firmware_check_copy_loadable(const void *sec_firmware_img,return -EINVAL ; } -if (fit_image_get_emb_data (sec_firmware_img, ld_node_off, - &data, &size)) { +if (fit_image_get_data (sec_firmware_img, ld_node_off, + &data, &size)) {printf ("SEC Loadable: Can't get subimage data/size" );return -ENOENT ; }
arch/arm/mach-k3/r5/sysfw-loader.c +1 -1
@@ -115,7 +115,7 @@ static int fit_get_data_by_name(const void *fit, int images, const char *name,if (node_offset <0 )return -ENOENT ; -return fit_image_get_emb_data (fit, node_offset, addr, size); +return fit_image_get_data (fit, node_offset, addr, size); } static void k3_start_system_controller(int rproc_id, bool rproc_loaded,
arch/x86/lib/bootm.c +3 -3
@@ -106,9 +106,9 @@ static int boot_prep_linux(struct bootm_headers *images) is_zimage =1 ;#if defined(CONFIG_FIT ) } else if (images->fit_uname_os && is_zimage) { - ret =fit_image_get_emb_data (images->fit_hdr_os, - images->fit_noffset_os, - (const void **)&data, &len); + ret =fit_image_get_data (images->fit_hdr_os, + images->fit_noffset_os, + (const void **)&data, &len);if (ret) {puts ("Can't get image data/size!\n" ); goto error;
common/splash_source.c +4 -15
@@ -395,21 +395,10 @@ static int splash_load_fit(struct splash_location *location, u32 bmp_load_addr) }/* Extract the splash data from FIT */ -/* 1. Test if splash is in FIT internal data. */ -if (!fit_image_get_emb_data (fit_header, node_offset, - &internal_splash_data, - &internal_splash_size)) -memmove ((void *)(uintptr_t )bmp_load_addr, internal_splash_data, internal_splash_size); -/* 2. Test if splash is in FIT external data with fixed position. */ -else if (!fit_image_get_data_position (fit_header, node_offset, &external_splash_addr)) - is_splash_external = true; -/* 3. Test if splash is in FIT external data with offset. */ -else if (!fit_image_get_data_offset (fit_header, node_offset, &external_splash_addr)) { -/* Align data offset to 4-byte boundary */ - fit_size =ALIGN (fdt_totalsize (fit_header),4 ); -/* External splash offset means the offset by end of FIT header */ - external_splash_addr += location->offset + fit_size; - is_splash_external = true; +if (!fit_image_get_data (fit_header, node_offset, &internal_splash_data, + &internal_splash_size)) { +memmove ((void *)(uintptr_t )bmp_load_addr, internal_splash_data, + internal_splash_size); }else {printf ("Failed to get splash image from FIT\n" );return -ENODATA ;
common/update.c +1 -1
@@ -200,7 +200,7 @@ static int update_fit_getparams(const void *fit, int noffset, ulong *addr, {const void *data; -if (fit_image_get_emb_data (fit, noffset, &data, (size_t *)size)) +if (fit_image_get_data (fit, noffset, &data, (size_t *)size))return 1 ;if (fit_image_get_load (fit, noffset, (ulong *)fladdr))
Signature · 1 line
2.34.1
PATCH v3 16/30 test: Fix inpected typo in upl test
In reply to Simon GlassFix a typo in the test comment.
---
(no changes since v1)
test/py/tests/test_upl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
test/py/tests/test_upl.py +1 -1
@@ -17,7 +17,7 @@ def test_upl_handoff(u_boot_console): proper and runs a test to check that the parameters are correct. The entire FIT is loaded into memory in SPL (in upl_load_from_image()) so - that it can be inpected in upl_test_info_norun + that it can be inspected in upl_test_info_norun """ cons = u_boot_console ram = os.path.join(cons.config.build_dir, 'ram.bin')
Signature · 1 line
2.34.1
PATCH v3 17/30 emulation: fdt: Relax condition for OF_HAS_PRIOR_STAGE
In reply to Simon GlassQEMU always gets its devicetree from the OF_BOARD mechanism so we should not depend on !BLOBLIST here.
It's not clear why we need to have any relationship with BLOBLIST so let's remove the entire condition.
The logic of PRIOR_STAGE is quite a mess, unfortuantely. We should rely only standard passage to receive things from the prior stage. QEMU should implement standard passage to provide its devicetree to U-Boot However Linaro has blocked my patch to provide devicetree additions[1], so little breath should be held in respect of either change.
[1] https://lore.kernel.org/qemu-devel/[email protected]/
---
Changes in v3:
- Drop entire condition
dts/Kconfig | 1 - 1 file changed, 1 deletion(-)
dts/Kconfig +0 -1
@@ -191,7 +191,6 @@ config OF_BOARD config OF_HAS_PRIOR_STAGE bool - depends on !BLOBLIST help Indicates that a prior stage of the firmware (before U-Boot proper) makes use of device tree and this board normally boots with that prior
Signature · 1 line
2.34.1
Re: [PATCH v3 17/30] emulation: fdt: Relax condition for OF_HAS_PRIOR_STAGE
Quoted 5 lines · Simon Glass
QEMU always gets its devicetree from the
OF_BOARDmechanism so we should not depend on !BLOBLIST here.It's not clear why we need to have any relationship with BLOBLIST so let's remove the entire condition.
This is fine.
Quoted 7 lines
The logic of
PRIOR_STAGEis quite a mess, unfortuantely. We should rely only standard passage to receive things from the prior stage. QEMU should implement standard passage to provide its devicetree to U-Boot However Linaro has blocked my patch to provide devicetree additions[1], so little breath should be held in respect of either change.
Drop this portion.
Otherwise:
Signature · 1 line
Tom
PATCH v3 18/30 emulation: Use bloblist to hold tables
In reply to Simon GlassQEMU can have its own internal ACPI and SMBIOS tables. At present U-Boot copies out the SMBIOS tables but points directly to the ACPI ones.
The ACPI tables are not aligned on a 4KB boundary, which means that UPL cannot use them directly, since it uses a reserved-memory node for the tables and that it assumed (by EDK2) to be 4KB-aligned.
On x86, QEMU provides the tables in a mapped memory region and U-Boot makes use of these directly, thus making it difficult to use any common code.
Adjust the logic to fit within the existing table-generation code. Use a bloblist always and ensure that the ACPI tables is placed in an aligned region. Set a size of 8K for QEMU. This does not actually put all the tables in one place, for QEMU, since it currently adds a pointer to the tables in QFW.
On ARM, enable bloblist so that SMBIOS tables can be added to the bloblist.
---
Changes in v3:
- Reword commit message to clarify that the fault is with U-Boot
arch/x86/lib/tables.c | 2 +- configs/qemu-x86_64_defconfig | 1 - configs/qemu_arm64_defconfig | 2 ++ configs/qemu_arm_defconfig | 2 ++ drivers/misc/qfw_acpi.c | 37 ++++++++++++++++++++++++++-- drivers/misc/qfw_smbios.c | 45 ++++++++++++++++------------------- lib/Kconfig | 1 + lib/Makefile | 5 ++++ 8 files changed, 67 insertions(+), 28 deletions(-)
arch/x86/lib/tables.c +1 -1
@@ -61,7 +61,7 @@ static struct table_info table_list[] = { #ifdef CONFIG_GENERATE_ACPI_TABLE { "acpi", write_acpi_tables, BLOBLISTT_ACPI_TABLES, 0x10000, 0x1000}, #endif -#if defined(CONFIG_GENERATE_SMBIOS_TABLE) && !defined(CONFIG_QFW_SMBIOS) +#ifdef CONFIG_GENERATE_SMBIOS_TABLE { "smbios", write_smbios_table, BLOBLISTT_SMBIOS_TABLES, 0x1000, 0x100}, #endif };
configs/qemu-x86_64_defconfig +0 -1
@@ -33,7 +33,6 @@ CONFIG_LOGF_FUNC=y CONFIG_SPL_LOG=y CONFIG_DISPLAY_BOARDINFO_LATE=y CONFIG_PCI_INIT_R=y -CONFIG_BLOBLIST=y CONFIG_BLOBLIST_FIXED=y CONFIG_BLOBLIST_ADDR=0x10000 CONFIG_SPL_NO_BSS_LIMIT=y
configs/qemu_arm64_defconfig +2 -0
@@ -27,6 +27,8 @@ CONFIG_USE_PREBOOT=y # CONFIG_DISPLAY_CPUINFO is not set # CONFIG_DISPLAY_BOARDINFO is not set CONFIG_PCI_INIT_R=y +CONFIG_BLOBLIST=y +CONFIG_BLOBLIST_SIZE_RELOC=0x2000 CONFIG_CMD_SMBIOS=y CONFIG_CMD_BOOTZ=y CONFIG_CMD_BOOTEFI_SELFTEST=y
configs/qemu_arm_defconfig +2 -0
@@ -28,6 +28,8 @@ CONFIG_USE_PREBOOT=y # CONFIG_DISPLAY_CPUINFO is not set # CONFIG_DISPLAY_BOARDINFO is not set CONFIG_PCI_INIT_R=y +CONFIG_BLOBLIST=y +CONFIG_BLOBLIST_SIZE_RELOC=0x2000 CONFIG_CMD_BOOTEFI_SELFTEST=y CONFIG_CMD_NVEDIT_EFI=y CONFIG_CMD_DFU=y
drivers/misc/qfw_acpi.c +35 -2
@@ -7,6 +7,7 @@#define LOG_CATEGORY UCLASS_QFW#include <acpi/acpi_table.h> +#include <bloblist.h> #include <errno.h> #include <malloc.h> #include <mapmem.h>
@@ -160,6 +161,15 @@ ulong write_acpi_tables(ulong addr)struct bios_linker_entry *entry;uint32_t size;struct udevice *dev; +struct acpi_ctx *ctx; + + ctx =malloc (sizeof (*ctx)); +if (!ctx) { +printf ("error: out of memory for acpi ctx\n" ); +return addr; + } + +acpi_setup_ctx (ctx, addr); ret =qfw_get_dev (&dev);if (ret) {
@@ -257,6 +267,29 @@ ulong acpi_get_rsdp_addr(void)return file->addr; } +void acpi_write_rsdp (struct acpi_rsdp *rsdp,struct acpi_rsdt *rsdt, +struct acpi_xsdt *xsdt) +{ +memset (rsdp,0 ,sizeof (struct acpi_rsdp )); + +memcpy (rsdp->signature,RSDP_SIG ,8 ); +memcpy (rsdp->oem_id,OEM_ID ,6 ); + +if (rsdt) + rsdp->rsdt_address =nomap_to_sysmem (rsdt); + +if (xsdt) + rsdp->xsdt_address =nomap_to_sysmem (xsdt); + + rsdp->length =sizeof (struct acpi_rsdp ); + rsdp->revision =ACPI_RSDP_REV_ACPI_2_0 ; + +/* Calculate checksums */ + rsdp->checksum =table_compute_checksum (rsdp,20 ); + rsdp->ext_checksum =table_compute_checksum (rsdp, +sizeof (struct acpi_rsdp )); +} +#ifndef CONFIG_X86 static int evt_write_acpi_tables (void ) {
@@ -264,9 +297,9 @@ static int evt_write_acpi_tables(void)void *ptr;/* Reserve 64K for ACPI tables, aligned to a 4K boundary */ - ptr =memalign (SZ_4K ,SZ_64K ); + ptr =bloblist_add (BLOBLISTT_ACPI_TABLES ,SZ_64K ,12 );if (!ptr) -return -ENOMEM ; +return -ENOBUFS ; addr =map_to_sysmem (ptr);/* Generate ACPI tables */
drivers/misc/qfw_smbios.c +21 -24
96 lines not on this page · raw message
lib/Kconfig +1 -0
@@ -1058,6 +1058,7 @@ menu "System tables" config BLOBLIST_TABLES bool "Put tables in a bloblist" depends on BLOBLIST + default y if X86 default y if (ARM && EFI_LOADER && GENERATE_ACPI_TABLE) default n help
lib/Makefile +5 -0
@@ -41,7 +41,12 @@ obj-$(CONFIG_ERRNO_STR) += errno_str.o obj-$(CONFIG_FIT) += fdtdec_common.o obj-$(CONFIG_TEST_FDTDEC) += fdtdec_test.o obj-$(CONFIG_GZIP_COMPRESSED) += gzip.o + +# With QEMU the SMBIOS tables come from there, not from U-Boot +ifndef CONFIG_QFW_SMBIOS obj-$(CONFIG_GENERATE_SMBIOS_TABLE) += smbios.o +endif + obj-$(CONFIG_SMBIOS_PARSER) += smbios-parser.o obj-$(CONFIG_IMAGE_SPARSE) += image-sparse.o obj-y += initcall.o
Signature · 1 line
2.34.1
PATCH v3 19/30 x86: Create more space for SPL with qemu-x86_64
In reply to Simon GlassThe space here is quite tight and there is plenty of room in the ROM. Move SPL earlier to allow for expansion.
---
(no changes since v1)
configs/qemu-x86_64_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
configs/qemu-x86_64_defconfig +1 -1
@@ -7,7 +7,7 @@ CONFIG_MAX_CPUS=2 CONFIG_SPL_DM_SPI=y CONFIG_DEFAULT_DEVICE_TREE="qemu-x86_i440fx" CONFIG_SPL_SYS_MALLOC_F_LEN=0x2000 -CONFIG_SPL_TEXT_BASE=0xfffd4000 +CONFIG_SPL_TEXT_BASE=0xfffd0000 CONFIG_DEBUG_UART_BASE=0x3f8 CONFIG_DEBUG_UART_CLOCK=1843200 CONFIG_X86_RUN_64BIT=y
Signature · 1 line
2.34.1
PATCH v3 20/30 pci: video: Set up the pixel-format field
In reply to Simon GlassAdd this information to the handoff structure so that it is available to U-Boot proper. Update bochs and the video handoff.
---
(no changes since v1)
drivers/pci/pci_rom.c | 3 +++ drivers/video/bochs.c | 1 + drivers/video/video-uclass.c | 1 + include/video.h | 2 ++ 4 files changed, 7 insertions(+)
drivers/pci/pci_rom.c +3 -0
@@ -347,6 +347,7 @@ int vesa_setup_video_priv(struct vesa_mode_info *vesa, u64 fb,case 32 :case 24 : uc_priv->bpix =VIDEO_BPP32 ; + uc_priv->format =VIDEO_X8B8G8R8 ;break ;case 16 : uc_priv->bpix =VIDEO_BPP16 ;
@@ -392,6 +393,7 @@ int vesa_setup_video(struct udevice *dev, int (*int15_handler)(void)) uc_priv->ysize = ho->ysize; uc_priv->line_length = ho->line_length; uc_priv->bpix = ho->bpix; + uc_priv->format = ho->format; }else {bootstage_start (BOOTSTAGE_ID_ACCUM_LCD ,"vesa display" ); ret = dm_pci_run_vga_bios(dev, int15_handler,
@@ -438,6 +440,7 @@ int vesa_setup_video(struct udevice *dev, int (*int15_handler)(void)) ho->ysize = uc_priv->ysize; ho->line_length = uc_priv->line_length; ho->bpix = uc_priv->bpix; + ho->format = uc_priv->format; }return 0 ;
drivers/video/bochs.c +1 -0
@@ -64,6 +64,7 @@ static int bochs_init_fb(struct udevice *dev) uc_priv->xsize = xsize; uc_priv->ysize = ysize; uc_priv->bpix =VIDEO_BPP32 ; + uc_priv->format =VIDEO_X8B8G8R8 ;/* setup video mode */ bochs_write (mmio,INDEX_ENABLE ,0 );
drivers/video/video-uclass.c +1 -0
@@ -616,6 +616,7 @@ static int video_post_probe(struct udevice *dev) ho->ysize = priv->ysize; ho->line_length = priv->line_length; ho->bpix = priv->bpix; + ho->format = priv->format; }if (IS_ENABLED (CONFIG_VIDEO_COPY ) && plat->copy_base)
include/video.h +2 -0
@@ -161,6 +161,7 @@ struct video_ops {* set by the driver, but if not, the uclass will set it after * probing * @bpix: Encoded bits per pixel (enum video_log2_bpp) +* @format: Video format (enum video_format) */ struct video_handoff {u64 fb;
@@ -169,6 +170,7 @@ struct video_handoff {u16 ysize;u32 line_length;u8 bpix; +u8 format; };/** enum colour_idx - the 16 colors supported by consoles */
Signature · 1 line
2.34.1
PATCH v3 21/30 x86: Show an error if video fails
In reply to Simon GlassIf video is enabled we expect it to work. Avoid silent failure by adding a panic if things go wrong.
Expand the SPL malloc-area for qemu-x86_64 to avoid a panic.
---
(no changes since v1)
arch/x86/lib/spl.c | 9 +++++++-- configs/qemu-x86_64_defconfig | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-)
arch/x86/lib/spl.c +7 -2
@@ -300,9 +300,14 @@ void spl_board_init(void)if (CONFIG_IS_ENABLED (VIDEO )) {struct udevice *dev; +int ret;/* Set up PCI video in SPL if required */ -uclass_first_device_err (UCLASS_PCI , &dev); -uclass_first_device_err (UCLASS_VIDEO , &dev); + ret =uclass_first_device_err (UCLASS_PCI , &dev); +if (ret) +panic ("Failed to set up PCI" ); + ret =uclass_first_device_err (UCLASS_VIDEO , &dev); +if (ret) +panic ("Failed to set up video" ); } }
configs/qemu-x86_64_defconfig +1 -1
@@ -6,7 +6,7 @@ CONFIG_ENV_SIZE=0x40000 CONFIG_MAX_CPUS=2 CONFIG_SPL_DM_SPI=y CONFIG_DEFAULT_DEVICE_TREE="qemu-x86_i440fx" -CONFIG_SPL_SYS_MALLOC_F_LEN=0x2000 +CONFIG_SPL_SYS_MALLOC_F_LEN=0x3000 CONFIG_SPL_TEXT_BASE=0xfffd0000 CONFIG_DEBUG_UART_BASE=0x3f8 CONFIG_DEBUG_UART_CLOCK=1843200
Signature · 1 line
2.34.1
PATCH v3 22/30 x86: Support jumping to a UPL image
In reply to Simon GlassAdd a function to allow x86 boards to jump to a UPL images. Currently only 32-bit entry is supported.
---
(no changes since v1)
arch/x86/lib/bootm.c | 11 +++++++++++ 1 file changed, 11 insertions(+)
arch/x86/lib/bootm.c +11 -0
@@ -280,3 +280,14 @@ int do_bootm_linux(int flag, struct bootm_info *bmi)return boot_jump_linux (images); } + +int arch_upl_jump (ulong entry,const struct abuf *buf) +{ + typedef EFIAPI void (*h_func)(void *hoff); +h_func func; + + func = (h_func )(ulong )entry; +func (buf->data); + +return -EFAULT ; +}
Signature · 1 line
2.34.1
PATCH v3 23/30 x86: Enable UPL handoff for SPL
In reply to Simon GlassAdd the GD_FLG_UPL so that a UPL-handoff is created.
---
(no changes since v1)
arch/x86/lib/spl.c | 3 +++ 1 file changed, 3 insertions(+)
arch/x86/lib/spl.c +3 -0
@@ -298,6 +298,9 @@ void spl_board_init(void)if (IS_ENABLED (CONFIG_QEMU ))qemu_chipset_init (); +if (CONFIG_IS_ENABLED (UPL_OUT )) + gd->flags |=GD_FLG_UPL ; +if (CONFIG_IS_ENABLED (VIDEO )) {struct udevice *dev;int ret;
Signature · 1 line
2.34.1
PATCH v3 24/30 x86: Move tables to use SZ macros
In reply to Simon GlassUpdate the tables to use linux/sizes rather than open-coped values.
---
(no changes since v2)
Changes in v2:
- Add new patch to move x86 tables to use SZ macros
arch/x86/lib/tables.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
arch/x86/lib/tables.c +3 -2
@@ -16,6 +16,7 @@#include <asm/tables.h> #include <asm/coreboot_tables.h> #include <linux/log2.h> +#include <linux/sizes.h> DECLARE_GLOBAL_DATA_PTR ;
@@ -59,10 +60,10 @@ static struct table_info table_list[] = {* that the calculation of gd->table_end works properly */ #ifdef CONFIG_GENERATE_ACPI_TABLE - { "acpi", write_acpi_tables, BLOBLISTT_ACPI_TABLES, 0x10000, 0x1000}, + { "acpi", write_acpi_tables, BLOBLISTT_ACPI_TABLES, SZ_64K, SZ_4K}, #endif #ifdef CONFIG_GENERATE_SMBIOS_TABLE - { "smbios", write_smbios_table, BLOBLISTT_SMBIOS_TABLES, 0x1000, 0x100}, + { "smbios", write_smbios_table, BLOBLISTT_SMBIOS_TABLES, SZ_4K, SZ_256}, #endif };
Signature · 1 line
2.34.1
PATCH v3 25/30 x86: Align the SMBIOS table to a 4K boundary
In reply to Simon GlassThis isn't strictly needed, but with UPL we use the reserved-memory nodes to indicate where the SMBIOS table is. Tianocore requires 4KB alignment on these regions, so it is easier to adjust the alignment to match.
---
(no changes since v2)
Changes in v2:
- Use 4K instead of 4KB
arch/x86/lib/tables.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
arch/x86/lib/tables.c +5 -1
@@ -63,7 +63,11 @@ static struct table_info table_list[] = { { "acpi", write_acpi_tables, BLOBLISTT_ACPI_TABLES, SZ_64K, SZ_4K}, #endif #ifdef CONFIG_GENERATE_SMBIOS_TABLE - { "smbios", write_smbios_table, BLOBLISTT_SMBIOS_TABLES, SZ_4K, SZ_256}, + /* + * align this to a 4K boundary, since UPL adds a reserved-memory node + * for it + */ + { "smbios", write_smbios_table, BLOBLISTT_SMBIOS_TABLES, SZ_4K, SZ_4K}, #endif };
Signature · 1 line
2.34.1
PATCH v3 26/30 efi_loader: Avoid mapping the ACPI tables twice
In reply to Simon GlassThe add_u_boot_and_runtime() function paints with a broad brush, considering all of the memory from the top of U-Boot stack to gd->ram_top as EFI_RUNTIME_SERVICES_CODE
This is fine, but we need to make sure we don't add a separate entry for any ACPI tables in this region (which happens when bloblist is used for tables). Otherwise the memory map looks strange and we get a test failure on qemu-x86 (only) for the 'virtual address map' test.
Good map:
Type Start End Attributes
================ ================ ================ ==========
CONVENTIONAL 0000000000000000-00000000000a0000 WB RESERVED 00000000000a0000-00000000000f0000 WB RUNTIME DATA 00000000000f0000-00000000000f2000 WB|RT RESERVED 00000000000f2000-0000000000100000 WB CONVENTIONAL 0000000000100000-0000000005cc7000 WB BOOT DATA 0000000005cc7000-0000000005ccc000 WB RUNTIME DATA 0000000005ccc000-0000000005ccd000 WB|RT BOOT DATA 0000000005ccd000-0000000005cce000 WB RUNTIME DATA 0000000005cce000-0000000005cf0000 WB|RT BOOT DATA 0000000005cf0000-0000000006cf5000 WB RESERVED 0000000006cf5000-0000000006cfa000 WB ACPI RECLAIM MEM 0000000006cfa000-0000000006d1c000 WB RESERVED 0000000006d1c000-0000000006f35000 WB RUNTIME CODE 0000000006f35000-0000000006f37000 WB|RT RESERVED 0000000006f37000-0000000008000000 WB RESERVED 00000000e0000000-00000000f0000000 WB
Bad map: (with BLOBLIST_TABLES but without this patch):
Type Start End Attributes
================ ================ ================ ==========
CONVENTIONAL 0000000000000000-00000000000a0000 WB
RESERVED 00000000000a0000-00000000000f0000 WB
ACPI RECLAIM MEM 00000000000f0000-00000000000f1000 WB
RESERVED 00000000000f1000-0000000000100000 WB CONVENTIONAL 0000000000100000-0000000005ca5000 WB BOOT DATA 0000000005ca5000-0000000005caa000 WB RUNTIME DATA 0000000005caa000-0000000005cab000 WB|RT BOOT DATA 0000000005cab000-0000000005cac000 WB RUNTIME DATA 0000000005cac000-0000000005cce000 WB|RT BOOT DATA 0000000005cce000-0000000006cd3000 WB RUNTIME DATA 0000000006cd3000-0000000006cd5000 WB|RT BOOT DATA 0000000006cd5000-0000000006cf4000 WB RESERVED 0000000006cf4000-0000000006cf9000 WB
ACPI RECLAIM MEM 0000000006cf9000-0000000006ce6000 WB
---
Changes in v3:
- Add new patch to avoid mapping the ACPI tables twice
lib/efi_loader/efi_acpi.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
lib/efi_loader/efi_acpi.c +10 -0
@@ -25,6 +25,16 @@ efi_status_t efi_acpi_register(void)ulong addr, start, end;efi_status_t ret; +/* +* The bloblist is already marked reserved. For now, we don't bother +* marking it with EFI_ACPI_RECLAIM_MEMORY since we would need to cut a +* hole in the EFI_BOOT_SERVICES_CODE region added by +* add_u_boot_and_runtime(). At some point that function could create a +* more detailed map. +*/ +if (IS_ENABLED (CONFIG_BLOBLIST_TABLES )) +return EFI_SUCCESS ; +/* Mark space used for tables */ start =ALIGN_DOWN (gd->arch.table_start,EFI_PAGE_MASK ); end =ALIGN (gd->arch.table_end,EFI_PAGE_MASK );
Signature · 1 line
2.34.1
PATCH v3 27/30 x86: emulation: Enable bloblist
In reply to Simon GlassAdd bloblist support so that tables can be generated and placed in a bloblist, then passed to a payload using UPL
---
(no changes since v2)
Changes in v2:
- Add new patch to enable bloblist on x86
configs/qemu-x86_64_defconfig | 2 ++ configs/qemu-x86_defconfig | 4 ++++ 2 files changed, 6 insertions(+)
configs/qemu-x86_64_defconfig +2 -0
@@ -1,6 +1,7 @@ CONFIG_X86=y CONFIG_TEXT_BASE=0x1110000 CONFIG_SYS_MALLOC_F_LEN=0x1000 +CONFIG_BLOBLIST_SIZE_RELOC=0x20000 CONFIG_NR_DRAM_BANKS=8 CONFIG_ENV_SIZE=0x40000 CONFIG_MAX_CPUS=2
@@ -33,6 +34,7 @@ CONFIG_LOGF_FUNC=y CONFIG_SPL_LOG=y CONFIG_DISPLAY_BOARDINFO_LATE=y CONFIG_PCI_INIT_R=y +CONFIG_BLOBLIST=y CONFIG_BLOBLIST_FIXED=y CONFIG_BLOBLIST_ADDR=0x10000 CONFIG_SPL_NO_BSS_LIMIT=y
configs/qemu-x86_defconfig +4 -0
@@ -1,6 +1,7 @@ CONFIG_X86=y CONFIG_TEXT_BASE=0xFFF00000 CONFIG_SYS_MALLOC_F_LEN=0x1000 +CONFIG_BLOBLIST_SIZE_RELOC=0x20000 CONFIG_NR_DRAM_BANKS=8 CONFIG_ENV_SIZE=0x40000 CONFIG_MAX_CPUS=2
@@ -23,6 +24,9 @@ CONFIG_LOG=y CONFIG_LOGF_FUNC=y CONFIG_DISPLAY_BOARDINFO_LATE=y CONFIG_PCI_INIT_R=y +CONFIG_BLOBLIST=y +CONFIG_BLOBLIST_FIXED=y +CONFIG_BLOBLIST_ADDR=0x10000 CONFIG_CMD_CPU=y CONFIG_CMD_BOOTEFI_SELFTEST=y CONFIG_CMD_NVEDIT_EFI=y
Signature · 1 line
2.34.1
PATCH v3 28/30 dm: core: Clarify behaviour of ofnode_name_eq()
In reply to Simon GlassThis function is somewhat ambiguous, so expand the comments and add a test for the undefined behaviour.
---
(no changes since v1)
include/dm/ofnode.h | 7 +++---- test/dm/core.c | 2 ++ 2 files changed, 5 insertions(+), 4 deletions(-)
include/dm/ofnode.h +3 -4
@@ -386,11 +386,10 @@ static inline oftree oftree_from_np(struct device_node *root)void oftree_dispose (oftree tree);/** -* ofnode_name_eq() - Check if the node name is equivalent to a given name -* ignoring the unit address +* ofnode_name_eq() - Check a node name ignoring its unit address * -* @node: valid node reference that has to be compared -* @name: name that has to be compared with the node name +* @node: valid node to compared, which may have a unit address +* @name: name (without unit address) to compare with the node name * Return: true if matches, false if it doesn't match */ bool ofnode_name_eq (ofnode node,const char *name);
test/dm/core.c +2 -0
@@ -186,6 +186,8 @@ static int dm_test_compare_node_name(struct unit_test_state *uts)ut_assert (ofnode_valid (node));ut_assert (ofnode_name_eq (node,"mmio-bus" )); +ut_assert (!ofnode_name_eq (node,"mmio-bus@0" )); +return 0 ; }DM_TEST (dm_test_compare_node_name,UTF_SCAN_PDATA );
Signature · 1 line
2.34.1
PATCH v3 29/30 dm: core: Provide ofnode_name_eq_unit() to accept a unit address
In reply to Simon GlassWhen a unit-address is provided, use it to match against the node name.
Since this increases code size, put it into a separate function.
---
(no changes since v2)
Changes in v2:
- Split this into its own function
drivers/core/ofnode.c | 23 +++++++++++++++++++++++ include/dm/ofnode.h | 14 ++++++++++++++ test/dm/core.c | 18 ++++++++++++++++++ 3 files changed, 55 insertions(+)
drivers/core/ofnode.c +23 -0
@@ -309,6 +309,29 @@ bool ofnode_name_eq(ofnode node, const char *name)return (strlen (name) == len) && !strncmp (node_name, name, len); } +bool ofnode_name_eq_unit (ofnode node,const char *name) +{ +const char *node_name, *p; +int len; + +assert (ofnode_valid (node)); + + node_name =ofnode_get_name (node); + +/* check the whole name */ +if (!strcmp (node_name, name)) +return true; + +/* if @name has no unit address, try the node name without it */ + len =strlen (name); + p =strchr (node_name,'@' ); +if (p && !strchr (name,'@' ) && len == p - node_name && + !strncmp (node_name, name, len)) +return true; + +return false; +} +int ofnode_read_u8 (ofnode node,const char *propname,u8 *outp) {const u8 *cell;
include/dm/ofnode.h +14 -0
@@ -394,6 +394,20 @@ void oftree_dispose(oftree tree);*/ bool ofnode_name_eq (ofnode node,const char *name); +/** +* ofnode_name_eq_unit() - Check a node name ignoring its unit address +* +* This is separate from ofnode_name_eq() to avoid code-size increase for +* boards which don't need this function +* +* @node: valid node to compared, which may have a unit address +* @name: name to compare with the node name. If this contains a unit +* address, it is matched, otherwise the unit address is ignored +* when searching for matches +* Return: true if matches, false if it doesn't match +*/ +bool ofnode_name_eq_unit (ofnode node,const char *name); +/** * ofnode_read_u8() - Read a 8-bit integer from a property *
test/dm/core.c +18 -0
@@ -192,6 +192,24 @@ static int dm_test_compare_node_name(struct unit_test_state *uts) }DM_TEST (dm_test_compare_node_name,UTF_SCAN_PDATA ); +/* compare node names ignoring the unit address */ +static int dm_test_compare_node_name_unit (struct unit_test_state *uts) +{ +ofnode node; + + node =ofnode_path ("/mmio-bus@0" ); +ut_assert (ofnode_valid (node)); +ut_assert (ofnode_name_eq_unit (node,"mmio-bus" )); + +ut_assert (ofnode_name_eq_unit (node,"mmio-bus@0" )); +ut_assert (!ofnode_name_eq_unit (node,"mmio-bus@1" )); +ut_assert (!ofnode_name_eq_unit (node,"mmio-bu" )); +ut_assert (!ofnode_name_eq_unit (node,"mmio-buss@0" )); + +return 0 ; +} +DM_TEST (dm_test_compare_node_name_unit,UTF_SCAN_PDATA ); +/* Test that binding with uclass plat setting occurs correctly */ static int dm_test_autobind_uclass_pdata_valid (struct unit_test_state *uts) {
Signature · 1 line
2.34.1
PATCH v3 30/30 dm: core: Provide ofnode_find_subnode_unit()
In reply to Simon GlassThe ofnode_find_subnode() function currently processes things two different ways, so the treatment of unit addresses differs depending on whether OF_LIVE is enabled or not.
Add a new version which uses the ofnode API and add a test to check that unit addresses can be matched correctly. Leave the old function in place for the !OF_LIVE case, to avoid a code-size increase, e.g. on firefly-rk3288
---
Changes in v3:
- Be careful not to resend the bloblist license and get_size patches
Changes in v2:
- Split prerequisite patches into their own series
drivers/core/ofnode.c | 29 ++++++++++++++++++++++------- include/dm/ofnode.h | 12 ++++++++++++ test/dm/ofnode.c | 19 +++++++++++++++++++ 3 files changed, 53 insertions(+), 7 deletions(-)
drivers/core/ofnode.c +22 -7
@@ -599,14 +599,9 @@ ofnode ofnode_find_subnode(ofnode node, const char *subnode_name)log_debug ("%s: %s: " , __func__, subnode_name);if (ofnode_is_np (node)) { -struct device_node *np =ofnode_to_np (node); - -for (np = np->child; np; np = np->sibling) { -if (!strcmp (subnode_name, np->name)) -break ; - } - subnode =np_to_ofnode (np); + subnode =ofnode_find_subnode_unit (node, subnode_name); }else { +/* special case to avoid code-size increase */ int ooffset =fdt_subnode_offset (ofnode_to_fdt (node),ofnode_to_offset (node), subnode_name); subnode =noffset_to_ofnode (node, ooffset);
@@ -617,6 +612,26 @@ ofnode ofnode_find_subnode(ofnode node, const char *subnode_name)return subnode; } +ofnode ofnode_find_subnode_unit (ofnode node,const char *subnode_name) +{ +ofnode subnode, found =ofnode_null (); + +assert (ofnode_valid (node)); +log_debug ("%s: " , subnode_name); + +ofnode_for_each_subnode (subnode, node) { +if (ofnode_name_eq_unit (subnode, subnode_name)) { + found = subnode; +break ; + } + } + +log_debug ("%s\n" ,ofnode_valid (found) ? +ofnode_get_name (found) :"<none>" ); + +return found; +} +int ofnode_read_u32_array (ofnode node,const char *propname,u32 *out_values,size_t sz) {
include/dm/ofnode.h +12 -0
@@ -607,6 +607,18 @@ bool ofnode_read_bool(ofnode node, const char *propname);*/ ofnode ofnode_find_subnode (ofnode node,const char *subnode_name); +/** +* ofnode_find_subnode_unit() - find a named subnode of a parent node +* +* @node: valid reference to parent node +* @subnode_name: name of subnode to find, including any unit address. If the +* unit address is omitted, any subnode which matches the name (excluding +* any unit address) is returned +* Return: reference to subnode (which can be invalid if there is no such +* subnode) +*/ +ofnode ofnode_find_subnode_unit (ofnode node,const char *subnode_name); +#if CONFIG_IS_ENABLED (DM_INLINE_OFNODE )#include <asm/global_data.h>
test/dm/ofnode.c +19 -0
@@ -1201,6 +1201,25 @@ static int dm_test_ofnode_find_subnode(struct unit_test_state *uts) }DM_TEST (dm_test_ofnode_find_subnode,UTF_SCAN_FDT ); +/* check ofnode_find_subnode() with unit addresses */ +static int dm_test_ofnode_find_subnode_unit (struct unit_test_state *uts) +{ +ofnode node, subnode; + + node =ofnode_path ("/some-bus" ); +ut_assert (ofnode_valid (node)); + subnode =ofnode_find_subnode_unit (node,"c-test@5" ); +ut_assert (ofnode_valid (subnode)); +ut_asserteq_str ("c-test@5" ,ofnode_get_name (subnode)); + + subnode =ofnode_find_subnode_unit (node,"c-test" ); +ut_assert (ofnode_valid (subnode)); +ut_asserteq_str ("c-test@5" ,ofnode_get_name (subnode)); + +return 0 ; +} +DM_TEST (dm_test_ofnode_find_subnode_unit,UTF_SCAN_FDT ); +/* test ofnode_find_subnode() on the 'other' tree */ static int dm_test_ofnode_find_subnode_ot (struct unit_test_state *uts) {
Signature · 1 line
2.34.1
Quoted 10 lines · Simon Glass
The current UPL spec[1] has been tidied up and improved over the last year, since U-Boot's original UPL support was written.
This series includes some prerequisite patches needed for the real UPL patches. It is split from [2]
[1] [email protected]:UniversalPayload/spec.git commit 3f1450d
[2] https://patchwork.ozlabs.org/project/uboot/list/?series=438574&state=*[...]
Applied to u-boot/master, thanks!
Signature · 1 line
Tom
Hi Simon,
Quoted 9 lines · Tom Rini
Quoted 6 lines · Simon Glass
The current UPL spec[1] has been tidied up and improved over the last year, since U-Boot's original UPL support was written.
This series includes some prerequisite patches needed for the real UPL patches. It is split from [2]
This series breaks booting on Arm64 using ACPI since the ACPI tables are no longer advertised
using EFI. It looks like "efi_loader: Avoid mapping the ACPI tables twice" is at fault.
Never calling efi_install_configuration_table() on CONFIG_BLOBLIST_TABLES enabled systems
just looks wrong (it might still work on x86 as the kernel will scan low mem for RSDP).
Quoted 11 lines
Quoted 4 lines
[1] [email protected]:UniversalPayload/spec.git commit 3f1450d
[2] https://patchwork.ozlabs.org/project/uboot/list/?series=438574&state=*[...]
Applied to u-boot/master, thanks!
--
Tom
Hi Patrick,
Quoted 12 lines · Patrick Rudolph
Hi Simon,
Quoted 9 lines · Tom Rini
Quoted 6 lines · Simon Glass
The current UPL spec[1] has been tidied up and improved over the last year, since U-Boot's original UPL support was written.
This series includes some prerequisite patches needed for the real UPL patches. It is split from [2]
Quoted 8 lines
This series breaks booting on Arm64 using ACPI since the ACPI tables are no longer advertised
using EFI. It looks like "efi_loader: Avoid mapping the ACPI tables twice" is at fault.
Never callingefi_install_configuration_table()onCONFIG_BLOBLIST_TABLESenabled systems
just looks wrong (it might still work on x86 as the kernel will scan low mem for RSDP).
Thanks for the report. I'll take a look.
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
[1] [email protected]:UniversalPayload/spec.git commit 3f1450d
[2] https://patchwork.ozlabs.org/project/uboot/list/?series=438574&state=*
Quoted 8 lines
Quoted 8 lines
Quoted 1 line
[...]
Applied to u-boot/master, thanks!
--
Tom
Regards,
SImon
Hi Patrick,
Quoted 26 lines · Simon Glass
Hi Patrick,
Quoted 12 lines · Patrick Rudolph
Hi Simon,
Quoted 9 lines · Tom Rini
Quoted 6 lines · Simon Glass
The current UPL spec[1] has been tidied up and improved over the last year, since U-Boot's original UPL support was written.
This series includes some prerequisite patches needed for the real UPL patches. It is split from [2]
Quoted 8 lines
This series breaks booting on Arm64 using ACPI since the ACPI tables are no longer advertised
using EFI. It looks like "efi_loader: Avoid mapping the ACPI tables twice" is at fault.
Never callingefi_install_configuration_table()onCONFIG_BLOBLIST_TABLESenabled systems
just looks wrong (it might still work on x86 as the kernel will scan low mem for RSDP).
Quoted 1 line
Thanks for the report. I'll take a look.
Here is a possible fix:
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
[1] [email protected]:UniversalPayload/spec.git commit 3f1450d
[2] https://patchwork.ozlabs.org/project/uboot/list/?series=438574&state=*
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 1 line
[...]
Applied to u-boot/master, thanks!
--
Tom
Regards,
Simon