Re: [edk2-devel] [edk2-platforms][PATCH 2/3] Platform/AMD: Update Readme.md

2024-05-23 Thread Yao, Ken via groups.io
[AMD Official Use Only - AMD Internal Distribution Only]

[AMD Official Use Only - AMD Internal Distribution Only]

Thanks Abner for the up-stream.

Looks good to me.

Reviewed-by: Ken Yao 
-Original Message-
From: Zhai, MingXin (Duke) 
Sent: Thursday, May 23, 2024 3:47 PM
To: Chang, Abner ; devel@edk2.groups.io
Cc: Grimes, Paul ; Attar, AbdulLateef (Abdul Lateef) 
; Fu, Igniculus ; Yao, Ken 
; Xing, Eric 
Subject: RE: [edk2-platforms][PATCH 2/3] Platform/AMD: Update Readme.md

[AMD Official Use Only - AMD Internal Distribution Only]

Thanks Abner for the up-stream.

Looks good to me.

-Original Message-
From: Chang, Abner 
Sent: Thursday, May 23, 2024 12:12 PM
To: devel@edk2.groups.io
Cc: Grimes, Paul ; Attar, AbdulLateef (Abdul Lateef) 
; Fu, Igniculus ; Yao, Ken 
; Xing, Eric ; Zhai, MingXin (Duke) 

Subject: [edk2-platforms][PATCH 2/3] Platform/AMD: Update Readme.md

From: Abner Chang 

Cc: Paul Grimes 
Cc: Abdul Lateef Attar 
Cc: Igniculus Fu 
Cc: Ken Yao 
Cc: Eric Xing 
Cc: Duke Zhai 
Signed-off-by: Abner Chang 
---
 Platform/AMD/Readme.md | 64 --
 1 file changed, 49 insertions(+), 15 deletions(-)

diff --git a/Platform/AMD/Readme.md b/Platform/AMD/Readme.md index 
99d2b990c7..3297c6ba59 100644
--- a/Platform/AMD/Readme.md
+++ b/Platform/AMD/Readme.md
@@ -7,18 +7,25 @@ booting certain AMD platforms. The definition of sub-folders 
is described in bel

 ## Term and Definitions

+* **AGESA**
+
+  AMD Generic Encapsulated Software Architecture that are executed as
+ part of a  host platform BIOS.
+
 * **AMD Platform** (platform in short)

-  AMD platform refers to a platform that supports the particular AMD SoC 
(processor), such as AMD EPYC Milan and Genoa processors.
+  AMD platform refers to a platform that supports the particular AMD
+ SoC (processor), such as  AMD EPYC Milan and Genoa processors.

 * **AMD Board** (board in short)

   AMD board is a generic terminology refers to a board that is designed based 
on a
   specific AMD SoC architecture (also referred as AMD platform). More than one 
boards
-  are possibly designed to support an AMD platform with different 
configuration, such as 1-processor socket or 2-processor sockets board.
+  are possibly designed to support an AMD platform with different
+ configuration, such as  1-processor socket or 2-processor sockets board.

 * **AMD edk2 Platform Package** (platform package in short)
-
+
   The folder has the AMD edk2 platform common modules.

 * **AMD edk2 Board Package** (board package in short) @@ -28,29 +35,52 @@ 
booting certain AMD platforms. The definition of sub-folders is described in bel

 ## Package Definition

+* **AgesaModulePkg**
+
+  This package contains all of the private interfaces and build
+ configuration files for the  AGESA support.
+
+* **AgesaPkg**
+
+  This package contains all of the public interfaces and build
+ configuration files  for the AGESA support.
+
+* **AmdCbsPkg**
+
+  AMD Configurable BIOS Setting. Provides the edk2 formset following
+ the UEFI HII  spec to configure BIOS settings.
+
+* **AmdCpmPkg**
+
+  AMD Common Platform Module software is a BIOS procedure library
+ designed to aid  AMD customers to quickly implement AMD platform technology 
into their products.
+
 * **AmdPlatformPkg**

-  AMD platform edk2 package under this folder provides the common edk2 modules 
those
-  are leverage by platforms. Usually those modules have no dependencies with
-  particular platforms. The module under this scope can provides a common 
implementation
-  for all platforms, or it may just provide a framework but the differences of 
implementation could be configured through the PCDs declared in 
AmdPlatformPkg.dec, or
-  the board level library provided in the \Pkg.
+  AMD platform edk2 package under this folder provides the common edk2
+ modules that are leveraged by platforms. Usually those modules have no
+ dependencies with  particular platforms. Modules under this scope can
+ provide a common implementation  for all platforms, or may just
+ provide a framework but the differences of implementation  could be
+ configured through the PCDs declared in AmdPlatformPkg.dec, or the board 
level  library provided in the \Pkg.

 * **AmdMinBoardPkg**

-  This package provides the common edk2 modules those can be leverage across 
AMD boards those use MinPlatformPkg framework.
+  This package provides the common edk2 modules that can be leveraged
+ across AMD boards using  the MinPlatform framework.

 * **\Board**

-  This is the folder named by SoC and accommodate one or multiple board 
packages those
-  are designed base on the same SoC platform. Board folder may 
contain edk2
-  package meta files directly or the sub-folders named by \Pkg 
for a
-  variety configurations of a platform.
+  This is the folder named by SoC and accommodates one or multiple
+ board packages  that are designed based on the same SoC platform. Board folder may  contain edk2 package meta 

Re: [edk2-devel] [PATCH] AMD/AmdPlatformPkg: Update AMD Vangogh platform reference code

2024-03-13 Thread Yao, Ken via groups.io
[AMD Official Use Only - General]

[AMD Official Use Only - General]

Below changes are reviewed and verified.

Reviewed-by: Ken Yao 

-Original Message-
From: Zhai, MingXin (Duke) 
Sent: Tuesday, March 12, 2024 11:06 AM
To: devel@edk2.groups.io
Cc: Yao, Ken ; Fu, Igniculus ; Chang, 
Abner ; Xing, Eric 
Subject: [PATCH] AMD/AmdPlatformPkg: Update AMD Vangogh platform reference code

From: Duke Zhai 

BZ #:4728

1.Use HPET timer to replace 8254 timer
2.Fix Bug Microcode version cannot show correctly at BIOS setup 3.Enable 
capsule at linux build 4.Update FspWrapper UPD table for BIOS setup options

Cc: Ken Yao 
Cc: Igniculus Fu 
Reviewed-by: Abner Chang 
Reviewed-by: Eric Xing 
Signed-off-by: Duke Zhai 
---
 .../BIOSImageDirectory32M.xml |  2 +-
 .../ChachaniBoardPkg/GenCapsule.bat   |  2 +-
 .../VanGoghBoard/ChachaniBoardPkg/Project.dsc |  2 -  
.../VanGoghBoard/ChachaniBoardPkg/Project.fdf |  3 +-
 .../VanGoghBoard/ChachaniBoardPkg/build.sh| 22 +-
 .../edk2/Fsp2WrapperPkg/Include/FspmUpd.h | 71 ++-
 .../FspWrapperPlatformLibSample.c | 29 
 7 files changed, 59 insertions(+), 72 deletions(-)

diff --git 
a/Platform/AMD/VanGoghBoard/ChachaniBoardPkg/BIOSImageDirectory32M.xml 
b/Platform/AMD/VanGoghBoard/ChachaniBoardPkg/BIOSImageDirectory32M.xml
index 22af6623e2..585e12d487 100644
--- a/Platform/AMD/VanGoghBoard/ChachaniBoardPkg/BIOSImageDirectory32M.xml
+++ b/Platform/AMD/VanGoghBoard/ChachaniBoardPkg/BIOSImageDirectory32M.x
+++ ml
@@ -57,7 +57,7 @@
 
 
 
-
+
 
   
 
diff --git a/Platform/AMD/VanGoghBoard/ChachaniBoardPkg/GenCapsule.bat 
b/Platform/AMD/VanGoghBoard/ChachaniBoardPkg/GenCapsule.bat
index 7dca22a4e3..c55f561772 100644
--- a/Platform/AMD/VanGoghBoard/ChachaniBoardPkg/GenCapsule.bat
+++ b/Platform/AMD/VanGoghBoard/ChachaniBoardPkg/GenCapsule.bat
@@ -36,7 +36,7 @@ if not exist %WORKSPACE%\%BIOS_FILE_NAME% (
   goto ERROR
 )

- Setup OpenSSL Command Line Environment
+echo Setup OpenSSL Command Line Environment
 if not "%OPENSSL_PATH%" == "" (
   set OPENSSL_PATH_TEMP=%OPENSSL_PATH%
 )
diff --git a/Platform/AMD/VanGoghBoard/ChachaniBoardPkg/Project.dsc 
b/Platform/AMD/VanGoghBoard/ChachaniBoardPkg/Project.dsc
index 510ce10c0c..20f06dd851 100644
--- a/Platform/AMD/VanGoghBoard/ChachaniBoardPkg/Project.dsc
+++ b/Platform/AMD/VanGoghBoard/ChachaniBoardPkg/Project.dsc
@@ -745,8 +745,6 @@
   MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf
   FatPkg/EnhancedFatDxe/Fat.inf
   PcAtChipsetPkg/HpetTimerDxe/HpetTimerDxe.inf
-  OvmfPkg/8259InterruptControllerDxe/8259.inf
-  OvmfPkg/8254TimerDxe/8254Timer.inf
   
MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableDxe/FirmwarePerformanceDxe.inf
   
MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableSmm/FirmwarePerformanceSmm.inf

diff --git a/Platform/AMD/VanGoghBoard/ChachaniBoardPkg/Project.fdf 
b/Platform/AMD/VanGoghBoard/ChachaniBoardPkg/Project.fdf
index 5194a8c10d..0d844689b3 100644
--- a/Platform/AMD/VanGoghBoard/ChachaniBoardPkg/Project.fdf
+++ b/Platform/AMD/VanGoghBoard/ChachaniBoardPkg/Project.fdf
@@ -416,8 +416,7 @@ NumBlocks = 0x100
   # Platform
   #
   INF  MdeModulePkg/Universal/BdsDxe/BdsDxe.inf
-  INF  OvmfPkg/8259InterruptControllerDxe/8259.inf
-  INF  OvmfPkg/8254TimerDxe/8254Timer.inf
+  INF  PcAtChipsetPkg/HpetTimerDxe/HpetTimerDxe.inf

   #
   # ACPI
diff --git a/Platform/AMD/VanGoghBoard/ChachaniBoardPkg/build.sh 
b/Platform/AMD/VanGoghBoard/ChachaniBoardPkg/build.sh
index f4652e91c6..0984876ef2 100644
--- a/Platform/AMD/VanGoghBoard/ChachaniBoardPkg/build.sh
+++ b/Platform/AMD/VanGoghBoard/ChachaniBoardPkg/build.sh
@@ -1,3 +1,4 @@
+#!/bin/bash
 ## @file
 # Linux build script file to launch Chachani Board BIOS build  # @@ -22,6 
+23,7 @@ export OemBoard=Chachani  export 
PLATFORM_PATH=edk2-platforms/Platform/AMD/VanGoghBoard
 export BUILD_TYPE=RELEASE
 export TOOLCHAIN_TAG=CLANGPDB
+export OTA_CAPSULE_NAME=OTACAPSULE # You need to keep this name sync
+with PlatformCapsule.fdf
 #TRUE / FALSE
 export COMPRESS_FSP_REGION=TRUE
 export KEY_MODE=TK
@@ -35,16 +37,25 @@ export NASM_PREFIX=
 export GCC5_BIN=
 #CLANG_BIN shall end with a slash.
 export CLANG_BIN=
+#OPENSSL_PATH shall end with a slash.
+export OPENSSL_PATH=

 echo "Building for ${OemBoard} board, ${BUILD_TYPE} mode with 
${TOOLCHAIN_TAG}."
-echo "IASL: ${IASL_PREFIX}iasl, NASM: ${NASM_PREFIX}nasm, GCC: ${GCC5_BIN}gcc, 
CLANG:${CLANG_BIN}clang."
+echo "IASL: ${IASL_PREFIX}iasl, NASM: ${NASM_PREFIX}nasm, GCC: ${GCC5_BIN}gcc, 
CLANG:${CLANG_BIN}clang, OPENSSL:${OPENSSL_PATH}openssl."
 [[ ${COMPRESS_FSP_REGION} == "TRUE" ]] && echo "FSP will be built with 
compress support."
 # Env check
 echo_section "Checking compilation environment"
 [[ "${IASL_PREFIX}" == "" ]] && export IASL_PREFIX=$(dirname $(which iasl))/  
[[ "${NASM_PREFIX}" == "" ]] && export NASM_PREFIX=$(dirname $(which nasm))/
+[[ "${OPENSSL_PATH}" == "" ]] && export OPENSSL_PATH=$(dirname $(which