riscv: sbi: Prepare for assembly entry points
Subsystems (3)
PATCH 1/1 riscv: sbi: Prepare for assembly entry points
From: James Raphael Tiovalen <[email protected]>
The HSM tests will need to test HSM start and resumption from HSM suspend. Prepare for these tests, as well other tests, such as the SUSP resume tests, by providing an assembly file for SBI tests.
Signed-off-by James Raphael Tiovalen <[email protected]>
Signed-off-by Andrew Jones <[email protected]>
--- riscv/Makefile | 3 ++- riscv/sbi-asm.S | 12 ++++++++++++ riscv/sbi-tests.h | 6 ++++++ 3 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 riscv/sbi-asm.S create mode 100644 riscv/sbi-tests.h
riscv/Makefile +2 -1
@@ -43,6 +43,7 @@ cflatobjs += lib/riscv/timer.o ifeq ($(ARCH),riscv32) cflatobjs += lib/ldiv32.o endif +cflatobjs += riscv/sbi-asm.o ########################################
@@ -82,7 +83,7 @@ CFLAGS += -mcmodel=medany CFLAGS += -std=gnu99 CFLAGS += -ffreestanding CFLAGS += -O2 -CFLAGS += -I $(SRCDIR)/lib -I $(SRCDIR)/lib/libfdt -I lib +CFLAGS += -I $(SRCDIR)/lib -I $(SRCDIR)/lib/libfdt -I lib -I $(SRCDIR)/riscv asm-offsets = lib/riscv/asm-offsets.h include $(SRCDIR)/scripts/asm-offsets.mak
riscv/sbi-asm.S new file +12 -0
@@ -0,0 +1,12 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Helper assembly code routines for RISC-V SBI extension tests. + * + * Copyright (C) 2024, James Raphael Tiovalen <[email protected]> + */ +#define __ASSEMBLY__ + +#include "sbi-tests.h" + +.section .text +
riscv/sbi-tests.h new file +6 -0
@@ -0,0 +1,6 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +#ifndef _RISCV_SBI_TESTS_H_ +#define _RISCV_SBI_TESTS_H_ + + +#endif /* _RISCV_SBI_TESTS_H_ */
Signature · 1 line
2.47.0
Quoted 70 lines · Andrew Jones
From: James Raphael Tiovalen <[email protected]>
The HSM tests will need to test HSM start and resumption from HSM suspend. Prepare for these tests, as well other tests, such as the SUSP resume tests, by providing an assembly file for SBI tests.
Signed-off-by James Raphael Tiovalen <[email protected]>Signed-off-by Andrew Jones <[email protected]>--- riscv/Makefile | 3 ++- riscv/sbi-asm.S | 12 ++++++++++++ riscv/sbi-tests.h | 6 ++++++ 3 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 riscv/sbi-asm.S create mode 100644 riscv/sbi-tests.hriscv/Makefile +2
-1@@ -43,6 +43,7 @@ cflatobjs += lib/riscv/timer.o ifeq ($(ARCH),riscv32) cflatobjs += lib/ldiv32.o endif +cflatobjs += riscv/sbi-asm.o ########################################@@ -82,7 +83,7 @@ CFLAGS += -mcmodel=medany CFLAGS += -std=gnu99 CFLAGS += -ffreestanding CFLAGS += -O2 -CFLAGS += -I $(SRCDIR)/lib -I $(SRCDIR)/lib/libfdt -I lib +CFLAGS += -I $(SRCDIR)/lib -I $(SRCDIR)/lib/libfdt -I lib -I $(SRCDIR)/riscv asm-offsets = lib/riscv/asm-offsets.h include $(SRCDIR)/scripts/asm-offsets.makriscv/sbi-asm.S new file +12
-0@@ -0,0 +1,12 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Helper assembly code routines for RISC-V SBI extension tests. + * + * Copyright (C) 2024, James Raphael Tiovalen <[email protected]> + */ +#define __ASSEMBLY__ + +#include "sbi-tests.h" + +.section .text +riscv/sbi-tests.h new file +6
-0@@ -0,0 +1,6 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +#ifndef _RISCV_SBI_TESTS_H_ +#define _RISCV_SBI_TESTS_H_ + + +#endif /* _RISCV_SBI_TESTS_H_ */ Signature · 1 line
2.47.0
Merged through riscv/sbi.
Thanks,
drew