From e20827375d173baca809ad2ccbe04c45ca0112f4 Mon Sep 17 00:00:00 2001 From: Reiko Asakura Date: Tue, 19 Jan 2021 20:09:40 -0500 Subject: Remove dupe: sysmem related --- include/user/kernel/sysmem.h | 25 +--- include/user/kernel/sysmem/memblock.h | 233 +--------------------------------- 2 files changed, 4 insertions(+), 254 deletions(-) (limited to 'include/user') diff --git a/include/user/kernel/sysmem.h b/include/user/kernel/sysmem.h index 04e3ea2..dd156e1 100644 --- a/include/user/kernel/sysmem.h +++ b/include/user/kernel/sysmem.h @@ -1,18 +1,9 @@ #ifndef _PSP2_KERNEL_SYSMEM_H_ #define _PSP2_KERNEL_SYSMEM_H_ -#include +#include_next -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct SceKernelFreeMemorySizeInfo { - int size; //!< sizeof(SceKernelFreeMemorySizeInfo) - int size_user; //!< Free memory size for *_USER_RW memory - int size_cdram; //!< Free memory size for USER_CDRAM_RW memory - int size_phycont; //!< Free memory size for USER_MAIN_PHYCONT_*_RW memory -} SceKernelFreeMemorySizeInfo; +SCE_CDECL_BEGIN typedef enum SceKernelModel { SCE_KERNEL_MODEL_VITA = 0x10000, @@ -41,19 +32,9 @@ int sceKernelGetModelForCDialog(void); */ int sceKernelGetModel(void); -/** - * Get free memory size in bytes - * - * @param[out] info - Returned free memory size for different kind of memory block types - * @return 0 on success, < 0 on error. -*/ -int sceKernelGetFreeMemorySize(SceKernelFreeMemorySizeInfo *info); - int sceKernelIsPSVitaTV(void); -#ifdef __cplusplus -} -#endif +SCE_CDECL_END #endif diff --git a/include/user/kernel/sysmem/memblock.h b/include/user/kernel/sysmem/memblock.h index e422826..fd341e3 100644 --- a/include/user/kernel/sysmem/memblock.h +++ b/include/user/kernel/sysmem/memblock.h @@ -1,121 +1,23 @@ #ifndef _DOLCESDK_PSP2_KERNEL_SYSMEM_MEMBLOCK_H_ #define _DOLCESDK_PSP2_KERNEL_SYSMEM_MEMBLOCK_H_ -#include -#include +#include_next /** @name sceKernelAllocMemBlockで指定可能なメモリタイプ */ /*@{*/ -/** - * memory block type for read write cache allocated on LPDDR2 - */ -#define SCE_KERNEL_MEMBLOCK_TYPE_USER_RW 0x0c20d060U - -#define SCE_KERNEL_MEMBLOCK_TYPE_USER_RWDATA SCE_KERNEL_MEMBLOCK_TYPE_USER_RW - /** * memory block type for read execute cache allocated on LPDDR2 */ #define SCE_KERNEL_MEMBLOCK_TYPE_USER_RX 0x0c20d050U -/** - * memory block type for read write uncache allocated on LPDDR2 - */ -#define SCE_KERNEL_MEMBLOCK_TYPE_USER_NC_RW 0x0c208060U - -/** - * alias of SCE_KERNEL_MEMBLOCK_TYPE_USER_NC_RW - */ -#define SCE_KERNEL_MEMBLOCK_TYPE_USER_RW_UNCACHE SCE_KERNEL_MEMBLOCK_TYPE_USER_NC_RW - -/** - * alias of SCE_KERNEL_MEMBLOCK_TYPE_USER_NC_RW - */ -#define SCE_KERNEL_MEMBLOCK_TYPE_USER_RWDATA_UNCACHE SCE_KERNEL_MEMBLOCK_TYPE_USER_RW_UNCACHE - -/** - * memory block type for read write cache allocated on LPDDR2 physical continuous area - */ -#define SCE_KERNEL_MEMBLOCK_TYPE_USER_MAIN_PHYCONT_RW 0x0c80d060U - -/** - * memory block type for read write uncache allocated on LPDDR2 physical continuous area - */ -#define SCE_KERNEL_MEMBLOCK_TYPE_USER_MAIN_PHYCONT_NC_RW 0x0d808060U - -/** - * memory block type for read write uncache allocated on CDRAM - */ -#define SCE_KERNEL_MEMBLOCK_TYPE_USER_CDRAM_RW 0x09408060U - -#define SCE_KERNEL_MEMBLOCK_TYPE_USER_CDRAM_RWDATA SCE_KERNEL_MEMBLOCK_TYPE_USER_CDRAM_RW - /*@}*/ SCE_CDECL_BEGIN #if !defined(_LANGUAGE_ASSEMBLY) -typedef struct SceKernelAllocMemBlockOpt0940 { - SceSize size; - SceUInt32 attr; - SceSize alignment; - SceUID uidBaseBlock; - const char *strBaseBlockName; -} SceKernelAllocMemBlockOpt0940; - -/** - * Option parameter for sceKernelAllocMemBlock - */ - typedef struct SceKernelAllocMemBlockOpt { - /** - * size of this - */ - SceSize size; - - /** - * attributes field - */ - SceUInt32 attr; - - /** - * alignment option - * must set SCE_KERNEL_ALLOC_MEMBLOCK_ATTR_HAS_ALIGNMENT to 'attr' - */ - SceSize alignment; - - /** - * reserved - */ - SceUInt32 reserved; - - /** - * reserved2 - */ - const char *strBaseBlockName; - -#if 0 - /** - * mapped base address [out] - */ - void *mappedBase; - - /** - * mapped size [out] - */ - SceSize mappedSize; - - /** - * memory type [out] - */ - SceKernelMemoryType memoryType; - - SceUInt32 access; -#endif -} SceKernelAllocMemBlockOpt; - typedef struct SceKernelAllocMemBlockOptInternal { SceSize size; SceUInt32 attr; @@ -126,146 +28,13 @@ typedef struct SceKernelAllocMemBlockOptInternal { SceUInt32 reserved[10]; } SceKernelAllocMemBlockOptInternal; -/** - * Enable 'alignment' member - */ -#define SCE_KERNEL_ALLOC_MEMBLOCK_ATTR_HAS_ALIGNMENT 0x00000004U - -#define SCE_KERNEL_ALLOC_MEMBLOCK_ATTR_PHYCONT 0x00200000U - -/** - * Allocating memory block - * - * @param[in] name memory block name - * @param[in] vsize memory block virtual size - * @param[in] flags options - * @retval id UID of memory block - * @retval 0, API returns a memory block just fit range [start, start + size]. - * @param[in] vaddr base address - * @param[in] size address size - * @retval >=SCE_OK block id - * @retval