Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

84 lines
1.9 KiB

  1. /*++
  2. Copyright (c) Microsoft Corporation. All rights reserved.
  3. Module Name:
  4. ixpciir.h
  5. Abstract:
  6. This header file defines the private interfaces, defines and structures
  7. for Pci Irq Routing support.
  8. Author:
  9. Santosh Jodh (santoshj) 10-June-1998
  10. Environment:
  11. Kernel mode only.
  12. Revision History:
  13. --*/
  14. #include <pciirqmp.h>
  15. #define PCI_LINK_SIGNATURE 'KNLP'
  16. #define IsPciIrqRoutingEnabled() \
  17. (HalpPciIrqRoutingInfo.PciIrqRoutingTable && HalpPciIrqRoutingInfo.PciInterface)
  18. typedef struct _LINK_STATE LINK_STATE, *PLINK_STATE;
  19. typedef struct _LINK_NODE LINK_NODE, *PLINK_NODE;
  20. typedef struct _PCI_IRQ_ROUTING_INFO PCI_IRQ_ROUTING_INFO, *PPCI_IRQ_ROUTING_INFO;
  21. struct _LINK_STATE {
  22. ULONG Interrupt; // Interrupt for this link.
  23. ULONG RefCount; // Number of devices using this link.
  24. };
  25. struct _LINK_NODE {
  26. ULONG Signature; // Signature 'PLNK'.
  27. PLINK_NODE Next;
  28. ULONG Link; // Link value.
  29. ULONG InterruptMap; // Possible Irq map.
  30. PLINK_STATE Allocation;
  31. PLINK_STATE PossibleAllocation;
  32. };
  33. struct _PCI_IRQ_ROUTING_INFO {
  34. PPCI_IRQ_ROUTING_TABLE PciIrqRoutingTable;
  35. PINT_ROUTE_INTERFACE_STANDARD PciInterface;
  36. PLINK_NODE LinkNodeHead;
  37. ULONG Parameters;
  38. };
  39. NTSTATUS
  40. HalpInitPciIrqRouting (
  41. OUT PPCI_IRQ_ROUTING_INFO PciIrqRoutingInfo
  42. );
  43. NTSTATUS
  44. HalpFindLinkNode (
  45. IN PPCI_IRQ_ROUTING_INFO PciIrqRoutingInfo,
  46. IN PDEVICE_OBJECT Pdo,
  47. IN ULONG Bus,
  48. IN ULONG Slot,
  49. OUT PLINK_NODE *LinkNode
  50. );
  51. NTSTATUS
  52. HalpCommitLink (
  53. IN PLINK_NODE LinkNode
  54. );
  55. VOID
  56. HalpProgramInterruptLine (
  57. IN PPCI_IRQ_ROUTING_INFO PciIrqRoutingInfo,
  58. IN PDEVICE_OBJECT Pdo,
  59. IN ULONG Interrupt
  60. );
  61. extern PCI_IRQ_ROUTING_INFO HalpPciIrqRoutingInfo;