From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.126, mailfrom: chasel.chiu@intel.com) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by groups.io with SMTP; Fri, 16 Aug 2019 18:16:49 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Aug 2019 18:16:49 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,395,1559545200"; d="scan'208";a="171578705" Received: from pgsmsx105.gar.corp.intel.com ([10.221.44.96]) by orsmga008.jf.intel.com with ESMTP; 16 Aug 2019 18:16:48 -0700 Received: from pgsmsx111.gar.corp.intel.com ([169.254.2.22]) by PGSMSX105.gar.corp.intel.com ([169.254.4.133]) with mapi id 14.03.0439.000; Sat, 17 Aug 2019 09:16:47 +0800 From: "Chiu, Chasel" To: "Kubacki, Michael A" , "devel@edk2.groups.io" CC: "Chaganty, Rangasai V" , "Gao, Liming" , "Desimone, Nathaniel L" , "Kinney, Michael D" , "Sinha, Ankit" Subject: Re: [edk2-platforms][PATCH V1 32/37] WhiskeylakeOpenBoardPkg/WhiskeylakeURvp: Add headers Thread-Topic: [edk2-platforms][PATCH V1 32/37] WhiskeylakeOpenBoardPkg/WhiskeylakeURvp: Add headers Thread-Index: AQHVVJEf0EydCs6hOkOZtCZeWhHQY6b+ibdQ Date: Sat, 17 Aug 2019 01:16:47 +0000 Message-ID: <3C3EFB470A303B4AB093197B6777CCEC50462445@PGSMSX111.gar.corp.intel.com> References: <20190817001603.30632-1-michael.a.kubacki@intel.com> <20190817001603.30632-33-michael.a.kubacki@intel.com> In-Reply-To: <20190817001603.30632-33-michael.a.kubacki@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYjYyN2ZkMjMtMjk2MS00OGE5LWE0NDEtNWMwYjJjNzRjM2YwIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiSnp1S0ZsXC9td1RCVnI0U21Db3lPU2I0ODlLVFoxM1h6YVMwc21SRGtnd000ejM1bnhDaW9PUjRwZUl1czBhQkwifQ== x-ctpclassification: CTP_NT x-originating-ip: [172.30.20.206] MIME-Version: 1.0 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Chasel Chiu > -----Original Message----- > From: Kubacki, Michael A > Sent: Saturday, August 17, 2019 8:16 AM > To: devel@edk2.groups.io > Cc: Chaganty, Rangasai V ; Chiu, Chasel > ; Gao, Liming ; Desimone, > Nathaniel L ; Kinney, Michael D > ; Sinha, Ankit > Subject: [edk2-platforms][PATCH V1 32/37] > WhiskeylakeOpenBoardPkg/WhiskeylakeURvp: Add headers >=20 > REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3D2083 >=20 > Header files for the WhiskeylakeURvp board instance. >=20 > Cc: Sai Chaganty > Cc: Chasel Chiu > Cc: Liming Gao > Cc: Nate DeSimone > Cc: Michael D Kinney > Cc: Ankit Sinha > Signed-off-by: Michael Kubacki > --- >=20 > Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Include/PeiPlat > formHookLib.h | 131 ++++++++++++++++++++ >=20 > Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Include/PeiPlat > formLib.h | 40 ++++++ >=20 > Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Include/Platfor > mBoardConfig.h | 105 ++++++++++++++++ >=20 > Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Include/Platfor > mInfo.h | 44 +++++++ >=20 > Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Include/Whisk > eylakeURvpId.h | 12 ++ > 5 files changed, 332 insertions(+) >=20 > diff --git > a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Include/PeiPl > atformHookLib.h > b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Include/PeiP > latformHookLib.h > new file mode 100644 > index 0000000000..bd849b9ee2 > --- /dev/null > +++ > b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Include/Pei > +++ PlatformHookLib.h > @@ -0,0 +1,131 @@ > +/** @file > + > + Copyright (c) 2019, Intel Corporation. All rights reserved.
> + SPDX-License-Identifier: BSD-2-Clause-Patent **/ > + > +#ifndef _PEI_PLATFORM_HOOK_LIB_H_ > +#define _PEI_PLATFORM_HOOK_LIB_H_ > + > +#include > +#include > +#include > + > + > +//EC Command to provide one byte of debug indication #define > +BSSB_DEBUG_INDICATION 0xAE > +/** > + Configure EC for specific devices > + > + @param[in] PchLan - The PchLan of PCH_SETUP variable. > + @param[in] BootMode - The current boot mode. > +**/ > +VOID > +EcInit ( > + IN UINT8 PchLan, > + IN EFI_BOOT_MODE BootMode > + ); > + > +/** > + Checks if Premium PMIC present > + > + @retval TRUE if present > + @retval FALSE it discrete/other PMIC **/ BOOLEAN > +IsPremiumPmicPresent ( > + VOID > + ); > + > +/** > + Pmic Programming to supprort LPAL Feature > + > + @retval NONE > +**/ > +VOID > +PremiumPmicDisableSlpS0Voltage ( > + VOID > + ); > + > +/** > +Pmic Programming to supprort LPAL Feature > + @retval NONE > +**/ > +VOID > +PremiumPmicEnableSlpS0Voltage( > + VOID > + ); > + > +/** > + Do platform specific programming pre-memory. For example, EC init, > +Chipset programming > + > + @retval Status > +**/ > +EFI_STATUS > +PlatformSpecificInitPreMem ( > + VOID > + ); > + > +/** > + Do platform specific programming post-memory. > + > + @retval Status > +**/ > +EFI_STATUS > +PlatformSpecificInit ( > + VOID > + ); > + > +/** > + Configure GPIO and SIO Before Memory is ready. > + > + @retval EFI_SUCCESS Operation success. > +**/ > +EFI_STATUS > +BoardInitPreMem ( > + VOID > + ); > + > +/** > + Configure GPIO and SIO > + > + @retval EFI_SUCCESS Operation success. > +**/ > +EFI_STATUS > +BoardInit ( > + VOID > + ); > + > +/** > +Voltage Margining Routine > + > +@retval EFI_SUCCESS Operation success > +**/ > +EFI_STATUS > +VoltageMarginingRoutine( > + VOID > + ); > + > +/** > + Detect recovery mode > + > + @retval EFI_SUCCESS System in Recovery Mode > + @retval EFI_UNSUPPORTED System doesn't support Recovery Mode > + @retval EFI_NOT_FOUND System is not in Recovery Mode > +**/ > +EFI_STATUS > +IsRecoveryMode ( > + VOID > + ); > + > +/** > + Early board Configuration before Memory is ready. > + > + @retval EFI_SUCCESS Operation success. > +**/ > +EFI_STATUS > +BoardInitEarlyPreMem ( > + VOID > + ); > +#endif > + > diff --git > a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Include/PeiPl > atformLib.h > b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Include/PeiP > latformLib.h > new file mode 100644 > index 0000000000..d65586dbb9 > --- /dev/null > +++ > b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Include/Pei > +++ PlatformLib.h > @@ -0,0 +1,40 @@ > +/** @file > + > + Copyright (c) 2019, Intel Corporation. All rights reserved.
> + SPDX-License-Identifier: BSD-2-Clause-Patent **/ > + > +#ifndef _PEI_PLATFORM_LIB_H_ > +#define _PEI_PLATFORM_LIB_H_ > + > + > + > +#define PEI_DEVICE_DISABLED 0 > +#define PEI_DEVICE_ENABLED 1 > + > +typedef struct { > + UINT8 Register; > + UINT32 Value; > +} PCH_GPIO_DEV; > + > +// > +// GPIO Initialization Data Structure > +// > +typedef struct{ > + PCH_GPIO_DEV Use_Sel; > + PCH_GPIO_DEV Use_Sel2; > + PCH_GPIO_DEV Use_Sel3; > + PCH_GPIO_DEV Io_Sel; > + PCH_GPIO_DEV Io_Sel2; > + PCH_GPIO_DEV Io_Sel3; > + PCH_GPIO_DEV Lvl; > + PCH_GPIO_DEV Lvl2; > + PCH_GPIO_DEV Lvl3; > + PCH_GPIO_DEV Inv; > + PCH_GPIO_DEV Blink; > + PCH_GPIO_DEV Rst_Sel; > + PCH_GPIO_DEV Rst_Sel2; > +} GPIO_INIT_STRUCT; > + > +#endif > + > diff --git > a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Include/Platf > ormBoardConfig.h > b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Include/Platf > ormBoardConfig.h > new file mode 100644 > index 0000000000..44b4059f8e > --- /dev/null > +++ > b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Include/Pla > +++ tformBoardConfig.h > @@ -0,0 +1,105 @@ > +/** @file > + Header file for Platform Boards Configurations. > + > + > + Copyright (c) 2019, Intel Corporation. All rights reserved.
> + SPDX-License-Identifier: BSD-2-Clause-Patent **/ > + > +#ifndef _PLATFORM_BOARD_CONFIG_H > +#define _PLATFORM_BOARD_CONFIG_H > + > +#include > +#include > +#include > +#include > +#include > + > +#define IS_ALIGNED(addr, size) (((addr) & (size - 1)) ? 0 : 1) > +#define ALIGN16(size) (IS_ALIGNED(size, 16) ? size : ((size + 1= 6) & > 0xFFF0)) > + > +#define BOARD_CONFIG_BLOCK_PEI_PREMEM_VERSION 0x00000001 > #define > +BOARD_CONFIG_BLOCK_PEI_POSTMEM_VERSION 0x00000001 #define > +BOARD_CONFIG_BLOCK_DXE_VERSION 0x00000001 #define > +BOARD_NO_BATTERY_SUPPORT 0 #define > BOARD_REAL_BATTERY_SUPPORTED BIT0 > +#define BOARD_VIRTUAL_BATTERY_SUPPORTED BIT1 > + > +#pragma pack(1) > + > +typedef struct { > + CONFIG_BLOCK_HEADER Header; ///< Offset 0-27 Config Blo= ck > Header > +} BOARD_CONFIG_BLOCK; > + > +typedef struct { > + UINT8 GpioSupport; > + UINT32 WakeGpioNo; > + UINT8 HoldRstExpanderNo; > + UINT32 HoldRstGpioNo; > + BOOLEAN HoldRstActive; > + UINT8 PwrEnableExpanderNo; > + UINT32 PwrEnableGpioNo; > + BOOLEAN PwrEnableActive; > +} SWITCH_GRAPHIC_GPIO; > + > +typedef struct { > + UINT8 ClkReqNumber : 4; > + UINT8 ClkReqSupported : 1; > + UINT8 DeviceResetPadActiveHigh : 1; > + UINT32 DeviceResetPad; > +} ROOT_PORT_CLK_INFO; > + > +typedef struct { > + UINT8 Section; > + UINT8 Pin; > +} EXPANDER_GPIO_CONFIG; > + > +typedef enum { > + BoardGpioTypePch, > + BoardGpioTypeExpander, > + BoardGpioTypeNotSupported =3D 0xFF > +} BOARD_GPIO_TYPE; > + > +typedef struct { > + UINT8 Type; > + UINT8 Reserved[3]; // alignment for COMMON_GPIO_CONFIG > + union { > + UINT32 Pin; > + EXPANDER_GPIO_CONFIG Expander; > + } u; > +} BOARD_GPIO_CONFIG; > + > +// Do not change the encoding. It must correspond with > PCH_PCIE_CLOCK_USAGE from PCH RC. > +#define NOT_USED 0xFF > +#define FREE_RUNNING 0x80 > +#define LAN_CLOCK 0x70 > +#define PCIE_PEG 0x40 > +#define PCIE_PCH 0x00 > + > +typedef struct { > + UINT32 ClockUsage; > + UINT32 ClkReqSupported; > +} PCIE_CLOCK_CONFIG; > + > +typedef union { > + UINT64 Blob; > + BOARD_GPIO_CONFIG BoardGpioConfig; > + ROOT_PORT_CLK_INFO Info; > + PCIE_CLOCK_CONFIG PcieClock; > +} PCD64_BLOB; > + > +typedef union { > + UINT32 Blob; > + USB20_AFE Info; > +} PCD32_BLOB; > + > +#ifndef IO_EXPANDER_DISABLED > +#define IO_EXPANDER_DISABLED 0xFF > +#endif > + > +#define SPD_DATA_SIZE 512 > + > +#pragma pack() > + > +#endif // _PLATFORM_BOARD_CONFIG_H > + > diff --git > a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Include/Platf > ormInfo.h > b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Include/Platf > ormInfo.h > new file mode 100644 > index 0000000000..0e0b6c4f6c > --- /dev/null > +++ > b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Include/Pla > +++ tformInfo.h > @@ -0,0 +1,44 @@ > +/** @file > + GUID used for Platform Info Data entries in the HOB list. > + > + > + Copyright (c) 2019, Intel Corporation. All rights reserved.
> + SPDX-License-Identifier: BSD-2-Clause-Patent **/ > + > +#ifndef _PLATFORM_INFO_H_ > +#define _PLATFORM_INFO_H_ > + > +#pragma pack(1) > + > +/// > +/// PCH_GPIO_PAD is equivalent to GPIO_PAD which is defined in > +GpioConfig.h /// typedef UINT32 PCH_GPIO_PAD; //Copied from > +GpioConfig.h (need to change it based on include) > + > +typedef struct { > +UINT8 Expander; > +UINT8 Pin; > +UINT16 Reserved; // Reserved for future use > +} IO_EXPANDER_PAD; > + > +typedef union { > +PCH_GPIO_PAD PchGpio; > +IO_EXPANDER_PAD IoExpGpio; > +} GPIO_PAD_CONFIG; > + > +typedef struct { > +UINT8 GpioType; // 0: Disabled (no GPIO support), 1: P= CH, 2: I/O > Expander > +UINT8 Reserved[3]; // Reserved for future use > +GPIO_PAD_CONFIG GpioData; > +} PACKED_GPIO_CONFIG; > + > +typedef union { > +PACKED_GPIO_CONFIG PackedGpio; > +UINT64 Data64; > +} COMMON_GPIO_CONFIG; > + > +#pragma pack() > + > +#endif > + > diff --git > a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Include/Whi > skeylakeURvpId.h > b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Include/Whi > skeylakeURvpId.h > new file mode 100644 > index 0000000000..7d44acccc1 > --- /dev/null > +++ > b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Include/Whi > +++ skeylakeURvpId.h > @@ -0,0 +1,12 @@ > +/** @file > + > + Copyright (c) 2019, Intel Corporation. All rights reserved.
> + SPDX-License-Identifier: BSD-2-Clause-Patent **/ > + > +#ifndef _WHISKEYLAKE_ERB_ID_H_ > +#define _WHISKEYLAKE_ERB_ID_H_ > + > +#define BoardIdWhiskeyLakeRvp 0x60 > +#endif // _WHISKEYLAKE_RVP3_ID_H_ > + > -- > 2.16.2.windows.1