Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Jul 2026 16:03:42 +0000
From:      Bojan Novk=?utf-8?Q?ovi=C4=87?= <bnovkov@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 84148cc1a926 - main - riscv: Add vendor and arch IDs for the SpacemiT K1 CPU
Message-ID:  <6a5117de.373b3.56027dc1@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by bnovkov:

URL: https://cgit.FreeBSD.org/src/commit/?id=84148cc1a9262452a1d39576dbb5ab7866dddf7b

commit 84148cc1a9262452a1d39576dbb5ab7866dddf7b
Author:     Bojan Novković <bnovkov@FreeBSD.org>
AuthorDate: 2026-04-14 17:01:01 +0000
Commit:     Bojan Novković <bnovkov@FreeBSD.org>
CommitDate: 2026-07-10 15:51:22 +0000

    riscv: Add vendor and arch IDs for the SpacemiT K1 CPU
    
    Differential Revision:  https://reviews.freebsd.org/D56923
    Reviewed by:    mhorne
---
 sys/riscv/include/cpu.h    | 4 ++++
 sys/riscv/riscv/identcpu.c | 6 ++++++
 2 files changed, 10 insertions(+)

diff --git a/sys/riscv/include/cpu.h b/sys/riscv/include/cpu.h
index 13a9f1ca0603..59214f05f595 100644
--- a/sys/riscv/include/cpu.h
+++ b/sys/riscv/include/cpu.h
@@ -55,6 +55,7 @@
 #define	MVENDORID_UNIMPL	0x0
 #define	MVENDORID_SIFIVE	0x489
 #define	MVENDORID_THEAD		0x5b7
+#define	MVENDORID_SPACEMIT	0x710
 
 /*
  * Micro-architecture ID register, marchid.
@@ -82,6 +83,9 @@
 #define	MARCHID_SIFIVE_U7	MARCHID_COMMERCIAL(7)
 #define	MARCHID_SIFIVE_P5	MARCHID_COMMERCIAL(8)
 
+/* SpacemiT marchid values */
+#define	MARCHID_SPACEMIT_K1	MARCHID_COMMERCIAL(0x58000001)
+
 /*
  * MMU virtual-addressing modes. Support for each level implies the previous,
  * so Sv48-enabled systems MUST support Sv39, etc.
diff --git a/sys/riscv/riscv/identcpu.c b/sys/riscv/riscv/identcpu.c
index 7b2d9a1d1259..3b747576db48 100644
--- a/sys/riscv/riscv/identcpu.c
+++ b/sys/riscv/riscv/identcpu.c
@@ -131,6 +131,11 @@ static const struct marchid_entry sifive_marchids[] = {
 	MARCHID_END
 };
 
+static const struct marchid_entry spacemit_marchids[] = {
+	{ MARCHID_SPACEMIT_K1,	"SpacemiT(R) X60" },
+	MARCHID_END
+};
+
 /*
  * Known CPU vendor/manufacturer table.
  */
@@ -142,6 +147,7 @@ static const struct {
 	{ MVENDORID_UNIMPL,	"Unspecified",		NULL		},
 	{ MVENDORID_SIFIVE,	"SiFive",		sifive_marchids	},
 	{ MVENDORID_THEAD,	"T-Head",		NULL		},
+	{ MVENDORID_SPACEMIT,	"SpacemiT",		spacemit_marchids	},
 };
 
 /*


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6a5117de.373b3.56027dc1>