diff options
Diffstat (limited to 'firmware/target/arm/system-target.h')
-rw-r--r-- | firmware/target/arm/system-target.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/firmware/target/arm/system-target.h b/firmware/target/arm/system-target.h index 6b35a49c97..7a1ff4f79a 100644 --- a/firmware/target/arm/system-target.h +++ b/firmware/target/arm/system-target.h | |||
@@ -70,6 +70,20 @@ static inline unsigned int current_core(void) | |||
70 | return core; | 70 | return core; |
71 | } | 71 | } |
72 | 72 | ||
73 | /* Return the actual ID instead of core index */ | ||
74 | static inline unsigned int processor_id(void) | ||
75 | { | ||
76 | unsigned char id; | ||
77 | |||
78 | asm volatile ( | ||
79 | "ldrb %0, [%1] \n" | ||
80 | : "=r"(id) | ||
81 | : "r"(&PROCESSOR_ID) | ||
82 | ); | ||
83 | |||
84 | return id; | ||
85 | } | ||
86 | |||
73 | #ifdef BOOTLOADER | 87 | #ifdef BOOTLOADER |
74 | /* All addresses within rockbox are in IRAM in the bootloader so | 88 | /* All addresses within rockbox are in IRAM in the bootloader so |
75 | are therefore uncached */ | 89 | are therefore uncached */ |