uefi.json 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. # -*- Mode: Python -*-
  2. # vim: filetype=python
  3. #
  4. ##
  5. # = UEFI Variable Store
  6. #
  7. # The qemu efi variable store implementation (hw/uefi/) uses this to
  8. # store non-volatile variables in json format on disk.
  9. #
  10. # This is an existing format already supported by (at least) two other
  11. # projects, specifically https://gitlab.com/kraxel/virt-firmware and
  12. # https://github.com/awslabs/python-uefivars.
  13. ##
  14. ##
  15. # @UefiVariable:
  16. #
  17. # UEFI Variable. Check the UEFI specifification for more detailed
  18. # information on the fields.
  19. #
  20. # @guid: variable namespace GUID
  21. #
  22. # @name: variable name, in UTF-8 encoding.
  23. #
  24. # @attr: variable attributes.
  25. #
  26. # @data: variable value, encoded as hex string.
  27. #
  28. # @time: variable modification time. EFI_TIME struct, encoded as hex
  29. # string. Used only for authenticated variables, where the
  30. # EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS attribute bit
  31. # is set.
  32. #
  33. # @digest: variable certificate digest. Used to verify the signature
  34. # of updates for authenticated variables. UEFI has two kinds of
  35. # authenticated variables. The secure boot variables ('PK',
  36. # 'KEK', 'db' and 'dbx') have hard coded signature checking rules.
  37. # For other authenticated variables the firmware stores a digest
  38. # of the signing certificate at variable creation time, and any
  39. # updates must be signed with the same certificate.
  40. #
  41. # Since: 10.0
  42. ##
  43. { 'struct' : 'UefiVariable',
  44. 'data' : { 'guid' : 'str',
  45. 'name' : 'str',
  46. 'attr' : 'int',
  47. 'data' : 'str',
  48. '*time' : 'str',
  49. '*digest' : 'str'}}
  50. ##
  51. # @UefiVarStore:
  52. #
  53. # @version: currently always 2
  54. #
  55. # @variables: list of UEFI variables
  56. #
  57. # Since: 10.0
  58. ##
  59. { 'struct' : 'UefiVarStore',
  60. 'data' : { 'version' : 'int',
  61. 'variables' : [ 'UefiVariable' ] }}