From eb18afc7fafab1a66a107ccb41024012c59c9b49 Mon Sep 17 00:00:00 2001 From: Martin Pieuchot Date: Sat, 8 Dec 2012 12:49:01 +0000 Subject: Recognize PowerPC 970 CPUs present in early PowerMac G5 from 2003 (7,2 and 7,3) and let OpenBSD boot on these machines, yay! The 970 are similar to the 970FX except that they are manufactured in 130nm. Fix an issue reported by Andrew Fresh and kirby@ on misc@ --- sys/arch/macppc/macppc/cpu.c | 8 +++++++- sys/arch/powerpc/include/cpu.h | 3 ++- 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'sys/arch') diff --git a/sys/arch/macppc/macppc/cpu.c b/sys/arch/macppc/macppc/cpu.c index 3a1fa430c54..8908f79d57e 100644 --- a/sys/arch/macppc/macppc/cpu.c +++ b/sys/arch/macppc/macppc/cpu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.c,v 1.67 2011/05/25 07:42:15 mpi Exp $ */ +/* $OpenBSD: cpu.c,v 1.68 2012/12/08 12:49:00 mpi Exp $ */ /* * Copyright (c) 1997 Per Fogelstrom @@ -208,6 +208,7 @@ ppc_check_procid() cpu = pvr >> 16; switch (cpu) { + case PPC_CPU_IBM970: case PPC_CPU_IBM970FX: case PPC_CPU_IBM970MP: ppc_proc_is_64b = 1; @@ -282,6 +283,10 @@ cpuattach(struct device *parent, struct device *dev, void *aux) ppc_altivec = 1; snprintf(cpu_model, sizeof(cpu_model), "7447A"); break; + case PPC_CPU_IBM970: + ppc_altivec = 1; + snprintf(cpu_model, sizeof(cpu_model), "970"); + break; case PPC_CPU_IBM970FX: ppc_altivec = 1; snprintf(cpu_model, sizeof(cpu_model), "970FX"); @@ -394,6 +399,7 @@ cpuattach(struct device *parent, struct device *dev, void *aux) if (cpu == PPC_CPU_MPC7450 && (pvr & 0xffff) < 0x0200) hid0 &= ~HID0_BTIC; break; + case PPC_CPU_IBM970: case PPC_CPU_IBM970FX: /* select NAP mode */ hid0 &= ~(HID0_NAP | HID0_DOZE | HID0_SLEEP); diff --git a/sys/arch/powerpc/include/cpu.h b/sys/arch/powerpc/include/cpu.h index e8f521b988a..d4237733cd8 100644 --- a/sys/arch/powerpc/include/cpu.h +++ b/sys/arch/powerpc/include/cpu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.h,v 1.47 2012/12/02 07:03:31 guenther Exp $ */ +/* $OpenBSD: cpu.h,v 1.48 2012/12/08 12:49:00 mpi Exp $ */ /* $NetBSD: cpu.h,v 1.1 1996/09/30 16:34:21 ws Exp $ */ /* @@ -377,6 +377,7 @@ extern int ppc_proc_is_64b; #define PPC_CPU_MPC750 8 #define PPC_CPU_MPC604ev 9 #define PPC_CPU_MPC7400 12 +#define PPC_CPU_IBM970 0x0039 #define PPC_CPU_IBM970FX 0x003c #define PPC_CPU_IBM970MP 0x0044 #define PPC_CPU_IBM750FX 0x7000 -- cgit v1.2.3