mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-23 15:41:33 +00:00
x86: Implement panic output for coreboot
panic_puts() can be called in early boot to display a message. It might help with early debugging. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Wai-Hong Tam <waihong@chromium.org>
This commit is contained in:
parent
7282d834cd
commit
c78a62acdf
2 changed files with 11 additions and 0 deletions
|
@ -26,6 +26,7 @@
|
||||||
#include <asm/u-boot-x86.h>
|
#include <asm/u-boot-x86.h>
|
||||||
#include <flash.h>
|
#include <flash.h>
|
||||||
#include <netdev.h>
|
#include <netdev.h>
|
||||||
|
#include <ns16550.h>
|
||||||
#include <asm/msr.h>
|
#include <asm/msr.h>
|
||||||
#include <asm/cache.h>
|
#include <asm/cache.h>
|
||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
|
@ -135,3 +136,12 @@ int board_final_cleanup(void)
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void panic_puts(const char *str)
|
||||||
|
{
|
||||||
|
NS16550_t port = (NS16550_t)0x3f8;
|
||||||
|
|
||||||
|
NS16550_init(port, 1);
|
||||||
|
while (*str)
|
||||||
|
NS16550_putc(port, *str++);
|
||||||
|
}
|
||||||
|
|
|
@ -33,6 +33,7 @@ void init_gd(gd_t *id, u64 *gdt_addr);
|
||||||
void setup_gdt(gd_t *id, u64 *gdt_addr);
|
void setup_gdt(gd_t *id, u64 *gdt_addr);
|
||||||
int init_cache(void);
|
int init_cache(void);
|
||||||
int cleanup_before_linux(void);
|
int cleanup_before_linux(void);
|
||||||
|
void panic_puts(const char *str);
|
||||||
|
|
||||||
/* cpu/.../timer.c */
|
/* cpu/.../timer.c */
|
||||||
void timer_isr(void *);
|
void timer_isr(void *);
|
||||||
|
|
Loading…
Add table
Reference in a new issue