#Orange
1 messages Β· Page 2 of 1
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
and also for ehci you need some extra logic to handle split transactions to support usb 1 devices plugged into usb 2 hubs
but for xhci the controller does that for you
Hmmmm
i think i should have phys to virt and virt to phys syscalls too (just for conveniences)
why would userspace need to know the physical address of anything?
its only for drivers
maybe its bad idea
damn better support than managarm 
now i want to make it work on my laptop
(my laptop have ehci and xhci)
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)
Iirc there was a bsd that implemented pipes using unix sockets
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
this is "so sigma"
now its time to implement poll()
my todo list:
- finally make unix sockets in vfs
- fifo support
my unix sockets is not live in vfs
i need to make them live in it
bro i need to stop play deltarune π
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
i had a similar issue too
for me it was cause i forgot to remove process from child list once it was destroyied 
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)
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)
doomgeneric running waitpid makes zero sense
i think so too
well it call system
when an error happend it call system to display info using zenity
funny enought i have the same issue doomgeneric somehow get stuck on waitpid when doing system
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
check your nanosleep, because i had an issue where it would create large lag spikes because of it
its not sleep
okay i found problem
my hpet currentnano() was broken
i was returning hpet counter directly (i didnt was converting this to nanoseconds)

fuck yeah
same doom but with fullscreen patch (i had fullscreen diff for doom)
oh i thought you were telling doom the resolution
i know it's possible i just don't know how
doomgeneric has a header where you can set the scale
you can also do it at runtime
yes but its easier to just tell doomgeneric to do it
or maybee you can define the macro to variable
so you can set it at runtime
fifo is done
i improved my tsc timer and now orange defaults to tsc timer instead of hpet
cool
there's another poll test which targets stdin now
all that's left is to test poll with unix sockets
and i can finally start xorg porting
wow really cool
maybe its good idea to start to use jinx
finally i understand how to use jinx
now i need to create recipes for my init, drivers, bash and etc.
i want symlink directory support
symlink handling is moved to vfs level
because its easier to handle when in some fs there's symlink which points to another fs
Are you seriously running xp
its xfce theme
okay my previous account cpplover0 is died
because my phone firmware was erased
idk how
at least my github is created with another email
whaaattt
@inner oak is this a fake ? (if you don't respond i'll assume it's true)
maybe look at my profile connections
damn sad π
blame xiaomi
π
for now ill return my old sh build system and try to implement directory symlinks
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
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
now my tty looks better
Did you memcpy the limine fb or did you implement the image loading in kernel
im doing image loading in userspace
(i have userspace tty)
orange
really
now xhci works on my laptop
but i have some problems
- it doesnt works on ilobilo laptop and virtualbox
- some old keyboards is fucking slow
also i want to finally implement MSI-X and MSI interrupts for userspace
because polling is skowy
slow*
wtf all this time i didnt have license
lol the same thing happened to me in i686 bentobox
each message like this destroys my mental health
(i was suffering with pkg-config 2 hours btw)
im going to sleep
ill use libsha1 or openssl for sha1 implementation (xorg requires it)
Do u have libgcrypt
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 π
Welcome to xorg
5 errors left
Almost there
why so much pain
okay i just converted libxfont2 to shared and now all is ok
i dont want to support hard links now so ill just make link() to create symlinks
and this is time to implement fs related syscalls like mkdir fchmod and etc.
i want to change my triplet from x86_64-orange to x86_64-orange-mlibc
i wouldn't bother
finally i restored this account
now libtool demons are satisfied
libtoold
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
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
how is xorg
Downlaod xkeyboard stuff and make sure no syscalls fail etc
IIRC xkbcomp used mmapd files
wait it requires files mmap ???
i support only devfs mmap
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
its not mmap
ig i should try to listen all file operations which xorg does before error
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)
i fixed thus
issue was in what i was memcpy to stack before increasing it in auxv stack filling
there's just a little bit left for xorg port
π
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)
probably just polling to wait for incoming connection requests?
oh
i didnt thought about it
at least there's white box π
(it crashed on division by zero)
also i did a lot optimizations and i want to do more
Is that supposed to be xclock?
yes
Lol knew it
I had a similar issue where it crashed with division by zero
Usually issue with fetching time
how you fixed this
Idk trace your syscalls and see if it's returning shit correctly
That's what I did
Oh yeah test with xeyes
ok
i dont have mouse yet but ig it can work even without mouse
Yeah
Then port st π
Then dwm
what is this
Then rice your OS and post it on r/unixporn for karma
k
Check if mlibc complains about some unimplemented time function
Ew naziware
hell yes
i saw what it was logging about some timer function and what i didnt had some sysdep implemented
maybe i need to inplement this
π
Yeah you need it, it does some division on time iirc
Yeah
I'm assuming getclock and all
And if you have an upsated mlibc my and no's scanf float work should allow xclock to tick
Oh what
I always thought something was wrong with our kernel's time function for this long π
Nah the standard libx11 or whatever library it was uses %g for float options and scanf float was not implemented
Dang
I always assumed it work because of this screenshot
https://github.com/managarm/managarm/blob/assets/screenshots%2Fmanagarm-glxgears-xclock.png
π
Iirc if you forced the clock to redraw by dragging a window over it or something it would do it
Or something else
why is it so patchy?
my tty overwrites fb
oh ok
How do u do for background images again
my userspace tty opens bg and parses it with stb image
hell yeah
after some magic it gives it to flanterm
I wss thinking of passing the raw pixels to the kernel tty using an ioctl from userspace
there's some more clear screen
now my target is implement vt (ctrl + alt + f0-10) and make my syscalls more faster
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
i am doing this now
Nice
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
pain
Seems like a pain i would like to have
Nah compile twm
Twm + xterm and become unix
Port Kwin 
Ahh
its time to write mouse driver (usb and ps/2)
Are you going to start with ps/2?
PS/2 is more harder? I didnt know that
/j
i am thinking now how to implement double buffering
it looks like trash on my pc but in qemu all ok
possibly incorrect cache settings for the framebuffer?
It should definitely be faster on baremetal
it mapped as wc
maybe i should do double buffering in kernel?
i fixed this by changing memcpy to just rep movsb
i want to replace forks with pthreads in my tty
Interesting, what was it before?
ig it was laggy because scheduling prevented code to copy buffer to framebuffer for small time
Does it boot on baremetal?
im testing it on my pc and laptop
xterm and st requires select bruh
i need to find a way to avoid writing select() implementation if i already have poll()
You can implement select using poll
If you look at the astral sysdeps on mlibc you can see how I did it
nice
i tried to do it but it was faulting
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
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
that's weird, my fix was to add a newline at the end of /etc/passwd
that was because i had bug in kill and when i set SHELL it was faulting on kill
so real fix was setting variable SHELL
i set this in .bashrc
today ill try to port xterm and st
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
st should be fairly easy to port
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
There is a reason why xterm source has on the readme "abandon all hope, ye who enter here"
so true
the only thing that helps is grep
The only reason I ported xterm to astral was unix workstation larp
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
then i have something broken
finally i watched sherlock series 2010-2017
todo: fix bug when xterm and st both stucking at something and this related to futex and poll and maybe unix sockets
Here be dragons
Beware of the leopard
its time for ps/2 controller
rename to Water
nah
im searching now dark orange backgrounds
because my eyes burn on old background
lol
i have some issue on real hw
usb mouse is just dont want to report x and instead of x puts all to y
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
that boot sequence is soo slow
what
initrd have a lot of files
my initrd is 163mb and it takes 1 second for limine to load it and 68ms to mount it
then i have no idea why it slow
i need to try optimize my initrd parse
probably
Wtf thats a long mount time, do you create nodes for every file on mount or something
wdym a long mount time
also yes my tarfs mounts everything at once instead of doing it lazily like my ext2 driver
Ah that makes sense then
wait are you mounting your initrd
im copying it to tmpfs
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;
you accounting for different speed devices encoding the bInterval field differently?
a bInterval of 6 can mean as low as 4ms
i had interval 9 which ig is slow for mouses
low speed
idk why but it was laggy until i limited interval
anyway now i can forget about xhci and start patching xf86 input mouse for my os
are you properly calculating ep_ctx->interval = log2(bInterval)?
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
i should log2 this ???????
yes
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
okay ill try it now
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
that worked much better
ty
happy to hear it, will work a lot better with other devices too
Probably
i understood why it works very bad
im fetching only one packet instead of all
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
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)
I found potential bug in the syscall code
When looking for the syscall
If not found return NULL
it can be ub btw
Why don't you just use an array directly
Won't you get a page fault if you read a bad address tho?
not returning value from some function which needs to return can be ub (in my case it can ud2)
maybe xev can help ?
wait
actually input works
it can fetch keypress and keyrelease keys
but xterm and st cant read any input :(
Could it be your ptys?
wait
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
no it not ioctl issue
they are already setup by term
i need to look st source code and find keyboard input reading code
yes its some pty issue
finally i fixed this bug
but there's another bug 
when i do newline from keyboard i can type 1 symbol and it freezes
bro why looping instead of table[rax] πππ
i wanted to search syscalls by num not array index
why not make the num the array index?
makes sense, double the effor when you could half it
syscall_entry_t *syscalls; maybe something like this and just use rax to get the index
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]
isnt it unsupported on c++ compilers
I mean I tried with C++ on godbolt and it appears to work
last time i checked with g++ its unsupported
oh lemme try g++
@inner oak
I had to change it to initialize it later on
but it still can work
its unsupported if you do it out of order iirc
i need somehow debug it
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
it freezes on xnextevent
st is finally ported
apps which i need to fix now
xterm (no input)
and twm (cant spawn xterm)
there's real hw test
Epic
does xorg require pthreads?
yes
fuck
does xorg require dynamic linking
yes
dang
Mostly for the input thread afaik
There might be an option to disable that
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
a lot
what is the problem with dynamic linking btw
well i have no idea how im gonna do it
R you using mlibc
If so mlibc does it for you pretty much for free
yes
ah
You just have to load The PT_INTERP and then jump to its entry point
does the kernel have to load both the linker and the executable into memory or only rtld?
both
Both
Plus keep in mind the linker is position independent, so you have to apply an offset
Cuz its base is 0
how does the linker know where the executable is?
ah
Auxv
ah
now i need to fix ptys (nano in st is broken) and fix some usb mouse bug
i want to rewrite it to some priority based
the first scheduler was running with a lot of luck
i don't even know how tf it was working
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
Wait i have been following this project for quite a while now and I wonder if your OS uses linux system call
no
Do you have xHCI driver?
yes
now im trying to port xv (image viewer) for twm background
xwallpaper is quite nice
yes
at least it doesn't have trash src and have normal ./configure
new github preview also xwallpaper is ported
Ah
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
real terminal emulators: xterm
mental illnesses: everything else
bruh what
mmap bug ?
adding lock to mmap (anyway memory allocations should be locked) and disabling yield in poll with timeout worked
ace of penguins is ported
How do distros change the borders? Like the default one in Orange is this tealish color
its twm default color
Is it changeable
why not make your window manager?

yes
pipe rw optimization done
bruh why mmap is so slow
how linux gets these values 
i need implement memory allocation on page fault
How r U measyring
what
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);
}
}
./a.out
OS mmap test
OS mmap test 0 - 2933 ns
OS mmap test 1 - 1397 ns
OS mmap test 2 - 1956 ns
OS mmap test 3 - 2375 ns
OS mmap test 4 - 2375 ns
on linux
i googled and found what it called demand paging
anyway its fast
Oh
priority based scheduling is waits for me
do CFS
Do completely unfair scheduler 
next_task = tasks[rand() % num_tasks]
theoretically that could be completely fair
completely unfair scheduler wouldn't be scheduling at all
there should be round robin flip coin scheduling
setpriority() and getpriority() are done
Mine is similar
i need to optimize poll() tomorrow
because if i want to increase a processor time per process it gets slow
do u spin waiting for poll to complete or something
im checking for poll and if there's no events yielding
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)
like poll 10 times before yielding
the issue was not in poll
i just was not yielding in waitpid and it just was cpu time waste
now my syscalls are optimized
before it was a really slow
now things which can do slow things is
- disabled doublebuffering (im doing some magic in kernel for it now)
- priority scheduling is not implemented yet
also im porting gtk now
what's happening, I wasn't checking the progress for like 4 or 5 days and you're here already?
awesome
that's truly awesome
tomorrow ill try to port gedit
now its much better
maybe it requires rename() to work
yes it requires rename
ill implement only file rename in tmpfs now
π₯³
Free robux simulator
how hard was it porting python on a scale of 1-10.
Cuz if it was easy I might just do that before porting doom.
4
because i already had syscalls to run a lot of stuff so i was only fixing bugs in my kernel
hmm what syscalls did it need.
idk
π
based
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
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)
wait actually input works in scripts
but in python shell it doesnt work
ig its just some unimplemented stuff/bug which i can debug normally later in some other things and fix
now python port is done i can finally start porting gobject introspection and gtk
I've heard horror stories about gobject introspection
im too 
freedesktop gitlab is down π
it alive now
cloudflare is down as well
not all cloudflare
my cloudflare zero trust still works
it's down everywhere
they are starting to fix stuff now
WARP still works tho
wtf
my patch for gcc was bit broken and libstdc patch was just skipped
why llvm compil is so slow 
im compiling this already 20 minutes π
i make GH Actions compile it, lol
20 minutes and only this
lol
i need this because mesa requires it
use github to compile it while you are away
im cross compiling it
you can make GH do it for you
wtf
nice
mesa with softpipe works
i dont want to compile llvmpipe now just because llvm is fatass
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?
if you mean syscalls then just i do man 2
Ow that will definitely help but I mean the whole OS development in general, i struggle to get simple tasks done
now mesa port is done and i can finally port gtk (gtk requires it in spi core)
Wouldn't gtk require opengl? iirc gtk4 initializes opengl and vulkan
mesa is opengl

Run your OS in a VM in a VM in a VM
i3wm?
Screenshot updated!
i said that proudly as of it's my repo haha
yes
i have two bugs now:
- if i click on current desktop in i3bar it just start turning all memory to garbage until it page fault
- gtk somehow gets kernelspace addresses when i doing a lot of unspeakable things to it
both happens after sys_read
i need to do unspeakable things test to my unix sockets
Does it work on real hw though?
yes
orange is usable on real hw cuz i have working xhci driver
wtf
xd
i have git submkdules bit broken
clone uacpi yourself to kernel/src/libc
anyway you can surrender if your gcc version is 15
i have no idea why but i can normally build cross compiler only in 13-14 versions
send logs
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
Cloning linux? the whole damn kernel?
why not download a tarball
cause
wait maybe these bugs are connected
also if i launch i3bar with --verbose flag (prints after events) there's no this bug
Every time I eat an orange, it reminds me of this π
me too
i3bar crashes on these lines (in libxcb)
it looks like size which used in memcpy is really big
is that i3bar source
maybe i have problem in recv (its just read syscall to unix socket)
why are there raw syscall instructions in it
i put some breakpoints
to debug it
ah
what is it
my recv is trash
lol i had a very similar issue
it was because i forgot to reset msg controllen to 0 in recvmsg
also need to reset msg_flags to 0
that worked
ty
my kernel panic is not cool
i want to make it cool
Mine is just a panic message, a witty comment and a backtrace
I get funnier RNG on aarch64 than x86-64
This is mine
why is it stretched
fix it
Hmm I'll see what I can do
my todo is implement normal recvmsg and sendmsg functions
actually my sigma recv to read convert works well
real sigma.
Let me absolutely not steal that :D
i like this app imma get it
ah its a website
even cooler
anyway i need to finally create recvmsg sendmsg syscalls
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
i found what it actually can read events
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
yes its poll issue
also why is initrd so slow?
Damn thats actually fire.
add : after register names
and maybe pad it to 16 digits with zeroes
debugging process is 70-80% done
Do you use uACPI?
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
it looks better now
i found what xf86 input mouse actually sends some data via pipe but it looks like some signal (xf86 input keyboard does it too and i have this bug with keyboard too)
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
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
bruh i have another bug 
Bug haven
@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
i use both before userspace after userspace only serial
and i use serial only for debugging
that bug
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
syncronise tsc between all cores
how
you can check out linux code
maybe ill try to do this kvmclock -> invariant tsc -> hpet
i have kvmclock (pvclock) support i need only implement invariant tsc support
wat
do you meant like you use serial before user space?
Probs
bruh my memory usage is high asf
how high
there's no memory after two glxgears when i have 4g memory
maybe it's leaking
yeah i need to finally implement munmap
and shared memory too
and i need cow
because shared libraries are too fat
i want to remove initrd copy to my tmpfs and just mount initrd to /
anyway if some process wants to write file /tmp exists
what format do you use for it
wdym
.tar
Beautiful negative tsc freq
i swear
anyway ill just keep this sigma fix and start to doing cow, initrd mount thing
i kinda doubt that would work
for most programs
actually everything works on real hw but slow because framebuffer
i need somehow make doublebuffering which not sucks
are you mapping it with WC?
yes
Thanks discord for not scrolling all the way down
huh
if you are mapping it with wc it shouldnt have any performance issue
you shouldnt need to have double buffering in the kernel
i have this in userspace
I think he needs to have double buffering because rendering all in one framebuffer is not ideal. If im not correct then feel free to correct me though
maybe you are right
because only now I noticed what my pat is bugged
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
ext2
you don't have signals?
yes
oh i thought xorg needed those
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 
oh lmfao
now i am w*ndows user
What happened
w*ndows 11 π
w*ndows 11 π
i had break now i can continue orange development
i need to make dependencies list for orange
ping unmapped stack he can help you :>
issue is what process still uses already cr3 which i free before
maybe threads still uses same cr3 even if its free
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
problem can be what i dont have scheduling lock
oh
i didnt switched current cr3 in sys_exit
to kernel default
timekeeping in qemu in wsl is awesome
I'm surprised that's a real person
Well, I mean there's you, SmashedStack
you dont know unmapped stack?
yeah but only ping me if its a smashed stack not unmapped stack
there is a difference 

my white name is boring imma go introduce my self
What is the definition of Smashed Stack though
corrupted stack, the most basic explanation
Test
im not corrupted tho :>
Hmm, so you're the corruptor then?
ig so
Lmao
7 days left until my 16th birthday
now ill move my pty stuff to unix sockets and i need to finally implement cow
6 days left until my 14th birthday.
I forgot how many days to my own birthday
maybe i need to post my os to reddit too
like i want star farm
LMAO 
π
π
bro what π
Reminds me of a certain website
idk how I came across this message but idk why anybody would know me, I'm not very active 
anyway why you gotta do name theft π
because you are unmapped stack
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)
right now im doing cow and i am thinking about demand paging
is demand paging can be good
SmashedStack is not UnmappedStack...
TorturedStack
:>
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
now i have two bugs
my cow dont cowing
and it somehow tries to free or do cow stuff to already freed memory
Haha, neither do i
I think mine is 8 months until my 18th birthday
i found why it faults
it looks like my cow counter (how many processes uses this memory) is cursed
today is my birthday
happy birth
ty
happy birthday
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)
What
opengl is fat
did you ran glxgears with softpipe enabled
what is 388079
pid
k
im still thinking how to get a lot of github stars
"running C code on my 64 bit operating system" post ro r/osdev gg ez
im getting shadow banned on reddit idk why
New account
Post something stupid
We all like for karma or whatever
You get 5+
You post in OSDev
Problem solved
like if i post anything post getting removed by reddit filters and im getting banned π
Bro check the wording
You better not be saying βI had sexing with CoWβ again
I specifically made it "CoW" instead of "cow" because dirty mind
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
bro doesnt matter u can post the biggest slop to r/osdev and you'll get a shitton of updoots
(I am still salty) ((ordered by score all time))
so with "i3 running on my 64 bit operating system" ill get a lot of upvotes and stars
Make a 4 bit os and get 4k stars 
Holy
Great Idea
Wrong
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
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
Itβs simple:
skibidi > Astral
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


