Correct smm variable boot state access control

Variables set with the attribute EFI_VARIABLE_RUNTIME_ACCESS
should also have EFI_VARIABLE_BOOTSERVICE_ACCESS set. Checks
added to enforce this. Also corrects return status when
attempting to remove a non-existent variable. Tests extended
to reproduce the issues and validate the changes.

Signed-off-by: Julian Hall <julian.hall@arm.com>
Change-Id: I2c342ff18e64d45c46181906429bf0d7ae12210b
4 files changed