• Home
  • Raw
  • Download

Lines Matching refs:raw

63 	uint8_t *raw = context->raw;  in VbNvSetup()  local
70 if ((HEADER_SIGNATURE != (raw[HEADER_OFFSET] & HEADER_MASK)) in VbNvSetup()
71 || (Crc8(raw, CRC_OFFSET) != raw[CRC_OFFSET])) { in VbNvSetup()
73 Memset(raw, 0, VBNV_BLOCK_SIZE); in VbNvSetup()
74 raw[HEADER_OFFSET] = (HEADER_SIGNATURE | in VbNvSetup()
88 context->raw[CRC_OFFSET] = Crc8(context->raw, CRC_OFFSET); in VbNvTeardown()
98 const uint8_t *raw = context->raw; in VbNvGet() local
102 *dest = (raw[HEADER_OFFSET] & HEADER_FIRMWARE_SETTINGS_RESET ? in VbNvGet()
107 *dest = (raw[HEADER_OFFSET] & HEADER_KERNEL_SETTINGS_RESET ? in VbNvGet()
112 *dest = (raw[BOOT_OFFSET] & BOOT_DEBUG_RESET_MODE ? 1 : 0); in VbNvGet()
117 *dest = raw[BOOT_OFFSET] & BOOT_TRY_B_COUNT_MASK; in VbNvGet()
121 *dest = raw[RECOVERY_OFFSET]; in VbNvGet()
125 *dest = raw[RECOVERY_SUBCODE_OFFSET]; in VbNvGet()
129 *dest = raw[LOCALIZATION_OFFSET]; in VbNvGet()
133 *dest = (raw[KERNEL_FIELD_OFFSET] in VbNvGet()
134 | (raw[KERNEL_FIELD_OFFSET + 1] << 8) in VbNvGet()
135 | (raw[KERNEL_FIELD_OFFSET + 2] << 16) in VbNvGet()
136 | (raw[KERNEL_FIELD_OFFSET + 3] << 24)); in VbNvGet()
140 *dest = (raw[DEV_FLAGS_OFFSET] & DEV_BOOT_USB_MASK ? 1 : 0); in VbNvGet()
144 *dest = (raw[DEV_FLAGS_OFFSET] & DEV_BOOT_LEGACY_MASK ? 1 : 0); in VbNvGet()
148 *dest = (raw[DEV_FLAGS_OFFSET] & DEV_BOOT_SIGNED_ONLY_MASK ? in VbNvGet()
153 *dest = (raw[BOOT_OFFSET] & BOOT_DISABLE_DEV_REQUEST ? 1 : 0); in VbNvGet()
157 *dest = (raw[BOOT_OFFSET] & BOOT_OPROM_NEEDED ? 1 : 0); in VbNvGet()
161 *dest = (raw[TPM_FLAGS_OFFSET] & TPM_CLEAR_OWNER_REQUEST ? in VbNvGet()
166 *dest = (raw[TPM_FLAGS_OFFSET] & TPM_CLEAR_OWNER_DONE ? 1 : 0); in VbNvGet()
170 *dest = (raw[BOOT_OFFSET] & BOOT_BACKUP_NVRAM ? 1 : 0); in VbNvGet()
174 *dest = (raw[BOOT2_OFFSET] & BOOT2_TRY_NEXT ? 1 : 0); in VbNvGet()
178 *dest = (raw[BOOT2_OFFSET] & BOOT2_TRIED ? 1 : 0); in VbNvGet()
182 *dest = raw[BOOT2_OFFSET] & BOOT2_RESULT_MASK; in VbNvGet()
186 *dest = (raw[BOOT2_OFFSET] & BOOT2_PREV_TRIED ? 1 : 0); in VbNvGet()
190 *dest = (raw[BOOT2_OFFSET] & BOOT2_PREV_RESULT_MASK) in VbNvGet()
201 uint8_t *raw = context->raw; in VbNvSet() local
211 raw[HEADER_OFFSET] |= HEADER_FIRMWARE_SETTINGS_RESET; in VbNvSet()
213 raw[HEADER_OFFSET] &= ~HEADER_FIRMWARE_SETTINGS_RESET; in VbNvSet()
218 raw[HEADER_OFFSET] |= HEADER_KERNEL_SETTINGS_RESET; in VbNvSet()
220 raw[HEADER_OFFSET] &= ~HEADER_KERNEL_SETTINGS_RESET; in VbNvSet()
225 raw[BOOT_OFFSET] |= BOOT_DEBUG_RESET_MODE; in VbNvSet()
227 raw[BOOT_OFFSET] &= ~BOOT_DEBUG_RESET_MODE; in VbNvSet()
236 raw[BOOT_OFFSET] &= ~BOOT_TRY_B_COUNT_MASK; in VbNvSet()
237 raw[BOOT_OFFSET] |= (uint8_t)value; in VbNvSet()
248 raw[RECOVERY_OFFSET] = (uint8_t)value; in VbNvSet()
252 raw[RECOVERY_SUBCODE_OFFSET] = (uint8_t)value; in VbNvSet()
259 raw[LOCALIZATION_OFFSET] = (uint8_t)value; in VbNvSet()
263 raw[KERNEL_FIELD_OFFSET] = (uint8_t)(value); in VbNvSet()
264 raw[KERNEL_FIELD_OFFSET + 1] = (uint8_t)(value >> 8); in VbNvSet()
265 raw[KERNEL_FIELD_OFFSET + 2] = (uint8_t)(value >> 16); in VbNvSet()
266 raw[KERNEL_FIELD_OFFSET + 3] = (uint8_t)(value >> 24); in VbNvSet()
271 raw[DEV_FLAGS_OFFSET] |= DEV_BOOT_USB_MASK; in VbNvSet()
273 raw[DEV_FLAGS_OFFSET] &= ~DEV_BOOT_USB_MASK; in VbNvSet()
278 raw[DEV_FLAGS_OFFSET] |= DEV_BOOT_LEGACY_MASK; in VbNvSet()
280 raw[DEV_FLAGS_OFFSET] &= ~DEV_BOOT_LEGACY_MASK; in VbNvSet()
285 raw[DEV_FLAGS_OFFSET] |= DEV_BOOT_SIGNED_ONLY_MASK; in VbNvSet()
287 raw[DEV_FLAGS_OFFSET] &= ~DEV_BOOT_SIGNED_ONLY_MASK; in VbNvSet()
292 raw[BOOT_OFFSET] |= BOOT_DISABLE_DEV_REQUEST; in VbNvSet()
294 raw[BOOT_OFFSET] &= ~BOOT_DISABLE_DEV_REQUEST; in VbNvSet()
299 raw[BOOT_OFFSET] |= BOOT_OPROM_NEEDED; in VbNvSet()
301 raw[BOOT_OFFSET] &= ~BOOT_OPROM_NEEDED; in VbNvSet()
306 raw[TPM_FLAGS_OFFSET] |= TPM_CLEAR_OWNER_REQUEST; in VbNvSet()
308 raw[TPM_FLAGS_OFFSET] &= ~TPM_CLEAR_OWNER_REQUEST; in VbNvSet()
313 raw[TPM_FLAGS_OFFSET] |= TPM_CLEAR_OWNER_DONE; in VbNvSet()
315 raw[TPM_FLAGS_OFFSET] &= ~TPM_CLEAR_OWNER_DONE; in VbNvSet()
320 raw[BOOT_OFFSET] |= BOOT_BACKUP_NVRAM; in VbNvSet()
322 raw[BOOT_OFFSET] &= ~BOOT_BACKUP_NVRAM; in VbNvSet()
327 raw[BOOT2_OFFSET] |= BOOT2_TRY_NEXT; in VbNvSet()
329 raw[BOOT2_OFFSET] &= ~BOOT2_TRY_NEXT; in VbNvSet()
334 raw[BOOT2_OFFSET] |= BOOT2_TRIED; in VbNvSet()
336 raw[BOOT2_OFFSET] &= ~BOOT2_TRIED; in VbNvSet()
344 raw[BOOT2_OFFSET] &= ~BOOT2_RESULT_MASK; in VbNvSet()
345 raw[BOOT2_OFFSET] |= (uint8_t)value; in VbNvSet()
350 raw[BOOT2_OFFSET] |= BOOT2_PREV_TRIED; in VbNvSet()
352 raw[BOOT2_OFFSET] &= ~BOOT2_PREV_TRIED; in VbNvSet()
360 raw[BOOT2_OFFSET] &= ~BOOT2_PREV_RESULT_MASK; in VbNvSet()
361 raw[BOOT2_OFFSET] |= (uint8_t)value << BOOT2_PREV_RESULT_SHIFT; in VbNvSet()