mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-17 08:34:23 -04:00
kern/os: support CreateProcessFlag_EnableAliasRegionExtraSize
This commit is contained in:
parent
25bae14064
commit
8aa62a54d8
10 changed files with 68 additions and 33 deletions
|
@ -162,6 +162,18 @@ namespace ams::kern::svc {
|
|||
/* Check that the number of extra resource pages is >= 0. */
|
||||
R_UNLESS(params.system_resource_num_pages >= 0, svc::ResultInvalidSize());
|
||||
|
||||
/* Validate that the alias region extra size is allowed, if enabled. */
|
||||
if (params.flags & ams::svc::CreateProcessFlag_EnableAliasRegionExtraSize) {
|
||||
/* Check that we have a 64-bit address space. */
|
||||
R_UNLESS((params.flags & ams::svc::CreateProcessFlag_AddressSpaceMask) == ams::svc::CreateProcessFlag_AddressSpace64Bit, svc::ResultInvalidState());
|
||||
|
||||
/* Check that the system resource page count is non-zero. */
|
||||
R_UNLESS(params.system_resource_num_pages > 0, svc::ResultInvalidState());
|
||||
|
||||
/* Check that debug mode is enabled. */
|
||||
R_UNLESS(KTargetSystem::IsDebugMode(), svc::ResultInvalidState());
|
||||
}
|
||||
|
||||
/* Convert to sizes. */
|
||||
const size_t code_num_pages = params.code_num_pages;
|
||||
const size_t system_resource_num_pages = params.system_resource_num_pages;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue