Skip to content

Commit

Permalink
Suppress NVME logs for user build
Browse files Browse the repository at this point in the history
This can improve boot performance

Tracked-On: OAM-111735
Signed-off-by: Chen, Gang G <gang.g.chen@intel.com>
  • Loading branch information
GangSecurity committed Aug 15, 2023
1 parent d00abea commit 95110d6
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
15 changes: 15 additions & 0 deletions drivers/nvme/NvmExpress.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,23 @@
#define EFI_D_INFO "NVME Info: "
#define EFI_D_ERROR "NVME Error: "

#ifdef DISABLE_DEBUG_PRINT
#define DEBUG_MESSAGES 0
#else
#ifdef USER
#define DEBUG_MESSAGES 0
#else
#define DEBUG_MESSAGES 1
#endif
#endif

#if DEBUG_MESSAGES
#define nvme_dbg(a, ...) printf(a __VA_ARGS__)
#define DEBUG_NVME(a) (nvme_dbg a)
#else
#define nvme_dbg(a, ...)
#define DEBUG_NVME(a)
#endif

#define DEBUG_CODE_BEGIN() if (0) {
#define DEBUG_CODE_END() }
Expand Down
2 changes: 2 additions & 0 deletions libefiwrapper/ewdrv.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ EFI_STATUS ewdrv_init(EFI_SYSTEM_TABLE *st)
EFI_STATUS ret = EFI_SUCCESS;
size_t i, j;

printf("ewdrv_init start\n");

if (!ew_drivers)
return EFI_UNSUPPORTED;

Expand Down

0 comments on commit 95110d6

Please sign in to comment.