5 #ifndef __SYS_MEMORY_H__ 6 #define __SYS_MEMORY_H__ 11 #define SYS_MEMORY_PAGE_SIZE_1M 0x0000000000000400ULL 12 #define SYS_MEMORY_PAGE_SIZE_64K 0x0000000000000200ULL 14 #define SYS_MEMORY_ACCESS_RIGHT_PPU_THR 0x0000000000000008ULL 15 #define SYS_MEMORY_ACCESS_RIGHT_HANDLER 0x0000000000000004ULL 16 #define SYS_MEMORY_ACCESS_RIGHT_SPU_THR 0x0000000000000002ULL 17 #define SYS_MEMORY_ACCESS_RIGHT_RAW_SPU 0x0000000000000001ULL 18 #define SYS_MEMORY_ACCESS_RIGHT_ANY (SYS_MEMORY_ACCESS_RIGHT_PPU_THR | \ 19 SYS_MEMORY_ACCESS_RIGHT_HANDLER | \ 20 SYS_MEMORY_ACCESS_RIGHT_SPU_THR | \ 21 SYS_MEMORY_ACCESS_RIGHT_RAW_SPU) 22 #define SYS_MEMORY_ACCESS_RIGHT_NONE 0x00000000000000f0ULL 24 #define SYS_MEMORY_PROT_READ_ONLY 0x0000000000080000ULL 25 #define SYS_MEMORY_PROT_READ_WRITE 0x0000000000040000ULL 31 LV2_SYSCALL sysMemoryAllocate(
size_t size,u64 flags,sys_mem_addr_t *alloc_addr)
33 lv2syscall3(348,size,flags,(u64)alloc_addr);
34 return_to_user_prog(s32);
37 LV2_SYSCALL sysMemoryFree(sys_mem_addr_t start_addr)
39 lv2syscall1(349,start_addr);
40 return_to_user_prog(s32);
43 LV2_SYSCALL sysMMapperAllocateAddress(
size_t size,u64 flags,
size_t alignment,sys_mem_addr_t *alloc_addr)
45 lv2syscall4(330,size,flags,alignment,(u64)alloc_addr);
46 return_to_user_prog(s32);
49 LV2_SYSCALL sysMMapperFreeAddress(sys_mem_addr_t start_addr)
51 lv2syscall1(331,start_addr);
52 return_to_user_prog(s32);
55 LV2_SYSCALL sysMMapperSearchAndMap(sys_mem_addr_t start_addr,sys_mem_id_t mem_id,u64 flags,sys_mem_addr_t *alloc_addr)
57 lv2syscall4(337,start_addr,mem_id,flags,(u64)alloc_addr);
58 return_to_user_prog(s32);
61 LV2_SYSCALL sysMemContainerCreate(sys_mem_container_t *container,
size_t size)
63 lv2syscall2(324,(u64)container,size);
64 return_to_user_prog(s32);
67 LV2_SYSCALL sysMemContainerDestroy(sys_mem_container_t container)
69 lv2syscall1(325,container);
70 return_to_user_prog(s32);
73 LV2_SYSCALL sysMemAllocateFromContainer(
size_t size,sys_mem_container_t container,u64 flags,sys_mem_addr_t *alloc_addr)
75 lv2syscall4(350,size,container,flags,(u64)alloc_addr);
76 return_to_user_prog(s32);
Memory management functions.