Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F144533152
D44535.1775289348.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D44535.1775289348.diff
View Options
diff --git a/sys/arm64/arm64/vm_machdep.c b/sys/arm64/arm64/vm_machdep.c
--- a/sys/arm64/arm64/vm_machdep.c
+++ b/sys/arm64/arm64/vm_machdep.c
@@ -54,6 +54,13 @@
#include <dev/psci/psci.h>
+/*
+ * psci.c is "default" in ARM64 kernel config files
+ * psci_reset will do nothing until/unless the psci device probes/attaches.
+ * Therefore, it is safe to default the cpu_reset_hook to psci_reset.
+ */
+cpu_reset_hook_t cpu_reset_hook = psci_reset;
+
/*
* Finish a fork operation, with process p2 nearly set up.
* Copy and update the pcb, set up the stack so that the child
@@ -123,7 +130,7 @@
cpu_reset(void)
{
- psci_reset();
+ cpu_reset_hook();
printf("cpu_reset failed");
while(1)
diff --git a/sys/arm64/include/cpu.h b/sys/arm64/include/cpu.h
--- a/sys/arm64/include/cpu.h
+++ b/sys/arm64/include/cpu.h
@@ -206,6 +206,9 @@
struct arm64_addr_mask;
extern struct arm64_addr_mask elf64_addr_mask;
+typedef void (*cpu_reset_hook_t)(void);
+extern cpu_reset_hook_t cpu_reset_hook;
+
void cpu_halt(void) __dead2;
void cpu_reset(void) __dead2;
void fork_trampoline(void);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Apr 4, 7:55 AM (1 h, 32 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28254281
Default Alt Text
D44535.1775289348.diff (1 KB)
Attached To
Mode
D44535: arm64: Add a CPU reset hook instead of expecting PSCI
Attached
Detach File
Event Timeline
Log In to Comment