From d5e4746cf84a8da1b6465058ec7c7cc19c3c32c0 Mon Sep 17 00:00:00 2001 From: Aaron Durbin Date: Tue, 17 Apr 2018 14:35:48 -0600 Subject: cpu/x86: expose and add paging helper functions Add the following functions for use outside of the paging module: void paging_enable_pae_cr3(uintptr_t cr3); void paging_enable_pae(void); void paging_disable_pae(void); The functions just enable and/or disable paging along with PAE. Disassembly shows equivalent output for both versions. BUG=b:72728953 Change-Id: I9665e7ec4795a5f52889791f73cf98a8f4def827 Signed-off-by: Aaron Durbin Reviewed-on: https://review.coreboot.org/25714 Tested-by: build bot (Jenkins) Reviewed-by: Furquan Shaikh Reviewed-by: Justin TerAvest --- src/include/cpu/x86/pae.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/include') diff --git a/src/include/cpu/x86/pae.h b/src/include/cpu/x86/pae.h index 9b9f27b688..5bbfdf3aca 100644 --- a/src/include/cpu/x86/pae.h +++ b/src/include/cpu/x86/pae.h @@ -3,6 +3,14 @@ #include +/* Enable paging with cr3 value for page directory pointer table as well as PAE + option in cr4. */ +void paging_enable_pae_cr3(uintptr_t cr3); +/* Enable paging as well as PAE option in cr4. */ +void paging_enable_pae(void); +/* Disable paging as well as PAE option in cr4. */ +void paging_disable_pae(void); + /* Set/Clear NXE bit in IA32_EFER MSR */ void paging_set_nxe(int enable); -- cgit v1.2.3