]>
Commit | Line | Data |
---|---|---|
0f005da9 | 1 | /* |
2 | * GRUB -- GRand Unified Bootloader | |
3 | * Copyright (C) 2009 Free Software Foundation, Inc. | |
4 | * | |
5 | * GRUB 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 3 of the License, or | |
8 | * (at your option) any later version. | |
9 | * | |
10 | * GRUB 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. | |
14 | * | |
15 | * You should have received a copy of the GNU General Public License | |
16 | * along with GRUB. If not, see <http://www.gnu.org/licenses/>. | |
17 | */ | |
18 | ||
19 | #ifndef GRUB_BOOT_MACHINE_HEADER | |
20 | #define GRUB_BOOT_MACHINE_HEADER 1 | |
21 | ||
22 | #define CIF_REG %l0 | |
23 | #define CHOSEN_NODE_REG %l4 | |
24 | #define STDOUT_NODE_REG %l5 | |
25 | #define BOOTDEV_REG %l6 | |
26 | #define PIC_REG %l7 | |
27 | ||
10f63894 VS |
28 | #define SCRATCH_PAD_BOOT 0x5000 |
29 | #define SCRATCH_PAD_DISKBOOT 0x4000 | |
4a73746a | 30 | #define SCRATCH_PAD_BOOT_SIZE 0x110 |
0f005da9 | 31 | |
32 | #define GET_ABS(symbol, reg) \ | |
33 | add PIC_REG, (symbol - pic_base), reg | |
34 | #define LDUW_ABS(symbol, offset, reg) \ | |
35 | lduw [PIC_REG + (symbol - pic_base) + (offset)], reg | |
36 | #define LDX_ABS(symbol, offset, reg) \ | |
37 | ldx [PIC_REG + (symbol - pic_base) + (offset)], reg | |
38 | ||
39 | #define GRUB_BOOT_AOUT_HEADER_SIZE 32 | |
40 | ||
41 | #define GRUB_BOOT_MACHINE_SIGNATURE 0xbb44aa55 | |
42 | ||
de9c615e | 43 | #define GRUB_BOOT_MACHINE_BOOT_DEVPATH 0x08 |
0f005da9 | 44 | |
b076cdc7 | 45 | #define GRUB_BOOT_MACHINE_BOOT_DEVPATH_END 0x80 |
0f005da9 | 46 | |
b076cdc7 | 47 | #define GRUB_BOOT_MACHINE_KERNEL_BYTE 0x80 |
0f005da9 | 48 | |
49 | #define GRUB_BOOT_MACHINE_CODE_END \ | |
50 | (0x1fc - GRUB_BOOT_AOUT_HEADER_SIZE) | |
51 | ||
0f005da9 | 52 | #define GRUB_BOOT_MACHINE_KERNEL_ADDR 0x4200 |
53 | ||
d2ea4551 VS |
54 | #ifndef ASM_FILE |
55 | /* This is the blocklist used in the diskboot image. */ | |
56 | struct grub_boot_blocklist | |
57 | { | |
58 | grub_uint64_t start; | |
59 | grub_uint32_t len; | |
7e47e27b | 60 | } GRUB_PACKED; |
d2ea4551 VS |
61 | #endif |
62 | ||
0f005da9 | 63 | #endif /* ! BOOT_MACHINE_HEADER */ |