Subversion Repositories HelenOS-historic

Compare Revisions

Ignore whitespace Rev 663 → Rev 664

/kernel/trunk/arch/sparc64/src/console.c
30,6 → 30,8
#include <genarch/ofw/ofw.h>
#include <console/chardev.h>
#include <console/console.h>
#include <arch/asm.h>
#include <arch/register.h>
 
static void ofw_sparc64_putchar(chardev_t *d, const char ch);
 
50,7 → 52,19
*/
void ofw_sparc64_putchar(chardev_t *d, const char ch)
{
pstate_reg_t pstate;
 
/*
* 32-bit OpenFirmware depends on PSTATE.AM bit set.
*/
pstate.value = pstate_read();
pstate.am = true;
pstate_write(pstate.value);
 
if (ch == '\n')
ofw_putchar('\r');
ofw_putchar(ch);
pstate.am = false;
pstate_write(pstate.value);
}