Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102021990
D47456.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D47456.diff
View Options
diff --git a/sys/riscv/include/sbi.h b/sys/riscv/include/sbi.h
--- a/sys/riscv/include/sbi.h
+++ b/sys/riscv/include/sbi.h
@@ -172,6 +172,24 @@
return (SBI_CALL1(SBI_EXT_ID_BASE, SBI_BASE_PROBE_EXTENSION, id).value);
}
+static __inline u_long
+sbi_get_mvendorid(void)
+{
+ return (SBI_CALL0(SBI_EXT_ID_BASE, SBI_BASE_GET_MVENDORID).value);
+}
+
+static __inline u_long
+sbi_get_marchid(void)
+{
+ return (SBI_CALL0(SBI_EXT_ID_BASE, SBI_BASE_GET_MARCHID).value);
+}
+
+static __inline u_long
+sbi_get_mimpid(void)
+{
+ return (SBI_CALL0(SBI_EXT_ID_BASE, SBI_BASE_GET_MIMPID).value);
+}
+
/* TIME extension functions. */
void sbi_set_timer(uint64_t val);
diff --git a/sys/riscv/riscv/sbi.c b/sys/riscv/riscv/sbi.c
--- a/sys/riscv/riscv/sbi.c
+++ b/sys/riscv/riscv/sbi.c
@@ -79,24 +79,6 @@
return (SBI_CALL0(SBI_EXT_ID_BASE, SBI_BASE_GET_IMPL_VERSION));
}
-static struct sbi_ret
-sbi_get_mvendorid(void)
-{
- return (SBI_CALL0(SBI_EXT_ID_BASE, SBI_BASE_GET_MVENDORID));
-}
-
-static struct sbi_ret
-sbi_get_marchid(void)
-{
- return (SBI_CALL0(SBI_EXT_ID_BASE, SBI_BASE_GET_MARCHID));
-}
-
-static struct sbi_ret
-sbi_get_mimpid(void)
-{
- return (SBI_CALL0(SBI_EXT_ID_BASE, SBI_BASE_GET_MIMPID));
-}
-
static void
sbi_shutdown_final(void *dummy __unused, int howto)
{
@@ -307,9 +289,9 @@
sbi_impl_version = sbi_get_impl_version().value;
/* Set the hardware implementation info. */
- mvendorid = sbi_get_mvendorid().value;
- marchid = sbi_get_marchid().value;
- mimpid = sbi_get_mimpid().value;
+ mvendorid = sbi_get_mvendorid();
+ marchid = sbi_get_marchid();
+ mimpid = sbi_get_mimpid();
/* Probe for legacy replacement extensions. */
if (sbi_probe_extension(SBI_EXT_ID_TIME) != 0)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Nov 7, 3:51 PM (3 h, 8 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14516150
Default Alt Text
D47456.diff (1 KB)
Attached To
Mode
D47456: sbi: export machine register accessors
Attached
Detach File
Event Timeline
Log In to Comment