public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Jiewen Yao <jiewen.yao@intel.com>
To: edk2-devel@lists.01.org
Cc: Jeff Fan <jeff.fan@intel.com>, Feng Tian <feng.tian@intel.com>,
	Star Zeng <star.zeng@intel.com>,
	Michael D Kinney <michael.d.kinney@intel.com>,
	Liming Gao <liming.gao@intel.com>,
	Chao Zhang <chao.b.zhang@intel.com>
Subject: [PATCH V6 6/7] UefiCpuPkg/MicrocodeUpdate: Add Microcode FMP build sample
Date: Fri, 28 Oct 2016 13:50:27 +0800	[thread overview]
Message-ID: <1477633828-15320-7-git-send-email-jiewen.yao@intel.com> (raw)
In-Reply-To: <1477633828-15320-1-git-send-email-jiewen.yao@intel.com>

This folder provides the sample build for Microcode FMP.
The INF is to convert the text format Microcode to binary.
The DSC/FDF is to convert the Microcode binary 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>
---
 UefiCpuPkg/MicrocodeUpdate/SampleBuild/MicrocodePkg/Microcode/Microcode.inf | 25 ++++++++++++
 UefiCpuPkg/MicrocodeUpdate/SampleBuild/MicrocodePkg/MicrocodeFmpPkg.dsc     | 23 +++++++++++
 UefiCpuPkg/MicrocodeUpdate/SampleBuild/MicrocodePkg/MicrocodeFmpPkg.fdf     | 40 ++++++++++++++++++++
 UefiCpuPkg/MicrocodeUpdate/SampleBuild/MicrocodePkg/MicrocodePkg.dsc        | 25 ++++++++++++
 4 files changed, 113 insertions(+)

diff --git a/UefiCpuPkg/MicrocodeUpdate/SampleBuild/MicrocodePkg/Microcode/Microcode.inf b/UefiCpuPkg/MicrocodeUpdate/SampleBuild/MicrocodePkg/Microcode/Microcode.inf
new file mode 100644
index 0000000..00afe62
--- /dev/null
+++ b/UefiCpuPkg/MicrocodeUpdate/SampleBuild/MicrocodePkg/Microcode/Microcode.inf
@@ -0,0 +1,25 @@
+## @file
+# Microcode text file to binary
+#
+# Convert text format microcode to binary format.
+#
+#  Copyright (c) 2016, Intel Corporation. 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.
+#
+##
+
+[Defines]
+BASE_NAME            = Microcode
+FILE_GUID            = ABC36AAC-2031-4422-896E-0A3B899AD0B4
+COMPONENT_TYPE       = Microcode 
+FFS_EXT              = .ffs
+
+[Sources]
+Microcode1.inc
+Microcode2.inc
diff --git a/UefiCpuPkg/MicrocodeUpdate/SampleBuild/MicrocodePkg/MicrocodeFmpPkg.dsc b/UefiCpuPkg/MicrocodeUpdate/SampleBuild/MicrocodePkg/MicrocodeFmpPkg.dsc
new file mode 100644
index 0000000..081122b
--- /dev/null
+++ b/UefiCpuPkg/MicrocodeUpdate/SampleBuild/MicrocodePkg/MicrocodeFmpPkg.dsc
@@ -0,0 +1,23 @@
+## @file
+#
+# Copyright (c) 2016, Intel Corporation. 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.
+#
+##
+
+[Defines]
+  PLATFORM_NAME                  = MicrocodeFmpPkg
+  PLATFORM_GUID                  = 6875FD33-602E-4EF9-9DF2-8BA7D8B7A7AF
+  PLATFORM_VERSION               = 0.1
+  FLASH_DEFINITION               = MicrocodePkg/MicrocodeFmpPkg.fdf
+  OUTPUT_DIRECTORY               = Build/MicrocodePkg
+  SUPPORTED_ARCHITECTURES        = IA32|X64
+  BUILD_TARGETS                  = DEBUG|RELEASE
+  SKUID_IDENTIFIER               = DEFAULT
diff --git a/UefiCpuPkg/MicrocodeUpdate/SampleBuild/MicrocodePkg/MicrocodeFmpPkg.fdf b/UefiCpuPkg/MicrocodeUpdate/SampleBuild/MicrocodePkg/MicrocodeFmpPkg.fdf
new file mode 100644
index 0000000..0436090
--- /dev/null
+++ b/UefiCpuPkg/MicrocodeUpdate/SampleBuild/MicrocodePkg/MicrocodeFmpPkg.fdf
@@ -0,0 +1,40 @@
+## @file
+#
+# Copyright (c) 2016, Intel Corporation. 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.
+#
+##
+
+[FmpPayload.FmpPayloadMicrocode1]
+IMAGE_HEADER_INIT_VERSION = 0x02
+IMAGE_TYPE_ID             = 96d4fdcd-1502-424d-9d4c-9b12d2dcae5c # Microcode GUID (do not change it)
+IMAGE_INDEX               = 0x1
+HARDWARE_INSTANCE         = 0x0
+
+FILE DATA = $(WORKSPACE)/$(OUTPUT_DIRECTORY)/$(TARGET)_$(TOOL_CHAIN_TAG)/IA32/MicrocodePkg/Microcode/Microcode/OUTPUT/Microcode1.mcb
+#FILE DATA = MicrocodePkg/Microcode/Microcode1.mcb
+
+[FmpPayload.FmpPayloadMicrocode2]
+IMAGE_HEADER_INIT_VERSION = 0x02
+IMAGE_TYPE_ID             = 96d4fdcd-1502-424d-9d4c-9b12d2dcae5c # Microcode GUID (do not change it)
+IMAGE_INDEX               = 0x2
+HARDWARE_INSTANCE         = 0x0
+
+FILE DATA = $(WORKSPACE)/$(OUTPUT_DIRECTORY)/$(TARGET)_$(TOOL_CHAIN_TAG)/IA32/MicrocodePkg/Microcode/Microcode/OUTPUT/Microcode2.mcb
+#FILE DATA = MicrocodePkg/Microcode/Microcode2.mcb
+
+[Capsule.MicrocodeCapsule]
+CAPSULE_GUID                = 6dcbd5ed-e82d-4c44-bda1-7194199ad92a # FMP special Guid (do not change it)
+CAPSULE_FLAGS               = PersistAcrossReset,InitiateReset
+CAPSULE_HEADER_SIZE         = 0x20
+CAPSULE_HEADER_INIT_VERSION = 0x1
+
+FMP_PAYLOAD = FmpPayloadMicrocode1
+FMP_PAYLOAD = FmpPayloadMicrocode2
diff --git a/UefiCpuPkg/MicrocodeUpdate/SampleBuild/MicrocodePkg/MicrocodePkg.dsc b/UefiCpuPkg/MicrocodeUpdate/SampleBuild/MicrocodePkg/MicrocodePkg.dsc
new file mode 100644
index 0000000..3572a47
--- /dev/null
+++ b/UefiCpuPkg/MicrocodeUpdate/SampleBuild/MicrocodePkg/MicrocodePkg.dsc
@@ -0,0 +1,25 @@
+## @file
+#
+# Copyright (c) 2016, Intel Corporation. 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.
+#
+##
+
+[Defines]
+  PLATFORM_NAME                  = MicrocodePkg
+  PLATFORM_GUID                  = 89495A67-A67B-4DC8-8277-679CA6D930CB
+  PLATFORM_VERSION               = 0.1
+  OUTPUT_DIRECTORY               = Build/MicrocodePkg
+  SUPPORTED_ARCHITECTURES        = IA32|X64
+  BUILD_TARGETS                  = DEBUG|RELEASE
+  SKUID_IDENTIFIER               = DEFAULT
+
+[Components]
+  MicrocodePkg/Microcode/Microcode.inf
-- 
2.7.4.windows.1



  parent reply	other threads:[~2016-10-28  6:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-28  5:50 [PATCH V6 0/7] Add MicrocodeUpdate support Jiewen Yao
2016-10-28  5:50 ` [PATCH V6 1/7] UefiCpuPkg/Include: Add Microcode FMP definition Jiewen Yao
2016-10-28  5:50 ` [PATCH V6 2/7] UefiCpuPkg/Include: Add MicrocodeFlashAccessLib header Jiewen Yao
2016-10-28  5:50 ` [PATCH V6 3/7] UefiCpuPkg/UefiCpuPkg.dec: Add Microcode capsule related definition Jiewen Yao
2016-10-28  5:50 ` [PATCH V6 4/7] UefiCpuPkg/MicrocodeFlashAccessLib: Add NULL MicrocodeFlashAccessLib Jiewen Yao
2016-10-28  5:50 ` [PATCH V6 5/7] UefiCpuPkg/MicrocodeUpdate: Add MicrocodeUpdate component Jiewen Yao
2016-10-28  5:50 ` Jiewen Yao [this message]
2016-10-28  5:50 ` [PATCH V6 7/7] UefiCpuPkg/UefiCpuPkg.dsc: Add MicrocodeCapsule related component Jiewen Yao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1477633828-15320-7-git-send-email-jiewen.yao@intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox