]> git.proxmox.com Git - mirror_edk2.git/commit
OvmfPkg/QemuFwCfgS3Lib: add boot script opcode generation APIs to libclass
authorLaszlo Ersek <lersek@redhat.com>
Wed, 22 Feb 2017 05:58:55 +0000 (06:58 +0100)
committerLaszlo Ersek <lersek@redhat.com>
Tue, 14 Mar 2017 20:49:18 +0000 (21:49 +0100)
commit06a265b948da7271e6d0cd527a8b54a5213e7bea
tree6a3cf81526b9ec8512f0dc1af05062a5b9922684
parent687f7521ea03b6c05ec03a8d37f4d7370cfd1016
OvmfPkg/QemuFwCfgS3Lib: add boot script opcode generation APIs to libclass

Introduce the following APIs:

- QemuFwCfgS3CallWhenBootScriptReady(): central function that registers a
  callback function, with a context parameter, for when ACPI S3 Boot
  Script opcodes can be produced. This function also allocates reserved
  memory for the opcodes to operate upon.

  The client module is supposed to produce the boot script fragment in the
  callback function.

- QemuFwCfgS3ScriptWriteBytes(), QemuFwCfgS3ScriptReadBytes(),
  QemuFwCfgS3ScriptSkipBytes(), QemuFwCfgS3ScriptCheckValue(): helper
  functions, available only to the above callback function, for composing
  the boot script fragment. QemuFwCfgS3ScriptSkipBytes() can double as a
  plain "select" whenever necessary.

Cc: Jordan Justen <jordan.l.justen@intel.com>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=394
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
OvmfPkg/Include/Library/QemuFwCfgS3Lib.h