3
* GRUB -- GRand Unified Bootloader
4
* Copyright (C) 2009 Free Software Foundation, Inc.
6
* GRUB is free software: you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation, either version 3 of the License, or
9
* (at your option) any later version.
11
* GRUB is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
16
* You should have received a copy of the GNU General Public License
17
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
20
#include <grub/boot.h>
21
#include <grub/machine/boot.h>
22
#include <grub/offsets.h>
28
/* First stage boot block jumps to us here. */
33
prom_write_name: .asciz "write"
34
prom_seek_name: .asciz "seek"
35
prom_read_name: .asciz "read"
36
prom_close_name: .asciz "close"
38
notification_string: .asciz "Loading kernel"
39
#define NOTIFICATION_STRING_LEN 14
41
notification_step: .asciz "."
42
#define NOTIFICATION_STEP_LEN 1
44
notification_done: .asciz "\r\n"
45
#define NOTIFICATION_DONE_LEN 2
49
/* %o2: message string
53
GET_ABS(prom_write_name, %o0)
54
mov STDOUT_NODE_REG, %o1
85
sethi %hi(SCRATCH_PAD_DISKBOOT), %l1 /* OF argument slots */
87
GET_ABS(notification_string, %o2)
89
mov NOTIFICATION_STRING_LEN, %o3
91
GET_ABS(firstlist - GRUB_BOOT_SPARC64_IEEE1275_LIST_SIZE, %l2)
92
set GRUB_BOOT_SPARC64_IEEE1275_IMAGE_ADDRESS, %l3
94
lduw [%l2 + 0x08], %o0
96
lduw [%l2 + 0x00], %o3
98
lduw [%l2 + 0x04], %o4
100
GET_ABS(prom_seek_name, %o0)
106
GET_ABS(prom_read_name, %o0)
108
lduw [%l2 + 0x08], %o3
114
GET_ABS(notification_step, %o2)
116
mov NOTIFICATION_STEP_LEN, %o3
119
sub %l2, GRUB_BOOT_SPARC64_IEEE1275_LIST_SIZE, %l2
122
GET_ABS(prom_close_name, %o0)
128
GET_ABS(notification_done, %o2)
130
mov NOTIFICATION_DONE_LEN, %o3
131
sethi %hi(GRUB_BOOT_SPARC64_IEEE1275_IMAGE_ADDRESS), %o2
132
jmpl %o2 + %lo(GRUB_BOOT_SPARC64_IEEE1275_IMAGE_ADDRESS), %o7
140
. = _start + (0x200 - GRUB_BOOT_SPARC64_IEEE1275_LIST_SIZE)
141
blocklist_default_start:
144
blocklist_default_len: