~ubuntu-branches/ubuntu/trusty/grub2/trusty-updates

« back to all changes in this revision

Viewing changes to include/grub/i386/relocator.h

Tags: upstream-1.99~20101122
ImportĀ upstreamĀ versionĀ 1.99~20101122

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
 
22
22
#include <grub/types.h>
23
23
#include <grub/err.h>
 
24
#include <grub/relocator.h>
24
25
 
25
26
struct grub_relocator32_state
26
27
{
27
28
  grub_uint32_t esp;
 
29
  grub_uint32_t ebp;
28
30
  grub_uint32_t eax;
29
31
  grub_uint32_t ebx;
30
32
  grub_uint32_t ecx;
31
33
  grub_uint32_t edx;
32
34
  grub_uint32_t eip;
33
 
};
34
 
 
35
 
void *grub_relocator32_alloc (grub_size_t size);
36
 
grub_err_t grub_relocator32_boot (void *relocator, grub_uint32_t dest,
 
35
  grub_uint32_t esi;
 
36
  grub_uint32_t edi;
 
37
};
 
38
 
 
39
struct grub_relocator16_state
 
40
{
 
41
  grub_uint16_t cs;
 
42
  grub_uint16_t ds;
 
43
  grub_uint16_t es;
 
44
  grub_uint16_t fs;
 
45
  grub_uint16_t gs;
 
46
  grub_uint16_t ss;
 
47
  grub_uint16_t sp;
 
48
  grub_uint16_t ip;
 
49
  grub_uint32_t edx;
 
50
};
 
51
 
 
52
struct grub_relocator64_state
 
53
{
 
54
  grub_uint64_t rsp;
 
55
  grub_uint64_t rax;
 
56
  grub_uint64_t rbx;
 
57
  grub_uint64_t rcx;
 
58
  grub_uint64_t rdx;
 
59
  grub_uint64_t rip;
 
60
  grub_uint64_t rsi;
 
61
  grub_addr_t cr3;
 
62
};
 
63
 
 
64
grub_err_t grub_relocator16_boot (struct grub_relocator *rel,
 
65
                                  struct grub_relocator16_state state);
 
66
 
 
67
grub_err_t grub_relocator32_boot (struct grub_relocator *rel,
37
68
                                  struct grub_relocator32_state state);
38
 
void *grub_relocator32_realloc (void *relocator, grub_size_t size);
39
 
void grub_relocator32_free (void *relocator);
 
69
 
 
70
grub_err_t grub_relocator64_boot (struct grub_relocator *rel,
 
71
                                  struct grub_relocator64_state state,
 
72
                                  grub_addr_t min_addr, grub_addr_t max_addr);
40
73
 
41
74
#endif /* ! GRUB_RELOCATOR_CPU_HEADER */