#AeroSync, A real hardware-capable monolithic kernel for x86_64 CPUs

1 messages · Page 3 of 1

ionic helm
#

though i truly believe i shouldnt jumpscare the brain

#

and fry the eyes

forest epoch
#

you shouldn't

ionic helm
#

also why is r12 deadbeefcafebabe?

forest epoch
#

or a magic number

ionic helm
#

wait

#

bochs works

forest epoch
#

cool

ionic helm
forest epoch
#

thinking what should i do today for modularus?

forest epoch
ionic helm
ionic helm
#

0,0,4?

forest epoch
ionic helm
#

very dark navy blue

forest epoch
#

so atleast we have the basics to actually link external modules

#

*.ko ofc

#

by default

#

linker can be replaced with some other format

#

*.dll???

#

idk

ionic helm
#

i use .module.fkx

#

or .module.asrx

forest epoch
#

well i will default to .ko

ionic helm
#

maybe .mm

#

Modularus Module

forest epoch
#

as i used it in my AxeialOS

ionic helm
#

or .mx

ionic helm
forest epoch
ionic helm
#

what?

#

i thought we do extensions?

#

KO is not special at all

forest epoch
#

the point is,

#

modularus linkers will not be the same

#

as they would be replaceable

ionic helm
#

just looked at when i truly gave up in osdev

ionic helm
#

ngl

forest epoch
#

so someone can make their OWN extension

#

or format

ionic helm
ionic helm
#

well

ionic helm
#

they can add a format support module

forest epoch
ionic helm
#

let the linker, loader use a generic interface

#

and requires format modules to define hot to parse the format

#

so if you want your own format, you have to add support for that format first

#

(this is actually even simpler for the kernel side since it no longer needs an elf loader-)

forest epoch
ionic helm
#

wait

forest epoch
ionic helm
#

btw look at this

#

this is in VoidFrame roadmap

#

a 36KLOC kernel that doesnt have ring 3

forest epoch
ionic helm
#

(yes it is 100% a os-in-kernel-in-ring-0)

ionic helm
#

36000

#

temple os biggest rival 🤣🤣

forest epoch
#

when AxeialOS was only ~5000 LoC i implemented fucking everything userspace, virtual spaces and syscalls (legacy)

ionic helm
#

iirc at ~30KLOC i started userspace

#

oh nice

#

2060 messages

forest epoch
#

and if you want all like user threads, processes and stuff, that will be ~3000 LoC

ionic helm
#

OH MY GOD

forest epoch
ionic helm
#

I HATE MY SIGNER

forest epoch
ionic helm
#

definitely a skill issue in cmake script writing

#

the thing is

#

for some reason, it some time signs WITHOUT recompling the kernel

forest epoch
ionic helm
#

to expect the new signatures and set of new keys

forest epoch
#

lmfao

ionic helm
ionic helm
#

and much much more predictable

#

im only using cmake for its IDE compatibility

forest epoch
ionic helm
#

i use CLion

forest epoch
#

vscode

ionic helm
normal pebble
ionic helm
normal pebble
#

The extensions, everything

ionic helm
#

CLion + CMake is extremely powerful

forest epoch
ionic helm
#

and makefile is ...

ionic helm
forest epoch
ionic helm
normal pebble
#

I don't use Clion because it uses Java 🤮

ionic helm
#

including most jetbrains editor

normal pebble
normal pebble
#

Now, i use neovim for editing text files

#

maybe markdown

ionic helm
normal pebble
ionic helm
#

my beloved cli editor

forest epoch
normal pebble
#

I also went through Arch btw phase betwen 2021-2023

#

(It was my first ever Linux distro)

ionic helm
forest epoch
normal pebble
#

Now, I just prefer Fedora

#

It's stable, and keeps up with the latest updates

forest epoch
ionic helm
forest epoch
#

my first personal distro i used on my computer was alpine linux

ionic helm
#

used to use rhel 10 for a bit of time

#

but gnome was ASS

normal pebble
#

I use gnome

ionic helm
#

btw @normal pebble , my pc is actually allergic to windows

normal pebble
#

I have tried KDE, Hyprland, BSPWM

ionic helm
#

lmfao ☠️

ionic helm
forest epoch
normal pebble
#

I use Windows to keep my firmware upto date

ionic helm
normal pebble
ionic helm
normal pebble
forest epoch
ionic helm
normal pebble
ionic helm
forest epoch
ionic helm
#

you need a browser for that?

normal pebble
#

and for some reason, HP doesn't have a dedicated help center for Linux

ionic helm
ionic helm
#

Windows is so popular

normal pebble
#

And the help center also keeps track of my warranty, etc.

ionic helm
#

finally fixed it

normal pebble
#

tf

#

Is that TUI?

forest epoch
ionic helm
normal pebble
ionic helm
#

the thing is

forest epoch
#

idk

ionic helm
#

for some reason im paranoid with ugly charactors

normal pebble
ionic helm
ionic helm
#

then the K and E is not very neat

forest epoch
normal pebble
#

Just look at the stacktrace

ionic helm
#

maybe STOP_CODE is kinda windows-y

forest epoch
forest epoch
ionic helm
#

also the amount of magic math in this is insane

forest epoch
forest epoch
ionic helm
#

@forest epoch beside GSF, what are some other choices?

#

(also excluding KERNEL PANIC)

ionic helm
forest epoch
#

or FATAL CRASH

ionic helm
normal pebble
forest epoch
#

if you want to keep it user-freindly (you dont want to scare them) you can use a less violent- Unrecoverable Failure

normal pebble
#

<player> fell while climbing

#

is also a good choice imo

ionic helm
forest epoch
normal pebble
#

name

forest epoch
#

||<player>|| touched a place where it shouldn't

ionic helm
#

Meltdown

forest epoch
#

also you can use: TRIPPED

ionic helm
#

maybe i should also add a list of stop codes

#

(more consistent way of just messages)

#

but that would mean updating all caller side API

normal pebble
ionic helm
#

neat

#

what framework?

#

though id say updating this after such kernel change is tedious asf

#

at least you are not in the beginners mistake

#

of making advertisement without anything to show

normal pebble
ionic helm
normal pebble
#

With a server which serves the posts via API calls

ionic helm
#

fair enough

normal pebble
ionic helm
#

most starts with node

normal pebble
#

This is my first attempt at Webdev after HTML and CSS

normal pebble
forest epoch
#

i've tried webdev before pure in HTML

ionic helm
forest epoch
#

and made shitty website that was a simple form

normal pebble
#

This is supposed to my portfolio website

#

or something

ionic helm
#

i used to try webdev

#

using JS(X)

#

and after seeing the syntax it made me gave up

normal pebble
#

Preact supports JSX

#

and it's lighter than React

ionic helm
#

ok, synced gitlab

ionic helm
#

added startup.nsh'

#

for no particular reason

forest epoch
#

😭

ionic helm
ionic helm
#

in this case its random

#

since i just pushed already

#

and just wanna do sth light

ionic helm
#

clion has crashed twice in a row

ionic helm
#

i have nothing to do

#

i may port linux vsprintf for no specific reason

ionic helm
#

nvm it is very cooked rn

forest epoch
ionic helm
#

but not my friends

#

the vtd module blews up the kernel

#

and on android qemu it died very early

forest epoch
ionic helm
ionic helm
#

ok

#

so its just a logic issue

#

the patched was like 4 lines

#

but wait

#

it only happens on QEMU TCG?

forest epoch
#

what?

ionic helm
#

tcg is stricter

#

like bochs

#

since its mostly software

#

oh nice

#

i got compile modules optional

#

nice

#

though unfortunately i have to disable VT-d support for now

#

anyways

#

made this

#
function(include_ifdef config path)
    if(DEFINED ${config})
        include(${CMAKE_SOURCE_DIR}/${path})
    endif()
endfunction()

include_ifdef(CONFIG_EXT_DRM_RENDERER drivers/graphics/drm/linearfb/linearfb.cmake)
include_ifdef(CONFIG_EXT_UART drivers/uart/uart.cmake)
include_ifdef(CONFIG_EXT_INTEL_IOMMU drivers/iommu/vtd.cmake)
include_ifdef(CONFIG_EXT_IDE_ATA drivers/block/ide/ide.cmake)
include_ifdef(CONFIG_EXT_RT_FW_SUPPORT drivers/fw/fw.cmake)
#

now we can compile and load a module with just an option

#

very nice

#

sysintf is doing a good job here

ionic helm
#

@forest epoch for some reason i wanna make a real mode os (not kernel)

ionic helm
#

ok linux vsnprintf is ported

ionic helm
#

prototype @forest epoch

#

ok vga mode 13h is a bit more trouble some than i thought

#

so normal 0xb8000 it is

ionic helm
#

hmm, wonder if my pc is supported

ionic helm
#

no

#

not DOS

#

just in ram project

forest epoch
ionic helm
#

vc?

forest epoch
ionic helm
#

ok

ionic helm
#

implementing USME rn

#

(unified smart mapping engine)

#

maybe i should stop making up names

ionic helm
#

forgot to sync gitlab

ionic helm
#

oh nice

#

yesterday's bug is fixed

#

just buggy iommu

forest epoch
ionic helm
ionic helm
#

ok, im now using fedora

ionic helm
#

this is probably the craziest max min i have ever seen

#

anyways, happy (lunar) new year!!

languid plover
ionic helm
languid plover
#

nvm

ionic helm
#

maybe aerosync will support gcc soon

meager atlas
#

why does literallty everyone have an OS that actually exists, i wish mine existed too

meager atlas
#

kernbel

ionic helm
ionic helm
#

lmao

#
/home/atheria/workspace/AeroSync/include/lib/math.h:482:9: error: expression in
   static assertion is not constant
     482 |     x = clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0);
         |         ^~~~~
   /home/atheria/workspace/AeroSync/include/lib/math.h:482:9: error: expression in
   static assertion is not constant
     482 |     x = clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0);
         |         ^~~~~
   /home/atheria/workspace/AeroSync/drivers/graphics/drm/linearfb/linearfb.c: In
   function ‘linearfb_color_brightness’:
   /home/atheria/workspace/AeroSync/drivers/graphics/drm/linearfb/linearfb.c:500:7:
   error: expression in static assertion is not constant
     500 |   r = clamp((int)(r * amount), 0, 255);
         |       ^~~~~
   /home/atheria/workspace/AeroSync/drivers/graphics/drm/linearfb/linearfb.c:500:7:
   error: expression in static assertion is not constant
     500 |   r = clamp((int)(r * amount), 0, 255);
         |       ^~~~~
   /home/atheria/workspace/AeroSync/drivers/graphics/drm/linearfb/linearfb.c:501:7:
   error: expression in static assertion is not constant
     501 |   g = clamp((int)(g * amount), 0, 255);
         |       ^~~~~
   /home/atheria/workspace/AeroSync/drivers/graphics/drm/linearfb/linearfb.c:501:7:
   error: expression in static assertion is not constant
     501 |   g = clamp((int)(g * amount), 0, 255);
         |       ^~~~~
   /home/atheria/workspace/AeroSync/drivers/graphics/drm/linearfb/linearfb.c:502:7:
   error: expression in static assertion is not constant
     502 |   b = clamp((int)(b * amount), 0, 255);
         |       ^~~~~
ionic helm
#

ehh

#

#1473201141348044872 new thread btw

ionic helm
#

added initial GCC support

#

though not actually working yet

ionic helm
#

currently trying to add OPIC support, have been a little distracted since lunar new year

ionic helm
#

also adding EXPORT_SYMBOL_GPL(sym) and also EXPORT_SYMBOL_MIT(sym)

ionic helm
#

also considering adding ASRX modules

#

which are LKM-like modules

#

thats it

ionic helm
#

also adding ET_REL support

forest epoch
#

nice

ionic helm
#

ok

#

moment of truth

#

to see if asrx works

#

@forest epoch letsgo

forest epoch
#

insane

ionic helm
#

good

#

also added a generic loader so i follow DRY

#

i still havent edit this ever since the build script was copied from voidframe

ionic helm
#

fixed some several stack usage issues

#
ld.lld: warning: <unknown>:0:0: stack frame size (4392) exceeds limit (2048) in function 'scan_gen'
ld.lld: warning: <unknown>:0:0: stack frame size (4248) exceeds limit (2048) in function 'do_munmap'
ld.lld: warning: <unknown>:0:0: stack frame size (4296) exceeds limit (2048) in function '__purge_vmap_node'
ld.lld: warning: <unknown>:0:0: stack frame size (2152) exceeds limit (2048) in function 'smp_call_function_many'
ld.lld: warning: <unknown>:0:0: stack frame size (4184) exceeds limit (2048) in function 'vmm_unmap_pages'
ld.lld: warning: <unknown>:0:0: stack frame size (32952) exceeds limit (2048) in function 'sys_poll'
ld.lld: warning: <unknown>:0:0: stack frame size (2648) exceeds limit (2048) in function 'do_rename'
ionic helm
#

we are also doing a massive linux libraries port tomorrow

#

after that we have CET SS support

#

then Capability system, UUID, GUID support

#

quite a bit to do as you can see

#

this will be for r0c4

#

this doesnt include any groundbreaking changes but i hope to deliver as many bug fixes as possibkle

ionic helm
#

ok nice

#

just pushed

#

now we will probably do some hardening

#

and mm advancing using the newly-ported interval_tree

#

from linux ofc

ionic helm
#

adding brk and sbrk support

ionic helm
#

also a bit of mm change

#

adding userfaultfd and KSM support

ionic helm
#

pushed some changes

#

very nice

#

gonna try mint

#

btw

#

next release will be r0c4-4.5.9

#

even though the old one is 4.3.7 already

#

ive decided that this new release wont add too much new stuff

#

mostly hardening

#

and minor features

#

as well as bug fixes

#

for extra stability ofc

ionic helm
#

fck yeah

#

just realized my kernel CANNOT be compiled with clang 18 or lower

ionic helm
#

and the alignas keywrd

#

it has different syntax (for some reason) on clang 18

#

prob due to it was release when c23 is stabilizing

#

pls dont blame me, i wanna keep c23

#

also added support for chosing clang version with the CLANG_VERSION env

#

so now you can do CLANG_VERSION=19 cmake --preset amd64, and it will automatically search for clang19 and clang++19

ionic helm
#

an acenv for acpica by the rust bootstrap compiler guy

ionic helm
#

holy shit it actually works!

#

i have acpica compiled and linked

#

now lets implement OSL

ionic helm
#

osl is implemented

#

just have to solve some conflicts

#
cpica/source/components/utilities/utxfmutex.c.obj -o aerosync.krnl   && :
ld.lld: error: duplicate symbol: AcpiOsAllocateZeroed
>>> defined in CMakeFiles/aerosync.krnl.dir/drivers/acpi/acpica_osl.c.obj
>>> defined in CMakeFiles/aerosync.krnl.dir/lib/acpica/source/components/utilities/utalloc.c.obj

ld.lld: error: duplicate symbol: AcpiOsCreateCache
>>> defined in CMakeFiles/aerosync.krnl.dir/drivers/acpi/acpica_osl.c.obj
>>> defined in CMakeFiles/aerosync.krnl.dir/lib/acpica/source/components/utilities/utcache.c.obj

ld.lld: error: duplicate symbol: AcpiOsPurgeCache
>>> defined in CMakeFiles/aerosync.krnl.dir/drivers/acpi/acpica_osl.c.obj
>>> defined in CMakeFiles/aerosync.krnl.dir/lib/acpica/source/components/utilities/utcache.c.obj

ld.lld: error: duplicate symbol: AcpiOsDeleteCache
>>> defined in CMakeFiles/aerosync.krnl.dir/drivers/acpi/acpica_osl.c.obj
>>> defined in CMakeFiles/aerosync.krnl.dir/lib/acpica/source/components/utilities/utcache.c.obj

ld.lld: error: duplicate symbol: AcpiOsReleaseObject
>>> defined in CMakeFiles/aerosync.krnl.dir/drivers/acpi/acpica_osl.c.obj
>>> defined in CMakeFiles/aerosync.krnl.dir/lib/acpica/source/components/utilities/utcache.c.obj

ld.lld: error: duplicate symbol: AcpiOsAcquireObject
>>> defined in CMakeFiles/aerosync.krnl.dir/drivers/acpi/acpica_osl.c.obj
>>> defined in CMakeFiles/aerosync.krnl.dir/lib/acpica/source/components/utilities/utcache.c.obj
collect2: error: ld returned 1 exit status
clang: error: linker (via gcc) command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.
ionic helm
#

bruh dumbass me forgot to add defs in fkx and asrx builers

#

and ask why it doesnt compile ☠️

ionic helm
#
[6] [    1.024918] [sys::acpi] ACPI: [6] [    1.025106] [sys::acpi] RSDP 0x000000007FB7E014 000024 (v02 BOCHS?)[6] [    1.025631] [sys::acpi] 
[6] [    1.025804] [sys::acpi] ACPI: [6] [    1.026967] [sys::acpi] XSDT 0x000000007FB7D0E8 000064 (v01 BOCHS? BXPC???? 00000001 ???? 01000013)[6] [    1.027516] [sys::acpi] 
[6] [    1.027692] [sys::acpi] ACPI: [6] [    1.027882] [sys::acpi] FACP 0x000000007FB79000 0000F4 (v03 BOCHS? BXPC???? 00000001 BXPC 00000001)[6] [    1.028421] [sys::acpi] 
[0] [    1.028587] [sys::san::ubsan] nullptr pointer dereference
[0] [    1.028917] [sys::san::ubsan] Location: /home/atheria/workspace/AeroSync/lib/acpica/source/components/tables/tbfadt.c:639:39
[0] [    1.029603] [sys::san::ubsan] Type: 'ACPI_TABLE_FADT' (aka 'struct acpi_table_fadt')
[0] [    1.030064] [sys::san::ubsan] Operation: member access within
[0] [    1.030414] [sys::core::panic] [--------------------------------------------------------------------------------]
[0] [    1.031020] [sys::core::panic]                                 AeroSync panic
[0] [    1.031450] [sys::core::panic] [--------------------------------------------------------------------------------]
[0] [    1.032055] [sys::core::panic] Reason: [sys::san::ubsan] type_mismatch
[0] [    1.032445] [sys::core::panic] System State:
[0] [    1.032709] [sys::core::panic]   Kernel Version : r0c3.hardened - 4.3.7-Convergence+branch.r0c3-4.3.7-12-g021f367-dirty.dev+abi.0
[0] [    1.033390] [sys::core::panic]   CPU Core ID    : 0
[0] [    1.033689] [sys::core::panic]   Current Task   :  (pid: 0)
[0] [    1.034074] [sys::core::panic] [--------------------------------------------------------------------------------]
#

very nice

#

HOLY FCKING SHIT

#

IT WORKS

#

I WAS MISSING OFFSETOF

ionic helm
#

yeah

#

pushed

#

also bumped the version fo r0c4-5.4.9

#

logging tags now also include advertisement

#

very nice

#

i.e. now prefixed with aerosync::

ionic helm
#

i have to do this ```c
static ACPI_STATUS
osl_osi_handler(ACPI_STRING interface_name, UINT32 *supported)
{
if (!supported || !interface_name) return AE_BAD_PARAMETER;

/* TODO: add acpi_osi= boot parameter support here /
/
FIXME: discover the actual needed 'lies', not blindly supporting all */

/* Default to not supported */
*supported = 0;

/* Whitelist what we actually support */
if (!strcmp(interface_name, "Windows 2013") ||
!strcmp(interface_name, "Windows 2015") ||
!strcmp(interface_name, "Windows 2019") ||
!strcmp(interface_name, "Windows 2022") ||
!strcmp(interface_name, "Windows 2025") ||
!strcmp(interface_name, "Windows 2012") ||
!strcmp(interface_name, "Windows 2009") ||
!strcmp(interface_name, "Module Device") ||
!strcmp(interface_name, "Processor Device") ||
!strcmp(interface_name, "3.0 Thermal Model") ||
!strcmp(interface_name, "Extended Address Space Descriptor")) {
*supported = 1;
return AE_OK;
}

#ifdef CONFIG_DENY_LINUX_OSI
/*

  • Explicitly deny "Linux" - some vendor firmware (Lenovo infamously)
  • returns broken thermal/battery data when this returns true
    */
    if (!strcmp(interface_name, "Linux")) {
    *supported = 0;
    return AE_OK;
    }
    #endif

return AE_OK;
}

#

😭

ionic helm
#

added support for ansi colors

ionic helm
ionic helm
#

bump

ionic helm
#

nice

dusky reef
#

btw why did u decide to do acpica

ionic helm
#

so thati can never look at it again

dusky reef
#

Oh

dusky reef
#

Did you find the kernel api easier or harder etc?

#

and acpica api in general

ionic helm
#

while ACPICA is much bigger, its somewhat modular, you need to supply acwhatever.h and it would work fine, though the OSL is bigger than uACPI glue

#

and imo, usage in both implementations are not too hard

dusky reef
#

I see

ionic helm
# dusky reef I see

i see, also about you and uacpi, i see that you are the owner of the uacpi thread

dusky reef
#

yes

ionic helm
dusky reef
#

i made uacpi alone lol

ionic helm
#

you are the one?

dusky reef
#

lol

#

yes

ionic helm
#

oh wow

#

i didnt expect that

#

so just out of curiosity

#

what do you think of acpica? (that made you make uacpi)

dusky reef
#

Ok so first of all i made uacpi not because acpica was bad, but simply because my project was NIH

dusky reef
#

Secondly, I've talked to the acpica maintainers quite a lot, also contributed a few patches and fixes both to acpica and linux upstream. In general ACPICA is decent, but you have to understand that it's a library that's essentially tailored for linux, and has a lot of downstream patches that only exist in linux not propagated back to acpica

#

So you're using a distilled version that might have bugs and missing stuff

dusky reef
#

Also, in general it's quite buggy when it comes to aml, it's very easy to crash, it does leak memory sometimes

ionic helm
dusky reef
#

It's internal api assumes the caller knows the internal implementation and won't abuse the api

ionic helm
#

uacpi is much more readable

dusky reef
#

so it's not protected against deadlock, races, etc. that uacpi is protected against

#

because i designed it with the idea that the user has no idea how to use the api and what can cause deadlocks, crashes, etc

#

Also its very far from compatibility with Nt's interpreter

#

Which may be a problem on a lot of systems

ionic helm
#

i see

ionic helm
dusky reef
#

Also its just slow af in general

#

from synthetic tests uacpi is 3.5x faster

ionic helm
#

oh nvm

ionic helm
#

bump

ionic helm
#

its much saner

ionic helm
#

bump

meager atlas
#

bimp

heavy haven
#

btw is tihs kernel like a Unix-like kernel that runs linux software

#

or is it just a kernel that doesnt run any softaware, just a kernel

ionic helm
#

sadly

heavy haven
#

what can it run

#

currently

ionic helm
#

whats why i do #1475806779676823674 as a side project

ionic helm
heavy haven
#

wow

ionic helm
#

i m still building the internals

#

i dont rush for loading elfs

heavy haven
#

wtf

#

bro is at 50k lines of code and still; cant load elf executable

ionic helm
#

it is at 126K (with deps)

heavy haven
#

with deps D:

ionic helm
heavy haven
#

so uh why dont you try to run software

#

cant it be boring

ionic helm
heavy haven
#

if it doesnt actually do something

ionic helm
#

i want no technical debt before entering userspace (and including loading execs)

heavy haven
#

cool

#

dont you feel boring tho if there isnt any progress that you can see

ionic helm
#

i already had enough

#

my older kernel (predecessor of aerosync)

#

is actually the exact thing you would expect

heavy haven
#

oh

ionic helm
#

but i take too many shortcuts, bad designs and im basically paranoid about bad designs since then...

heavy haven
#

yea im pretty sure i dont have much technical debt

ionic helm
heavy haven
#

i also had enough of technical debt back when im making minecraft plugins xd

ionic helm
heavy haven
#

rip

#

btw is C easy to make technical debuty

#

debut

ionic helm
#

anyways, working on vfs for r0c4

heavy haven
#

debt

#

scince there isnt fancy things like trait and objects

ionic helm
#

🙏

ionic helm
heavy haven
#

ah

ionic helm
#

though he can somewhat simulate them

heavy haven
#

yea

ionic helm
#

not complete obviously

heavy haven
#

just make the first argument of a function a struct

#

so now theres self in C

ionic helm
#

extra words to type

#

though yeah

#

rust is veri cool 👍

heavy haven
#

why do poeple like C then

#

is it becuase its very close to hardware?

ionic helm
ionic helm
heavy haven
#

oh

ionic helm
heavy haven
#

yea i guess

#

although i dont really feel rust have any problem with these

#

close to hardware stuff

#

idk it might just be that im not close enough

ionic helm
#

rust is excelent though

heavy haven
#

you can also do stuff like raw pointers

#

with unsafe {}

ionic helm
#

but its much more abstracted than C

heavy haven
#

yea i love abstractions

#

thats why im using rust

ionic helm
#

with C and a bit of computer knowledge, you can guess pretty much the instruction emmited by the compiler

#

(until optimizations kicks in, ofc)

ionic helm
#

thats also why capellix is also in rust

heavy haven
#

nice

ionic helm
heavy haven
#

uh i got elf loading

#

and other stuff

#

you can check the github

ionic helm
#

bruh ik

#

i mean the current dev status

#

right now

heavy haven
#

hmm

#

im doing

#

implementing ioctl

#

so that i can run busybox sh

ionic helm
#

you want to get into userspace quick?

heavy haven
#

thats my syscalls

heavy haven
heavy haven
ionic helm
#

i see

ionic helm
heavy haven
#

yea

#

im not using linux's syscall

#

i have a wrapper for linux syscalls

ionic helm
#

i see

heavy haven
#

because i hate linux syscalls

ionic helm
#

also print?

#

you mean to printk?

heavy haven
#

whats a printk

ionic helm
#

i mean kernel log

heavy haven
#

the print syscall just simply does println!()

#

yup

#

i think i probably shouldent do that

ionic helm
#

(printk is printf in kernel - also the name of the linux print)

heavy haven
#

its my first syscall made

ionic helm
#

also

#

are you running busy box as init>

#

since usually, a kernel final purpose is to load whatever is init as the first userspace process, afaik

heavy haven
#

yea i know

#

current my init process is a

#

hello world program

#

to test stuff

heavy haven
#

btw is busybox like a collection of utilities

#

i dont actually

#

know

#

or just a big program that have utilities

ionic helm
#

its a collection of programs i think

#

or maybe a single binary

heavy haven
#

ive heard that its really lightweight

#

so im gonna start with it

#

instead of the gnu shit

ionic helm
#

yeah

#

not bad

#

android uses it

ionic helm
heavy haven
#

whats a toybox

ionic helm
heavy haven
#

ah

ionic helm
#

and uses BSD-0 clause iirc

#

so more permissive while busybox is gpl which is copyleft

ionic helm
#

or is it mmap-like?

heavy haven
#

its mmap like

#

beacuse i feel like the name mmap is too weird

ionic helm
#

man(2) mmap: mmap, munmap - map or unmap files or devices into memory

heavy haven
#

uh well yea

#

ig it isnt really weird

#

idk what im thinking

#

memorymap

ionic helm
heavy haven
#

wait is there man pages for linux systemcalls?

ionic helm
#

ofc there is

heavy haven
#

who whould use these (i guess we are using it)

ionic helm
#

it literally contains the function signature for basically anything you use

heavy haven
#

yea

#

but i mainly just ask AI for these systemcall stuff

#

or search online

#

i dont really use manpages

ionic helm
#

you are not googling for everything

ionic helm
#

🥀

heavy haven
#

ig

ionic helm
#

vfs seems to be working well

#

lets do resource control with ResDomain

heavy haven
#

btw my os current ahve absolutely zero error handling

#

if a program does like literally anything remotely wrong the kernel will just panic

#

lmao

#

theres just .unwrap() everywhere

ionic helm
#

🙏

ionic helm
#

lets go

#

vfs works nice

heavy haven
#

nicee

ionic helm
#

ok

#

now adding LBA48 support for 128G+ drives

meager atlas
#

you have variables and functions and then the rest are some form of simple spin on those

#

structs just have a few variables in them, pointers are variables with memory addresses, etc

heavy haven
#

i guess

#

thats also why i dont like C

#

there is basically no abstractions in C

ionic helm
meager atlas
#

kids these days

#

want 13 layers of classes and objects fighting with each other on which one can eat the most ram on your pc

heavy haven
#

well we live in 2025

#

not 2000 where you have to make the code like 10 times unreadable for a 0.01% proformance increase

#

plus rust dont even have this much proformance overhead

meager atlas
#

whatever performance optimizations you can make im certain you can read it if its on a modern machine trl

heavy haven
#

tbh i feel like C codes are like very unreadable

#

maybe im just too used to having objects traits OOP and other bs

meager atlas
#

skill issue meme

heavy haven
#

true

meager atlas
#

idk c is my first actual programming language

#

before that i programmed in scratch pain

heavy haven
#

same lmao

#

well after scratch i learned python

#

(back when im like 9)

#

and then when im 12 i learn a actrual programming languedge (java)

#

by writing minecraft hacked clients and plugins

meager atlas
#

i thought python was utterly unreadable and somehow found c more understandable idk

#

i can run calculator programs with it anyway

heavy haven
#

well python IS unreadable

#

i hate python

meager atlas
#

python sucks balls

heavy haven
#

yea

#

just use js

#

js still sucks but it sucks less

meager atlas
#

i guess so

#

idk i should consider learning about c++

#

i know that namespaces exist and are kinda cool

#

and classes

#

or whatever theyre called

#

the ones that have a function ran at creation and a function ran at their destruction meme

heavy haven
#

constructers and destructors

#

btw my first ever project in rust is this operating system

#

ive never written normal rust before lmao

#

well ive written a todo list that doesnt work (i spent like 3 hours on it)

meager atlas
#

i wrote calculator programs before i went into osdev

#

after going insane with rewrites i ended up on powerpc

heavy haven
#

and then i just instantly jumped to osedving becuase i found a tutorial on it thats actually good

heavy haven
#

i havent really writteen anything before

meager atlas
heavy haven
#

and i feel like i probably wont

meager atlas
#

theyre good enough for beginners to get started

heavy haven
#

ive had enough of technical debts when im writing minecraft plugins so im very careful with writing os

meager atlas
heavy haven
#

tbh pointers are straight forward

meager atlas
#

true

heavy haven
#

what isnt straight forward is what pointer is used for

#

it took me like a month or something to find out its actually used for refrence and stuff

#

and thats why when i change argumetns passed in a function it also changes the original value in java

meager atlas
heavy haven
#

wow

meager atlas
#

thats literally it meme

meager atlas
heavy haven
#

i also doesnt really know how arrays work

#

i guess theyre just

meager atlas
#

i mean struct pointers just point at a struct in a location of memory

heavy haven
#

idk

meager atlas
heavy haven
#

isnt it straight foward

meager atlas
#

yes

#

its straight up a list

#

you can have an array of everything

#

idk array of pointers pointing to pointers pain

#

void******************************** is technically valid

heavy haven
#

having no abstarctions feels weird tho

#

LOL

meager atlas
#

and thats a pointer to a pointer that has one less stars

heavy haven
#

&&&&&&&&&&&&&&

meager atlas
heavy haven
#

&*&*&*&*&*&*&*&*

meager atlas
meager atlas
#

actual memory access was the weirdest part

heavy haven
#

like having to allocate memory for an array is like really weird, its almost like your basically just coding in assembly

meager atlas
#

malloc() moment meme

#

kids these days with their new operators trl

#

if i ever use c++ i swear i might just use malloc instead of whatever it has

normal pebble
normal pebble
#

It's basically a malloc wrapper

#

so instead of defining a single malloc function, you need to definition 10-15 new hooks and their associated delete hooks

meager atlas
#

fair

normal pebble
#

Though for osdev, new is like a live grenade, you never know which new definition will be picked up by the compiler

#

for example, if you've aligned attribute, then new Foo could just call void* operator new(size_t size, align_val_t align)

ionic helm
#

still bitmap tho? 🥀

#

the hell you mean itrd 😭

[6] [    0.841981] [aerosync::fs::initrd] Loading initramfs from /module/initrd.cpio
[3] [    0.954513] [aerosync::fs::initrd] invalid magic expected 070701 got itrd
[6] [    0.842256] [aerosync::fs::initrd] Unpacking complete.
....
[3] [    1.215831] [aerosync::core] failed to execute /resources/binaries/init. (-ENOENT)
ionic helm
#

bump

#

also adding support for userspace elf loading (init)

ionic helm
#

currently analyzing nt 4.0 source leak

ionic helm
#

hmm

#

Page Coloring (MiRemovePageByColor) seems interesting

#

just found it in the leak

ionic helm
ionic helm
#

bump

ruby arrow
#

nice

ionic helm
#

bump

ionic helm
#

this probably cause massive cache line splittings

normal pebble
#

Mine's just 8 bytes

dusky reef
#

bros struct page is bigger than linuxes

ionic helm
#

at least now its down to 64 bytes

#
struct page {
  unsigned long flags;

  union {
    struct list_head lru;
    struct {
      void *mapping;
      unsigned long index;
    };
    struct {
      struct page *head;
      unsigned long _compound_pad;
    };
    struct {
      struct kmem_cache *slab_cache;
      void *freelist;
    };
  };

  union {
    struct {
      uint16_t order;       
      uint16_t migratetype; 
      uint16_t node;     
      uint16_t zone; 
    };
    uint64_t _metadata;
  };

  atomic_t _refcount;
  uint32_t _mapcount;

  struct resdomain *rd;
  union {
    spinlock_t ptl
    struct {
      uint16_t inuse;  
      uint16_t objects; 
      uint16_t frozen; 
      uint16_t _slab_pad;
    };
  };

  unsigned long _filler[1];
};
#

and for folios:

struct folio {
  union {
    struct {
      unsigned long flags;
      union {
        struct list_head lru;
      };
      void *mapping;
      unsigned long index;

      /* Overlays struct page's metadata/refcount region */
      void *private;
      uint16_t order;
      uint16_t migratetype;
      uint16_t node;
      uint16_t zone;
      atomic_t _refcount;
      uint32_t _mapcount;
    };

    struct page page;
  };
};
ionic helm
#
[0] [    0.984540] [aerosync::core::panic] Reason: list_del corruption.
   next->prev should be ffff9e933b6b1838, but was ffff9e933b6b1837.
   (next=ffff9e933b6b1880)
#

literally off by 1

ionic helm
#

hmm, currently,

#

the memeory overhead is 1.56% total system ram

normal pebble
#

I wonder why

ionic helm
#

am i tweakin 🥀

normal pebble
ionic helm
normal pebble
#

you should try [[gnu::aligned(512)]]

ionic helm
ionic helm
normal pebble
#

attribute lists are goated tbh

ionic helm
ionic helm
normal pebble
#

I hope [[likely]] and [[unlikely]] are also added to C standard

ionic helm
#

moreover, i literally just knew that asm is a gnu extension

#

and its not ISO C 😭

#

yeah

normal pebble
#

__asm__

#

oh wait

#

C Standard doesn't define inline assembly

#

wtf

ionic helm
normal pebble
ionic helm
#

so its implementation-defined?

normal pebble
#

Only clang, and IBM compilers supports __asm__, asm, and __asm

#

GCC uses the first two

#

while MSVC supports the latter

ionic helm
#

though i think it depends on the -std= flag

#

since if you do -std=c23 and use asm, clang will cry

normal pebble
ionic helm
normal pebble
#

c23 is strictly iso standard

#

gnu23 otoh

ionic helm
#

bruh, C/C++ compilers are...

#

not to mention, c26 (maybe) release this year

normal pebble
ionic helm
#

e.g. defer

normal pebble
#

As long as it's explicit

ionic helm
#

not strictly like C++ class deconstructors tho

ionic helm
normal pebble
#

Like no automated destructor calls

#

That was the reason why I switched from C++ to C

ionic helm
#

but just learning rust recently

heavy haven
#

use rust and theres no memory leak D:

ionic helm
#

oh, nice

#

i got it

#

struct page is finally down to 64B

#

also, new update: all alignas() in the kernel will be replaced (once again) with __aligned(x)

#

@normal pebble for some reason, alignof(x) fails when using alignas(x)

ionic helm
#

🙏

#

also the alignas keyword placement is also different on clang 18 and clang 19+

#

so a clang 18 c23 code cannot be compiled on clang 19+ and vice versa

#

lmao

ionic helm
#

which uses an older toolchain

normal pebble
ionic helm
normal pebble
#

Btw Use [[gnu::aligned()]] for structs

ionic helm
#

probably just use __aligned for now

normal pebble
#

alignas for members and attribute aligned for structs

heavy haven
#

when do you think you would start trying to run usermode programs btw

ionic helm
#

i dont rush to do userspace

ionic helm
#

trying to work on it rn

ionic helm
#

capellix day one feature is now on aerosync (jst after a slight 4 months)

ionic helm
#

just discovered about SMM

#

very cool operating mode

ionic helm
#

anyways

#

implementing SMP-safe panic

dusky reef
#

you have kcompactd and even same-page-merging demons?

#

thats like revolutionary linux tech

dusky reef
#

u sure about that?

ionic helm
ionic helm
dusky reef
#

i mean yeah, compacting and same page merging requires being able to steal pages from live processes and replacing them with different ones

#

if u do that thats cool

dusky reef
#

is this ai written btw

ionic helm
dusky reef
#

ah

ionic helm
#

i want a reference impl

#

so i asked it

dusky reef
#

how much of the kernel in general is ai generated?

ionic helm
dusky reef
#

hm

ionic helm
#

am i getting canceled 😭

dusky reef
#

its just that the kernel looks like linux and even copies the bogus name conventions in some places

#

but idc, just asking

ionic helm
dusky reef
#

i can see that

ionic helm
#

but its similar after all (just inconsistent)

dusky reef
#

u use gpl2 so its whatever, but still funny

ionic helm
dusky reef
#

like if u showed me the code id just say that its linux

#

i know these parts of the mm quite well

ionic helm
#

anyways, ported an internal pit driver mainly for very early boot timestamp (tsc calibration) before any timer extension under FKX_TIMER_CLASS is loaded

#

it is also not managed by sysintf/time

ionic helm
#

adding DRM support

#

renamed linearfb to simpledrm

#

linearfb is officially dead

#

FKX_{PRINTK,PANIC}_CLASS will be deprecated

ionic helm
#

very cool

#

added linux fonts

#

i just want to have a solaris look

#

though after that, i decided to stick with default

#

as of now, you can use the font= key in cmdline to specify your font of choice

ionic helm
#

maybe FKX modules are comming to an end...

ionic helm
#

ok

#

FKX is comming to and end

#

FKX extensions will be deprecated in the context of AeroSync r0c4

#

ic, timer, pci, pty and vtd will be builtin in-to the kernel

#

sysintf is still there for managing the subsystems

#

and using __initcall for the new builtin drivers

#

drivers likw fw, ide, and uart will be now become ASRX dynamic modules

#

(AeroSync Runtime eXtension)

#

FKX variant that supports unloading and hot-plug (supposedly)

ionic helm
#

what did i do?

ionic helm
#

the foundations are ready

#

we will do init refactoring next

#

and then IRQ overhaul

heavy haven
#

when are you gonna start porting userspace programs?

ionic helm
#

so i can get it before tghe fist full release

heavy haven
#

whats a r0c7

ionic helm
ionic helm
dusky reef
#

why do u need such an overcomplicated version number

ionic helm
#

though, i cant really explain how it reall works

#

generally, its just rXcY

#

for the average user

#

and the rest is progress tracking

#

maybe rXcY itself is a kind of semver

ionic helm
#

<EPOCH>.<FEATURE>.<PATCH>

#

is basically semver

#

so i basically got 2 versioning in one string

dusky reef
ionic helm
#

like how windows 11 is windows 11, but windows 11 22h2 is not windows 11 24h2

ionic helm
heavy haven
ionic helm
heavy haven
#

just do normal versioning bro 💀

#

assembler versioning

ionic helm
#

is what you need to mean

#

and the rest is internal use

#

release 0 candidate 4

heavy haven
#

what does canadidate even mean

#

💀

ionic helm
#

brother you use linux

heavy haven
#

uh wdym

#

what does it have to do wtih linux

ionic helm
heavy haven
#

cool, i didnt even knew that

#

i though its just

ionic helm
#

for example, 6.19 is mainline, stable

heavy haven
#

x.x.x

#

normal versioning

ionic helm
#

but 6.19-rc1 is the first "beta" version of 6.19

ionic helm
heavy haven
#

they should probaly call it like 6.19.0.1

#

this thing is way too confusing

#

v11 4.5.1.0-r1c5 build 623612 52h1

ionic helm
heavy haven
#

least confusing version method

ionic helm
#

personally i prefer my way

#

simple for users

#

evne furthermore, people can just refer it as AeroSync rX, or AeroSync X

#

@heavy haven this is the full string btw 🥀 [6] [ 1.221847] [aerosync::core] AeroSync (R) r0c4.hardened - 5.4.9-Integration+branch.r0c3-4.3.7-30-gdeceefd-dirty.dev+abi.0 - Clang 21.1.8 (Fedora 21.1.8-4.fc43)

heavy haven
#

bro

#

💀

ionic helm
heavy haven
#

bro im calling the police

ionic helm
#

anyways

#

implementing initcall (fr this time)

heavy haven
#

whats a initcall

#

and btw how many programs do you think you can run

#

if you start wokring on userspace rn

ionic helm
#

git describe --tags --always --dirty will be as deceefd-dirty

ionic helm
heavy haven
#

are you doing linux bin compat btw

ionic helm
#

(using binprm)

heavy haven
#

yea you can probably run like

heavy haven
#

kdeplasma rn

#

considering the fishix guy only have 15k lines of code and you have 60k

ionic helm
heavy haven
#

with deps lol

ionic helm
heavy haven
#

lol

ionic helm
#

*external headers excluded

heavy haven
#

so uh what program do you think you cna run

#

if you just start working on userspace rn

ionic helm
#

i abandoned the thing for so long

#

*note that the loader is broken not the scheduler is broken

heavy haven
#

well do you think you can run like gnu coreutils in 1 week

#

oh lol

ionic helm
#

probably 2 weeks but yeah

heavy haven
#

yea

ionic helm
#

doable

heavy haven
#

wow

#

what abt xorg

#

wayland

ionic helm
#

i also doesnt have SHM, IPC, sockets

#

so yeah

heavy haven
#

ohh

ionic helm
#

also

#

i decided to break the entire linux HFS

#

(hierachy file system)

heavy haven
#

yea ik that

#

i also donesnt use the linux fs hierachy

ionic helm
#

you can have a look

heavy haven
#

i have /programs /misc lol

#

instead of /bin

ionic helm
heavy haven
#

how hard do you think getting the other programs to use your fhs system can be?

#

i feel like its gonna be pretty hard

ionic helm
heavy haven
#

na im not gonna use symlinks

#

symlinks is for NOOBS

ionic helm
#

one fun fact

#

C:\Windows\System32 existed just becasuse microslop must not and will never break compat

heavy haven
#

microslop moment lol

ionic helm
#

System32 contains 64 bit, SysWOW64 comtains 32 bit

heavy haven
#

XD

#

knew that

ionic helm
#

and System itself is 16 bit

heavy haven
#

💀

ionic helm
#

*mostly

#

moreover

#

iirc in windows 2000

#

microslop actually but sol.exe and cards.dll in System32

#

basically the solitare game

heavy haven
#

lol

ionic helm
#

becasue it was tehre to demo the drag and drop feature

heavy haven
#

putting games inside kernel

ionic helm
#

so they think its a "core" component inside the os

heavy haven
#

btw i knew a friend who put the shell, lua, and a entire DE inside the kenrel

#

and the kernel is ring 0 only D:

heavy haven
#

and it cant load elf

heavy haven
ionic helm
heavy haven
#

is pe32+ the .exe format?