aboutsummaryrefslogtreecommitdiff
path: root/cmd/x86/zboot.c
AgeCommit message (Collapse)AuthorFilesLines
2024-06-26zboot: Correct use of state_mask argumentSimon Glass1-6/+6
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 <sjg@chromium.org>
2024-06-26zboot: Add debugging for bootingSimon Glass1-1/+10
Show the boot arguments and the state mask, to aid debugging. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-04-10x86: zboot: Separate logic functions from commandsSimon Glass1-28/+4
Move zboot_start() and zboot_info() in with the other logic functions. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2024-04-10x86: zboot: Move argument processing outside zboot_start()Simon Glass1-39/+28
Process the arguments before calling zboot_start() so that we can separate the command line from the internal logic. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-04-10x86: zboot: Drop intermediate zboot_go() functionSimon Glass1-10/+1
This function only calls zboot_go() so drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-04-10x86: zboot: Drop intermediate zboot_setup() functionSimon Glass1-10/+6
Move error checking into the caller so that do_zboot_setup() can call zboot_setup() directly. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-04-10x86: zboot: Move environment setting into zboot_load()Simon Glass1-14/+2
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 <sjg@chromium.org>
2024-04-10x86: zboot: Create separate functions for the logicSimon Glass1-14/+52
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 <sjg@chromium.org>
2024-04-10x86: zboot: Avoid iteration in do_zboot_states()Simon Glass1-13/+14
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 <sjg@chromium.org>
2024-04-10x86: zboot: Move command code into its own fileSimon Glass1-0/+203
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 <sjg@chromium.org>