]> git.proxmox.com Git - mirror_edk2.git/blame - PcAtChipsetPkg/Include/Library/IoApicLib.h
PcAtChipsetPkg: Fix spelling errors
[mirror_edk2.git] / PcAtChipsetPkg / Include / Library / IoApicLib.h
CommitLineData
986d1dfb 1/** @file\r
2 Public include file for I/O APIC library.\r
3\r
4 I/O APIC library assumes I/O APIC is enabled. It does not\r
5 handles cases where I/O APIC is disabled.\r
6\r
5a702acd 7 Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
e1d302e5 8 SPDX-License-Identifier: BSD-2-Clause-Patent\r
986d1dfb 9\r
10**/\r
8e22eab8
ED
11#ifndef __IO_APIC_LIB_H__\r
12#define __IO_APIC_LIB_H__\r
986d1dfb 13\r
14/**\r
15 Read a 32-bit I/O APIC register.\r
16\r
17 If Index is >= 0x100, then ASSERT().\r
5a702acd 18\r
986d1dfb 19 @param Index Specifies the I/O APIC register to read.\r
20\r
21 @return The 32-bit value read from the I/O APIC register specified by Index.\r
22**/\r
23UINT32\r
24EFIAPI\r
25IoApicRead (\r
26 IN UINTN Index\r
27 );\r
28\r
29/**\r
30 Write a 32-bit I/O APIC register.\r
31\r
32 If Index is >= 0x100, then ASSERT().\r
5a702acd 33\r
986d1dfb 34 @param Index Specifies the I/O APIC register to write.\r
35 @param Value Specifies the value to write to the I/O APIC register specified by Index.\r
36\r
37 @return The 32-bit value written to I/O APIC register specified by Index.\r
38**/\r
39UINT32\r
40EFIAPI\r
41IoApicWrite (\r
42 IN UINTN Index,\r
43 IN UINT32 Value\r
44 );\r
45\r
46/**\r
47 Set the interrupt mask of an I/O APIC interrupt.\r
48\r
5a702acd
LG
49 If Irq is larger than the maximum number I/O APIC redirection entries, then ASSERT().\r
50\r
986d1dfb 51 @param Irq Specifies the I/O APIC interrupt to enable or disable.\r
52 @param Enable If TRUE, then enable the I/O APIC interrupt specified by Irq.\r
53 If FALSE, then disable the I/O APIC interrupt specified by Irq.\r
54**/\r
55VOID\r
56EFIAPI\r
57IoApicEnableInterrupt (\r
58 IN UINTN Irq,\r
59 IN BOOLEAN Enable\r
60 );\r
61\r
62/**\r
63 Configures an I/O APIC interrupt.\r
5a702acd 64\r
986d1dfb 65 Configure an I/O APIC Redirection Table Entry to deliver an interrupt in physical\r
53b1dd10 66 mode to the Local APIC of the currently executing CPU. The default state of the\r
986d1dfb 67 entry is for the interrupt to be disabled (masked). IoApicEnableInterrupts() must\r
68 be used to enable(unmask) the I/O APIC Interrupt.\r
69\r
5a702acd 70 If Irq is larger than the maximum number I/O APIC redirection entries, then ASSERT().\r
986d1dfb 71 If Vector >= 0x100, then ASSERT().\r
72 If DeliveryMode is not supported, then ASSERT().\r
73\r
74 @param Irq Specifies the I/O APIC interrupt to initialize.\r
75 @param Vector The 8-bit interrupt vector associated with the I/O APIC\r
76 Interrupt. Must be in the range 0x10..0xFE.\r
77 @param DeliveryMode A 3-bit value that specifies how the recept of the I/O APIC\r
78 interrupt is handled. The only supported values are:\r
79 0: IO_APIC_DELIVERY_MODE_FIXED\r
80 1: IO_APIC_DELIVERY_MODE_LOWEST_PRIORITY\r
81 2: IO_APIC_DELIVERY_MODE_SMI\r
82 4: IO_APIC_DELIVERY_MODE_NMI\r
83 5: IO_APIC_DELIVERY_MODE_INIT\r
84 7: IO_APIC_DELIVERY_MODE_EXTINT\r
85 @param LevelTriggered TRUE specifies a level triggered interrupt.\r
86 FALSE specifies an edge triggered interrupt.\r
87 @param AssertionLevel TRUE specified an active high interrupt.\r
88 FALSE specifies an active low interrupt.\r
89**/\r
90VOID\r
91EFIAPI\r
92IoApicConfigureInterrupt (\r
93 IN UINTN Irq,\r
94 IN UINTN Vector,\r
95 IN UINTN DeliveryMode,\r
96 IN BOOLEAN LevelTriggered,\r
97 IN BOOLEAN AssertionLevel\r
98 );\r
8e22eab8 99#endif\r