[edk2] [edk2-BuildSpecification PATCH] Clarify alignment requirements for VPD VOID* PCDs

Michael Kinney posted 1 patch 7 years, 6 months ago
Failed in applying to current master (apply log)
7_build_environment/73_guided_tools.md | 16 ++++++++++++++--
README.md                              |  1 +
2 files changed, 15 insertions(+), 2 deletions(-)
[edk2] [edk2-BuildSpecification PATCH] Clarify alignment requirements for VPD VOID* PCDs
Posted by Michael Kinney 7 years, 6 months ago
https://bugzilla.tianocore.org/show_bug.cgi?id=490

Clarify when error or warning messages are generated
for VOID* PCDs when VPD offset is not aligned.
Unicode string VPD PCDs must be 2-byte aligned.
Byte array {} VPD PCDs should be 8-byte aligned,
but is only a warning message if they are not 8-byte
aligned. All other data types only require
byte-alignment.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Cc: Kevin W Shaw <kevin.w.shaw@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Michael Kinney <michael.d.kinney@intel.com>
---
 7_build_environment/73_guided_tools.md | 16 ++++++++++++++--
 README.md                              |  1 +
 2 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/7_build_environment/73_guided_tools.md b/7_build_environment/73_guided_tools.md
index 878ae33..a8881d3 100644
--- a/7_build_environment/73_guided_tools.md
+++ b/7_build_environment/73_guided_tools.md
@@ -123,8 +123,20 @@ file required by the build system is provided in the appendix, VPD Tool.
 
   * ASCII strings, "string", will be byte aligned.
   * Unicode strings, L"string" will be two-byte aligned.
-  * Byte arrays, {0x00, 0x01} will be 8-byte aligned. If the developer assigns
-    offset values in the DSC file, the developer must follow the same rules.
+  * Byte arrays, {0x00, 0x01} will be 8-byte aligned.
+
+  If the developer manually assigns offset values in the DSC file, the developer
+  must follow the same rules.
+
+  **********
+  **Note:** If a developer manually sets the offset of a `VOID*` PCD with
+  Unicode string, L"string", style to a value that is not 2-byte aligned, then
+  an error is generated and the build halts.
+  **********
+  **Note:** If a developer manually sets the offset of a `VOID*` PCD with byte
+  array {} style to a value that is not 8-byte aligned, then a warning is
+  generated, but the build will continue.
+  **********
 
 2. Modify the FDF file:
 
diff --git a/README.md b/README.md
index 71c4511..8542434 100644
--- a/README.md
+++ b/README.md
@@ -203,3 +203,4 @@ Copyright (c) 2008-2017, Intel Corporation. All rights reserved.
 | 1.27       | Convert to Gitbook                                                                                                                                                                                                                                                                                                                                                  | April 2017    |
 |            | [#471](https://bugzilla.tianocore.org/show_bug.cgi?id=471) Build spec: only copy the "TianoCore" Userextension section into "As Built" INF                                                                                                                                                                                                                          |               |
 |            | [#472](https://bugzilla.tianocore.org/show_bug.cgi?id=472) [Build Spec] Extend macro usage in the !include statements for DSC/FDF files                                                                                                                                                                                                                             |               |
+|            | [#490](https://bugzilla.tianocore.org/show_bug.cgi?id=490) Build Spec: specify the alignment requirements for VOID* PCDs stored in a PCD section                                                                                                                                                                                                                    |               |
-- 
2.6.3.windows.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [edk2-BuildSpecification PATCH] Clarify alignment requirements for VPD VOID* PCDs
Posted by Zhu, Yonghong 7 years, 6 months ago
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com> 

Best Regards,
Zhu Yonghong


-----Original Message-----
From: Kinney, Michael D 
Sent: Tuesday, April 18, 2017 12:41 PM
To: edk2-devel@lists.01.org
Cc: Gao, Liming <liming.gao@intel.com>; Zhu, Yonghong <yonghong.zhu@intel.com>; Shaw, Kevin W <kevin.w.shaw@intel.com>
Subject: [edk2-BuildSpecification PATCH] Clarify alignment requirements for VPD VOID* PCDs

https://bugzilla.tianocore.org/show_bug.cgi?id=490

Clarify when error or warning messages are generated for VOID* PCDs when VPD offset is not aligned.
Unicode string VPD PCDs must be 2-byte aligned.
Byte array {} VPD PCDs should be 8-byte aligned, but is only a warning message if they are not 8-byte aligned. All other data types only require byte-alignment.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Cc: Kevin W Shaw <kevin.w.shaw@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Michael Kinney <michael.d.kinney@intel.com>
---
 7_build_environment/73_guided_tools.md | 16 ++++++++++++++--
 README.md                              |  1 +
 2 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/7_build_environment/73_guided_tools.md b/7_build_environment/73_guided_tools.md
index 878ae33..a8881d3 100644
--- a/7_build_environment/73_guided_tools.md
+++ b/7_build_environment/73_guided_tools.md
@@ -123,8 +123,20 @@ file required by the build system is provided in the appendix, VPD Tool.
 
   * ASCII strings, "string", will be byte aligned.
   * Unicode strings, L"string" will be two-byte aligned.
-  * Byte arrays, {0x00, 0x01} will be 8-byte aligned. If the developer assigns
-    offset values in the DSC file, the developer must follow the same rules.
+  * Byte arrays, {0x00, 0x01} will be 8-byte aligned.
+
+  If the developer manually assigns offset values in the DSC file, the 
+ developer  must follow the same rules.
+
+  **********
+  **Note:** If a developer manually sets the offset of a `VOID*` PCD 
+ with  Unicode string, L"string", style to a value that is not 2-byte 
+ aligned, then  an error is generated and the build halts.
+  **********
+  **Note:** If a developer manually sets the offset of a `VOID*` PCD 
+ with byte  array {} style to a value that is not 8-byte aligned, then 
+ a warning is  generated, but the build will continue.
+  **********
 
 2. Modify the FDF file:
 
diff --git a/README.md b/README.md
index 71c4511..8542434 100644
--- a/README.md
+++ b/README.md
@@ -203,3 +203,4 @@ Copyright (c) 2008-2017, Intel Corporation. All rights reserved.
 | 1.27       | Convert to Gitbook                                                                                                                                                                                                                                                                                                                                                  | April 2017    |
 |            | [#471](https://bugzilla.tianocore.org/show_bug.cgi?id=471) Build spec: only copy the "TianoCore" Userextension section into "As Built" INF                                                                                                                                                                                                                          |               |
 |            | [#472](https://bugzilla.tianocore.org/show_bug.cgi?id=472) [Build Spec] Extend macro usage in the !include statements for DSC/FDF files                                                                                                                                                                                                                             |               |
+|            | [#490](https://bugzilla.tianocore.org/show_bug.cgi?id=490) Build Spec: specify the alignment requirements for VOID* PCDs stored in a PCD section                                                                                                                                                                                                                    |               |
--
2.6.3.windows.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel