The MASM Forum

Projects => ObjAsm => Topic started by: HSE on February 16, 2023, 02:10:48 AM

Title: An ObjAsm microkernel
Post by: HSE on February 16, 2023, 02:10:48 AM
Hi all!

This is a very preliminary development of an application that can run alone in the machine. Not exactly an OS, but close to that, and can deploy any object that don't need Windows API.

For this purpose a new platform is requiered: PLATFORM_KERNEL (KRN64). Now mainly for direct memory allocation:MemAlloc macro MemSize:req, Flags:=<MEM_DEFAULT>
  if TARGET_PLATFORM eq PLATFORM_WINDOWS
      · · ·
    invoke HeapAlloc, hProcessHeap, $$MemAttr, MemSize
  elseif TARGET_PLATFORM eq PLATFORM_UEFI
      · · ·
    invoke MemAlloc_UEFI, Flags, MemSize, PLATFORM_UEFI_MEMORY
  elseif TARGET_PLATFORM eq PLATFORM_KERNEL
    invoke MemAlloc_HOS, Flags, MemSize, NULL
  endif
      · · ·
endm


Memory management is totally elemental. Only one memory section is used. In this machine that is 7.46GB, then not a big problem now  :biggrin:

To test scheme is:e:\efi\boot\BOOTX64.efi
e:\PlotKern.efi


A basic article was very usefull: Building an UEFI x64 kernel from scratch: A long trip to userspace (https://blog.llandsmeer.com/tech/2019/07/21/uefi-x64-userland.html)

Loader is a KNNSpeed classic: https://github.com/ASMHSE/2018-UEFI-Bootloader
Memory management take the idea from https://github.com/JoverZhang/deliciOS, but I think that don't work like expected.

Regards, HSE.


Title: Re: An ObjAsm microkernel
Post by: Biterider on February 17, 2023, 04:46:55 AM
Hi HSE
This work looks impressive!
The system depth you achieve is also worth a thumbs up  :thumbsup:

Biterider
Title: Re: An ObjAsm microkernel
Post by: HSE on February 17, 2023, 05:26:06 AM
Hi Biterider!

Quote from: Biterider on February 17, 2023, 04:46:55 AM
This work looks impressive!
The system depth you achieve is also worth a thumbs up  :thumbsup:

Thanks for the concepts.  :thumbsup:

HSE