summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-11-10arm: semihosting: Support semihosting fallback on 32-bit ARMSean Anderson
Add support for a semihosting fallback on 32-bit ARM. The assembly is lightly adapted from the irq return code, except there is no offset since lr already points to the correct instruction. The C side is mostly like ARM64, except we have fewer cases to deal with. Signed-off-by: Sean Anderson <sean.anderson@seco.com>
2023-11-10arm: semihosting: Fix returning from traps on ARMv6 and lowerSean Anderson
U-Boot runs in supervisor mode. On ARMv6 and lower, software interrupts are taken in supervisor mode. When entering an interrupt, the link register is set to the address of the next instruction. However, if we are already in supervisor mode, this clobbers the link register. The debugger can't help us, since by the time it notices we've taken a software interrupt, the link register is already gone. Work around this by moving the return address to another register. Signed-off-by: Sean Anderson <sean.anderson@seco.com>
2023-11-10arm: Fix software interrupt handlerSean Anderson
When we take a software interrupt, we are already in supervisor mode. get_bad_stack assumes we are not in supervisor mode so it can clobber the stack pointer. This causes us to have an invalid stack once that macro finishes. Revert back to the get_bad_stack_swi macro which was previously removed. Fixes: 41623c91b09 ("arm: move exception handling out of start.S files") Signed-off-by: Sean Anderson <sean.anderson@seco.com>
2023-11-07scsi: Forceably finish migration to DM_SCSITom Rini
The migration deadline for moving to DM_SCSI was v2023.04. A further reminder was sent out in August 2023 to the remaining platforms that had not migrated already, and that a few more over the line (or configs deleted). With this commit we: - Rename CONFIG_DM_SCSI to CONFIG_SCSI. - Remove all of the non-DM SCSI code. This includes removing other legacy symbols and code and removes some legacy non-DM AHCI code. - Some platforms that had previously been DM_SCSI=y && SCSI=n are now fully migrated to DM_SCSI as a few corner cases in the code assumed DM_SCSI=y meant SCSI=y. Signed-off-by: Tom Rini <trini@konsulko.com>
2023-11-07Merge branch '2023-11-07-assorted-big-cleanups' into nextTom Rini
- Merge in changes such that CONFIG_CMDLINE can be disabled and merge in a series that starts to remove <common.h> usage.
2023-11-07x86: Drop <common.h> from remaining header filesTom Rini
None of these header files need to include <common.h> so we can just drop that entirely. Signed-off-by: Tom Rini <trini@konsulko.com>
2023-11-07arm: Drop <common.h> from remaining header filesTom Rini
None of these header files need to include <common.h> so we can just drop that entirely. Signed-off-by: Tom Rini <trini@konsulko.com>
2023-11-07sandbox: Drop <common.h>Tom Rini
None of these headers need <common.h> to be included, drop it. Signed-off-by: Tom Rini <trini@konsulko.com>
2023-11-07ti: k3: Drop <common.h> usageTom Rini
None of these files need <common.h> to be included, drop it. Signed-off-by: Tom Rini <trini@konsulko.com>
2023-11-07include: Drop <common.h> from include listsTom Rini
At this point, we don't need to have <common.h> be included because of properties in the header itself, it only includes other common header files. We've also audited the code enough at this point that we can drop <common.h> from being included in headers and rely on code to have the correct inclusions themselves, or at least <common.h>. Signed-off-by: Tom Rini <trini@konsulko.com>
2023-11-07include/linux/mii.h: Add <linux/types.h>Tom Rini
As this file uses u8/u16 we need to bring in <linux/types.h> here. Signed-off-by: Tom Rini <trini@konsulko.com>
2023-11-07fsl-mc: Add prototype for bd_infoTom Rini
As the functions fsl_mc_ldpaa_init/fsl_mc_ldpaa_exit take a bd_info as an argument, add a struct bd_info to this header file rather than add <asm/u-boot.h> to the overall chain. Signed-off-by: Tom Rini <trini@konsulko.com>
2023-11-07ls2080aqds: Add missing headers to eth_ls1088aqds.cTom Rini
As we call sprintf in this file we need to include vsprintf.h in order to get the function prototype and we need linux/string.h for strcmp. Signed-off-by: Tom Rini <trini@konsulko.com>
2023-11-07ls1088a: Add missing headers to eth_ls1088aqds.cTom Rini
As we call sprintf in this file we need to include vsprintf.h in order to get the function prototype and we need linux/string.h for strcmp. Signed-off-by: Tom Rini <trini@konsulko.com>
2023-11-07pg-wcom-ls102xa: Include <config.h> in the board fileTom Rini
Given that this file references CFG_* defines, we need to be explicit in our inclusion of config.h, so that these will be defined. Reviewed-by: Aleksandar Gerasimovski <aleksandar.gerasimovski@hitacienergy.com> Signed-off-by: Tom Rini <trini@konsulko.com>
2023-11-07powerpc: Rework <asm/fsl_lbc.h> includesTom Rini
This file should not include <config.h> nor should it include <common.h> so remove both. Signed-off-by: Tom Rini <trini@konsulko.com>
2023-11-07qe: Add <asm/ppc.h> on PowerPCTom Rini
This driver needs <asm/ppc.h> when building on PowerPC, add it. Signed-off-by: Tom Rini <trini@konsulko.com>
2023-11-07mpc85xx: Add missing include in mpc85xx_sleep.cTom Rini
This file needs the include file that provides the prototypes for flush_dcache() and others. Signed-off-by: Tom Rini <trini@konsulko.com>
2023-11-07powerpc: mpc83xx: Rework includes slightlyTom Rini
In order to not rely on common.h providing a number of common includes, cleanup what we include directly in order to be able to drop common.h later. Signed-off-by: Tom Rini <trini@konsulko.com>
2023-11-07spi: Add <errno.h> to spi-mem-nodm.cTom Rini
This file uses errno return values in functions, so include <errno.h> here rather than rely on indirect inclusion. Signed-off-by: Tom Rini <trini@konsulko.com>
2023-11-07omap3: Add <asm/arch/omap3.h> to <asm/arch/cpu.h>Tom Rini
The include <asm/arch/cpu.h> references values in <asm/arch/omap3.h> and so include it directly here rather than rely on indirect inclusion. Signed-off-by: Tom Rini <trini@konsulko.com>
2023-11-07fsl_qe: Drop common.hTom Rini
In both include/fsl_qe.h and then also remove common.h from the files which had included fsl_qe.h Signed-off-by: Tom Rini <trini@konsulko.com>
2023-11-07display_options.h: Correct includesTom Rini
First, a header should never include itself so remove that. Second, this header needs <linux/types.h> to be included as the function prototypes use types that we get via that header. Signed-off-by: Tom Rini <trini@konsulko.com>
2023-11-07powerpc: Switch <asm/global_data.h> to <linux/types.h>Tom Rini
In matching other architectures that have their global_data.h need to bring in a types.h header, switch to <linux/types.h> on PowerPC. Signed-off-by: Tom Rini <trini@konsulko.com>
2023-11-07m68k: Remove CONFIG_FSLDMAFECTom Rini
There are no platforms which enable this feature, so remove it. Signed-off-by: Tom Rini <trini@konsulko.com>
2023-11-07CI, pytest: Add a test for sandbox without LTOTom Rini
The primary motivation for having a sandbox without LTO build in CI is to ensure that we don't have that option break. We now have the ability to run tests of specific options being enabled/disabled, so drop the parts of CI that build and test that configuration specifically and add a build test instead. We still test that "NO_LTO=1" rather than editing the config file works via the ftrace tests. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com>
2023-11-07sandbox: Add a test for disabling CONFIG_CMDLINESimon Glass
Now that everything is working, add a test to make sure that this builds correctly. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2023-11-07clk_k210.c: Clean up how we handle nopTom Rini
Now that sandbox has <asm/barrier.h> and defines nop() there we should include that in our driver for clarity and then remove our local nop() from <k210/pll.h>. Reviewed-by: Sean Anderson <seanga2@gmail.com> Signed-off-by: Tom Rini <trini@konsulko.com>
2023-11-07sandbox: Add <asm/barrier.h>Tom Rini
Add a mostly empty asm/barrier.h file for sandbox where we define nop() to be an empty function. Reviewed-by: Sean Anderson <seanga2@gmail.com> Signed-off-by: Tom Rini <trini@konsulko.com>
2023-11-07sandbox: Avoid requiring CMDLINESimon Glass
Add some dependencies on features that we had been selecting so that we can still disable CMDLINE. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com>
2023-11-07sandbox: Disable CONFIG_DISTRO_DEFAULTSSimon Glass
This is not used for sandbox, so drop it. Enable the things that it controls to avoid dstrastic changes in the config settings for sandbox builds. The end result is that these are enabled: BOOTMETH_DISTRO BOOTSTD_DEFAULTS and these are disabled: USE_BOOTCOMMAND BOOTCOMMAND (was "run distro_bootcmd") DISTRO_DEFAULTS Note that the tools-only build has already disabled DISTRO_DEFAULTS and BOOTSTD_FULL Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com>
2023-11-07block: rkmtd: select CONFIG_RANDOM_UUID explicitlyAKASHI Takahiro
This option is necessary to compile any way. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
2023-11-07lib: uuid: move CONFIG_RANDOM_UUIDAKASHI Takahiro
This option is independent from any commands and should be managed under lib. For instance, drivers/block/rkmtd.c is a user. It would be better to remove this configuration. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2023-11-07fastboot: Depend on CMDLINETom Rini
Much of the functionality of fastboot relies on being able to run commands as defined in the environment. This means it does depend on CMDLINE being enabled. Signed-off-by: Tom Rini <trini@konsulko.com>
2023-11-07cmd: Make most commands depend on CMDLINESimon Glass
If we disable CMDLINE then we should not ask about enabling the hush parser nor any of the commands that would be run on the command line as it is no longer available. Convert the CMDLINE option into a menuconfig and make every command referenced under cmd/Kconfig depend on it. This leaves as future work moving the commands that are not under the cmd/ hierarchy as future work. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com>
2023-11-07boot: Make preboot and bootcmd require CMDLINETom Rini
In order for a predefined "preboot" or "bootcmd" to be executed by the running system we must have a command line. Add CMDLINE as a dependency. Signed-off-by: Tom Rini <trini@konsulko.com>
2023-11-07bootmeth_script: Depend on CMDLINETom Rini
As this particular bootmeth requires the command line and assorted commands to function, make sure we have CMDLINE enabled. Signed-off-by: Tom Rini <trini@konsulko.com>
2023-11-07bootmeth_cros: Require bootm.o and bootm_os.oTom Rini
In order to use bootmeth_cros, at least on non-X86, we need to be able to start any type of kernel that the "bootm" code paths can handle. Add these objects to the required list for this option. Signed-off-by: Tom Rini <trini@konsulko.com>
2023-11-07boot: Move SYS_BOOTM_LEN to be by LEGACY_IMAGE_FORMATTom Rini
This particular option is required for booting all image types, regardless of if we are starting an OS via command line or something else. Move the question for SYS_BOOTM_LEN to be by the question for LEGACY_IMAGE_FORMAT, as that's where our generic OS questions start. Signed-off-by: Tom Rini <trini@konsulko.com>
2023-11-07boot: Rework BOOT_DEFAULTS to allow for CMDLINE to be disabledTom Rini
We split BOOT_DEFAULTS to have BOOT_DEFAULTS_FEATURES and BOOT_DEFAULTS_CMDS that in turn list general features or commands that we want enabled when BOOT_DEFAULTS is selected. We only select BOOT_DEFAULTS_CMDS if CMDLINE is set. Signed-off-by: Tom Rini <trini@konsulko.com>
2023-11-07boot: Make DISTRO_DEFAULTS select CMDLINETom Rini
The implementation of DISTRO_DEFAULTS is done in environment scripts and requires the command line in order to work. Because of this, select CMDLINE here. Signed-off-by: Tom Rini <trini@konsulko.com>
2023-11-07autoboot: Correct dependencies on CMDLINESimon Glass
Make AUTOBOOT depend on CMDLINE since it is mostly meaningless without it. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2023-11-07bootmeth: Make BOOTMETH_EFILOADER depend on CMD_BOOTEFITom Rini
Today, the bootmeth for using the EFI loader via bootefi depends on calling the bootefi command directly, so make this in turn depend on CMD_BOOTEFI. Signed-off-by: Tom Rini <trini@konsulko.com>
2023-11-07efi: Rearrange the Kconfig for CMD_BOOTEFI_BOOTMGRSimon Glass
The command should not be used to enable library functionality. Add a new BOOTEFI_BOOTMGR Kconfig for that. Adjust the conditions so that the same code is built. Signed-off-by: Simon Glass <sjg@chromium.org> Suggested-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
2023-11-07cli_simple: Rework this support slightlyTom Rini
The interactive portion of our non-HUSH 'simple' parser is guarded by CONFIG_CMDLINE already. Much of the code behind this simple parser is also used as "input" parser, such as from menu interfaces and so forth and not strictly command line input. To support this, always build the assorted cli object files, but guard the interactive portions of cli_simple.c with a CMDLINE check. Signed-off-by: Tom Rini <trini@konsulko.com>
2023-11-07video: Don't require the font commandSimon Glass
While it is nice to have the font command, using 'select' makes it impossible to build the console code without it. Stop using 'select' and make it default if CONSOLE_TRUETYPE is enabled when asking the command. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com>
2023-11-07test: Make UNIT_TEST depend on CMDLINESimon Glass
Many tests make some use of the command line, so require it for all test code. This could be teased apart, perhaps with a test flag indicating that it uses the command line. Leave that for later. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2023-11-07env: Move env_set() out of cmd/nvedit.c and in to env/common.cTom Rini
Inside of env/common.c we already have our helper env_set_xxx functions, and even have a comment that explains why env_set() itself wasn't moved. We now handle that move. This requires that we rename the previous _do_env_set() to env_do_env_set() and note it as an internal env function. Add comments about this function to explain why we do this when we add the prototype. Add a new function, env_inc_id() to allow for the counter to be updated by both commands and callers, and document this as well by the prototype. Signed-off-by: Tom Rini <trini@konsulko.com>
2023-11-07Kconfig: Move CONFIG_SYS_[CP]BSIZE to common/KconfigTom Rini
Move CONFIG_SYS_CBSIZE (console buffer size) and CONFIG_SYS_PBSIZE (console print buffer size) out of cmd/Kconfig and in to common/Kconfig. Create help entries for both which explain their usage and why they are both not entirely command centric. Signed-off-by: Tom Rini <trini@konsulko.com>
2023-11-07qemu: Correct CMD_QFW dependencies in KconfigTom Rini
Rather than selecting CMD_QFW, we should make the option itself by enabled by default on these platforms. Then in the board-specific Kconfig we should select the appropriate back-end as needed if the command is enabled. Signed-off-by: Tom Rini <trini@konsulko.com>