1 /* multiboot2.h - multiboot2 header file with grub definitions. */
3 * GRUB -- GRand Unified Bootloader
4 * Copyright (C) 2005,2007 Free Software Foundation, Inc.
6 * GRUB is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
11 * GRUB is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
20 #ifndef GRUB_MULTIBOOT2_HEADER
21 #define GRUB_MULTIBOOT2_HEADER 1
23 #include <grub/types.h>
27 struct multiboot_tag_header
;
30 grub_mb2_tag_alloc (grub_addr_t
*addr
, int key
, grub_size_t len
);
33 grub_mb2_tags_arch_create (void);
36 grub_mb2_arch_boot (grub_addr_t entry
, void *tags
);
39 grub_mb2_arch_unload (struct multiboot_tag_header
*tags
);
42 grub_mb2_arch_elf32_hook (Elf32_Phdr
*phdr
, grub_addr_t
*addr
);
45 grub_mb2_arch_elf64_hook (Elf64_Phdr
*phdr
, grub_addr_t
*addr
);
48 grub_mb2_arch_module_alloc (grub_size_t size
, grub_addr_t
*addr
);
51 grub_mb2_arch_module_free (grub_addr_t addr
, grub_size_t size
);
54 grub_multiboot2 (int argc
, char *argv
[]);
57 grub_module2 (int argc
, char *argv
[]);
59 #define for_each_tag(tag, tags) \
61 tag && tag->key != MULTIBOOT2_TAG_END; \
62 tag = (struct multiboot_tag_header *)((char *)tag + tag->len))
64 #endif /* ! GRUB_MULTIBOOT2_HEADER */