#AeroSync, A real hardware-capable monolithic kernel for x86_64 CPUs
1 messages · Page 3 of 1
you shouldn't
also why is r12 deadbeefcafebabe?
probably poison data if you use that.
or a magic number
cool
thinking what should i do today for modularus?
No blue?
device drivers
Still thinking should i do builtins for the loader and linker
very dark navy blue
which builtins?
loader and linker
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
well i will default to .ko
as i used it in my AxeialOS
or .mx
ppl definitely not gonna try to load a linux kernel module
custom format would be painful, also thats not feature provided by modularus
I know that
the point is,
modularus linkers will not be the same
as they would be replaceable
just looked at when i truly gave up in osdev
the kernel itself is 50% a linker
ngl
youre planning to make the kernel hotswappable so no confusion here
obviously
they can add a format support module
no one is crazy to do that so? right?
why not
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-)
not really, its just a big abstraction layer (80% VFS, 10% Sysfs++ (root), ~10% Builtins)
wait
Thats the entire kernel composition for Modularus
btw look at this
this is in VoidFrame roadmap
a 36KLOC kernel that doesnt have ring 3
🥀 what
(yes it is 100% a os-in-kernel-in-ring-0)
when AxeialOS was only ~5000 LoC i implemented fucking everything userspace, virtual spaces and syscalls (legacy)
you dont need THAT big of a kernel to start userspace, only simple PMM and VMM, IDT/GDT/TSS and syscall instructions, thats basically it which must all be under ~1000 LoC
and if you want all like user threads, processes and stuff, that will be ~3000 LoC
OH MY GOD
noice
I HATE MY SIGNER
what did it do?
definitely a skill issue in cmake script writing
the thing is
for some reason, it some time signs WITHOUT recompling the kernel
my build system has NEVER backstabbed me like that randomly ever
to expect the new signatures and set of new keys
lmfao
when POST_BUILD isnt as expected
makefiles are much simpler
and much much more predictable
im only using cmake for its IDE compatibility
GNUmakefile <3
i use CLion
makefile is also IDE compatible?
vscode
somewhat
It's horrible
it does have support
The extensions, everything
CLion + CMake is extremely powerful
insane i realized that rn 😭
and makefile is ...
but i dont like the fragmentation of VScode
i'm used to it, i have lazy vim and jetbrains as well
its lightweight though (at least compared to java-based one)
I don't use Clion because it uses Java 🤮
including most jetbrains editor
I used to be a neovim guy, but that phase ended a year or two ago
thought its great?
i use micro
It is
my beloved cli editor
i use vim
I also went through Arch btw phase betwen 2021-2023
(It was my first ever Linux distro)
same here
i use arch on my laptop btw 
my first ever linux distro i ever tried was Ubuntu thanks to my fucking school 😭
fair enough
lol
my first personal distro i used on my computer was alpine linux
I use gnome
nah
btw @normal pebble , my pc is actually allergic to windows
I have tried KDE, Hyprland, BSPWM
lmfao ☠️
cool
lmfao
when i got into systems programming very early, around mid 2024
I use Windows to keep my firmware upto date
like really, it simply cannot get windows running
(And CUDA)
what?
UEFI, etc.
my laptop with arch linux (this one) has hyprland
arent bios updated supposed to be run in the uefi env?
Well, I still need to download the package
download?
tho i dont like normal full GUI DEs, i love terminals
you need a browser for that?
and for some reason, HP doesn't have a dedicated help center for Linux
it should be reasonable though?
you can use reddit 
Windows is so popular
it is
And the help center also keeps track of my warranty, etc.
finally fixed it
wtf is a GSF???
just a random thought ngl ☠️
Global system failure duh
the thing is
for some reason im paranoid with ugly charactors
It's a PANIC call loll
it would be in STOP CODE:
if i do KERNEL PANIC
then the K and E is not very neat
frick, i'm so used to seeing #GP, #PF and etc lmao
Just look at the stacktrace
maybe STOP_CODE is kinda windows-y
Thanks to AxeialOS
NT like
also the amount of magic math in this is insane
still way less compared to my VFS black magic 
that would be insane
its a full fledged UNIX-like VFS
nice
FATAL ERROR
or FATAL CRASH
hmm
<player> died from dehydration
if you want to keep it user-freindly (you dont want to scare them) you can use a less violent- Unrecoverable Failure
damn
<player> touched a place where it shouldn't
||<player>|| touched a place where it shouldn't
Meltdown
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
Btw take a look at this project post I wrote over the apst day or two
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
Preact + Bun
ditched node?
With a server which serves the posts via API calls
fair enough
Never used node tbh
This is my first attempt at Webdev after HTML and CSS
i see
I didn't like Webdev to begin with tbh
i've tried webdev before pure in HTML
dont really know if i like it or not
and made shitty website that was a simple form
ok, synced gitlab
atp you are just doing stuff randomly am i right?
😭
im doing internal work all the day and focus on mm is that random?
though yes
in this case its random
since i just pushed already
and just wanna do sth light
clion has crashed twice in a row
nvm it is very cooked rn
what did you do?
it works on my machine
but not my friends
the vtd module blews up the kernel
and on android qemu it died very early
thats my username lmao
oh right
ok
so its just a logic issue
the patched was like 4 lines
but wait
it only happens on QEMU TCG?
what?
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
@forest epoch for some reason i wanna make a real mode os (not kernel)
ok linux vsnprintf is ported
prototype @forest epoch
ok vga mode 13h is a bit more trouble some than i thought
so normal 0xb8000 it is
hmm, wonder if my pc is supported
DOS?
I see
sure? in the AxeialOS?
ok
implementing USME rn
(unified smart mapping engine)
maybe i should stop making up names
forgot to sync gitlab

ok, im now using fedora
this is probably the craziest max min i have ever seen
anyways, happy (lunar) new year!!
max window size tcp?
what?
nvm
maybe aerosync will support gcc soon
why does literallty everyone have an OS that actually exists, i wish mine existed too
i dont have an os
kernbel
funny guy making a software for a funny architecture
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);
| ^~~~~
currently trying to add OPIC support, have been a little distracted since lunar new year
also adding EXPORT_SYMBOL_GPL(sym) and also EXPORT_SYMBOL_MIT(sym)
also adding ET_REL support
nice
good
also added a generic loader so i follow DRY
shi-
i still havent edit this ever since the build script was copied from voidframe
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'
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
ok nice
just pushed
now we will probably do some hardening
and mm advancing using the newly-ported interval_tree
from linux ofc
adding brk and sbrk support
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
due to my kernel being c23
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
oh i found sth interesting https://github.com/thepowersgang/rust_os/blob/master/acpica/patches/source/include/platform/acrust.h
an acenv for acpica by the rust bootstrap compiler guy
holy shit it actually works!
i have acpica compiled and linked
now lets implement OSL
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.
bruh dumbass me forgot to add defs in fkx and asrx builers
and ask why it doesnt compile ☠️
[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
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::
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;
}
😭
added support for ansi colors
disguised as windass
no other choice 😭
bump
btw why did u decide to do acpica
i dont have a good reason for that, uacpi is great, it works fine for me. its primarly just the itch to switch
so thati can never look at it again
Oh
uACPI was trivial to integrate and use, very friendly to use too
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
I see
i see, also about you and uacpi, i see that you are the owner of the uacpi thread
yes
so are you a part of the uacpi project i assume?
i made uacpi alone lol
oh wow
i didnt expect that
so just out of curiosity
what do you think of acpica? (that made you make uacpi)
Ok so first of all i made uacpi not because acpica was bad, but simply because my project was NIH
ok
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
i see
Also, in general it's quite buggy when it comes to aml, it's very easy to crash, it does leak memory sometimes
yeah, and its quite unreadable
It's internal api assumes the caller knows the internal implementation and won't abuse the api
uacpi is much more readable
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
i see
i see, what does it mean by that?
oh nvm
I have some examples here https://github.com/uACPI/uACPI?tab=readme-ov-file#why-would-i-use-this-over-acpica
aml code snippets too
bump
ill probably use uacpi for #1475806779676823674
its much saner
bump
bimp
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
it is a linux clone
sadly
whats why i do #1475806779676823674 as a side project
nothing
wow
what r you talking about?
it is at 126K (with deps)
with deps D:
i didnt say it cant load
without deps it 50k
if it doesnt actually do something
i already said before
i want no technical debt before entering userspace (and including loading execs)
well, actually
i already had enough
my older kernel (predecessor of aerosync)
is actually the exact thing you would expect
oh
but i take too many shortcuts, bad designs and im basically paranoid about bad designs since then...
yea im pretty sure i dont have much technical debt
well, you did it the correct way
i also had enough of technical debt back when im making minecraft plugins xd
lmao
but i dont 🥀
anyways, working on vfs for r0c4
🙏
though yeah
ah
facts
though he can somewhat simulate them
yea
not complete obviously
(manual)
extra words to type
though yeah
rust is veri cool 👍
its predictable
also yeah
oh
that aspect is often vital in osdev (or freestanding)
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
rust is excelent though
it is close
but its much more abstracted than C
with C and a bit of computer knowledge, you can guess pretty much the instruction emmited by the compiler
(until optimizations kicks in, ofc)
good point
thats also why capellix is also in rust
nice
hows your project?
you want to get into userspace quick?
thats my syscalls
i already got into userspace tho
although i should probably delete print and replace it with write to stdout
i see
also hmm, this your own syscall table
i see
because i hate linux syscalls
whats a printk
i mean kernel log
the print syscall just simply does println!()
yup
i think i probably shouldent do that
(printk is printf in kernel - also the name of the linux print)
its my first syscall made
debug its fine
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
yea
btw is busybox like a collection of utilities
i dont actually
know
or just a big program that have utilities
ive heard that its really lightweight
so im gonna start with it
instead of the gnu shit
oh nvm it was toybox
whats a toybox
another (more modern) busybox
ah
just to clarification, allocatemem syscall is allocate user memory right?
or is it mmap-like?
wat?
man(2) mmap: mmap, munmap - map or unmap files or devices into memory
yeah
wait is there man pages for linux systemcalls?
who whould use these (i guess we are using it)
wdym by that 🙏
it literally contains the function signature for basically anything you use
yea
but i mainly just ask AI for these systemcall stuff
or search online
i dont really use manpages
you are not googling for everything
ig
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
🙏
nicee
i like it because its surprisingly simple
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
we will see about that
bruhb
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
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
computers are fast enough already
whatever performance optimizations you can make im certain you can read it if its on a modern machine 
tbh i feel like C codes are like very unreadable
maybe im just too used to having objects traits OOP and other bs
skill issue 
true
probably
idk c is my first actual programming language
before that i programmed in scratch 
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
i thought python was utterly unreadable and somehow found c more understandable idk
i can run calculator programs with it anyway
python sucks balls
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 
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)
i wrote calculator programs before i went into osdev
after going insane with rewrites i ended up on powerpc

and then i just instantly jumped to osedving becuase i found a tutorial on it thats actually good
lmao
i havent really writteen anything before
macintosh based 
and i feel like i probably wont
tutorials are all evil but whatever fair enough 
theyre good enough for beginners to get started
ive had enough of technical debts when im writing minecraft plugins so im very careful with writing os
yup
i had to finish understanding how pointers actually work (it took like a minute
)
tbh pointers are straight forward
true
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
idk i just say you can pull values out of memory from the address in the pointers
wow
thats literally it 
except explaining how they are also arrays is a bit questionable
i mean struct pointers just point at a struct in a location of memory
idk
its a sequence of values, idk its like a list on scratch i guess
isnt it straight foward
yes
its straight up a list
you can have an array of everything
idk array of pointers pointing to pointers 
void******************************** is technically valid
its a pointer to a pointer that has one less stars
and thats a pointer to a pointer that has one less stars
&&&&&&&&&&&&&&
no thats not valid anymore
&*&*&*&*&*&*&*&*

idk it felt weird after using scratch now i understand i guess
actual memory access was the weirdest part
like having to allocate memory for an array is like really weird, its almost like your basically just coding in assembly
malloc() moment 
kids these days with their new operators 
if i ever use c++ i swear i might just use malloc instead of whatever it has
prefetch improved my bitmap allocator's performance by ~75%
new is convenient, that's it
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
fair
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)
insane
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)
currently analyzing nt 4.0 source leak
hmm
Page Coloring (MiRemovePageByColor) seems interesting
just found it in the leak
finally decided to make my own discord server https://discord.gg/vejHqQm3x
bump
nice
bump
this probably cause massive cache line splittings
What are you storing in struct page?
Mine's just 8 bytes
bros struct page is bigger than linuxes
yeah 🥀
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;
};
};
[0] [ 0.984540] [aerosync::core::panic] Reason: list_del corruption.
next->prev should be ffff9e933b6b1838, but was ffff9e933b6b1837.
(next=ffff9e933b6b1880)
literally off by 1
I wonder why
am i tweakin 🥀
Bros about to break the world record for the largest struct page size
(its just __aligned(64))
you should try [[gnu::aligned(512)]]
512?
plus, thats the new c23 syntax right?
C borrowed it from C++ T-T
attribute lists are goated tbh
yeah
more readable than the normal __attribute__
I hope [[likely]] and [[unlikely]] are also added to C standard
Well that's new
one day
moreover, i literally just knew that asm is a gnu extension
and its not ISO C 😭
yeah
whar??
It doesn't define any inline assembly keyword
so its implementation-defined?
Only clang, and IBM compilers supports __asm__, asm, and __asm
GCC uses the first two
while MSVC supports the latter
openxl mentioned!
classic
though i think it depends on the -std= flag
since if you do -std=c23 and use asm, clang will cry
Becuase asm is a gnu extension
it is
C23 was published in 2024
also, do you think RAII in c is a good thing (to have)?
e.g. defer
As long as it's explicit
not strictly like C++ class deconstructors tho
yes
Like no automated destructor calls
That was the reason why I switched from C++ to C
same
but just learning rust recently
use rust and theres no memory leak D:
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)
How?
🙏
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
discovered this by accident when trying mint for the fist time
which uses an older toolchain
That's weird
very
Btw Use [[gnu::aligned()]] for structs
ig so
probably just use __aligned for now
alignas for members and attribute aligned for structs
when do you think you would start trying to run usermode programs btw
not now
i dont rush to do userspace
trying to work on it rn
capellix day one feature is now on aerosync (jst after a slight 4 months)
you have kcompactd and even same-page-merging demons?
thats like revolutionary linux tech
basically
u sure about that?
really?
not sure that it is 100% correct
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
not as much as this i think
is this ai written btw
yeah...
ah
how much of the kernel in general is ai generated?
loc-wise, prob about 10-15% iirc
hm
am i getting canceled 😭
its just that the kernel looks like linux and even copies the bogus name conventions in some places
but idc, just asking
it is (trying to be) a linux clone actually
i can see that
so the naming convention is not like linux, it is 100% from linux (ported), apart from the kernel's own source
but its similar after all (just inconsistent)
u use gpl2 so its whatever, but still funny
what is funny?
like if u showed me the code id just say that its linux
i know these parts of the mm quite well
oh i see
very nice
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
adding DRM support
renamed linearfb to simpledrm
linearfb is officially dead
FKX_{PRINTK,PANIC}_CLASS will be deprecated
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
maybe FKX modules are comming to an end...
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)
what did i do?
when are you gonna start porting userspace programs?
id say r0c7-r0c9
so i can get it before tghe fist full release
whats a r0c7
thats my releasing scheme
currently r0c4-5.4.9
why do u need such an overcomplicated version number
https://semver.org/ this is not enough for your project?
i was very expecting people to ask this question
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
its not really that semver isnt enough, looking back to the scheme
<EPOCH>.<FEATURE>.<PATCH>
is basically semver
so i basically got 2 versioning in one string

like how windows 11 is windows 11, but windows 11 22h2 is not windows 11 24h2
*im genuinely have no idea what im doing 👍
wtf is that versioning
my versioning
the first half i told you
is what you need to mean
and the rest is internal use
release 0 candidate 4
linux uses the release candidate (RC) scheme
for example, 6.19 is mainline, stable
but 6.19-rc1 is the first "beta" version of 6.19
thats semver
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
a normal user would not know its a veta ver
least confusing version method
depends...
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)
you cant unsee it rightnow
bro im calling the police
🙏
anyways
implementing initcall (fr this time)
whats a initcall
and btw how many programs do you think you can run
if you start wokring on userspace rn
git describe --tags --always --dirty will be as deceefd-dirty
basically starting stuff in a correct way (and ofc linux-inspired)
are you doing linux bin compat btw
yeah, even down to how the kernel itself parses the ELF
(using binprm)
yea you can probably run like
supposedly
kdeplasma rn
considering the fishix guy only have 15k lines of code and you have 60k
lmao no
*130K
with deps lol
w/o its only 40K 🥀
lol
*external headers excluded
so uh what program do you think you cna run
if you just start working on userspace rn
currently none
i abandoned the thing for so long
*note that the loader is broken not the scheduler is broken
if i started to fix it now?
probably 2 weeks but yeah
yea
doable
not sure but if it have raw fb support then fine
i also doesnt have SHM, IPC, sockets
so yeah
ohh
thats /resources in my case
how hard do you think getting the other programs to use your fhs system can be?
i feel like its gonna be pretty hard
unless you have symlinks
one fun fact
C:\Windows\System32 existed just becasuse microslop must not and will never break compat
microslop moment lol
System32 contains 64 bit, SysWOW64 comtains 32 bit
and System itself is 16 bit
💀
*mostly
moreover
iirc in windows 2000
microslop actually but sol.exe and cards.dll in System32
basically the solitare game
lol
becasue it was tehre to demo the drag and drop feature
putting games inside kernel
so they think its a "core" component inside the os
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:
me
and it cant load elf
doesnt your kernel only have the nessery stuff in
at least mine can load macho, aout, pe32+ and elf
is pe32+ the .exe format?