summaryrefslogtreecommitdiff
path: root/sys/arch/hppa/include/pdc.h
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2002-02-08 20:43:17 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2002-02-08 20:43:17 +0000
commit28095814e7a406c63a14bced7b2e507d0410a923 (patch)
tree2714adc5d01cb4290f85f44bb5e29aef9f93ff74 /sys/arch/hppa/include/pdc.h
parentcf9b9a9febd547d6696d6962ab054211afe1e49a (diff)
Teach some magic to the kernel so that it can decode serial console settings.
mickey@ said "commitski".
Diffstat (limited to 'sys/arch/hppa/include/pdc.h')
-rw-r--r--sys/arch/hppa/include/pdc.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/arch/hppa/include/pdc.h b/sys/arch/hppa/include/pdc.h
index 88481b0e452..deb604c4637 100644
--- a/sys/arch/hppa/include/pdc.h
+++ b/sys/arch/hppa/include/pdc.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pdc.h,v 1.16 2002/01/25 21:26:41 mickey Exp $ */
+/* $OpenBSD: pdc.h,v 1.17 2002/02/08 20:43:16 miod Exp $ */
/*
* Copyright (c) 1990 mt Xinu, Inc. All rights reserved.
@@ -523,6 +523,14 @@ struct device_path {
#define PZF_TIMER 0x0f /* power of 2 # secs "boot timer" (0 == dflt) */
#define PZF_BITS "\020\010autoboot\07autosearch"
+/* macros to decode serial parameters out of dp_layers */
+#define PZL_BITS(l) (((l) & 0x03) + 5)
+#define PZL_PARITY(l) (((l) & 0x18) >> 3)
+#define PZL_SPEED(l) (((l) & 0x3c0) >> 6)
+#define PZL_ENCODE(bits, parity, speed) \
+ (((bits) - 5) & 0x03) | (((parity) & 0x3) << 3) | \
+ (((speed) & 0x10) << 6)
+
/*
* A processors Stable Storage is accessed through the PDC. There are
* at least 96 bytes of stable storage (the device path information may