Second part of p2v support
This commit is contained in:
parent
368c17f85d
commit
4b2ec20b41
15 changed files with 361 additions and 212 deletions
|
@ -21,19 +21,29 @@
|
|||
|
||||
#include <grub/types.h>
|
||||
#include <grub/err.h>
|
||||
#include <grub/memory.h>
|
||||
|
||||
struct grub_relocator;
|
||||
struct grub_relocator_chunk;
|
||||
typedef const struct grub_relocator_chunk *grub_relocator_chunk_t;
|
||||
|
||||
struct grub_relocator *grub_relocator_new (void);
|
||||
|
||||
grub_err_t
|
||||
grub_relocator_alloc_chunk_addr (struct grub_relocator *rel, void **src,
|
||||
grub_addr_t target, grub_size_t size);
|
||||
grub_relocator_alloc_chunk_addr (struct grub_relocator *rel,
|
||||
grub_relocator_chunk_t *out,
|
||||
grub_phys_addr_t target, grub_size_t size);
|
||||
|
||||
void *
|
||||
get_virtual_current_address (grub_relocator_chunk_t in);
|
||||
grub_phys_addr_t
|
||||
get_physical_target_address (grub_relocator_chunk_t in);
|
||||
|
||||
grub_err_t
|
||||
grub_relocator_alloc_chunk_align (struct grub_relocator *rel, void **src,
|
||||
grub_addr_t *target,
|
||||
grub_addr_t min_addr, grub_addr_t max_addr,
|
||||
grub_relocator_alloc_chunk_align (struct grub_relocator *rel,
|
||||
grub_relocator_chunk_t *out,
|
||||
grub_phys_addr_t min_addr,
|
||||
grub_phys_addr_t max_addr,
|
||||
grub_size_t size, grub_size_t align,
|
||||
int preference);
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ void
|
|||
grub_cpu_relocator_init (void);
|
||||
grub_err_t
|
||||
grub_relocator_prepare_relocs (struct grub_relocator *rel,
|
||||
void *addr,
|
||||
grub_addr_t addr,
|
||||
void **relstart, grub_size_t *relsize);
|
||||
void grub_cpu_relocator_forward (void *rels, void *src, void *tgt,
|
||||
grub_size_t size);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue