From 08411904fb71b4e7014777d5839dd9008d05766b Mon Sep 17 00:00:00 2001 From: kettenis Date: Mon, 6 Apr 2026 19:12:36 +0000 Subject: [PATCH] Sadly the SpacemiT K1 has peripherals than can only do 32-bit DMA. ok jca@, mlarkin@, deraadt@ --- sys/arch/riscv64/stand/efiboot/conf.c | 4 ++-- sys/arch/riscv64/stand/efiboot/efiboot.c | 10 +++++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/sys/arch/riscv64/stand/efiboot/conf.c b/sys/arch/riscv64/stand/efiboot/conf.c index 2e1985e25b9..d7bc670202a 100644 --- a/sys/arch/riscv64/stand/efiboot/conf.c +++ b/sys/arch/riscv64/stand/efiboot/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.4 2024/06/17 09:12:45 kettenis Exp $ */ +/* $OpenBSD: conf.c,v 1.5 2026/04/06 19:12:36 kettenis Exp $ */ /* * Copyright (c) 1996 Michael Shalayeff @@ -46,7 +46,7 @@ #include "efipxe.h" #include "softraid_riscv64.h" -const char version[] = "1.7"; +const char version[] = "1.8"; int debug = 0; struct fs_ops file_system[] = { diff --git a/sys/arch/riscv64/stand/efiboot/efiboot.c b/sys/arch/riscv64/stand/efiboot/efiboot.c index 343d129026c..da48b2cae39 100644 --- a/sys/arch/riscv64/stand/efiboot/efiboot.c +++ b/sys/arch/riscv64/stand/efiboot/efiboot.c @@ -1,4 +1,4 @@ -/* $OpenBSD: efiboot.c,v 1.12 2025/10/17 16:53:41 deraadt Exp $ */ +/* $OpenBSD: efiboot.c,v 1.13 2026/04/06 19:12:36 kettenis Exp $ */ /* * Copyright (c) 2015 YASUOKA Masahiko @@ -483,9 +483,13 @@ efi_dma_constraint(void) { void *node; - /* StarFive JH71x0 has peripherals that only support 32-bit DMA. */ + /* + * SpacemiT K1 and StarFive JH71x0 have peripherals that only + * support 32-bit DMA. + */ node = fdt_find_node("/"); - if (fdt_node_is_compatible(node, "starfive,jh7100") || + if (fdt_node_is_compatible(node, "spacemit,k1") || + fdt_node_is_compatible(node, "starfive,jh7100") || fdt_node_is_compatible(node, "starfive,jh7110")) dma_constraint[1] = htobe64(0xffffffff);