kernel/arm: adjust function names for getting/setting SCTLR
Change-Id: I28d6101c772a5065beec5af20f6d2a0c1855ae6c Reviewed-on: https://review.haiku-os.org/c/haiku/+/6421 Tested-by: Commit checker robot <[email protected]> Reviewed-by: David Karoly <[email protected]>
This commit is contained in:
@@ -60,8 +60,8 @@ extern addr_t arm_get_ifar(void);
|
|||||||
|
|
||||||
extern addr_t arm_get_fp(void);
|
extern addr_t arm_get_fp(void);
|
||||||
|
|
||||||
extern int mmu_read_c1(void);
|
extern int arm_get_sctlr(void);
|
||||||
extern int mmu_write_c1(int val);
|
extern int arm_set_sctlr(int val);
|
||||||
|
|
||||||
void arch_cpu_invalidate_TLB_page(addr_t page);
|
void arch_cpu_invalidate_TLB_page(addr_t page);
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2022, Haiku Inc. All rights reserved.
|
* Copyright 2022-2023, Haiku Inc. All rights reserved.
|
||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*
|
*
|
||||||
* Copyright 2009, Wischert, johanneswi@gmail.com.
|
* Copyright 2009, Wischert, johanneswi@gmail.com.
|
||||||
@@ -20,18 +20,18 @@
|
|||||||
.text
|
.text
|
||||||
|
|
||||||
|
|
||||||
/* int mmu_read_c1(void); */
|
/* int arm_get_sctlr(void); */
|
||||||
FUNCTION(mmu_read_c1):
|
FUNCTION(arm_get_sctlr):
|
||||||
mrc p15, 0, r0, c1, c0, 0
|
mrc p15, 0, r0, c1, c0, 0
|
||||||
bx lr
|
bx lr
|
||||||
FUNCTION_END(mmu_read_c1)
|
FUNCTION_END(arm_get_sctlr)
|
||||||
|
|
||||||
|
|
||||||
/* void mmu_write_c1(int val); */
|
/* void arm_set_sctlr(int val); */
|
||||||
FUNCTION(mmu_write_c1):
|
FUNCTION(arm_set_sctlr):
|
||||||
mcr p15, 0, r0, c1, c0, 0
|
mcr p15, 0, r0, c1, c0, 0
|
||||||
bx lr
|
bx lr
|
||||||
FUNCTION_END(mmu_write_c1)
|
FUNCTION_END(arm_set_sctlr)
|
||||||
|
|
||||||
|
|
||||||
/* NOTE: the I bit in cpsr (bit 7) is *set* to disable... */
|
/* NOTE: the I bit in cpsr (bit 7) is *set* to disable... */
|
||||||
|
|||||||
@@ -153,12 +153,12 @@ arch_int_init_post_vm(kernel_args *args)
|
|||||||
arm_vector_init();
|
arm_vector_init();
|
||||||
|
|
||||||
// see if high vectors are enabled
|
// see if high vectors are enabled
|
||||||
if ((mmu_read_c1() & (1 << 13)) != 0)
|
if ((arm_get_sctlr() & (1 << 13)) != 0)
|
||||||
dprintf("High vectors already enabled\n");
|
dprintf("High vectors already enabled\n");
|
||||||
else {
|
else {
|
||||||
mmu_write_c1(mmu_read_c1() | (1 << 13));
|
arm_set_sctlr(arm_get_sctlr() | (1 << 13));
|
||||||
|
|
||||||
if ((mmu_read_c1() & (1 << 13)) == 0)
|
if ((arm_get_sctlr() & (1 << 13)) == 0)
|
||||||
dprintf("Unable to enable high vectors!\n");
|
dprintf("Unable to enable high vectors!\n");
|
||||||
else
|
else
|
||||||
dprintf("Enabled high vectors\n");
|
dprintf("Enabled high vectors\n");
|
||||||
|
|||||||
Reference in New Issue
Block a user