-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fixing multi-vcpu setups * fix broadcast of IPIs * adjust build process to the new OpenSBI patches * Minor improvements to the build process --------- Signed-off-by: Wojciech Ozga <[email protected]>
- Loading branch information
1 parent
ea764b5
commit 56cf466
Showing
15 changed files
with
148 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,44 @@ | ||
# CONFIG_FDT_GPIO=y | ||
# CONFIG_FDT_I2C=y | ||
CONFIG_PLATFORM_ALLWINNER_D1=y | ||
CONFIG_PLATFORM_ANDES_AE350=y | ||
CONFIG_PLATFORM_RENESAS_RZFIVE=y | ||
CONFIG_PLATFORM_SIFIVE_FU540=y | ||
CONFIG_PLATFORM_SIFIVE_FU740=y | ||
CONFIG_PLATFORM_SOPHGO_SG2042=y | ||
CONFIG_PLATFORM_STARFIVE_JH7110=y | ||
CONFIG_PLATFORM_THEAD=y | ||
CONFIG_FDT_GPIO=y | ||
CONFIG_FDT_GPIO_DESIGNWARE=y | ||
CONFIG_FDT_GPIO_SIFIVE=y | ||
CONFIG_FDT_GPIO_STARFIVE=y | ||
CONFIG_FDT_I2C=y | ||
CONFIG_FDT_I2C_SIFIVE=y | ||
CONFIG_FDT_I2C_DW=y | ||
CONFIG_FDT_IPI=y | ||
CONFIG_FDT_IPI_MSWI=y | ||
CONFIG_FDT_IPI_PLICSW=y | ||
CONFIG_FDT_IRQCHIP=y | ||
CONFIG_FDT_IRQCHIP_APLIC=y | ||
CONFIG_FDT_IRQCHIP_IMSIC=y | ||
CONFIG_FDT_IRQCHIP_PLIC=y | ||
# CONFIG_FDT_REGMAP=y | ||
# CONFIG_FDT_REGMAP_SYSCON=y | ||
CONFIG_FDT_REGMAP=y | ||
CONFIG_FDT_REGMAP_SYSCON=y | ||
CONFIG_FDT_RESET=y | ||
# CONFIG_FDT_RESET_GPIO=y | ||
# CONFIG_FDT_RESET_SYSCON=y | ||
CONFIG_FDT_RESET_ATCWDT200=y | ||
CONFIG_FDT_RESET_GPIO=y | ||
CONFIG_FDT_RESET_HTIF=y | ||
CONFIG_FDT_RESET_SUNXI_WDT=y | ||
CONFIG_FDT_RESET_SYSCON=y | ||
CONFIG_FDT_SERIAL=y | ||
CONFIG_FDT_SERIAL_CADENCE=y | ||
CONFIG_FDT_SERIAL_GAISLER=y | ||
CONFIG_FDT_SERIAL_HTIF=y | ||
CONFIG_FDT_SERIAL_RENESAS_SCIF=y | ||
CONFIG_FDT_SERIAL_SHAKTI=y | ||
CONFIG_FDT_SERIAL_SIFIVE=y | ||
CONFIG_FDT_SERIAL_LITEX=y | ||
CONFIG_FDT_SERIAL_UART8250=y | ||
CONFIG_FDT_SERIAL_XILINX_UARTLITE=y | ||
CONFIG_SERIAL_SEMIHOSTING=y | ||
CONFIG_FDT_TIMER=y | ||
CONFIG_FDT_TIMER_MTIMER=y | ||
# CONFIG_FDT_TIMER_PLMT=y | ||
CONFIG_FDT_TIMER_PLMT=y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,56 @@ | ||
diff --git a/lib/sbi/sbi_hart.c b/lib/sbi/sbi_hart.c | ||
index 770fee0..663eec7 100644 | ||
index 770fee0..9e08308 100644 | ||
--- a/lib/sbi/sbi_hart.c | ||
+++ b/lib/sbi/sbi_hart.c | ||
@@ -24,6 +24,7 @@ | ||
#include <sbi/sbi_trap.h> | ||
#include <sbi/sbi_hfence.h> | ||
|
||
+extern void ace_setup_this_hart(); | ||
extern void __sbi_expected_trap(void); | ||
extern void __sbi_expected_trap_hext(void); | ||
|
||
@@ -369,7 +370,7 @@ static int sbi_hart_smepmp_configure(struct sbi_scratch *scratch, | ||
@@ -369,7 +369,7 @@ static int sbi_hart_smepmp_configure(struct sbi_scratch *scratch, | ||
pmp_disable(SBI_SMEPMP_RESV_ENTRY); | ||
|
||
/* Program M-only regions when MML is not set. */ | ||
- pmp_idx = 0; | ||
+ pmp_idx = 2; | ||
sbi_domain_for_each_memregion(dom, reg) { | ||
/* Skip reserved entry */ | ||
if (pmp_idx == SBI_SMEPMP_RESV_ENTRY) | ||
@@ -395,7 +396,7 @@ static int sbi_hart_smepmp_configure(struct sbi_scratch *scratch, | ||
@@ -395,7 +395,7 @@ static int sbi_hart_smepmp_configure(struct sbi_scratch *scratch, | ||
csr_set(CSR_MSECCFG, MSECCFG_MML); | ||
|
||
/* Program shared and SU-only regions */ | ||
- pmp_idx = 0; | ||
+ pmp_idx = 2; | ||
sbi_domain_for_each_memregion(dom, reg) { | ||
/* Skip reserved entry */ | ||
if (pmp_idx == SBI_SMEPMP_RESV_ENTRY) | ||
@@ -432,7 +433,7 @@ static int sbi_hart_oldpmp_configure(struct sbi_scratch *scratch, | ||
@@ -432,7 +432,7 @@ static int sbi_hart_oldpmp_configure(struct sbi_scratch *scratch, | ||
{ | ||
struct sbi_domain_memregion *reg; | ||
struct sbi_domain *dom = sbi_domain_thishart_ptr(); | ||
- unsigned int pmp_idx = 0; | ||
+ unsigned int pmp_idx = 2; | ||
unsigned int pmp_flags; | ||
unsigned long pmp_addr; | ||
|
||
@@ -534,6 +535,10 @@ int sbi_hart_pmp_configure(struct sbi_scratch *scratch) | ||
rc = sbi_hart_oldpmp_configure(scratch, pmp_count, | ||
pmp_log2gran, pmp_addr_max); | ||
|
||
|
||
diff --git a/lib/sbi/sbi_hsm.c b/lib/sbi/sbi_hsm.c | ||
index 3d60ceb..45c602d 100644 | ||
--- a/lib/sbi/sbi_hsm.c | ||
+++ b/lib/sbi/sbi_hsm.c | ||
@@ -26,6 +26,8 @@ | ||
#include <sbi/sbi_timer.h> | ||
#include <sbi/sbi_console.h> | ||
|
||
+extern void ace_setup_this_hart(); | ||
+ | ||
#define __sbi_hsm_hart_change_state(hdata, oldstate, newstate) \ | ||
({ \ | ||
long state = atomic_cmpxchg(&(hdata)->state, oldstate, newstate); \ | ||
@@ -154,6 +156,11 @@ void __noreturn sbi_hsm_hart_start_finish(struct sbi_scratch *scratch, | ||
next_mode = scratch->next_mode; | ||
hsm_start_ticket_release(hdata); | ||
|
||
+ // ACE START | ||
+ // temporal hack to reconfigure PMPs after they have been reconfigured by OpenSBI. | ||
+ ace_setup_this_hart(); | ||
+ // ACE END | ||
/* | ||
* As per section 3.7.2 of privileged specification v1.12, | ||
* virtual address translations can be speculatively performed | ||
+ | ||
sbi_hart_switch_mode(hartid, next_arg1, next_addr, next_mode, false); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.