aboutsummaryrefslogtreecommitdiffstats
path: root/roms/edk2/MdePkg/Library/BasePciSegmentInfoLibNull
diff options
context:
space:
mode:
Diffstat (limited to 'roms/edk2/MdePkg/Library/BasePciSegmentInfoLibNull')
-rw-r--r--roms/edk2/MdePkg/Library/BasePciSegmentInfoLibNull/BasePciSegmentInfoLibNull.inf36
-rw-r--r--roms/edk2/MdePkg/Library/BasePciSegmentInfoLibNull/BasePciSegmentInfoLibNull.uni15
-rw-r--r--roms/edk2/MdePkg/Library/BasePciSegmentInfoLibNull/PciSegmentInfoLib.c32
3 files changed, 83 insertions, 0 deletions
diff --git a/roms/edk2/MdePkg/Library/BasePciSegmentInfoLibNull/BasePciSegmentInfoLibNull.inf b/roms/edk2/MdePkg/Library/BasePciSegmentInfoLibNull/BasePciSegmentInfoLibNull.inf
new file mode 100644
index 000000000..08c6742c0
--- /dev/null
+++ b/roms/edk2/MdePkg/Library/BasePciSegmentInfoLibNull/BasePciSegmentInfoLibNull.inf
@@ -0,0 +1,36 @@
+## @file
+# Instance of PCI SegmentInfo Library.
+#
+# Default PCI Segment Information Library that shouldn't be used by real platform.
+#
+# Copyright (c) 2017 - 2018, Intel Corporation. All rights reserved.<BR>
+#
+# SPDX-License-Identifier: BSD-2-Clause-Patent
+#
+#
+##
+
+[Defines]
+ INF_VERSION = 0x00010005
+ BASE_NAME = BasePciSegmentInfoLibNull
+ MODULE_UNI_FILE = BasePciSegmentInfoLibNull.uni
+ FILE_GUID = 36B28584-C6AE-4B1B-A473-A51618EE525A
+ MODULE_TYPE = BASE
+ VERSION_STRING = 1.0
+ LIBRARY_CLASS = PciSegmentInfoLib
+
+#
+# The following information is for reference only and not required by the build tools.
+#
+# VALID_ARCHITECTURES = IA32 X64 EBC
+#
+
+[Sources]
+ PciSegmentInfoLib.c
+
+[Packages]
+ MdePkg/MdePkg.dec
+
+[LibraryClasses]
+ PcdLib
+ DebugLib
diff --git a/roms/edk2/MdePkg/Library/BasePciSegmentInfoLibNull/BasePciSegmentInfoLibNull.uni b/roms/edk2/MdePkg/Library/BasePciSegmentInfoLibNull/BasePciSegmentInfoLibNull.uni
new file mode 100644
index 000000000..b9807f156
--- /dev/null
+++ b/roms/edk2/MdePkg/Library/BasePciSegmentInfoLibNull/BasePciSegmentInfoLibNull.uni
@@ -0,0 +1,15 @@
+// /** @file
+// Instance of PCI SegmentInfo Library.
+//
+// Default PCI Segment Information Library that shouldn't be used by real platform.
+//
+// Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
+//
+// SPDX-License-Identifier: BSD-2-Clause-Patent
+//
+// **/
+
+
+#string STR_MODULE_ABSTRACT #language en-US "Default instance of PCI SegmentInfo Library."
+
+#string STR_MODULE_DESCRIPTION #language en-US "Default PCI Segment Information Library that shouldn't be used by real platform."
diff --git a/roms/edk2/MdePkg/Library/BasePciSegmentInfoLibNull/PciSegmentInfoLib.c b/roms/edk2/MdePkg/Library/BasePciSegmentInfoLibNull/PciSegmentInfoLib.c
new file mode 100644
index 000000000..3ec778405
--- /dev/null
+++ b/roms/edk2/MdePkg/Library/BasePciSegmentInfoLibNull/PciSegmentInfoLib.c
@@ -0,0 +1,32 @@
+/** @file
+ Default PCI Segment Information Library that returns one segment whose
+ segment base address equals to PcdPciExpressBaseAddress.
+
+ Copyright (c) 2017 - 2020, Intel Corporation. All rights reserved.<BR>
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#include <Base.h>
+#include <Library/PciSegmentInfoLib.h>
+#include <Library/DebugLib.h>
+
+/**
+ Return an array of PCI_SEGMENT_INFO holding the segment information.
+
+ Note: The returned array/buffer is owned by callee.
+
+ @param Count Return the count of segments.
+
+ @retval A callee owned array holding the segment information.
+**/
+PCI_SEGMENT_INFO *
+EFIAPI
+GetPciSegmentInfo (
+ UINTN *Count
+ )
+{
+ ASSERT (FALSE);
+ *Count = 0;
+ return NULL;
+}