Page 1 of 1

Bare Metal OS CR0 config on x86 64 architecture?!

Posted: Tue Nov 20, 2012 9:54 am
by _nobody_
Hello to everyone,

I am running Bare Metal OS on x86 64 Core 2 architecture. I have real dilemma while running very intensive Real Time application on this HW. I am running it in Protected Mode.

Control Register 0 (CR0) register has bit 0 as PE (Protected Mode Enabled) and bit 31 as PG (Paging Enable). It is obvious that PE must be enabled (for PM - 4GB mode to run, instead Real Mode - 1MB). The system has 256MB of memory.

Intention is to make system as fast as can (close to the metal). In my opinion, there is NO NEED to switch PG ON, since the paging mechanism via Translation Lookaside Buffers (TLBs) will slow the system.

What do you suggest, should I enable PG or NOT, and why?

_nobody_

Re: Bare Metal OS CR0 config on x86 64 architecture?!

Posted: Tue Nov 20, 2012 2:55 pm
by dwelch67
The Raspberry Pi uses an ARM processor not an intel x86.

Re: Bare Metal OS CR0 config on x86 64 architecture?!

Posted: Tue Nov 20, 2012 7:23 pm
by DexOS
On the x86 64, Paging Enable needs to be set, if you want to run in 64bit mode, you then need to map it 1 to 1, to act as close to bare metal.
That's one of the reasons, i stuck to 32bit mode.

Re: Bare Metal OS CR0 config on x86 64 architecture?!

Posted: Wed Nov 21, 2012 10:27 am
by jamesh
_nobody_ wrote:Hello to everyone,

I am running Bare Metal OS on x86 64 Core 2 architecture. I have real dilemma while running very intensive Real Time application on this HW. I am running it in Protected Mode.

Control Register 0 (CR0) register has bit 0 as PE (Protected Mode Enabled) and bit 31 as PG (Paging Enable). It is obvious that PE must be enabled (for PM - 4GB mode to run, instead Real Mode - 1MB). The system has 256MB of memory.

Intention is to make system as fast as can (close to the metal). In my opinion, there is NO NEED to switch PG ON, since the paging mechanism via Translation Lookaside Buffers (TLBs) will slow the system.

What do you suggest, should I enable PG or NOT, and why?

_nobody_
Whilst I admire you efforts, this is a website/forum for the Raspberry Pi SBC, not Intel devices, so please refrain from posting off topic messages.