remove all trailing whitespace
This commit is contained in:
parent
d2d4966571
commit
b39f9d20a9
222 changed files with 3286 additions and 3286 deletions
|
@ -50,7 +50,7 @@ struct grub_acpi_table_header
|
|||
grub_uint8_t oemtable[8];
|
||||
grub_uint32_t oemrev;
|
||||
grub_uint8_t creator_id[4];
|
||||
grub_uint32_t creator_rev;
|
||||
grub_uint32_t creator_rev;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
struct grub_acpi_fadt
|
||||
|
|
|
@ -65,8 +65,8 @@ static inline grub_err_t grub_autoefi_prepare (void)
|
|||
# define SYSTEM_TABLE_SIZEOF GRUB_EFIEMU_SYSTEM_TABLE_SIZEOF
|
||||
# define SYSTEM_TABLE_VAR GRUB_EFIEMU_SYSTEM_TABLE_VAR
|
||||
# define SYSTEM_TABLE_PTR GRUB_EFIEMU_SYSTEM_TABLE_PTR
|
||||
# define SIZEOF_OF_UINTN GRUB_EFIEMU_SIZEOF_OF_UINTN
|
||||
# define SYSTEM_TABLE GRUB_EFIEMU_SYSTEM_TABLE
|
||||
# define SIZEOF_OF_UINTN GRUB_EFIEMU_SIZEOF_OF_UINTN
|
||||
# define SYSTEM_TABLE GRUB_EFIEMU_SYSTEM_TABLE
|
||||
# define grub_efi_allocate_pages(x,y) (x)
|
||||
# define grub_efi_free_pages(x,y) GRUB_EFI_SUCCESS
|
||||
# define EFI_PRESENT 1
|
||||
|
|
|
@ -41,7 +41,7 @@ grub_err_t grub_set_datetime (struct grub_datetime *datetime);
|
|||
int grub_get_weekday (struct grub_datetime *datetime);
|
||||
char *grub_get_weekday_name (struct grub_datetime *datetime);
|
||||
|
||||
void grub_unixtime2datetime (grub_int32_t nix,
|
||||
void grub_unixtime2datetime (grub_int32_t nix,
|
||||
struct grub_datetime *datetime);
|
||||
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@ struct grub_disk_dev
|
|||
|
||||
/* The device id used by the cache manager. */
|
||||
unsigned long id;
|
||||
|
||||
|
||||
/* Call HOOK with each device name, until HOOK returns non-zero. */
|
||||
int (*iterate) (int (*hook) (const char *name));
|
||||
|
||||
|
@ -102,7 +102,7 @@ struct grub_disk
|
|||
|
||||
/* The id used by the disk cache manager. */
|
||||
unsigned long id;
|
||||
|
||||
|
||||
/* The partition information. This is machine-specific. */
|
||||
struct grub_partition *partition;
|
||||
|
||||
|
|
|
@ -662,38 +662,38 @@ typedef struct grub_efi_table_header grub_efi_table_header_t;
|
|||
struct grub_efi_boot_services
|
||||
{
|
||||
grub_efi_table_header_t hdr;
|
||||
|
||||
|
||||
grub_efi_tpl_t
|
||||
(*raise_tpl) (grub_efi_tpl_t new_tpl);
|
||||
|
||||
|
||||
void
|
||||
(*restore_tpl) (grub_efi_tpl_t old_tpl);
|
||||
|
||||
|
||||
grub_efi_status_t
|
||||
(*allocate_pages) (grub_efi_allocate_type_t type,
|
||||
grub_efi_memory_type_t memory_type,
|
||||
grub_efi_uintn_t pages,
|
||||
grub_efi_physical_address_t *memory);
|
||||
|
||||
|
||||
grub_efi_status_t
|
||||
(*free_pages) (grub_efi_physical_address_t memory,
|
||||
grub_efi_uintn_t pages);
|
||||
|
||||
|
||||
grub_efi_status_t
|
||||
(*get_memory_map) (grub_efi_uintn_t *memory_map_size,
|
||||
grub_efi_memory_descriptor_t *memory_map,
|
||||
grub_efi_uintn_t *map_key,
|
||||
grub_efi_uintn_t *descriptor_size,
|
||||
grub_efi_uint32_t *descriptor_version);
|
||||
|
||||
|
||||
grub_efi_status_t
|
||||
(*allocate_pool) (grub_efi_memory_type_t pool_type,
|
||||
grub_efi_uintn_t size,
|
||||
void **buffer);
|
||||
|
||||
|
||||
grub_efi_status_t
|
||||
(*free_pool) (void *buffer);
|
||||
|
||||
|
||||
grub_efi_status_t
|
||||
(*create_event) (grub_efi_uint32_t type,
|
||||
grub_efi_tpl_t notify_tpl,
|
||||
|
@ -706,7 +706,7 @@ struct grub_efi_boot_services
|
|||
(*set_timer) (grub_efi_event_t event,
|
||||
grub_efi_timer_delay_t type,
|
||||
grub_efi_uint64_t trigger_time);
|
||||
|
||||
|
||||
grub_efi_status_t
|
||||
(*wait_for_event) (grub_efi_uintn_t num_events,
|
||||
grub_efi_event_t *event,
|
||||
|
@ -714,10 +714,10 @@ struct grub_efi_boot_services
|
|||
|
||||
grub_efi_status_t
|
||||
(*signal_event) (grub_efi_event_t event);
|
||||
|
||||
|
||||
grub_efi_status_t
|
||||
(*close_event) (grub_efi_event_t event);
|
||||
|
||||
|
||||
grub_efi_status_t
|
||||
(*check_event) (grub_efi_event_t event);
|
||||
|
||||
|
@ -726,13 +726,13 @@ struct grub_efi_boot_services
|
|||
grub_efi_guid_t *protocol,
|
||||
grub_efi_interface_type_t interface_type,
|
||||
void *interface);
|
||||
|
||||
|
||||
grub_efi_status_t
|
||||
(*reinstall_protocol_interface) (grub_efi_handle_t handle,
|
||||
grub_efi_guid_t *protocol,
|
||||
void *old_interface,
|
||||
void *new_interface);
|
||||
|
||||
|
||||
grub_efi_status_t
|
||||
(*uninstall_protocol_interface) (grub_efi_handle_t handle,
|
||||
grub_efi_guid_t *protocol,
|
||||
|
@ -742,9 +742,9 @@ struct grub_efi_boot_services
|
|||
(*handle_protocol) (grub_efi_handle_t handle,
|
||||
grub_efi_guid_t *protocol,
|
||||
void **interface);
|
||||
|
||||
|
||||
void *reserved;
|
||||
|
||||
|
||||
grub_efi_status_t
|
||||
(*register_protocol_notify) (grub_efi_guid_t *protocol,
|
||||
grub_efi_event_t event,
|
||||
|
@ -874,7 +874,7 @@ struct grub_efi_runtime_services
|
|||
{
|
||||
grub_efi_table_header_t hdr;
|
||||
|
||||
grub_efi_status_t
|
||||
grub_efi_status_t
|
||||
(*get_time) (grub_efi_time_t *time,
|
||||
grub_efi_time_capabilities_t *capabilities);
|
||||
|
||||
|
@ -944,11 +944,11 @@ struct grub_efi_simple_input_interface
|
|||
grub_efi_status_t
|
||||
(*reset) (struct grub_efi_simple_input_interface *this,
|
||||
grub_efi_boolean_t extended_verification);
|
||||
|
||||
|
||||
grub_efi_status_t
|
||||
(*read_key_stroke) (struct grub_efi_simple_input_interface *this,
|
||||
grub_efi_input_key_t *key);
|
||||
|
||||
|
||||
grub_efi_event_t wait_for_key;
|
||||
};
|
||||
typedef struct grub_efi_simple_input_interface grub_efi_simple_input_interface_t;
|
||||
|
@ -973,7 +973,7 @@ struct grub_efi_simple_text_output_interface
|
|||
grub_efi_uintn_t *columns,
|
||||
grub_efi_uintn_t *rows);
|
||||
|
||||
grub_efi_status_t
|
||||
grub_efi_status_t
|
||||
(*set_mode) (struct grub_efi_simple_text_output_interface *this,
|
||||
grub_efi_uintn_t mode_number);
|
||||
|
||||
|
@ -992,7 +992,7 @@ struct grub_efi_simple_text_output_interface
|
|||
grub_efi_status_t
|
||||
(*enable_cursor) (struct grub_efi_simple_text_output_interface *this,
|
||||
grub_efi_boolean_t visible);
|
||||
|
||||
|
||||
grub_efi_simple_text_output_mode_t *mode;
|
||||
};
|
||||
typedef struct grub_efi_simple_text_output_interface grub_efi_simple_text_output_interface_t;
|
||||
|
|
|
@ -30,14 +30,14 @@
|
|||
#define GRUB_MACHINE_MEMORY_NVS 4
|
||||
#define GRUB_MACHINE_MEMORY_CODE 5
|
||||
#define GRUB_MACHINE_MEMORY_MAX_TYPE 5
|
||||
/* This one is special: it's used internally but is never reported
|
||||
/* This one is special: it's used internally but is never reported
|
||||
by firmware. */
|
||||
#define GRUB_MACHINE_MEMORY_HOLE 6
|
||||
|
||||
|
||||
grub_err_t EXPORT_FUNC(grub_machine_mmap_iterate)
|
||||
grub_err_t EXPORT_FUNC(grub_machine_mmap_iterate)
|
||||
(int NESTED_FUNC_ATTR (*hook) (grub_uint64_t, grub_uint64_t, grub_uint32_t));
|
||||
grub_err_t grub_machine_mmap_register (grub_uint64_t start, grub_uint64_t size,
|
||||
grub_err_t grub_machine_mmap_register (grub_uint64_t start, grub_uint64_t size,
|
||||
int type, int handle);
|
||||
grub_err_t grub_machine_mmap_unregister (int handle);
|
||||
|
||||
|
|
|
@ -98,7 +98,7 @@ struct grub_pe32_optional_header
|
|||
grub_uint32_t bss_size;
|
||||
grub_uint32_t entry_addr;
|
||||
grub_uint32_t code_base;
|
||||
|
||||
|
||||
#if GRUB_TARGET_SIZEOF_VOID_P == 4
|
||||
grub_uint32_t data_base;
|
||||
grub_uint32_t image_base;
|
||||
|
@ -139,7 +139,7 @@ struct grub_pe32_optional_header
|
|||
|
||||
grub_uint32_t loader_flags;
|
||||
grub_uint32_t num_data_directories;
|
||||
|
||||
|
||||
/* Data directories. */
|
||||
struct grub_pe32_data_directory export_table;
|
||||
struct grub_pe32_data_directory import_table;
|
||||
|
@ -210,7 +210,7 @@ struct grub_pe32_header
|
|||
{
|
||||
/* This should be filled in with GRUB_PE32_MSDOS_STUB. */
|
||||
grub_uint8_t msdos_stub[GRUB_PE32_MSDOS_STUB_SIZE];
|
||||
|
||||
|
||||
/* This is always PE\0\0. */
|
||||
char signature[4];
|
||||
|
||||
|
|
|
@ -155,10 +155,10 @@ grub_err_t grub_efiemu_loadcore_init32 (void *core, grub_size_t core_size,
|
|||
grub_efiemu_segment_t *segments);
|
||||
grub_err_t grub_efiemu_loadcore_init64 (void *core, grub_size_t core_size,
|
||||
grub_efiemu_segment_t *segments);
|
||||
grub_err_t grub_efiemu_loadcore_load32 (void *core,
|
||||
grub_err_t grub_efiemu_loadcore_load32 (void *core,
|
||||
grub_size_t core_size,
|
||||
grub_efiemu_segment_t segments);
|
||||
grub_err_t grub_efiemu_loadcore_load64 (void *core,
|
||||
grub_err_t grub_efiemu_loadcore_load64 (void *core,
|
||||
grub_size_t core_size,
|
||||
grub_efiemu_segment_t segments);
|
||||
grub_err_t grub_efiemu_loadcore_unload32 (void);
|
||||
|
@ -189,14 +189,14 @@ struct grub_efiemu_configuration_table64
|
|||
} __attribute__ ((packed));
|
||||
typedef struct grub_efiemu_configuration_table32 grub_efiemu_configuration_table64_t;
|
||||
grub_err_t grub_efiemu_unregister_configuration_table (grub_efi_guid_t guid);
|
||||
grub_err_t
|
||||
grub_efiemu_register_configuration_table (grub_efi_guid_t guid,
|
||||
grub_err_t
|
||||
grub_efiemu_register_configuration_table (grub_efi_guid_t guid,
|
||||
void * (*get_table) (void *data),
|
||||
void (*unload) (void *data),
|
||||
void (*unload) (void *data),
|
||||
void *data);
|
||||
|
||||
/* Memory management functions */
|
||||
int grub_efiemu_request_memalign (grub_size_t align, grub_size_t size,
|
||||
int grub_efiemu_request_memalign (grub_size_t align, grub_size_t size,
|
||||
grub_efi_memory_type_t type);
|
||||
void *grub_efiemu_mm_obtain_request (int handle);
|
||||
int grub_efiemu_get_memory_map (grub_efi_uintn_t *memory_map_size,
|
||||
|
@ -218,8 +218,8 @@ int grub_efiemu_get_memory_map (grub_efi_uintn_t *memory_map_size,
|
|||
grub_efi_uintn_t *descriptor_size,
|
||||
grub_efi_uint32_t *descriptor_version);
|
||||
grub_err_t
|
||||
grub_efiemu_mmap_iterate (int NESTED_FUNC_ATTR (*hook) (grub_uint64_t,
|
||||
grub_uint64_t,
|
||||
grub_efiemu_mmap_iterate (int NESTED_FUNC_ATTR (*hook) (grub_uint64_t,
|
||||
grub_uint64_t,
|
||||
grub_uint32_t));
|
||||
int grub_efiemu_sizeof_uintn_t (void);
|
||||
int grub_efiemu_exit_boot_services (grub_efi_uintn_t map_key);
|
||||
|
@ -242,30 +242,30 @@ struct grub_efiemu_prepare_hook
|
|||
void (*unload) (void *data);
|
||||
void *data;
|
||||
};
|
||||
grub_err_t grub_efiemu_prepare32 (struct grub_efiemu_prepare_hook
|
||||
grub_err_t grub_efiemu_prepare32 (struct grub_efiemu_prepare_hook
|
||||
*prepare_hooks,
|
||||
struct grub_efiemu_configuration_table
|
||||
struct grub_efiemu_configuration_table
|
||||
*config_tables);
|
||||
grub_err_t grub_efiemu_prepare64 (struct grub_efiemu_prepare_hook
|
||||
grub_err_t grub_efiemu_prepare64 (struct grub_efiemu_prepare_hook
|
||||
*prepare_hooks,
|
||||
struct grub_efiemu_configuration_table
|
||||
struct grub_efiemu_configuration_table
|
||||
*config_tables);
|
||||
grub_err_t grub_efiemu_unload (void);
|
||||
grub_err_t grub_efiemu_prepare (void);
|
||||
grub_err_t
|
||||
grub_efiemu_register_prepare_hook (grub_err_t (*hook) (void *data),
|
||||
void (*unload) (void *data),
|
||||
void (*unload) (void *data),
|
||||
void *data);
|
||||
|
||||
/* symbols and pointers */
|
||||
grub_err_t grub_efiemu_alloc_syms (void);
|
||||
grub_err_t grub_efiemu_request_symbols (int num);
|
||||
grub_err_t grub_efiemu_resolve_symbol (const char *name,
|
||||
grub_err_t grub_efiemu_resolve_symbol (const char *name,
|
||||
int *handle, grub_off_t *off);
|
||||
grub_err_t grub_efiemu_register_symbol (const char *name,
|
||||
grub_err_t grub_efiemu_register_symbol (const char *name,
|
||||
int handle, grub_off_t off);
|
||||
void grub_efiemu_free_syms (void);
|
||||
grub_err_t grub_efiemu_write_value (void * addr, grub_uint32_t value,
|
||||
grub_err_t grub_efiemu_write_value (void * addr, grub_uint32_t value,
|
||||
int plus_handle,
|
||||
int minus_handle, int ptv_needed, int size);
|
||||
grub_err_t grub_efiemu_pnvram (void);
|
||||
|
|
|
@ -43,18 +43,18 @@ struct grub_fs
|
|||
|
||||
/* Call HOOK with each file under DIR. */
|
||||
grub_err_t (*dir) (grub_device_t device, const char *path,
|
||||
int (*hook) (const char *filename,
|
||||
int (*hook) (const char *filename,
|
||||
const struct grub_dirhook_info *info));
|
||||
|
||||
|
||||
/* Open a file named NAME and initialize FILE. */
|
||||
grub_err_t (*open) (struct grub_file *file, const char *name);
|
||||
|
||||
|
||||
/* Read LEN bytes data from FILE into BUF. */
|
||||
grub_ssize_t (*read) (struct grub_file *file, char *buf, grub_size_t len);
|
||||
|
||||
|
||||
/* Close the file FILE. */
|
||||
grub_err_t (*close) (struct grub_file *file);
|
||||
|
||||
|
||||
/* Return the label of the device DEVICE in LABEL. The label is
|
||||
returned in a grub_malloc'ed buffer and should be freed by the
|
||||
caller. */
|
||||
|
|
|
@ -47,7 +47,7 @@ struct grub_hfs_sblock
|
|||
|
||||
/* A pascal style string that holds the volumename. */
|
||||
grub_uint8_t volname[28];
|
||||
|
||||
|
||||
grub_uint8_t unused5[60];
|
||||
grub_uint16_t embed_sig;
|
||||
struct grub_hfs_extent embed_extent;
|
||||
|
|
|
@ -20,11 +20,11 @@
|
|||
#define GRUB_ARCH_EFI_EMU_HEADER 1
|
||||
|
||||
grub_err_t
|
||||
grub_arch_efiemu_relocate_symbols32 (grub_efiemu_segment_t segs,
|
||||
grub_arch_efiemu_relocate_symbols32 (grub_efiemu_segment_t segs,
|
||||
struct grub_efiemu_elf_sym *elfsyms,
|
||||
void *ehdr);
|
||||
grub_err_t
|
||||
grub_arch_efiemu_relocate_symbols64 (grub_efiemu_segment_t segs,
|
||||
grub_arch_efiemu_relocate_symbols64 (grub_efiemu_segment_t segs,
|
||||
struct grub_efiemu_elf_sym *elfsyms,
|
||||
void *ehdr);
|
||||
|
||||
|
|
|
@ -83,7 +83,7 @@ struct grub_e820_mmap
|
|||
|
||||
/* For the Linux/i386 boot protocol version 2.03. */
|
||||
struct linux_kernel_header
|
||||
{
|
||||
{
|
||||
grub_uint8_t code1[0x0020];
|
||||
grub_uint16_t cl_magic; /* Magic number 0xA33F */
|
||||
grub_uint16_t cl_offset; /* The offset of command line */
|
||||
|
@ -135,21 +135,21 @@ struct linux_kernel_params
|
|||
grub_uint8_t video_cursor_y;
|
||||
|
||||
grub_uint16_t ext_mem; /* 2 */
|
||||
|
||||
|
||||
grub_uint16_t video_page; /* 4 */
|
||||
grub_uint8_t video_mode; /* 6 */
|
||||
grub_uint8_t video_width; /* 7 */
|
||||
|
||||
|
||||
grub_uint8_t padding1[0xa - 0x8];
|
||||
|
||||
|
||||
grub_uint16_t video_ega_bx; /* a */
|
||||
|
||||
|
||||
grub_uint8_t padding2[0xe - 0xc];
|
||||
|
||||
|
||||
grub_uint8_t video_height; /* e */
|
||||
grub_uint8_t have_vga; /* f */
|
||||
grub_uint16_t font_size; /* 10 */
|
||||
|
||||
|
||||
grub_uint16_t lfb_width; /* 12 */
|
||||
grub_uint16_t lfb_height; /* 14 */
|
||||
grub_uint16_t lfb_depth; /* 16 */
|
||||
|
@ -183,16 +183,16 @@ struct linux_kernel_params
|
|||
grub_uint16_t apm_flags; /* 4c */
|
||||
grub_uint32_t apm_code_len; /* 4e */
|
||||
grub_uint16_t apm_data_len; /* 52 */
|
||||
|
||||
|
||||
grub_uint8_t padding4[0x60 - 0x54];
|
||||
|
||||
|
||||
grub_uint32_t ist_signature; /* 60 */
|
||||
grub_uint32_t ist_command; /* 64 */
|
||||
grub_uint32_t ist_event; /* 68 */
|
||||
grub_uint32_t ist_perf_level; /* 6c */
|
||||
|
||||
grub_uint8_t padding5[0x80 - 0x70];
|
||||
|
||||
|
||||
grub_uint8_t hd0_drive_info[0x10]; /* 80 */
|
||||
grub_uint8_t hd1_drive_info[0x10]; /* 90 */
|
||||
grub_uint16_t rom_config_len; /* a0 */
|
||||
|
@ -232,15 +232,15 @@ struct linux_kernel_params
|
|||
grub_uint32_t efi_mmap_hi; /* 1dc */
|
||||
} v0206;
|
||||
};
|
||||
|
||||
|
||||
grub_uint32_t alt_mem; /* 1e0 */
|
||||
|
||||
|
||||
grub_uint8_t padding8[0x1e8 - 0x1e4];
|
||||
|
||||
|
||||
grub_uint32_t mmap_size; /* 1e8 */
|
||||
|
||||
grub_uint8_t padding9[0x1f1 - 0x1ec];
|
||||
|
||||
|
||||
grub_uint8_t setup_sects; /* The size of the setup in sectors */
|
||||
grub_uint16_t root_flags; /* If the root is mounted readonly */
|
||||
grub_uint16_t syssize; /* obsolete */
|
||||
|
|
|
@ -72,7 +72,7 @@ struct grub_biosdisk_drp
|
|||
grub_uint8_t device_path[8];
|
||||
grub_uint8_t reserved2;
|
||||
grub_uint8_t checksum;
|
||||
|
||||
|
||||
/* XXX: This is necessary, because the BIOS of Thinkpad X20
|
||||
writes a garbage to the tail of drive parameters,
|
||||
regardless of a size specified in a caller. */
|
||||
|
|
|
@ -90,7 +90,7 @@ struct grub_machine_mmap_entry
|
|||
#define GRUB_MACHINE_MEMORY_ACPI 3
|
||||
#define GRUB_MACHINE_MEMORY_NVS 4
|
||||
#define GRUB_MACHINE_MEMORY_MAX_TYPE 4
|
||||
/* This one is special: it's used internally but is never reported
|
||||
/* This one is special: it's used internally but is never reported
|
||||
by firmware. */
|
||||
#define GRUB_MACHINE_MEMORY_HOLE 5
|
||||
|
||||
|
@ -107,19 +107,19 @@ grub_uint64_t grub_mmap_get_lower (void);
|
|||
#define GRUB_MMAP_MALLOC_LOW 1
|
||||
|
||||
#ifdef GRUB_MACHINE_PCBIOS
|
||||
grub_err_t grub_machine_mmap_register (grub_uint64_t start, grub_uint64_t size,
|
||||
grub_err_t grub_machine_mmap_register (grub_uint64_t start, grub_uint64_t size,
|
||||
int type, int handle);
|
||||
grub_err_t grub_machine_mmap_unregister (int handle);
|
||||
#else
|
||||
static inline grub_err_t
|
||||
grub_machine_mmap_register (grub_uint64_t start __attribute__ ((unused)),
|
||||
grub_uint64_t size __attribute__ ((unused)),
|
||||
int type __attribute__ ((unused)),
|
||||
static inline grub_err_t
|
||||
grub_machine_mmap_register (grub_uint64_t start __attribute__ ((unused)),
|
||||
grub_uint64_t size __attribute__ ((unused)),
|
||||
int type __attribute__ ((unused)),
|
||||
int handle __attribute__ ((unused)))
|
||||
{
|
||||
return GRUB_ERR_NONE;
|
||||
}
|
||||
static inline grub_err_t
|
||||
static inline grub_err_t
|
||||
grub_machine_mmap_unregister (int handle __attribute__ ((unused)))
|
||||
{
|
||||
return GRUB_ERR_NONE;
|
||||
|
|
|
@ -143,9 +143,9 @@ struct grub_vbe_mode_info_block
|
|||
grub_uint8_t lin_rsvd_field_position;
|
||||
grub_uint32_t max_pixel_clock;
|
||||
|
||||
/* Reserved field to make structure to be 256 bytes long, VESA BIOS
|
||||
Extension 3.0 Specification says to reserve 189 bytes here but
|
||||
that doesn't make structure to be 256 bytes. So additional one is
|
||||
/* Reserved field to make structure to be 256 bytes long, VESA BIOS
|
||||
Extension 3.0 Specification says to reserve 189 bytes here but
|
||||
that doesn't make structure to be 256 bytes. So additional one is
|
||||
added here. */
|
||||
grub_uint8_t reserved4[189 + 1];
|
||||
} __attribute__ ((packed));
|
||||
|
|
|
@ -41,7 +41,7 @@ grub_get_tsc (void)
|
|||
"pop %%rbx\n"
|
||||
#else
|
||||
"pop %%ebx\n"
|
||||
#endif
|
||||
#endif
|
||||
:::"%rax", "%rcx", "%rdx");
|
||||
#else
|
||||
__asm__ __volatile__ ("xorl %%eax, %%eax\n\t"
|
||||
|
|
|
@ -6,22 +6,22 @@ typedef grub_uint32_t grub_xnu_ptr_t;
|
|||
|
||||
struct grub_xnu_boot_params
|
||||
{
|
||||
grub_uint16_t verminor;
|
||||
grub_uint16_t vermajor;
|
||||
grub_uint16_t verminor;
|
||||
grub_uint16_t vermajor;
|
||||
/* Command line passed to xnu. */
|
||||
grub_uint8_t cmdline[1024];
|
||||
grub_uint8_t cmdline[1024];
|
||||
|
||||
/* Later are the same as EFI's get_memory_map (). */
|
||||
grub_xnu_ptr_t efi_mmap;
|
||||
grub_uint32_t efi_mmap_size;
|
||||
grub_uint32_t efi_mem_desc_size;
|
||||
grub_uint32_t efi_mem_desc_version;
|
||||
grub_xnu_ptr_t efi_mmap;
|
||||
grub_uint32_t efi_mmap_size;
|
||||
grub_uint32_t efi_mem_desc_size;
|
||||
grub_uint32_t efi_mem_desc_version;
|
||||
|
||||
/* Later are video parameters. */
|
||||
grub_xnu_ptr_t lfb_base;
|
||||
#define GRUB_XNU_VIDEO_SPLASH 1
|
||||
#define GRUB_XNU_VIDEO_TEXT_IN_VIDEO 2
|
||||
grub_uint32_t lfb_mode;
|
||||
grub_uint32_t lfb_mode;
|
||||
grub_uint32_t lfb_line_len;
|
||||
grub_uint32_t lfb_width;
|
||||
grub_uint32_t lfb_height;
|
||||
|
@ -30,12 +30,12 @@ struct grub_xnu_boot_params
|
|||
/* Pointer to device tree and its len. */
|
||||
grub_xnu_ptr_t devtree;
|
||||
grub_uint32_t devtreelen;
|
||||
|
||||
|
||||
/* First used address by kernel or boot structures. */
|
||||
grub_xnu_ptr_t heap_start;
|
||||
/* Last used address by kernel or boot structures minus previous value. */
|
||||
/* Last used address by kernel or boot structures minus previous value. */
|
||||
grub_uint32_t heap_size;
|
||||
|
||||
|
||||
/* First memory page containing runtime code or data. */
|
||||
grub_uint32_t efi_runtime_first_page;
|
||||
/* First memory page containing runtime code or data minus previous value. */
|
||||
|
|
|
@ -33,7 +33,7 @@ struct grub_ieee1275_devalias
|
|||
char *type;
|
||||
};
|
||||
|
||||
struct grub_ieee1275_mem_region
|
||||
struct grub_ieee1275_mem_region
|
||||
{
|
||||
unsigned int start;
|
||||
unsigned int size;
|
||||
|
@ -46,9 +46,9 @@ struct grub_ieee1275_mem_region
|
|||
#define IEEE1275_CALL_ENTRY_FN(args) (*grub_ieee1275_entry_fn) (args)
|
||||
#endif
|
||||
|
||||
/* All backcalls to the firmware is done by calling an entry function
|
||||
which was passed to us from the bootloader. When doing the backcall,
|
||||
a structure is passed which specifies what the firmware should do.
|
||||
/* All backcalls to the firmware is done by calling an entry function
|
||||
which was passed to us from the bootloader. When doing the backcall,
|
||||
a structure is passed which specifies what the firmware should do.
|
||||
NAME is the requested service. NR_INS and NR_OUTS is the number of
|
||||
passed arguments and the expected number of return values, resp. */
|
||||
struct grub_ieee1275_common_hdr
|
||||
|
@ -122,14 +122,14 @@ int EXPORT_FUNC(grub_ieee1275_get_integer_property) (grub_ieee1275_phandle_t pha
|
|||
grub_ssize_t *actual);
|
||||
int EXPORT_FUNC(grub_ieee1275_next_property) (grub_ieee1275_phandle_t phandle,
|
||||
char *prev_prop, char *prop);
|
||||
int EXPORT_FUNC(grub_ieee1275_get_property_length)
|
||||
int EXPORT_FUNC(grub_ieee1275_get_property_length)
|
||||
(grub_ieee1275_phandle_t phandle, const char *prop, grub_ssize_t *length);
|
||||
int EXPORT_FUNC(grub_ieee1275_instance_to_package)
|
||||
int EXPORT_FUNC(grub_ieee1275_instance_to_package)
|
||||
(grub_ieee1275_ihandle_t ihandle, grub_ieee1275_phandle_t *phandlep);
|
||||
int EXPORT_FUNC(grub_ieee1275_package_to_path) (grub_ieee1275_phandle_t phandle,
|
||||
char *path, grub_size_t len,
|
||||
grub_ssize_t *actual);
|
||||
int EXPORT_FUNC(grub_ieee1275_instance_to_path)
|
||||
int EXPORT_FUNC(grub_ieee1275_instance_to_path)
|
||||
(grub_ieee1275_ihandle_t ihandle, char *path, grub_size_t len,
|
||||
grub_ssize_t *actual);
|
||||
int EXPORT_FUNC(grub_ieee1275_write) (grub_ieee1275_ihandle_t ihandle,
|
||||
|
|
|
@ -121,7 +121,7 @@ struct grub_lvm_mda_header {
|
|||
grub_uint32_t version;
|
||||
grub_uint64_t start; /* Absolute start byte of mda_header */
|
||||
grub_uint64_t size; /* Size of metadata area */
|
||||
|
||||
|
||||
struct grub_lvm_raw_locn raw_locns[0]; /* NULL-terminated list */
|
||||
} __attribute__ ((packed));
|
||||
|
||||
|
|
|
@ -73,7 +73,7 @@ union grub_macho_filestart
|
|||
{
|
||||
struct grub_macho_fat_header fat;
|
||||
struct grub_macho_header32 thin32;
|
||||
struct grub_macho_header64 thin64;
|
||||
struct grub_macho_header64 thin64;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
/* Common header of Mach-O commands. */
|
||||
|
|
|
@ -54,7 +54,7 @@ grub_uint32_t grub_macho32_get_entry_point (grub_macho_t macho);
|
|||
#define GRUB_MACHO_NOBSS 0x1
|
||||
grub_err_t grub_macho32_load (grub_macho_t macho, char *offset, int flags);
|
||||
|
||||
/* Like filesize and file_read but take only 32-bit part
|
||||
/* Like filesize and file_read but take only 32-bit part
|
||||
for current architecture. */
|
||||
grub_size_t grub_macho32_filesize (grub_macho_t macho);
|
||||
grub_err_t grub_macho32_readfile (grub_macho_t macho, void *dest);
|
||||
|
|
|
@ -24,8 +24,8 @@
|
|||
#include <grub/err.h>
|
||||
#include <grub/machine/memory.h>
|
||||
|
||||
grub_err_t grub_mmap_iterate (int NESTED_FUNC_ATTR (*hook) (grub_uint64_t,
|
||||
grub_uint64_t,
|
||||
grub_err_t grub_mmap_iterate (int NESTED_FUNC_ATTR (*hook) (grub_uint64_t,
|
||||
grub_uint64_t,
|
||||
grub_uint32_t));
|
||||
int grub_mmap_register (grub_uint64_t start, grub_uint64_t size, int type);
|
||||
grub_err_t grub_mmap_unregister (int handle);
|
||||
|
|
|
@ -30,7 +30,7 @@ void grub_module (int argc, char *argv[]);
|
|||
#include <grub/types.h>
|
||||
|
||||
struct grub_multiboot_header
|
||||
{
|
||||
{
|
||||
/* Must be MULTIBOOT_MAGIC - see above. */
|
||||
grub_uint32_t magic;
|
||||
|
||||
|
@ -39,7 +39,7 @@ struct grub_multiboot_header
|
|||
|
||||
/* The above fields plus this one must equal 0 mod 2^32. */
|
||||
grub_uint32_t checksum;
|
||||
|
||||
|
||||
/* These are only valid if MULTIBOOT_AOUT_KLUDGE is set. */
|
||||
grub_uint32_t header_addr;
|
||||
grub_uint32_t load_addr;
|
||||
|
@ -58,34 +58,34 @@ struct grub_multiboot_info
|
|||
{
|
||||
/* Multiboot info version number */
|
||||
grub_uint32_t flags;
|
||||
|
||||
|
||||
/* Available memory from BIOS */
|
||||
grub_uint32_t mem_lower;
|
||||
grub_uint32_t mem_upper;
|
||||
|
||||
|
||||
/* "root" partition */
|
||||
grub_uint32_t boot_device;
|
||||
|
||||
|
||||
/* Kernel command line */
|
||||
grub_uint32_t cmdline;
|
||||
|
||||
|
||||
/* Boot-Module list */
|
||||
grub_uint32_t mods_count;
|
||||
grub_uint32_t mods_addr;
|
||||
|
||||
|
||||
grub_uint32_t syms[4];
|
||||
|
||||
|
||||
/* Memory Mapping buffer */
|
||||
grub_uint32_t mmap_length;
|
||||
grub_uint32_t mmap_addr;
|
||||
|
||||
|
||||
/* Drive Info buffer */
|
||||
grub_uint32_t drives_length;
|
||||
grub_uint32_t drives_addr;
|
||||
|
||||
|
||||
/* ROM configuration table */
|
||||
grub_uint32_t config_table;
|
||||
|
||||
|
||||
/* Boot Loader Name */
|
||||
grub_uint32_t boot_loader_name;
|
||||
|
||||
|
@ -116,10 +116,10 @@ struct grub_mod_list
|
|||
/* the memory used goes from bytes 'mod_start' to 'mod_end-1' inclusive */
|
||||
grub_uint32_t mod_start;
|
||||
grub_uint32_t mod_end;
|
||||
|
||||
|
||||
/* Module command line */
|
||||
grub_uint32_t cmdline;
|
||||
|
||||
|
||||
/* padding to take it to 16 bytes (must be zero) */
|
||||
grub_uint32_t pad;
|
||||
};
|
||||
|
|
|
@ -35,19 +35,19 @@ struct multiboot_tag_header;
|
|||
grub_err_t
|
||||
grub_mb2_tag_alloc (grub_addr_t *addr, int key, grub_size_t len);
|
||||
|
||||
grub_err_t
|
||||
grub_err_t
|
||||
grub_mb2_tags_arch_create (void);
|
||||
|
||||
void
|
||||
void
|
||||
grub_mb2_arch_boot (grub_addr_t entry, void *tags);
|
||||
|
||||
void
|
||||
void
|
||||
grub_mb2_arch_unload (struct multiboot_tag_header *tags);
|
||||
|
||||
grub_err_t
|
||||
grub_mb2_arch_elf32_hook (Elf32_Phdr *phdr, grub_addr_t *addr);
|
||||
|
||||
grub_err_t
|
||||
grub_err_t
|
||||
grub_mb2_arch_elf64_hook (Elf64_Phdr *phdr, grub_addr_t *addr);
|
||||
|
||||
grub_err_t
|
||||
|
@ -56,10 +56,10 @@ grub_mb2_arch_module_alloc (grub_size_t size, grub_addr_t *addr);
|
|||
grub_err_t
|
||||
grub_mb2_arch_module_free (grub_addr_t addr, grub_size_t size);
|
||||
|
||||
void
|
||||
void
|
||||
grub_multiboot2 (int argc, char *argv[]);
|
||||
|
||||
void
|
||||
void
|
||||
grub_module2 (int argc, char *argv[]);
|
||||
|
||||
#define for_each_tag(tag, tags) \
|
||||
|
|
|
@ -49,7 +49,7 @@ struct grub_net
|
|||
{
|
||||
/* The net name. */
|
||||
const char *name;
|
||||
|
||||
|
||||
/* The underlying disk device. */
|
||||
grub_net_dev_t dev;
|
||||
|
||||
|
@ -58,7 +58,7 @@ struct grub_net
|
|||
|
||||
/* FIXME: More data would be required, such as an IP address, a mask,
|
||||
a gateway, etc. */
|
||||
|
||||
|
||||
/* Device-specific data. */
|
||||
void *data;
|
||||
};
|
||||
|
|
|
@ -30,19 +30,19 @@ struct grub_partition_map
|
|||
{
|
||||
/* The name of the partition map type. */
|
||||
const char *name;
|
||||
|
||||
|
||||
/* Call HOOK with each partition, until HOOK returns non-zero. */
|
||||
grub_err_t (*iterate) (struct grub_disk *disk,
|
||||
int (*hook) (struct grub_disk *disk,
|
||||
const grub_partition_t partition));
|
||||
|
||||
|
||||
/* Return the partition named STR on the disk DISK. */
|
||||
grub_partition_t (*probe) (struct grub_disk *disk,
|
||||
const char *str);
|
||||
|
||||
|
||||
/* Return the name of the partition PARTITION. */
|
||||
char *(*get_name) (const grub_partition_t partition);
|
||||
|
||||
|
||||
/* The next partition map type. */
|
||||
struct grub_partition_map *next;
|
||||
};
|
||||
|
@ -62,10 +62,10 @@ struct grub_partition
|
|||
|
||||
/* The index of this partition in the partition table. */
|
||||
int index;
|
||||
|
||||
|
||||
/* Partition map type specific data. */
|
||||
void *data;
|
||||
|
||||
|
||||
/* The type partition map. */
|
||||
grub_partition_map_t partmap;
|
||||
};
|
||||
|
@ -78,7 +78,7 @@ int EXPORT_FUNC(grub_partition_iterate) (struct grub_disk *disk,
|
|||
char *EXPORT_FUNC(grub_partition_get_name) (const grub_partition_t partition);
|
||||
|
||||
int EXPORT_FUNC(grub_partition_map_iterate) (int (*hook) (const grub_partition_map_t partmap));
|
||||
|
||||
|
||||
void EXPORT_FUNC(grub_partition_map_register) (grub_partition_map_t partmap);
|
||||
|
||||
void EXPORT_FUNC(grub_partition_map_unregister) (grub_partition_map_t partmap);
|
||||
|
|
|
@ -23,7 +23,7 @@ struct grub_parttool_argdesc
|
|||
{
|
||||
char *name;
|
||||
char *desc;
|
||||
enum {GRUB_PARTTOOL_ARG_END, GRUB_PARTTOOL_ARG_BOOL, GRUB_PARTTOOL_ARG_VAL}
|
||||
enum {GRUB_PARTTOOL_ARG_END, GRUB_PARTTOOL_ARG_BOOL, GRUB_PARTTOOL_ARG_VAL}
|
||||
type;
|
||||
};
|
||||
|
||||
|
@ -37,7 +37,7 @@ struct grub_parttool_args
|
|||
};
|
||||
};
|
||||
|
||||
typedef grub_err_t (*grub_parttool_function_t) (const grub_device_t dev,
|
||||
typedef grub_err_t (*grub_parttool_function_t) (const grub_device_t dev,
|
||||
const struct grub_parttool_args *args);
|
||||
|
||||
struct grub_parttool
|
||||
|
@ -50,7 +50,7 @@ struct grub_parttool
|
|||
grub_parttool_function_t func;
|
||||
};
|
||||
|
||||
int grub_parttool_register(const char *part_name,
|
||||
int grub_parttool_register(const char *part_name,
|
||||
const grub_parttool_function_t func,
|
||||
const struct grub_parttool_argdesc *args);
|
||||
void grub_parttool_unregister (int handle);
|
||||
|
|
|
@ -151,10 +151,10 @@ struct grub_term_input
|
|||
|
||||
/* Clean up the terminal. */
|
||||
grub_err_t (*fini) (void);
|
||||
|
||||
|
||||
/* Check if any input character is available. */
|
||||
int (*checkkey) (void);
|
||||
|
||||
|
||||
/* Get a character. */
|
||||
int (*getkey) (void);
|
||||
};
|
||||
|
@ -173,37 +173,37 @@ struct grub_term_output
|
|||
|
||||
/* Clean up the terminal. */
|
||||
grub_err_t (*fini) (void);
|
||||
|
||||
|
||||
/* Put a character. C is encoded in Unicode. */
|
||||
void (*putchar) (grub_uint32_t c);
|
||||
|
||||
/* Get the number of columns occupied by a given character C. C is
|
||||
encoded in Unicode. */
|
||||
grub_ssize_t (*getcharwidth) (grub_uint32_t c);
|
||||
|
||||
|
||||
/* Get the screen size. The return value is ((Width << 8) | Height). */
|
||||
grub_uint16_t (*getwh) (void);
|
||||
|
||||
/* Get the cursor position. The return value is ((X << 8) | Y). */
|
||||
grub_uint16_t (*getxy) (void);
|
||||
|
||||
|
||||
/* Go to the position (X, Y). */
|
||||
void (*gotoxy) (grub_uint8_t x, grub_uint8_t y);
|
||||
|
||||
|
||||
/* Clear the screen. */
|
||||
void (*cls) (void);
|
||||
|
||||
|
||||
/* Set the current color to be used */
|
||||
void (*setcolorstate) (grub_term_color_state state);
|
||||
|
||||
|
||||
/* Set the normal color and the highlight color. The format of each
|
||||
color is VGA's. */
|
||||
void (*setcolor) (grub_uint8_t normal_color, grub_uint8_t highlight_color);
|
||||
|
||||
|
||||
/* Get the normal color and the highlight color. The format of each
|
||||
color is VGA's. */
|
||||
void (*getcolor) (grub_uint8_t *normal_color, grub_uint8_t *highlight_color);
|
||||
|
||||
|
||||
/* Turn on/off the cursor. */
|
||||
void (*setcursor) (int on);
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ struct grub_usb_desc_device
|
|||
grub_uint8_t strvendor;
|
||||
grub_uint8_t strprod;
|
||||
grub_uint8_t strserial;
|
||||
grub_uint8_t configcnt;
|
||||
grub_uint8_t configcnt;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
struct grub_usb_desc_config
|
||||
|
|
|
@ -74,7 +74,7 @@ enum grub_video_blit_format
|
|||
|
||||
/* When needed, decode color or just use value as is. */
|
||||
GRUB_VIDEO_BLIT_FORMAT_INDEXCOLOR,
|
||||
|
||||
|
||||
/* Two color bitmap; bits packed: rows are not padded to byte boundary. */
|
||||
GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED
|
||||
};
|
||||
|
|
|
@ -36,7 +36,7 @@ struct grub_xnu_hibernate_header
|
|||
/* %esp at start. */
|
||||
grub_uint32_t stack;
|
||||
grub_uint8_t unknown2[44];
|
||||
#define GRUB_XNU_HIBERNATE_MAGIC 0x73696d65
|
||||
#define GRUB_XNU_HIBERNATE_MAGIC 0x73696d65
|
||||
grub_uint32_t magic;
|
||||
grub_uint8_t unknown3[28];
|
||||
/* This value is non-zero if page is encrypted. Unsupported. */
|
||||
|
@ -51,7 +51,7 @@ struct grub_xnu_hibernate_header
|
|||
/* In-memory structure for temporary keeping device tree. */
|
||||
struct grub_xnu_devtree_key
|
||||
{
|
||||
char *name;
|
||||
char *name;
|
||||
int datasize; /* -1 for not leaves. */
|
||||
union
|
||||
{
|
||||
|
@ -62,7 +62,7 @@ struct grub_xnu_devtree_key
|
|||
};
|
||||
|
||||
/* A structure used in memory-map values. */
|
||||
struct
|
||||
struct
|
||||
grub_xnu_extdesc
|
||||
{
|
||||
grub_uint32_t addr;
|
||||
|
@ -95,9 +95,9 @@ grub_err_t grub_xnu_resume (char *imagename);
|
|||
struct grub_xnu_devtree_key *grub_xnu_find_key (struct grub_xnu_devtree_key *parent,
|
||||
char *name);
|
||||
grub_err_t grub_xnu_align_heap (int align);
|
||||
grub_err_t grub_xnu_scan_dir_for_kexts (char *dirname, char *osbundlerequired,
|
||||
grub_err_t grub_xnu_scan_dir_for_kexts (char *dirname, char *osbundlerequired,
|
||||
int maxrecursion);
|
||||
grub_err_t grub_xnu_load_kext_from_dir (char *dirname, char *osbundlerequired,
|
||||
grub_err_t grub_xnu_load_kext_from_dir (char *dirname, char *osbundlerequired,
|
||||
int maxrecursion);
|
||||
void *grub_xnu_heap_malloc (int size);
|
||||
extern grub_uint32_t grub_xnu_heap_real_start;
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
/* Alignment of the multiboot info structure. */
|
||||
#define MULTIBOOT_INFO_ALIGN 0x00000004
|
||||
|
||||
/*
|
||||
/*
|
||||
* Flags set in the 'flags' member of the multiboot header.
|
||||
*/
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue