EARLY_PRINTK := y
endif
-CFLAGS-$(EARLY_PRINTK) += -DEARLY_PRINTK
+CFLAGS-$(EARLY_PRINTK) += -DCONFIG_EARLY_PRINTK
CFLAGS-$(EARLY_PRINTK_INIT_UART) += -DEARLY_PRINTK_INIT_UART
CFLAGS-$(EARLY_PRINTK) += -DEARLY_PRINTK_INC=\"debug-$(EARLY_PRINTK_INC).inc\"
CFLAGS-$(EARLY_PRINTK) += -DEARLY_PRINTK_BAUD=$(EARLY_PRINTK_BAUD)
#define PT_UPPER(x) (PT_##x & 0xf00)
#define PT_LOWER(x) (PT_##x & 0x0ff)
-#if (defined (EARLY_PRINTK)) && (defined (EARLY_PRINTK_INC))
+#if (defined (CONFIG_EARLY_PRINTK)) && (defined (EARLY_PRINTK_INC))
#include EARLY_PRINTK_INC
#endif
*/
/* Macro to print a string to the UART, if there is one.
* Clobbers r0-r3. */
-#ifdef EARLY_PRINTK
+#ifdef CONFIG_EARLY_PRINTK
#define PRINT(_s) \
adr r0, 98f ; \
bl puts ; \
98: .asciz _s ; \
.align 2 ; \
99:
-#else /* EARLY_PRINTK */
+#else /* CONFIG_EARLY_PRINTK */
#define PRINT(s)
-#endif /* !EARLY_PRINTK */
+#endif /* !CONFIG_EARLY_PRINTK */
.arm
b 2b
1:
-#ifdef EARLY_PRINTK
+#ifdef CONFIG_EARLY_PRINTK
ldr r11, =EARLY_UART_BASE_ADDRESS /* r11 := UART base address */
teq r12, #0 /* Boot CPU sets up the UART too */
bleq init_uart
/* Now we can install the fixmap and dtb mappings, since we
* don't need the 1:1 map any more */
dsb
-#if defined(EARLY_PRINTK) /* Fixmap is only used by early printk */
+#if defined(CONFIG_EARLY_PRINTK) /* Fixmap is only used by early printk */
/* Non-boot CPUs don't need to rebuild the fixmap itself, just
* the mapping from boot_second to xen_fixmap */
teq r12, #0
mov pc, lr
-#ifdef EARLY_PRINTK
+#ifdef CONFIG_EARLY_PRINTK
/* Bring up the UART.
* r11: Early UART base address
* Clobbers r0-r2 */
hex: .ascii "0123456789abcdef"
.align 2
-#else /* EARLY_PRINTK */
+#else /* CONFIG_EARLY_PRINTK */
init_uart:
.global early_puts
puts:
putn: mov pc, lr
-#endif /* !EARLY_PRINTK */
+#endif /* !CONFIG_EARLY_PRINTK */
/* This provides a C-API version of __lookup_processor_type */
GLOBAL(lookup_processor_type)
#define PT_DEV 0xe71 /* nG=1 AF=1 SH=10 AP=01 NS=1 ATTR=100 T=0 P=1 */
#define PT_DEV_L3 0xe73 /* nG=1 AF=1 SH=10 AP=01 NS=1 ATTR=100 T=1 P=1 */
-#if (defined (EARLY_PRINTK)) && (defined (EARLY_PRINTK_INC))
+#if (defined (CONFIG_EARLY_PRINTK)) && (defined (EARLY_PRINTK_INC))
#include EARLY_PRINTK_INC
#endif
/* Macro to print a string to the UART, if there is one.
* Clobbers x0-x3. */
-#ifdef EARLY_PRINTK
+#ifdef CONFIG_EARLY_PRINTK
#define PRINT(_s) \
adr x0, 98f ; \
bl puts ; \
98: .asciz _s ; \
.align 2 ; \
99:
-#else /* EARLY_PRINTK */
+#else /* CONFIG_EARLY_PRINTK */
#define PRINT(s)
-#endif /* !EARLY_PRINTK */
+#endif /* !CONFIG_EARLY_PRINTK */
/*.aarch64*/
b 2b
1:
-#ifdef EARLY_PRINTK
+#ifdef CONFIG_EARLY_PRINTK
ldr x23, =EARLY_UART_BASE_ADDRESS /* x23 := UART base address */
cbnz x22, 1f
bl init_uart /* Boot CPU sets up the UART too */
/* Now we can install the fixmap and dtb mappings, since we
* don't need the 1:1 map any more */
dsb sy
-#if defined(EARLY_PRINTK) /* Fixmap is only used by early printk */
+#if defined(CONFIG_EARLY_PRINTK) /* Fixmap is only used by early printk */
/* Non-boot CPUs don't need to rebuild the fixmap itself, just
* the mapping from boot_second to xen_fixmap */
cbnz x22, 1f
ret
-#ifdef EARLY_PRINTK
+#ifdef CONFIG_EARLY_PRINTK
/* Bring up the UART.
* x23: Early UART base address
* Clobbers x0-x1 */
hex: .ascii "0123456789abcdef"
.align 2
-#else /* EARLY_PRINTK */
+#else /* CONFIG_EARLY_PRINTK */
init_uart:
.global early_puts
puts:
putn: ret
-#endif /* EARLY_PRINTK */
+#endif /* !CONFIG_EARLY_PRINTK */
/* This provides a C-API version of __lookup_processor_type
* TODO: For now, the implementation return NULL every time
#include <xen/config.h>
-#ifdef EARLY_PRINTK
+#ifdef CONFIG_EARLY_PRINTK
/* need to add the uart address offset in page to the fixmap address */
#define EARLY_UART_VIRTUAL_ADDRESS \
#ifndef __ASSEMBLY__
-#ifdef EARLY_PRINTK
+#ifdef CONFIG_EARLY_PRINTK
void early_puts(const char *s);
void early_printk(const char *fmt, ...)
__attribute__((format (printf, 1, 2))) early_panic(const char *fmt, ...)
{while(1);}
-#endif
+#endif /* !CONFIG_EARLY_PRINTK */
#endif /* __ASSEMBLY__ */