From 07c35bb2e8462b45feddcc98f3a512eee29c69b3 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Tue, 11 Jun 2024 09:55:01 +0200 Subject: MHR-23: copyright change. Signed-off-by: Amlal El Mahrouss --- Boot/Sources/Root/SplashScreen.fmt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Boot/Sources/Root') diff --git a/Boot/Sources/Root/SplashScreen.fmt b/Boot/Sources/Root/SplashScreen.fmt index 42005568..57a5bf96 100644 --- a/Boot/Sources/Root/SplashScreen.fmt +++ b/Boot/Sources/Root/SplashScreen.fmt @@ -3,5 +3,5 @@ Welcome to NeWS. Brought to you by: Amlal EL Mahrouss. * newosldr, newoskrnl: Amlal EL Mahrouss. This copy can boot directly to newoskrnl (Unified System). -Copyright SoftwareLabs, all rights reserved. +Copyright Zeta Electronics Corporation, all rights reserved. ================================================================== -- cgit v1.2.3 From 4b58295fb04c2430817301352fadce33178f94d4 Mon Sep 17 00:00:00 2001 From: Amlal EL Mahrouss Date: Wed, 12 Jun 2024 18:09:07 +0200 Subject: MHR-30: initial commit. Signed-off-by: Amlal EL Mahrouss --- Boot/Sources/HEL/AMD64/BootMain.cxx | 2 +- Boot/Sources/Root/SplashScreen.fmt | 4 +- Boot/makefile | 6 +- .../HALKit/AMD64/HalCoreMultiProcessingAMD64.cpp | 55 +++-- Kernel/HALKit/AMD64/HalSMPCoreManager.asm | 42 ++++ Kernel/HALKit/POWER/ppc-cpu.h | 2 +- Kernel/Sources/AppMain.cxx | 225 -------------------- Kernel/Sources/KeMain.cxx | 228 +++++++++++++++++++++ Kernel/Sources/ProcessScheduler.cxx | 3 - Kernel/Sources/SMPManager.cxx | 15 ++ 10 files changed, 332 insertions(+), 250 deletions(-) delete mode 100644 Kernel/Sources/AppMain.cxx create mode 100644 Kernel/Sources/KeMain.cxx (limited to 'Boot/Sources/Root') diff --git a/Boot/Sources/HEL/AMD64/BootMain.cxx b/Boot/Sources/HEL/AMD64/BootMain.cxx index feb05422..5ab7914a 100644 --- a/Boot/Sources/HEL/AMD64/BootMain.cxx +++ b/Boot/Sources/HEL/AMD64/BootMain.cxx @@ -19,7 +19,7 @@ /// make the compiler shut up. #ifndef kMachineModel -#define kMachineModel "NeWS HD" +#define kMachineModel "Zeta HD" #endif // !kMachineModel #ifndef cExpectedWidth diff --git a/Boot/Sources/Root/SplashScreen.fmt b/Boot/Sources/Root/SplashScreen.fmt index 57a5bf96..d7b03f8f 100644 --- a/Boot/Sources/Root/SplashScreen.fmt +++ b/Boot/Sources/Root/SplashScreen.fmt @@ -1,7 +1,7 @@ ================================================================== -Welcome to NeWS. +Welcome to RTKM1. Brought to you by: Amlal EL Mahrouss. * newosldr, newoskrnl: Amlal EL Mahrouss. -This copy can boot directly to newoskrnl (Unified System). +This copy can boot directly to newoskrnl (RTKM1). Copyright Zeta Electronics Corporation, all rights reserved. ================================================================== diff --git a/Boot/makefile b/Boot/makefile index 0c4f5854..e54b1aa8 100644 --- a/Boot/makefile +++ b/Boot/makefile @@ -19,14 +19,14 @@ EMU=qemu-system-x86_64w endif ifeq ($(NEWS_MODEL), ) -NEWOS_MODEL=-DkMachineModel="\"Generic NeWS HD\"" +NEWOS_MODEL=-DkMachineModel="\"Generic Zeta HD\"" endif BIOS=OVMF.fd IMG=epm.img IMG_2=epm-slave.img -EMU_FLAGS=-net none -smp 4 -serial stdio -m 4G -M q35 \ +EMU_FLAGS=-net none -smp 4 -m 4G -M q35 \ -bios $(BIOS) -device piix3-ide,id=ide \ -drive id=disk,file=$(IMG),format=raw,if=none \ -device ide-hd,drive=disk,bus=ide.0 -drive \ @@ -81,7 +81,7 @@ compile-amd64: run-efi-amd64: $(EMU) $(EMU_FLAGS) -# img_2 is the rescue disk. img is the bootable disk, as provided by the NeWS. +# img_2 is the rescue disk. img is the bootable disk, as provided by the Zeta. .PHONY: epm-img epm-img: qemu-img create -f raw $(IMG) 10G diff --git a/Kernel/HALKit/AMD64/HalCoreMultiProcessingAMD64.cpp b/Kernel/HALKit/AMD64/HalCoreMultiProcessingAMD64.cpp index 2824b176..a395305c 100644 --- a/Kernel/HALKit/AMD64/HalCoreMultiProcessingAMD64.cpp +++ b/Kernel/HALKit/AMD64/HalCoreMultiProcessingAMD64.cpp @@ -8,13 +8,21 @@ #include #include #include +#include +#include #define kAPIC_ICR_Low 0x300 #define kAPIC_ICR_High 0x310 #define kAPIC_SIPI_Vector 0x00500 #define kAPIC_EIPI_Vector 0x00400 -EXTERN_C void AppMain(); +/// @brief This symbol is the kernel main symbol. +EXTERN_C void KeMain(); + +/// @brief assembly routine. internal use only. +EXTERN_C void _hal_enable_smp(void); + +/// @note: _hal_switch_context /////////////////////////////////////////////////////////////////////////////////////// @@ -104,6 +112,8 @@ namespace NewOS::HAL UIntPtr Address; }; + STATIC Void hal_switch_context(HAL::StackFramePtr stackFrame); + /////////////////////////////////////////////////////////////////////////////////////// STATIC MadtType* kApicInfoBlock = nullptr; @@ -145,8 +155,7 @@ namespace NewOS::HAL NewOS::ke_dma_write(targetAddress, kAPIC_ICR_Low, kAPIC_EIPI_Vector | vector); } - /// @brief assembly routine. internal use only. - EXTERN_C Void _hal_enable_smp(Void); + STATIC HAL::StackFramePtr cFramePtr = nullptr; EXTERN_C Void hal_apic_acknowledge_cont(Void) { @@ -157,30 +166,46 @@ namespace NewOS::HAL { *cProgramInitialized = false; - AppMain(); - - while (true) - { + kcout << "newoskrnl: putting thread to sleep...\r"; - } + _hal_spin_core(); } else { - kcout << "newoskrnl: putting thread to sleep...\r"; - - AppMain(); + KeMain(); - while (true) - { - } + _hal_spin_core(); } } + EXTERN_C StackFramePtr _hal_leak_current_context(Void) { return cFramePtr; } + EXTERN_C Void hal_apic_acknowledge(Void) { hal_apic_acknowledge_cont(); } + EXTERN_C Void _hal_switch_context(HAL::StackFramePtr stackFrame) + { + hal_switch_context(stackFrame); + } + + STATIC Void hal_switch_context(HAL::StackFramePtr stackFrame) + { + /// TODO: + Semaphore sem; + while (sem.IsLocked()) {} + + sem.Lock(&ProcessScheduler::The().Leak().GetCurrent().Leak()); + + cFramePtr = stackFrame; + + /// yes the exception field contains the core id. + hal_send_start_ipi(stackFrame->Exception, 0x40, cBaseAddressAPIC); + + sem.Unlock(); + } + Void hal_system_get_cores(voidPtr rsdPtr) { auto acpi = ACPIFactoryInterface(rsdPtr); @@ -194,7 +219,7 @@ namespace NewOS::HAL for (SizeT i = 2; i < cMaxProbableCores; ++i) { - if (madt->MadtRecords[i].Flags == 0x01) // if local apic. + if (madt->MadtRecords[i].Flags == kThreadLAPIC) // if local apic. { MadtType::MadtAddress& madtRecord = madt->MadtRecords[i]; // then register as a core for scheduler. diff --git a/Kernel/HALKit/AMD64/HalSMPCoreManager.asm b/Kernel/HALKit/AMD64/HalSMPCoreManager.asm index 5ecc2370..c4042b50 100644 --- a/Kernel/HALKit/AMD64/HalSMPCoreManager.asm +++ b/Kernel/HALKit/AMD64/HalSMPCoreManager.asm @@ -13,6 +13,8 @@ [global rt_do_context_switch] [global _hal_enable_smp] [global _hal_spin_core] +[extern _hal_switch_context] +[extern _hal_leak_current_context] section .text @@ -20,10 +22,50 @@ section .text ;; rcx: Stack Pointer ;; rdx: SMP core address. rt_do_context_switch: + push rax + push rcx + push rdx + push rbx + push rbp + push rsi + push rdi + push r8 + push r9 + push r10 + push r11 + push r12 + push r13 + push r14 + push r15 + + jmp _hal_switch_context + + pop r15 + pop r14 + pop r13 + pop r12 + pop r11 + pop r10 + pop r9 + pop r8 + pop rdi + pop rsi + pop rbp + pop rbx + pop rdx + pop rcx + pop rax + + mov eax, 0 + retfq ;; gets the current stack frame. rt_get_current_context: + push rdx + jmp _hal_leak_current_context + mov rdx, rax + pop rdx retfq ;; @brief enables a smp core to run. diff --git a/Kernel/HALKit/POWER/ppc-cpu.h b/Kernel/HALKit/POWER/ppc-cpu.h index b7a96767..3855b85c 100644 --- a/Kernel/HALKit/POWER/ppc-cpu.h +++ b/Kernel/HALKit/POWER/ppc-cpu.h @@ -1,7 +1,7 @@ #ifndef __ASM_PPC_PROCESSOR_H #define __ASM_PPC_PROCESSOR_H -/// ! @note The NeWS cpu is based on the e500 with 64-bit extensions, much like the 970. +/// ! @note The Zeta cpu is based on the e500 with 64-bit extensions, much like the 970. /* * Default implementation of macro that returns current diff --git a/Kernel/Sources/AppMain.cxx b/Kernel/Sources/AppMain.cxx deleted file mode 100644 index 55b7f403..00000000 --- a/Kernel/Sources/AppMain.cxx +++ /dev/null @@ -1,225 +0,0 @@ -/* ------------------------------------------- - - Copyright Zeta Electronics Corporation - - File: AppMain.cxx - Purpose: Kernel main loop. - -------------------------------------------- */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace NewOS::Detail -{ - /// @brief Filesystem auto mounter, additional checks are also done by the - /// class. - class FilesystemWizard final - { - NewOS::NewFilesystemManager* fNewFS{nullptr}; - - public: - explicit FilesystemWizard() - { - if (NewOS::FilesystemManagerInterface::GetMounted()) - { - /// Mounted partition, cool! - NewOS::kcout - << "New OS: No need to create for a NewFS partition here...\r"; - } - else - { - /// Not mounted partition, auto-mount. - ///! Mounts a NewFS block. - fNewFS = new NewOS::NewFilesystemManager(); - - NewOS::FilesystemManagerInterface::Mount(fNewFS); - - if (fNewFS->GetParser()) - { - constexpr auto cFolderInfo = "Metadata"; - const auto cDirCount = 8; - const char* cDirStr[cDirCount] = { - "/Boot/", "/System/", "/Support/", "/Applications/", - "/Users/", "/Library/", "/Mount/", "/Assistants/"}; - - for (NewOS::SizeT dirIndx = 0UL; dirIndx < cDirCount; ++dirIndx) - { - auto catalogDir = fNewFS->GetParser()->GetCatalog(cDirStr[dirIndx]); - - if (catalogDir) - { - delete catalogDir; - continue; - } - - catalogDir = fNewFS->GetParser()->CreateCatalog(cDirStr[dirIndx], 0, - kNewFSCatalogKindDir); - - NewFork theFork{0}; - - const NewOS::Char* cSrcName = cFolderInfo; - - NewOS::rt_copy_memory((NewOS::VoidPtr)(cSrcName), theFork.ForkName, - NewOS::rt_string_len(cSrcName)); - - NewOS::rt_copy_memory((NewOS::VoidPtr)(catalogDir->Name), - theFork.CatalogName, - NewOS::rt_string_len(catalogDir->Name)); - - delete catalogDir; - - theFork.DataSize = kNewFSForkSize; - theFork.ResourceId = 0; - theFork.ResourceKind = NewOS::kNewFSRsrcForkKind; - theFork.Kind = NewOS::kNewFSDataForkKind; - - NewOS::StringView metadataFolder(kNewFSSectorSz); - - metadataFolder += - "

Kind: folder

\r

Created by: system

\r

Edited by: " - "system

\r

Volume Type: New OS Standard

\r"; - - metadataFolder += "

File name: "; - metadataFolder += cDirStr[dirIndx]; - metadataFolder += "

\r"; - - const NewOS::SizeT metadataSz = kNewFSSectorSz; - - auto catalogSystem = fNewFS->GetParser()->GetCatalog(cDirStr[dirIndx]); - - fNewFS->GetParser()->CreateFork(catalogSystem, theFork); - - fNewFS->GetParser()->WriteCatalog( - catalogSystem, (NewOS::VoidPtr)(metadataFolder.CData()), - metadataSz, cFolderInfo); - - delete catalogSystem; - } - } - - NewCatalog* catalogDisk = - this->fNewFS->GetParser()->GetCatalog("/Mount/This Disk"); - - const NewOS::Char* cSrcName = "DiskInfo"; - - if (catalogDisk) - { - auto bufferInfoDisk = (NewOS::Char*)this->fNewFS->GetParser()->ReadCatalog(catalogDisk, kNewFSSectorSz, cSrcName); - NewOS::kcout << bufferInfoDisk << NewOS::end_line(); - - delete bufferInfoDisk; - delete catalogDisk; - } - else - { - catalogDisk = - (NewCatalog*)this->Leak()->CreateAlias("/Mount/This Disk"); - - NewOS::StringView diskFolder(kNewFSSectorSz); - - diskFolder += - "

Kind: alias to disk

\r

Created by: system

\r

Edited " - "by: " - "system

\r

Volume Type: New OS Standard

\r"; - - diskFolder += "

Original Path: "; - diskFolder += NewOS::NewFilesystemHelper::Root(); - diskFolder += "

\r"; - - NewFork theDiskFork{0}; - - NewOS::rt_copy_memory((NewOS::VoidPtr)(cSrcName), theDiskFork.ForkName, - NewOS::rt_string_len(cSrcName)); - - NewOS::rt_copy_memory((NewOS::VoidPtr)(catalogDisk->Name), - theDiskFork.CatalogName, - NewOS::rt_string_len(catalogDisk->Name)); - - theDiskFork.DataSize = kNewFSForkSize; - theDiskFork.ResourceId = 0; - theDiskFork.ResourceKind = NewOS::kNewFSRsrcForkKind; - theDiskFork.Kind = NewOS::kNewFSDataForkKind; - - fNewFS->GetParser()->CreateFork(catalogDisk, theDiskFork); - fNewFS->GetParser()->WriteCatalog(catalogDisk, - (NewOS::VoidPtr)diskFolder.CData(), - kNewFSSectorSz, cSrcName); - - delete catalogDisk; - } - } - } - - ~FilesystemWizard() - { - delete fNewFS; - } - - NEWOS_COPY_DEFAULT(FilesystemWizard); - - /// Grab the disk's NewFS reference. - NewOS::NewFilesystemManager* Leak() - { - return fNewFS; - } - }; - - /// @brief System loader entrypoint. - /// @param void no parameters. - /// @return void no return value. - STATIC NewOS::Void AppSystem(NewOS::Void) - { - NewOS::PEFLoader wndServer("/System/WindowServer"); - - if (!wndServer.IsLoaded()) - { - NewOS::ke_stop(RUNTIME_CHECK_FAILED); - } - - NewOS::Utils::execute_from_image(wndServer, - NewOS::ProcessHeader::kAppKind); - - NewOS::PEFLoader launchServer("/System/Launcher"); - - if (!launchServer.IsLoaded()) - { - NewOS::ke_stop(RUNTIME_CHECK_FAILED); - } - - NewOS::Utils::execute_from_image(launchServer, - NewOS::ProcessHeader::kAppKind); - - NewOS::kcout << "System: done, sleeping..."; - - while (true) {} - } -} // namespace NewOS::Detail - -/// @brief Application entrypoint. -/// @param Void -/// @return Void -EXTERN_C NewOS::Void AppMain(NewOS::Void) -{ - /// Now run kernel loop, until no process are running. - NewOS::Detail::FilesystemWizard wizard; // automatic. - - auto cLoaderName = "System"; - NewOS::execute_from_image(NewOS::Detail::AppSystem, cLoaderName); - - while (NewOS::ProcessScheduler::The().Leak().Run() > 0) {} -} diff --git a/Kernel/Sources/KeMain.cxx b/Kernel/Sources/KeMain.cxx new file mode 100644 index 00000000..f4f9f44c --- /dev/null +++ b/Kernel/Sources/KeMain.cxx @@ -0,0 +1,228 @@ +/* ------------------------------------------- + + Copyright Zeta Electronics Corporation + + File: KeMain.cxx + Purpose: Kernel main loop. + +------------------------------------------- */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NewOS::Detail +{ + /// @brief Filesystem auto mounter, additional checks are also done by the + /// class. + class FilesystemWizard final + { + NewOS::NewFilesystemManager* fNewFS{nullptr}; + + public: + explicit FilesystemWizard() + { + if (NewOS::FilesystemManagerInterface::GetMounted()) + { + /// Mounted partition, cool! + NewOS::kcout + << "New OS: No need to create for a NewFS partition here...\r"; + } + else + { + /// Not mounted partition, auto-mount. + ///! Mounts a NewFS block. + fNewFS = new NewOS::NewFilesystemManager(); + + NewOS::FilesystemManagerInterface::Mount(fNewFS); + + if (fNewFS->GetParser()) + { + constexpr auto cFolderInfo = "Metadata"; + const auto cDirCount = 8; + const char* cDirStr[cDirCount] = { + "/Boot/", "/System/", "/Support/", "/Applications/", + "/Users/", "/Library/", "/Mount/", "/Assistants/"}; + + for (NewOS::SizeT dirIndx = 0UL; dirIndx < cDirCount; ++dirIndx) + { + auto catalogDir = fNewFS->GetParser()->GetCatalog(cDirStr[dirIndx]); + + if (catalogDir) + { + delete catalogDir; + continue; + } + + catalogDir = fNewFS->GetParser()->CreateCatalog(cDirStr[dirIndx], 0, + kNewFSCatalogKindDir); + + NewFork theFork{0}; + + const NewOS::Char* cSrcName = cFolderInfo; + + NewOS::rt_copy_memory((NewOS::VoidPtr)(cSrcName), theFork.ForkName, + NewOS::rt_string_len(cSrcName)); + + NewOS::rt_copy_memory((NewOS::VoidPtr)(catalogDir->Name), + theFork.CatalogName, + NewOS::rt_string_len(catalogDir->Name)); + + delete catalogDir; + + theFork.DataSize = kNewFSForkSize; + theFork.ResourceId = 0; + theFork.ResourceKind = NewOS::kNewFSRsrcForkKind; + theFork.Kind = NewOS::kNewFSDataForkKind; + + NewOS::StringView metadataFolder(kNewFSSectorSz); + + metadataFolder += + "

Kind: folder

\r

Created by: system

\r

Edited by: " + "system

\r

Volume Type: New OS Standard

\r"; + + metadataFolder += "

File name: "; + metadataFolder += cDirStr[dirIndx]; + metadataFolder += "

\r"; + + const NewOS::SizeT metadataSz = kNewFSSectorSz; + + auto catalogSystem = fNewFS->GetParser()->GetCatalog(cDirStr[dirIndx]); + + fNewFS->GetParser()->CreateFork(catalogSystem, theFork); + + fNewFS->GetParser()->WriteCatalog( + catalogSystem, (NewOS::VoidPtr)(metadataFolder.CData()), + metadataSz, cFolderInfo); + + delete catalogSystem; + } + } + + NewCatalog* catalogDisk = + this->fNewFS->GetParser()->GetCatalog("/Mount/This Disk"); + + const NewOS::Char* cSrcName = "DiskInfo"; + + if (catalogDisk) + { + auto bufferInfoDisk = (NewOS::Char*)this->fNewFS->GetParser()->ReadCatalog(catalogDisk, kNewFSSectorSz, cSrcName); + NewOS::kcout << bufferInfoDisk << NewOS::end_line(); + + delete bufferInfoDisk; + delete catalogDisk; + } + else + { + catalogDisk = + (NewCatalog*)this->Leak()->CreateAlias("/Mount/This Disk"); + + NewOS::StringView diskFolder(kNewFSSectorSz); + + diskFolder += + "

Kind: alias to disk

\r

Created by: system

\r

Edited " + "by: " + "system

\r

Volume Type: New OS Standard

\r"; + + diskFolder += "

Original Path: "; + diskFolder += NewOS::NewFilesystemHelper::Root(); + diskFolder += "

\r"; + + NewFork theDiskFork{0}; + + NewOS::rt_copy_memory((NewOS::VoidPtr)(cSrcName), theDiskFork.ForkName, + NewOS::rt_string_len(cSrcName)); + + NewOS::rt_copy_memory((NewOS::VoidPtr)(catalogDisk->Name), + theDiskFork.CatalogName, + NewOS::rt_string_len(catalogDisk->Name)); + + theDiskFork.DataSize = kNewFSForkSize; + theDiskFork.ResourceId = 0; + theDiskFork.ResourceKind = NewOS::kNewFSRsrcForkKind; + theDiskFork.Kind = NewOS::kNewFSDataForkKind; + + fNewFS->GetParser()->CreateFork(catalogDisk, theDiskFork); + fNewFS->GetParser()->WriteCatalog(catalogDisk, + (NewOS::VoidPtr)diskFolder.CData(), + kNewFSSectorSz, cSrcName); + + delete catalogDisk; + } + } + } + + ~FilesystemWizard() + { + delete fNewFS; + } + + NEWOS_COPY_DEFAULT(FilesystemWizard); + + /// Grab the disk's NewFS reference. + NewOS::NewFilesystemManager* Leak() + { + return fNewFS; + } + }; + + /// @brief System loader entrypoint. + /// @param void no parameters. + /// @return void no return value. + STATIC NewOS::Void SystemLauncher_Main(NewOS::Void) + { + NewOS::PEFLoader lockScreen("/System/LockScreen"); + + if (!lockScreen.IsLoaded()) + { + NewOS::ke_stop(RUNTIME_CHECK_FAILED); + } + + NewOS::Utils::execute_from_image(lockScreen, + NewOS::ProcessHeader::kAppKind); + + NewOS::PEFLoader stageBoard("/System/StageBoard"); + + if (!stageBoard.IsLoaded()) + { + NewOS::ke_stop(RUNTIME_CHECK_FAILED); + } + + NewOS::Utils::execute_from_image(stageBoard, + NewOS::ProcessHeader::kAppKind); + + NewOS::kcout << "SystemLauncher: done, sleeping..."; + + while (true) {} + } +} // namespace NewOS::Detail + +/// @brief Application entrypoint. +/// @param Void +/// @return Void +EXTERN_C NewOS::Void KeMain(NewOS::Void) +{ + /// Now run kernel loop, until no process are running. + NewOS::Detail::FilesystemWizard wizard; // automatic. + + auto cLoaderName = "SystemLauncher"; + NewOS::execute_from_image(NewOS::Detail::SystemLauncher_Main, cLoaderName); + + while (true) + { + NewOS::ProcessScheduler::The().Leak().Run(); + } +} diff --git a/Kernel/Sources/ProcessScheduler.cxx b/Kernel/Sources/ProcessScheduler.cxx index 1a49af22..08a7971e 100644 --- a/Kernel/Sources/ProcessScheduler.cxx +++ b/Kernel/Sources/ProcessScheduler.cxx @@ -215,9 +215,6 @@ namespace NewOS if (!mTeam.AsArray().Count() > kSchedProcessLimitPerTeam) return -kErrorOutOfTeamSlot; - if (process.Leak().Ring != (Int32)ProcessSelector::kRingKernel) - return -1; - kcout << "ProcessScheduler::Add(Ref& process)\r"; /// Create heap according to type of process. diff --git a/Kernel/Sources/SMPManager.cxx b/Kernel/Sources/SMPManager.cxx index b2c3f488..f0b680ce 100644 --- a/Kernel/Sources/SMPManager.cxx +++ b/Kernel/Sources/SMPManager.cxx @@ -99,6 +99,21 @@ namespace NewOS fStack->Rsp = stack->Rsp; fStack->Fs = stack->Fs; fStack->Gs = stack->Gs; + + // save global registers. + + fStack->R15 = stack->R15; + fStack->R14 = stack->R14; + + fStack->R13 = stack->R13; + fStack->R12 = stack->R12; + fStack->R11 = stack->R11; + + fStack->R10 = stack->R10; + fStack->R9 = stack->R9; + fStack->R8 = stack->R8; + + fStack->Exception = this->fID; } rt_do_context_switch(fStack); -- cgit v1.2.3 From ba57a4b2ab08baa0300d958b3507fc1f4f677f5e Mon Sep 17 00:00:00 2001 From: Amlal EL Mahrouss Date: Thu, 13 Jun 2024 07:39:54 +0200 Subject: MHR-30: update splash screen. Signed-off-by: Amlal EL Mahrouss --- Boot/Sources/Root/SplashScreen.fmt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Boot/Sources/Root') diff --git a/Boot/Sources/Root/SplashScreen.fmt b/Boot/Sources/Root/SplashScreen.fmt index d7b03f8f..4a851dc1 100644 --- a/Boot/Sources/Root/SplashScreen.fmt +++ b/Boot/Sources/Root/SplashScreen.fmt @@ -1,7 +1,7 @@ ================================================================== -Welcome to RTKM1. +Welcome to Zeta. Brought to you by: Amlal EL Mahrouss. * newosldr, newoskrnl: Amlal EL Mahrouss. -This copy can boot directly to newoskrnl (RTKM1). + Copyright Zeta Electronics Corporation, all rights reserved. ================================================================== -- cgit v1.2.3