[PATCH v6 16/17] test/py: efi_capsule: test for FIT image capsule

2020-09-06 Thread AKASHI Takahiro
The test can run on sandbox build and it attempts to execute a firmware update via a capsule-on-disk, using a FIT image capsule, CONFIG_EFI_CAPSULE_FIT. To run this test successfully, you need configure U-Boot specifically; See test_capsule_firmware.py for requirements, and hence it won't run on

[PATCH v6 17/17] test/py: efi_capsule: test for raw image capsule

2020-09-06 Thread AKASHI Takahiro
The test can run on sandbox build and it attempts to execute a firmware update via a capsule-on-disk, using a raw image capsule, CONFIG_EFI_CAPSULE_RAW. To run this test successfully, you need configure U-Boot specifically; See test_capsule_firmware.py for requirements, and hence it won't run on

[PATCH v6 14/17] cmd: add "efidebug capsule" command

2020-09-06 Thread AKASHI Takahiro
"efidebug capsule" is more or less a debugging utility. efidebug capsule update: invoke UpdateCapsule against data on memory efidebug capsule show: show a capsule header efidebug capsule result: dump a capsule result variable Signed-off-by: AKASHI Takahiro --- cmd/efidebug.c | 235

[PATCH v6 15/17] tools: add mkeficapsule command for UEFI capsule update

2020-09-06 Thread AKASHI Takahiro
This is a utility mainly for test purpose. mkeficapsule -f: create a test capsule file for FIT image firmware Having said that, you will be able to customize the code to fit your specific requirements for your platform. Signed-off-by: AKASHI Takahiro --- tools/Makefile | 2 +

[PATCH v6 13/17] efi_loader: add firmware management protocol for raw image

2020-09-06 Thread AKASHI Takahiro
In this commit, a very simple firmware management protocol driver is implemented. It will take a binary image in a capsule file and apply the data using dfu backend storage drivers via dfu_write_by_alt() interface. So "dfu_alt_info" variable should be properly set to specify a device and location

[PATCH v6 11/17] efi_loader: add firmware management protocol for FIT image

2020-09-06 Thread AKASHI Takahiro
In this commit, a very simple firmware management protocol driver is implemented. It will take a common FIT image firmware in a capsule file and apply the data using dfu backend storage drivers via update_fit() interface. So "dfu_alt_info" variable should be properly set to specify a device and

[PATCH v6 08/17] efi_loader: capsule: add capsule_on_disk support

2020-09-06 Thread AKASHI Takahiro
Capsule data can be loaded into the system either via UpdateCapsule runtime service or files on a file system (of boot device). The latter case is called "capsules on disk", and actual updates will take place at the next boot time. In this commit, we will support capsule on disk mechanism.

[PATCH v6 12/17] dfu: add dfu_write_by_alt()

2020-09-06 Thread AKASHI Takahiro
This function is a variant of dfu_write_by_name() and takes a DFU alt setting number for dfu configuration. It will be utilised to implement UEFI capsule management protocol for raw image in a later commit. Signed-off-by: AKASHI Takahiro --- drivers/dfu/dfu_alt.c | 47

[PATCH v6 06/17] efi_loader: add efi_create_indexed_name()

2020-09-06 Thread AKASHI Takahiro
This function will be used from several places in UEFI subsystem to generate some specific form of utf-16 variable name. For example, L"Capsule0001" Signed-off-by: AKASHI Takahiro --- include/efi_loader.h | 3 +++ lib/efi_loader/efi_setup.c | 30 ++ 2 files

[PATCH v6 10/17] efi_loader: capsule: support firmware update

2020-09-06 Thread AKASHI Takahiro
A capsule tagged with the guid, EFI_FIRMWARE_MANAGEMENT_CAPSULE_ID_GUID, is handled as a firmware update object. What efi_update_capsule() basically does is to load any firmware management protocol (or fmp) drivers contained in a capsule, find out an appropriate fmp driver and then invoke its

[PATCH v6 04/17] dfu: export dfu_list

2020-09-06 Thread AKASHI Takahiro
This variable will be utilized to enumerate all dfu entities for UEFI capsule firmware update in a later commit. Signed-off-by: AKASHI Takahiro --- drivers/dfu/dfu.c | 2 +- include/dfu.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/dfu/dfu.c

[PATCH v6 07/17] efi_loader: define UpdateCapsule api

2020-09-06 Thread AKASHI Takahiro
In this commit, skeleton functions for capsule-related API's are added under CONFIG_EFI_UPDATE_CAPSULE configuration. Detailed implementation for a specific capsule type will be added in the succeeding patches. Signed-off-by: AKASHI Takahiro --- include/efi_api.h| 12 +++

[PATCH v6 09/17] efi_loader: capsule: add memory range capsule definitions

2020-09-06 Thread AKASHI Takahiro
Memory range capsule gives us a way to notify that some memory regions should be left untouched across the next reset. See UEFI specification, section 8.5.3. Since how we should handle this kind of capsule is totally up to the system, no implementation will be added in this commit.

[PATCH v6 05/17] efi_loader: add option to initialise EFI subsystem early

2020-09-06 Thread AKASHI Takahiro
If this option, CONFIG_EFI_SETUP_EARLY, is enabled, the initialisation of UEFI subsystem will be done as part of U-Boot initialisation. Please note that this option won't be enabled explicitly by users, instead, should be enabled implicitly by other configuration options. Specifically, this

[PATCH v6 03/17] common: update: add a generic interface for FIT image

2020-09-06 Thread AKASHI Takahiro
The main purpose of this patch is to separate a generic interface for updating firmware using DFU drivers from "auto-update" via tftp. This function will also be used in implementing UEFI capsule update in a later commit. Signed-off-by: AKASHI Takahiro --- common/Kconfig | 15 ++

[PATCH v6 02/17] dfu: modify an argument type for an address

2020-09-06 Thread AKASHI Takahiro
The range of an addressable pointer can go beyond 'integer'. So change the argument type to a void pointer. Signed-off-by: AKASHI Takahiro Reviewed-by: Heinrich Schuchardt --- common/update.c | 3 ++- drivers/dfu/dfu_alt.c | 6 +++--- include/dfu.h | 4 ++-- 3 files changed, 7

[PATCH v6 01/17] dfu: rename dfu_tftp_write() to dfu_write_by_name()

2020-09-06 Thread AKASHI Takahiro
This function is essentially independent from tftp, and will also be utilised in implementing UEFI capsule update in a later commit. So just give it a more generic name. In addition, a new configuration option, CONFIG_DFU_ALT, was introduced so that the file will be compiled with different

[PATCH v6 00/17] efi_loader: add capsule update support

2020-09-06 Thread AKASHI Takahiro
Summary === 'UpdateCapsule' is one of runtime services defined in UEFI specification and its aim is to allow a caller (OS) to pass information to the firmware, i.e. U-Boot. This is mostly used to update firmware binary on devices by instructions from OS. While 'UpdateCapsule' is a runtime

Re: [PATCH v2 19/30] pwm: ti: am33xx: add subsystem driver

2020-09-06 Thread Lokesh Vutla
Hi Dario, On 06/09/20 5:41 pm, Dario Binacchi wrote: > The TI PWMSS driver is a simple bus driver for providing clock and power > management for the PWM peripherals on TI AM33xx SoCs, namely eCAP, > eHRPWM and eQEP. > > Based on more recent versions of the device tree inside the linux kernel, >

Re: [PATCH] arm: mvebu: Espressobin: Set environment variable fdtfile

2020-09-06 Thread Andre Heider
Hi Marek, On 06/09/2020 20:56, Marek Behun wrote: On Sun, 6 Sep 2020 20:48:57 +0200 Andre Heider wrote: On 06/09/2020 18:12, Marek Behun wrote: On Sun, 6 Sep 2020 11:32:47 +0200 Pali Rohár wrote: Adding Marek to loop. On Saturday 05 September 2020 14:07:44 Andre Heider wrote:

Re: [PATCH 1/1] espresso7420: remove unused symbol CONFIG_DEFAULT_CONSOLE

2020-09-06 Thread Minkyu Kang
Dear Heinrich Schuchardt, On 07/09/2020 04:33, Heinrich Schuchardt wrote: > On 9/6/20 9:00 PM, Andre Heider wrote: >> On 05/09/2020 12:02, Heinrich Schuchardt wrote: >>> Symbol CONFIG_DEFAULT_CONSOLE in include/configs/espresso7420.h is not >>> used >>> for espresso7420_defconfig. >>> >>>

[PATCH 5/7] cmd: bcb: Add support for processing const string literals in bcb_set()

2020-09-06 Thread Roman Kovalivskyi
From: Eugeniu Rosca On request/suggestion from Simon Glass back in May 22 2019 [1], the 'strsep' mechanism implemented in bcb_set() was set to work directly with user-provided argv strings, to avoid duplicating memory and for the sake of simpler implementation. However, since we recently

[PATCH 6/7] Revert "fastboot: Add default fastboot_set_reboot_flag implementation"

2020-09-06 Thread Roman Kovalivskyi
This reverts commit 0ebf9842e56c5b8cb7cb1f990bb452cc14af6225. Current generic implementation of fastboot_set_reboot_flag is somewhat messy and requires some additional configuration option to be enabled besides CMD_BCB, so it reverts that implementtion in order to bring a new cleaner one. Next

[PATCH 7/7] fastboot: Implement generic fastboot_set_reboot_flag

2020-09-06 Thread Roman Kovalivskyi
It is possible to implement fastboot_set_reboot_flag in a generic way if BCB commands are turned on for a target. Using bcb_set_reboot_reason allows to do this by simply passing string with correct reboot reason that should be handled during next boot process. If BCB are turned off, then

[PATCH 4/7] cmd: bcb: Expose 'bcb_write_reboot_reason' to external callers

2020-09-06 Thread Roman Kovalivskyi
From: Eugeniu Rosca Fastboot is evolving and beginning with commit [1], the upstream implementation expects bootloaders to offer support for: - reboot-recovery - reboot-fastboot The most natural way to achieve the above is through a set of pre-defined "reboot reason" strings, written into /

[PATCH 2/2] fastboot: Implement generic fastboot_set_reboot_flag

2020-09-06 Thread Roman Kovalivskyi
It is possible to implement fastboot_set_reboot_flag in a generic way if BCB commands are turned on for a target. Using bcb_set_reboot_reason allows to do this by simply passing string with correct reboot reason that should be handled during next boot process. If BCB are turned off, then

[PATCH 2/7] cmd: bcb: Extract '__bcb_set' from 'do_bcb_set' for internal needs

2020-09-06 Thread Roman Kovalivskyi
From: Eugeniu Rosca Enriching the functionality of U-Boot 'bcb' may assume using the existing sub-commands as building blocks for the next ones. A clean way to achive the above is to expose a number of static routines, each mapped to an existing user command (e.g. load/set/store), with a

[PATCH 1/2] Revert "fastboot: Add default fastboot_set_reboot_flag implementation"

2020-09-06 Thread Roman Kovalivskyi
This reverts commit 0ebf9842e56c5b8cb7cb1f990bb452cc14af6225. Current generic implementation of fastboot_set_reboot_flag is somewhat messy and requires some additional configuration option to be enabled besides CMD_BCB, so it reverts that implementtion in order to bring a new cleaner one. Next

[PATCH 3/7] cmd: bcb: Extract '__bcb_store' from 'do_bcb_store' for internal needs

2020-09-06 Thread Roman Kovalivskyi
From: Eugeniu Rosca Enriching the functionality of U-Boot 'bcb' may assume using the existing sub-commands as building blocks for the next ones. A clean way to achive the above is to expose a number of static routines, each mapped to an existing user command (e.g. load/set/store), with a

[PATCH 0/7] Refactor generic fastboot_set_reboot_flag implementation

2020-09-06 Thread Roman Kovalivskyi
Current generic implementation of fastboot_set_reboot_flag is somewhat messy and requires some additional configuration option to be enabled besides CMD_BCB, so it reverts that implementtion in order to bring a new cleaner one. New function called bcb_set_reboot_reason should be exposed by BCB

[PATCH 1/7] cmd: bcb: Extract '__bcb_load' from 'do_bcb_load' for internal needs

2020-09-06 Thread Roman Kovalivskyi
From: Eugeniu Rosca Enriching the functionality of U-Boot 'bcb' may assume using the existing sub-commands as building blocks for the next ones. A clean way to achive the above is to expose a number of static routines, each mapped to an existing user command (e.g. load/set/store), with a

RE: [v4, 00/11] mmc: fsl_esdhc: support eMMC HS200/HS400 modes

2020-09-06 Thread Y.b. Lu
Hi Jaehoon and Peng, Any comments on the v4 patch-set? Thank you. Best regards, Yangbo Lu > -Original Message- > From: Yangbo Lu > Sent: Tuesday, September 1, 2020 4:58 PM > To: u-boot@lists.denx.de; Peng Fan ; Priyanka Jain > ; 'Jaehoon Chung' > Cc: Y.b. Lu > Subject: [v4, 00/11]

Re: [PATCH v7 05/21] arm: mvebu: x530: Use tiny SPI NOR

2020-09-06 Thread Pratyush Yadav
On 06/09/20 08:34PM, Chris Packham wrote: > > On 5/09/20 3:39 am, Pratyush Yadav wrote: > > Chris, > > > > On 04/09/20 09:04PM, Pratyush Yadav wrote: > >> The SPI NOR core will get Octal DTR in following commits. This has > >> presented a significant challenge of keeping the SPL size in check on

RE: [PATCH v2 3/3] cosmetic: aspeed: Modify for SPDX-License

2020-09-06 Thread ChiaWei Wang
> -Original Message- > From: Ryan Chen > Sent: Monday, August 31, 2020 2:03 PM > To: Ryan Chen ; ChiaWei Wang > ; Lukasz Majewski ; > c...@kaod.org; Eddie James ; Simon Glass > ; u-boot@lists.denx.de > Subject: [PATCH v2 3/3] cosmetic: aspeed: Modify for SPDX-License > > Modify

RE: [PATCH v2 1/3] cosmetic: aspeed: ast2500: Rename clock header

2020-09-06 Thread ChiaWei Wang
> -Original Message- > From: Ryan Chen > Sent: Monday, August 31, 2020 2:03 PM > To: Ryan Chen ; ChiaWei Wang > ; Lukasz Majewski ; > c...@kaod.org; Eddie James ; Simon Glass > ; u-boot@lists.denx.de > Subject: [PATCH v2 1/3] cosmetic: aspeed: ast2500: Rename clock header > > Rename the

RE: [PATCH v2 2/3] clock:aspeed: Sync with Linux kernel clock header define

2020-09-06 Thread ChiaWei Wang
> -Original Message- > From: Ryan Chen > Sent: Monday, August 31, 2020 2:03 PM > To: Ryan Chen ; ChiaWei Wang > ; Lukasz Majewski ; > c...@kaod.org; Eddie James ; Simon Glass > ; u-boot@lists.denx.de > Subject: [PATCH v2 2/3] clock:aspeed: Sync with Linux kernel clock header > define > >

Re: [PATCH] time: Fix get_ticks being non-monotonic

2020-09-06 Thread Sean Anderson
On 9/6/20 9:43 PM, Simon Glass wrote: > Hi Sean, > > On Tue, 1 Sep 2020 at 13:56, Sean Anderson wrote: >> >> get_ticks does not always succeed. Sometimes it can be called before the >> timer has been initialized. If it does, it returns a negative errno. >> This causes the timer to appear

Re: [RFC PATCH 1/1] image: add anti rollback protection for FIT Images

2020-09-06 Thread Simon Glass
Hi Thirupathaiah, On Tue, 1 Sep 2020 at 14:48, Thirupathaiah Annapureddy wrote: > > Anti rollback protection is required when there is a need to retire > previous versions of FIT images due to security flaws in them. > Currently U-Boot Verified boot does not have rollback protection to > protect

Re: [PATCH] time: Fix get_ticks being non-monotonic

2020-09-06 Thread Simon Glass
Hi Sean, On Tue, 1 Sep 2020 at 13:56, Sean Anderson wrote: > > get_ticks does not always succeed. Sometimes it can be called before the > timer has been initialized. If it does, it returns a negative errno. > This causes the timer to appear non-monotonic, because the value will > become much

Re: [RFC 3/4] dtoc: add support for generate stuct udevice_id

2020-09-06 Thread Simon Glass
Hi Walter, On Fri, 7 Aug 2020 at 11:23, Walter Lozano wrote: > > Hi Simon > > On 7/8/20 13:23, Simon Glass wrote: > > Hi Walter, > > > > On Wed, 29 Jul 2020 at 10:00, Walter Lozano > > wrote: > >> Hi Simon, > >> > >> On 28/7/20 23:42, Simon Glass wrote: > >>> Hi Walter, > >>> > >>> On Sun, 26

Re: [PATCH] spl: Kconfig: Record proper dependency for SPL_ATF

2020-09-06 Thread Simon Glass
On Thu, 3 Sep 2020 at 04:02, Michal Simek wrote: > > ATF support was all the time based on FIT image support but this dependency > is not recorded anywhere. > For !SPL_FIT && SPL_ATF there is compilation error: > common/spl/spl.c: In function 'board_init_r': > common/spl/spl.c:689:26: error:

Re: chromebook_coral: build failure

2020-09-06 Thread Simon Glass
Hi Wolfgang, On Tue, 4 Aug 2020 at 01:59, Wolfgang Wallner wrote: > > Hi Simon, > > -"Simon Glass" schrieb: - > > Betreff: Re: chromebook_coral: build failure > > > > Hi Wolfgang, > > > > On Fri, 31 Jul 2020 at 05:44, Wolfgang Wallner > > wrote: > > > > > > Hi Simon, > > > > > > while

Re: [PATCH] acpi: device: Fix check for sequence number

2020-09-06 Thread Simon Glass
Hi Wolfgang, On Thu, 13 Aug 2020 at 01:23, Wolfgang Wallner wrote: > > Hi Simon, > > -"Simon Glass" schrieb: - > > Betreff: Re: [PATCH] acpi: device: Fix check for sequence number > > > > Hi Wolfgang, > > > > On Thu, 30 Jul 2020 at 06:47, Wolfgang Wallner > > wrote: > > > > > >

Re: [PATCH v2 15/30] fdt: translate address if #size-cells = <0>

2020-09-06 Thread Simon Glass
Hi Dario, On Sun, 6 Sep 2020 at 06:13, Dario Binacchi wrote: > > The __of_translate_address routine translates an address from the > device tree into a CPU physical address. A note in the description of > the routine explains that the crossing of any level with > #size-cells = <0> is to be

Re: [PATCH v2 02/30] clk: export generic routines

2020-09-06 Thread Simon Glass
On Sun, 6 Sep 2020 at 06:09, Dario Binacchi wrote: > > Export routines that can be used by other drivers avoiding duplicating > code. > > Signed-off-by: Dario Binacchi > > --- > > Changes in v2: > - Add the clk_ prefix to the divider functions. > - Add kernel-doc comments to the exported

Re: [PATCH] Makefile: mrproper shall delete doc/output/

2020-09-06 Thread Simon Glass
On Sat, 5 Sep 2020 at 03:13, Heinrich Schuchardt wrote: > > HTML documentation is generated in doc/output/. This directory shall be > deleted by 'make mrproper' > > Signed-off-by: Heinrich Schuchardt > --- > Makefile | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Simon

Re: [PATCH 2/2] spl: fdt: Record load/entry fit-images entries in 64bit format

2020-09-06 Thread Simon Glass
Hi Michal, On Thu, 3 Sep 2020 at 05:03, Michal Simek wrote: > > The commit 9f45aeb93727 ("spl: fit: implement fdt_record_loadable") which > introduced fdt_record_loadable() state there spl_fit.c is not 64bit safe. > Based on my tests on Xilinx ZynqMP zcu102 platform there shouldn't be a >

Re: [PATCH 0/2] Add support for loading images above 4GB

2020-09-06 Thread Simon Glass
Hi Michal, On Thu, 3 Sep 2020 at 06:30, Michal Simek wrote: > > Hi, > > On 03. 09. 20 13:16, Heinrich Schuchardt wrote: > > On 9/3/20 1:03 PM, Michal Simek wrote: > >> Hi, > >> > >> We have several use cases where customers want to partition memory by > >> putting NS images above 4GB. On Xilinx

Re: [PATCH v3 7/7] riscv: Enable watchdog for the k210

2020-09-06 Thread Simon Glass
On Tue, 1 Sep 2020 at 14:08, Sean Anderson wrote: > > This enables the necessary config options. > > Signed-off-by: Sean Anderson > --- > > Changes in v3: > - Note dependency on "time: Fix get_ticks being non-monotonic" > - Add a few signed-off-bys which were sent for version 1 > >

Re: [PATCH 1/2] spl: Use standard FIT entries

2020-09-06 Thread Simon Glass
Hi Michal, On Thu, 3 Sep 2020 at 05:03, Michal Simek wrote: > > SPL is creating fit-images DT node when loadables are recorded in selected > configuration. Entries which are created are using entry-point and > load-addr property names. But there shouldn't be a need to use non standard >

Re: [PATCH v3 1/7] wdt: dw: Switch to using fls for log2

2020-09-06 Thread Simon Glass
On Tue, 1 Sep 2020 at 14:08, Sean Anderson wrote: > > log_2_n_round_up is only found in arm. fls performs the same job and is > generic. > > Signed-off-by: Sean Anderson > --- > > (no changes since v2) > > Changes in v2: > - Fix fls being off-by-one when compared to log_2_n_round_up > >

Re: [PATCH 2/5] binman: Show an error when a file is missing

2020-09-06 Thread Simon Glass
Hi Andy, On Fri, 4 Sep 2020 at 03:33, Andy Shevchenko wrote: > > On Thu, Sep 03, 2020 at 07:28:53PM -0600, Simon Glass wrote: > > The recent support for missing external binaries does not show an error > > message when a file is genuinely missing (i.e. it is missing but not > > marked as

Re: Fwd: [PATCH 1/1] espresso7420: remove unused symbol CONFIG_DEFAULT_CONSOLE

2020-09-06 Thread Thomas Abraham
Sorry, Heinrich. Unfortunately, we are not the same person. Best regards, Tom Abraham On 9/5/20 6:55 AM, Heinrich Schuchardt wrote: > Hello Thomas, > > I tried to send an U-Boot patch to Thomas Abraham > . But the email address thomas...@samsung.com > does not exist anymore. > > I assume that

U-boot command prompt failed to load in Raspberry pi 4

2020-09-06 Thread satish reddy
Hi, I'm porting u-boot for raspberry pi 4. I cross compiled u-boot for Raspberry pi 4 and copied u-boot.bin and latest firmware files start4.elf and fixup4.dat from git into a SD card. My configuration file contains enable_uart=1 arm_64bit=1 uart_2ndstage=1 kernel=u-boot.bin Inserted SD card

Re: [PATCH 0/8] PinePhone automatic device tree selection

2020-09-06 Thread André Przywara
On 03/09/2020 06:07, Samuel Holland wrote: Hi Samuel, > This patch series implements a feature to automatically choose the > right PinePhone device tree by probing the hardware. It then extends > the functionality to pass the chosen DTB name to the boot command. > Finally, I add device trees and

Re: [PATCH v7 05/21] arm: mvebu: x530: Use tiny SPI NOR

2020-09-06 Thread Chris Packham
On 7/09/20 11:07 am, Chris Packham wrote: > Hi Pratyush, > > On 5/09/20 3:39 am, Pratyush Yadav wrote: >> Chris, >> >> On 04/09/20 09:04PM, Pratyush Yadav wrote: >>> The SPI NOR core will get Octal DTR in following commits. This has >>> presented a significant challenge of keeping the SPL size in

Re: [PATCH v7 05/21] arm: mvebu: x530: Use tiny SPI NOR

2020-09-06 Thread Chris Packham
Hi Pratyush, On 5/09/20 3:39 am, Pratyush Yadav wrote: > Chris, > > On 04/09/20 09:04PM, Pratyush Yadav wrote: >> The SPI NOR core will get Octal DTR in following commits. This has >> presented a significant challenge of keeping the SPL size in check on >> the x530 platform. >> >> On a previous

[PATCH v2] configs: powerpc: Don't set CONFIG_ENV_ADDR for QorIQ SPIFLASH

2020-09-06 Thread Chris Packham
Setting CONFIG_ENV_ADDR to something other than 0 stops gd->env_addr from being allocated dynamically. When the environment is in SPI we need it to be allocated as we can't use a direct memory mapped address. Signed-off-by: Chris Packham --- Changes in v2: - Update the other SPIFLASH_defconfigs

Re: [PATCH v2 1/3] arm64: Mention 4K aligned load addresses in the PIE Kconfig help

2020-09-06 Thread André Przywara
On 04/09/2020 19:42, Stephen Warren wrote: > On 9/4/20 3:07 AM, Edgar E. Iglesias wrote: >> From: "Edgar E. Iglesias" >> >> Mention the requirement of 4K aligned load addresses in the >> help section for the POSITION_INDEPENDENT option. >> >> Suggested-by: Michal Simek >> Signed-off-by: Edgar E.

[PATCH v3 57/57] x86: coral: Update config and device tree for ACPI

2020-09-06 Thread Simon Glass
Enable new features and provide require device-tree config so that U-Boot produces the correct ACPI tables on Coral. Signed-off-by: Simon Glass --- Changes in v3: - Rebase to master Changes in v2: - Rebase to master Changes in v1: - Add NHLT information - Fix i2c PCI addresses - Rename

[PATCH v3 55/57] x86: Add a way to add to the e820 memory table

2020-09-06 Thread Simon Glass
Some boards want to reserve extra regions of memory. Add a 'chosen' property to support this. Signed-off-by: Simon Glass --- (no changes since v1) arch/x86/lib/fsp/fsp_dram.c | 17 + doc/device-tree-bindings/chosen.txt | 18 ++ 2 files changed, 35

[PATCH v3 52/57] x86: fsp: Add more debugging for silicon init

2020-09-06 Thread Simon Glass
If locating the FSP header hangs for whatever reason it is useful to see where it got stuck. Add a debug print. Also show the address of the FSP-S entry point as a sanity check. Signed-off-by: Simon Glass --- (no changes since v1) arch/x86/lib/fsp2/fsp_silicon_init.c | 4 +++- 1 file changed,

[PATCH v3 54/57] acpi: Use defines for field lengths

2020-09-06 Thread Simon Glass
A few fields have an open-coded length. Use the defines for this purpose instead. Signed-off-by: Simon Glass --- (no changes since v1) include/acpi/acpi_table.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/acpi/acpi_table.h b/include/acpi/acpi_table.h index

[PATCH v3 56/57] x86: Move include of bitops out of ACPI region

2020-09-06 Thread Simon Glass
At present linux/bitops.h is included in ACPI code. This is not needed and can cause a problem in fls64.h since BITS_PER_LONG is not defined. Move the #include into the part not used by ACPI. Signed-off-by: Simon Glass --- (no changes since v2) Changes in v2: - Add new patch to move include of

[PATCH v3 50/57] x86: coral: Add audio descriptor files

2020-09-06 Thread Simon Glass
Add files describing the various audio configurations supported on coral. These are passed to Linux in the ACPI tables. Signed-off-by: Simon Glass --- (no changes since v1) Changes in v1: - Add new patch with coral audio descriptor files .../chromebook_coral/dialog-2ch-48khz-24b.dat| Bin

[PATCH v3 53/57] x86: fsp: Show FSP-S or FSP-M address in fsp_get_header()

2020-09-06 Thread Simon Glass
At present this function only supports FSP-M but it is also used to read FSP-S, in which case FSP-M may be zero. Add support for showing whichever address is present in the FSP binary. Also change the debug() statements to log_debug() while here. Signed-off-by: Simon Glass --- (no changes

[PATCH v3 48/57] acpi: tpm: Add a TPM1 table

2020-09-06 Thread Simon Glass
This provides information about a v1 TPM in the system. Generate this table if the TPM is present. Add a required new bloblist type and correct the header order of one header file. Signed-off-by: Simon Glass --- (no changes since v1) arch/x86/lib/acpi_table.c | 54

[PATCH v3 49/57] x86: acpi: Set the log category for x86 table generation

2020-09-06 Thread Simon Glass
This file doesn't currently have a log category. Add one so that items are logged correctly. Signed-off-by: Simon Glass --- (no changes since v1) arch/x86/lib/acpi_table.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/x86/lib/acpi_table.c b/arch/x86/lib/acpi_table.c index

[PATCH v3 47/57] acpi: tpm: Add a TPM2 table

2020-09-06 Thread Simon Glass
This provides information about a v2 TPM in the system. Generate this table if the TPM is present. Signed-off-by: Simon Glass --- (no changes since v1) arch/x86/lib/acpi_table.c | 74 +++ include/acpi/acpi_table.h | 11 ++ include/bloblist.h| 1

[PATCH v3 46/57] x86: Correct handling of MADT table CPUs

2020-09-06 Thread Simon Glass
At present if hyperthreading is disabled the CPU numbering is not sequential. Fix this. Signed-off-by: Simon Glass --- (no changes since v1) arch/x86/lib/acpi_table.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/arch/x86/lib/acpi_table.c

[PATCH v3 51/57] x86: apl: Check low-level init in FSP-S pre-init

2020-09-06 Thread Simon Glass
If U-Boot is not running FSP-S it should not do the pre-init either. Add a condition to handle this. Signed-off-by: Simon Glass --- (no changes since v1) arch/x86/cpu/apollolake/fsp_s.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/x86/cpu/apollolake/fsp_s.c

[PATCH v3 45/57] x86: Add a header guard to asm/acpi_table.h

2020-09-06 Thread Simon Glass
This file cannot currently be included in ASL files. Add a header guard to permit this. Signed-off-by: Simon Glass --- (no changes since v1) arch/x86/include/asm/acpi_table.h | 4 1 file changed, 4 insertions(+) diff --git a/arch/x86/include/asm/acpi_table.h

[PATCH v3 44/57] x86: Correct the assembly guard in e820.h

2020-09-06 Thread Simon Glass
This is currently in the wrong place, so including the file in the device tree fails. Fix it. Signed-off-by: Simon Glass --- (no changes since v1) Changes in v1: - Update commit message with a comma arch/x86/include/asm/e820.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff

[PATCH v3 43/57] x86: Notify the FSP of the 'end firmware' event

2020-09-06 Thread Simon Glass
Send this notification when U-Boot is about to boot into Linux, as requested by the FSP. Currently this causes a crash with the APL FSP, so leave it disabled for now. Signed-off-by: Simon Glass --- (no changes since v1) arch/x86/cpu/cpu.c| 15 +++

[PATCH v3 42/57] x86: Sort the MTRR table

2020-09-06 Thread Simon Glass
At present the MTRR registers are programmed with the list the U-Boot builds up in the same order. In some cases this list may be out of order. It looks better in Linux to have the registers in order, so sort them, Signed-off-by: Simon Glass --- (no changes since v1) arch/x86/cpu/mtrr.c | 12

[PATCH v3 38/57] x86: apl: Drop unnecessary code in PMC driver

2020-09-06 Thread Simon Glass
We don't have CONFIG_PCI in TPL but it is present in SPL, etc. So this code is not needed. Drop it, and fix a code-style nit just above. Signed-off-by: Simon Glass --- (no changes since v1) arch/x86/cpu/apollolake/pmc.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git

[PATCH v3 41/57] x86: cpu: Report address width from cpu_get_info()

2020-09-06 Thread Simon Glass
Add support for this new field in the common code used by most x86 CPU drivers. Signed-off-by: Simon Glass --- (no changes since v1) arch/x86/cpu/i386/cpu.c | 23 +++ arch/x86/cpu/intel_common/cpu.c | 1 + arch/x86/cpu/x86_64/cpu.c | 5 +

[PATCH v3 39/57] tpm: cr50: Add ACPI support

2020-09-06 Thread Simon Glass
Generate ACPI information for this device so that Linux can use it correctly. Signed-off-by: Simon Glass --- (no changes since v1) Changes in v1: - Capitalise ACPI_OPS_PTR - Update for acpi_device_write_i2c_dev() return-value change - Use acpi,ddn instead of acpi,desc drivers/tpm/cr50_i2c.c

[PATCH v3 36/57] x86: apl: Generate CPU tables

2020-09-06 Thread Simon Glass
Add ACPI generation to the APL CPU driver. Signed-off-by: Simon Glass --- (no changes since v1) Changes in v1: - Capitalise ACPI_OPS_PTR - Handle table generation without callbacks arch/x86/cpu/apollolake/cpu.c | 77 ++ arch/x86/lib/Makefile | 3

[PATCH v3 40/57] x86: fsp: Update the FSP API with the end-firmware method

2020-09-06 Thread Simon Glass
This new method is intended to be called when UEFI shuts down the 'boot services', i.e. any lingering code in the boot loader that might be used by the OS. Add a definition for this new method and update the comments a little. Signed-off-by: Simon Glass --- (no changes since v1)

[PATCH v3 37/57] x86: apl: Generate ACPI table for LPC

2020-09-06 Thread Simon Glass
Add an ACPI table for the LPC on Apollo Lake. Signed-off-by: Simon Glass --- (no changes since v1) Changes in v1: - Capitalise ACPI_OPS_PTR arch/x86/cpu/apollolake/lpc.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/arch/x86/cpu/apollolake/lpc.c

[PATCH v3 35/57] x86: apl: Add support for hostbridge ACPI generation

2020-09-06 Thread Simon Glass
Support generating a DMAR table and add a few helper routines as well. Also set up NHLT so that audio works. Signed-off-by: Simon Glass --- (no changes since v1) Changes in v1: - Add support for NHLT table - Capitalise ACPI_OPS_PTR - Move the acpi.h header file to this commit - Update commit

[PATCH v3 28/57] acpi: Add more support for generating processor tables

2020-09-06 Thread Simon Glass
This adds tables relating to P-States and C-States. Signed-off-by: Simon Glass --- (no changes since v1) include/acpi/acpigen.h | 162 +++ lib/acpi/acpigen.c | 167 +++ test/dm/acpigen.c | 294 + 3 files

[PATCH v3 34/57] x86: apl: Generate required ACPI tables

2020-09-06 Thread Simon Glass
Add support for generating various ACPI tables for Apollo Lake. Add a few S3 definitions that are needed. Signed-off-by: Simon Glass --- (no changes since v1) Changes in v1: - Drop unnecessary callbacks arch/x86/cpu/apollolake/Makefile| 1 + arch/x86/cpu/apollolake/acpi.c

[PATCH v3 33/57] p2sb: Add some definitions used for ACPI

2020-09-06 Thread Simon Glass
Allow this header to be included in ASL files by adding a header guard and a few definitions that are needed. Signed-off-by: Simon Glass --- (no changes since v1) include/p2sb.h | 8 1 file changed, 8 insertions(+) diff --git a/include/p2sb.h b/include/p2sb.h index

[PATCH v3 31/57] x86: acpi: Add support for additional Intel tables

2020-09-06 Thread Simon Glass
Apollo Lake needs to generate a few more table types used on Intel SoCs. Add support for these into the x86 ACPI code. Signed-off-by: Simon Glass --- (no changes since v1) Changes in v1: - Move this code into an x86-specific file - Update commit message - Use OEM_TABLE_ID instead of

[PATCH v3 26/57] acpi: Add support for generating processor tables

2020-09-06 Thread Simon Glass
ACPI has a number of CPU-related tables. Add utility functions to write out the basic packages. Signed-off-by: Simon Glass --- (no changes since v1) include/acpi/acpigen.h | 39 +++ lib/acpi/acpigen.c | 55 + test/dm/acpigen.c | 106

[PATCH v3 25/57] x86: acpi: Support generation of the DBG2 table

2020-09-06 Thread Simon Glass
Add an implementation of the DBG2 (Debug Port Table 2) ACPI table. Adjust one of the header includes to be in the correct order, before adding more. Note that the DBG2 table is generic but the PCI UART is x86-specific at present since it assumes an ns16550 UART. It can be generalised later if

[PATCH v3 32/57] x86: apl: Allow reading hostbridge base addresses

2020-09-06 Thread Simon Glass
Add a few functions to permit reading of various useful base addresses provided by the hostbridge. Signed-off-by: Simon Glass --- (no changes since v1) Changes in v1: - Add comments arch/x86/cpu/apollolake/hostbridge.c | 27

[PATCH v3 29/57] x86: acpi: Add common Intel ACPI tables

2020-09-06 Thread Simon Glass
Add various tables that are common to Intel CPUs. These functions can be used by arch-specific CPU code. Signed-off-by: Simon Glass --- (no changes since v1) arch/x86/cpu/intel_common/Makefile | 2 + arch/x86/cpu/intel_common/acpi.c | 377 +

[PATCH v3 30/57] x86: Support Atom SoCs using SWSMISCI rather than the SWSCI

2020-09-06 Thread Simon Glass
Some Atom SoCs use SWSMISCI for SMI control. Add a Kconfig to select this. It is used on Apollo Lake. Signed-off-by: Simon Glass --- (no changes since v1) arch/x86/Kconfig| 6 ++ arch/x86/cpu/apollolake/Kconfig | 1 + 2 files changed, 7 insertions(+) diff --git

[PATCH v3 23/57] x86: Add a few common Intel CPU functions

2020-09-06 Thread Simon Glass
Add functions to query CPU information, needed for ACPI. Signed-off-by: Simon Glass --- (no changes since v1) Changes in v1: - Add more comments and rename cpu_get_bus_clock to cpu_get_bus_clock_khz() arch/x86/cpu/intel_common/cpu.c | 64 +++

[PATCH v3 27/57] x86: acpi: Add PCT and PTC tables

2020-09-06 Thread Simon Glass
These are needed for the CPU tables. Add them into an x86-specific file since we do not support them on sandbox, or include tests. Signed-off-by: Simon Glass --- (no changes since v1) Changes in v1: - Split PCT and PTC tables into a separate patch arch/x86/include/asm/acpigen.h | 35

[PATCH v3 22/57] x86: apl: Update iomap for ACPI

2020-09-06 Thread Simon Glass
Add some more definitions to the iomap. These will be used by ACPI-generation code as well as the device tree. Signed-off-by: Simon Glass --- (no changes since v1) arch/x86/include/asm/arch-apollolake/iomap.h | 16 1 file changed, 16 insertions(+) diff --git

[PATCH v3 18/57] x86: apl: Support writing the IntelGraphicsMem table

2020-09-06 Thread Simon Glass
This table is needed by the Linux graphics driver to handle graphics correctly. Write it to ACPI. Signed-off-by: Simon Glass --- (no changes since v1) Changes in v1: - Capitalise ACPI_OPS_PTR - Don't build for SPL arch/x86/Kconfig | 8 +

[PATCH v3 24/57] x86: acpi: Support generation of the HPET table

2020-09-06 Thread Simon Glass
Add an implementation of the HPET (High Precision Event Timer) ACPI table. Since this is x86-specific, put it in an x86-specific file Signed-off-by: Simon Glass --- (no changes since v1) Changes in v1: - Put this code in an x86-specific place and update commit message

[PATCH v3 21/57] x86: apl: Add power-management definitions

2020-09-06 Thread Simon Glass
Add SCI and power-state definitions required by ACPI tables. Fix the license to match the original source file. Als update the guard on acpi_pmc.h to avoid an error when buiding ASL. Signed-off-by: Simon Glass --- (no changes since v1) Changes in v1: - Use SHIFT and MASK for defines

[PATCH v3 19/57] x86: acpi: Add a common routine to write WiFi info

2020-09-06 Thread Simon Glass
Intel WiFi chips can use a common routine to write the information needed by linux. Add an implementation of this. Enable it for coral. Signed-off-by: Simon Glass --- (no changes since v1) Changes in v1: - Capitalise ACPI_OPS_PTR - Use acpi,ddn instead of acpi,desc arch/x86/Kconfig

[PATCH v3 20/57] x86: Add some definitions for SMM

2020-09-06 Thread Simon Glass
U-Boot does not support SMM (System Management Mode) at present, but needs a few definitions to correctly set up the ACPI table. Add these. Signed-off-by: Simon Glass --- (no changes since v1) arch/x86/include/asm/smm.h | 27 +++ 1 file changed, 27 insertions(+)

[PATCH v3 16/57] i2c: Add a generic driver to generate ACPI info

2020-09-06 Thread Simon Glass
Many I2C devices produce roughly the same ACPI data with just things like the GPIO/interrupt information being different. This can be handled by a generic driver along with some information in the device tree. Add a generic i2c driver for this purpose. Signed-off-by: Simon Glass Reviewed-by:

  1   2   >