1 /* SPDX-License-Identifier: LGPL-2.1-or-later */
3 * Copyright (C) 2022 Paul Cercueil <paul@crapouillou.net>
6 #ifndef __LIGHTREC_MEM_H__
7 #define __LIGHTREC_MEM_H__
11 #ifdef HW_WUP /* WiiU */
12 # define WUP_RWX_MEM_BASE 0x00802000
13 # define WUP_RWX_MEM_END 0x01000000
14 # define CODE_BUFFER_SIZE (WUP_RWX_MEM_END - WUP_RWX_MEM_BASE)
16 # define CODE_BUFFER_SIZE (8 * 1024 * 1024)
19 extern void *code_buffer;
21 int lightrec_init_mmap(void);
22 void lightrec_free_mmap(void);
24 #else /* if !LIGHTREC */
26 #define lightrec_init_mmap() -1 /* should not be called */
27 #define lightrec_free_mmap()
29 #undef LIGHTREC_CUSTOM_MAP
30 #define LIGHTREC_CUSTOM_MAP 0
34 #endif /* __LIGHTREC_MEM_H__ */