diff options
| author | Amlal EL Mahrouss <amlalelmahrouss@icloud.com> | 2024-06-28 15:38:05 +0200 |
|---|---|---|
| committer | Amlal EL Mahrouss <amlalelmahrouss@icloud.com> | 2024-06-28 15:44:12 +0200 |
| commit | a9b891eb31b874c14fce79f7e3e9da8fab475224 (patch) | |
| tree | 60c7dc9d822f1ddcdb4550b93db9e9fea49605b3 | |
| parent | c142fe6fda7d09e929c9706b444cdc13ed5e72f3 (diff) | |
IMP: 64X000 newosldr support.
Signed-off-by: Amlal EL Mahrouss <amlalelmahrouss@icloud.com>
| -rw-r--r-- | Boot/Sources/HEL/64X000/.gitkeep (renamed from Boot/Sources/HEL/RISCV/.gitkeep) | 0 | ||||
| -rw-r--r-- | Boot/Sources/HEL/64X000/Boot64x0.S | 35 | ||||
| -rw-r--r-- | Boot/Sources/HEL/POWER/CoreBootStartup.S | 8 | ||||
| -rw-r--r-- | Boot/Sources/HEL/RISCV/BootRISCV.S | 22 | ||||
| -rw-r--r-- | Kernel/Modules/CoreCG/CoreCG.hxx | 11 | ||||
| -rw-r--r-- | Kernel/Modules/LTE/IO.hxx | 2 | ||||
| -rw-r--r-- | Kernel/Sources/PageManager.cxx | 12 | ||||
| -rw-r--r-- | ReadMe.md | 10 | ||||
| -rw-r--r-- | newoskrnl.files | 2 |
9 files changed, 52 insertions, 50 deletions
diff --git a/Boot/Sources/HEL/RISCV/.gitkeep b/Boot/Sources/HEL/64X000/.gitkeep index e69de29b..e69de29b 100644 --- a/Boot/Sources/HEL/RISCV/.gitkeep +++ b/Boot/Sources/HEL/64X000/.gitkeep diff --git a/Boot/Sources/HEL/64X000/Boot64x0.S b/Boot/Sources/HEL/64X000/Boot64x0.S new file mode 100644 index 00000000..9b2fb569 --- /dev/null +++ b/Boot/Sources/HEL/64X000/Boot64x0.S @@ -0,0 +1,35 @@ +/* ------------------------------------------- + + Copyright Zeta Electronics Corporation + +------------------------------------------- */ + +.section .boot_hdr +.align 4 + +/* NewBoot boot header begin for a 64x000 kernel. */ + +boot_hdr_mag: + .ascii "CB" +boot_hdr_name: + // it has to match ten bytes. + .asciz "newosldr\0\0" +boot_hdr_ver: + .word 0x104 +boot_hdr_proc: + .long bootloader_start + +/* NewBoot boot header end */ + +.extern bootloader_main +.extern bootloader_stack + +.globl bootloader_start +bootloader_start: + psh 4 /* real address of .Laddr */ + ldi 0,(bootloader_stack-bootloader_start)(4) /* stack address location */ + mv 19,0 /* use user defined stack */ + jrl + + bl bootloader_main + blr diff --git a/Boot/Sources/HEL/POWER/CoreBootStartup.S b/Boot/Sources/HEL/POWER/CoreBootStartup.S index e1a186ae..cff1add7 100644 --- a/Boot/Sources/HEL/POWER/CoreBootStartup.S +++ b/Boot/Sources/HEL/POWER/CoreBootStartup.S @@ -19,16 +19,16 @@ boot_hdr_ver: boot_hdr_proc: .long bootloader_start -/* NewOS boot header end */ +/* NewBoot boot header end */ .extern bootloader_main .extern bootloader_stack .globl bootloader_start bootloader_start: - mflr 4 /* real address of .Laddr */ - lwz 0,(bootloader_stack-bootloader_start)(4) /* stack address location */ - mr 1,0 /* use user defined stack */ + mflr 4 /* real address of .Laddr */ + lwz 0,(bootloader_stack-bootloader_start)(4) /* stack address location */ + mr 1,0 /* use user defined stack */ bl bootloader_main blr diff --git a/Boot/Sources/HEL/RISCV/BootRISCV.S b/Boot/Sources/HEL/RISCV/BootRISCV.S deleted file mode 100644 index 2f1e9eb9..00000000 --- a/Boot/Sources/HEL/RISCV/BootRISCV.S +++ /dev/null @@ -1,22 +0,0 @@ -/* ------------------------------------------- - - Copyright Zeta Electronics Corporation - -------------------------------------------- */ - -.section .init -.align 4 - -/* NewOS kernel header begin */ - -k_hdr_mag: - .ascii "LX" -k_hdr_name: - // it has to match ten bytes. - .asciz "newosldr\0\0" -k_hdr_ver: - .word 0x104 -k_hdr_proc: - .long bootloader_start - -/* end */
\ No newline at end of file diff --git a/Kernel/Modules/CoreCG/CoreCG.hxx b/Kernel/Modules/CoreCG/CoreCG.hxx index 5720ef13..df65df0c 100644 --- a/Kernel/Modules/CoreCG/CoreCG.hxx +++ b/Kernel/Modules/CoreCG/CoreCG.hxx @@ -78,16 +78,5 @@ } \ } -/// This is enabled if Cairo is compiled with CoreCG. -#ifdef __CG_USE_GX__ -/// @brief This function creates a new framebuffer for CoreCG. -/// @return -inline cairo_surface_t* GXCreateFramebufferCairo() -{ - cairo_format_t format = CAIRO_FORMAT_ARGB32; - NewOS::Int32 stride = cairo_format_stride_for_width(format, kHandoverHeader->f_GOP.f_Width); - return cairo_image_surface_create_for_data((unsigned char*)kHandoverHeader->f_GOP.f_The, format, kHandoverHeader->f_GOP.f_Width, kHandoverHeader->f_GOP.f_Height, stride); -} -#endif diff --git a/Kernel/Modules/LTE/IO.hxx b/Kernel/Modules/LTE/IO.hxx index 7ae256e9..ac24776a 100644 --- a/Kernel/Modules/LTE/IO.hxx +++ b/Kernel/Modules/LTE/IO.hxx @@ -13,7 +13,7 @@ Purpose: LTE I/O. #include <NewKit/Defines.hpp>
#include <NewKit/String.hpp>
-/// @brief LTE I/O routines.
+/// @brief Long Term Evolution I/O routines.
/// @brief Turn on SIM slot.
NewOS::Boolean lte_turn_on_slot(NewOS::Int32 slot);
diff --git a/Kernel/Sources/PageManager.cxx b/Kernel/Sources/PageManager.cxx index 331be178..413c830f 100644 --- a/Kernel/Sources/PageManager.cxx +++ b/Kernel/Sources/PageManager.cxx @@ -10,8 +10,8 @@ #ifdef __NEWOS_AMD64__ #include <HALKit/AMD64/HalPageAlloc.hpp> #elif defined(__NEWOS_ARM64__) -#include <HALKit/ARM64/Processor.hxx> -#endif // ifdef __x86_64__ +#include <HALKit/ARM64/HalPageAlloc.hpp> +#endif // ifdef __NEWOS_AMD64__ || defined(__NEWOS_ARM64__) //! null deref will throw (Page Zero detected, aborting app!) #define kProtectedRegionEnd (512) @@ -31,13 +31,11 @@ namespace NewOS { } - PTEWrapper::~PTEWrapper() - { - } + PTEWrapper::~PTEWrapper() = default; /// @brief Flush virtual address. /// @param VirtAddr - void PageManager::FlushTLB(UIntPtr VirtAddr) + Void PageManager::FlushTLB(UIntPtr VirtAddr) { if (VirtAddr == kBadAddress) return; @@ -47,7 +45,7 @@ namespace NewOS /// @brief Reclaim freed page. /// @return - bool PTEWrapper::Reclaim() + Bool PTEWrapper::Reclaim() { if (!this->fPresent) { @@ -1,24 +1,26 @@ <!-- README --> -NewOS is an operating system based on Zeta^1 and a microkernel codenamed 'Ne'. +# ZKA (Zeta Kernel Architecture) + +ZKA is an operating system kernel, also codenamed 'Ne'. <br> You need: - MinGW/GCC for the kernel and bootloader. - Netwide Assembler/CodeTools to output COFF/PEF object code. -Start by cloning the repo: +## Start by cloning the repo: ``` git clone git@bitbucket.org:mahrouss/microkernel.git ``` -And execute: +## And execute: ``` make -f amd64-efi.make all ``` -for the custom target 'AMD64 EPM' +For the custom target 'AMD64 EPM'. ##### Copyright, Zeta Electronics Corporation, all rights reserved. diff --git a/newoskrnl.files b/newoskrnl.files index 4f78121e..193f3279 100644 --- a/newoskrnl.files +++ b/newoskrnl.files @@ -29,7 +29,7 @@ Boot/Sources/HEL/AMD64/New+Delete.cxx Boot/Sources/HEL/AMD64/Support.cxx
Boot/Sources/HEL/AMD64/compile_flags.txt
Boot/Sources/HEL/POWER/CoreBootStartup.S
-Boot/Sources/HEL/RISCV/BootRISCV.S
+Boot/Sources/HEL/64X000/Boot64x0.S
Boot/Sources/compile_flags.txt
Boot/amd64-efi.make
Comm/compile_flags.txt
|
