Lines Matching defs:block
62 #define MEMBLOCKSIZE 4096 /* Size of memory block to read */
76 caddr_t pmbuf; /* buffer for memory block */
78 int entperblock; /* entropy bits per block read */
79 hrtime_t last_diff; /* previous time to process a block */
314 * Will block if not enough entropy was available and the call is blocking.
395 * of an n-bit block shall be compared with the previously
396 * generated block. Test shall fail if any two compared
405 cmn_err(CE_WARN, "swrand: The value of 160-bit block "
505 /* Hash a buffer centered on a block in the pool */
516 /* XOR the hash result back into the block */
523 /* Slide the hash buffer and repeat with next block */
559 * - By measuring the time it takes to load and hash a block of memory
563 * memory is divided into blocks of fixed size. A block of memory is
567 * "checksum" computed for the block. If the single-bit checksum has not
569 * then the assumption is that at least one bit in the block has changed.
570 * The possible locations within the memory block of where the bit change
571 * occurred is used as a measure of entropy. For example, if a block
575 * when a change is detected. With a 4096 byte block size, a block
579 * hash a physical memory block (as described above). The time measured
598 * The maximum entropy amount in bits per block of memory read is
662 uint32_t block, oblock;
670 * block to read.
674 /* If the pool is "full", stop after one block */
691 /* Pick a memory block to read */
692 block = oblock = srndpool[i] % entsrc->nblocks;
695 if (block < pmem->ml_size / MEMBLOCKSIZE)
697 block -= pmem->ml_size / MEMBLOCKSIZE;
702 offset = pmem->ml_address + block * MEMBLOCKSIZE;
720 * memory block. Load the page and compute the
721 * hash of the memory block.
768 * block and compare it against the previous
799 * If the memory block has changed, credit the pool with
818 physmem_parity_update(uint8_t *parity_vec, uint32_t block, int parity)
821 if (parity == ((parity_vec[block >> 3] >> (block & 7)) & 1))
823 parity_vec[block >> 3] ^= 1 << (block & 7);