Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/macppc/stand/ofwboot support 601, from scole_mail
details: https://anonhg.NetBSD.org/src/rev/31cc3d0bc31a
branches: trunk
changeset: 327075:31cc3d0bc31a
user: macallan <macallan%NetBSD.org@localhost>
date: Wed Feb 26 21:42:40 2014 +0000
description:
support 601, from scole_mail
diffstat:
sys/arch/macppc/stand/ofwboot/Locore.c | 44 ++++++++++++++++++++++++++++++++-
1 files changed, 42 insertions(+), 2 deletions(-)
diffs (65 lines):
diff -r ea86dcb8b0f7 -r 31cc3d0bc31a sys/arch/macppc/stand/ofwboot/Locore.c
--- a/sys/arch/macppc/stand/ofwboot/Locore.c Wed Feb 26 21:18:14 2014 +0000
+++ b/sys/arch/macppc/stand/ofwboot/Locore.c Wed Feb 26 21:42:40 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: Locore.c,v 1.24 2011/07/17 20:54:43 joerg Exp $ */
+/* $NetBSD: Locore.c,v 1.25 2014/02/26 21:42:40 macallan Exp $ */
/*
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -69,6 +69,12 @@
" mtmsr %r0 \n"
" isync \n"
" \n"
+" \n" /* test for 601 */
+" mfspr %r0,287 \n" /* mfpvbr %r0 PVR = 287 */
+" srwi %r0,%r0,0x10 \n"
+" cmpi 0,1,%r0,0x02 \n" /* 601 CPU = 0x0001 */
+" blt 1f \n" /* skip over non-601 BAT setup */
+ /*non PPC 601 BATs*/
" mtibatu 0,%r0 \n"
" mtibatu 1,%r0 \n"
" mtibatu 2,%r0 \n"
@@ -84,7 +90,41 @@
" li %r9,0x1ffe \n" /* BATU(0, BAT_BL_256M, BAT_Vs) */
" mtibatu 0,%r9 \n"
" mtdbatu 0,%r9 \n"
-" isync \n"
+" b 2f \n"
+
+ /* PPC 601 BATs*/
+"1: mtibatu 0,%r0 \n"
+" mtibatu 1,%r0 \n"
+" mtibatu 2,%r0 \n"
+" mtibatu 3,%r0 \n"
+" \n"
+" li %r9,0x7f \n"
+" mtibatl 0,%r9 \n"
+" li %r9,0x1a \n"
+" mtibatu 0,%r9 \n"
+" \n"
+" lis %r9,0x80 \n"
+" addi %r9,%r9,0x7f \n"
+" mtibatl 1,%r9 \n"
+" lis %r9,0x80 \n"
+" addi %r9,%r9,0x1a \n"
+" mtibatu 1,%r9 \n"
+" \n"
+" lis %r9,0x100 \n"
+" addi %r9,%r9,0x7f \n"
+" mtibatl 2,%r9 \n"
+" lis %r9,0x100 \n"
+" addi %r9,%r9,0x1a \n"
+" mtibatu 2,%r9 \n"
+" \n"
+" lis %r9,0x180 \n"
+" addi %r9,%r9,0x7f \n"
+" mtibatl 3,%r9 \n"
+" lis %r9,0x180 \n"
+" addi %r9,%r9,0x1a \n"
+" mtibatu 3,%r9 \n"
+" \n"
+"2: isync \n"
" \n"
" mtmsr %r8 \n"
" isync \n"
Home |
Main Index |
Thread Index |
Old Index