From: Vladimir 'phcoder' Serbinenko Date: Sun, 2 Jan 2011 23:04:39 +0000 (+0100) Subject: merge mainline to ia64 X-Git-Tag: 2.00~1266^2~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0f35c665e6cd0388ca05f7415dd4d5f365e41756;p=thirdparty%2Fgrub.git merge mainline to ia64 --- 0f35c665e6cd0388ca05f7415dd4d5f365e41756 diff --cc grub-core/Makefile.am index 17266b0f9,073ce37f6..5481d9ebb --- a/grub-core/Makefile.am +++ b/grub-core/Makefile.am @@@ -122,17 -125,9 +125,17 @@@ KERNEL_HEADER_FILES += $(top_srcdir)/in KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/i386/pit.h endif + +if COND_ia64_efi +KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/efi/efi.h +KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/efi/time.h +KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/efi/disk.h +KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/ia64/efi/misc.h +endif + if COND_mips_yeeloong + KERNEL_HEADER_FILES += $(top_builddir)/include/grub/keyboard_layouts.h KERNEL_HEADER_FILES += $(top_builddir)/include/grub/machine/kernel.h - KERNEL_HEADER_FILES += $(top_builddir)/include/grub/machine/memory.h KERNEL_HEADER_FILES += $(top_builddir)/include/grub/cpu/cache.h KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/bitmap.h KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/video.h diff --cc grub-core/Makefile.core.def index e819dd64f,37c0ce970..8f988b0be --- a/grub-core/Makefile.core.def +++ b/grub-core/Makefile.core.def @@@ -6,26 -18,23 +18,29 @@@ kernel = nostrip = emu; emu_ldflags = '-Wl,-r,-d'; - x86_efi_ldflags = '-Wl,-r,-d'; - x86_efi_stripflags = '--strip-unneeded -K start -R .note -R .comment'; + i386_efi_ldflags = '-Wl,-r,-d'; + i386_efi_stripflags = '--strip-unneeded -K start -R .note -R .comment'; + x86_64_efi_ldflags = '-Wl,-r,-d'; + x86_64_efi_stripflags = '--strip-unneeded -K start -R .note -R .comment'; + + ia64_efi_cflags = '-fno-builtin -fpic -minline-int-divide-max-throughput'; + ia64_efi_ldflags = '-melf_64'; + ia64_efi_stripflags = '-R .note -R .comment -X'; i386_pc_ldflags = '$(TARGET_IMG_LDFLAGS)'; - i386_pc_ldflags = '$(TARGET_IMG_BASE_LDOPT),$(GRUB_KERNEL_MACHINE_LINK_ADDR)'; + i386_pc_ldflags = '$(TARGET_IMG_BASE_LDOPT),0x8200'; i386_qemu_ldflags = '$(TARGET_IMG_LDFLAGS)'; - i386_qemu_ldflags = '$(TARGET_IMG_BASE_LDOPT),$(GRUB_KERNEL_MACHINE_LINK_ADDR)'; + i386_qemu_ldflags = '$(TARGET_IMG_BASE_LDOPT),0x8200'; - i386_coreboot_ldflags = '-Wl,-Ttext=$(GRUB_KERNEL_MACHINE_LINK_ADDR)'; - i386_multiboot_ldflags = '-Wl,-Ttext=$(GRUB_KERNEL_MACHINE_LINK_ADDR)'; - i386_ieee1275_ldflags = '-Wl,-Ttext=$(GRUB_KERNEL_MACHINE_LINK_ADDR)'; - mips_yeeloong_ldflags = '-Wl,-Ttext,$(GRUB_KERNEL_MACHINE_LINK_ADDR)'; - powerpc_ieee1275_ldflags = '-Wl,-Ttext,$(GRUB_KERNEL_MACHINE_LINK_ADDR)'; + ldadd = '$(LDADD_KERNEL)'; + + i386_coreboot_ldflags = '-Wl,-Ttext=0x8200'; + i386_multiboot_ldflags = '-Wl,-Ttext=0x8200'; + i386_ieee1275_ldflags = '-Wl,-Ttext=0x10000'; + mips_yeeloong_ldflags = '-Wl,-Ttext,0x80200000'; + powerpc_ieee1275_ldflags = '-Wl,-Ttext,0x200000'; + sparc64_ieee1275_ldflags = '-Wl,-Ttext,0x4400'; mips_yeeloong_cppflags = '-DUSE_ASCII_FAILBACK'; i386_qemu_cppflags = '-DGRUB_BOOT_MACHINE_LINK_ADDR=$(GRUB_BOOT_MACHINE_LINK_ADDR)'; @@@ -169,11 -171,8 +182,9 @@@ emu = kern/emu/misc.c; emu = kern/emu/mm.c; emu = kern/emu/time.c; + emu = kern/emu/cache.c; - videoinkernel = lib/arg.c; videoinkernel = term/gfxterm.c; - videoinkernel = commands/extcmd.c; videoinkernel = font/font.c; videoinkernel = font/font_cmd.c; videoinkernel = io/bufio.c; @@@ -428,41 -450,41 +463,76 @@@ module = enable = i386_multiboot; }; +module = { + name = lsacpi; + + common = commands/lsacpi.c; + + enable = efi; + enable = i386_pc; + enable = i386_coreboot; + enable = i386_multiboot; +}; + +module = { + name = lsefisystab; + + common = commands/efi/lsefisystab.c; + + enable = efi; +}; + +module = { + name = lssal; + + common = commands/efi/lssal.c; + + enable = efi; +}; + +module = { + name = lsefimmap; + + common = commands/efi/lsefimmap.c; + + enable = efi; +}; + + module = { + name = lsacpi; + + common = commands/lsacpi.c; + + enable = x86_efi; + enable = i386_pc; + enable = i386_coreboot; + enable = i386_multiboot; + }; + + module = { + name = lsefisystab; + + common = commands/efi/lsefisystab.c; + + enable = x86_efi; + }; + + module = { + name = lssal; + + common = commands/efi/lssal.c; + + enable = x86_efi; + }; + + module = { + name = lsefimmap; + + common = commands/efi/lsefimmap.c; + + enable = x86_efi; + }; + module = { name = blocklist; common = commands/blocklist.c; diff --cc grub-core/kern/emu/cache.S index 99637762a,abd81c910..8ca695c28 --- a/grub-core/kern/emu/cache.S +++ b/grub-core/kern/emu/cache.S @@@ -7,10 -7,22 +7,23 @@@ #elif defined(__sparc__) #include "../sparc64/cache.S" #elif defined(__mips__) - #include "../mips/cache.S" + /* On MIPS we must go through standard functions. */ + #include + + FUNCTION (grub_cpu_flush_cache) + FUNCTION (grub_arch_sync_caches) + .set nomacro + .set noreorder + lui $t0, %hi(_flush_cache) + addui $t0, $t0, %lo(_flush_cache) + move $a3, $zero + jr $t0 + nop + .set reorder + .set macro #elif defined(__powerpc__) #include "../powerpc/cache.S" +#elif defined(__ia64__) #else #error "No target cpu type is defined" #endif diff --cc grub-core/kern/emu/full.c index 80edb991e,70bcae78f..87317c916 --- a/grub-core/kern/emu/full.c +++ b/grub-core/kern/emu/full.c @@@ -49,12 -50,22 +50,31 @@@ grub_emu_init (void grub_no_autoload = 1; } +#ifdef __ia64__ +void grub_arch_dl_get_tramp_got_size (const void *ehdr __attribute__ ((unused)), + grub_size_t *tramp, grub_size_t *got) +{ + *tramp = 0; + *got = 0; +} ++#endif + + #ifdef GRUB_LINKER_HAVE_INIT + void + grub_arch_dl_init_linker (void) + { + } #endif + + void + grub_emu_post_init (void) + { + grub_lvm_fini (); + grub_mdraid09_fini (); + grub_mdraid1x_fini (); + grub_raid_fini (); + grub_raid_init (); + grub_mdraid09_init (); + grub_mdraid1x_init (); + grub_lvm_init (); + } diff --cc include/grub/types.h index 478ce712d,8632eacd0..4fd7a3a4b --- a/include/grub/types.h +++ b/include/grub/types.h @@@ -101,10 -99,10 +99,12 @@@ typedef grub_int64_t grub_ssize_t # if GRUB_CPU_SIZEOF_LONG == 8 # define PRIxGRUB_SIZE "lx" +# define PRIxGRUB_ADDR "lx" + # define PRIuGRUB_SIZE "lu" # else # define PRIxGRUB_SIZE "llx" +# define PRIxGRUB_ADDR "llx" + # define PRIuGRUB_SIZE "llu" # endif #else typedef grub_uint32_t grub_addr_t; @@@ -112,7 -110,7 +112,8 @@@ typedef grub_uint32_t grub_size_t typedef grub_int32_t grub_ssize_t; # define PRIxGRUB_SIZE "x" +# define PRIxGRUB_ADDR "x" + # define PRIuGRUB_SIZE "u" #endif #if GRUB_CPU_SIZEOF_LONG == 8