1
0
mirror of https://github.com/antonblanchard/microwatt.git synced 2026-01-11 23:43:15 +00:00
Benjamin Herrenschmidt e3941109af console: Cleanup console API
Use a more generic console_init() instead of potato_uart_init(),
and do the same for interrupt control. There should be no
change in behaviour.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2020-06-24 09:53:46 +10:00

38 lines
409 B
C

#include <stdint.h>
#include <stdbool.h>
#include "console.h"
void rust_main();
void crash()
{
void (*fun_ptr)() = (void(*)()) 0xdeadbeef;
(*fun_ptr)();
}
void init_bss()
{
extern int _bss, _ebss;
int *p = &_bss;
while (p < &_ebss) {
*p++ = 0;
}
}
#define HELLO_WORLD "Hello World\n"
int main(void)
{
init_bss();
console_init();
puts(HELLO_WORLD);
rust_main();
crash();
while (1)
;
}