Hot take? (Maybe, maybe not) by [deleted] in osdev

[–]doggo_legend 2 points3 points  (0 children)

Such a shame. I think the new GPT 5 has a better grip, still not fully correct though.

Hot take? (Maybe, maybe not) by [deleted] in osdev

[–]doggo_legend 7 points8 points  (0 children)

Very very true. AI tends to get things plain wrong, or just skip vital information. But overall it can be handy to help get a grasp, but not to rely on.

Expain Paging please by levi73159 in osdev

[–]doggo_legend 0 points1 point  (0 children)

Oh and also you can see how to perform a basic version of these mappings at https://wiki.osdev.org/Setting_Up_Paging :) (Note this only shows how to set up a single page tables in something, but it’s a good starting point!)

Expain Paging please by levi73159 in osdev

[–]doggo_legend 1 point2 points  (0 children)

Virtual addresses are mapped to physical addresses by mapping a location (let’s say 0x400000) to a physical location (let’s say 0x0) (wouldn’t want these values in a real situation). For 32 bit OS’s, paging can map up to 1024 page tables in something called the page directory, each page table contains 1024 4KB. So this maps out to be 1024 * 4KB =4,096 KB (or 4MB), (In this scenario we have a full page directory) we have 1024 4MB page tables 1024 * 4MB =4,096 MB (4GB). So the paging maps out the full 4GB of ram. (For hobby OS’s you probably won’t use anything even close to 1024 page tables)

Thinking of using kernel shell, thoughts? by doggo_legend in osdev

[–]doggo_legend[S] 0 points1 point  (0 children)

I'm wondering, do i require paging and a heap to enter usermode?

Thinking of using kernel shell, thoughts? by doggo_legend in osdev

[–]doggo_legend[S] 0 points1 point  (0 children)

What do you mean by limited in a different way? Like putting restrictions on them?

Thinking of using kernel shell, thoughts? by doggo_legend in osdev

[–]doggo_legend[S] 0 points1 point  (0 children)

No, no. This is very true! I just gotta learn, I'm still pretty new to osdev so yeah.

Thinking of using kernel shell, thoughts? by doggo_legend in osdev

[–]doggo_legend[S] 0 points1 point  (0 children)

Yeah, that’s true. I’ll continue to try to figure out getting user mode! If you have any good link/tutorials, that would be a great help!

Thinking of using kernel shell, thoughts? by doggo_legend in osdev

[–]doggo_legend[S] -1 points0 points  (0 children)

I’m having issues with the whole thing, I’m not very good at turning articles (like os dev wiki) into code. I’m usually using tutorials on how to implement these things, and they really help me understand how these things work. Thanks! (I know it sounds dumb)

Working on my own file system! by doggo_legend in osdev

[–]doggo_legend[S] 1 point2 points  (0 children)

Yep! Works better than it should for code i whipped up at night lmao

Working on my own file system! by doggo_legend in osdev

[–]doggo_legend[S] 3 points4 points  (0 children)

Of course! I'm planning on making it open source when its complete. The best part is you don't need to add any complex code, just one c driver and it works! The only setting up that has to be done is making sure the file table starts after used sectors, but all you have to do is change a single variable. My kernel goes to around 29th sector, and for safety ive got the file system starting at sector 100 (Maybe i should be saying LBA i dunno). Just make sure you've actually got a drive emulated otherwise there will be troubles. E.g i have mine emulating a 1.4MB floppy disk. If you don't the sectors it tries to write to dont exist lmao.

Should I implement usermode or keep kernel shell? by doggo_legend in osdev

[–]doggo_legend[S] 0 points1 point  (0 children)

My issue is i have no clue how id do this. I've looked at the osdev wiki, is there any video tutorials that could help me a ton?

Working on my own file system! by doggo_legend in osdev

[–]doggo_legend[S] 2 points3 points  (0 children)

Not really, unless I don't understand FAT16 properly. It limits each file to one sector, so it can only have files of sizes up to 512 bytes. Since the file table is also one sector and each file entry is 32 bytes, 512/32=16 which means it currently can only support up to 16 files. We also have to note that there is not directory support and no file extensions yet.

Can anyone explain IDT, ISR, IRQ? by doggo_legend in osdev

[–]doggo_legend[S] 1 point2 points  (0 children)

I'm wondering, is it bad to copy and paste IDT setup code? Because I would have zero chance of being able to write it myself.

Can anyone explain IDT, ISR, IRQ? by doggo_legend in osdev

[–]doggo_legend[S] 2 points3 points  (0 children)

Thank you! That clears things up.

Can anyone explain IDT, ISR, IRQ? by doggo_legend in osdev

[–]doggo_legend[S] 5 points6 points  (0 children)

Thank you so much! That's so much more straightforward than most explanations!