]> git.proxmox.com Git - grub2.git/blame - include/grub/kernel.h
2008-07-16 Pavel Roskin <proski@gnu.org>
[grub2.git] / include / grub / kernel.h
CommitLineData
6a161fa9 1/*
4b13b216 2 * GRUB -- GRand Unified Bootloader
5a79f472 3 * Copyright (C) 2002,2005,2006,2007 Free Software Foundation, Inc.
6a161fa9 4 *
5a79f472 5 * GRUB is free software: you can redistribute it and/or modify
6a161fa9 6 * it under the terms of the GNU General Public License as published by
5a79f472 7 * the Free Software Foundation, either version 3 of the License, or
6a161fa9 8 * (at your option) any later version.
9 *
5a79f472 10 * GRUB is distributed in the hope that it will be useful,
6a161fa9 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.
14 *
15 * You should have received a copy of the GNU General Public License
5a79f472 16 * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
6a161fa9 17 */
18
4b13b216 19#ifndef GRUB_KERNEL_HEADER
20#define GRUB_KERNEL_HEADER 1
6a161fa9 21
4b13b216 22#include <grub/types.h>
55a581dc 23#include <grub/symbol.h>
6a161fa9 24
25/* The module header. */
4b13b216 26struct grub_module_header
6a161fa9 27{
28 /* The offset of object code. */
b786f3b5 29 grub_target_off_t offset;
6a161fa9 30 /* The size of object code plus this header. */
b786f3b5 31 grub_target_size_t size;
6a161fa9 32};
33
0b412211 34/* "gmim" (GRUB Module Info Magic). */
35#define GRUB_MODULE_MAGIC 0x676d696d
6a161fa9 36
0b412211 37struct grub_module_info
38{
39 /* Magic number so we know we have modules present. */
40 grub_uint32_t magic;
41 /* The offset of the modules. */
b786f3b5 42 grub_target_off_t offset;
0b412211 43 /* The size of all modules plus this header. */
b786f3b5 44 grub_target_size_t size;
0b412211 45};
6a161fa9 46
0b412211 47extern grub_addr_t grub_arch_modules_addr (void);
6a161fa9 48
49/* The start point of the C code. */
4b13b216 50void grub_main (void);
6a161fa9 51
52/* The machine-specific initialization. This must initialize memory. */
4b13b216 53void grub_machine_init (void);
6a161fa9 54
e6b92c8a 55/* The machine-specific finalization. */
56void grub_machine_fini (void);
57
2965c7cc 58/* The machine-specific prefix initialization. */
59void grub_machine_set_prefix (void);
60
6a161fa9 61/* Register all the exported symbols. This is automatically generated. */
4b13b216 62void grub_register_exported_symbols (void);
6a161fa9 63
4b13b216 64#endif /* ! GRUB_KERNEL_HEADER */