LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Closed Thread
  Search this Thread
Old 05-13-2020, 11:23 AM   #1
c01ahib
LQ Newbie
 
Registered: May 2020
Posts: 10

Rep: Reputation: Disabled
Setting Kernel space to non-cacheable on x86_64 using IA_PAT MSR or page table walks


I am trying to disable the caching for the Linux operating system only, i.e., Kernel space. I figured out that there are two ways to do this:

1- Using MTRR: This turned out to be infeasible as MTRR allow disabling caching for ranges of physical addresses. I am using a 64bit Tinycore Linux on x86_64, which means that kernel space can be mapped to the whole RAM (unlike 32bit systems where space maps to low physical memory).

2- Using PAT: This seems to be the better option as it works on virtual pages. However I am not sure whether I should use the IA32_PAT register and how? or modify the page table entries for kernel pages and how?


Could anyone provide full code for disabling cache for kernel space only or at least instructions from using IA32_PAT or modifying page table entries?

I found this question:
https://stackoverflow.com/questions/...le-entry-flags
but does not include the full code and it is not answered.

I also found these questions for page table walks:
https://stackoverflow.com/questions/...age-table-walk, and https://stackoverflow.com/questions/...ory-management

Thank you!
 
  


Closed Thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting Kernel space to non-cacheable on x86_64 using IA_PAT MSR or page table walks c01ahib Linux - Newbie 8 05-05-2020 08:56 AM
Failed access perfctr msr (MSR c0010004 is 0) dimasar2 Linux - Laptop and Netbook 5 04-08-2019 03:18 AM
Making a memory block as non cacheable by the processor Jason Souza Linux - Newbie 4 08-04-2008 03:11 AM
Configuring alien memory as Cacheable/ Non Cacheable linuxguy_72 Linux - Kernel 0 05-04-2007 01:25 AM
how to allocate non-cacheable buffer? mehuljv Programming 2 05-21-2005 01:08 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:51 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration