Vladimir 'phcoder' Serbinenko
efa8640adb
* grub-core/bus/usb/usbhub.c: Fix recheck logic.
2013-07-11 14:52:46 +02:00
Vladimir 'phcoder' Serbinenko
96f33fed86
Make PCI init in i386-qemu port more robust.
2013-04-29 15:09:39 +02:00
Vladimir 'phcoder' Serbinenko
e2f27a8c53
Enforce disabling of firmware disk drivers when native drivers kick in.
2013-04-29 12:16:46 +02:00
Vladimir 'phcoder' Serbinenko
f7bf6c31f3
* grub-core/bus/usb/uhci.c: Fix DMA handling and enable on all PCI
...
platforms.
2013-04-29 12:05:19 +02:00
Vladimir 'phcoder' Serbinenko
d70dbab77a
* grub-core/bus/usb/ehci.c (grub_ehci_fini_hw): Ignore errors, not
...
much we can do about it anyway.
2013-04-12 20:51:11 +02:00
Aleš Nesrsta
51a4c3e3b0
Fix handling of split transfers.
2013-04-12 20:42:46 +02:00
Vladimir 'phcoder' Serbinenko
2cd5ce6cdb
* grub-core/bus/usb/usbtrans.c (grub_usb_bulk_readwrite_packetize):
...
Init err.
2013-04-04 08:56:45 +02:00
Vladimir 'phcoder' Serbinenko
8fe05def12
Slight improve in USB-related boot-time checkpoints.
2013-03-20 17:21:13 +01:00
Vladimir 'phcoder' Serbinenko
ef8810e9f3
Fix a conflict between ports structures with 2 controllers of
...
same kind.
2013-03-20 17:07:08 +01:00
Vladimir 'phcoder' Serbinenko
f6df57d216
Initialize USB ports in parallel to speed-up boot.
2013-03-19 23:06:44 +01:00
Vladimir 'phcoder' Serbinenko
d745dda77e
Fix USB devices not being detected when requested
...
due to delayed attach.
2013-03-19 20:35:21 +01:00
Vladimir 'phcoder' Serbinenko
e744219bb6
Implement boot time analysis framework.
2013-03-19 20:25:09 +01:00
Vladimir 'phcoder' Serbinenko
e5a2dd7b55
remove get_endpoint_descriptor and change all functions needing
...
descriptor to just receive it as argument rather than endpoint
address.
2013-03-19 11:19:36 +01:00
Vladimir 'phcoder' Serbinenko
5dd6f58789
Better estimate the maximum USB transfer size.
2013-03-19 08:17:51 +01:00
Vladimir 'phcoder' Serbinenko
66a93674b2
Implement USBDebug (full USB stack variant).
2013-02-01 21:49:29 +01:00
Vladimir 'phcoder' Serbinenko
cfe1288b8d
* grub-core/bus/usb/usb.c (grub_usb_device_attach): Add missing
...
grub_print_error.
2013-02-01 21:43:49 +01:00
Vladimir 'phcoder' Serbinenko
e42b99698c
* grub-core/bus/usb/serial/common.c (grub_usbserial_attach): Fix missing
...
zero-out of port structure.
2013-02-01 21:32:17 +01:00
Colin Watson
5fdbaed168
Remove nested functions from USB iterators.
...
* include/grub/usb.h (grub_usb_iterate_hook_t): New type.
(grub_usb_controller_iterate_hook_t): Likewise.
(grub_usb_iterate): Add hook_data argument.
(grub_usb_controller_iterate): Likewise.
(struct grub_usb_controller_dev.iterate): Likewise.
Update all implementations and callers.
2013-01-21 21:02:24 +00:00
Vladimir 'phcoder' Serbinenko
b879aa7b47
Split long USB transfers into short ones.
2013-01-20 22:45:53 +01:00
Colin Watson
ca3a74469a
Remove nested functions from PCI iterators.
...
* grub-core/bus/pci.c (grub_pci_iterate): Add hook_data argument,
passed to hook. Update all callers to pass appropriate hook data.
* grub-core/bus/emu/pci.c (grub_pci_iterate): Likewise.
* include/grub/pci.h (grub_pci_iteratefunc_t): Add data argument.
Remove NESTED_FUNC_ATTR from here and from all users.
(grub_pci_iterate): Update prototype.
* grub-core/bus/cs5536.c (grub_cs5536_find: hook): Make static
instead of nested. Rename to ...
(grub_cs5536_find_iter): ... this.
* grub-core/kern/efi/mm.c (stop_broadcom: find_card): Likewise.
* grub-core/kern/mips/loongson/init.c (init_pci: set_card):
Likewise.
* grub-core/kern/vga_init.c (grub_qemu_init_cirrus: find_card):
Likewise.
* grub-core/video/bochs.c (grub_video_bochs_setup: find_card):
Likewise.
* grub-core/video/cirrus.c (grub_video_cirrus_setup: find_card):
Likewise.
* grub-core/video/efi_uga.c (find_framebuf: find_card): Likewise.
* grub-core/video/radeon_fuloong2e.c
(grub_video_radeon_fuloong2e_setup: find_card): Likewise.
* grub-core/video/sis315pro.c (grub_video_sis315pro_setup:
find_card): Likewise.
* grub-core/video/sm712.c (grub_video_sm712_setup: find_card):
Likewise.
2013-01-13 01:10:41 +00:00
Colin Watson
33a68ac643
* grub-core/bus/usb/ehci.c (grub_ehci_pci_iter): Remove incorrect
...
__attribute__ ((unused)).
* grub-core/video/bochs.c (find_card): Likewise.
* grub-core/video/cirrus.c (find_card): Likewise.
* grub-core/video/radeon_fuloong2e.c (find_card): Likewise.
* grub-core/video/sis315pro.c (find_card): Likewise.
* grub-core/video/sm712.c (find_card): Likewise.
2012-12-30 09:57:58 +00:00
starous
39b27f1eaf
EHCI and OHCI PCI bus master
2012-07-22 21:09:30 +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
c8ca585593
* grub-core/bus/usb/serial/ftdi.c (real_config): Handle 1.5 stop bits.
...
(ftdi_hw_configure): Likewise.
* grub-core/bus/usb/serial/pl2303.c (GRUB_PL2303_STOP_BITS_1_5): New
define.
(real_config): Handle 1.5 stop bits.
(pl2303_hw_configure): Likewise.
2012-06-08 20:40:40 +02:00
Christer Weinigel
bda36bfa77
Fix EHCI low-speed.
...
* grub-core/bus/usb/ehci.c (GRUB_EHCI_MULT_ONE): Fix the value.
(GRUB_EHCI_MULT_TWO): Likewise.
(GRUB_EHCI_MULT_THREE): Likewise.
(GRUB_EHCI_CMASK_MASK): New enum value.
(GRUB_EHCI_SMASK_MASK): Likewise.
(GRUB_EHCI_CMASK_OFF): Likewise.
(GRUB_EHCI_SMASK_OFF): Likewise.
(grub_ehci_pci_iter): Enable periodic schedule.
(grub_ehci_parse_notrun): Likewise.
(grub_ehci_restore_hw): Likewise.
(grub_ehci_setup_qh): Set flags for low speed transfers.
(grub_ehci_find_qh): Use periodic list for low speed.
(grub_ehci_setup_transfer): Check periodic queue as well.
(grub_ehci_check_transfer): Likewise.
(grub_ehci_cancel_transfer): Cancel periodic transfer.
2012-05-31 14:02:46 +02:00
Matthew Garrett
9d34bb85da
Suspend broadcom cards in order to stop their DMA.
...
* grub-core/Makefile.am (KERNEL_HEADER_FILES): Add pci.h on x86 EFI.
* grub-core/Makefile.core.def (kernel): Add pci.c on x86 EFI.
(pci): Don't build on x86 EFI.
* grub-core/bus/pci.c (grub_pci_find_capability): New function.
* grub-core/kern/efi/mm.c (stop_broadcom) [__i386__ || __x86_64__]:
New function.
(grub_efi_finish_boot_services) [__i386__ || __x86_64__]: Call
stop_broadcom if running on EFI.
* include/grub/pci.h (GRUB_PCI_CLASS_NETWORK): New enum value.
(GRUB_PCI_CAP_POWER_MANAGEMENT): Likewise.
(GRUB_PCI_VENDOR_BROADCOM): Likewise.
(grub_pci_find_capability): New proto.
Also-By: Vladimir Serbinenko <phcoder@gmail.com>
2012-05-03 17:26:55 +02:00
Vladimir 'phcoder' Serbinenko
d61386e21d
Improve string. Gettextize.
2012-02-12 15:25:25 +01:00
Vladimir 'phcoder' Serbinenko
a9cdb3cf18
* grub-core/bus/usb/ehci.c (grub_ehci_ehcc_read32): Restructure to
...
conserve alignment invariants.
(grub_ehci_ehcc_read16): Likewise.
(grub_ehci_oper_read32): Likewise.
(grub_ehci_oper_write32): Likewise.
(grub_ehci_pci_iter) [!GRUB_HAVE_UNALIGNED_ACCESS]: Check alignment.
Conserve alignment invariants.
2012-02-09 23:18:53 +01:00
Vladimir 'phcoder' Serbinenko
01783768d2
Convert UHCI to DMA framework.
...
* grub-core/bus/usb/uhci.c (grub_uhci): Add chunk and phys members.
(grub_uhci_pci_iter): Fill new members
(grub_alloc_td): Use P2V and V2P functions.
(grub_free_queue): Likewise.
(grub_alloc_qh): Likewise.
(grub_uhci_setup_transfer): Likewise.
(grub_uhci_check_transfer): Likewise.
2012-02-09 15:00:05 +01:00
Vladimir 'phcoder' Serbinenko
9c4b5c13e6
Improve gettext support. Stylistic fixes and error handling fixes while
...
on it.
2012-02-08 19:26:01 +01:00
Vladimir 'phcoder' Serbinenko
d3e3fab52a
Fix ehci on amd64.
...
* grub-core/bus/usb/usbhub.c (grub_usb_hub_add_dev): Use %p to print
pointers.
* grub-core/bus/usb/ehci.c (grub_ehci_pci_iter): Likewise.
(grub_ehci_setup_qh): Likewise.
(grub_ehci_find_qh): Likewise.
(grub_ehci_transaction): Likewise.
(grub_ehci_setup_transfer): Likewise.
(grub_ehci_check_transfer): Likewise.
(grub_ehci_portstatus): Likewise.
(grub_ehci_detect_dev): Likewise.
(grub_ehci_transfer_controller_data): New field td_last_phys.
(grub_ehci_setup_transfer): Fill td_last_phys.
(grub_ehci_check_transfer): Use td_last_phys.
2012-02-01 16:13:17 +01:00
Vladimir 'phcoder' Serbinenko
08491b6a5a
Fix type errors. Don't stop after first EHCI controller is found.
2012-02-01 14:08:58 +01:00
Vladimir 'phcoder' Serbinenko
cefa01261b
merge mainline into ehci
2012-02-01 13:19:42 +01:00
Vladimir 'phcoder' Serbinenko
87edb8940a
Replace single-linked with double-linked lists. It results in more
...
compact and more efficient code.
* grub-core/kern/list.c (grub_list_push): Moved from here ...
* include/grub/list.h (grub_list_push): ... to here. Set prev.
(grub_list_remove): Moved from here ...
* include/grub/list.h (grub_list_remove): ... here. Use and set prev.
(grub_prio_list_insert): Set prev.
* include/grub/list.h (grub_list): Add prev. All users updated.
2012-01-24 13:31:12 +01:00
Vladimir 'phcoder' Serbinenko
9c2710789f
Eliminate grub_min/grub_max prone to overflow usage.
...
* grub-core/bus/usb/usbhub.c (grub_usb_add_hub): Eliminate grub_min.
(poll_nonroot_hub): Likewise.
* grub-core/fs/affs.c (grub_affs_iterate_dir): Likewise.
(grub_affs_label): Likewise.
* grub-core/fs/btrfs.c (grub_btrfs_lzo_decompress): Likewise.
* grub-core/fs/hfs.c (grub_hfs_dir): Likewise.
(grub_hfs_label): Likewise.
* grub-core/fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
* grub-core/fs/zfs/zfs.c (MIN): Remove.
(zap_leaf_array_equal): Use grub_size. Remove MIN.
(zap_leaf_array_get): Likewise.
(dnode_get_path): Likewise.
* grub-core/io/lzopio.c (grub_lzopio_read): Eliminate grub_min.
* grub-core/io/xzio.c (grub_xzio_read): Likewise.
* grub-core/script/execute.c (grub_script_break): Likewise.
* grub-core/script/lexer.c (grub_script_lexer_record): Eliminate
grub_max.
* grub-core/script/yylex.l (grub_lexer_yyrealloc): Likewise.
* include/grub/misc.h (grub_min): Removed.
(grub_max): Likewise.
2012-01-14 15:44:34 +01:00
Vladimir 'phcoder' Serbinenko
02a2bf8384
Add noreturn attributes and remove unreachable code.
...
* grub-core/bus/cs5536.c (grub_cs5536_smbus_wait): Remove unreachable
code.
* grub-core/commands/halt.c (grub_cmd_halt): Remove unreachable
code. Mark as noreturn.
* grub-core/commands/minicmd.c (grub_mini_cmd_exit): Likewise.
* grub-core/commands/reboot.c (grub_cmd_reboot): Likewise.
* grub-core/disk/efi/efidisk.c (grub_efidisk_get_device_name): Remove
unreachable code.
* grub-core/kern/main.c (grub_main): Mark as noreturn.
* grub-core/kern/rescue_reader.c (grub_rescue_run): Likewise.
* grub-core/lib/posix_wrap/stdlib.h (abort): Likewise.
* grub-core/normal/menu.c (run_menu): Remove unreachable code.
* include/grub/kernel.h (grub_main): Mark as noreturn.
* include/grub/reader.h (grub_rescue_run): Likewise.
2011-12-13 15:13:51 +01:00
Vladimir 'phcoder' Serbinenko
0af2346fdb
* grub-core/bus/usb/ohci.c (grub_ohci_check_transfer): Add an unsigned
...
specification.
2011-12-13 00:29:42 +01:00
Vladimir 'phcoder' Serbinenko
74dbd24466
* include/grub/loader.h (grub_loader_register_preboot_hook):
...
Use struct preboot * and not void * for handle. All users updated.
(grub_loader_unregister_preboot_hook): Likewise.
2011-12-13 00:28:14 +01:00
Szymon Janc
fcf1d67219
* grub-core/bus/usb/uhci.c (grub_uhci_setup_transfer): Fix possible
...
NULL pointer dereference.
2011-10-19 23:11:48 +02:00
Vladimir 'phcoder' Serbinenko
9305dd1a82
Some CS5536 code
2011-10-01 22:51:12 +02:00
Vladimir 'phcoder' Serbinenko
1333929060
Disable SMI on OS ownership failure
2011-10-01 22:01:31 +02:00
Vladimir 'phcoder' Serbinenko
81dbdc1d0a
Several small fixes
2011-10-01 21:53:43 +02:00
Vladimir 'phcoder' Serbinenko
2d523c70e5
Use map range
2011-10-01 21:42:44 +02:00
Vladimir 'phcoder' Serbinenko
0a213f4cdb
Move p2v and v2p to pci.h
2011-10-01 21:37:02 +02:00
Vladimir 'phcoder' Serbinenko
e5c0534f0b
Fix p2v and v2p
2011-10-01 21:31:53 +02:00
starous
ce79cc99d5
@Rock changes - fixed coreboot problem
2011-10-01 21:27:29 +02:00
Vladimir 'phcoder' Serbinenko
4fbface043
Remove packed attribute.
2011-10-01 21:14:03 +02:00
Vladimir 'phcoder' Serbinenko
2877805fb0
Fix link_td to use grub_uint32_t and not the pointer type
2011-10-01 21:13:29 +02:00
Vladimir 'phcoder' Serbinenko
0e7ebb0569
run indent on ehci.c
2011-10-01 21:04:17 +02:00
Vladimir 'phcoder' Serbinenko
679cbb4020
Replace #define with enum
2011-10-01 21:03:03 +02:00