JOSTALY TECHNOLOGIES John SETH Thielemann sthielemann@jostaly.com +1-223-231-3511 (1762362863 UNIX 308) Wed Nov 05 17:14:23 2025 - (1764264045 UNIX 330) Thu Nov 27 17:20:45 2025 0 Company News) * Rework and complete various outstanding low priority annoyance issues that kept getting carried over on the todo list. * Implement system call harnesses (kernel/user) and start basic testing. * More significant build and runtime performance increases. * Implement Performance Monitoring Unit CP15 ARM registers. * Tiny additions to Standard C. * Tiny additions to basic shell. * Implement another coreutil. * Begin basic initram fs work for userspace x86 platform code for linux. * Introduce EFI as a meta architecture and complete first round of core testing. Completed 51/127 checkboxes, 206 files changed, 8234 insertions(+), 2004 deletions(-) 1 EFI Integration) EFI on embedded systems is becoming more popular, and now rare (non-existent?) to find a newer x86 without it. EFI as a potential "meta architecture" has been sitting on the todo list for a while. What's the starting point? Official EFI standard: (Unified Extensible Firmware Interface (UEFI) Specification, Release 2.11, UEFI Forum, Inc, Nov 21, 2024) and a trivial hello world example from a search: OS DEV wiki "EFI Hello World". Found the GNUefi repo and the trivial x86-32 hello world assembler, there's no x86-64 trivial (at least as of early November 2025). Reference the official UEFI doc, calling conventions are Microsoft, slight rework: .section .text .align 4 .globl _start _start: movq %rsp,%rbp movq %rdx, %r8 # r8 = systab call 0f 0: popq %rdx addq $hello-0b,%rdx # rdx = string movq 64(%r8),%rcx # rcx (ConOut), blows away efi image handle. movq 8(%rcx),%rax # rax <- conout->OutputString call *%rax ret .section .rodata .align 2 hello: .byte 'h',0,'e',0,'l',0,'l',0,'o',0,'\n',0,'\r',0,0,0 .section .data .word 0 .section .reloc Assemble, link and objcopy, but various issues trying to start this with unsupported messages. Compare against a known working EFI image, wound up with a slightly modified linker script with an image base 0x1000, reserved stack and heap at 0x10000, target pei-x86-64 and subsystem 10: link: x86_64-buildroot-linux-gnu-ld -nostdlib -znocombreloc -T ./elf_x86_64_efi.lds a.out -o a.out.elf objcopy command: x86_64-buildroot-linux-gnu-objcopy -j .text -j .sdata -j.data -j.rodata \ -j.dynamic -j.dynsym -j.rel -j.rela -j.reloc \ --target=pei-x86-64 --subsystem=10 --file-alignment 4096 \ --strip-unneeded --stack 65536,65536 --heap 65536,65536 -vvvv \ a.out.elf a.out.elf.efi Down to a working x86-64 assembler hello world EFI image: x86_64-buildroot-linux-gnu-objdump -xf a.out.elf.efi a.out.elf.efi: file format pei-x86-64 a.out.elf.efi architecture: i386:x86-64, flags 0x00000103: HAS_RELOC, EXEC_P, D_PAGED start address 0x0000000000001000 Characteristics 0x20e >---executable >---line numbers stripped >---symbols stripped >---debugging information removed Time/Date>-->---Thu Jan 1 00:00:00 1970 Magic>-->--->---020b>---(PE32+) ... AddressOfEntryPoint>0000000000001000 BaseOfCode>->---0000000000001000 ImageBase>-->---0000000000000000 SectionAlignment>---00001000 FileAlignment>-->---00001000 ... Subsystem>-->---0000000a>---(EFI application) DllCharacteristics>-00000000 SizeOfStackReserve>-0000000000010000 SizeOfStackCommit>--0000000000010000 SizeOfHeapReserve>--0000000000000000 SizeOfHeapCommit>---0000000000010000 LoaderFlags>>---00000000 NumberOfRvaAndSizes>00000010 The Data Directory ... Sections: Idx Name Size VMA LMA File off Algn 0 .text 00001000 0000000000001000 0000000000001000 00001000 2**4 CONTENTS, ALLOC, LOAD, READONLY, CODE 1 .data 00001000 0000000000002000 0000000000002000 00002000 2**4 CONTENTS, ALLOC, LOAD, DATA 2 .rodata 00000010 0000000000003000 0000000000003000 00003000 2**2 CONTENTS, ALLOC, LOAD, READONLY, DATA SYMBOL TABLE: no symbols With the Hello world working, add a low level x86-64 EFI meta architecture base. This required a little bit of build system rework (extra steps, objcopy, etc.). Reference the EFI doc and create an EFI header, with a primary goal to get the programming language unit testing correctly running followed by the core unit tests. Add a "syscall" specialization for calling EFI services: an interesting note is the generic call with required stack push arguments require adjusting past the RedZone. Static builds, dynamic builds, various issues encountered with relocation address patch-ups and a number of additional checkboxes to still investigate. Basic granular programming language unit testing now passes, move on to additional core unit tests. A number of these complete successfully without much trouble. Not much of the code base uses vtables, and most of the use is to keep the driver core generic. The low level core includes vtable testing to ensure that secondary levels of testing have a high probability of passing without any work after the core passes. Spent a significant amount of time on this: Unsupported, Not Found, and various crashes. For the moment, throw all the vtables into a section and do the relocation patch-up manually, this essentially looks like: vtable[index] = vtable[index} + ImageLoadTextBase - (ImageLoadTextBase - ImageLoadBase). This allows the core unit testing to pass.