From 697b5fed7059ab730cccf4c2e96bee5e71acf964 Mon Sep 17 00:00:00 2001 From: red-prig Date: Mon, 19 Dec 2022 20:28:44 +0300 Subject: [PATCH] Fix, Take into account deprecated memory types --- kernel/ps4_map_mm.pas | 4 +--- rtl/mmap.pas | 11 +++++++++++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/kernel/ps4_map_mm.pas b/kernel/ps4_map_mm.pas index 2833a299..239077de 100644 --- a/kernel/ps4_map_mm.pas +++ b/kernel/ps4_map_mm.pas @@ -401,9 +401,7 @@ end; function _test_mtype(mtype:Integer):Boolean; inline; begin Case mtype of - SCE_KERNEL_WB_ONION , - SCE_KERNEL_WC_GARLIC, - SCE_KERNEL_WB_GARLIC:Result:=True; + SCE_KERNEL_WB_ONION..SCE_KERNEL_WB_GARLIC:Result:=True; else Result:=False; end; diff --git a/rtl/mmap.pas b/rtl/mmap.pas index 811932fe..7ecb2e5d 100644 --- a/rtl/mmap.pas +++ b/rtl/mmap.pas @@ -30,6 +30,17 @@ const SCE_KERNEL_WC_GARLIC = 3; SCE_KERNEL_WB_GARLIC =10; + //deprecated + SCE_KERNEL_WB_ONION_NONVOLATILE = 1; + SCE_KERNEL_WC_GARLIC_VOLATILE = 2; + SCE_KERNEL_WC_GARLIC_NONVOLATILE = 3; + SCE_KERNEL_WT_ONION_VOLATILE = 4; + SCE_KERNEL_WT_ONION_NONVOLATILE = 5; + SCE_KERNEL_WP_ONION_VOLATILE = 6; + SCE_KERNEL_WP_ONION_NONVOLATILE = 7; + SCE_KERNEL_UC_GARLIC_VOLATILE = 8; + SCE_KERNEL_UC_GARLIC_NONVOLATILE = 9; + //mmap PROT_NONE =$00; // no permissions PROT_READ =$01; // pages can be read