1
/* First stage loader bootstrap for SUNW,Ultra's IEEE 1275 PROM
3
Copyright (C) 1996,1997,2000 Jakub Jelinek
5
This program is free software; you can redistribute it and/or modify
6
it under the terms of the GNU General Public License as published by
7
the Free Software Foundation; either version 2 of the License, or
8
(at your option) any later version.
10
This program is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
GNU General Public License for more details.
15
You should have received a copy of the GNU General Public License
16
along with this program; if not, write to the Free Software
17
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
20
#define BLOCK_START 0x1dc
29
.global _start, letter_here, number_here
32
sethi %hi(0x4000), buffer
33
or buffer, (BLOCK_START + 3 * 512), %i5
34
sethi %hi(0x10000), dest
37
add buffer, %lo(chosen), %o1
39
add buffer, %lo(finddevice), %o0
42
add buffer, %lo(stdout), %o0
43
lduw [dest + 256], stdouth
47
add buffer, %lo(bootpath), %o0
64
add buffer, %lo(open), %o0
67
or buffer, BLOCK_START, %l1
76
add buffer, %lo(seek), %o0
82
add buffer, %lo(read), %o0
98
add buffer, %lo(close), %o0
99
ldub [dest + 1024 + 0x08], %o0
102
add buffer, %lo(exit), %o0
108
jmpl dest + 1024, %g0
117
add buffer, %lo(write), %o0
119
add buffer, %lo(exit), %o0
129
add buffer, %lo(getprops), %o0
141
jmpl promvec + %g0, %g0