Top-level page translation function
(la-to-pa lin-addr r-w-x x86) → (mv flg p-addr x86)
Function:
(defun la-to-pa$inline (lin-addr r-w-x x86) (declare (xargs :stobjs (x86))) (declare (type (signed-byte 48) lin-addr) (type (member :r :w :x) r-w-x)) (declare (xargs :guard (not (app-view x86)))) (if (mbt (and (canonical-address-p lin-addr) (not (app-view x86)))) (ia32e-la-to-pa lin-addr r-w-x x86) (mv (list :ia32e-paging-invalid-linear-address-or-not-in-sys-view lin-addr) 0 x86)))
Theorem:
(defthm physical-address-p-of-la-to-pa.p-addr (b* (((mv ?flg ?p-addr ?x86) (la-to-pa$inline lin-addr r-w-x x86))) (physical-address-p p-addr)) :rule-classes :rewrite)
Theorem:
(defthm x86p-of-la-to-pa.x86 (implies (x86p x86) (b* (((mv ?flg ?p-addr ?x86) (la-to-pa$inline lin-addr r-w-x x86))) (x86p x86))) :rule-classes :rewrite)
Theorem:
(defthm n52p-mv-nth-1-la-to-pa (unsigned-byte-p 52 (mv-nth 1 (la-to-pa lin-addr r-w-x x86))) :rule-classes (:rewrite (:type-prescription :corollary (natp (mv-nth 1 (la-to-pa lin-addr r-w-x x86))) :hints (("Goal" :in-theory '(unsigned-byte-p integer-range-p natp)))) (:linear :corollary (and (<= 0 (mv-nth 1 (la-to-pa lin-addr r-w-x x86))) (< (mv-nth 1 (la-to-pa lin-addr r-w-x x86)) 4503599627370496)) :hints (("Goal" :in-theory '(unsigned-byte-p integer-range-p (:e expt)))))))
Theorem:
(defthm xr-and-la-to-pa (implies (and (not (equal fld :tlb)) (not (equal fld :mem)) (not (equal fld :fault))) (equal (xr fld index (mv-nth 2 (la-to-pa lin-addr r-w-x x86))) (xr fld index x86))))