Cc: Liming Gao <[email protected]>
Cc: Michael Kinney <[email protected]>
Cc: Kevin W Shaw <[email protected]>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Yonghong Zhu <[email protected]>
---
 .../22_flash_description_file_format.md            | 17 +++++++++++-
 3_edk_ii_fdf_file_format/32_fdf_definition.md      | 30 +++++++++++++++++++++-
 README.md                                          |  1 +
 3 files changed, 46 insertions(+), 2 deletions(-)

diff --git a/2_fdf_design_discussion/22_flash_description_file_format.md 
b/2_fdf_design_discussion/22_flash_description_file_format.md
index 368ce32..8b29fda 100644
--- a/2_fdf_design_discussion/22_flash_description_file_format.md
+++ b/2_fdf_design_discussion/22_flash_description_file_format.md
@@ -615,11 +615,26 @@ The following is an example of conditional statements.
   # FOO is not defined while BARFOO is either NOT defined or does not
   # equal "FOOBAR"
 !endif
 ```
 
-### 2.2.9 Expressions
+### 2.2.9 !error Statement
+
+The `!error` statement may appear within any section of EDK II FDF file. The
+argument of this statement is an error message, it causes build tool to stop
+at the location where the statement is encountered and error message following
+the `!error` statement is output as a message.
+
+The following example show the valid usage of the `!error` statement.
+
+```ini
+!if $(FEATURE_ENABLE) == TRUE
+  !error "unsupported feature!"
+!endif
+```
+
+### 2.2.10 Expressions
 
 Expressions can be used in conditional directive comparison statements and in
 value fields for Macros and PCDs in the DSC and FDF files.
 
 Expressions follow C relation, equality, logical and bitwise precedence and
diff --git a/3_edk_ii_fdf_file_format/32_fdf_definition.md 
b/3_edk_ii_fdf_file_format/32_fdf_definition.md
index 1379db4..a097751 100644
--- a/3_edk_ii_fdf_file_format/32_fdf_definition.md
+++ b/3_edk_ii_fdf_file_format/32_fdf_definition.md
@@ -1,9 +1,9 @@
 <!--- @file
   3.2 FDF Definition
 
-  Copyright (c) 2006-2017, Intel Corporation. All rights reserved.<BR>
+  Copyright (c) 2006-2018, Intel Corporation. All rights reserved.<BR>
 
   Redistribution and use in source (original document form) and 'compiled'
   forms (converted to PDF, epub, HTML and other formats) with or without
   modification, are permitted provided that the following conditions are met:
 
@@ -663,5 +663,33 @@ build system must exit with an appropriate error message.
 !include myPlatform/NvRamDefs.txt
 !include myFeatures.mak
 !include $(WORKSPACE)/PackageDir/Features.dsc
 !include $(MACRO1)/AnotherDir/$(MACRO2)/Features.dsc
 ```
+
+### 3.2.5 !error Statements
+
+Use of this statement is optional.
+
+#### Summary
+This section defines the `!error` statement in EDK II FDF files.
+This statement is used to cause build tool to stop at the location where the
+statement is encountered and error message following the `!error` statement
+is output as a message.
+
+#### Prototype
+
+`<ErrorStatement> ::= <TS> "!error" <MTS> <ErrorMessage> <EOL>`
+`<ErrorMessage>   ::= <AsciiString>`
+
+#### Parameters
+
+**_ErrorMessage_**
+
+It should in the same line with `!error` statement, and it can consist of 
several
+words not necessarily in quotes.
+
+#### Example (EDK II FDF)
+
+```
+!error "unsupported feature!"
+```
\ No newline at end of file
diff --git a/README.md b/README.md
index 7615e05..042e2ca 100644
--- a/README.md
+++ b/README.md
@@ -209,5 +209,6 @@ Copyright (c) 2006-2017, Intel Corporation. All rights 
reserved.
 |            | [#520](https://bugzilla.tianocore.org/show_bug.cgi?id=520) FDF 
spec: Update Precedence of PCD Values                                           
                            |               |
 |            | [#585](https://bugzilla.tianocore.org/show_bug.cgi?id=585) FDF 
Spec: Update the FDF_SPECIFICATION version to 0x0001001B or 1.27                
                            |               |
 | 1.28       | Update version to 1.28                                          
                                                                                
                           | March 2018    |
 |            | Per PI 1.6 to extend FFS alignment to 16M                       
                                                                                
                           |               |
 |            | Per PI 1.6 to support FV extended header entry contain the used 
size of FV                                                                      
                           |               |
+|            | Add !error statement section                                    
                                                                                
                           |               |
-- 
2.6.1.windows.1

_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to