Ensure all lines that should be omitted from public includes are marked
[AROS.git] / arch / all-pc / boot / grub2-aros / include / grub / relocator.h
blob653a00eba7d88202410829093bb272ee705d9015
1 /*
2 * GRUB -- GRand Unified Bootloader
3 * Copyright (C) 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_RELOCATOR_HEADER
20 #define GRUB_RELOCATOR_HEADER 1
22 #include <grub/types.h>
23 #include <grub/err.h>
24 #include <grub/memory.h>
25 #include <grub/cpu/memory.h>
27 struct grub_relocator;
28 struct grub_relocator_chunk;
29 typedef const struct grub_relocator_chunk *grub_relocator_chunk_t;
31 struct grub_relocator *grub_relocator_new (void);
33 grub_err_t
34 grub_relocator_alloc_chunk_addr (struct grub_relocator *rel,
35 grub_relocator_chunk_t *out,
36 grub_phys_addr_t target, grub_size_t size);
38 void *
39 get_virtual_current_address (grub_relocator_chunk_t in);
40 grub_phys_addr_t
41 get_physical_target_address (grub_relocator_chunk_t in);
43 grub_err_t
44 grub_relocator_alloc_chunk_align (struct grub_relocator *rel,
45 grub_relocator_chunk_t *out,
46 grub_phys_addr_t min_addr,
47 grub_phys_addr_t max_addr,
48 grub_size_t size, grub_size_t align,
49 int preference);
51 #define GRUB_RELOCATOR_PREFERENCE_NONE 0
52 #define GRUB_RELOCATOR_PREFERENCE_LOW 1
53 #define GRUB_RELOCATOR_PREFERENCE_HIGH 2
55 void
56 grub_relocator_unload (struct grub_relocator *rel);
58 #endif