summaryrefslogtreecommitdiff
path: root/Silicon/Socionext/SynQuacer/Include
diff options
context:
space:
mode:
authorArd Biesheuvel <ard.biesheuvel@linaro.org>2017-10-28 13:28:08 +0100
committerArd Biesheuvel <ard.biesheuvel@linaro.org>2017-11-16 17:30:58 +0000
commitd3a6302a7317f398849cddf686705ada9353f5b6 (patch)
tree38d0e6c6624eb824976f660955c4315afb378ec5 /Silicon/Socionext/SynQuacer/Include
parent11bca685611684ac585aaac0ddd85427964978c5 (diff)
downloadedk2-platforms-d3a6302a7317f398849cddf686705ada9353f5b6.tar.xz
Silicon/Socionext: add PlatformPeilib implementation for SynQuacer
Create a specialized PlatformPeiLib implementation that invokes the platform specific firmware interface (currently, just a data structure left in SRAM) to set the ARM standard PcdSystemMemoryBase|Size PCDs, and expose the information via a newly added DramInfo PPI. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Diffstat (limited to 'Silicon/Socionext/SynQuacer/Include')
-rw-r--r--Silicon/Socionext/SynQuacer/Include/Platform/DramInfo.h30
-rw-r--r--Silicon/Socionext/SynQuacer/Include/Ppi/DramInfo.h64
2 files changed, 94 insertions, 0 deletions
diff --git a/Silicon/Socionext/SynQuacer/Include/Platform/DramInfo.h b/Silicon/Socionext/SynQuacer/Include/Platform/DramInfo.h
new file mode 100644
index 0000000000..f7691bdade
--- /dev/null
+++ b/Silicon/Socionext/SynQuacer/Include/Platform/DramInfo.h
@@ -0,0 +1,30 @@
+/** @file
+ Data structure for passing DRAM information from lower level firmware
+
+ Copyright (c) 2017, Linaro Ltd. All rights reserved.<BR>
+
+ This program and the accompanying materials are licensed and made available
+ under the terms and conditions of the BSD License which accompanies this
+ distribution. The full text of the license may be found at
+ http://opensource.org/licenses/bsd-license.php.
+
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT
+ WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+**/
+
+#ifndef _SYNQUACER_PLATFORM_DRAM_INFO_H_
+#define _SYNQUACER_PLATFORM_DRAM_INFO_H_
+
+typedef struct {
+ UINT64 Base;
+ UINT64 Size;
+} DRAM_INFO_ENTRY;
+
+typedef struct {
+ UINT32 NumRegions;
+ UINT32 Reserved;
+ DRAM_INFO_ENTRY Entry[3];
+} DRAM_INFO;
+
+#endif
diff --git a/Silicon/Socionext/SynQuacer/Include/Ppi/DramInfo.h b/Silicon/Socionext/SynQuacer/Include/Ppi/DramInfo.h
new file mode 100644
index 0000000000..6453e12131
--- /dev/null
+++ b/Silicon/Socionext/SynQuacer/Include/Ppi/DramInfo.h
@@ -0,0 +1,64 @@
+/** @file
+ DRAM info PPI to retrieve DRAM information from lower level firmware
+
+ Copyright (c) 2017, Linaro Ltd. All rights reserved.<BR>
+
+ This program and the accompanying materials are licensed and made available
+ under the terms and conditions of the BSD License which accompanies this
+ distribution. The full text of the license may be found at
+ http://opensource.org/licenses/bsd-license.php.
+
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT
+ WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+**/
+
+#ifndef _SYNQUACER_DRAMINFO_PPI_
+#define _SYNQUACER_DRAMINFO_PPI_
+
+#define SYNQUACER_DRAMINFO_PPI_GUID \
+ { 0x3e1d7356, 0xdda4, 0x4b1a, { 0x93, 0x46, 0xbf, 0x89, 0x1c, 0x86, 0x46, 0xcc } }
+
+/**
+ Retrieve the number of discontiguous DRAM regions
+
+ @param[out] RegionCount The number of available DRAM regions
+
+ @retval EFI_SUCCESS The data was successfully returned.
+ @retval EFI_INVALID_PARAMETER RegionCount == NULL
+
+**/
+typedef
+EFI_STATUS
+(EFIAPI * DRAMINFO_GET_REGION_COUNT) (
+ OUT UINTN *RegionCount
+ );
+
+/**
+ Retrieve the base and size of a DRAM region
+
+ @param[in] RegionIndex The 0-based index of the region to retrieve
+ @param[out] Base The base of the requested region
+ @param[out] Size The size of the requested region
+
+ @retval EFI_SUCCESS The data was successfully returned.
+ @retval EFI_INVALID_PARAMETER Base == NULL or Size == NULL
+ @retval EFI_NOT_FOUND No region exists with index >= RegionIndex
+
+**/
+typedef
+EFI_STATUS
+(EFIAPI * DRAMINFO_GET_REGION) (
+ IN UINTN RegionIndex,
+ OUT UINT64 *Base,
+ OUT UINT64 *Size
+ );
+
+typedef struct {
+ DRAMINFO_GET_REGION_COUNT GetRegionCount;
+ DRAMINFO_GET_REGION GetRegion;
+} SYNQUACER_DRAM_INFO_PPI;
+
+extern EFI_GUID gSynQuacerDramInfoPpiGuid;
+
+#endif