Load NSOs using the correct pool partition
This commit is contained in:
parent
4c4f6c6702
commit
9343f8444d
1 changed files with 13 additions and 4 deletions
|
@ -63,11 +63,11 @@ namespace Ryujinx.HLE.HOS
|
||||||
0,
|
0,
|
||||||
0);
|
0);
|
||||||
|
|
||||||
MemoryRegion memRegion = kip.IsService
|
MemoryRegion memoryRegion = kip.IsService
|
||||||
? MemoryRegion.Service
|
? MemoryRegion.Service
|
||||||
: MemoryRegion.Application;
|
: MemoryRegion.Application;
|
||||||
|
|
||||||
KMemoryRegionManager region = system.MemoryRegions[(int)memRegion];
|
KMemoryRegionManager region = system.MemoryRegions[(int)memoryRegion];
|
||||||
|
|
||||||
KernelResult result = region.AllocatePages((ulong)codePagesCount, false, out KPageList pageList);
|
KernelResult result = region.AllocatePages((ulong)codePagesCount, false, out KPageList pageList);
|
||||||
|
|
||||||
|
@ -85,7 +85,7 @@ namespace Ryujinx.HLE.HOS
|
||||||
kip.Capabilities,
|
kip.Capabilities,
|
||||||
pageList,
|
pageList,
|
||||||
system.ResourceLimit,
|
system.ResourceLimit,
|
||||||
memRegion);
|
memoryRegion);
|
||||||
|
|
||||||
if (result != KernelResult.Success)
|
if (result != KernelResult.Success)
|
||||||
{
|
{
|
||||||
|
@ -203,11 +203,20 @@ namespace Ryujinx.HLE.HOS
|
||||||
|
|
||||||
KProcess process = new KProcess(system);
|
KProcess process = new KProcess(system);
|
||||||
|
|
||||||
|
MemoryRegion memoryRegion = (MemoryRegion)((metaData.Acid.Flags >> 2) & 0xf);
|
||||||
|
|
||||||
|
if (memoryRegion > MemoryRegion.NvServices)
|
||||||
|
{
|
||||||
|
Logger.PrintError(LogClass.Loader, $"Process initialization failed due to invalid ACID flags.");
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
result = process.Initialize(
|
result = process.Initialize(
|
||||||
creationInfo,
|
creationInfo,
|
||||||
metaData.Aci0.KernelAccessControl.Capabilities,
|
metaData.Aci0.KernelAccessControl.Capabilities,
|
||||||
resourceLimit,
|
resourceLimit,
|
||||||
MemoryRegion.Application);
|
memoryRegion);
|
||||||
|
|
||||||
if (result != KernelResult.Success)
|
if (result != KernelResult.Success)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue