• Top
    • Documentation
    • Books
    • Recursion-and-induction
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
      • Kestrel-books
      • X86isa
        • Program-execution
          • Dynamic-instrumentation
          • Initialize-x86-state
          • Binary-file-load-fn
          • 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
            • Init-sys-view
            • Load-elf-sections
            • Concrete-simulation-examples
          • Introduction
          • X86isa-build-instructions
          • Publications
          • Contributors
          • Machine
          • Implemented-opcodes
          • Proof-utilities
          • To-do
          • Concrete-simulation-examples
          • Model-validation
          • Utils
          • Debugging-code-proofs
        • Execloader
        • Axe
      • Testing-utilities
      • Math
    • Setting-up-page-tables

    Add-pml4-entry

    Add a PML4 entry that references a Page-Directory-Pointer Table

    Signature
    (add-pml4-entry pdpt-base-addr) → *

    Definitions and Theorems

    Function: add-pml4-entry

    (defun
      add-pml4-entry (pdpt-base-addr)
      (declare (type (unsigned-byte 40)
                     pdpt-base-addr))
      (let ((__function__ 'add-pml4-entry))
           (declare (ignorable __function__))
           (b* ((64-bit-entry (!ia32e-pml4ebits->pdpt pdpt-base-addr 0))
                (64-bit-entry (!ia32e-pml4ebits->p 1 64-bit-entry))
                (64-bit-entry (!ia32e-pml4ebits->r/w 1 64-bit-entry))
                (64-bit-entry (!ia32e-pml4ebits->u/s 1 64-bit-entry)))
               64-bit-entry)))

    Theorem: n64p-add-pml4-entry

    (defthm
     n64p-add-pml4-entry
     (unsigned-byte-p 64 (add-pml4-entry pdpt-base-addr))
     :rule-classes
     (:rewrite
      (:type-prescription
          :corollary (natp (add-pml4-entry pdpt-base-addr))
          :hints
          (("Goal" :in-theory '(unsigned-byte-p integer-range-p natp))))
      (:linear
       :corollary (and (<= 0 (add-pml4-entry pdpt-base-addr))
                       (< (add-pml4-entry pdpt-base-addr)
                          18446744073709551616))
       :hints
       (("Goal"
            :in-theory '(unsigned-byte-p integer-range-p (:e expt)))))))