Commit graph

7001 commits

Author SHA1 Message Date
Vladimir 'phcoder' Serbinenko
1fa097dc98 * docs/grub.texi: Fix search syntax.
(Multi-boot manual config): Put msdos rather than GPT example.
	Grammar corrections.
2012-06-23 10:55:14 +02:00
Vladimir 'phcoder' Serbinenko
c890ba78ca * docs/grub.texi (Multi-boot manual config): Use --set. Improve remark. 2012-06-23 00:55:25 +02:00
Vladimir 'phcoder' Serbinenko
0f92dca7ef * grub-core/kern/mm.c (grub_free): Fix agglomerating of free regions. 2012-06-23 00:39:10 +02:00
Vladimir 'phcoder' Serbinenko
3988c4a09f * grub-core/kern/mm.c (get_header_from_pointer): Put a more informative
message on double free. Put the value of magic in case of mismatch.
2012-06-22 23:54:43 +02:00
Vladimir 'phcoder' Serbinenko
9e86d4c59a Speed-up video on yeeloong.
* grub-core/video/sm712.c (framebuffer): Remove render_target and
	add cached_ptr.
	(grub_video_sm712_video_fini): Unmap cached_ptr.
	(grub_video_sm712_setup): Use cache address and grub_video_fb_setup.
	(grub_video_sm712_set_active_render_target): Removed.
	(grub_video_adapter): Use grub_video_fb_set_active_render_target.
	(grub_video_sm712_swap_buffers): Call grub_video_fb_swap_buffers and
	sync caches.
2012-06-22 23:47:34 +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
d1718e7d2b * util/getroot.c (grub_find_root_devices_from_mountinfo): Handle btrfs
subvolumes.
2012-06-22 22:11:23 +02:00
Vladimir 'phcoder' Serbinenko
982f1909cf Implement flow control for http.
* grub-core/net/http.c (parse_line): Handle response 206.
	(http_receive): Stall if too many packets are in the queue.
	(http_establish): Fix range header.
	(http_seek): Fix double free.
	(http_close): Likewise.
	(http_packets_pulled): New function.
	(grub_http_protocol): Set http_seek
	* grub-core/net/tcp.c (grub_net_tcp_socket): New field `i_stall'.
	(ack_real): Set window depending on i_stall.
	(grub_net_send_tcp_packet): Likewise.
	(grub_net_tcp_stall): New function.
	(grub_net_tcp_unstall): Likewise.
	* include/grub/net/tcp.h (grub_net_tcp_stall): New proto.
	(grub_net_tcp_unstall): Likewise.
2012-06-22 22:09:31 +02:00
Vladimir 'phcoder' Serbinenko
bd407d6e5e * grub-core/net/tftp.c: Decrease stall to 50 packets. 2012-06-22 22:04:16 +02:00
Vladimir 'phcoder' Serbinenko
c7564b8e13 * grub-core/net/net.c (grub_net_fs_open): Free resources on failed open. 2012-06-22 22:02:47 +02:00
Vladimir 'phcoder' Serbinenko
a370616293 * tests/util/grub-shell.in: Fix a typo. 2012-06-22 21:59:10 +02:00
Vladimir 'phcoder' Serbinenko
b27069e06d Implement flow control for tftp.
* grub-core/net/net.c (receive_packets): Decrease the stop to 10
	packets but stop only if stop condition is satisfied.
	(grub_net_fs_read_real): Call packets_pulled after real read. Use
	`stall' instead of `eof' as stop condition.
	* grub-core/net/http.c (parse_line): Set `stall' on EOF.
	(http_err): Likewise.
	* grub-core/net/tftp.c (ack): Replace the first argument with data
	instead of socket.
	(tftp_receive): Stall if too many packets are in wait queue.
	(tftp_packets_pulled): New function.
	(grub_tftp_protocol): Set packets_pulled.
	* include/grub/net.h (grub_net_packets): New field count.
	(grub_net_put_packet): Increment count.
	(grub_net_remove_packet): Likewise.
	(grub_net_app_protocol): New field `packets_pulled'.
	(grub_net): New field `stall'.
2012-06-22 14:17:46 +02:00
Vladimir 'phcoder' Serbinenko
6b9cfac683 * grub-core/net/net.c (receive_packets): Stop after 100 packets to let
sync part to handle them.
2012-06-22 12:42:31 +02:00
Vladimir 'phcoder' Serbinenko
f35abd8190 * grub-core/kern/main.c (grub_set_prefix_and_root): Fix memory leak.
* grub-core/net/drivers/ieee1275/ofnet.c
	(grub_ieee1275_net_config_real): Likewise.
2012-06-22 11:51:48 +02:00
Vladimir 'phcoder' Serbinenko
0e7ec82034 * grub-core/net/bootp.c (grub_net_configure_by_dhcp_ack): Don't create
the direct route for server/gateway.
2012-06-21 22:20:57 +02:00
Vladimir 'phcoder' Serbinenko
9d611a318d * grub-core/net/bootp.c (grub_net_configure_by_dhcp_ack): Prefer
IP address to server name since we may not hame the DNS.
2012-06-21 22:15:10 +02:00
Vladimir 'phcoder' Serbinenko
418f45abd1 * grub-core/net/dns.c (grub_cmd_nslookup): Init addresses to 0 to avoid
freeing random buffer on failure.
	* grub-core/net/net.c (grub_net_resolve_address): Likewise.
2012-06-21 22:11:47 +02:00
Vladimir 'phcoder' Serbinenko
44a0efc180 * grub-core/net/bootp.c (grub_cmd_bootp): Fix packet allocation size. 2012-06-21 22:08:33 +02:00
Vladimir 'phcoder' Serbinenko
531e2241a6 * grub-core/net/drivers/emu/emunet.c (get_card_packet): Allocate the
reserved bytes.
	* grub-core/net/drivers/i386/pc/pxe.c (grub_pxe_recv): Likewise.
	* grub-core/net/drivers/ieee1275/ofnet.c (get_card_packet): Likewise.
	Handle malloc error correctly.
2012-06-21 22:05:41 +02:00
Vladimir 'phcoder' Serbinenko
cde393c9a3 * grub-core/script/execute.c (grub_script_arglist_to_argv): Escape
blocks.
2012-06-21 22:02:09 +02:00
Vladimir 'phcoder' Serbinenko
538478d082 * grub-core/disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Fix double
increment.
2012-06-21 21:59:52 +02:00
Vladimir 'phcoder' Serbinenko
9b55efe09a * grub-core/net/dns.c (grub_cmd_nslookup): Use configured DNS servers if
none is explicitly specified.
2012-06-21 00:14:51 +02:00
Vladimir 'phcoder' Serbinenko
9eb832c365 * grub-core/net/dns.c (grub_net_add_dns_server): Don't erase old servers
while reallocating.
2012-06-20 23:51:56 +02:00
Vladimir 'phcoder' Serbinenko
d6b7c7c986 Respect netmask from bootp/dhcp.
* grub-core/net/bootp.c (parse_dhcp_vendor): Parse mask.
	(grub_net_configure_by_dhcp_ack): Use mask and grub_net_add_ipv4_local.
	* grub-core/net/net.c (grub_net_add_addr): Split creating local route
	into ...
	(grub_net_add_ipv4_local): ... this.
	(grub_cmd_addaddr): Use grub_net_add_ipv4_local.
	* include/grub/net.h (GRUB_NET_BOOTP_NETMASK): New enum value.
	(grub_net_add_ipv4_local): New proto.
2012-06-20 23:46:50 +02:00
Vladimir 'phcoder' Serbinenko
67caf9eb06 * grub-core/loader/i386/linux.c (grub_linux_boot): Setup video before
determining EFI memory map size.
2012-06-20 23:39:33 +02:00
Vladimir 'phcoder' Serbinenko
436575581e * grub-core/disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Escape commas. 2012-06-20 23:37:24 +02:00
Vladimir 'phcoder' Serbinenko
eb6d0dd3a1 * grub-core/kern/main.c (grub_set_prefix_and_root): Skip escaped commas
when looking for partition separator.
2012-06-20 23:33:34 +02:00
Vladimir 'phcoder' Serbinenko
3123054474 * grub-core/kern/ieee1275/openfw.c (grub_ieee1275_encode_devname):
Escape commas.
2012-06-20 23:31:59 +02:00
Vladimir 'phcoder' Serbinenko
918a25179c Restructure FAT driver to avoid hook in label reading as it hits a
GCC bug.

	* include/grub/err.h (grub_err_t): New enum value GRUB_ERR_EOF.
	* grub-core/fs/fat.c (grub_fat_iterate_context): New struct.
	(grub_fat_iterate_dir): Split into ...
	(grub_fat_iterate_init): ... this, ...
	(grub_fat_iterate_fini): ... this, ...
	(grub_fat_iterate_dir_next): ... and this. All users updated.
2012-06-20 23:29:28 +02:00
Vladimir 'phcoder' Serbinenko
9f1d654e67 * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): New enum value
GRUB_IEEE1275_FLAG_BROKEN_REPEAT.
	* grub-core/kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set
	GRUB_IEEE1275_FLAG_BROKEN_REPEAT on PowerBook3,3.
	* include/grub/terminfo.h (grub_terminfo_input_state) [__powerpc__]:
	New fields last_key and last_key_time.
	* grub-core/term/terminfo.c (grub_terminfo_getkey): Transform
	extended key-esc into extended key-extended key.
2012-06-20 22:19:26 +02:00
Vladimir 'phcoder' Serbinenko
52f0f64384 Avoid unnecessary memcpy of whole video buffer.
* grub-core/video/fb/video_fb.c (dirty): New struct.
	(framebuffer): Add members current_dirty and previous_dirty.
	(dirty): New function.
	(grub_video_fb_fill_rect): Update dirty.
	(common_blitter): Likewise.
	(grub_video_fb_scroll): Likewise.
	(doublebuf_blit_update_screen): Copy only dirty part.
	(doublebuf_pageflipping_update_screen): Likewise.
	(grub_video_fb_doublebuf_blit_init): Init dirty.
	(doublebuf_pageflipping_init): Likewise.
	(grub_video_fb_setup): Likewise.
2012-06-19 19:34:51 +02:00
Vladimir 'phcoder' Serbinenko
e169a1805f * grub-core/net/drivers/ieee1275/ofnet.c (search_net_devices): Decrease
poll rate.
2012-06-19 15:44:51 +02:00
Vladimir 'phcoder' Serbinenko
485568790c Fix wildcard regexp dot and other special characters handling.
Reported by: Robert Mabee.

	* grub-core/commands/wildcard.c (isregexop): Add "|+{}[]?".
	(make_regex): Escape "|+{}[]". Transform '?' to '.?'.
	(split_path): Trigger expansion on '?'.
	(unescape): New function.
	(wildcard_expand): Unescape parts copied without globbing.
	* grub-core/script/execute.c (wildcard_escape): Escape '?'.
	(grub_script_arglist_to_argv): Don't unescape expansions.
2012-06-19 14:13:19 +02:00
Vladimir 'phcoder' Serbinenko
0494408e7e * include/grub/net.h (grub_net_card): New member txbufsize.
* include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): New enum values
	GRUB_IEEE1275_FLAG_NO_OFNET_SUFFIX and
	GRUB_IEEE1275_FLAG_VIRT_TO_REAL_BROKEN.
	* grub-core/net/drivers/efi/efinet.c (grub_efinet_findcards): Use
	txbufsize.
	* grub-core/kern/ieee1275/cmain.c (grub_ieee1275_find_options): Use
	compatible property to check for macs. Set
	GRUB_IEEE1275_FLAG_NO_OFNET_SUFFIX and
	GRUB_IEEE1275_FLAG_VIRT_TO_REAL_BROKEN on macs.
	* grub-core/net/drivers/ieee1275/ofnet.c (card_open): Don't add suffix
	if GRUB_IEEE1275_FLAG_NO_OFNET_SUFFIX is set.
	(send_card_buffer): Use txbuf.
	(grub_ofnet_findcards): Allocate txbuf. Simplify code flow and move
	nested function out of the parent while on it.
2012-06-19 11:34:52 +02:00
Vladimir 'phcoder' Serbinenko
cc35fe8f31 * grub-core/net/drivers/ieee1275/ofnet.c (get_card_packet): Fix packet
presence check.
	(grub_ieee1275_net_config_real): Fix config pointer.
2012-06-19 11:25:37 +02:00
Vladimir 'phcoder' Serbinenko
970a0a09dd * grub-core/kern/ieee1275/openfw.c (grub_ieee1275_parse_args): Extend
filename parsing to non-block devices.
2012-06-19 11:23:13 +02:00
Vladimir 'phcoder' Serbinenko
3e19bf879f * grub-core/kern/device.c (grub_device_open): Remove dead code. 2012-06-19 11:20:34 +02:00
Vladimir 'phcoder' Serbinenko
c62d1a0c64 * include/grub/elf.h: Rename R_PPC to GRUB_R_PPC to avoid collisions.
All users updated.
2012-06-18 21:09:57 +02:00
Vladimir 'phcoder' Serbinenko
ef76bec332 * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Generate
UUID search command even if hints probing failed.
2012-06-18 21:07:26 +02:00
Vladimir 'phcoder' Serbinenko
555c786d62 * po/POTFILES.in: Regenerated. 2012-06-18 21:05:08 +02: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
10400f0b61 * docs/grub.texi (Multi-boot manual config): New section. 2012-06-16 00:32:59 +02:00
Vladimir 'phcoder' Serbinenko
ba67e2c635 Avoid slow read-back from VRAM.
* include/grub/video_fb.h (grub_video_fb_doublebuf_update_screen_t):
	Move from here ...
	* grub-core/video/fb/video_fb.c
	(grub_video_fb_doublebuf_update_screen_t): ... here. Remove arguments.
	* grub-core/video/fb/video_fb.c (framebuf_t): New type.
	(front_target): Remove front_target. Add pages.
	(grub_video_fb_init): Skip setting front_pages.
	(grub_video_fb_fini): Likewise.
	(doublebuf_blit_update_screen): Use pages.
	(grub_video_fb_doublebuf_blit_init): Likewise.
	(doublebuf_pageflipping_init): Allocate offscreen buffer.
	(doublebuf_pageflipping_update_screen): Use offscreen buffer.
	(grub_video_fb_setup): Prefer doublebuffing.
2012-06-15 23:57:20 +02:00
Vladimir 'phcoder' Serbinenko
377c98cba2 * grub-core/normal/main.c (GRUB_MOD_INIT): Ignore errors when loading
gzio.
2012-06-15 23:42:34 +02:00
Vladimir 'phcoder' Serbinenko
eac49cffc8 Add loongson tests.
* tests/util/grub-shell.in: Handle loongson.
	* tests/partmap_test.in: Add loongson to the list of platform using ATA
	drivers.
	* grub-core/tests/boot/linux.init-mips.S (SHUTDOWN_MAGIC3) [REBOOT]:
	Reboot instead of shutdown if REBOOT is defined.
2012-06-15 19:42:25 +02:00
Vladimir 'phcoder' Serbinenko
0321415e86 * grub-core/lib/mips/loongson/reboot.c (grub_reboot): Use 32-bit
sized ports since unlike on real hardware qemu supports only 32-bit
	regs.
2012-06-15 19:36:10 +02:00
Vladimir 'phcoder' Serbinenko
3f2bdd8f55 * Makefile.util.def (grub-mkrescue): Enable on loongson.
* util/grub-mkrescue.in: Handle loongson.
2012-06-15 18:35:11 +02:00
Vladimir 'phcoder' Serbinenko
29a049c98a * util/getroot.c (convert_system_partition_to_system_disk) [__APPLE__]:
Set is_part appropriately.
	(grub_util_biosdisk_get_grub_dev): Use is_part rather than comparing
	names. Canonicalize partition without full disk.
2012-06-14 19:16:30 +02:00
Vladimir 'phcoder' Serbinenko
4abde34671 Revert usb-quiesce since it's wrong.
* grub-core/disk/ieee1275/ofdisk.c (quiesce): Removed.
	(grub_ofdisk_init): Don't do quiesce.
2012-06-13 22:44:45 +02:00
Vladimir 'phcoder' Serbinenko
61f1d93b09 * grub-core/kern/ieee1275/cmain.c (grub_ieee1275_find_options): Apply
PowerMac workaround to Xserves as well.
	Information supplied by: Benjamin Herrenschmidt.
2012-06-13 01:38:40 +02:00