From 04c2ef219308602e8e16a468dd7b891268ef2e3b Mon Sep 17 00:00:00 2001 From: peter Date: Fri, 24 Sep 2004 01:08:34 +0000 Subject: Converge towards i386. I originally resisted creating because it was mostly irrelevant - except for the silly BIOS_PADDRTOVADDR etc macros. Along the way of working around this, I missed a few things. * Make syscons properly inherit the bios capslock/shiftlock/etc state like i386 does. Note that we cannot inherit the bios key repeat rate because that requires a bios call (which is impossible for us). * Give syscons the ability to beep on amd64. Oops. While here, make bios.c compile and add it to files.amd64. --- sys/isa/syscons_isa.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'sys/isa') diff --git a/sys/isa/syscons_isa.c b/sys/isa/syscons_isa.c index a0f00c3..d271d09 100644 --- a/sys/isa/syscons_isa.c +++ b/sys/isa/syscons_isa.c @@ -39,7 +39,7 @@ __FBSDID("$FreeBSD$"); #include #include -#ifdef __i386__ +#if defined(__i386__) || defined(__amd64__) #include #include @@ -56,7 +56,7 @@ __FBSDID("$FreeBSD$"); #define BIOS_SLKED (1 << 4) #define BIOS_ALKED 0 -#endif /* __i386__ */ +#endif #include @@ -234,7 +234,7 @@ sc_get_cons_priority(int *unit, int *flags) void sc_get_bios_values(bios_values_t *values) { -#ifdef __i386__ +#if defined(__i386__) || defined(__amd64__) u_int8_t shift; values->cursor_start = *(u_int8_t *)BIOS_PADDRTOVADDR(0x461); @@ -244,19 +244,18 @@ sc_get_bios_values(bios_values_t *values) | ((shift & BIOS_NLKED) ? NLKED : 0) | ((shift & BIOS_SLKED) ? SLKED : 0) | ((shift & BIOS_ALKED) ? ALKED : 0); - values->bell_pitch = BELL_PITCH; -#else /* !__i386__ */ +#else values->cursor_start = 0; values->cursor_end = 32; values->shift_state = 0; +#endif values->bell_pitch = BELL_PITCH; -#endif /* __i386__ */ } int sc_tone(int herz) { -#ifdef __i386__ +#if defined(__i386__) || defined(__amd64__) int pitch; if (herz) { @@ -274,7 +273,7 @@ sc_tone(int herz) outb(IO_PPI, inb(IO_PPI) & 0xFC); release_timer2(); } -#endif /* __i386__ */ +#endif return 0; } -- cgit v1.1