mirror of
https://github.com/danbulant/Cosmos
synced 2026-06-11 02:31:22 +00:00
22 lines
784 B
C#
22 lines
784 B
C#
namespace Cosmos.Core
|
|
{
|
|
internal static unsafe class GlobalSystemInfo
|
|
{
|
|
private static GlobalInformationTable* mGlobalInformationTable;
|
|
public static GlobalInformationTable* GlobalInformationTable
|
|
{
|
|
get
|
|
{
|
|
if (mGlobalInformationTable == null)
|
|
{
|
|
// todo: should we align this structure somehow?
|
|
|
|
var xEndOfKernel = CPU.GetEndOfKernel();
|
|
mGlobalInformationTable = (GlobalInformationTable*)xEndOfKernel;
|
|
mGlobalInformationTable->FirstDataLookupTable = (DataLookupTable*)(xEndOfKernel + sizeof(GlobalInformationTable));
|
|
}
|
|
return mGlobalInformationTable;
|
|
}
|
|
}
|
|
}
|
|
}
|