New port arm64-efi
This commit is contained in:
commit
b29b77fee2
28 changed files with 746 additions and 17 deletions
1
include/grub/arm64/efi/memory.h
Normal file
1
include/grub/arm64/efi/memory.h
Normal file
|
@ -0,0 +1 @@
|
|||
#include <grub/efi/memory.h>
|
24
include/grub/arm64/reloc.h
Normal file
24
include/grub/arm64/reloc.h
Normal file
|
@ -0,0 +1,24 @@
|
|||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 2013 Free Software Foundation, Inc.
|
||||
*
|
||||
* GRUB is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GRUB is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef GRUB_ARM64_RELOC_H
|
||||
#define GRUB_ARM64_RELOC_H 1
|
||||
|
||||
grub_err_t grub_arm64_reloc_xxxx26 (grub_uint32_t *target, Elf64_Addr sym_addr);
|
||||
|
||||
#endif
|
27
include/grub/arm64/setjmp.h
Normal file
27
include/grub/arm64/setjmp.h
Normal file
|
@ -0,0 +1,27 @@
|
|||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 2013 Free Software Foundation, Inc.
|
||||
*
|
||||
* GRUB is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GRUB is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef GRUB_SETJMP_CPU_HEADER
|
||||
#define GRUB_SETJMP_CPU_HEADER 1
|
||||
|
||||
typedef unsigned long long grub_jmp_buf[13];
|
||||
|
||||
int grub_setjmp (grub_jmp_buf env) RETURNS_TWICE;
|
||||
void grub_longjmp (grub_jmp_buf env, int val) __attribute__ ((noreturn));
|
||||
|
||||
#endif /* ! GRUB_SETJMP_CPU_HEADER */
|
29
include/grub/arm64/time.h
Normal file
29
include/grub/arm64/time.h
Normal file
|
@ -0,0 +1,29 @@
|
|||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 2013 Free Software Foundation, Inc.
|
||||
*
|
||||
* GRUB is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GRUB is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef KERNEL_CPU_TIME_HEADER
|
||||
#define KERNEL_CPU_TIME_HEADER 1
|
||||
|
||||
static __inline void
|
||||
grub_cpu_idle (void)
|
||||
{
|
||||
/* FIXME: this can't work until we handle interrupts. */
|
||||
/* __asm__ __volatile__ ("wfi"); */
|
||||
}
|
||||
|
||||
#endif /* ! KERNEL_CPU_TIME_HEADER */
|
34
include/grub/arm64/types.h
Normal file
34
include/grub/arm64/types.h
Normal file
|
@ -0,0 +1,34 @@
|
|||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 2013 Free Software Foundation, Inc.
|
||||
*
|
||||
* GRUB is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GRUB is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef GRUB_TYPES_CPU_HEADER
|
||||
#define GRUB_TYPES_CPU_HEADER 1
|
||||
|
||||
/* The size of void *. */
|
||||
#define GRUB_TARGET_SIZEOF_VOID_P 8
|
||||
|
||||
/* The size of long. */
|
||||
#define GRUB_TARGET_SIZEOF_LONG 8
|
||||
|
||||
/* currently only support little-endian. */
|
||||
#undef GRUB_TARGET_WORDS_BIGENDIAN
|
||||
|
||||
/* Unaligned accesses only supported if MMU enabled */
|
||||
#undef GRUB_HAVE_UNALIGNED_ACCESS
|
||||
|
||||
#endif /* ! GRUB_TYPES_CPU_HEADER */
|
|
@ -1534,7 +1534,8 @@ struct grub_efi_block_io
|
|||
};
|
||||
typedef struct grub_efi_block_io grub_efi_block_io_t;
|
||||
|
||||
#if (GRUB_TARGET_SIZEOF_VOID_P == 4) || defined (__ia64__)
|
||||
#if (GRUB_TARGET_SIZEOF_VOID_P == 4) || defined (__ia64__) \
|
||||
|| defined (__aarch64__)
|
||||
|
||||
#define efi_call_0(func) func()
|
||||
#define efi_call_1(func, a) func(a)
|
||||
|
|
|
@ -67,6 +67,7 @@ struct grub_pe32_coff_header
|
|||
#define GRUB_PE32_MACHINE_IA64 0x200
|
||||
#define GRUB_PE32_MACHINE_X86_64 0x8664
|
||||
#define GRUB_PE32_MACHINE_ARMTHUMB_MIXED 0x01c2
|
||||
#define GRUB_PE32_MACHINE_ARM64 0xAA64
|
||||
|
||||
#define GRUB_PE32_RELOCS_STRIPPED 0x0001
|
||||
#define GRUB_PE32_EXECUTABLE_IMAGE 0x0002
|
||||
|
|
|
@ -246,6 +246,7 @@ typedef struct
|
|||
#define EM_ARC_A5 93 /* ARC Cores Tangent-A5 */
|
||||
#define EM_XTENSA 94 /* Tensilica Xtensa Architecture */
|
||||
#define EM_NUM 95
|
||||
#define EM_AARCH64 183 /* ARM 64-bit architecture */
|
||||
|
||||
/* If it is necessary to assign new unofficial EM_* values, please
|
||||
pick large random numbers (0x8523, 0xa7f2, etc.) to minimize the
|
||||
|
@ -2062,6 +2063,21 @@ typedef Elf32_Addr Elf32_Conflict;
|
|||
#define SHT_ARM_ATTRIBUTES (SHT_LOPROC + 3) /* ARM attributes section. */
|
||||
|
||||
|
||||
/* AArch64 relocs. */
|
||||
#define R_AARCH64_NONE 0 /* No relocation. */
|
||||
#define R_AARCH64_ABS64 257 /* Direct 64 bit. */
|
||||
#define R_AARCH64_ABS32 258 /* Direct 32 bit. */
|
||||
#define R_AARCH64_JUMP26 282 /* 26-bit relative. */
|
||||
#define R_AARCH64_CALL26 283 /* 26-bit relative. */
|
||||
#define R_AARCH64_COPY 1024 /* Copy symbol at runtime. */
|
||||
#define R_AARCH64_GLOB_DAT 1025 /* Create GOT entry. */
|
||||
#define R_AARCH64_JUMP_SLOT 1026 /* Create PLT entry. */
|
||||
#define R_AARCH64_RELATIVE 1027 /* Adjust by program base. */
|
||||
#define R_AARCH64_TLS_DTPMOD64 1028 /* Module number, 64 bit. */
|
||||
#define R_AARCH64_TLS_DTPREL64 1029 /* Module-relative offset, 64 bit. */
|
||||
#define R_AARCH64_TLS_TPREL64 1030 /* TP-relative offset, 64 bit. */
|
||||
#define R_AARCH64_TLSDESC 1031 /* TLS Descriptor. */
|
||||
|
||||
/* ARM relocs. */
|
||||
#define R_ARM_NONE 0 /* No reloc */
|
||||
#define R_ARM_PC24 1 /* PC relative 26 bit branch */
|
||||
|
|
|
@ -92,6 +92,7 @@ enum grub_install_plat
|
|||
GRUB_INSTALL_PLATFORM_MIPS_QEMU_MIPS,
|
||||
GRUB_INSTALL_PLATFORM_I386_XEN,
|
||||
GRUB_INSTALL_PLATFORM_X86_64_XEN,
|
||||
GRUB_INSTALL_PLATFORM_ARM64_EFI,
|
||||
GRUB_INSTALL_PLATFORM_MAX
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue