From: Bo Gan <ganboing@gmail.com>
To: opensbi@lists.infradead.org
Cc: linmin@eswincomputing.com, pinkesh.vaghela@einfochips.com,
gaohan@iscas.ac.cn, samuel@sholland.org
Subject: [PATCH 0/3] Initial ESWIN/EIC7700 support
Date: Mon, 10 Nov 2025 19:41:08 -0800 [thread overview]
Message-ID: <20251111034111.43973-1-ganboing@gmail.com> (raw)
EIC7700 is the SoC used in HiFive P550 and Milk-V Megrez. This SoC is
currently one of the only off-the-shelf board/chips that support H
extension, although it's v0.6.1. It also supports pre-ratified N-trace.
Add support for it so people can benefit from latest OpenSBI features.
The device-tree of HiFive P550 has been upstreamed to Linux:
https://lore.kernel.org/all/20250825132427.1618089-1-pinkesh.vaghela@einfochips.com/
However U-boot is not, and there are bugs in vendor U-boot device-tree,
and also inconsistencies between the two. Thus, this patch is coded with
the upstreamed device-tree as the reference, but tested with the patched
vendor U-boot device tree as `FW_FDT_PATH`. The patched vendor U-boot is
hosted here: https://github.com/ganboing/u-boot-eic7x/tree/eic7x-dt-fix
Refer to PATCH 3/3 for the instructions on building the firmware blob
and launch it through UART boot.
The major complication of this chip is that it requires certain memory
regions to be blocked with PMP entries to prevent speculative execution
or HW prefetcher from touching them to avoid bus errors. The logic of
handling PMP is therefore enhanced to support TOR entries and allow the
platform to override PMP configuration. The platform code then properly
set the SoC/Chip specific PMP entries alongside with the ones passed by
generic code in lib/.
Bo Gan (3):
lib: sbi: allow platform to override PMP configuration
lib: sbi: Add pmp_set_tor for setting TOR regions
platform: generic: eswin: add EIC7700
include/sbi/riscv_asm.h | 4 +
include/sbi/sbi_hart.h | 9 ++
include/sbi/sbi_platform.h | 33 +++++
lib/sbi/riscv_asm.c | 75 ++++++++---
lib/sbi/sbi_hart.c | 27 ++--
platform/generic/Kconfig | 5 +
platform/generic/configs/defconfig | 1 +
platform/generic/eswin/Kconfig | 29 ++++
platform/generic/eswin/eic770x.c | 165 +++++++++++++++++++++++
platform/generic/eswin/objects.mk | 11 ++
platform/generic/include/eswin/eic770x.h | 49 +++++++
11 files changed, 383 insertions(+), 25 deletions(-)
create mode 100644 platform/generic/eswin/Kconfig
create mode 100644 platform/generic/eswin/eic770x.c
create mode 100644 platform/generic/eswin/objects.mk
create mode 100644 platform/generic/include/eswin/eic770x.h
--
2.34.1
--
opensbi mailing list
opensbi@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/opensbi
next reply other threads:[~2025-11-11 3:42 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-11 3:41 Bo Gan [this message]
2025-11-11 3:41 ` [PATCH 1/3] lib: sbi: allow platform to override PMP configuration Bo Gan
2025-11-11 5:45 ` Xiang W
2025-11-11 9:18 ` Bo Gan
2025-11-11 3:41 ` [PATCH 2/3] lib: sbi: Add pmp_set_tor for setting TOR regions Bo Gan
2025-11-11 5:45 ` Xiang W
2025-11-11 9:45 ` Bo Gan
2025-11-11 10:35 ` Xiang W
2025-11-12 10:50 ` Bo Gan
2025-11-12 11:29 ` Xiang W
2025-11-11 3:41 ` [PATCH 3/3] platform: generic: eswin: add EIC7700 Bo Gan
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=20251111034111.43973-1-ganboing@gmail.com \
--to=ganboing@gmail.com \
--cc=gaohan@iscas.ac.cn \
--cc=linmin@eswincomputing.com \
--cc=opensbi@lists.infradead.org \
--cc=pinkesh.vaghela@einfochips.com \
--cc=samuel@sholland.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox