Booting a microchannel IBM 7013 with a simple Programm via tftp
Michael Westermann
michael at dvmwest.de
Sat Feb 10 00:46:38 EST 2007
Hello,
I've a Bull ESCALA-D (IBM 7013J) with microchannel and 8 PPC 604 and one gig ram. I work for
a few years on the booting and loading this box with linux.
this is the second version of my testprog.
I've attached the source and the bootfile. This load and display an hexvalue
to the Small user display, and loop until power off. This Programm use
the BUMP-Processor.
I've compiled with a gcc ppc-crosscompile on a i386 box.
Michael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ppc.h
Type: text/x-chdr
Size: 2760 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20070209/3e72f9a1/attachment.h>
-------------- next part --------------
#include "ppc.h"
#define block_size 512
#define bootstrap 0x400
#define blocks_bootstarp bootstrap/block_size
#define nvram 0xff60
#define start_prog 0x3f0
#define ende_file 0xA00
#define anz_blocks ende_file/block_size
#define magic_number 0xc9c2d4c1 // 'IBMA' EBCIDIC
/* boot record */
.org 0
.long magic_number // IPL Record id
.long 0, 0, 0, 0, 0
.long 0, 0, 0
.long anz_blocks // anz blocks bootcode base
.long start_prog // start_prog base
.long blocks_bootstarp
.long blocks_bootstarp
.long anz_blocks
.long 0
.byte 0x01,0x02,0x00,0x00
.long 0, 0, 0, 0, 0, 0, 0, 0, 0
.long anz_blocks // anz blocks bootcode sevice
.long start_prog // start_prog service
.long blocks_bootstarp
.long blocks_bootstarp
.long anz_blocks
.long 0
.org bootstrap
.org bootstrap+start_prog
test_lix: mflr r26
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 ende_file-1
.byte 0
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_boot
Type: application/octet-stream
Size: 2560 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20070209/3e72f9a1/attachment.obj>
More information about the Linuxppc-dev
mailing list