Home | History | Annotate | Download | only in faft

Lines Matching refs:section

28     @param image_operator: Method accepting one section as its argument.
31 def wrapper(self, section):
34 @param section: A list of sections of just a section.
36 if type(section) in (tuple, list):
37 for sec in section:
40 image_operator(self, section)
363 def _bios_get_preamble_flags(self, section):
364 """Get the preamble flags of a firmware section.
366 @param section: A firmware section, either 'a' or 'b'.
369 return self._bios_handler.get_section_flags(section)
371 def _bios_set_preamble_flags(self, section, flags):
372 """Set the preamble flags of a firmware section.
374 @param section: A firmware section, either 'a' or 'b'.
377 version = self._bios_get_version(section)
378 self._bios_handler.set_section_version(section, version, flags,
381 def _bios_get_body_sha(self, section):
382 """Get SHA1 hash of BIOS RW firmware section.
384 @param section: A firmware section, either 'a' or 'b'.
387 return self._bios_handler.get_section_sha(section)
389 def _bios_get_sig_sha(self, section):
390 """Get SHA1 hash of firmware vblock in section."""
391 return self._bios_handler.get_section_sig_sha(section)
394 def _bios_corrupt_sig(self, section):
395 """Corrupt the requested firmware section signature.
397 @param section: A firmware section, either 'a' or 'b'.
399 self._bios_handler.corrupt_firmware(section)
402 def _bios_restore_sig(self, section):
403 """Restore the previously corrupted firmware section signature.
405 @param section: A firmware section, either 'a' or 'b'.
407 self._bios_handler.restore_firmware(section)
410 def _bios_corrupt_body(self, section):
411 """Corrupt the requested firmware section body.
413 @param section: A firmware section, either 'a' or 'b'.
415 self._bios_handler.corrupt_firmware_body(section)
418 def _bios_restore_body(self, section):
419 """Restore the previously corrupted firmware section body.
421 @param section: A firmware section, either 'a' or 'b'.
423 self._bios_handler.restore_firmware_body(section)
425 def __bios_modify_version(self, section, delta):
426 """Modify firmware version for the requested section, by adding delta.
431 original_version = self._bios_get_version(section)
433 flags = self._bios_handler.get_section_flags(section)
435 'Setting firmware section %s version from %d to %d' % (
436 section, original_version, new_version))
437 self._bios_handler.set_section_version(section, new_version, flags,
441 def _bios_move_version_backward(self, section):
442 """Decrement firmware version for the requested section."""
443 self.__bios_modify_version(section, -1)
446 def _bios_move_version_forward(self, section):
447 """Increase firmware version for the requested section."""
448 section, 1)
450 def _bios_get_version(self, section):
451 """Retrieve firmware version of a section."""
452 return self._bios_handler.get_section_version(section)
454 def _bios_get_datakey_version(self, section):
456 return self._bios_handler.get_section_datakey_version(section)
458 def _bios_get_kernel_subkey_version(self, section):
460 return self._bios_handler.get_section_kernel_subkey_version(section)
486 """Get SHA1 hash of EC RW firmware section."""
505 def _ec_corrupt_sig(self, section):
506 """Corrupt the requested EC section signature.
508 @param section: A EC section, either 'a' or 'b'.
510 self._ec_handler.corrupt_firmware(section, corrupt_all=True)
513 def _ec_restore_sig(self, section):
514 """Restore the previously corrupted EC section signature.
516 @param section: An EC section, either 'a' or 'b'.
518 self._ec_handler.restore_firmware(section, restore_all=True)
521 def _ec_corrupt_body(self, section):
522 """Corrupt the requested EC section body.
524 @param section: An EC section, either 'a' or 'b'.
526 self._ec_handler.corrupt_firmware_body(section, corrupt_all=True)
529 def _ec_restore_body(self, section):
530 """Restore the previously corrupted EC section body.
532 @param section: An EC section, either 'a' or 'b'.
534 self._ec_handler.restore_firmware_body(section, restore_all=True)
554 def _kernel_corrupt_sig(self, section):
555 """Corrupt the requested kernel section.
557 @param section: A kernel section, either 'a' or 'b'.
559 self._kernel_handler.corrupt_kernel(section)
562 def _kernel_restore_sig(self, section):
563 """Restore the requested kernel section (previously corrupted).
565 @param section: A kernel section, either 'a' or 'b'.
567 self._kernel_handler.restore_kernel(section)
569 def __kernel_modify_version(self, section, delta):
570 """Modify kernel version for the requested section, by adding delta.
575 original_version = self._kernel_handler.get_version(section)
578 'Setting kernel section %s version from %d to %d' % (
579 section, original_version, new_version))
580 self._kernel_handler.set_version(section, new_version)
583 def _kernel_move_version_backward(self, section):
584 """Decrement kernel version for the requested section."""
585 self.__kernel_modify_version(section, -1)
588 def _kernel_move_version_forward(self, section):
589 """Increase kernel version for the requested section."""
590 self.__kernel_modify_version(section, 1)
592 def _kernel_get_version(self, section):
594 return self._kernel_handler.get_version(section)
596 def _kernel_get_datakey_version(self, section):
598 return self._kernel_handler.get_datakey_version(section)
618 def _kernel_resign_with_keys(self, section, key_path=None):
620 self._kernel_handler.resign_kernel(section, key_path)
622 def _kernel_dump(self, section, kernel_path):
625 @param section: The kernel to dump. May be A or B.
628 self._kernel_handler.dump_kernel(section, kernel_path)
630 def _kernel_write(self, section, kernel_path):
631 """Write a kernel image to the specified section.
633 @param section: The kernel to dump. May be A or B.
636 self._kernel_handler.write_kernel(section, kernel_path)
638 def _kernel_get_sha(self, section):
639 """Return the SHA1 hash of the specified kernel section."""
640 return self._kernel_handler.get_sha(section)
754 def _rootfs_verify_rootfs(self, section):
757 @param section: The rootfs to verify. May be A or B.
759 return self._rootfs_handler.verify_rootfs(section)