Page MenuHomeFreeBSD

D44535.1787797101.diff
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

D44535.1787797101.diff

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,8 @@
#include <dev/psci/psci.h>
+void (*cpu_reset_hook)(void);
+
/*
* 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 +125,8 @@
cpu_reset(void)
{
- psci_reset();
+ if (cpu_reset_hook != NULL)
+ cpu_reset_hook();
printf("cpu_reset failed");
while(1)
diff --git a/sys/arm64/include/machdep.h b/sys/arm64/include/machdep.h
--- a/sys/arm64/include/machdep.h
+++ b/sys/arm64/include/machdep.h
@@ -45,6 +45,7 @@
};
extern enum arm64_bus arm64_bus_method;
+extern void (*cpu_reset_hook)(void);
void dbg_init(void);
bool has_hyp(void);
diff --git a/sys/dev/psci/psci.c b/sys/dev/psci/psci.c
--- a/sys/dev/psci/psci.c
+++ b/sys/dev/psci/psci.c
@@ -347,6 +347,10 @@
psci_softc = sc;
+#ifdef __aarch64__
+ cpu_reset_hook = psci_reset;
+#endif
+
return (0);
}

File Metadata

Mime Type
text/plain
Expires
Thu, Aug 27, 2:18 AM (4 h, 7 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29470895
Default Alt Text
D44535.1787797101.diff (1 KB)

Event Timeline