public inbox for opensbi@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Initial ESWIN/EIC7700 support
@ 2025-11-11  3:41 Bo Gan
  2025-11-11  3:41 ` [PATCH 1/3] lib: sbi: allow platform to override PMP configuration Bo Gan
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Bo Gan @ 2025-11-11  3:41 UTC (permalink / raw)
  To: opensbi; +Cc: linmin, pinkesh.vaghela, gaohan, samuel

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2025-11-12 11:30 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-11  3:41 [PATCH 0/3] Initial ESWIN/EIC7700 support Bo Gan
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox