summaryrefslogtreecommitdiff
path: root/sys/arch/i386/pci/gscpmreg.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/i386/pci/gscpmreg.h')
-rw-r--r--sys/arch/i386/pci/gscpmreg.h51
1 files changed, 51 insertions, 0 deletions
diff --git a/sys/arch/i386/pci/gscpmreg.h b/sys/arch/i386/pci/gscpmreg.h
new file mode 100644
index 00000000000..4ee9b1a1b7d
--- /dev/null
+++ b/sys/arch/i386/pci/gscpmreg.h
@@ -0,0 +1,51 @@
+/* $OpenBSD: gscpmreg.h,v 1.1 2004/09/15 20:28:53 grange Exp $ */
+/*
+ * Copyright (c) 2004 Alexander Yurchenko <grange@openbsd.org>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifndef _DEV_PCI_GSCPMREG_H_
+#define _DEV_PCI_GSCPMREG_H_
+
+/*
+ * National Semiconductor Geode SC1100 SMI/ACPI module register definitions.
+ */
+
+/* PCI configuration space */
+#define GSCPM_ACPIBASE 0x40 /* ACPI I/O space base address */
+#define GSCPM_ACPISIZE 256 /* ACPI I/O space size */
+
+/* ACPI I/O space */
+#define GSCPM_P_CNT 0x00 /* processor control */
+#define GSCPM_P_CNT_CLK(val) ((val) & 0x7)
+#define GSCPM_P_CNT_THTEN (1 << 4) /* throttle enable */
+#define GSCPM_PM_TMR 0x1c /* PM timer */
+
+/* CPU throttling values */
+static const struct {
+ int level;
+ int value;
+} gscpm_tht[] = {
+ { 88, 1 },
+ { 75, 2 },
+ { 63, 3 },
+ { 50, 4 },
+ { 38, 5 },
+ { 25, 6 },
+ { 13, 7 }
+};
+
+#define GSCPM_THT_LEVELS (sizeof(gscpm_tht) / sizeof(gscpm_tht[0]))
+
+#endif /* !_DEV_PCI_GSCPMREG_H_ */