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:
parent
01aab9978f
commit
9d34bb85da
6 changed files with 122 additions and 2 deletions
|
@ -81,6 +81,19 @@
|
|||
#define GRUB_PCI_STATUS_DEVSEL_TIMING_SHIFT 9
|
||||
#define GRUB_PCI_STATUS_DEVSEL_TIMING_MASK 0x0600
|
||||
#define GRUB_PCI_CLASS_SUBCLASS_VGA 0x0300
|
||||
enum
|
||||
{
|
||||
GRUB_PCI_CLASS_NETWORK = 0x02
|
||||
};
|
||||
enum
|
||||
{
|
||||
GRUB_PCI_CAP_POWER_MANAGEMENT = 0x01
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
GRUB_PCI_VENDOR_BROADCOM = 0x14e4
|
||||
};
|
||||
|
||||
#ifndef ASM_FILE
|
||||
typedef grub_uint32_t grub_pci_id_t;
|
||||
|
@ -146,6 +159,8 @@ grub_dma_virt2phys (volatile void *virt, struct grub_pci_dma_chunk *chunk)
|
|||
+ grub_dma_get_phys (chunk));
|
||||
}
|
||||
|
||||
grub_uint8_t
|
||||
EXPORT_FUNC (grub_pci_find_capability) (grub_pci_device_t dev, grub_uint8_t cap);
|
||||
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue