(read-from-physical-memory p-addrs x86) → value
Function:
(defun read-from-physical-memory (p-addrs x86) (declare (xargs :stobjs (x86))) (declare (xargs :guard (physical-address-listp p-addrs))) (declare (xargs :guard (not (app-view x86)))) (let ((__function__ 'read-from-physical-memory)) (declare (ignorable __function__)) (if (endp p-addrs) 0 (b* ((addr0 (car p-addrs)) (byte0 (memi addr0 x86)) (rest-bytes (read-from-physical-memory (cdr p-addrs) x86))) (logior byte0 (ash rest-bytes 8))))))
Theorem:
(defthm integerp-of-read-from-physical-memory (b* ((value (read-from-physical-memory p-addrs x86))) (integerp value)) :rule-classes :type-prescription)
Theorem:
(defthm size-of-read-from-physical-memory (implies (equal n (ash (len p-addrs) 3)) (unsigned-byte-p n (read-from-physical-memory p-addrs x86))) :rule-classes (:rewrite (:type-prescription :corollary (implies (equal n (ash (len p-addrs) 3)) (natp (read-from-physical-memory p-addrs x86))) :hints (("Goal" :in-theory '(unsigned-byte-p integer-range-p natp)))) (:linear :corollary (implies (equal n (ash (len p-addrs) 3)) (and (<= 0 (read-from-physical-memory p-addrs x86)) (< (read-from-physical-memory p-addrs x86) (expt 2 n)))) :hints (("Goal" :in-theory '(unsigned-byte-p integer-range-p (:e expt)))))))
Theorem:
(defthm read-from-physical-memory-xw-rflags (equal (read-from-physical-memory p-addrs (xw :rflags nil val x86)) (read-from-physical-memory p-addrs x86)))
Theorem:
(defthm read-from-physical-memory-xw-not-mem (implies (not (equal fld :mem)) (equal (read-from-physical-memory p-addrs (xw fld index val x86)) (read-from-physical-memory p-addrs x86))))