From: Vladimir 'phcoder' Serbinenko Date: Tue, 17 May 2011 07:17:38 +0000 (+0200) Subject: SGI ARCS port. X-Git-Tag: 2.00~1254 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=400b93718ff3bef9ddc8f019e239b2699d295203;p=thirdparty%2Fgrub.git SGI ARCS port. * Makefile.util.def (libgrubmods.a): Add dvh.c. * conf/Makefile.common (CCASFLAGS_PLATFORM): Add -mips3 on all mips platforms. * configure.ac: New target mips-arc. * gentpl.py: Likewise. * grub-core/Makefile.am: Likewise. * grub-core/Makefile.core.def: Likewise. (xz_decompress): Remove -D GRUB_MACHINE_LINK_ADDR. (none_decompress): Likewise. (lsdev): New module. (datetime): Use lib/arc/datetime.c on ARC. (part_dvh): New module. * grub-core/commands/arc/lsdev.c: New file. * grub-core/disk/arc/arcdisk.c: Likewise. * grub-core/kern/mips/arc/init.c: Likewise. * grub-core/kern/mips/cache_flush.S: Don't flush non 4-byte aligned addresses. * grub-core/kern/mips/dl.c (grub_arch_dl_check_header): Fix bigendian support. (grub_arch_dl_relocate_symbols): Likewise. * grub-core/kern/mips/loongson/init.c (grub_get_rtc): Moved from here... * grub-core/kern/mips/init.c (grub_get_rtc): ... here. * grub-core/kern/mips/startup.S (grub_arch_cpuclock): Have on all platforms. * grub-core/lib/arc/datetime.c: New file. * grub-core/loader/mips/linux.c: Always include time.h. Don't include pci.h on non-loongson. (envp_off) [!GRUB_MACHINE_MIPS_LOONGSON]: Remove. (grub_linux_boot): Set unused registers to 0. (grub_cmd_linux) [!GRUB_MACHINE_MIPS_LOONGSON]: Remove envp. * grub-core/mmap/mips/loongson/uppermem.c: Moved from here ... * grub-core/mmap/mips/uppermem.c: ...here. * grub-core/partmap/dvh.c: New file. * grub-core/term/arc/console.c: Likewise. * grub-core/term/terminfo.c (ANSI_C0_STR): New const. (grub_terminfo_set_current): Add terminal "arc". (grub_terminfo_readkey): Support ARC sequences. * include/grub/arc/arc.h: New file. * include/grub/arc/console.h: Likewise. * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_ARCDISK_ID. * include/grub/mips/arc/kernel.h: New file. * include/grub/mips/arc/memory.h: Likewise. * include/grub/mips/arc/time.h: Likewise. * include/grub/mips/loongson/kernel.h (grub_halt): Moved from here ... * include/grub/mips/kernel.h (grub_halt): ... here. * include/grub/mips/loongson.h (GRUB_CPU_REGISTER_WRAP): Moved from here... * include/grub/mips/mips.h (GRUB_CPU_REGISTER_WRAP): ... here. (GRUB_CPU_LOONGSON_COP0_TIMER_COUNT): Moved from here ... * include/grub/mips/mips.h (GRUB_CPU_LOONGSON_COP0_TIMER_COUNT): .. here * include/grub/mips/loongson/kernel.h (grub_reboot): Removed redundant proto. * include/grub/mips/loongson/memory.h (GRUB_ARCH_LOWMEMVSTART): Moved from here ... * include/grub/mips/memory.h (GRUB_ARCH_LOWMEMVSTART): ... here. (GRUB_ARCH_LOWMEMPSTART): Moved from here ... * include/grub/mips/memory.h (GRUB_ARCH_LOWMEMPSTART): ... here. (GRUB_ARCH_LOWMEMMAXSIZE): Moved from here ... * include/grub/mips/memory.h (GRUB_ARCH_LOWMEMMAXSIZE): ... here. (GRUB_ARCH_HIGHMEMPSTART): Moved from here ... * include/grub/mips/memory.h (GRUB_ARCH_HIGHMEMPSTART): ... here. (grub_phys_addr_t): Moved from here ... * include/grub/mips/memory.h (grub_phys_addr_t): ... here. (grub_vtop): Moved from here ... * include/grub/mips/memory.h (grub_vtop): ... here. (grub_map_memory): Moved from here ... * include/grub/mips/memory.h (grub_map_memory): ... here. (grub_unmap_memory): Moved from here ... * include/grub/mips/memory.h (grub_unmap_memory): ... here. (grub_machine_mmap_iterate): Moved from here ... * include/grub/mips/memory.h (grub_machine_mmap_iterate): ... here. (grub_mmap_get_lower): Moved from here ... * include/grub/mips/memory.h (grub_mmap_get_lower): ... here. (grub_mmap_get_upper): Moved from here ... * include/grub/mips/memory.h (grub_mmap_get_upper): ... here. * include/grub/mips/loongson/time.h (grub_arch_cpuclock): Moved from here ... * include/grub/mips/time.h (grub_arch_cpuclock): ... here. * include/grub/mips/loongson/time.h (grub_get_rtc): Moved from here ... * include/grub/mips/time.h (grub_get_rtc): ... here. * include/grub/mips/loongson/time.h (grub_arch_cpuclock): Moved from here ... * include/grub/mips/time.h (grub_arch_cpuclock): ... here. * include/grub/mips/loongson/time.h (grub_cpu_idle): Moved from here ... * include/grub/mips/time.h (grub_cpu_idle): ... here. * include/grub/offsets.h (GRUB_KERNEL_MIPS_ARC_LINK_ADDR): New definition. (GRUB_KERNEL_MIPS_ARC_LINK_ALIGN): Likewise. (GRUB_KERNEL_MIPS_ARC_COMPRESSED_SIZE): Likewise. (GRUB_KERNEL_MIPS_ARC_UNCOMPRESSED_SIZE): Likewise. (GRUB_KERNEL_MIPS_ARC_TOTAL_MODULE_SIZE): Likewise. (GRUB_KERNEL_MIPS_ARC_PREFIX): Likewise. (GRUB_KERNEL_MIPS_ARC_PREFIX_END): Likewise. (GRUB_KERNEL_MIPS_ARC_MOD_ALIGN): Likewise. (GRUB_MACHINE_LINK_ADDR): Likewise. * include/grub/terminfo.h (GRUB_TERMINFO_READKEY_MAX_LEN): Increased to 6. * util/grub-install.in: Run dvhtool on ARC. * util/grub-mkimage.c (image_targets): Add mips-arc. --- 400b93718ff3bef9ddc8f019e239b2699d295203 diff --cc ChangeLog index 868391294,505be20c2..088de8937 --- a/ChangeLog +++ b/ChangeLog @@@ -1,260 -1,3 +1,367 @@@ ++2011-05-17 Vladimir Serbinenko ++ ++ SGI ARCS port. ++ ++ * Makefile.util.def (libgrubmods.a): Add dvh.c. ++ * conf/Makefile.common (CCASFLAGS_PLATFORM): Add -mips3 on all mips ++ platforms. ++ * configure.ac: New target mips-arc. ++ * gentpl.py: Likewise. ++ * grub-core/Makefile.am: Likewise. ++ * grub-core/Makefile.core.def: Likewise. ++ (xz_decompress): Remove -D GRUB_MACHINE_LINK_ADDR. ++ (none_decompress): Likewise. ++ (lsdev): New module. ++ (datetime): Use lib/arc/datetime.c on ARC. ++ (part_dvh): New module. ++ * grub-core/commands/arc/lsdev.c: New file. ++ * grub-core/disk/arc/arcdisk.c: Likewise. ++ * grub-core/kern/mips/arc/init.c: Likewise. ++ * grub-core/kern/mips/cache_flush.S: Don't flush non 4-byte ++ aligned addresses. ++ * grub-core/kern/mips/dl.c (grub_arch_dl_check_header): Fix bigendian ++ support. ++ (grub_arch_dl_relocate_symbols): Likewise. ++ * grub-core/kern/mips/loongson/init.c (grub_get_rtc): Moved from here... ++ * grub-core/kern/mips/init.c (grub_get_rtc): ... here. ++ * grub-core/kern/mips/startup.S (grub_arch_cpuclock): Have on all ++ platforms. ++ * grub-core/lib/arc/datetime.c: New file. ++ * grub-core/loader/mips/linux.c: Always include time.h. Don't include ++ pci.h on non-loongson. ++ (envp_off) [!GRUB_MACHINE_MIPS_LOONGSON]: Remove. ++ (grub_linux_boot): Set unused registers to 0. ++ (grub_cmd_linux) [!GRUB_MACHINE_MIPS_LOONGSON]: Remove envp. ++ * grub-core/mmap/mips/loongson/uppermem.c: Moved from here ... ++ * grub-core/mmap/mips/uppermem.c: ...here. ++ * grub-core/partmap/dvh.c: New file. ++ * grub-core/term/arc/console.c: Likewise. ++ * grub-core/term/terminfo.c (ANSI_C0_STR): New const. ++ (grub_terminfo_set_current): Add terminal "arc". ++ (grub_terminfo_readkey): Support ARC sequences. ++ * include/grub/arc/arc.h: New file. ++ * include/grub/arc/console.h: Likewise. ++ * include/grub/disk.h (grub_disk_dev_id): Add ++ GRUB_DISK_DEVICE_ARCDISK_ID. ++ * include/grub/mips/arc/kernel.h: New file. ++ * include/grub/mips/arc/memory.h: Likewise. ++ * include/grub/mips/arc/time.h: Likewise. ++ * include/grub/mips/loongson/kernel.h (grub_halt): Moved from here ... ++ * include/grub/mips/kernel.h (grub_halt): ... here. ++ * include/grub/mips/loongson.h (GRUB_CPU_REGISTER_WRAP): Moved from ++ here... ++ * include/grub/mips/mips.h (GRUB_CPU_REGISTER_WRAP): ... here. ++ (GRUB_CPU_LOONGSON_COP0_TIMER_COUNT): Moved from here ... ++ * include/grub/mips/mips.h (GRUB_CPU_LOONGSON_COP0_TIMER_COUNT): .. here ++ * include/grub/mips/loongson/kernel.h (grub_reboot): Removed redundant ++ proto. ++ * include/grub/mips/loongson/memory.h (GRUB_ARCH_LOWMEMVSTART): Moved ++ from here ... ++ * include/grub/mips/memory.h (GRUB_ARCH_LOWMEMVSTART): ... here. ++ (GRUB_ARCH_LOWMEMPSTART): Moved from here ... ++ * include/grub/mips/memory.h (GRUB_ARCH_LOWMEMPSTART): ... here. ++ (GRUB_ARCH_LOWMEMMAXSIZE): Moved from here ... ++ * include/grub/mips/memory.h (GRUB_ARCH_LOWMEMMAXSIZE): ... here. ++ (GRUB_ARCH_HIGHMEMPSTART): Moved from here ... ++ * include/grub/mips/memory.h (GRUB_ARCH_HIGHMEMPSTART): ... here. ++ (grub_phys_addr_t): Moved from here ... ++ * include/grub/mips/memory.h (grub_phys_addr_t): ... here. ++ (grub_vtop): Moved from here ... ++ * include/grub/mips/memory.h (grub_vtop): ... here. ++ (grub_map_memory): Moved from here ... ++ * include/grub/mips/memory.h (grub_map_memory): ... here. ++ (grub_unmap_memory): Moved from here ... ++ * include/grub/mips/memory.h (grub_unmap_memory): ... here. ++ (grub_machine_mmap_iterate): Moved from here ... ++ * include/grub/mips/memory.h (grub_machine_mmap_iterate): ... here. ++ (grub_mmap_get_lower): Moved from here ... ++ * include/grub/mips/memory.h (grub_mmap_get_lower): ... here. ++ (grub_mmap_get_upper): Moved from here ... ++ * include/grub/mips/memory.h (grub_mmap_get_upper): ... here. ++ * include/grub/mips/loongson/time.h (grub_arch_cpuclock): Moved from ++ here ... ++ * include/grub/mips/time.h (grub_arch_cpuclock): ... here. ++ * include/grub/mips/loongson/time.h (grub_get_rtc): Moved from ++ here ... ++ * include/grub/mips/time.h (grub_get_rtc): ... here. ++ * include/grub/mips/loongson/time.h (grub_arch_cpuclock): Moved from ++ here ... ++ * include/grub/mips/time.h (grub_arch_cpuclock): ... here. ++ * include/grub/mips/loongson/time.h (grub_cpu_idle): Moved from ++ here ... ++ * include/grub/mips/time.h (grub_cpu_idle): ... here. ++ * include/grub/offsets.h (GRUB_KERNEL_MIPS_ARC_LINK_ADDR): New ++ definition. ++ (GRUB_KERNEL_MIPS_ARC_LINK_ALIGN): Likewise. ++ (GRUB_KERNEL_MIPS_ARC_COMPRESSED_SIZE): Likewise. ++ (GRUB_KERNEL_MIPS_ARC_UNCOMPRESSED_SIZE): Likewise. ++ (GRUB_KERNEL_MIPS_ARC_TOTAL_MODULE_SIZE): Likewise. ++ (GRUB_KERNEL_MIPS_ARC_PREFIX): Likewise. ++ (GRUB_KERNEL_MIPS_ARC_PREFIX_END): Likewise. ++ (GRUB_KERNEL_MIPS_ARC_MOD_ALIGN): Likewise. ++ (GRUB_MACHINE_LINK_ADDR): Likewise. ++ * include/grub/terminfo.h (GRUB_TERMINFO_READKEY_MAX_LEN): Increased ++ to 6. ++ * util/grub-install.in: Run dvhtool on ARC. ++ * util/grub-mkimage.c (image_targets): Add mips-arc. ++ +2011-05-16 Vladimir Serbinenko + + * grub-core/bus/pci.c (grub_memalign_dma32): Always allocate in 64-byte + blocks. + +2011-05-16 Vladimir Serbinenko + + * grub-core/bus/usb/usbhub.c (attach_root_port): Wait 10ms + after enabling port. + +2011-05-16 Vladimir Serbinenko + + Skip incorrect USB devices. + + * grub-core/bus/usb/usb.c (grub_usb_device_initialize): Fail if + configcnt == 0. + * include/grub/usb.h (grub_usb_err_t): New enum value + GRUB_USB_ERR_BADDEVICE. + +2011-05-16 Vladimir Serbinenko + + Fuloong video init support. + + * include/grub/vga.h (grub_vga_write_arx): inb monochrome address as + well. + (grub_vga_read_arx): New function. + * grub-core/video/sis315pro.c (GRUB_SIS315PRO_MMIO_SPACE): New + definition. + (framebuffer): New members io, mmioptr and mmiobase. + (read_sis_cmd): New function. + (write_sis_cmd): Likewise. + (grub_video_sis315pro_setup): Do the initialisation. Use 640x480 + rather than 640x400. + * grub-core/video/sis315_init.c: New file. + +2011-05-15 Vladimir Serbinenko + + * grub-core/bus/cs5536.c: Don't include grub/machine/kernel.h on + non-loongson. + * grub-core/kern/mips/dl.c (grub_arch_dl_init_linker): Fix argument + to grub_dl_register_symbol. + +2011-05-15 Vladimir Serbinenko + + Fix compilation errors. + + * grub-core/term/ns8250.c (serial_get_divisor): Declare 'port' as + potentially unused. + * grub-core/loader/i386/linux.c (grub_linux_setup_video): + Handle GRUB_VIDEO_DRIVER_SIS315PRO. + * grub-core/bus/cs5536.c (grub_cs5536_init_geode): Restrict DIVIL init + to loongson machines. + +2011-05-15 Vladimir Serbinenko + + Several FS mtime support. + + * grub-core/fs/affs.c (grub_affs_time): New struct. + (grub_affs_file): New field mtime. + (grub_fshelp_node): Changed 'block' and 'parent' to more appropriate + type. Removed 'size'. New field 'di'. All users updated. + (grub_affs_mount): Simplify checsum checking. + (grub_affs_iterate_dir): New helper grub_affs_create_node. + (grub_affs_dir): Handle mtime. + * grub-core/fs/cpio.c (grub_cpio_find_file): Handle mtime. + (grub_cpio_dir): Likewise. + * grub-core/fs/hfs.c (grub_hfs_dirrec): New fields 'ctime' and 'mtime'. + (grub_hfs_filerec): New field mtime. + (grub_hfs_dir): Handle mtime. + (grub_hfs_mtime): New function. + (grub_hfs_fs): Register grub_hfs_mtime. + * grub-core/fs/iso9660.c (grub_iso9660_date2): New struct. + (grub_iso9660_dir): New field mtime. + (grub_fshelp_node): New field dirent. + (iso9660_to_unixtime): New function. + (iso9660_to_unixtime2): Likewise. + (grub_iso9660_read_symlink): Use node->dirent. + (grub_iso9660_iterate_dir): Likewise. + (grub_iso9660_dir): Set mtime. + (grub_iso9660_mtime): New function. + (grub_iso9660_fs): Register grub_iso9660_mtime. + * grub-core/fs/jfs.c (grub_jfs_time): New struct. + (grub_jfs_inode): New fields atime, ctime and mtime. + (grub_jfs_dir): Set mtime. + * grub-core/fs/minix.c (grub_minix_dir): Likewise. + * grub-core/fs/ntfs.c (list_file): Set mtime. + (grub_ntfs_dir): Likewise. + * grub-core/fs/reiserfs.c (grub_fshelp_node): New field 'mtime'. + (grub_reiserfs_iterate_dir): Set mtime. + (grub_reiserfs_dir): Likewise. + * grub-core/fs/sfs.c (grub_sfs_obj): New field mtime. + (grub_fshelp_node): Likewise. + (grub_sfs_iterate_dir): Set mtime. + (grub_sfs_dir): Likewise. + * grub-core/fs/udf.c (grub_udf_dir): Set mtime. + * grub-core/fs/xfs.c (grub_xfs_time): New struct. + (grub_xfs_inode): New fields atime, mtime, ctime. + (grub_xfs_dir): Set mtime. + * include/grub/datetime.h (grub_datetime2unixtime): New function. + * include/grub/hfs.h (grub_hfs_sblock): New fields ctime and mtime. + * include/grub/ntfs.h (grub_fshelp_node): New field mtime. + + Support UDF symlinks. + + * grub-core/fs/udf.c (grub_udf_iterate_dir): Handle symlinks. + (grub_ufs_read_symlink): New function. All users updated. + + Check amiga partmap checksum. + + * grub-core/partmap/amiga.c (grub_amiga_rdsk): Pad to 128 bytes. + (grub_amiga_partition): Likewise. + (amiga_partition_map_checksum): New function. + (amiga_partition_map_iterate): Check checksum. + +2011-05-15 Vladimir Serbinenko + + ROMFS support. + + * Makefile.util.def (libgrubmods.a): Add romfs. + * grub-core/Makefile.core.def (romfs): New module. + * grub-core/fs/romfs.c: New file. + +2011-05-15 Vladimir Serbinenko + + Squashfs v4 support. + + * Makefile.util.def (libgrubmods.a): Add squash4. + * grub-core/Makefile.core.def (squash4): New module. + * grub-core/fs/squash4.c: New file. + * grub-core/io/gzio.c (grub_gzio): New members disk_input_off, + disk_input_start, disk_input. + (get_byte): Handle disk_input. + (grub_zlib_disk_read): New function. + * include/grub/deflate.h (grub_zlib_disk_read): New proto. + +2011-05-15 Vladimir Serbinenko +2011-05-15 Feiran Zheng + + * Makefile.util.def (libgrubmods.a): Add minix3. + * grub-core/Makefile.core.def (minix3): New module. + * grub-core/fs/minix.c (GRUB_MINIX_MAGIC) [MODE_MINIX3]: New value. + (GRUB_MINIX_BSIZE): Removed. + (GRUB_MINIX_INODE_DIR_BLOCKS): New definition. All users updated. + (grub_minix_ino_t): New type. + (grub_minix_le_to_cpu_ino): New macro. + (GRUB_MINIX_ZONE2SECT): New definition. All users updated. + (grub_minix_sblock) [MODE_MINIX3]: Change for minix3. + (grub_minix_data): New field block_size. + (grub_minix_read_file): Handle 64-bit correctly. + * grub-core/fs/minix3.c: New file. + +2011-05-15 Tristan Gingold +2011-05-15 Robert Millan +2011-05-15 Vladimir Serbinenko + + IA64 support. + + * Makefile.util.def (libgrubmods.a): Add grub-core/kern/ia64/dl_helper.c + * configure.ac: Add ia64-efi target. + Probe for __ia64_trampoline, __udivsi3, __umoddi3, __udivdi3, + __divsi3, __modsi3, __umodsi3, __moddi3 and __divdi3 symbols. + * gentpl.py: Add ia64_efi platform. + Rename x86_efi to efi and Add ia64-efi. All users updated. + * grub-core/Makefile.am: Set KERNEL_HEADER_FILES for ia64-efi. + * grub-core/Makefile.core.def (kernel.img): Add compile flags for ia64. + Remove kern/generic/rtc_get_time_ms.c on EFI. + Add kern/ia64/efi/startup.S, kern/ia64/efi/init.c, kern/ia64/dl.c, + kern/ia64/dl_helper.c on ia64-efi. + Add kern/emu/cache.c on emu. + (linux): Use on loader/ia64/efi/linux.c on ia64. + * grub-core/gensymlist.sh (grub_register_exported_symbols): Check + whether symbol is a function. + * grub-core/kern/dl.c [GRUB_MACHINE_EMU]: Include sys/mman.h. + (grub_symbol): New field 'isfunc'. + (grub_dl_resolve_symbol): Return whole symbol rather than just address. + (grub_dl_register_symbol): New argument 'isfunc'. All users updated. + (grub_dl_load_segments): Place all sections into the same region. + [__ia64__]: Create trampolines and got. + [GRUB_MACHINE_EMU]: Call mprotect. + (grub_dl_resolve_symbols): Resolve symbol type as well. + [__ia64__]: Create function descriptors. + * grub-core/kern/efi/efi.c (grub_get_rtc): Renamed to ... + (grub_rtc_get_time_ms): ... this. Expressions simplified. + (grub_get_rtc): New function. + * grub-core/kern/emu/cache.c [__ia64__]: New file. + * grub-core/kern/emu/cache.S: Renamed to ... + * grub-core/kern/emu/cache_s.S: ... this. + [__ia64__]: Add a nop. + * grub-core/kern/emu/full.c (grub_arch_dl_get_tramp_got_size) + [__ia64__]: New function. + * grub-core/kern/emu/lite.c [__ia64__]: Include ../ia64/dl.c. + * grub-core/kern/ia64/dl.c: New file. + * grub-core/kern/ia64/dl_helper.c: Likewise. + * grub-core/kern/ia64/efi/init.c: New file. + * grub-core/kern/ia64/efi/startup.S: Likewise. + * grub-core/lib/efi/halt.c [__ia64__]: Don't try acpi. + * grub-core/lib/ia64/longjmp.S: New file (from glibc). + * grub-core/lib/ia64/setjmp.S: Likewise (from glibc). + * grub-core/lib/setjmp.S [__ia64__]: Include ./ia64/setjmp.S. + * grub-core/loader/ia64/efi/linux.c: New file. + * include/grub/dl.h (GRUB_MOD_NAME): Redefined using C rather than asm. + (GRUB_MOD_DEP): Likewise. + (grub_dl) [__ia64__]: New fields got and tramp. + (grub_dl): New field 'base'. + (grub_dl_register_symbol): New argument isfunc. All users updated. + (GRUB_IA64_DL_TRAMP_ALIGN): New definition. + (GRUB_IA64_DL_TRAMP_SIZE): Likewise. + (GRUB_IA64_DL_GOT_ALIGN): Likewise. + (grub_ia64_dl_get_tramp_got_size): New proto. + (GRUB_ARCH_DL_TRAMP_ALIGN) [__ia64__]: Likewise + (GRUB_ARCH_DL_GOT_ALIGN) [__ia64__]: Likewise + (grub_arch_dl_get_tramp_got_size) [__ia64__]: Likewise + * include/grub/efi/api.h: Skip call wrappers on ia64. + * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_IA64): New definition. + * include/grub/efi/time.h (GRUB_TICKS_PER_SECOND): Change to 1000. + * include/grub/elf.h (ELF_ST_INFO): New definition. + * include/grub/ia64/efi/kernel.h: New file. + * include/grub/ia64/efi/memory.h: Likewise. + * include/grub/ia64/efi/time.h: Likewise. + * include/grub/ia64/kernel.h: Likewise. + * include/grub/ia64/setjmp.h: Likewise (from glibc). + * include/grub/ia64/time.h: New file. + * include/grub/ia64/types.h: Likewise. + * include/grub/libgcc.h (__udivsi3, __umodsi3, __umoddi3, __udivdi3, + __moddi3, __divdi3, __divsi3, __modsi3, __ia64_trampoline): + New protos. + * include/grub/offsets.h (GRUB_KERNEL_IA64_EFI_PREFIX): New definition. + (GRUB_KERNEL_IA64_EFI_PREFIX_END): Likewise. + * include/grub/types.h (PRIxGRUB_ADDR): Likewise. + * util/grub-mkimage.c (image_target_desc): New field pe_target. + All users updated. + (EFI64_HEADER_SIZE): New definition. All users updated. + (image_targets): Add ia64-efi. + * util/grub-mkimagexx.c (relocate_symbols): New arguments jumpers and + jumpers_addr. All users updated. + Create function descriptors. + (count_funcs): New function. + (unaligned_uint32): New struct. + (MASK20): New definition. + (MASK19): Likewise. + (MASKF21): Likewise. + (add_value_to_slot_20b): New function. + (add_value_to_slot_21_real): Likewise. + (add_value_to_slot_21): Likewise. + (ia64_kernel_trampoline): New struct. + (nopm): New variable. + (jump): Likewise. + (make_trampoline): New function. + (relocate_addresses): Handle ia64. + (make_reloc_section): Likewise. + (load_image): Likewise. + +2011-05-15 Vladimir Serbinenko + + * grub-core/fs/btrfs.c (grub_btrfs_read_logical): Silence spurious + warning. Move variables before code while on it. + 2011-05-15 Vladimir Serbinenko Fuloong support. diff --cc gentpl.py index c1e0709ff,375bb0747..fac29b706 --- a/gentpl.py +++ b/gentpl.py @@@ -7,7 -7,7 +7,7 @@@ GRUB_PLATFORMS = [ "emu", "i386_pc", "i386_efi", "i386_qemu", "i386_coreboot", "i386_multiboot", "i386_ieee1275", "x86_64_efi", "mips_loongson", "sparc64_ieee1275", - "powerpc_ieee1275", "ia64_efi" ] - "powerpc_ieee1275", "mips_arc" ] ++ "powerpc_ieee1275", "mips_arc", "ia64_efi" ] GROUPS = {} diff --cc grub-core/Makefile.am index c9ec2a3ff,9a804507b..6419299a5 --- a/grub-core/Makefile.am +++ b/grub-core/Makefile.am @@@ -125,15 -125,17 +125,24 @@@ 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 +endif + + if COND_mips + KERNEL_HEADER_FILES += $(top_builddir)/include/grub/cpu/kernel.h + endif + + if COND_mips_arc + KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/extcmd.h + KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/arc/arc.h + endif + if COND_mips_loongson 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/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 4b868b5a0,0d56ff19b..5f200ed5c --- a/grub-core/Makefile.core.def +++ b/grub-core/Makefile.core.def @@@ -308,12 -302,14 +314,11 @@@ image = common = lib/xzembed/xz_dec_lzma2.c; common = lib/xzembed/xz_dec_stream.c; -- cppflags = '-I$(srcdir)/lib/posix_wrap -I$(srcdir)/lib/xzembed'; -- - mips_cppflags = '-I$(srcdir)/lib/posix_wrap -I$(srcdir)/lib/xzembed -DGRUB_EMBED_DECOMPRESSOR=1 -DGRUB_MACHINE_LINK_ADDR=0x80200000'; - mips_arc_cppflags = '-I$(srcdir)/lib/posix_wrap -I$(srcdir)/lib/xzembed -DGRUB_EMBED_DECOMPRESSOR=1 -DGRUB_MACHINE_LINK_ADDR=0x8a000000'; - mips_yeeloong_cppflags = '-I$(srcdir)/lib/posix_wrap -I$(srcdir)/lib/xzembed -DGRUB_EMBED_DECOMPRESSOR=1 -DGRUB_MACHINE_LINK_ADDR=0x80200000'; ++ cppflags = '-I$(srcdir)/lib/posix_wrap -I$(srcdir)/lib/xzembed -DGRUB_EMBED_DECOMPRESSOR=1'; objcopyflags = '-O binary'; - ldflags = '-static-libgcc -Wl,-Ttext,0x80100000'; - mips_yeeloong_ldflags = '-static-libgcc -Wl,-Ttext,0x80100000'; ++ mips_loongson_ldflags = '-static-libgcc -Wl,-Ttext,0x80100000'; + mips_arc_ldflags = '-static-libgcc -Wl,-Ttext,0x89f00000'; ldadd = '-lgcc'; cflags = '-static-libgcc'; enable = mips; @@@ -324,10 -320,12 +329,11 @@@ image = mips = boot/mips/startup_raw.S; common = boot/decompressor/none.c; - mips_cppflags = '-DGRUB_EMBED_DECOMPRESSOR=1 -DGRUB_MACHINE_LINK_ADDR=0x80200000'; - mips_arc_cppflags = '-DGRUB_EMBED_DECOMPRESSOR=1 -DGRUB_MACHINE_LINK_ADDR=0x8a000000'; - mips_yeeloong_cppflags = '-DGRUB_EMBED_DECOMPRESSOR=1 -DGRUB_MACHINE_LINK_ADDR=0x80200000'; ++ cppflags = '-DGRUB_EMBED_DECOMPRESSOR=1'; objcopyflags = '-O binary'; - ldflags = '-static-libgcc -Wl,-Ttext,0x80100000'; - mips_yeeloong_ldflags = '-static-libgcc -Wl,-Ttext,0x80100000'; ++ mips_loongson_ldflags = '-static-libgcc -Wl,-Ttext,0x80100000'; + mips_arc_ldflags = '-static-libgcc -Wl,-Ttext,0x89f00000'; ldadd = '-lgcc'; cflags = '-static-libgcc'; enable = mips; @@@ -1154,9 -1140,10 +1167,10 @@@ module = module = { name = datetime; cmos = lib/cmos_datetime.c; - x86_efi = lib/efi/datetime.c; + efi = lib/efi/datetime.c; sparc64_ieee1275 = lib/ieee1275/datetime.c; powerpc_ieee1275 = lib/ieee1275/datetime.c; + mips_arc = lib/arc/datetime.c; enable = noemu; }; @@@ -1268,13 -1253,12 +1282,13 @@@ module = i386_pc = mmap/i386/pc/mmap.c; i386_pc = mmap/i386/pc/mmap_helper.S; - x86_efi = mmap/efi/mmap.c; + efi = mmap/efi/mmap.c; - mips_loongson = mmap/mips/loongson/uppermem.c; + mips = mmap/mips/uppermem.c; enable = x86; + enable = ia64_efi; - enable = mips_loongson; + enable = mips; }; module = { diff --cc grub-core/loader/mips/linux.c index 193ea9681,b0b69eae6..e0a0e7c98 --- a/grub-core/loader/mips/linux.c +++ b/grub-core/loader/mips/linux.c @@@ -34,8 -34,7 +34,8 @@@ GRUB_MOD_LICENSE ("GPLv3+") #include #ifdef GRUB_MACHINE_MIPS_LOONGSON + #include +#include const char loongson_machtypes[][60] = { diff --cc include/grub/mips/loongson/memory.h index 9d53b5e0e,4a1065ea5..a288eb6ab --- a/include/grub/mips/loongson/memory.h +++ b/include/grub/mips/loongson/memory.h @@@ -25,37 -27,8 +25,10 @@@ #include #endif +#define GRUB_MACHINE_MEMORY_STACK_HIGH 0x801ffff0 - #define GRUB_ARCH_LOWMEMVSTART 0x80000000 - #define GRUB_ARCH_LOWMEMPSTART 0x00000000 - #define GRUB_ARCH_LOWMEMMAXSIZE 0x10000000 - #define GRUB_ARCH_HIGHMEMPSTART 0x10000000 + #ifndef ASM_FILE - typedef grub_addr_t grub_phys_addr_t; - - static inline grub_phys_addr_t - grub_vtop (void *a) - { - return ((grub_phys_addr_t) a) & 0x1fffffff; - } - - static inline void * - grub_map_memory (grub_phys_addr_t a, grub_size_t size __attribute__ ((unused))) - { - return (void *) (a | 0x80000000); - } - - static inline void - grub_unmap_memory (void *a __attribute__ ((unused)), - grub_size_t size __attribute__ ((unused))) - { - } - - grub_err_t EXPORT_FUNC (grub_machine_mmap_iterate) - (int NESTED_FUNC_ATTR (*hook) (grub_uint64_t, grub_uint64_t, grub_uint32_t)); - static inline grub_err_t grub_machine_mmap_register (grub_uint64_t start __attribute__ ((unused)), grub_uint64_t size __attribute__ ((unused)), diff --cc include/grub/mips/memory.h index e51bcc1f2,2ef2ed31c..a85bbe752 --- a/include/grub/mips/memory.h +++ b/include/grub/mips/memory.h @@@ -1,1 -1,60 +1,60 @@@ - #include + /* + * GRUB -- GRand Unified Bootloader + * Copyright (C) 2009 Free Software Foundation, Inc. + * + * GRUB is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * GRUB is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GRUB. If not, see . + */ + -#ifndef GRUB_MEMORY_MACHINE_HEADER -#define GRUB_MEMORY_MACHINE_HEADER 1 ++#ifndef GRUB_MEMORY_CPU_HEADER ++#define GRUB_MEMORY_CPU_HEADER 1 + + #ifndef ASM_FILE + #include + #include + #include + #endif + + #define GRUB_ARCH_LOWMEMVSTART 0x80000000 + #define GRUB_ARCH_LOWMEMPSTART 0x00000000 + #define GRUB_ARCH_LOWMEMMAXSIZE 0x10000000 + #define GRUB_ARCH_HIGHMEMPSTART 0x10000000 + + #ifndef ASM_FILE + + typedef grub_addr_t grub_phys_addr_t; + + static inline grub_phys_addr_t + grub_vtop (void *a) + { + return ((grub_phys_addr_t) a) & 0x1fffffff; + } + + static inline void * + grub_map_memory (grub_phys_addr_t a, grub_size_t size __attribute__ ((unused))) + { + return (void *) (a | 0x80000000); + } + + static inline void + grub_unmap_memory (void *a __attribute__ ((unused)), + grub_size_t size __attribute__ ((unused))) + { + } + + grub_uint64_t grub_mmap_get_lower (void); + grub_uint64_t grub_mmap_get_upper (void); + + #endif + + #endif diff --cc include/grub/mips/mips.h index 000000000,8c161aa15..bafb2bde0 mode 000000,100644..100644 --- a/include/grub/mips/mips.h +++ b/include/grub/mips/mips.h @@@ -1,0 -1,30 +1,30 @@@ + /* + * GRUB -- GRand Unified Bootloader + * Copyright (C) 2010 Free Software Foundation, Inc. + * + * GRUB is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * GRUB is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GRUB. If not, see . + */ + -#ifndef GRUB_REGISTORS_CPU_HEADER -#define GRUB_REGISTORS_CPU_HEADER 1 ++#ifndef GRUB_REGISTERS_CPU_HEADER ++#define GRUB_REGISTERS_CPU_HEADER 1 + + #ifdef ASM_FILE + #define GRUB_CPU_REGISTER_WRAP(x) x + #else + #define GRUB_CPU_REGISTER_WRAP(x) #x + #endif + + #define GRUB_CPU_MIPS_COP0_TIMER_COUNT GRUB_CPU_REGISTER_WRAP($9) + + #endif diff --cc include/grub/offsets.h index 08bb9c57d,d17f4a89c..35bfd0a41 --- a/include/grub/offsets.h +++ b/include/grub/offsets.h @@@ -174,6 -180,6 +186,7 @@@ #define GRUB_KERNEL_MACHINE_RAW_SIZE GRUB_OFFSETS_CONCAT (GRUB_KERNEL_, GRUB_MACHINE, _RAW_SIZE) #define GRUB_KERNEL_MACHINE_INSTALL_BSD_PART GRUB_OFFSETS_CONCAT (GRUB_KERNEL_, GRUB_MACHINE, _INSTALL_BSD_PART) #define GRUB_KERNEL_MACHINE_INSTALL_DOS_PART GRUB_OFFSETS_CONCAT (GRUB_KERNEL_, GRUB_MACHINE, _INSTALL_DOS_PART) ++#define GRUB_MACHINE_LINK_ADDR GRUB_OFFSETS_CONCAT (GRUB_KERNEL_, GRUB_MACHINE, _LINK_ADDR) #endif #ifndef ASM_FILE diff --cc util/grub-mkimage.c index 6936a1558,fe112c26a..296f89daf --- a/util/grub-mkimage.c +++ b/util/grub-mkimage.c @@@ -400,26 -392,28 +400,48 @@@ struct image_target_desc image_targets[ .install_bsd_part = TARGET_NO_FIELD, .link_addr = GRUB_KERNEL_SPARC64_IEEE1275_LINK_ADDR }, + { + .dirname = "ia64-efi", + .names = {"ia64-efi", NULL}, + .voidp_sizeof = 8, + .bigendian = 0, + .id = IMAGE_EFI, + .flags = PLATFORM_FLAGS_NONE, + .prefix = GRUB_KERNEL_IA64_EFI_PREFIX, + .prefix_end = GRUB_KERNEL_IA64_EFI_PREFIX_END, + .raw_size = 0, + .total_module_size = TARGET_NO_FIELD, + .kernel_image_size = TARGET_NO_FIELD, + .compressed_size = TARGET_NO_FIELD, + .section_align = GRUB_PE32_SECTION_ALIGNMENT, + .vaddr_offset = EFI64_HEADER_SIZE, + .install_dos_part = TARGET_NO_FIELD, + .install_bsd_part = TARGET_NO_FIELD, + .pe_target = GRUB_PE32_MACHINE_IA64, + .elf_target = EM_IA_64, + }, + { + .dirname = "mips-arc", + .names = {"mips-arc", NULL}, + .voidp_sizeof = 4, + .bigendian = 1, + .id = IMAGE_MIPS_ARC, + .flags = PLATFORM_FLAGS_DECOMPRESSORS, + .prefix = GRUB_KERNEL_MIPS_ARC_PREFIX, + .prefix_end = GRUB_KERNEL_MIPS_ARC_PREFIX_END, + .raw_size = 0, + .total_module_size = GRUB_KERNEL_MIPS_ARC_TOTAL_MODULE_SIZE, + .compressed_size = TARGET_NO_FIELD, + .kernel_image_size = TARGET_NO_FIELD, + .section_align = 1, + .vaddr_offset = 0, + .install_dos_part = TARGET_NO_FIELD, + .install_bsd_part = TARGET_NO_FIELD, + .link_addr = GRUB_KERNEL_MIPS_ARC_LINK_ADDR, + .elf_target = EM_MIPS, + .link_align = GRUB_KERNEL_MIPS_ARC_LINK_ALIGN, + .default_compression = COMPRESSION_NONE + }, }; #define grub_target_to_host32(x) (grub_target_to_host32_real (image_target, (x)))