Commit Graph
100 Commits
Author SHA1 Message Date
Vladimir 'phcoder' Serbinenko 09206dc3d0 Macroify key constants 2010-08-22 23:56:41 +02:00
Vladimir 'phcoder' Serbinenko 5ea70ca5fa Support scancode set 2 2010-08-22 22:53:31 +02:00
Vladimir 'phcoder' Serbinenko efc3e75f4d Bump keylayouts version 2010-08-22 18:16:16 +02:00
Vladimir 'phcoder' Serbinenko f582367ecf Set the leds and drain the input buffer in at_keyboard initialisation 2010-08-22 18:15:27 +02:00
Vladimir 'phcoder' Serbinenko 6e05e7f0f8 Properly handle extended_pending 2010-08-22 17:44:03 +02:00
Vladimir 'phcoder' Serbinenko 59004db595 merge mainline into keylayouts 2010-08-22 17:12:27 +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 c32f26bce8 Make USB the main keylayout for simplicity 2010-08-22 16:06:09 +02:00
Vladimir 'phcoder' Serbinenko 49c822bc42 Support numpad 2010-08-22 02:17:14 +02:00
Vladimir 'phcoder' Serbinenko 96157c5378 Increase pre-repeat usb keyboad interval 2010-08-22 01:01:31 +02:00
Vladimir 'phcoder' Serbinenko c2994de134 Add back accidently removed mov 2010-08-22 00:57:04 +02:00
Vladimir 'phcoder' Serbinenko 7209c54e91 Set last_key to -1 at init time 2010-08-22 00:31:43 +02:00
Vladimir 'phcoder' Serbinenko 7e6975d7ea Support USB key repeat 2010-08-22 00:29:34 +02:00
Vladimir 'phcoder' Serbinenko ab247a453f Ignore keyboard errors and track numlock status 2010-08-22 00:01:21 +02:00
Vladimir 'phcoder' Serbinenko 524c2712ad merge usb into keylayouts 2010-08-21 23:17:44 +02:00
Vladimir 'phcoder' Serbinenko ff62c48f5a Use status change pipe for hub hotplug detection 2010-08-21 23:09:37 +02:00
Vladimir 'phcoder' Serbinenko f609c84a7f MAke an enum out of reqtype 2010-08-21 21:55:24 +02:00
Vladimir 'phcoder' Serbinenko 3593f89bf3 clear port status change afte polling it 2010-08-21 21:39:15 +02:00
Vladimir 'phcoder' Serbinenko b481fe847a really set controller_data in ohci 2010-08-21 20:54:20 +02:00
Vladimir 'phcoder' Serbinenko 5a2823c191 Give better debug message in usb_keyboard_checkkey 2010-08-21 19:42:31 +02:00
Vladimir 'phcoder' Serbinenko 0aaf4938c7 Fix incorrect toggle calculation 2010-08-21 19:41:37 +02:00
Vladimir 'phcoder' Serbinenko 2eb310be79 Enable usb device polling again 2010-08-21 18:24:09 +02:00
Vladimir 'phcoder' Serbinenko e959937cfd Use background transfers for usb_keyboard 2010-08-21 17:12:51 +02:00
Vladimir 'phcoder' Serbinenko 3ee4474e8d Prepare infrastructure for background USB transfers 2010-08-21 16:09:43 +02:00
Vladimir 'phcoder' Serbinenko bcfa613bc4 correctly pass interfno and don't use GetReport 2010-08-21 13:56:55 +02:00
Vladimir 'phcoder' Serbinenko 12cbb3ccd0 Don't retire active transaction on a NAK 2010-08-21 13:55:06 +02:00
Vladimir 'phcoder' Serbinenko d10d149667 Return USB_ERR_INTERNAL instead of grub_errno when appropriate 2010-08-21 13:54:10 +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 735e864757 Implement CapsLock 2010-08-21 00:29:57 +02:00
Vladimir 'phcoder' Serbinenko d9a8a9736e Add missing insert and \ codes 2010-08-21 00:05:39 +02:00
Vladimir 'phcoder' Serbinenko 0b335a9797 Fix cutting bits by implicit conversion to char 2010-08-20 23:33:41 +02:00
Vladimir 'phcoder' Serbinenko fea90138d5 merge mainline into keylayouts 2010-08-20 22:13:19 +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 8bb7e81637 Fix printf bug 2010-08-20 01:23:33 +02:00
Vladimir 'phcoder' Serbinenko 996469df82 Merge mainline into keylayouts 2010-08-19 21:32:36 +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 88e543b519 Add grub-kbdcomp 2010-08-19 20:48:31 +02:00
Vladimir 'phcoder' Serbinenko 9c9ec877cb Rename grub-mklayouts to grub-mklayout 2010-08-19 20:47:08 +02:00
Vladimir 'phcoder' Serbinenko 5a3e99b388 MAke grub-mklayouts do only one thing rather than doing all the piping 2010-08-19 20:43:40 +02:00
Vladimir 'phcoder' Serbinenko b175204119 Add missing keys to grub-mklayouts 2010-08-19 19:17:36 +02:00
Vladimir 'phcoder' Serbinenko b09634f027 Added missing values and indented USB table 2010-08-19 16:12:18 +02:00
Vladimir 'phcoder' Serbinenko 5ef4e08416 add usb keymap support 2010-08-19 15:32:43 +02:00
Vladimir 'phcoder' Serbinenko e55e09628d Hook AT keyboard mapping 2010-08-19 15:00:31 +02:00
Vladimir 'phcoder' Serbinenko ed19677fe3 Revert all parts done for BIOS keymap translation 2010-08-19 13:32:36 +02:00
Vladimir 'phcoder' Serbinenko eb628338db AltGr support 2010-08-19 11:44:49 +02:00
Vladimir 'phcoder' Serbinenko 7ea82054f5 Solve keypad-related issues 2010-08-19 04:13:32 +02:00
Vladimir 'phcoder' Serbinenko d90aa78482 KEyboard layout support 2010-08-19 02:57:05 +02:00
Vladimir 'phcoder' Serbinenko 2111447675 Add new flag SHIFT 2010-08-19 02:21:36 +02:00
Vladimir 'phcoder' Serbinenko 7a6459e12d support for Fn keys 2010-08-19 01:07:50 +02:00
Vladimir 'phcoder' Serbinenko 2cccf4b0c4 Merge mainline into keylayouts 2010-08-18 22:28:47 +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
Vladimir 'phcoder' Serbinenko 91d135a12c Support variable speed 2010-07-18 15:00:50 +02:00
Vladimir 'phcoder' Serbinenko 1da07b142b some serial config support 2010-07-18 14:43:23 +02:00
Vladimir 'phcoder' Serbinenko 8c8e269906 Encapsulate serial config in dedicated structure 2010-07-18 13:40:48 +02:00
Vladimir 'phcoder' Serbinenko 34364df689 usbserial basic support. Works in qemu 2010-07-18 12:53:35 +02:00
Vladimir 'phcoder' Serbinenko cbf41813b3 Don't check transaction active flag as it's not updated and creates problems for usbserial 2010-07-18 12:53:08 +02:00
Vladimir 'phcoder' Serbinenko 7b5502f30b Remove debug comment-out 2010-07-18 01:41:08 +02:00