• Top
    • Documentation
    • Books
    • Recursion-and-induction
    • Boolean-reasoning
    • Debugging
    • Projects
    • 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-pdp-entry

    Add a PDP entry that maps a 1GB page

    Signature
    (add-pdp-entry page-base-addr) → *

    Definitions and Theorems

    Function: add-pdp-entry

    (defun
     add-pdp-entry (page-base-addr)
     (declare (type (unsigned-byte 22)
                    page-base-addr))
     (let
      ((__function__ 'add-pdp-entry))
      (declare (ignorable __function__))
      (b*
         ((64-bit-entry
               (!ia32e-pdpte-1gb-pagebits->page page-base-addr 0))
          (64-bit-entry (!ia32e-pdpte-1gb-pagebits->p 1 64-bit-entry))
          (64-bit-entry (!ia32e-pdpte-1gb-pagebits->r/w 1 64-bit-entry))
          (64-bit-entry (!ia32e-pdpte-1gb-pagebits->u/s 1 64-bit-entry))
          (64-bit-entry (!ia32e-pdpte-1gb-pagebits->ps 1 64-bit-entry)))
         64-bit-entry)))

    Theorem: n64p-add-pdp-entry

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