]> git.proxmox.com Git - mirror_edk2.git/commitdiff
UefiCpuPkg/MicrocodeUpdate: Add Microcode FMP build sample
authorJiewen Yao <jiewen.yao@intel.com>
Fri, 28 Oct 2016 05:09:29 +0000 (13:09 +0800)
committerJiewen Yao <jiewen.yao@intel.com>
Tue, 8 Nov 2016 14:43:24 +0000 (22:43 +0800)
This folder provides the sample build for Microcode FMP.
The DSC/FDF is to convert the Microcode binary/text to Microcode FMP.

Cc: Jeff Fan <jeff.fan@intel.com>
Cc: Feng Tian <feng.tian@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Chao Zhang <chao.b.zhang@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
UefiCpuPkg/Feature/Capsule/MicrocodeCapsulePdb/MicrocodeCapsulePdb.dsc [new file with mode: 0644]
UefiCpuPkg/Feature/Capsule/MicrocodeCapsulePdb/MicrocodeCapsulePdb.fdf [new file with mode: 0644]
UefiCpuPkg/Feature/Capsule/MicrocodeCapsulePdb/Readme.md [new file with mode: 0644]
UefiCpuPkg/Feature/Capsule/MicrocodeCapsuleTxt/Microcode/Microcode.inf [new file with mode: 0644]
UefiCpuPkg/Feature/Capsule/MicrocodeCapsuleTxt/MicrocodeCapsuleTxt.dsc [new file with mode: 0644]
UefiCpuPkg/Feature/Capsule/MicrocodeCapsuleTxt/MicrocodeCapsuleTxt.fdf [new file with mode: 0644]
UefiCpuPkg/Feature/Capsule/MicrocodeCapsuleTxt/Readme.md [new file with mode: 0644]

diff --git a/UefiCpuPkg/Feature/Capsule/MicrocodeCapsulePdb/MicrocodeCapsulePdb.dsc b/UefiCpuPkg/Feature/Capsule/MicrocodeCapsulePdb/MicrocodeCapsulePdb.dsc
new file mode 100644 (file)
index 0000000..b8ab08d
--- /dev/null
@@ -0,0 +1,32 @@
+## @file\r
+#\r
+# Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>\r
+#\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
+#\r
+##\r
+\r
+[Defines]\r
+#\r
+# Uncomment the following line and update with your platform pkg name\r
+#\r
+#  PLATFORM_NAME                  = <PlatformPkg>\r
+  PLATFORM_GUID                  = 6875FD33-602E-4EF9-9DF2-8BA7D8B7A7AF\r
+  PLATFORM_VERSION               = 0.1\r
+#\r
+# Uncomment the following line and update with your platform pkg name\r
+#\r
+#  FLASH_DEFINITION               = <PlatformPkg>/MicrocodeCapsulePdb/MicrocodeCapsulePdb.fdf\r
+#\r
+# Uncomment the following line and update with your platform pkg name\r
+#\r
+#  OUTPUT_DIRECTORY               = Build/<PlatformPkg>\r
+  SUPPORTED_ARCHITECTURES        = IA32|X64\r
+  BUILD_TARGETS                  = DEBUG|RELEASE\r
+  SKUID_IDENTIFIER               = DEFAULT\r
diff --git a/UefiCpuPkg/Feature/Capsule/MicrocodeCapsulePdb/MicrocodeCapsulePdb.fdf b/UefiCpuPkg/Feature/Capsule/MicrocodeCapsulePdb/MicrocodeCapsulePdb.fdf
new file mode 100644 (file)
index 0000000..f171604
--- /dev/null
@@ -0,0 +1,32 @@
+## @file\r
+#\r
+# Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>\r
+#\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
+#\r
+##\r
+\r
+[FmpPayload.FmpPayloadMicrocode1]\r
+IMAGE_HEADER_INIT_VERSION = 0x02\r
+IMAGE_TYPE_ID             = 96d4fdcd-1502-424d-9d4c-9b12d2dcae5c # Microcode GUID (do not change it)\r
+IMAGE_INDEX               = 0x1\r
+HARDWARE_INSTANCE         = 0x0\r
+\r
+#\r
+# Uncomment the following line and update with path to Microcode PDB file\r
+#\r
+#FILE DATA = $(WORKSPACE)/<PlatformPkg>/Microcode/Microcode.pdb\r
+\r
+[Capsule.MicrocodeCapsule]\r
+CAPSULE_GUID                = 6dcbd5ed-e82d-4c44-bda1-7194199ad92a # FMP special Guid (do not change it)\r
+CAPSULE_FLAGS               = PersistAcrossReset,InitiateReset\r
+CAPSULE_HEADER_SIZE         = 0x20\r
+CAPSULE_HEADER_INIT_VERSION = 0x1\r
+\r
+FMP_PAYLOAD = FmpPayloadMicrocode1\r
diff --git a/UefiCpuPkg/Feature/Capsule/MicrocodeCapsulePdb/Readme.md b/UefiCpuPkg/Feature/Capsule/MicrocodeCapsulePdb/Readme.md
new file mode 100644 (file)
index 0000000..9f81373
--- /dev/null
@@ -0,0 +1,20 @@
+# How to generate Microcode FMP from Microcode PDB file\r
+\r
+1) Copy directory `UefiCpuPkg/Feature/Capsule/MicrocodeUpdatePdb` to `<Your Platform Package>/MicrocodeUpdatePdb`.\r
+\r
+2) Uncomment and update `FILE DATA` statement in `<Your Platform Package>/MicrocodeUpdatePdb/MicrocodeCapsulePdb.fdf` with path to a Microcode PDB file.  The PDB file can placed in `<Your Platform Package>/MicrocodeUpdatePdb` or any other path.\r
+\r
+`FILE DATA = <your Microcode PDB file path>`\r
+\r
+Uncomment and update `PLATFORM_NAME`, `FLASH_DEFINITION`, `OUTPUT_DIRECTORY` section in `<Your Platform Package>/MicrocodeUpdatePdb/MicrocodeCapsulePdb.dsc` with <Your Platform Package>.\r
+\r
+    PLATFORM_NAME                  = <Your Platform Package>\r
+    FLASH_DEFINITION               = <Your Platform Package>/MicrocodeCapsulePdb/MicrocodeCapsulePdb.fdf\r
+    OUTPUT_DIRECTORY               = Build/<Your Platform Package>\r
+\r
+3) Use EDK II build tools to generate the Microcode FMP Capsule\r
+\r
+`build -p <Your Platform Package>/MicrocodeCapsulePdb/MicrocodeCapsulePdb.dsc`\r
+\r
+4) The Microcode FMP Capsule is generated at `$(WORKSPACE)/$(OUTPUT_DIRECTORY)/$(TARGET)_$(TOOL_CHAIN_TAG)/FV/MicrocodeCapsule.Cap`\r
+\r
diff --git a/UefiCpuPkg/Feature/Capsule/MicrocodeCapsuleTxt/Microcode/Microcode.inf b/UefiCpuPkg/Feature/Capsule/MicrocodeCapsuleTxt/Microcode/Microcode.inf
new file mode 100644 (file)
index 0000000..81af841
--- /dev/null
@@ -0,0 +1,27 @@
+## @file\r
+# Microcode text file to binary\r
+#\r
+# Convert text format microcode to binary format.\r
+#\r
+#  Copyright (c) 2016, 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
+#\r
+##\r
+\r
+[Defines]\r
+BASE_NAME            = Microcode\r
+FILE_GUID            = ABC36AAC-2031-4422-896E-0A3B899AD0B4\r
+COMPONENT_TYPE       = Microcode\r
+FFS_EXT              = .ffs\r
+\r
+[Sources]\r
+#\r
+# Uncomment the following line and update with name of Microcode TXT file\r
+#\r
+#Microcode.txt\r
diff --git a/UefiCpuPkg/Feature/Capsule/MicrocodeCapsuleTxt/MicrocodeCapsuleTxt.dsc b/UefiCpuPkg/Feature/Capsule/MicrocodeCapsuleTxt/MicrocodeCapsuleTxt.dsc
new file mode 100644 (file)
index 0000000..9b7e026
--- /dev/null
@@ -0,0 +1,38 @@
+## @file\r
+#\r
+# Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>\r
+#\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
+#\r
+##\r
+\r
+[Defines]\r
+#\r
+# Uncomment the following line and update with your platform pkg name\r
+#\r
+#  PLATFORM_NAME                  = <PlatformPkg>\r
+  PLATFORM_GUID                  = 6875FD33-602E-4EF9-9DF2-8BA7D8B7A7AF\r
+  PLATFORM_VERSION               = 0.1\r
+#\r
+# Uncomment the following line and update with your platform pkg name\r
+#\r
+#  FLASH_DEFINITION               = <PlatformPkg>/MicrocodeCapsuleTxt/MicrocodeCapsuleTxt.fdf\r
+#\r
+# Uncomment the following line and update with your platform pkg name\r
+#\r
+#  OUTPUT_DIRECTORY               = Build/<PlatformPkg>\r
+  SUPPORTED_ARCHITECTURES        = IA32|X64\r
+  BUILD_TARGETS                  = DEBUG|RELEASE\r
+  SKUID_IDENTIFIER               = DEFAULT\r
+\r
+[Components]\r
+#\r
+# Uncomment the following line and update with path to Microcode INF file\r
+#\r
+#  <PlatformPkg>/MicrocodeCapsuleTxt/Microcode/Microcode.inf\r
diff --git a/UefiCpuPkg/Feature/Capsule/MicrocodeCapsuleTxt/MicrocodeCapsuleTxt.fdf b/UefiCpuPkg/Feature/Capsule/MicrocodeCapsuleTxt/MicrocodeCapsuleTxt.fdf
new file mode 100644 (file)
index 0000000..113693b
--- /dev/null
@@ -0,0 +1,32 @@
+## @file\r
+#\r
+# Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>\r
+#\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
+#\r
+##\r
+\r
+[FmpPayload.FmpPayloadMicrocode1]\r
+IMAGE_HEADER_INIT_VERSION = 0x02\r
+IMAGE_TYPE_ID             = 96d4fdcd-1502-424d-9d4c-9b12d2dcae5c # Microcode GUID (do not change it)\r
+IMAGE_INDEX               = 0x1\r
+HARDWARE_INSTANCE         = 0x0\r
+\r
+#\r
+# Uncomment the following line and update with path to Microcode MCB file\r
+#\r
+#FILE DATA = $(OUTPUT_DIRECTORY)/$(TARGET)_$(TOOL_CHAIN_TAG)/IA32/PlatformPkg/MicrocodeCapsuleTxt/Microcode/Microcode/OUTPUT/Microcode.mcb\r
+\r
+[Capsule.MicrocodeCapsule]\r
+CAPSULE_GUID                = 6dcbd5ed-e82d-4c44-bda1-7194199ad92a # FMP special Guid (do not change it)\r
+CAPSULE_FLAGS               = PersistAcrossReset,InitiateReset\r
+CAPSULE_HEADER_SIZE         = 0x20\r
+CAPSULE_HEADER_INIT_VERSION = 0x1\r
+\r
+FMP_PAYLOAD = FmpPayloadMicrocode1\r
diff --git a/UefiCpuPkg/Feature/Capsule/MicrocodeCapsuleTxt/Readme.md b/UefiCpuPkg/Feature/Capsule/MicrocodeCapsuleTxt/Readme.md
new file mode 100644 (file)
index 0000000..f7d7040
--- /dev/null
@@ -0,0 +1,33 @@
+# How to generate Microcode FMP from Microcode TXT file\r
+\r
+1) Copy directory `UefiCpuPkg/Feature/Capsule/MicrocodeUpdateTxt` to `<Your Platform Package>/MicrocodeUpdateTxt`\r
+\r
+2) Copy microcode TXT file to`<Your Platform Package>/MicrocodeUpdateTxt/Microcode`\r
+\r
+3) Uncomment and update statement in `[Sources]` section of `<Your Platform Package>/MicrocodeUpdateTxt/Microcode/Microcode.inf` with name of Microcode TXT file copied in previous step.\r
+\r
+    [Sources]\r
+    <Your Microcode TXT file>\r
+\r
+Uncomment and update `FILE DATA` statement in `<Your Platform Package>/MicrocodeUpdateTxt/MicrocodeCapsuleTxt.fdf` with path to a Microcode MCB file.  The MCB file is placed in `$(WORKSPACE)/$(OUTPUT_DIRECTORY)/$(TARGET)_$(TOOL_CHAIN_TAG)/IA32/<Your Platform Package>/MicrocodeUpdateTxt/Microcode/Microcode/OUTPUT/`.\r
+\r
+`FILE DATA = <your Microcode MCB file path>`\r
+\r
+Uncomment and update `PLATFORM_NAME`, `FLASH_DEFINITION`, `OUTPUT_DIRECTORY` section in `<Your Platform Package>/MicrocodeUpdateTxt/MicrocodeCapsuleTxt.dsc` with <Your Platform Package>.\r
+\r
+    PLATFORM_NAME                  = <Your Platform Package>\r
+    FLASH_DEFINITION               = <Your Platform Package>/MicrocodeCapsuleTxt/MicrocodeCapsuleTxt.fdf\r
+    OUTPUT_DIRECTORY               = Build/<Your Platform Package>\r
+\r
+Uncomment and update statement in `Components` section of `<Your Platform Package>/MicrocodeUpdateTxt/MicrocodeCapsuleTxt.dsc` with path to a Microcode INF file.\r
+\r
+    [Components]\r
+    <Your Microcode INF file>\r
+\r
+4) Use EDK II build tools to generate the Microcode FMP Capsule\r
+\r
+`build -p <Your Platform Package>/MicrocodeCapsuleTxt/MicrocodeCapsuleTxt.dsc`\r
+\r
+5) The generated Microcode FMP Capsule is found at `$(WORKSPACE)/$(OUTPUT_DIRECTORY)/$(TARGET)_$(TOOL_CHAIN_TAG)/FV/MicrocodeCapsule.Cap`\r
+\r
+\r