#Zinnia

1 messages ยท Page 31 of 1

storm bobcat
#

apparently it's pretty hard to port

#

according to marvin

near tartan
#

yes

#

according to serenity os

storm bobcat
#

maybe it's better now idk

fair lintel
#

speaking of, go would be funny

silver birch
#

what minecraft versions do you support?

near tartan
#

@marsh holly

fair lintel
#

@sick flax

silver birch
#

lol

#

the chain of porters

storm bobcat
#

go would probably be more useful than zig rn

marsh holly
sick flax
#

brother I only have so much time

#

pay me for my time I can work on shit

storm bobcat
#

ghc/haskell could be funny meme

#

ocaml

fair lintel
sick flax
#

now I get fucked for minimum wage 8+ hours a day

near tartan
#

zig is just c with an unstable abi

sick flax
silver birch
marsh holly
storm bobcat
#

has ganoo emacs been ported yet?

near tartan
#

whats that

sick flax
#

emacs

#

no

silver birch
sick flax
#

cross compile pain

near tartan
#

oh gnu

#

am dum

storm bobcat
#

yeah its build system is cursed

#

I don't think they do the unexec thing anymore tho

near tartan
#

bsd emacs where

silver birch
#

hats off to yall tbh

sick flax
#

thats good

storm bobcat
sick flax
#

but still

marsh holly
sick flax
#

pay me full time for work on <insert os here>

near tartan
sick flax
#

and I will

silver birch
#

i cant be arsed to stare at autotools garbage and messing with cross compilations

storm bobcat
#

yeah

#

but none that are as comprehensive

#

microemacs, xemacs

silver birch
#

vs code?

near tartan
#

npm ๐Ÿ’€

#

electron ๐Ÿ’€

marsh holly
#

mlibc is pretty much fully self hosting too

near tartan
#

yeah

marsh holly
#

at this point the only thing preventing astral from compiling a distro of itself is kernel instability and speed โ˜ ๏ธ

storm bobcat
near tartan
#

i think if we can get it upstreamed it might be a viable alternative to musl

marsh holly
#

musl? don't think too low little bro we are going to pass glibc

near tartan
#

no in terms of distro compat

#

since most software that has been patched to work with musl likely also fixes correctness bugs for mlibc

storm bobcat
#

from GNU

silver birch
#

managarm/linux

storm bobcat
#

but I think it's dead

near tartan
#

damn

storm bobcat
#

also rust emacs

near tartan
#

funny

marsh holly
near tartan
#

fym

marsh holly
#

talk is cheap

shy turret
#

Iirc @median forge is getting close to that

near tartan
#

but iirc that's also linux source compatible?

shy turret
#

Not their new kernel

#

They are using mlibc

#

They did gobject bullshit too

#

They have rust ported now and other gnome bullshit

#

They just need more shit to get the full DE working

near tartan
#

W

#

latest gnome doesn't work anymore without systemd

#

so no thank you

near tartan
#

i do actually

shy turret
#

Damn

marsh holly
eternal wharf
storm bobcat
eternal wharf
#

schemacs

storm bobcat
#

emacscheme

marsh holly
#

I saw that

near tartan
#

gnome screen recording is so fucking bad bruh

near tartan
near tartan
#

aaaand i broke it

#

:D

marsh holly
#

how

#

just git restore 7head

near tartan
#

i am hooking it up to lightdm

#

it works under root as you can see

#

but it ropes when ran as user

marsh holly
#

lmaoo same issue as managarm

lofty copper
grave peak
#

Not Shrek in 640x480, upvote denied

near tartan
#

fuc

#

anyways

#

i'm going to bed

#

either nobody cares

#

or i wake up to 1K stars

grave peak
#

Or you become the next serenity os

near tartan
#

@storm bobcat don't hide

storm bobcat
#

nah im not like that

grave peak
#

Logs are public you know

storm bobcat
#

I'm not ๐ŸŒˆ

near tartan
#

see, zinnia is the prime example that you can do the most stupid shit implementation ever and can still run impressive software

storm bobcat
#

everyone runs KDE...

near tartan
#

you've seen my scheduler code lol

storm bobcat
#

running windows desktop is the next thing

near tartan
#

fr

#

wine next

storm bobcat
#

nah seriously this is pretty cool

near tartan
#

ty

storm bobcat
#

when I get there I wanna do stuff a bit differently, maybe try using gentoo's portage instead lol

near tartan
#

i'd love to do more robust/correct impls, but i just half ass everything lol

near tartan
storm bobcat
#

you don't need source compat

#

I don't think so

#

it should be fairly portable

#

they ran it on freebsd ๐Ÿคทโ€โ™‚๏ธ

near tartan
#

without any new patches?

#

surely they needed at least some

storm bobcat
#

yeah

near tartan
#

i mean they also ran it on gnu turd

storm bobcat
#

but I mean it shouldn't be as bad as porting e.g systemd

near tartan
#

oh sure

#

fwiw my patches aren't that bad either

storm bobcat
#

anyway I'm mostly interested in running it on the host instead

#

like, to replace jinx or xbstrap

near tartan
#

i guess

marsh holly
#

just to flex

near tartan
#

W

storm bobcat
#

I think it'd be neat to use as a replacement for jinx and xbstrap since it has a gazillion recipes

#

obviously you'd need patches still

marsh holly
#

gotta complete the gentoo larp from using openrc

storm bobcat
#

nah you gotta use sysvinit to do the 90s unix thing

near tartan
#

s6

marsh holly
#

I wanted to do that originally but I sasw zinnia tried porting openrc and I decided to be a copying little shit

#

then marvin chickened out

near tartan
#

then i started using the vastly superior dinit

#

it's the best of all worlds

storm bobcat
#

idk what dinit is but openrc is pretty nice

#

there's also runit

#

ime, openrc has a good balance of UX and minimalism

near tartan
#

fast, lightweight, socket based, easy to port (even encouraged), 2 real distros that use it

storm bobcat
#

runit is very fast but has no UX

near tartan
#

it works very similarly to systemd, but with like 10% of the featureset

#

chimera and artix use it

#

and gentoo has recipes for it

storm bobcat
#

s6 is also a thing

near tartan
#

@marsh holly why

marsh holly
#

everybody loves systemd

near tartan
#

similar != is systemd

storm bobcat
#

average gentoo wiki W

shy turret
#

I once made a tool that unified backend init systems to work systemd style for basic commands

#

I probably should clean that up some more tbh

marsh holly
#

I've always liked openrc

#

once I did lfs but openrc instead of sysvinit and it was fun

storm bobcat
#

I think openrc is best if you want something non-systemd but dont want to mess around too much

#

since it's the most mainstream non-systemd init system

near tartan
#

that much is true

storm bobcat
#

but if you're making your own distro/OS anyway, might as well use dinit or whatever else you want

shy turret
#

OpenRC is good

#

I just hate it's command syntax

near tartan
#

you're pretty much on your own for everything

storm bobcat
#

I don't get the systemd hate tbh

#

systemd haters are losers

grave peak
near tartan
storm bobcat
#

GNU is a project comprising of many subprojects

near tartan
#

but it's not one package

storm bobcat
#

systemd is the same kinda thing

near tartan
#

tho i don't like gnu for other reasons

storm bobcat
#

is systemd all in one package?

near tartan
#

pretty much

marsh holly
#

โ˜ ๏ธ

near tartan
#

even udev is part of systemd

storm bobcat
#

I think some distros package things like systemd-boot externally

near tartan
storm bobcat
near tartan
marsh holly
#

I'm at like almost 40k lines of C code

storm bobcat
#

I have about 14k lines right now

#

13-14

marsh holly
storm bobcat
#

14kloc nothingburger

near tartan
#

i think what systemd solves is good, but they could at least try to make it more portable with other permutations that aren't gcc/linux/glibc

storm bobcat
#

yeah I agree

#

but that's not something to send death threats over

near tartan
#

I wouldn't

storm bobcat
#

(which poettering received)

near tartan
#

suckless peeps probably

#

i mean even stuff like libudev can be worked around

marsh holly
#

suckless is such a larp holy shuit

near tartan
#

i use libudev-devd from freebsd to drive my libinput

storm bobcat
#

but same line of thought

near tartan
storm bobcat
#

I'm gonna have a linux compat layer but I'll probably also try doing my own stack

#

doesn't sound that fun to me to endlessly port linux stuff

shy turret
#

I want to do Linux compat myself

#

But with a userspace translation layer

#

Ala wine

marsh holly
#

I don't really care about porting the shinniest new DE or whatever

#

I want astral to have a specific look and feel and not just generic linux larp #1000000

storm bobcat
near tartan
#

Linux compat sadly implies very deranged api crap I'd rather just not deal with

shy turret
near tartan
#

I'm fine with my small subset of linux+bsd apis

storm bobcat
#

most apis can be implemented in terms of other (saner) APIs

#

like epoll can be implemented with kqueue

#

as kqueue is more powerful

near tartan
#

yeah but then it's more work to implement

marsh holly
#

yeah if I ever implement epoll I will do it with kqueue

near tartan
#

i have no real need for kqueue

storm bobcat
near tartan
#

not really

#

i run a gazillion apps right now

#

but the impl is without kqueue

marsh holly
#

I have also thought of implementing dee arr emm for eventual 3d accel

near tartan
#

i agree that kqueue the better interface

near tartan
#

my drm impl is about 3k lines now

#

without accel

marsh holly
#

if I were to implement drm I would probably spend a while learning how it works with 3d accel to do it with that in mind out of the box

near tartan
#

i need to continue the b580 driver

marsh holly
#

because I have no reason to implement drm otherwise

near tartan
#

modesetting?

marsh holly
#

limine

near tartan
#

how is that modeset broski

storm bobcat
#

I'd do virtiogpu before a real gpu

marsh holly
#

RESOLUTION=1920x1080x32

#

ezzzz

near tartan
#

i did too

storm bobcat
#

yeah but no accel

near tartan
#

for the record nobody has managed to get working 3d accel yet

shy turret
near tartan
#

leo has tried but failed

marsh holly
#

just sloperate it troll

shy turret
storm bobcat
#

and beat you to the punch

near tartan
#

see you in 2032

storm bobcat
#

I am trailing behind already

near tartan
#

what count is on the inside

#

zinnia is pretty bad on a technical level

marsh holly
#

rewri

near tartan
#

it just does a lot of bad things which can run stuff

near tartan
marsh holly
#

no

#

C++

#

async c+

near tartan
#

L

marsh holly
#

if you complain I make you rewrite it in ada

near tartan
#

I'll replace all my syscalls with io uring

storm bobcat
#

rewrite in zig

#

the name starts with a Z already

#

so you're already almost there

near tartan
#

i don't get the point of zig still

#

it's just C but with a less mature toolchain

storm bobcat
#

I'm not a zig shill but I like that it's C but it allows me to do more modern language stuff

#

I'd probably use C if I were to start again however

#

"claude rewrite in C make no mistake"

near tartan
#

i don't hate zig, but I don't see it as an alternative to C/Rust

storm bobcat
#

I don't htink you can put rust on the same level as C

#

it's more of a C++ alternative

near tartan
#

yeah

storm bobcat
#

whereas zig is more on the C level

shy turret
#

Zig has some things I dislike

storm bobcat
#

imo it's the only C replacement/modern C that actually has a chance to succeed at doing so

marsh holly
#

make it a C microkernel with lua JITed servers

shy turret
#

Along with some rust stuff

#

I really don't know but

#

They just put me off

#

I really like C, JavaScript typescript go and crap

near tartan
#

make a c microkernel with managarm abi compat

storm bobcat
#

pain

near tartan
#

\s/c/zig/

storm bobcat
#

since all zig OSes suck

#

I can claim to be the first one not to suck and actually do stuff

#

which is instant aura

near tartan
#

same but in rust

storm bobcat
#

man "linux-compatible kernel written in zig" is gonna make numbers on HN lol

#

HN bait 101

marsh holly
near tartan
#

redox couldn't run x11 up until a few months ago

#

and relibc is bad

#

look at the os-test score bruh

#

almost down there with minix

marsh holly
#

coper

shy turret
#

It's called relibc because they need to restart it

#

Scrap it

#

Rewrite it from scratch

near tartan
#

re***** libc

#

we have a bot that logs these btw

#

idk why

storm bobcat
#

can someone spam the N word to hide it

shy turret
#

Nah that channel don't log the n word

storm bobcat
#

sec imma try

shy turret
#

๐Ÿ’€

storm bobcat
near tartan
#

what should i port next (I'll probably continue working on usb mass storage kernel side)

shy turret
#

No don't

#

You will get muted

near tartan
#

i was thinking maybe audio stuff

#

or supertuxkart

storm bobcat
#

proper doom would be nice too, like gzdoom

marsh holly
#

codex cli is opensource and you have rust so unironically you could

shy turret
#

I did accidentally say it today in #staff though as a typo of schrodinger

#

๐Ÿ’€

marsh holly
#

become the first slop operator ready OS

storm bobcat
#

isn't codex nodejs?

near tartan
marsh holly
storm bobcat
#

why is it installed via npm then

#

weird

marsh holly
#

fuck if I know

#

probably claude code told them to when they were using it to write codex

near tartan
#

if you don't you're ngmi

storm bobcat
#

honestly porting stuff sounds like a really good use case for clankers

near tartan
#

it is

marsh holly
#

yeah

near tartan
#

but they produce still a lot of bullshit

#

like, to debug lightdm failures, claude literally started injecting its patches into my image via debugfs

#

can you not

#

but letting it review code is good for catching oversights

marsh holly
#

claude, fuck my wife make no mistakes

near tartan
#

i don't have a wife

#

so fuck myself i guess

storm bobcat
near tartan
#

i have a plan i think

#
  • finish usb msd
marsh holly
#

claude really be injecting shit into your porject

#

๐Ÿ˜ญ๐Ÿ˜ญ

near tartan
#

i usually revert everything it generates

#

it's also filled with trash comments

#

i did use it to convert the yaml from xbstrap to jinx for the like 150 ish recipes that have no special build logic

marsh holly
#

I'm probably gonna clanjker the update to new jinx when I do it

#

because ufck that

near tartan
marsh holly
#

I am not manually going through almost 300 packages

shy turret
near tartan
#

it's the most boring ass grunt work

#

that could technically be automated with a script, but you have a few variables here and there that are just not worth accounting for

#

so it's 100x easier to clank it

#

i don't use clanker for kernel features and everything it generates besides the occasional bugfix in my code is unusable trash

shy turret
#

I think the most I have ever had it generate are like small functions

#

That are like mostly very simple

#

If it ever has to do anything large

#

It extensive

#

It grinds up

#

40 minutes of Claude to find and fix an elf parser but

#

๐Ÿฅ€

marsh holly
#

clanker is like

#

infinite very determined and directed monkeys with typewriter

shy turret
#

Truke

#

Somtimes it makes okay things

marble salmon
#

Claude can definitely write reasonably good code way faster that any programmer can

#

the problem is not so much individual code quality

#

it's more the high level picture, consistency and brevity

rugged shard
grave peak
#

Everything was offsert

near tartan
#

did you tell it to look at the online html spec?

grave peak
#

Nope, probably should've told it to look at my local copy

near tartan
#

i have in my global agents.md to never trust memory for specifications or details, always use web or local files

grave peak
#

Yeah that's reasonable lol

marble salmon
#

Claude Opus does that by default afaict

near tartan
#

it does not

#

i had to tell it multiple times (4.8)

#

and got hit with an "you're absolutely right"

fiery marlin
#

classic

grave peak
marble salmon
#

effort is not a more = better dial

#

I essentially never use max effort

#

Effort controls how much the model talks to itself

near tartan
#

thank you rust

#

omfg

marble salmon
#

If there is not a lot to reason about, then letting the model talk to itself to sort out directions is detrimental and will yield worse output

near tartan
magic charm
magic charm
near tartan
#

but it's mostly @sick flax achievement

#

he did the heavy lifting

sick flax
#

Just be glad I found the not build time required but runtime absolutely hates you dependencies that were buried deep in logs

#

Saves you a good few hours of why shit ainโ€™t working

#

Cuz configure also didnโ€™t say anything, so that wouldnโ€™t help you either

near tartan
#

had to upload here because size

rugged shard
#

is this 1280x800

near tartan
#

wayland will probably be even faster

#

but it's already nice, the performance is close to managarm's in STK

rugged shard
#

Ah

jaunty bay
#

๐Ÿ˜ญ

near tartan
silver birch
near tartan
#

i want to try porting zinnia to Apple Silicon

#

what could go wrong โ„ข

shy turret
rugged shard
jaunty bay
near tartan
#

that was my idea

#

well not quite

#

i have m1 air

#

and plan to get a used m4/m5

hoary cave
eternal wharf
#

i thought you wanted to stop buying hardware :^)

near tartan
eternal wharf
#

based

near tartan
#

i need to buy one again

hoary cave
#

u sold the m2 air?

near tartan
#

to a friend

hoary cave
near tartan
#

yeah i know

#

but i made money again

jaunty bay
#

I wish you had M3 hardware

#

I really really want to run cool stuff on my M3

#

Maybe I should make my own OS for M3, but Iโ€™m still working on the Windows 95 like project

near tartan
#

depends how expensive it is

#

i don't want to spend more than 1k for it

shy turret
#

So it's probably a bit pricy

#

Even used

near tartan
#

m5 air costs 1000โ‚ฌ

#

new

shy turret
#

Let me check ebay actually ๐Ÿ’€

#

Maybe I'm being stupid

jaunty bay
#

And Iโ€™m not willing to do that

shy turret
#

That's not horrible

near tartan
#

porting zinnia to arm isn't very far fetched ngl

jaunty bay
jaunty bay
shy turret
#

You'd probably have to make an entire new dos from scratch for arm

jaunty bay
#

Yeah

#

And my OS is a 1990s larp anyway

#

It doesnโ€™t make sense to make such an OS for modern hardware

storm bobcat
near tartan
marsh holly
#

Zoomers don't even save up to buy a house anymore they just buy their 23rd computer and stare at you like this

near tartan
#

I'm never owning a house bruh

marsh holly
near tartan
#

it's all blackrock

marsh holly
#

I cant wait to have a cs job
pure copium

marble salmon
grave peak
#

Bro owns every Thinkpad revision and 5 epycs

near tartan
#

okay 3 thinkpads

#

but one is from work

grave peak
near tartan
#

and the other is arm

#

also the epycs are dirt cheap in comparison

#

two of them literally cost 9โ‚ฌ

vast lotus
#

and what about the ram?

near tartan
#

i got it for free

#

we don't use ddr4 anymore

#

it's all ddr5

#

so i got to take it home

grave peak
#

Are you gonna use it for hwci?

near tartan
#

ofc

grave peak
#

Nice

near tartan
#

but only after the hot days are over

#

because otherwise I'll die at 50c in my room

eternal wharf
#

just use the heat to boil water and spin a turbine

near tartan
#

gomer

near tartan
#

i'm going to improve dtb support, then i'll add a basic aarch64 port

near tartan
#

i dont have that hardware

#

rust also doesn't compile for ia64

jaunty bay
#

L Rust

near tartan
#

W rust

marsh holly
#

Yeah because its not a real language meant to be used in production Troll

marsh holly
near tartan
#

i don't see astral running on arm or riscv

marsh holly
near tartan
#

trvthnvke

marsh holly
#

If I could nolife during weekends astral probably wouldve been #1 os by now in the world

#

But I sadly have a life

#

๐Ÿฅ€

median forge
autumn jasper
#

that's how expensive homes are

near tartan
nocturne rampart
#

id be surprised if it didnt

marble salmon
#

unless you're living / want a home in a crazy hcol area

near tartan
heady scarab
near tartan
#

sure i sometimes buy hardware

#

but i also sell it

#

for about the same price

#

it's maybe a net loss of 100โ‚ฌ

shy turret
silver birch
#

jesus christ

near tartan
#

macbook has been acquired

cerulean stream
near tartan
#

i need to farm more reddit karma

near tartan
#

until my macbook arrives I'll be taking a break from kernel dev and continue writing my wayland wm

shy turret
#

Best of luck

jaunty bay
near tartan
#

M2

jaunty bay
#

๐Ÿ˜”

#

so no Zinnia for me

near tartan
#

m3 has no u-boot support

rugged shard
#

should've gotten m5 and ported it to it instead trl

near tartan
#

๐Ÿ’€

rugged shard
#

/s

jaunty bay
near tartan
#

wdym

#

asahi doesn't boot yet afaik

jaunty bay
#

Doesnโ€™t it boot using u-boot

#

And Asahi does boot

near tartan
#

since when

#

m3 does shit differently

#

i watched a talk from a few months ago where things barely worked on m3

jaunty bay
near tartan
#

well

#

it will probably just work then

jaunty bay
#

Oh okay

#

Canโ€™t wait to try it

#

Zinnia will be the second OS here that runs on Apple Silicon ๐Ÿคž

#

The first one being @inner pagodaโ€™s project

inner pagoda
#

i assume it will be more stable unlike mine which panics if you look at it wrong

near tartan
#

dam

#

well i prepared better DTB support

#

so that's the first step

#

i need to add an aarch64 port tho

#

i think userspace should already be fine

jaunty bay
#

If Zinnia works I might kinda temporarily ditch my Windows 95 like project and develop an OS for my MacBook

inner pagoda
#

my dev time has gone back into making the virtualizor for ant itself faster now tbh havent touched spore in a while

jaunty bay
storm bobcat
#

Modern OSes are much more complex than windows 95

jaunty bay
#

Not hobby OSes though

#

There are a lot of design considerations going into my Windows 95 like that simply wouldnโ€™t have been a concern if I made a regular hobby OS

inner pagoda
#

id say even hobby os'es are more complex than win 95 but not nt tbh

jaunty bay
storm bobcat
jaunty bay
#

Obviously not a modern OS like Linux

near tartan
#

win95 is more complicated than zinnia

storm bobcat
#

I guess it depends but I'm sure someone here could make something like NT 3.1 with enough time, and that's more complex than win95

#

And not that good by modern standards

inner pagoda
#

isnt like fat16 exponentially simpler than ex2

#

fs wise win95 is very simple

near tartan
#

it's also exponentially worse

#

:P

jaunty bay
inner pagoda
#

my current kernel uses my own thing called ext2+ in which it has dynamic inodes so I dont need to allocate 150mb of the disk to just making inodes

#

pretty neat

storm bobcat
near tartan
#

well duh

storm bobcat
#

But it's just so huge it's not comparable

#

NT 3.1 in particular did really weird stuff in some places

jaunty bay
near tartan
#

i will never be as goated as will

inner pagoda
near tartan
#

but i will be running on apple silicon inshallah

inner pagoda
#

with full desktop enviroments and gtk support

storm bobcat
near tartan
storm bobcat
near tartan
storm bobcat
#

It'd be like win7 level I guess in terms of what I implemented atm

inner pagoda
near tartan
#

but that doesn't mean my kernel is good

#

it's pretty bad

#

it just works well enough to not crash and burn immediately

inner pagoda
#

I mean the win95 source is pretty meh too

marsh holly
near tartan
#

yes

marsh holly
#

everybody loves managarm

jaunty bay
#

I love Managram

near tartan
#

also this

jaunty bay
near tartan
#

fishix 3.0

jaunty bay
#

It also supports Win32 API

#

Also I have to work with ancient tools and old C standards

storm bobcat
near tartan
#

zinnia pre rewrite

jaunty bay
#

That would be so cool to see

jaunty bay
near tartan
#

i dont have that lol

jaunty bay
#

I assume because you havenโ€™t compiled it?

near tartan
#

yes

jaunty bay
#

I should try compiling it

rugged shard
#

CPU

near tartan
#

dw about it

#

mfw i can't read /proc/cpuinfo

rugged shard
#

probably a threadripper or smth

near tartan
#

no

#

opposite

rugged shard
#

ryzen 9 9950x3d2

near tartan
#

Intel Ultra 7 258V

rugged shard
#

ah

#

close enough trl

near tartan
#

we will get this bread

#

aarch64 will be fun

near tartan
#

i have started aarch64 support

near tartan
#

i noticed that userspace is missing a few patches

#

to even build

#

so for now just kernel it is skully

#

dtb support seems working very well

#

I'll make it work in qemu first

#

but i have a ton of outstanding patches that i need to upstream first

median forge
near tartan
#

W

median forge
near tartan
#

yes

#

but I won't port to rpi

#

i hate broadcom

#

i have acpi arm

jaunty bay
#

Apple Silicon โค๏ธ

median forge
#

then double F

near tartan
jaunty bay
median forge
#

isnt its undocumented

jaunty bay
near tartan
grave peak
#

they have 0 docs

near tartan
#

rofl

#

is it time to implement actual power off with acpi?

near tartan
marsh holly
near tartan
rugged shard
#

is that what you're targeting

#

or smth else

near tartan
#

i have actual arm ACPI hardware

rugged shard
#

fancy

near tartan
#

but I'm developing against device tree arm

rugged shard
#

makes sense

near tartan
#

some ports don't compile on aarch64 yet

#

:(

rugged shard
#

;(

near tartan
#

but the kernel does

#

just booting with limine works on a single cpu

#

I've done smp for aarch64 acpi on managarm

near tartan
#

third llvm recompile of the day award ๐Ÿ…

marsh holly
#

use a real toolchain?

#

not these toys like llvm

near tartan
#

"i am an unloveable chud and love israel"

marsh holly
#

glory to benjamin entanyahu

rugged shard
near tartan
#

llvm compile... OK

silver birch
#

llvm com [ERROR] Out of memory

near tartan
#

i don't think that makes you run out of 512 gigs of ram

magic charm
#

did you get it before the ai mania?

near tartan
#

yes

#

i also got the ram for free :3

rugged shard
#

he has dedotation

#

get him

near tartan
rugged shard
near tartan
#

i can't sell the ram anyways because they're not legal for consumers

rugged shard
#

how

near tartan
#

they don't have a CE certification

#

they're eng samples

#

that's why i got them in the first place

#

we don't use ddr4 at work anymore

#

so i got a few of the sticks

rugged shard
#

ah

#

"a few" how many tb of ram did they have

near tartan
#

like 2?

rugged shard
#

ok fair

near tartan
#

the rest is all low mhz

#

i only took the 3200mt/s

rugged shard
#

makes sense

near tartan
#

usb just worked

#

idk how

shy turret
#

How hard was the port? Mostly just page tables interrupts and some timers / other platform devices?

near tartan
#

gic was probably the biggest part

#

i didn't do smp

#

page tables were ez

#

i already have abstract radix tree logic

shy turret
#

Ah nice nice

near tartan
#

but exceptions are weirddddd

shy turret
#

How'd they do them?

near tartan
#

there's sync and async exceptions

#

also i didn't do posix signal routing yet

rugged shard
near tartan
#

yes

rugged shard
#

cool

marsh holly
#

loongarch when

near tartan
#

i could

#

but that's even less documented

#

you would port astral to loong64 if the CCP sponsored you

rugged shard
#

step 1: go to china
step 2: get manual
step 3: spend 5 years learning chinese
step 4: impl loongarch64
step 5: profit

near tartan
#

imo risc-v is the nicest isa to implement on the kernel side

#

actually

#

let me write ts to a usb

#

i am curious if this could possibly work on real hw

marsh holly
#

apparently it has software refilled tlb??? ๐Ÿ˜ญ

near tartan
#

yeah

#

๐Ÿ’€

shy turret
#

atleast for CPU side things

shy turret
#

this is the ammount of support you need

.equiv tlbrsave, 0x8B
.equiv pgd,      0x1B

.global tlb_refill_handler
.balign 4096
tlb_refill_handler:
    csrwr $t0, tlbrsave  # save t0
    csrrd $t0, pgd       # get the faulting page table root
    lddir $t0, $t0, 3    # walk page table level 4
    lddir $t0, $t0, 2    # walk page table level 3
    lddir $t0, $t0, 1    # walk page table level 2
    ldpte $t0, 0         # load even entry from level 1
    ldpte $t0, 1         # load odd entry from level 1
    tlbfill              # fill the tlb
    csrrd $t0, tlbrsave  # restore t0
    ertn
#

thats it

#

You chunk the physical address of that into a CSR

#

And then use page tables like normal

shy turret
#

and linux acts as docs for a fewww things mmLol

near tartan
#

AYOOO??????? ๐Ÿ˜ญ

#

it actually boots

shy turret
#

YOOOOO

near tartan
#

well, not to userspace yet

shy turret
rugged shard
near tartan
#

time works in dtb mode

#

mind you this is using acpi mode

rugged shard
#

how would that change anything

shy turret
#

How do you abstract things between the dtb and ACPI modes btw

rugged shard
#

isnt it just reading some system register

near tartan
near tartan
rugged shard
#

i said that because i saw this

shy turret
#

Ah fair, I guess for a few things I may have to special case it because my serial stuff looks at ACPI it's self verses the other way. Though maybe I should change that?

shy turret
near tartan
#

yes but i don't parse those

#

yet

#

only x86 xapics

shy turret
#

Fair

near tartan
#

static DRIVER: Driver = Driver {
    name: "gicv3",
    compatible: &[b"arm,gic-v3"],
    probe,
};

fn probe(node: &Node) -> EResult<()> {
    let (gicd_phys, _) = reg_pair(node, 0).ok_or(Errno::EINVAL)?;
    let (gicr_phys, _) = reg_pair(node, 1).ok_or(Errno::EINVAL)?;

    let gicd = map_mmio(gicd_phys, 0x1_0000);
    let gicr = map_mmio(gicr_phys, 0x2_0000);
    GICD_BASE.store(gicd, Ordering::Relaxed);
    GICR_BASE.store(gicr, Ordering::Relaxed);
    GICR_PHYS.store(gicr_phys.value(), Ordering::Relaxed);

    w32(gicd, GICD_CTLR, GICD_CTLR_ARE_NS);
    wait_rwp(gicd);
    w32(gicd, GICD_CTLR, GICD_CTLR_ARE_NS | GICD_CTLR_ENABLE_G1NS);
    wait_rwp(gicd);

    let waker = r32(gicr, GICR_WAKER) & !GICR_WAKER_PROCESSOR_SLEEP;
    w32(gicr, GICR_WAKER, waker);
    while r32(gicr, GICR_WAKER) & GICR_WAKER_CHILDREN_ASLEEP != 0 {
        core::hint::spin_loop();
    }

    write_sysreg!(ICC_SRE_EL1, read_sysreg!(ICC_SRE_EL1) | 1);
    isb();
    if read_sysreg!(ICC_SRE_EL1) & 1 == 0 {
        warn!("The system-register CPU interface did not enable");
        return Err(Errno::ENODEV);
    }
    write_sysreg!(ICC_PMR_EL1, 0xFF); // Allow all priorities.
    write_sysreg!(ICC_BPR1_EL1, 0);
    write_sysreg!(ICC_IGRPEN1_EL1, 1);
    isb();

    Ok(())
}

#[initgraph::task(
    name = "arch.aarch64.gic",
    depends = [crate::device::dt::TREE_STAGE],
    entails = [crate::arch::INIT_STAGE],
)]
pub fn GIC_STAGE() {
    if let Err(err) = DRIVER.register() {
        warn!("Failed to bring up the GICv3: {err:?}");
    }
}
#

this is the probe for dtb

grave peak
near tartan
#

on windows it's decent

#

linux 7.1 is supposedly decent too

#

but it's full of qcom cancer

grave peak
#

Unfortunate

near tartan
#

other than that it's a usual T14s

grave peak
#

Well usual on the outside ig KEKW

near tartan
#

yes

grave peak
#

Completely bespoke weird soc

near tartan
#

i'm doing aarch64 support mostly so i can do apple silicon

rugged shard
near tartan
#

6

#

oh apparently it hangs itself when i enumerate ECAM

rugged shard
#

ah

grave peak
near tartan
#

you have AS?

grave peak
grave peak
near tartan
#

neat

#

it wont work yet

#

because asahi's u-boot only supports up to m2, but that's changing as we speak

near tartan
grave peak
#

Do you do ngnre etc

near tartan
#

๐Ÿค”

grave peak
near tartan
#

well

#

apple silicon has its own set of exception levels

#

GL0-2

#

and everything newer than m3 has extra security features that stop m1n1 to act like a hypervisor

rugged shard
#

just why

grave peak
#

How is that different from normal aarch64?

near tartan
#

well aarch64 doesn't have those

grave peak
#

Well it has normal el

near tartan
#

yes and AS also has GLx on top

#

idfk what it does yet

#

but starting with M3 it plays a role

near tartan
#

asahi uses m1n1 as a hypervisor to track MMIO writes on macos

#

instead of just reversing the drivers

#

it's not as easy to do because the mac os drivers are c++ and spread all over

grave peak
#

I see

near tartan
#

there's a talk that's VERY interesting if you plan on doing osdev for AS

grave peak
#

Show

grave peak
#

Thanks

near tartan
#

man i am getting quite bored of rust again tho

rugged shard
#

c29 rewrite trl

shy turret
#

(I use defer)

rugged shard
shy turret
#

(maybe a bit too much)

#

Cc: @nova tiger

#

You gotta do a rewrite in nim

near tartan
#

if i were to rewrite i would probably do it 100% clanker free

#

because i did find myself debugging with AI because i didn't have the time to properly look into the issues

#

but that only solved the problem, i still don't know what went wrong or how to fix it

#

literal brain rot

rugged shard
#

i do that sometimes and 99% of the time i end up fixing it myself before the clanker knows what's going wrong

near tartan
#

i don't think i've ever pushed pure clanker code

#

it NEVER looks good

near tartan
#

just okay enough as an early pass

#

or to prototype an idea

shy turret
near tartan
#

same

shy turret
#

Or it's so simple there really aren't many ways to do it

rugged shard
near tartan
#

i did via work and i had a private sub for a month to try it out

rugged shard
#

ah

near tartan
#

it's unfortunately good enough to do my job

#

but that just means more work for me to do with less time for each thing

#

@grave peak btw i used nGnRnE

#

didn't fix anything

grave peak
#

Gg

#

Probably still something related to that

near tartan
#

:(

#

oh no

#

openbsd has a quirk for this

grave peak
near tartan
#

Some DesignWare IP configurations are synthesized with a minimum ATU window size of 64 KB.

#

apparently linux has an ecam "driver" vtable

grave peak
#

Is there a driver where linux doesn't have a vtable KEKW

marsh holly
#

linux is the oop os

near tartan
#

I honestly wouldn't know how else to do this with quirks

jaunty bay
near tartan
#

wip

#

not upstream yet

nova tiger
#

What do you even want me to say to this lol

#

Yeah you do abuse defer

eternal wharf
#

async iirc just means it won't correspond directly to the instruction that caused the fault

#

e.g. if you do a posted write, the cpu moves on, and only after a while you get a bus error

near tartan
#

ah

jaunty bay
#

I wonder if I could get your OS to work on my Mac by using non-upstream / Asahi version?

near tartan
#

probably

#

one funny thing that i need to solve is the DART iommu

#

because without it pcie never sees any ram

#

ram is above 0x800000000, but it's 32 bit pcie

marble salmon
# near tartan

didn't Managarm manage to enumerate PCI on this machine?

near tartan
#

i think?

#

don't rember

marble salmon
#

is this acpi or dtb?

near tartan
#

ACPI

marble salmon
#

I think it did and it found an xhci

near tartan
#

apple gaming

#

(it crashes when going to userspace)

rugged shard
#

interesting crash handler log

near tartan
#

that's from uboot (?)

rugged shard
#

i was about to ask how did you hook it up

#

interesting

#

i would've expected the kernel to catch it but its apple so

near tartan
#

fwiw i think the kernel actually runs in EL1

marble salmon
#

wdym

#

you should know that

#

you need to know in which EL you're running lol

near tartan
#

no because there's the apple exception levels

#

the GL1/2

#

which I don't handle

marble salmon
#

you need to program the right value into spsr

#

etc

#

maybe that's why you're crashing when entering userspace :^)

#

ARM ELs are not transparent to the kernel

#

not even if VHE is on (which it is on apple)

near tartan
#

it worked in qemu :(

marble salmon
#

are you assuming EL2?

#

or what are you doing

near tartan
#

i copied most of the managram entry point

marble salmon
#

Managarm has some "if running in EL2"s

#

which you need if you want to support both EL2 and EL1

hoary cave
near tartan
#

when do i need to care?

marble salmon
#

the guarded execution stuff is intentionally entered

#

afaict

hoary cave
#

never

#

you never care about them

near tartan
#

why did the asahi guy mention them

hoary cave
#

because they exist and they are important

marble salmon
#

i think that's the feature that apple uses to protect PTs from the kernel?

hoary cave
#

but not for osdev

near tartan
#

oh lol i just realized i booted the wrong image ๐Ÿ’€

#

wrong usb

grave peak
#

how do u boot custom stuff on apple hw

near tartan
#

asahi has a uboot only option

#

that has efi emu

grave peak
#

asahi the kernel emulates efi?

near tartan
#

no

#

uboot

grave peak
#

why did u mention it lol

near tartan
#

asahi ported uboot to macs

#

it's their fork

grave peak
#

ah ok

near tartan
#

typo

grave peak
#

do they usually boot into the m1n1 thing?

near tartan
#

no i think m1n1 is the first stage

#

u-boot is on top

#

@hoary cave correct me pls

marble salmon
#

m1n1 is a bootloader + hypervisor

hoary cave
#

it CAN be a hypervisor

#

but usually it just loads and hands off to u-boot

grave peak
#

what even is the apple boot sequence by default, what state does it leave m1n1 in

#

do u need to like hack it to get shit to boot

hoary cave
#

nah

#

it has a boot protocol, it's called iboot

storm bobcat
#

There's a pretty good book on Apple stuff

#

Actually it's a series of books

near tartan
#

huh

storm bobcat
#

the second one is a deep dive on XNU

hoary cave
#

it basically tells you where ram is, gives you cmdline, flags, framebuffer

storm bobcat
#

sec

grave peak
hoary cave
grave peak
#

or does it run from firmware directly

hoary cave
#

iboot is the bootloader, yes

#

and it runs from god knows where, but i think it can be updated by a firmware upgrade

#

but i might be wrong

marble salmon
#

i think iboot was written by @ geist

storm bobcat
#

that one

marble salmon
#

or he was part of the team that wrote it or so

grave peak
#
    u64 phys_base;
    u64 mem_size;
#

Does apple hardware like, always has contiguous dram?

hoary cave
#

yeah

grave peak
#

lol

near tartan
#

based

marble salmon
#

why lol?