x86: fix z_x86_page_tables_get() for 64-bit
Needs a different assembly instruction. Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
parent
a9e0d14c57
commit
65e17a923f
1 changed files with 4 additions and 0 deletions
|
@ -352,7 +352,11 @@ static inline struct x86_page_tables *z_x86_page_tables_get(void)
|
||||||
{
|
{
|
||||||
struct x86_page_tables *ret;
|
struct x86_page_tables *ret;
|
||||||
|
|
||||||
|
#ifdef CONFIG_X86_64
|
||||||
|
__asm__ volatile("movq %%cr3, %0\n\t" : "=r" (ret));
|
||||||
|
#else
|
||||||
__asm__ volatile("movl %%cr3, %0\n\t" : "=r" (ret));
|
__asm__ volatile("movl %%cr3, %0\n\t" : "=r" (ret));
|
||||||
|
#endif
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue