Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F141029872
D20127.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
675 B
Referenced Files
None
Subscribers
None
D20127.id.diff
View Options
Index: head/sys/arm64/arm64/efirt_machdep.c
===================================================================
--- head/sys/arm64/arm64/efirt_machdep.c
+++ head/sys/arm64/arm64/efirt_machdep.c
@@ -259,6 +259,16 @@
{
struct thread *td;
+ /*
+ * Restore the pcpu pointer. Some UEFI implementations trash it and
+ * we don't store it before calling into them. To fix this we need
+ * to restore it after returning to the kernel context. As reading
+ * curthread will access x18 we need to restore it before loading
+ * the thread pointer.
+ */
+ __asm __volatile(
+ "mrs x18, tpidr_el1 \n"
+ );
td = curthread;
__asm __volatile(
"msr ttbr0_el1, %0 \n"
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Dec 31, 11:18 PM (10 h, 51 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27424020
Default Alt Text
D20127.id.diff (675 B)
Attached To
Mode
D20127: Restore x18 in efi_arch_leave
Attached
Detach File
Event Timeline
Log In to Comment