Page 2 of 2

Re: High Performance Graphics Driver for most devices

Posted: Fri Aug 19, 2022 11:12 am
by kzinti
devc1 wrote:One Last Question, is the Page Attribute Table (PAT) available on all x64 Processors ?
Yes.

Re: High Performance Graphics Driver for most devices

Posted: Fri Aug 19, 2022 11:21 am
by nullplan
devc1 wrote:One Last Question, is the Page Attribute Table (PAT) available on all x64 Processors ?
You know, the merest amount of research would have told you to just look into the bloody documentation, that contains such helpful sentences as:
Intel SDM wrote:The PAT was introduced to the IA-32 architecture on the Pentium III processor. It is also available on the Pentium 4 and Intel Xeon processors.
Since those developments are far older than the development of 64-bit mode, the answer to your question is yes.

Re: High Performance Graphics Driver for most devices

Posted: Fri Aug 19, 2022 11:55 am
by Demindiro
Instead of using PAT you may want to use non-temporal instructions instead, which has the same effect.

I use NT instructions since I want to keep my microkernel API free from any architecture-specific details where possible.

Re: High Performance Graphics Driver for most devices

Posted: Fri Aug 19, 2022 12:50 pm
by Octocontrabass
nullplan wrote:
Intel SDM wrote:The PAT was introduced to the IA-32 architecture on the Pentium III processor.
But it was introduced on the Pentium II...
Demindiro wrote:Instead of using PAT you may want to use non-temporal instructions instead, which has the same effect.
Unfortunately, those instructions may not have the same effect:
Intel SDM wrote:The memory type of the region being written to can override the non-temporal hint, if the memory address specified for the non-temporal store is in an uncacheable (UC) or write protected (WP) memory region.
Firmware may set up the MTRRs so that the framebuffer is UC. You'll need to change the MTRRs or override the MTRRs with the PAT to make non-temporal instructions work correctly, so you might as well set it to WC and make all instructions non-temporal.

Re: High Performance Graphics Driver for most devices

Posted: Fri Aug 19, 2022 1:00 pm
by Demindiro
Octocontrabass wrote:Firmware may set up the MTRRs so that the framebuffer is UC. You'll need to change the MTRRs or override the MTRRs with the PAT to make non-temporal instructions work correctly, so you might as well set it to WC and make all instructions non-temporal.
From what I understand it is not possible to override the MTRR if it set to UC.
2022-08-19-205902_1053x600_scrot.png

Re: High Performance Graphics Driver for most devices

Posted: Fri Aug 19, 2022 1:02 pm
by Octocontrabass
Demindiro wrote:From what I understand it is not possible to override the MTRR if it set to UC.
Look at table 11-7 instead of table 11-6.

Re: High Performance Graphics Driver for most devices

Posted: Mon Aug 22, 2022 7:46 pm
by devc1
Understandable, thanks !