git: 2292e7a4cfaa - stable/15 - riscv: add QEMU marchid

From: Mitchell Horne <mhorne_at_FreeBSD.org>
Date: Thu, 12 Nov 2026 16:21:54 UTC
The branch stable/15 has been updated by mhorne:

URL: https://cgit.FreeBSD.org/src/commit/?id=2292e7a4cfaa4f1ea242cfafd20820100425d504

commit 2292e7a4cfaa4f1ea242cfafd20820100425d504
Author:     Mitchell Horne <mhorne@FreeBSD.org>
AuthorDate: 2026-11-09 18:01:46 +0000
Commit:     Mitchell Horne <mhorne@FreeBSD.org>
CommitDate: 2026-11-12 16:21:46 +0000

    riscv: add QEMU marchid
    
    Globally allocated per:
    https://github.com/riscv/riscv-isa-manual/blob/main/marchid.md
    
    MFC after:      3 days
    Sponsored by:   The FreeBSD Foundation
    
    (cherry picked from commit bba06f0681bb8197f1cd11160fa489c1631f399c)
---
 sys/riscv/include/cpu.h    | 1 +
 sys/riscv/riscv/identcpu.c | 1 +
 2 files changed, 2 insertions(+)

diff --git a/sys/riscv/include/cpu.h b/sys/riscv/include/cpu.h
index 13a9f1ca0603..ae3bdab14e35 100644
--- a/sys/riscv/include/cpu.h
+++ b/sys/riscv/include/cpu.h
@@ -77,6 +77,7 @@
 #define	MARCHID_UCB_BOOM	MARCHID_OPENSOURCE(2)
 #define	MARCHID_UCB_SPIKE	MARCHID_OPENSOURCE(5)
 #define	MARCHID_UCAM_RVBS	MARCHID_OPENSOURCE(10)
+#define	MARCHID_QEMU		MARCHID_OPENSOURCE(42)
 
 /* SiFive marchid values */
 #define	MARCHID_SIFIVE_U7	MARCHID_COMMERCIAL(7)
diff --git a/sys/riscv/riscv/identcpu.c b/sys/riscv/riscv/identcpu.c
index af71cc2f89f0..ddd6f571305c 100644
--- a/sys/riscv/riscv/identcpu.c
+++ b/sys/riscv/riscv/identcpu.c
@@ -121,6 +121,7 @@ static const struct marchid_entry global_marchids[] = {
 	{ MARCHID_UCB_BOOM,	"UC Berkeley Boom"		},
 	{ MARCHID_UCB_SPIKE,	"UC Berkeley Spike"		},
 	{ MARCHID_UCAM_RVBS,	"University of Cambridge RVBS"	},
+	{ MARCHID_QEMU,		"QEMU"				},
 	MARCHID_END
 };