• 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

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