Re: CFP open for RISC-V MC at Linux Plumbers Conference 2023

2023-08-11 Thread Atish Patra
On Mon, Jun 26, 2023 at 11:21 PM Atish Patra wrote: > > On Mon, Jun 26, 2023 at 9:08 PM Drew Fustini wrote: > > > > On Mon, Jun 19, 2023 at 12:55:39PM -0700, Atish Patra wrote: > > > The CFP for topic proposals for the RISC-V micro conference[1] 2023 is > > >

[PATCH] doc: qemu-riscv: Fix opensbi build instructions

2020-12-22 Thread Atish Patra
Latest opensbi uses generic platform for Qemu. Update the build instructions. Signed-off-by: Atish Patra --- doc/board/emulation/qemu-riscv.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/board/emulation/qemu-riscv.rst b/doc/board/emulation/qemu-riscv.rst index

Re: [PATCH] efi_loader: Enable run-time variable support for tee based variables

2021-01-14 Thread Atish Patra
On Thu, Jul 23, 2020 at 12:53 AM Ilias Apalodimas wrote: > > We recently added functions for storing/restoring variables > from a file to a memory backed buffer marked as __efi_runtime_data > commit f1f990a8c958 ("efi_loader: memory buffer for variables") > commit 5f7dcf079de8 ("efi_loader: UEFI v

Re: [PATCH] efi_loader: Avoid emitting efi_var_buf to .GOT

2021-01-15 Thread Atish Patra
not mapped in virtual address for Linux. Whenever > > > + * we try to invoke get_variable service, it will panic. > > > > Not everybody will know the abbreviation .got. How about: > > > > "The variables efi_var_file and efi_var_entry must be static to avoid > > that they are referenced via the global offset table (section .got). The > > GOT is neither mapped as EfiRuntimeServicesData nor do we support its > > relocation during SetVirtualAddressMap()." > > > > Sure > > > Otherwise > > I'll wait for Atish to verify it fixes RISC-V, because it makes no difference > whatsoever in arm and send a v2. > Thanks for the quick fix. With this patch, I don't see the panic anymore. Tested-by: Atish Patra > Thanks > /Ilias > > > > Reviewed-by: Heinrich Schuchardt > > [...] -- Regards, Atish

Re: [PATCH] efi_loader: Avoid emitting efi_var_buf to .GOT

2021-01-15 Thread Atish Patra
.data.efi_runtime > c0: aa0103edmov x13, x1 > c4: 79400021ldrhw1, [x1] > c8: aa0203ebmov x11, x2 > cc: f9400400ldr x0, [x0, #8] > d0: b940100cldr w12, [x0, #16] > d4: 8b0c000cadd x12, x0, x12 > > So let's switch efi_var

Re: [PATCH v3 1/1] cmd: provide command sbi

2020-08-19 Thread Atish Patra
2: > + printf("Xvisor\n"); > + break; > + case 3: > + printf("KVM\n"); > + break; > + default: > + printf("Unknown implementation\n"); > + break; > + } > + } > + printf("Extensions:\n"); > + for (i = 0; i < ARRAY_SIZE(extensions); ++i) { > + ret = sbi_probe_extension(extensions[i].id); > + if (ret > 0) > + printf(" %s\n", extensions[i].name); > + } > + return 0; > +} > + > +#ifdef CONFIG_SYS_LONGHELP > +static char sbi_help_text[] = > + "- display SBI spec version, implementation, and available > extensions"; > + > +#endif > + > +U_BOOT_CMD_COMPLETE( > + sbi, 2, 0, do_sbi, > + "display SBI information", > + sbi_help_text, NULL > +); > -- > 2.28.0 > Reviewed-by: Atish Patra -- Regards, Atish

Re: [PATCH] efi_loader: consider no-map property of reserved memory

2020-08-31 Thread Atish Patra
On Thu, Aug 27, 2020 at 9:16 AM Heinrich Schuchardt wrote: > > If a reserved memory node in the device tree has the property no-map, > remove it from the UEFI memory map provided by GetMemoryMap(). > > Signed-off-by: Heinrich Schuchardt > --- > cmd/bootefi.c | 34 ++

Re: [PATCH v2 1/3] efi_loader: ResetSystem() should not hang

2020-08-31 Thread Atish Patra
, > unsigned long data_size, void *reset_data) > { > - /* Nothing we can do */ > - while (1) { } > + return; > } > > /** > -- > 2.28.0 > Reviewed-by: Atish Patra -- Regards, Atish

[PATCH v3 1/5] riscv: Add boot hartid to Device tree

2020-03-17 Thread Atish Patra
b in Linux kernel will parse this node and pass it to the real kernel in "a0" before jumping to it. Signed-off-by: Atish Patra Reviewed-by: Rick Chen --- arch/riscv/lib/bootm.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/arch/riscv/lib/bootm.c b/arch/ris

[PATCH v3 2/5] cmd: bootefi: Parse reserved-memory node from DT

2020-03-17 Thread Atish Patra
pings accordingly. 1. /doc/device-tree-bindings/reserved-memory/reserved-memory.txt] Signed-off-by: Atish Patra --- cmd/bootefi.c | 44 +++- 1 file changed, 35 insertions(+), 9 deletions(-) diff --git a/cmd/bootefi.c b/cmd/bootefi.c index 24fc42ae898e..291cb2d

[PATCH v3 0/5] DT related fixes for RISC-V UEFI

2020-03-17 Thread Atish Patra
roperty to "boot-hartid" from "efi-boot-hartid". 2. Changed the property type to u32 instead of u64 for RV32 compatibility. Atish Patra (5): riscv: Add boot hartid to Device tree cmd: bootefi: Parse reserved-memory node from DT riscv: Provide a mechanism to fix DT for reserved m

[PATCH v3 5/5] riscv: Copy the reserved-memory nodes to final DT

2020-03-17 Thread Atish Patra
The DT used by U-Boot may be different from the DT being passed to the OS if the DT is loaded from external media such as network or mmc. In that case, the reserved-memory node needs to be copied to the DT passed to the OS. Signed-off-by: Atish Patra --- arch/riscv/lib/bootm.c | 5 + 1 file

[PATCH v3 3/5] riscv: Provide a mechanism to fix DT for reserved memory

2020-03-17 Thread Atish Patra
node in device tree so that S-mode software can access this information. This patch provides a framework to copy to the reserved-memory node from one DT to another. This will be used to update the DT used by U-Boot and the DT passed to the next stage OS. Signed-off-by: Atish Patra --- arch/riscv

[PATCH v3 4/5] riscv: Setup reserved-memory node for FU540

2020-03-17 Thread Atish Patra
FU540 uses OF_SEPARATE instead of OF_PRIOR. Enable OF_BOARD_FIXUP to update the DT with reserved-memory node. Signed-off-by: Atish Patra --- board/sifive/fu540/fu540.c | 15 +++ configs/sifive_fu540_defconfig | 1 + 2 files changed, 16 insertions(+) diff --git a/board/sifive

Re: [PATCH v2 2/4] cmd: bootefi: Parse reserved-memory node from DT

2020-03-18 Thread Atish Patra
On Sat, Mar 14, 2020 at 12:14 AM Heinrich Schuchardt wrote: > > On 3/14/20 1:55 AM, Atish Patra wrote: > > On Fri, Mar 13, 2020 at 5:12 PM Atish Patra wrote: > >> > >> Currently, bootefi only parses memory reservation block to setup > >> EFI reserved mem

Re: [PATCH v3 2/5] cmd: bootefi: Parse reserved-memory node from DT

2020-03-18 Thread Atish Patra
On Tue, Mar 17, 2020 at 3:02 PM Heinrich Schuchardt wrote: > > On 3/17/20 10:19 PM, Atish Patra wrote: > > Currently, bootefi only parses memory reservation block to setup > > EFI reserved memory mappings. However, it doesn't parse the > > reserved-memory[1] device tr

Re: [PATCH 1/1] efi_loader: create reservations after ft_board_setup

2020-03-18 Thread Atish Patra
On Sat, Mar 14, 2020 at 3:12 AM Heinrich Schuchardt wrote: > > Some memory reservations are made in ft_board_setup(). Ensure that we > create reserved memory map entries after ft_board_setup(). > > The downside of this patch is that if bootefi is called multiple times with > an devicetree argument

Re: [PATCH v3 1/5] riscv: Add boot hartid to Device tree

2020-03-19 Thread Atish Patra
On Wed, Mar 18, 2020 at 8:14 PM Bin Meng wrote: > > On Thu, Mar 19, 2020 at 11:10 AM Bin Meng wrote: > > > > On Wed, Mar 18, 2020 at 5:19 AM Atish Patra wrote: > > > > > > Linux booting protocol mandates that register "a0" contains the hartid. >

Re: [PATCH v3 3/5] riscv: Provide a mechanism to fix DT for reserved memory

2020-03-19 Thread Atish Patra
On Thu, Mar 19, 2020 at 7:31 AM Bin Meng wrote: > > On Wed, Mar 18, 2020 at 5:19 AM Atish Patra wrote: > > > > In RISC-V, M-mode software can reserve physical memory regions > > by setting appropriate physical memory protection (PMP) csr. As the > > PMP csr are acc

Re: [PATCH v3 4/5] riscv: Setup reserved-memory node for FU540

2020-03-19 Thread Atish Patra
On Thu, Mar 19, 2020 at 7:32 AM Bin Meng wrote: > > On Wed, Mar 18, 2020 at 5:19 AM Atish Patra wrote: > > > > FU540 uses OF_SEPARATE instead of OF_PRIOR. > > > > Enable OF_BOARD_FIXUP to update the DT with reserved-memory node. > > > > Signed-off-by: At

[PATCH v4 4/6] riscv: Setup reserved-memory node for FU540

2020-03-23 Thread Atish Patra
FU540 uses OF_SEPARATE instead of OF_PRIOR. Enable OF_BOARD_FIXUP to update the DT with reserved-memory node. Signed-off-by: Atish Patra --- arch/riscv/lib/fdt_fixup.c | 15 +++ configs/sifive_fu540_defconfig | 1 + 2 files changed, 16 insertions(+) diff --git a/arch/riscv

[PATCH v4 0/6] DT related fixes for RISC-V UEFI

2020-03-23 Thread Atish Patra
;reg" address & size to honor the cell count. Changes from v1->v2: 1. Fix the issue if chosen node is not present. Changes from previous version: 1. Renamed the DT node property to "boot-hartid" from "efi-boot-hartid". 2. Changed the property type to u32 instead of

[PATCH v4 1/6] riscv: Add boot hartid to Device tree

2020-03-23 Thread Atish Patra
b in Linux kernel will parse this node and pass it to the real kernel in "a0" before jumping to it. Signed-off-by: Atish Patra Reviewed-by: Rick Chen --- arch/riscv/lib/bootm.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/arch/riscv/lib/bootm.c b/arch/ris

[PATCH v4 2/6] fdtdec: Fix boundary check

2020-03-23 Thread Atish Patra
. Signed-off-by: Atish Patra --- lib/fdtdec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/fdtdec.c b/lib/fdtdec.c index eb11fc898e30..07ba9f5c97e9 100644 --- a/lib/fdtdec.c +++ b/lib/fdtdec.c @@ -1311,7 +1311,8 @@ int fdtdec_add_reserved_memory(void *blob, const char

[PATCH v4 3/6] riscv: Provide a mechanism to fix DT for reserved memory

2020-03-23 Thread Atish Patra
node in device tree so that S-mode software can access this information. This patch provides a framework to copy to the reserved-memory node from one DT to another. This will be used to update the DT used by U-Boot and the DT passed to the next stage OS. Signed-off-by: Atish Patra --- arch/riscv

[PATCH v4 6/6] riscv: Move all fdt fixups together

2020-03-23 Thread Atish Patra
Keep all the fdt fixups together for better code management. Signed-off-by: Atish Patra --- arch/riscv/lib/bootm.c | 33 - arch/riscv/lib/fdt_fixup.c | 33 + 2 files changed, 33 insertions(+), 33 deletions(-) diff --git a/arch

[PATCH v4 5/6] riscv: Copy the reserved-memory nodes to final DT

2020-03-23 Thread Atish Patra
The DT used by U-Boot may be different from the DT being passed to the OS if the DT is loaded from external media such as network or mmc. In that case, the reserved-memory node needs to be copied to the DT passed to the OS. Signed-off-by: Atish Patra Reviewed-by: Bin Meng --- arch/riscv/lib

Re: [PATCH v4 5/6] riscv: Copy the reserved-memory nodes to final DT

2020-03-24 Thread Atish Patra
On Mon, Mar 23, 2020 at 11:23 PM Heinrich Schuchardt wrote: > > On 3/24/20 5:16 AM, Atish Patra wrote: > > The DT used by U-Boot may be different from the DT being passed to > > the OS if the DT is loaded from external media such as network or > > mmc. In that case, the re

Re: [PATCH v4 3/6] riscv: Provide a mechanism to fix DT for reserved memory

2020-03-24 Thread Atish Patra
On Mon, Mar 23, 2020 at 11:14 PM Heinrich Schuchardt wrote: > > On 3/24/20 5:16 AM, Atish Patra wrote: > > In RISC-V, M-mode software can reserve physical memory regions > > by setting appropriate physical memory protection (PMP) csr. As the > > PMP csr are accessible

Re: [PATCH 1/1] efi_loader: only reserve memory if fdt node enabled

2020-03-24 Thread Atish Patra
!= FDT_ADDR_T_NONE) > + if (addr != FDT_ADDR_T_NONE && > + fdtdec_get_is_enabled(fdt, subnode)) > efi_reserve_memory(addr, size); > subnode = fdt_next_subnode(fdt, subnode); > } > -- > 2.25.1 > Reviewed-by: Atish Patra -- Regards, Atish

Re: [PATCH v4 5/6] riscv: Copy the reserved-memory nodes to final DT

2020-03-24 Thread Atish Patra
On Tue, Mar 24, 2020 at 3:11 PM Heinrich Schuchardt wrote: > > On 3/24/20 8:15 AM, Atish Patra wrote: > > On Mon, Mar 23, 2020 at 11:23 PM Heinrich Schuchardt > > wrote: > >> > >> On 3/24/20 5:16 AM, Atish Patra wrote: > >>> The DT used by U-B

Re: [RFT PATCH v5 0/3] Add compressed Image booting support

2020-03-27 Thread Atish Patra
On Thu, Mar 5, 2020 at 4:25 PM Atish Patra wrote: > > This patch series extends booti to support compressed images > as well. Following compressed images are supported for now. > > lzma, lzo, bzip2, gz. > > Other compression methods can easily be supported if required. &g

[PATCH v5 0/6] RISC-V DT related fixes for reserved memory & UEFI

2020-04-06 Thread Atish Patra
ize to honor the cell count. Changes from v1->v2: 1. Fix the issue if chosen node is not present. Changes from previous version: 1. Renamed the DT node property to "boot-hartid" from "efi-boot-hartid". 2. Changed the property type to u32 instead of u64 for RV32 compatibility.

[PATCH v5 3/6] riscv: Provide a mechanism to fix DT for reserved memory

2020-04-06 Thread Atish Patra
node in device tree so that S-mode software can access this information. This patch provides a framework to copy to the reserved-memory node from one DT to another. This will be used to update the DT used by U-Boot and the DT passed to the next stage OS. Signed-off-by: Atish Patra --- arch/riscv

[PATCH v5 5/6] riscv: Copy the reserved-memory nodes to final DT

2020-04-06 Thread Atish Patra
The DT used by U-Boot may be different from the DT being passed to the OS if the DT is loaded from external media such as network or mmc. In that case, the reserved-memory node needs to be copied to the DT passed to the OS. Signed-off-by: Atish Patra Reviewed-by: Bin Meng --- arch/riscv/lib

[PATCH v5 6/6] riscv: Move all fdt fixups together

2020-04-06 Thread Atish Patra
Keep all the fdt fixups together for better code management. Signed-off-by: Atish Patra Reviewed-by: Bin Meng --- arch/riscv/lib/bootm.c | 33 - arch/riscv/lib/fdt_fixup.c | 33 + 2 files changed, 33 insertions(+), 33

Re: [PATCH v5 0/6] RISC-V DT related fixes for reserved memory & UEFI

2020-04-07 Thread Atish Patra
On Mon, Apr 6, 2020 at 11:51 PM Ard Biesheuvel wrote: > > On Tue, 7 Apr 2020 at 08:46, Heinrich Schuchardt wrote: > > > > On 4/6/20 11:01 PM, Ard Biesheuvel wrote: > > > On Mon, 6 Apr 2020 at 22:45, Atish Patra wrote: > > >> > > >> This seri

Re: [PATCH] efi_loader: consider no-map property of reserved memory

2021-05-10 Thread Atish Patra
On Wed, Sep 2, 2020 at 12:10 AM Heinrich Schuchardt wrote: > > On 31.08.20 20:08, Atish Patra wrote: > > On Thu, Aug 27, 2020 at 9:16 AM Heinrich Schuchardt > > wrote: > >> > >> If a reserved memory node in the device tree has the property no-map, >

Re: [PATCH] efi_loader: consider no-map property of reserved memory

2021-05-13 Thread Atish Patra
On Mon, May 10, 2021 at 4:47 PM Atish Patra wrote: > > On Wed, Sep 2, 2020 at 12:10 AM Heinrich Schuchardt > wrote: > > > > On 31.08.20 20:08, Atish Patra wrote: > > > On Thu, Aug 27, 2020 at 9:16 AM Heinrich Schuchardt > > > wrote: > > >>

Re: [PATCH] riscv: Fix arch_fixup_fdt always failing without /chosen

2021-05-14 Thread Atish Patra
gd->arch.boot_hart); > + if (err < 0) > + return log_msg_ret("could not set boot-hartid", err); > #endif > > /* Copy the reserved-memory node to the DT used by OS */ > -- > 2.31.0 > Thanks for the fix. Good catch. With update commit text as suggested by Bin: Reviewed-by: Atish Patra -- Regards, Atish

Re: [PATCH] efi_loader: consider no-map property of reserved memory

2021-05-14 Thread Atish Patra
On Fri, May 14, 2021 at 12:59 AM Heinrich Schuchardt wrote: > > On 5/13/21 11:53 PM, Mark Kettenis wrote: > >> From: Heinrich Schuchardt > >> Date: Thu, 13 May 2021 21:41:40 +0200 > > > > Hi Heinrich & Atish, > > > >> On 5/11/21 1:47 AM, A

RISC-V Microconference Accepted into 2021 Linux Plumbers Conference

2021-07-26 Thread Atish Patra
The CFP for topic proposals for the RISC-V micro conference is open now. Please submit it as soon as possible. Here is the announcement. https://www.linuxplumbersconf.org/blog/2021/index.php/2021/07/26/risc-v-microconference-accepted-into-2021-linux-plumbers-conference/ FYI: The Linux plumbers ev

Re: [PATCH v2 1/1] riscv: use log functions in fdt_fixup

2020-06-30 Thread Atish Patra
; node"); > + log_err("Device Tree can't be expanded to accommodate new > node"); > return err; > } > chosen_offset = fdt_path_offset(blob, "/chosen"); > if (chosen_offset < 0) { > err = fdt_add_subnode(blob, 0, "chosen"); > if (err < 0) { > - printf("chosen node can not be added\n"); > + log_err("chosen node cannot be added\n"); > return err; > } > } > -- > 2.27.0 > Reviewed-by: Atish Patra -- Regards, Atish

Re: [PATCH v2 1/1] efi_loader: architecture specific UEFI setup

2020-02-13 Thread Atish Patra
; > > Sent: Wednesday, February 12, 2020 2:26 AM > > > To: Chang, Abner (HPS SW/FW Technologist) ; > > > Atish Patra ; Ard Biesheuvel > > > > > > Cc: Alexander Graf ; U-Boot Mailing List > > b...@lists.denx.de>; Atish Patra ; > > > l...@nuviain

Re: [PATCH v2 1/1] efi_loader: architecture specific UEFI setup

2020-02-13 Thread Atish Patra
On Thu, Feb 13, 2020 at 2:11 PM Ard Biesheuvel wrote: > > On Thu, 13 Feb 2020 at 19:59, Atish Patra wrote: > > > > On Tue, Feb 11, 2020 at 11:28 PM Ard Biesheuvel > > wrote: > > > > > > On Wed, 12 Feb 2020 at 06:49, Chang, A

Re: [U-Boot] [RFC/RFT PATCH v4 3/3] image: Add compressed Image parsing support in booti.

2020-02-16 Thread Atish Patra
On Fri, Feb 14, 2020 at 8:43 AM Tom Rini wrote: > > On Thu, Feb 13, 2020 at 11:32:52PM +0200, David Abdurachmanov wrote: > > On Thu, Feb 13, 2020 at 6:17 PM Tom Rini wrote: > > > > > > On Wed, Feb 05, 2020 at 12:01:38AM +, Atish Patra wrote: > > > >

Re: [U-Boot] [RFC/RFT PATCH v4 3/3] image: Add compressed Image parsing support in booti.

2020-02-20 Thread Atish Patra
On Thu, Feb 20, 2020 at 1:14 PM David Abdurachmanov wrote: > > On Tue, Feb 18, 2020 at 10:38 PM Tom Rini wrote: > > > > On Sun, Feb 16, 2020 at 04:48:22PM -0800, Atish Patra wrote: > > > On Fri, Feb 14, 2020 at 8:43 AM Tom Rini wrote: > > > > > >

[RFC PATCH 0/1] Add boot hartid to a Device tree

2020-02-24 Thread Atish Patra
bootm command. If that is not acceptable, we can always move the code to an efi specific function. Atish Patra (1): riscv: Add boot hartid to Device tree arch/riscv/lib/bootm.c | 13 + 1 file changed, 13 insertions(+) -- 2.24.0

[RFC PATCH 1/1] riscv: Add boot hartid to Device tree

2020-02-24 Thread Atish Patra
pass it to the real kernel in "a0" before jumping to it. Signed-off-by: Atish Patra --- arch/riscv/lib/bootm.c | 13 + 1 file changed, 13 insertions(+) diff --git a/arch/riscv/lib/bootm.c b/arch/riscv/lib/bootm.c index fad16901c5f2..b84cc2db2016 100644 --- a/arch/riscv/li

Re: [RFC PATCH 0/1] Add boot hartid to a Device tree

2020-02-24 Thread Atish Patra
On Mon, Feb 24, 2020 at 3:35 PM Ard Biesheuvel wrote: > > On Tue, 25 Feb 2020 at 00:22, Heinrich Schuchardt wrote: > > > > On 2/24/20 11:19 PM, Atish Patra wrote: > > > The RISC-V booting protocol requires the hart id to be present in "a0" > > > r

[v1 PATCH 1/1] riscv: Add boot hartid to Device tree

2020-02-27 Thread Atish Patra
b in Linux kernel will parse this node and pass it to the real kernel in "a0" before jumping to it. Signed-off-by: Atish Patra --- arch/riscv/lib/bootm.c | 13 + 1 file changed, 13 insertions(+) diff --git a/arch/riscv/lib/bootm.c b/arch/riscv/lib/bootm.c index fad16901c5f2.

[v1 PATCH 0/1] Add boot hartid to a Device tree

2020-02-27 Thread Atish Patra
or Linux even if the kernel is booted using bootm command. Changes from previous version: 1. Renamed the DT node property to "boot-hartid" from "efi-boot-hartid". 2. Changed the property type to u32 instead of u64 for RV32 compatibility. Atish Patra (1): riscv: Add boot

Re: [U-Boot] [RFC/RFT PATCH v4 3/3] image: Add compressed Image parsing support in booti.

2020-02-28 Thread Atish Patra
On Thu, Feb 20, 2020 at 2:25 PM Atish Patra wrote: > > On Thu, Feb 20, 2020 at 1:14 PM David Abdurachmanov > wrote: > > > > On Tue, Feb 18, 2020 at 10:38 PM Tom Rini wrote: > > > > > > On Sun, Feb 16, 2020 at 04:48:22PM -0800, Atish Patra wrote: > >

Re: [v1 PATCH 1/1] riscv: Add boot hartid to Device tree

2020-03-04 Thread Atish Patra
On Tue, Mar 3, 2020 at 11:59 PM Rick Chen wrote: > > Hi Atish > > > From: U-Boot [mailto:u-boot-boun...@lists.denx.de] On Behalf Of Atish Patra > > Sent: Friday, February 28, 2020 5:01 AM > > To: u-boot@lists.denx.de > > Cc: Atish Patra; Alexander Graf; Anup

Re: [U-Boot] [RFC/RFT PATCH v4 3/3] image: Add compressed Image parsing support in booti.

2020-03-05 Thread Atish Patra
On Mon, Mar 2, 2020 at 10:41 AM Tom Rini wrote: > > On Fri, Feb 28, 2020 at 05:15:53PM -0800, Atish Patra wrote: > > On Thu, Feb 20, 2020 at 2:25 PM Atish Patra wrote: > > > > > > On Thu, Feb 20, 2020 at 1:14 PM David Abdurachmanov > > > wrote: > >

[RFT PATCH v5 2/3] image: Add a common compression type detection function.

2020-03-05 Thread Atish Patra
other function in future as well. Signed-off-by: Atish Patra Reviewed-by: Tom Rini --- common/image.c | 23 +++ include/image.h | 21 + 2 files changed, 44 insertions(+) diff --git a/common/image.c b/common/image.c index 94873cb6ed50..d8d14e871c64 100644

[RFT PATCH v5 3/3] image: Add compressed Image parsing support in booti.

2020-03-05 Thread Atish Patra
-Boot doesn't know how to parse and decompress. Tested on HiFive Unleashed and Qemu for RISC-V. Tested on Qemu for ARM64. Signed-off-by: Atish Patra --- I could not test this patch on any ARM64 boards due to lack of access to any ARM64 board. If anybody can test it on ARM64, that would be

[RFT PATCH v5 1/3] lib: kconfig: Add option to set BZIP2 compression method

2020-03-05 Thread Atish Patra
There is no way to select BZIP2 compression method. Add it under library/compression config where all other compression related configs are present. Signed-off-by: Atish Patra Reviewed-by: Tom Rini --- lib/Kconfig | 5 + 1 file changed, 5 insertions(+) diff --git a/lib/Kconfig b/lib

[RFT PATCH v5 0/3] Add compressed Image booting support

2020-03-05 Thread Atish Patra
supports. Changes from v4->v5 1. Moved back to explicit kernel_comp_size enviornemnt variable from filesize. 2. Rebased on top latest master. Changes from v3->v4 1. Removed CONFIG_SYS_BOOTM_LEN usage. Atish Patra (3): lib: kconfig: Add option to set BZIP2 compression method image: Add a

Re: [RFC PATCH 0/1] Add boot hartid to a Device tree

2020-03-05 Thread Atish Patra
user supplied DT in the config table, > too, like they always have. > > What do you all think - does that make sense? > > - Daniel > On 2/25/20 10:07 AM, Ard Biesheuvel wrote: > > On Tue, 25 Feb 2020 at 09:59, Chang, Abner (HPS SW/FW Technologist) > wrote: > > ---

Re: [RFT PATCH v5 3/3] image: Add compressed Image parsing support in booti.

2020-03-08 Thread Atish Patra
On Fri, Mar 6, 2020 at 6:59 AM Tom Rini wrote: > > On Thu, Mar 05, 2020 at 04:24:23PM -0800, Atish Patra wrote: > > Add compressed Image parsing support so that booti can parse both > > flat and compressed Image to boot Linux. Currently, it is difficult > > to calculate

[PATCH v2 1/4] riscv: Add boot hartid to Device tree

2020-03-13 Thread Atish Patra
b in Linux kernel will parse this node and pass it to the real kernel in "a0" before jumping to it. Signed-off-by: Atish Patra Reviewed-by: Rick Chen --- arch/riscv/lib/bootm.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/arch/riscv/lib/bootm.c b/arch/ris

[PATCH v2 3/4] riscv: Provide a mechanism for riscv boards to parse reserved memory

2020-03-13 Thread Atish Patra
to parse the reserved-memory node from the DT passed from the previous stage and update the DT in use. This patch provides a framework to do that from any RISC-V boards. Signed-off-by: Atish Patra --- arch/riscv/cpu/start.S| 1 + arch/riscv/include/asm/global_data.h | 1

[PATCH v2 0/4] DT related fixes for RISC-V UEFI

2020-03-13 Thread Atish Patra
Fix the issue if chosen node is not present. Changes from previous version: 1. Renamed the DT node property to "boot-hartid" from "efi-boot-hartid". 2. Changed the property type to u32 instead of u64 for RV32 compatibility. Atish Patra (4): riscv: Add boot hartid to Device tree

[PATCH v2 4/4] riscv: Setup reserved-memory node for FU540

2020-03-13 Thread Atish Patra
FU540 uses OF_SEPARATE instead of OF_PRIOR. Enable OF_BOARD_FIXUP to update the DT with reserved-memory node. Signed-off-by: Atish Patra --- board/sifive/fu540/fu540.c | 15 +++ configs/sifive_fu540_defconfig | 1 + 2 files changed, 16 insertions(+) diff --git a/board/sifive

[PATCH v2 2/4] cmd: bootefi: Parse reserved-memory node from DT

2020-03-13 Thread Atish Patra
pings accordingly. 1. /doc/device-tree-bindings/reserved-memory/reserved-memory.txt] Signed-off-by: Atish Patra --- cmd/bootefi.c | 42 +- 1 file changed, 33 insertions(+), 9 deletions(-) diff --git a/cmd/bootefi.c b/cmd/bootefi.c index 24fc42ae898e..43b36fb

Re: [PATCH v2 0/4] DT related fixes for RISC-V UEFI

2020-03-13 Thread Atish Patra
On Fri, Mar 13, 2020 at 5:11 PM Atish Patra wrote: > > This series adds few DT related fixes required for Linux EFI stub to work > on RISC-V. > > Patch 1 adds the boot hartid property under /chosen node. The related > discussion can be found here. > > https://patchwork.

Re: [PATCH v2 1/4] riscv: Add boot hartid to Device tree

2020-03-13 Thread Atish Patra
On Fri, Mar 13, 2020 at 5:12 PM Atish Patra wrote: > > Linux booting protocol mandates that register "a0" contains the hartid. > However, U-boot can not pass the hartid via a0 during via standard UEFI > protocol. DT nodes are commonly used to pass such information to the

Re: [PATCH v2 4/4] riscv: Setup reserved-memory node for FU540

2020-03-13 Thread Atish Patra
On Fri, Mar 13, 2020 at 5:12 PM Atish Patra wrote: > > FU540 uses OF_SEPARATE instead of OF_PRIOR. > > Enable OF_BOARD_FIXUP to update the DT with reserved-memory node. > > Signed-off-by: Atish Patra > --- > board/sifive/fu540/fu540.c | 15 +++ > con

Re: [PATCH v2 3/4] riscv: Provide a mechanism for riscv boards to parse reserved memory

2020-03-13 Thread Atish Patra
On Fri, Mar 13, 2020 at 5:12 PM Atish Patra wrote: > > In RISC-V, M-mode software can reserve physical memory regions > by setting appropriate physical memory protection (PMP) csr. As the > PMP csr are accessible only in M-mode, S-mode U-Boot can not read > this configuration direc

Re: [PATCH v2 2/4] cmd: bootefi: Parse reserved-memory node from DT

2020-03-13 Thread Atish Patra
On Fri, Mar 13, 2020 at 5:12 PM Atish Patra wrote: > > Currently, bootefi only parses memory reservation block to setup > EFI reserved memory mappings. However, it doesn't parse the > reserved-memory[1] device tree node that also can contain the > reserved memory regions. &

Re: [PATCH v2 3/4] riscv: Provide a mechanism for riscv boards to parse reserved memory

2020-03-16 Thread Atish Patra
On Sat, Mar 14, 2020 at 3:00 AM Bin Meng wrote: > > Hi Atish, > > On Sat, Mar 14, 2020 at 8:54 AM Atish Patra wrote: > > > > On Fri, Mar 13, 2020 at 5:12 PM Atish Patra wrote: > > > > > > In RISC-V, M-mode software can reserve physical memory regions &g

Re: [PATCH v2 4/4] riscv: Setup reserved-memory node for FU540

2020-03-16 Thread Atish Patra
On Sat, Mar 14, 2020 at 3:18 AM Bin Meng wrote: > > Hi Atish, > > On Sat, Mar 14, 2020 at 8:11 AM Atish Patra wrote: > > > > FU540 uses OF_SEPARATE instead of OF_PRIOR. > > > > Enable OF_BOARD_FIXUP to update the DT with reserved-memory node

Re: [U-Boot] [RFC/RFT U-Boot PATCH] image: Add Image.gz parsing support in booti.

2019-11-04 Thread Atish Patra
On Fri, 2019-11-01 at 09:29 -0400, Tom Rini wrote: > On Thu, Oct 10, 2019 at 02:23:17PM -0700, Atish Patra wrote: > > > Add gz parsing logic so that booti can parse both Image > > and Image.gz to boot Linux. Currently, it is difficult to calculate > > a safe address f

Re: [U-Boot] [RFC/RFT U-Boot PATCH] image: Add Image.gz parsing support in booti.

2019-11-05 Thread Atish Patra
On Mon, 2019-11-04 at 17:35 -0500, Tom Rini wrote: > On Mon, Nov 04, 2019 at 10:20:33PM +0000, Atish Patra wrote: > > On Fri, 2019-11-01 at 09:29 -0400, Tom Rini wrote: > > > On Thu, Oct 10, 2019 at 02:23:17PM -0700, Atish Patra wrote: > > > > > > > Add g

[U-Boot] [RFC/RFT PATCH v3 0/3] Add compressed Image booting support

2019-11-06 Thread Atish Patra
) and U-Boot supports. Atish Patra (3): lib: kconfig: Add option to set BZIP2 compression method image: Add a common compression type detection function. image: Add compressed Image parsing support in booti. cmd/booti.c| 39 ++- common/image.c | 23

[U-Boot] [RFC/RFT PATCH v3 2/3] image: Add a common compression type detection function.

2019-11-06 Thread Atish Patra
other function in future as well. Signed-off-by: Atish Patra --- common/image.c | 23 +++ include/image.h | 21 + 2 files changed, 44 insertions(+) diff --git a/common/image.c b/common/image.c index 179eef0bd2dc..3043f0a1c2fc 100644 --- a/common/image.c

[U-Boot] [RFC/RFT PATCH v3 1/3] lib: kconfig: Add option to set BZIP2 compression method

2019-11-06 Thread Atish Patra
There is no way to select BZIP2 compression method. Add it under library/compression config where all other compression related configs are present. Signed-off-by: Atish Patra --- lib/Kconfig | 5 + 1 file changed, 5 insertions(+) diff --git a/lib/Kconfig b/lib/Kconfig index 3da45a5ec322

[U-Boot] [RFC/RFT PATCH v3 3/3] image: Add compressed Image parsing support in booti.

2019-11-06 Thread Atish Patra
-Boot doesn't know how to parse and decompress. Tested on HiFive Unleashed and Qemu for RISC-V. Tested on Qemu for ARM64. Signed-off-by: Atish Patra --- I could not test this patch on any ARM64 boards due to lack of access to any ARM64 board. If anybody can test it on ARM64, that would be

Re: [U-Boot] [PATCH 4/8] riscv: andes_plic: Fix some wrong configurations

2019-11-07 Thread Atish Patra
On Thu, 2019-11-07 at 19:41 +0800, Rick Chen wrote: > Hi Anup & Lukas > > Anup Patel 於 2019年11月7日 週四 下午6:44寫道: > > On Thu, Nov 7, 2019 at 3:11 PM Auer, Lukas > > wrote: > > > On Thu, 2019-11-07 at 11:48 +0530, Anup Patel wrote: > > > > On Thu, Nov 7, 2019 at 11:40 AM Rick Chen > > > > wrote: >

Re: [U-Boot] [RFC/RFT PATCH v3 3/3] image: Add compressed Image parsing support in booti.

2019-11-08 Thread Atish Patra
On Wed, 2019-11-06 at 14:15 -0800, Atish Patra wrote: > Add compressed Image parsing support so that booti can parse both > flat and compressed Image to boot Linux. Currently, it is difficult > to calculate a safe address for every board where the compressed > image can be decompressed

[U-Boot] [RFC/RFT PATCH v4 0/3] Add compressed Image booting support

2019-11-08 Thread Atish Patra
supports. Changes from v3->v4 1. Removed CONFIG_SYS_BOOTM_LEN usage. Atish Patra (3): lib: kconfig: Add option to set BZIP2 compression method image: Add a common compression type detection function. image: Add compressed Image parsing support in booti. cmd/booti.c|

[U-Boot] [RFC/RFT PATCH v4 3/3] image: Add compressed Image parsing support in booti.

2019-11-08 Thread Atish Patra
-Boot doesn't know how to parse and decompress. Tested on HiFive Unleashed and Qemu for RISC-V. Tested on Qemu for ARM64. Signed-off-by: Atish Patra --- I could not test this patch on any ARM64 boards due to lack of access to any ARM64 board. If anybody can test it on ARM64, that would be

[U-Boot] [RFC/RFT PATCH v4 2/3] image: Add a common compression type detection function.

2019-11-08 Thread Atish Patra
other function in future as well. Signed-off-by: Atish Patra Reviewed-by: Tom Rini --- common/image.c | 23 +++ include/image.h | 21 + 2 files changed, 44 insertions(+) diff --git a/common/image.c b/common/image.c index 179eef0bd2dc..3043f0a1c2fc 100644

[U-Boot] [RFC/RFT PATCH v4 1/3] lib: kconfig: Add option to set BZIP2 compression method

2019-11-08 Thread Atish Patra
There is no way to select BZIP2 compression method. Add it under library/compression config where all other compression related configs are present. Signed-off-by: Atish Patra Reviewed-by: Tom Rini --- lib/Kconfig | 5 + 1 file changed, 5 insertions(+) diff --git a/lib/Kconfig b/lib

Re: [U-Boot] [RFC/RFT PATCH v4 3/3] image: Add compressed Image parsing support in booti.

2019-11-13 Thread Atish Patra
On Wed, 2019-11-13 at 15:36 +0200, David Abdurachmanov wrote: > On Sat, Nov 9, 2019 at 2:14 AM Atish Patra > wrote: > > Add compressed Image parsing support so that booti can parse both > > flat and compressed Image to boot Linux. Currently, it is difficult > > to calc

Re: [PATCH 2/7] riscv: Merge unnecessary SMP ifdefs in start.S

2020-04-10 Thread Atish Patra
j hart_out_of_bounds_loop > -#endif > > -#ifdef CONFIG_SMP > /* SMP relocation entry */ > secondary_hart_relocate: > /* a1: new sp */ > -- > 2.7.4 > Reviewed-by: Atish Patra -- Regards, Atish

Re: [PATCH 5/7] riscv: Add Kconfig option for SBI v0.2

2020-04-10 Thread Atish Patra
with SBI v0.2 HSM extension, only a single > + hart need to boot and enter operating system. The booting hart can > + bring up secondary harts one by one afterwards. > + > + Choose this option if OpenSBI v0.7 or above release is used together > + with U-Boot. > + > +endchoice > + > config SBI_IPI > bool > depends on SBI > -- > 2.7.4 > Reviewed-by: Atish Patra -- Regards, Atish

Re: [PATCH 4/7] riscv: Add SMP Kconfig option dependency for U-Boot proper

2020-04-10 Thread Atish Patra
On Wed, Apr 8, 2020 at 6:42 AM Bin Meng wrote: > > U-Boot proper running in S-mode only need SMP support when using > SBI v0.1. With SBI v0.2 HSM extension, it does not need implement > multicore boot in U-Boot proper. > > Signed-off-by: Bin Meng > --- > > arch/riscv/Kconfig | 1 + > 1 file chan

Re: [PATCH 7/7] riscv: Make SBI v0.2 the default SBI version

2020-04-10 Thread Atish Patra
> @@ -228,7 +228,7 @@ config SBI > > choice > prompt "SBI support" > - default SBI_V01 > + default SBI_V02 > > config SBI_V01 > bool "SBI v0.1 support" > -- > 2.7.4 > Reviewed-by: Atish Patra -- Regards, Atish

Re: [PATCH 5/5] riscv: Implement new SBI v0.2 extensions

2020-04-10 Thread Atish Patra
On Mon, Mar 9, 2020 at 7:36 PM Bin Meng wrote: > > Few v0.1 SBI calls are being replaced by new SBI calls that follows > v0.2 calling convention. > > Implement the replacement extensions and few additional new SBI > function calls that makes way for a better SBI interface in future. > > Signed-off

Re: [PATCH 3/7] riscv: Introduce SPL_SMP Kconfig option for U-Boot SPL

2020-04-10 Thread Atish Patra
(spl_image->entry_point, (ulong)fdt_blob, 0, > 0); > if (ret) > hang(); > diff --git a/common/spl/spl_opensbi.c b/common/spl/spl_opensbi.c > index a136073..3519c34 100644 > --- a/common/spl/spl_opensbi.c > +++ b/common/spl/spl_opensbi.c > @@ -76,7 +76,7 @@ void spl_invoke_opensbi(struct spl_image_info *spl_image) > opensbi_entry = (void (*)(ulong, ulong, ulong))spl_image->entry_point; > invalidate_icache_all(); > > -#ifdef CONFIG_SMP > +#ifdef CONFIG_SPL_SMP > /* > * Start OpenSBI on all secondary harts and wait for acknowledgment. > * > -- > 2.7.4 > Reviewed-by: Atish Patra -- Regards, Atish

Re: [PATCH 6/7] riscv: Remove CONFIG_IS_ENABLED(SMP) in global data

2020-04-10 Thread Atish Patra
On Wed, Apr 8, 2020 at 6:42 AM Bin Meng wrote: > > Currently generic-asm-offsets.h and asm-offsets.h are generated based > on U-Boot proper config options. The same asm-offsets files are used > when building U-Boot SPL/TPL. > > But the generated macros, e.g.: GD_AVAILABLE_HARTS, create potential >

Re: [PATCH v5 0/6] RISC-V DT related fixes for reserved memory & UEFI

2020-04-13 Thread Atish Patra
On Tue, Apr 7, 2020 at 10:35 AM Atish Patra wrote: > > On Mon, Apr 6, 2020 at 11:51 PM Ard Biesheuvel > wrote: > > > > On Tue, 7 Apr 2020 at 08:46, Heinrich Schuchardt wrote: > > > > > > On 4/6/20 11:01 PM, Ard Biesheuvel wrote: > > > &

Re: [PATCH v5 0/6] RISC-V DT related fixes for reserved memory & UEFI

2020-04-14 Thread Atish Patra
On Mon, Apr 13, 2020 at 3:42 PM Bin Meng wrote: > > Hi Atish, > > On Tue, Apr 14, 2020 at 6:02 AM Atish Patra wrote: > > > > On Tue, Apr 7, 2020 at 10:35 AM Atish Patra wrote: > > > > > > On Mon, Apr 6, 2020 at 11:51 PM Ard Biesheuvel > > >

[RESEND PATCH v5 2/6] fdtdec: Fix boundary check

2020-04-17 Thread Atish Patra
. Signed-off-by: Atish Patra --- lib/fdtdec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/fdtdec.c b/lib/fdtdec.c index eb11fc898e30..07ba9f5c97e9 100644 --- a/lib/fdtdec.c +++ b/lib/fdtdec.c @@ -1311,7 +1311,8 @@ int fdtdec_add_reserved_memory(void *blob, const char

[RESEND PATCH v5 1/6] riscv: Add boot hartid to Device tree

2020-04-17 Thread Atish Patra
b in Linux kernel will parse this node and pass it to the real kernel in "a0" before jumping to it. Signed-off-by: Atish Patra Reviewed-by: Rick Chen Tested-by: Heinrich Schuchardt --- arch/riscv/lib/bootm.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/ar

[RESEND PATCH v5 0/6] RISC-V DT related fixes for reserved memory & UEFI

2020-04-17 Thread Atish Patra
ize to honor the cell count. Changes from v1->v2: 1. Fix the issue if chosen node is not present. Changes from previous version: 1. Renamed the DT node property to "boot-hartid" from "efi-boot-hartid". 2. Changed the property type to u32 instead of u64 for RV32 compatibility.

[RESEND PATCH v5 4/6] riscv: Setup reserved-memory node for FU540

2020-04-17 Thread Atish Patra
FU540 uses OF_SEPARATE instead of OF_PRIOR. Enable OF_BOARD_FIXUP to update the DT with reserved-memory node. Signed-off-by: Atish Patra --- arch/riscv/lib/fdt_fixup.c | 15 +++ configs/sifive_fu540_defconfig | 1 + 2 files changed, 16 insertions(+) diff --git a/arch/riscv

[RESEND PATCH v5 5/6] riscv: Copy the reserved-memory nodes to final DT

2020-04-17 Thread Atish Patra
The DT used by U-Boot may be different from the DT being passed to the OS if the DT is loaded from external media such as network or mmc. In that case, the reserved-memory node needs to be copied to the DT passed to the OS. Signed-off-by: Atish Patra Reviewed-by: Bin Meng --- arch/riscv/lib

  1   2   3   >