Switches the model to the system-level view and load our default configuration of 1G page tables.
(init-sys-view paging-base-addr x86) → x86
Function:
(defun init-sys-view (paging-base-addr x86) (declare (xargs :stobjs (x86))) (declare (type (unsigned-byte 52) paging-base-addr)) (declare (xargs :guard (equal (loghead 12 paging-base-addr) 0))) (let ((__function__ 'init-sys-view)) (declare (ignorable __function__)) (b* ((ctx 'init-sys-view) ((when (not (mbt (equal (loghead 12 paging-base-addr) 0)))) (!!ms-fresh :misaligned-paging-base-address paging-base-addr)) (paging-base-addr40 (logtail 12 paging-base-addr)) (x86 (!app-view nil x86)) (cr0 (n32 (ctri 0 x86))) (cr4 (n21 (ctri 4 x86))) (x86 (!ctri 0 (!cr0bits->pg 1 cr0) x86)) (x86 (!ctri 4 (!cr4bits->pae 1 cr4) x86)) (x86 (!ctri 3 (!cr3bits->pdb paging-base-addr40 (ctri 3 x86)) x86)) (efer (n12 (msri 0 x86))) (x86 (!msri 0 (!ia32_eferbits->lme 1 efer) x86)) (x86 (load-qwords-into-physical-memory-list (construct-page-tables paging-base-addr) x86))) x86)))
Theorem:
(defthm x86p-of-init-sys-view (implies (and (x86p x86) (unsigned-byte-p 52 paging-base-addr)) (b* ((x86 (init-sys-view paging-base-addr x86))) (x86p x86))) :rule-classes :rewrite)