Commit Graph
100 Commits
Author SHA1 Message Date
Vladimir 'phcoder' Serbinenko 853231bc06 merge mainline into newreloc 2010-08-29 17:24:00 +02:00
Vladimir 'phcoder' Serbinenko 3626810e53 * grub-core/kern/misc.c (grub_real_dprintf): Always refresh after
dprintf.
2010-08-29 17:17:52 +02:00
Vladimir 'phcoder' Serbinenko 506e4d1e7f Use kseg0 entry address on mips 2010-08-29 15:45:21 +02:00
Vladimir 'phcoder' Serbinenko 6d387bafaf Fix compilation on yeeloong 2010-08-29 13:45:36 +02:00
Vladimir 'phcoder' Serbinenko a30f510eac newreloc documentation upgrade 2010-08-29 02:29:14 +02:00
Vladimir 'phcoder' Serbinenko 303f59958e Disable kfreebsd bootcheck on qemu and multiboot 2010-08-29 02:29:01 +02:00
Vladimir 'phcoder' Serbinenko 5d9bdcf167 Fix x86_64-efi compilation error 2010-08-29 02:28:15 +02:00
Vladimir 'phcoder' Serbinenko f5c1e402d3 enable grub-mkrescue on i386-multiboot 2010-08-29 01:26:48 +02:00
Vladimir 'phcoder' Serbinenko 6f8157cb89 Fix qemu compilation 2010-08-29 00:53:09 +02:00
Vladimir 'phcoder' Serbinenko f0b05761f4 fix multiboot compilation 2010-08-29 00:46:36 +02:00
Vladimir 'phcoder' Serbinenko 5dc598851f Document newreloc 2010-08-29 00:21:16 +02:00
Vladimir 'phcoder' Serbinenko 02a16ba94c Disable some bootcheck on some platforms 2010-08-29 00:21:02 +02:00
Vladimir 'phcoder' Serbinenko 5407820787 Adjust kfreebsd.cfg for EFI 2010-08-29 00:20:22 +02:00
Vladimir 'phcoder' Serbinenko 04a0a4cdf4 Fix a bug in memory allocation 2010-08-29 00:19:13 +02:00
Vladimir 'phcoder' Serbinenko 328951ac24 Add safety checks in relocator and add a GRUB_MM_CHECK macro 2010-08-28 21:27:10 +02:00
Vladimir 'phcoder' Serbinenko c6785a2380 Don't allocate relocator twice when loading aout 2010-08-28 21:25:35 +02:00
Vladimir 'phcoder' Serbinenko 197eb519e5 Remove leftover _printf 2010-08-28 19:27:30 +02:00
Vladimir 'phcoder' Serbinenko 4a842991db simplify normal/term.c and fix mismerge 2010-08-28 17:33:32 +02:00
Vladimir 'phcoder' Serbinenko 9b1cb542db Rename test kernels 2010-08-28 16:51:36 +02:00
Vladimir 'phcoder' Serbinenko 9bd44ab21a kfreebsd-aout bootchecks 2010-08-28 16:21:45 +02:00
Vladimir 'phcoder' Serbinenko 0101a723ce ntldr bootcheck 2010-08-28 16:05:20 +02:00
Vladimir 'phcoder' Serbinenko c5c8cf354c merge mainline into newreloc 2010-08-28 16:04:32 +02:00
Vladimir 'phcoder' Serbinenko 902f75f645 * grub-core/normal/term.c (print_more): Fix a memory leak.
(grub_puts_terminal): Revert to dumb puts if memory allocation fails.
	(grub_xputs_normal): Likewise.
2010-08-28 15:39:34 +02:00
Vladimir 'phcoder' Serbinenko 3c7079670d * grub-core/script/lexer.c (grub_script_lexer_init): Don't look before
the begining of the string
2010-08-28 15:35:43 +02:00
Vladimir 'phcoder' Serbinenko 2053cc077b * grub-core/script/script.c (grub_script_parse): Free parsed on
failure.
2010-08-28 15:34:29 +02:00
Vladimir 'phcoder' Serbinenko 46422ebf1a * grub-core/normal/completion.c (grub_normal_do_completion): Free argv
on failure.
2010-08-28 15:31:21 +02:00
Vladimir 'phcoder' Serbinenko 9e0fa3f606 * grub-core/normal/cmdline.c (grub_cmdline_get): Free cl_terms on
return.
2010-08-28 15:29:44 +02:00
Vladimir 'phcoder' Serbinenko 3393cf16d6 * grub-core/term/gfxterm.c (grub_gfxterm_term_fini): Free the text buffer.
(scroll_up): Fix a memory leak.
2010-08-28 15:28:08 +02:00
Vladimir 'phcoder' Serbinenko b17540cbd9 * grub-core/fs/nilfs2.c (grub_nilfs2_load_sb): Handle grub_disk_read
errors.
2010-08-28 15:25:12 +02:00
Vladimir 'phcoder' Serbinenko 8e4ac346e8 OpenBSD64 bootcheck 2010-08-28 15:05:26 +02:00
Vladimir 'phcoder' Serbinenko 4fc95be2e7 fix grub-emu compilation 2010-08-28 14:52:25 +02:00
Vladimir 'phcoder' Serbinenko 0f6a963e9b kOpenBSD bootcheck 2010-08-28 14:51:54 +02:00
Vladimir 'phcoder' Serbinenko dcc953eecb Fallback to dumb printf if malloc failes 2010-08-28 11:35:02 +02:00
Vladimir 'phcoder' Serbinenko d1dce5d356 Add DEBUG_RELOCATOR parts 2010-08-28 11:34:33 +02:00
Vladimir 'phcoder' Serbinenko 4aa5499064 Prevent deadloop in term.c in case of out-of-memory 2010-08-28 11:34:05 +02:00
Vladimir 'phcoder' Serbinenko 4619710a05 Don't try to malloc if grub_mm_base is 0 2010-08-28 11:32:49 +02:00
Vladimir 'phcoder' Serbinenko dc1bff761f Simplify knetbsd bootcheck by using specfile 2010-08-28 03:17:59 +02:00
Vladimir 'phcoder' Serbinenko e95616a173 REmove leftover declaration 2010-08-28 03:17:07 +02:00
Vladimir 'phcoder' Serbinenko 671404469c Handle USB pendrives exposed as floppies.
* grub-core/boot/i386/pc/boot.S: Check LBA even on what appears to be
	floppy.
	* grub-core/disk/i386/pc/biosdisk.c (grub_biosdisk_open): Likewise.
	Check for partitions on all devices.
2010-08-27 03:44:55 +02:00
Vladimir 'phcoder' Serbinenko ecde61b490 openbsd ramdisk support 2010-08-26 02:46:30 +02:00
Vladimir 'phcoder' Serbinenko 72d14db9ba merge mainline into newreloc 2010-08-25 22:34:59 +02:00
Vladimir 'phcoder' Serbinenko 8218d8b6e8 Fix efiemu compilation on ieee1275 2010-08-25 22:34:15 +02:00
Vladimir 'phcoder' Serbinenko e35e46fce1 * grub-core/term/ieee1275/ofconsole.c (put): Correct prototype.
(readkey): Likewise.
2010-08-25 22:32:17 +02:00
Vladimir 'phcoder' Serbinenko e8ea4b8424 pc-chainloader bootcheck 2010-08-25 21:55:48 +02:00
Vladimir 'phcoder' Serbinenko 89e07694dc Remove grub_dl_unload_all. It's unnecessary and causes trouble 2010-08-25 21:19:45 +02:00
Vladimir 'phcoder' Serbinenko 1e82303f1d multiboot and multiboot2 bootchecks 2010-08-25 20:34:07 +02:00
Vladimir 'phcoder' Serbinenko 5ad6967b19 Enable boottests 2010-08-25 16:59:11 +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 262d4a94a0 Add mips multiboot2 mbi address calculation 2010-08-25 02:15:21 +02:00
Vladimir 'phcoder' Serbinenko ffadea42bb Fix non-loading of BSS 2010-08-24 19:33:08 +02:00
Vladimir 'phcoder' Serbinenko 79f8b757ce fix multiboot compilation 2010-08-24 08:57:53 +02:00
Vladimir 'phcoder' Serbinenko a797a26ee8 Unify and macroify some code in x86 relocators 2010-08-24 08:57:18 +02:00
Vladimir 'phcoder' Serbinenko 0677694455 * term/at_keyboard.c (grub_at_keyboard_getkey_noblock): Don't discard
a key after CapsLock or NumLock. It's just a qemu bug.
2010-08-22 17:10:39 +02:00
Vladimir 'phcoder' Serbinenko df26241939 * include/grub/usb.h (grub_usb_device): Add 'data' field back. It's
needed by libusb wrapper.
2010-08-21 02:09:16 +02:00
Vladimir 'phcoder' Serbinenko dee5057594 * loader/multiboot.c (grub_cmd_module): Don't unzip module if
--nounzip is passed.
2010-08-21 00:57:12 +02:00
Vladimir 'phcoder' Serbinenko 05a765c88b USB hotunplugging and USB serial support.
* bus/usb/ohci.c (grub_ohci_transfer): Fill *actual and respect timeout.
	* bus/usb/uhci.c (grub_free_queue): Compute *actual.
	(grub_uhci_transfer): Respect timeout and set *actual.
	* bus/usb/usb.c (grub_usb_device_initialize): Correctly skip fields of
	non-standard length.
	(grub_usb_device_attach): Autoload modules.
	(GRUB_MOD_INIT): Set grub_term_poll_usb.
	(GRUB_MOD_FINI): Unset grub_term_poll_usb.
	* bus/usb/usbhub.c (grub_usb_hub): Replace speed with devices. All
	users updated.
	(grub_usb_add_hub): Fill nports and children.
	(attach_root_port): Receive hub instead of controller.
	All users updated. Fill hub->devices.
	(grub_usb_root_hub): Allocate hub->devices.
	(detach_device): New function.
	(poll_nonroot_hub): Fill children and detach devices.
	* bus/usb/usbtrans.c (grub_usb_bulk_readwrite): Accept timeout and
	actual arguments. All users updated.
	(grub_usb_bulk_read_extended): New function.
	* bus/usb/serial/common.c: New file.
	* bus/usb/serial/ftdi.c: Likewise.
	* bus/usb/serial/pl2303.c: Likewise.
	* commands/terminal.c (handle_command): Support wildcard.
	* commands/usbtest.c: Output "Unknown" instead of empty string.
	* conf/any-emu.rmk (pkglib_MODULES): Add usbserial_common.mod.
	(usbserial_common_mod_SOURCES): New variable.
	(usbserial_common_mod_CFLAGS): Likewise.
	(usbserial_common_mod_LDFLAGS): Likewise.
	(pkglib_MODULES): Add usbserial_pl2303.mod.
	(usbserial_pl2303_mod_SOURCES): New variable.
	(usbserial_pl2303_mod_CFLAGS): Likewise.
	(usbserial_pl2303_mod_LDFLAGS): Likewise.
	(pkglib_MODULES): Add usbserial_ftdi.mod.
	(usbserial_ftdi_mod_SOURCES): New variable.
	(usbserial_ftdi_mod_CFLAGS): Likewise.
	(usbserial_ftdi_mod_LDFLAGS): Likewise.
	(pkglib_MODULES): Add serial.mod.
	(serial_mod_SOURCES): New variable.
	(serial_mod_CFLAGS): Likewise.
	(serial_mod_LDFLAGS): Likewise.
	* conf/i386-pc.rmk: Likewise.
	* conf/mips-yeeloong.rmk: Likewise.
	* conf/i386.rmk (serial_mod_SOURCES): Add term/ns8250.c.
	* conf/mips-yeeloong.rmk (kernel_img_SOURCES): Likewise.
	* disk/usbms.c (first_available_slot): New variable.
	(grub_usbms_attach): Don't reuse free slots due to potential cache
	problems.
	* include/grub/serial.h: Moved to ..
	* include/grub/ns8250.h: ...this.
	* include/grub/serial.h: New file.
	* include/grub/term.h (grub_term_poll_usb): New variable.
	* include/grub/terminfo.h (grub_terminfo_input_state): Pass term to
	readkey. All users updated.
	(grub_terminfo_output_state): Pass term to put.
	* include/grub/usb.h (GRUB_USB_REQTYPE): New enum.
	(grub_usb_controller_dev): Add timeout and actual arguments to
	transfer. All users updated.
	(grub_usb_interface): New field detach_data.
	(grub_usb_device): New fields children and nports.
	(grub_usb_ep_type_t): New type.
	(grub_usb_get_ep_type): New function.
	(grub_usb_bulk_read_extended): Likewise.
	* include/grub/usbdesc.h (grub_usb_desc): New type.
	* include/grub/usbserial.h: New file.
	* include/grub/usbtrans.h (grub_usb_transaction): New field preceding.
	* kern/term.c (grub_term_poll_usb): New variable.
	(grub_getkey): Call grub_term_poll_usb if set.
	(grub_checkkey): Likewise.
	(grub_getkeystatus): Likewise.
	* term/serial.c: Moved controller-specific parts to ...
	* term/ns8250.c: ... here.
	* term/serial.c: Mostly rewritten.
	* term/usb_keyboard.c: Reorganised to use GET_REPORT only on attaching
	according to spec.
2010-08-20 21:34:52 +02:00
Vladimir 'phcoder' Serbinenko d6f66ca2a0 Export serial-related functions from kernel 2010-08-20 21:31:33 +02:00
Vladimir 'phcoder' Serbinenko fb1d7b7975 Add ChangeLog 2010-08-20 21:26:27 +02:00
Vladimir 'phcoder' Serbinenko 41e46ae648 Enable usbserial on yeeloong 2010-08-20 21:26:04 +02:00
Vladimir 'phcoder' Serbinenko 1420c1d54a Remove unused buffer0 2010-08-20 21:25:20 +02:00
Vladimir 'phcoder' Serbinenko ccedc09bc7 Make HID found dprintf instead of printf 2010-08-20 20:26:57 +02:00
Vladimir 'phcoder' Serbinenko 8161b08687 Merge mainline into usb 2010-08-20 20:12:26 +02:00
Vladimir 'phcoder' Serbinenko 2823526d28 Acount for transfer->size being size-1 when counting *actual 2010-08-20 19:54:40 +02:00
Vladimir 'phcoder' Serbinenko 52d8255d20 Support hot unplugging 2010-08-20 19:34:29 +02:00
Vladimir 'phcoder' Serbinenko 60c1ffdfdc Fix OHCI error message 2010-08-20 19:33:44 +02:00
Vladimir 'phcoder' Serbinenko 24582ab39b Correct *actual counting in OHCI 2010-08-20 16:56:03 +02:00
Vladimir 'phcoder' Serbinenko 15bd1f9ccf Don't update status on 0 message 2010-08-20 16:49:24 +02:00
Vladimir 'phcoder' Serbinenko 9ba74de61a Scan descriptor rather than elying on hardcoded endpoint number 2010-08-20 16:34:34 +02:00
Vladimir 'phcoder' Serbinenko a17e3c978b Use GetReport only at initialisation as specified in the USBHID spec 2010-08-20 14:36:29 +02:00
Vladimir 'phcoder' Serbinenko 537f375321 Fix control msg type 2010-08-20 12:22:23 +02:00
Vladimir 'phcoder' Serbinenko b4ece5e11e Implement sendkey support.
* commands/i386/pc/sendkey.c: New file.
	* conf/i386-pc.rmk (pkglib_MODULES): Add sendkey.mod.
	(sendkey_mod_SOURCES): New variable.
	(sendkey_mod_CFLAGS): Likewise.
	(sendkey_mod_LDFLAGS): Likewise.
2010-08-19 21:03:14 +02:00
Vladimir 'phcoder' Serbinenko d04b9414a8 * kern/i386/qemu/init.c (grub_qemu_init_cirrus): Fix compilation error. 2010-08-11 04:25:56 +02:00
Vladimir 'phcoder' Serbinenko f947ab49b0 Remove the dump of sm712 initialisation sequence.
* include/grub/pci.h (GRUB_PCI_CLASS_SUBCLASS_VGA): New const.
	* include/grub/vga.h (GRUB_VGA_IO_ARX_READ): New register.
	(GRUB_VGA_IO_MISC_WRITE): Likewise.
	(GRUB_VGA_CR_*): Added many registers.
	(GRUB_VGA_SR_*): Likewise.
	(GRUB_VGA_GR_*): Likewise.
	(grub_vga_write_arx): New function.
	(grub_video_hw_config): New struct.
	(grub_vga_set_geometry): New function.
	* kern/i386/qemu/init.c (load_palette): Use grub_vga_write_arx and
	GRUB_PCI_CLASS_SUBCLASS_VGA.
	* video/cirrus.c (grub_video_cirrus_setup): Use grub_vga_set_geometry.
	* video/sm712.c (grub_sm712_write_reg): New function
	(grub_sm712_read_reg): Likewise.
	(grub_sm712_sr_write): Likewise.
	(grub_sm712_gr_write): Likewise.
	(grub_sm712_cr_write): Likewise.
	(grub_sm712_write_arx): Likewise.
	(grub_sm712_cr_shadow_write): Likewise.
	(grub_sm712_write_dda_lookup): Likewise.
	(grub_video_sm712_setup): Initialise the video rather then
	blindly replay the dump.
	(main) [TEST]: Add a routine to be able to compile as standalone for
	tests.
	* video/sm712_init.c (sm712_init): Removed.
	(sm712_sr_seq1): New array.
	(sm712_sr_seq2): Likewise.
2010-08-11 04:18:07 +02:00
Vladimir 'phcoder' Serbinenko f0206638bf * include/grub/vga.h: Add missing grub/pci.h include. 2010-08-11 04:00:06 +02:00
Vladimir 'phcoder' Serbinenko cf0c775ed4 * include/grub/vga.h (grub_vga_gr_write): Add GRUB_MACHINE_PCI_IO_BASE.
(grub_vga_gr_read): Likewise.
	(grub_vga_cr_write): Likewise.
	(grub_vga_cr_read): Likewise.
	(grub_vga_sr_write): Likewise.
	(grub_vga_sr_read): Likewise.
	(grub_vga_palette_read): Likewise.
	(grub_vga_palette_write): Likewise.
	* video/sm712.c (GRUB_SM712_REG_BASE): New definition.
	(grub_sm712_sr_read): New function.
	(grub_video_sm712_setup): Use grub_vga_sr_write and grub_sm712_sr_read.
	* video/sm712_init.c (sm712_init): Substract GRUB_MACHINE_PCI_IO_BASE.
2010-08-10 13:43:43 +02:00
Vladimir 'phcoder' Serbinenko 9c98ae8911 Skip non-boot usb_keyboard interface 2010-08-01 23:08:33 +02:00
Vladimir 'phcoder' Serbinenko 443a6c4b21 Skip unexpected descriptors 2010-08-01 23:08:03 +02:00
Vladimir 'phcoder' Serbinenko fafc23e90a merge mainline into usb 2010-08-01 21:23:18 +02:00
Vladimir 'phcoder' Serbinenko 553df63d76 * lib/arg.c (grub_arg_show_help): Add the necessary spacing. 2010-08-01 21:01:05 +02:00
Vladimir 'phcoder' Serbinenko 8687cf071e * kern/emu/getroot.c (find_mount_point_from_dir): Compile only if
[HAVE_LIBZFS && HAVE_LIBNVPAIR]
2010-08-01 16:11:27 +02:00
Vladimir Serbinenko 7decd202a7 * kern/misc.c (grub_memset): Optimise to reduce cache stalls.
Also-By: Colin Watson <cjwatson@ubuntu.com>
2010-08-01 09:44:36 -05:00
Vladimir 'phcoder' Serbinenko 463711215f * util/ieee1275/grub-install.in: Don't use empty grub_device.
Reported by: Lennart Sorensen.
2010-07-28 18:25:48 +03:00
Vladimir 'phcoder' Serbinenko 0ac33bf5eb * util/grub.d/00_header.in: Remove compatibility with terminal.mod
prior to terminal_input/terminal_output separation. It's been over 1.5
	years and those versions weren't widely deployed.
2010-07-21 06:44:38 +02:00
Vladimir 'phcoder' Serbinenko 5e3bec6716 * tests/util/grub-shell-tester.in: Remove bashism and declare as
sh script.
2010-07-20 22:10:23 +02:00
Vladimir 'phcoder' Serbinenko afaec079d1 * disk/loopback.c (grub_loopback): Replace filename with file.
(delete_loopback): Handle new semantics.
	(grub_cmd_loopback): Likewise.
	(grub_loopback_iterate): Likewise.
	(grub_loopback_close): Likewise.
2010-07-20 21:56:00 +02:00
Vladimir 'phcoder' Serbinenko a6a11f3cac * util/i386/efi/grub-install.in: Revert to platform-specific behaviour
with -p "".
	Reported by: Tito Keitel.
2010-07-20 20:36:11 +02:00
Vladimir 'phcoder' Serbinenko 64a638b0d9 * docs/grub.texi (Naming convention): Document new naming convention. 2010-07-20 20:22:52 +02:00
Vladimir 'phcoder' Serbinenko 39d824e8f9 * commands/acpi.c (setup_common_tables): Use sizeof instead of
hardcoding size.
	(setv1table): Likewise.
2010-07-20 14:42:32 +02:00
Vladimir 'phcoder' Serbinenko 34787305df Allow psartial transfers and use them for usbserial 2010-07-19 08:43:01 +02:00
Vladimir 'phcoder' Serbinenko 824e1447ac Use generic description of HID endpoints 2010-07-19 00:13:06 +02:00
Vladimir 'phcoder' Serbinenko ac2534273b fix losing pl2303 input at the price of losing some input bytes sometimes. 2010-07-19 00:12:59 +02:00
Vladimir 'phcoder' Serbinenko 9685412782 PL2303 works and is configurable. But sometime input is lost 2010-07-18 23:12:08 +02:00
Vladimir 'phcoder' Serbinenko 9edd681bbc Somewhat working although a lot of hardcoding pl2303 2010-07-18 21:36:00 +02:00
Vladimir 'phcoder' Serbinenko d556277751 Add possibility of bulk reading with short timeout 2010-07-18 21:35:22 +02:00
Vladimir 'phcoder' Serbinenko aa86530e38 enable usbserial on grub-emu 2010-07-18 19:11:09 +02:00
Vladimir 'phcoder' Serbinenko a531fd134d Split common usbserial function. PL2303 skeleton 2010-07-18 19:10:57 +02:00
Vladimir 'phcoder' Serbinenko 44e7b8cb49 account for absence of NS8250 on emu 2010-07-18 19:09:54 +02:00
Vladimir 'phcoder' Serbinenko 24494d478a Add fini routines for usbserial and rename grub_usbserial to grub_ftdi 2010-07-18 17:40:42 +02:00
Vladimir 'phcoder' Serbinenko dd20a7868b Rename usbserial to usbserial_ftdi 2010-07-18 16:31:42 +02:00
Vladimir 'phcoder' Serbinenko fd5b663793 Configure word length 2010-07-18 15:07:59 +02:00