/* * Read the old value of the VBR register to initialise the vector * through which debug and BIOS traps are delegated by the Linux trap * handler.
*/ void sh_bios_vbr_init(void)
{ unsignedlong vbr;
if (vbr) {
gdb_vbr_vector = (void *)(vbr + 0x100);
printk(KERN_NOTICE "Setting GDB trap vector to %p\n",
gdb_vbr_vector);
} else
printk(KERN_NOTICE "SH-BIOS not detected\n");
}
/** * sh_bios_vbr_reload - Re-load the system VBR from the BIOS vector. * * This can be used by save/restore code to reinitialize the system VBR * from the fixed BIOS VBR. A no-op if no BIOS VBR is known.
*/ void sh_bios_vbr_reload(void)
{ if (gdb_vbr_vector)
__asm__ __volatile__ ( "ldc %0, vbr"
:
: "r" (((unsignedlong) gdb_vbr_vector) - 0x100)
: "memory"
);
}
#ifdef CONFIG_EARLY_PRINTK /* * Print a string through the BIOS
*/ staticvoid sh_console_write(struct console *co, constchar *s, unsigned count)
{
sh_bios_console_write(s, count);
}
/* * Setup initial baud/bits/parity. We do two things here: * - construct a cflag setting for the first rs_open() * - initialize the serial port * Return non-zero if we didn't find a serial port.
*/ staticint __init sh_console_setup(struct console *co, char *options)
{ int cflag = CREAD | HUPCL | CLOCAL;
/* * Now construct a cflag setting. * TODO: this is a totally bogus cflag, as we have * no idea what serial settings the BIOS is using, or * even if its using the serial port at all.
*/
cflag |= B115200 | CS8 | /*no parity*/0;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.