#EvalynOS
1 messages · Page 15 of 1
how hard is it to check for allocated things in the rbtree for me to free up the entire shit
not very
and the reaper thread does all that anyways so its async
okay let me commit my crap and then work on the ram block device 
il prolly use a 2 layer 256 index per radix tree
because easy 
and if your ram disk needs more than 256mib well tough cookies
Okay I think for fork
I’m going to have two syscall paths
One that saves all registers
One that only saves the minimum ones and stuff
And then on fork() and others that need them all
It will use that one
Otherwise it’s a partial save
And then fork() will make the new process and change all the mappings properly
With CoW
And then il have a special thread function to kick start it that will do a full restore of all those registers that I saved from the original call
And once that one starts I return from the systemcall
And that should just work™
i think im gonna put my rambd driver in src/kernel/drivers/block/
since its gonna be simple and two files
wait no i can do src/kernel/drivers/block/rambd and then have the abstraction shit in i think im gonna put my rambd driver insrc/kernel/drivers/block/
well on the git server side i got captchas working with cloudflare because its free forever afaik
and restricted mode does not prevent you adding things so
il just manualy moderate it
🥀
the captcha will block most craps
cloudflare
Dose @sterile plank cat flare have a captcha hosting

I’d like to use the better flare
The one of the cats
how would i know 
Your a cat right
You all share brain cells
Or something
Idk I’m a dragon
i say no
Darn
thsi gives me an idea to impliment a function called strtroll 
strtorickroll better
u give it a number and it outputs a random ascii encoded excerpt of never gonna give u up with the same amount of hex digits as the result long int
Okay so
The rambd and ext2 and other stuff is gonna wait
Because @devout path has been working on it

And I had no idea that they got started
So I’m gonna wait til they can give me some info on the stuff they have done
And we can get it on dev branch or some such
Or work on it together
well if i dont get a response tomorrow il do things ig
After the talk with qookie I know then general lay out of the block layer
The filesystem itself will cache blocks it’s self as needed
In a private section
And when you MMAP from there you get non complete pages as non present
Otherwise you get the page to use etc
If it faults the kernel tells the filesystem hey yo fill in this block / tell me what it is
And then it does and it resolves the fault
And all that info will be on page tables somewhere
So you can see if it’s a mmap region and where to go to resolve etc
And then later when I support OOM reclaiming
All of the cached pages will go into the place to be reclaimed etc etc etc
And that has a list of all the page caches with the physical ranges etc
And any user app referring to a page/region is on a list
So they can be unmapped all at once properly
So you MMAP a 2mb file
The pages making that thing up are uhh added to the reclaim stuff
And you as the only referer to it
If you just opened it
And if three address spaces have it they are all added
And it also links to your tracking for the mmap on the thread
is this a vfs or a manifesto
So if you have to shootdown some pages
You can go through it and find the right things and mark then
Idk il need help when implementing this too
But I think I have a general idea
this is insanity
Yesnt
This is right though right

i sadly can not understand computer people speaking
probably
this looks way too insane for a vfs though
or whatever this is
i think you talked about making a vfs
This is block layer
idk this looks right-ish(?)
With caching
And filesystems
And MMAP working
😭
Idk maybe I can make this simpler
This will be a pain to implement
for my vfs i just want to do driver calls (sorta like system calls but for drivers) and if the fart doesn't respond i will execute them violently and they will never be seen again in true unix fashion 
Yes but a filesystem has to talk to a block devices
yeah
thought of that too
what
Block cache
When you read a block
You copy it into memory
And it’s cached
And that’s gonna be annoying to manage
thats a sector 

see i cant speak to computer people they speak complete jargon
It’s a Whatever the fuck I don’t care you know what I mean
whatchamacallit 
Idk @devout path maybe had a plan for this
scenario:
- AWAKEN FILESYSTEM DRIVER
- find block device
- check block devs for file system
- no, commit death
- yes, proceed
- construct directory tree in vfs
- idk wait for user action, if a directory is accessed make more crap in the vfs, maybe unload some old crap
if the process dies, all the memory it allocated (the vfs nodes are allocated under the process) is evaporated into nothing and kvass continues as if nothing happened
at least thats the plan for my thing
block device is called, it writes to some temporary buffer, and the buffer is copied to some memory that would be owned by the fs driver
if the hard disk driver writes some BS, then why would i care its the kernel, not a sentient being 
the most complex thing would probably be allocating the stupid buffers and then mapping them under each process
MMAP would refer to the same pages as the page cache of the filesystem it gets from the block device
So on fault I need to find the filesystem
And then have it get the block etc
And then something
what does mmap stand for
Idk I’m sleepy
booo linux
oh
uhh
scary crap
@peak cloak yeah this entire block cache is the managarm system kinda
And I’m scared to implement this XD

*managarm
Oh wait the in ram block device kind of never needs caching
So I just won’t implement that

Later I can implement it when I have userspace block devices and fs drivers
But the in kernel ones are purely in memory
So I can design it a bit more for that
Okay so I think I’m gonna go do the initrd today properly
With the in memory block device and ext2
This will be more of a separate block layer and filesystem
As the main sauce will be in userspave for filesystems and block devices
but the VFS is still in kernel
So I can route things properly and such
I’m gonna have to do kernel/filesystem/vfs
For vs shit
And then kernel/filesystem/fs.c and .h
For the abstraction shit
And then kernel/filesystem/rambd for the ram block device
And kernel/filesystem/ext2-rbd
For the ext2 driver that expects to talk with the ram bd
It’s still gonna be ext2 but lacking a lot of the other caching shit
That will be implemented with a mix of the ideas I got from the talks with managarm and @cyan bison
Time to cook
Okay I’ve eaten food
Gonna drink some water
Play a bit of video games
Then get on this 🙏
Oh and take my fucking adhd meds 😭
But I think my kernel VFS file ops will be
open
close
read
write
seek
ioctl
mmap
And then the backing file/filesystem will handle these calls themselves
If they have to deal with files etc

Wut
ok nevermind
i thought why does the vfs itself needs file operations
i forgot that device drivers live there 
where's "new file"
The VFS also has to route things to the right place and function pointers exist for that 
nevermind i remembered the drugged up unix standard of "open with some flags is new file"
You open it with a special flag
that part is stupid imo
i mean it makes sense
but idek
it makes total sense and i hate it
When you make a file your still opening it too
good enough for now
@cyan bison what you think about this? so ext2 for the initrd has a block like semantic thing to use properly
the initialization of idx1 and idx2 dont make sense
that, or the first if check is invalid
idx1 points to a table with all the leaves and idx2 is the leaf
maybe the if check is bad
the if checks if idx1 and idx2 are zero

and fails if they aren't
i need to do a ~ dont i
the 0xFFFF
num & ~0xffff makes sense
yeah lgtm
you might have to do integer promotion here?
What why
same thing
except one isnt ugly
well this works to be safe

now i can make ext2 ontop of this and then have the tarfs get dumps into there
UINT64_C 🤓
No, 0xFFFF is a signed integer constant and unless you're on 16-bit, the sign bit will be zero here and it will behave as expected. Including expanding to 0xffff_ffff_ffff_0000 after the implicit conversion in num & ~0xFFFF.
macro that gives you the literal suffix for that type
where does it come from
I mean I'm making a C compiler, I'd hope I got this right 

is that what lily-cc is?
lol
Yes
btw will your compiler support clang function overloadding in C
Eh
what
Wasn't thinking of doing it, but would be technically possible.
insane
pls no
i want my kernel to compile with lily CC one day and i plan to use that clang feature

Ehhhhhhhh
Yeah but Lily-CC isn't doing C++ within the next 10 years so
i mean i dont use it right nowww
but i like the [[ attributes ]]
That means you did UB
i always target gcc and clang
i use gcc to compile obos and then i use clang for the gh actions
same
and it usually requires a prayer before each git push to ensure that the clang build boots
I use GCC for what little C remains in my kernel and clangd for the IDE
i think it needs a plugin to handle LTO objects...
You did not add the LTO plugin to your linker
how do i do that 
Look it up 💀
i addted flto here
Not how it works
There's an actual plugin whose name I forget you need to add
-flto is at the compiler, not linker
Also 10 years old, fat chance some random crap changed
the fuck is it getting -m from gcc if i try and use it as the linker
But anyway yeah I use GCC as my linker. Or rather. GCC invokes the linker on my behalf.
yeah it just straight up tripple faults on GCC
😭
right away
nothing gets printed
where is the UB
clang is better anyways

it's there
im calling it a skill issue
talk cheap send patches
are your requests volatile?
yes
damn
step through a line or two with a debugger
im too lazy
i wonder how dumb it would be for limine to install an IDT before the kernel for exceptions like this 
very
Very
it seems the linix tmpfs is also using page sized files
presumably for MMAP but id have to check source
Which means having a thing backed by regular blocks isn’t a horrid idea though I can do better than the dumb basic ram block device but that isn’t that hard to rework
And the only overhead on ext2 is a bit of the extra book keeping’s which again I can change it easily because it would still use the same VFS interfaces
Though I will say having things split between kernel and user could be a bit cursed but again Linux does support FUSE so
I think my continued research on this is telling me that it’s not that bad of an idea and still has some worth as even if I replace it I can reuse the code elsewhere and I still learn
Aswell the documentation on TMPfs refers to PAGE_SIZE in one spot so it does seem the backend of it uses page sized things
(On the Linux kernel)
And i would potentially have to keep track of similar if i can using physical page backings properly though i should possibly look into how tmpFS handles things in source
I mean I guess I could handle block sizes less than the page size by caching it fancy but that wastes memory and is annoying
Especially for a ramfs where I’d basically be leaving 3/4th of a block unused for 1kb block sizes
Unless also handled merging or some shit but that sounds complex
Needlessly atleast and most filesystems are natively block page sized anyways
Maybe I’m blinded by my own stupidity here but I can’t see why this system would cause major issues and wouldn’t have some benefit atleast in some way down the road
it also does this for ext
a thing called page cache
yeah the blocks of the filesystem should be page sized, how does it even deal with ones that are less than page sized
like you have 1 kb block filesystem will it manage to get mounted properly? how does it page cache with that?
yeah

block size > page size is not allowed for ext though iirc
or rather, linux will refuse to mount
the page cache is related to the file its self and not the actual backing blocks and is a cache of the entire file then?
i am dum 
that's why it's a cache
though for a tmpfs it still makes sense to make them equal
yeah the page cache reflects the actual file contents
you can implement a tmpfs purely with a page cache
this is important to keep in mind for ext2 for things like 0 blocks too
an ext file can contain a hole where the blocks in the middle use block number 0
which is not a real block but instead just memset(buf, 0, block_size)
This suddenly makes way more sense 
So then I need to look into a page cache proper
And how to map a file to the pages it contains
And other kinds of files
And then it’s create a vnode from every file and an inode for some basic tmpFS state to handle this

$ mkfs.ext4 test -b 8192
Warning: blocksize 8192 not usable on most systems.
mke2fs 1.47.3 (8-Jul-2025)
mkfs.ext4: 8192-byte blocks too big for system (max 4096)
Proceed anyway? (y,N) y
Warning: 8192-byte blocks too big for system (max 4096), forced to continue
...
$ sudo mount test /mnt
mount: /mnt: wrong fs type, bad option, bad superblock on /dev/loop0, missing codepage or helper program, or other error.
dmesg(1) may have more information after failed mount system call.
[40398.476137] EXT4-fs (loop0): bad block size 8192
I had a miss understanding that the page cache represents the status of the block on the disk and not of the file
This makes alot more sense
😭
Okay what would be the proper data structure to hold the references of physical pages for such a page cache for the file
@rotund furnace time for me to licence your rbtree then

how do uhh do rbtress index though exactly 
managarm uses a radix tree :^)
:P
i only know how fix sized rafdix trees work with paging 
i really should brush up on data structures at some point
use freebsd rb tree
copy paste tree.h, done
license is BSD license idk
Copyright 2002 Niels Provos <[email protected]>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
that's the license in tree.h
oh and i meant openbsd not freebsd
all these BSDs are really confusing man
this one
yes
how do i comply with this 
do i just like fucking uhh put thing in my credits.txt thing
Mm mm then I use this to index by the “virtual” pages in the file that makeup the cache
Then then I convert bytes of the file into that
And then it should just works
And then this makes a page cache for the filesystem
Which TMPfs is built upon
To have a real tmpfs
I think I get it now
Thank you once again @coarse oasis and @cyan bison and @gentle void I am no longer being dumb XD
this fucking looks like black magic voodoo
how do you use this

its full of macros
control f shows no mallocing

because it doesn't
here's an example of how you define an rb tree:
struct shit {
uint32_t key;
// whatever...
RB_ENTRY(shit) node;
};
static inline int cmp_shit(const struct shit* lhs, const struct shit* rhs)
{
return (lhs->key == rhs->key) ? 0 : (lhs->key < rhs->key ? -1 : 1);
}
RB_HEAD(shit_tree, shit);
RB_PROTOTYPE(shit_tree, shit, node, cmp_shit);
// In a source file...
RB_GENERATE(shit_tree, shit, node, cmp_shit);```
to search the RB tree: RB_FIND(shit_tree, &tree, &key)
to insert into the RB tree: RB_INSERT(shit_tree, &tree, shit);
to remove from the RB tree: RB_REMOVE(shit_tree, &tree, shit);
and you can figure out the rest on your own
@hazy saddle
Ahhh makes sense thank you
For VMA how should I handle these, i did notice there are some search functions
key can be anything fyi
Could it be my mother
wdym
Like if I need to find something with any key but with a large enough range or some crap
#define in_range(ra,rb,x) (((x) >= (ra)) && ((x) < (rb)))
inline static int pg_cmp_pages(const page_range* left, const page_range* right)
{
if (in_range(right->virt, right->virt+right->size, left->virt))
return 0;
if (left->virt < right->virt)
return -1;
if (left->virt > right->virt)
return 1;
return 0;
}
#undef in_range```
this is what i do for page range RB trees

and the search is as shrimple as:
page_range what = {.virt=addr,.size=OBOS_PAGE_SIZE};
page_range* rng = RB_FIND(page_tree, &ctx->pages, &what);
if (!rng)
{
OBOS_Debug("Fatal Paqe Fault: No page range found for target at 0x%p\n", what.virt);
goto done;
}```
Wait that code looks strange
look at the example
there is a cmp_shit function which compares two struct shit for the rb tree
this does the same but for page_ranges
ahh
for the page_range rb tree
u also said smth about the VMA, my VMA just does RB_FOREACH to iterate over the rb tree
to allocate shit
but page_range what = {.virt=addr,.size=OBOS_PAGE_SIZE};
what does addr equal? i dont know what address im allocating? and i would fill the tree up with like TONS of data or some crap for every page
oh
this is for the pf handler i should've mentioned
no
it's my kernel not yours ur not stupid
the pf handler gets the page_range to find out why the fault happened
Ahhh

So then my VMA could say have a range for every free bit of virtual address space?
sure
Because I want to allocate a range of virtual addresss to like put like annon allocations on
Then I can go through the tree and iterate through it to find a free range?
But I’d also want to check used regions
yeah

now this is what i do but there might be better approaches
Maybe because it’s on my phone and slightly sleepy I don’t understand this
But it’s basically iterate through the RB tree and because it’s self sorted you just stop when you find a gap or the end of the used stuff or something?
yeah
Ok so basically to allocate I will look through the tree for gaps. Allocate within the gaps and then give them out which is O(n)?
And then to free I just remove it from the tree and then check the paging tables and remove them and invalidate pages in the TLB though would I have to check if that entire table is free? I don’t know how I could use this data structure to also handle that 
Like in page tables if I need to free a say PML2 or some such
When it’s empty
your mapping code stays the same.
bruh
And the code I replaced did but it scanned the entire fucking thing
So I tossed it in the rewrite to come up with something better later
As I never unmapped anything before
just check if the PML2 is empty...?

Isn’t that slow though
if you want it to be
To unmap a page I have to check up to 512*4 entries no
noi
Depending on worst case
there could be
Hm
What better way oh lord oberrow
God knows
Though I mean how offen do you unmap pages for it to become an issue
ask him
....
What
I could do it asynchronous actually
And just change the one PTE
Then put it in a queue to check
That sounds like a mess though

if ya like that better than a memcmp then sure
Oh wait yeah it would just be a memcmp between a zeroed page and the PTE
Okayyy so reworked todo list
- port the RB tree thing and make it working and learn it
- support un mapping pages
- implement the VMA
- then finally make the proper tmpFS using the rb tree and proper page caching etc etc

Then redo the VFS
And the rbtree there can even be indexed by a structure that has the inode number AND the “block” number for the page cache

Why am I scared to start implementing this and I feel like I’m not going to be able to and fail 
Maybe tomorrow il feel better
scary
kernel mode now works with FRED
now i just have to make userspace work right
its this simple actually too
to convert the frame
actualy
this may need to be changed
it will
crap
il need the reverse operation
ya know i should just make my interupt shit be off a table
so i can make a really simple one for both fred & normal idt
ehh thats later me
nah id have to convert somwhere
goal number 1 is to be number 1 ay this anywasys
so i can optmise later
Is there any real hw with fred?
the new pantherlake chips
Cool
they did of course had to ban iretq
and its now GPFing
when switching to ring3
on the eretu

i removed the extra eretu
and i had that code in reverrse order
same GPF
ok here we go
i should prolly make a generic structure for these
or use a union
but eh
pantherlake has it?
I thought only clearwater forest and diamond rapids
lets fucking go
first kernel with working FRED
Well besides Linux
But I don’t think that counts
When Intel themselves
Made the patches
Lmfao
Right @rotund furnace
Nah I am
But this was a fun side quest set out by @marble ridge
And I get a cool role
Just don’t look at my shortcuts 
Because I cut a few corners
Which I will figure out later
minus the part where you completely forgot how stacks works :P
-# shut up
Works on both FRED and non FRED systems
I could maybe make extra abstractions between the two drivers
For certain things
but
It’s not that bad and just a few extra if statements
Abstractions being function pointers like with my timer system
I will be formatting my patches soon @rotund furnace
🙏
Which means you can be the second hobby kernel to have this

Provided to YouTube by DistroKid
We Are Number One (Remix) · Dunderpatrullen
We Are Number One (Remix)
℗ Dunderpatrullen AB
Released on: 2017-03-12
Auto-generated by YouTube.
i am so fucking happy at this lmfao
maybe more than i should be
but yeah lmfao
i wonder what it is
:o
here we go

figuring out how simics works was harder them impling fred
ngl the blocky text and the sharp colors make it kind of hard to read and interpret
zoom in 
but thats me getting a FRED interupt
btw this shit is so based
it handles swapGS
and a bunch og fucking bullshit
and you have a seperate function for ring3 and ring0 entires
If you call me this I will curse you to use Intel simics for the rest of your life

hi
Hi
huh nice role
:D
ig yea i stole it from u xD
I just found it somehow relevant
cool role btw owo
congrats for the fred-friendly kernel certificate
Friendly?
The implementation is ass
Well somewhat
I need to fix it XD
Make it cleaner
But it working is what matters

Well I should get started on the rb tree things
With virtual memory allocations
And also make exit() work
So it cleans up the process
And frees the memory
lol well i was gonna examine the commit once im done with the things in hand rn
but I took a look at the spec yesterday and it was fairly straightforward soo
im not expecting to see anything super wild xD

I hate rbtrees
it took me way too long to get it right only for me to find some bugs later that slowly brought my impl back to be almost a 1:1 of that of clrs
😭
but yk it works™
at least i didnt vibe code it

It’s more so my conversion of FRED frames to the other frames
It’s just a bit messy and I could make it better later
But it would need more reworks I CBA to do rn
I’m uhhh
Just taking the openBSD one

I just need to figure out how to use it right
fair
Once I get bash working I’m going to flesh out the fred stuff and other interupts to be nice 
o I need to look it up
ive seen few implementations that loon nowhere like the one I have which kinda made me feel insecure about its performance lmao
but tbh I cant care less since i scrapped the only instance where I needed it only recently
I would eventually rely on it again for the scheduler and perhaps on the vmm too
but whatever eh
The BSD one is fucking macro soup
Fred deserves a good treatment for sure 🙏
Once VMA works well
damn
I’m going to make a proper tmpFS

Then fork
And exec
And posix_spawn because that should be easy
Oh and il properly handle FD 0 1 and 2
I dont think im gonna do anything beyond the classic unix interface for starter :P
so nah no spawn 🥀
Wait why the fuck does it still use fork()
id rather go and play around an aarch64 port than to actually implement more sophisticated functionality unironically

Well
🥀
I can’t wait to make bash work
Idk how directory’s work tho
I know they are files
And contain the shit
But like how does the user program expect to get the data
Or some crap
But uhh
Yeah I’m
Gonna have a tmpfs
inode = 0 should be root or some shit
I think
So you can then find folders from there
o iirc theres a call for reading directory entries
Yes
But how do I implement that
I mean I should read POSIX
I’ve just been beating around the bush for full research on that
I don’t think this is the systemcall
Maybe I could look at fucking sysdeps or some shit
From astral or other
But it seems it gives your a FD
You readdir on
And every call gives a seperate entry
Yeah this makes sense @hollow crater
yes
well first ig readdir is itself a wrapper around the syscall
wait a sec
ye
getdents ig
which works on a normal fd u get from opening the directory
instead of the directory stream stuff the wrapper defiens
Yeah il have to look at sysdeps
Probably
I could also just make my kernel give the posix shit
But that would need me to malloc inside userspace?
ooo idk :P
wait a sec
What
there is basically one syscall for reading directories
Hm?
I am looking for a code sample wait a sec
up to you
this is what I do
uh no directory operations would definitely go in vfs
ioctl would just be a weird place to put imo
I could just make everything an IOCTL
/s
And I could make every systemcall an IOCTL
Just IOCTL() is the only systemcall
Looks easy enough
And mlibc gives me the buffer
yeah nerd 
now you're actually a nerd
not even unironically
this crap is beyond me 
@cyan bison the VMA is just a used list inside an rb tree for you to find gaps in right
iterate through
and check gaps
and break when found or at end
yeah
and then i can use that to also track of annon allocations? and shit right
or shold i do that diffrently
yeah il also have it store the phsyical pages of VMAs
yeah
what
no i dont understand that
in the VMA allocation of the TB tree
also put in where it is physicaly
if possible
yeah
this will work
then i can have a proper exit()
💀
@cyan bison
wana know what my exit() is?
its literaly
while (1) {
}
bruh
not even like calling thread exit or anything??
how
just like free the thread info and remove the thread from the scheduler queue
like a good three lines
you know what talk is cheap, time to send patches 
yes but we are talking about threads
and yet those are not related to threads exitting
But if it works don’t fix it 
When the program fully exits though
I have to free the pages and shit no
I just was lazy
And put the entire thing off
pov me
what if i needed two instances of a tree dynamicaly? or should i have one VMA tree and have part of the key stuff have a key for the PID etc?
if you need two trees for the same node then u make a new tree structure
i need a tree for every process no?
what is &tree here?
do i allocate the tree and how 
a reference to the tree struct
I’m doing that unfortunately
no it aint
its
i cant even get doom into an infinite loop of nothing 
the exit doesnt do anything 
yeah. what actualy makes the tree. like whats the way i allocate it?
is it rb_tree_test_tree
yes
c struct rb_tree_test_tree tree = {}; struct rb_tree_test test = {.key=5}; // Of course, here test would probably be dynamically allocated RB_INSERT(shit_tree, &tree, &test);
damn im dum
evalyn u know how u keep specs on ur file server
it would be cool if u also kept the RFCs
for
you got the links
major protocols
TCP Congestion Control
https://datatracker.ietf.org/doc/html/rfc5681
uh that is all i remember
for all of these if u go to info->other formats
u can download pdf
or just add .pdf to the end of the url
Fuck it I’m putting the amd64 manual back up even if it’s technically not allowed
What do you think of that
sure do it
i added this to be safe
i also thew HTTP and IRC and nvme up there @cyan bison
yeah i see
i mean it would be fuckin based if the mods allowed it
You think this should go in #resources

yes i think it deserves to
Any other manuals before I full send it
nope
intel fred manual :P
damn
:!)
:3
Hey you! Are you having issues finding manuals for osdev or similar work?
I have a website that mirrors and archives a bunch of technical manuals useful for things.
How’s this @cyan bison
lgtm
Now can you ping a mod so I can have permission to do this 
i agree
Maybe I could get manuals for some network cards?
network cards are all over the place
I mean atleast the one realtek and that one intel one
Those are the two popular ones
especially considering like 50 vastly different NICs all fall under the same umbrella term "e1000"
which is "that intel one"
same thing with "the one realtek" which is the "r8169" driver but is actually like 30 different NICs
like im telling u it is fucking impossible to find specs for ts
i didnt even write my e1000 driver
i took it from fucking freebsd
so did managarm
my r8169 driver works on exactly 1 (one) piece of hardware
that doesn't even use the rtl8169

(which is also why i have no idea why I have the bug where i just get 4 byte garbage frames on the rx queue)
and when writing my r8169 driver
i only found the spec on the osdev wiki
yeah now get the other 49 
this isnt even an e1000

oh i lied apparently
this is an intel i210
there are ||192||
the nic my server uses
fuck me
different variants of the e1000
at least, there are 192 different PCI device IDs for it
oh and it's portable
u define kernel api kinda like how you define uacpi kernel api except not really at all
thats good atleast
yea
all u need to do is implement the rx/tx queues
and handle IRQs yourself
the driver handles all the messy link stuff and whatnot

it's older
and also does not fall under the same linux driver iirc
but it is quite similar ive heard
all NICs have different purposes
some faster than others
some slower
some with different features
many different companies who make them
it might not make the most sense for something like NICs to be standard like say, how XHCI is standard, imo
uh anyway what am i doing i need to implement congestion control
Using my manual site :o
Also why infy lol
I mean more of a standard operating mode. And the goal of a nic is to well interface with the network. They could easily add a NIC spesific section of the spec or some crap
infy is my favorite mod 
oh yeah fun fact i was the first to ever get uacpi to run on real hw
and the first kernel to ever have uacpi kernel api
of course this was in rewrite #3
I am now the first kernel to ever get FRED working

I’m making a name for myself here
I just uhh
Have to fucking make the VMA

I will sit upon this throne for the rest of my life

and never do anything
/s
Nah I really wana get bash and shit working
ofc yeah
having a network stack is so cool icl
like you are telling me
MY code
is communicating with someone on the other side of the goddamn world
network stack is a lot simpler
I will also have to port python 
and TCP was a good learning experience for me
To run copy party
it's actually easy i found
For my file server
(debated)
having a simple TCP/IP stack feels pretty good
I wonder for FD 0 1 and 2 I should pre allocate them on proc create
i got a gdb stub running on UDP and once i was able to debug my kernel on real hw remotely from my PC it was very cool

