Disable L2 / L1 Caches

I am trying to disable the internal and external memory cache of my CPU, my configuration is higher: -DELL Precision WorkStation -Intel Core 2 Duo E6550 2.33 GHz -Ubuntu 8.10

I tried disabling it through the BIOS, but he believes that DELL computers do not allow users to access the cache, I found another way then: disable the cache program, Intel A.3 architecture manual indicates that cr0 can be configured to To disable the cache by setting bit 30, I wrote the code above:

invd

mov eax, cr0

mov eax, 40000000H, bit bit 30

mov cr0, eax

The program compiled successfully, but when I try to run the exe file, it is Seg Faults (I use NASM)

Can anybody help me?

+4
source share
8 answers

Please note that even if you are in ring 0 because you are in the kernel or running your tool in DOS in protected mode, etc., moving 0x40000000 to cr0 will certainly cause a disaster. You see that the control register (cr0) controls all kinds of things that affect the processor, for example, the inclusion of paging, protected mode (not directly), etc. If you disable all these bits, you will find yourself in a completely different environment and getting a segmentation error is not surprising if you previously had paging.

Instead, you should do this:

mov eax,cr0
or eax, 40000000H ;set bit 30 without clearing the others
mov cr0,eax
+7
source

" eax, 40000000h", 30. . . , - , , .

+3

wikipedia. , :

CR0 32 386 . x86-64 , ( ) 64 . CR0 , . 31 PG Paging 1,    CR3   , 30 CD Cache disable

Intel 64 IA-32. , :

( EFLAGS ) . , , ( 0). , .

, . , , , , ​​ . , or , ( ).

+3

windows linux, ​​ rung 0, , , .

, ?

, , ?

+2

, - , , - DoS.

0

, root . , , , L1 L2 .

0

, , Seg (mov eax, cr0), , seg.... , ???

/ 0 (telinit 1 command line root), ...

, 0 (cr0) , ...?

0

, , , Ring0, DrJokepu, , , , . , , , , , insmod .ko, init . , clean witch reset cr0 rmmod it, ... cat/proc/modules, , , -, ....

?

0
source

All Articles