Exemple #1
0
        public static unsafe void Init()
        {
            RuntimeMemory.SetupEarlyStartup();
            InitializAssembly();
            //Mosa.Runtime.StartUp.InitializeRuntimeMetadata();
            RuntimeMemory.SetupAllocator();

            ElfSections = *((ElfSections *)SysCalls.GetElfSectionsAddress());
            ElfSections.Init();
        }
Exemple #2
0
        private static void SetupOriginalKernelElf()
        {
            uint kernelElfHeaderAddr = Address.OriginalKernelElfSection;
            var  kernelElfHeader     = (ElfHeader *)kernelElfHeaderAddr;

            OriginalKernelElf = new ElfSections
            {
                PhyOffset                     = kernelElfHeaderAddr,
                SectionHeaderArray            = (ElfSectionHeader *)(kernelElfHeaderAddr + kernelElfHeader->ShOff),
                SectionHeaderCount            = kernelElfHeader->ShNum,
                StringTableSectionHeaderIndex = kernelElfHeader->ShStrNdx,
            };
            OriginalKernelElf.Init();
        }