Commit Graph

109 Commits

Author SHA1 Message Date
Vladimir Serbinenko 4bfd26623f multiboot fixup 2017-08-14 16:24:05 +02:00
Vladimir Serbinenko 21e4a6fa03 multiboot: disentangle multiboot and multiboot2.
Previously we had multiboot and multiboot2 declaring the same symbols.
This can potentially lead to aliasing and strange behaviours when e.g.
module instead of module2 is used with multiboot2.

Bug: #51137
2017-08-14 14:08:54 +02:00
Vladimir Serbinenko cfabe05cc6 mips: Make setjmp code N32-compliant. 2015-10-11 13:20:26 +02:00
Vladimir Serbinenko 285540e448 mips: Make the assembly-code N32-compatible.
There are no $t4 or $t5 in N32 but there are $a4 and $a5.
2015-10-11 13:20:26 +02:00
Vladimir Serbinenko eecdbebc84 Remove mips_attributes.
mips_attributes was introduced to work around clang problems with
-msoft-float. Those problems are now fixed and moreover .gnu_attributes
itself is unportable and creates problem with clang.

Revert "mips: Fix soft-float handling."

This partially reverts commit 6a4ecd276e.
2015-07-22 21:05:11 +02:00
Vladimir Serbinenko 6a4ecd276e mips: Fix soft-float handling.
Add -msoft-float alongside clang arguments to specify ABI.
Specify ABI in asm files explicitly.
This trigers asm warning due to gcc failing to propagate -msoft-float
but it's tolerable.
2015-02-23 22:33:28 +01:00
Vladimir Serbinenko fd4650a556 Add bonito 3A support. 2013-12-17 22:49:27 +01:00
Vladimir Serbinenko d5c14e1e26 Fix mips-emu compilation. 2013-12-08 17:49:02 +01:00
Vladimir Serbinenko 44ce3a93b6 * include/grub/mips/setjmp.h (grub_jmp_buf): Fix buffer size.
setjmp.S uses 12 entries but buffer is declared with only 11 entries.
2013-11-18 01:49:14 +01:00
Vladimir 'phcoder' Serbinenko 0d3a6f8540 * include/grub/setjmp.h: Define RETURNS_TWICE. Keep it empty for
gcc < 4.0.
	* include/grub/*/setjmp.h: USe RETURNS_TWICE.
2013-10-18 16:38:36 +02:00
Vladimir 'phcoder' Serbinenko 7f63a64fa0 Enable mipsel-arc. 2013-04-25 22:42:35 +02:00
Vladimir 'phcoder' Serbinenko 8528c879e3 Move mips-arc link address. Previous link address was chosen
in belief that RAM on SGI platforms grows down while in fact it
	grows up from an unusual base.
2013-04-24 13:54:17 +02:00
Vladimir 'phcoder' Serbinenko 1d5a880fe4 * include/grub/mips/loongson/cmos.h: Fix high CMOS addresses. 2013-03-02 23:57:34 +01:00
Vladimir 'phcoder' Serbinenko d55ffb0249 Implement new command cmosdump. 2013-02-24 19:44:17 +01:00
Vladimir 'phcoder' Serbinenko 70aaf3053a Speed-up video on fuloong.
* grub-core/bus/bonito.c (grub_pci_device_map_range_cached):
	New function.
	(grub_pci_device_unmap_range): Handle non-cached address.
	* grub-core/video/sis315pro.c (framebuffer): Remove render_target and
	add direct_ptr.
	(grub_video_sis315pro_video_fini): Unmap direct_ptr.
	(grub_video_sis315pro_setup): Use cache address and grub_video_fb_setup.
	(grub_video_sis315pro_set_active_render_target): Removed.
	(grub_video_sis315pro_get_info_and_fini): Use uncached address.
	(grub_video_adapter): Use grub_video_fb_set_active_render_target.
	(grub_video_sis315pro_swap_buffers): Call grub_video_fb_swap_buffers and
	sync caches.
	* include/grub/mips/loongson/pci.h (grub_pci_device_map_range_cached):
	New proto.
2012-06-17 01:09:32 +02:00
Vladimir 'phcoder' Serbinenko 49017b1719 Fix missing console prototype on qemu-mips.
* include/grub/mips/qemu_mips/console.h: New file.
2012-02-27 14:06:33 +01:00
Vladimir 'phcoder' Serbinenko dad9c8b59e * grub-core/kern/mips/arc/init.c (grub_total_modules_size): Mark as
being in .text to avoid dprel references.
	* include/grub/mips/loongson/kernel.h (grub_arch_machine): Likewise.
	* include/grub/mips/loongson/memory.h (grub_arch_memsize): Likewise.
	(grub_arch_highmemsize): Likewise.
	* include/grub/mips/loongson/time.h (grub_arch_busclock): Likewise.
	* include/grub/mips/qemu_mips/memory.h (grub_arch_memsize): Likewise.
	* include/grub/mips/time.h (grub_arch_cpuclock): Likewise.
2012-01-20 14:48:26 +01:00
Vladimir 'phcoder' Serbinenko 0d51ee20ee * include/grub/emu/misc.h (xasprintf): Add missing format attribute.
* include/grub/mips/kernel.h (grub_halt): Remove redundant declaration.
	* include/grub/mips/qemu_mips/kernel.h (grub_halt): Likewise.
	* include/grub/misc.h (grub_reboot)
	[GRUB_MACHINE_EMU || GRUB_MACHINE_QEMU_MIPS]: Export.
	(grub_halt) [__mips__]: Likewise.
2011-12-13 14:51:41 +01:00
Vladimir 'phcoder' Serbinenko 544c24876e Move grub_reboot out of the kernel.
* grub-core/Makefile.core.def (reboot): Add platform-specific files.
	* grub-core/kern/efi/efi.c (grub_reboot): Moved to ...
	* grub-core/lib/efi/reboot.c: ... here.
	* grub-core/kern/i386/efi/startup.S: Remove including of realmode.S.
	* grub-core/kern/i386/ieee1275/startup.S: Likewise.
	* grub-core/kern/i386/pc/startup.S (grub_exit): Inline cold_reboot.
	* grub-core/kern/i386/realmode.S (grub_reboot): Moved to...
	* grub-core/lib/i386/reboot_trampoline.S: ... here.
	* grub-core/kern/ieee1275/openfw.c (grub_reboot): Moved to...
	* grub-core/lib/ieee1275/reboot.c: ... here.
	* grub-core/kern/mips/arc/init.c (grub_reboot): Moved to...
	* grub-core/lib/mips/arc/reboot.c: ... here.
	* grub-core/kern/mips/loongson/init.c (grub_reboot): Moved to...
	* grub-core/lib/mips/loongson/reboot.c: ...here.
	* grub-core/kern/mips/qemu_mips/init.c (grub_reboot): Moved to...
	* grub-core/lib/mips/qemu_mips/reboot.c: ... here.
	* include/grub/emu/misc.h (grub_reboot): New function declaration.
	* include/grub/i386/reboot.h: New file.
	* include/grub/mips/loongson/ec.h: Fix includes.
	* include/grub/mips/qemu_mips/kernel.h (grub_reboot): Removed.
	* include/grub/misc.h (grub_reboot): Don't mark as kernel function.
	* grub-core/lib/i386/reboot.c: New file.
2011-10-19 16:53:18 +02:00
Vladimir 'phcoder' Serbinenko 0d1fd0113b * include/grub/mips/loongson.h (GRUB_CPU_LOONGSON_COP0_PRID): New
define.
	* grub-core/kern/mips/loongson/init.c (grub_machine_init): Check
	that PRID matches the detected subplatform and reset the subplatform
	if it doesn't.
2011-08-19 23:04:18 +02:00
Vladimir 'phcoder' Serbinenko 1227c13390 Fix PCI iterating on functions >= 4.
* grub-core/bus/pci.c (grub_pci_iterate): Remove useless ghost skipping.
	* include/grub/mips/loongson/pci.h (GRUB_LOONGSON_OHCI_GHOST_FUNCTION):
	Removed.
	(GRUB_LOONGSON_EHCI_GHOST_FUNCTION): Likewise.
	(grub_pci_read): Fix bitmask.
	(grub_pci_read_word): Likewise.
	(grub_pci_read_byte): Likewise.
	(grub_pci_write): Likewise.
	(grub_pci_write_word): Likewise.
	(grub_pci_write_byte): Likewise.
2011-08-19 22:56:49 +02:00
Vladimir 'phcoder' Serbinenko 14a2562cf7 Rename Fuloong into Fuloong 2F. Add new ID for Fuloong2E.
* grub-core/Makefile.core.def (fwstart_fuloong): Rename fwstart_fuloong
	into fwstart_fuloong2f. Use boot/mips/loongson/fuloong2f.S.
	* grub-core/boot/mips/loongson/fuloong.S: Rename to ...
	* grub-core/boot/mips/loongson/fuloong2f.S: ... this.
	(FULOONG): Rename to ...
	(FULOONG2F): ... this. All users updated.
	* grub-core/boot/mips/startup_raw.S (machtype_fuloong_str): Rename to
	(machtype_fuloong2f_str): ... this.
	(machtype_fuloong2e_str): New string.
	Check for machtype_fuloong2e_str.
	* grub-core/loader/mips/linux.c (loongson_machtypes)
	[GRUB_MACHINE_MIPS_LOONGSON]: Add GRUB_ARCH_MACHINE_FULOONG2E.
	* grub-core/term/serial.c (loongson_defserial)
	[GRUB_MACHINE_MIPS_LOONGSON]: New array.
	(grub_serial_register) [GRUB_MACHINE_MIPS_LOONGSON]: Use
	loongson_defserial.
	* include/grub/mips/loongson/kernel.h (GRUB_ARCH_MACHINE_FULOONG):
	Rename to ...
	(GRUB_ARCH_MACHINE_FULOONG2F): ... this.
	(GRUB_ARCH_MACHINE_FULOONG2E): New const.
	* util/grub-mkimage.c (image_target_desc): Rename IMAGE_FULOONG_FLASH
	to IMAGE_FULOONG2F_FLASH. All users updated.
	(image_targets): Rename images.
	* util/grub-mkstandalone.in: Accept fuloong2f and fuloong2e.
2011-08-19 22:46:11 +02:00
Vladimir 'phcoder' Serbinenko a116743910 * include/grub/mips/kernel.h: Fix define conflict. 2011-07-23 17:14:38 +02:00
Vladimir 'phcoder' Serbinenko 93c06ff9c6 VGA text support in qemu-mips
* grub-core/Makefile.core.def (kernel): Add term/i386/pc/vga_text.c,
	term/i386/vga_common.c and kern/vga_init.c on qemu-mips.
	* grub-core/kern/mips/qemu_mips/init.c (grub_machine_init): Init vga
	text.
	* grub-core/kern/i386/qemu/init.c: Renamed to ...
	* grub-core/kern/vga_init.c: ... this.
	* grub-core/kern/vga_init.c (VGA_ADDR) [__mips__]: Adjust.
	(grub_qemu_init_cirrus) [__mips__]: Skip PCI and adjust the I/O base.
	* grub-core/term/i386/pc/vga_text.c (VGA_TEXT_SCREEN) [__mips__]:
	Adjust.
	* include/grub/vga.h [GRUB_MACHINE_MIPS_QEMU_MIPS]: Declare
	GRUB_MACHINE_PCI_IO_BASE.
2011-07-05 23:46:15 +02:00
Vladimir 'phcoder' Serbinenko d734599439 MIPS qemu at_keyboard support.
* gentpl.py (videoinkernel): Add qemu-mips.
	* grub-core/Makefile.am (KERNEL_HEADER_FILES): Add necessary headers.
	* grub-core/Makefile.core.def (kernel): Add at_keyboard and layout.
	* grub-core/kern/mips/qemu_mips/init.c (grub_machine_init): Init new
	modules.
	* grub-core/term/at_keyboard.c (grub_keyboard_controller_init)
	[GRUB_MACHINE_MIPS_QEMU_MIPS]: Don't consider original set.
	* grub-core/term/serial.c (grub_serial_register)
	[GRUB_MACHINE_MIPS_QEMU_MIPS]: Make com0 explicitly active.
2011-07-05 21:00:01 +02:00
Vladimir 'phcoder' Serbinenko 566a191715 Prevent potential loss of memory map by overwrite on qemu-mips.
* grub-core/boot/mips/startup_raw.S [GRUB_MACHINE_MIPS_QEMU_MIPS]:
	Save ram size in $s4.
	* grub-core/kern/mips/qemu_mips/init.c (RAMSIZE): Removed.
	All users changed to grub_arch_memsize.
	* grub-core/kern/mips/startup.S (grub_arch_machine): Restrict to
	Loongson.
	[GRUB_MACHINE_MIPS_QEMU_MIPS]: Save grub_arch_memsize.
	* grub-core/loader/mips/linux.c (grub_linux_boot): Pass memory size.
	* include/grub/mips/qemu_mips/memory.h (grub_arch_memsize): New
	external variable.
2011-05-17 19:32:51 +02:00
Vladimir 'phcoder' Serbinenko 3666d5f636 merge mainline and various cleanups 2011-05-17 14:02:18 +02:00
Vladimir 'phcoder' Serbinenko 400b93718f 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-17 09:17:38 +02:00
Vladimir 'phcoder' Serbinenko bee1aeb9a1 merge mainline into sgi 2011-05-15 02:23:36 +02:00
Vladimir 'phcoder' Serbinenko 8906c3dd40 sgi support 2011-05-13 16:36:05 +02:00
Vladimir 'phcoder' Serbinenko 54da1febce Rename mipsel-yeeloong to mipsel-loongson 2011-02-19 13:18:05 +01:00
Vladimir 'phcoder' Serbinenko 99388e0cf8 Fuloong shutdown support 2011-01-18 19:39:12 +01:00
Vladimir 'phcoder' Serbinenko 74eea126f4 fuloong support 2011-01-18 15:28:44 +01:00
Vladimir 'phcoder' Serbinenko f440c33fd2 Make qemu-mips compile again. Still no grub-mkimage support 2011-01-14 17:37:11 +01:00
Vladimir 'phcoder' Serbinenko a1d84a5e5e Unify memory types.
* grub-core/Makefile.am (KERNEL_HEADER_FILES): Include memory.h.
	* grub-core/commands/lsmmap.c (grub_cmd_lsmmap): Output user-readable
	types.
	* grub-core/kern/i386/multiboot_mmap.c (grub_lower_mem): Removed.
	(grub_upper_mem): Likewise.
	* grub-core/kern/ieee1275/init.c (grub_upper_mem): Likewise.
	* include/grub/memory.h (grub_memory_type_t): New enum.
	All users updated.
2010-09-19 00:04:31 +02:00
Vladimir 'phcoder' Serbinenko 050abaeaa8 Fix emu on mipsel.
* conf/Makefile.common (CFLAGS_PLATFORM): Add -mflush-func
	=grub_cpu_flush_cache on all mips and not only yeeloong.
	* configure.ac (COND_mips): New conditional.
	* grub-core/Makefile.am (KERNEL_HEADER_FILES): Add libgcc on all
	platforms.
	* grub-core/kern/emu/cache.S (__mips__): Use _flush_cache.
	* grub-core/kern/emu/full.c (grub_arch_dl_init_linker)
	[GRUB_LINKER_HAVE_INIT]: New function.
	(grub_emu_post_init): Likewise.
	* grub-core/kern/emu/lite.c (grub_emu_post_init): Likewise.
	* grub-core/kern/emu/main.c: Use grub_emu_post_init.
	* include/grub/cache.h (_mips): Include mips/cache.h.
	* include/grub/disk.h [GRUB_UTIL || GRUB_MACHINE_EMU]: Add missing
	LVM and RAID prototypes.
	* include/grub/emu/misc.h (grub_emu_post_init): New proto.
	* include/grub/mips/time.h (grub_cpu_idle) [GRUB_MACHINE_EMU]: New
	function.
2010-09-11 16:58:06 +02:00
Vladimir 'phcoder' Serbinenko df3df23d5c Reorganise memory map handling 2010-09-04 17:10:10 +02:00
Vladimir 'phcoder' Serbinenko 069c9c5fda merge mainline into intwrap 2010-08-29 23:21:21 +02:00
Vladimir 'phcoder' Serbinenko afba9f98ec MErge mainline into intwrap 2010-08-25 23:39:42 +02:00
Vladimir 'phcoder' Serbinenko 16bd6cfab2 Merge mainline into newreloc. For now without boot tests 2010-08-25 03:25:18 +02:00
Vladimir 'phcoder' Serbinenko ec1d04f1de Yeeloong firmware port.
* boot/mips/yeeloong/fwstart.S: New file.
	* bus/cs5536.c (gpiodump): New const.
	(set_io_space): New function.
	(set_iod): Likewise.
	(set_p2d): Likewise.
	(grub_cs5536_init_geode): Likewise.
	* commands/mips/yeeloong/lsspd.c: New file.
	* conf/mips-qemu-mips.rmk (pkglib_MODULES): Add serial.mod.
	(serial_mod_SOURCES): New variable.
	(serial_mod_CFLAGS): Likewise.
	(serial_mod_LDFLAGS): Likewise.
	* conf/mips-yeeloong.rmk (kernel_img_SOURCES): Add term/serial.c,
	term/terminfo.c and term/tparm.c.
	(pkglib_IMAGES): Add fwstart.img.
	(fwstart_img_SOURCES): New variable.
	(fwstart_img_CFLAGS): Likewise.
	(fwstart_img_ASFLAGS): Likewise.
	(fwstart_img_LDFLAGS): Likewise.
	(fwstart_img_FORMAT): Likewise.
	(pkglib_MODULES): Add lsspd.mod.
	(lsspd_mod_SOURCES): New variable.
	(lsspd_mod_CFLAGS): Likewise.
	(lsspd_mod_LDFLAGS): Likewise.
	(pkglib_MODULES): Add halt.mod.
	(halt_mod_SOURCES): New variable.
	(halt_mod_CFLAGS): Likewise.
	(halt_mod_LDFLAGS): Likewise.
	* conf/mips.rmk (pkglib_MODULES): Remove serial.mod.
	(serial_mod_SOURCES): Removed.
	(serial_mod_CFLAGS): Likewise.
	(serial_mod_LDFLAGS): Likewise.
	* disk/ata.c (check_device): New function.
	(grub_ata_device_initialize): Use check_device.
	(grub_ata_iterate): Recheck devices.
	(grub_ata_open): Likewise.
	(grub_atapi_iterate): Likewise.
	(grub_atapi_open): Likewise.
	* include/grub/ata.h (GRUB_ATA_CH0_PORT1): New macro.
	(GRUB_ATA_CH1_PORT1): Likewise.
	(GRUB_ATA_CH0_PORT2): Likewise.
	(GRUB_ATA_CH1_PORT2): Likewise.
	* include/grub/mips/loongson.h: New file.
	* include/grub/mips/yeeloong/ec.h: Likewise.
	* include/grub/mips/yeeloong/serial.h (GRUB_MACHINE_SERIAL_PORT): New definition.
	(GRUB_MACHINE_SERIAL_DIVISOR_115200): Likewise.
	(GRUB_MACHINE_SERIAL_PORTS) [ASM_FILE]: Remove.
	* include/grub/misc.h (grub_halt): Declare as noreturn.
	* include/grub/serial.h (UART_ENABLE_FIFO): Renamed to ...
	(UART_ENABLE_FIFO_TRIGGER14): ... this. All users updated.
	(UART_ENABLE_FIFO_TRIGGER1): New definition.
	(UART_ENABLE_DTRRTS): Likewise.
	(UART_ENABLE_MODEM): Removed.
	(UART_ENABLE_OUT2): New const.
	* include/grub/term.h (grub_term_register_input_active): New function.
	(grub_term_register_output_active): Likewise.
	* kern/mips/startup.S [GRUB_MACHINE_MIPS_YEELOONG]: Handle 0xffffffff
	argument.
	* kern/mips/yeeloong/init.c (grub_get_rtc): Macroify.
	(init_pci): New function.
	(grub_machine_init): Execute platform init when firmware. Init serial.
	(grub_halt): Implement.
	(grub_exit): Likewise.
	(grub_reboot): Likewise.
	* term/serial.c (serial_hw_init): Update macros.
	[GRUB_MACHINE_MIPS_YEELOONG]: Init on startup.
	* util/grub-mkimage.c (image_target_desc): New id IMAGE_YEELOONG_FLASH.
	(image_targets): New target mipsel-yeeloong-flash.
	(generate_image): Support IMAGE_YEELOONG_FLASH.
	* video/sm712.c (GRUB_SM712_TOTAL_MEMORY_SPACE): New definition.
	(grub_video_sm712_setup): Init card.
	(grub_video_sm712_set_palette): Removed.
	* video/sm712_init.c: New file.
2010-07-01 03:16:56 +02:00
Vladimir 'phcoder' Serbinenko 2a1d16154d Merge mainline into newreloc 2010-06-24 21:22:40 +02:00
Vladimir 'phcoder' Serbinenko 8b1cf5e87f Dedicated DMA allocation functions. CS5536 OHCI support. 2010-05-31 13:58:18 +02:00
Vladimir 'phcoder' Serbinenko 980d936688 Skip ghost USB controllers 2010-05-23 00:12:33 +02:00
Vladimir 'phcoder' Serbinenko 4b9fa9d70f Addmissing definitions 2010-05-23 00:08:52 +02:00
Vladimir 'phcoder' Serbinenko e34b610d49 merge mainline into yeeloongfw 2010-05-22 16:58:45 +02:00
Vladimir 'phcoder' Serbinenko 6f030865da Add missing memory.h 2010-05-02 19:39:35 +02:00
Vladimir 'phcoder' Serbinenko ae3c4cd010 Remove loader.h 2010-04-29 13:26:38 +02:00
Vladimir 'phcoder' Serbinenko 6c3d9c2845 merge boottest into newreloc 2010-04-27 13:34:07 +02:00
Vladimir 'phcoder' Serbinenko 8ea6ecb36d Some cleanups 2010-04-26 21:11:16 +02:00