Module Name: src Committed By: riastradh Date: Sat Sep 24 11:05:18 UTC 2022
Modified Files: src/sys/arch/amd64/conf: ALL GENERIC src/sys/arch/i386/conf: ALL GENERIC src/sys/arch/x86/conf: files.x86 src/sys/arch/x86/include: pmap_private.h src/sys/arch/x86/x86: cpu.c efi_machdep.c pmap.c svs.c Added Files: src/sys/arch/amd64/include: efi.h src/sys/arch/i386/include: efi.h Log Message: x86: Support EFI runtime services. This creates a special pmap, efi_runtime_pmap, which avoids setting PTE_U but allows mappings to lie in what would normally be user VM -- this way we don't fall afoul of SMAP/SMEP when executing EFI runtime services from CPL 0. SVS does not apply to the EFI runtime pmap. The mechanism is intended to work with either physical addressing or virtual addressing; currently the bootloader does physical addressing but in principle it could be modified to do virtual addressing instead, if it allocated virtual pages, assigned them in the memory map, and issued RT->SetVirtualAddressMap. Not sure pmap_activate_sync and pmap_deactivate_sync are correct, need more review from an x86 wizard. If this causes fallout, it can be disabled temporarily without reverting anything by just making efi_runtime_init return immediately without doing anything, or by removing options EFI_RUNTIME. amd64-only for now pending type fixes and testing on i386. To generate a diff of this commit: cvs rdiff -u -r1.173 -r1.174 src/sys/arch/amd64/conf/ALL cvs rdiff -u -r1.597 -r1.598 src/sys/arch/amd64/conf/GENERIC cvs rdiff -u -r0 -r1.1 src/sys/arch/amd64/include/efi.h cvs rdiff -u -r1.502 -r1.503 src/sys/arch/i386/conf/ALL cvs rdiff -u -r1.1240 -r1.1241 src/sys/arch/i386/conf/GENERIC cvs rdiff -u -r0 -r1.1 src/sys/arch/i386/include/efi.h cvs rdiff -u -r1.123 -r1.124 src/sys/arch/x86/conf/files.x86 cvs rdiff -u -r1.3 -r1.4 src/sys/arch/x86/include/pmap_private.h cvs rdiff -u -r1.205 -r1.206 src/sys/arch/x86/x86/cpu.c cvs rdiff -u -r1.1 -r1.2 src/sys/arch/x86/x86/efi_machdep.c cvs rdiff -u -r1.421 -r1.422 src/sys/arch/x86/x86/pmap.c cvs rdiff -u -r1.41 -r1.42 src/sys/arch/x86/x86/svs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.