Page 1 of 1

4RING_OS ver. 0.00

Posted: Mon Dec 20, 2021 6:43 am
by Isa
An experimental attempt to engage all 4 protection rings on Intel processors.

Source: https://github.com/isoux/4RING_OS
Blog: https://www.isoux.org/blog/article2/4ring_os

Re: 4RING_OS ver. 0.00

Posted: Mon Dec 27, 2021 6:10 pm
by Octocontrabass
This is a fact that Intel's technical manuals emphasize from the first editions for i386: "call gates are much more versatile and faster than trap gates ..."
More versatile? Maybe. Faster? Depends on what you're doing.

Do you happen to have a floppy disk image? It's not easy to boot a CD on a 386.

Re: 4RING_OS ver. 0.00

Posted: Tue Dec 28, 2021 2:48 am
by Isa
Octocontrabass wrote:
Do you happen to have a floppy disk image? It's not easy to boot a CD on a 386.
On the GitHub I have a branch i386.
At folder tools/GRUB1/ is a compressed image without modules but HOWTO talks about how to do it.

This branch is dedicated to prerelease i386 and images and iso are compiled for 2Mb of memory.
I can compile release 0.00 for i386 if you want to just tell me how much memory you have because it's hardcoded for now?

I added a compiled floppy image for the i486 with 8Mb of memory.

Re: 4RING_OS ver. 0.00

Posted: Tue Dec 28, 2021 2:39 pm
by Isa
Octocontrabass wrote:More versatile? Maybe. Faster? Depends on what you're doing.
Thanks for a very useful article!
When I said that call gates are faster, I meant that they are faster than interrupt traps, as the article showed. Too bad that sysenter or syscall can't call from other rings otherwise I would use them on newer processors.
As the article also said, I can't help but wonder why Linux still uses the slowest trap gates on the latest 64-bit machines?

Re: 4RING_OS ver. 0.00

Posted: Tue Dec 28, 2021 3:58 pm
by Octocontrabass
Isa wrote:As the article also said, I can't help but wonder why Linux still uses the slowest trap gates on the latest 64-bit machines?
If you're talking about the INT 0x80 trap gate, it's for compatibility with 32-bit programs, it only supports the 32-bit system call numbers, and it only works on kernels that support 32-bit programs. 64-bit programs exclusively use SYSCALL. (And if you run a 32-bit program on the latest 64-bit machines, it will probably use SYSCALL or SYSENTER instead of INT 0x80.)

Re: 4RING_OS ver. 0.00

Posted: Wed Dec 29, 2021 2:27 am
by Isa
Right, thank you!