Reporting Issues
Bug 3410 - overly noisy deprecation warning in varlock / varpol compat code
Summary: overly noisy deprecation warning in varlock / varpol compat code
Status: RESOLVED FIXED
Alias: None
Product: EDK2
Classification: Unclassified
Component: Code (show other bugs)
Version: Current
Hardware: All All
: Lowest normal
Assignee: Laszlo Ersek
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2021-05-21 16:06 UTC by Laszlo Ersek
Modified: 2021-05-23 08:30 UTC (History)
3 users (show)

See Also:
EDK II Code First industry standard specifications: ---
Branch URL:
Release(s) the issue is observed: EDK II Master
The OS the target platform is running: ---
Package: MdeModulePkg
Release(s) the issues must be fixed: EDK II Master
Tianocore documents:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Laszlo Ersek 2021-05-21 16:06:18 UTC
Commit a18a9bde36d2 ("MdeModulePkg/Variable/RuntimeDxe: Restore Variable Lock Protocol behavior", 2020-12-15), for bug 3111, added two such sets of debug messages that:

(a) are relevant for developers,

(b) yet should not necessarily poke end-users, because no functionality suffers in practice.

Both message sets are in function VariableLockRequestToLock(): the first is a generic interface deprecation warning; the second is the double-locking situation, which we permit for compatibility (return status EFI_SUCCESS).

Both message sets should be emitted with the DEBUG_WARN mask, not the most serious DEBUG_ERROR mask. On some platforms, the serial console carries both terminal traffic, and grave (DEBUG_ERROR-only) log messages. On such platforms, both message sets may be perceived as a nuisance by end-users, as there is nothing they can do, and there's nothing they *should* do -- in practice, nothing malfunctions.
Comment 1 Laszlo Ersek 2021-05-21 16:16:15 UTC
Example log (with GUIDs substituted):

!!! DEPRECATED INTERFACE !!! VariableLockRequestToLock() will go away soon!
!!! DEPRECATED INTERFACE !!! Please move to use Variable Policy!
!!! DEPRECATED INTERFACE !!! Variable: [EfiGlobalVariable] PlatformLangCodes
!!! DEPRECATED INTERFACE !!! VariableLockRequestToLock() will go away soon!
!!! DEPRECATED INTERFACE !!! Please move to use Variable Policy!
!!! DEPRECATED INTERFACE !!! Variable: [EfiGlobalVariable] LangCodes
!!! DEPRECATED INTERFACE !!! VariableLockRequestToLock() will go away soon!
!!! DEPRECATED INTERFACE !!! Please move to use Variable Policy!
!!! DEPRECATED INTERFACE !!! Variable: [EfiGlobalVariable] BootOptionSupport
!!! DEPRECATED INTERFACE !!! VariableLockRequestToLock() will go away soon!
!!! DEPRECATED INTERFACE !!! Please move to use Variable Policy!
!!! DEPRECATED INTERFACE !!! Variable: [EfiGlobalVariable] HwErrRecSupport
!!! DEPRECATED INTERFACE !!! VariableLockRequestToLock() will go away soon!
!!! DEPRECATED INTERFACE !!! Please move to use Variable Policy!
!!! DEPRECATED INTERFACE !!! Variable: [EfiGlobalVariable] OsIndicationsSupported
!!! DEPRECATED INTERFACE !!! VariableLockRequestToLock() will go away soon!
!!! DEPRECATED INTERFACE !!! Please move to use Variable Policy!
!!! DEPRECATED INTERFACE !!! Variable: [EfiGlobalVariable] PlatformRecovery0000
Comment 2 Laszlo Ersek 2021-05-21 16:42:06 UTC
Posted

* [edk2-stable202105 PATCH]
  MdeModulePkg/VariableLock: downgrade compatibility warnings to DEBUG_WARN

Message-Id: <20210521204037.11980-1-lersek@redhat.com>
https://listman.redhat.com/archives/edk2-devel-archive/2021-May/msg00764.html
https://edk2.groups.io/g/devel/message/75449

Personal build (CI run):
https://github.com/tianocore/edk2/pull/1660/
Comment 3 Laszlo Ersek 2021-05-21 16:42:17 UTC
IN_PROGRESS per comment 2.
Comment 4 Laszlo Ersek 2021-05-23 08:30:33 UTC
Merged as commit cfa6ffb113f2, via <https://github.com/tianocore/edk2/pull/1661>.