#Zinnia

1 messages ยท Page 29 of 1

near tartan
#
  • finally implemented freeing page tables (yes)
#
  • munmap (smp to be fixed later)
#
  • virtio_gpu ghosting (fixed by uploading the fb before setting scanout)
#
  • a bunch of stupid pty issues
grave peak
#

Nice

hybrid island
#

Nice

drowsy tendon
#

Nice

somber solar
#

still no zinnia logo?

near tartan
#

the logo is missing colors iirc

near tartan
#

@drowsy tendon @somber solar what was the state of that anyways

#

i forgor

drowsy tendon
#

i couldn't make one (skill issue) but ilo had their own generator do one

#

i can dig it up and see how to add color to it

near tartan
#

:3

somber solar
near tartan
somber solar
#

make sure to remove the trailing spaces at the end of the lines

#

adding colours shouldn't be hard

near tartan
#

good enough

#

i might use this as a base for more

drowsy tendon
#

@near tartan

#

hopefully the screenshot doesn't butcher the color quality

near tartan
#

๐Ÿ˜ญ

drowsy tendon
#

bruh ๐Ÿ’€

#

gimme a moment

near tartan
#

bruh discord moment

#

it works on laptop

drowsy tendon
#

oh

#

crazy

near tartan
#

ts so peak

drowsy tendon
#

i thought it was Windows snipping tool being shit troll

drowsy tendon
#

hopefully it's just a simple issue in the config file but i cba checking now KEKW

near tartan
near tartan
#

now to patch this in

somber solar
#

๐Ÿ”ฅ

near tartan
#

@somber solar

near tartan
somber solar
#

puts \n

#

laugh at this user

near tartan
#

yeah yeah

hybrid island
#

no newline at EOF?

near tartan
hybrid island
#

when you cat hello.c

#

I see it does not have a newline at EOF

near tartan
#

yeah

#

because i didn't have one

#

i edited this file in zinnia

hybrid island
#

good good

near tartan
lofty copper
#

Why is everyone suddenly getting GCC nooo

near tartan
#

shrug

#

man every time i see your nickname i get sad that i didn't continue the microkernel

somber solar
near tartan
#

idk

#

it just works

somber solar
#

default is monochrome

#

is it not

near tartan
#

but this is the weston terminal, which defines TERM=xterm

somber solar
#

I have xterm-256color defined

hybrid island
#

Especially compared to the likes of Wayland

near tartan
#

yeah gcc is much tamer

#

i just messed up my path

lofty copper
near tartan
#

depends

#

libudev i have fixed now

#

you do need signalfd, eventfd, timerfd and epoll

#

but those are relatively easy to implement

#

suffering from success

#

my weston works but now X can't find any screens anymore

#

im crine

near tartan
#

i think it's time to run os-test

drowsy tendon
near tartan
#

no

#

bunch of stupid little fixes

drowsy tendon
#

ahhh i see

#

good job anyways <3

near tartan
#

i added a basic rtc driver

#

so now it also shows the correct date

#

gnumake still doesn't work

#

rup

drowsy tendon
#

sickkk

near tartan
#

rip

drowsy tendon
#

aw

#

๐Ÿฅ€

near tartan
#

i have no clue what make's problem is honestly

#

it always says nothing to be done for 'all'

#

oh wait

#

maybe i should fix the EINVAL

#

๐Ÿ’€

near tartan
#

code for wayland has been merged

eternal wharf
#

wayland init... ok

near tartan
#

but i'll take a break from this for a while

#

i'm going to mess with my shitty microkernel design

#

just to feel something stare

#

idk why but now that i have implemented all these features i'm getting really bored of rust

hybrid island
#

marvin try not to switch projects challenge (impossible)

near tartan
#

it's just always the same

#

idk i just don't enjoy writing it that much anymore

lofty copper
#

Just rewrite it in C++ trl

shy turret
#

Zig time trl

hybrid island
near tartan
#

considering i'm a full time SWE not really ๐Ÿค”

hybrid island
#

๐Ÿ’€

#

give yourself a literal break man

#

because like this you'll end up burning out

shy turret
#

+1 on taking a break

near tartan
#

wtf happened here

hybrid island
#

forgot to add renamed file destination?

near tartan
#

not really

#

i think jinx fucked up

#

the seatd patch is 7k lines lol

near tartan
#

that should be fixed...

#

okay that's now also merged

#

lets see what CI thinks

near tartan
near tartan
#

ran os-test on zinnia

#

my everything handling is abysmal

hybrid island
#

lol

near tartan
#

my score is higher than redox tho trl

hybrid island
#

lmfao

#

show summary

near tartan
#

nvm

#

it's not really comparable

#

it didn't even get to run certain tests

#

as you can see basic only ran 234 tests

fossil yoke
near tartan
#

right now it is

#

but i have an older version that uses a completely different codebase

fossil yoke
#

ohh

#

btw does being modular on compile time counts as modular

#

or do you need to load .o's at runtime

near tartan
#

that's just being configurable

fossil yoke
#

rip

near tartan
#

i have modules as dylibs

#

i actually load full shared objects as drivers

#

for the microkernel I'll not use any AI at all to write the code itself

#

i have to admit i got a bit lazy with delegating debugging to the clanker

near tartan
#

i deserve this

#

@lofty copper rust indeed

#

c23 my beloved

lofty copper
#

C++26

near tartan
#

i dont even have a cross compiler that has support for that

grave peak
#

jai

median forge
near tartan
lofty copper
#

c++23 is also quite good

shy turret
near tartan
#

I'd need to update

lofty copper
#

"I'm using llvm 19 and it's fine"

near tartan
#

i have llvm 21

lofty copper
#

I haven't bothered with rebasing because I haven't really had any issue with it

near tartan
#

iirc mesa wanted it

lofty copper
#

Also, why use gcc in the first place?

#

(My gcc patches are for gcc 12 ultrameme)

near tartan
lofty copper
near tartan
#

gcc is faster to compile KEKW

#

i like having a second opinion

lofty copper
#

I stopped using gcc becuase of a compiler bug with C++ templates

storm bobcat
near tartan
#

naw

near tartan
#

tfw jinx just nuked my kernel changes

near tartan
#

microkernel is doing microkernel things

#

uacpi from userspace

#

no idea why it's so slow but w/e

#

the allocator is pretty bad

grave peak
#

how is 2M slow โ˜ ๏ธ

near tartan
#

this is userspace

#

it should be faster

#

no?

grave peak
#

if u optimize it really well i guess

near tartan
#

tru

grave peak
#

but 2m is pretty decent

near tartan
#

fair enough

#

i still need to reason about my IPC model

#

especially moving big buffers

marsh holly
#

Microbenchmark it harder

grave peak
#

i mean he said allocator is pretty bad

near tartan
#

it's eagerly mapping things and every anon alloc is a syscall basically

#

plus it's not single threaded

#

there's initd and posixd running at the same time

near tartan
#

or well

#

i can have all data only IPC be shared memory

#

then have a syscall to transfer object handles

#

rn my channels can pass a buffer of bytes + buffer of handles

lofty copper
#

managarm's ipc is very cool

near tartan
lofty copper
near tartan
#

yeah

lofty copper
#

Otherwise you can just litter its namespace

near tartan
#

right now i just listen to a channel with a byte and handle buffer

#

like, you can say you are expecting at most N handles

#

then you don't get more

lofty copper
near tartan
#

dam

lofty copper
#

Then if you don't want them, you can reject them

near tartan
#

why 4?

lofty copper
#

And I have async send + sync receive, and my messages take ownership of handles while being sent

lofty copper
near tartan
#

yeah my messages also take ownership when you send them

#

as in, unless you clone them, you lose them

lofty copper
#

Sometimes you need to send a reply right + 2 of them, so I made it 4

#

If you want more, just send it in several messages

lofty copper
#

But then of the thread dies, it frees its messages and handles within them

near tartan
#

is that a problem?

lofty copper
#

No

#

But it creates a system, where you either receive a reply or a notification that the handle had been deleted, so if the server crashes or whatever, before it accepts the message, you're not left waiting for the reply forever

eternal wharf
near tartan
#

gee i wonder why

#

(totally not inspired by it)

eternal wharf
#

:^)

near tartan
#

the only other idea i had for IPC was nova's UTCB thing

lofty copper
#

I was loosely inspired by mach

#

But I changed my IPC 2 times now

#

Like not fundamentally, but just had 2 big additions

near tartan
#

i will probably change things as i go on and learn

eternal wharf
#

also is the zinnia that ran weston kil?

near tartan
#

it's still up

#

i'm not replacing it until i get at least to the same state

#

aka until i can run weston again

#

i wanted to get it done in a monolithic design first so i have a thing to base it off of

#

which will probably make implementation easier, i just need to translate it

eternal wharf
#

port the entire monolithic zinnia kernel to a single server :^)

near tartan
eternal wharf
#

?

near tartan
#

posix subsystem :^)

lofty copper
near tartan
#

would probably improve throughput

lofty copper
#

I guess it depends on your design, but maybe

near tartan
#

maybe vfs and posix stuff in one server

#

and all drivers in another

lofty copper
#

yeah

near tartan
#

that was my initial idea

lofty copper
#

Idk, I'm making it be a server per thing

near tartan
#

i probably just want to have one server for the system then

storm bobcat
near tartan
#

what idea

storm bobcat
#

Microkernel

near tartan
#

but like

#

splitting vfs and posix things makes little sense for example

#

because both go hand in hand

storm bobcat
#

Yes

#

But you wouldn't put a filesystem server in there

#

Or a disk driver

near tartan
#

well yeah

storm bobcat
#

Maybe filesystem is ok but you're pushing it

near tartan
#

i wouldn't put drivers in there

#

filesystems are drivers imo

storm bobcat
#

Idk you said you wanted one server in the system

near tartan
#

no

#

for the system

storm bobcat
#

Which kinda goes against the point of a microkernel

near tartan
somber solar
#

microkernel but servers are in ring 0

near tartan
#

galaxybrain free overhead

storm bobcat
#

but with protection keys

somber solar
#

no protection

storm bobcat
#

That's not been really explored in an entire OS yet

#

Though

#

I'd guess mostly because of lacking hardware support

near tartan
#

hear me out

#

ok nvm i'm retarded

#

unless

#

let me experiment with this

#

i think i found a funny ipc method

brisk totem
#

and cant really be used to make this secure

near tartan
#

oh man i missed C so much, no longer have to wait 15 seconds to do a cached build

storm bobcat
#

Why?

grave peak
storm bobcat
#

There's some paper that added them to isolate Linux drivers

#

It's pretty cool

storm bobcat
brisk totem
#

in c you can just yolo everything meme

brisk totem
#

you can only make memory not writable

grave peak
#

ideally thats all u want to prevent bad drivers from corrupting the kernel

brisk totem
grave peak
#

its not for like rop or isolation

storm bobcat
#

The point is to catch bugs more than malicious code

grave peak
#

yea

brisk totem
#

apple has a feature like that but it lets you configure everything separately

#

so its useful for security

grave peak
#

iirc the fil-c guy said it wasnt that great either

brisk totem
#

iirc the kernel variant is pretty good

grave peak
#

maybe

marble salmon
#

posix-subsystem is not equivalent to Linux

near tartan
#

linuxd

marble salmon
#

posix-subsystem does precisely:

  • process management
  • some pseudo FSes
#

and nothing more

storm bobcat
marble salmon
#

It does not do on-disk file systems or other devices

storm bobcat
#

I think Apple's is better than intel's

somber solar
near tartan
#

i think for now, doing the channel based message passing is fine

brisk totem
#

how should i deal with cycles

lofty copper
brisk totem
#

like if you send a handle to a channel on that channel

brisk totem
lofty copper
brisk totem
#

well no i do need that

lofty copper
lofty copper
#

like it seems like a simple check idk

lofty copper
#

how do you send stuff?

brisk totem
storm bobcat
#

I know how to do proper synchronous IPC but idk how to do async

brisk totem
#

and you have complicated locking

lofty copper
#

do you mean handles to send or to receive?

brisk totem
#

and also a "call target" handle that im just going to make unsendable

lofty copper
#

idk, so far I've been fine with non-transferable receive channels, and it's not a problem for send rights (however that would translate to other designs)

#

I mean I'm thinking about making my send optionally synchronous as well, and I would have different deadlock problems there as well

#

To which the solution is to either trust that userspace doesn't do stupid stuff and make it its fault for deadlocking itself, with no detrement to the kernel, or to somehow be nice and detect it, like what else can you do

marble salmon
near tartan
marble salmon
#

that's what Managarm is doing in some cases

brisk totem
marble salmon
#

yeah

brisk totem
#

ok after further analysis, im also going to have to restrict processes

#

to prevent resurrection; that is, after a process exits, the resources are always released and you cant bring anything back

marble salmon
#

you can implement revocation trees

#

that is, track from which capability another capability is derived

#

and then have a revoke() syscalls that revokes all derived capabilities

#

this is done by various L4 like microkernels

#

also, a system that I added in BlueRock's microkernel system is ranking of capability spaces

#

where you assign a rank to each capability and to each capability space and you can only put a capability C into space S when rank(C) < rank(S) (or similar, you could also reverse the direction)

#

this prevents cycles by design

brisk totem
#

that solution feels a lot like what you have with universes in lean and similar theorem provers

marble salmon
#

yeah

brisk totem
#

i like that

#

it also very nicely deals with pagers

marble salmon
#

i may have stolen it subconsciously from type theory meme

brisk totem
#

lol

brisk totem
brisk totem
#

and you can only map memory with a rank < your processes rank

#

and you can only do ipc if the source region has an appropriate rank

brisk totem
#

yeah so i also have one more rc cycle

#

an async op needs to point to the target queue

#

because thats how my locking hierarchy works

#

but then if you send a message to its own queue and then close the handle you deadlock

#

actually i think you can solve this by using a globally sharded lock

#

and then once you hold that lock, the pointer must be valid or something

near tartan
#

weston inside of weston is kinda funny

#

i've reworked the virtual memory allocation so no more bump vmem allocator for userspace or kernec

#

i really want to be able to host my own website on this

#

that includes

#
  • get smp back working
  • fix make
  • virtio-net driver
  • tcp/ip stack
  • refactor the socket api so it's not superaids to write code for
#

i really want to run os-test to completion at least once, but for some reason it sometimes starts hanging while running sub makes

marsh holly
marsh holly
steady echo
near tartan
#

(no tlb shootdown ipis lol)

near tartan
#

i also really need to fix mesa, not sure what its problem is

#

i have to run weston with pixman gl renderer

near tartan
#

@nocturne rampart how does lwip work

nocturne rampart
#

Or are you going to hotglue some c rust interop

near tartan
#

oh wait it's just something you integrate in the kernel?

hoary cave
#

yes

near tartan
#

L

#

I'm not using that then

#

uACPI is the only case where it's reasonable to have C interop

hoary cave
#

you just implement sysdeps and callbacks

near tartan
#

i should implement udp first

#

before even thinking about it

hoary cave
#

lwip is a netstack

#

it gives you tcp and udp

nocturne rampart
hoary cave
#

yeah, as i said

#

you just give it a few callbacks that let it talk with the nic

nocturne rampart
#

Yeah

near tartan
nocturne rampart
#

Yeah implement some nic ig

hoary cave
#

did bro think lwip is a bunch of drivers or what ๐Ÿ˜ญ

nocturne rampart
hoary cave
#

fuck that

#

virtio is so much simpler

nocturne rampart
#

But since you already have virtio gpu

#

Yeah net makes sense

hoary cave
#

it's not like he's got any e1k hardware

nocturne rampart
near tartan
#

i already have virtqueues

nocturne rampart
#

Yeah then do net ig

near tartan
#

i thought it was a userspace thing

#

I didn't read any docs

hoary cave
#

i still dk what you thought it did in userspace but all good

nocturne rampart
#

But yeah it's an entire network stack essentially

hoary cave
#

uacpi can also run in userspace fwiw

near tartan
#

idk im at work and it's doing my head in

#

im leaving now tho

hoary cave
#

just go home

marsh holly
#

Lwip is the cowards way out

near tartan
#

bro i already said im not doing it

#

im not mixing more c code

brisk totem
#

smoltcp is the slightly less cowardly way out (at least its not in c + i think its a slightly better library for kernel at the cost of being rust shit)

near tartan
#

I don't really want to make a libOS

#

i already have few dependencies

#

e.g. syn, bitflags and seq

brisk totem
#

thats fair

near tartan
#

i will look at it for reference tho

near tartan
magic charm
#

read TCP/IP illustrated vol 2

#

if you read it too carefully you will exactly reproduce the BSD Net/3 networking stack but that's no great loss

near tartan
near tartan
near tartan
#

@hoary cave i fixed MSI-X

#

nvme is now using it too

#

instead of looping

#

i just had it as an infinite todo

#

but turns out you can't really poll a nic on a single cpu system, so i had to fix it

#

i also discovered a very funny scheduler bug

#

that's a me not knowing rust issue

#

and leaking thread Arcs

hoary cave
#

zamnnn

lofty copper
#

I had a funny bug in my scheduler once, where it was randomly and quietly erasing threads from the existence, because all of the smart pointers were unreferenced

near tartan
#

lol

lofty copper
#

And like the kernel was doing a great job of reclaiming resources and stuff, so like stuff was just disappearing with no trace

hoary cave
#

in rust itโ€™s easy to mess up too, but like itโ€™s just a few isolated unsafes so itโ€™s also pretty easy to verify it

near tartan
#

yeah it was in an unsafe block

#

of which there only a few in the scheduler code

#

i really need to fix smp

#

i also found a bug in waitpid, which probably explains the odd make behavior

#

maybe once all those are done i can finally complete an os-test run KEKW

nocturne rampart
near tartan
somber solar
#

smp when memedown

grave peak
#

KDE first, then SMP

#

the fishix route

near tartan
#

@grave peak hello

lofty copper
#

wait, how does it not have smp?

near tartan
grave peak
near tartan
#

ssh

grave peak
#

ssh

near tartan
#

i kinda vibecoded some part of TCP

#

but what it threw out was utter garbage

grave peak
#

u were supposed to save us

near tartan
#

i wanted to see if it can do it

#

it's half decent

#

the other half is braindead

#

im keeping the constants

#

they seem correct

#

it did shit like THIS

#

totally unsalvageable

somber solar
#

totally unsalvageable
salvaged

near tartan
#

no i just removed this shit

#

there's more of this btw

near tartan
#

technically i did salvage stuff

#

i kept the socket trait impl

#

AGI

storm bobcat
#

In good rust

near tartan
#

it's not good rust

#

i'm still rewriting it

#

it wrote c++ as rust

near tartan
storm bobcat
near tartan
#

yes

#

you don't need this function at all

#

this is what i do

#

it just maps to the uapi constants

#

it does it all implicitly

#

๐Ÿ”ฅ

#

this is so fucking cool

#

(it does require yet another mlibc ABI break)

hybrid island
near tartan
#

probably

hybrid island
#

What model/structure do you use to represent and interact with devices?

#

I'm looking for ideas for device subsystem rewrite 2.0

hybrid island
#

oh god xd

#

do you just slap some BS spaghet together or smth

near tartan
#

there's no standard model, you have FileOps at most

#

to expose to userspace /dev

#

the rest uses specialized traits for whatever they're implementing

hybrid island
#

welp

#

worth a shot

#

I would like a more structured model in my kernel

near tartan
#

i don't see the need

hybrid island
#

don't get me wrong there's no need for anything in BadgerOS to be as overengineered as it is

storm bobcat
hybrid island
#

that part is for fun purposes

storm bobcat
#

its nice

hybrid island
#

looks very nice, though not sure how I'll deal with anything potentially inheritance-based in Rust

storm bobcat
#

vtables

hybrid island
#

well yea

storm bobcat
#

also doesnt rust have inheritance basically

hybrid island
#

non

#

Rust has traits

#

You can simulate inheritance

#

But there's no class-style inheritance unless you make it all manually

near tartan
#

it's big pain in rust to do that

#

OOP is very nice in a kernel

hybrid island
#

yup

near tartan
#

driver model maps well

hybrid island
#

thus why I said that

storm bobcat
#

probably better than in C

hybrid island
#

I guess so

#

You can still do it, e.g. with an "is a device" trait that just gets you the pointer to the base device struct, and then the actual implementations go in an impl dyn Trait + '_ {} (trait-associated functions without dynamic dispatch)

nocturne rampart
nocturne rampart
near tartan
#

yes

nocturne rampart
#

Browse the web using Zinnia

near tartan
#

send recipe

nocturne rampart
near tartan
nocturne rampart
#

Ts is a pain to cross compile

#

Or well skill issues from me

near tartan
#

u don't say

#

i need to do dhcp

nocturne rampart
#

Same

#

I want to do it from userspace

marsh holly
#

dhcp in kernel โ˜ ๏ธ

near tartan
#

dns in kernel chad

brisk totem
#

i mean better dns in kernel than dns in every process with no global cache ngl

near tartan
#

/dev/hosts

marsh holly
#

just spinup an sqlite database in /tmp? problem, liberals?

near tartan
#

who needs databases

#

it's called ext2

brisk totem
near tartan
#

nvme working on real hw again

hybrid island
#

nice

near tartan
#

I'm assuming Weston won't render because of drm memes

#

because this is not a DMT resolution

#

ugly

near tartan
near tartan
near tartan
#

at last

#

i have closed the one remaining issue on the github repo

#

no idea why it says invalid license

#

probably github dying (again)

somber solar
#

time to switch to codeberg meme

near tartan
#

i have made some small scheduler changes

#

also used clanker to debug leaked tasks

fossil yoke
#

cant they just copy github's ui or something

somber solar
near tartan
#

work stealing and so on is working

#

but no tlb shootdowns

cyan nexus
#

bc their uptime was bad

near tartan
#

though github also has a worse uptime recently

cyan nexus
#

i haven't really noticed any problems with it

#

and i push like 4 times a day

near tartan
#

you must not be using it professionally

cyan nexus
#

prob

near tartan
#

just a few days ago none of the pull requests were working xd

cyan nexus
#

๐Ÿ’€

near tartan
#

and they lost some in the process

cyan nexus
#

thank god i have my self hosted gitlab as primary

#

lol

near tartan
#

i have a selfhosted gitea but i won't use it for this project

near tartan
#

i need to port rust

#

and vim

marble salmon
#

Didn't you say that you reached your goals with menix? halfmemeleft

brisk totem
near tartan
#

when has my opinion on something ever stayed the same for more than 2 weeks

#

i still need xhci to be more usable

#

also a bunch of posix correctness fixes

#

but that can wait until managarm work is done

near tartan
#

to the point where shit just breaks randomly if you're not careful

#

and i can't even complete a run of os-test yet

brisk totem
near tartan
#

well

#

it's hard to describe

#

it runs like 4-5 tests, then gets stuck doing whatever until i press ctrl+c

brisk totem
#

okay so hang

#

got it

#

have you tried gdb

near tartan
#

no use yet

brisk totem
#

like seeing what the thread is stuck in

near tartan
#

it goes to sleep it seems

brisk totem
#

yeah what kind of sleep

#

lol

near tartan
#

like idle

#

sti hlt

brisk totem
#

okay yeah but then why is the thread not schedulable

near tartan
#

haven't debugged that

brisk totem
#

i see

near tartan
#

it's likely an issue with waitpid

marble salmon
#

os-tests is not really forgiving when it comes to hangs

#

The tests run w/o a timeout so a single hanging test will stop the entire testsuite

near tartan
#

hm

#

oh another funny thing

#

in curl, when you don't get a response it just stalls

#

I don't think there's a timeout happening

brisk totem
#

ubbbbb

#

and i imagine this doesnt help either

#

i have no idea if its a bug in my scheduler mockup but uhh

#

yeah idk the scheduler wakign functions look sketch

near tartan
#

but thanks

#

i rewrote the scheduler with the ULE paper

brisk totem
#

ah okay

near tartan
#

(and copied some parts but from the freebsd impl but shh)

brisk totem
#

lol

brisk totem
near tartan
#

i had the clanker check out the event handling trl

#

it's slightly less ub

brisk totem
#

send code

near tartan
#

not home

brisk totem
#

ah ok

near tartan
#

what's the setup like

#

i need to test my stuff more for ub

brisk totem
#

and i made a very bad mockup scheduler

near tartan
#

lol

brisk totem
#

that knows how to make tasks wake up vaguely correctly

shy turret
near tartan
#

we're too chonk

near tartan
#

i have started working on refactoring my block io system

#

it allowed me to get rid of a lot of unsafe blocks in driver and fs code

near tartan
#

It appears that device hotplug kind of requires userspace to get notified of such events

#

I'll add a freebsd devd compatible API to the kernel

#

I can't really reuse the code directly sadly, but this will go hand in hand nicely with libudev-devd to provide libinput data

fair lintel
#

port systemd-udev to FreeBSD atp trl

near tartan
#

believe it or not, devd is very simple

#

code wise

grave peak
#

do u have any use for device hot plug in mind already?

grave peak
#

ah

near tartan
#

fuh no

#

that doesn't solve anything

#

just more systemd kanker to deal with

somber solar
#

it's used for notifying udev

near tartan
#

yes but udev is hard to cross compile

somber solar
#

skrill tissue

near tartan
#

sorry for not being a 1:1 linux larp

#

I don't want to do sysfs

#

udev pretty much hard assumes linux everything from what I've heard

marsh holly
#

Ewwwwwdev

near tartan
marble salmon
#

udev hard assumes linux, yes

#

It's not meant to be portable

#

All OSes have their own device enumeration mechanisms, more or less

near tartan
#

exactly

marble salmon
#

Implementing netlink is not hard but you'll be forced into linux's device model or you'll need to create shims for all classes of devices (the latter is what Managarm does)

#

Since your /sys layout needs to be linux compatible

#

and "compatible" really means "quirk compatible". For example putting the same device at a different spot or with a different name will not work in all cases

grave peak
#

just embrace being a linux trl

#

join the linux squad

somber solar
somber solar
#

ok mr smp after wayland

marsh holly
#

Larp as a unix workstation, do NOT join the linux larpers

#

You need to larp correctly marvin

near tartan
#

W

grave peak
#

thor binary compat or bust

near tartan
storm bobcat
#

Be actually unique and larp nothing like me

near tartan
#

i mean I'm just mixing and matching apis how i like it

marsh holly
#

Larp as a larper. Make zinnia look like a kernel shell os

storm bobcat
#

Well I do larp but I larp a bunch of stuff at the same time

lofty copper
magic charm
near tartan
#

dead os

#

it's safe to say that SMP is working somewhat stably

#

so far zero crashes

#

just the usual signal memes

near tartan
#

yooo

#

zinnia was able to detect my B580

hybrid island
near tartan
#

no

#

intel arc b580

hybrid island
#

huge

#

Are u gonna make drivers for it?

near tartan
#

not for now

#

especially not by hand

#

it's just way too much code lol

#

if i did, i would get clanker to analyze the linux xe driver and see where to start

near tartan
#

I HAVE XFCE

#

LETS FUCKING GO

#

@marsh holly

#

i am now using libudev-devd

marsh holly
#

holy

near tartan
#

no clue why this is so fucking slow

#

takes ages to run anything

#

also where decorations

near tartan
#

fucking hell do i need librsvg for this shit

near tartan
#

yo it can even detect the correct resolution

#

it's is horribly slow tho

#

it takes like a minute to open a window

marble escarp
near tartan
#

if i knew i'd have fixed it lol

marble escarp
#

I see. I was just curious.

#

Sometimes the fix(es) aren't easy.

near tartan
#

that is also fucked

#

@nocturne rampart

nocturne rampart
nocturne rampart
spark surge
chrome tinsel
median forge
near tartan
near tartan
near tartan
#

this is working better now

#

i'm switching my weird event abstraction to actual rust async

silver birch
#

memory: 0 bytes ๐Ÿ˜ญ

grave peak
near tartan
median forge
#

zinnia is new 0 bytes kernel

near tartan
#

i mean if it does proc/self/mem then it won't work

silver birch
#

lmfao

#

the reddit post of the other day

median forge
#

where's 10k upvotes

near tartan
#

i should really get started on xhci do i can test real hw more

median forge
#

boot protocol or hid

near tartan
#

hid ofc

#

and well

#

MSD

#

i care more about that

#

my laptop has ps/2 kbd

hoary cave
#

boot protocol is hid, btw

#

what you're thinking of is report protocol

median forge
#

k

marsh holly
#

doing full hid, at least enough for most sane keyboards/mice, is not that much more work compared to boot protocol when you take in consideration everything needed to get to that point

near tartan
#

note to self

#

os-test hangs here

near tartan
#

i have ported LightDM

#

time to upstream all of it

silver birch
#

nice

fair lintel
near tartan
fair lintel
#

see the managarm recipe

near tartan
#

@grave peak wtf

#

uacpi is trying to log a non-utf8 string

grave peak
#

0 backtrace, 0 context, yeah let me answer that KEKW

near tartan
#

uacpi_kernel_log gave me a non utf8 string

#

i didn't even know that was possible

grave peak
#

Try not dying on it and actually print it

near tartan
#

one sec

grave peak
#

Like how tf am I supposed to help without any info lol

near tartan
#

i didn't say that

#

just cursed that it can do that

marble salmon
#

presumably it's a bug

near tartan
#

i made it return a lossy str now

#

so let's see

grave peak
#

Yeah its possible for some firmware strings to not have utf8, but there's currently no code in uacpi to repair them tho

near tartan
#

what's weird is that this is the first line of uacpi logs

grave peak
#

First thing it should print is its own version which is a hardcoded C string

near tartan
#

ah wait no

#

it's trying to print the FACS string

#

looks like this on QEMU

#

something has gone terribly wrong with the latest kernel changes

#

on 2 of my laptops it just triple faults now

#

before i see any logs

grave peak
#

Yeah that cant print garbage since the FACS signature is verified earlier

near tartan
#

we'll see

grave peak
#

And then the next two are just integers

near tartan
#

uh

#

@grave peak

#

is this memory corruption or something?

grave peak
#

Absolutely

near tartan
#

this is all i do in this stage

grave peak
#

it's probably what you did at the before stage meme

#

i even see some ascii strings in the corrupted memory

#

did u reuse firmware memory for allocations?

near tartan
#

i hope not

#

i use what limine gives me

grave peak
#

or actually, those signatures are cached

#

so u probably dirtied the early buffer

near tartan
#

wait

#

omfg ๐Ÿ’€

#

it is a heap allocation but it gets freed one it goes out of scope ๐Ÿ’€

grave peak
near tartan
#

i have to mem::leak

grave peak
#
void *malloc(size_t size)
{
    char buf[size];
    return buf;
}
near tartan
#

basically

#

but it's on the heap

grave peak
#

u can release it only after uacpi_initialize()

#

but u know that i guess

near tartan
#

yeah

#

let me try this

#

technically speaking rust helped me here

#

because the buffer is given to an unsafe block

#

HOLY SHIT

#

LETS GO

#

even the time works kinda

#

damn

#

triple faults on the framework

grave peak
near tartan
#

i have 0 clue why it would crash on the framework

#

like, i don't even see any output

grave peak
#

time for hang debugging

marble salmon
#

or improving each fault handling

#

i guess

near tartan
#

this happens before screen init

median forge
near tartan
#

before ap spinup?

median forge
#

a

near tartan
#

i added an actual ramdisk device

marsh holly
near tartan
#

so i can boot from ramdisk

marsh holly
#

Wouldnt just a tmpfs be better? That way you dont deal with metadata overhead and it allows better integration with your memory subsystem etc

near tartan
#

?

#

that doesn't work

#

the init system looks for a block device by partuuid

#

this is so i don't need to write an usb storage driver

#

but i can still test on hw

marsh holly
#

๐Ÿ’€

near tartan
#

how is this bruh

#

this guy boots off of initramfs ๐Ÿ’€

marsh holly
#

I mean yeah U already got a filesystem there so why would you need to make another?

near tartan
#

wat

#

i don't understand what you mean

#

it's an ext2 image loaded to ram

marsh holly
#

Why have two different in-memory filesystems?

marsh holly
near tartan
#

sure

marsh holly
#

Since you have to store more shit like superblocks inode/block bitmaps etc

near tartan
#

but it's much easier to deploy

#

because i don't need to change my distro infrastructure to accommodate ramdisks

#

i already parse initramfses if that's what you mean

#

but the initramfs init will always try to mount the rootfs from a block device and chroot into it

#

i'd rather not hack in a special case to do this

marsh holly
#

I guess

#

Tung ting ting

near tartan
#

๐Ÿ’€

#

i removed so much clanker shit over the week

#

and smp works on real HW too now galaxybrain

#

@grave peak i added support for memory types in Zinnia, what type do i need for ACPI tables?

#

can i treat it as regular memory?

marsh holly
grave peak
near tartan
#

tables

#

and i guess uacpi map would be good to know

grave peak
#

Tables are wb cached

grave peak
#

If ram = wb, otherwise uc

near tartan
#

๐Ÿ‘

#

perfect

near tartan
#

this is a terrible bug man

#

i triple fault on real hw before the allocator is done

#

:D now i gotta hack in a pre-kmalloc framebuffer terminal

hybrid island
#

damn

near tartan
#

wait what the fuck

#

do i need to manually enable EFER.NXE?

#

please don't tell me bro

grave peak
#

I mean yeah

#

How was it not enabled by limine tho

near tartan
#

i havent had to do that ever

grave peak
#

Because limine

rugged shard
#

i was gonna say check the bios but what year is that machine from

grave peak
#

Its a framework

near tartan
#

2024

#

it's an amd 7040U

rugged shard
#

ah

silver birch
#

was that the very bad bug?

near tartan
#

no

#

it did not fix it

silver birch
#

hmm

near tartan
#

i keep triple faulting on the framework once i switch to my own cr3

#

this literally worked some time ago

#

idfk what could've changed

silver birch
#

are you sure the cr3 is in ram, is aligned, the stack is good, the stack is big enough

near tartan
#

yes

#

stack is inside the kernel binary so it should be loaded fine

#

there's no way this cpu supports LA57 right

silver birch
#

huh

near tartan
#

i asked clanker about it and it says that maybe the paging level doesn't match but that sounds like bullshit

grave peak
near tartan
#

yea i did not

grave peak
#

But nah its not supported im p sure

near tartan
#

la57 is likely a server thing

grave peak
#

Its only server cpus

#

Ye

near tartan
#

like you can't even get enough ram in this to saturate 48 bits

grave peak
#

But yeah you probably have a bug in direct map building code

#

Or kernel remap code

near tartan
#

likely

marble salmon
#

are you booting from limine?

near tartan
#

ofc

marble salmon
#

Managarm doesn't triple fault on that machine and it doesn't support LA57

near tartan
#

yeah obviously it doesn't have la57

#

but i'm almost out of ideas

#

like, the boot has literally worked before ๐Ÿ’€

grave peak
#

What does clanker think about your mapping code

near tartan
#

it suspects hhdm issues

grave peak
#

Bisect should take maybe 5 boots max tbh

#

If you didn't do gigantic commits

near tartan
#

:^)

#

oh wait a fucking minute

#

uh

#

@grave peak

#

do i need a CR4 bit for the Global bit

#

๐Ÿ’€

#

lol i did add the Global bit a week ago

#

mfw

#

but the question is

#

what do i need to enable to make this work

hybrid island
#

SDM checkment time?

near tartan
#

ughh

hybrid island
#

Alternative: stop using more and more extensions like global bit until you don't get 3fault

#

disable nx

near tartan
#

nx is not the problem

hybrid island
#

hell disable pat if you've got it on

#

CR4.PGE
Page Global Enable (bit 7 of CR4)

#

Looks like the G bit is indeed gated behind a CR4 bit

near tartan
#

yeah but it should be ignored even if its set

grave peak
#

yeah thats probably not it

near tartan
#

no nevermind

#

@grave peak it actually was the problem

#

global + no PGE is allowed on intel

grave peak
#

shouldnt that also have died under kvm?

near tartan
#

but not on amd meme

near tartan
grave peak
#

oh ok

#

so it would've died on kvm on that pc

#

or laptop rather

near tartan
#

ig

lofty copper
near tartan
#

(it was CR4.PGE btw)

hybrid island
#

Seems like

#

Time to download a copy of whatever AMD calls their SDM

near tartan
#

amd64 architecture manual

marsh holly
#

thats on you for setting a reserved bit troll

near tartan
#

it works on kvm

hybrid island
#

kvm != baremetal, especially wrt paging

grave peak
near tartan
#

yes

grave peak
#

can u try on amd kvm

near tartan
#

no

grave peak
near tartan
#

i don't have any amd laptop set up with it

hybrid island
#

My desktop is AMD

#

I can test for you

#

Just lob image and qemu command line at me