kern: update KAddressSpaceInfo to reflect 20.0.0 changes

This commit is contained in:
Michael Scire 2025-04-30 18:56:47 -07:00
parent 80268e8187
commit 0dfaf712c7
6 changed files with 40 additions and 16 deletions

View file

@ -141,7 +141,7 @@ namespace ams::kern {
/* Define helpers. */
auto GetSpaceStart = [&](KAddressSpaceInfo::Type type) ALWAYS_INLINE_LAMBDA {
return KAddressSpaceInfo::GetAddressSpaceStart(flags, type);
return KAddressSpaceInfo::GetAddressSpaceStart(flags, type, code_size);
};
auto GetSpaceSize = [&](KAddressSpaceInfo::Type type) ALWAYS_INLINE_LAMBDA {
return KAddressSpaceInfo::GetAddressSpaceSize(flags, type);
@ -155,12 +155,6 @@ namespace ams::kern {
size_t alias_region_size = GetSpaceSize(KAddressSpaceInfo::Type_Alias);
size_t heap_region_size = GetSpaceSize(KAddressSpaceInfo::Type_Heap);
/* Adjust heap/alias size if we don't have an alias region. */
if ((flags & ams::svc::CreateProcessFlag_AddressSpaceMask) == ams::svc::CreateProcessFlag_AddressSpace32BitWithoutAlias) {
heap_region_size += alias_region_size;
alias_region_size = 0;
}
/* Set code regions and determine remaining sizes. */
KProcessAddress process_code_start;
KProcessAddress process_code_end;