-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bed455b
commit fe2d0e4
Showing
3 changed files
with
78 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
68 changes: 68 additions & 0 deletions
68
...n/apple-source-releases/top/patches/0001-Revert-change-that-dropped-aarch64-support.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
diff --git a/libtop.c b/libtop.c | ||
index 5afeaf3f90..755a584073 100644 | ||
--- a/libtop.c | ||
+++ b/libtop.c | ||
@@ -703,11 +703,20 @@ | ||
mach_vm_address_t base = 0, size = 0; | ||
|
||
switch (type) { | ||
+ case CPU_TYPE_ARM64_32: | ||
+ base = SHARED_REGION_BASE_ARM64_32; | ||
+ size = SHARED_REGION_SIZE_ARM64_32; | ||
+ break; | ||
+ | ||
case CPU_TYPE_ARM: | ||
base = SHARED_REGION_BASE_ARM; | ||
size = SHARED_REGION_SIZE_ARM; | ||
break; | ||
|
||
+ case CPU_TYPE_ARM64: | ||
+ base = SHARED_REGION_BASE_ARM64; | ||
+ size = SHARED_REGION_SIZE_ARM64; | ||
+ break; | ||
|
||
case CPU_TYPE_X86_64: | ||
base = SHARED_REGION_BASE_X86_64; | ||
@@ -816,6 +825,8 @@ | ||
|
||
#if defined(__arm__) | ||
libtop_p_fw_scan(mach_task_self(), SHARED_REGION_BASE_ARM, SHARED_REGION_SIZE_ARM); | ||
+#elif defined(__arm64__) && !defined(__LP64__) | ||
+ libtop_p_fw_scan(mach_task_self(), SHARED_REGION_BASE_ARM64_32, SHARED_REGION_SIZE_ARM64_32); | ||
#elif defined(__arm64__) | ||
libtop_p_fw_scan(mach_task_self(), SHARED_REGION_BASE_ARM64, SHARED_REGION_SIZE_ARM64); | ||
#elif defined(__x86_64__) || defined(__i386__) | ||
@@ -1329,6 +1340,14 @@ | ||
switch (type) { | ||
case CPU_TYPE_ARM: | ||
return SHARED_REGION_SIZE_ARM; | ||
+#if defined(CPU_TYPE_ARM64) | ||
+ case CPU_TYPE_ARM64: | ||
+ return SHARED_REGION_SIZE_ARM64; | ||
+#endif | ||
+#if defined(CPU_TYPE_ARM64_32) | ||
+ case CPU_TYPE_ARM64_32: | ||
+ return SHARED_REGION_SIZE_ARM64_32; | ||
+#endif | ||
case CPU_TYPE_POWERPC: | ||
return SHARED_REGION_SIZE_PPC; | ||
case CPU_TYPE_POWERPC64: | ||
diff --git a/pid.c b/pid.c | ||
index 0d9a77460a..54d532d51b 100644 | ||
--- a/pid.c | ||
+++ b/pid.c | ||
@@ -54,8 +54,13 @@ | ||
proc_is_foreign = true; | ||
#endif | ||
break; | ||
+#if defined(CPU_TYPE_ARM64) | ||
+ case CPU_TYPE_ARM64: | ||
+ proc_is_64 = true; | ||
+ // FALLTHROUGH | ||
+#endif | ||
case CPU_TYPE_ARM: | ||
-#if !defined(__arm__) | ||
+#if !defined(__arm__) && !defined(__arm64__) | ||
proc_is_foreign = true; | ||
#endif | ||
break; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters