Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102730273
D42568.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
901 B
Referenced Files
None
Subscribers
None
D42568.diff
View Options
diff --git a/sys/arm64/arm64/locore.S b/sys/arm64/arm64/locore.S
--- a/sys/arm64/arm64/locore.S
+++ b/sys/arm64/arm64/locore.S
@@ -359,21 +359,13 @@
* Get the physical address the kernel was loaded at.
*/
LENTRY(get_load_phys_addr)
+ /* Load the offset of get_load_phys_addr from KERNBASE */
+ ldr x28, =(get_load_phys_addr - KERNBASE)
/* Load the physical address of virt_map */
- adrp x29, virt_map
- add x29, x29, :lo12:virt_map
- /* Load the virtual address of virt_map stored in virt_map */
- ldr x28, [x29]
- /* Find PA - VA as PA' = VA' - VA + PA = VA' + (PA - VA) = VA' + x29 */
- sub x29, x29, x28
- /* Find the load address for the kernel */
- mov x28, #(KERNBASE)
- add x28, x28, x29
+ adr x29, get_load_phys_addr
+ /* Find the physical address of KERNBASE, i.e. our load address */
+ sub x28, x29, x28
ret
-
- .align 3
-virt_map:
- .quad virt_map
LEND(get_load_phys_addr)
/*
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 17, 11:33 AM (21 h, 53 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14675424
Default Alt Text
D42568.diff (901 B)
Attached To
Mode
D42568: arm64: Clean up finding our load address
Attached
Detach File
Event Timeline
Log In to Comment