summaryrefslogtreecommitdiff
path: root/include/asm-generic/global_data.h
AgeCommit message (Collapse)Author
2025-11-10dm: Remove pre-schema tag supportTom Rini
Support for using "u-boot,dm-..." rather than "bootph-..." has been deprecated since February 2023. Any platforms using this have had a console message saying to migrate by 2023.07. Go and remove all support here now, for the v2026.01 release. The results of this change that aren't clear from the above are that we still have a checkpatch.pl error message, and document in doc/develop/spl.rst that they have been migrated since 2023. We also change the key2dtsi.py tool to use the correct bootph phase rather than the legacy phase. Signed-off-by: Tom Rini <[email protected]>
2025-04-03membuf: Rename structSimon Glass
Rename the struct to match the function prefix and filenames. Signed-off-by: Simon Glass <[email protected]>
2025-04-03membuff: Rename the files to membufSimon Glass
Rename the C and header files to use the membuf basename, to match the functions. Add a MAINTAINERS entry while we are here. Signed-off-by: Simon Glass <[email protected]>
2024-12-02Revert "global_data: Drop spl_handoff"Simon Glass
This breaks chromebook_coral which says: Video: No video mode configured in FSP! This reverts commit 2e9313179a846b581c0fc3f6a49e19f3d343efa8. Signed-off-by: Simon Glass <[email protected]>
2024-11-03test: Allow saving and restoring the bloblistSimon Glass
Tests which create a new bloblist overwrite the existing one in sandbox. Provide a flag for tests to declare this behaviour. Save and restore the bloblist pointer so that other tests remain unaffected. Note that when sandbox is running normally, the bloblist has been relocated to high in memory. The existing bloblist tests create a new bloblist low in memory, so they do not conflict. Correct a build error on coreboot by using accessors for gd->bloblist: Signed-off-by: Simon Glass <[email protected]>
2024-10-25Merge patch series "Allow showing the memory map"Tom Rini
Simon Glass <[email protected]> says: This little series adds a new 'memmap' command, intended to show the layout of memory within U-Boot and how much memory is available for loading images. Link: https://lore.kernel.org/r/[email protected]
2024-10-25global_data: Add some more accessorsSimon Glass
Add accessors for bloblist, bootstage, trace and video to avoid needing more #ifdefs in the C code. Signed-off-by: Simon Glass <[email protected]>
2024-10-23global_data.h: remove unnecesary include of cyclic.hRasmus Villemoes
Nothing in cyclic.h is needed to define struct global_data, so do not include that header. If any .c file relies on getting cyclic.h through asm/global_data.h, it needs to include it itself. Signed-off-by: Rasmus Villemoes <[email protected]> Reviewed-by: Tom Rini <[email protected]> Reviewed-by: Stefan Roese <[email protected]>
2024-10-11include: Use CONFIG_XPL_BUILD instead of CONFIG_SPL_BUILDSimon Glass
Use the new symbol to refer to any 'SPL' build, including TPL and VPL Signed-off-by: Simon Glass <[email protected]>
2024-08-26global_data: Remove environment members if not usedSimon Glass
If the environment is not enabled we don't need these fields in global_data. Make them conditional. Make these fields conditional. Move env_buf up one so it can share an #ifdef. Signed-off-by: Simon Glass <[email protected]>
2024-08-26global_data: Remove jump table in SPLSimon Glass
SPL builds don't use the jump table since they cannot run apps. Drop it, moving it together with boardf. Signed-off-by: Simon Glass <[email protected]>
2024-08-26global_data: Move pointer members togetherSimon Glass
Collect the pointer members near the top of global_data to help with alignment. Signed-off-by: Simon Glass <[email protected]>
2024-08-26global_data: Move ulong fields togetherSimon Glass
Move all the always-present ulong fields next to the others at the top of global_data Signed-off-by: Simon Glass <[email protected]>
2024-08-26global_data: Put phys_addr fields near the topSimon Glass
Put these fields near the top and together, since they have the same alignment. Signed-off-by: Simon Glass <[email protected]>
2024-08-26global_data: Move env_addr field higherSimon Glass
Move this field to be with others of the same alignment. Signed-off-by: Simon Glass <[email protected]>
2024-08-26global_data: Move baud_rate field lowerSimon Glass
Move this field to be with others of the same alignment. Signed-off-by: Simon Glass <[email protected]>
2024-08-26global_data: Reduce size of early-malloc varsSimon Glass
The early malloc region is normally quite small and is certainly less than 4GB, so use a 32-bit value for the limit and pointer. Update the comments for clarity while we are here. Signed-off-by: Simon Glass <[email protected]>
2024-08-26global_data: log: Reorder and shrink fieldsSimon Glass
Some of the logging fields are larger than they need to be. Shrink them and adjust the ordering to improve alignment. Signed-off-by: Simon Glass <[email protected]>
2024-08-26global_data: Reduce the size of mon_lenSimon Glass
This is the length of the U-Boot binary, which is typically 200-800KB and certainly not larger than 4GB. Use a 32-bit value to save space in global_data and move it up to be with fields of the same alignment. Signed-off-by: Simon Glass <[email protected]>
2024-08-26global_data: Reduce the size of bus_clk and mem_clkSimon Glass
The bus clock and memory clock are unlikely to go above 4GHz for now, so reduce the field size to 32 bits. Signed-off-by: Simon Glass <[email protected]>
2024-08-26global_data: Collect common fields at the topSimon Glass
Move all the fields which are always present to the top of the struct, so we can potentially save some space by taking note of alignment. Signed-off-by: Simon Glass <[email protected]>
2024-08-26global_data: Drop spl_handoffSimon Glass
Provide a function to locate this information, rather than doing it automatically on startup, to save space in global_data. Signed-off-by: Simon Glass <[email protected]>
2024-08-26board_f: Move new_bloblist to boardfSimon Glass
This value is only used before relocation. Move it to the new boardf struct. Signed-off-by: Simon Glass <[email protected]>
2024-08-26board_f: Move new_bootstage to boardfSimon Glass
This value is only used before relocation. Move it to the new boardf struct. Signed-off-by: Simon Glass <[email protected]>
2024-08-26board_f: Move fdt_size to boardSimon Glass
This value is only really used before relocation. There is not much use to showing its value in bdinfo, so drop it. Move it to the new boardf struct. Signed-off-by: Simon Glass <[email protected]>
2024-08-26board_f: Add a new struct to hold pre-relocation infoSimon Glass
Quite a few of the members of struct global_data are only used before reloction, or have little meaning afterwards, yet they hang around in struct global_data for the lifetime of U-Boot. This uses up precious pre-relocation SRAM on many boards. To help with this, start a new struct which exists only before relocation. Move new_fdt into this new struct. Drop the display of it in the 'bdinfo' command as it is probably not very useful. Note that the field does not exist in SPL builds. Signed-off-by: Simon Glass <[email protected]>
2024-08-26global_data: Use less space for environment fieldsSimon Glass
Use shorter types for some of these fields to save space. Reorder to put fields with like alignment together. Signed-off-by: Simon Glass <[email protected]>
2024-08-26global_data: Drop pci_bootdelaySimon Glass
This is not used. Drop the field and the environment code which uses it. Signed-off-by: Simon Glass <[email protected]>
2024-08-26global_data: Drop global_data hoseSimon Glass
This is set on one x86 boards, but is not used anymore. Drop it. Signed-off-by: Simon Glass <[email protected]>
2024-08-26global_data: Remove pci_ram_topSimon Glass
This field is set but not used. Drop it. Signed-off-by: Simon Glass <[email protected]>
2024-08-26global_data: Convert have_console into a flagSimon Glass
We don't need a full word for this boolean value. Convert it into a flag to save space in global_data. Reviewed-by: Alexander Sverdlin <[email protected]> Signed-off-by: Simon Glass <[email protected]>
2024-08-26global_data: Drop fb_baseSimon Glass
This value mirrors information recorded by driver model video drivers, so can be removed to save space. Drop it. Signed-off-by: Simon Glass <[email protected]>
2024-08-26global_data: Move pci_clk to m68k and powerpcSimon Glass
Only m68k and powerpc use this field, so move it to the arch-specific info, to reduce the size for other archs. Signed-off-by: Simon Glass <[email protected]>
2024-08-09spl: Plumb in the Universal Payload handoffSimon Glass
Specify the FIT and include information about each loaded image, as required by the UPL handoff. Write the UPL handoff into the bloblist before jumping to the next phase. Control this using a runtime flag to avoid conflicting with other handoff mechanisms. Signed-off-by: Simon Glass <[email protected]>
2024-08-09upl: Add a commandSimon Glass
Add a 'upl' command to work with Universal Payload features. For now it only supports reading and writing a handoff structure. Signed-off-by: Simon Glass <[email protected]>
2024-07-31cyclic: Add a symbol for SPLSimon Glass
The cyclic subsystem is currently enabled either in all build phases or none. For tools this should not be enabled, but since lib/shc256.c and other files include watchdog.h in the host build, we must make sure that it is not enabled there. Add an SPL symbol so that there is more control of this. Add an include into cyclic.h so that tools can include this file. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Devarsh Thakkar <[email protected]> Reviewed-by: Stefan Roese <[email protected]>
2024-07-03global_data.h: drop write-only field dm_root_fRasmus Villemoes
The dm_root_f field seems to be entirely write-only and hence redundant, unless 'git grep' fails to find some access generated via preprocessor token concatenation or similar. Signed-off-by: Rasmus Villemoes <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2024-01-07smbios: Correct gd_smbios_start()Simon Glass
This should access arch-specific properties. Fix it and update the existing usage. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Heinrich Schuchardt <[email protected]> Reviewed-by: Ilias Apalodimas <[email protected]>
2023-12-28cli: Enables using modern hush parser as command line parserFrancis Laniel
If one defines HUSH_MODERN_PARSER, it is then possible to use modern parser with: => cli get old => cli set modern => cli get modern Reviewed-by: Simon Glass <[email protected]> Signed-off-by: Francis Laniel <[email protected]>
2023-12-28global_data.h: add GD_FLG_HUSH_OLD_PARSER flagFrancis Laniel
This flag is used to indicate we are using the hush parser. Reviewed-by: Simon Glass <[email protected]> Signed-off-by: Francis Laniel <[email protected]>
2023-10-06bloblist: Support initing from multiple placesSimon Glass
Typically the bloblist is set up after the devicetree is present. This makes sense because bloblist may use malloc() to allocate the space it needs. However sometimes the devicetree itself may be present in the bloblist. In that case it is at a known location in memory so we can init the bloblist very early, before devicetree. Add a flag to indicate whether the bloblist has been inited. Add a function to init it only if needed. Use that in the init sequence. Signed-off-by: Simon Glass <[email protected]>
2023-10-06spl: Avoid an #ifdef when printing gd->malloc_ptrSimon Glass
Use an accessor in the header file to avoid this. Signed-off-by: Simon Glass <[email protected]>
2023-10-06spl: Use SYS_MALLOC_F instead of SYS_MALLOC_F_LENSimon Glass
Use the new SPL/TPL/VPL_SYS_MALLOC_F symbols to determine whether the malloc pool exists. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Sean Anderson <[email protected]>
2023-09-22Record the position of the SMBIOS tablesSimon Glass
Remember where these end up so that we can pass this information on to the EFI layer. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Bin Meng <[email protected]>
2023-09-22dm: core: Allow marking driver model as deadSimon Glass
On x86 devices we use CAR (Cache-As-RAM) to hold the malloc() region in SPL, since SDRAM is not set up yet. This means that driver model stores its tables in this region. When preparing to jump from SPL to U-Boot proper, we must disable CAR, so that the CPU can uses the caches normally. This means that driver model tables become inaccessible. From there until we jump to U-Boot proper, we must avoid using driver model. This is only a problem on boards which operate this way, for example chromebook_link64 Add a flag to indicate that driver model is dead and should not be used. It can be used in SPL to avoid hanging the machine. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Bin Meng <[email protected]>
2023-09-22x86: cpu: i386: cpu: only set pci_ram_top if CONFIG_IS_ENABLED(PCI)Troy Kisky
This avoids an error when ifdef CONFIG_PCI is changed to if CONFIG_IS_ENABLED(PCI) Signed-off-by: Troy Kisky <[email protected]> [Rebased on top of u-boot/master] Signed-off-by: Bin Meng <[email protected]>
2023-07-17bdinfo: Show the malloc base with the bdinfo commandSimon Glass
It is useful to see the base of the malloc region. This is visible when debugging but not in normal usage. Add it to the global data so that it can be shown. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Nikhil M Jain <[email protected]> Reviewed-by: Bin Meng <[email protected]> Tested-by: Nikhil M Jain <[email protected]>
2023-05-11x86: coreboot: Collect the address of the ACPI tablesSimon Glass
At present any ACPI tables created by prior-stage firmware are ignored. It is useful to be able to view these in U-Boot. Pick this up from the sysinfo tables and display it with the cbsysinfo command. This allows the 'acpi list' command to work when booting from coreboot. Adjust the global_data condition so that acpi_start is available even if table-generation is disabled. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Bin Meng <[email protected]> Tested-by: Bin Meng <[email protected]>
2023-04-24include: Enable video related global data variable and splash at SPLNikhil M Jain
To include video related global data variables and splash functions at SPL and u-boot proper, use CONFIG_IS_ENABLED. Replace CONFIG_CMD_BMP with CONFIG_BMP to enable splash_display function at u-boot proper and SPL. Signed-off-by: Nikhil M Jain <[email protected]> Reviewed-by: Devarsh Thakkar <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2023-02-14dm: Add support for handling old u-boot,dm- tagsSimon Glass
Add a CONFIG option to deal with this automatically, printing a warning when U-Boot starts up. This can be useful if the device tree comes from another project. We will maintain this through the 2023.07 release, providing 6 months for people to notice. Signed-off-by: Simon Glass <[email protected]> Version 4: Acked-by: Michal Simek <[email protected]>