github.com/f-secure-foundry/tamago@v0.0.0-20220307101044-d73fcdd7f11b/soc/bcm2835/messages.go (about) 1 // BCM2835 SoC Mailbox support 2 // https://github.com/f-secure-foundry/tamago 3 // 4 // Copyright (c) the bcm2835 package authors 5 // 6 // Use of this source code is governed by the license 7 // that can be found in the LICENSE file. 8 9 package bcm2835 10 11 // 12 // Channels (see <https://github.com/raspberrypi/firmware/wiki/Mailboxes>) 13 // 14 const ( 15 VC_CH_POWERMGMT = 0 16 VC_CH_FRAMEBUFFER = 1 17 VC_CH_VIRTUALUART = 2 18 VC_CH_VCHIQ = 3 19 VC_CH_LEDS = 4 20 VC_CH_BUTTONS = 5 21 VC_CH_TOUCHSCREEN = 6 22 VC_CH_PROPERTYTAGS_A_TO_VC = 8 23 VC_CH_PROPERTYTAGS_VC_TO_A = 9 24 ) 25 26 // 27 // Tags (see <https://github.com/raspberrypi/firmware/wiki/Mailbox-property-interface>) 28 // 29 // For fixed length messages, message lengths are provided as the larger of the request 30 // or response size, since response overwrites the request buffer and caller is 31 // responsible for allocation. 32 // 33 const ( 34 VC_FIRMWARE_GET_REV = 0x00000001 35 VC_FIRMWARE_GET_REV_LEN = 4 36 37 VC_BOARD_GET_MODEL = 0x00010001 38 VC_BOARD_GET_MODEL_LEN = 4 39 40 VC_BOARD_GET_REV = 0x00010002 41 VC_BOARD_GET_REV_LEN = 4 42 43 VC_BOARD_GET_MAC = 0x00010003 44 VC_BOARD_GET_MAC_LEN = 6 45 46 VC_BOARD_GET_SERIAL = 0x00010004 47 VC_BOARD_GET_SERIAL_LEN = 8 48 49 VC_BOARD_GET_ARM_MEMORY = 0x00010005 50 VC_BOARD_GET_ARM_MEMORY_LEN = 8 51 52 VC_BOARD_GET_VC_MEMORY = 0x00010006 53 VC_BOARD_GET_VC_MEMORY_LEN = 8 54 55 VC_BOARD_GET_CLOCKS = 0x00010007 56 57 VC_CFG_GET_CMDLINE = 0x00050001 58 59 VC_RES_GET_DMACHANNELS = 0x00060001 60 VC_RES_GET_DMACHANNELS_LEN = 4 61 62 VC_POWER_GET_STATE = 0x00020001 63 VC_POWER_GET_STATE_LEN = 8 64 65 VC_POWER_GET_TIMING = 0x00020002 66 VC_POWER_GET_TIMING_LEN = 8 67 68 VC_POWER_SET_STATE = 0x00028001 69 VC_POWER_SET_STATE_LEN = 8 70 71 VC_CLOCK_GET_STATE = 0x00030001 72 VC_CLOCK_GET_STATE_LEN = 8 73 74 VC_CLOCK_SET_STATE = 0x00038001 75 VC_CLOCK_SET_STATE_LEN = 8 76 77 VC_CLOCK_GET_RATE = 0x00030002 78 VC_CLOCK_GET_RATE_LEN = 8 79 80 VC_CLOCK_SET_RATE = 0x00038002 81 VC_CLOCK_SET_RATE_LEN = 12 82 83 VC_CLOCK_GET_MAX_RATE = 0x00030004 84 VC_CLOCK_GET_MAX_RATE_LEN = 8 85 86 VC_CLOCK_GET_MIN_RATE = 0x00030007 87 VC_CLOCK_GET_MIN_RATE_LEN = 8 88 89 VC_CLOCK_GET_TURBO = 0x00030009 90 VC_CLOCK_GET_TURBO_LEN = 8 91 92 VC_CLOCK_SET_TURBO = 0x00038009 93 VC_CLOCK_SET_TURBO_LEN = 8 94 95 VC_VOLT_GET = 0x00030003 96 VC_VOLT_GET_LEN = 8 97 98 VC_VOLT_SET = 0x00038003 99 VC_VOLT_SET_LEN = 8 100 101 VC_VOLT_GET_MAX = 0x00030005 102 VC_VOLT_GET_MAX_LEN = 8 103 104 VC_VOLT_GET_MIN = 0x00030008 105 VC_VOLT_GET_MIN_LEN = 8 106 107 VC_TEMP_GET = 0x00030006 108 VC_TEMP_GET_LEN = 8 109 110 VC_TEMP_GET_MAX = 0x0003000a 111 VC_TEMP_GET_MAX_LEN = 8 112 113 VC_MEM_ALLOCATE = 0x0003000c 114 VC_MEM_ALLOCATE_LEN = 12 115 116 VC_MEM_LOCK = 0x0003000d 117 VC_MEM_LOCK_LEN = 4 118 119 VC_MEM_UNLOCK = 0x0003000e 120 VC_MEM_UNLOCK_LEN = 4 121 122 VC_MEM_RELEASE = 0x0003000f 123 VC_MEM_RELEASE_LEN = 4 124 125 VC_MEM_EXEC = 0x00030010 126 VC_MEM_EXEC_LEN = 28 127 128 VC_MEM_GET_DISPMANX_HANDLE = 0x00030014 129 VC_MEM_GET_DISPMANX_HANDLE_LEN = 8 130 131 VC_MEM_GET_EDID_BLOCK = 0x00030020 132 VC_MEM_GET_EDID_BLOCK_LEN = 136 133 134 VC_FB_ALLOC_BUFFER = 0x00040001 135 VC_FB_ALLOC_BUFFER_LEN = 8 136 137 VC_FB_RELEASE_BUFFER = 0x00048001 138 VC_FB_RELEASE_BUFFER_LEN = 0 139 140 VC_FB_BLANK_SCREEN = 0x00040002 141 VC_FB_BLANK_SCREEN_LEN = 0 142 143 VC_FB_GET_PHYSICAL_SIZE = 0x00040003 144 VC_FB_GET_PHYSICAL_SIZE_LEN = 8 145 146 VC_FB_TEST_PHYSICAL_SIZE = 0x00044003 147 VC_FB_TEST_PHYSICAL_SIZE_LEN = 8 148 149 VC_FB_SET_PHYSICAL_SIZE = 0x00048003 150 VC_FB_SET_PHYSICAL_SIZE_LEN = 8 151 152 VC_FB_GET_VIRTUAL_SIZE = 0x00040004 153 VC_FB_GET_VIRTUAL_SIZE_LEN = 8 154 155 VC_FB_TEST_VIRTUAL_SIZE = 0x00044004 156 VC_FB_TEST_VIRTUAL_SIZE_LEN = 8 157 158 VC_FB_SET_VIRTUAL_SIZE = 0x00048004 159 VC_FB_SET_VIRTUAL_SIZE_LEN = 8 160 161 VC_FB_GET_DEPTH = 0x00040005 162 VC_FB_GET_DEPTH_LEN = 4 163 164 VC_FB_TEST_DEPTH = 0x00044005 165 VC_FB_TEST_DEPTH_LEN = 4 166 167 VC_FB_SET_DEPTH = 0x00048005 168 VC_FB_SET_DEPTH_LEN = 4 169 170 VC_FB_GET_PIXEL_ORDER = 0x00040006 171 VC_FB_GET_PIXEL_ORDER_LEN = 4 172 173 VC_FB_TEST_PIXEL_ORDER = 0x00044006 174 VC_FB_TEST_PIXEL_ORDER_LEN = 4 175 176 VC_FB_SET_PIXEL_ORDER = 0x00048006 177 VC_FB_SET_PIXEL_ORDER_LEN = 4 178 179 VC_FB_GET_ALPHA_MODE = 0x00040007 180 VC_FB_GET_ALPHA_MODE_LEN = 4 181 182 VC_FB_TEST_ALPHA_MODE = 0x00044007 183 VC_FB_TEST_ALPHA_MODE_LEN = 4 184 185 VC_FB_SET_ALPHA_MODE = 0x00048007 186 VC_FB_SET_ALPHA_MODE_LEN = 4 187 188 VC_FB_GET_PITCH = 0x00040008 189 VC_FB_GET_PITCH_LEN = 4 190 191 VC_FB_GET_VIRTUAL_OFFSET = 0x00040009 192 VC_FB_GET_VIRTUAL_OFFSET_LEN = 8 193 194 VC_FB_TEST_VIRTUAL_OFFSET = 0x00044009 195 VC_FB_TEST_VIRTUAL_OFFSET_LEN = 8 196 197 VC_FB_SET_VIRTUAL_OFFSET = 0x00048009 198 VC_FB_SET_VIRTUAL_OFFSET_LEN = 8 199 200 VC_FB_GET_OVERSCAN = 0x0004000a 201 VC_FB_GET_OVERSCAN_LEN = 16 202 203 VC_FB_TEST_OVERSCAN = 0x0004400a 204 VC_FB_TEST_OVERSCAN_LEN = 16 205 206 VC_FB_SET_OVERSCAN = 0x0004800a 207 VC_FB_SET_OVERSCAN_LEN = 16 208 209 VC_FB_GET_PALETTE = 0x0004000b 210 VC_FB_GET_PALETTE_LEN = 1024 211 212 VC_FB_TEST_PALETTE = 0x0004400b 213 214 VC_FB_SET_PALETTE = 0x0004800b 215 216 VC_FB_SET_CURSOR_INFO = 0x00008010 217 VC_FB_SET_CURSOR_INFO_LEN = 24 218 219 VC_FB_SET_CURSOR_STATE = 0x00008011 220 VC_FB_SET_CURSOR_STATE_LEN = 16 221 )