Forgot tar.c
[grub2/jjazz.git] / include / grub / multiboot2.h
blobbfbffcc0643e50c2e4b825fc9f40e68de84db71f
1 /* multiboot2.h - multiboot2 header file with grub definitions. */
2 /*
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>
24 #include <grub/err.h>
25 #include <grub/elf.h>
27 struct multiboot_tag_header;
29 grub_err_t
30 grub_mb2_tag_alloc (grub_addr_t *addr, int key, grub_size_t len);
32 grub_err_t
33 grub_mb2_tags_arch_create (void);
35 void
36 grub_mb2_arch_boot (grub_addr_t entry, void *tags);
38 void
39 grub_mb2_arch_unload (struct multiboot_tag_header *tags);
41 grub_err_t
42 grub_mb2_arch_elf32_hook (Elf32_Phdr *phdr, grub_addr_t *addr);
44 grub_err_t
45 grub_mb2_arch_elf64_hook (Elf64_Phdr *phdr, grub_addr_t *addr);
47 grub_err_t
48 grub_mb2_arch_module_alloc (grub_size_t size, grub_addr_t *addr);
50 grub_err_t
51 grub_mb2_arch_module_free (grub_addr_t addr, grub_size_t size);
53 void
54 grub_multiboot2 (int argc, char *argv[]);
56 void
57 grub_module2 (int argc, char *argv[]);
59 #define for_each_tag(tag, tags) \
60 for (tag = tags; \
61 tag && tag->key != MULTIBOOT2_TAG_END; \
62 tag = (struct multiboot_tag_header *)((char *)tag + tag->len))
64 #endif /* ! GRUB_MULTIBOOT2_HEADER */