diff options
| author | Tom Rini <[email protected]> | 2025-01-08 18:05:51 -0600 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2025-01-08 18:05:51 -0600 |
| commit | e13e0a921f444cc12127c8a497dcc476f1268939 (patch) | |
| tree | 19ecf26e4ddc96357f74edc6e7557995de7c0477 /examples/api | |
| parent | 3bfd12008bef1a8353e7ceaca2cb06cf388527ed (diff) | |
| parent | 9c6c7e30aa006a3eab52302e5399f5eb592184ed (diff) | |
Merge tag 'efi-next-20250105' of https://source.denx.de/u-boot/custodians/u-boot-efi
Pull request efi-next-20250105
Documentation:
* doc: develop: Fix typos and wording in binman/binman.rst
* doc: develop: Fix typos and wording in gdb.rst
* doc: sandbox: Fix the "sb" command name
* doc/develop/distro.rst: Better document upstream definition of extlinux.conf
UEFI:
* efi_loader: avoid writing message in Exit() boot service
* efi_loader: update EFI specification version
* cmd: efidebug: update output of memory attributes
* efi_loader: Don't warn if the TCG2 FinalEvents table is not installed
* cmd: bootmenu: add parameter -e for UEFI boot options
* efi_loader: Update startimage_exit self-test to check error
* efi: Correct ECPT table GUID
Others:
Building the API demo application for riscv64 is supported.
* API: unify platform_sys_info() implementations
* examples: implement _start and syscall for RISC-V
* examples: use architecture specific memset() on RISC-V
* examples: use QEMU compatible LOAD_ADDR on RISC-V
* test: fix test_extension.py
* configs: sandbox_deconfig: remove CONFIG_AMIGA_PARTITION
* CI: xilinx_versal_virt: disable USB_DWC3
* net: eth_bootdev_hunt() should not run DHCP
Diffstat (limited to 'examples/api')
| -rw-r--r-- | examples/api/Makefile | 7 | ||||
| -rw-r--r-- | examples/api/crt0.S | 32 |
2 files changed, 37 insertions, 2 deletions
diff --git a/examples/api/Makefile b/examples/api/Makefile index ec1643e4875..722c7e45904 100644 --- a/examples/api/Makefile +++ b/examples/api/Makefile @@ -22,6 +22,9 @@ else LOAD_ADDR = 0x80200000 endif endif +ifeq ($(ARCH),riscv) +LOAD_ADDR = 0x84000000 +endif # Resulting ELF and binary exectuables will be named demo and demo.bin extra-y = demo @@ -43,8 +46,8 @@ EXT_COBJ-y += lib/vsprintf.o EXT_COBJ-y += lib/charset.o EXT_COBJ-$(CONFIG_LIB_UUID) += lib/uuid.o EXT_SOBJ-$(CONFIG_PPC) += arch/powerpc/lib/ppcstring.o -ifeq ($(ARCH),arm) -EXT_SOBJ-$(CONFIG_USE_ARCH_MEMSET) += arch/arm/lib/memset.o +ifneq ($(CONFIG_ARM)$(CONFIG_RISCV),) +EXT_SOBJ-$(CONFIG_USE_ARCH_MEMSET) += arch/$(ARCH)/lib/memset.o endif # Create a list of object files to be compiled diff --git a/examples/api/crt0.S b/examples/api/crt0.S index f1b88ed8a3d..d2a97557817 100644 --- a/examples/api/crt0.S +++ b/examples/api/crt0.S @@ -80,6 +80,38 @@ syscall: return_addr: .align 8 .long 0 +#elif defined(CONFIG_ARCH_RV32I) + + .text + .globl _start +_start: + la t0, search_hint + sw sp, 0(t0) + la t0, main + jalr x0, t0 + + .globl syscall +syscall: + la t0, syscall_ptr + lw t0, 0(t0) + jalr x0, t0 + +#elif defined(CONFIG_ARCH_RV64I) + + .text + .globl _start +_start: + la t0, search_hint + sd sp, 0(t0) + la t0, main + jalr x0, t0 + + .globl syscall +syscall: + la t0, syscall_ptr + ld t0, 0(t0) + jalr x0, t0 + #else #error No support for this arch! #endif |
