- 05 4月, 2022 12 次提交
-
-
由 Dave Gerlach 提交于
Use the appropriate fdtdec_setup_mem_size_base and fdtdec_setup_bank_size calls in dram_init and dram_bank_init to pull these values from DT, where they are already available, instead of hardcoding them. Signed-off-by: NDave Gerlach <d-gerlach@ti.com>
-
由 Dave Gerlach 提交于
Mark the memory node with u-boot,dm-spl so we can use it from early SPL. Signed-off-by: NDave Gerlach <d-gerlach@ti.com>
-
由 Vignesh Raghavendra 提交于
Timer0 runs at 200MHz,and the clock-frequency defined in DT is incorrect. Fix it. Signed-off-by: NVignesh Raghavendra <vigneshr@ti.com> Reviewed-By: NNishanth Menon <nm@ti.com>
-
由 Vignesh Raghavendra 提交于
On arm64 systems, recommendation is to use per-cpu timer for time keeping. Currently AM64 ends up using DM timer as tick timer as driver is enabled in the config. Drop OMAP DM Timer related configs, this will switch to using armv8 per-cpu timer as tick timer for A53 SPL/U-Boot. Signed-off-by: NVignesh Raghavendra <vigneshr@ti.com> Reviewed-By: NNishanth Menon <nm@ti.com>
-
由 Hari Nagalla 提交于
Enable ESM driver for AM64x R5 SPL/u-boot builds. Signed-off-by: NHari Nagalla <hnagalla@ti.com> Reviewed-by: NChristian Gmeiner <christian.gmeiner@gmail.com>
-
由 Hari Nagalla 提交于
On AM64x devices, it is possible to route Main ESM0 error events to MCU ESM. MCU ESM high error output can trigger the reset logic to reset the device. So, for these devices we expect two ESM device nodes in the device tree, one for Main ESM and the another MCU ESM in the device tree. When these ESM device nodes are properly configired it is possible to route the Main RTI0 WWDT output to the MCU ESM high output through Main ESM and trigger a device reset when CTRLMMR_MCU_RST_CTRL:MCU_ESM_ERROR_RESET_EN_Z is set to '0'. On K3 AM64x devices, the R5 SPL u-boot handles the ESM device node configurations. Signed-off-by: NHari Nagalla <hnagalla@ti.com> Reviewed-by: NChristian Gmeiner <christian.gmeiner@gmail.com>
-
由 Hari Nagalla 提交于
Enable access to ESM0 configuration space and add Main ESM0 and MCU ESM nodes to the AM64 device tree. Signed-off-by: NHari Nagalla <hnagalla@ti.com> Reviewed-by: NChristian Gmeiner <christian.gmeiner@gmail.com>
-
由 Hari Nagalla 提交于
Add functionality to enable, set priority to the input events and to route to MCU ESM. On AM64x/AM62x devices, it is possible to route Main ESM0 error events to MCU ESM. When these error events are routed to MCU ESM high output, it can trigger the reset logic to reset the device, when CTRLMMR_MCU_RST_CTRL:MCU_ESM_ERROR_RESET_EN_Z is set to '0'. K3 based J7 devices (ex: J721e) also have ESM modules, and the changes to the driver does not impact those devices. Signed-off-by: NHari Nagalla <hnagalla@ti.com> Reviewed-by: NChristian Gmeiner <christian.gmeiner@gmail.com>
-
由 Dzmitry Sankouski 提交于
U-boot is intended to replace linux kernel in android boot image(ABL), and it's FIT payload to replace initramfs file. The boot process is similar to boot image with linux: - android bootloader (ABL) unpacks android boot image - ABL sets `linux,initrd-start property` in chosen node in unpacked FDT - ABL sets x0 register to FDT address, and passes control to u-boot - u-boot reads x0 register, and stores it in `prevbl_fdt_addr` env variable - u-boot reads `linux,initrd-start` property, and stores it in `prevbl_initrd_start_addr` In this way, u-boot bootcmd relies on `prevbl_initrd_start_addr` env variable, and boils down to `bootm $prevbl_initrd_start_addr`. If more control on boot process is desired, pack a boot script in FIT image, and put it to default configuration What done: - Rearrange defconfig option order - Add CONFIG_SAVE_PREV_BL_* options - Doc updates: - remove wrong SBOOT memory corruption note, because memory is changed during u-boot bringup process, not by SBOOT - put payload on ramdisk place in abl boot image creation step Signed-off-by: NDzmitry Sankouski <dsankouski@gmail.com>
-
由 Dzmitry Sankouski 提交于
U-boot is intended to replace linux kernel in android boot image(ABL), and it's FIT payload to replace initramfs file. The boot process is similar to boot image with linux: - android bootloader (ABL) unpacks android boot image - ABL sets `linux,initrd-start property` in chosen node in unpacked FDT - ABL sets x0 register to FDT address, and passes control to u-boot - u-boot reads x0 register, and stores it in `prevbl_fdt_addr` env variable - u-boot reads `linux,initrd-start` property, and stores it in `prevbl_initrd_start_addr` In this way, u-boot bootcmd relies on `prevbl_initrd_start_addr` env variable, and boils down to `bootm $prevbl_initrd_start_addr`. If more control on boot process is desired, pack a boot script in FIT image, and put it to default configuration What done: - strip unneeded config options - add FIT image support - add framebuffer node, u-boot logo and video console - increase LMB_MAX_REGIONS, to store all linux dtb reserved memory regions - add linux kernel image header Uart driver causes hang, when u-boot is used in android boot image instead of linux. Temporary disable console driver, until investigated and fixed. Signed-off-by: NDzmitry Sankouski <dsankouski@gmail.com> Cc: Ramon Fried <rfried.dev@gmail.com>
-
由 Dzmitry Sankouski 提交于
When u-boot is used as a chain-loaded bootloader (replacing OS kernel), previous bootloader leaves data in RAM, that can be reused. For example, on recent arm linux system, when chainloading u-boot, there are initramfs and fdt in RAM prepared for OS booting. Initramfs may be modified to store u-boot's payload, thus providing the ability to use chainloaded u-boot to boot OS without any storage support. Two config options added: - SAVE_PREV_BL_INITRAMFS_START_ADDR saves initramfs start address to 'prevbl_initrd_start_addr' environment variable - SAVE_PREV_BL_FDT_ADDR saves fdt address to 'prevbl_fdt_addr' environment variable Signed-off-by: NDzmitry Sankouski <dsankouski@gmail.com> Cc: Tom Rini <trini@konsulko.com>
-
由 Alexander Graf 提交于
We already support the NVMe commands and PCIe backend in the QEMU target, so let's make it easy for anyone to consume them and enable NVMe distro boot along the way! With this patch, I can put an NVMe backed disk image into my QEMU VM and have it automatically load a UEFI target blob. Signed-off-by: NAlexander Graf <agraf@csgraf.de> Reviewed-by: NMark Kettenis <kettenis@openbsd.org>
-
- 04 4月, 2022 4 次提交
-
-
由 Tom Rini 提交于
Signed-off-by: NTom Rini <trini@konsulko.com>
-
由 Tom Rini 提交于
Signed-off-by: NTom Rini <trini@konsulko.com>
-
https://source.denx.de/u-boot/custodians/u-boot-at91由 Tom Rini 提交于
First set of u-boot-at91 features for the 2022.07 cycle: This feature set includes the new driver for the Atmel TCB timer, alignment in DT for sama7g5 and sama7g5ek board, one Kconfig conversion for external reset, and the usage of Galois tables from ROM for sama5d2 device.
-
由 Andrey Zhizhikin 提交于
If include/generated/env.in does not exist, which is a typical case for clean build, quiet_cmd_gen_envp command tries to delete this file unconditionally. This produces following warning during the build: ENVP include/generated/env.in rm: cannot remove 'include/generated/env.in': No such file or directory Add '-f' option to the `rm` command to not complain if file does not exist. Fixes: f432eb6d ("env: Avoid using a leftover text-environment file") Reviewed-by: NSean Anderson <seanga2@gmail.com> Signed-off-by: NAndrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
-
- 03 4月, 2022 2 次提交
-
-
由 Tom Rini 提交于
Unfortunately, we require additional logic to buildman to support this removal and still use SYS_SOC, etc, for build targets. This reverts commit eeec0007. Signed-off-by: NTom Rini <trini@konsulko.com>
-
由 Tom Rini 提交于
This brings in two related series. The first from Andre: This series is the continuation of last year's effort to support the new Armv8-R64 application profile. This led to a significant rework of the existing fastmodel (FVP) support, to both upgrade it to newest U-Boot standards (OF_CONTROL and distro_boot support), but also to generalise the code, so that plugging in the v8-R64 support in the last patch gets much easier. This is because apart from the twisted memory map between the two profiles there is actually little difference, when it comes to U-Boot relevant parts of the hardware. I kept the legacy semihosting support (which picks up magic files from the current directory), but if that fails, we go and try virtio-blk (.iso installer images work), then virtio-net. Please have a look, and give it a try, if possible. Both the v8-R and v8-A FVP models are available for free on the Arm website[1]. Patch 01/11 fixes a regression introduced in December, it should be applied now. The rest of the patches are for the next merge window. [1] https://developer.arm.com/tools-and-software/simulation-models/fast-models And the second from Sean (where we exclude 27, 28 and 29 for now): This cleans up the semihosting code and adds the following new features: - hostfs support (like sandbox) - support for being used as a SPL boot device - serial device support - falling back to normal drivers if semihosting is disabled The main device affected by these changes is vexpress64, so I'd appreciate if Andre (or anyone else) could try booting. These changes are motivated by bringup for ls1046a. When forcing JTAG boot, this device disables most communication peripherals, including serial and ethernet devices. This appears to be fixed in later generation devices, but we are stuck with it for now. Semihosting provides an easy way to run a few console commands. The patches in this series are organized as follows: 0-4: rST conversions and other documentation updates 5-9: Semihosting cleanups 10-14: Filesystem support (including SPL boot device) 15-16: Serial support 16: Documentation update 17: JTAG boot support for LS1046A 19-25: Semihosting fallback 26-29: DM puts support The last two groups of patches are "bonus;" the first 17 patches stand on their own. The last two groups could be broken out as separate series, but I have kept them in this one to help with my sanity (and not have to deal with too many outstanding series). Patch 14 depends on [1] to apply cleanly. Patch 17 depends on [2] for correctness. This series should be applied to u-boot/next (in particular, the EROFS series must have been applied). [1] https://lore.kernel.org/u-boot/CACRpkdZ+9fmNjC_mvrbPa9-iuTQVd8UkJ7Zpe7cL0c5vZygsVw@mail.gmail.com/T/ [2] https://lore.kernel.org/u-boot/20220222183840.1355337-2-sean.anderson@seco.com/
-
- 02 4月, 2022 22 次提交
-
-
由 Sean Anderson 提交于
Some serial drivers can be vastly more efficient when printing multiple characters at once. Non-DM serial has had a puts option for these sorts of drivers; implement it for DM serial as well. Because we have to add carriage returns, we can't just pass the whole string directly to the serial driver. Instead, we print up to the newline, then print a carriage return, and then continue on. This is less efficient, but it is better than printing each character individually. It also avoids having to allocate memory just to add a few characters. Drivers may perform short writes (such as filling a FIFO) and return the number of characters written in len. We loop over them in the same way that _serial_putc loops over putc. This results in around sizeof(void *) growth for all boards with DM_SERIAL. The full implementation takes around 140 bytes. Signed-off-by: NSean Anderson <sean.anderson@seco.com> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
由 Sean Anderson 提交于
Use the semihosting_enabled function to determine whether or not to enable semihosting devices. This allows for graceful fallback in the event a debugger is not attached. Signed-off-by: NSean Anderson <sean.anderson@seco.com>
-
由 Sean Anderson 提交于
If semihosting is disabled, then the user has no debugger attached, and will not see any messages. Don't create a serial device in this instance, to (hopefully) fall back on another working serial device. Signed-off-by: NSean Anderson <sean.anderson@seco.com>
-
由 Sean Anderson 提交于
If a debugger is not attached to U-Boot, semihosting calls will raise a synchronous abort exception. Try to catch this and disable semihosting so we can e.g. use another uart if one is available. In the immediate case, we return an error, since it is not always possible to check for semihosting beforehand (debug uart, user-initiated load command, etc.) We handle all possible semihosting instructions, which is probably overkill. However, we do need to keep track of what instruction set we're using so that we don't suppress an actual error. A future enhancement could try to determine semihosting capability by inspecting the processor state. There's an example of this at [1] for RISC-V. The equivalent for ARM would inspect the monitor modei enable/select bits of the DSCR. However, as the article notes, an exception handler is still helpful in order to catch disconnected debuggers. [1] https://tomverbeure.github.io/2021/12/30/Semihosting-on-RISCV.html#avoiding-hangs-when-a-debugger-is-not-connectedSigned-off-by: NSean Anderson <sean.anderson@seco.com>
-
由 Sean Anderson 提交于
These functions are intended to support detecting semihosting and falling back gracefully to alternative implementations. The test starts by making semihosting call. SYS_ERRNO is chosen because it should not mutate any state. If this semihosting call results in an exception (rather than being caught by the debugger), then the exception handler should call disable_semihosting() and resume execution after the call. Ideally, this would just be part of semihosting by default, and not a separate config. However, to reduce space ARM SPL doesn't include exception vectors by default. This means we can't detect if a semihosting call failed unless we enable them. To avoid forcing them to be enabled, we use a separate config option. It might also be possible to try and detect whether a debugger has enabled (by reading HDE from DSCR), but I wasn't able to figure out a way to do this from all ELs. This patch just introduces the generic code to handle detection. The next patch will implement it for arm64 (but not arm32). Signed-off-by: NSean Anderson <sean.anderson@seco.com>
-
由 Sean Anderson 提交于
This imports some defines for esr and spsr from Linux v5.16. I have modified the includes and fixed some indentation nits but otherwise it is the same. There are a lot more defines than we need, but it doesn't hurt. Signed-off-by: NSean Anderson <sean.anderson@seco.com>
-
由 Sean Anderson 提交于
This register holds "pstate" which includes (among other things) the instruction mode the CPU was in when the exception was taken. This is necessary to correctly interpret instructions at elr. Signed-off-by: NSean Anderson <sean.anderson@seco.com>
-
由 Sean Anderson 提交于
To avoid passing around an extra register everywhere, save esr in pt_regs like the rest. For proper alignment we need to have a second (unused) register. All the printfs have to be adjusted, since it's now an unsigned long and not an int. Signed-off-by: NSean Anderson <sean.anderson@seco.com>
-
由 Sean Anderson 提交于
This adds support for booting entirely from JTAG while using a hard-coded RCW. With these steps, it is not necessary to program a "good" RCW using CodeWarrior. The method here can be performed with any JTAG adapter supported by OpenOCD, including the on-board CMSIS-DAP (albeit very slowly). These steps require LS1046A support in OpenOCD, which was added in [1]. [1] https://sourceforge.net/p/openocd/code/ci/5b70c1f679755677c925b4e6dd2c3d8be4715717/Signed-off-by: NSean Anderson <sean.anderson@seco.com> [trini: Add reference to doc/board/nxp/ls1046ardb.rst]
-
由 Sean Anderson 提交于
This documents how to use semihosting, the new semihosting features, and how to migrate from smhload. Signed-off-by: NSean Anderson <sean.anderson@seco.com>
-
由 Sean Anderson 提交于
This adds a serial driver which uses semihosting calls to read and write to the host's console. For convenience, if CONFIG_DM_SERIAL is enabled, we will instantiate a serial driver. This allows users to enable this driver (which has no physical device) without modifying their device trees or board files. We also implement a non-DM driver for SPL, or for much faster output in U-Boot proper. There are three ways to print to the console: Method Baud ================== ===== smh_putc in a loop 170 smh_puts 1600 smh_write with :tt 20000 ================== ===== These speeds were measured using a 175 character message with a J-Link adapter. For reference, U-Boot typically prints around 2700 characters during boot on this board. There are two major factors affecting the speed of these functions. First, each breakpoint incurs a delay. Second, each debugger memory transaction incurs a delay. smh_putc has a breakpoint and memory transaction for every character. smh_puts has one breakpoint, but still has to use a transaction for every character. This is because we don't know the length up front, so OpenOCD has to check if each character is nul. smh_write has only one breakpoint and one memory transfer. DM serial drivers can only implement a putc interface, so we are stuck with the slowest API. Non-DM drivers can implement puts, which is vastly more efficient. When the driver starts up, we try to open :tt. Since this is an extension, this may fail. If it does, we fall back to smh_puts. We don't check :semihosting-features, since there are nonconforming implementations (OpenOCD) which don't implement it (but *do* implement :tt). Some semihosting implementations (QEMU) don't handle READC properly. To work around this, we try to use open/read (much like for stdin) if possible. There is no non-blocking I/O available, so we don't implement pending. This will cause __serial_tstc to always return true. If CONFIG_SERIAL_RX_BUFFER is enabled, _serial_tstc will try and read characters forever. To avoid this, we depend on this config being disabled. Signed-off-by: NSean Anderson <sean.anderson@seco.com> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
由 Sean Anderson 提交于
This adds three wrappers around the semihosting commands for reading and writing to the host console. We use the more standard getc/putc/puts names instead of readc/writec/write0 for familiarity. Signed-off-by: NSean Anderson <sean.anderson@seco.com>
-
由 Sean Anderson 提交于
This command's functionality is now completely implemented by the standard fs load command. Convert the vexpress64 boot command (which is the only user) and remove the implementation. Signed-off-by: NSean Anderson <sean.anderson@seco.com>
-
由 Sean Anderson 提交于
Most U-Boot command deal with start/size instead of start/end. Convert the "fdt chosen" command to use these semantics as well. The only user of this subcommand is vexpress, so convert the smhload command to use this as well. We don't bother renaming the variable in vexpress64's bootcommand, since it will be rewritten in the next commit. Signed-off-by: NSean Anderson <sean.anderson@seco.com>
-
由 Sean Anderson 提交于
This adds a filesystem which is backed by the host's filesystem. It is modeled off of sandboxfs, which has very similar aims. Semihosting doesn't support listing directories (except with SYS_SYSTEM), so neither do we. it's possible to optimize a bit for the common case of reading a whole file by omitting a call to smh_seek, but this is left as a future optimization. Signed-off-by: NSean Anderson <sean.anderson@seco.com>
-
由 Sean Anderson 提交于
This adds a boot method for loading the next stage from the host. It is mostly modeled off of spl_load_image_ext. I am not really sure why/how spl_load_image_fat uses three different methods to load the image, but the simple case seems to work OK for now. To control the presence of this boot method, we add a config symbol. While we're at it, we update the original semihosting config symbol. I think semihosting has some advantages of other forms of JTAG boot. Common other ways to boot from JTAG include: - Implementing DDR initialization through JTAG (typically with dozens of lines of TCL) and then loading U-Boot. The DDR initialization typically uses hard-coded register writes, and is not easily adapted to different boards. BOOT_DEVICE_SMH allows booting with SPL, leveraging U-Boot's existing DDR initialization code. This is the method used by NXP's CodeWarrior IDE on Layerscape processors (see AN12270). - Loading a bootloader into SDRAM, waiting for it to initialize DDR, and then loading U-Boot. This is tricky, because the debugger must stop the boot after the bootloader has completed its work. Trying to load U-Boot too early can cause failure to boot. This is the method used by Xilinx with its Zynq(MP) processors. - Loading SPL with BOOT_DEVICE_RAM and breaking before SPL loads the image to load U-Boot at the appropriate place. This can be a bit tricky, because the load address is dependent on the header size. An elf with symbols must also be used in order to stop at the appropriate point. BOOT_DEVICE_SMH can be viewed as an extension of this process, where SPL automatically stops and tells the host where to place the image. Signed-off-by: NSean Anderson <sean.anderson@seco.com>
-
由 Sean Anderson 提交于
In order to add filesystem support, we will need to be able to seek and write files. Add the appropriate helper functions. Signed-off-by: NSean Anderson <sean.anderson@seco.com>
-
由 Sean Anderson 提交于
This adds some documentation for semihosting functions in the header. Signed-off-by: NSean Anderson <sean.anderson@seco.com>
-
由 Sean Anderson 提交于
Instead of printing in what are now library functions, try to return a numeric error code. This also adjust some functions (such as read) to behave more similarly to read(2). For example, we now return the number of bytes read instead of failing immediately on a short read. Signed-off-by: NSean Anderson <sean.anderson@seco.com>
-
由 Sean Anderson 提交于
There's no point in using string constants for smh_open if we are just going to have to parse them. Instead, use numeric modes. The user needs to be a bit careful with these, since they are much closer semantically to string modes used by fopen(3) than the numeric modes used with open(2). Signed-off-by: NSean Anderson <sean.anderson@seco.com>
-
由 Sean Anderson 提交于
This exports semihosting functions for use in other files. The header is in include/ and not arm/include/asm because I anticipate that RISC-V may want to add their own implementation at some point. smh_len_fd has been renamed to smh_flen to more closely match the semihosting spec. Signed-off-by: NSean Anderson <sean.anderson@seco.com>
-
由 Sean Anderson 提交于
These files are spread all over the tree, so just use a regex. Orphaned for now, since this is more of a "one-off" series. Though I'll be happy to review patches. Signed-off-by: NSean Anderson <sean.anderson@seco.com>
-