mirror of
https://github.com/clearlinux/graphene.git
synced 2026-09-07 06:14:02 +00:00
[Pal] introduce pal_vprintf() for debug
This will be used later. Signed-off-by: Isaku Yamahata <isaku.yamahata@gmail.com>
This commit is contained in:
@@ -40,7 +40,7 @@ PAL {
|
||||
DkMemoryAvailableQuota;
|
||||
|
||||
# Debugging ABIs
|
||||
pal_printf; DkDebugAttachBinary; DkDebugDetachBinary;
|
||||
pal_printf; pal_vprintf; DkDebugAttachBinary; DkDebugDetachBinary;
|
||||
|
||||
# Control block
|
||||
pal_control_addr; pal_sec;
|
||||
|
||||
@@ -44,7 +44,7 @@ PAL {
|
||||
DkCpuIdRetrieve; # retrieve CPUID
|
||||
|
||||
# Debugging ABIs
|
||||
pal_printf; pal_snprintf; DkDebugAttachBinary; DkDebugDetachBinary;
|
||||
pal_printf; pal_vprintf; pal_snprintf; DkDebugAttachBinary; DkDebugDetachBinary;
|
||||
|
||||
# Control block
|
||||
pal_control; pal_control_addr;
|
||||
|
||||
@@ -45,8 +45,8 @@ fputch(void * f, int ch, struct printbuf * b)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
vprintf(const char * fmt, va_list ap)
|
||||
int
|
||||
pal_vprintf(const char * fmt, va_list ap)
|
||||
{
|
||||
struct printbuf b;
|
||||
|
||||
@@ -65,7 +65,7 @@ pal_printf(const char * fmt, ...)
|
||||
int cnt;
|
||||
|
||||
va_start(ap, fmt);
|
||||
cnt = vprintf(fmt, ap);
|
||||
cnt = pal_vprintf(fmt, ap);
|
||||
va_end(ap);
|
||||
|
||||
return cnt;
|
||||
|
||||
@@ -41,7 +41,7 @@ PAL {
|
||||
DkMemoryAvailableQuota;
|
||||
|
||||
# Debugging ABIs
|
||||
pal_printf; DkDebugAttachBinary; DkDebugDetachBinary;
|
||||
pal_printf; pal_vprintf; DkDebugAttachBinary; DkDebugDetachBinary;
|
||||
|
||||
# Control block
|
||||
pal_control_addr; pal_sec;
|
||||
|
||||
@@ -40,7 +40,7 @@ PAL {
|
||||
DkMemoryAvailableQuota;
|
||||
|
||||
# Debugging ABIs
|
||||
pal_printf; DkDebugAttachBinary; DkDebugDetachBinary;
|
||||
pal_printf; pal_vprintf; DkDebugAttachBinary; DkDebugDetachBinary;
|
||||
|
||||
# Control block
|
||||
pal_control_addr; pal_sec;
|
||||
|
||||
@@ -25,8 +25,10 @@
|
||||
|
||||
#include "pal.h"
|
||||
#include <assert.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
int pal_printf (const char *fmt, ...) __attribute__((format(printf, 1, 2)));
|
||||
int pal_vprintf (const char *fmt, va_list ap) __attribute__((format(printf, 1, 0)));
|
||||
|
||||
void DkDebugAttachBinary (PAL_STR uri, PAL_PTR start_addr);
|
||||
void DkDebugDetachBinary (PAL_PTR start_addr);
|
||||
|
||||
@@ -59,6 +59,7 @@ vprintf(const char * fmt, va_list ap)
|
||||
|
||||
return b.cnt;
|
||||
}
|
||||
EXTERN_ALIAS(vprintf);
|
||||
|
||||
int
|
||||
printf(const char * fmt, ...)
|
||||
|
||||
Reference in New Issue
Block a user