TianoCore EDK2 master
Loading...
Searching...
No Matches
McfgParser.c
Go to the documentation of this file.
1
12#include <Library/UefiLib.h>
13#include "AcpiParser.h"
14#include "AcpiTableParser.h"
15
16// Local variables
18
23 PARSE_ACPI_HEADER (&AcpiHdrInfo),
24 { L"Reserved", 8,36, L"0x%lx", NULL, NULL, NULL, NULL },
25};
26
31 { L"Base Address", 8, 0, L"0x%lx", NULL, NULL, NULL, NULL },
32 { L"PCI Segment Group No.", 2, 8, L"0x%x", NULL, NULL, NULL, NULL },
33 { L"Start Bus No.", 1, 10, L"0x%x", NULL, NULL, NULL, NULL },
34 { L"End Bus No.", 1, 11, L"0x%x", NULL, NULL, NULL, NULL },
35 { L"Reserved", 4, 12, L"0x%x", NULL, NULL, NULL, NULL }
36};
37
50VOID
51EFIAPI
53 IN BOOLEAN Trace,
54 IN UINT8 *Ptr,
55 IN UINT32 AcpiTableLength,
56 IN UINT8 AcpiTableRevision
57 )
58{
59 UINT32 Offset;
60 UINT32 PciCfgOffset;
61 UINT8 *PciCfgSpacePtr;
62
63 if (!Trace) {
64 return;
65 }
66
67 Offset = ParseAcpi (
68 TRUE,
69 0,
70 "MCFG",
71 Ptr,
72 AcpiTableLength,
74 );
75
76 PciCfgSpacePtr = Ptr + Offset;
77
78 while (Offset < AcpiTableLength) {
79 PciCfgOffset = ParseAcpi (
80 TRUE,
81 2,
82 "PCI Configuration Space",
83 PciCfgSpacePtr,
84 (AcpiTableLength - Offset),
86 );
87 PciCfgSpacePtr += PciCfgOffset;
88 Offset += PciCfgOffset;
89 }
90}
UINT32 EFIAPI ParseAcpi(IN BOOLEAN Trace, IN UINT32 Indent, IN CONST CHAR8 *AsciiName OPTIONAL, IN UINT8 *Ptr, IN UINT32 Length, IN CONST ACPI_PARSER *Parser, IN UINT32 ParserItems)
Definition: AcpiParser.c:683
#define PARSER_PARAMS(Parser)
Definition: AcpiParser.h:494
#define PARSE_ACPI_HEADER(Info)
Definition: AcpiParser.h:501
VOID EFIAPI ParseAcpiMcfg(IN BOOLEAN Trace, IN UINT8 *Ptr, IN UINT32 AcpiTableLength, IN UINT8 AcpiTableRevision)
Definition: McfgParser.c:52
STATIC CONST ACPI_PARSER PciCfgSpaceBaseAddrParser[]
Definition: McfgParser.c:30
STATIC CONST ACPI_PARSER McfgParser[]
Definition: McfgParser.c:22
#define NULL
Definition: Base.h:319
#define CONST
Definition: Base.h:259
#define STATIC
Definition: Base.h:264
#define TRUE
Definition: Base.h:301
#define IN
Definition: Base.h:279