summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2025-04-03acpi: Mark struct acpi_rsdp as packedSimon Glass
At present the size of this struct is too large on 64-bit machines. Annotate it with __packed to fix this. Signed-off-by: Simon Glass <[email protected]>
2025-04-03x86: Support a 64-bit ramdisk addressSimon Glass
Add some missing pieces to bootparams so that a 64-bit ramdisk address can be used. Tidy up the logging while we are here. Signed-off-by: Simon Glass <[email protected]>
2025-04-03x86: emulation: Support BLOBLIST_TABLES properlySimon Glass
The existing QEMU implementation mostly ignored BLOBLIST_TABLES and allocates the bulk of the tables with malloc(). Update it to place all tables in the bloblist. Since QEMU declares a size of 128KB regardless of the size of its tables, this requires a larger bloblist. Fix up the e820 table to handle this, keeping the old code as an option for now, to assist with any future bug-fixing. Signed-off-by: Simon Glass <[email protected]>
2025-04-03x86: qemu: Use the new e820 APISimon Glass
Move over to use this API before making the code even more complicated. Signed-off-by: Simon Glass <[email protected]>
2025-04-03x86: Add a new API for e820Simon Glass
The existing mechanism is pretty painful as it requires manual calculations for anything but a trivial setup. Add a new API for adding e820 entries. Signed-off-by: Simon Glass <[email protected]>
2025-04-03x86: e820: Add a function to dump the e820 tableSimon Glass
There is already code for this in zimage. Move it to the e820 file so it can be used elsewhere. Signed-off-by: Simon Glass <[email protected]>
2025-04-03test/py: Allow tests to be filtered by roleSimon Glass
Some test can only be run by a particular board in a lab, e.g. because they are loaded with an OS image used by the test. Add a way to specify this in tests. Signed-off-by: Simon Glass <[email protected]>
2025-04-03test/py: Add a helper to send charactersSimon Glass
The existing run_command() method is not great for sending things other than U-Boot commands. Add a helper for sending arbitrary strings as well as control characters. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Tom Rini <[email protected]>
2025-04-03test/py: Correct sizing of created disksSimon Glass
At present the disks end up being 1MB shorter than they should be, since dd truncates by default. Move the code into a function and update it to avoid truncation. This resolves various warnings when running sandbox tests, of the form: mmc_bread() MMC: block number 0x9801 exceeds max(0x9800) caused by the FAT partition being scanning. Signed-off-by: Simon Glass <[email protected]>
2025-04-03x86: qemu: Support environment and cat commandSimon Glass
Add support for an environment stored in the first partition of the disk, which is assumed to hold a FAT filesystem. Support the 'cat' command as it is useful for looking at extlinux.conf files. Signed-off-by: Simon Glass <[email protected]>
2025-04-03x86: emulation: Set an MTRR for the RAMSimon Glass
QEMU likes to have an MTRR set up, just like real machines. Add an MTRR which covers the total RAM size. This does nothing on machines without MTRRs. Signed-off-by: Simon Glass <[email protected]>
2025-04-03x86: Allow adding non-aligned size for MTRRSimon Glass
At present mtrr_add_request() requires that the size is a power of two. This is too limiting for machines with 4GB (or more) of RAM, since they often must take account of a memory hole at 3GB. Update the function to automatically deal with an unaligned size, using more MTRRs as required. The algorithm is taken from coreboot commit 60bce10750 Signed-off-by: Simon Glass <[email protected]>
2025-04-03x86: Correct msr operation on amd64Simon Glass
The CONFIG option is no-longer correct since we can have SPL and PPL with different bitness. Fix this and sync up with Linux 6.13 in this area, since this is where the code came from many years ago. Signed-off-by: Simon Glass <[email protected]>
2025-04-03x86: Update cpuid_eax et al to work on amd64Simon Glass
The existing functions work but the register clobbers are wrong, so strange bugs results. The original functions were taken from a very old version of Linux. Update them from Linux 6.13 Signed-off-by: Simon Glass <[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-04-03x86: Support CPU functions in long modeSimon Glass
At present it is not possible to find out the physical-address size in long mode, so a predefined value is used. Update the macros to support this properly, since it is important when programming MTRRs. Signed-off-by: Simon Glass <[email protected]>
2025-04-03x86: Rename the _D dirty flagSimon Glass
This value happens to be used by ctype.h so chose a different name. Signed-off-by: Simon Glass <[email protected]>
2025-04-03x86: Use a simple jump into long modeSimon Glass
With the 64-bit descriptor we can use a jump instruction, rather than pushing things on the stack. Since the processor is in 64-bit mode by this point, pop a 64-bit value from the stack, containing the target address. This simplifies the code slightly, in particular its use of the stack. Signed-off-by: Simon Glass <[email protected]>
2025-04-03x86: Use the same GDT when jumping to long modeSimon Glass
Make use the existing GDT which now includes entries for 64-bit code. Leave the interrupt descriptors alone. They can be tidied up once U-Boot starts up. With this, kvm mode works with QEMU. Signed-off-by: Simon Glass <[email protected]> Fixes: https://source.denx.de/u-boot/custodians/u-boot-dm/-/issues/31
2025-04-03x86: Disable paging before changing to long modeSimon Glass
This is required as part of the procedure. The existing code works because it changes the GDT at the same time, but this makes kvm unhappy. Update the algorithm to disable and then re-enable paging. Signed-off-by: Simon Glass <[email protected]>
2025-04-03x86: Tidy up the GDT size in start/16.SSimon Glass
Use a symbol to select the size of the GDT, rather than hard-coding a value. This matches how it is done in start64 Signed-off-by: Simon Glass <[email protected]>
2025-04-03x86: Include stdbool.h in interrupt headerSimon Glass
This makes use of a 'bool' type, so include the required header. Signed-off-by: Simon Glass <[email protected]>
2025-04-03x86: Drop the message about features missing in 64-bitSimon Glass
This functions normally and has done for a while, so drop this scary message. Signed-off-by: Simon Glass <[email protected]>
2025-04-03x86: spl: Drop duplicate CPU initSimon Glass
x86_cpu_init_f() is called by arch_cpu_init() a few lines below this code. Drop the duplicate call. Signed-off-by: Simon Glass <[email protected]>
2025-04-03x86: Use defines for the cache flagsSimon Glass
Use some named flags when setting up the cache, so it is easier to see what is going on. Signed-off-by: Simon Glass <[email protected]>
2025-04-03x86: Add 64-bit entries to the GDTSimon Glass
At present it is not possible to execution 64-bit code without installing an entire new Global Descriptor Table. This is inconvenient since kvm does not seem to like switching into long mode with a new table. It isn't actually necessary, since we can just extend the existing table. Add some new entries to this effect. Signed-off-by: Simon Glass <[email protected]>
2025-04-03x86: Avoid clearing the VESA displaySimon Glass
U-Boot clears the display when it starts up, so there is no need to ask the VESA driver to do this. Fix this and add a comment explaining the flags. Signed-off-by: Simon Glass <[email protected]>
2025-04-03x86: Drop use of CONFIG_REALMODE_DEBUGSimon Glass
This option is not actually defined in Kconfig anymore. Use a normal debug print instead, which has a similar effect. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Tom Rini <[email protected]>
2025-04-03x86: Add some log categoriesSimon Glass
Add categories for i8259 and bios files, so that log statements have the right category. Signed-off-by: Simon Glass <[email protected]>
2025-04-03x86: Drop mpspec from the SPL buildSimon Glass
This is not needed in SPL, so drop it. Signed-off-by: Simon Glass <[email protected]>
2025-04-03x86: qemu: Avoid accessing BSS too earlySimon Glass
BSS is placed in DRAM which is actually available early with QEMU. But it is cleared by the init sequence, so values stored there are lost. Move the system-type flag into a function, instead. Signed-off-by: Simon Glass <[email protected]>
2025-04-03x86: qemu: Enable dhrystoneSimon Glass
Provide the 'dhry' command, which helps to check that kvm is being used properly with QEMU. Signed-off-by: Simon Glass <[email protected]>
2025-04-03x86: qemu: Switch to bochs displaySimon Glass
The vesa display is widely used on hardware, but it is a bit of a pain with QEMU. It requires executing option ROMs, which either doesn't work with kvm, or is difficult to do in a kvm/QEMU-friendly way. THe bochs display is probably better anyway, so switch to that. It works fine with kvm as it doesn't need an option ROM. Signed-off-by: Simon Glass <[email protected]> Fixes: https://source.denx.de/u-boot/custodians/u-boot-dm/-/issues/31
2025-04-03x86: Expand x86_64 early memorySimon Glass
The SPL and pre-reloc malloc()-space is not large enough to start up with a display. Expand it. Switch the order of SPL_SYS_MALLOC_F_LEN and SPL_TEXT_BASE since this matches what 'savedefconfig' gives us. Signed-off-by: Simon Glass <[email protected]>
2025-04-03sandbox: Correct a typo in mapmemSimon Glass
This should say 'cast', not 'case', so fix it. Signed-off-by: Simon Glass <[email protected]>
2025-04-03Merge patch series "acpi_table: Fix IORT RC node"Tom Rini
This series from Patrick Rudolph <[email protected]> brings in an assortment of ACPI related fixes. Link: https://lore.kernel.org/r/[email protected]
2025-04-03test: acpi: Add IORT testsPatrick Rudolph
Add tests for IORT table generation: - SMMU_V3 node - RC node Signed-off-by: Patrick Rudolph <[email protected]>
2025-04-03acpi: Conditionally set mapping_offset in IORTPatrick Rudolph
The spec recommends to set the mapping_offset only when there are ID mappings as indicated by the mapping_count field. Signed-off-by: Patrick Rudolph <[email protected]>
2025-04-03acpi: Clear reserved bits in IORTPatrick Rudolph
The IORT spec says that reserved bits must be set to zero, thus clear all fields of the struct before starting to fill out non-reserved fields. Signed-off-by: Patrick Rudolph <[email protected]>
2025-04-03acpi_table: Add asserts in IORTPatrick Rudolph
Check that the provided offsets are really pointing to a node that have been previously written and are of the correct type. Signed-off-by: Patrick Rudolph <[email protected]>
2025-04-03acpi_table: Fix IORT RC nodePatrick Rudolph
Even though the RC node has the correct size and the ID mappings are written to the end of the node, the ID 'mapping offset' and 'mapping count' are not written in the IORT RC node header, thus it looks like that the RC node has no ID mappings. The Linux kernel doesn't complain about the invalid IORT RC node, even though the spec says that each RC node must have an ID mapping. The kernel will fail to use MSI IRQs and fall back to a legacy IRQ mechanism that's not working either. Finally it will show strange behaviour around PCI interrupts, making it hard to trace back to an invalid IORT RC nodes. Add the missing ID mapping count and mapping offset. TEST: Fixes IRQ usage of PCI devices on qemu/sbsa-ref. Fixes: bf5d37662da5 "acpi: acpi_table: Add IORT support" Signed-off-by: Patrick Rudolph <[email protected]>
2025-04-03Merge patch series "Introduce J742S2 SoC and EVM"Tom Rini
Manorit Chawdhry <[email protected]> says: The series adds support for J742S2 family of SoCs. Also adds J742S2 EVM Support and re-uses most of the stuff from the superset device J784s4. This device is a subset of J784S4 and shares the same memory map and thus the code is being reused from J784S4 to avoid duplication. It initially cleans up the J784s4 and AM69 files so that they can be re-usable for j742s2 and then it introduces J742S2. The DT for the following SoC will be coming to U-boot during 6.13 Sync so the series is kept as RFC till then. Here are some of the salient features of the J742S2 automotive grade application processor: The J742S2 SoC belongs to the K3 Multicore SoC architecture platform, providing advanced system integration in automotive, ADAS and industrial applications requiring AI at the network edge. This SoC extends the K3 Jacinto 7 family of SoCs with focus on raising performance and integration while providing interfaces, memory architecture and compute performance for multi-sensor, high concurrency applications. Some changes that this devices has from J784S4 are: * 4x Cortex-A72 vs 8x Cortex-A72 * 3x C7x DSP vs 4x C7x DSP * 4 port ethernet switch vs 8 port ethernet switch * 2 DDR controller vs 4 DDR controller Test logs: https://gist.github.com/manorit2001/f7df0e8cca1e9973b4361f0559c6f53d Link: https://lore.kernel.org/r/[email protected]
2025-04-03configs: Introduce configs for J742S2Manorit Chawdhry
Based off j784s4 configs with delta changes for J742S2 [ Add AVS support for J742S2 ] Signed-off-by: Keerthy <[email protected]> Signed-off-by: Manorit Chawdhry <[email protected]>
2025-04-03arm: dts: Introduce J742S2 U-boot DTS filesManorit Chawdhry
Include the U-boot device tree files needed to boot the board. [ DDR config ] Signed-off-by: Neha Malcom Francis <[email protected]> Signed-off-by: Manorit Chawdhry <[email protected]>
2025-04-03board: ti: Introduce basic board files for the J742S2 familyManorit Chawdhry
Introduce the basic files needed to support the TI J742S2 family of SoCs. Signed-off-by: Manorit Chawdhry <[email protected]>
2025-04-03arm: mach-k3: j742s2: Introduce clock and device files for J742S2 SoCManorit Chawdhry
Re-use j784s4 clocks and power domains for j742s2 family of device. Reviewed-by: Udit Kumar <[email protected]> Signed-off-by: Manorit Chawdhry <[email protected]>
2025-04-03soc: Add information to identify the J742S2 SoC familyManorit Chawdhry
J742S2 has the same part number as J784S4 but JTAG_DEVICE_ID has a PKG bit that tells about J742S2. Add support for reading JTAG_DEVICE_ID and set family as J742S2 based on that. Link: https://www.ti.com/lit/pdf/spruje3 (TRM) Signed-off-by: Manorit Chawdhry <[email protected]>
2025-04-03arm: dts: k3-j784s4-ddr: Refactor J784s4 ddr file to a common fileManorit Chawdhry
Refactor J784s4 ddr file to a common file which uses the superset device to allow reuse in j742s2-evm which uses the subset part. Signed-off-by: Manorit Chawdhry <[email protected]>
2025-04-03arm: dts: k3-j784s4-binman.dtsi: Clean up and templatize boot binariesNeha Malcom Francis
Clean up templatized boot binaries for j784s4 soc. This includes modifying the k3-j784s4-binman.dtsi to use SPL_BOARD_DTB, BOARD_DESCRIPTION and UBOOT_BOARD_DESCRIPTION from the files that include it to further reuse code. k3-j784s4-binman.dtsi will contain only templates. Only required boot binaries can be built from the templates in the boards' respective -u-boot.dtsi file (or k3-<board>-binman.dtsi if it exists). This allows clear distinction between the SoC common stuff vs. what is additionally needed to boot up a specific board. Signed-off-by: Neha Malcom Francis <[email protected]> [ Do it only for j784s4 ] Signed-off-by: Manorit Chawdhry <[email protected]>