2009-05-03 Bean <bean123ch@gmail.com> Vladimir Serbinenko <phcoder@gmail.com>
FreeBSD 64-bit support * conf/i386-pc.rmk (bsd_mod_SOURCES): add loader/i386/bsd_helper.S and loader/i386/bsd_trampoline.S (bsd_mod_ASFLAGS): new variable * include/grub/i386/bsd.h (FREEBSD_MODINFOMD_SMAP): new definition (FREEBSD_MODTYPE_KERNEL64): likewise (grub_bsd64_trampoline_start): likewise (grub_bsd64_trampoline_end): likewise (grub_bsd64_trampoline_selfjump): likewise (grub_bsd64_trampoline_gdt): likewise * include/grub/i386/loader.h (grub_unix_real_boot): moved from here ... * include/grub/i386/bsd.h (grub_unix_real_boot): ... moved here * kern/i386/loader.S (grub_unix_real_boot): moved from here ... * loader/i386/bsd_helper.S (grub_unix_real_boot): moved here * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type of "attrib" member * loader/i386/bsd_pagetable.c: new file * loader/i386/bsd_trampoline.S: likewise * loader/i386/bsd.c (ALIGN_QWORD): new macro (ALIGN_VAR): likewise (entry_hi): new variable (kern_end_mdofs): likewise (is_64bit): likewise (grub_freebsd_add_meta): use ALIGN_VAR (grub_e820_mmap): new declaration (grub_freebsd_add_mmap): new function (grub_freebsd_add_meta_module): support 64 bit kernels (grub_freebsd_list_modules): use ALIGN_VAR (gdt_descriptor): new declaration (grub_freebsd_boot): support 64 bit kernels (grub_bsd_elf64_hook): new function (grub_bsd_load_elf): support elf64
This commit is contained in:
parent
038c5720de
commit
cef17233d4
6 changed files with 310 additions and 39 deletions
|
@ -80,9 +80,12 @@
|
|||
#define FREEBSD_MODINFOMD_SHDR 0x0009 /* section header table */
|
||||
#define FREEBSD_MODINFOMD_NOCOPY 0x8000 /* don't copy this metadata to the kernel */
|
||||
|
||||
#define FREEBSD_MODINFOMD_SMAP 0x1001
|
||||
|
||||
#define FREEBSD_MODINFOMD_DEPLIST (0x4001 | FREEBSD_MODINFOMD_NOCOPY) /* depends on */
|
||||
|
||||
#define FREEBSD_MODTYPE_KERNEL "elf kernel"
|
||||
#define FREEBSD_MODTYPE_KERNEL64 "elf64 kernel"
|
||||
#define FREEBSD_MODTYPE_MODULE "elf module"
|
||||
#define FREEBSD_MODTYPE_RAW "raw"
|
||||
|
||||
|
@ -224,4 +227,11 @@ struct grub_netbsd_btinfo_bootdisk
|
|||
int partition;
|
||||
};
|
||||
|
||||
void grub_unix_real_boot (grub_addr_t entry, ...)
|
||||
__attribute__ ((cdecl,noreturn));
|
||||
|
||||
extern grub_uint8_t grub_bsd64_trampoline_start, grub_bsd64_trampoline_end;
|
||||
extern grub_uint32_t grub_bsd64_trampoline_selfjump;
|
||||
extern grub_uint32_t grub_bsd64_trampoline_gdt;
|
||||
|
||||
#endif /* ! GRUB_BSD_CPU_HEADER */
|
||||
|
|
|
@ -32,7 +32,4 @@ extern grub_size_t EXPORT_VAR(grub_os_area_size);
|
|||
|
||||
grub_err_t EXPORT_FUNC(grub_linux16_boot) (void);
|
||||
|
||||
void EXPORT_FUNC(grub_unix_real_boot) (grub_addr_t entry, ...)
|
||||
__attribute__ ((cdecl,noreturn));
|
||||
|
||||
#endif /* ! GRUB_LOADER_CPU_HEADER */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue