aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2024-04-11Merge patch series "boot: fdt: Change type of env_get_bootm_low() to ↵WIP/11Apr2024Tom Rini4-34/+28
phys_addr_t"
2024-04-11boot: fdt: Move usable variable below updated commentMarek Vasut1-3/+3
Move the variable below comment which explains what the variable means. Update the comment. No functional change. Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Suggested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-04-11boot: fdt: Drop lmb_alloc*() typecastsMarek Vasut1-3/+3
The lmb_alloc_base() returns phys_addr_t , map_sysmem() accepts phys_addr_t as first parameter. Declare 'addr' as phys_addr_t and get rid of the casts. Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reported-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-04-11boot: fdt: Clean up env_get_bootm_mapsize()Marek Vasut1-5/+2
Reduce tmp variable use and remove unnecessary type cast in env_get_bootm_mapsize(). This aligns the env variable parsing with env_get_bootm_low(). No functional change. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-04-11boot: fdt: Fix tmp type in env_get_bootm_size() and rename to lowMarek Vasut1-5/+5
Change type of 'tmp' variable from phys_size_t to phys_addr_t and rename it to 'low' to better describe what the variable represents, which is either the bootm_low address from environment or start of DRAM address. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-04-11boot: fdt: Clean up env_get_bootm_size()Marek Vasut1-5/+3
Reduce tmp variable use and remove unnecessary type cast in env_get_bootm_size(). This aligns the env variable parsing with env_get_bootm_low(). No functional change. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-04-11boot: fdt: Change type of env_get_bootm_low() to phys_addr_tMarek Vasut4-15/+14
Change type of ulong env_get_bootm_low() to phys_addr_t env_get_bootm_low(). The PPC/LS systems already treat env_get_bootm_low() result as phys_addr_t, while the function itself still returns ulong. This is potentially dangerous on 64bit systems, where ulong might not be large enough to hold the content of "bootm_low" environment variable. Fix it by using phys_addr_t, similar to what env_get_bootm_size() does, which returns phys_size_t . Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reported-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-04-11Merge patch series "x86: expo: Add support for editing coreboot CMOS RAM ↵Tom Rini39-151/+1307
settings" Simon Glass <sjg@chromium.org> says: U-Boot provides support for editing settings with an 'expo', as well as reading and writing settings to CMOS RAM. This series integrates expo functionality with coreboot, using the sysinfo table to get a list of settings, creating an expo with them and allowing them to be edited. A new CI test provides coverage for some coreboot-related commands. For this to work, a number of minor tweaks are made to existing tests, so that they pass on coreboot (x86) or at least are skipped when they cannot pass. Likely most of these fixes will apply to other boards too. It includes several other fixes and improvements: - new -m flag for 'bootflow scan' so it can display a menu automatically - Fix for video-scrolling crash with Truetype - menu items can now have individual integer values - menu items are lined up according to the width of all menu labels
2024-04-11x86: Enable RTC command by defaultSimon Glass1-0/+1
The real-time clock is needed for most X86 systems and it is useful to be able to read from it. Enable the rtc command by default. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-04-11x86: coreboot: Allow building an expo for editing CMOS configSimon Glass10-1/+406
Coreboot provides the CMOS layout in the tables it passes to U-Boot. Use that to build an editor for the CMOS settings. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-04-11x86: coreboot: Add a command to check and update CMOS RAMSimon Glass6-0/+236
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 <sjg@chromium.org>
2024-04-11x86: coreboot: Enable support for the configuration editorSimon Glass3-0/+11
Enable cedit support along with required options and a simple style. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-04-11x86: coreboot: Show the option tableSimon Glass3-1/+178
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 <sjg@chromium.org>
2024-04-11x86: coreboot: Add a test for cbsysinfo commandSimon Glass2-0/+37
Add a simple test for this command, checking that coreboot has the required features. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-04-11x86: coreboot: Enable unit testsSimon Glass1-0/+4
Enable unit tests so we can run command-line tests in coreboot. Enable console recording, with enough space for the 'cbsysinfo' command. Add to the pre-relocation malloc() space to make room for this. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-04-11expo: Add forward declaration for udevice to ceditSimon Glass1-0/+1
Some files may include this header file without first including dm.h so add a forward declaration. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-04-11expo: Drop scene_title_set()Simon Glass4-19/+3
This function is really just an assignment, so serves no useful purpose. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-04-11expo: Drop unneceesary calls to expo_str()Simon Glass1-14/+2
The scene_txt_str() function calls expo_str() so there is no need to call it beforehand. Drop this unnecessary code. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-04-11expo: Support menu-item values in ceditSimon Glass5-60/+117
Update the cedit read/write functions to support menu items with values. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-04-11expo: Add a little more cedit CMOS loggingSimon Glass1-2/+4
Add some more logging in the CMOS read/write code. Tidy up a few comments while we are here. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-04-11expo: Allow menu items to have valuesSimon Glass8-4/+58
At present menu items are stored according to their sequence number in the menu. In some cases we may want to have holes in that sequence, or not use a sequence at all. Add a new 'value' property for menu items. This will be used for reading and writing, if present. If there is no 'value' property, then the normal sequence number will be used instead. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-04-11expo: Use standard numbering for save and discardSimon Glass10-41/+112
Set aside some expo IDs for 'save' and 'discard' buttons. This avoids needing to store the IDs for these. Adjust the documentation and expo tool for the new EXPOID_BASE_ID value. Ignore these objects when saving and loading the cedit, since they do not contain real data. Adjust 'cedit run' to return failure when the user exits the expo without saving. Update the test for this change as well. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-04-11expo: Set the initial next_id to 1Simon Glass2-2/+22
If expo_set_dynamic_start() is never called, the first scene created will have an ID of 0, which is invalid. Correct this by setting a default value. Add a test to check this. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-04-11expo: Place menu items to the right of all labelsSimon Glass8-11/+104
At present a fixed position is used for menu items, 200 pixels to the right of the left side of the labels. This means that a menu item with a very long label may overlap the items. It seems better to calculate the maximum label width and then place the items to the right of all of them. To implement this, add a new struct to containing arrangement information. Calculate it before doing the actual arrangement. Add a new style item which sets the amount of space from the right side of the labels to left side of the items. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-04-11video: Avoid starting a new line to close to the bottomSimon Glass3-2/+13
When starting a new text line, an assumption is made that the current vertical position is a multiple of the character height. When this is not true, characters can be written after the end of the framebuffer. This can causes crashes and strange errors from QEMU. Adjust the scrolling check when processing a newline character, to avoid any problems. Add some comments to make things a little clearer. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-04-11video: Add a dark-grey console colourSimon Glass3-1/+5
This is useful for highlighting something with a black background, as is needed with cedit when using a white-on-black console. Add this as a new colour. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-04-10Merge patch series "Resolve issues with booting distros on x86"Tom Rini12-10/+63
Simon Glass <sjg@chromium.org> says: This little series reprises the EFI-video fix, fixes a USB problem and enables a boot script for coreboot. It also moves to truetype fonts for coreboot and qemu-x86, since the menus look much better and there are no strong size constraints. With these changes it is possible to boot a Linux distro automatically with U-Boot on x86, including when U-Boot is the second-stage bootloader.
2024-04-10x86: qemu: Enable truetype fontsSimon Glass2-0/+2
Enable this feature to provide a larger font choice and more attractive menus. Expand the ROM for x86_64 to 2MB to make space for the font. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-04-10x86: qemu: Expand ROM sizeSimon Glass2-3/+4
Expand the ROM for x86_64 to 2MB to make space for the font, as it is already on the edge. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-04-10x86: coreboot: Enable truetype fontsSimon Glass3-0/+12
Truetype fonts look better in the menu, so enable them. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-04-10x86: Enable SSE in 64-bit modeSimon Glass4-0/+25
This is needed to support Truetype fonts. In any case, the compiler expects SSE to be available in 64-bit mode. Provide an option to enable SSE so that hardware floating-point arithmetic works. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com> Suggested-by: Bin Meng <bmeng.cn@gmail.com>
2024-04-10video: Drop unnecessary truetype operations from SPLSimon Glass1-0/+10
Saving and restoring entries is used for expo and for the command line, which we don't use in SPL. Drop these methods. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Anatolij Gustschin <agust@denx.de>
2024-04-10video: Correct setting of cursor positionSimon Glass1-7/+8
The ANSI codes are not correctly handled at present, in that the requested X position is added to the current one. Correct this and also call vidconsole_entry_start() to start a new text line. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Anatolij Gustschin <agust@denx.de>
2024-04-10x86: coreboot: Add a boot scriptSimon Glass2-0/+2
Provide the user with a list of available boot options. Selecting one causes it to be booted. Pressing <ESC> causes U-Boot to return to the command-line prompt. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2024-04-10fastboot: Update help text with respect to CMDLINETom Rini1-0/+4
This hunk of the patch was missed when using "b4" to apply the series. Signed-off-by: Tom Rini <trini@konsulko.com>
2024-04-10Merge patch series "pxe: Allow extlinux booting without CMDLINE enabled"Tom Rini48-338/+387
Simon Glass <sjg@chromium.org> says: This series is the culmanation of the current line of refactoring series. It adjusts pxe to call the booting functionality directly rather than going through the command-line interface. With this is is possible to boot using the extlinux bootmeth without the command line enabled. It also updates fastboot to do a similar thing.
2024-04-10x86: Drop message about features being missing with 64-bitSimon Glass2-2/+2
At this point most things work, including booting a distro, so drop this message. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-04-10pxe: Allow booting without CMDLINE for the zboot methodSimon Glass1-11/+8
Use zboot_run() to boot rather than the command line. This allows extlinux to be used (on x86) without CMDLINE being enabled. Collect any error but do not return it, to match the existing code. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-04-10pxe: Allow booting without CMDLINE for bootm methodsSimon Glass1-17/+15
Use bootm_run() and booti_run() to boot rather than the command line. This allows extlinux to be used without CMDLINE being enabled. Collect any error but do not return it, to match the existing code. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-04-10pxe: Move calculation of FDT file into a functionSimon Glass1-48/+64
This code undertakes a separate task from the main logic of label_run_boot() so move it into its own function. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-04-10pxe: Refactor to avoid over-using bootm_argvSimon Glass1-10/+12
The bootm_argv[3] expression is used in many places. It is the FDT address, so use that name throughout. Assign it to bootm_argv[3] only at the end, when all the conditions are resolved. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-04-10pxe: Refactor to reduce the size of label_boot()Simon Glass1-138/+163
This function is far too long and complicated. Split out the part which actually calls the boot commands into a separate function. Change a strncpy() to strlcpy() to keep checkpatch happy. No functional change is intended. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-04-10pxe: Use strlcpy() instead of strcpy() in label_boot()Simon Glass1-1/+1
The intention here is to nul-terminate the result string, so use the correct function for that. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-04-10doc: Mention fastboot dependency on CMDLINESimon Glass1-0/+1
The fastboot 'boot' command only supports running a U-Boot command if CONFIG_CMDLINE is enabled. Mention this in the documentation. Signed-off-by: Simon Glass <sjg@chromium.org> Suggested-by: Tom Rini <trini@konsulko.com> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org>
2024-04-10fastboot: Remove dependencies on CMDLINESimon Glass2-17/+14
It is possible to boot a kernel without CMDLINE being enabled. Update the implementation to handle this, and drop the condition from the FASTBOOT config. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2024-04-10bootm: Make cmdline optional with bootm_boot_start()Simon Glass1-1/+1
Allow the default command line to be used when booting the OS. This is needed by fastboot. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-04-10fastboot: Change fastboot_buf_addr to an addressSimon Glass5-21/+21
Given the name of this variable, it should be an address, not a pointer. Update this, to make it easier to use with sandbox. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Dmitrii Merkurev <dimorinny@google.com> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> # on vim3
2024-04-10boot: Update SYS_BOOTM_LEN to depend on BOOTMSimon Glass1-1/+1
Use the new CONFIG_BOOTM symbol to determine whether SYS_BOOT_LEN is visible or not, since we want to support decompression when CMDLINE is disabled. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-04-10treewide: Make arch-specific bootm code depend on BOOTMSimon Glass12-12/+12
Allow these functions to be compiled in when CONFIG_BOOTM is enabled, even if CONFIG_CMD_BOOTM is not. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Angelo Dureghello <angelo@kernel-space.org>
2024-04-10bootm: Make OS booting dependent on BOOTMSimon Glass2-49/+49
Booting an OS does not require the 'bootm' command, so change the condition for these options. Move them into boot/ so they don't depend on CMDLINE Note that CMD_BOOTM_PRE_LOAD has been put directly into the bootm code so will need some additional refactoring (and a test!) to allow it to change over. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>