coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
svc.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 /* TODO: Check if this is still correct */
4 
5 #ifndef PSP_VERSTAGE_SVC_H
6 #define PSP_VERSTAGE_SVC_H
7 
8 #include <bl_uapp/bl_syscall_public.h>
9 #include <types.h>
10 
11 #define SVC_CALL4(SVC_ID, R0, R1, R2, R3, Ret) \
12  __asm__ __volatile__ ( \
13  "mov r0, %[reg0]\n\t" \
14  "mov r1, %[reg1]\n\t" \
15  "mov r2, %[reg2]\n\t" \
16  "mov r3, %[reg3]\n\t" \
17  "svc %[id]\n\t" \
18  "mov %[result], r0\n\t" \
19  : [result] "=r" (Ret) /* output */ \
20  : [id] "i" (SVC_ID), [reg0] "r" (R0), [reg1] "r" (R1), [reg2] "r" (R2), \
21  [reg3] "r" (R3) /* input(s) */ \
22  : "r0", "r1", "r2", "r3", "memory", "cc" /* list of clobbered registers */)
23 
24 #define SVC_CALL3(SVC_ID, R0, R1, R2, Ret) \
25  __asm__ __volatile__ ( \
26  "mov r0, %[reg0]\n\t" \
27  "mov r1, %[reg1]\n\t" \
28  "mov r2, %[reg2]\n\t" \
29  "svc %[id]\n\t" \
30  "mov %[result], r0\n\t" \
31  : [result] "=r" (Ret) /* output */ \
32  : [id] "i" (SVC_ID), [reg0] "r" (R0), [reg1] "r" (R1), [reg2] "r" (R2) \
33  : "r0", "r1", "r2", "memory", "cc" /* list of clobbered registers */)
34 
35 #define SVC_CALL2(SVC_ID, R0, R1, Ret) \
36  __asm__ __volatile__ ( \
37  "mov r0, %[reg0]\n\t" \
38  "mov r1, %[reg1]\n\t" \
39  "svc %[id]\n\t" \
40  "mov %[result], r0\n\t" \
41  : [result] "=r" (Ret) /* output */ \
42  : [id] "i" (SVC_ID), [reg0] "r" (R0), [reg1] "r" (R1)/* input(s) */ \
43  : "r0", "r1", "memory", "cc" /* list of clobbered registers */)
44 
45 #define SVC_CALL1(SVC_ID, R0, Ret) \
46  __asm__ __volatile__ ( \
47  "mov r0, %[reg0]\n\t" \
48  "svc %[id]\n\t" \
49  "mov %[result], r0\n\t" \
50  : [result] "=r" (Ret) /* output */ \
51  : [id] "i" (SVC_ID), [reg0] "r" (R0) /* input(s) */ \
52  : "r0", "memory", "cc" /* list of clobbered registers */)
53 
54 #define SVC_CALL0(SVC_ID, Ret) \
55  __asm__ __volatile__ ( \
56  "svc %[id]\n\t" \
57  "mov %[result], r0\n\t" \
58  : [result] "=r" (Ret) /* output */ \
59  : [id] "I" (SVC_ID) /* input(s) */ \
60  : "memory", "cc" /* list of clobbered registers */)
61 
62 struct cmd_param_sha {
63  struct sha_generic_data *ptr_sha_op;
64  enum sha_operation_mode sha_mode;
65 };
66 
68  char *debug_buffer;
70 };
71 
77 };
78 
80  struct mod_exp_params *ptr_modexp;
81 };
82 
84  unsigned int *ptr_psp_dir_addr;
85 };
86 
88  struct spirom_info *ptr_spirom_info;
89 };
90 
92  unsigned int spirom_addr;
93  unsigned int size;
95 };
96 
99 };
100 
102  enum psp_timer_type timer_type;
104 };
105 
108 };
109 
111  enum reset_type reset_type;
112 };
113 
115  unsigned int *ptr_boot_mode;
116 };
117 
119  unsigned int address;
120  unsigned int size;
121 };
122 
124  enum fch_io_device io_device;
125  unsigned int arg1;
126  unsigned int arg2;
128 };
129 
131  enum fch_io_device io_device;
133 };
134 
139 };
140 
143 };
144 
145 #endif /* PSP_VERSTAGE_SVC_H */
reset_type
Definition: acpi_fm350gl.c:31
unsigned int uint32_t
Definition: stdint.h:14
unsigned long long uint64_t
Definition: stdint.h:17
uint32_t dst_addr
Definition: svc.h:137
uint32_t size
Definition: svc.h:138
uint32_t spi_offset
Definition: svc.h:136
unsigned int address
Definition: svc.h:119
uint32_t word0
Definition: svc.h:73
uint32_t word2
Definition: svc.h:75
uint32_t word3
Definition: svc.h:76
uint32_t word1
Definition: svc.h:74
uint32_t debug_buffer_len
Definition: svc.h:69
char * debug_buffer
Definition: svc.h:68
unsigned int * ptr_boot_mode
Definition: svc.h:115
unsigned int arg1
Definition: svc.h:125
unsigned int arg2
Definition: svc.h:126
void ** pptr_io_device_addr_axi
Definition: svc.h:127
enum fch_io_device io_device
Definition: svc.h:124
unsigned int size
Definition: svc.h:93
unsigned int spirom_addr
Definition: svc.h:92
void ** ppspirom_addr_axi
Definition: svc.h:94
struct mod_exp_params * ptr_modexp
Definition: svc.h:80
unsigned int * ptr_psp_dir_addr
Definition: svc.h:84
uint64_t * ptr_counter_value
Definition: svc.h:103
enum psp_timer_type timer_type
Definition: svc.h:102
enum reset_type reset_type
Definition: svc.h:111
struct sha_generic_data * ptr_sha_op
Definition: svc.h:63
enum sha_operation_mode sha_mode
Definition: svc.h:64
struct spirom_info * ptr_spirom_info
Definition: svc.h:88
enum fch_io_device io_device
Definition: svc.h:131
void * ptr_spirom_addr_axi
Definition: svc.h:98