|
17 | 17 |
|
18 | 18 | #ifndef __PAL_INTERFACE_H__ |
19 | 19 | #define __PAL_INTERFACE_H__ |
20 | | - |
21 | 20 | #ifdef TARGET_BAREMETAL |
22 | 21 | #include <stdlib.h> |
23 | 22 | #include <stdint.h> |
| 23 | + #include <stdarg.h> |
24 | 24 | #include <stddef.h> |
25 | 25 | #include <stdbool.h> |
26 | 26 | #include "platform_override_fvp.h" |
| 27 | + #include "acs_interface.h" |
27 | 28 |
|
28 | 29 | typedef uint64_t addr_t; |
29 | 30 | typedef char char8_t; |
|
68 | 69 | #endif // TARGET_BAREMETAL |
69 | 70 |
|
70 | 71 | #ifdef TARGET_LINUX |
| 72 | + #include <linux/stdarg.h> |
| 73 | + #include <linux/stddef.h> |
| 74 | + #include <linux/types.h> |
| 75 | + #include <linux/slab.h> |
| 76 | + #include "acs_interface.h" |
71 | 77 |
|
72 | | - #include <linux/slab.h> |
73 | 78 | typedef char char8_t; |
74 | 79 | typedef long long int addr_t; |
75 | 80 |
|
|
90 | 95 | #endif //TARGET_LINUX |
91 | 96 |
|
92 | 97 | #ifdef TARGET_UEFI |
| 98 | + #include <stdarg.h> |
| 99 | + #include <stdbool.h> |
| 100 | + #include <stddef.h> |
93 | 101 | #include <Base.h> |
94 | 102 | #include "platform_override.h" |
| 103 | + #include "acs_interface.h" |
| 104 | + |
95 | 105 | typedef INT8 int8_t; |
96 | 106 | typedef INT16 int16_t; |
97 | 107 | typedef INT32 int32_t; |
|
109 | 119 | typedef CHAR8 char8_t; |
110 | 120 | typedef CHAR16 char16_t; |
111 | 121 |
|
112 | | - #if defined __STDC_VERSION__ && __STDC_VERSION__ > 201710L |
113 | | - /* bool is a keyword */ |
114 | | - #else |
115 | | - typedef BOOLEAN bool; |
| 122 | + /* Avoid redefining bool when the language or headers already provide it. */ |
| 123 | + #if !defined(__cplusplus) && \ |
| 124 | + !(defined(__STDC_VERSION__) && __STDC_VERSION__ > 201710L) && \ |
| 125 | + !defined(__bool_true_false_are_defined) |
| 126 | + typedef BOOLEAN bool; |
116 | 127 | #endif |
117 | 128 |
|
118 | 129 | #define MAX_SID 32 |
|
153 | 164 | int32_t pal_psci_get_conduit(void); |
154 | 165 | void pal_dump_dtb(void); |
155 | 166 | uint32_t pal_target_is_dt(void); |
156 | | - |
157 | | - |
158 | 167 | /** |
159 | 168 | @brief number of PEs discovered |
160 | 169 | **/ |
@@ -800,6 +809,7 @@ uint32_t pal_mem_set_wb_executable(void *addr, uint32_t size); |
800 | 809 | void pal_print(uint64_t data); |
801 | 810 | void pal_uart_print(int log, const char *fmt, ...); |
802 | 811 | void pal_print_raw(uint64_t addr, char8_t *string, uint64_t data); |
| 812 | +void pal_uart_putc(char c); |
803 | 813 | uint32_t pal_strncmp(char8_t *str1, char8_t *str2, uint32_t len); |
804 | 814 | void pal_mmu_add_mmap(void); |
805 | 815 | void *pal_mmu_get_mmap_list(void); |
@@ -1463,3 +1473,8 @@ void pal_pfdi_verify_regs(ARM_SMC_ARGS *ArmSmcArgs, int32_t Conduit, |
1463 | 1473 | uint64_t PreSmcRegs[REG_COUNT_X5_X17], |
1464 | 1474 | uint64_t PostSmcRegs[REG_COUNT_X5_X17]); |
1465 | 1475 | #endif |
| 1476 | + |
| 1477 | +#define LOG_BUFFER_SIZE 8192 |
| 1478 | +#ifndef static_assert |
| 1479 | +#define static_assert _Static_assert |
| 1480 | +#endif |
0 commit comments