Fix cross compilation (e.g. on Darwin). Following changes to make.tmpl,
[AROS.git] / arch / all-pc / boot / grub2-aros / include / grub / arm / linux.h
blob059dbba4292a85fdd271e03913c59991b19380d9
1 /* linux.h - ARM linux specific definitions */
2 /*
3 * GRUB -- GRand Unified Bootloader
4 * Copyright (C) 2013 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 #ifndef GRUB_LINUX_CPU_HEADER
21 #define GRUB_LINUX_CPU_HEADER 1
23 #define LINUX_ZIMAGE_OFFSET 0x24
24 #define LINUX_ZIMAGE_MAGIC 0x016f2818
26 #include "system.h"
28 #if defined GRUB_MACHINE_UBOOT
29 # include <grub/uboot/uboot.h>
30 # define LINUX_ADDRESS (start_of_ram + 0x8000)
31 # define LINUX_INITRD_ADDRESS (start_of_ram + 0x02000000)
32 # define LINUX_FDT_ADDRESS (LINUX_INITRD_ADDRESS - 0x10000)
33 # define grub_arm_firmware_get_boot_data grub_uboot_get_boot_data
34 # define grub_arm_firmware_get_machine_type grub_uboot_get_machine_type
35 #elif defined GRUB_MACHINE_EFI
36 # include <grub/efi/efi.h>
37 # include <grub/machine/loader.h>
38 /* On UEFI platforms - load the images at the lowest available address not
39 less than *_PHYS_OFFSET from the first available memory location. */
40 # define LINUX_PHYS_OFFSET (0x00008000)
41 # define LINUX_INITRD_PHYS_OFFSET (LINUX_PHYS_OFFSET + 0x02000000)
42 # define LINUX_FDT_PHYS_OFFSET (LINUX_INITRD_PHYS_OFFSET - 0x10000)
43 static inline grub_addr_t
44 grub_arm_firmware_get_boot_data (void)
46 return 0;
48 static inline grub_uint32_t
49 grub_arm_firmware_get_machine_type (void)
51 return GRUB_ARM_MACHINE_TYPE_FDT;
53 #endif
55 #define FDT_ADDITIONAL_ENTRIES_SIZE 0x300
57 #endif /* ! GRUB_LINUX_CPU_HEADER */