merge mainline into net
This commit is contained in:
commit
dc5aeea5b9
103 changed files with 2530 additions and 690 deletions
|
@ -19,8 +19,10 @@
|
|||
#ifndef GRUB_ACPI_HEADER
|
||||
#define GRUB_ACPI_HEADER 1
|
||||
|
||||
#ifndef GRUB_DSDT_TEST
|
||||
#include <grub/types.h>
|
||||
#include <grub/err.h>
|
||||
#endif
|
||||
|
||||
struct grub_acpi_rsdp_v10
|
||||
{
|
||||
|
@ -139,6 +141,7 @@ enum
|
|||
GRUB_ACPI_MADT_ENTRY_SAPIC_FLAGS_ENABLED = 1
|
||||
};
|
||||
|
||||
#ifndef GRUB_DSDT_TEST
|
||||
struct grub_acpi_rsdp_v10 *grub_acpi_get_rsdpv1 (void);
|
||||
struct grub_acpi_rsdp_v20 *grub_acpi_get_rsdpv2 (void);
|
||||
struct grub_acpi_rsdp_v10 *grub_machine_acpi_get_rsdpv1 (void);
|
||||
|
@ -148,6 +151,7 @@ grub_uint8_t grub_byte_checksum (void *base, grub_size_t size);
|
|||
grub_err_t grub_acpi_create_ebda (void);
|
||||
|
||||
void grub_acpi_halt (void);
|
||||
#endif
|
||||
|
||||
#define GRUB_ACPI_SLP_EN (1 << 13)
|
||||
#define GRUB_ACPI_SLP_TYP_OFFSET 10
|
||||
|
@ -165,7 +169,8 @@ enum
|
|||
{
|
||||
GRUB_ACPI_EXTOPCODE_MUTEX = 0x01,
|
||||
GRUB_ACPI_EXTOPCODE_OPERATION_REGION = 0x80,
|
||||
GRUB_ACPI_EXTOPCODE_FIELD_OP = 0x81
|
||||
GRUB_ACPI_EXTOPCODE_FIELD_OP = 0x81,
|
||||
GRUB_ACPI_EXTOPCODE_INDEX_FIELD_OP = 0x86,
|
||||
};
|
||||
|
||||
#endif /* ! GRUB_ACPI_HEADER */
|
||||
|
|
34
include/grub/decompressor.h
Normal file
34
include/grub/decompressor.h
Normal file
|
@ -0,0 +1,34 @@
|
|||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 2010 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_DECOMPRESSOR_HEADER
|
||||
#define GRUB_DECOMPRESSOR_HEADER 1
|
||||
|
||||
void
|
||||
grub_decompress_core (void *src, void *dst, unsigned long srcsize,
|
||||
unsigned long dstsize);
|
||||
|
||||
void
|
||||
find_scratch (void *src, void *dst, unsigned long srcsize,
|
||||
unsigned long dstsize);
|
||||
|
||||
#define GRUB_DECOMPRESSOR_DICT_SIZE (1 << 16)
|
||||
|
||||
extern void *grub_decompressor_scratch;
|
||||
|
||||
#endif
|
|
@ -79,6 +79,7 @@ struct grub_disk_dev
|
|||
|
||||
#ifdef GRUB_UTIL
|
||||
struct grub_disk_memberlist *(*memberlist) (struct grub_disk *disk);
|
||||
const char * (*raidname) (struct grub_disk *disk);
|
||||
#endif
|
||||
|
||||
/* The next disk device. */
|
||||
|
|
|
@ -55,25 +55,25 @@ struct grub_extcmd_context
|
|||
};
|
||||
typedef struct grub_extcmd_context *grub_extcmd_context_t;
|
||||
|
||||
grub_extcmd_t grub_register_extcmd (const char *name,
|
||||
grub_extcmd_func_t func,
|
||||
grub_command_flags_t flags,
|
||||
const char *summary,
|
||||
const char *description,
|
||||
const struct grub_arg_option *parser);
|
||||
grub_extcmd_t EXPORT_FUNC(grub_register_extcmd) (const char *name,
|
||||
grub_extcmd_func_t func,
|
||||
grub_command_flags_t flags,
|
||||
const char *summary,
|
||||
const char *description,
|
||||
const struct grub_arg_option *parser);
|
||||
|
||||
grub_extcmd_t grub_register_extcmd_prio (const char *name,
|
||||
grub_extcmd_func_t func,
|
||||
grub_command_flags_t flags,
|
||||
const char *summary,
|
||||
const char *description,
|
||||
const struct grub_arg_option *parser,
|
||||
int prio);
|
||||
grub_extcmd_t EXPORT_FUNC(grub_register_extcmd_prio) (const char *name,
|
||||
grub_extcmd_func_t func,
|
||||
grub_command_flags_t flags,
|
||||
const char *summary,
|
||||
const char *description,
|
||||
const struct grub_arg_option *parser,
|
||||
int prio);
|
||||
|
||||
void grub_unregister_extcmd (grub_extcmd_t cmd);
|
||||
void EXPORT_FUNC(grub_unregister_extcmd) (grub_extcmd_t cmd);
|
||||
|
||||
grub_err_t
|
||||
grub_extcmd_dispatcher (struct grub_command *cmd, int argc, char **args,
|
||||
struct grub_script *script);
|
||||
grub_err_t EXPORT_FUNC(grub_extcmd_dispatcher) (struct grub_command *cmd,
|
||||
int argc, char **args,
|
||||
struct grub_script *script);
|
||||
|
||||
#endif /* ! GRUB_EXTCMD_HEADER */
|
||||
|
|
|
@ -72,7 +72,7 @@ struct grub_extcmd;
|
|||
int grub_arg_parse (struct grub_extcmd *cmd, int argc, char **argv,
|
||||
struct grub_arg_list *usr, char ***args, int *argnum);
|
||||
|
||||
void grub_arg_show_help (struct grub_extcmd *cmd);
|
||||
void EXPORT_FUNC(grub_arg_show_help) (struct grub_extcmd *cmd);
|
||||
struct grub_arg_list* grub_arg_list_alloc (struct grub_extcmd *cmd,
|
||||
int argc, char *argv[]);
|
||||
|
||||
|
|
|
@ -53,15 +53,19 @@ grub_multiboot_add_elfsyms (grub_size_t num, grub_size_t entsize,
|
|||
grub_uint32_t grub_get_multiboot_mmap_count (void);
|
||||
grub_err_t grub_multiboot_set_video_mode (void);
|
||||
|
||||
#if defined (GRUB_MACHINE_PCBIOS) || defined (GRUB_MACHINE_COREBOOT) || defined (GRUB_MACHINE_MULTIBOOT) || defined (GRUB_MACHINE_QEMU)
|
||||
#include <grub/i386/pc/vbe.h>
|
||||
#define GRUB_MACHINE_HAS_VGA_TEXT 1
|
||||
/* FIXME: support coreboot as well. */
|
||||
#if defined (GRUB_MACHINE_PCBIOS)
|
||||
#define GRUB_MACHINE_HAS_VBE 1
|
||||
#else
|
||||
#define GRUB_MACHINE_HAS_VGA_TEXT 0
|
||||
#define GRUB_MACHINE_HAS_VBE 0
|
||||
#endif
|
||||
|
||||
#if defined (GRUB_MACHINE_PCBIOS) || defined (GRUB_MACHINE_COREBOOT) || defined (GRUB_MACHINE_MULTIBOOT) || defined (GRUB_MACHINE_QEMU)
|
||||
#define GRUB_MACHINE_HAS_VGA_TEXT 1
|
||||
#else
|
||||
#define GRUB_MACHINE_HAS_VGA_TEXT 0
|
||||
#endif
|
||||
|
||||
#if defined (GRUB_MACHINE_EFI) || defined (GRUB_MACHINE_PCBIOS) || defined (GRUB_MACHINE_COREBOOT) || defined (GRUB_MACHINE_MULTIBOOT)
|
||||
#define GRUB_MACHINE_HAS_ACPI 1
|
||||
#else
|
||||
|
|
|
@ -34,11 +34,13 @@
|
|||
/* The offset of GRUB_INSTALL_BSD_PART. */
|
||||
#define GRUB_KERNEL_I386_PC_INSTALL_BSD_PART 0x18
|
||||
|
||||
/* The offset of multiboot signature. */
|
||||
#define GRUB_KERNEL_I386_PC_MULTIBOOT_SIGNATURE 0x1c
|
||||
/* Offset of reed_solomon_redundancy. */
|
||||
#define GRUB_KERNEL_I386_PC_REED_SOLOMON_REDUNDANCY 0x1c
|
||||
|
||||
/* The size of the first region which won't be compressed. */
|
||||
#define GRUB_KERNEL_I386_PC_RAW_SIZE 0x5D8
|
||||
#define GRUB_KERNEL_I386_PC_RAW_SIZE 0xc90
|
||||
|
||||
#define GRUB_KERNEL_I386_PC_NO_REED_SOLOMON_PART 0x6f8
|
||||
|
||||
/* The offset of GRUB_PREFIX. */
|
||||
#define GRUB_KERNEL_I386_PC_PREFIX GRUB_KERNEL_I386_PC_RAW_SIZE
|
||||
|
@ -102,13 +104,12 @@
|
|||
|
||||
#define GRUB_KERNEL_MIPS_YEELOONG_LINK_ALIGN 32
|
||||
|
||||
#define GRUB_KERNEL_MIPS_YEELOONG_RAW_SIZE 0x200
|
||||
#define GRUB_KERNEL_MIPS_YEELOONG_COMPRESSED_SIZE 0x8
|
||||
#define GRUB_KERNEL_MIPS_YEELOONG_TOTAL_MODULE_SIZE 0xc
|
||||
#define GRUB_KERNEL_MIPS_YEELOONG_KERNEL_IMAGE_SIZE 0x10
|
||||
#define GRUB_KERNEL_MIPS_YEELOONG_COMPRESSED_SIZE 0x8
|
||||
#define GRUB_KERNEL_MIPS_YEELOONG_UNCOMPRESSED_SIZE 0xc
|
||||
|
||||
#define GRUB_KERNEL_MIPS_YEELOONG_PREFIX GRUB_KERNEL_MIPS_YEELOONG_RAW_SIZE
|
||||
#define GRUB_KERNEL_MIPS_YEELOONG_PREFIX_END GRUB_KERNEL_MIPS_YEELOONG_RAW_SIZE + 0x48
|
||||
#define GRUB_KERNEL_MIPS_YEELOONG_TOTAL_MODULE_SIZE 0x08
|
||||
#define GRUB_KERNEL_MIPS_YEELOONG_PREFIX 0x0c
|
||||
#define GRUB_KERNEL_MIPS_YEELOONG_PREFIX_END 0x54
|
||||
|
||||
/* The offset of GRUB_PREFIX. */
|
||||
#define GRUB_KERNEL_I386_EFI_PREFIX 0x8
|
||||
|
@ -158,6 +159,7 @@
|
|||
#define GRUB_KERNEL_MACHINE_TOTAL_MODULE_SIZE GRUB_OFFSETS_CONCAT (GRUB_KERNEL_, GRUB_MACHINE, _TOTAL_MODULE_SIZE)
|
||||
#define GRUB_KERNEL_MACHINE_KERNEL_IMAGE_SIZE GRUB_OFFSETS_CONCAT (GRUB_KERNEL_, GRUB_MACHINE, _KERNEL_IMAGE_SIZE)
|
||||
#define GRUB_KERNEL_MACHINE_COMPRESSED_SIZE GRUB_OFFSETS_CONCAT (GRUB_KERNEL_, GRUB_MACHINE, _COMPRESSED_SIZE)
|
||||
#define GRUB_KERNEL_MACHINE_UNCOMPRESSED_SIZE GRUB_OFFSETS_CONCAT (GRUB_KERNEL_, GRUB_MACHINE, _UNCOMPRESSED_SIZE)
|
||||
|
||||
#define GRUB_KERNEL_MACHINE_PREFIX GRUB_OFFSETS_CONCAT (GRUB_KERNEL_, GRUB_MACHINE, _PREFIX)
|
||||
#define GRUB_KERNEL_MACHINE_PREFIX_END GRUB_OFFSETS_CONCAT (GRUB_KERNEL_, GRUB_MACHINE, _PREFIX_END)
|
||||
|
|
|
@ -48,8 +48,9 @@ struct grub_partition_map
|
|||
const grub_partition_t partition));
|
||||
#ifdef GRUB_UTIL
|
||||
/* Determine sectors available for embedding. */
|
||||
grub_err_t (*embed) (struct grub_disk *disk, unsigned int nsectors,
|
||||
grub_embed_type_t embed_type, grub_disk_addr_t *sectors);
|
||||
grub_err_t (*embed) (struct grub_disk *disk, unsigned int *nsectors,
|
||||
grub_embed_type_t embed_type,
|
||||
grub_disk_addr_t **sectors);
|
||||
#endif
|
||||
};
|
||||
typedef struct grub_partition_map *grub_partition_map_t;
|
||||
|
|
|
@ -54,6 +54,10 @@ struct grub_raid_array
|
|||
grub_disk_addr_t start_sector[GRUB_RAID_MAX_DEVICES];
|
||||
/* Start of each device, in 512 byte sectors. */
|
||||
struct grub_raid_array *next;
|
||||
|
||||
#ifdef GRUB_UTIL
|
||||
struct grub_raid *driver;
|
||||
#endif
|
||||
};
|
||||
|
||||
struct grub_raid
|
||||
|
|
30
include/grub/reed_solomon.h
Normal file
30
include/grub/reed_solomon.h
Normal file
|
@ -0,0 +1,30 @@
|
|||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 2010 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_REED_SOLOMON_HEADER
|
||||
#define GRUB_REED_SOLOMON_HEADER 1
|
||||
|
||||
void
|
||||
grub_reed_solomon_add_redundancy (void *buffer, grub_size_t data_size,
|
||||
grub_size_t redundancy);
|
||||
|
||||
void
|
||||
grub_reed_solomon_recover (void *buffer, grub_size_t data_size,
|
||||
grub_size_t redundancy);
|
||||
|
||||
#endif
|
|
@ -40,7 +40,7 @@ static inline grub_uint32_t
|
|||
grub_make_scsi_id (int subsystem, int bus, int lun)
|
||||
{
|
||||
return (subsystem << GRUB_SCSI_ID_SUBSYSTEM_SHIFT)
|
||||
| (bus << GRUB_SCSI_ID_BUS_SHIFT) | (lun << GRUB_SCSI_ID_BUS_SHIFT);
|
||||
| (bus << GRUB_SCSI_ID_BUS_SHIFT) | (lun << GRUB_SCSI_ID_LUN_SHIFT);
|
||||
}
|
||||
|
||||
struct grub_scsi_dev
|
||||
|
|
|
@ -72,7 +72,11 @@ struct grub_serial_port
|
|||
*/
|
||||
union
|
||||
{
|
||||
grub_port_t port;
|
||||
struct
|
||||
{
|
||||
grub_port_t port;
|
||||
int broken;
|
||||
};
|
||||
struct
|
||||
{
|
||||
grub_usb_device_t usbdev;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue