Merge mainline into legacy_parser
This commit is contained in:
commit
bd9603071a
55 changed files with 2072 additions and 327 deletions
|
@ -53,17 +53,92 @@ struct grub_acpi_table_header
|
|||
grub_uint32_t creator_rev;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
#define GRUB_ACPI_FADT_SIGNATURE "FACP"
|
||||
|
||||
struct grub_acpi_fadt
|
||||
{
|
||||
struct grub_acpi_table_header hdr;
|
||||
grub_uint32_t facs_addr;
|
||||
grub_uint32_t dsdt_addr;
|
||||
grub_uint8_t somefields1[88];
|
||||
grub_uint8_t somefields1[20];
|
||||
grub_uint32_t pm1a;
|
||||
grub_uint8_t somefields2[64];
|
||||
grub_uint64_t facs_xaddr;
|
||||
grub_uint64_t dsdt_xaddr;
|
||||
grub_uint8_t somefields2[96];
|
||||
grub_uint8_t somefields3[96];
|
||||
} __attribute__ ((packed));
|
||||
|
||||
#define GRUB_ACPI_MADT_SIGNATURE "APIC"
|
||||
|
||||
struct grub_acpi_madt_entry_header
|
||||
{
|
||||
grub_uint8_t type;
|
||||
grub_uint8_t len;
|
||||
};
|
||||
|
||||
struct grub_acpi_madt
|
||||
{
|
||||
struct grub_acpi_table_header hdr;
|
||||
grub_uint32_t lapic_addr;
|
||||
grub_uint32_t flags;
|
||||
struct grub_acpi_madt_entry_header entries[0];
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
GRUB_ACPI_MADT_ENTRY_TYPE_INTERRUPT_OVERRIDE = 2,
|
||||
GRUB_ACPI_MADT_ENTRY_TYPE_SAPIC = 6,
|
||||
GRUB_ACPI_MADT_ENTRY_TYPE_LSAPIC = 7,
|
||||
GRUB_ACPI_MADT_ENTRY_TYPE_PLATFORM_INT_SOURCE = 8
|
||||
};
|
||||
|
||||
struct grub_acpi_madt_entry_interrupt_override
|
||||
{
|
||||
struct grub_acpi_madt_entry_header hdr;
|
||||
grub_uint8_t bus;
|
||||
grub_uint8_t source;
|
||||
grub_uint32_t global_sys_interrupt;
|
||||
grub_uint16_t flags;
|
||||
};
|
||||
|
||||
struct grub_acpi_madt_entry_sapic
|
||||
{
|
||||
struct grub_acpi_madt_entry_header hdr;
|
||||
grub_uint8_t id;
|
||||
grub_uint8_t pad;
|
||||
grub_uint32_t global_sys_interrupt_base;
|
||||
grub_uint64_t addr;
|
||||
};
|
||||
|
||||
struct grub_acpi_madt_entry_lsapic
|
||||
{
|
||||
struct grub_acpi_madt_entry_header hdr;
|
||||
grub_uint8_t cpu_id;
|
||||
grub_uint8_t id;
|
||||
grub_uint8_t eid;
|
||||
grub_uint8_t pad[3];
|
||||
grub_uint32_t flags;
|
||||
grub_uint32_t cpu_uid;
|
||||
grub_uint8_t cpu_uid_str[0];
|
||||
};
|
||||
|
||||
struct grub_acpi_madt_entry_platform_int_source
|
||||
{
|
||||
struct grub_acpi_madt_entry_header hdr;
|
||||
grub_uint16_t flags;
|
||||
grub_uint8_t inttype;
|
||||
grub_uint8_t cpu_id;
|
||||
grub_uint8_t cpu_eid;
|
||||
grub_uint8_t sapic_vector;
|
||||
grub_uint32_t global_sys_int;
|
||||
grub_uint32_t src_flags;
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
GRUB_ACPI_MADT_ENTRY_SAPIC_FLAGS_ENABLED = 1
|
||||
};
|
||||
|
||||
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);
|
||||
|
@ -72,4 +147,25 @@ 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);
|
||||
|
||||
#define GRUB_ACPI_SLP_EN (1 << 13)
|
||||
#define GRUB_ACPI_SLP_TYP_OFFSET 10
|
||||
|
||||
enum
|
||||
{
|
||||
GRUB_ACPI_OPCODE_ZERO = 0, GRUB_ACPI_OPCODE_ONE = 1,
|
||||
GRUB_ACPI_OPCODE_NAME = 8, GRUB_ACPI_OPCODE_BYTE_CONST = 0x0a,
|
||||
GRUB_ACPI_OPCODE_WORD_CONST = 0x0b, GRUB_ACPI_OPCODE_DWORD_CONST = 0x0c,
|
||||
GRUB_ACPI_OPCODE_SCOPE = 0x10, GRUB_ACPI_OPCODE_PACKAGE = 0x12,
|
||||
GRUB_ACPI_OPCODE_METHOD = 0x14, GRUB_ACPI_OPCODE_EXTOP = 0x5b,
|
||||
GRUB_ACPI_OPCODE_IF = 0xa0, GRUB_ACPI_OPCODE_ONES = 0xff
|
||||
};
|
||||
enum
|
||||
{
|
||||
GRUB_ACPI_EXTOPCODE_MUTEX = 0x01,
|
||||
GRUB_ACPI_EXTOPCODE_OPERATION_REGION = 0x80,
|
||||
GRUB_ACPI_EXTOPCODE_FIELD_OP = 0x81
|
||||
};
|
||||
|
||||
#endif /* ! GRUB_ACPI_HEADER */
|
||||
|
|
|
@ -23,6 +23,10 @@
|
|||
#include <grub/symbol.h>
|
||||
#include <grub/types.h>
|
||||
|
||||
#ifdef _mips
|
||||
#include <grub/mips/cache.h>
|
||||
#endif
|
||||
|
||||
#if defined (__i386__) || defined (__x86_64__)
|
||||
static inline void
|
||||
grub_arch_sync_caches (void *address __attribute__ ((unused)),
|
||||
|
|
|
@ -177,4 +177,13 @@ struct grub_disk_ata_pass_through_parms
|
|||
extern grub_err_t (* EXPORT_VAR(grub_disk_ata_pass_through)) (grub_disk_t,
|
||||
struct grub_disk_ata_pass_through_parms *);
|
||||
|
||||
#if defined (GRUB_UTIL) || defined (GRUB_MACHINE_EMU)
|
||||
void grub_lvm_init (void);
|
||||
void grub_mdraid_init (void);
|
||||
void grub_raid_init (void);
|
||||
void grub_lvm_fini (void);
|
||||
void grub_mdraid_fini (void);
|
||||
void grub_raid_fini (void);
|
||||
#endif
|
||||
|
||||
#endif /* ! GRUB_DISK_HEADER */
|
||||
|
|
|
@ -45,6 +45,7 @@ extern const char *program_name;
|
|||
void grub_emu_init (void);
|
||||
void grub_init_all (void);
|
||||
void grub_fini_all (void);
|
||||
void grub_emu_post_init (void);
|
||||
|
||||
void grub_find_zpool_from_dir (const char *dir,
|
||||
char **poolname, char **poolfs);
|
||||
|
|
|
@ -103,6 +103,9 @@ enum grub_ieee1275_flag
|
|||
|
||||
/* OpenFirmware hangs on qemu if one requests any memory below 1.5 MiB. */
|
||||
GRUB_IEEE1275_FLAG_NO_PRE1_5M_CLAIM,
|
||||
|
||||
/* OLPC / XO firmware has the cursor ON/OFF routines. */
|
||||
GRUB_IEEE1275_FLAG_HAS_CURSORONOFF,
|
||||
};
|
||||
|
||||
extern int EXPORT_FUNC(grub_ieee1275_test_flag) (enum grub_ieee1275_flag flag);
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
#ifdef GRUB_MACHINE_EMU
|
||||
static inline void
|
||||
grub_cpu_idle(void)
|
||||
{
|
||||
}
|
||||
#endif
|
|
@ -115,4 +115,9 @@ void grub_normal_reset_more (void);
|
|||
|
||||
void grub_xputs_normal (const char *str);
|
||||
|
||||
grub_err_t
|
||||
grub_normal_add_menu_entry (int argc, const char **args, char **classes,
|
||||
const char *users, const char *hotkey,
|
||||
const char *prefix, const char *sourcecode);
|
||||
|
||||
#endif /* ! GRUB_NORMAL_HEADER */
|
||||
|
|
|
@ -69,10 +69,14 @@ typedef long long grub_int64_t;
|
|||
typedef unsigned char grub_uint8_t;
|
||||
typedef unsigned short grub_uint16_t;
|
||||
typedef unsigned grub_uint32_t;
|
||||
# define PRIxGRUB_UINT32_T "x"
|
||||
# define PRIuGRUB_UINT32_T "u"
|
||||
#if GRUB_CPU_SIZEOF_LONG == 8
|
||||
typedef unsigned long grub_uint64_t;
|
||||
# define PRIxGRUB_UINT64_T "lx"
|
||||
#else
|
||||
typedef unsigned long long grub_uint64_t;
|
||||
# define PRIxGRUB_UINT64_T "llx"
|
||||
#endif
|
||||
|
||||
/* Misc types. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue