Skip to content

Commit

Permalink
style
Browse files Browse the repository at this point in the history
  • Loading branch information
ChenYangng committed Oct 19, 2023
1 parent a320953 commit c67380c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cmake-tool/helpers/application_settings.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ function(correct_platform_strings)
set(KernelSel4Arch "riscv64" CACHE STRING "" FORCE)
elseif(RISCV32)
set(KernelSel4Arch "riscv32" CACHE STRING "" FORCE)
elseif(Loongarch64)
elseif(LOONGARCH64)
set(KernelSel4Arch "loongarch64" CACHE STRING "" FORCE)
else()
set(_REWRITE OFF)
Expand Down
6 changes: 3 additions & 3 deletions elfloader-tool/src/arch-loongarch/boot.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
#define PTE_GSRWXV 0x11D3

#define PTE_CREATE_NEXT(PT_BASE) (unsigned long)PT_BASE
#define PTE_CREATE_64GHUGE_LEAF(PT_BASE) (unsigned long)(PTE_64GHUGE_PA(PT_BASE)|PTE_GSRWXV)
#define PTE_CREATE_64GHUGE_LEAF(PT_BASE) (unsigned long)(PTE_64GHUGE_PA(PT_BASE) | PTE_GSRWXV)
#define PTE_CREATE_HUGE_LEAF(PT_BASE) (unsigned long)(PTE_HUGE_PA(PT_BASE) | PTE_GSRWXV)

#define GET_PT_INDEX(addr, n) (((addr) >> (((PT_INDEX_BITS) * ((PT_LEVELS) - (n))) + LOONGARCH_L3PGSHIFT)) % PTES_PER_PT)
Expand Down Expand Up @@ -117,7 +117,7 @@ static void setup_pw(void)

static inline void invtlb(void)
{
asm volatile("invtlb 0x1, $r0, $r0" :::);
asm volatile("invtlb 0x0, $r0, $r0" :::);
}

static inline void dbar(void)
Expand Down Expand Up @@ -148,7 +148,7 @@ static void init_tlb(void)
printf("MMU doesn't support PAGE_SIZE\n");

setup_tlb_handler();
// invtlb();
invtlb();
}

static int map_kernel_window(struct image_info *kernel_info)
Expand Down

0 comments on commit c67380c

Please sign in to comment.