Re: [PATCH 2/2] armv8: generic_timer: Use event stream for udelay

2024-05-01 Thread Peter Hoyes
On 4/29/24 16:16, Andre Przywara wrote: On Tue, 23 Apr 2024 09:10:05 +0100 Peter Hoyes wrote: Hi, From: Peter Hoyes Polling cntpct_el0 in a tight loop for delays is inefficient. This is particularly apparent on Arm FVPs, which do not simulate real time, meaning that a 1s sleep can take

Re: [PATCH v2 1/2] arm: Move sev() and wfe() definitions to common Arm header file

2024-05-01 Thread Peter Hoyes
On 5/1/24 09:16, Peter Hoyes wrote: From: Peter Hoyes The sev() and wfe() asm macros are currently defined only for mach-exynos. As these are common Arm instructions, move them to the common asm/system.h header file, for both Armv7 and Armv8, so they can be used by other machines. wfe may

[PATCH v2 1/2] arm: Move sev() and wfe() definitions to common Arm header file

2024-05-01 Thread Peter Hoyes
From: Peter Hoyes The sev() and wfe() asm macros are currently defined only for mach-exynos. As these are common Arm instructions, move them to the common asm/system.h header file, for both Armv7 and Armv8, so they can be used by other machines. wfe may theoretically trigger a context switch

[PATCH v2 2/2] armv8: generic_timer: Use event stream for udelay

2024-05-01 Thread Peter Hoyes
From: Peter Hoyes Polling cntpct_el0 in a tight loop for delays is inefficient. This is particularly apparent on Arm FVPs, which do not simulate real time, meaning that a 1s sleep can take a couple of orders of magnitude longer to execute in wall time. If running at EL2 or above (where

[PATCH v2 0/2] Optimize udelay for aarch64 boards

2024-05-01 Thread Peter Hoyes
-aarch64 (virt,secure=on), FVP_Base_RevC and a Raspberry Pi 4. Peter Hoyes (2): arm: Move sev() and wfe() definitions to common Arm header file armv8: generic_timer: Use event stream for udelay arch/arm/cpu/armv8/Kconfig | 8 +++ arch/arm/cpu/armv8/generic_timer.c

Re: [PATCH 2/2] armv8: generic_timer: Use event stream for udelay

2024-04-24 Thread Peter Hoyes
Hi Quentin, On 4/23/24 11:55, Quentin Schulz wrote: Hi Peter, On 4/23/24 10:10, Peter Hoyes wrote: From: Peter Hoyes Polling cntpct_el0 in a tight loop for delays is inefficient. This is particularly apparent on Arm FVPs, which do not simulate real time, meaning that a 1s sleep can take

[PATCH 2/2] armv8: generic_timer: Use event stream for udelay

2024-04-23 Thread Peter Hoyes
From: Peter Hoyes Polling cntpct_el0 in a tight loop for delays is inefficient. This is particularly apparent on Arm FVPs, which do not simulate real time, meaning that a 1s sleep can take a couple of orders of magnitude longer to execute in wall time. If running at EL2 or above (where

[PATCH 1/2] arm: Move sev() and wfe() definitions to common Arm header file

2024-04-23 Thread Peter Hoyes
From: Peter Hoyes The sev() and wfe() asm macros are currently defined only for mach-exynos. As these are common Arm instructions, move them to the common asm/system.h header file, for both Armv7 and Armv8, so they can be used by other machines. wfe may theoretically trigger a context switch

[PATCH 0/2] Optimize udelay for aarch64 boards

2024-04-23 Thread Peter Hoyes
-aarch64 (virt,secure=on), FVP_Base_RevC and a Raspberry Pi 4. Peter Hoyes (2): arm: Move sev() and wfe() definitions to common Arm header file armv8: generic_timer: Use event stream for udelay arch/arm/cpu/armv8/Kconfig | 8 +++ arch/arm/cpu/armv8/generic_timer.c

[PATCH 3/3] configs: Create minimal vexpress_fvp_defconfig

2023-03-31 Thread Peter Hoyes
From: Peter Hoyes The vexpress64 board family now relies on OF_CONTROL and OF_HAS_PRIOR_STAGE, so platform-specific configuration requirements are minimal. The vexpress_aemv8a_semi_defconfig file defines many flags that are not needed for a minimal boot, such as flash memory configuration

[PATCH 2/3] vexpress64: Enable VIRTIO_MMIO and RTC_PL031 in the base model

2023-03-31 Thread Peter Hoyes
From: Peter Hoyes The Arm EBBR (Embedded Base Boot Requirements) require that the time and basic networking EFI interfaces are available and working, so long as the hardware has an RTC and network interface. Arm FVPs typically have a memory-mapped PL031 RTC and a VIRTIO_NET device defined

[PATCH 1/3] vexpress64: Use OF_HAS_PRIOR_STAGE for BASE_FVP variant

2023-03-31 Thread Peter Hoyes
From: Peter Hoyes BASE_FVP now typically uses a devicetree provided by a prior boot stage (typically Arm TF-A), so imply this option by default when TARGET_VEXPRESS64_BASE_FVP is selected. OF_HAS_PRIOR_STAGE selects OF_BOARD so this change is minor, but aligns TARGET_VEXPRESS64_BASE_FVP

[PATCH v2] fdt: Make fdt addr -q quieter

2023-03-21 Thread Peter Hoyes
From: Peter Hoyes 64597346 "fdt: Add -q option to fdt addr for distro_bootcmd" introduced the -q option for fdt addr, which sets the current working fdt address without printing any output. baf41410 "fdt: Show a message when the working FDT changes" made

Re: [PATCH] fdt: Make fdt addr -q quieter

2023-03-17 Thread Peter Hoyes
On 17/03/2023 12:17, Marek Vasut wrote: On 3/16/23 17:34, Peter Hoyes wrote: From: Peter Hoyes 64597346 "fdt: Add -q option to fdt addr for distro_bootcmd" introduced the -q option for fdt addr, which sets the current working fdt address without printing any output. baf41410

[PATCH] fdt: Make fdt addr -q quieter

2023-03-16 Thread Peter Hoyes
From: Peter Hoyes 64597346 "fdt: Add -q option to fdt addr for distro_bootcmd" introduced the -q option for fdt addr, which sets the current working fdt address without printing any output. baf41410 "fdt: Show a message when the working FDT changes" made

[PATCH 2/2] CI: Allow a mirror to be specified for Docker Hub

2023-03-10 Thread Peter Hoyes
From: Peter Hoyes To conserve bandwidth and potentially avoid rate limits, allow a local mirror of Docker Hub to be specified globally. The default value is unchanged. Signed-off-by: Peter Hoyes --- .gitlab-ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitlab

[PATCH 1/2] CI: Allow job tag to be optionally set globally

2023-03-10 Thread Peter Hoyes
From: Peter Hoyes The default behavior of Gitlab runners is to only run jobs which match the configured tag, although there is an option to run untagged jobs [1]. To support running the CI in more complex environments where different types of runners may be present that support different tags

[PATCH 0/2] CI configuration improvements

2023-03-10 Thread Peter Hoyes
From: Peter Hoyes On our team at Arm, we would like to run the U-Boot CI on our infrastructure in order to verify patches before sending them upstream. This requires some minor changes to the Gitlab CI config which can be implemented in a backwards-compatible way. Peter Hoyes (2): CI: Allow

Re: [PATCH v2] cmd: pxe_utils: Limit fdtcontroladdr usage to non-fitImage

2022-12-15 Thread Peter Hoyes
-by: Peter Hoyes Tested-by: Peter Hoyes Tested with an fdtcontroladdr provided by a prior boot stage (TF-A) on an Arm FVP. The implemented behavior works for me. We do not have any need to override the DT from a FIT image. Thanks, Peter

Re: [PATCH] Revert "cmd: pxe_utils: Check fdtcontroladdr in label_boot"

2022-12-13 Thread Peter Hoyes
On 13/12/2022 14:34, Quentin Schulz wrote: Hi Tom, On 12/13/22 15:29, Tom Rini wrote: With the change here, all extlinux.conf files with only "KERNEL /fitImage" don't work anymore. One common example of this would be those files generated by thee Poky/OE WIC bootimg-partition bootloader

Re: [PATCH] vexpress64: also consider DTB pointer in x1

2022-09-22 Thread Peter Hoyes
or getting to the bottom of this issue Andre. You can add: Tested-by: Peter Hoyes --- board/armltd/vexpress64/lowlevel_init.S | 2 +- board/armltd/vexpress64/vexpress64.c| 27 + 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/board/armltd/

Re: [PATCH] cmd: pxe_utils: Check fdtcontroladdr in label_boot

2022-05-19 Thread Peter Hoyes
On 18/05/2022 19:15, Neil Armstrong wrote: On 18/05/2022 17:52, Tom Rini wrote: On Wed, May 18, 2022 at 10:40:12AM +0200, Neil Armstrong wrote: Hi, On 14/10/2021 10:40, Peter Hoyes wrote: From: Peter Hoyes If using OF_CONTROL, fdtcontroladdr is set to the fdt used to configure U-Boot

[PATCH] fdt: Add -q option to fdt addr for distro_bootcmd

2022-03-31 Thread Peter Hoyes
From: Peter Hoyes distro_bootcmd uses this construct a few times to test $fdt_addr_r, and fall back on $fdtcontroladdr if not set/invalid: if fdt addr ${fdt_addr_r}; then ... else ... fi If the `fdt addr` test fails, it prints the following message on the console

[PATCH v2 5/5] vexpress64: Enable VIRTIO_NET network driver

2021-11-11 Thread Peter Hoyes
From: Peter Hoyes The SMSC driver is using the old driver model. Init the virtio system in vexpress64.c so that the network device is discovered. Signed-off-by: Peter Hoyes --- board/armltd/vexpress64/vexpress64.c | 7 +++ include/configs/vexpress_aemv8.h | 4 ++-- 2 files changed, 9

[PATCH v2 4/5] vexpress64: Enable OF_CONTROL and OF_BOARD for VExpress64

2021-11-11 Thread Peter Hoyes
From: Peter Hoyes Capture x0 in lowlevel_init.S as potential fdt address. Modify board_fdt_blob_setup to use fdt address from either vexpress_aemv8.h or lowlevel_init.S. Signed-off-by: Peter Hoyes --- board/armltd/vexpress64/Makefile| 2 +- board/armltd/vexpress64/lowlevel_init.S

[PATCH v2 3/5] vexpress64: Clean up BASE_FVP boot configuration

2021-11-11 Thread Peter Hoyes
From: Peter Hoyes Move env var address values to #defines so they can be reused elsewhere. Rename env var names to those recommended in the README and modify addresses to allow more space for the kernel. Fix issue where fdt is called with invalid arguments when booting without a ramdisk

[PATCH v2 2/5] vexpress64: Refactor header file to make it easier to add new FVPs

2021-11-11 Thread Peter Hoyes
From: Peter Hoyes Rename from vexpress_aemv8a.h -> vepxress_aemv8.h as new FVPs may not be v8-A. No change in behavior. This is towards future work to enable support for the FVP_BaseR. Signed-off-by: Peter Hoyes --- board/armltd/vexpress64/Kconfig | 2 +-

[PATCH v2 1/5] doc: Add documentation for the Arm VExpress64 board configs

2021-11-11 Thread Peter Hoyes
From: Peter Hoyes Create a new documentation section for Arm Ltd boards with a sub-page for the VExpress64 boards (FVP-A and Juno). Signed-off-by: Peter Hoyes --- doc/board/armltd/index.rst | 9 ++ doc/board/armltd/vexpress64.rst | 51 + doc/board

[PATCH v2 0/5] VExpress64 board family improvements

2021-11-11 Thread Peter Hoyes
From: Peter Hoyes These patches add the follow improvements to the VExpress64 board family (BASE_FVP and Juno): * Add documentation * Allow use of OF_BOARD for BASE_FVP (off by default) * Allow use of the virtio-net driver (off by default) * Refactor header file to make it easier to add new

Re: [PATCH 4/5] vexpress64: Enable OF_CONTROL and OF_BOARD for VExpress64

2021-11-09 Thread Peter Hoyes
Hi, On 09/11/2021 15:06, Andre Przywara wrote: On Thu, 4 Nov 2021 16:56:18 + Peter Hoyes wrote: Hi, From: Peter Hoyes Capture x0 in lowlevel_init.S as potential fdt address. Modify board_fdt_blob_setup to use fdt address from either vexpress_aemv8.h or lowlevel_init.S. Signed-off

Re: [PATCH] cmd: pxe_utils: Check fdtcontroladdr in label_boot

2021-11-08 Thread Peter Hoyes
On 28/10/2021 19:55, Ramon Fried wrote: On Sun, Oct 24, 2021 at 10:56 PM Simon Glass wrote: Hi, On Fri, 15 Oct 2021 at 05:21, Andre Przywara wrote: On Thu, 14 Oct 2021 12:24:45 -0600 Simon Glass wrote: Hi Simon, On Thu, 14 Oct 2021 at 02:40, Peter Hoyes wrote: From: Peter Hoyes

[PATCH 5/5] vexpress64: Enable VIRTIO_NET network driver

2021-11-04 Thread Peter Hoyes
From: Peter Hoyes The SMSC driver is using the old driver model. Init the virtio system in vexpress64.c so that the network device is discovered. Signed-off-by: Peter Hoyes --- board/armltd/vexpress64/vexpress64.c | 7 +++ include/configs/vexpress_aemv8.h | 4 ++-- 2 files changed, 9

[PATCH 4/5] vexpress64: Enable OF_CONTROL and OF_BOARD for VExpress64

2021-11-04 Thread Peter Hoyes
From: Peter Hoyes Capture x0 in lowlevel_init.S as potential fdt address. Modify board_fdt_blob_setup to use fdt address from either vexpress_aemv8.h or lowlevel_init.S. Signed-off-by: Peter Hoyes --- board/armltd/vexpress64/Makefile| 5 + board/armltd/vexpress64/lowlevel_init.S

[PATCH 2/5] vexpress64: Refactor header file to make it easier to add new FVPs

2021-11-04 Thread Peter Hoyes
From: Peter Hoyes Rename from vexpress_aemv8a.h -> vepxress_aemv8.h as new FVPs may not be v8-A. No change in behavior. This is towards future work to enable support for the FVP_BaseR. Signed-off-by: Peter Hoyes --- board/armltd/vexpress64/Kconfig | 2 +-

[PATCH 3/5] vexpress64: Clean up BASE_FVP boot configuration

2021-11-04 Thread Peter Hoyes
From: Peter Hoyes Move env var address values to #defines so they can be reused elsewhere. Rename env var names to those recommended in the README. Fix issue where fdt is called with invalid arguments when booting without a ramdisk. Signed-off-by: Peter Hoyes --- include/configs

[PATCH 1/5] doc: Add documentation for the Arm VExpress64 board configs

2021-11-04 Thread Peter Hoyes
From: Peter Hoyes Create a new documentation section for Arm Ltd boards with a sub-page for the VExpress64 boards (FVP-A and Juno). Signed-off-by: Peter Hoyes --- doc/board/armltd/index.rst | 9 ++ doc/board/armltd/vexpress64.rst | 49 + doc/board

[PATCH 0/5] VExpress64 board family improvements

2021-11-04 Thread Peter Hoyes
From: Peter Hoyes These patches add the follow improvements to the VExpress64 board family (BASE_FVP and Juno): * Add documentation * Allow use of OF_BOARD for BASE_FVP (off by default) * Allow use of the virtio-net driver (off by default) * Refactor header file to make it easier to add new

[PATCH] cmd: pxe_utils: Check fdtcontroladdr in label_boot

2021-10-14 Thread Peter Hoyes
From: Peter Hoyes If using OF_CONTROL, fdtcontroladdr is set to the fdt used to configure U-Boot. When using PXE, if no fdt is defined in the menu file, and there is no fdt at fdt_addr, add fall back on fdtcontroladdr too. We are developing board support for the Armv8r64 FVP using

Re: [PATCH v2 5/6] arm: Use armv8_switch_to_el1 env to switch to EL1

2021-09-03 Thread Peter Hoyes
Hi, On 03/09/2021 00:49, Tom Rini wrote: On Fri, Sep 03, 2021 at 12:07:20AM +0100, Andre Przywara wrote: On Thu, 2 Sep 2021 18:42:05 -0400 Tom Rini wrote: Hi Tom, On Thu, Aug 19, 2021 at 04:53:13PM +0100, Peter Hoyes wrote: From: Peter Hoyes Use the environment variable

[PATCH v2 6/6] doc: Add documentation for the Arm vexpress board configs

2021-08-19 Thread Peter Hoyes
From: Peter Hoyes Create a new documentation section for Arm Ltd boards with a sub-page for the vexpress board (FVP-A, FVP-R and Juno). Document how the armv8_switch_to_el1 environment variable can be used to switch between booting from S-EL2/S-EL1 at runtime on the BASER_FVP. Signed-off

[PATCH v2 5/6] arm: Use armv8_switch_to_el1 env to switch to EL1

2021-08-19 Thread Peter Hoyes
From: Peter Hoyes Use the environment variable armv8_switch_to_el1 to determine whether to switch to EL1 at runtime. This is an alternative to the CONFIG_ARMV8_SWITCH_TO_EL1 compile-time option. The environment variable will be ineffective if the ARMV8_MULTIENTRY config is used

[PATCH v2 4/6] vexpress64: Add BASER_FVP vexpress board variant

2021-08-19 Thread Peter Hoyes
From: Peter Hoyes The BASER_FVP board variant is implemented on top of the BASE_FVP board config (which, in turn, is based on the Juno Versatile Express board config). They all share a similar memory map - for BASER_FVP the map is inverted from the BASE_FVP (https://developer.arm.com

[PATCH v2 3/6] armv8: Add ARMv8 MPU configuration logic

2021-08-19 Thread Peter Hoyes
From: Peter Hoyes Armv8r64 is the first Armv8 platform that only has a PMSA at the current exception level. The architecture supplement for Armv8r64 describes new fields in ID_AA64MMFR0_EL1 which can be used to detect whether a VMSA or PMSA is present. These fields are RES0 on Armv8a. Add logic

[PATCH v2 2/6] armv8: Ensure EL1&0 VMSA is enabled

2021-08-19 Thread Peter Hoyes
From: Peter Hoyes On Armv8-R, the EL1&0 memory system architecture is configurable as a VMSA or PMSA, and resets to an "architecturally unknown" value. Add code to armv8_switch_to_el1_m which detects whether the MSA at EL1&0 is configurable using the id_aa64mmfr0_el1 r

[PATCH v2 1/6] armv8: Disable pointer authentication traps for EL1

2021-08-19 Thread Peter Hoyes
From: Peter Hoyes The use of ARMv8.3 pointer authentication (PAuth) is governed by fields in HCR_EL2, which trigger a 'trap to EL2' if not enabled. The reset value of these fields is 'architecturally unknown' so we must ensure that the fields are enabled (to disable the traps) if we are entering

[PATCH v2 0/6] Armv8r64 + BASER_FVP board support

2021-08-19 Thread Peter Hoyes
From: Peter Hoyes Add support for the Armv8r64 architecture and the BASER_FVP, which uses the Armv8r64 architecture. The Armv8r64 architecture has the following features: * No non-secure exception levels * Highest exception level is always S-EL2 * There is only a PMSA at S-EL2, which

[PATCH 2/2] armv8: Ensure EL1&0 VMSA is enabled

2021-08-13 Thread Peter Hoyes
From: Peter Hoyes On Armv8-R, the EL1&0 memory system architecture is configurable as a VMSA or PMSA, and resets to an "architecturally unknown" value. Add code to armv8_switch_to_el1_m which detects whether the MSA at EL1&0 is configurable using the id_aa64mmfr0_el1 r

[PATCH 1/2] armv8: Disable pointer authentication traps for EL1

2021-08-13 Thread Peter Hoyes
From: Peter Hoyes The use of ARMv8.3 pointer authentication (PAuth) is governed by fields in HCR_EL2, which trigger a 'trap to EL2' if not enabled. The reset value of these fields is 'architecturally unknown' so we must ensure that the fields are enabled (to disable the traps) if we are entering

[PATCH] armv8: Initialize CNTFRQ if at highest exception level

2021-07-12 Thread Peter Hoyes
From: Peter Hoyes CNTFRQ_EL0 is only writable from the highest supported exception level on the platform. For Armv8-A, this is typically EL3, but technically EL2 and EL3 are optional so it may need to be initialized at EL2 or EL1. For Armv8-R, the highest exception level is always EL2

[PATCH] net: Use phys_addr_t for SMC net device addresses

2021-07-09 Thread Peter Hoyes
From: Peter Hoyes Use same type as eth_device->iobase and support addresses greater than INT_MAX. Signed-off-by: Peter Hoyes --- drivers/net/smc9.c | 2 +- drivers/net/smc911x.c | 2 +- include/netdev.h | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --