]> git.proxmox.com Git - mirror_edk2.git/blobdiff - CorebootModulePkg/Include/Library/CbParseLib.h
CorebootModulePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / CorebootModulePkg / Include / Library / CbParseLib.h
index 064baf3d0c6d36aec21a11f7eeba06ec070bc918..1312410cccd14a946bb5a8aaf95b8ba49bb43176 100644 (file)
@@ -2,14 +2,8 @@
   This library will parse the coreboot table in memory and extract those required\r
   information.\r
 \r
-  Copyright (c) 2014, Intel Corporation. All rights reserved.<BR>\r
-  This program and the accompanying materials\r
-  are licensed and made available under the terms and conditions of the BSD License\r
-  which accompanies this distribution.  The full text of the license may be found at\r
-  http://opensource.org/licenses/bsd-license.php\r
-\r
-  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+  Copyright (c) 2014 - 2016, Intel Corporation. All rights reserved.<BR>\r
+  SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
 #include <Guid/FrameBufferInfoGuid.h>\r
 typedef RETURN_STATUS \\r
         (*CB_MEM_INFO_CALLBACK) (UINT64 Base, UINT64 Size, UINT32 Type, VOID *Param);\r
 \r
+/**\r
+  Find coreboot record with given Tag from the memory Start in 4096\r
+  bytes range.\r
+\r
+  @param  Start              The start memory to be searched in\r
+  @param  Tag                The tag id to be found\r
+\r
+  @retval NULL              The Tag is not found.\r
+  @retval Others            The pointer to the record found.\r
+\r
+**/\r
+VOID *\r
+EFIAPI\r
+FindCbTag (\r
+  IN  VOID     *Start,\r
+  IN  UINT32   Tag\r
+  );\r
+\r
 /**\r
   Acquire the memory information from the coreboot table in memory.\r
 \r
@@ -28,11 +40,12 @@ typedef RETURN_STATUS \
 \r
 **/\r
 RETURN_STATUS\r
+EFIAPI\r
 CbParseMemoryInfo (\r
   IN  CB_MEM_INFO_CALLBACK  MemInfoCallback,\r
   IN  VOID                  *pParam\r
   );\r
-
+\r
 /**\r
   Acquire the coreboot memory table with the given table id\r
 \r
@@ -46,12 +59,13 @@ CbParseMemoryInfo (
 \r
 **/\r
 RETURN_STATUS\r
+EFIAPI\r
 CbParseCbMemTable (\r
-  IN UINT32     TableId,
+  IN UINT32     TableId,\r
   IN VOID**     pMemTable,\r
   IN UINT32*    pMemTableSize\r
   );\r
-
+\r
 /**\r
   Acquire the acpi table from coreboot\r
 \r
@@ -64,11 +78,12 @@ CbParseCbMemTable (
 \r
 **/\r
 RETURN_STATUS\r
+EFIAPI\r
 CbParseAcpiTable (\r
   IN VOID**     pMemTable,\r
   IN UINT32*    pMemTableSize\r
   );\r
-
+\r
 /**\r
   Acquire the smbios table from coreboot\r
 \r
@@ -81,18 +96,19 @@ CbParseAcpiTable (
 \r
 **/\r
 RETURN_STATUS\r
+EFIAPI\r
 CbParseSmbiosTable (\r
   IN VOID**     pMemTable,\r
   IN UINT32*    pMemTableSize\r
   );\r
-
+\r
 /**\r
   Find the required fadt information\r
 \r
   @param  pPmCtrlReg         Pointer to the address of power management control register\r
   @param  pPmTimerReg        Pointer to the address of power management timer register\r
   @param  pResetReg          Pointer to the address of system reset register\r
-  @param  pResetValue        Pointer to the value to be writen to the system reset register\r
+  @param  pResetValue        Pointer to the value to be written to the system reset register\r
   @param  pPmEvtReg          Pointer to the address of power management event register\r
   @param  pPmGpeEnReg        Pointer to the address of power management GPE enable register\r
 \r
@@ -101,6 +117,7 @@ CbParseSmbiosTable (
 \r
 **/\r
 RETURN_STATUS\r
+EFIAPI\r
 CbParseFadtInfo (\r
   IN UINTN*     pPmCtrlReg,\r
   IN UINTN*     pPmTimerReg,\r
@@ -109,29 +126,30 @@ CbParseFadtInfo (
   IN UINTN*     pPmEvtReg,\r
   IN UINTN*     pPmGpeEnReg\r
   );\r
-
+\r
 /**\r
   Find the serial port information\r
 \r
   @param  pRegBase           Pointer to the base address of serial port registers\r
   @param  pRegAccessType     Pointer to the access type of serial port registers\r
-  @param  pRegWidth          Pointer to the register width in bytes
+  @param  pRegWidth          Pointer to the register width in bytes\r
   @param  pBaudrate          Pointer to the serial port baudrate\r
-  @param  pInputHertz        Pointer to the input clock frequency
-  @param  pUartPciAddr       Pointer to the UART PCI bus, dev and func address
+  @param  pInputHertz        Pointer to the input clock frequency\r
+  @param  pUartPciAddr       Pointer to the UART PCI bus, dev and func address\r
 \r
   @retval RETURN_SUCCESS     Successfully find the serial port information.\r
   @retval RETURN_NOT_FOUND   Failed to find the serial port information .\r
 \r
 **/\r
 RETURN_STATUS\r
+EFIAPI\r
 CbParseSerialInfo (\r
-  OUT UINT32     *pRegBase,
-  OUT UINT32     *pRegAccessType,
-  OUT UINT32     *pRegWidth,
-  OUT UINT32     *pBaudrate,
-  OUT UINT32     *pInputHertz,
-  OUT UINT32     *pUartPciAddr
+  OUT UINT32     *pRegBase,\r
+  OUT UINT32     *pRegAccessType,\r
+  OUT UINT32     *pRegWidth,\r
+  OUT UINT32     *pBaudrate,\r
+  OUT UINT32     *pInputHertz,\r
+  OUT UINT32     *pUartPciAddr\r
   );\r
 \r
 /**\r
@@ -145,11 +163,12 @@ CbParseSerialInfo (
 \r
 **/\r
 RETURN_STATUS\r
+EFIAPI\r
 CbParseGetCbHeader (\r
   IN UINTN  Level,\r
   IN VOID** HeaderPtr\r
   );\r
-
+\r
 /**\r
   Find the video frame buffer information\r
 \r
@@ -160,6 +179,7 @@ CbParseGetCbHeader (
 \r
 **/\r
 RETURN_STATUS\r
+EFIAPI\r
 CbParseFbInfo (\r
   IN FRAME_BUFFER_INFO*     pFbInfo\r
   );\r