mirror of
https://git.ryujinx.app/projects/Kenji-NX.git
synced 2026-09-24 16:00:07 +02:00
Revert Android changes
* "Android: NCE support" - Commitcd3221ab* "Android: Numerous fixes" - Commit19dd23c2* "Android: Memory specific switches" - Commit98b4ff33* "Android: Remove unmanaged code" - Commit846b5b6e
This commit is contained in:
@@ -7,7 +7,6 @@ namespace Ryujinx.HLE.HOS.Kernel.Process
|
||||
interface IProcessContext : IDisposable
|
||||
{
|
||||
IVirtualMemoryManager AddressSpace { get; }
|
||||
ulong ReservedSize { get; }
|
||||
|
||||
ulong AddressSpaceSize { get; }
|
||||
|
||||
|
||||
@@ -141,7 +141,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Process
|
||||
|
||||
InitializeMemoryManager(creationInfo.Flags);
|
||||
|
||||
ulong codeAddress = creationInfo.CodeAddress + Context.ReservedSize;
|
||||
ulong codeAddress = creationInfo.CodeAddress;
|
||||
|
||||
ulong codeSize = (ulong)creationInfo.CodePagesCount * KPageTableBase.PageSize;
|
||||
|
||||
@@ -155,7 +155,6 @@ namespace Ryujinx.HLE.HOS.Kernel.Process
|
||||
memRegion,
|
||||
codeAddress,
|
||||
codeSize,
|
||||
Context.ReservedSize,
|
||||
slabManager);
|
||||
|
||||
if (result != Result.Success)
|
||||
@@ -191,8 +190,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Process
|
||||
KResourceLimit resourceLimit,
|
||||
MemoryRegion memRegion,
|
||||
IProcessContextFactory contextFactory,
|
||||
ThreadStart customThreadStart = null,
|
||||
ulong entrypointOffset = 0UL)
|
||||
ThreadStart customThreadStart = null)
|
||||
{
|
||||
ResourceLimit = resourceLimit;
|
||||
_memRegion = memRegion;
|
||||
@@ -246,7 +244,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Process
|
||||
|
||||
InitializeMemoryManager(creationInfo.Flags);
|
||||
|
||||
ulong codeAddress = creationInfo.CodeAddress + Context.ReservedSize;
|
||||
ulong codeAddress = creationInfo.CodeAddress;
|
||||
|
||||
ulong codeSize = codePagesCount * KPageTableBase.PageSize;
|
||||
|
||||
@@ -256,7 +254,6 @@ namespace Ryujinx.HLE.HOS.Kernel.Process
|
||||
memRegion,
|
||||
codeAddress,
|
||||
codeSize,
|
||||
Context.ReservedSize,
|
||||
slabManager);
|
||||
|
||||
if (result != Result.Success)
|
||||
@@ -302,8 +299,6 @@ namespace Ryujinx.HLE.HOS.Kernel.Process
|
||||
CleanUpForError();
|
||||
}
|
||||
|
||||
_entrypoint += entrypointOffset;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -348,12 +343,10 @@ namespace Ryujinx.HLE.HOS.Kernel.Process
|
||||
|
||||
Flags = creationInfo.Flags;
|
||||
TitleId = creationInfo.TitleId;
|
||||
_entrypoint = creationInfo.CodeAddress + Context.ReservedSize;
|
||||
_entrypoint = creationInfo.CodeAddress;
|
||||
_imageSize = (ulong)creationInfo.CodePagesCount * KPageTableBase.PageSize;
|
||||
|
||||
// 19.0.0+ sets all regions to same size
|
||||
_memoryUsageCapacity = MemoryManager.HeapRegionEnd - MemoryManager.HeapRegionStart;
|
||||
/*switch (Flags & ProcessCreationFlags.AddressSpaceMask)
|
||||
switch (Flags & ProcessCreationFlags.AddressSpaceMask)
|
||||
{
|
||||
case ProcessCreationFlags.AddressSpace32Bit:
|
||||
case ProcessCreationFlags.AddressSpace64BitDeprecated:
|
||||
@@ -370,7 +363,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Process
|
||||
break;
|
||||
default:
|
||||
throw new InvalidOperationException($"Invalid MMU flags value 0x{Flags:x2}.");
|
||||
}*/
|
||||
}
|
||||
|
||||
GenerateRandomEntropy();
|
||||
|
||||
@@ -548,7 +541,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Process
|
||||
{
|
||||
throw new InvalidOperationException("Trying to start a process with an invalid state!");
|
||||
}
|
||||
// TODO: after 19.0.0+ alignment is not needed
|
||||
|
||||
ulong stackSizeRounded = BitUtils.AlignUp<ulong>(stackSize, KPageTableBase.PageSize);
|
||||
|
||||
ulong neededSize = stackSizeRounded + _imageSize;
|
||||
|
||||
@@ -7,7 +7,6 @@ namespace Ryujinx.HLE.HOS.Kernel.Process
|
||||
class ProcessContext : IProcessContext
|
||||
{
|
||||
public IVirtualMemoryManager AddressSpace { get; }
|
||||
public ulong ReservedSize => 0UL;
|
||||
|
||||
public ulong AddressSpaceSize { get; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user