diff options
author | Anup Patel <anup.patel@wdc.com> | 2020-01-15 11:01:12 +0300 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2020-01-22 09:40:49 +0300 |
commit | 84cd4fc913e6475083f0a15993f2b4ad0705c717 (patch) | |
tree | 030f032e7665506f982a8bfecf623cd76f519a10 /lib/sbi/sbi_init.c | |
parent | 817d50d0d477c2e830b92c3afb523711ca0bae3f (diff) | |
download | opensbi-84cd4fc913e6475083f0a15993f2b4ad0705c717.tar.xz |
lib: Initialize TLB management directly from coldboot/warmboot path
Currently, the remote TLB management is initialized via IPI init
which is counter intuitive. This patch initializes remote TLB
management directly from init_coldboot() and init_warmboot()
after IPI init is done.
Signed-off-by: Anup Patel <anup.patel@wdc.com>
Reviewed-by: Atish Patra <atish.patra@wdc.com>
Diffstat (limited to 'lib/sbi/sbi_init.c')
-rw-r--r-- | lib/sbi/sbi_init.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/sbi/sbi_init.c b/lib/sbi/sbi_init.c index 4afeed2..c5a899c 100644 --- a/lib/sbi/sbi_init.c +++ b/lib/sbi/sbi_init.c @@ -16,6 +16,7 @@ #include <sbi/sbi_platform.h> #include <sbi/sbi_system.h> #include <sbi/sbi_timer.h> +#include <sbi/sbi_tlb.h> #include <sbi/sbi_version.h> #define BANNER \ @@ -103,6 +104,10 @@ static void __noreturn init_coldboot(struct sbi_scratch *scratch, u32 hartid) if (rc) sbi_hart_hang(); + rc = sbi_tlb_init(scratch, TRUE); + if (rc) + sbi_hart_hang(); + rc = sbi_timer_init(scratch, TRUE); if (rc) sbi_hart_hang(); @@ -152,6 +157,10 @@ static void __noreturn init_warmboot(struct sbi_scratch *scratch, u32 hartid) if (rc) sbi_hart_hang(); + rc = sbi_tlb_init(scratch, FALSE); + if (rc) + sbi_hart_hang(); + rc = sbi_timer_init(scratch, FALSE); if (rc) sbi_hart_hang(); |