2 * GRUB -- GRand Unified Bootloader
3 * Copyright (C) 2002,2005,2006,2007,2008,2009 Free Software Foundation, Inc.
5 * GRUB is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
10 * GRUB is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
19 #ifndef GRUB_KERNEL_HEADER
20 #define GRUB_KERNEL_HEADER 1
22 #include <grub/types.h>
23 #include <grub/symbol.h>
32 /* The module header. */
33 struct grub_module_header
35 /* The type of object. */
37 /* The size of object (including this header). */
41 /* "gmim" (GRUB Module Info Magic). */
42 #define GRUB_MODULE_MAGIC 0x676d696d
44 struct grub_module_info
46 /* Magic number so we know we have modules present. */
48 #if GRUB_TARGET_SIZEOF_VOID_P == 8
49 grub_uint32_t padding
;
51 /* The offset of the modules. */
52 grub_target_off_t offset
;
53 /* The size of all modules plus this header. */
54 grub_target_size_t size
;
57 extern grub_addr_t
grub_arch_modules_addr (void);
59 extern void EXPORT_FUNC(grub_module_iterate
) (int (*hook
) (struct grub_module_header
*));
61 /* The start point of the C code. */
62 void grub_main (void);
64 /* The machine-specific initialization. This must initialize memory. */
65 void grub_machine_init (void);
67 /* The machine-specific finalization. */
68 void EXPORT_FUNC(grub_machine_fini
) (void);
70 /* The machine-specific prefix initialization. */
71 void grub_machine_set_prefix (void);
73 /* Register all the exported symbols. This is automatically generated. */
74 void grub_register_exported_symbols (void);
76 #endif /* ! GRUB_KERNEL_HEADER */