mirror of
https://github.com/ryujinx-mirror/ryujinx.git
synced 2024-11-25 00:40:13 +01:00
kernel: Add support for CFI (#2839)
Add basic support for the CFI value being passed in X18 since 11.0.0 by the official kernel. We do not implement any random generator atm in the kernel and as such the KSystemControl.GenerateRandom function is stubbed
This commit is contained in:
parent
3dcee8c437
commit
786fb04d20
@ -58,6 +58,12 @@ namespace Ryujinx.HLE.HOS.Kernel.Common
|
|||||||
return DramMemoryMap.DramBase + GetDramSize(size);
|
return DramMemoryMap.DramBase + GetDramSize(size);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static ulong GenerateRandom()
|
||||||
|
{
|
||||||
|
// TODO
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
public static ulong GetDramSize(MemorySize size)
|
public static ulong GetDramSize(MemorySize size)
|
||||||
{
|
{
|
||||||
return size switch
|
return size switch
|
||||||
|
@ -187,6 +187,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Threading
|
|||||||
|
|
||||||
if (is64Bits)
|
if (is64Bits)
|
||||||
{
|
{
|
||||||
|
Context.SetX(18, KSystemControl.GenerateRandom() | 1);
|
||||||
Context.SetX(31, stackTop);
|
Context.SetX(31, stackTop);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user