Ultibo API
C/C++ API for Ultibo Core
Loading...
Searching...
No Matches
platform.h
Go to the documentation of this file.
1/*
2 * This file is part of the Ultibo project, https://ultibo.org/
3 *
4 * The MIT License (MIT)
5 *
6 * Copyright (c) 2026 Garry Wood <garry@softoz.com.au>
7 *
8 * Permission is hereby granted, free of charge, to any person obtaining a copy
9 * of this software and associated documentation files (the "Software"), to deal
10 * in the Software without restriction, including without limitation the rights
11 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12 * copies of the Software, and to permit persons to whom the Software is
13 * furnished to do so, subject to the following conditions:
14 *
15 * The above copyright notice and this permission notice shall be included in
16 * all copies or substantial portions of the Software.
17 *
18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24 * THE SOFTWARE.
25 */
26#ifndef _ULTIBO_PLATFORM_H
27#define _ULTIBO_PLATFORM_H
28
29#ifdef __cplusplus
30extern "C" {
31#endif
32
33#include "ultibo/globaltypes.h"
34#include "ultibo/globalconst.h"
35
37
39#define HANDLE_FLAG_NONE 0x00000000
40#define HANDLE_FLAG_NAMED 0x00000001
41#define HANDLE_FLAG_DUPLICATE 0x00000002
42
43#define HANDLE_FLAG_INTERNAL HANDLE_FLAG_NONE + 0x80000000
44
46#define HANDLE_SIGNATURE 0xCD15E20A
47
48#define HANDLE_TABLE_MIN 0x100
49#define HANDLE_TABLE_MAX 0x7FFFFFFF
50
51#define HANDLE_TABLE_MASK 0x7FF
52
53#define HANDLE_NAME_LENGTH 256
54
56#define DMA_DATA_FLAG_NONE 0x00000000
57#define DMA_DATA_FLAG_STRIDE 0x00000001
58#define DMA_DATA_FLAG_SOURCE_NOINCREMENT 0x00000002
59#define DMA_DATA_FLAG_DEST_NOINCREMENT 0x00000004
60#define DMA_DATA_FLAG_SOURCE_DREQ 0x00000008
61#define DMA_DATA_FLAG_DEST_DREQ 0x00000010
62#define DMA_DATA_FLAG_SOURCE_WIDE 0x00000020
63#define DMA_DATA_FLAG_DEST_WIDE 0x00000040
64#define DMA_DATA_FLAG_NOREAD 0x00000080
65#define DMA_DATA_FLAG_NOWRITE 0x00000100
66#define DMA_DATA_FLAG_NOCLEAN 0x00000200
67#define DMA_DATA_FLAG_NOINVALIDATE 0x00000400
68#define DMA_DATA_FLAG_BULK 0x00000800
69#define DMA_DATA_FLAG_LITE 0x00001000
70#define DMA_DATA_FLAG_40BIT 0x00002000
71
73#define PAGE_TABLE_FLAG_NONE 0x00000000
75#define PAGE_TABLE_FLAG_NORMAL 0x00000002
76#define PAGE_TABLE_FLAG_DEVICE 0x00000004
77#define PAGE_TABLE_FLAG_ORDERED 0x00000008
78#define PAGE_TABLE_FLAG_SHARED 0x00000010
79#define PAGE_TABLE_FLAG_CACHEABLE 0x00000020
80#define PAGE_TABLE_FLAG_READONLY 0x00000040
81#define PAGE_TABLE_FLAG_READWRITE 0x00000080
82#define PAGE_TABLE_FLAG_EXECUTABLE 0x00000100
83#define PAGE_TABLE_FLAG_WRITEBACK 0x00000200
84#define PAGE_TABLE_FLAG_WRITETHROUGH 0x00000400
85#define PAGE_TABLE_FLAG_WRITEALLOCATE 0x00000800
86#if defined (__i386__) || defined (__arm__)
87#define PAGE_TABLE_FLAG_LARGEADDRESS 0x00001000
88#endif
89
91#define INTERRUPT_FLAG_NONE 0x00000000
92#define INTERRUPT_FLAG_SHARED 0x00000001
93#define INTERRUPT_FLAG_LOCAL 0x00000002
94#define INTERRUPT_FLAG_IPI 0x00000004
95#define INTERRUPT_FLAG_FIQ 0x00000008
96#define INTERRUPT_FLAG_CHAINED 0x00000010
97
99#define INTERRUPT_PRIORITY_MAXIMUM 0x00
100#define INTERRUPT_PRIORITY_FIQ 0x40
101#define INTERRUPT_PRIORITY_DEFAULT 0xA0
102#define INTERRUPT_PRIORITY_MINIMUM 0xF0
103
105#define INTERRUPT_RETURN_NONE 0
106#define INTERRUPT_RETURN_HANDLED 1
107
110#define VECTOR_TABLE_ENTRY_ARM_RESET 0
111#define VECTOR_TABLE_ENTRY_ARM_UNDEFINED 1
112#define VECTOR_TABLE_ENTRY_ARM_SWI 2
113#define VECTOR_TABLE_ENTRY_ARM_PREFETCH 3
114#define VECTOR_TABLE_ENTRY_ARM_ABORT 4
115#define VECTOR_TABLE_ENTRY_ARM_RESERVED 5
116#define VECTOR_TABLE_ENTRY_ARM_IRQ 6
117#define VECTOR_TABLE_ENTRY_ARM_FIQ 7
119
121#define SHUTDOWN_FLAG_NONE 0x00000000
122#define SHUTDOWN_FLAG_RESTART 0x00000001
123#define SHUTDOWN_FLAG_FORCE 0x00000002
124
126#define SHUTDOWN_SIGNATURE 0xA73D8B0C
127
128#define SHUTDOWN_DEFAULT_DELAY 1000
129#define SHUTDOWN_MINIMUM_DELAY 10
130
131#define SHUTDOWN_DEFAULT_TIMEOUT 5000
132
134#define EXCEPTION_TYPE_DATA_ABORT 1
135#define EXCEPTION_TYPE_PREFETCH_ABORT 2
136#define EXCEPTION_TYPE_UNDEFINED_INSTRUCTION 3
137
139#define FIRMWARE_THROTTLE_NONE (0 << 0)
140#define FIRMWARE_THROTTLE_UNDER_VOLTAGE (1 << 0)
141#define FIRMWARE_THROTTLE_FREQUENCY_LIMIT (1 << 1)
142#define FIRMWARE_THROTTLE_THROTTLED (1 << 2)
143#define FIRMWARE_THROTTLE_SOFT_TEMP_LIMIT (1 << 3)
144#define FIRMWARE_THROTTLE_WAS_UNDER_VOLTAGE (1 << 16)
145#define FIRMWARE_THROTTLE_WAS_FREQUENCY_LIMIT (1 << 17)
146#define FIRMWARE_THROTTLE_WAS_THROTTLED (1 << 18)
147#define FIRMWARE_THROTTLE_WAS_SOFT_TEMP_LIMIT (1 << 19)
148
150
152typedef uint32_t IRQ_MASK;
153typedef uint32_t FIQ_MASK;
154typedef uint32_t IRQ_FIQ_MASK;
155
157typedef uint32_t ABORT_MASK;
158
160typedef struct _DMA_DATA DMA_DATA;
162{
163 // Data Properties
164 void *source;
165 #if defined (__i386__) || defined (__arm__)
166 uint32_t sourcerange;
167 #endif
168 void *dest;
169 #if defined (__i386__) || defined (__arm__)
170 uint32_t destrange;
171 #endif
172 uint32_t size;
173 uint32_t flags;
174 // Stride Properties
175 uint32_t stridelength;
176 int32_t sourcestride;
177 int32_t deststride;
178 // Next Block
180};
181
185{
186 uint32_t number;
187 size_t param1;
188 size_t param2;
189 size_t param3;
190};
191
193typedef void STDCALL (*handle_close_proc)(HANDLE data);
194typedef uint32_t STDCALL (*handle_close_ex_proc)(HANDLE data);
196
199
202
204{
205 // Handle Properties
206 uint32_t signature;
208 uint32_t handletype;
209 uint32_t count;
210 uint32_t flags;
211 char *name;
212 uint32_t hash;
217 // Internal Properties
220 // Statistics Properties
221};
222
224typedef uint32_t STDCALL (*shutdown_cb)(uint32_t flags, void *parameter);
225
227typedef void STDCALL (*interrupt_handler)(void *parameter);
228typedef THREAD_HANDLE STDCALL (*interrupt_ex_handler)(uint32_t cpuid, THREAD_HANDLE thread, void *parameter);
229typedef uint32_t STDCALL (*shared_interrupt_handler)(uint32_t number, uint32_t cpuid, uint32_t flags, void *parameter);
230
248
252{
253 uint32_t number;
254 uint32_t cpuid;
257};
258
262{
264#if defined (__i386__) || defined (__arm__)
265 uint32_t physicalrange;
266#endif
268 uint32_t size;
269 uint32_t flags;
270};
271
275
279
281typedef uint32_t STDCALL (*thread_yield_proc)(void);
282typedef uint32_t STDCALL (*thread_wait_proc)(LIST_HANDLE list, SPIN_HANDLE lock, uint32_t flags);
283typedef uint32_t STDCALL (*thread_wait_ex_proc)(LIST_HANDLE list, SPIN_HANDLE lock, uint32_t flags, uint32_t timeout);
284typedef uint32_t STDCALL (*thread_release_proc)(LIST_HANDLE list);
285typedef uint32_t STDCALL (*thread_abandon_proc)(LIST_HANDLE list);
286
288typedef void STDCALL (*timer_event_proc)(void *data);
289
291typedef void STDCALL (*worker_task_proc)(void *data);
292typedef void STDCALL (*worker_cb)(void *data);
293
295typedef void STDCALL (*counter_event_cb)(void *data);
296
298typedef void STDCALL (*gpio_event_cb)(void *data, uint32_t pin, uint32_t trigger);
299
301
306
311
316
325uint32_t STDCALL device_tree_read(const char *path, const char *name, void *buffer, uint32_t *size);
326
334uint32_t STDCALL device_tree_read32(const char *path, const char *name, uint32_t *value);
335
343uint32_t STDCALL device_tree_read64(const char *path, const char *name, uint64_t *value);
344
352uint32_t STDCALL device_tree_read_string(const char *path, const char *name, char *value, uint32_t len);
353
355
361
366void STDCALL boot_output(uint32_t value);
367
373
378void STDCALL boot_console_write(const char *value);
379
384void STDCALL boot_console_write_ex(const char *value, uint32_t x, uint32_t y);
385
391
397
399
404
409
414
419
424
429
431
436
441uint32_t STDCALL counter_read(void);
442
448
453uint32_t STDCALL counter_wait(void);
454
461uint32_t STDCALL counter_event(counter_event_cb callback, void *data);
462
467uint32_t STDCALL counter_cancel(void);
468
474
480uint32_t STDCALL counter_set_rate(uint32_t rate);
481
488
495uint32_t STDCALL counter_set_interval(uint32_t interval);
496
498
502uint32_t STDCALL mailbox_receive(uint32_t mailbox, uint32_t channel);
503
507void STDCALL mailbox_send(uint32_t mailbox, uint32_t channel, uint32_t data);
508
512uint32_t STDCALL mailbox_call(uint32_t mailbox, uint32_t channel, uint32_t data, uint32_t *response);
513
517uint32_t STDCALL mailbox_call_ex(uint32_t mailbox, uint32_t channel, uint32_t data, uint32_t *response, uint32_t timeout);
518
522uint32_t STDCALL mailbox_property_call(uint32_t mailbox, uint32_t channel, void *data, uint32_t *response);
523
527uint32_t STDCALL mailbox_property_call_ex(uint32_t mailbox, uint32_t channel, void *data, uint32_t *response, uint32_t timeout);
528
532uint32_t STDCALL mailbox_property_tag(uint32_t tag, void *data, uint32_t size);
533
535
541
542void STDCALL random_seed(uint32_t seed);
543
544int32_t STDCALL random_read_longint(int32_t limit);
545int64_t STDCALL random_read_int64(int64_t limit);
547
552
554
559
560uint32_t STDCALL watchdog_start(uint32_t milliseconds);
561uint32_t STDCALL watchdog_stop(void);
562uint32_t STDCALL watchdog_refresh(uint32_t milliseconds);
563
565
574uint32_t STDCALL request_irq(uint32_t cpuid, uint32_t number, interrupt_handler handler, void *parameter);
575
584uint32_t STDCALL release_irq(uint32_t cpuid, uint32_t number, interrupt_handler handler, void *parameter);
585
596uint32_t STDCALL request_ex_irq(uint32_t cpuid, uint32_t number, interrupt_handler handler, interrupt_ex_handler handlerex, void *parameter);
597
608uint32_t STDCALL release_ex_irq(uint32_t cpuid, uint32_t number, interrupt_handler handler, interrupt_ex_handler handlerex, void *parameter);
609
611
620uint32_t STDCALL request_fiq(uint32_t cpuid, uint32_t number, interrupt_handler handler, void *parameter);
621
630uint32_t STDCALL release_fiq(uint32_t cpuid, uint32_t number, interrupt_handler handler, void *parameter);
631
642uint32_t STDCALL request_ex_fiq(uint32_t cpuid, uint32_t number, interrupt_handler handler, interrupt_ex_handler handlerex, void *parameter);
643
654uint32_t STDCALL release_ex_fiq(uint32_t cpuid, uint32_t number, interrupt_handler handler, interrupt_ex_handler handlerex, void *parameter);
655
657
666uint32_t STDCALL request_ipi(uint32_t cpuid, uint32_t number, ipi_handler handler, void *parameter);
667
676uint32_t STDCALL release_ipi(uint32_t cpuid, uint32_t number, ipi_handler handler, void *parameter);
677
679
690uint32_t STDCALL register_interrupt(uint32_t number, uint32_t mask, uint32_t priority, uint32_t flags, shared_interrupt_handler handler, void *parameter);
691
702uint32_t STDCALL deregister_interrupt(uint32_t number, uint32_t mask, uint32_t priority, uint32_t flags, shared_interrupt_handler handler, void *parameter);
703
705
713void STDCALL system_call(uint32_t number, size_t param1, size_t param2, size_t param3);
714
721uint32_t STDCALL register_system_call(uint32_t number, system_call_handler handler);
722
729uint32_t STDCALL deregister_system_call(uint32_t number, system_call_handler handler);
730
739uint32_t STDCALL register_system_call_ex(uint32_t cpuid, uint32_t number, system_call_handler handler, system_call_ex_handler handlerex);
740
749uint32_t STDCALL deregister_system_call_ex(uint32_t cpuid, uint32_t number, system_call_handler handler, system_call_ex_handler handlerex);
750
752
757
762
766uint32_t STDCALL get_interrupt_entry(uint32_t number, uint32_t instance, INTERRUPT_ENTRY *interrupt);
767
769
774
779
783uint32_t STDCALL get_local_interrupt_entry(uint32_t cpuid, uint32_t number, uint32_t instance, INTERRUPT_ENTRY *interrupt);
784
786
791
796
800uint32_t STDCALL get_software_interrupt_entry(uint32_t cpuid, uint32_t number, uint32_t instance, INTERRUPT_ENTRY *interrupt);
801
803
808
813
815
821uint32_t STDCALL system_restart(uint32_t delay);
822
828uint32_t STDCALL system_shutdown(uint32_t delay);
829
837uint32_t STDCALL system_register_shutdown(shutdown_cb callback, void *parameter, uint32_t timeout);
838
845uint32_t STDCALL system_deregister_shutdown(shutdown_cb callback, void *parameter);
846
854
858uint32_t STDCALL system_get_command_line(char *commandline, uint32_t len);
859
864
873uint32_t STDCALL system_date_to_string(double_t date, char *value, uint32_t len);
874
883uint32_t STDCALL system_time_to_string(double_t time, char *value, uint32_t len);
884
893uint32_t STDCALL system_date_time_to_string(double_t datetime, char *value, uint32_t len);
894
900uint32_t STDCALL system_interval_to_string(double_t interval, char *value, uint32_t len);
901
903
907uint32_t STDCALL cpu_get_arch(void);
908
912uint32_t STDCALL cpu_get_type(void);
913
917uint32_t STDCALL cpu_get_boot(void);
918
922uint32_t STDCALL cpu_get_mask(void);
923
927uint32_t STDCALL cpu_get_count(void);
928
933uint32_t STDCALL cpu_get_mode(void);
934
938uint32_t STDCALL cpu_get_state(void);
939
943uint32_t STDCALL cpu_get_group(void);
944
949
953uint32_t STDCALL cpu_get_memory(size_t *address, uint64_t *length);
954
959double_t STDCALL cpu_get_percentage(uint32_t cpuid);
960
965uint32_t STDCALL cpu_get_utilization(uint32_t cpuid);
966
970uint32_t STDCALL cpu_get_model(void);
971
977
981uint32_t STDCALL cpu_get_description(char *description, uint32_t len);
982
984
988uint32_t STDCALL fpu_get_type(void);
989
993uint32_t STDCALL fpu_get_state(void);
994
996
1000uint32_t STDCALL gpu_get_type(void);
1001
1005uint32_t STDCALL gpu_get_state(void);
1006
1010uint32_t STDCALL gpu_get_memory(size_t *address, uint64_t *length);
1011
1013
1018
1025
1032
1039
1046
1051
1057
1063
1065
1069void STDCALL version_get_info(uint32_t *major, uint32_t *minor, uint32_t *revision);
1070
1074uint32_t STDCALL version_get_date(char *date, uint32_t len);
1075
1079uint32_t STDCALL version_get_name(char *name, uint32_t len);
1080
1084uint32_t STDCALL version_get_version(char *version, uint32_t len);
1085
1087
1092
1097
1102
1107
1111uint32_t STDCALL board_get_mac_address(char *address, uint32_t len);
1112
1114
1119
1121
1126
1132
1134
1139
1141
1146
1151
1156
1161
1166
1171
1173
1177uint32_t STDCALL power_on(uint32_t powerid);
1178
1182uint32_t STDCALL power_off(uint32_t powerid);
1183
1187uint32_t STDCALL power_get_wait(uint32_t powerid);
1188
1192uint32_t STDCALL power_get_state(uint32_t powerid);
1193
1197uint32_t STDCALL power_set_state(uint32_t powerid, uint32_t state, BOOL wait);
1198
1200
1205uint32_t STDCALL clock_ticks(void);
1206
1211uint32_t STDCALL clock_seconds(void);
1212
1218
1224
1230
1242
1252
1263int64_t STDCALL clock_set_time(int64_t time, BOOL rtc);
1264
1273
1282
1287
1295uint32_t STDCALL clock_calculate_offset(double_t datetime, int32_t *offset, BOOL *daylight);
1296
1300uint32_t STDCALL clock_get_rate(uint32_t clockid);
1301
1305uint32_t STDCALL clock_set_rate(uint32_t clockid, uint32_t rate, BOOL turbo);
1306
1310uint32_t STDCALL clock_get_state(uint32_t clockid);
1311
1315uint32_t STDCALL clock_set_state(uint32_t clockid, uint32_t state);
1316
1320uint32_t STDCALL clock_get_min_rate(uint32_t clockid);
1321
1325uint32_t STDCALL clock_get_max_rate(uint32_t clockid);
1326
1330uint32_t STDCALL clock_get_measured_rate(uint32_t clockid);
1331
1333
1337uint32_t STDCALL turbo_get_state(uint32_t turboid);
1338
1342uint32_t STDCALL turbo_set_state(uint32_t turboid, uint32_t state);
1343
1345
1349uint32_t STDCALL voltage_get_value(uint32_t voltageid);
1350
1354uint32_t STDCALL voltage_set_value(uint32_t voltageid, uint32_t value);
1355
1359uint32_t STDCALL voltage_get_min_value(uint32_t voltageid);
1360
1364uint32_t STDCALL voltage_get_max_value(uint32_t voltageid);
1365
1367
1371uint32_t STDCALL temperature_get_current(uint32_t temperatureid);
1372
1376uint32_t STDCALL temperature_get_maximum(uint32_t temperatureid);
1377
1379
1383HANDLE STDCALL gpu_memory_allocate(uint32_t length, uint32_t alignment, uint32_t flags);
1384
1389
1394
1399
1401
1405uint32_t STDCALL gpu_execute_code(void *address, uint32_t r0, uint32_t r1, uint32_t r2, uint32_t r3, uint32_t r4, uint32_t r5);
1406
1411
1415uint32_t STDCALL edid_block_get(uint32_t block, void *buffer, uint32_t length);
1416
1418
1423
1427uint32_t STDCALL framebuffer_allocate(uint32_t alignment, uint32_t *address, uint32_t *length);
1428
1433
1437uint32_t STDCALL framebuffer_set_state(uint32_t state);
1438
1442uint32_t STDCALL framebuffer_get_dimensions(uint32_t *width, uint32_t *height, uint32_t *top, uint32_t *bottom, uint32_t *left, uint32_t *right);
1443
1449uint32_t STDCALL framebuffer_get_physical(uint32_t *width, uint32_t *height);
1450
1454uint32_t STDCALL framebuffer_set_physical(uint32_t *width, uint32_t *height);
1455
1459uint32_t STDCALL framebuffer_test_physical(uint32_t *width, uint32_t *height);
1460
1467uint32_t STDCALL framebuffer_get_virtual(uint32_t *width, uint32_t *height);
1468
1472uint32_t STDCALL framebuffer_set_virtual(uint32_t *width, uint32_t *height);
1473
1477uint32_t STDCALL framebuffer_test_virtual(uint32_t *width, uint32_t *height);
1478
1482uint32_t STDCALL framebuffer_get_depth(uint32_t *depth);
1483
1487uint32_t STDCALL framebuffer_set_depth(uint32_t *depth);
1488
1492uint32_t STDCALL framebuffer_test_depth(uint32_t *depth);
1493
1497uint32_t STDCALL framebuffer_get_pixel_order(uint32_t *order);
1498
1502uint32_t STDCALL framebuffer_set_pixel_order(uint32_t *order);
1503
1507uint32_t STDCALL framebuffer_test_pixel_order(uint32_t *order);
1508
1512uint32_t STDCALL framebuffer_get_alpha_mode(uint32_t *mode);
1513
1517uint32_t STDCALL framebuffer_set_alpha_mode(uint32_t *mode);
1518
1522uint32_t STDCALL framebuffer_test_alpha_mode(uint32_t *mode);
1523
1528
1532uint32_t STDCALL framebuffer_get_offset(uint32_t *x, uint32_t *y);
1533
1537uint32_t STDCALL framebuffer_set_offset(uint32_t *x, uint32_t *y);
1538
1542uint32_t STDCALL framebuffer_test_offset(uint32_t *x, uint32_t *y);
1543
1547uint32_t STDCALL framebuffer_get_overscan(uint32_t *top, uint32_t *bottom, uint32_t *left, uint32_t *right);
1548
1552uint32_t STDCALL framebuffer_set_overscan(uint32_t *top, uint32_t *bottom, uint32_t *left, uint32_t *right);
1553
1557uint32_t STDCALL framebuffer_test_overscan(uint32_t *top, uint32_t *bottom, uint32_t *left, uint32_t *right);
1558
1562uint32_t STDCALL framebuffer_get_palette(void *buffer, uint32_t length);
1563
1567uint32_t STDCALL framebuffer_set_palette(uint32_t start, uint32_t count, void *buffer, uint32_t length);
1568
1572uint32_t STDCALL framebuffer_test_palette(uint32_t start, uint32_t count, void *buffer, uint32_t length);
1573
1577uint32_t STDCALL framebuffer_get_layer(int32_t *layer);
1578
1582uint32_t STDCALL framebuffer_set_layer(int32_t *layer);
1583
1587uint32_t STDCALL framebuffer_test_layer(int32_t *layer);
1588
1593
1598
1602uint32_t STDCALL framebuffer_set_backlight(uint32_t brightness);
1603
1607uint32_t STDCALL framebuffer_get_num_displays(uint32_t *numdisplays);
1608
1612uint32_t STDCALL framebuffer_get_display_id(uint32_t displaynum);
1613
1617uint32_t STDCALL framebuffer_set_display_num(uint32_t displaynum);
1618
1622uint32_t STDCALL framebuffer_get_display_settings(uint32_t displaynum, DISPLAY_SETTINGS *displaysettings);
1623
1627uint32_t STDCALL framebuffer_display_id_to_name(uint32_t displayid, char *name, uint32_t len);
1628
1630
1634uint32_t STDCALL touch_get_buffer(size_t *address);
1635
1639uint32_t STDCALL touch_set_buffer(size_t address);
1640
1642
1647
1651uint32_t STDCALL cursor_set_info(uint32_t width, uint32_t height, uint32_t hotspotx, uint32_t hotspoty, void *pixels, uint32_t length);
1652
1657uint32_t STDCALL cursor_set_state(BOOL enabled, uint32_t x, uint32_t y, BOOL relative);
1658
1660
1665
1672uint32_t STDCALL dma_transfer(DMA_DATA *data, uint32_t direction, uint32_t peripheral);
1673
1680uint32_t STDCALL dma_fill_memory(void *dest, uint32_t size, uint8_t value);
1681
1688uint32_t STDCALL dma_copy_memory(void *source, void *dest, uint32_t size);
1689
1697uint32_t STDCALL dma_read_peripheral(void *address, void *dest, uint32_t size, uint32_t peripheral);
1698
1706uint32_t STDCALL dma_write_peripheral(void *source, void *address, uint32_t size, uint32_t peripheral);
1707
1712void * STDCALL dma_allocate_buffer(uint32_t size);
1713
1718void * STDCALL dma_allocate_buffer_ex(uint32_t *size);
1719
1724uint32_t STDCALL dma_release_buffer(void *buffer);
1725
1730
1732
1739HANDLE STDCALL handle_create(HANDLE data, uint32_t _type);
1740
1749HANDLE_ENTRY * STDCALL handle_create_ex(const char *name, uint32_t flags, HANDLE data, uint32_t _type);
1750
1759
1766
1773
1780uint32_t STDCALL handle_enumerate(handle_enumerate_cb callback, void *data);
1781
1787HANDLE STDCALL handle_open(const char *name);
1788
1795uint32_t STDCALL handle_close(HANDLE handle);
1796
1804
1806
1811
1817uint32_t STDCALL gpio_read(uint32_t reg);
1818
1824void STDCALL gpio_write(uint32_t reg, uint32_t value);
1825
1831uint32_t STDCALL gpio_input_get(uint32_t pin);
1832
1840uint32_t STDCALL gpio_input_wait(uint32_t pin, uint32_t trigger, uint32_t timeout);
1841
1852uint32_t STDCALL gpio_input_event(uint32_t pin, uint32_t trigger, uint32_t timeout, gpio_event_cb callback, void *data);
1853
1860uint32_t STDCALL gpio_output_set(uint32_t pin, uint32_t level);
1861
1870uint32_t STDCALL gpio_level_get(uint32_t pin);
1871
1881uint32_t STDCALL gpio_level_set(uint32_t pin, uint32_t level);
1882
1888uint32_t STDCALL gpio_pull_get(uint32_t pin);
1889
1896uint32_t STDCALL gpio_pull_select(uint32_t pin, uint32_t mode);
1897
1903uint32_t STDCALL gpio_function_get(uint32_t pin);
1904
1911uint32_t STDCALL gpio_function_select(uint32_t pin, uint32_t mode);
1912
1914
1920uint32_t STDCALL virtual_gpio_input_get(uint32_t pin);
1921
1928uint32_t STDCALL virtual_gpio_output_set(uint32_t pin, uint32_t level);
1929
1938uint32_t STDCALL virtual_gpio_level_get(uint32_t pin);
1939
1949uint32_t STDCALL virtual_gpio_level_set(uint32_t pin, uint32_t level);
1950
1956uint32_t STDCALL virtual_gpio_function_get(uint32_t pin);
1957
1964uint32_t STDCALL virtual_gpio_function_select(uint32_t pin, uint32_t mode);
1965
1967
1972
1981uint32_t STDCALL spi_start(uint32_t mode, uint32_t clockrate, uint32_t clockphase, uint32_t clockpolarity);
1982
1987uint32_t STDCALL spi_stop(void);
1988
1998uint32_t STDCALL spi_read(uint16_t chipselect, void *dest, uint32_t size, uint32_t *count);
1999
2009uint32_t STDCALL spi_write(uint16_t chipselect, void *source, uint32_t size, uint32_t *count);
2010
2021uint32_t STDCALL spi_write_read(uint16_t chipselect, void *source, void *dest, uint32_t size, uint32_t *count);
2022
2027uint32_t STDCALL spi_get_mode(void);
2028
2034uint32_t STDCALL spi_set_mode(uint32_t mode);
2035
2041uint32_t STDCALL spi_get_clock_rate(uint16_t chipselect);
2042
2049uint32_t STDCALL spi_set_clock_rate(uint16_t chipselect, uint32_t clockrate);
2050
2056
2062uint32_t STDCALL spi_set_clock_phase(uint32_t clockphase);
2063
2069
2075uint32_t STDCALL spi_set_clock_polarity(uint32_t clockpolarity);
2076
2082uint32_t STDCALL spi_get_select_polarity(uint16_t chipselect);
2083
2090uint32_t STDCALL spi_set_select_polarity(uint16_t chipselect, uint32_t selectpolarity);
2091
2098uint32_t STDCALL spi_get_description(uint32_t id, char *description, uint32_t len);
2099
2101
2106
2112uint32_t STDCALL i2c_start(uint32_t rate);
2113
2118uint32_t STDCALL i2c_stop(void);
2119
2128uint32_t STDCALL i2c_read(uint16_t address, void *buffer, uint32_t size, uint32_t *count);
2129
2138uint32_t STDCALL i2c_write(uint16_t address, void *buffer, uint32_t size, uint32_t *count);
2139
2151uint32_t STDCALL i2c_write_read(uint16_t address, void *initial, uint32_t len, void *data, uint32_t size, uint32_t *count);
2152
2164uint32_t STDCALL i2c_write_write(uint16_t address, void *initial, uint32_t len, void *data, uint32_t size, uint32_t *count);
2165
2170uint32_t STDCALL i2c_get_rate(void);
2171
2177uint32_t STDCALL i2c_set_rate(uint32_t rate);
2178
2184
2190uint32_t STDCALL i2c_set_address(uint16_t address);
2191
2198uint32_t STDCALL i2c_get_description(uint32_t id, char *description, uint32_t len);
2199
2206uint32_t STDCALL i2c_slave_get_description(uint32_t id, char *description, uint32_t len);
2207
2209
2214
2219uint32_t STDCALL pwm_start(void);
2220
2225uint32_t STDCALL pwm_stop(void);
2226
2235uint32_t STDCALL pwm_write(uint32_t value);
2236
2242uint32_t STDCALL pwm_set_mode(uint32_t mode);
2243
2252uint32_t STDCALL pwm_set_range(uint32_t range);
2253
2259uint32_t STDCALL pwm_set_frequency(uint32_t frequency);
2260
2267uint32_t STDCALL pwm_configure(uint32_t dutyns, uint32_t periodns);
2268
2276uint32_t STDCALL pwm_get_description(uint32_t id, uint32_t channel, char *description, uint32_t len);
2277
2279
2284
2290int64_t STDCALL rtc_get_time(void);
2291
2299int64_t STDCALL rtc_set_time(int64_t time);
2300
2302
2309uint32_t STDCALL uart_get_description(uint32_t id, char *description, uint32_t len);
2310
2312
2317
2328uint32_t STDCALL serial_open(uint32_t baudrate, uint32_t databits, uint32_t stopbits, uint32_t parity, uint32_t flowcontrol, uint32_t receivedepth, uint32_t transmitdepth);
2329
2333uint32_t STDCALL serial_close(void);
2334
2341uint32_t STDCALL serial_read(void *buffer, uint32_t size, uint32_t *count);
2342
2349uint32_t STDCALL serial_write(void *buffer, uint32_t size, uint32_t *count);
2350
2356int STDCALL serial_printf(const char *format, ...) _ATTRIBUTE ((__format__ (__printf__, 1, 2)));
2357
2359
2364
2369
2373uint32_t STDCALL peripheral_read(uint32_t base, uint32_t reg);
2374
2378void STDCALL peripheral_write(uint32_t base, uint32_t reg, uint32_t value);
2379
2384
2389
2391
2395size_t STDCALL get_sp(void);
2396
2400size_t STDCALL get_pc(void);
2401
2407
2412
2417
2423
2430
2436
2441
2446
2452
2459
2464
2469
2475
2482
2488
2493
2498
2504
2511
2516
2521
2525uint32_t STDCALL halt_thread(uint32_t exitcode);
2526
2531
2536
2541
2546
2551
2556
2561
2566
2571
2576
2581
2586
2591
2596
2601
2606
2610void STDCALL clean_data_cache_range(size_t address, uint32_t size);
2611
2615void STDCALL invalidate_data_cache_range(size_t address, uint32_t size);
2616
2620void STDCALL clean_and_invalidate_data_cache_range(size_t address, uint32_t size);
2621
2625void STDCALL invalidate_instruction_cache_range(size_t address, uint32_t size);
2626
2631
2636
2640void STDCALL context_switch(void *oldstack, void *newstack, THREAD_HANDLE newthread);
2641
2645void STDCALL context_switch_irq(void *oldstack, void *newstack, THREAD_HANDLE newthread);
2646
2650void STDCALL context_switch_fiq(void *oldstack, void *newstack, THREAD_HANDLE newthread);
2651
2655void STDCALL context_switch_swi(void *oldstack, void *newstack, THREAD_HANDLE newthread);
2656
2660int32_t STDCALL interlocked_or(int32_t *target, int32_t value);
2661
2665int32_t STDCALL interlocked_xor(int32_t *target, int32_t value);
2666
2670int32_t STDCALL interlocked_and(int32_t *target, int32_t value);
2671
2675int32_t STDCALL interlocked_decrement(int32_t *target);
2676
2680int32_t STDCALL interlocked_increment(int32_t *target);
2681
2685int32_t STDCALL interlocked_exchange(int32_t *target, int32_t source);
2686
2690int32_t STDCALL interlocked_add_exchange(int32_t *target, int32_t source);
2691
2695int32_t STDCALL interlocked_compare_exchange(int32_t *target, int32_t source, int32_t compare);
2696
2701
2706
2711
2716
2721
2725void STDCALL page_table_get_entry(size_t address, PAGE_TABLE_ENTRY *entry);
2726
2731
2735uint32_t STDCALL page_table_get_page_size(size_t address);
2736
2740uint32_t STDCALL page_table_get_page_flags(size_t address);
2741
2742#if defined (__i386__) || defined (__arm__)
2746uint32_t STDCALL page_table_get_page_range(size_t address);
2747#endif
2748
2753
2758
2763
2768
2773
2778
2783
2788
2793
2798
2803
2807size_t STDCALL vector_table_get_entry(uint32_t number);
2808
2812uint32_t STDCALL vector_table_set_entry(uint32_t number, size_t address);
2813
2815BOOL STDCALL console_get_key(char *ch, void *userdata);
2816BOOL STDCALL console_peek_key(char *ch, void *userdata);
2817
2818BOOL STDCALL console_write_char(char ch, void *userdata);
2819BOOL STDCALL console_read_char(char *ch, void *userdata);
2821
2823BOOL STDCALL console_show_mouse(uint32_t x, uint32_t y, void *userdata);
2824BOOL STDCALL console_read_mouse(uint32_t *x, uint32_t *y, uint32_t *buttons, void *userdata);
2825
2829
2831uint32_t STDCALL host_get_name(char *name, uint32_t len);
2832BOOL STDCALL host_set_name(const char *name);
2833uint32_t STDCALL host_get_domain(char *domain, uint32_t len);
2834BOOL STDCALL host_set_domain(const char *domain);
2835
2837HANDLE STDCALL module_load(const char *name);
2838HANDLE STDCALL module_load_ex(const char *name, uint32_t flags);
2840uint32_t STDCALL module_get_name(HANDLE handle, char *name, uint32_t len);
2842
2844BOOL STDCALL symbol_add(HANDLE handle, const char *name, size_t address);
2845BOOL STDCALL symbol_remove(HANDLE handle, const char *name);
2846size_t STDCALL symbol_get_address(HANDLE handle, const char *name);
2847
2849void STDCALL logging_output(const char *text);
2850void STDCALL logging_output_ex(uint32_t facility, uint32_t severity, const char *tag, const char *content);
2851
2857int STDCALL logging_outputf(const char *format, ...) _ATTRIBUTE ((__format__ (__printf__, 1, 2)));
2858
2860
2866uint32_t STDCALL environment_get(const char *name, char *value, uint32_t len);
2867
2875uint32_t STDCALL environment_set(const char *name, const char *value);
2876
2883
2889uint32_t STDCALL environment_index(const char *name);
2890
2896uint32_t STDCALL environment_string(uint32_t index, char *string, uint32_t len);
2897
2899int setenv(const char *name, const char *value, int overwrite);
2900int unsetenv(const char *name);
2901
2903
2909uint32_t STDCALL first_bit_set(uint32_t value);
2910
2916uint32_t STDCALL last_bit_set(uint32_t value);
2917
2922uint32_t STDCALL count_leading_zeros(uint32_t value);
2923
2928uint32_t STDCALL count_trailing_zeros(uint32_t value);
2929
2933size_t STDCALL physical_to_io_address(void *address);
2934
2938size_t STDCALL io_address_to_physical(void *address);
2939
2943size_t STDCALL physical_to_bus_address(void *address);
2944
2948size_t STDCALL bus_address_to_physical(void *address);
2949
2954void STDCALL nanosecond_delay(uint32_t nanoseconds);
2955
2960void STDCALL microsecond_delay(uint32_t microseconds);
2961
2966void STDCALL millisecond_delay(uint32_t milliseconds);
2967
2974void STDCALL nanosecond_delay_ex(uint32_t nanoseconds, BOOL wait);
2975
2982void STDCALL microsecond_delay_ex(uint32_t microseconds, BOOL wait);
2983
2990void STDCALL millisecond_delay_ex(uint32_t milliseconds, BOOL wait);
2991
2993uint32_t get_tick_count(void);
2994uint64_t get_tick_count64(void);
2995
2997int posix_memalign(void **memptr, size_t alignment, size_t size);
2998char *realpath(const char *__restrict path, char *__restrict resolved_path);
2999int getpagesize(void);
3000
3002int dup3(int oldfd, int newfd, int flags);
3003int getentropy(void *buffer, size_t length);
3004int usleep(useconds_t useconds);
3005int symlink(const char *path1, const char *path2);
3006
3007int ftruncate(int fd, off_t length);
3008int truncate(const char *path, off_t length);
3009
3010int fdatasync(int fd);
3011
3012int sethostname (const char *name, size_t size);
3013#if !(defined (_WINSOCK_H) || defined (_WINSOCKAPI_) || defined (__USE_W32_SOCKETS))
3015 int gethostname (char *name, size_t size);
3016#endif
3017
3019void *mmap(void *addr, size_t length, int prot, int flags, int fd, off_t offset);
3020int munmap(void *addr, size_t length);
3021
3023int settimeofday(const struct timeval *tv, const struct timezone *tz);
3024
3027#ifdef _SYS_CPUSET_H_
3028int sched_setaffinity(pid_t pid, size_t cpusetsize, cpu_set_t *mask);
3029int sched_getaffinity(pid_t pid, size_t cpusetsize, cpu_set_t *mask);
3030#endif /* _SYS_CPUSET_H_ */
3031
3033void msleep(unsigned int msecs);
3034pid_t gettid(void);
3036
3037#ifdef __cplusplus
3038}
3039#endif
3040
3041#endif // _ULTIBO_PLATFORM_H
struct _DISPLAY_SETTINGS DISPLAY_SETTINGS
Definition globaltypes.h:88
size_t HANDLE
Definition globaltypes.h:51
#define STDCALL
Definition globaltypes.h:45
HANDLE SPIN_HANDLE
Definition globaltypes.h:104
_Bool BOOL
Built in Boolean type (1 byte) (Redeclared here for flexibility).
Definition globaltypes.h:55
HANDLE THREAD_HANDLE
Definition globaltypes.h:113
wchar_t WCHAR
Standard WideChar type (2 bytes) (Redeclared here for flexibility).
Definition globaltypes.h:58
HANDLE LIST_HANDLE
Definition globaltypes.h:111
uint32_t STDCALL mailbox_property_tag(uint32_t tag, void *data, uint32_t size)
Request a property tag (Get/Set) from the mailbox property channel.
uint32_t STDCALL system_get_command_line(char *commandline, uint32_t len)
Get the current command line.
uint32_t STDCALL get_system_call_count(void)
Get the number of system call entries for the current platform (Where Applicable).
int32_t STDCALL interlocked_xor(int32_t *target, int32_t value)
Perform an atomic XOR operation.
uint32_t STDCALL i2c_stop(void)
Stop the default I2C device and terminate reading and writing.
int STDCALL serial_printf(const char *format,...) _ATTRIBUTE((__format__(__printf__
Print formatted text to the default Serial device.
uint32_t STDCALL pwm_set_mode(uint32_t mode)
Set the mode for the default PWM device.
void STDCALL context_switch_swi(void *oldstack, void *newstack, THREAD_HANDLE newthread)
Perform a Context Switch from one thread to another from a software interrupt handler.
uint32_t STDCALL voltage_set_value(uint32_t voltageid, uint32_t value)
Set the current voltage level of the specified device.
uint32_t STDCALL page_tables_get_used(void)
Get the number of used second or third level page tables.
void STDCALL random_seed(uint32_t seed)
uint32_t STDCALL cursor_set_info(uint32_t width, uint32_t height, uint32_t hotspotx, uint32_t hotspoty, void *pixels, uint32_t length)
Set the Cursor Info (Width and Height, Hotspot and Pixel image).
BOOL STDCALL symbol_add(HANDLE handle, const char *name, size_t address)
void STDCALL(* gpio_event_cb)(void *data, uint32_t pin, uint32_t trigger)
Definition platform.h:298
uint32_t STDCALL register_system_call(uint32_t number, system_call_handler handler)
Request registration of the supplied handler to the specified System Call number (Where Applicable).
uint32_t STDCALL clock_set_rate(uint32_t clockid, uint32_t rate, BOOL turbo)
Set the clock rate in Hz of the specified Clock.
void STDCALL context_switch_fiq(void *oldstack, void *newstack, THREAD_HANDLE newthread)
Perform a Context Switch from one thread to another from an FIQ handler.
uint32_t STDCALL memory_get_large_section_size(void)
Get the large section size of system memory (Where Applicable).
uint32_t STDCALL get_interrupt_start(void)
Get the starting number of interrupt entries for the current platform.
BOOL STDCALL get_fiq(void)
Get Fast Interrupts (FIQ) state.
uint32_t STDCALL dma_transfer(DMA_DATA *data, uint32_t direction, uint32_t peripheral)
Perform a DMA transfer using the list of DMA data blocks provided.
void STDCALL activity_led_off(void)
Turn Off the Activity LED (Where Applicable).
uint32_t STDCALL(* thread_wait_proc)(LIST_HANDLE list, SPIN_HANDLE lock, uint32_t flags)
Definition platform.h:282
BOOL STDCALL host_set_domain(const char *domain)
void STDCALL wait_for_interrupt(void)
Wait for an Interrupt to occur (Where Applicable).
uint32_t STDCALL framebuffer_test_vsync(void)
Test the Framebuffer Vertical Sync (Where Applicable).
uint32_t STDCALL serial_write(void *buffer, uint32_t size, uint32_t *count)
Write data to the default Serial device.
uint32_t STDCALL release_ipi(uint32_t cpuid, uint32_t number, ipi_handler handler, void *parameter)
Request deregistration of the supplied handler from the specified IPI (Inter-processor interrupt) num...
uint32_t STDCALL board_get_mac_address(char *address, uint32_t len)
Get the current Board MAC address (Where Applicable).
uint32_t STDCALL framebuffer_test_alpha_mode(uint32_t *mode)
Test the Framebuffer Alpha Mode.
uint32_t STDCALL temperature_get_maximum(uint32_t temperatureid)
Get the maximum temperature in thousandths of a degree C of the specified device.
int ftruncate(int fd, off_t length)
BOOL STDCALL module_unload(HANDLE handle)
uint32_t STDCALL gpu_execute_code(void *address, uint32_t r0, uint32_t r1, uint32_t r2, uint32_t r3, uint32_t r4, uint32_t r5)
Execute a block of code on the GPU.
uint32_t STDCALL framebuffer_set_offset(uint32_t *x, uint32_t *y)
Set the Framebuffer Virtual Offset in Pixels.
uint32_t STDCALL cpu_get_revision(void)
Get the CPU revision of the current CPU.
uint32_t STDCALL memory_get_section_size(void)
Get the section size of system memory (Where Applicable).
uint32_t STDCALL environment_index(const char *name)
Locate an environment variable and return the index.
BOOL STDCALL console_hide_mouse(void *userdata)
int munmap(void *addr, size_t length)
HANDLE fd_handle(int fd)
uint32_t STDCALL page_table_get_page_size(size_t address)
Get the Size from the Page Table page that corresponds to the supplied virtual address.
uint32_t STDCALL page_directory_get_size(void)
Get the size of the first level page directory (Where applicable).
int fdatasync(int fd)
uint32_t STDCALL gpu_get_memory(size_t *address, uint64_t *length)
Get the memory start and size available to the GPU.
uint32_t STDCALL cpu_get_group(void)
Get the current CPU group.
uint32_t STDCALL system_date_to_string(double_t date, char *value, uint32_t len)
Return the supplied date value as a string in the system defined format.
uint32_t STDCALL cpu_get_arch(void)
Get the CPU architecture for this board.
int unsetenv(const char *name)
pid_t gettid(void)
void STDCALL clean_and_invalidate_data_cache_range(size_t address, uint32_t size)
Perform a Clean and Invalidate Data Cache Range operation (Where Applicable).
void STDCALL invalidate_cache(void)
Perform an Invalidate Entire Cache operation (Where Applicable).
uint32_t STDCALL gpio_output_set(uint32_t pin, uint32_t level)
Set the state of a GPIO output pin.
uint32_t STDCALL i2c_get_rate(void)
Get the clock rate of the default I2C device.
uint32_t STDCALL gpu_memory_release(HANDLE handle)
Release memory allocated from the GPU.
int setenv(const char *name, const char *value, int overwrite)
BOOL STDCALL console_read_wide_char(WCHAR *ch, void *userdata)
HANDLE STDCALL module_load_ex(const char *name, uint32_t flags)
void STDCALL enable_irq(void)
Enable Interrupts (IRQ) unconditionally.
uint32_t STDCALL request_fiq(uint32_t cpuid, uint32_t number, interrupt_handler handler, void *parameter)
Request registration of the supplied handler to the specified FIQ number (Where Applicable).
uint32_t STDCALL framebuffer_get_pitch(void)
Get the Framebuffer Pitch in Bytes per Line.
uint32_t STDCALL spi_get_select_polarity(uint16_t chipselect)
Get the chip select polarity of the default SPI device.
void STDCALL millisecond_delay(uint32_t milliseconds)
Non sleep wait for a number of milliseconds.
struct _INTERRUPT_ENTRY INTERRUPT_ENTRY
Definition platform.h:232
HANDLE_ENTRY *STDCALL handle_get(HANDLE handle)
Get the handle entry for the supplied handle.
void msleep(unsigned int msecs)
uint32_t STDCALL peripheral_get_size(void)
Get the total size of the peripherals.
void STDCALL(* system_call_handler)(SYSTEM_CALL_REQUEST *request)
Definition platform.h:277
BOOL STDCALL console_get_key(char *ch, void *userdata)
double_t STDCALL random_read_extended(void)
void STDCALL(* timer_event_proc)(void *data)
Definition platform.h:288
void STDCALL power_led_on(void)
Turn On the Power LED (Where Applicable).
HANDLE_ENTRY *STDCALL handle_create_ex(const char *name, uint32_t flags, HANDLE data, uint32_t _type)
Create and Open a new named or unnamed handle of the supplied type.
uint32_t STDCALL deregister_system_call(uint32_t number, system_call_handler handler)
Request deregistration of the supplied handler from the specified System Call number (Where Applicabl...
uint32_t STDCALL power_on(uint32_t powerid)
Power On the specified device.
uint32_t STDCALL framebuffer_test_virtual(uint32_t *width, uint32_t *height)
Test the Virtual Framebuffer Width and Height in Pixels.
uint32_t STDCALL dma_fill_memory(void *dest, uint32_t size, uint8_t value)
Fill memory at the destination address using DMA.
void STDCALL boot_console_write_ex(const char *value, uint32_t x, uint32_t y)
Output text to the boot time console display at the specified X and Y position (Where Applicable).
uint32_t STDCALL gpu_get_type(void)
Get the GPU type for this board.
uint32_t STDCALL framebuffer_set_depth(uint32_t *depth)
Set the Framebuffer Depth in Bits per Pixel.
uint32_t STDCALL get_local_interrupt_start(void)
Get the starting number of local interrupt entries for the current platform (Where Applicable).
uint32_t STDCALL spi_get_mode(void)
Get the device mode of the default SPI device.
size_t STDCALL local_peripheral_get_base(void)
Get the base address of the local peripherals (Peripherals local to each CPU).
uint32_t STDCALL gpio_level_get(uint32_t pin)
Get the current level (state) of a GPIO pin.
uint32_t STDCALL page_tables_get_length(void)
Get the size of the second or third level page tables.
uint32_t STDCALL framebuffer_test_depth(uint32_t *depth)
Test the Framebuffer Depth in Bits per Pixel.
void STDCALL send_event(void)
Send a signal that an Event has occurred (Where Applicable).
uint32_t STDCALL machine_get_type(void)
Get the current Machine type.
uint32_t STDCALL power_get_wait(uint32_t powerid)
Get the enable wait time in Microseconds of the specified device.
uint32_t STDCALL spi_stop(void)
Stop the default SPI device and terminate writing and reading.
uint32_t STDCALL clock_ticks(void)
Get the current number of clock ticks (When this reaches CLOCK_TICKS_PER_SECOND then ClockSeconds is ...
void STDCALL system_call(uint32_t number, size_t param1, size_t param2, size_t param3)
Perform a System Call function with the supplied parameters (Where Applicable).
ABORT_MASK STDCALL restore_abort(ABORT_MASK abortmask)
Restore Abort to a previous state.
uint32_t STDCALL i2c_get_description(uint32_t id, char *description, uint32_t len)
Get the device description of an I2C device.
uint32_t STDCALL vector_table_get_count(void)
Get the number of entries in the interrupt vector table.
uint32_t STDCALL virtual_gpio_function_get(uint32_t pin)
Get the current function of a virtual GPIO pin.
uint32_t STDCALL spi_get_clock_phase(void)
Get the clock phase of the default SPI device.
uint32_t STDCALL framebuffer_set_overscan(uint32_t *top, uint32_t *bottom, uint32_t *left, uint32_t *right)
Set the Framebuffer Top, Bottom, Left and Right Overscan in Pixels.
void STDCALL context_switch(void *oldstack, void *newstack, THREAD_HANDLE newthread)
Perform a Context Switch from one thread to another.
uint32_t STDCALL touch_get_buffer(size_t *address)
Get the Touchscreen memory buffer (Where Applicable).
struct _SYSTEM_CALL_ENTRY SYSTEM_CALL_ENTRY
Definition platform.h:250
void STDCALL pause_cpu(void)
Pause the current processor and wait for an Event or Interrupt (Where Applicable).
uint32_t STDCALL page_table_get_levels(void)
Get the number of page table levels for the current platform.
uint32_t STDCALL framebuffer_set_state(uint32_t state)
Set the current Framebuffer (Display) state (0 for Off / 1 for On).
HANDLE STDCALL handle_duplicate(HANDLE handle)
Duplicate an existing named or unnamed handle.
uint32_t STDCALL watchdog_stop(void)
void * mmap(void *addr, size_t length, int prot, int flags, int fd, off_t offset)
void STDCALL power_led_off(void)
Turn Off the Power LED (Where Applicable).
uint32_t STDCALL device_tree_read_string(const char *path, const char *name, char *value, uint32_t len)
Read a string value from a Device Tree property (Where Applicable).
BOOL STDCALL console_read_char(char *ch, void *userdata)
uint64_t get_tick_count64(void)
void STDCALL version_get_info(uint32_t *major, uint32_t *minor, uint32_t *revision)
Get the version information of the currently running system.
void STDCALL page_table_get_entry(size_t address, PAGE_TABLE_ENTRY *entry)
Get the Page Table entry that corresponds to the supplied virtual address.
uint32_t STDCALL clock_get_min_rate(uint32_t clockid)
Get the minimum clock rate in Hz of the specified Clock.
double_t STDCALL random_read_double(void)
uint32_t STDCALL version_get_date(char *date, uint32_t len)
Get the version release date of the currently running system.
uint32_t IRQ_FIQ_MASK
Definition platform.h:154
uint32_t STDCALL l2_cache_get_line_size(void)
Get the L2 cache line size for this board.
BOOL STDCALL serial_available(void)
Check if a Serial device is available.
BOOL STDCALL get_abort(void)
Get Abort state.
uint32_t STDCALL framebuffer_get_pixel_order(uint32_t *order)
Get the Framebuffer Pixel Order (0 = BGR / 1 = RGB).
uint32_t STDCALL counter_get_interval(void)
Get the current interval in ticks of the default counter.
void STDCALL millisecond_delay_ex(uint32_t milliseconds, BOOL wait)
Non sleep wait for a number of milliseconds.
void STDCALL disable_irq_fiq(void)
Disable Interrupts and Fast Interrupts (IRQ/FIQ) unconditionally.
int32_t STDCALL interlocked_decrement(int32_t *target)
Perform an atomic decrement operation.
uint32_t STDCALL deregister_system_call_ex(uint32_t cpuid, uint32_t number, system_call_handler handler, system_call_ex_handler handlerex)
Request deregistration of the supplied extended handler from the specified System Call number (Where ...
size_t STDCALL vector_table_get_base(void)
Get the base address of the interrupt vector table.
uint32_t STDCALL gpio_read(uint32_t reg)
Perform a direct read from a GPIO register.
void STDCALL nanosecond_delay(uint32_t nanoseconds)
Non sleep wait for a number of nanoseconds.
BOOL STDCALL spi_available(void)
Check if an SPI device is available.
void STDCALL invalidate_data_cache(void)
Perform an Invalidate Data Cache operation (Where Applicable).
THREAD_HANDLE STDCALL(* interrupt_ex_handler)(uint32_t cpuid, THREAD_HANDLE thread, void *parameter)
Definition platform.h:228
HANDLE_ENTRY *STDCALL handle_find(const char *name)
Find an existing named handle of the supplied type.
uint32_t STDCALL framebuffer_set_palette(uint32_t start, uint32_t count, void *buffer, uint32_t length)
Set the Framebuffer Palette in RGBA values.
BOOL STDCALL i2c_available(void)
Check if an I2C device is available.
uint32_t STDCALL l1_instruction_cache_get_size(void)
Get the L1 instruction cache size for this board.
void STDCALL boot_blink(void)
Blink the Activity LED (Where Applicable).
uint32_t STDCALL framebuffer_test_palette(uint32_t start, uint32_t count, void *buffer, uint32_t length)
Test the Framebuffer Palette in RGBA values.
size_t STDCALL page_tables_get_address(void)
Get the address of the second or third level page tables.
BOOL STDCALL rtc_available(void)
Check if a Real Time Clock (RTC) device is available.
uint32_t STDCALL framebuffer_get_physical(uint32_t *width, uint32_t *height)
Get the Physical Framebuffer Width and Height in Pixels.
uint32_t STDCALL temperature_get_current(uint32_t temperatureid)
Get the current temperature in thousandths of a degree C of the specified device.
FIQ_MASK STDCALL restore_fiq(FIQ_MASK fiqmask)
Restore Fast Interrupts (FIQ) to a previous state.
uint32_t STDCALL cpu_get_type(void)
Get the CPU type for this board.
uint32_t STDCALL power_off(uint32_t powerid)
Power Off the specified device.
IRQ_MASK STDCALL save_irq(void)
Disable Interrupts (IRQ) and return the previous state.
uint32_t STDCALL count_trailing_zeros(uint32_t value)
Count the number of trailing 0 bits in a nonzero 32 bit value.
uint32_t STDCALL l1_instruction_cache_get_line_size(void)
Get the L1 instruction cache line size for this board.
uint32_t STDCALL handle_destroy(HANDLE handle)
Close and Destroy a named or unnamed handle.
THREAD_HANDLE STDCALL(* system_call_ex_handler)(uint32_t cpuid, THREAD_HANDLE thread, SYSTEM_CALL_REQUEST *request)
Definition platform.h:278
uint32_t STDCALL pwm_write(uint32_t value)
Write a value to the default PWM device.
uint32_t STDCALL framebuffer_set_pixel_order(uint32_t *order)
Set the Framebuffer Pixel Order (0 = BGR / 1 = RGB).
FIQ_MASK STDCALL save_fiq(void)
Disable Fast Interrupts (FIQ) and return the previous state.
uint32_t STDCALL l1_data_cache_get_line_size(void)
Get the L1 data cache line size for this board.
int64_t STDCALL counter_read64(void)
Read the current value of the default counter.
uint32_t STDCALL system_interval_to_string(double_t interval, char *value, uint32_t len)
Return the supplied time interval as a string in the system defined format.
int symlink(const char *path1, const char *path2)
uint32_t STDCALL peripheral_read(uint32_t base, uint32_t reg)
Read from a Peripheral register.
uint32_t STDCALL host_get_domain(char *domain, uint32_t len)
struct _SYSTEM_CALL_REQUEST SYSTEM_CALL_REQUEST
Definition platform.h:183
int usleep(useconds_t useconds)
uint32_t STDCALL gpio_pull_select(uint32_t pin, uint32_t mode)
Change the pull state of a GPIO pin.
uint32_t STDCALL gpio_level_set(uint32_t pin, uint32_t level)
Set the level (state) of a GPIO pin.
uint32_t STDCALL edid_block_get(uint32_t block, void *buffer, uint32_t length)
Get an EDID block from HDMI.
uint32_t STDCALL system_time_to_string(double_t time, char *value, uint32_t len)
Return the supplied time value as a string in the system defined format.
uint32_t STDCALL clock_seconds(void)
Get the number of clock seconds since the system was started (This forms the system clock).
uint32_t STDCALL last_bit_set(uint32_t value)
Find the last set bit in a nonzero 32 bit value.
SYSTEM_CALL_ENTRY STDCALL get_system_call_entry(uint32_t number)
Get the system call entry for the specified system call number (Where Applicable).
uint32_t STDCALL cpu_get_mode(void)
Get the current CPU mode.
size_t STDCALL page_table_get_page_physical(size_t address)
Get the Physical Address from the Page Table page that corresponds to the supplied virtual address.
void STDCALL disable_irq(void)
Disable Interrupts (IRQ) unconditionally.
uint32_t STDCALL device_tree_read(const char *path, const char *name, void *buffer, uint32_t *size)
Read the raw value of a Device Tree property (Where Applicable).
int getentropy(void *buffer, size_t length)
uint32_t STDCALL mailbox_call_ex(uint32_t mailbox, uint32_t channel, uint32_t data, uint32_t *response, uint32_t timeout)
Perform a transaction (Send/Receive) to specified mailbox on specified channel.
HANDLE STDCALL dispmanx_handle_get(HANDLE resource)
Convert a Dispmanx Resource handle to a Memory handle (Which can be passed to Lock/Unlock above).
uint32_t STDCALL environment_set(const char *name, const char *value)
Add an environment variable or update an existing variable.
uint32_t STDCALL dma_write_peripheral(void *source, void *address, uint32_t size, uint32_t peripheral)
Write to a peripheral address from the source address using DMA.
ABORT_MASK STDCALL save_abort(void)
Disable Abort and return the previous state.
void STDCALL(* counter_event_cb)(void *data)
Definition platform.h:295
int64_t STDCALL clock_set_time(int64_t time, BOOL rtc)
Set the current system time in 100 nanosecond ticks since 1 January 1601.
uint32_t STDCALL release_irq(uint32_t cpuid, uint32_t number, interrupt_handler handler, void *parameter)
Request deregistration of the supplied handler from the specified IRQ number.
uint32_t STDCALL cpu_get_description(char *description, uint32_t len)
Get the CPU description of the current CPU.
int64_t STDCALL clock_get_base(void)
Get the current clock base in 100 nanosecond ticks since 1 January 1601.
uint32_t STDCALL mailbox_call(uint32_t mailbox, uint32_t channel, uint32_t data, uint32_t *response)
Perform a transaction (Send/Receive) to specified mailbox on specified channel.
int getpagesize(void)
char STDCALL wide_char_to_code_page(WCHAR ch)
uint32_t STDCALL release_ex_fiq(uint32_t cpuid, uint32_t number, interrupt_handler handler, interrupt_ex_handler handlerex, void *parameter)
Request deregistration of the supplied extended handler from the specified FIQ number (Where Applicab...
uint32_t STDCALL spi_set_clock_polarity(uint32_t clockpolarity)
Set the clock polarity for the default SPI device.
uint32_t STDCALL system_register_shutdown(shutdown_cb callback, void *parameter, uint32_t timeout)
Register a procedure to be called during system shutdown or restart.
uint32_t STDCALL register_interrupt(uint32_t number, uint32_t mask, uint32_t priority, uint32_t flags, shared_interrupt_handler handler, void *parameter)
Request registration of the supplied handler to the specified interrupt number (Where Applicable).
uint32_t STDCALL mailbox_property_call(uint32_t mailbox, uint32_t channel, void *data, uint32_t *response)
Perform a property tag transaction (Send/Receive) to specified mailbox on specified channel.
void STDCALL boot_console_start(void)
Start the boot time console display (Where Applicable).
uint32_t STDCALL uart_get_description(uint32_t id, char *description, uint32_t len)
Get the device description of a UART device.
uint32_t STDCALL request_ex_fiq(uint32_t cpuid, uint32_t number, interrupt_handler handler, interrupt_ex_handler handlerex, void *parameter)
Request registration of the supplied extended handler to the specified FIQ number (Where Applicable).
uint32_t STDCALL spi_set_mode(uint32_t mode)
Set the device mode for the default SPI device.
size_t STDCALL get_sp(void)
Get the current stack pointer (SP).
uint32_t STDCALL framebuffer_get_palette(void *buffer, uint32_t length)
Get the Framebuffer Palette in RGBA values.
uint32_t STDCALL cpu_get_utilization(uint32_t cpuid)
Get the last second utilization of the specified CPU.
void STDCALL invalidate_tlb(void)
Perform an Invalidate Entire TLB operation (Where Applicable).
void STDCALL peripheral_write(uint32_t base, uint32_t reg, uint32_t value)
Write to a Peripheral register.
BOOL STDCALL gpio_available(void)
Check if a GPIO device is available.
uint32_t STDCALL power_get_state(uint32_t powerid)
Get the power state of the specified device.
int64_t STDCALL board_get_serial(void)
Get the current Board serial number.
int64_t STDCALL system_get_uptime(void)
Get the current system up time in 100 nanosecond ticks since 1 January 1601.
void STDCALL wait_for_event(void)
Wait for an Event to occur (Where Applicable).
uint32_t STDCALL virtual_gpio_level_set(uint32_t pin, uint32_t level)
Set the level (state) of a virtual GPIO pin.
int settimeofday(const struct timeval *tv, const struct timezone *tz)
int64_t STDCALL rtc_set_time(int64_t time)
Set the current time for a Real Time Clock device.
HANDLE STDCALL module_load(const char *name)
uint32_t STDCALL clock_get_state(uint32_t clockid)
Get the state of the specified Clock.
uint32_t STDCALL fpu_get_type(void)
Get the FPU type for this board.
uint32_t STDCALL spi_set_clock_phase(uint32_t clockphase)
Set the clock phase for the default SPI device.
uint32_t STDCALL clock_get_max_rate(uint32_t clockid)
Get the maximum clock rate in Hz of the specified Clock.
uint32_t STDCALL fpu_get_state(void)
Get the current FPU state.
uint32_t STDCALL cpu_get_boot(void)
Get the boot CPU for this board.
uint32_t STDCALL l2_cache_get_type(void)
Get the L2 cache type for this board.
shared_interrupt_handler ipi_handler
Definition platform.h:274
uint32_t STDCALL(* shared_interrupt_handler)(uint32_t number, uint32_t cpuid, uint32_t flags, void *parameter)
Definition platform.h:229
uint32_t STDCALL get_interrupt_count(void)
Get the number of interrupt entries for the current platform.
uint32_t STDCALL touch_set_buffer(size_t address)
Set the Touchscreen memory buffer (Where Applicable).
uint32_t STDCALL clock_calculate_offset(double_t datetime, int32_t *offset, BOOL *daylight)
Calculate the system time offset between UTC and Local at the given date and time.
uint32_t STDCALL framebuffer_get_overscan(uint32_t *top, uint32_t *bottom, uint32_t *left, uint32_t *right)
Get the Framebuffer Top, Bottom, Left and Right Overscan in Pixels.
uint32_t STDCALL pwm_stop(void)
Stop the default PWM device.
void STDCALL invalidate_instruction_cache_range(size_t address, uint32_t size)
Perform an Invalidate Instruction Cache Range operation (Where Applicable).
BOOL STDCALL console_write_char(char ch, void *userdata)
uint32_t STDCALL cursor_set_default(void)
Set the default Cursor Info (Where Applicable).
uint32_t STDCALL cpu_get_memory(size_t *address, uint64_t *length)
Get the memory start and size available to the CPU.
HANDLE STDCALL gpu_memory_allocate(uint32_t length, uint32_t alignment, uint32_t flags)
Allocate memory from the GPU.
uint32_t STDCALL system_restart(uint32_t delay)
Restart the system.
uint32_t STDCALL voltage_get_max_value(uint32_t voltageid)
Get the maximum voltage level of the specified device.
int32_t STDCALL interlocked_and(int32_t *target, int32_t value)
Perform an atomic AND operation.
uint32_t STDCALL spi_get_clock_polarity(void)
Get the clock polarity of the default SPI device.
uint32_t STDCALL serial_read(void *buffer, uint32_t size, uint32_t *count)
Read data from the default Serial device.
int STDCALL uint32_t STDCALL environment_get(const char *name, char *value, uint32_t len)
Locate an environment variable and return the current value.
uint32_t STDCALL framebuffer_test_physical(uint32_t *width, uint32_t *height)
Test the Physical Framebuffer Width and Height in Pixels.
uint32_t STDCALL framebuffer_set_virtual(uint32_t *width, uint32_t *height)
Set the Virtual Framebuffer Width and Height in Pixels.
uint32_t STDCALL serial_open(uint32_t baudrate, uint32_t databits, uint32_t stopbits, uint32_t parity, uint32_t flowcontrol, uint32_t receivedepth, uint32_t transmitdepth)
Open the default Serial device ready for sending and receiving.
uint32_t STDCALL framebuffer_set_vsync(void)
Set (Wait For) the Framebuffer Vertical Sync (Where Applicable).
void *STDCALL dma_allocate_buffer_ex(uint32_t *size)
Allocate a buffer compatible with DMA memory reads or writes.
BOOL STDCALL framebuffer_available(void)
Check if a framebuffer device is currently available.
void STDCALL flush_branch_target_cache(void)
Perform a Flush Entire Branch Target Cache operation (Where Applicable).
int64_t STDCALL clock_nanoseconds(void)
Get the number of clock nanoseconds since the system was started.
uint32_t STDCALL power_set_state(uint32_t powerid, uint32_t state, BOOL wait)
Set the power state of the specified device (Optionally waiting for ready).
uint16_t STDCALL i2c_get_address(void)
Get the slave address for the default I2C device.
void STDCALL flush_prefetch_buffer(void)
Perform a Flush Prefetch Buffer operation (Where Applicable).
uint32_t STDCALL page_table_get_size(void)
Get the size of the first or second level page table.
uint32_t STDCALL environment_string(uint32_t index, char *string, uint32_t len)
Get an environment variable by index.
uint32_t STDCALL get_software_interrupt_start(void)
Get the starting number of software interrupt entries for the current platform (Where Applicable).
void STDCALL boot_output(uint32_t value)
Output boot time information (Where Applicable).
uint32_t STDCALL module_get_name(HANDLE handle, char *name, uint32_t len)
uint32_t STDCALL system_shutdown(uint32_t delay)
Shutdown the system.
uint32_t STDCALL cpu_get_mask(void)
Get the CPU mask for this board.
uint32_t STDCALL handle_close(HANDLE handle)
Close a named or unnamed handle.
uint32_t STDCALL get_software_interrupt_count(void)
Get the number of software interrupt entries for the current platform (Where Applicable).
uint32_t STDCALL page_tables_get_count(void)
Get the number of second or third level page tables.
uint32_t STDCALL framebuffer_set_layer(int32_t *layer)
Set the Framebuffer Layer.
int sched_getcpu(void)
uint32_t STDCALL vector_table_get_size(void)
Get the size in bytes of the interrupt vector table.
void STDCALL disable_fiq(void)
Disable Fast Interrupts (FIQ) unconditionally.
int truncate(const char *path, off_t length)
uint32_t STDCALL gpu_memory_unlock(HANDLE handle)
Unlock memory allocated from the GPU.
int32_t STDCALL interlocked_increment(int32_t *target)
Perform an atomic increment operation.
uint32_t STDCALL dma_release_buffer(void *buffer)
Release a buffer allocated with DMAAllocateBuffer.
uint32_t STDCALL(* thread_wait_ex_proc)(LIST_HANDLE list, SPIN_HANDLE lock, uint32_t flags, uint32_t timeout)
Definition platform.h:283
uint32_t STDCALL counter_set_interval(uint32_t interval)
Set the current interval in ticks of the default counter.
uint32_t STDCALL handle_enumerate(handle_enumerate_cb callback, void *data)
Enumerate all handles in the handle table.
uint32_t STDCALL spi_get_description(uint32_t id, char *description, uint32_t len)
Return the device description of an SPI device.
size_t STDCALL get_pc(void)
Get the current program counter (PC).
uint32_t STDCALL framebuffer_set_backlight(uint32_t brightness)
Set the Framebuffer Backlight brightness (Where Applicable).
uint32_t STDCALL cpu_get_current(void)
Get the current CPU ID.
uint32_t STDCALL framebuffer_get_virtual(uint32_t *width, uint32_t *height)
Get the Virtual Framebuffer Width and Height in Pixels.
uint32_t STDCALL pwm_set_frequency(uint32_t frequency)
Set the clock frequency for the default PWM device.
void STDCALL nanosecond_delay_ex(uint32_t nanoseconds, BOOL wait)
Non sleep wait for a number of nanoseconds.
uint32_t STDCALL release_fiq(uint32_t cpuid, uint32_t number, interrupt_handler handler, void *parameter)
Request deregistration of the supplied handler from the specified FIQ number (Where Applicable).
uint32_t STDCALL framebuffer_get_layer(int32_t *layer)
Get the Framebuffer Layer.
void STDCALL instruction_memory_barrier(void)
Perform an Instruction Memory Barrier operation (Where Applicable).
uint32_t STDCALL local_peripheral_get_size(void)
Get the total size of the local peripherals (Peripherals local to each CPU).
uint32_t STDCALL clock_get_count(void)
Gets the current system clock count (32 least significant bits of total).
struct _HANDLE_ENTRY HANDLE_ENTRY
Definition platform.h:198
uint32_t STDCALL gpu_memory_lock(HANDLE handle)
Lock memory allocated from the GPU and return an address.
uint32_t STDCALL dma_copy_memory(void *source, void *dest, uint32_t size)
Copy memory from the source to the destination address using DMA.
uint32_t STDCALL spi_read(uint16_t chipselect, void *dest, uint32_t size, uint32_t *count)
Read data from the default SPI device Because SPI writes and then reads for each byte,...
void *STDCALL system_get_environment(void)
Get the current environment.
uint32_t STDCALL cpu_get_model(void)
Get the CPU model of the current CPU.
uint32_t STDCALL mailbox_property_call_ex(uint32_t mailbox, uint32_t channel, void *data, uint32_t *response, uint32_t timeout)
Perform a property tag transaction (Send/Receive) to specified mailbox on specified channel.
uint32_t STDCALL firmware_get_revision(void)
Get the current board Firmware Revision.
uint32_t STDCALL environment_count(BOOL reset)
Get the current number of environment variables.
uint32_t get_tick_count(void)
IRQ_FIQ_MASK STDCALL restore_irq_fiq(IRQ_FIQ_MASK irqfiqmask)
Restore Interrupts and Fast Interrupts (IRQ/FIQ) to a previous state.
uint32_t STDCALL request_ex_irq(uint32_t cpuid, uint32_t number, interrupt_handler handler, interrupt_ex_handler handlerex, void *parameter)
Request registration of the supplied extended handler to the specified IRQ number.
BOOL STDCALL dma_available(void)
Check if DMA is currently available.
uint32_t STDCALL i2c_read(uint16_t address, void *buffer, uint32_t size, uint32_t *count)
Read data from the default I2C device.
size_t STDCALL vector_table_get_entry(uint32_t number)
Get the interrupt vector table entry that corresponds to the supplied number.
void STDCALL logging_output(const char *text)
size_t STDCALL page_table_get_base(void)
Get the base address of the first or second level page table.
BOOL STDCALL symbol_remove(HANDLE handle, const char *name)
uint32_t STDCALL dma_read_peripheral(void *address, void *dest, uint32_t size, uint32_t peripheral)
Read from a peripheral address to the destination address using DMA.
uint32_t STDCALL dma_get_channels(void)
Get the currently enabled DMA channel bitmap (If supported).
int STDCALL logging_outputf(const char *format,...) _ATTRIBUTE((__format__(__printf__
Output formatted text to the default logging.
void STDCALL invalidate_instruction_tlb(void)
Perform an Invalidate Instruction TLB operation (Where Applicable).
uint32_t STDCALL serial_close(void)
Close the default Serial device and terminate sending and receiving.
size_t STDCALL page_tables_get_next(void)
Get the address of the next available second or third level page table.
uint32_t STDCALL framebuffer_get_num_displays(uint32_t *numdisplays)
Get the number of framebuffer displays (Where Applicable).
uint32_t STDCALL cpu_get_state(void)
Get the current CPU state.
uint32_t STDCALL i2c_set_rate(uint32_t rate)
Set the clock rate for the default I2C device.
int32_t STDCALL interlocked_compare_exchange(int32_t *target, int32_t source, int32_t compare)
Perform an atomic compare and exchange operation.
void STDCALL power_led_enable(void)
Enable the Power LED (Where Applicable).
uint32_t STDCALL(* handle_close_ex_proc)(HANDLE data)
Definition platform.h:194
uint32_t STDCALL spi_set_clock_rate(uint16_t chipselect, uint32_t clockrate)
Set the clock rate for the default SPI device.
uint32_t STDCALL spi_write(uint16_t chipselect, void *source, uint32_t size, uint32_t *count)
Write data to the default SPI device Because SPI writes and then reads for each byte,...
int32_t STDCALL interlocked_exchange(int32_t *target, int32_t source)
Perform an atomic exchange operation.
uint32_t STDCALL pwm_get_description(uint32_t id, uint32_t channel, char *description, uint32_t len)
Get the device description of an PWM device.
uint32_t STDCALL get_local_interrupt_count(void)
Get the number of local interrupt entries for the current platform (Where Applicable).
uint32_t STDCALL mailbox_receive(uint32_t mailbox, uint32_t channel)
Receive from specified mailbox on specified channel.
uint32_t STDCALL register_system_call_ex(uint32_t cpuid, uint32_t number, system_call_handler handler, system_call_ex_handler handlerex)
Request registration of the supplied extended handler to the specified System Call number (Where Appl...
BOOL STDCALL console_show_mouse(uint32_t x, uint32_t y, void *userdata)
uint32_t STDCALL i2c_set_address(uint16_t address)
Set the slave address for the default I2C device.
WCHAR STDCALL code_page_to_wide_char(char ch)
void STDCALL mailbox_send(uint32_t mailbox, uint32_t channel, uint32_t data)
Send to specified mailbox on specified channel.
uint32_t STDCALL counter_get_rate(void)
Get the current clock rate in Hz of the default counter.
uint32_t STDCALL spi_set_select_polarity(uint16_t chipselect, uint32_t selectpolarity)
Set the chip select polarity for the default SPI device.
uint32_t STDCALL counter_read(void)
Read the current value of the default counter.
uint32_t STDCALL release_ex_irq(uint32_t cpuid, uint32_t number, interrupt_handler handler, interrupt_ex_handler handlerex, void *parameter)
Request deregistration of the supplied extended handler from the specified IRQ number.
uint32_t STDCALL counter_cancel(void)
Cancel a previously scheduled event callback function on the default counter.
uint32_t STDCALL get_interrupt_entry(uint32_t number, uint32_t instance, INTERRUPT_ENTRY *interrupt)
Get the interrupt entry for the specified interrupt number and instance.
uint32_t STDCALL page_tables_get_shift(void)
Get the multiplier to convert count to actual size of the second or third level page tables.
uint32_t STDCALL counter_wait(void)
Wait for the current interval to expire on the default counter.
uint32_t STDCALL version_get_version(char *version, uint32_t len)
Get the version string of the currently running system.
uint32_t STDCALL watchdog_refresh(uint32_t milliseconds)
BOOL STDCALL device_tree_valid(void)
Check if valid Device Tree information was provided by the firmware/bootloader.
uint32_t STDCALL page_table_get_page_flags(size_t address)
Get the Flags from the Page Table page that corresponds to the supplied virtual address.
uint32_t STDCALL framebuffer_release(void)
Release the current Framebuffer.
uint32_t STDCALL chip_get_revision(void)
Get the current Chip revision number.
uint32_t STDCALL cpu_get_count(void)
Get the CPU count for this board.
uint32_t STDCALL vector_table_set_entry(uint32_t number, size_t address)
Set the interrupt vector table entry that corresponds to the supplied number.
double_t STDCALL cpu_get_percentage(uint32_t cpuid)
Get the last second utilization of the specified CPU in percentage.
size_t STDCALL physical_to_io_address(void *address)
Convert Physical address to an IO addresses (Where Applicable).
BOOL STDCALL host_set_name(const char *name)
int32_t STDCALL interlocked_or(int32_t *target, int32_t value)
Perform an atomic OR operation.
void STDCALL(* handle_close_proc)(HANDLE data)
Definition platform.h:193
int64_t STDCALL clock_get_total(void)
Gets the total system clock count.
HANDLE STDCALL(* handle_duplicate_proc)(HANDLE data)
Definition platform.h:195
uint32_t STDCALL framebuffer_set_alpha_mode(uint32_t *mode)
Set the Framebuffer Alpha Mode.
uint64_t STDCALL memory_get_size(void)
Get the total size of system memory.
uint32_t STDCALL gpu_get_state(void)
Get the current GPU state.
void STDCALL data_synchronization_barrier(void)
Perform a Data Synchronization Barrier operation (Where Applicable).
IRQ_FIQ_MASK STDCALL save_irq_fiq(void)
Disable Interrupts and Fast Interrupts (IRQ/FIQ) and return the previous state.
uint32_t STDCALL halt_thread(uint32_t exitcode)
Halt the current thread.
uint32_t STDCALL virtual_gpio_level_get(uint32_t pin)
Get the current level (state) of a virtual GPIO pin.
int64_t STDCALL random_read_int64(int64_t limit)
struct _DMA_DATA DMA_DATA
Definition platform.h:160
uint32_t STDCALL gpio_input_get(uint32_t pin)
Get the current state of a GPIO input pin.
uint32_t STDCALL framebuffer_display_id_to_name(uint32_t displayid, char *name, uint32_t len)
Get the name for the specified display id (Where Applicable).
void STDCALL logging_output_ex(uint32_t facility, uint32_t severity, const char *tag, const char *content)
uint32_t STDCALL clock_get_measured_rate(uint32_t clockid)
Get the measured or actual clock rate in Hz of the specified Clock.
IRQ_MASK STDCALL restore_irq(IRQ_MASK irqmask)
Restore Interrupts (IRQ) to a previous state.
uint32_t STDCALL boot_console_get_y(void)
Get the current Y position of the boot time console display (Where Applicable).
void STDCALL(* interrupt_handler)(void *parameter)
Definition platform.h:227
void STDCALL write_memory_barrier(void)
Perform a Write Memory Barrier operation (Where Applicable).
BOOL STDCALL get_irq(void)
Get Interrupts (IRQ) state.
uint32_t STDCALL(* thread_release_proc)(LIST_HANDLE list)
Definition platform.h:284
void STDCALL activity_led_on(void)
Turn On the Activity LED (Where Applicable).
struct _PAGE_TABLE_ENTRY PAGE_TABLE_ENTRY
Definition platform.h:260
HANDLE STDCALL handle_open(const char *name)
Open an existing named handle.
BOOL STDCALL watchdog_available(void)
Check if a watchdog timer is currently available.
BOOL STDCALL console_peek_key(char *ch, void *userdata)
uint32_t STDCALL memory_get_page_size(void)
Get the page size of system memory.
BOOL STDCALL console_read_mouse(uint32_t *x, uint32_t *y, uint32_t *buttons, void *userdata)
uint32_t STDCALL framebuffer_set_display_num(uint32_t displaynum)
Set the current framebuffer display number (Where Applicable).
void STDCALL clean_and_invalidate_data_cache(void)
Perform a Clean and Invalidate Data Cache operation (Where Applicable).
uint32_t STDCALL host_get_name(char *name, uint32_t len)
uint32_t STDCALL framebuffer_get_alpha_mode(uint32_t *mode)
Get the Framebuffer Alpha Mode.
uint32_t STDCALL watchdog_start(uint32_t milliseconds)
uint32_t STDCALL pwm_start(void)
Start the default PWM device.
void STDCALL clean_data_cache(void)
Perform a Clean Data Cache operation (Where Applicable).
uint32_t STDCALL board_get_type(void)
Get the current Board type.
size_t STDCALL device_tree_get_base(void)
Get the base address of the Device Tree Blob (Where Applicable).
size_t STDCALL bus_address_to_physical(void *address)
Convert a Bus address to a Physical address (Where Applicable).
uint32_t STDCALL system_date_time_to_string(double_t datetime, char *value, uint32_t len)
Return the supplied date and time value as a string in the system defined format.
uint32_t STDCALL i2c_write_read(uint16_t address, void *initial, uint32_t len, void *data, uint32_t size, uint32_t *count)
Write data to and Read data from the default I2C device in one operation Useful for devices that requ...
uint32_t STDCALL counter_set_rate(uint32_t rate)
Set the current clock rate in Hz of the default counter.
int32_t STDCALL interlocked_add_exchange(int32_t *target, int32_t source)
Perform an atomic add and exchange operation.
uint32_t STDCALL version_get_name(char *name, uint32_t len)
Get the version release name of the currently running system.
uint32_t IRQ_MASK
Definition platform.h:152
char * realpath(const char *__restrict path, char *__restrict resolved_path)
uint32_t STDCALL virtual_gpio_function_select(uint32_t pin, uint32_t mode)
Change the function of a virtual GPIO pin.
uint32_t STDCALL device_tree_read64(const char *path, const char *name, uint64_t *value)
Read a 64-bit value from a Device Tree property (Where Applicable).
uint32_t STDCALL memory_get_large_page_size(void)
Get the large page size of system memory (Where Applicable).
uint32_t STDCALL request_irq(uint32_t cpuid, uint32_t number, interrupt_handler handler, void *parameter)
Request registration of the supplied handler to the specified IRQ number.
uint32_t STDCALL framebuffer_test_offset(uint32_t *x, uint32_t *y)
Test the Framebuffer Virtual Offset in Pixels.
uint32_t STDCALL clock_get_rate(uint32_t clockid)
Get the clock rate in Hz of the specified Clock.
uint32_t STDCALL count_leading_zeros(uint32_t value)
Count the number of leading 0 bits in a nonzero 32 bit value.
uint32_t STDCALL framebuffer_test_overscan(uint32_t *top, uint32_t *bottom, uint32_t *left, uint32_t *right)
Test the Framebuffer Top, Bottom, Left and Right Overscan in Pixels.
void *STDCALL dma_allocate_buffer(uint32_t size)
Allocate a buffer compatible with DMA memory reads or writes.
uint32_t STDCALL first_bit_set(uint32_t value)
Find the first set bit in a nonzero 32 bit value.
uint32_t STDCALL get_software_interrupt_entry(uint32_t cpuid, uint32_t number, uint32_t instance, INTERRUPT_ENTRY *interrupt)
Get the software interrupt entry for the specified interrupt number and instance (Where Applicable).
void STDCALL microsecond_delay_ex(uint32_t microseconds, BOOL wait)
Non sleep wait for a number of microseconds.
int STDCALL size_t STDCALL peripheral_get_base(void)
Get the base address of the peripherals.
size_t STDCALL physical_to_bus_address(void *address)
Convert a Physical address to a Bus address (Where Applicable).
uint32_t STDCALL framebuffer_get_display_id(uint32_t displaynum)
Get the display id for the specified display number (Where Applicable).
uint32_t STDCALL deregister_interrupt(uint32_t number, uint32_t mask, uint32_t priority, uint32_t flags, shared_interrupt_handler handler, void *parameter)
Request deregistration of the supplied handler from the specified interrupt number (Where Applicable)...
int64_t STDCALL clock_get_time(void)
Get the current system time in 100 nanosecond ticks since 1 January 1601.
void STDCALL halt_cpu(void)
Halt the current processor.
uint32_t STDCALL device_tree_read32(const char *path, const char *name, uint32_t *value)
Read a 32-bit value from a Device Tree property (Where Applicable).
void STDCALL invalidate_data_cache_range(size_t address, uint32_t size)
Perform an Invalidate Data Cache Range operation (Where Applicable).
uint32_t STDCALL page_table_set_entry(PAGE_TABLE_ENTRY *entry)
Set the Page Table entry that corresponds to the supplied virtual address.
int64_t STDCALL rtc_get_time(void)
Get the current time from a Real Time Clock device Returned time is 100 nanosecond ticks since 1 Janu...
HANDLE STDCALL handle_create(HANDLE data, uint32_t _type)
Create and Open a new unnamed handle of the supplied type.
void STDCALL enable_fiq(void)
Enable Fast Interrupts (FIQ) unconditionally.
void STDCALL(* worker_cb)(void *data)
Definition platform.h:292
uint32_t STDCALL framebuffer_allocate(uint32_t alignment, uint32_t *address, uint32_t *length)
Allocate a new Framebuffer.
uint32_t STDCALL gpio_function_get(uint32_t pin)
Get the current function of a GPIO pin.
uint32_t STDCALL l1_data_cache_get_size(void)
Get the L1 data cache size for this board.
uint32_t STDCALL spi_start(uint32_t mode, uint32_t clockrate, uint32_t clockphase, uint32_t clockpolarity)
Start the default SPI device ready for writing and reading.
size_t STDCALL symbol_get_address(HANDLE handle, const char *name)
uint32_t STDCALL clock_update_offset(void)
Update the system time offset between UTC and Local.
uint32_t STDCALL framebuffer_set_physical(uint32_t *width, uint32_t *height)
Set the Physical Framebuffer Width and Height in Pixels.
int gethostname(char *name, size_t size)
uint32_t STDCALL framebuffer_get_offset(uint32_t *x, uint32_t *y)
Get the Framebuffer Virtual Offset in Pixels.
uint32_t STDCALL(* handle_enumerate_cb)(HANDLE_ENTRY *handle, void *data)
Definition platform.h:201
uint32_t STDCALL turbo_get_state(uint32_t turboid)
Get the Turbo state (0 equals Off / 1 equals On) of the specified device.
int32_t STDCALL random_read_longint(int32_t limit)
void STDCALL context_switch_irq(void *oldstack, void *newstack, THREAD_HANDLE newthread)
Perform a Context Switch from one thread to another from an IRQ handler.
uint32_t STDCALL page_tables_get_free(void)
Get the number of available second or third level page tables.
void STDCALL(* worker_task_proc)(void *data)
Definition platform.h:291
uint32_t STDCALL board_get_revision(void)
Get the current Board revision number.
int sethostname(const char *name, size_t size)
uint32_t STDCALL i2c_write_write(uint16_t address, void *initial, uint32_t len, void *data, uint32_t size, uint32_t *count)
Write 2 data blocks to the default I2C device in one operation Useful for devices that require a regi...
uint32_t STDCALL voltage_get_min_value(uint32_t voltageid)
Get the minimum voltage level of the specified device.
uint32_t STDCALL l2_cache_get_size(void)
Get the L2 cache size for this board.
uint32_t STDCALL i2c_write(uint16_t address, void *buffer, uint32_t size, uint32_t *count)
Write data to the default I2C device.
void STDCALL activity_led_enable(void)
Enable the Activity LED (Where Applicable).
void STDCALL invalidate_data_tlb(void)
Perform an Invalidate Data TLB operation (Where Applicable).
uint32_t STDCALL(* thread_yield_proc)(void)
Definition platform.h:281
uint32_t STDCALL virtual_gpio_output_set(uint32_t pin, uint32_t level)
Set the state of a virtual GPIO output pin.
uint32_t STDCALL counter_event(counter_event_cb callback, void *data)
Schedule a function to be called when the current interval expires on the default counter.
void STDCALL clean_data_cache_range(size_t address, uint32_t size)
Perform a Clean Data Cache Range operation (Where Applicable).
uint32_t STDCALL voltage_get_value(uint32_t voltageid)
Get the current voltage level of the specified device.
uint32_t STDCALL get_local_interrupt_entry(uint32_t cpuid, uint32_t number, uint32_t instance, INTERRUPT_ENTRY *interrupt)
Get the local interrupt entry for the specified interrupt number (Where Applicable).
void STDCALL invalidate_instruction_cache(void)
Perform an Invalidate Instruction Cache operation (Where Applicable).
void STDCALL gpio_write(uint32_t reg, uint32_t value)
Perform a direct write to a GPIO register.
HANDLE STDCALL module_get_handle(char *name)
uint32_t STDCALL turbo_set_state(uint32_t turboid, uint32_t state)
Set the Turbo state (0 equals Off / 1 equals On) of the specified device.
uint32_t STDCALL gpio_input_event(uint32_t pin, uint32_t trigger, uint32_t timeout, gpio_event_cb callback, void *data)
Schedule a function to be called when the state of a GPIO input pin changes.
size_t STDCALL memory_get_base(void)
Get the base address of system memory.
uint32_t ABORT_MASK
Definition platform.h:157
uint32_t FIQ_MASK
Definition platform.h:153
BOOL STDCALL counter_available(void)
Check if a counter is currently available.
uint32_t STDCALL framebuffer_get_depth(uint32_t *depth)
Get the Framebuffer Depth in Bits per Pixel.
uint32_t STDCALL i2c_start(uint32_t rate)
Start the default I2C device ready for reading and writing.
int64_t STDCALL clock_microseconds(void)
Get the number of clock microseconds since the system was started.
uint32_t STDCALL pwm_set_range(uint32_t range)
Set the range for the default PWM device.
void STDCALL enable_irq_fiq(void)
Enable Interrupts and Fast Interrupts (IRQ/FIQ) unconditionally.
void STDCALL disable_abort(void)
Disable Abort unconditionally.
BOOL STDCALL random_available(void)
Check if a hardware random number generator is currently available The software random number generat...
uint32_t STDCALL gpio_function_select(uint32_t pin, uint32_t mode)
Change the function of a GPIO pin.
uint32_t STDCALL gpio_pull_get(uint32_t pin)
Get the current pull state of a GPIO pin.
int posix_memalign(void **memptr, size_t alignment, size_t size)
size_t STDCALL page_directory_get_base(void)
Get the base address of the first level page directory (Where applicable).
int64_t STDCALL clock_milliseconds(void)
Get the number of clock milliseconds since the system was started.
uint32_t STDCALL(* shutdown_cb)(uint32_t flags, void *parameter)
Definition platform.h:224
uint32_t STDCALL firmware_get_throttled(void)
Get the current throttling state from the firmware.
uint32_t STDCALL clock_set_state(uint32_t clockid, uint32_t state)
Set the state of the specified Clock.
void STDCALL boot_console_write(const char *value)
Output text to the boot time console display (Where Applicable).
void STDCALL microsecond_delay(uint32_t microseconds)
Non sleep wait for a number of microseconds.
int dup3(int oldfd, int newfd, int flags)
uint32_t STDCALL framebuffer_get_display_settings(uint32_t displaynum, DISPLAY_SETTINGS *displaysettings)
Get the display settings for the specified display number (Where Applicable).
uint32_t STDCALL device_tree_get_size(void)
Get the total size of the Device Tree Blob (Where Applicable).
uint32_t STDCALL l1_cache_get_type(void)
Get the L1 cache type for this board.
uint32_t STDCALL(* thread_abandon_proc)(LIST_HANDLE list)
Definition platform.h:285
uint32_t STDCALL framebuffer_get_dimensions(uint32_t *width, uint32_t *height, uint32_t *top, uint32_t *bottom, uint32_t *left, uint32_t *right)
Get the default Dimensions of the Framebuffer (Physical Width, Height and Overscan Top,...
size_t STDCALL io_address_to_physical(void *address)
Convert an IO address to a Physical address (Where Applicable).
void STDCALL enable_abort(void)
Enable Abort unconditionally.
uint32_t STDCALL spi_get_clock_rate(uint16_t chipselect)
Get the clock rate of the default SPI device.
void STDCALL data_memory_barrier(void)
Perform a Data Memory Barrier operation (Where Applicable).
uint32_t STDCALL virtual_gpio_input_get(uint32_t pin)
Get the current state of a virtual GPIO input pin.
uint32_t STDCALL gpio_input_wait(uint32_t pin, uint32_t trigger, uint32_t timeout)
Wait for the state of a GPIO input pin to change.
uint32_t STDCALL board_get_model(void)
Get the current Board model.
uint32_t STDCALL request_ipi(uint32_t cpuid, uint32_t number, ipi_handler handler, void *parameter)
Request registration of the supplied handler to the specified IPI (Inter-processor interrupt) number ...
BOOL STDCALL pwm_available(void)
Check if a PWM device is available.
uint32_t STDCALL spi_write_read(uint16_t chipselect, void *source, void *dest, uint32_t size, uint32_t *count)
Write data to and Read data from the default SPI device in one operation Because SPI writes and then ...
void STDCALL read_memory_barrier(void)
Perform a Read Memory Barrier operation (Where Applicable).
uint32_t STDCALL framebuffer_test_pixel_order(uint32_t *order)
Test the Framebuffer Pixel Order (0 = BGR / 1 = RGB).
uint32_t STDCALL pwm_configure(uint32_t dutyns, uint32_t periodns)
Set the configuration of the default PWM device.
uint32_t STDCALL boot_console_get_x(void)
Get the current X position of the boot time console display (Where Applicable).
uint32_t STDCALL framebuffer_test_layer(int32_t *layer)
Test the Framebuffer Layer.
uint32_t STDCALL i2c_slave_get_description(uint32_t id, char *description, uint32_t len)
Get the device description of an I2C slave device.
uint32_t STDCALL cursor_set_state(BOOL enabled, uint32_t x, uint32_t y, BOOL relative)
Set the Cursor State (Enabled, X and Y).
uint32_t STDCALL system_deregister_shutdown(shutdown_cb callback, void *parameter)
Deregister a procedure from being called during system shutdown or restart.
Definition platform.h:162
uint32_t flags
Flags for DMA transfer (See DMA_DATA_FLAG_* above).
Definition platform.h:173
DMA_DATA * next
Link to next DMA data block (or nil for the last block).
Definition platform.h:179
uint32_t stridelength
Length of each row during 2D stride (If supported).
Definition platform.h:175
int32_t deststride
Increment between rows for destination address during 2D stride (If supported).
Definition platform.h:177
void * dest
Dest address for DMA (May need to be allocated in accordance with DMA host configuration).
Definition platform.h:168
void * source
Source address for DMA (May need to be allocated in accordance with DMA host configuration).
Definition platform.h:164
uint32_t size
Size for DMA transfer (For 2D stride the length of a row multiplied by the count of rows).
Definition platform.h:172
int32_t sourcestride
Increment between rows for source address during 2D stride (If supported).
Definition platform.h:176
Definition platform.h:204
HANDLE handle
Handle (Number) of this Handle.
Definition platform.h:207
uint32_t hash
Hash of the Handle name (Only if named).
Definition platform.h:212
HANDLE data
Purpose specific data for the Handle (eg a file handle or a socket handle).
Definition platform.h:213
char * name
The name of the Handle (Optional).
Definition platform.h:211
handle_close_proc close
Procedure to call on final close (Optional).
Definition platform.h:214
uint32_t flags
Flags for the Handle (eg HANDLE_FLAG_NAMED).
Definition platform.h:210
uint32_t count
Reference Count of the Handle.
Definition platform.h:209
HANDLE_ENTRY * prev
Previous entry in Handle table.
Definition platform.h:218
uint32_t signature
Signature for entry validation.
Definition platform.h:206
handle_duplicate_proc duplicate
Function to call when duplicating handle (Optional).
Definition platform.h:216
handle_close_ex_proc closeex
Function to call on final close (Optional).
Definition platform.h:215
HANDLE_ENTRY * next
Next entry in Handle table.
Definition platform.h:219
uint32_t handletype
Type of this Handle (eg HANDLE_TYPE_FILE).
Definition platform.h:208
Definition platform.h:234
uint32_t cpumask
Definition platform.h:238
INTERRUPT_ENTRY * prev
Definition platform.h:245
interrupt_handler handler
Definition platform.h:240
void * parameter
Definition platform.h:243
interrupt_ex_handler handlerex
Definition platform.h:241
uint32_t flags
Definition platform.h:237
uint32_t priority
Definition platform.h:239
INTERRUPT_ENTRY * next
Definition platform.h:246
shared_interrupt_handler sharedhandler
Definition platform.h:242
uint32_t number
Definition platform.h:236
Definition platform.h:262
size_t physicaladdress
Definition platform.h:267
uint32_t flags
Definition platform.h:269
uint32_t size
Definition platform.h:268
size_t virtualaddress
Definition platform.h:263
Definition platform.h:252
void STDCALL(* handler)(SYSTEM_CALL_REQUEST *request)
Definition platform.h:255
THREAD_HANDLE STDCALL(* handlerex)(uint32_t cpuid, THREAD_HANDLE thread, SYSTEM_CALL_REQUEST *request)
Definition platform.h:256
uint32_t number
Definition platform.h:253
uint32_t cpuid
Definition platform.h:254
Definition platform.h:185
size_t param1
Definition platform.h:187
size_t param3
Definition platform.h:189
uint32_t number
Definition platform.h:186
size_t param2
Definition platform.h:188