• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Community
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
      • Kestrel-books
      • X86isa
        • Program-execution
          • Dynamic-instrumentation
          • Initialize-x86-state
          • Binary-file-load-fn
          • Read-channel-into-memory
          • Setting-up-page-tables
            • Construct-pml4-table
            • Construct-pdp-table
            • Load-qwords-into-physical-memory-list
            • Construct-pdp-tables
            • Load-qwords-into-physical-memory
            • Construct-page-tables
              • Physical-addr-qword-alistp
              • Add-pml4-entry
              • Add-pdp-entry
              • Physical-addr-qword-alist-listp
            • Read-channel-into-byte-list
            • Init-zero-page
            • Linux-load
            • Read-file-into-memory
            • Read-file-into-byte-list
            • Init-sys-view
            • Load-elf-sections
            • Chars-to-c-str
            • String-to-c-str
            • Pack-u64
            • Pack-u32
            • Concrete-simulation-examples
            • Gdt-entry
          • Sdm-instruction-set-summary
          • Tlb
          • Running-linux
          • Introduction
          • Asmtest
          • X86isa-build-instructions
          • Publications
          • Contributors
          • Machine
          • Implemented-opcodes
          • To-do
          • Proof-utilities
          • Peripherals
          • Model-validation
          • Modelcalls
          • Concrete-simulation-examples
          • Utils
          • Debugging-code-proofs
        • Axe
        • Execloader
      • Math
      • Testing-utilities
    • Setting-up-page-tables

    Construct-page-tables

    Construct page tables that do linear address translation to 1GB page using IA32e paging.

    Signature
    (construct-page-tables pml4-base-address) → *

    Definitions and Theorems

    Function: construct-page-tables

    (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: physical-addr-qword-alist-listp-construct-page-tables

    (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))