From: Andrew Jones <andrew.jones@linux.dev>
To: kvm-riscv@lists.infradead.org
Subject: [kvm-unit-tests PATCH] riscv: sbi: Prepare for assembly entry points
Date: Wed, 6 Nov 2024 10:40:16 +0100 [thread overview]
Message-ID: <20241106094015.21204-2-andrew.jones@linux.dev> (raw)
From: James Raphael Tiovalen <jamestiotio@gmail.com>
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 <jamestiotio@gmail.com>
Signed-off-by: Andrew Jones <andrew.jones@linux.dev>
---
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
diff --git a/riscv/Makefile b/riscv/Makefile
index 22fd273acac3..734441f94dad 100644
--- a/riscv/Makefile
+++ b/riscv/Makefile
@@ -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
diff --git a/riscv/sbi-asm.S b/riscv/sbi-asm.S
new file mode 100644
index 000000000000..fbf97cab39c8
--- /dev/null
+++ b/riscv/sbi-asm.S
@@ -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 <jamestiotio@gmail.com>
+ */
+#define __ASSEMBLY__
+
+#include "sbi-tests.h"
+
+.section .text
+
diff --git a/riscv/sbi-tests.h b/riscv/sbi-tests.h
new file mode 100644
index 000000000000..c28046f7cfbd
--- /dev/null
+++ b/riscv/sbi-tests.h
@@ -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_ */
--
2.47.0
WARNING: multiple messages have this Message-ID (diff)
From: Andrew Jones <andrew.jones@linux.dev>
To: kvm@vger.kernel.org, kvm-riscv@lists.infradead.org
Cc: atishp@rivosinc.com, jamestiotio@gmail.com
Subject: [kvm-unit-tests PATCH] riscv: sbi: Prepare for assembly entry points
Date: Wed, 6 Nov 2024 10:40:16 +0100 [thread overview]
Message-ID: <20241106094015.21204-2-andrew.jones@linux.dev> (raw)
From: James Raphael Tiovalen <jamestiotio@gmail.com>
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 <jamestiotio@gmail.com>
Signed-off-by: Andrew Jones <andrew.jones@linux.dev>
---
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
diff --git a/riscv/Makefile b/riscv/Makefile
index 22fd273acac3..734441f94dad 100644
--- a/riscv/Makefile
+++ b/riscv/Makefile
@@ -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
diff --git a/riscv/sbi-asm.S b/riscv/sbi-asm.S
new file mode 100644
index 000000000000..fbf97cab39c8
--- /dev/null
+++ b/riscv/sbi-asm.S
@@ -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 <jamestiotio@gmail.com>
+ */
+#define __ASSEMBLY__
+
+#include "sbi-tests.h"
+
+.section .text
+
diff --git a/riscv/sbi-tests.h b/riscv/sbi-tests.h
new file mode 100644
index 000000000000..c28046f7cfbd
--- /dev/null
+++ b/riscv/sbi-tests.h
@@ -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_ */
--
2.47.0
next reply other threads:[~2024-11-06 9:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-06 9:40 Andrew Jones [this message]
2024-11-06 9:40 ` [kvm-unit-tests PATCH] riscv: sbi: Prepare for assembly entry points Andrew Jones
2024-11-11 15:06 ` Andrew Jones
2024-11-11 15:06 ` Andrew Jones
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241106094015.21204-2-andrew.jones@linux.dev \
--to=andrew.jones@linux.dev \
--cc=kvm-riscv@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.