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>
This commit is contained in:
Matthew Garrett 2012-05-03 17:26:55 +02:00 committed by Vladimir 'phcoder' Serbinenko
parent 01aab9978f
commit 9d34bb85da
6 changed files with 122 additions and 2 deletions

View file

@ -139,11 +139,13 @@ kernel = {
i386_efi = kern/i386/tsc.c;
i386_efi = kern/i386/efi/init.c;
i386_efi = bus/pci.c;
x86_64_efi = kern/i386/tsc.c;
x86_64_efi = kern/x86_64/dl.c;
x86_64_efi = kern/x86_64/efi/callwrap.S;
x86_64_efi = kern/i386/efi/init.c;
x86_64_efi = bus/pci.c;
ia64_efi = kern/ia64/efi/startup.S;
ia64_efi = kern/ia64/efi/init.c;
@ -475,8 +477,6 @@ module = {
common = bus/pci.c;
enable = i386_pc;
enable = i386_efi;
enable = x86_64_efi;
enable = i386_ieee1275;
enable = i386_coreboot;
enable = i386_multiboot;