#EvalynOS
1 messages · Page 2 of 1
Just don’t fuck up and your ok
If you do the same in C++ code it would crash the same
I’m letting Lua devs feel my pain

The engine is pretty complete for the most part in terms of adding new features for games
The rendering pipeline is what needs the most work
XD
gimme a moment my ethernet cable that's kidna fucked up aint' working properly, i broke the thing where it connects to LOL
I got it to play a music video by loading every frame as a texture and swapping between them and loading them in and out of vram and then calling a system media player from Luas shell execution
ooh
It was like a 2gb somthing game tho
So I’m not sharing it XD
I also have this little thing that you give a sub set of systemd style commands to
And it will figure out your init ststem
And then execute the proper command for your system
So you don’t have to remember many different syntaces
oooh
It has auto detection and a config file to override it
oh nice nice
daamnnn
And it’s all a single C file of like 200 lines
But this stuff isn’t that impressive
Just some code I threw together and stuffs
I just sit in my bedroom all day on my computer and make code and play video games
XD
eh i think it's just u being built diff
possibly u having fun making these
i alr got burned out
I don’t constantly code and I get un burnt fast
So I am able to pace myself to keep going
And yeah it’s 8am with no sleep
d o n o t
copy me LMAO
go sleep
i swear
u will get burned out like me even though u don't code
i mean even if you don't code
I’ve been doing this for the last few weeks now
XD
And I keep trying to fix it
nah just buy monster
And then it returns
I drank two two liters of Dr Pepper once
that is kinda not optimal XD
I mean is any of my code “optimal”
A lot of my code is made at 3am working with no sleep
That’s why I also chose to live dangerously
i can now see a pattern LMAO
Dangerously cheesy
your code says a lot about who you are
DW I know how to make “safer” code and other stuff
Add the checks and other stuff etc
Don’t give Lua raw pointers but give handles
Etc etc
i mean like u can write safer code but chooses not to LMAO
that pattern
im operating on sub optimal braincells right now pardon if i say something out of the question
It’s more fun on the edge and it’s more performant
And if stuff happens where it crashes something else already fucked up bad for the most part
then that tells a lot about u XD
(For the kernel side)
I have no excuse for the LUA shit I’m pulling 😭
I should fix that
I don’t get to do a lot irl though
I’m not allowed to leave my house much and I’m home schooled 
oh zamn ;-;
So this might just be how I get out my dangerous things since I can’t do anything fun irl
But like subconsciously
don't worry the outside world is just fucked as it is the same as the world we live in on the internet
I’m gonna have to get a GED and shit
wat's GED?
as a malware analyst for quite a while now i can attest that the world we live in ain't kind as it seems
High school diploma but not through high school
ooh
It’s an “equivalent”
should be the same XD
i tihnk you received better education than the current ediucation that we live in to be honest
a lot of factors regarding how the external factors such as classmates, environment tells a lot that it's failing
and hwo they teach u
I’ve been self learning everything
Because my parents do nothing XD
i resent the current education system but yea XD
your work would be the US equivalent of uuh
what's that called again
AP subjects
yes yes
Honestly if Covid didn’t happen I would be still in school
oh damn
My life would of ended up much different and I might not of discovered my self
yeaa ;-;
But I should sleep because the keys on my phone keyboard look like they are rotating
These are uhhh not rated right
Rotated
wat da XD
i think i foudn the bug
Oooo
we needa keep the interrupts disabled until the idle thread is fully done and at least one real kernel thread is linked
Even though I am tired and seeing things my brain is still mostly at full capacity for programming
or don't shouldSchedule = 1 until inserted an actual thread
should i explain how it works XD
how to be like u
i envy u a little XD
Ohhhhh shit right. I need to check if it was enabled first before doing the swapping logic
teach me ur ways
and it only took us a collaborative effort of an hour to debug XD
Partial Mental insanity?
The TTY should check if it is one before changing to zero and then one then
yea
Well true true
But the physical bug was from cli and sti
But I guess this has the same effect
ye so basiaclly in real hardware uuh
setup_idt turns interupts on which is sti while we're still in early boot
as pointed in the kernel.c
uuuuuuuh
aparently
wait where am i
ok so
setup_threading() immediately calls create_thread(null)
rihgt?
and it pushes null as the return address for the new thread and at the end sets shouldSchedule = 1
But the tty code shouldn’t get executed until after the IDT no?
Yeah that’s a work around for a big
If I only have one thread it executes
But if I have two
The first one never executes
let me confirm if that's tthe actual thing htats happening here
maybe im just drunk off monster energy
I wonder if yall have a fix for this because I hate that hacky work arround ngl 😭
hmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm
we shall see XD
I’m gonna sleep
Il wake up and test the new TTY fix file the optimization
let me answer this
Alright alright
oke oke
oke so
And maybe yall can find the issue with the scheduler because that’s interesting too with the linked list
tty doesn't run until later but the kernel still hits the race long before that
oh yeah i found a fix for that while i was lookig at it
i was cross referencing to le amd64 funny book
uuh
the order inside kmain is
setup_idt() installs the idt and executes sti
so irqs become live!
Which is what I would want right
uuuuuuuh
wait lemme read this again
im going to triple read this fuckin
uuuuh
timer interrupts start running yeh?
while create_thread(NULL) is still building the dummy thread
so the scheduler
switches to that thread and tries to execute a NULL poilt entry
point
would u like a comprehensive more non dumbed down explanation?
And when the TTY renders that causes the stupid thingy issue because it sets it should shceduls
yes
Is there a way to patch it to not need a null dummy thread
that's what im developing now
since the 2 ppl that was helping me gave up MAO
i'll make a patch dw
this is fun learning x64 this way so
And then once that gets PRd in to did the scheduler I can add my other patch to speed up the TTY
u see how this triggers the gpf right?
Yup and the other PF
yeye
yuuuuuuup
my brain is fried
But why the GPF when I’m not fucking with the scheduler stuff but just interupts being on or off?
i needa break LMAO
I dunno
You should sleep and then do thissss
Because I lowkey got no idea how to fix that myself 💀
Otherwise I would not of bundled that hack
becauseee
i think it's because flipping interupts on letsthe PIT fire while the dummy thread still has NULL entry!
scheduler sees le shouldSchedue
it's set
and it ocntext switches to taht half built thread
So it ends up falling through to the null entry because a race condition with some logic
You know I am gonna have to learn 32 bit at some point for a port on my kernel
XD DO NOT
Maybe I can help with your kernel a bit XD
Maybe I can do a refactor to reorganize the files and shit
i'll use ur for my NUMA-aware research :DD
A “Small” Refactor
XDDDD
here :DD
i'll refactor the code once i'm ok
i've had too much caffeine to drink
Yeah lmao
and i think it's my breaking point lMAO
Is that libc for kernel or user
oh it took me 2 hours to refactor
Well it exists but not for binaries
XD my bad
No kernel free
You can probably adapt the code I stole for the heap part atleast
As long as your PMM can free pages
Just keep that licence header
The PS2 code I took from there dosnt have that header because it was a smaller set and at that point I was in contact with the dev and they said to just put a small comment there
The other files were a full port of the entire file lmao
I mean it’s a bitmap pmm so I could make a buddy allocator for ir at some point maybe
So that’s why I used the full header with all the fluff
yeah i wsas wondering about that XD
aight
go sleep XD
imma eat dinner
and do a little bit of planning on how to refactor your scheduler
and plus on point XD
im researching on schedulers
specifically on hint based topology aware schedulers
huh?
ah yes don't worry too much about it
We got a little off track on optimization and patching bugs lol
Talking about other kernels etc
Btw @devout path thanks for all the help with this and il finnaly have a scheduler that dosnt need a stupid hack XD
you're welcome !
i finally fixed mine a few days ago XD
i'm happy to help !
Mine mostly works but just needs a null entry for some reason
So I added that but it’s causing other issues that @devout path found so they are gonna make a PR
wdym null entry?
thank you too for enlightening me with x64 knowledge that i wouldn't be able to have the motivation to learn
A task that has a super small stack and an IP of 0
strange
Because my schedular with more than one task refuses to schedular the first one on the linked list
For some reason
here

https://github.com/Diamantino-Op/HorizonOS/blob/main/src/kernel/kernel-common/src/threading/Scheduler.cpp
https://github.com/Diamantino-Op/HorizonOS/blob/main/src/kernel/kernel-x86_64/src/threading/SchedulerX86.cpp
https://github.com/Diamantino-Op/HorizonOS/blob/main/src/kernel/kernel-x86_64/src/threading/SchedulerX86.s
here if you wanna look at mine
nice
also, this might help: https://github.com/Diamantino-Op/HorizonOS/blob/main/src/libs/hos-base/src/LinkedList.hpp
linked list that should work very well
using templates to make it easier to use
ooh thakns thanks
Ooo a less common c++ kernel
@hazy saddle if you ever run into somethig that needs debugging come to me i will 100% debug it
I use C
i prefer c++ bc of templates, namespaces and classes
I use C because of a meme song 
i use c because it's apparently the industry standard (i don't believe it)
And because for lower level stuff its “better”
also, i have performance tracking on my OS too
Ooo nice
bool had_threads = (threads != NULL);
struct thread* new_thread = malloc(sizeof(struct thread));
memset(new_thread, 0, sizeof(struct thread));
new_thread->stack = malloc(STACK_SIZE);
memset(new_thread->stack, 0, STACK_SIZE);
new_thread->stack_top = (void *)(((uintptr_t)new_thread->stack + STACK_SIZE) & ~0xFULL);
new_thread->is_user_task = 0;
uint64_t *stack = (uint64_t *)new_thread->stack_top;
*--stack = (uint64_t)task_quit;
if (entry_point == NULL) {
entry_point = task_quit;
}
*--stack = (uint64_t)entry_point;
*--stack = 0x202;
for (int i = 0; i < 15; i++) {
*--stack = 0x0 + i;
}
new_thread->rsp = (uint64_t)stack;
struct thread_node* new_node = malloc(sizeof(struct thread_node));
new_node->thread = new_thread;
if (!had_threads) {
new_node->next_thread = new_node;
threads = new_node;
} else {
new_node->next_thread = threads->next_thread;
threads->next_thread = new_node;
}
if (had_threads) {
shouldSchedule = 1;
}
}```
so i can do flamegraphs
oh sorry didn't send in code block
@hazy saddle wouldn't this suffice?
I assume this patches it to work without the null block and stuff?
yes
i would suggest something btw: you create a kernel thread that is just idling, and set it as the currently executing thread
so you never have a null current thread
i create an idle thread per core
I mean that null thread for some reason in most cases NEVER gets executed
so each core will always have a thread
it stops the PIT from doing funny shiz while the dummy still has a NULL :)
wellllllllllll
heh
lemme see im kinda stupid rn
are you disabling ints while switching?
I dunno
and also stopping the isr handler
the other threads execute perfectly
as many as i add
just the first one i add breaks
are you creating the idle thread the same as the other?
it is optimal
i can make the null, thread be a idle thread 
or well, you can make it request to schedule again after a few ms
yeah, that might cause problems
code highlighting
void create_thread(void (*entry_point)(void*)) {
bool had_threads = (threads != NULL);
struct thread* new_thread = malloc(sizeof(struct thread));
memset(new_thread, 0, sizeof(struct thread));
new_thread->stack = malloc(STACK_SIZE);
memset(new_thread->stack, 0, STACK_SIZE);
new_thread->stack_top = (void *)(((uintptr_t)new_thread->stack + STACK_SIZE) & ~0xFULL);
new_thread->is_user_task = 0;
uint64_t *stack = (uint64_t *)new_thread->stack_top;
*--stack = (uint64_t)task_quit;
if (entry_point == NULL) {
entry_point = task_quit;
}
*--stack = (uint64_t)entry_point;
*--stack = 0x202;
for (int i = 0; i < 15; i++) {
*--stack = 0x0 + i;
}
new_thread->rsp = (uint64_t)stack;
struct thread_node* new_node = malloc(sizeof(struct thread_node));
new_node->thread = new_thread;
if (!had_threads) {
new_node->next_thread = new_node;
threads = new_node;
} else {
new_node->next_thread = threads->next_thread;
threads->next_thread = new_node;
}
if (had_threads) {
shouldSchedule = 1;
}
}
diddnt until now 
and also is harder to do than just an idle thread
can u try this in ur scheduler.c :)
if u are still in ur
i am rn
we arent crashin
YOOOOOOOOO
can i remove dummy thread maybe?
also, you will need to add xsave and xload in the ctx switch too
if you are doing SIMD stuff
only for user sitches
no
kernel should not use SIMD/MMX
for all
theoretically.. it stops PIT from preempting while the dummy still has a null.. it only enables shouldSchedule once the run queue already has a thread
im only good at theory @hazy saddle pardon ;-;
and then there is more context switch overhead
ehm
that is very bad
XD
if i remove the dummy thread it breaks
well
also, why the PIT...
lazy
^^ same reason
it's so bad
if it works it works
it works very bad
wat should a scheduler be like XD
i use APIC to for scheduler
this pit shouldnt make me need a dummy thread
hmm yeah makes sense
most likely
here
wait i still need to test real hardware
okeoke
that's why null threads are bad + you should do a nullcheck at the top
nah we live on the edge
this is the diff
ok let me do a real hardware test\
even smaller 
Uhhhh sooooo errrmmm @devout path
XD
Your not gonna like this
HUUUUUUUUUH
This is with the inline assembly
i think so
Let me try it with the should schedule
i'll try to load it with kvm
When it runs on qemu it's fine
This is on real hardware. It works on KVM. And there is no ISO the QEMU uses the project folder as the mount
Let’s try it without the interupt shit
Oke
And shit disabling and setting should schedule
maybe it's the cpu?
Absolute computer science work here
Download my repo and il send a patch file
Just a moment
can't you just send the iso?
There is no ISO
...
Build -> fail-> refactor until we win
how do you launch it with kvm then?
I tell QEMU to use the project folder as a file system to mount and the bootloader can read from
There
which bootloader?
limine
limine
qemu-system-x86_64 \
-machine q35,accel=kvm \
-cpu host \
-m 512M \
-drive if=pflash,format=raw,readonly=on,file=./OVMF_CODE.4m.fd \
-drive if=pflash,format=raw,readonly=on,file=./OVMF_VARS.4m.fd \
-drive format=raw,file=fat:rw:. \
-boot d \
-audiodev pa,id=speaker -machine pcspk-audiodev=speaker
how does it work without iso...
like that 
so it's simulating a fat file system yeah?
i use these flags, lol
thats the patch
how do i even use patch files?
its a git thing
yeah
git should let you import it
git apply
cat patch.patch | git apply i think
@hazy saddle i will be back in an hour tryna figure out hwo to make this scheduler
in qemu yes
expect me to fail so correct me XD
not on real hardware with that patch
that's so strange
jank 
use flanterm...
heh
no
i diddnt know flanterm existed
...
then i made my own think
lol
and i dont wana admit defeat 
well i mean it's quite fun building an os and having stuff completed
but i find more fun tryna find bugs like these
gl testing on your pc without printing all the regs
XD
i coukld if the panic hadnt paniced 
u feel me @hazy saddle
xd
bruh
how can the panic panic
WHY
...
its fineeeeeeee
It could still panic even without using the TTY 
Some fucking how
@devout path we aren’t panicking yet
Bad Apple is running
AYOOOOOOOOOOOOOOOO
It’s faster
the architecture is indeed questionable but it works :D
But it also fucks up the bad apple demo
oh damn
Fuck it what happens if I grab flanterm
XD
Will it be faster
yes
- support all bash chars
and has it's own allocator
i use flanterm + nanoprintf
Damn nice
work very good
What font is it gonna use lmao
i think you can choose
but it should have a default one
Add flanterm as a git sub module maybe
ngl flanterm is good
Hey atleast I can say I did make a working terminal myself
And then I take the better one for realisies
@viral bison @devout path should I have an external folder where I put all the sub modules in maybe?
Like it will be /src/kernel/external/flanterm
maybe
And then if I need to I can make symlinks that go there from other places
I use regular make files
yeah
u can always just add that to ur make file
It should auto get globbed by the make file when it’s there
added to credits and its sub moduled in
uacpi can also go in that folder too
and nanoprintf
ooh
XD
which tells me
i forgot to credit limine on my os
oh wait nvm i haven't published that
im using grub
ok im stupid
:D
oh wait both of you if you want @devout path and @viral bison can be in my credits under the good friends section XD
oke oke :DD
I only credit the boiler plate and not the library usage
will u keep ur current scheduler or would u like me to make an optimal scheduler?
I can probably add the full limine to the credits which u could
i think i already have a good idea
I am probsly gonna fix it and improve it later
It dosnt even support multiple user threads yet 
i'll put suggestions in pull requests in git :D
maybe mark as an issue if it dosnt have code to merge but just ideas?
user threads are the same as kernel ones
you just need to trampoline them into usermode first
i know but they need extra context swithcing logic for see registerd
well if a thread has simd then i have to fo thoes
and user threads will have simd enabled
and it is a kernel thread that tromplines
once per new thread
yeah
i have a function is asm specifically for that
instead of setting the RIP of the new thread to the program code, i set the RIP to the trampoline, and pass the program RIP as a second parameter
it seems nanoprintf is header only so i wont submoudle it
but it still goes into the external folder because its not being modified
you can look at my Terminal.cpp for how to use it
oooh nice nice
shit im gonna have to rethink this
i dont think sub modules are right for this exactly
oh damn
welp
back to the drawing board it seems
cachyos
ohh
ohhhhhhhhhhhhhhhhhhhhhhh
ok nvm i thought i asked wrongly
nvm i thought i asked what os are u making
my eyes aer deceiving me now
oke oke
@devout path jusr a few more patches and we are good
Holy shit it’s so much faster
I do not regret this
Making a printf and terminal shit is kind of an ass
im gonna end up refactoring alot
another "Small Refactor"
and usinf flanterm i can restore the other print messages
and also move the cursor btw
no i mean backwards and left/right
XD
yep, so good
I’m just moving around every single header file and re structuring it 
I might also change the make file up a bit
“Small” things
Like also completely changing the tty and printf backend
Well il call it “Small” Refactor 2: Electric Boogaloo
And then the next will be “Small” Refactor 3: Tokyo Drift
Holy this shit is instant on physical hardware
HOW
actual physical gpu
But my implementation was slow as shit
poor code
I mean i would write every character to the screen weather null or not etc
But how dose this reach this kind of insane speeds
Jesus Christ
XDD
niceee
ooh
ayeee
no
im gonna finisht he headers
i haven't worked on the os yet cuz i have band rehearsals tmr
then tomorrow reorganise
welp good luck with that XD
xd
im also gonna add an IDE setup readme for KATE
Alright @devout path
And this isn’t even half way done
This is what I have left to do
I am gonna eat and then sleep
also a tip: you can try CLion
it's free for community use
Nice
a much much MUCH better panic is almost done
back to the old 8x8 font and trying to find the best ascii art fot this
me when i want to read some info about the crash but half the screen is occupied with drawings 
there is enough room for it even on the smaller screen so it should be fineeee
this one might be a little too bgi
lol
i think this should do
this is the new finished kernel panic using flanterm + nanoprintf
for error you can just use a number and not an hex btw
I’m printing it as binary so I can get the bit flags and stuff
added some colors to make it easier to read the seperate sections
may tweak them later
@marble ridge I might of found an issue with flanterm 
I’m trying to use my 8x8 font with it and it works in emulator but on real hardware I get a TF and by changing the font to NULL it will then work on real hardware
I have tried
- hard coding the font instead of generating it from my old font (endianness needed to be changed, it might be a nice option to be able to have flanterm flip the font too)
- adding padding to the font so it takes up 256 glyphs which is what flanterm seems to want
- diffrent ways of giving the pointer to flanterm
Sending code in a sec once my computer is back in linux
Also sorry about the ping
ft_ctx = flanterm_fb_init(
NULL, NULL,
framebuffer_request.response->framebuffers[0]->address,
framebuffer_request.response->framebuffers[0]->width,
framebuffer_request.response->framebuffers[0]->height,
framebuffer_request.response->framebuffers[0]->pitch,
framebuffer_request.response->framebuffers[0]->red_mask_size,
framebuffer_request.response->framebuffers[0]->red_mask_shift,
framebuffer_request.response->framebuffers[0]->green_mask_size,
framebuffer_request.response->framebuffers[0]->green_mask_shift,
framebuffer_request.response->framebuffers[0]->blue_mask_size,
framebuffer_request.response->framebuffers[0]->blue_mask_shift,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, (void*)font8x8_basic_ft,
8, 8, 1, 0, 0, 0
);
static const uint8_t __attribute__((unused)) font8x8_basic_ft[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 ,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 ,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 ,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 ,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 ,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 ,
What buffer should I increase? Also my font data is smaller than the default font and should use less data?
Aha increasing the bump allocation limit seems to of fixed it! I will do some tweaking to find an optimal value for my kernel
Thank you
(Stack trace failed because this was built without symbols)
cleaned up the dependancies section and got patching support to patch dependancoes
what's a TF?
Triple fault
ah
I fixed it by increasing the size of the bump allocator
i am fairly sure that was fixed? or was it not?
Is a bit annoying to have to do that with the patch file and stuffs
Nope 
Np, could just increase the default size to be a bit bigger just incase
Or let you specify it with a #define before including it
Because afaik you have to edit the .C file as it’s not defined in header file
-#define FLANTERM_FB_BUMP_ALLOC_POOL_SIZE 873000
+#define FLANTERM_FB_BUMP_ALLOC_POOL_SIZE 0x180000
this is the patch i made
got sub modules working properly now instead of the get deps script
thing is: it shouldn't really crash
have you actually checked that the init function didn't return NULL because it failed to allocate?
i have not but i am not using malloc or free with it? it should be using the internal bump allocator no?
yes but as you figured, the internal bump allocator can run out of space :p
oh right but what would i do when it runs out of space?
i can catch it from TFing but then there is no tty? or i can deley it to where malloc works
you can't do anything
well, there is something Flanterm can do
and it does do already, but only for big screens, not "the font is so small that it takes too much space"
that being limiting how big the Flanterm box will be
so that is something we can do, that, or obviously using your own allocator
I’ve just implemented my patching system so it can automatically increase the bump allocated space l. I can use my own allocator but I don’t wana setup a ring buffer to store a few prints before that gets setup
I did not realize that a smaller font would need more memory XD I’m dumb
Once nice thing would be to be able to define that define from my own code and not having to patch it myself
well oberrow fixed it by increasing the size, other than that not sure
The bump allocator is nice for being able to print before that’s out or if my allocator dies some how
That’s the same way I fixed it too
ooh
This is the complete version
XD nice
Wana know what I based the ascii art off of
Oh and I got sub modules working
And patching of sub modules is supported
yes'
XDD
noice
fell asleep last night so i couldn't reply
took a short nap of 14 hours
Sameeee
I’m gonna work on some more and sleep again
I think all I have left is the VFS rework
Having it all in one list will make ls be way easier to implement too
yeaaah
I mean even if it’s linear it’s still a VFS with the read write function indirection
And caching can be done easily
If a file is searched for a lot put it to the cache that gets searched first
And I can cache ls operations
I could even use a hash map for the cache so that would be really fucking fast?
It gives me a lot of flexibility to make things be super simple but still be possible to be fast
yup yup
hmmm
wat if a balanced binary search tree?
oh wait nvm
also makes freeing things eassier because its one list
And the cache is just pointers
yeah true
less complex = less of a headache
and we are LIVEEE
i forgot to edit the readme about the get deps script 💀
it dose it automaticaly on make with the sub modules
well next commit with page table switching can fix that 
nicee ;000
Your impressed
I’m gonna take a break and then work on the schedular
My friend can’t get theirs to work so they are gonna steal mine once it’s done
XD
how are u oging to design the scheduler @hazy saddle
a simple roundrobin scheduler?
It’s already round robin
But I need to extend support for user tasks better
o oke oke
And there is no such thing as sleep 
So I might extend it to do that too have have awake timers
im tryna make a scheduler that implements redblack trees
o nice nice
There is also a sys call to change the PIT speed 
And to reset the PIT timer

Because the bad apple program expects that functions
h uh
oh well fair XD
I could maybe implement that safer and changing the speed and then putting it back after coming to another thread
Or just add sleep 
oh
So when there is nothing to schedule it should? Drop back to there and sleep
A hacky solution I did not even come up with
It just happened naturally XD
nice :D
At that point is it even hacky?
ima take a good read at his
this*
Look at the regular source tree tbh
So much as changed
Well with sleep depravation yes
fair point
im just lazy iz all XD
my brain wouldn't comprehend a shit ton of refactoring
that's why i plan in advance
It’s just shuffling some stuff around and fixing up systems
I planned alot of this in advance
ooh
dw about me im that lazy XD
or well i just compliment alot
@winged basalt moving over here
👍🏻👍🏻👍🏻
I've started building System level tools and utilities in C to get started for my own OS project
It'll take a few months but definitely worth it 😊
Small update: the day after tomorrow I should have some more time to start working on things
@warped ermine because you wanted the link too il also ping you here
Just incase
:3
I do need to put stack trace symbols into the initramfs so I don’t have to compile twice for builds
That should be part of this next update
i have now gotten a basic serial port driver working finnaly
it will not take in input as thats still through PS/2 but il be making a /dev/kbd to glob all the keyboard inputs together along with a /dev/term/serial for outputting to the serial device directly and for now printf and /dev/term/tty will goto serial
Reading from /dev/term/tty will give keyboard input from there and writing will output there of course
I should maybe reroute reads to /dev/term/tty to that new /dev/kbd for inputs
I know this isn’t the new userspace stuff but I’m working on another secret project that needs me to document the serial port and I need quick serotonin by making something work 
oh wait i diddnt even call my init function and it still works XD
there we go. it now properly calls it and code respects checking if it properly was setup before using it just incase
ooh noice noice
aswell serial and ps2m input get globbed into /dev/kbd
it will cause desyncs with other buffers but if they all use one its all good
and when i have open and close il flush the buffer when opening to fix that
also wait @devout path im commenting my code
why would i ever do this
@devout path guess what. Tomorrow when I wakeup if I have the energy I am going to get multi app userspace working and then start being able to port a ton of fun stuff
And then it’s gonna be like
And then il probably add signals pipes forks other stuff after doom and basic other stuff perhaps
wai wha
I try to avoid magic numbers and funny stuff in code so I don’t have to comment it a lot
But this is just a ton of magic numbers go brrrr
ooh
How's the progress been?
None

I’ve been a bit busy with other projects
I am starting to get the scratch to work on it more
And the code base has been for the most part fully cleaned up so should go smoothly
And then I’m gonna be porting a libc + doom and core utils
Maybe il get multi frame buffer (monitor) support and SMP later?
So I could have two instances of doom at once
And once I get USB I could have one computer two people playing doom multiplayer maybe with a crude TCP/IP that’s loopback only?
Could be neat
Hey loop back networking could be something my kernel has and windows dosnt 
(They broke it in one of the updates XD)
aww
i've been tryna learn zig xd
sorry late reply i slept the whole day
ooh nice nice
xddd
@devout path I think I’ve got page cloning half way done
This code dosnt crash the system
So really fucking good
And it should be creating the top level dummy pages
uuuuuuuuuuuuuuuuuuuuuh
So when I go and clone them it should all work
That get next level function also allocates with the true flag set
So that’s why it looks kinda stoopid
But this should mean the top 256 parts of the PML4 should be allocated
And they won’t get deallocated
Next should just be a memcpy of the PML4 I think
yes yes
@devout path hows this look
Wait I did malloc the wrong size
thats better
This is using services from the VMM but they shouldn’t be used until after init so it’s fine
The service being malloc
Let me tell you that I've did this and lost a lot of precious code I wasn't able to find again :<
my old kernel was lost this way
my kernel was originaly remaking that one
I also lost my old kernel like this
Since then I started making a temporary directory for performing any git operation besides add/commit/push
could prolly automate that
i uuh learned my lesson. before i put my code in a repo, i deleted my wsl ubuntu in exchange for actually booting ubuntu yea? then what happened is that i forgot i had progress prior to pushing the repo cuz i had a stable release at that time and then ... heh...
very sad moments in life
im reallyt nervous here haha
wait why xd
because its looking like its going good
hmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm
try checking if it returns null first, new_pagemap == NULL
for redundancy
heh that's programming in a nutshell
my create thread is gonna take in a page map
and if its null it will be the kernel page map
yeh yeh thats where my userspace is
i have code runnign in ring3 already
just no proper mapping switches etc
which line
it won't completely start a new process with a completely empty userspace no?
u didn't map it to userspace, the kernel pagemap i mean
cloning happens from the root kernel mappings
which will have nothin down there
eg this
dya use recursive paging?
the kernel page map is the clean one made by the kernel pre userspace
so i can use that easi;ly
whats that
what would that do?
i never understood it
i think u zero the page first for redundancy just to be sure and ur fine
i dont mind
i mean i think it's all good
what the hell came out of my keyboard im sleepy as hell
ah
kinda avoids the which comes first problem
of needing page table entries
heh???
oh i forgor the name
oh
XD
LES FUCKIN GOOOOOOOOOOO
Now I would want to make some test programs that run in the same virt but diff phys

