2007/3/24, Venkatesh Srinivas <me@xxxxxxxxxxx>:
On Sat, Mar 24, 2007 at 06:13:50PM +0100, ninjaboy wrote: >hi, >when I load a module and in this module there is: >unsigned long cr3; >asm("xor %%rbx, %%rbx\t\nmov %%cr3, %0" : "=b" (cr3)); >what cr3 is? insmod in userspace or cr3 in kernel space? CR3 is a register on x86 and x86-64 chips, that points to the page directory (highest level page table) for the current process.
Yes, i know, but on SMP i try to load and remove the module more time and it's the dmesg output [*] CPU: 1 [*] CR3: 0000000020421000 Cleaning Up. [*] CPU: 1 [*] CR3: 000000002613c000 Cleaning Up. [*] CPU: 0 [*] CR3: 000000000e188000 Cleaning Up. [*] CPU: 0 [*] CR3: 00000000261d6000 the addrs change for the same CPU too, why? thanks -- noone is alone. -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ