summaryrefslogtreecommitdiff
path: root/cmd/x86
AgeCommit message (Collapse)Author
2025-05-29global: Avoid indirect inclusion of <env.h> from <command.h>Tom Rini
The include file <command.h> does not need anything from <env.h>. Furthermore, include/env.h itself includes other headers which can lead to longer indirect inclusion paths. To prepare to remove <env.h> from <command.h> fix all of the places which had relied on this indirect inclusion to instead include <env.h> directly. Reviewed-by: Mattijs Korpershoek <[email protected]> # android, bcb Reviewed-by: Jerome Forissier <[email protected]> # spawn Signed-off-by: Tom Rini <[email protected]>
2025-05-29global: Add <linux/string.h> instead of long indirect include pathTom Rini
In a number of cases we have C files which rely on a chain of indirect include paths to get <linux/string.h> to be included via <command.h>. To facilitate cleaning up <command.h> make this code directly include <linux/string.h>. Signed-off-by: Tom Rini <[email protected]>
2025-04-07Revert "Merge patch series "pxe: Precursor series for supporting read_all() ↵Tom Rini
in extlinux / PXE"" This reverts commit 8bc3542384e3a1219e5ffb62b79d16dddc1b1fb9, reversing changes made to 698edd63eca090a2e299cd3facf90a0b97bed677. There are still problems with this series to work out. Link: https://lore.kernel.org/u-boot/CAFLszTjw_MJbK9tpzVYi3XKGazcv55auBAdgVzcAVUta7dRqcg@mail.gmail.com/ Signed-off-by: Tom Rini <[email protected]>
2025-04-03x86: Update mtrr command to support 64-bit valuesSimon Glass
The MTRR registers have 64-bit values. Update the command to use 64-bit values so that memory larger than 4GB can be handled. Signed-off-by: Simon Glass <[email protected]>
2025-04-03x86: Add functions to convert between mtrr size and maskSimon Glass
Rather than repeating the same code in several places, add some functions which can do the conversion. Use the cpu_phys_address_size() function to obtain the physical-address size, since it is more reliable with kvm, where the host CPU may have a different value from the emulation CPU. Signed-off-by: Simon Glass <[email protected]>
2025-03-18x86: Drop the unnecessary base_ptr argument to zboot_dump()Simon Glass
This value is include the bootm_info, so drop the unnecessary parameter. Signed-off-by: Simon Glass <[email protected]>
2025-03-18x86: Move the bootm state for zimage into cmd/Simon Glass
Rather than holding the state in the implementation code, move it to the command code. The state is now passed to the implementation functions and can there (with future work) be pass in from bootstd, without going through the commands. Signed-off-by: Simon Glass <[email protected]>
2025-03-18x86: Rename state to bmiSimon Glass
Use the common name for the struct, in preparation for passing it around between functions. Signed-off-by: Simon Glass <[email protected]>
2025-03-18x86: Drop duplicate definition of zimage_dump()Simon Glass
This is now defined in bootm.h so drop the duplicate in the x86 code. Signed-off-by: Simon Glass <[email protected]>
2025-03-18x86: Make do_zboot_states() staticSimon Glass
This function is only called within zboot.c so make the function private. Signed-off-by: Simon Glass <[email protected]>
2024-11-03x86: coreboot: Add a command to check and update CMOS RAMSimon Glass
Coreboot tables provide information about the CMOS-RAM checksum. Add a command which can check and update this. With this it is possible to adjust CMOS-RAM settings and tidy up the checksum afterwards. Signed-off-by: Simon Glass <[email protected]>
2024-11-03x86: coreboot: Show the option tableSimon Glass
Update the cbsysinfo command to show the contents of the CMOS option table. While we are here, add some example output for this command, along with mention of what the unimplemented tags are. Signed-off-by: Simon Glass <[email protected]>
2024-10-18x86: Add msr commandSimon Glass
It is useful to obtain the results of MSR queries as well as to update MSR registers, so add a command these tasks. Signed-off-by: Simon Glass <[email protected]>
2024-10-18x86: Add a cpuid commandSimon Glass
It is useful to obtain the results of cpuid queries, so add a command for this. Signed-off-by: Simon Glass <[email protected]>
2024-09-12include: export uuid.hCaleb Connolly
Move this header to include/u-boot/ so that it can be used by external tools. Reviewed-by: Ilias Apalodimas <[email protected]> Signed-off-by: Caleb Connolly <[email protected]>
2024-06-26zboot: Correct use of state_mask argumentSimon Glass
There is confusion in this function between the flag and state_mask parameters, which prevents the boot from actually happening. Correct this by using state_mask instead of flag for deciding which states to go through. This fixes booting of some 32-bit Debian kernels. Note: Some sort of CI for this is in the works. Fixes: 228c6722d44 ("x86: zboot: Avoid iteration in do_zboot_states()") Signed-off-by: Simon Glass <[email protected]>
2024-06-26zboot: Add debugging for bootingSimon Glass
Show the boot arguments and the state mask, to aid debugging. Signed-off-by: Simon Glass <[email protected]>
2024-06-26cmd: Make use of U_BOOT_LONGHELP when missingTom Rini
After adding the U_BOOT_LONGHELP macro some new commands came in still that were not making use if it. Switch these cases over and in a few places add missing newlines as well. Signed-off-by: Tom Rini <[email protected]>
2024-05-20Restore patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet"Tom Rini
As part of bringing the master branch back in to next, we need to allow for all of these changes to exist here. Reported-by: Jonas Karlman <[email protected]> Signed-off-by: Tom Rini <[email protected]>
2024-05-19Revert "Merge patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet""Tom Rini
When bringing in the series 'arm: dts: am62-beagleplay: Fix Beagleplay Ethernet"' I failed to notice that b4 noticed it was based on next and so took that as the base commit and merged that part of next to master. This reverts commit c8ffd1356d42223cbb8c86280a083cc3c93e6426, reversing changes made to 2ee6f3a5f7550de3599faef9704e166e5dcace35. Reported-by: Jonas Karlman <[email protected]> Signed-off-by: Tom Rini <[email protected]>
2024-05-06cmd: Remove <common.h> and add needed includesTom Rini
Remove <common.h> from all "cmd/" files and when needed add missing include files directly. Signed-off-by: Tom Rini <[email protected]>
2024-04-10Merge patch series "Complete decoupling of zboot logic from commands"Tom Rini
Simon Glass <[email protected]> says: This series refactors the zboot code to allow it to be used with CONFIG_COMMAND disabled. A new zboot_run() function is used to boot a zimage.
2024-04-10x86: zboot: Separate logic functions from commandsSimon Glass
Move zboot_start() and zboot_info() in with the other logic functions. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Tom Rini <[email protected]>
2024-04-10x86: zboot: Move argument processing outside zboot_start()Simon Glass
Process the arguments before calling zboot_start() so that we can separate the command line from the internal logic. Signed-off-by: Simon Glass <[email protected]>
2024-04-10x86: zboot: Drop intermediate zboot_go() functionSimon Glass
This function only calls zboot_go() so drop it. Signed-off-by: Simon Glass <[email protected]>
2024-04-10x86: zboot: Drop intermediate zboot_setup() functionSimon Glass
Move error checking into the caller so that do_zboot_setup() can call zboot_setup() directly. Signed-off-by: Simon Glass <[email protected]>
2024-04-10x86: zboot: Move environment setting into zboot_load()Simon Glass
The only difference between the command and the underlying logic is the setting of envrionment variables. Move this out of the command processing since it needs to be done in any case. Signed-off-by: Simon Glass <[email protected]>
2024-04-10x86: zboot: Create separate functions for the logicSimon Glass
Separate out the commands from the logic. This will eventually allow the logic to be used when CONFIG_CMDLINE is not enabled. Signed-off-by: Simon Glass <[email protected]>
2024-04-10x86: zboot: Avoid iteration in do_zboot_states()Simon Glass
Drop the iteration and write out each state in full. This will allow the arguments to be reduced and adjusted in future patches. Signed-off-by: Simon Glass <[email protected]>
2024-04-10x86: zboot: Move command code into its own fileSimon Glass
Much of the code in zimage.c deals with the zboot command. Move it into a sepatate zboot.c file within the cmd/ directory. This will eventually allow use of the zimage logic without the command being enabled. Signed-off-by: Simon Glass <[email protected]>
2024-03-02cmd: remove common.h from exception command implementationsHeinrich Schuchardt
The common.h should not be used anymore. Signed-off-by: Heinrich Schuchardt <[email protected]> Reviewed-by: Tom Rini <[email protected]>
2023-08-01x86: Add a little more info to cbsysinfoSimon Glass
Show the number of records in the table and the total table size in bytes. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Bin Meng <[email protected]>
2023-07-17x86: Allow listing MTRRs in SPLSimon Glass
Move MTRR-listing code into a common file so it can be used from SPL. Update the 'mtrr' command to call it. Use this in SPL just before adjusting the MTRRs, so we can see the state set up by the board. Only show it when debug is enabled. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Bin Meng <[email protected]>
2023-05-11x86: coreboot: Show unimplemented sysinfo tagsSimon Glass
Sometimes coreboot adds new tags that U-Boot does not know about. These are silently ignored, but it is useful to at least know what we are missing. Add a way to collect this information. For Brya it shows: Unimpl. 38 41 37 34 42 40 These are: LB_TAG_PLATFORM_BLOB_VERSION LB_TAG_ACPI_CNVS LB_TAG_FMAP LB_TAG_VBOOT_WORKBUF LB_TAG_TYPE_C_INFO LB_TAG_BOARD_CONFIG Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Bin Meng <[email protected]> Tested-by: Bin Meng <[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-05-11mtrr: Don't show an invalid CPU numberSimon Glass
When U-Boot did not do the MP init, we don't get an actual CPU number here. Skip printing it in that case. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Bin Meng <[email protected]>
2021-08-02Merge https://source.denx.de/u-boot/custodians/u-boot-x86Tom Rini
- Fixed broken ICH SPI driver in software sequencer mode - Added "m25p,fast-read" to SPI flash node for x86 boards - Drop ROM_NEEDS_BLOBS and BUILD_ROM for x86 ROM builds - Define a default TSC timer frequency for all x86 boards - x86 MTRR MSR programming codes bug fixes - x86 "hob" command bug fixes - Don't program MTRR for DRAM for FSP1 - Move INIT_PHASE_END_FIRMWARE to FSP2 - Use external graphics card by default on Intel Crown Bay - tangier: Fix DMA controller IRQ polarity in CSRT
2021-08-02global: Convert simple_strtoul() with hex to hextoul()Simon Glass
It is a pain to have to specify the value 16 in each call. Add a new hextoul() function and update the code to use it. Add a proper comment to simple_strtoul() while we are here. Signed-off-by: Simon Glass <[email protected]>
2021-08-02x86: cmd: hob: Fix display of resource type for system memoryBin Meng
The resource type for system memory is currently displayed as "unknown", which is wrong. Fixes: 51af144eb7a0 ("x86: Allow showing details about a HOB entry") Signed-off-by: Bin Meng <[email protected]> Reviewed-by: Simon Glass <[email protected]> Tested on chromebook_coral, chromebook_samus, chromebook_link, minnowmax Tested-by: Simon Glass <[email protected]>
2021-08-02x86: cmd: hob: Fix the command usage and help messagesBin Meng
At present the hob command usage and help messages are messed up in a single line. They should be separated. This was a regression introduced when [seq] and [-v] were added to the command. Fixes: d11544dfa9f4 ("x86: hob: Add way to show a single hob entry") Fixes: 51af144eb7a0 ("x86: Allow showing details about a HOB entry") Signed-off-by: Bin Meng <[email protected]> Reviewed-by: Simon Glass <[email protected]> Tested on chromebook_coral, chromebook_samus, chromebook_link, minnowmax Tested-by: Simon Glass <[email protected]>
2021-05-10x86: Correct regwidth prompt in cbsysinfoSimon Glass
This should be 'regwidth', not 'baud'. Fix it. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Bin Meng <[email protected]>
2021-03-27x86: Add a command to display coreboot sysinfoSimon Glass
This information is interesting to look at and can be important for debugging and inspection. Add a command to display it in a helpful format. Signed-off-by: Simon Glass <[email protected]>
2021-02-02common: Drop asm/global_data.h from common headerSimon Glass
Move this out of the common header and include it only where needed. In a number of cases this requires adding "struct udevice;" to avoid adding another large header or in other cases replacing / adding missing header files that had been pulled in, very indirectly. Finally, we have a few cases where we did not need to include <asm/global_data.h> at all, so remove that include. Signed-off-by: Simon Glass <[email protected]> Signed-off-by: Tom Rini <[email protected]>
2020-09-25x86: Add support for more than 8 MTRRsSimon Glass
At present the mtrr command only support 8 MTRRs. Some SoCs have more than that. Update the implementation to support up to 10. Read the number of MTRRs dynamically instead. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Bin Meng <[email protected]>
2020-09-25x86: Allow showing details about a HOB entrySimon Glass
Some HOBs include information that can be decoded. Add a -v option to the hob command, to allow this to be displayed. Add the ability to decode a resource descriptor. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Bin Meng <[email protected]>
2020-09-25x86: hob: Try to show a name instead of a GUIDSimon Glass
GUIDs are one of the seven evils of the computer world. They obfuscate the meaning and require people to look up long hex strings to decode it. Luckily only a miniscule fraction of the 10^38 possible GUIDs are in use. Add a way to decode the GUIDs known to U-Boot. Add a few more to the list for good measure. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Bin Meng <[email protected]>
2020-09-25x86: hob: Add way to show a single hob entrySimon Glass
The 'hob' command currently lists all HOB entries. Add way to list a single entry, by index. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Bin Meng <[email protected]>
2020-09-01x86: mtrr: Fix parsing of "mtrr list" commandWolfgang Wallner
The command 'mtrr' does not recognize the 'list' subcommand any more since the code restructuring in commit b2a76b3fe75a ("x86: mtrr: Restructure so command execution is in one place"). The if-else parsing the command arguments does not take 'list' into account: the if-branch is intended for no subcommands, the else-branch is intended for the non-list subcommands (which all expect additional arguments). Calling the 'mtrr list' subcommand leads to a "return CMD_RET_USAGE" in the else-branch. Fix this by changing the else-branch to explicitly checking for if (cmd != 'l'). Fixes: b2a76b3fe75a ("x86: mtrr: Restructure so command execution is in one place") Signed-off-by: Wolfgang Wallner <[email protected]> Reviewed-by: Simon Glass <[email protected]> Reviewed-by: Bin Meng <[email protected]> Tested-by: Bin Meng <[email protected]>
2020-07-20x86: mtrr: Enhance 'mtrr' command to list MTRRs on any CPUSimon Glass
Update this command so it can list the MTRRs on a selected CPU. If '-c all' is used, then all CPUs are listed. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Wolfgang Wallner <[email protected]> Reviewed-by: Bin Meng <[email protected]> Tested-by: Bin Meng <[email protected]>
2020-07-20x86: mtrr: Update 'mtrr' to allow setting MTRRs on any CPUSimon Glass
Add a -c option to mtrr to allow any CPU to be updated with this command. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Wolfgang Wallner <[email protected]> Reviewed-by: Bin Meng <[email protected]>