Skip to content

Commit

Permalink
Tested OK
Browse files Browse the repository at this point in the history
  • Loading branch information
lupyuen committed Jul 17, 2024
1 parent 6303a74 commit 32cce38
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
14 changes: 14 additions & 0 deletions arch/risc-v/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,20 @@ config ARCH_MMU_TYPE_SV32
default n
select ARCH_HAVE_MMU

config ARCH_MMU_UDATA_EXTRAFLAGS
hex "??? ARCH_MMU_UDATA_EXTRAFLAGS"
default 0
depends on ARCH_HAVE_MMU
---help---
??? Upper 32 bits of MMU Flags for T-Head ??? or Sv???

config ARCH_MMU_UTEXT_EXTRAFLAGS
hex "??? ARCH_MMU_UTEXT_EXTRAFLAGS"
default 0
depends on ARCH_HAVE_MMU
---help---
??? Upper 32 bits of MMU Flags for T-Head ??? or Sv???

config ARCH_HAVE_S_MODE
bool
default n
Expand Down
4 changes: 2 additions & 2 deletions arch/risc-v/src/common/riscv_addrenv.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@
static_assert((ARCH_ADDRENV_VBASE & RV_MMU_SECTION_ALIGN) == 0,
"Addrenv start address is not aligned to section boundary");

#define CONFIG_ARCH_MMU_UTEXT_EXTRAFLAGS (0x70000000) //// New
#define CONFIG_ARCH_MMU_UDATA_EXTRAFLAGS (0x70000000) //// New
// #define CONFIG_ARCH_MMU_UTEXT_EXTRAFLAGS (0x70000000) //// New
// #define CONFIG_ARCH_MMU_UDATA_EXTRAFLAGS (0x70000000) //// New

#ifndef CONFIG_ARCH_MMU_UTEXT_EXTRAFLAGS
# define CONFIG_ARCH_MMU_UTEXT_EXTRAFLAGS (0)
Expand Down
2 changes: 2 additions & 0 deletions boards/risc-v/sg2000/milkv_duos/configs/nsh/defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ CONFIG_ARCH_HEAP_NPAGES=128
CONFIG_ARCH_HEAP_VBASE=0xC0200000
CONFIG_ARCH_INTERRUPTSTACK=2048
CONFIG_ARCH_KERNEL_STACKSIZE=3072
CONFIG_ARCH_MMU_UDATA_EXTRAFLAGS=0x70000000
CONFIG_ARCH_MMU_UTEXT_EXTRAFLAGS=0x70000000
CONFIG_ARCH_PGPOOL_MAPPING=y
CONFIG_ARCH_PGPOOL_PBASE=0x80600000
CONFIG_ARCH_PGPOOL_SIZE=4194304
Expand Down

0 comments on commit 32cce38

Please sign in to comment.