]> git.proxmox.com Git - mirror_edk2.git/commit - MdeModulePkg/Universal/Variable/RuntimeDxe/TcgMorLockSmm.c
MdeModulePkg/Variable/RuntimeDxe: move MOR func. declarations to header
authorLaszlo Ersek <lersek@redhat.com>
Sat, 30 Sep 2017 14:04:31 +0000 (16:04 +0200)
committerLaszlo Ersek <lersek@redhat.com>
Tue, 10 Oct 2017 09:25:19 +0000 (11:25 +0200)
commit03877377e32646bedfac0e8ff8ca4689d64f06d0
treeeb88779cf98f5dab20cc529625ec5e2dc2da0a78
parent00663d047fc948172fd6f020f6c187240d4316be
MdeModulePkg/Variable/RuntimeDxe: move MOR func. declarations to header

The MorLockInit() and SetVariableCheckHandlerMor() functions have separate
implementations for VariableRuntimeDxe (= unprivileged, unified
DXE_RUNTIME driver) and VariableSmm (= privileged, DXE_SMM back-end of the
split variable driver).

Move their declarations from "Variable.c" to "PrivilegePolymorphic.h", so
that the compiler enforce that the declarations and the definitions match.
(All C source files with the call sites and the function definitions
already include "PrivilegePolymorphic.h" via "Variable.h".)

At the same time:

- replace two typos in the MorLockInit() description:
  - replace "EFI_SUCEESS" with "EFI_SUCCESS",
  - replace "MOR Lock Control" with "MOR Control Lock";

- in the SetVariableCheckHandlerMor() description:
  - replace @param with @param[in],
  - correct the description of the Attributes parameter (suggested by Star
    Zeng <star.zeng@intel.com>),
  - rewrap the comment to 80 columns.

This change cleans up commit 2f6aa774fe38 ("MdeModulePkg: Add MorLock to
variable driver.", 2016-01-19).

Cc: Eric Dong <eric.dong@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Ladi Prosek <lprosek@redhat.com>
Cc: Star Zeng <star.zeng@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Tested-by: Ladi Prosek <lprosek@redhat.com>
MdeModulePkg/Universal/Variable/RuntimeDxe/PrivilegePolymorphic.h
MdeModulePkg/Universal/Variable/RuntimeDxe/TcgMorLockDxe.c
MdeModulePkg/Universal/Variable/RuntimeDxe/TcgMorLockSmm.c
MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c