PERFORCE change 96037 for review
Marcel Moolenaar
marcel at FreeBSD.org
Mon Apr 24 23:48:05 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=96037
Change 96037 by marcel at marcel_nfs on 2006/04/24 23:47:11
IFC @96033
Affected files ...
.. //depot/projects/uart/amd64/amd64/identcpu.c#9 integrate
.. //depot/projects/uart/conf/files#62 integrate
.. //depot/projects/uart/conf/files.alpha#16 integrate
.. //depot/projects/uart/conf/files.amd64#20 integrate
.. //depot/projects/uart/conf/files.i386#25 integrate
.. //depot/projects/uart/conf/files.ia64#17 integrate
.. //depot/projects/uart/conf/files.pc98#22 integrate
.. //depot/projects/uart/conf/files.powerpc#9 integrate
.. //depot/projects/uart/conf/options#31 integrate
.. //depot/projects/uart/conf/options.alpha#6 integrate
.. //depot/projects/uart/conf/options.amd64#8 integrate
.. //depot/projects/uart/conf/options.i386#13 integrate
.. //depot/projects/uart/conf/options.ia64#7 integrate
.. //depot/projects/uart/conf/options.pc98#12 integrate
.. //depot/projects/uart/dev/ppc/ppc.c#10 integrate
.. //depot/projects/uart/dev/ppc/ppc_acpi.c#2 integrate
.. //depot/projects/uart/dev/ppc/ppc_isa.c#2 integrate
.. //depot/projects/uart/dev/ppc/ppc_pci.c#2 integrate
.. //depot/projects/uart/dev/ppc/ppc_puc.c#5 integrate
.. //depot/projects/uart/dev/ppc/ppcreg.h#3 integrate
.. //depot/projects/uart/dev/ppc/ppcvar.h#5 integrate
.. //depot/projects/uart/dev/sab/sab.c#9 delete
.. //depot/projects/uart/dev/sab/sab82532reg.h#3 delete
.. //depot/projects/uart/i386/i386/identcpu.c#18 integrate
.. //depot/projects/uart/pc98/cbus/ppc.c#4 delete
.. //depot/projects/uart/pc98/cbus/ppcreg.h#2 delete
Differences ...
==== //depot/projects/uart/amd64/amd64/identcpu.c#9 (text+ko) ====
@@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/identcpu.c,v 1.144 2006/02/15 14:48:59 dwmalone Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/identcpu.c,v 1.146 2006/04/24 22:56:57 jkim Exp $");
#include "opt_cpu.h"
@@ -233,7 +233,7 @@
"\014<b11>"
"\015<b12>"
"\016CX16" /* CMPXCHG16B Instruction */
- "\017<b14>"
+ "\017XTPR" /* Send Task Priority Messages*/
"\020<b15>"
"\021<b16>"
"\022<b17>"
@@ -360,7 +360,8 @@
else if (strcmp(cpu_vendor, "GenuineIntel") == 0 &&
(cpu_high >= 4)) {
cpuid_count(4, 0, regs);
- cmp = ((regs[0] & 0xfc000000) >> 26) + 1;
+ if ((regs[0] & 0x1f) != 0)
+ cmp = ((regs[0] >> 26) & 0x3f) + 1;
}
if (cmp > 1)
printf("\n Cores per package: %d", cmp);
==== //depot/projects/uart/conf/files#62 (text+ko) ====
@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/files,v 1.1110 2006/04/19 19:38:35 marcel Exp $
+# $FreeBSD: src/sys/conf/files,v 1.1111 2006/04/24 23:31:49 marcel Exp $
#
# The long compile-with and dependency lines are required because of
# limitations in config: backslash-newline doesn't work in strings, and
==== //depot/projects/uart/conf/files.alpha#16 (text+ko) ====
@@ -1,7 +1,7 @@
# This file tells config what files go into building a kernel,
# files marked standard are always included.
#
-# $FreeBSD: src/sys/conf/files.alpha,v 1.125 2006/03/14 22:40:44 sam Exp $
+# $FreeBSD: src/sys/conf/files.alpha,v 1.126 2006/04/24 23:31:50 marcel Exp $
#
# The long compile-with and dependency lines are required because of
# limitations in config: backslash-newline doesn't work in strings, and
==== //depot/projects/uart/conf/files.amd64#20 (text+ko) ====
@@ -1,7 +1,7 @@
# This file tells config what files go into building a kernel,
# files marked standard are always included.
#
-# $FreeBSD: src/sys/conf/files.amd64,v 1.84 2006/04/21 04:24:49 peter Exp $
+# $FreeBSD: src/sys/conf/files.amd64,v 1.85 2006/04/24 23:31:50 marcel Exp $
#
# The long compile-with and dependency lines are required because of
# limitations in config: backslash-newline doesn't work in strings, and
==== //depot/projects/uart/conf/files.i386#25 (text+ko) ====
@@ -1,7 +1,7 @@
# This file tells config what files go into building a kernel,
# files marked standard are always included.
#
-# $FreeBSD: src/sys/conf/files.i386,v 1.554 2006/04/21 04:28:43 peter Exp $
+# $FreeBSD: src/sys/conf/files.i386,v 1.555 2006/04/24 23:31:50 marcel Exp $
#
# The long compile-with and dependency lines are required because of
# limitations in config: backslash-newline doesn't work in strings, and
==== //depot/projects/uart/conf/files.ia64#17 (text+ko) ====
@@ -1,7 +1,7 @@
# This file tells config what files go into building a kernel,
# files marked standard are always included.
#
-# $FreeBSD: src/sys/conf/files.ia64,v 1.85 2006/03/05 22:52:16 yar Exp $
+# $FreeBSD: src/sys/conf/files.ia64,v 1.86 2006/04/24 23:31:50 marcel Exp $
#
# The long compile-with and dependency lines are required because of
# limitations in config: backslash-newline doesn't work in strings, and
==== //depot/projects/uart/conf/files.pc98#22 (text+ko) ====
@@ -3,7 +3,7 @@
#
# modified for PC-9801/PC-9821
#
-# $FreeBSD: src/sys/conf/files.pc98,v 1.337 2006/04/21 12:13:11 nyan Exp $
+# $FreeBSD: src/sys/conf/files.pc98,v 1.338 2006/04/24 23:31:50 marcel Exp $
#
# The long compile-with and dependency lines are required because of
# limitations in config: backslash-newline doesn't work in strings, and
@@ -317,7 +317,6 @@
pc98/cbus/olpt.c optional olpt
pc98/cbus/pckbd.c optional pckbd
pc98/cbus/pmc.c optional pmc
-pc98/cbus/ppc.c optional ppc
pc98/cbus/scgdcrndr.c optional sc gdc
pc98/cbus/scterm-sck.c optional sc
pc98/cbus/scvtb.c optional sc
==== //depot/projects/uart/conf/files.powerpc#9 (text+ko) ====
@@ -1,7 +1,7 @@
# This file tells config what files go into building a kernel,
# files marked standard are always included.
#
-# $FreeBSD: src/sys/conf/files.powerpc,v 1.51 2006/04/01 04:53:08 marcel Exp $
+# $FreeBSD: src/sys/conf/files.powerpc,v 1.53 2006/04/24 23:36:32 marcel Exp $
#
# The long compile-with and dependency lines are required because of
# limitations in config: backslash-newline doesn't work in strings, and
==== //depot/projects/uart/conf/options#31 (text+ko) ====
@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/options,v 1.535 2006/04/18 22:24:55 mjacob Exp $
+# $FreeBSD: src/sys/conf/options,v 1.536 2006/04/24 23:31:50 marcel Exp $
#
# On the handling of kernel options
#
==== //depot/projects/uart/conf/options.alpha#6 (text+ko) ====
@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/options.alpha,v 1.43 2004/07/10 22:29:40 marcel Exp $
+# $FreeBSD: src/sys/conf/options.alpha,v 1.44 2006/04/24 23:31:50 marcel Exp $
# Options specific to the Alpha platform kernels
EV5 opt_global.h
==== //depot/projects/uart/conf/options.amd64#8 (text+ko) ====
@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/options.amd64,v 1.24 2005/12/12 10:15:11 ru Exp $
+# $FreeBSD: src/sys/conf/options.amd64,v 1.25 2006/04/24 23:31:50 marcel Exp $
# Options specific to AMD64 platform kernels
AUTO_EOI_1 opt_auto_eoi.h
==== //depot/projects/uart/conf/options.i386#13 (text+ko) ====
@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/options.i386,v 1.232 2006/03/03 18:09:37 imp Exp $
+# $FreeBSD: src/sys/conf/options.i386,v 1.233 2006/04/24 23:31:50 marcel Exp $
# Options specific to the i386 platform kernels
AUTO_EOI_1 opt_auto_eoi.h
==== //depot/projects/uart/conf/options.ia64#7 (text+ko) ====
@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/options.ia64,v 1.26 2004/08/16 18:54:22 marcel Exp $
+# $FreeBSD: src/sys/conf/options.ia64,v 1.27 2006/04/24 23:31:50 marcel Exp $
# Options specific to the ia64 platform kernels
ITANIUM opt_global.h
==== //depot/projects/uart/conf/options.pc98#12 (text+ko) ====
@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/options.pc98,v 1.196 2006/03/03 18:09:37 imp Exp $
+# $FreeBSD: src/sys/conf/options.pc98,v 1.197 2006/04/24 23:31:50 marcel Exp $
# Options specific to the pc98 platform kernels
AUTO_EOI_1 opt_auto_eoi.h
==== //depot/projects/uart/dev/ppc/ppc.c#10 (text+ko) ====
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ppc/ppc.c,v 1.50 2006/04/15 12:31:33 iwasaki Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/ppc/ppc.c,v 1.51 2006/04/24 23:31:51 marcel Exp $");
#include "opt_ppc.h"
@@ -37,7 +37,6 @@
#include <sys/bus.h>
#include <sys/malloc.h>
-#include <machine/clock.h>
#include <machine/bus.h>
#include <machine/resource.h>
#include <sys/rman.h>
@@ -64,6 +63,10 @@
#define LOG_PPC(function, ppc, string) \
if (bootverbose) printf("%s: %s\n", function, string)
+#if defined(__i386__) && defined(PC98)
+#define PC98_IEEE_1284_DISABLE 0x100
+#define PC98_IEEE_1284_PORT 0x140
+#endif
#define DEVTOSOFTC(dev) ((struct ppc_data *)device_get_softc(dev))
@@ -1627,6 +1630,10 @@
{
#ifdef __i386__
static short next_bios_ppc = 0;
+#ifdef PC98
+ unsigned int pc98_ieee_mode = 0x00;
+ unsigned int tmp;
+#endif
#endif
struct ppc_data *ppc;
int error;
@@ -1648,6 +1655,17 @@
* If port not specified, use bios list.
*/
if (error) {
+#ifdef PC98
+ if (next_bios_ppc == 0) {
+ /* Use default IEEE-1284 port of NEC PC-98x1 */
+ port = PC98_IEEE_1284_PORT;
+ next_bios_ppc += 1;
+ if (bootverbose)
+ device_printf(dev,
+ "parallel port found at 0x%x\n",
+ (int) port);
+ }
+#else
if((next_bios_ppc < BIOS_MAX_PPC) &&
(*(BIOS_PORTS+next_bios_ppc) != 0) ) {
port = *(BIOS_PORTS+next_bios_ppc++);
@@ -1658,6 +1676,7 @@
device_printf(dev, "parallel port not found.\n");
return ENXIO;
}
+#endif /* PC98 */
bus_set_resource(dev, SYS_RES_IOPORT, rid, port,
IO_LPTSIZE_EXTENDED);
}
@@ -1726,7 +1745,31 @@
ppc->ppc_type = PPC_TYPE_GENERIC;
+#if defined(__i386__) && defined(PC98)
/*
+ * IEEE STD 1284 Function Check and Enable
+ * for default IEEE-1284 port of NEC PC-98x1
+ */
+ if (ppc->ppc_base == PC98_IEEE_1284_PORT &&
+ !(ppc->ppc_flags & PC98_IEEE_1284_DISABLE)) {
+ tmp = inb(ppc->ppc_base + PPC_1284_ENABLE);
+ pc98_ieee_mode = tmp;
+ if ((tmp & 0x10) == 0x10) {
+ outb(ppc->ppc_base + PPC_1284_ENABLE, tmp & ~0x10);
+ tmp = inb(ppc->ppc_base + PPC_1284_ENABLE);
+ if ((tmp & 0x10) == 0x10)
+ goto error;
+ } else {
+ outb(ppc->ppc_base + PPC_1284_ENABLE, tmp | 0x10);
+ tmp = inb(ppc->ppc_base + PPC_1284_ENABLE);
+ if ((tmp & 0x10) != 0x10)
+ goto error;
+ }
+ outb(ppc->ppc_base + PPC_1284_ENABLE, pc98_ieee_mode | 0x10);
+ }
+#endif
+
+ /*
* Try to detect the chipset and its mode.
*/
if (ppc_detect(ppc, ppc->ppc_flags & 0xf))
@@ -1735,6 +1778,12 @@
return (0);
error:
+#if defined(__i386__) && defined(PC98)
+ if (ppc->ppc_base == PC98_IEEE_1284_PORT &&
+ !(ppc->ppc_flags & PC98_IEEE_1284_DISABLE)) {
+ outb(ppc->ppc_base + PPC_1284_ENABLE, pc98_ieee_mode);
+ }
+#endif
if (ppc->res_irq != 0) {
bus_release_resource(dev, SYS_RES_IRQ, ppc->rid_irq,
ppc->res_irq);
==== //depot/projects/uart/dev/ppc/ppc_acpi.c#2 (text+ko) ====
==== //depot/projects/uart/dev/ppc/ppc_isa.c#2 (text+ko) ====
==== //depot/projects/uart/dev/ppc/ppc_pci.c#2 (text+ko) ====
==== //depot/projects/uart/dev/ppc/ppc_puc.c#5 (text+ko) ====
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ppc/ppc_puc.c,v 1.2 2004/05/30 20:08:37 phk Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/ppc/ppc_puc.c,v 1.3 2006/04/24 23:31:51 marcel Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
==== //depot/projects/uart/dev/ppc/ppcreg.h#3 (text+ko) ====
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/sys/dev/ppc/ppcreg.h,v 1.15 2001/06/23 06:52:54 nsouch Exp $
+ * $FreeBSD: src/sys/dev/ppc/ppcreg.h,v 1.16 2006/04/24 23:31:51 marcel Exp $
*
*/
#ifndef __PPCREG_H
@@ -124,10 +124,18 @@
#define PPC_SPP_CTR 2 /* SPP control register */
#define PPC_EPP_ADDR 3 /* EPP address register (8 bit) */
#define PPC_EPP_DATA 4 /* EPP data register (8, 16 or 32 bit) */
+#if defined(__i386__) && defined(PC98)
+#define PPC_1284_ENABLE 0x09 /* IEEE STD 1284 Enable register */
+#define PPC_ECP_D_FIFO 0x0c /* ECP Data fifo register */
+#define PPC_ECP_CNFGA 0x0c /* Configuration register A */
+#define PPC_ECP_CNFGB 0x0d /* Configuration register B */
+#define PPC_ECP_ECR 0x0e /* ECP extended control register */
+#else
#define PPC_ECP_D_FIFO 0x400 /* ECP Data fifo register */
#define PPC_ECP_CNFGA 0x400 /* Configuration register A */
#define PPC_ECP_CNFGB 0x401 /* Configuration register B */
#define PPC_ECP_ECR 0x402 /* ECP extended control register */
+#endif
#define PPC_FIFO_EMPTY 0x1 /* ecr register - bit 0 */
#define PPC_FIFO_FULL 0x2 /* ecr register - bit 1 */
==== //depot/projects/uart/dev/ppc/ppcvar.h#5 (text+ko) ====
@@ -24,7 +24,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/sys/dev/ppc/ppcvar.h,v 1.3 2006/04/15 12:31:33 iwasaki Exp $
+ * $FreeBSD: src/sys/dev/ppc/ppcvar.h,v 1.4 2006/04/24 23:31:51 marcel Exp $
*
*/
==== //depot/projects/uart/i386/i386/identcpu.c#18 (text+ko) ====
@@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/i386/i386/identcpu.c,v 1.160 2006/03/03 18:54:05 netchild Exp $");
+__FBSDID("$FreeBSD: src/sys/i386/i386/identcpu.c,v 1.162 2006/04/24 22:56:57 jkim Exp $");
#include "opt_cpu.h"
@@ -729,7 +729,7 @@
"\014<b11>"
"\015<b12>"
"\016CX16" /* CMPXCHG16B Instruction */
- "\017<b14>"
+ "\017XTPR" /* Send Task Priority Messages*/
"\020<b15>"
"\021<b16>"
"\022<b17>"
@@ -856,7 +856,8 @@
else if (strcmp(cpu_vendor, "GenuineIntel") == 0 &&
(cpu_high >= 4)) {
cpuid_count(4, 0, regs);
- cmp = ((regs[0] & 0xfc000000) >> 26) + 1;
+ if ((regs[0] & 0x1f) != 0)
+ cmp = ((regs[0] >> 26) & 0x3f) + 1;
}
if (cmp > 1)
printf("\n Cores per package: %d", cmp);
More information about the p4-projects
mailing list