• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
      • Kestrel-books
      • X86isa
        • Program-execution
        • Sdm-instruction-set-summary
        • Tlb
        • Running-linux
        • Introduction
        • Asmtest
        • X86isa-build-instructions
        • Publications
        • Contributors
        • Machine
          • X86isa-state
          • Syscalls
          • Cpuid
          • Linear-memory
          • Rflag-specifications
          • Characterizing-undefined-behavior
          • App-view
          • Top-level-memory
          • X86-decoder
          • Physical-memory
          • Decoding-and-spec-utils
          • Instructions
          • Register-readers-and-writers
          • X86-modes
          • Segmentation
          • Other-non-deterministic-computations
          • Environment
          • Paging
            • Ia32e-paging
              • Paging-entry-no-page-fault-p
              • Ia32e-la-to-pa-without-tlb-internal
              • Ia32e-la-to-pa-page-directory
              • Ia32e-la-to-pa-page-dir-ptr-table
              • Ia32e-la-to-pa-page-table
              • Ia32e-la-to-pa-pml4-table
              • Ia32e-la-to-pa-without-tlb
              • Ia32e-la-to-pa
              • Same-page
              • Page-fault-exception
              • Page-dir-ptr-table-entry-addr
              • Page-directory-entry-addr
              • Page-table-entry-addr
              • La-to-pa
              • Paging-entry-no-page-fault-p-did-fault?
              • Pml4-table-entry-addr
              • Same-page-offset
              • Page-user-supervisor
              • Page-execute-disable
              • Set-dirty-bit
              • Set-accessed-bit
              • Page-read-write
              • Page-present
              • Page-fault-err-no
              • Accessed-bit
              • Page-size
              • Find-similar-paging-entries-from-page-present-equality-aux
              • Dirty-bit
              • Good-lin-addr-p
          • Implemented-opcodes
          • To-do
          • Proof-utilities
          • Peripherals
          • Model-validation
          • Modelcalls
          • Concrete-simulation-examples
          • Utils
          • Debugging-code-proofs
        • Axe
        • Execloader
      • Math
      • Testing-utilities
    • Ia32e-paging

    Good-lin-addr-p

    Signature
    (good-lin-addr-p lin-addr x86) → *

    Definitions and Theorems

    Function: good-lin-addr-p

    (defun good-lin-addr-p (lin-addr x86)
      (declare (xargs :stobjs (x86)))
      (declare (xargs :guard t))
      (let ((__function__ 'good-lin-addr-p))
        (declare (ignorable __function__))
        (b* ((cr0 (the (unsigned-byte 32)
                       (n32 (ctri *cr0* x86))))
             (cr4 (the (unsigned-byte 22)
                       (n22 (ctri *cr4* x86))))
             (ia32-efer (the (unsigned-byte 12)
                             (n12 (msri *ia32_efer-idx* x86)))))
          (cond ((equal (cr0bits->pg cr0) 0)
                 (n32p lin-addr))
                ((equal (cr4bits->pae cr4) 0)
                 (n32p lin-addr))
                ((equal (ia32_eferbits->lme ia32-efer) 0)
                 (n32p lin-addr))
                (t (canonical-address-p lin-addr))))))