Commit graph

97 commits

Author SHA1 Message Date
Vladimir Serbinenko
d454509bb8 Fix remaining cases of gcc 7 fallthrough warning.
They are all intended, so just add the relevant comment.
2017-04-12 01:42:38 +00: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
c2443e49bc mips/dl: Handle addend in RELA entries. 2015-10-09 23:32:06 +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
da9f30b455 mips: Switch to more portable .org
Binary is unchanged.
2015-02-21 20:43:57 +01:00
Colin Watson
1de3a48098 * grub-core/kern/mips/arc/init.c (grub_machine_get_bootlocation):
Initialise pend to pacify GCC.
2014-08-25 15:19:48 -07:00
Vladimir Serbinenko
daaa89dbe5 Use AT keyboard on Yeeloong 3A. 2013-12-17 22:54:30 +01:00
Vladimir Serbinenko
25a7863d77 Add Yeeloong 3A reboot and halt. 2013-12-17 22:53:18 +01:00
Vladimir Serbinenko
184c61ddce Add Radeon Yeeloong 3A support. 2013-12-17 22:52:04 +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
8c534b85f1 Revamp relocation handling.
Move more code to common dl.c. Add missing veneers for arm and arm64.
	Decreases kernel size by 70 bytes on i386-pc (40-50 compressed)
2013-12-06 09:18:55 +01:00
Vladimir Serbinenko
9eec9699b9 * grub-core/kern/mips/arc/init.c (grub_machine_get_bootlocation):
Add missing cast to silence warning.
2013-11-23 15:35:01 +01:00
Vladimir Serbinenko
a0e1befb57 On MIPS handle got16 relocations to local symbols in an ABI-compliant
way.
2013-11-22 05:03:17 +01:00
Vladimir Serbinenko
c36c73f681 Add support for a new magic symbol _gp_disp on mips to handle PIC
binaries.
2013-11-22 04:56:10 +01:00
Vladimir Serbinenko
6f4a19f59f Use $t9 for indirect calls from asm to C as PIC ABI requires. 2013-11-22 04:45:05 +01:00
Vladimir Serbinenko
0d8f04cd83 Remove -march=mips3 from TARGET_CCASFLAGS as it creates linking problem
when rest of GRUB is compiled for hisher stepping. Instead use
	.set mips3/.set mips1 around cache and sync opcodes.
2013-11-22 04:36:53 +01:00
Vladimir Serbinenko
4906052019 Unify GOT/trampoline handling between PPC, MIPS and IA64 as they
do essentially the same thing, do it in similar way.
2013-11-21 21:54:33 +01:00
Vladimir Serbinenko
74e632fea8 * grub-core/kern/mips/qemu_mips/init.c (grub_machine_init): Update
clock frequency to 200 MHz,
2013-11-18 16:39:45 +01:00
Andrey Borzenkov
9e18dfe277 MIPS grub_machine_get_bootlocation arguments are used 2013-11-16 16:59:07 +04:00
Vladimir Serbinenko
9612ebc00e Add new ports: i386-xen and x86_64-xen. This allows running GRUB in
XEN PV environment and load kernels.
2013-11-09 21:29:11 +01:00
Vladimir 'phcoder' Serbinenko
797abd0a23 * grub-core/kern/vga_init.c: Fix compilation on qemu-mips.
* grub-core/kern/mips/qemu_mips/init.c: Likewise.
2013-08-14 09:50:57 +02:00
Vladimir 'phcoder' Serbinenko
fc4c4fddf6 Detach optional parts of gfxterm and integrate in with coreboot init. 2013-05-31 00:42:33 +02:00
Vladimir 'phcoder' Serbinenko
583e5b645c * include/grub/arc/arc.h: Account for missing "other" peripheral on
ARCS. All users updated.
2013-04-30 17:40:31 +02:00
Vladimir 'phcoder' Serbinenko
aa7bcb99df * grub-core/kern/mips/loongson/init.c: Support halt for loongson 2E. 2013-04-30 17:37:37 +02:00
Vladimir 'phcoder' Serbinenko
96f33fed86 Make PCI init in i386-qemu port more robust. 2013-04-29 15:09:39 +02:00
Vladimir 'phcoder' Serbinenko
0e90dee8e8 * grub-core/kern/mips/arc/init.c: Fix prefix detection. 2013-04-29 11:59:18 +02:00
Vladimir 'phcoder' Serbinenko
17f9fd29d3 Implement grub_machine_get_bootlocation for ARC. 2013-04-27 19:12:11 +02:00
Vladimir 'phcoder' Serbinenko
b04b5990df Add serial on ARC platform. 2013-04-25 22:40:03 +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
Colin Watson
25239370fd Remove nested functions from device iterators.
* include/grub/arc/arc.h (grub_arc_iterate_devs_hook_t): New type.
(grub_arc_iterate_devs): Add hook_data argument.
* include/grub/ata.h (grub_ata_dev_iterate_hook_t): New type.
(struct grub_ata_dev.iterate): Add hook_data argument.
* include/grub/device.h (grub_device_iterate_hook_t): New type.
(grub_device_iterate): Add hook_data argument.
* include/grub/disk.h (grub_disk_dev_iterate_hook_t): New type.
(struct grub_disk_dev.iterate): Add hook_data argument.
(grub_disk_dev_iterate): Likewise.
* include/grub/gpt_partition.h (grub_gpt_partition_map_iterate):
Likewise.
* include/grub/msdos_partition.h (grub_partition_msdos_iterate):
Likewise.
* include/grub/partition.h (grub_partition_iterate_hook_t): New
type.
(struct grub_partition_map.iterate): Add hook_data argument.
(grub_partition_iterate): Likewise.
* include/grub/scsi.h (grub_scsi_dev_iterate_hook_t): New type.
(struct grub_scsi_dev.iterate): Add hook_data argument.

Update all callers.
2013-01-20 15:52:15 +00:00
Colin Watson
d0d4b8a063 Remove nested functions from memory map iterators.
* grub-core/efiemu/mm.c (grub_efiemu_mmap_iterate): Add hook_data
argument, passed to hook.
* grub-core/kern/i386/coreboot/mmap.c
(grub_linuxbios_table_iterate): Likewise.
(grub_machine_mmap_iterate: iterate_linuxbios_table): Make static
instead of nested.
(grub_machine_mmap_iterate): Add hook_data argument.
* grub-core/kern/i386/multiboot_mmap.c (grub_machine_mmap_iterate):
Add hook_data argument, passed to hook.
* grub-core/kern/i386/pc/mmap.c (grub_machine_mmap_iterate):
Likewise.
* grub-core/kern/i386/qemu/mmap.c (grub_machine_mmap_iterate):
Likewise.
* grub-core/kern/ieee1275/mmap.c (grub_machine_mmap_iterate):
Likewise.
* grub-core/kern/mips/arc/init.c (grub_machine_mmap_iterate):
Likewise.
* grub-core/kern/mips/loongson/init.c (grub_machine_mmap_iterate):
Likewise.
* grub-core/kern/mips/qemu_mips/init.c (grub_machine_mmap_iterate):
Likewise.
* grub-core/mmap/efi/mmap.c (grub_efi_mmap_iterate): Likewise.
(grub_machine_mmap_iterate): Likewise.
* grub-core/mmap/mmap.c (grub_mmap_iterate): Likewise.
* include/grub/efiemu/efiemu.h (grub_efiemu_mmap_iterate): Update
prototype.
* include/grub/memory.h (grub_memory_hook_t): Add data argument.
Remove NESTED_FUNC_ATTR from here and from all users.
(grub_mmap_iterate): Update prototype.
(grub_efi_mmap_iterate): Update prototype.  Update all callers to
pass appropriate hook data.
(grub_machine_mmap_iterate): Likewise.

* grub-core/commands/acpi.c (grub_acpi_create_ebda: find_hook): Make
static instead of nested.
* grub-core/commands/lsmmap.c (grub_cmd_lsmmap: hook): Likewise.
Rename to ...
(lsmmap_hook): ... this.
* grub-core/efiemu/mm.c (grub_efiemu_mmap_init: bounds_hook):
Likewise.
(grub_efiemu_mmap_fill: fill_hook): Likewise.
* grub-core/kern/i386/coreboot/init.c (grub_machine_init:
heap_init): Likewise.
* grub-core/kern/i386/pc/init.c (grub_machine_init: hook): Likewise.
Rename to ...
(mmap_iterate_hook): ... this.
* grub-core/kern/ieee1275/init.c (grub_claim_heap: heap_init):
Likewise.
* grub-core/lib/ieee1275/relocator.c
(grub_relocator_firmware_get_max_events: count): Likewise.
(grub_relocator_firmware_fill_events: fill): Likewise.  Rename
to ...
(grub_relocator_firmware_fill_events_iter): ... this.
* grub-core/lib/relocator.c (grub_relocator_alloc_chunk_align:
hook): Likewise.  Rename to ...
(grub_relocator_alloc_chunk_align_iter): ... this.
* grub-core/loader/i386/bsd.c (generate_e820_mmap: hook): Likewise.
Rename to ...
(generate_e820_mmap_iter): ... this.
* grub-core/loader/i386/linux.c (find_mmap_size: hook): Likewise.
Rename to ...
(count_hook): ... this.
(grub_linux_boot: hook): Likewise.  Rename to ...
(grub_linux_boot_mmap_find): ... this.
(grub_linux_boot: hook_fill): Likewise.  Rename to ...
(grub_linux_boot_mmap_fill): ... this.
* grub-core/loader/i386/multiboot_mbi.c (grub_fill_multiboot_mmap:
hook): Likewise.  Rename to ...
(grub_fill_multiboot_mmap_iter): ... this.
* grub-core/loader/multiboot.c (grub_get_multiboot_mmap_count:
hook): Likewise.  Rename to ...
(count_hook): ... this.
* grub-core/loader/multiboot_mbi2.c (grub_fill_multiboot_mmap:
hook): Likewise.  Rename to ...
(grub_fill_multiboot_mmap_iter): ... this.
* grub-core/loader/powerpc/ieee1275/linux.c
(grub_linux_claimmap_iterate: alloc_mem): Likewise.
* grub-core/loader/sparc64/ieee1275/linux.c (alloc_phys: choose):
Likewise.  Rename to ...
(alloc_phys_choose): ... this.
(determine_phys_base: get_physbase): Likewise.
* grub-core/mmap/i386/mmap.c (grub_mmap_malign_and_register:
find_hook): Likewise.
* grub-core/mmap/i386/pc/mmap.c (preboot: fill_hook): Likewise.
(malloc_hook: count_hook): Likewise.
* grub-core/mmap/i386/uppermem.c (grub_mmap_get_lower: hook):
Likewise.  Rename to ...
(lower_hook): ... this.
(grub_mmap_get_upper: hook): Likewise.  Rename to ...
(upper_hook): ... this.
(grub_mmap_get_post64: hook): Likewise.  Rename to ...
(post64_hook): ... this.
* grub-core/mmap/mips/uppermem.c (grub_mmap_get_lower: hook):
Likewise.  Rename to ...
(lower_hook): ... this.
(grub_mmap_get_upper: hook): Likewise.  Rename to ...
(upper_hook): ... this.
* grub-core/mmap/mmap.c (grub_mmap_iterate: count_hook): Likewise.
(grub_mmap_iterate: fill_hook): Likewise.
(fill_mask): Pass addr and mask within a single struct.
(grub_cmd_badram: hook): Make static instead of nested.  Rename
to ...
(badram_iter): ... this.
(grub_cmd_cutmem: hook): Likewise.  Rename to ...
(cutmem_iter): ... this.
2013-01-15 12:02:35 +00:00
Colin Watson
ca3a74469a Remove nested functions from PCI iterators.
* grub-core/bus/pci.c (grub_pci_iterate): Add hook_data argument,
passed to hook.  Update all callers to pass appropriate hook data.
* grub-core/bus/emu/pci.c (grub_pci_iterate): Likewise.
* include/grub/pci.h (grub_pci_iteratefunc_t): Add data argument.
Remove NESTED_FUNC_ATTR from here and from all users.
(grub_pci_iterate): Update prototype.
* grub-core/bus/cs5536.c (grub_cs5536_find: hook): Make static
instead of nested.  Rename to ...
(grub_cs5536_find_iter): ... this.
* grub-core/kern/efi/mm.c (stop_broadcom: find_card): Likewise.
* grub-core/kern/mips/loongson/init.c (init_pci: set_card):
Likewise.
* grub-core/kern/vga_init.c (grub_qemu_init_cirrus: find_card):
Likewise.
* grub-core/video/bochs.c (grub_video_bochs_setup: find_card):
Likewise.
* grub-core/video/cirrus.c (grub_video_cirrus_setup: find_card):
Likewise.
* grub-core/video/efi_uga.c (find_framebuf: find_card): Likewise.
* grub-core/video/radeon_fuloong2e.c
(grub_video_radeon_fuloong2e_setup: find_card): Likewise.
* grub-core/video/sis315pro.c (grub_video_sis315pro_setup:
find_card): Likewise.
* grub-core/video/sm712.c (grub_video_sm712_setup: find_card):
Likewise.
2013-01-13 01:10:41 +00:00
Vladimir 'phcoder' Serbinenko
42d0867ff7 * grub-core/kern/mips/arc/init.c (grub_machine_init): Set clock
frequency to 150 MHz.
2012-06-26 23:28:23 +02:00
Vladimir 'phcoder' Serbinenko
ed24c31201 Avoid flushing the same line multiple times on loongson.
* grub-core/kern/mips/cache.S [GRUB_MACHINE_MIPS_LOONGSON]:
	Step in 32 bytes and not 1 byte.
	* grub-core/kern/mips/cache_flush.S [GRUB_MACHINE_MIPS_LOONGSON]:
	Likewise.
2012-06-22 23:36:33 +02:00
Vladimir 'phcoder' Serbinenko
7da036bbcb Remove non-functional EFI grub_get_rtc. Put a better fatal message
than current grub_get_rtc() not implemented when booted with
	coreboot without TSC.

	* grub-core/Makefile.am: Exclude efi/time.h from kernel headers.
	Add machine/time.h to kernel headers on loongson.
	* grub-core/Makefile.core.def (kernel): Remove
	kern/generic/rtc_get_time_ms.c on qemu-multiboot-coreboot.
	* grub-core/kern/efi/efi.c (grub_rtc_get_time_ms): Removed.
	(grub_get_rtc): Likewise.
	* grub-core/kern/generic/rtc_get_time_ms.c: Include grub/machine/time.h.
	* grub-core/kern/i386/coreboot/init.c (grub_get_rtc): Removed.
	* grub-core/kern/i386/pc/init.c: Include grub/machine/init.h.
	* grub-core/kern/i386/tsc.c (grub_tsc_init)
	[!GRUB_MACHINE_PCBIOS && !GRUB_MACHINE_IEEE1275]: Call grub_fatal
	rather than installing known non-working time source.
	* grub-core/kern/ieee1275/init.c (grub_get_rtc): Removed.
	* grub-core/kern/mips/loongson/init.c: Include grub/machine/time.h.
	* include/grub/time.h: Don't include machine/time.h.
	* include/grub/efi/time.h: Removed.
	* include/grub/i386/efi/time.h: Likewise.
	* include/grub/i386/ieee1275/time.h: Likewise.
	* include/grub/powerpc/ieee1275/time.h: Likewise.
	* include/grub/sparc64/ieee1275/time.h: Likewise.
	* include/grub/x86_64/efi/time.h: Likewise.
2012-06-11 20:44:38 +02:00
Vladimir 'phcoder' Serbinenko
004be2cd95 * grub-core/kern/mips/qemu_mips/init.c (grub_exit): Implement.
(grub_halt): Likewise.
	* grub-core/lib/mips/qemu_mips/reboot.c (grub_reboot): Likewise.
2012-06-06 12:28:25 +02:00
Vladimir 'phcoder' Serbinenko
036985b8ce Remove grub_{modname}_init and grub_{modname}_fini. They should never
be used directly if it's really a module and GRUB_MOD_INIT shouldn't
	be used on non-modules.

	* grub-core/commands/boot.c (GRUB_MOD_INIT) [LOONGSON || QEMU_MIPS]:
	Rename to grub_boot_init.
	(GRUB_MOD_FINI) [LOONGSON || QEMU_MIPS]: Rename to grub_boot_fini.
	* grub-core/commands/keylayouts.c (GRUB_MOD_INIT)
	[LOONGSON || QEMU_MIPS]: Rename to grub_keylayouts_init.
	(GRUB_MOD_FINI) [LOONGSON || QEMU_MIPS]: Rename to grub_keylayouts_fini.
	* grub-core/font/font_cmd.c (GRUB_MOD_INIT)
	[LOONGSON || QEMU_MIPS]: Rename to grub_font_init.
	(GRUB_MOD_FINI) [LOONGSON || QEMU_MIPS]: Rename to grub_font_fini.
	* grub-core/kern/mips/loongson/init.c: Replace explicit protos with
	includes.
	(grub_machine_init): Remove empty inits.
	* grub-core/kern/mips/qemu_mips/init.c: Replace explicit protos with
	includes.
	(grub_machine_init): Remove empty inits.
	* grub-core/term/arc/console.c: Remove explicit proto.
	* grub-core/term/at_keyboard.c (GRUB_MOD_INIT)
	[LOONGSON || QEMU_MIPS]: Rename to grub_at_keyboard_init.
	(GRUB_MOD_FINI) [LOONGSON || QEMU_MIPS]: Rename to
	grub_at_keyboard_fini.
	* grub-core/term/gfxterm.c (GRUB_MOD_INIT)
	[LOONGSON || QEMU_MIPS]: Rename to grub_gfxterm_init.
	(GRUB_MOD_FINI) [LOONGSON || QEMU_MIPS]: Rename to
	grub_gfxterm_fini.
	* grub-core/term/i386/pc/vga_text.c (GRUB_MOD_INIT)
	[LOONGSON || QEMU_MIPS]: Rename to grub_vgatext_init.
	(GRUB_MOD_FINI) [LOONGSON || QEMU_MIPS]: Rename to
	grub_vgatext_fini.
	* grub-core/term/ieee1275/console.c: Remove explicit proto.
	* grub-core/term/serial.c (GRUB_MOD_INIT)
	[LOONGSON || QEMU_MIPS]: Rename to grub_serial_init.
	(GRUB_MOD_FINI) [LOONGSON || QEMU_MIPS]: Rename to
	grub_serial_fini.
	* grub-core/term/terminfo.c (GRUB_MOD_INIT)
	[LOONGSON || QEMU_MIPS]: Rename to grub_terminfo_init.
	(GRUB_MOD_FINI) [LOONGSON || QEMU_MIPS]: Rename to
	grub_terminfo_fini.
	* grub-core/video/bitmap.c (GRUB_MOD_INIT): Removed.
	(GRUB_MOD_FINI): Likewise.
	* grub-core/video/radeon_fuloong2e.c (GRUB_MOD_INIT)
	[LOONGSON]: Rename to grub_video_radeon_fuloong2e_init.
	(GRUB_MOD_FINI) [LOONGSON]: Rename to
	grub_video_radeon_fuloong2e_fini.
	* grub-core/video/sis315pro.c (GRUB_MOD_INIT)
	[LOONGSON]: Rename to grub_video_sis315pro_init.
	(GRUB_MOD_FINI) [LOONGSON]: Rename to
	grub_video_sis315pro_fini.
	* grub-core/video/sm712.c (GRUB_MOD_INIT)
	[LOONGSON]: Rename to grub_video_sm712_init.
	(GRUB_MOD_FINI) [LOONGSON]: Rename to
	grub_video_sm712_fini.
	* include/grub/at_keyboard.h (grub_at_keyboard_init): New proto.
	(grub_at_keyboard_fini): Likewise.
	* include/grub/dl.h (GRUB_MOD_INIT) [!GRUB_UTIL && !EMU]:
	Don't declare grub_{modname}_init.
	(GRUB_MOD_INIT) [!GRUB_UTIL && !EMU]: Don't declare grub_{modname}_fini.
	* include/grub/keyboard_layouts.h (grub_keylayouts_init) [!EMU]:
	New proto.
	(grub_keylayouts_fini) [!EMU]: Likewise.
	* include/grub/serial.h (grub_serial_init) [!EMU]:
	New proto.
	(grub_serial_fini) [!EMU]: Likewise.
	* include/grub/terminfo.h (grub_terminfo_init) [!EMU]:
	New proto.
	(grub_terminfo_fini) [!EMU]: Likewise.
	* include/grub/video.h (grub_font_init) [!EMU]:
	New proto.
	(grub_font_fini) [!EMU]: Likewise.
	(grub_gfxterm_init) [!EMU]: Likewise.
	(grub_gfxterm_fini) [!EMU]: Likewise.
	(grub_video_sm712_init) [!EMU]: Likewise.
	(grub_video_sm712_fini) [!EMU]: Likewise.
	(grub_video_sis315pro_init) [!EMU]: Likewise.
	(grub_video_sis315pro_fini) [!EMU]: Likewise.
	(grub_video_radeon_fuloong2e_init) [!EMU]: Likewise.
	(grub_video_radeon_fuloong2e_fini) [!EMU]: Likewise.
2012-02-27 00:28:45 +01:00
Vladimir 'phcoder' Serbinenko
67093bc0ed Another round of string clarification and adding TRANSLATORS comments. 2012-02-26 17:28:05 +01:00
Vladimir 'phcoder' Serbinenko
ebcecdf1c3 Increase warning level.
* conf/Makefile.common (CFLAGS_GNULIB): Add -Wno-redundant-decls
	-Wno-unreachable-code -Wno-conversion -Wno-old-style-definition.
	* configure.ac (HOST_CFLAGS): Add bunch of -W arguments.
	(TARGET_CFLAGS): Likewise.
	(HOST_CFLAGS): Add -Werror unless --disable-werror is activated.
	* grub-core/Makefile.core.def (decompressor_xz): Add
	-Wno-unreachable-code.
	(normal): Add -Wno-redundant-decls.
	(xzio): Add -Wno-unreachable-code.
	(lzopio): Add -Wno-redundant-decls -Wno-error.
	* grub-core/commands/acpi.c: Add exception to -Wcast-align.
	* grub-core/commands/lsacpi.c: Add exception to -Wcast-align.
	* grub-core/gensymlist.sh: Add exception to -Wmissing-format-attribute.
	* grub-core/kern/dl.c: Add exception to -Wcast-align.
	* grub-core/kern/efi/efi.c (grub_efi_modules_addr): Likewise.
	* grub-core/kern/i386/coreboot/init.c: Add exception to
	-Wsuggest-attribute=noreturn.
	* grub-core/kern/ia64/dl.c: Add exception to -Wcast-align.
	* grub-core/kern/ia64/dl_helper.c: Likewise.
	* grub-core/kern/mips/dl.c: Likewise.
	* grub-core/kern/sparc64/dl.c: Likewise.
	* grub-core/lib/LzmaEnc.c: Add exception to -Wshadow.
	* grub-core/lib/libgcrypt_wrap/cipher_wrap.h (memcpy): Likewise.
	(memcmp): Likewise.
	* grub-core/lib/pbkdf2.c: Add exception to -Wunreachable-code.
	* grub-core/loader/ia64/efi/linux.c: Add exception to -Wcast-align.
	* grub-core/loader/mips/linux.c: Likewise.
	* grub-core/loader/multiboot_elfxx.c: Likewise.
	* grub-core/script/parser.y: Add exception to -Wunreachable-code.
	* grub-core/video/sm712.c: Add exception to -Wcast-align.
	* util/import_gcry.py: Add -Wno-cast-align to modules checked by hand.
	* grub-core/font/font.c (grub_font_loader_init): Add explicit cast and
	fixme.
	* grub-core/fs/iso9660.c (grub_iso9660_iterate_dir): Likewise.
	* grub-core/kern/i386/multiboot_mmap.c (grub_machine_mmap_init):
	Fix prototype.
2012-02-10 16:48:48 +01:00
Vladimir 'phcoder' Serbinenko
9c4b5c13e6 Improve gettext support. Stylistic fixes and error handling fixes while
on it.
2012-02-08 19:26:01 +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
b3950b849f * grub-core/kern/mips/qemu_mips/init.c (grub_at_keyboard_init): Remove
redundant declaration.
	(grub_serial_init): Likewise.
	(grub_terminfo_init): Likewise.
2011-12-13 11:46:29 +01:00
Vladimir 'phcoder' Serbinenko
6e0632e28c * grub-core/commands/acpihalt.c: Gettextized.
* grub-core/commands/cacheinfo.c: Likewise.
	* grub-core/commands/cmp.c: Likewise.
	* grub-core/commands/efi/loadbios.c: Likewise.
	* grub-core/commands/gptsync.c: Likewise.
	* grub-core/commands/ieee1275/suspend.c: Likewise.
	* grub-core/commands/legacycfg.c: Likewise.
	* grub-core/commands/memrw.c: Likewise.
	* grub-core/commands/minicmd.c: Likewise.
	* grub-core/commands/parttool.c: Likewise.
	* grub-core/commands/time.c: Likewise.
	* grub-core/commands/videoinfo.c: Likewise.
	* grub-core/disk/geli.c: Likewise.
	* grub-core/disk/i386/pc/biosdisk.c: Likewise.
	* grub-core/disk/luks.c: Likewise.
	* grub-core/disk/lvm.c: Likewise.
	* grub-core/font/font_cmd.c: Likewise.
	* grub-core/fs/zfs/zfscrypt.c: Likewise.
	* grub-core/fs/zfs/zfsinfo.c: Likewise.
	* grub-core/gfxmenu/view.c: Likewise.
	* grub-core/kern/emu/hostdisk.c: Likewise.
	* grub-core/kern/emu/main.c: Likewise.
	* grub-core/kern/emu/misc.c: Likewise.
	* grub-core/kern/emu/mm.c: Likewise.
	* grub-core/kern/mips/arc/init.c: Likewise.
	* grub-core/kern/mips/loongson/init.c: Likewise.
	* grub-core/kern/partition.c: Likewise.
	* grub-core/lib/i386/halt.c: Likewise.
	* grub-core/lib/mips/arc/reboot.c: Likewise.
	* grub-core/lib/mips/loongson/reboot.c: Likewise.
	* grub-core/loader/i386/pc/chainloader.c: Likewise.
	* grub-core/loader/i386/xnu.c: Likewise.
	* grub-core/loader/multiboot.c: Likewise.
	* grub-core/net/bootp.c: Likewise.
	* grub-core/net/net.c: Likewise.
	* grub-core/normal/term.c: Likewise.
	* grub-core/partmap/bsdlabel.c: Likewise.
	* grub-core/parttool/msdospart.c: Likewise.
	* grub-core/term/gfxterm.c: Likewise.
	* grub-core/term/terminfo.c: Likewise.
	* grub-core/video/i386/pc/vbe.c: Likewise.
	* util/grub-menulst2cfg.c: Likewise.
	* util/grub-mkdevicemap.c: Likewise.
	* util/grub-mklayout.c: Likewise.
	* util/grub-mkrelpath.c: Likewise.
	* util/grub-script-check.c: Likewise.
	* util/ieee1275/grub-ofpathname.c: Likewise.
	* util/resolve.c: Likewise.
2011-11-11 21:44:56 +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
a97501d238 Make grub_prefix into module to fix the arbitrary limit and save
some space.

	* grub-core/kern/emu/main.c (grub_prefix): Removed.
	* grub-core/kern/i386/coreboot/startup.S (grub_prefix): Likewise.
	* grub-core/kern/i386/efi/startup.S (grub_prefix): Likewise.
	* grub-core/kern/i386/ieee1275/startup.S (grub_prefix): Likewise.
	* grub-core/kern/i386/pc/startup.S (grub_prefix): Likewise.
	* grub-core/kern/i386/qemu/startup.S (grub_prefix): Likewise.
	* grub-core/kern/ia64/efi/startup.S (grub_prefix): Likewise.
	* grub-core/kern/mips/startup.S (grub_prefix): Likewise.
	* grub-core/kern/powerpc/ieee1275/startup.S (grub_prefix): Likewise.
	* grub-core/kern/sparc64/ieee1275/crt0.S (grub_prefix): Likewise.
	* grub-core/kern/x86_64/efi/startup.S (grub_prefix): Likewise.
	* include/grub/ia64/efi/kernel.h: Removed.
	* include/grub/kernel.h: New module type OBJ_TYPE_PREFIX.
	(grub_prefix): Removed.
	* include/grub/offsets.h (GRUB_KERNEL_I386_PC_PREFIX): Removed.
	(GRUB_KERNEL_I386_PC_PREFIX_END): Likewise.
	(GRUB_KERNEL_I386_QEMU_PREFIX): Likewise.
	(GRUB_KERNEL_I386_QEMU_PREFIX_END): Likewise.
	(GRUB_KERNEL_SPARC64_IEEE1275_PREFIX): Likewise.
	(GRUB_KERNEL_SPARC64_IEEE1275_PREFIX_END): Likewise.
	(GRUB_KERNEL_POWERPC_IEEE1275_PREFIX): Likewise.
	(GRUB_KERNEL_POWERPC_IEEE1275_PREFIX_END): Likewise.
	(GRUB_KERNEL_MIPS_LOONGSON_PREFIX): Likewise.
	(GRUB_KERNEL_MIPS_LOONGSON_PREFIX_END): Likewise.
	(GRUB_KERNEL_MIPS_QEMU_MIPS_PREFIX): Likewise.
	(GRUB_KERNEL_MIPS_QEMU_MIPS_PREFIX_END): Likewise.
	(GRUB_KERNEL_MIPS_ARC_PREFIX): Likewise.
	(GRUB_KERNEL_MIPS_ARC_PREFIX_END): Likewise.
	(GRUB_KERNEL_I386_EFI_PREFIX): Likewise.
	(GRUB_KERNEL_I386_EFI_PREFIX_END): Likewise.
	(GRUB_KERNEL_IA64_EFI_PREFIX): Likewise.
	(GRUB_KERNEL_IA64_EFI_PREFIX_END): Likewise.
	(GRUB_KERNEL_X86_64_EFI_PREFIX): Likewise.
	(GRUB_KERNEL_X86_64_EFI_PREFIX_END): Likewise.
	(GRUB_KERNEL_I386_COREBOOT_PREFIX): Likewise.
	(GRUB_KERNEL_I386_COREBOOT_PREFIX_END): Likewise.
	(GRUB_KERNEL_I386_MULTIBOOT_PREFIX): Likewise.
	(GRUB_KERNEL_I386_MULTIBOOT_PREFIX_END): Likewise.
	(GRUB_KERNEL_I386_IEEE1275_PREFIX): Likewise.
	(GRUB_KERNEL_I386_IEEE1275_PREFIX_END): Likewise.
	(GRUB_KERNEL_MACHINE_PREFIX): Likewise.
	(GRUB_KERNEL_MACHINE_PREFIX_END): Likewise.
	* grub-core/kern/main.c (grub_set_prefix_and_root): Retrieve grub_prefix
	from module.
	* util/grub-mkimage.c (image_target_desc): Removed prefix and
	prefix_end.
	(image_targets): Likewise.
	(generate_image): Put prefix as a module.
2011-10-18 15:21:51 +02:00
Vladimir 'phcoder' Serbinenko
39705fadd7 Replace grub_module_iterate with FOR_MODULES.
* grub-core/disk/memdisk.c (GRUB_MOD_INIT): Switched to new interface.
	* grub-core/kern/efi/efi.c (grub_arch_modules_addr): Renamed to...
	(grub_efi_modules_addr): ...this.
	* grub-core/kern/efi/init.c (grub_modbase): New variable.
	(grub_efi_init): Set grub_modbase.
	* grub-core/kern/emu/main.c (grub_arch_modules_addr): Removed.
	(grub_modbase): New variable.
	* grub-core/kern/i386/coreboot/init.c (grub_arch_modules_addr): Removed.
	(grub_modbase): New variable.
	(grub_machine_init): Set grub_modbase.
	* grub-core/kern/i386/pc/init.c (grub_arch_modules_addr): Removed.
	(grub_modbase): New variable.
	(grub_machine_init): Set grub_modbase.
	* grub-core/kern/ieee1275/init.c (grub_arch_modules_addr): Removed.
	(grub_modbase): New variable.
	(grub_machine_init): Set grub_modbase.
	* grub-core/kern/main.c (grub_module_iterate): Remove.
	(grub_modules_get_end): Use grub_modbase.
	(grub_load_modules): Use FOR_MODULES.
	(grub_load_config): Likewise.
	* grub-core/kern/mips/arc/init.c (grub_arch_modules_addr): Removed.
	(grub_modbase): New variable.
	(grub_machine_init): Set grub_modbase.
	* grub-core/kern/mips/loongson/init.c (grub_arch_modules_addr): Removed.
	(grub_modbase): New variable.
	(grub_machine_init): Set grub_modbase.
	* grub-core/kern/mips/qemu_mips/init.c (grub_arch_modules_addr):
	Removed.
	(grub_modbase): New variable.
	(grub_machine_init): Set grub_modbase.
	* include/grub/efi/efi.h (grub_efi_modules_addr): New declaration.
	* include/grub/kernel.h (grub_arch_modules_addr): Removed.
	(grub_module_iterate): Likewise.
	(grub_modbase): New variable declaration.
	(FOR_MODULES): New macro.
2011-10-16 15:23:29 +02:00
Vladimir 'phcoder' Serbinenko
ca51c4a04f * grub-core/kern/mips/loongson/init.c (grub_machine_init): Handle the
case of less than 256 MiB of RAM.
2011-08-23 11:20:56 +02:00
Vladimir 'phcoder' Serbinenko
f87abff538 * grub-core/kern/mips/loongson/init.c (grub_reboot): Reboot Fuloong.
* include/grub/cs5536.h (GRUB_CS5536_MSR_DIVIL_RESET): New definition.
2011-08-19 23:11:09 +02:00