how does kernel code access memory at the assembly level

135 views Asked by At

Many articles have stated that,in 32-bit Linux when kernel code accesses memory, the MMU converts linear addresses above 3G to physical addresses, physical addr = logical addr - 0xC0000000.

So how does kernel code access memory at the assembly level? For example, the kernel has a global variable called foo, which at the C level is foo=123. So what is it at the assembly level?

Is it movl $123, foo(%0xC0000000)? Am I think the address is ds + 0xC0000000 + foo, which translates to the physical address being foo by MMU ?

0

There are 0 answers