Skip to contentSkip to conversation

Booting a simple Program to a MCA IBM 7013J or BULL ESCALA 204 D

DISCUSSION Michael Westermann 2 participants 2 messages Jan 29, 2007 – Jan 31, 2007

lore
Share & tools
lore
#0 lore raw

Hello,

I've a Bull ESCALA-D With MCA and 8 PPC 604 and one gig ram. I work for a few years on the booting and loading this box with linux.

My first step is loading and starting simple program via tftp-boot.

I've attached a simple bootfile. This load and display an hexvalue to the Small user display, and loop until power off. This Programm use the BUMP-Processor.

My next step is using the serial console...

I think that all IBM MCA have a similarly boot and io concept.

Are anyone interested on linux on PPC-MCA?

I've compiled with a gcc ppc-crosscompile on i386.

<-Start- tftp_boot.S->
#include "ppc.h"

#define BOOTSTRAP 0x400

#define NVRAM		0xff60
		.org	0
		.byte 0xc9,0xc2,0xd4,0xc1
		.byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
		.byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
		.byte 0x00,0x00,0x00,0x00
		.byte 0x00,0x00,0x00,0x22
		.byte 0x00,0x00,0x00,0x22
		.byte 0x00,0x00,0x00,0x02
		.byte 0x00,0x00,0x00,0x02
		.byte 0x00,0x00,0x00,0x22
		.byte 0x00,0x00,0x00,0x00
		.byte 0x01,0x02,0x00,0x00
		
		.byte 0x00,0x00,0x00,0x00
		.byte 0x00,0x00,0x00,0x00
		.byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
		.byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
		.byte 0x00,0x00,0x00,0x00
		.byte 0x00,0x00,0x00,0x22
		.byte 0x00,0x00,0x03,0x8c
		.byte 0x00,0x00,0x00,0x02
		.byte 0x00,0x00,0x00,0x02
		.byte 0x00,0x00,0x00,0x22
		.byte 0x00,0x00,0x00,0x00
		.org	BOOTSTRAP 
		.org	BOOTSTRAP+0x38c
		lis	r1,32		// Stack 0x200000

		addi	r28, r4 ,0	

		mtibatu	0,r3
		mtdbatu	0,r3
		mtibatu	1,r3
		mtdbatu	1,r3
		mtibatu	2,r3
		mtdbatu	2,r3
		mtibatu	3,r3
		mtdbatu	3,r3
		addi	r0,r4,19	
		mtibatl	0,r0		// BPRN=0,      PP = 11 WIMG=0010
		addi	r0,r4,18
		mtdbatl	0,r0		// BPRN=0,      PP = 10 WIMG=0010
		addi	r0,r4,255
		mtibatu	0,r0		// BEPI=0, Area Length=8MB, Vs=1,Vp=1
		mtdbatu	0,r0		// BEPI=0, Area Length=8MB, Vs=1,Vp=1
		li	r4,0
		oris	r4,r4,65472	
		addi	r0,r4,19	
		mtibatl	1,r0		// BPRN=0xffc0, PP = 11 WIMG=0010, 
		addi	r0,r4,19
		mtdbatl	1,r0		// BPRN=0xffc0, PP = 11 WIMG=0010, 
		addi	r0,r4,127	
		mtibatu	1,r0		// BEPI=0xffc0, Area Length=1MB, Vs=1,Vp=1
		mtdbatu	1,r0		// BEPI=0xffc0, Area Length=1MB, Vs=1,Vp=1
		lis	r4,-256
		addi	r0,r4,35
		mtibatl	2,r0		// BPRN=0xff00, PP = 11 WIMG=0100, 
		addi	r0,r4,34	// BPRN=0xff00, PP = 10 WIMG=0100, 
		mtdbatl	2,r0
		addi	r0,r4,255
		mtibatu	2,r0		// BEPI=0xff00, Area Length=8MB, Vs=1,Vp=1
		mtdbatu	2,r0		// BEPI=0xff00, Area Length=8MB, Vs=1,Vp=1
		lis	r4,384		
		addi	r0,r4,19
		mtibatl	3,r0		// BPRN=0x0180, PP = 11 WIMG=0010, 
		addi	r0,r4,18	// BPRN=0x0180, PP = 10 WIMG=0010, 
		mtdbatl	3,r0
		addi	r0,r4,255
		mtibatu	3,r0		// BEPI=0x0180, Area Length=8MB, Vs=1,Vp=1
		mtdbatu	3,r0		// BEPI=0x0180, Area Length=8MB, Vs=1,Vp=1
		sync	
		isync
		li	r0,12400
		mtmsr	r0
		isync
		sync
		
		bl 	set_led_copy

		li	r3, 0x444
		bl	dump_IPL	
		sync
		isync

loop: b loop

dump_IPL: mflr r0

      		mtctr	r0
		rlwinm	r4,r3,20,0,11
		li	r3,	0x300
		oris	r3,r3,	NVRAM
		stw	r4,0(r3)
		sync
		bctr

set_led_copy: cmpwi r3,0 // set_led_copy

		lis	r3,-158
		addic	r3,r3,2528
		li	r0,1
		beq-	L00004f68
		stw	r0,-2376(r3)
		blr
L00004f68:	li	r0,0
		stw	r0,-2376(r3)
		blr

		.org	0x43ff
		.byte 0	

<-end- tftp_boot.S->

Print on the Console:

SYSTEM WIRD GESTARTET (BOOT)

Boot-Vorgang lauft . . . Bitte warten.

Ethernet: Steckplatz 0/6, BNC / modular Jacks Hardware-Adresse .......................................... 0800382113B3

.... Packete gesendet Packete empfangen

BOOTP 00002 00001

TFTP 00036 00035
<< 299 >>
<< 444 >>

and on User-Display

444

Michael

#1 lore raw

Hi,

Quoted 2 lines

I've a Bull ESCALA-D With MCA and 8 PPC 604 and one gig ram. I work for a few years on the booting and loading this box with linux.

Cool.

Quoted 9 lines

My first step is loading and starting simple program via tftp-boot.

I've attached a simple bootfile. This load and display an hexvalue to the Small user display, and loop until power off. This Programm use the BUMP-Processor.

My next step is using the serial console...

I think that all IBM MCA have a similarly boot and io concept.

I have a couple of MCA RS/6000 boxes to try this out on ;-)

Quoted 1 line

Are anyone interested on linux on PPC-MCA?

[del]
I am, but never had the guts nor the time to do something. But next weekend, I'll try to get my 320h to boot your test program,

Thanks,
Uli

Signature · 3 lines
Dipl. Inf. Ulrich Teichert|e-mail: [email protected]
Stormweg 24               |listening to: Single (Hushpuppies), Pay The Cobra
24539 Neumuenster, Germany|(The Bellrays), She's Got Standards (The Rifles)