flat assembler
Message board for the users of flat assembler.

Index > OS Construction > Memory Protection and so on

Author
Thread Post new topic Reply to topic
joachim_neu



Joined: 22 Dec 2003
Posts: 139
joachim_neu 18 Jan 2005, 12:44
hello everybody!

I'm here again with my new project. it's called HighOS, so you see it's the following OS for LowOS. of course it's in PM. i already wrote a bootloader loading the kernel, switching into the PM and jumping to the kernel. now there are different things:

1. why can't i load the kernel to 0x0000:0x0000 in RM? i don't need the bios-ints after loading it.
2. how can i make memory protection? i load the kernel into a segment where only privileglevel-0-programms can access. but i've got the problem that i don't know how to protect the programms from themselves. they are all in privileglevel-3-codesegments, so they might access other datasegments.

thanks for help

J!N
Post 18 Jan 2005, 12:44
View user's profile Send private message Visit poster's website Reply with quote
beppe85



Joined: 23 Oct 2004
Posts: 181
beppe85 18 Jan 2005, 14:07
1. The IRQs call on that range, its implicit. In PM at least you can rellocate, in RM I _think_ this is not possible.
2. Segments? If you use paging you can assign physical pages to process' address space. The page descriptors don't allow a process to access a page not in address space. With segmentation you can achieve semelhant results, but its bit harder, refer to Intel manual volume 3.
Post 18 Jan 2005, 14:07
View user's profile Send private message Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3175
Location: Denmark
f0dder 18 Jan 2005, 14:10
#1 - you need the ints while loading, unless you're programming the FDD directly. It's a good idea to save the RM IDT anyway, as you might want v86 mode later. It's only 1k anyway.

#2 - forget about segments, and use paging.
Post 18 Jan 2005, 14:10
View user's profile Send private message Visit poster's website Reply with quote
joachim_neu



Joined: 22 Dec 2003
Posts: 139
joachim_neu 18 Jan 2005, 15:15
thank you very much!
Post 18 Jan 2005, 15:15
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.