summaryrefslogtreecommitdiff
path: root/sys/arch/amd64
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2004-08-03 00:56:23 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2004-08-03 00:56:23 +0000
commit9778c1e07bced2c22835809902cb0a0625763ad5 (patch)
tree3207ee40de52a1a04f83f97898049fbf69774139 /sys/arch/amd64
parentf9a1c1c97d9ccecbddcbd866faf3d84cc68adb68 (diff)
Hehehe. Remove an #if 0 function that was used in the early days to debug
why vga scrolling wasn't working by sending beeps on the speaker.
Diffstat (limited to 'sys/arch/amd64')
-rw-r--r--sys/arch/amd64/amd64/machdep.c32
1 files changed, 1 insertions, 31 deletions
diff --git a/sys/arch/amd64/amd64/machdep.c b/sys/arch/amd64/amd64/machdep.c
index d77279fc2e0..7ce605412d7 100644
--- a/sys/arch/amd64/amd64/machdep.c
+++ b/sys/arch/amd64/amd64/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.29 2004/07/19 15:09:05 art Exp $ */
+/* $OpenBSD: machdep.c,v 1.30 2004/08/03 00:56:22 art Exp $ */
/* $NetBSD: machdep.c,v 1.3 2003/05/07 22:58:18 fvdl Exp $ */
/*-
@@ -1295,36 +1295,6 @@ extern vector *IDTVEC(exceptions)[];
#define KBTOB(x) ((size_t)(x) * 1024UL)
-#if 0
-void
-beepme(int pitch, int duration)
-{
-#define IO_TIMER1 0x040
-#define IO_PPI 0x061
-#define TIMER_SEL2 0x80
-#define TIMER_16BIT 0x30
-#define TIMER_SQWAVE 0x06
-#define TIMER_CNTR2 (IO_TIMER1 + 2)
-#define TIMER_MODE (IO_TIMER1 + 3)
-#define TIMER_FREQ 1193182
-#define TIMER_DIV(x) ((TIMER_FREQ+(x)/2)/(x))
-
-#define PIT_ENABLETMR2 0x01
-#define PIT_SPKRDATA 0x02
-#define PIT_SPKR (PIT_ENABLETMR2|PIT_SPKRDATA)
-
-#define PITCH 440
-
- outb(IO_TIMER1 + TIMER_MODE, TIMER_SEL2 | TIMER_16BIT | TIMER_SQWAVE);
- outb(IO_TIMER1 + TIMER_CNTR2, TIMER_DIV(pitch) % 256);
- outb(IO_TIMER1 + TIMER_CNTR2, TIMER_DIV(pitch) / 256);
- outb(IO_PPI, inb(IO_PPI) | PIT_SPKR);
- delay(duration / 2);
- outb(IO_PPI, inb(IO_PPI) & ~PIT_SPKR);
- delay(duration / 2);
-}
-#endif
-
void
init_x86_64(first_avail)
paddr_t first_avail;