Relocator64 support
This commit is contained in:
parent
1d24828f20
commit
14933205d1
5 changed files with 277 additions and 3 deletions
|
@ -22,7 +22,8 @@
|
|||
|
||||
/* The flag for protected mode. */
|
||||
#define GRUB_MEMORY_CPU_CR0_PE_ON 0x1
|
||||
#define GRUB_MEMORY_CPU_CR4_PAE_ON 0x00000040
|
||||
#define GRUB_MEMORY_CPU_CR4_PAE_ON 0x00000020
|
||||
#define GRUB_MEMORY_CPU_CR4_PSE_ON 0x00000010
|
||||
#define GRUB_MEMORY_CPU_CR0_PAGING_ON 0x80000000
|
||||
#define GRUB_MEMORY_CPU_AMD64_MSR 0xc0000080
|
||||
#define GRUB_MEMORY_CPU_AMD64_MSR_ON 0x00000100
|
||||
|
|
|
@ -34,7 +34,23 @@ struct grub_relocator32_state
|
|||
grub_uint32_t esi;
|
||||
};
|
||||
|
||||
struct grub_relocator64_state
|
||||
{
|
||||
grub_uint64_t rsp;
|
||||
grub_uint64_t rax;
|
||||
grub_uint64_t rbx;
|
||||
grub_uint64_t rcx;
|
||||
grub_uint64_t rdx;
|
||||
grub_uint64_t rip;
|
||||
grub_uint64_t rsi;
|
||||
grub_addr_t cr3;
|
||||
};
|
||||
|
||||
grub_err_t grub_relocator32_boot (struct grub_relocator *rel,
|
||||
struct grub_relocator32_state state);
|
||||
|
||||
grub_err_t grub_relocator64_boot (struct grub_relocator *rel,
|
||||
struct grub_relocator64_state state,
|
||||
grub_addr_t min_addr, grub_addr_t max_addr);
|
||||
|
||||
#endif /* ! GRUB_RELOCATOR_CPU_HEADER */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue