#Orange

1 messages Β· Page 2 of 1

last geyser
#

well you need extra setup so transactions can be routed to the hub

#

there are a bunch of slot context fields you need to fill in for hubs and devices behind hubs

#

i have no clue where the problem is in managarm, but on real hw (on 2 different hubs i tried), trying to talk to a device behind a hub yields an usb transaction error

last geyser
#

but for xhci the controller does that for you

jaunty oxide
#

Hmmmm

inner oak
#

i think i should have phys to virt and virt to phys syscalls too (just for conveniences)

marble radish
#

why would userspace need to know the physical address of anything?

inner oak
#

all works on my pc

narrow mesa
#

damn better support than managarm KEKW

inner oak
#

(my laptop have ehci and xhci)

inner oak
#

unix sockets is done

#

now i need to test it...

#

(i found what unix sockets is just pipes but more advanced and which how i understand have two buffers for read and write)

jaunty oxide
#

Iirc there was a bsd that implemented pipes using unix sockets

inner oak
#

all works

#

for recv() and send() ig i can just redirect to write() and read() (i have only sys_write and sys_read implemented for unix sockets)

#

some random code which tests unix sockets works too

sly sandal
inner oak
#

now its time to implement poll()

inner oak
#

my todo list:

  1. finally make unix sockets in vfs
  2. fifo support
#

my unix sockets is not live in vfs

#

i need to make them live in it

inner oak
#

bro i need to stop play deltarune 😭

inner oak
#

i have some bug

#

something is write to memory which i free when there's >1 cpu

inner oak
#

i found what problem is getting fixed when i disable paging freeing

#

so ig some code doing some paging magic with cr3 which was already free in my pmm

#

tomorrow i will debug it

sly sandal
#

for me it was cause i forgot to remove process from child list once it was destroyied KEKW

inner oak
#

i found problem

#

i didnt had lock in my pmm::fullfree

#

which i use for paging free (my every buddy allocator block can have id and this function free all memory with this id)

inner oak
#

im porting doomgeneric now and i have some problem

#

if i play some time game freezes and doom trying to spam with waitpid syscalls

#

ig its just ub (i use syscall which returns timestamp in nano for getting current ms)

onyx matrix
inner oak
sly sandal
#

when an error happend it call system to display info using zenity

sly sandal
inner oak
#

i found possible problem

#

in DG_GetTicksMs() if i try to get ticks with hpet it works slowly

#

but if i try to use tsc or pvclock it just works for 5-10 seconds and freezes

onyx matrix
#

check your nanosleep, because i had an issue where it would create large lag spikes because of it

inner oak
#

okay i found problem

#

my hpet currentnano() was broken

#

i was returning hpet counter directly (i didnt was converting this to nanoseconds)

onyx matrix
#

fuck yeah

inner oak
#

same doom but with fullscreen patch (i had fullscreen diff for doom)

sly sandal
sly sandal
onyx matrix
#

doomgeneric has a header where you can set the scale

sly sandal
onyx matrix
#

yes but its easier to just tell doomgeneric to do it

sly sandal
#

so you can set it at runtime

inner oak
#

fifo is done

inner oak
#

i improved my tsc timer and now orange defaults to tsc timer instead of hpet

topaz remnant
#

cool

inner oak
#

poll() is done

#

code is

inner oak
#

there's another poll test which targets stdin now

inner oak
#

all that's left is to test poll with unix sockets

#

and i can finally start xorg porting

sly sandal
inner oak
#

maybe its good idea to start to use jinx

inner oak
#

finally i understand how to use jinx

#

now i need to create recipes for my init, drivers, bash and etc.

inner oak
#

i want symlink directory support

inner oak
#

symlink handling is moved to vfs level

#

because its easier to handle when in some fs there's symlink which points to another fs

white karma
inner oak
white karma
#

Ah

#

Looks convincing

tight heart
#

okay my previous account cpplover0 is died

#

because my phone firmware was erased

#

idk how

#

at least my github is created with another email

sly sandal
sly sandal
tight heart
sly sandal
#

yeah that an a proof

sly sandal
tight heart
sly sandal
tight heart
#

i was playing hoi4 all this time

#

i should stop play hoi4

tight heart
#

i have some issue

#

when i trying to build my init and mlibc with jinx (maybe i should compile mlibc with my cross compilers) mlibc ld.so reads libc, ld.so does some mmap and jumps to 0

#

ig i have broken cross compiler

tight heart
#

for now ill return my old sh build system and try to implement directory symlinks

tight heart
#

finally

#

symlinks are now cool and on the vfs level

#

i want to change tty look now

tight heart
#

my pipes is bit bugged

#

when i trying to do cat test.sh | sh there's happening data loss with some chance

#

but if i do echo echo hi | sh all fine

tight heart
#

ig its some locking issue

#

so this is time to spam spinlocks !!!

tight heart
#

finally i fixed this

#

the issue is what i didnt was setting stdin, stdout, stderr fd state to unused after closing so when process was closing them all was ok but after when process exits it closes again so pipe is being freed and it begin to cry

tight heart
#

now my tty looks better

jaunty oxide
tight heart
#

(i have userspace tty)

onyx matrix
topaz remnant
#

really

tight heart
#

now xhci works on my laptop

#

but i have some problems

  1. it doesnt works on ilobilo laptop and virtualbox
  2. some old keyboards is fucking slow
#

also i want to finally implement MSI-X and MSI interrupts for userspace

#

because polling is skowy

#

slow*

tight heart
#

wtf all this time i didnt have license

onyx matrix
#

lol the same thing happened to me in i686 bentobox

tight heart
#

each message like this destroys my mental health

#

(i was suffering with pkg-config 2 hours btw)

#

im going to sleep

tight heart
#

ill use libsha1 or openssl for sha1 implementation (xorg requires it)

jaunty oxide
tight heart
tight heart
#

i fixed this by just adding ac_cv_lib_gcrypt_gcry_md_open=yes

#

ig there's no will be some issues because i already have libgcrypt in lib and include directories

#

why there's so much of them 😭

jaunty oxide
#

Welcome to xorg

tight heart
#

is this real xorg april fools

#

i was suffering why does it faults and i found this

tight heart
#

5 errors left

jaunty oxide
#

Almost there

tight heart
tight heart
tight heart
#

its time to implement link()

#

also i need to optimize my tmpfs node creation

tight heart
#

i dont want to support hard links now so ill just make link() to create symlinks

tight heart
#

and this is time to implement fs related syscalls like mkdir fchmod and etc.

tight heart
#

i want to change my triplet from x86_64-orange to x86_64-orange-mlibc

inner oak
#

finally i restored this account

inner oak
#

now libtool demons are satisfied

jaunty oxide
#

libtoold

inner oak
#

i found some problem

#

xorg faults on xf86SetDpi

#

exactly problem is pScrn->privates is just 0

#

i should ctrl + f this variable and find why xorg left it 0

inner oak
#

i fixed this

#

it was because some code was accessing privates->ptr which was 0 (ptr was 0)

#

i grep it and i found what it was setup in some drmmodesetting file

#

so fix is just add if(!context) return NULL;

#

in my xorg server patch

jaunty oxide
#

how is xorg

inner oak
#

idk why it faults on this error

jaunty oxide
#

IIRC xkbcomp used mmapd files

inner oak
#

i support only devfs mmap

jaunty oxide
#

I remember running into troubles with it in old astral

#

But I could be mistemembering since its been a long time

#

Best to check a syscall log

inner oak
#

its not mmap

#

ig i should try to listen all file operations which xorg does before error

inner oak
#

also i found what /usr/share/X11/xkb/compiled directory is just doesn't exists ???

#

creating this directory back and chmod it again maybe is solution too

#

(idk why but xorg really hates when some file or directory is not chmod as it wants)

inner oak
#

i found issue

#

wtf

inner oak
#

i fixed thus

#

issue was in what i was memcpy to stack before increasing it in auxv stack filling

inner oak
#

there's just a little bit left for xorg port

inner oak
#

and it requires pthreads when my futex is broken

#

i need to fix this

viral basalt
#

🍊

inner oak
#

sys_clone and futex syscalls are now implemented and works

#

also i implemented WNOHANG in waitpid (xinit requires it)

#

and now i need to know why xorg creates socket binds it and starts to just poll this fd with socket

#

(it didnt had any connected clients)

jaunty oxide
#

probably just polling to wait for incoming connection requests?

inner oak
#

i didnt thought about it

inner oak
#

at least there's white box 😭

#

(it crashed on division by zero)

#

also i did a lot optimizations and i want to do more

hollow raft
inner oak
hollow raft
#

I had a similar issue where it crashed with division by zero

#

Usually issue with fetching time

inner oak
hollow raft
#

Idk trace your syscalls and see if it's returning shit correctly

#

That's what I did

#

Oh yeah test with xeyes

inner oak
#

i dont have mouse yet but ig it can work even without mouse

hollow raft
#

Then port st πŸ‘…

#

Then dwm

inner oak
hollow raft
#

Then rice your OS and post it on r/unixporn for karma

hollow raft
#

It's a terminal

inner oak
#

k

jaunty oxide
jaunty oxide
inner oak
#

maybe i need to inplement this

hollow raft
jaunty oxide
#

Yeah you need it, it does some division on time iirc

hollow raft
#

I'm assuming getclock and all

jaunty oxide
#

And if you have an upsated mlibc my and no's scanf float work should allow xclock to tick

hollow raft
#

I always thought something was wrong with our kernel's time function for this long 😭

jaunty oxide
#

Nah the standard libx11 or whatever library it was uses %g for float options and scanf float was not implemented

hollow raft
#

Dang

jaunty oxide
#

And the time between each tick is a float

#

It was also an issue in managarm

hollow raft
#

πŸ’€

jaunty oxide
#

Iirc if you forced the clock to redraw by dragging a window over it or something it would do it

#

Or something else

inner oak
#

FINALLY I DID IT

#

working xeyes!!!

velvet nebula
#

why is it so patchy?

inner oak
velvet nebula
#

oh ok

jaunty oxide
velvet nebula
#

i think just convert it to binary

#

and then load it

inner oak
onyx matrix
inner oak
#

after some magic it gives it to flanterm

jaunty oxide
inner oak
#

there's some more clear screen

#

now my target is implement vt (ctrl + alt + f0-10) and make my syscalls more faster

sharp coral
#

Use two framebuffers, one for the graphics and one for the tty, and depending on what you are operating (tty or graphics) use its dedicated framebuffer

sharp coral
modern cypress
#

You deserve the tag osdv

#

But I really want to ask where you learned os dev, I know kind of the basics? Or maybe even below the basics but there are no good resources. I was looking for a x86 architecture tutorials (better if its like learnopengl) i mean im coming from engine dev

modern cypress
#

Seems like a pain i would like to have

jaunty oxide
#

Twm + xterm and become unix

onyx matrix
#

Port Kwin trl

inner oak
#

but i need mouse driver to test

onyx matrix
#

Ahh

inner oak
#

its time to write mouse driver (usb and ps/2)

modern cypress
#

Are you going to start with ps/2?

inner oak
#

its more harder

modern cypress
#

PS/2 is more harder? I didnt know that

inner oak
#

i am thinking now how to implement double buffering

#

it looks like trash on my pc but in qemu all ok

marble radish
#

It should definitely be faster on baremetal

inner oak
#

maybe i should do double buffering in kernel?

inner oak
inner oak
#

i want to replace forks with pthreads in my tty

marble radish
inner oak
marble radish
#

Ah lol

#

Glad you figured that out

modern cypress
#

Does it boot on baremetal?

inner oak
inner oak
#

xterm and st requires select bruh

#

i need to find a way to avoid writing select() implementation if i already have poll()

jaunty oxide
#

You can implement select using poll

jaunty oxide
inner oak
#

i tried to do it but it was faulting

inner oak
#

bruh my futex implementation is broken

#

because there's race condition

inner oak
#

its fixed by adding lock

#

but now my vmm needs lock because pthreads

inner oak
#

wtf i have race condition in poll()

#

all was fine but smp...

inner oak
#

its weird

#

somehow my poll() giving disinformation to tty about POLLIN

#

only when there's a lot of cpus

#

so i think this is lock issue

#

i need to spam spinlocks

inner oak
#

i fixed this

#

problem is what after poll there was another write which was incrementing my poll read counter and after read there's no data but poll read counter is still bigger than fd read counter

onyx matrix
#

that's weird, my fix was to add a newline at the end of /etc/passwd

inner oak
#

so real fix was setting variable SHELL

onyx matrix
#

ah

#

i let bash do it for me

inner oak
#

i set this in .bashrc

inner oak
#

i checked my fastfetch now and wtf

#

what's wrong with shell 😭

inner oak
#

today ill try to port xterm and st

inner oak
#

somehow xterm don't want to clear bit from select which says what there's data in /dev/pty so it just tries to read even there's no data and jt just blocks

#

st can do output but input is broken

onyx matrix
inner oak
#

wait maybe they require timer stuff and unix signals

inner oak
#

idk why maybe xterm doesnt works because my screen->event is not NORMAL (i searched in xterm src and found some lines which reads pty) and because of this it loops on reading pty again and again

#

i need to setup breakpoints

jaunty oxide
#

There is a reason why xterm source has on the readme "abandon all hope, ye who enter here"

inner oak
#

the only thing that helps is grep

jaunty oxide
#

The only reason I ported xterm to astral was unix workstation larp

inner oak
#

i decided to implement unix signals first and after port xterm

#

ig it just wants them

jaunty oxide
#

I mean you kinda need them for a real tty implementation

#

Even without job control you need to at least send a SIGHUP so that the applications close when you close xterm

inner oak
#

finally i watched sherlock series 2010-2017

inner oak
#

todo: fix bug when xterm and st both stucking at something and this related to futex and poll and maybe unix sockets

inner oak
#

xterm doesnt want to work but st works

#

so ill give up on xterm and just use st

onyx matrix
#

Here be dragons

jaunty oxide
#

Beware of the leopard

inner oak
#

its time for ps/2 controller

inner oak
#

ps/2 driver in userspace is done

#

i can get interrupts from mouse now

inner oak
#

ps/2 mouse data parse is done

#

also new tty bg

onyx matrix
#

rename to Water

inner oak
#

im searching now dark orange backgrounds

#

because my eyes burn on old background

onyx matrix
#

lol

inner oak
#

now its time to test all on real hw lapfedmoment

inner oak
#

i have some issue on real hw

#

usb mouse is just dont want to report x and instead of x puts all to y

inner oak
#

i fixed this by setting bootprotocol in usbdev initialization (i forgot about it and i always thought what it was setup by default)

#

now usb mouse works properly on real hw

onyx matrix
inner oak
onyx matrix
#

your os takes forever to boot

#

are you running with kvm or tcg?

inner oak
onyx matrix
#

my initrd is 163mb and it takes 1 second for limine to load it and 68ms to mount it

inner oak
#

i need to try optimize my initrd parse

onyx matrix
#

probably

jaunty oxide
onyx matrix
#

wdym a long mount time

#

also yes my tarfs mounts everything at once instead of doing it lazily like my ext2 driver

jaunty oxide
#

Ah that makes sense then

inner oak
#

im copying it to tmpfs

onyx matrix
#

oh maybe that's why its so slow

#

you could do CoW for it

inner oak
#

bruh why some keyboards have very slow xhci endpoint interval

#

i was suffering with this month and the fix is just set interval if its too big for slow usb devices to 5

#
if (interval > 5) interval = 5;
stoic zinc
#

a bInterval of 6 can mean as low as 4ms

inner oak
stoic zinc
#

HS?

inner oak
stoic zinc
#

that really a problem?

inner oak
#

anyway now i can forget about xhci and start patching xf86 input mouse for my os

stoic zinc
#

ep_ctx->interval is encoded as (2 ** value) * 125Β΅s regardless of device speed or endpoint type

#

if you didn't, that's why it's laggy

inner oak
stoic zinc
#

look

#

that's why I shared the table above

#

so the descriptor has a number of milliseconds in it, right?

#

but the XHCI controller wants a power of 2 of microframes (125Β΅s)

#

if it's SSP, SS or HS you just subtract 1

#

if FS isoch, add 2

#

if FS/LS Interrupt, log2 and add 3

inner oak
#

okay ill try it now

stoic zinc
#

always read the docs carefully, there are almost no fields in the contexts without edge cases

#

for an LS device with interval value of 9 you want 16ms polling which should be ep_ctx->interval = 7

#

that's when you know you got it right

#

or, if you round down (technically wrong but I won't tell anyone) 6

stoic zinc
inner oak
#

xorg works with mouse very bad

#

ig my packet thing is bit bugged

onyx matrix
#

Probably

inner oak
#

im fetching only one packet instead of all

inner oak
#

okay i did some bufferization thing in my xf86-input-mouse and now all works

#

yes cursor now works

#

but now i need to fix keyboard input

#

it broken

jaunty oxide
inner oak
#

i want to cry

inner oak
#

on real hw xeyes is running perfectly but i have some issues with twm

#

context menu is appearing and disappearing very fast (my mouse driver bug)

sharp coral
#

I found potential bug in the syscall code

#

When looking for the syscall

#

If not found return NULL

inner oak
onyx matrix
sharp coral
inner oak
inner oak
#

actually input works

#

it can fetch keypress and keyrelease keys

inner oak
#

but xterm and st cant read any input :(

jaunty oxide
inner oak
#

maybe i didnt setup default ioctls for ptys

#

like when proc opens /dev/ptmx it didnt setup any flags in termios when creating new tty device

inner oak
#

no it not ioctl issue

#

they are already setup by term

#

i need to look st source code and find keyboard input reading code

inner oak
#

yes its some pty issue

inner oak
#

finally i fixed this bug

#

but there's another bug nooo

#

when i do newline from keyboard i can type 1 symbol and it freezes

stoic zinc
inner oak
stoic zinc
sharp coral
inner oak
white bramble
# inner oak wdym
void test() {}
void testa() {}
void testb() {}

void *syscall_handlers[] = {
    [1] = (void*)test,
    [2] = (void*)testa,
    [5] = (void*)testb
};
// to get syscall:
syscall_handlers[N]
inner oak
white bramble
#

I mean I tried with C++ on godbolt and it appears to work

inner oak
white bramble
white bramble
#

@inner oak

#

I had to change it to initialize it later on

#

but it still can work

last geyser
inner oak
#

like only two hints are available

#

first it freezes after newline and 1 symbol

#

second it cant draw screen

#

it didnt refresh it so if something (not xorg) for example my tty draws to it it didnt refresh

inner oak
#

it freezes on xnextevent

inner oak
#

it freezes on event handler

inner oak
#

st is finally ported

#

apps which i need to fix now

#

xterm (no input)

#

and twm (cant spawn xterm)

#

there's real hw test

jaunty oxide
#

Epic

onyx matrix
#

does xorg require pthreads?

inner oak
onyx matrix
#

fuck

inner oak
#

its just implementing sys_clone and futex stuff

#

which is not hard

onyx matrix
#

does xorg require dynamic linking

inner oak
onyx matrix
#

dang

jaunty oxide
#

There might be an option to disable that

onyx matrix
#

ah

#

i mean pthreads shouldn't be too hard to implement but im not sure about dynamic linking

#

plus the dependency hell

#

how many dependencies does xorg have?

#

to run xserver

inner oak
inner oak
onyx matrix
#

well i have no idea how im gonna do it

jaunty oxide
#

If so mlibc does it for you pretty much for free

onyx matrix
jaunty oxide
# onyx matrix ah

You just have to load The PT_INTERP and then jump to its entry point

onyx matrix
#

does the kernel have to load both the linker and the executable into memory or only rtld?

jaunty oxide
#

Plus keep in mind the linker is position independent, so you have to apply an offset

#

Cuz its base is 0

onyx matrix
onyx matrix
#

ah

inner oak
#

now i need to fix ptys (nano in st is broken) and fix some usb mouse bug

inner oak
#

they are fixed

#

my scheduling is trash

velvet nebula
#

i feel you

#

lol

#

it took me a week to fix mine

inner oak
#

i want to rewrite it to some priority based

velvet nebula
#

the first scheduler was running with a lot of luck

#

i don't even know how tf it was working

inner oak
#

also i want to add a lot of yield stuff to my syscalls just because when for example xeyes waiting for xorg some response it wastes cpu time

#

which xorg wants a lot

modern cypress
#

Wait i have been following this project for quite a while now and I wonder if your OS uses linux system call

modern cypress
#

Do you have xHCI driver?

inner oak
modern cypress
#

Cool

#

How painful was it in the scale of 1-10?

modern cypress
#

BRO ARE YOU 15?

#

That's impressive!

#

Hats off for you

inner oak
#

now im trying to port xv (image viewer) for twm background

inner oak
#

bruh xv src is trash

#

ill port xwallpaper instead of this

onyx matrix
#

xwallpaper is quite nice

inner oak
#

at least it doesn't have trash src and have normal ./configure

inner oak
#

new github preview also xwallpaper is ported

onyx matrix
#

Sick

#

/dev/tty3?

inner oak
#

ill remove this later

onyx matrix
#

Ah

inner oak
#

now i need to fix xterm

#

i dont want to port it but it triggers some bugs in kernel so i need to fix them

jaunty oxide
#

real terminal emulators: xterm
mental illnesses: everything else

inner oak
#

mmap bug ?

#

adding lock to mmap (anyway memory allocations should be locked) and disabling yield in poll with timeout worked

inner oak
#

ace of penguins is ported

sharp coral
sharp coral
velvet nebula
sharp coral
inner oak
inner oak
#

pipe rw optimization done

inner oak
#

bruh why mmap is so slow

#

how linux gets these values nooo

#

i need implement memory allocation on page fault

solid hearth
#

nice os

jaunty oxide
inner oak
jaunty oxide
inner oak
# jaunty oxide How are you measuring
void mmap_test() {
    printf("OS mmap test\n");
    for(int i = 0;i < 5;i++) {
        struct timespec start;
        struct timespec end;
        clock_gettime(CLOCK_MONOTONIC,&start);
        void* addr = mmap(0,0x80000,0,MAP_ANONYMOUS,-1,0);
        clock_gettime(CLOCK_MONOTONIC,&end);
        printf("OS mmap test %d - %d ns\n",i,end.tv_nsec - start.tv_nsec);
        
    }
}
solid hearth
#

on linux

inner oak
inner oak
#

priority based scheduling is waits for me

solid hearth
#

do CFS

onyx matrix
#

Do completely unfair scheduler trl

narrow mesa
#

next_task = tasks[rand() % num_tasks]

solid hearth
#

completely unfair scheduler wouldn't be scheduling at all

inner oak
#

there should be round robin flip coin scheduling

inner oak
#

setpriority() and getpriority() are done

inner oak
#

my yield function is trash

#

its just asm volatile("int $32")

onyx matrix
#

Mine is similar

inner oak
#

i need to optimize poll() tomorrow

#

because if i want to increase a processor time per process it gets slow

jaunty oxide
#

do u spin waiting for poll to complete or something

inner oak
#

but if i add 10 retry attempts it works fine even if this is useless (even on 1 cpu which ig is just time stuff)

inner oak
inner oak
#

i just was not yielding in waitpid and it just was cpu time waste

inner oak
#

before it was a really slow

#

now things which can do slow things is

  1. disabled doublebuffering (im doing some magic in kernel for it now)
  2. priority scheduling is not implemented yet
#

also im porting gtk now

modern cypress
#

what's happening, I wasn't checking the progress for like 4 or 5 days and you're here already?

final pilot
#

awesome

modern cypress
#

that's truly awesome

inner oak
#

tomorrow ill try to port gedit

inner oak
#

trying to port python day 1

#

tomorrow ill try to fix all errors

inner oak
#

now its much better

#

maybe it requires rename() to work

#

yes it requires rename

#

ill implement only file rename in tmpfs now

inner oak
#

its not rename

#

it faults on some aliases import in encodings/__init__.py

inner oak
#

πŸ₯³

timid willow
vast lake
#

Cuz if it was easy I might just do that before porting doom.

inner oak
#

because i already had syscalls to run a lot of stuff so i was only fixing bugs in my kernel

vast lake
inner oak
#

idk

vast lake
#

rn i just have these

#

might be enough idk

inner oak
vast lake
#

😭

solid hearth
inner oak
#

interesting

#

python dont want to have input if TERM is linux or if TERM is st-color256 it wants 2 byte input

#

i need to somehow change python input to ascii

inner oak
#

and it dont want to read stdin if poll is fast but if i slow python it tries to read it

#

i need to look at python src maybe i missing something (it tries to sys_clock_get)

inner oak
#

wait actually input works in scripts

inner oak
#

ig its just some unimplemented stuff/bug which i can debug normally later in some other things and fix

inner oak
#

now python port is done i can finally start porting gobject introspection and gtk

solid hearth
#

I've heard horror stories about gobject introspection

inner oak
#

gtk requires gl what 😭

#

then its time to port mesa

inner oak
#

freedesktop gitlab is down πŸ˜”

inner oak
#

it alive now

modern cypress
#

cloudflare is down as well

velvet nebula
#

my cloudflare zero trust still works

timid willow
#

hamburg is nuked

#

Cloudflare is down

velvet nebula
#

they are starting to fix stuff now

#

WARP still works tho

inner oak
inner oak
# inner oak wtf

my patch for gcc was bit broken and libstdc patch was just skipped

inner oak
#

why llvm compil is so slow nooo

inner oak
#

im compiling this already 20 minutes 😭

velvet nebula
inner oak
#

20 minutes and only this

velvet nebula
#

lol

inner oak
velvet nebula
inner oak
velvet nebula
#

you can make GH do it for you

inner oak
#

bruh im not compiling llvm

#

ill try to use mesa without llvm

inner oak
#

what mesa dont want to generate glx

inner oak
inner oak
#

ill just keep zlib as static

#

because shared for it anyway useless

inner oak
#

nice

#

mesa with softpipe works

#

i dont want to compile llvmpipe now just because llvm is fatass

modern cypress
#

That's some serious progress to have within a year πŸ‘

#

What do you usually refer to when implementing a new feature, especially the basic ones?

inner oak
modern cypress
#

Ow that will definitely help but I mean the whole OS development in general, i struggle to get simple tasks done

inner oak
#

now mesa port is done and i can finally port gtk (gtk requires it in spi core)

modern cypress
#

Wouldn't gtk require opengl? iirc gtk4 initializes opengl and vulkan

inner oak
#

i3wm and gtk port

#

application class is gtk demo application

onyx matrix
timid willow
modern cypress
#

Screenshot updated!

#

i said that proudly as of it's my repo haha

inner oak
inner oak
#

i have two bugs now:

  1. if i click on current desktop in i3bar it just start turning all memory to garbage until it page fault
  2. gtk somehow gets kernelspace addresses when i doing a lot of unspeakable things to it
#

both happens after sys_read

inner oak
#

i need to do unspeakable things test to my unix sockets

modern cypress
#

Does it work on real hw though?

inner oak
#

orange is usable on real hw cuz i have working xhci driver

inner oak
jaunty oxide
#

xd

modern cypress
inner oak
#

clone uacpi yourself to kernel/src/libc

#

anyway you can surrender if your gcc version is 15

modern cypress
#

its 14.2

#

Doesn't work anyways

inner oak
#

i have no idea why but i can normally build cross compiler only in 13-14 versions

inner oak
modern cypress
#
is this error ? "not related to this btw"

"which: no x86_64-orange-mlibc-gcc in (/home/ausr/opt/cross/orange/bin:/home/ausr/cross/bin:/home/ausr/.pyenv/plugins/pyenv-virtualenv/shims:/home/ausr/.pyenv/shims:/home/ausr/.pyenv/bin:/usr/lib/ccache/bin:/home/ausr/cross/bin:/home/ausr/.pyenv/plugins/pyenv-virtualenv/shims:/home/ausr/.pyenv/bin:/home/ausr/miniconda3/bin:/home/ausr/miniconda3/condabin:/home/ausr/.cargo/bin:/home/ausr/.local/share/pnpm:/usr/lib/ccache/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/ausr/.dotnet/tools:/var/lib/snapd/snap/bin:/home/ausr/cc65/bin:/home/ausr/cc65/bin)
It looks like you don't have the cross-compiler installed, or it isn't in your PATH.
If you built your cross-compiler, add it to your PATH with:
export PATH="$HOME/opt/cross/orange/bin:$PATH"
Alternatively, you can build the cross-compiler with: sh build-cross.sh
Also you should have host gcc with version < 14 (i am using 13.3.0)"```
#

I don't think i have it installed or added to the path

inner oak
modern cypress
#

Cloning linux? the whole damn kernel?

inner oak
#

its for headers which mlibc wants

#

dw it will clone only one time

solid hearth
timid willow
#

cause

inner oak
#

also if i launch i3bar with --verbose flag (prints after events) there's no this bug

timid willow
#

Every time I eat an orange, it reminds me of this 😭

inner oak
#

i3bar crashes on these lines (in libxcb)

#

it looks like size which used in memcpy is really big

solid hearth
inner oak
#

maybe i have problem in recv (its just read syscall to unix socket)

inner oak
#

its lines which was called by i3bar

solid hearth
#

why are there raw syscall instructions in it

inner oak
#

to debug it

solid hearth
#

ah

inner oak
#

finally i figured out issue

#

now its time to fix it

solid hearth
inner oak
final pilot
#

it was because i forgot to reset msg controllen to 0 in recvmsg

#

also need to reset msg_flags to 0

inner oak
#

ty

#

my kernel panic is not cool

#

i want to make it cool

onyx matrix
#

Mine is just a panic message, a witty comment and a backtrace

#

I get funnier RNG on aarch64 than x86-64

modern cypress
#

This is mine

inner oak
modern cypress
#

I have 21:9 ultrawide monitor

#

It looks better on regular 16:9 monitor

modern cypress
timid willow
modern cypress
#

Hmm I'll see what I can do

inner oak
#

my todo is implement normal recvmsg and sendmsg functions

inner oak
#

actually my sigma recv to read convert works well

vast lake
#

Let me absolutely not steal that :D

golden flare
#

ah its a website

#

even cooler

inner oak
inner oak
#

i have weird bug with mouse

#

sometimes xorg can ignore events from mouse and just do nothing but events from keyboard work well

#

but cursor is getting moved

#

issue can be in poll or in my sockets

#

and i getting this only with smp

#

with 1 core all is fine

inner oak
#

but only after time

#

like i can do some things with mouse but they will be handled only after some time

#

so ig it can be poll issue

inner oak
#

yes its poll issue

inner oak
#

i want to make some thing like dmesg

#

because serial output is slow

modern cypress
#

also why is initrd so slow?

inner oak
#

initrd is 1 gb

inner oak
#

not sucking panic is done

#

i forgot to print cpudata

vast lake
solid hearth
#

and maybe pad it to 16 digits with zeroes

inner oak
#

im going to reject poll counter thing

inner oak
#

btw

inner oak
modern cypress
#

Do you use uACPI?

inner oak
jaunty oxide
#

step 1. poll all fds
step 2. yield if none ready
step 3. goto 1

inner oak
#

tomorrow ill try to debug it again and ill try to spam spinlocks everywhere

#

cuz i have this bug only with more than one cpu

inner oak
timid willow
#

the name

#

THE NAME

inner oak
inner oak
#

actually xorg reads this pipe

#

what i want

[310263771] sys_read: trying to red pipe 19 from proc 13

[310264832] syscall_handler_c: sys 46 from 13
[310265631] syscall_handler_c: sys 46 from 13
[310266401] syscall_handler_c: sys 5 from 13
[310267152] syscall_handler_c: sys 46 from 13
[310267920] syscall_handler_c: sys 5 from 13
[310268733] syscall_handler_c: sys 46 from 13
[310330678] sys_poll: polin done fd 19 writ sock 0xffff80007e1c39d8 pip 0x0
[310269506] syscall_handler_c: sys 48 from 13
[310332705] sys_poll: Poll done timeout 59743 from proc 17 num_ev 1
[310275334] syscall_handler_c: sys 9 from 13
[310276102] syscall_handler_c: sys 4 from 13
[310277007] syscall_handler_c: sys 4 from 13
[310277731] syscall_handler_c: sys 9 from 13
[310278387] syscall_handler_c: sys 46 from 13
[310280180] syscall_handler_c: sys 48 from 13

what i dont want ❌

[373279036] sys_read: trying to red pipe 19 from proc 13

[373280015] syscall_handler_c: sys 46 from 13
[373280753] syscall_handler_c: sys 48 from 13
[373380359] sys_write: Writing Not file fd 18 state 2 from proc 15 count 1 writ sock 0x0
[373307493] syscall_handler_c: sys 4 from 13
inner oak
#

finally i fixed this

#

problem was what sometimes revents in poll() didnt reset

#

and i didnt gave to poll with timeout more time after yield

inner oak
#

bruh i have another bug nooo

timid willow
#

Bug haven

viral basalt
#

@inner oak I have question, do you use serial or framebuffer to log? Both now and when you've just started. Thanks in advance, please answert TvT

inner oak
#

and i use serial only for debugging

inner oak
#

OH

#

do you want fucking unexpected plot twist

#

all these bugs

inner oak
#

and another bug

#

existed cuz fucking tsc timer

#

i forgot to remove tsc timer from sys_clock_get and yall know how tsc is bad with smp things

#

but i need to get another fast timer

#

cuz hpet is slow

solid hearth
inner oak
solid hearth
#

you can check out linux code

inner oak
#

i have kvmclock (pvclock) support i need only implement invariant tsc support

timid willow
#

do you meant like you use serial before user space?

inner oak
#

bruh my memory usage is high asf

solid hearth
inner oak
solid hearth
#

maybe it's leaking

inner oak
#

and shared memory too

#

and i need cow

#

because shared libraries are too fat

inner oak
#

i want to remove initrd copy to my tmpfs and just mount initrd to /

#

anyway if some process wants to write file /tmp exists

solid hearth
inner oak
solid hearth
#

file format

#

initrd

inner oak
#

.tar

onyx matrix
#

Beautiful negative tsc freq

solid hearth
#

bro used %d

#

also very believable uacpi score

inner oak
#

anyway ill just keep this sigma fix and start to doing cow, initrd mount thing

final pilot
#

for most programs

inner oak
#

actually everything works on real hw but slow because framebuffer

#

i need somehow make doublebuffering which not sucks

solid hearth
inner oak
onyx matrix
#

Thanks discord for not scrolling all the way down

final pilot
#

if you are mapping it with wc it shouldnt have any performance issue

#

you shouldnt need to have double buffering in the kernel

timid willow
#

forgot to star this

#

starred

inner oak
modern cypress
#

I just switched to TSC too haha

modern cypress
inner oak
#

because only now I noticed what my pat is bugged

inner oak
#

now when all weird bugs are fixed my real sigma todo is cow, priority scheduling, unix signals, disk drivers, fat or ext2 support and port something

inner oak
onyx matrix
#

oh i thought xorg needed those

jaunty oxide
#

nah, you dont need signals for xorg

#

only if you want a usable xorg

#

but like if you never close your xterm windows then theres no issues meme

onyx matrix
#

oh lmfao

inner oak
#

now i am w*ndows user

modern cypress
onyx matrix
viral basalt
inner oak
#

i had break now i can continue orange development

#

i need to make dependencies list for orange

inner oak
#

i debugging some weird smp bug

#

where my schedule function gets unmapped stack

golden flare
inner oak
#

maybe threads still uses same cr3 even if its free

golden flare
#

check your ctx switch function because its probably not changing cr3 properly

#

and check if you are actually putting cr3 in when loading the proc an state::EMBRYO

inner oak
inner oak
#

oh

#

i didnt switched current cr3 in sys_exit

#

to kernel default

#

timekeeping in qemu in wsl is awesome

viral basalt
#

Well, I mean there's you, SmashedStack

golden flare
golden flare
#

there is a difference KEKW

viral basalt
golden flare
#

my white name is boring imma go introduce my self

viral basalt
golden flare
#

corrupted stack, the most basic explanation

viral basalt
viral basalt
#

Aight aight

golden flare
#

im not corrupted tho :>

viral basalt
golden flare
viral basalt
#

Lmao

inner oak
#

7 days left until my 16th birthday

#

now ill move my pty stuff to unix sockets and i need to finally implement cow

vast lake
timid willow
#

I forgot how many days to my own birthday

solid hearth
inner oak
#

like i want star farm

viral basalt
inner oak
#

im disabling ps/2 driver

#

its buggy and anyway xhci is my beloved

onyx matrix
white bramble
#

out of so many combinations bro 😭

onyx matrix
#

😭

inner oak
velvet nebula
#

i don't think they should really focus on that rn

timid willow
fierce surge
#

anyway why you gotta do name theft πŸ˜”

inner oak
#

remapping all memory to read only with vmm is done

#

i want to do this stuff for cow
process a does fork() and there's new process b - all memory become read only for process a and b
if someone wants to write something my page fault handler allocates new memory for some proc and makes this memory rw, and also marks this memory in vmm as own memory
if there a lot of processes all memory become read only for all processes (there will be some list of processes which share memory)

inner oak
#

right now im doing cow and i am thinking about demand paging

#

is demand paging can be good

golden flare
golden flare
#

bro im mapping you

#

:>

timid willow
golden flare
#

:>

#

@sharp coral

sharp coral
#

:>

jaunty oxide
inner oak
# jaunty oxide Wdym by demang paging

allocate memory on page fault instead of allocating memory in mmap like if i allocate some memory in mmap it will be allocated only when process tries to access it

#

linux doing this

jaunty oxide
#

Ah yeah do it

#

Thought you were meaning file stuff or even swap

inner oak
#

now i have two bugs

#

my cow dont cowing

#

and it somehow tries to free or do cow stuff to already freed memory

modern cypress
#

I think mine is 8 months until my 18th birthday

inner oak
#

it looks like my cow counter (how many processes uses this memory) is cursed

inner oak
#

today is my birthday

jaunty oxide
#

happy birth

inner oak
sly sandal
inner oak
#

wait bruh

#

i had all this time sex with CoW and just realised what glxgears itself requires a lot of memory (400 mb on host)

#

anyway ill keep cow because for example gtk love to spam threads

#

after cow ill do demand paging (alloc memory on page fault)

inner oak
inner oak
solid hearth
#

this is with software

inner oak
solid hearth
#

pid

inner oak
jaunty oxide
#

keep in mind virt is just what was mmap'd

#

res is the actual memory in memory

inner oak
#

k

inner oak
#

im still thinking how to get a lot of github stars

jaunty oxide
#

"running C code on my 64 bit operating system" post ro r/osdev gg ez

inner oak
timid willow
#

New account

#

Post something stupid

#

We all like for karma or whatever

#

You get 5+

#

You post in OSDev

#

Problem solved

inner oak
timid willow
#

You better not be saying β€œI had sexing with CoW” again

inner oak
timid willow
#

By the way the word β€œsex” gets flagged by Reddit
-# should be common sense but just in case sense English doesn’t seem like your main language

jaunty oxide
#

(I am still salty) ((ordered by score all time))

inner oak
onyx matrix
#

Make a 4 bit os and get 4k stars trl

timid willow
#

Great Idea

timid willow
#

I posted my OS and it got nuked by moderation for being racist against dinosaurs

#

Also some how I bullied the sun

#

-# I don’t even use Reddit btw

inner oak
#

i want to use free list for lazy allocations instead of buddy

#

buddy only for >4kb allocations for example kernel thread stacks, tmpfs stuff or dma

#

and i am thinking how much memory give to buddy and free list

#

50%-50% or 40%-60%

#

or absolutely sigma 15%-75%

#

free list will be used for mmap lazy alloc, paging

worn gale
inner oak
#

so i decided

#

my freelist allocator will something like extension for buddy allocator for 4 kb pages

#

like it will request from buddy 1 mb memory and after work with it and allocate 4k pages

#

ill do just because lazy allocation will require speed which buddy dont have a lot

#

and because freelist is fast memory allocation

inner oak
#

i switched to linux again

#

also i returned my favorite windows xp theme