summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * | board: MCR3000: Modernise the settings to properly work on lastest u-boot ↵Christophe Leroy2023-02-113-13/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | version Both U-boot and Linux kernel have grown over the last releases and don't fit anymore in the 2M EPROM of the board. So, rework the setup to allow storing the Linux kernel image on the UBIFS NAND Flash. Also add support to FIT images as this is what the Linux kernel look like nowadays. Also increase CFG_SYS_BOOTMAPSZ to 32Mbytes and define CONFIG_SYS_BOOTM_LEN with the same value, otherwise it defaults to 8M which is not sufficient anymore with nowadays Linux kernels. And set the netmask to 255.255.255.0 as a class C address is used. Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> Reviewed-by: FRANJOU Stephane <stephane.franjou@csgroup.eu>
| * | board: MCR3000: Migrate to using CONFIG_EXTRA_ENV_TEXTChristophe Leroy2023-02-112-43/+14
| | | | | | | | | | | | | | | | | | | | | | | | We can move all of the environment changes to come from CONFIG_EXTRA_ENV_TEXT. Suggested-by: Tom Rini <trini@konsulko.com> Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
| * | board: MCR3000: Use lowercase filenamesChristophe Leroy2023-02-108-5/+5
| | | | | | | | | | | | | | | | | | | | | Rename MCR3000.* to mcr3000.* to be more in line with other boards. Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
| * | powerpc/mpc8xx: Zero boot_flags arg for calling board_init_f()Christophe Leroy2023-02-101-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Copied from e83a7e94532 ("powerpc/mpc83xx: Zero boot_flags arg for calling board_init_f()") The argument boot_flags of board_init_f() is not used at all in the powerpc specific board.c init sequence. Now with the generic init sequence, this boot_flags arg is used by board_init_f(). This patch sets the r3 register that is used to pass the boot_flags argument from the start.S board_init_f() call to 0 prior to the function call to avoid unknown content to end up in gd->flags. Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> Fixes: 09f3ca3dd53 ("arm, powerpc: select SYS_GENERIC_BOARD")
* | | lmb: Treat a region which is a subset as equalSjoerd Simons2023-02-121-1/+3
| |/ |/| | | | | | | | | | | | | | | | | | | | | In various cases logical memory blocks are coalesced; As a result doing a strict check whether memory blocks are the same doesn't necessarily work as a previous addition of a given block might have been merged into a bigger block. Fix this by considering a block is already registered if it's a pure subset of one of the existing blocks. Signed-off-by: Sjoerd Simons <sjoerd@collabora.com>
* | Merge branch '2023-02-10-update-trace-feature-to-work-with-trace-cmd'Tom Rini2023-02-1226-229/+2347
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To quote the author: Since U-Boot's tracing feature was originally written, quite a few changes have taken place in this domain. The original text format used by tracing is still emitted by Linux, but a new trace-cmd tool has invented a binary format which is now used by new tools, such as kernelshark. With recent distributions and the move to Python 3, the old pybootchart tool does not build or run. Unfortunately there is no 1:1 replacement for the features that were provided by pybootchart, or at least it is not obvious. Still, it makes sense to keep with the times. This series updates proftool to use the new binary format, adding support for function and funcgraph tracing, so that U-Boot's trace records can be examined by trace-cmd and kernelshark. This series also adds support for a flamegraph, which provides a visual way to see which functions are called a lot, as well as which ones consume the most time. Some minor updates to the trace implementation within U-Boot are included, to provide a little more information and to fix a few problems. No unit tests are provided by proftool, but a functional test ensures that sandbox can emit traces which can be processed by proftool, then parsed by trace-cmd and that the timing of the various formats looks consistent.
| * | CI, Docker: Update to Jammy 2023016 tagTom Rini2023-02-113-3/+3
| | | | | | | | | | | | | | | | | | Move to the latest tag for "Jammy" and rebuild the containers. Signed-off-by: Tom Rini <trini@konsulko.com>
| * | trace: Update documentationSimon Glass2023-02-119-64/+382
| | | | | | | | | | | | | | | | | | | | | Revamp the documentation for the new features, including a description of the new features and documentation for the trace command. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | trace: Add a testSimon Glass2023-02-113-0/+324
| | | | | | | | | | | | | | | | | | | | | | | | Add a test which runs sandbox, collects a trace and makes sure it can be processed by trace-cmd. This should ensure that this feature continues to work as U-Boot and trace-cmd evolve. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | Docker: Support trace-cmdSimon Glass2023-02-111-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | Build trace-cmd as part of the docker image, so that trace tests can be used. Unfortunately the version provided by distributions is a little old and has bugs. It also does not support specifying the time base for the trace, which is required to convert microseconds to nanaseconds. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | trace: Provide a flamegraph that uses timingSimon Glass2023-02-111-11/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a second variant of the flame graph that shows records in terms of the number of microseconds used by each call stack. This is a useful way of seeing where time is going within the execution of U-Boot. This requires a call stack that records the start time of each function, as well as a way of subtracting all time consumed by child functions, so that this time is not counted twice by the flamegraph. The time values in the output are just for the function itself, not for its children. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | trace: Support output of a flamegraphSimon Glass2023-02-111-1/+271
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is useful to see how many times each function is called, particularly in the context of its callers. A flamegraph is a way of showing this. Support output in this format which can be used by the flamegraph.pl script, to generate an SVG image for browsing. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | trace: Support output of funcgraph recordsSimon Glass2023-02-111-32/+150
| | | | | | | | | | | | | | | | | | | | | | | | Add support for writing ftrace records in the 'funcgraph' format, which shows function entry and exit points as well as the time taken by each function. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | trace: Use text_base from the trace headerSimon Glass2023-02-111-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | Use the information in the trace header instead of reading it from the trace records. Add debugging to check that System.map and the trace header agree on this value. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | trace: Drop use of objsectionSimon Glass2023-02-111-28/+1
| | | | | | | | | | | | | | | | | | | | | This feature was only partly implemented and serves no current purpose. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | trace: Update proftool to use new binary formatSimon Glass2023-02-112-45/+854
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The old text format is not much used anymore. Instead a new trace-cmd tool has introduced a binary format for trace records. Add support for generating this format. This involves removing the old text format, adding various helpers for the new format and adjusting the code to use an output file instead of stdout. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | trace: Rename prof to trace and improve commentsSimon Glass2023-02-111-39/+157
| | | | | | | | | | | | | | | | | | | | | | | | The current use of 'profile' in some places is confusing. Update the code to use the word 'trace' consistently. Change the flags to better match their meaning and add some more comments. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | trace: Detect an infinite loopSimon Glass2023-02-111-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | If something is wrong with a board's timer function such that it calls functions not marked with notrace, U-Boot will hang. Detect this, print a message and disable the trace. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | trace: Correct the relocation handover with buffer overflowSimon Glass2023-02-111-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the early trace buffer overflows it leaves a gap in the trace buffer between where the actual data finished and where it would have finished if there were enough buffer space. This results in corrupted output. Adjust the logic to resolve this and add a message when the buffer overflows. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | trace: Show a few more stats about tracingSimon Glass2023-02-111-2/+6
| | | | | | | | | | | | | | | | | | | | | Add a few more useful items into the output. Update the buffers to use hex consistently. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | trace: Track the minimum stack depthSimon Glass2023-02-111-8/+16
| | | | | | | | | | | | | | | | | | | | | | | | The trace does not necessarily start at the top level, so we can see it go negative. Track this so that we can show an accurate value for the stack depth. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | trace: Reduce the number of function sitesSimon Glass2023-02-112-4/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Given that the compiler adds two function calls into each function, the current spacing is overkill. Drop it down to 16 bytes per function, which is still plenty. This saves some space in the trace buffer. Also move the calculation into a function, so it is common code. Add a check for gd->mon_len being unset, which breaks tracing. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | trace: Update the file headerSimon Glass2023-02-112-17/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It seems better to put the TEXT_BASE value in the file header rather than in an entry record. While it is true that there is a separate base for pre-relocation, this can be handled by using offsets in the file. It is useful to have a version number in case we need to change the trace format again. Update the header to make these changes. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | abuf: Support use from toolsSimon Glass2023-02-111-1/+20
| | | | | | | | | | | | | | | | | | | | | Update the code slightly so that abuf can be used in U-Boot tools. It will soon be needed for proftool. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | trace: Reduce the default for TRACE_EARLY_CALL_DEPTH_LIMITSimon Glass2023-02-111-1/+1
| | | | | | | | | | | | | | | | | | | | | This is a silly value at present, since U-Boot's call depth never reaches 200. Fix it. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | time: Tidy up some unnecessary #ifdefsSimon Glass2023-02-111-8/+6
| | | | | | | | | | | | | | | | | | Avoid using the preprocessor with TIMER_EARLY. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | timer: Tidy up use of notraceSimon Glass2023-02-113-6/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tracing is typically enabled by the time driver model starts up, so there is no point in adding a 'notrace' to the timer-init function. However, once the driver model timer is enabled, we do need to be able to access the timer's private data when reading the timer, so add it to the core function needed for that. Update the function's documentation while we are here. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | dm: Allow serial output during the relocation processSimon Glass2023-02-111-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | Reset the serial flags so that the debug UART can be used (if enabled) in the small window where there is no serial device. This can avoid a hang in some cases. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | sandbox: Bring back setting mon_len in global_dataSimon Glass2023-02-111-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | This change was made for the benefit of RISC-V but broke other architectures also. In particular, tracing cannot work without this value. Add it back for architectures which support it. Fixes: 3c9fc23c443 ("sandbox: don't refer to symbol _init") Signed-off-by: Simon Glass <sjg@chromium.org>
| * | .gitignore: Ignore the moveconfig databaseSimon Glass2023-02-111-0/+3
| | | | | | | | | | | | | | | | | | | | | This file is produced by the moveconfig.py tool. It should never be added to the repo, so add it to the .gitignore file. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | Dockerfile: Update QEMU git locationTom Rini2023-02-111-1/+1
|/ / | | | | | | | | | | | | | | Per https://www.qemu.org/contribute/ the official location of the QEMU sources are https://gitlab.com/qemu-project/qemu.git Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com>
* | usb: gadget: Fix typo in obj lineTom Rini2023-02-111-1/+1
| | | | | | | | | | | | | | | | | | When dropping the unused fotg210 gadget driver a leading 0 was introduced to the next line, drop it. Fixes: e9b4678bc78e ("usb: Drop unused fotg210 gadget") Reported-by: Samuel Holland <samuel@sholland.org> Signed-off-by: Tom Rini <trini@konsulko.com>
* | Merge tag 'efi-2023-04-rc2' of ↵Tom Rini2023-02-1026-41/+119
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://source.denx.de/u-boot/custodians/u-boot-efi Pull request for efi-2023-04-rc2 Documentation: * Provide page with links to talks on U-Boot UEFI: * Enable CTRL+S to save the boot order in eficonfig command * Run attribute check for QueryVariableInfo() only for the file store * Bug fixes Others: * Improve output formatting of the coninfo command # -----END PGP SIGNATURE----- # gpg: Signature made Fri 10 Feb 2023 12:15:45 PM EST # gpg: using RSA key 6DC4F9C71F29A6FA06B76D33C481DBBC2C051AC4 # gpg: Good signature from "Heinrich Schuchardt <xypron.glpk@gmx.de>" [unknown] # gpg: aka "[jpeg image of size 1389]" [unknown] # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: 6DC4 F9C7 1F29 A6FA 06B7 6D33 C481 DBBC 2C05 1AC4
| * | efi_loader: static efi_query_variable_info_runtime()Heinrich Schuchardt2023-02-101-1/+1
| | | | | | | | | | | | | | | | | | This function is not used externally and hence should be static. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
| * | efi_loader: make gop_blt() staticHeinrich Schuchardt2023-02-101-5/+6
| | | | | | | | | | | | | | | | | | This function is not used externally. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
| * | efi_loader: include definition of allow_unaligned()Heinrich Schuchardt2023-02-101-0/+1
| | | | | | | | | | | | | | | | | | Add missing include. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
| * | efi_loader: provide definition for efi_add_known_memory()Heinrich Schuchardt2023-02-101-0/+7
| | | | | | | | | | | | | | | | | | We should provide a definition in an include for efi_add_known_memory(). Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
| * | efi_loader: static functions in efi_runtime.cHeinrich Schuchardt2023-02-101-2/+2
| | | | | | | | | | | | | | | | | | Functions that are not used externally should be static. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
| * | efi_loader: static functions in efi_console.cHeinrich Schuchardt2023-02-101-1/+1
| | | | | | | | | | | | | | | | | | Define function set_shift_mask() as static as it is not used externally. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
| * | efi_loader: static functions in efi_boottime.cHeinrich Schuchardt2023-02-101-2/+4
| | | | | | | | | | | | | | | | | | Make functions that are no used externally static. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
| * | efi_loader: static functions in helloworld.cHeinrich Schuchardt2023-02-101-1/+2
| | | | | | | | | | | | | | | | | | Make functions that are not used externally static. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
| * | efi_loader: fix efi_ecpt_register()Heinrich Schuchardt2023-02-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | num_entries should be unsigned to avoid warnings. As the target field is u16 we should use this type. lib/efi_loader/efi_conformance.c: In function ‘efi_ecpt_register’: lib/efi_loader/efi_conformance.c:30:33: warning: conversion to ‘long unsigned int’ from ‘int’ may change the sign of the result [-Wsign-conversion] 30 | ecpt_size = num_entries * sizeof(efi_guid_t) | ^ lib/efi_loader/efi_conformance.c:46:36: warning: conversion from ‘int’ to ‘u16’ {aka ‘short unsigned int’} may change value [-Wconversion] 46 | ecpt->number_of_profiles = num_entries; | ^~~~~~~~~~~ Fixes: 6b92c1735205 ("efi: Create ECPT table") Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
| * | efi_loader: add definition for efi_main()Heinrich Schuchardt2023-02-101-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | U-Boot provides multiple EFI applications. The entry point is called efi_main(). Provide a definition for this function. This avoids build warnings like lib/efi_loader/initrddump.c:468:21: warning: no previous prototype for ‘efi_main’ [-Wmissing-prototypes] 468 | efi_status_t EFIAPI efi_main(efi_handle_t image_handle, | ^~~~~~~~ Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
| * | efi_loader: fix struct efi_input_keyHeinrich Schuchardt2023-02-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The UEFI specification defines filed UnicodeChar as CHAR16. We use u16 for CHAR16 throughout our code. The change fixes the following errors: lib/efi_loader/initrddump.c: In function ‘efi_input’: lib/efi_loader/initrddump.c:218:38: warning: comparison is always false due to limited range of data type [-Wtype-limits] 218 | if (key.unicode_char >= 0xD800 && key.unicode_char <= 0xDBFF) | ^~ lib/efi_loader/initrddump.c:218:68: warning: comparison is always true due to limited range of data type [-Wtype-limits] 218 | if (key.unicode_char >= 0xD800 && key.unicode_char <= 0xDBFF) | ^~ Fixes: 867a6ac86dd8 ("efi: Add start-up library code") Reported-by: Marek Vasut <marex@denx.de> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
| * | efi_loader: make get_load_options() staticHeinrich Schuchardt2023-02-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In program initrddump.efi function get_load_options() can be static. This avoids a warning when building with 'make W=1': lib/efi_loader/initrddump.c:442:6: warning: no previous prototype for ‘get_load_options’ [-Wmissing-prototypes] 442 | u16 *get_load_options(void) | ^~~~~~~~~~~~~~~~ Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
| * | efi_loader: enable eficonfig command by defaultHeinrich Schuchardt2023-02-101-0/+1
| | | | | | | | | | | | | | | | | | The eficonfig command is required to set boot options. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
| * | cmd: CONFIG_CMD_EFICONFIG requires CONFIG_MENUHeinrich Schuchardt2023-02-101-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The eficonfig command invokes functions implemented in common/menu.c like * menu_default_set() * menu_get_choice() * menu_destroy() * menu_item_add() Fixes: 87d791423ac6 ("eficonfig: menu-driven addition of UEFI boot option") Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
| * | efi_loader: update attribute check for QueryVariableInfo()Masahisa Kojima2023-02-102-9/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Current U-Boot supports two EFI variable service, U-Boot own implementation and op-tee based StMM variable service. With ACS Security Interface Extension(SIE) v22.10_SIE_REL1.1.0, there are several failure items of QueryVariableInfo(). Current attribute check for QueryVariableInfo() was implemented based on the Self Certification Test (SCT) II Case Specification, June 2017, chapter 4.1.4 QueryVariableInfo(). This test case specification is outdated and don't align at all with the SCT test case code, and UEFI specification v2.10 does not clearly define the priority of the attribute check. For U-Boot standard case that EFI variables are stored in a file in the ESP, this commit modifies the attribute check to get align to the EDK2 implementation. For latter case(op-tee based StMM variable service), parameter check should be delegated to StMM. Now all ACS SIE QueryVariableInfo() test cases passed both EFI variable storage implementations. Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org> Acked-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
| * | eficonfig: set EFICONFIG_ENTRY_NUM_MAX to INT_MAX - 1Masahisa Kojima2023-02-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | eficonfig_append_menu_entryi() accepts the number of entries less than or equal to EFICONFIG_ENTRY_NUM_MAX. EFICONFIG_ENTRY_NUM_MAX is currently set as INT_MAX, so the invalid menu count check(efi_menu->count > EFICONFIG_ENTRY_NUM_MAX) in eficonfig_process_common() is always false. This commit sets EFICONFIG_ENTRY_NUM_MAX to (INT_MAX - 1). Reported-by: Coverity (CID 435659) Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
| * | eficonfig: CTRL+S to save the boot orderMasahisa Kojima2023-02-103-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The change boot order menu in eficonfig can have at most INT_MAX lines and it is troublesome to scroll down to the "Save" entry. This commit assigns CTRL+S to save the boot order. Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org> Acked-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>