wut  v1.5.0
Wii U Toolchain
codegen.h
Go to the documentation of this file.
1 #pragma once
2 #include <wut.h>
3 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
33 typedef enum OSCodegenSecMode
34 {
40 
55 void
56 OSCodegenGetVirtAddrRange(uint32_t* outVirtualAddress,
57  uint32_t* outSize);
58 
70 uint32_t
72 
73 uint32_t
75 
87 BOOL
89 
90 //TODO: online docs imply this returns true if codegen is *enabled*, though the
91 //name would imply it gets rw/rx status.
92 uint32_t
94 
121 BOOL
122 OSCodegenCopy(void* dst, void* src, size_t size);
123 
124 void
125 OSGetCodegenVirtAddrRange(void** outAddr, uint32_t* size);
126 
127 #ifdef __cplusplus
128 }
129 #endif
130 
BOOL OSCodegenCopy(void *dst, void *src, size_t size)
Copies data from normal memory into the codegen area, leaving the area in CODEGEN_R_X mode.
uint32_t OSGetSecCodeGenMode()
BOOL OSSwitchSecCodeGenMode(OSCodegenSecMode mode)
Switches the permissions on the codegen memory area.
OSCodegenSecMode
The memory permissions for the codegen area.
Definition: codegen.h:34
void OSCodegenGetVirtAddrRange(uint32_t *outVirtualAddress, uint32_t *outSize)
Gets the location and size of codegen memory, if available.
uint32_t OSGetCodegenCore()
Gets the CPU core that's allowed to use codegen.
uint32_t OSGetCodegenMode()
void OSGetCodegenVirtAddrRange(void **outAddr, uint32_t *size)
@ CODEGEN_RW_
The area can be read or written to, but not executed.
Definition: codegen.h:36
@ CODEGEN_R_X
The area can be read or executed, but not written to.
Definition: codegen.h:38
int32_t BOOL
Definition: wut_types.h:7