Merge branch 'master' into leiflindholm/arm64
Conflicts: include/grub/util/install.h
This commit is contained in:
commit
d6c92cdc34
82 changed files with 2897 additions and 353 deletions
|
@ -88,6 +88,7 @@ enum gcry_cipher_modes
|
|||
/* Don't rely on this. Check! */
|
||||
#define GRUB_CRYPTO_MAX_MDLEN 64
|
||||
#define GRUB_CRYPTO_MAX_CIPHER_BLOCKSIZE 16
|
||||
#define GRUB_CRYPTO_MAX_MD_CONTEXT_SIZE 256
|
||||
|
||||
/* Type for the cipher_setkey function. */
|
||||
typedef gcry_err_code_t (*gcry_cipher_setkey_t) (void *c,
|
||||
|
|
|
@ -179,7 +179,7 @@ struct grub_dl
|
|||
Elf_Sym *symtab;
|
||||
void (*init) (struct grub_dl *mod);
|
||||
void (*fini) (void);
|
||||
#if defined (__ia64__) || defined (__powerpc__)
|
||||
#if defined (__ia64__) || defined (__powerpc__) || defined (__mips__)
|
||||
void *got;
|
||||
void *tramp;
|
||||
#endif
|
||||
|
@ -243,23 +243,21 @@ void grub_arch_dl_init_linker (void);
|
|||
#define GRUB_IA64_DL_TRAMP_SIZE 48
|
||||
#define GRUB_IA64_DL_GOT_ALIGN 16
|
||||
|
||||
void
|
||||
grub_err_t
|
||||
grub_ia64_dl_get_tramp_got_size (const void *ehdr, grub_size_t *tramp,
|
||||
grub_size_t *got);
|
||||
|
||||
#if defined (__ia64__)
|
||||
#define GRUB_ARCH_DL_TRAMP_ALIGN GRUB_IA64_DL_TRAMP_ALIGN
|
||||
#define GRUB_ARCH_DL_GOT_ALIGN GRUB_IA64_DL_GOT_ALIGN
|
||||
#define GRUB_ARCH_DL_TRAMP_SIZE GRUB_IA64_DL_TRAMP_SIZE
|
||||
#define grub_arch_dl_get_tramp_got_size grub_ia64_dl_get_tramp_got_size
|
||||
#else
|
||||
void
|
||||
grub_err_t
|
||||
grub_arch_dl_get_tramp_got_size (const void *ehdr, grub_size_t *tramp,
|
||||
grub_size_t *got);
|
||||
#endif
|
||||
|
||||
#ifdef __powerpc__
|
||||
#define GRUB_ARCH_DL_TRAMP_SIZE 16
|
||||
#if defined (__powerpc__) || defined (__mips__)
|
||||
#define GRUB_ARCH_DL_TRAMP_ALIGN 4
|
||||
#define GRUB_ARCH_DL_GOT_ALIGN 4
|
||||
#endif
|
||||
|
|
|
@ -28,14 +28,8 @@
|
|||
#include <grub/memory.h>
|
||||
#endif
|
||||
|
||||
#define GRUB_MEMORY_MACHINE_SCRATCH_ADDR 0x68000
|
||||
#define GRUB_MEMORY_MACHINE_SCRATCH_SEG (GRUB_MEMORY_MACHINE_SCRATCH_ADDR >> 4)
|
||||
#define GRUB_MEMORY_MACHINE_SCRATCH_SIZE 0x10000
|
||||
|
||||
#define GRUB_MEMORY_MACHINE_LOWER_USABLE 0x9fc00 /* 640 kiB - 1 kiB */
|
||||
|
||||
#define GRUB_MEMORY_MACHINE_UPPER_START 0x100000 /* 1 MiB */
|
||||
#define GRUB_MEMORY_MACHINE_LOWER_SIZE GRUB_MEMORY_MACHINE_UPPER_START
|
||||
#include <grub/i386/memory.h>
|
||||
#include <grub/i386/memory_raw.h>
|
||||
|
||||
#ifndef ASM_FILE
|
||||
|
||||
|
|
|
@ -28,6 +28,9 @@
|
|||
#define GRUB_MEMORY_CPU_AMD64_MSR 0xc0000080
|
||||
#define GRUB_MEMORY_CPU_AMD64_MSR_ON 0x00000100
|
||||
|
||||
#define GRUB_MEMORY_MACHINE_UPPER_START 0x100000 /* 1 MiB */
|
||||
#define GRUB_MEMORY_MACHINE_LOWER_SIZE GRUB_MEMORY_MACHINE_UPPER_START
|
||||
|
||||
#ifndef ASM_FILE
|
||||
|
||||
#define GRUB_MMAP_MALLOC_LOW 1
|
||||
|
|
58
include/grub/i386/memory_raw.h
Normal file
58
include/grub/i386/memory_raw.h
Normal file
|
@ -0,0 +1,58 @@
|
|||
/* memory_raw.h - describe the memory map on qemu/coreboot/multiboot/pc */
|
||||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 2002,2007,2008,2009,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_MEMORY_CPU_RAW_HEADER
|
||||
#define GRUB_MEMORY_CPU_RAW_HEADER 1
|
||||
|
||||
/* The scratch buffer used in real mode code. */
|
||||
#define GRUB_MEMORY_MACHINE_SCRATCH_ADDR 0x68000
|
||||
#define GRUB_MEMORY_MACHINE_SCRATCH_SEG (GRUB_MEMORY_MACHINE_SCRATCH_ADDR >> 4)
|
||||
#define GRUB_MEMORY_MACHINE_SCRATCH_SIZE 0x9000
|
||||
|
||||
/* The real mode stack. */
|
||||
#define GRUB_MEMORY_MACHINE_REAL_STACK (0x2000 - 0x10)
|
||||
|
||||
/* The size of the protect mode stack. */
|
||||
#define GRUB_MEMORY_MACHINE_PROT_STACK_SIZE 0xf000
|
||||
|
||||
/* The protected mode stack. */
|
||||
#define GRUB_MEMORY_MACHINE_PROT_STACK \
|
||||
(GRUB_MEMORY_MACHINE_SCRATCH_ADDR + GRUB_MEMORY_MACHINE_SCRATCH_SIZE \
|
||||
+ GRUB_MEMORY_MACHINE_PROT_STACK_SIZE - 0x10)
|
||||
|
||||
/* The memory area where GRUB uses its own purpose. This part is not added
|
||||
into free memory for dynamic allocations. */
|
||||
#define GRUB_MEMORY_MACHINE_RESERVED_START \
|
||||
GRUB_MEMORY_MACHINE_SCRATCH_ADDR
|
||||
#define GRUB_MEMORY_MACHINE_RESERVED_END \
|
||||
(GRUB_MEMORY_MACHINE_PROT_STACK + 0x10)
|
||||
|
||||
/* The code segment of the protected mode. */
|
||||
#define GRUB_MEMORY_MACHINE_PROT_MODE_CSEG 0x8
|
||||
|
||||
/* The data segment of the protected mode. */
|
||||
#define GRUB_MEMORY_MACHINE_PROT_MODE_DSEG 0x10
|
||||
|
||||
/* The code segment of the pseudo real mode. */
|
||||
#define GRUB_MEMORY_MACHINE_PSEUDO_REAL_CSEG 0x18
|
||||
|
||||
/* The data segment of the pseudo real mode. */
|
||||
#define GRUB_MEMORY_MACHINE_PSEUDO_REAL_DSEG 0x20
|
||||
|
||||
#endif
|
|
@ -28,32 +28,10 @@
|
|||
#endif
|
||||
|
||||
#include <grub/i386/memory.h>
|
||||
#include <grub/i386/memory_raw.h>
|
||||
|
||||
#include <grub/offsets.h>
|
||||
|
||||
/* The scratch buffer used in real mode code. */
|
||||
#define GRUB_MEMORY_MACHINE_SCRATCH_ADDR 0x68000
|
||||
#define GRUB_MEMORY_MACHINE_SCRATCH_SEG (GRUB_MEMORY_MACHINE_SCRATCH_ADDR >> 4)
|
||||
#define GRUB_MEMORY_MACHINE_SCRATCH_SIZE 0x10000
|
||||
|
||||
/* The real mode stack. */
|
||||
#define GRUB_MEMORY_MACHINE_REAL_STACK (0x2000 - 0x10)
|
||||
|
||||
/* The size of the protect mode stack. */
|
||||
#define GRUB_MEMORY_MACHINE_PROT_STACK_SIZE 0x8000
|
||||
|
||||
/* The protected mode stack. */
|
||||
#define GRUB_MEMORY_MACHINE_PROT_STACK \
|
||||
(GRUB_MEMORY_MACHINE_SCRATCH_ADDR + GRUB_MEMORY_MACHINE_SCRATCH_SIZE \
|
||||
+ GRUB_MEMORY_MACHINE_PROT_STACK_SIZE - 0x10)
|
||||
|
||||
/* The memory area where GRUB uses its own purpose. This part is not added
|
||||
into free memory for dynamic allocations. */
|
||||
#define GRUB_MEMORY_MACHINE_RESERVED_START \
|
||||
GRUB_MEMORY_MACHINE_SCRATCH_ADDR
|
||||
#define GRUB_MEMORY_MACHINE_RESERVED_END \
|
||||
(GRUB_MEMORY_MACHINE_PROT_STACK + 0x10)
|
||||
|
||||
/* The area where GRUB is decompressed at early startup. */
|
||||
#define GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR 0x100000
|
||||
|
||||
|
@ -63,18 +41,6 @@
|
|||
/* The address where another boot loader is loaded. */
|
||||
#define GRUB_MEMORY_MACHINE_BOOT_LOADER_ADDR 0x7c00
|
||||
|
||||
/* The code segment of the protected mode. */
|
||||
#define GRUB_MEMORY_MACHINE_PROT_MODE_CSEG 0x8
|
||||
|
||||
/* The data segment of the protected mode. */
|
||||
#define GRUB_MEMORY_MACHINE_PROT_MODE_DSEG 0x10
|
||||
|
||||
/* The code segment of the pseudo real mode. */
|
||||
#define GRUB_MEMORY_MACHINE_PSEUDO_REAL_CSEG 0x18
|
||||
|
||||
/* The data segment of the pseudo real mode. */
|
||||
#define GRUB_MEMORY_MACHINE_PSEUDO_REAL_DSEG 0x20
|
||||
|
||||
#define GRUB_MEMORY_MACHINE_BIOS_DATA_AREA_ADDR 0x400
|
||||
|
||||
#ifndef ASM_FILE
|
||||
|
|
|
@ -1,36 +1 @@
|
|||
/* memory.h - describe the memory map */
|
||||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 2002,2007 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_MEMORY_MACHINE_HEADER
|
||||
#define _GRUB_MEMORY_MACHINE_HEADER 1
|
||||
|
||||
#include <grub/symbol.h>
|
||||
#include <grub/i386/coreboot/memory.h>
|
||||
|
||||
#ifndef ASM_FILE
|
||||
#include <grub/err.h>
|
||||
#include <grub/types.h>
|
||||
#endif
|
||||
|
||||
#define GRUB_MEMORY_MACHINE_LOWER_USABLE 0x9fc00 /* 640 kiB - 1 kiB */
|
||||
|
||||
#define GRUB_MEMORY_MACHINE_UPPER_START 0x100000 /* 1 MiB */
|
||||
#define GRUB_MEMORY_MACHINE_LOWER_SIZE GRUB_MEMORY_MACHINE_UPPER_START
|
||||
|
||||
#endif /* ! _GRUB_MEMORY_MACHINE_HEADER */
|
||||
|
|
|
@ -421,6 +421,10 @@ void EXPORT_FUNC(grub_reboot) (void) __attribute__ ((noreturn));
|
|||
void grub_reboot (void) __attribute__ ((noreturn));
|
||||
#endif
|
||||
|
||||
#if defined (__clang__) && !defined (GRUB_UTIL)
|
||||
void __attribute__ ((noreturn)) EXPORT_FUNC (abort) (void);
|
||||
#endif
|
||||
|
||||
#ifdef GRUB_MACHINE_PCBIOS
|
||||
/* Halt the system, using APM if possible. If NO_APM is true, don't
|
||||
* use APM even if it is available. */
|
||||
|
|
|
@ -27,6 +27,12 @@
|
|||
/* Add an underscore to a C symbol in assembler code if needed. */
|
||||
#ifndef GRUB_UTIL
|
||||
|
||||
#ifdef __APPLE__
|
||||
#define MACRO_DOLLAR(x) $$ ## x
|
||||
#else
|
||||
#define MACRO_DOLLAR(x) $ ## x
|
||||
#endif
|
||||
|
||||
#if HAVE_ASM_USCORE
|
||||
#ifdef ASM_FILE
|
||||
# define EXT_C(sym) _ ## sym
|
||||
|
|
|
@ -87,6 +87,8 @@ enum grub_install_plat
|
|||
GRUB_INSTALL_PLATFORM_ARM_EFI,
|
||||
GRUB_INSTALL_PLATFORM_MIPSEL_QEMU_MIPS,
|
||||
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