Construct page tables that do linear address translation to 1GB page using IA32e paging.
(construct-page-tables pml4-base-address) → *
Function:
(defun construct-page-tables (pml4-base-address) (declare (type (unsigned-byte 52) pml4-base-address)) (let ((__function__ 'construct-page-tables)) (declare (ignorable __function__)) (let* ((pml4-base-address40 (loghead 40 (logtail 12 pml4-base-address)))) (if (and (unsigned-byte-p 40 (1+ (+ 1 pml4-base-address40))) (unsigned-byte-p 40 (1+ pml4-base-address40)) (unsigned-byte-p 52 (+ 8 pml4-base-address))) (let* ((table (construct-pml4-table 0 pml4-base-address (+ 1 pml4-base-address40) nil) ) (acc (list table))) (construct-pdp-tables 0 (+ 1 pml4-base-address40) acc)) nil))))
Theorem:
(defthm physical-addr-qword-alist-listp-construct-page-tables (implies (unsigned-byte-p 52 pml4-base-address) (physical-addr-qword-alist-listp (construct-page-tables pml4-base-address))) :rule-classes (:type-prescription :rewrite))