summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorAndrew Turner <andrew@FreeBSD.org>2020-12-23 13:24:52 +0000
committerAndrew Turner <andrew@FreeBSD.org>2020-12-23 13:57:25 +0000
commitedb48ff6e736ca39eb5b9db7dab4e43fefe387a0 (patch)
treea225acbb9853a11f1f8f5c2523db105387404d1a /sys
parent6f8866af349ceda693edee0dad4aedf4d727096d (diff)
downloadsrc-test-edb48ff6e736ca39eb5b9db7dab4e43fefe387a0.tar.gz
src-test-edb48ff6e736ca39eb5b9db7dab4e43fefe387a0.zip
Mark all arm64 locore functions with ENTRY/LENTRY
It is useful to know where these are within the code, and will be needed by later changes. Sponsored by: Innovate UK
Diffstat (limited to 'sys')
-rw-r--r--sys/arm64/arm64/locore.S33
1 files changed, 20 insertions, 13 deletions
diff --git a/sys/arm64/arm64/locore.S b/sys/arm64/arm64/locore.S
index 6735ffe8900b1..20a0379a9aa1a 100644
--- a/sys/arm64/arm64/locore.S
+++ b/sys/arm64/arm64/locore.S
@@ -67,9 +67,7 @@
* We are loaded at a 2MiB aligned address
*/
- .text
- .globl _start
-_start:
+ENTRY(_start)
#if defined(LINUX_BOOT_ABI)
/* U-boot image header */
b 1f /* code 0 */
@@ -190,6 +188,7 @@ virtdone:
.quad __bss_start
.Lend:
.quad __bss_end
+END(_start)
#ifdef SMP
/*
@@ -249,7 +248,7 @@ END(mpentry)
* If we are started in EL2, configure the required hypervisor
* registers and drop to EL1.
*/
-drop_to_el1:
+LENTRY(drop_to_el1)
mrs x23, CurrentEL
lsr x23, x23, #2
cmp x23, #0x2
@@ -318,6 +317,7 @@ drop_to_el1:
.align 3
.Lsctlr_res1:
.quad SCTLR_RES1
+LEND(drop_to_el1)
#define VECT_EMPTY \
.align 7; \
@@ -350,7 +350,7 @@ hyp_vectors:
* virtual address we expect to run from. This is used when building the
* initial page table.
*/
-get_virt_delta:
+LENTRY(get_virt_delta)
/* Load the physical address of virt_map */
adrp x29, virt_map
add x29, x29, :lo12:virt_map
@@ -366,6 +366,7 @@ get_virt_delta:
.align 3
virt_map:
.quad virt_map
+LEND(get_virt_delta)
/*
* This builds the page tables containing the identity map, and the kernel
@@ -386,7 +387,7 @@ virt_map:
* - The identity (PA = VA) L0 table (TTBR0)
* - The DMAP L1 tables
*/
-create_pagetables:
+LENTRY(create_pagetables)
/* Save the Link register */
mov x5, x30
@@ -538,6 +539,7 @@ common:
/* Restore the Link register */
mov x30, x5
ret
+LEND(create_pagetables)
/*
* Builds an L0 -> L1 table descriptor
@@ -551,7 +553,7 @@ common:
* x10 = Entry count
* x11, x12 and x13 are trashed
*/
-link_l0_pagetable:
+LENTRY(link_l0_pagetable)
/*
* Link an L0 -> L1 table entry.
*/
@@ -575,6 +577,7 @@ link_l0_pagetable:
cbnz x10, 1b
ret
+LEND(link_l0_pagetable)
/*
* Builds an L1 -> L2 table descriptor
@@ -587,7 +590,7 @@ link_l0_pagetable:
* x9 = L2 PA (trashed)
* x11, x12 and x13 are trashed
*/
-link_l1_pagetable:
+LENTRY(link_l1_pagetable)
/*
* Link an L1 -> L2 table entry.
*/
@@ -606,6 +609,7 @@ link_l1_pagetable:
str x13, [x6, x11, lsl #3]
ret
+LEND(link_l1_pagetable)
/*
* Builds count 1 GiB page table entry
@@ -616,7 +620,7 @@ link_l1_pagetable:
* x10 = Entry count
* x11, x12 and x13 are trashed
*/
-build_l1_block_pagetable:
+LENTRY(build_l1_block_pagetable)
/*
* Build the L1 table entry.
*/
@@ -643,6 +647,7 @@ build_l1_block_pagetable:
cbnz x10, 1b
ret
+LEND(build_l1_block_pagetable)
/*
* Builds count 2 MiB page table entry
@@ -653,7 +658,7 @@ build_l1_block_pagetable:
* x10 = Entry count
* x11, x12 and x13 are trashed
*/
-build_l2_block_pagetable:
+LENTRY(build_l2_block_pagetable)
/*
* Build the L2 table entry.
*/
@@ -682,8 +687,9 @@ build_l2_block_pagetable:
cbnz x10, 1b
ret
+LEND(build_l2_block_pagetable)
-start_mmu:
+LENTRY(start_mmu)
dsb sy
/* Load the exception vectors */
@@ -775,10 +781,11 @@ sctlr_clear:
/* Bits to clear */
.quad (SCTLR_EE | SCTLR_EOE | SCTLR_IESB | SCTLR_WXN | SCTLR_UMA | \
SCTLR_ITD | SCTLR_A)
+LEND(start_mmu)
- .globl abort
-abort:
+ENTRY(abort)
b abort
+END(abort)
.align 3
init_pt_va: