summaryrefslogtreecommitdiffstats
path: root/sys/isa/syscons_isa.c
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2004-09-24 01:08:34 +0000
committerpeter <peter@FreeBSD.org>2004-09-24 01:08:34 +0000
commit04c2ef219308602e8e16a468dd7b891268ef2e3b (patch)
tree0d32e80a39f47cf18ed420b2e7f40883dd23012c /sys/isa/syscons_isa.c
parent09b56c9832dac675750896f41018db6609e38529 (diff)
downloadFreeBSD-src-04c2ef219308602e8e16a468dd7b891268ef2e3b.zip
FreeBSD-src-04c2ef219308602e8e16a468dd7b891268ef2e3b.tar.gz
Converge towards i386. I originally resisted creating <machine/pc/bios.h>
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.
Diffstat (limited to 'sys/isa/syscons_isa.c')
-rw-r--r--sys/isa/syscons_isa.c15
1 files changed, 7 insertions, 8 deletions
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 <sys/consio.h>
#include <sys/sysctl.h>
-#ifdef __i386__
+#if defined(__i386__) || defined(__amd64__)
#include <machine/clock.h>
#include <machine/md_var.h>
@@ -56,7 +56,7 @@ __FBSDID("$FreeBSD$");
#define BIOS_SLKED (1 << 4)
#define BIOS_ALKED 0
-#endif /* __i386__ */
+#endif
#include <dev/syscons/syscons.h>
@@ -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;
}
OpenPOWER on IntegriCloud