]> git.proxmox.com Git - mirror_edk2.git/commit
OvmfPkg/PciHotPlugInitDxe: add helper functions for setting up paddings
authorLaszlo Ersek <lersek@redhat.com>
Thu, 21 Sep 2017 22:31:12 +0000 (00:31 +0200)
committerLaszlo Ersek <lersek@redhat.com>
Tue, 3 Oct 2017 14:07:37 +0000 (16:07 +0200)
commit4776d5cb3abfa2e35fee03c3a3e219648fee3761
tree3a2dd790e602e95dfce9b06b43553dce613aba75
parenta980324709b195dfe3f83741a7319cc9dc7a2efd
OvmfPkg/PciHotPlugInitDxe: add helper functions for setting up paddings

Extract the SetIoPadding() and SetMmioPadding() functions, so that we can
set EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR fields using parameter names and
values that are more friendly than the original field names and their
expected values.

Introduce the HighBitSetRoundUp32() and HighBitSetRoundUp64() functions
for calculating the last parameter ("SizeExponent") of SetIoPadding() and
SetMmioPadding().

Put the new functions to use when requesting the default reservations. (In
order to be consistent with a later patch, "SizeExponent" is calculated
for SetIoPadding() with HighBitSetRoundUp64().)

Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Marcel Apfelbaum <marcel@redhat.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
OvmfPkg/PciHotPlugInitDxe/PciHotPlugInit.c
OvmfPkg/PciHotPlugInitDxe/PciHotPlugInit.inf