Commit graph

25 commits

Author SHA1 Message Date
okuji
7f362539b7 2006-04-30 Yoshinori K. Okuji <okuji@enbug.org>
Extend the loader so that GRUB can accept a loader which comes
        back to GRUB when a loaded image exits. Also, this change adds
        support for a chainloader on EFI.

        * term/efi/console.c: Include grub/misc.h.
        (grub_console_checkkey): Display a scan code on the top for
        debugging. This will be removed once the EFI port gets stable.
        Correct the scan code mapping.

        * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
        allocate memory from larger regions, in order to reduce the number
        of allocated regions. Otherwise, the MacOSX loader panics.
        (filter_memory_map): Avoid less than 1MB for compatibility with
        other loaders.
        (add_memory_regions): Allocate from the tail of a region, if
        possible, to avoid allocating a region near to 1MB, for the MacOSX
        loader.

        * kern/efi/init.c (grub_efi_set_prefix): Specify
        GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.

        * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
        argument IMAGE_HANDLE and specify it to get a loaded image.
        (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
        grub_efi_get_loaded_image.
        (grub_efi_get_filename): Divide the legnth by the size of
        grub_efi_char16_t.
        (grub_efi_get_device_path): New function.
        (grub_efi_print_device_path): Print End Device Path nodes. Divide
        the length by the size of grub_efi_char16_t for a file path device
        path node.

        * kern/loader.c (grub_loader_noreturn): New variable.
        (grub_loader_set): Accept a new argument NORETURN. Set
        GRUB_LOADER_NORETURN to NORETURN.
        All callers changed.
        (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
        grub_machine_fini.

        * include/grub/efi/efi.h (grub_efi_get_device_path): New
        prototype.
        (grub_efi_get_loaded_image): Take an argument to specify an image
        handle.

        * include/grub/loader.h (grub_loader_set): Added one more argument
        NORETURN.

        * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
        instead of grub_efi_open_protocol.
        (grub_efidisk_get_device_name): Likewise.
        (grub_efidisk_close): Print a newline.
        (grub_efidisk_get_device_handle): Fixed to use
        GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
        GRUB_EFI_DEVICE_PATH_TYPE.

        * disk/efi/efidisk.c (device_path_guid): Moved to ...
        * kern/efi/efi.c (device_path_guid): ... here.

        * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
        chain.mod.
        (kernel_mod_HEADERS): Added efi/disk.h.
        (_chain_mod_SOURCES): New variable.
        (_chain_mod_CFLAGS): Likewise.
        (_chain_mod_LDFLAGS): Likewise.
        (chain_mod_SOURCES): Likewise.
        (chain_mod_CFLAGS): Likewise.
        (chain_mod_LDFLAGS): Likewise.

        * DISTLIST: Added include/grub/efi/chainloader.h,
        loader/efi/chainloader.c and loader/efi/chainloader_normal.c.

        * include/grub/efi/chainloader.h: New file.
        * loader/efi/chainloader.c: Likewise.
        * loader/efi/chainloader_normal.c: Likewise.
2006-04-30 21:09:37 +00:00
okuji
2965c7cc2d 2006-04-25 Yoshinori K. Okuji <okuji@enbug.org>
A new machine-specific function "grub_machine_set_prefix" is
        defined. This is called after loading modules, so that a prefix
        initialization can use modules. Also, this change adds an
        intensive debugging feature for the memory manager via the
        configure option "--enable-mm-debug".

        * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
        PART.LEN.

        * kern/sparc64/ieee1275/init.c (abort): Removed.
        (grub_stop): Likewise.
        (grub_exit): New function.
        (grub_set_prefix): Renamed to ...
        (grub_machine_set_prefix): ... this.
        (grub_machine_init): Do not call grub_set_prefix.

        * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
        (grub_machine_set_prefix): ... this.
        (grub_machine_init): Do not call grub_set_prefix.

        * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
        (grub_machine_init): Do not set the prefix here.

        * kern/i386/efi/init.c (grub_machine_set_prefix): New function.

        * kern/efi/init.c: Include grub/mm.h.
        (grub_efi_set_prefix): New function.

        * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
        (grub_efi_get_filename): New function.
        (grub_print_device_path): Renamed to ...
        (grub_efi_print_device_path): ... this.

        * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
        [MM_DEBUG] (grub_realloc): Likewise.
        [MM_DEBUG] (grub_free): Likewise.
        [MM_DEBUG] (grub_memalign): Likewise.
        [MM_DEBUG] (grub_mm_debug): New variable.
        [MM_DEBUG] (grub_debug_malloc): New function.
        [MM_DEBUG] (grub_debug_free): New function.
        [MM_DEBUG] (grub_debug_realloc): New function.
        [MM_DEBUG] (grub_debug_memalign): New function.

        * kern/misc.c (grub_abort): Print a newline to distinguish
        the message.

        * kern/main.c (grub_main): Call grub_machine_set_prefix and
        grub_set_root_dev after loading modules. This is necessary when
        setting a prefix depends on modules.

        * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
        (grub_efi_print_device_path): ... this.
        (grub_efi_get_filename): New prototype.
        (grub_efi_set_prefix): Likewise.

        * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
        and grub/disk.h.
        (grub_efidisk_get_device_handle): New prototype.
        (grub_efidisk_get_device_name): Likewise.

        * include/grub/mm.h: Include config.h.
        (MM_DEBUG): Removed.
        [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
        [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
        [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
        [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
        [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
        [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
        [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
        [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
        [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.

        * include/grub/kernel.h (grub_machine_set_prefix): New prototype.

        * disk/efi/efidisk.c: Include grub/partition.h.
        (iterate_child_devices): New function.
        (add_device): First, compare only last device path nodes, so that
        devices are sorted by the types.
        (grub_efidisk_get_device_handle): New function.
        (grub_efidisk_get_device_name): Likewise.

        * configure.ac (--enable-mm-debug): New option to enable the
        memory manager debugging feature. This makes the binary much
        bigger, so is disabled by default.
2006-04-25 20:08:31 +00:00
okuji
9cacaa174c 2006-04-23 Yoshinori K. Okuji <okuji@enbug.org>
Use grub_abort instead of grub_stop, and grub_exit must be
        define in each architecture now. Also, this change adds support
        for EFI disks.

        * util/i386/pc/grub-probefs.c: Include grub/term.h.
        (grub_getkey): New function.
        (grub_term_get_current): Likewise.

        * util/i386/pc/grub-setup.c: Include grub/term.h.
        (grub_getkey): New function.
        (grub_term_get_current): Likewise.

        * util/misc.c (grub_stop): Renamed to ...
        (grub_exit): ... this.

        * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
        (grub_exit): ... this.
        (grub_machine_init): Use grub_abort instead of abort.
        (grub_stop): Removed.

        * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
        abort.

        * kern/i386/pc/startup.S (grub_exit): New function.
        (cold_reboot): New label.

        * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
        (grub_efi_init): Call grub_efidisk_init.
        (grub_efi_fini): Call grub_efidisk_fini.

        * kern/efi/efi.c: Include grub/mm.h.
        (grub_efi_console_control_guid): Renamed to ...
        (console_control_guid): ... this.
        (grub_efi_loaded_image_guid): Renamed to ...
        (loaded_image_guid): ... this.
        (grub_efi_locate_handle): New function.
        (grub_efi_open_protocol): Likewise.
        (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
        GRUB_EFI_CONSOLE_CONTROL_GUID.
        (grub_efi_exit): Removed.
        (grub_stop): Likewise.
        (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
        (grub_exit): New function.
        (grub_print_device_path): Likewise.

        * kern/rescue.c (grub_rescue_cmd_exit): New function.
        (grub_enter_rescue_mode): Register "exit".

        * kern/misc.c (grub_real_dprintf): A cosmetic change.
        (grub_abort): New function.

        * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.

        * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.

        * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.

        * include/grub/efi/efi.h (grub_efi_exit): Removed.
        (grub_print_device_path): New prototype.
        (grub_efi_locate_handle): Likewise.
        (grub_efi_open_protocol): Likewise.

        * include/grub/efi/disk.h (grub_efidisk_fini): New file.
        * disk/efi/efidisk.c: Likewise.

        * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.

        * include/grub/efi/console_control.h
        (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.

        * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
        last 8 bytes as an array.
        (GRUB_EFI_DISK_IO_GUID): New macro.
        (GRUB_EFI_BLOCK_IO_GUID): Likewise.
        (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
        (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
        grub_uint8_t.
        (struct grub_efi_guid): Use an array to specify the last 8 bytes.
        (struct grub_efi_device_path): Rename the member "sub_type" to
        "subtype".
        (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
        (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
        (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
        (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
        (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
        (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
        (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
        (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
        (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
        (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
        (struct grub_efi_pci_device_path): New structure.
        (grub_efi_pci_device_path_t): New type.
        (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
        (struct grub_efi_pccard_device_path): New structure.
        (grub_efi_pccard_device_path_t): New type.
        (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
        (struct grub_efi_memory_mapped_device_path): New structure.
        (grub_efi_memory_mapped_device_path_t): New type.
        (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
        (struct grub_efi_vendor_device_path): New structure.
        (grub_efi_vendor_device_path_t): New type.
        (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
        (struct grub_efi_controller_device_path): New structure.
        (grub_efi_controller_device_path_t): New type.
        (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
        (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
        (struct grub_efi_acpi_device_path): New structure.
        (grub_efi_acpi_device_path_t): New type.
        (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
        (struct grub_efi_expanded_acpi_device_path): New structure.
        (grub_efi_expanded_acpi_device_path_t): New type.
        (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
        (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
        (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
        (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
        (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
        (struct grub_efi_atapi_device_path): New structure.
        (grub_efi_atapi_device_path_t): New type.
        (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
        (struct grub_efi_fibre_channel_device_path): New structure.
        (grub_efi_fibre_channel_device_path_t): New type.
        (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
        (struct grub_efi_1394_device_path): New structure.
        (grub_efi_1394_device_path_t): New type.
        (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
        (struct grub_efi_usb_device_path): New structure.
        (grub_efi_usb_device_path_t): New type.
        (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
        (struct grub_efi_usb_class_device_path): New structure.
        (grub_efi_usb_class_device_path_t): New type.
        (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
        (struct grub_efi_i2o_device_path): New structure.
        (grub_efi_i2o_device_path_t): New type.
        (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
        (struct grub_efi_mac_address_device_path): New structure.
        (grub_efi_mac_address_device_path_t): New type.
        (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
        (struct grub_efi_ipv4_device_path): New structure.
        (grub_efi_ipv4_device_path_t): New type.
        (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
        (struct grub_efi_ipv6_device_path): New structure.
        (grub_efi_ipv6_device_path_t): New type.
        (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
        (struct grub_efi_infiniband_device_path): New structure.
        (grub_efi_infiniband_device_path_t): New type.
        (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
        (struct grub_efi_uart_device_path): New structure.
        (grub_efi_uart_device_path_t): New type.
        (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
        (struct grub_efi_vendor_messaging_device_path): New structure.
        (grub_efi_vendor_messaging_device_path_t): New type.
        (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
        (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
        (struct grub_efi_hard_drive_device_path): New structure.
        (grub_efi_hard_drive_device_path_t): New type.
        (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
        (struct grub_efi_cdrom_device_path): New structure.
        (grub_efi_cdrom_device_path_t): New type.
        (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
        (struct grub_efi_vendor_media_device_path): New structure.
        (grub_efi_vendor_media_device_path_t): New type.
        (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
        (struct grub_efi_file_path_device_path): New structure.
        (grub_efi_file_path_device_path_t): New type.
        (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
        (struct grub_efi_protocol_device_path): New structure.
        (grub_efi_protocol_device_path_t): New type.
        (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
        (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
        (struct grub_efi_bios_device_path): New structure.
        (grub_efi_bios_device_path_t): New type.
        (struct grub_efi_disk_io): New structure.
        (grub_efi_disk_io_t): New type.
        (struct grub_efi_block_io_media): New structure.
        (grub_efi_block_io_media_t): New type.
        (struct grub_efi_block_io): New structure.
        (grub_efi_block_io_t): New type.

        * include/grub/misc.h (grub_stop): Removed.
        (grub_exit): New prototype.
        (grub_abort): Likewise.

        * include/grub/disk.h (enum grub_disk_dev_id): Added
        GRUB_DISK_DEVICE_EFIDISK_ID.

        * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
        disk/efi/efidisk.c.
        (kernel_syms.lst): Remove the target if an error occurs.
2006-04-23 13:37:36 +00:00
marco_g
6d099807fa 2005-11-13 Marco Gerards <mgerards@xs4all.nl>
* geninit.sh: New file.

	* geninitheader.sh: Likewise.

	* commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
	* commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
	* commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
	* commands/configfile.c (grub_configfile_init)
	(grub_configfile_fini): Likewise.
	* commands/default.c (grub_default_init, grub_default_fini):
	Likewise.
	* commands/help.c (grub_help_init, grub_help_fini): Likewise.
	* commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
	* commands/search.c (grub_search_init, grub_search_fini): Likewise.
	* commands/terminal.c (grub_terminal_init, grub_terminal_fini):
	Likewise.
	* commands/test.c (grub_test_init, grub_test_fini): Likewise.
	* commands/timeout.c (grub_timeout_init, grub_timeout_fini):
	Likewise.
	* commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
	* commands/iee1275/halt.c (grub_halt_init, grub_halt_fini):
	Likewise.
	* commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
	Likewise.
	* commands/iee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
	Likewise.
	* disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
	* fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
	* fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
	* fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
	* fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
	* fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
	* fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
	* fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
	* fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
	* fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
	* fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
	* normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
	* partmap/amiga.c (grub_amiga_partition_map_init)
	(grub_amiga_partition_map_fini): Likewise.
	* partmap/apple.c (grub_apple_partition_map_init)
	(grub_apple_partition_map_fini): Likewise.
	* partmap/pc.c (grub_pc_partition_map_init)
	(grub_pc_partition_map_fini): Likewise.
	* partmap/sun.c (grub_sun_partition_map_init,
	grub_sun_partition_map_fini): Likewise.
	* term/terminfo.c (grub_terminal_init, grub_terminal_fini):
	Likewise.

	* util/grub-emu.c: Include <grub_modules_init.h>.
	(main): Don't initialize and de-initialize any modules directly,
	use `grub_init_all' and `grub_fini_all' instead.

	* term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
	`grub_vesafb_mod_init'.
	(grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'.  Updated
	all users.
	* term/i386/pc/vga.c (grub_vga_init): Renamed to
	`grub_vga_mod_init'.  Updated all users.
	(grub_vga_fini): Renamed to `grub_vga_mod_fini'.

	* conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
	(grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
	rules.

	* include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
	Generate a function to initialize the module in utilities.
	Updated all callers.
	(GRUB_MOD_FINI): Add argument `name'.  Generate a function to
	initialize the module in utilities.  Updated all callers.
2005-11-13 15:47:09 +00:00
subdino
e9211b5d32 2005-08-21 Vincent Pelletier <subdino2004@yahoo.fr>
* configure.ac: Add support for sparc64 host with ieee1275
        firmware.
        * configure: Generated from configure.ac.
        * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
        instead of int.
        (grub_ofdisk_read): Likewise.
        (grub_ofdisk_open): Use %p to print pointer values, and cast the
        pointers as (void *) to remove a warning.
        (grub_ofdisk_close): Likewise.
        (grub_ofdisk_read): Likewise.
        * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
        returns, so make it return void to remove a warning.
        * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
        Corresponding prototype change.
        * kern/mm.c (grub_mm_init_region): Use %p to print pointer
        values, and cast the pointers as (void *) to remove a warning.
        (grub_mm_dump): Likewise.
        * conf/sparc64-ieee1275.mk: New file.
        * conf/sparc64-ieee1275.rmk: Likewise.
        * include/grub/sparc64/setjmp.h: Likewise.
        * include/grub/sparc64/types.h: Likewise.
        * include/grub/sparc64/ieee1275/console.h: Likewise.
        * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
        * include/grub/sparc64/ieee1275/kernel.h: Likewise.
        * include/grub/sparc64/ieee1275/time.h: Likewise.
        * kern/sparc64/cache.c: Likewise.
        * kern/sparc64/dl.c: Likewise.
        * kern/sparc64/ieee1275/init.c: Likewise.
        * kern/sparc64/ieee1275/openfw.c: Likewise.
2005-08-21 18:42:55 +00:00
hollisb
3be7266d92 2005-08-03 Hollis Blanchard <hollis@penguinppc.org>
* include/grub/powerpc/ieee1275/ieee1275.h: Move ...
	* include/grub/ieee1275/ieee1275.h: ... to here.  All users updated.
	Move `abort', `grub_reboot', and `grub_halt' prototypes ...
	* include/grub/powerpc/ieee1275/kernel.h: ... to here.
	* commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
	of <grub/machine/ieee1275.h>.
	* commands/ieee1275/reboot.c: Likewise.
	* boot/powerpc/ieee1275/ieee1275.c: Move ...
	* kern/ieee1275.c: ... to here.  All users updated.  Change all
	parameter structs to use new type `grub_ieee1275_cell_t'.
	* term/powerpc/ieee1275/ofconsole.c: Move ...
	* term/ieee1275/ofconsole.c: ... to here.  All users updated.
	* disk/powerpc/ieee1275/ofdisk.c: Move ...
	* disk/ieee1275/ofdisk.c: ... to here.  All users updated.
	* boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
	to return int.
	* include/grub/i386/pc/console.h: Move to include/grub/console.h.
	Remove unused prototypes.  All users updated.
	* include/grub/powerpc/ieee1275/console.h: Removed.
	* include/grub/powerpc/ieee1275/ieee1275.h: Define
	`grub_ieee1275_cell_t'.
	* kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
	Cast comparisons with -1 to the correct type.
	* loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
	type to match `grub_ieee1275_entry_fn'.
2005-08-03 22:53:51 +00:00
okuji
502c87e80e 2005-07-17 Yoshinori Okuji <okuji@enbug.org>
* commands/cat.c (GRUB_MOD_INIT): Use better documentation.
	(grub_cat_init): Likewise.
	* loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
	(options): Likewise.
	* commands/configfile.c (GRUB_MOD_INIT): Likewise.
	(grub_configfile_init): Likewise.
	* font/manager.c (GRUB_MOD_INIT): Likewise.
	* commands/help.c (GRUB_MOD_INIT): Likewise.
	(grub_help_init): Likewise.
	* normal/command.c (grub_command_init): Likewise.
	* loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
	* disk/loopback.c (grub_loop_init): Likewise.
	(GRUB_MOD_INIT): Likewise.
	* commands/ls.c (grub_ls_init): Likewise.
	(GRUB_MOD_INIT): Likewise.
	(options): Likewise.
	* commands/boot.c (grub_boot_init): Likewise.
	(GRUB_MOD_INIT): Likewise.
	* loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
	* commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
	(GRUB_MOD_INIT): Likewise.
	* commands/cmp.c (grub_cmp_init): Likewise.
	(GRUB_MOD_INIT): Likewise.

	* normal/arg.c: Use <> instead of "" to include header files.
	(SHORT_ARG_HELP): New macro.
	(SHORT_ARG_USAGE): Likewise.
	(help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
	of 'h' and 'u' for help and usage, respectively. Use more GNU-like
	descriptions.
	(find_short): Check if C is 'h' or 'u' explicitly.
	(grub_arg_show_help): Use space characters instead of tabs. Treat
	SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
	are shown with --help and --usage only if they are not used for
	the command itself.
	(parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
	'h' and 'u'.

	* include/grub/arg.h (struct grub_arg_option): Add the qualifier
	const into "longarg". Change the type of "shortarg" to int.
2005-07-17 20:26:07 +00:00
hollisb
09f9923fbb 2005-07-12 Hollis Blanchard <hollis@penguinppc.org>
* disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
	device path and resulting ihandle.
	(grub_ofdisk_close): dprintf the ihandle being closed.
	(grub_ofdisk_read): dprintf function parameters.
	* kern/mm.c (grub_mm_init_region): Likewise.
	* loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
	(grub_linux_boot): dprintf the Linux entry point, initrd address and
	size, and boot arguments.
	(grub_rescue_cmd_linux): dprintf each ELF segment's address and size
	before loading into memory.
	(grub_rescue_cmd_initrd): dprintf the initrd's address and size
	before loading into memory.
2005-07-12 22:36:43 +00:00
hollisb
f4c5e67ca4 2005-04-30 Hollis Blanchard <hollis@penguinppc.org>
* boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
	(roundup): Remove macro.
	(grub_ieee1275_flags): Make static.
	(grub_ieee1275_realmode): Remove.
	(grub_ieee1275_test_flag): New function.
	(grub_ieee1275_set_flag): Likewise.
	(find_options): Rename to `grub_ieee1275_find_options'; update
	callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
	GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
	(cmain): New prototype.
	(cmain): Use `grub_ieee1275_set_flag' instead of accessing
	`grub_ieee1275_flags' directly.
	* conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
	machine/biosdisk.h.
	* disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
	Don't include grub/machine/init.h.
	(grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
	* include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
	Remove prototype.
	(grub_ieee1275_realmode): Likewise.
	(grub_ieee1275_flag): New enum.
	(grub_ieee1275_test_flag): New prototype.
	(grub_ieee1275_set_flag): New prototype.
	* include/grub/powerpc/ieee1275/init.h: Remove file.
	* include/grub/powerpc/ieee1275/ofdisk.h: New file.
	* kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
	Include grub/machine/console.h.  Include grub/machine/ofdisk.h.
	(grub_machine_fini): Don't call `grub_ieee1275_release'.  Remove
	comment.
	* kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
	`grub_ieee1275_test_flag'.
	(grub_ieee1275_encode_devname): Likewise.
2005-05-01 03:45:36 +00:00
hollisb
a5ce3a4a04 2005-03-26 Hollis Blanchard <hollis@penguinppc.org>
* commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
	instead of grub_ieee1275_interpret.
	(grub_halt_init): New function.
	(grub_halt_fini): Likewise.
	(GRUB_MOD_INIT): Correct message grammar.
	* commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
	instead of grub_ieee1275_interpret.
	(grub_reboot_init): New function.
	(grub_reboot_fini): Likewise.
	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
	commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
	util/i386/pc/misc.c with commands/ieee1275/halt.c,
	commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
	* disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
	function.
	* include/grub/powerpc/ieee1275/console.h (grub_console_fini):
	Add prototype.
	* include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
	prototype.
	(grub_halt): Likewise.
	* include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
	(cmain): Remove __attribute__((unused)).
	* kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
	(grub_heap_len): Likewise.
	(grub_machine_fini): New function.
	* kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
	(grub_halt): Likewise.
	* term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
	function.
	* util/powerpc/ieee1275/misc.c: New file.
2005-03-26 17:34:50 +00:00
okuji
e6b92c8afb 2005-02-15 Yoshinori K. Okuji <okuji@enbug.org>
* include/grub/normal.h (grub_halt_init): New prototype.
  (grub_halt_fini): Likewise.
  (grub_reboot_init): Likewise.
  (grub_reboot_fini): Likewise.

  * util/grub-emu.c: Include signal.h.
  (main_env): New global variable.
  (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
  catch C-c.
  (grub_machine_fini): New function.
  (main): Call grub_halt_init and grub_reboot_init before
  grub_main, and grub_reboot_fini and grub_halt_fini after it.
  Call setjmp with MAIN_ENV to go back afterwards.
  Call grub_machine_fini right before return.

  * include/grub/util/misc.h: Include setjmp.h.
  (main_env): New prototype.

  * include/grub/kernel.h (grub_machine_fini): New prototype.
  * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
  * include/grub/i386/pc/console.h (grub_console_fini): Likewise.

  * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
  * kern/i386/pc/init.c (grub_machine_fini): Likewise.
  * term/i386/pc/console.c (grub_console_fini): Likewise.

  * util/i386/pc/misc.c: New file.

  * conf/i386-pc.rmk (grub_emu_SOURCES): Added
  util/i386/pc/misc.c, commands/i386/pc/halt.c and
  commands/i386/pc/reboot.c.
2005-02-15 00:07:01 +00:00
hollisb
8b8cbdb2ff 2005-01-22 Hollis Blanchard <hollis@penguinppc.org>
* disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
	`devpath' to 0.  Use `name' instead of `devpath' with `grub_strndup'.
2005-01-22 16:03:15 +00:00
marco_g
67bbaf0f38 2005-01-21 Marco Gerards <metgerards@student.han.nl>
Add the loopback device, a device via which files can be accessed
	as devices.

	* conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
	(pkgdata_MODULES): Add loopback.mod.
	(loopback_mod_SOURCES): New variable.
	(loopback_mod_CFLAGS): Likewise.
	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
	`disk/loopback.c'.
	(pkgdata_MODULES): Add loopback.mod.
	(loopback_mod_SOURCES): New variable.
	(loopback_mod_CFLAGS): Likewise.
	* disk/loopback.c: new file.
	* include/grub/normal.h (grub_loop_init): New prototype.
	(grub_loop_fini): New prototype.
	* util/grub-emu.c (main): Initialize and de-initialize loopback
	support.
	* include/grub/disk.h (grub_disk_dev_id): Add
	`GRUB_DISK_DEVICE_LOOPBACK_ID'.
2005-01-21 21:32:03 +00:00
marco_g
924b6140a1 2004-12-27 Marco Gerards <metgerards@student.han.nl>
* genmk.rb: Handle the `Program' class in the main loop.  Written
	by Johan Rydberg <jrydberg@gnu.org>.
	(Program): New class.
	(programs): New variable.
	* boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
	instead of "grub/machine/ieee1275.h".  Include <grub/kernel.h>
	instead of "grub/kernel.h".  Include <grub/machine/init.h>.
	(help_arch): Function removed.
	* conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
	`powerpc/libgcc.h' and `loader.h'.
	(pkgdata_PROGRAMS): New variable.
	(sbin_UTILITIES): Variable removed.
	(grub_emu_SOURCES): Added kern/powerpc/cache.S.
	(grubof_SOURCES): Variable re-defined so it only includes the
	core functionality.
	(grubof_CFLAGS): Remove `-DGRUBOF'.
	(pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
	(fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
	(ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
	(minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
	(hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
	(iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
	(_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
	(normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
	(hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
	(boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
	(ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
	(cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
	(font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
	(apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
	(pc_mod_CFLAGS): New variables.
	* disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
	(grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
	* include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
	* include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
	Moved from here...
	* include/grub/i386/pc/init.h (grub_os_area_addr)
	(rub_os_area_size): ... to here.
	* include/grub/powerpc/ieee1275/ieee1275.h
	(grub_ieee1275_entry_fn): Export symbol.
	* include/grub/powerpc/ieee1275/init.h: New file.
	* include/grub/powerpc/libgcc.h: Likewise.
	* include/grub/cache.h: Likewise.
	* kern/powerpc/cache.S: Likewise.  Written by Hollis Blanchard
	<hollis@penguinppc.org>.
	* kern/dl.c: Include <grub/cache.h>.
	(grub_dl_flush_cache): New function.
	(grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
	for this module.
	* kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
	(grub_console_init): Removed prototypes.
	(grub_machine_init): Don't initialize the modules anymore.
	* kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
	static.
	* include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
	Macro undef removed.
	(GRUB_HOST_WORDS_BIGENDIAN): New macro.
	* kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
	relocation `R_PPC_REL32'.  Return an error when the relocation is
	unknown.
	* Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
	* kern/i386/pc/init.c (grub_arch_sync_caches): New function.
	* util/misc.c (grub_arch_sync_caches): Likewise.
2004-12-27 13:46:20 +00:00
marco_g
3f1578fe4a 2004-12-04 Marco Gerards <metgerards@student.han.nl>
Modulize the partition map support and add support for the amiga
	partition map.

	* commands/ls.c: Include <grub/partition.h> instead of
	<grub/machine/partition.h>.
	* kern/disk.c: Likewise.
	* kern/rescue.c: Likewise.
	* loader/i386/pc/chainloader.c: Likewise.
	* normal/cmdline.c: Likewise.
	* kern/powerpc/ieee1275/init.c: Likewise.
	(grub_machine_init): Call `grub_pc_partition_map_init',
	`grub_amiga_partition_map_init' and
	`grub_apple_partition_map_init'.
	* conf/i386-pc.rmk (kernel_img_SOURCES): Remove
	`disk/i386/pc/partition.c'.  Add `kern/partition.c'.
	(kernel_img_HEADERS): Remove `machine/partition.h'.  Add
	`partition.h' and `pc_partition.h'.
	(grub_setup_SOURCES): Remove
	`disk/i386/pc/partition.c'.  Add `kern/partition.c',
	`partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
	(grub_emu_SOURCES): Likewise.
	(pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
	(amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
	(apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
	`disk/powerpc/ieee1275/partition.c'.  Add `kern/partition.c',
	`partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
	(grubof_SOURCES): Likewise.
	* disk/i386/pc/partition.c: File removed.
	* disk/powerpc/ieee1275/partition.c: Likewise.
	* include/grub/powerpc/ieee1275/partition.h: Likewise.
	* include/grub/i386/pc/partition.h: Likewise.
	* kern/partition.c: New file.
	* partmap/amiga.c: Likewise.
	* partmap/apple.c: Likewise.
	* partmap/pc.c: Likewise.
	* include/grub/partition.h: Likewise..
	* include/grub/pc_partition.h: Likewise.
	* util/grub-emu.c: Include <grub/partition.h> instead of
	<grub/machine/partition.h>.
	(main): Call `grub_pc_partition_map_init',
	`grub_amiga_partition_map_init' and
	`grub_apple_partition_map_init' and deinitialize afterwards.
	* util/i386/pc/biosdisk.c: Include `#include
	<grub/partition.h>' and `include <grub/pc_partition.h>' instead of
	`<grub/machine/partition.h>'.
	* util/i386/pc/grub-setup.c: Likewise.
	* util/i386/pc/biosdisk.c: Likewise.
	(grub_util_biosdisk_get_grub_dev): Only access the PC specific
	partition information in case of a PC partition.
	* util/i386/pc/grub-setup.c: Include `#include
	<grub/partition.h>' and `include <grub/pc_partition.h>' instead of
	`<grub/machine/partition.h>'.
	(setup): Only access the PC specific partition information in case
	of a PC partition.
2004-12-04 18:45:46 +00:00
hollisb
86f4ae2580 2004-10-15 Hollis Blanchard <hollis@penguinppc.org>
* disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
	append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
	set in grub_ieee1275_flags.
2004-10-15 20:04:28 +00:00
hollisb
d1923dc8f2 2004-10-13 Hollis Blanchard <hollis@penguinppc.org>
* disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
    Call grub_children_iterate for device nodes of type `scsi',
    `ide', or `ata'.
    (grub_ofdisk_open): Remove manual device alias resolution.
    Fix memory leak when device cannot be opened.
    * include/grub/powerpc/ieee1275/ieee1275.h
    (grub_children_iterate): New prototype.
    * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
    New function.
    * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
    Return -1 if args.size was -1.
2004-10-13 23:43:44 +00:00
okuji
97543f08fc 2004-08-21 Yoshinori K. Okuji <okuji@enbug.org>
Each disk device has its own id now. This is useful to make use
  of multiple disk devices.

  * include/grub/disk.h (grub_disk_dev_id): New enum.
  (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
  (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.

  * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
  GRUB_DISK_DEVICE_BIOSDISK_ID as an id.

  * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
  GRUB_DISK_DEVICE_OFDISK_ID as an id.

  * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
  GRUB_DISK_DEVICE_BIOSDISK_ID as an id.

  * include/grub/disk.h (struct grub_disk_dev): Added a new member
  "id" which is used by the cache manager.

  * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
  of just "GRUB".
2004-08-21 13:54:22 +00:00
marco_g
e15199cb7b 2004-07-11 Marco Gerards <metgerards@student.han.nl>
* disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
	one block instead of two when looking for the initial partition.
	(grub_partition_probe): Initialize the local variable `p' with 0.
	Use base 10 for the grub_strtoul call.
	* kern/misc.c (grub_strncpy): Fix off by one bug.  Eliminated the
	need for one local variable.
	(grub_strtoul): Don't add the new value to `num', instead of that
	just assign it.
2004-07-11 14:24:54 +00:00
okuji
4b13b216f4 2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
	and grub_, respectively. Because the conversion is trivial and
	mechanical, I omit the details here. Please refer to the CVS
	if you need more information.
2004-04-04 13:46:03 +00:00
marco_g
e56cdf2111 2004-03-29 Marco Gerards <metgerards@student.han.nl>
Add support for the newworld apple macintosh (PPC).  This has been
	tested on the powerbook 2000 only.  It only adds support for
	generic ieee1275 functions, console and disk support.  This should
	be easy to port to other architectures with support for Open
	Firmware.

	* configure.ac: Accept the powerpc as host_cpu.  In the case of
	the powerpc cpu set the host_vendor to ieee1275.  Make sure the i386
	specific tests are only executed while building for the i386.
	Inverse test for crosscompile.
	* genmk.rb (Utility): Allow assembler files.
	* normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
	* conf/powerpc-ieee1275.rmk: New file.
	* disk/powerpc/ieee1275/ofdisk.c: Likewise.
	* disk/powerpc/ieee1275/partition.c: Likewise.
	* include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
	* include/pupa/powerpc/ieee1275/console.h: Likewise.
	* include/pupa/powerpc/ieee1275/partition.h: Likewise.
	* include/pupa/powerpc/ieee1275/time.h: Likewise.
	* include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
	* include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
	* include/pupa/powerpc/ieee1275/loader.h
	* include/pupa/powerpc/setjmp.h: Likewise.
	* include/pupa/powerpc/types.h: Likewise.
	* kern/powerpc/ieee1275/init.c: Likewise.
	* kern/powerpc/ieee1275/openfw.c: Likewise.
	* term/powerpc/ieee1275/ofconsole.c: Likewise.

	These files were written by Johan Rydberg
	(jrydberg@night.trouble.net) and I only modified them slightly.

	* boot/powerpc/ieee1275/cmain.c: New file.
	* boot/powerpc/ieee1275/crt0.S: Likewise.
	* boot/powerpc/ieee1275/ieee1275.c: Likewise.
	* include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
2004-03-28 21:52:02 +00:00
okuji
8367695cff shinori K. Okuji <okuji@enbug.org>
* genkernsyms.sh: Updated copyright information.
	* genmk.rb: Likewise.
	* genmodsrc.sh: Likewise.
	* gensymlist.sh: Likewise.
	* boot/i386/pc/boot.S: Likewise.
	* boot/i386/pc/diskboot.S: Likewise.
	* disk/i386/pc/biosdisk.c: Likewise.
	* disk/i386/pc/partition.c: Likewise.
	* font/manager.c: Likewise.
	* fs/ext2.c: Likewise.
	* fs/fat.c: Likewise.
	* include/pupa/boot.h: Likewise.
	* include/pupa/device.h: Likewise.
	* include/pupa/disk.h: Likewise.
	* include/pupa/dl.h: Likewise.
	* include/pupa/elf.h: Likewise.
	* include/pupa/err.h: Likewise.
	* include/pupa/file.h: Likewise.
	* include/pupa/font.h: Likewise.
	* include/pupa/fs.h: Likewise.
	* include/pupa/kernel.h: Likewise.
	* include/pupa/loader.h: Likewise.
	* include/pupa/misc.h: Likewise.
	* include/pupa/mm.h: Likewise.
	* include/pupa/net.h: Likewise.
	* include/pupa/normal.h: Likewise.
	* include/pupa/rescue.h: Likewise.
	* include/pupa/setjmp.h: Likewise.
	* include/pupa/symbol.h: Likewise.
	* include/pupa/term.h: Likewise.
	* include/pupa/types.h: Likewise.
	* include/pupa/i386/setjmp.h: Likewise.
	* include/pupa/i386/types.h: Likewise.
	* include/pupa/i386/pc/biosdisk.h: Likewise.
	* include/pupa/i386/pc/boot.h: Likewise.
	* include/pupa/i386/pc/console.h: Likewise.
	* include/pupa/i386/pc/init.h: Likewise.
	* include/pupa/i386/pc/kernel.h: Likewise.
	* include/pupa/i386/pc/linux.h: Likewise.
	* include/pupa/i386/pc/loader.h: Likewise.
	* include/pupa/i386/pc/memory.h: Likewise.
	* include/pupa/i386/pc/multiboot.h: Likewise.
	* include/pupa/i386/pc/partition.h: Likewise.
	* include/pupa/i386/pc/time.h: Likewise.
	* include/pupa/i386/pc/vga.h: Likewise.
	* include/pupa/i386/pc/util/biosdisk.h: Likewise.
	* include/pupa/util/getroot.h: Likewise.
	* include/pupa/util/misc.h: Likewise.
	* include/pupa/util/resolve.h: Likewise.
	* kern/device.c: Likewise.
	* kern/disk.c: Likewise.
	* kern/dl.c: Likewise.
	* kern/err.c: Likewise.
	* kern/file.c: Likewise.
	* kern/fs.c: Likewise.
	* kern/loader.c: Likewise.
	* kern/main.c: Likewise.
	* kern/misc.c: Likewise.
	* kern/mm.c: Likewise.
	* kern/rescue.c: Likewise.
	* kern/term.c: Likewise.
	* kern/i386/dl.c: Likewise.
	* kern/i386/pc/init.c: Likewise.
	* kern/i386/pc/lzo1x.S: Likewise.
	* kern/i386/pc/startup.S: Likewise.
	* loader/i386/pc/chainloader.c: Likewise.
	* loader/i386/pc/linux.c: Likewise.
	* loader/i386/pc/multiboot.c: Likewise.
	* normal/cmdline.c: Likewise.
	* normal/command.c: Likewise.
	* normal/main.c: Likewise.
	* normal/menu.c: Likewise.
	* normal/i386/setjmp.S: Likewise.
	* term/i386/pc/console.c: Likewise.
	* term/i386/pc/vga.c: Likewise.
	* util/console.c: Likewise.
	* util/genmoddep.c: Likewise.
	* util/misc.c: Likewise.
	* util/pupa-emu.c: Likewise.
	* util/resolve.c: Likewise.
	* util/unifont2pff.rb: Likewise.
	* util/i386/pc/biosdisk.c: Likewise.
	* util/i386/pc/getroot.c: Likewise.
	* util/i386/pc/pupa-mkimage.c: Likewise.
	* util/i386/pc/pupa-setup.c: Likewise.
2004-02-24 17:21:53 +00:00
marco_g
8e72a9c0e3 2003-11-12 Marco Gerards <metgerards@student.han.nl>
* disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
	for available extensions.

	* include/pupa/i386/pc/time.h: New file.
	* kern/disk.c: Include <pupa/machine/time.h>.
	(PUPA_CACHE_TIMEOUT): New macro.
	(pupa_last_time): New variable.
	(pupa_disk_open): Flush the cache when there was a timeout.
	(pupa_disk_close): Reset the timer.
	* kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
	pupa_currticks.
	* util/misc.c: Include <sys/times.h>
	(pupa_get_rtc): New function.
2003-11-12 20:33:52 +00:00
okuji
1cc73a62da 2003-01-03 Yoshinori K. Okuji <okuji@enbug.org>
* include/i386/pc/util/biosdisk.h: New file.
	* util/i386/pc/biosdisk.c: Likewise.
	* util/i386/pc/pupa-setup.c: Likewise.

	* Makefile.in (INCLUDE_DISTFILES): Added
	include/pupa/i386/pc/util/biosdisk.h.
	(UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
	directory util/i386/pc.
	(install-local): Added a rule for sbin_UTILITIES.
	(uninstall): Likewise.

	* util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.

	* util/misc.c (xrealloc): New function.
	(pupa_malloc): Likewise.
	(pupa_free): Likewise.
	(pupa_realloc): Likewise.
	(pupa_stop): Likewise.
	(pupa_putchar): Likewise.

	* kern/disk.c (pupa_disk_read): Prevent L from underflowing.

	* include/pupa/util/misc.h (xrealloc): Declared.

	* include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
	macro.
	(PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
	(PUPA_BOOT_MACHINE_BPB_END): ... this.

	* include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
	[PUPA_UTIL] (pupa_fat_fini): Likewise.

	* fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
	way should be implemented.
	[PUPA_UTIL] (pupa_fat_fini): Likewise.

	* disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
	the size of NAME for safety.
	(pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
	0x88.

	* conf/i386-pc.rmk (sbin_UTILITIES): New variable.
	(pupa_setup_SOURCES): Likewise.

	* genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
2003-01-02 20:12:33 +00:00
okuji
6a161fa938 Initial revision 2002-12-27 08:53:07 +00:00