diff options
Diffstat (limited to 'firmware/export')
-rw-r--r-- | firmware/export/pp5020.h | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/firmware/export/pp5020.h b/firmware/export/pp5020.h index 108b776523..873d5c849e 100644 --- a/firmware/export/pp5020.h +++ b/firmware/export/pp5020.h | |||
@@ -141,8 +141,33 @@ | |||
141 | #define CPU_CTL (*(volatile unsigned long *)(0x60007000)) | 141 | #define CPU_CTL (*(volatile unsigned long *)(0x60007000)) |
142 | #define COP_CTL (*(volatile unsigned long *)(0x60007004)) | 142 | #define COP_CTL (*(volatile unsigned long *)(0x60007004)) |
143 | 143 | ||
144 | #define PROC_SLEEP 0x80000000 | 144 | #define PROC_SLEEP 0x80000000 |
145 | #define PROC_WAKE 0x0 | 145 | #define PROC_WAIT 0x40000000 |
146 | #define PROC_WAIT_CLR 0x20000000 | ||
147 | #define PROC_CNT_START 0x08000000 | ||
148 | #define PROC_WAKE 0x00000000 | ||
149 | /** | ||
150 | * This is based on some quick but sound experiments on PP5022C. | ||
151 | * CPU/COP_CTL bitmap: | ||
152 | * [31] - sleep until an interrupt occurs | ||
153 | * [30] - wait for cycle countdown to 0 | ||
154 | * [29] - wait for cycle countdown to 0 | ||
155 | * behaves identically to bit 30 unless bit 30 is set as well | ||
156 | * in which case this bit is cleared at the end of the count | ||
157 | * [28] - unknown - no execution effect observed yet | ||
158 | * [27] - begin cycle countdown | ||
159 | * [26:8] - semaphore flags for core communication ? | ||
160 | * no execution effect observed yet | ||
161 | * [11:8] seem to often be set to the core's own ID | ||
162 | * nybble when sleeping - 0x5 or 0xa. | ||
163 | * [7:0] - W: number of cycles to skip on next instruction | ||
164 | * R: cycles remaining | ||
165 | * Executing on CPU | ||
166 | * CPU_CTL = 0x68000080 | ||
167 | * nop | ||
168 | * stalls the nop for 128 cycles | ||
169 | * Reading CPU_CTL after the nop will return 0x48000000 | ||
170 | */ | ||
146 | 171 | ||
147 | /* Cache Control */ | 172 | /* Cache Control */ |
148 | #define CACHE_CTL (*(volatile unsigned long *)(0x6000c000)) | 173 | #define CACHE_CTL (*(volatile unsigned long *)(0x6000c000)) |