We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 39cb6ec commit a1a6439Copy full SHA for a1a6439
1 file changed
modules/aarch64_patches/amp_challenge10/patch10.c
@@ -0,0 +1,23 @@
1
+#include <stdint.h>
2
+#include <stdio.h>
3
+
4
+/*
5
+ * These are external .bss variables.
6
+ */
7
+extern uint16_t size;
8
+extern uint8_t num_packets;
9
10
11
+ * In the future a gcc plugin will offer
12
+ * __attribute__((shiva_patch(start_vaddr, len))
13
14
+uint64_t shiva_insert_patch1_start_0x9b74 = 0;
15
+uint64_t shiva_insert_patch1_end_0x9b8c = 0;
16
17
+void * __attribute__((naked)) shiva_insert_patch1(void)
18
+{
19
+ if ((num_packets * 7) != size) {
20
+ printf("RTS mismatch detected\n");
21
+ return 0;
22
+ }
23
+}
0 commit comments