libdragon
Loading...
Searching...
No Matches
rspq_constants.h
1#ifndef __RSPQ_INTERNAL
2#define __RSPQ_INTERNAL
3
4#define RSPQ_DEBUG 1
5
6#define RSPQ_DRAM_LOWPRI_BUFFER_SIZE 0x200
7#define RSPQ_DRAM_HIGHPRI_BUFFER_SIZE 0x80
8
9#define RSPQ_DMEM_BUFFER_SIZE 0x100
10#define RSPQ_OVERLAY_TABLE_SIZE 0x10
11#define RSPQ_OVERLAY_DESC_SIZE 0x10
12
14#define RSPQ_MAX_OVERLAY_COUNT 8
15#define RSPQ_OVERLAY_ID_COUNT 16
16#define RSPQ_MAX_OVERLAY_COMMAND_COUNT ((RSPQ_MAX_OVERLAY_COUNT - 1) * 16)
17#define RSPQ_DESCRIPTOR_SIZE_MASK 0xFC
18#define RSPQ_DESCRIPTOR_MAX_SIZE RSPQ_DESCRIPTOR_SIZE_MASK
19
21#define RSPQ_BLOCK_MIN_SIZE 64
22#define RSPQ_BLOCK_MAX_SIZE 4192
23
25#define RSPQ_MAX_BLOCK_NESTING_LEVEL 8
26#define RSPQ_LOWPRI_CALL_SLOT (RSPQ_MAX_BLOCK_NESTING_LEVEL+0)
27#define RSPQ_HIGHPRI_CALL_SLOT (RSPQ_MAX_BLOCK_NESTING_LEVEL+1)
28
30#define SP_STATUS_SIG_RDPSYNCFULL SP_STATUS_SIG1
31#define SP_WSTATUS_SET_SIG_RDPSYNCFULL SP_WSTATUS_SET_SIG1
32#define SP_WSTATUS_CLEAR_SIG_RDPSYNCFULL SP_WSTATUS_CLEAR_SIG1
33
35#define SP_STATUS_SIG_SYNCPOINT SP_STATUS_SIG2
36#define SP_WSTATUS_SET_SIG_SYNCPOINT SP_WSTATUS_SET_SIG2
37#define SP_WSTATUS_CLEAR_SIG_SYNCPOINT SP_WSTATUS_CLEAR_SIG2
38
40#define SP_STATUS_SIG_HIGHPRI_RUNNING SP_STATUS_SIG3
41#define SP_WSTATUS_SET_SIG_HIGHPRI_RUNNING SP_WSTATUS_SET_SIG3
42#define SP_WSTATUS_CLEAR_SIG_HIGHPRI_RUNNING SP_WSTATUS_CLEAR_SIG3
43
45#define SP_STATUS_SIG_HIGHPRI_REQUESTED SP_STATUS_SIG4
46#define SP_WSTATUS_SET_SIG_HIGHPRI_REQUESTED SP_WSTATUS_SET_SIG4
47#define SP_WSTATUS_CLEAR_SIG_HIGHPRI_REQUESTED SP_WSTATUS_CLEAR_SIG4
48
50#define SP_STATUS_SIG_BUFDONE_HIGH SP_STATUS_SIG5
51#define SP_WSTATUS_SET_SIG_BUFDONE_HIGH SP_WSTATUS_SET_SIG5
52#define SP_WSTATUS_CLEAR_SIG_BUFDONE_HIGH SP_WSTATUS_CLEAR_SIG5
53
55#define SP_STATUS_SIG_BUFDONE_LOW SP_STATUS_SIG6
56#define SP_WSTATUS_SET_SIG_BUFDONE_LOW SP_WSTATUS_SET_SIG6
57#define SP_WSTATUS_CLEAR_SIG_BUFDONE_LOW SP_WSTATUS_CLEAR_SIG6
58
60#define SP_STATUS_SIG_MORE SP_STATUS_SIG7
61#define SP_WSTATUS_SET_SIG_MORE SP_WSTATUS_SET_SIG7
62#define SP_WSTATUS_CLEAR_SIG_MORE SP_WSTATUS_CLEAR_SIG7
63
64// RSP assert codes (for assers generated by rsp_queue.S)
65#define ASSERT_INVALID_OVERLAY 0xFF01
66#define ASSERT_INVALID_COMMAND 0xFF02
67
69#define RSPQ_DEBUG_MARKER 0xABCD0123
70
71#endif