• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Community
    • Proof-automation
    • ACL2
    • Macro-libraries
    • 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
          • Top-level-memory
          • App-view
          • X86-decoder
          • Physical-memory
          • Decoding-and-spec-utils
          • Instructions
          • Register-readers-and-writers
          • X86-modes
          • Segmentation
            • Ea-to-la
            • Segment-base-and-bounds
            • Ia32e-segmentation
              • Make-system-segment-attr-field
                • Make-data-segment-attr-field
                • Make-code-segment-attr-field
                • Ia32e-valid-code-segment-descriptor-p
                • Ia32e-valid-busy-tss-segment-descriptor-p
                • Ia32e-valid-available-tss-segment-descriptor-p
                • Ia32e-valid-trap-gates-segment-descriptor-p
                • Ia32e-valid-ldt-segment-descriptor-p
                • Ia32e-valid-interrupt-gates-segment-descriptor-p
                • Ia32e-valid-data-segment-descriptor-p
                • Ia32e-valid-call-gate-segment-descriptor-p
              • Eas-to-las
              • Ia32-segmentation
            • Other-non-deterministic-computations
            • Environment
            • Paging
          • Implemented-opcodes
          • To-do
          • Proof-utilities
          • Peripherals
          • Model-validation
          • Modelcalls
          • Concrete-simulation-examples
          • Utils
          • Debugging-code-proofs
        • Axe
        • Execloader
      • Math
      • Testing-utilities
    • Ia32e-segmentation

    Make-system-segment-attr-field

    Constructor for the System Segment attribute field

    Signature
    (make-system-segment-attr-field descriptor) → *

    Definitions and Theorems

    Function: make-system-segment-attr-field

    (defun make-system-segment-attr-field (descriptor)
      (declare (type (unsigned-byte 128) descriptor))
      (let ((__function__ 'make-system-segment-attr-field))
        (declare (ignorable __function__))
        (b* ((type (system-segment-descriptorbits->type descriptor))
             (s (system-segment-descriptorbits->s descriptor))
             (dpl (system-segment-descriptorbits->dpl descriptor))
             (p (system-segment-descriptorbits->p descriptor))
             (avl (system-segment-descriptorbits->avl descriptor))
             (g (system-segment-descriptorbits->g descriptor)))
          (change-system-segment-descriptor-attributesbits 0
                                                           :type type
                                                           :s s
                                                           :dpl dpl
                                                           :p p
                                                           :avl avl
                                                           :g g))))

    Theorem: n16p-make-system-segment-attr

    (defthm n16p-make-system-segment-attr
     (implies
          (unsigned-byte-p 128 descriptor)
          (unsigned-byte-p 16
                           (make-system-segment-attr-field descriptor)))
     :rule-classes
     (:rewrite
      (:type-prescription
          :corollary
          (implies (unsigned-byte-p 128 descriptor)
                   (natp (make-system-segment-attr-field descriptor)))
          :hints
          (("Goal" :in-theory '(unsigned-byte-p integer-range-p natp))))
      (:linear
       :corollary
       (implies (unsigned-byte-p 128 descriptor)
                (and (<= 0
                         (make-system-segment-attr-field descriptor))
                     (< (make-system-segment-attr-field descriptor)
                        65536)))
       :hints
       (("Goal"
            :in-theory '(unsigned-byte-p integer-range-p (:e expt)))))))