]> git.proxmox.com Git - mirror_edk2.git/commit
OvmfPkg/AcpiPlatformDxe: drop double right shift in ADD/WRITE POINTER cmds
authorLaszlo Ersek <lersek@redhat.com>
Tue, 21 Feb 2017 12:30:48 +0000 (13:30 +0100)
committerLaszlo Ersek <lersek@redhat.com>
Wed, 22 Feb 2017 02:35:18 +0000 (03:35 +0100)
commita3be3b65977eec894cebddf7100429aa0e84b669
tree551059da647ec396b458e04f90e3124c3f33eb89
parentb9d56d0b93ae4827bb447ff4a32f1f7ab46ccd94
OvmfPkg/AcpiPlatformDxe: drop double right shift in ADD/WRITE POINTER cmds

The Count parameter of RShiftU64() must be strictly smaller than 64.
ProcessCmdAddPointer() and ProcessCmdWritePointer() currently ensure this
by "cleverly" breaking the last bit of a potentially 8-byte right shift
out to a separate operation.

Instead, exclude the Count==64 case explicitly (in which case the
preexistent outer RShiftU64() would return 0), and keep only the inner
RShiftU64(), with the direct Count however.

This is not a functional change, just style improvement.

Cc: Jordan Justen <jordan.l.justen@intel.com>
Suggested-by: Jordan Justen <jordan.l.justen@intel.com>
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/AcpiPlatformDxe/QemuFwCfgAcpi.c