diff --git a/include/logger.h b/include/logger.h index 3cec69d..f472760 100644 --- a/include/logger.h +++ b/include/logger.h @@ -101,11 +101,11 @@ logger_cur = _Generic((msg), \ // #define DEBUG_DTB(val) DEBUG(val) #define DEBUG_DTB(val) CLEAN -#define DEBUG_EXCEP(val) DEBUG(val) -// #define DEBUG_EXCEP(val) CLEAN +// #define DEBUG_EXCEP(val) DEBUG(val) +#define DEBUG_EXCEP(val) CLEAN -// #define DEBUG_MEM(val) DEBUG(val) -#define DEBUG_MEM(val) CLEAN +#define DEBUG_MEM(val) DEBUG(val) +// #define DEBUG_MEM(val) CLEAN // #define DEBUG_INITRD(val) DEBUG(val) #define DEBUG_INITRD(val) CLEAN diff --git a/kernel/lib/uart.c b/kernel/lib/uart.c index aa5a6b9..369275d 100644 --- a/kernel/lib/uart.c +++ b/kernel/lib/uart.c @@ -209,11 +209,10 @@ void uart_puts(const char *s) void uart_hex(uint64_t d) { char buf[0x11], *p = buf; - uint64_t n; - for (int c = 28; c >= 0; c -= 4) { + for (int c = 28, n; c >= 0; c -= 4) { n = (d >> c) & 0xf; - n += n > 9 ? (char)'A' : (char)'0'; - *p++ = n; + n += (n > 9) ? 0x37 : 0x30; + *p++ = (char)n; } *p = '\0'; uart_puts(buf);