Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
17 lines (15 sloc) 747 Bytes
__attribute__((long_call)) extern int switch_to_serial_console() asm("$_T_02_4a_00_23_10_68_13_60_70_47");
__attribute__((long_call)) extern int serial_init();
// may not be necessary
__attribute__((long_call)) extern void conslog_putc(char);
__attribute__((long_call)) extern void printf(const char *msg, ...);
static void init() {
int *disableConsoleOutput = *((int **) (((char *) conslog_putc) - 1 + 0x3c));
printf("disableConsoleOutput address:%p old value: %d\n", disableConsoleOutput, *disableConsoleOutput);
*disableConsoleOutput = 0;
conslog_putc('h'); conslog_putc('i'); conslog_putc('\n');
printf("You should get this on serial.\n");