From b7a088b6f3ffacc5b98e1568bed7dcf225089c20 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Thu, 11 Nov 2010 16:42:16 -0500 Subject: [PATCH 4/7] Add CougarPoint support to route80h.c CougarPoint is some other northbridge. Yay! --- apps/route80h.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/apps/route80h.c b/apps/route80h.c index 1a04b5a..30330ab 100644 --- a/apps/route80h.c +++ b/apps/route80h.c @@ -12,6 +12,7 @@ #define VENDOR_ID_INTEL 0x8086 #define DEVICE_ID_LPCIF 0x3a16 +#define DEVICE_ID_COUGARPOINT_LPCIF 0x1c56 static EFI_HANDLE ImageHandle; @@ -96,9 +97,22 @@ efi_main (EFI_HANDLE image_handle, EFI_SYSTEM_TABLE *systab) EFI_PCI_IO *pciio; lpcif_t lpcif; EFI_STATUS rc; + struct { + uint16_t vendor; + uint16_t device; + } devices[] = { + { VENDOR_ID_INTEL, DEVICE_ID_LPCIF }, + { VENDOR_ID_INTEL, DEVICE_ID_COUGARPOINT_LPCIF }, + { 0, 0 } + }; + int i; ImageHandle = image_handle; - rc = find_pci_device(VENDOR_ID_INTEL, DEVICE_ID_LPCIF, &pciio); + for (i = 0; devices[i].vendor != 0; i++) { + rc = find_pci_device(devices[i].vendor, devices[i].device, &pciio); + if (EFI_ERROR(rc)) + continue; + } if (rc == EFI_NOT_FOUND) { Print(L"Device not found.\n"); -- 1.7.10.4