Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 5 additions & 16 deletions pal/include/pal_print.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,13 @@
*/
#if defined(TARGET_BAREMETAL)
void pal_uart_print(int log, const char *fmt, ...);

#if !defined(FAST_PRINT_ENABLE)
#define PAL_PRINT_FORMAT(verbose, string, ...) \
PAL_PRINT_IF((verbose), pal_uart_print((verbose), (string), ##__VA_ARGS__))

#else
#define PAL_PRINT_FORMAT(verbose, string, ...) \
PAL_PRINT_IF((verbose), pal_vfastprint((string), ##__VA_ARGS__))
#endif
#define PAL_PRINT_LITERAL(verbose, string, ...) \
PAL_PRINT_FORMAT((verbose), (string), ##__VA_ARGS__)
#elif defined(TARGET_UEFI)
Expand All @@ -65,23 +68,9 @@ void pal_uart_print(int log, const char *fmt, ...);
* pal_print_native() is only for rare cases where the caller already has a
* target-native format string, such as a UEFI CHAR16/L"..." format.
*/
#ifndef FAST_PRINT_ENABLE
#define pal_print_native(verbose, string, ...) \
PAL_PRINT_FORMAT((verbose), (string), ##__VA_ARGS__)

#define pal_print_msg(verbose, string, ...) \
PAL_PRINT_LITERAL((verbose), string, ##__VA_ARGS__)
#else
#define pal_print_native(verbose, string, ...) \
do { \
if ((verbose) >= acs_policy_get_print_level()) \
pal_vfastprint(string, ##__VA_ARGS__); \
} while (0)

#define pal_print_msg(verbose, string, ...) \
do { \
if ((verbose) >= acs_policy_get_print_level()) \
pal_vfastprint(string, ##__VA_ARGS__); \
} while (0)
#endif
#endif
Loading