~darkmuggle-deactivatedaccount/ubuntu/quantal/grub2/fix-872244

« back to all changes in this revision

Viewing changes to include/grub/acpi.h

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson, Colin Watson, Evan Broder, Mario Limonciello
  • Date: 2010-11-24 13:59:55 UTC
  • mfrom: (1.17.6 upstream) (17.6.15 experimental)
  • Revision ID: james.westby@ubuntu.com-20101124135955-r6ii5sepayr7jt53
Tags: 1.99~20101124-1ubuntu1
[ Colin Watson ]
* Resynchronise with Debian experimental.  Remaining changes:
  - Adjust for default Ubuntu boot options ("quiet splash").
  - Default to hiding the menu; holding down Shift at boot will show it.
  - Set a monochromatic theme for Ubuntu.
  - Apply Ubuntu GRUB Legacy changes to legacy update-grub script: title,
    recovery mode, quiet option, tweak how memtest86+ is displayed, and
    use UUIDs where appropriate.
  - Fix backslash-escaping in merge_debconf_into_conf.
  - Remove "GNU/Linux" from default distributor string.
  - Add crashkernel= options if kdump and makedumpfile are available.
  - If other operating systems are installed, then automatically unhide
    the menu.  Otherwise, if GRUB_HIDDEN_TIMEOUT is 0, then use keystatus
    if available to check whether Shift is pressed.  If it is, show the
    menu, otherwise boot immediately.  If keystatus is not available, then
    fall back to a short delay interruptible with Escape.
  - Allow Shift to interrupt 'sleep --interruptible'.
  - Don't display introductory message about line editing unless we're
    actually offering a shell prompt.  Don't clear the screen just before
    booting if we never drew the menu in the first place.
  - Remove some verbose messages printed before reading the configuration
    file.
  - Suppress progress messages as the kernel and initrd load for
    non-recovery kernel menu entries.
  - Change prepare_grub_to_access_device to handle filesystems
    loop-mounted on file images.
  - Ignore devices loop-mounted from files in 10_linux.
  - Show the boot menu if the previous boot failed, that is if it failed
    to get to the end of one of the normal runlevels.
  - Don't generate /boot/grub/device.map during grub-install or
    grub-mkconfig by default.
  - Adjust upgrade version checks for Ubuntu.
  - Don't display "GRUB loading" unless Shift is held down.
  - Adjust versions of grub-doc and grub-legacy-doc conflicts to tolerate
    our backport of the grub-doc split.
  - Fix LVM/RAID probing in the absence of /boot/grub/device.map.
  - Look for .mo files in /usr/share/locale-langpack as well, in
    preference.
  - Make sure GRUB_TIMEOUT isn't quoted unnecessarily.
  - Probe all devices in 'grub-probe --target=drive' if
    /boot/grub/device.map is missing.
  - Build-depend on qemu-kvm rather than qemu-system for grub-pc tests.
  - Use qemu rather than qemu-system-i386.
  - Program vesafb on BIOS systems rather than efifb.
  - Add a grub-rescue-efi-amd64 package containing a rescue CD-ROM image
    for EFI-AMD64.
  - On Wubi, don't ask for an install device, but just update wubildr
    using the diverted grub-install.
  - When embedding the core image in a post-MBR gap, check for and avoid
    sectors matching any of a list of known signatures.
  - Disable video_bochs and video_cirrus on PC BIOS systems, as probing
    PCI space seems to break on some systems.
* Downgrade "ACPI shutdown failed" error to a debug message, since it can
  cause spurious test failures.

[ Evan Broder ]
* Enable lua from grub-extras.
* Incorporate the bitop library into lua.
* Add enum_pci function to grub module in lua.
* Switch back to gfxpayload=keep by default, unless the video hardware
  is known to not support it.

[ Mario Limonciello ]
* Built part_msdos and vfat into bootx64.efi (LP: #677758)

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
#ifndef GRUB_ACPI_HEADER
20
20
#define GRUB_ACPI_HEADER        1
21
21
 
 
22
#ifndef GRUB_DSDT_TEST
22
23
#include <grub/types.h>
23
24
#include <grub/err.h>
 
25
#endif
24
26
 
25
27
struct grub_acpi_rsdp_v10
26
28
{
53
55
  grub_uint32_t creator_rev;
54
56
} __attribute__ ((packed));
55
57
 
 
58
#define GRUB_ACPI_FADT_SIGNATURE "FACP"
 
59
 
56
60
struct grub_acpi_fadt
57
61
{
58
62
  struct grub_acpi_table_header hdr;
59
63
  grub_uint32_t facs_addr;
60
64
  grub_uint32_t dsdt_addr;
61
 
  grub_uint8_t somefields1[88];
 
65
  grub_uint8_t somefields1[20];
 
66
  grub_uint32_t pm1a;
 
67
  grub_uint8_t somefields2[64];
62
68
  grub_uint64_t facs_xaddr;
63
69
  grub_uint64_t dsdt_xaddr;
64
 
  grub_uint8_t somefields2[96];
 
70
  grub_uint8_t somefields3[96];
65
71
} __attribute__ ((packed));
66
72
 
 
73
#define GRUB_ACPI_MADT_SIGNATURE "APIC"
 
74
 
 
75
struct grub_acpi_madt_entry_header
 
76
{
 
77
  grub_uint8_t type;
 
78
  grub_uint8_t len;
 
79
};
 
80
 
 
81
struct grub_acpi_madt
 
82
{
 
83
  struct grub_acpi_table_header hdr;
 
84
  grub_uint32_t lapic_addr;
 
85
  grub_uint32_t flags;
 
86
  struct grub_acpi_madt_entry_header entries[0];
 
87
};
 
88
 
 
89
enum
 
90
  {
 
91
    GRUB_ACPI_MADT_ENTRY_TYPE_INTERRUPT_OVERRIDE = 2,
 
92
    GRUB_ACPI_MADT_ENTRY_TYPE_SAPIC = 6,
 
93
    GRUB_ACPI_MADT_ENTRY_TYPE_LSAPIC = 7,
 
94
    GRUB_ACPI_MADT_ENTRY_TYPE_PLATFORM_INT_SOURCE = 8
 
95
  };
 
96
 
 
97
struct grub_acpi_madt_entry_interrupt_override
 
98
{
 
99
  struct grub_acpi_madt_entry_header hdr;
 
100
  grub_uint8_t bus;
 
101
  grub_uint8_t source;
 
102
  grub_uint32_t global_sys_interrupt;
 
103
  grub_uint16_t flags;
 
104
};
 
105
 
 
106
struct grub_acpi_madt_entry_sapic
 
107
{
 
108
  struct grub_acpi_madt_entry_header hdr;
 
109
  grub_uint8_t id;
 
110
  grub_uint8_t pad;
 
111
  grub_uint32_t global_sys_interrupt_base;
 
112
  grub_uint64_t addr;
 
113
};
 
114
 
 
115
struct grub_acpi_madt_entry_lsapic
 
116
{
 
117
  struct grub_acpi_madt_entry_header hdr;
 
118
  grub_uint8_t cpu_id;
 
119
  grub_uint8_t id;
 
120
  grub_uint8_t eid;
 
121
  grub_uint8_t pad[3];
 
122
  grub_uint32_t flags;
 
123
  grub_uint32_t cpu_uid;
 
124
  grub_uint8_t cpu_uid_str[0];
 
125
};
 
126
 
 
127
struct grub_acpi_madt_entry_platform_int_source
 
128
{
 
129
  struct grub_acpi_madt_entry_header hdr;
 
130
  grub_uint16_t flags;
 
131
  grub_uint8_t inttype;
 
132
  grub_uint8_t cpu_id;
 
133
  grub_uint8_t cpu_eid;
 
134
  grub_uint8_t sapic_vector;
 
135
  grub_uint32_t global_sys_int;
 
136
  grub_uint32_t src_flags;
 
137
};
 
138
 
 
139
enum
 
140
  {
 
141
    GRUB_ACPI_MADT_ENTRY_SAPIC_FLAGS_ENABLED = 1
 
142
  };
 
143
 
 
144
#ifndef GRUB_DSDT_TEST
67
145
struct grub_acpi_rsdp_v10 *grub_acpi_get_rsdpv1 (void);
68
146
struct grub_acpi_rsdp_v20 *grub_acpi_get_rsdpv2 (void);
69
147
struct grub_acpi_rsdp_v10 *grub_machine_acpi_get_rsdpv1 (void);
72
150
 
73
151
grub_err_t grub_acpi_create_ebda (void);
74
152
 
 
153
void grub_acpi_halt (void);
 
154
#endif
 
155
 
 
156
#define GRUB_ACPI_SLP_EN (1 << 13)
 
157
#define GRUB_ACPI_SLP_TYP_OFFSET 10
 
158
 
 
159
enum
 
160
  {
 
161
    GRUB_ACPI_OPCODE_ZERO = 0, GRUB_ACPI_OPCODE_ONE = 1,
 
162
    GRUB_ACPI_OPCODE_NAME = 8, GRUB_ACPI_OPCODE_BYTE_CONST = 0x0a,
 
163
    GRUB_ACPI_OPCODE_WORD_CONST = 0x0b, GRUB_ACPI_OPCODE_DWORD_CONST = 0x0c,
 
164
    GRUB_ACPI_OPCODE_SCOPE = 0x10, GRUB_ACPI_OPCODE_PACKAGE = 0x12,
 
165
    GRUB_ACPI_OPCODE_METHOD = 0x14, GRUB_ACPI_OPCODE_EXTOP = 0x5b,
 
166
    GRUB_ACPI_OPCODE_IF = 0xa0, GRUB_ACPI_OPCODE_ONES = 0xff
 
167
  };
 
168
enum
 
169
  {
 
170
    GRUB_ACPI_EXTOPCODE_MUTEX = 0x01,
 
171
    GRUB_ACPI_EXTOPCODE_OPERATION_REGION = 0x80,
 
172
    GRUB_ACPI_EXTOPCODE_FIELD_OP = 0x81,
 
173
    GRUB_ACPI_EXTOPCODE_INDEX_FIELD_OP = 0x86,
 
174
  };
 
175
 
75
176
#endif /* ! GRUB_ACPI_HEADER */