All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 0/1] Add boot hartid to a Device tree
@ 2020-02-24 22:19 Atish Patra
  2020-02-24 22:19 ` [RFC PATCH 1/1] riscv: Add boot hartid to " Atish Patra
  2020-02-24 23:08 ` [RFC PATCH 0/1] Add boot hartid to a " Heinrich Schuchardt
  0 siblings, 2 replies; 13+ messages in thread
From: Atish Patra @ 2020-02-24 22:19 UTC (permalink / raw)
  To: u-boot

The RISC-V booting protocol requires the hart id to be present in "a0"
register. This is not a problem for bootm/booti commands as they directly
jump to Linux kernel. However, bootefi jumps to a EFI boot stub code in
Linux kernel which acts a loader and jumps to real Linux after terminating
the boot services. This boot stub code has to be aware of the boot hart id
so that it can set it in "a0" before jumping to Linux kernel. Currently,
UEFI protocol doesn't have any mechanism to pass the boot hart id to an
EFI executable. We should keep it this way as this is a RISC-V specific
requirement rather than a UEFI requirement. Out of the all possible options,
device tree seemed to be the best choice to do this job.
The detailed discussion can be found in the following thread. 

https://patchwork.ozlabs.org/patch/1233664/

This patch updates the device tree in arch_fixup_fdt() which is common for
all booting commands. As a result, the DT modification doesn't require any
efi related arch specific functions and all DT related modifications are
contained at one place. However, the hart id node will be available for
Linux even if the kernel is booted using 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

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2020-03-06  0:34 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-24 22:19 [RFC PATCH 0/1] Add boot hartid to a Device tree Atish Patra
2020-02-24 22:19 ` [RFC PATCH 1/1] riscv: Add boot hartid to " Atish Patra
2020-02-24 23:44   ` Ard Biesheuvel
2020-02-24 23:08 ` [RFC PATCH 0/1] Add boot hartid to a " Heinrich Schuchardt
2020-02-24 23:35   ` Ard Biesheuvel
2020-02-24 23:52     ` Atish Patra
2020-02-25  8:28       ` Chang, Abner
2020-02-25  8:48         ` Ard Biesheuvel
2020-02-25  8:59           ` Chang, Abner
2020-02-25  9:07             ` Ard Biesheuvel
2020-03-05  3:22               ` Schaefer, Daniel
2020-03-05  7:35                 ` Ard Biesheuvel
2020-03-06  0:34                 ` Atish Patra

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.