Unreal Mode
- beauhefley
- Posts: 13
- Joined: Mon Feb 20, 2017 1:01 am
- Location: The Moon
- Contact:
Unreal Mode
I am reading more about OS development on other websites and found out about Unreal Mode, where you switch to protected mode, load a new GDT, and switch back to real mode, so you can use Real Mode benefits without the penalty of the little amount of ram.
My OS design does not use normal binary files, and instead uses a bytecode system read by the kernel (Similar to how Java works) so I do not have to worry about malicious programs with a sneaky CLI or HLT in the code.
With my design, is Unreal Mode still safe or should I continue using Protected Mode?
My OS design does not use normal binary files, and instead uses a bytecode system read by the kernel (Similar to how Java works) so I do not have to worry about malicious programs with a sneaky CLI or HLT in the code.
With my design, is Unreal Mode still safe or should I continue using Protected Mode?
Developing an OS that is so early in development, it can't do anything because stupid me can't figure out interrupts
- dchapiesky
- Member
- Posts: 204
- Joined: Sun Dec 25, 2016 1:54 am
- Libera.chat IRC: dchapiesky
Re: Unreal Mode
http://wiki.osdev.org/Unreal_Mode
Knowing you target architecture would help - as well as 32 or 64 bit?
If 64 bit - why bother?
Knowing you target architecture would help - as well as 32 or 64 bit?
If 64 bit - why bother?
Plagiarize. Plagiarize. Let not one line escape thine eyes...
- beauhefley
- Posts: 13
- Joined: Mon Feb 20, 2017 1:01 am
- Location: The Moon
- Contact:
Re: Unreal Mode
Developing mainly for 32 bit. I will develop 64 bit when I get farther into development.dchapiesky wrote:http://wiki.osdev.org/Unreal_Mode
Knowing you target architecture would help - as well as 32 or 64 bit?
If 64 bit - why bother?
Developing an OS that is so early in development, it can't do anything because stupid me can't figure out interrupts
Re: Unreal Mode
Hi,
For all the problems that actually do matter, see this warning.
You should not use BIOS functions; and if you aren't using BIOS functions then you have no reason to prefer (e.g.) Unreal Mode over Protected Mode.
Cheers,
Brendan
For BIOS functions, "real mode" is a relatively insignificant problem (it's fairly easy to solve using a variety of methods).beauhefley wrote:I am reading more about OS development on other websites and found out about Unreal Mode, where you switch to protected mode, load a new GDT, and switch back to real mode, so you can use Real Mode benefits without the penalty of the little amount of ram.
My OS design does not use normal binary files, and instead uses a bytecode system read by the kernel (Similar to how Java works) so I do not have to worry about malicious programs with a sneaky CLI or HLT in the code.
With my design, is Unreal Mode still safe or should I continue using Protected Mode?
For all the problems that actually do matter, see this warning.
You should not use BIOS functions; and if you aren't using BIOS functions then you have no reason to prefer (e.g.) Unreal Mode over Protected Mode.
Cheers,
Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
Re: Unreal Mode
What are the "Real Mode benefits"?
Re: Unreal Mode
Could you elaborate your question? What kind of safety are you talking about?beauhefley wrote:is Unreal Mode still safe or should I continue using Protected Mode?
- beauhefley
- Posts: 13
- Joined: Mon Feb 20, 2017 1:01 am
- Location: The Moon
- Contact:
Re: Unreal Mode
Oh ok. I will continue using protected mode. I thought that the only problems with real mode were the ram limit and no memory protection and ring modes.
Developing an OS that is so early in development, it can't do anything because stupid me can't figure out interrupts
- beauhefley
- Posts: 13
- Joined: Mon Feb 20, 2017 1:01 am
- Location: The Moon
- Contact:
Re: Unreal Mode
Actually, it might be good for now, as I do not have much time and have to go to school. Maybe over the summer I can re-write my code with my own drivers.
Developing an OS that is so early in development, it can't do anything because stupid me can't figure out interrupts
Re: Unreal Mode
In the older systems for which unreal mode was originally used, protected mode was much slower, and unreal mode allowed direct access to more than 640KB while working around that issue. This stopped being the case from Pentium onwards though, and you're better off using protected mode (or long mode!) in just about anything even remotely modern.iansjack wrote:What are the "Real Mode benefits"?
EDIT: and yes I've seen documents describing unreal mode without ever mentioning how its main advantage is gone from Pentium onwards.
Re: Unreal Mode
My first stage boot loader uses unreal mode to load the second stage boot loader from disk to memory. By using unreal mode I can use int 13h to perform the disk read into upper memory. I plan on moving to a fully protected mode first stage boot loader before the switch to long mode + a jump to the second stage boot loader.
That's about the only useful thing I'd consider about unreal mode
That's about the only useful thing I'd consider about unreal mode
- Love4Boobies
- Member
- Posts: 2111
- Joined: Fri Mar 07, 2008 5:36 pm
- Location: Bucharest, Romania
Re: Unreal Mode
Well, protected mode was never slower than unreal mode. The overhead was always related to using the protection features of protected mode. But if you start comparing a protected kernel with an unprotected one, it's like comparing apples to oranges. Since you're using software protection, all the user code can run in ring 0 and thus the checks related to trapping into the kernel and switching back to user mode can be skipped.
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
[ Project UDI ]