From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.151, mailfrom: xiaoyux.lu@intel.com) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by groups.io with SMTP; Thu, 04 Jul 2019 22:57:09 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Jul 2019 22:57:09 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,453,1557212400"; d="scan'208";a="175410358" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga002.jf.intel.com with ESMTP; 04 Jul 2019 22:57:09 -0700 Received: from fmsmsx126.amr.corp.intel.com (10.18.125.43) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 4 Jul 2019 22:57:08 -0700 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by FMSMSX126.amr.corp.intel.com (10.18.125.43) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 4 Jul 2019 22:57:08 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.134]) by shsmsx102.ccr.corp.intel.com ([169.254.2.3]) with mapi id 14.03.0439.000; Fri, 5 Jul 2019 13:57:05 +0800 From: "Xiaoyu Lu" To: "Gao, Liming" , "Yao, Jiewen" , "devel@edk2.groups.io" Subject: Re: [edk2-InfSpecification PATCH] Document: Add new MODULE_TYPE HOST_APPLICATION Thread-Topic: [edk2-InfSpecification PATCH] Document: Add new MODULE_TYPE HOST_APPLICATION Thread-Index: AQHVMXhXV9ZR1a9nEUOJiv08UGX996a685wAgAAA8oCAAA5wAIAAhmoQ Date: Fri, 5 Jul 2019 05:57:05 +0000 Message-ID: References: <20190703082154.21392-1-xiaoyux.lu@intel.com> <4A89E2EF3DFEDB4C8BFDE51014F606A14E4A2B09@SHSMSX104.ccr.corp.intel.com> <74D8A39837DF1E4DA445A8C0B3885C503F6F5D40@shsmsx102.ccr.corp.intel.com> <4A89E2EF3DFEDB4C8BFDE51014F606A14E4A2BEF@SHSMSX104.ccr.corp.intel.com> In-Reply-To: <4A89E2EF3DFEDB4C8BFDE51014F606A14E4A2BEF@SHSMSX104.ccr.corp.intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: xiaoyux.lu@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable > -----Original Message----- > From: Gao, Liming > Sent: Friday, July 5, 2019 1:54 PM > To: Yao, Jiewen ; Lu, XiaoyuX > ; devel@edk2.groups.io > Subject: RE: [edk2-InfSpecification PATCH] Document: Add new > MODULE_TYPE HOST_APPLICATION >=20 > Jiewen and Xiaoyu: >=20 > > -----Original Message----- > > From: Yao, Jiewen > > Sent: Friday, July 5, 2019 1:02 PM > > To: Gao, Liming ; Lu, XiaoyuX > ; devel@edk2.groups.io > > Subject: RE: [edk2-InfSpecification PATCH] Document: Add new > MODULE_TYPE HOST_APPLICATION > > > > Answer below: > > > > > -----Original Message----- > > > From: Gao, Liming > > > Sent: Friday, July 5, 2019 12:59 PM > > > To: Lu, XiaoyuX ; devel@edk2.groups.io > > > Cc: Yao, Jiewen > > > Subject: RE: [edk2-InfSpecification PATCH] Document: Add new > > > MODULE_TYPE HOST_APPLICATION > > > > > > Xiaoyu: > > > I would like to clarify that HOST_APPLICATION is for the execute fi= le that > > > can run in OS environment directly. It may be exe for Windows or be E= LF > for > > > Linux. > > [Jiewen] That is correct. > OK. I suggest to update commit message to describe this is the executable > file instead of exe file. >=20 Agree. > > > > > And, this new type module will directly run in OS environment. So, = they > will > > > not be built into BIOS image, and not be dispatched by PeiCore, DxeCo= re > and > > > SmmCore. Right? If yes, they don't need [Depex] section. > > [Jiewen] That is correct. > OK. Please update the patch to describe there is no [Depex] section for t= his > module type. >=20 Ok. > > > > > > > > Last, can this new type be applied for EmulatorPkg\Win\Host and > > > EmulatorPkg\Unix\Host module? > > [Jiewen] Yes. > OK. Can you submit BZ for this update? >=20 > Thanks > Liming I will file a BZ for it. Thanks, Xiaoyu > > > > > > > > > > Thanks > > > Liming > > > >-----Original Message----- > > > >From: Lu, XiaoyuX > > > >Sent: Wednesday, July 03, 2019 4:22 PM > > > >To: devel@edk2.groups.io > > > >Cc: Lu, XiaoyuX ; Gao, Liming > > > ; > > > >Yao, Jiewen > > > >Subject: [edk2-InfSpecification PATCH] Document: Add new > MODULE_TYPE > > > >HOST_APPLICATION > > > > > > > >BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1952 > > > > > > > >Background: > > > >Host-based Firmware Analyzer (HBFA) is a opensouce tools enables > > > advanced > > > >testing of UEFI and UEFI PI drivers in developer's OS environment. I= t > > > >will generate OS application which can run directly in OS environmen= t. > But > > > >there is no explicit MODULE_TYPE to indicate those modules. > > > > > > > >Difference: > > > >USER_DEFINED can be anyting, exe, bin, acpi table, etc. > > > >HOST_APPLICATION identify it is exe file. > > > > > > > >Add HOST_APPLICATION module type so it's easier to identify. > > > > > > > >Cc: Liming Gao > > > >Cc: Jiewen Yao > > > >Signed-off-by: Xiaoyu Lu > > > >--- > > > > 1_introduction/12_terms.md | 4 ++-- > > > > 2_inf_overview/215_[depex]_section.md | 2 +- > > > > 2_inf_overview/26_[buildoptions]_section.md | 2 +- > > > > 3_edk_ii_inf_file_format/314_[depex]_sections.md | 6 +++--- > > > > 3_edk_ii_inf_file_format/32_component_inf_definition.md | 4 +++- > > > > 3_edk_ii_inf_file_format/34_[defines]_section.md | 6 ++++-- > > > > README.md | 3 > > > ++- > > > > appendix_f_module_types.md | 1 + > > > > 8 files changed, 17 insertions(+), 11 deletions(-) > > > > > > > >diff --git a/1_introduction/12_terms.md b/1_introduction/12_terms.md > > > >index 14827fd..ba96813 100644 > > > >--- a/1_introduction/12_terms.md > > > >+++ b/1_introduction/12_terms.md > > > >@@ -232,8 +232,8 @@ with a similar set of requirements. A module tha= t > is > > > of > > > >module type `BASE`, > > > > depends only on headers and libraries provided in the MDE, while a > module > > > >that > > > > is of module type DXE_DRIVER depends on common DXE components. > For > > > a > > > >definition > > > > of the various module types, see module type. The EDK II build syst= em > also > > > >-permits modules of type `USER_DEFINED`. These modules will not be > > > >processed by > > > >-the EDK II Build system. > > > >+permits modules of type `USER_DEFINED` and `HOST_APPLICATION`. > > > These > > > >modules > > > >+will not be processed by the EDK II Build system. > > > > > > > > **Package** > > > > > > > >diff --git a/2_inf_overview/215_[depex]_section.md > > > >b/2_inf_overview/215_[depex]_section.md > > > >index 912228f..e144d08 100644 > > > >--- a/2_inf_overview/215_[depex]_section.md > > > >+++ b/2_inf_overview/215_[depex]_section.md > > > >@@ -65,7 +65,7 @@ Additionally, the rules for specifying DEPEX secti= ons > > > are > > > >as follows. > > > > [Depex.IA32]) are not permitted. It is permitted to have a Depex > section > > > if > > > > one ModuleType modifier is specified (i.e., [Depex.common.PEIM). > > > > > > > >-* If the ModuleType is `USER_DEFINED`, then a `[Depex]` section is > > > optional. > > > >If > > > >+* If the ModuleType is `USER_DEFINED` or `HOST_APPLICATION`, then > a > > > >`[Depex]` section is optional. If > > > > a PEI, SMM or DXE DEPEX section is required, the user must specif= y a > > > > ModuleType of `PEIM` to generate a `PEI_DEPEX` section, a > > > ModuleType of > > > > `DXE_DRIVER` to generate a `DXE_DEPEX` section, or a ModuleType o= f > > > >diff --git a/2_inf_overview/26_[buildoptions]_section.md > > > >b/2_inf_overview/26_[buildoptions]_section.md > > > >index 667d8d9..5e9059c 100644 > > > >--- a/2_inf_overview/26_[buildoptions]_section.md > > > >+++ b/2_inf_overview/26_[buildoptions]_section.md > > > >@@ -74,7 +74,7 @@ shown above. > > > > | `TAGNAME` | YES | Yes =3D * | `Conf/tools_def.txt` fi= le > > > defines several > > > >different tag names - these are defined by developers; the default t= ag > > > name, > > > >`MYTOOLS`, is provided in the template for tools_def.txt and set in = the > > > >`Conf/target.txt` file. | > > > > | `ARCH` | YES | Yes =3D * | `Conf/tools_def.txt` de= fines > > > at least four > > > >architectures: `IA32`, `X64` and `EBC`. This tag must use all capita= l letters > > > for > > > >the tag. Additional Architectures, such as PPC or ARM may be added a= s > > > >support becomes available. | > > > > | `TOOLCODE` | YES | NO | The tool code must be > > > one of the defined > > > >tool codes in the `Conf/tools_def.txt` file. The flags defined in th= is > section > > > are > > > >appended to flags defined in the `tools_def.txt` file for individual= tools. > > > >| > > > >-| | | | EXCEPTION: If the INF > > > `MODULE_TYPE`, defined in the > > > >`[Defines]` section is `USER_DEFINED`, then the flags listed in this > section > > > are > > > >the only flags used for the TOOLCODE command specified in `Conf/ > > > >tools_def.txt`. | > > > >+| | | | EXCEPTION: If the INF > > > `MODULE_TYPE`, defined in > > > >the `[Defines]` section is `USER_DEFINED` or `HOST_APPLICATION`, the= n > > > the > > > >flags listed in this section are the only flags used for the TOOLCOD= E > > > command > > > >specified in `Conf/ tools_def.txt`. | > > > > | `ATTRIBUTE` | YES | NO | The attribute must be > > > specific to the tool > > > >code and must be a valid attribute handled by the build system. > > > >| > > > > > > > > Developers should use extreme caution when specifying items in this > > > section. > > > >diff --git a/3_edk_ii_inf_file_format/314_[depex]_sections.md > > > >b/3_edk_ii_inf_file_format/314_[depex]_sections.md > > > >index 02d5bb4..de307a2 100644 > > > >--- a/3_edk_ii_inf_file_format/314_[depex]_sections.md > > > >+++ b/3_edk_ii_inf_file_format/314_[depex]_sections.md > > > >@@ -84,9 +84,9 @@ of a new section or the end of file. > > > > > > > > Drivers with `MODULE_TYPE` set to `SEC`, `PEI_CORE`, `DXE_CORE`, > > > >`SMM_CORE`, > > > > `UEFI_DRIVER` and `UEFI_APPLICATION` cannot have `[Depex]` sections= . > > > >Libraries > > > >-and modules that are `USER_DEFINED` may have a `[Depex]` section. > All > > > >remaining > > > >-drivers, `PEIM`, `DXE_DRIVER`, `DXE_SAL_DRIVER`, > > > `DXE_RUNTIME_DRIVER` > > > >and > > > >-`DXE_SMM_DRIVER` module types must have a `[Depex]` section. > > > >+and modules that are `USER_DEFINED` or `HOST_APPLICATION` may > have > > > a > > > >`[Depex]` > > > >+section. All remaining drivers, `PEIM`, `DXE_DRIVER`, > `DXE_SAL_DRIVER`, > > > >+`DXE_RUNTIME_DRIVER` and `DXE_SMM_DRIVER` module types must > > > have > > > >a `[Depex]` section. > > > > > > > > Libraries of type `SEC`, `PEI_CORE`, `DXE_CORE`, `SMM_CORE and` > > > > `UEFI_APPLICATION` are not allowed to have a `[Depex]`. The > > > >`MODULE_TYPE` entry > > > >diff --git a/3_edk_ii_inf_file_format/32_component_inf_definition.md > > > >b/3_edk_ii_inf_file_format/32_component_inf_definition.md > > > >index b80218b..164771c 100644 > > > >--- a/3_edk_ii_inf_file_format/32_component_inf_definition.md > > > >+++ b/3_edk_ii_inf_file_format/32_component_inf_definition.md > > > >@@ -62,7 +62,8 @@ EBNF). > > > > if (LIBRARY_CLASS is declared in Defines Section): > > > > * > > > > elif (MODULE_TYPE =3D=3D "USER_DEFINED" > > > >- || MODULE_TYPE =3D=3D "UEFI_DRIVER"): > > > >+ || MODULE_TYPE =3D=3D "UEFI_DRIVER" > > > >+ || MODULE_TYPE =3D=3D "HOST_APPLICATION"): > > > > * > > > > elif (MODULE_TYPE =3D=3D "PEIM" > > > > || MODULE_TYPE =3D=3D "DXE_DRIVER" > > > >@@ -257,6 +258,7 @@ The following are common definitions used by > > > multiple > > > >section types. > > > > {"DXE_RUNTIME_DRIVER"} > > > {"DXE_SAL_DRIVER"} > > > > {"DXE_SMM_DRIVER"} {"UEFI_DRIVER"} > > > > {"UEFI_APPLICATION"} > > > {"USER_DEFINED"} > > > >+ {"HOST_APPLICATION"} > > > > ::=3D [" " ]* > > > > ::=3D {} {} > > > > ::=3D {} {} > > > >diff --git a/3_edk_ii_inf_file_format/34_[defines]_section.md > > > >b/3_edk_ii_inf_file_format/34_[defines]_section.md > > > >index 69be2b0..78ac58d 100644 > > > >--- a/3_edk_ii_inf_file_format/34_[defines]_section.md > > > >+++ b/3_edk_ii_inf_file_format/34_[defines]_section.md > > > >@@ -191,8 +191,10 @@ the `MODULE_UNI_FILE` entry must be a > Unicode > > > file > > > >with an extension of .uni, > > > > Drivers and applications are not allowed to have a `MODULE_TYPE` of > > > >`"BASE`". > > > > Only libraries are permitted to a have a `MODULE_TYPE` of `"BASE`".= A > INF > > > file > > > > can be used to specify other binary files types, such as logo image= s or > > > >-legacy16 option ROMs. The `USER_DEFINED` module type must be > used in > > > all > > > >cases > > > >-where the module type is not a member of ``. > > > >+legacy16 option ROMs. `HOST_APPLICATION` module should be used > to > > > >sepcify host > > > >+application that can run in OS environment directly. The > `USER_DEFINED` > > > >module type > > > >+must be used in all cases where the module type is not a member of > > > >+``. > > > > > > > > **_INF_VERSION_** > > > > > > > >diff --git a/README.md b/README.md > > > >index 6819441..60fba19 100644 > > > >--- a/README.md > > > >+++ b/README.md > > > >@@ -201,4 +201,5 @@ Copyright (c) 2007-2017, Intel Corporation. All > > > rights > > > >reserved. > > > > | | Add clarification that !error statement is not permi= tted in > > > INF file > > > >| | > > > > | | INF Spec: FixedAtBuild (VOID*) PCD use in the [DEPEX= ] > > > section > > > >| | > > > > | | > > > [#1162](https://bugzilla.tianocore.org/show_bug.cgi?id=3D1162) > > > >Correct the item in Table 1 to align with 3.4 section > > > >| | > > > >-| 1.28 | > > > [#1453](https://bugzilla.tianocore.org/show_bug.cgi?id=3D1453) > > > >Update INF spec to remove EDK related contents > > > >| Mar 2019 | > > > >\ No newline at end of file > > > >+| 1.28 | > > > [#1453](https://bugzilla.tianocore.org/show_bug.cgi?id=3D1453) > > > >Update INF spec to remove EDK related contents > > > >| Mar 2019 | > > > >+| 1.29 | > > > [#1952](https://bugzilla.tianocore.org/show_bug.cgi?id=3D1952) > > > >Add new MODULE_TYPE HOST_APPLICATION > > > >| July 2019 | > > > >diff --git a/appendix_f_module_types.md > b/appendix_f_module_types.md > > > >index 7082332..f7c2200 100644 > > > >--- a/appendix_f_module_types.md > > > >+++ b/appendix_f_module_types.md > > > >@@ -57,6 +57,7 @@ > > > > | UEFI_DRIVER | UEFI_DRIVER > > > >| .efi | This module type is used by UEFI Drivers that a= re > > > compliant with > > > >the EFI 1.10 Specification or the UEFI 2.x Specification. These modu= les > > > provide > > > >services in the boot services execution environment. UEFI Drivers th= at > > > return > > > >EFI_SUCCESS are not unloaded from memory. UEFI Drivers that return > an > > > >error are unloaded from memory. > > > >| > > > > | UEFI_APPLICATION | UEFI_APPLICATION > > > >| .efi | This module type is used by UEFI Applications t= hat > > > are compliant > > > >with the EFI 1.10 Specification or the UEFI 2.x Specification. UEFI > > > Applications > > > >are always unloaded when they exit. > > > >| > > > > | USER_DEFINED | USER_DEFINED > > > >| .bin or .rom | User defined extension > > > >| > > > >+| HOST_APPLICATION | HOST_APPLICATION > > > >| .exe or NULL | This module type is for building applications w= hich > > > can run > > > >in host OS directly. > > > >| > > > > | EFI Dependency Section | Any - the code for these sections is > > > included as > > > >part of any module, and no separate INF is required. > > > >| .dpx | This is the compiled dependency section for SMM= , > > > PEIM or DXE > > > >modules. A dependency section may also be generated from a > dependency > > > >source (.dxs) file, if specified in the `[Sources]` section. > > > >| > > > > | EFI User Interface Section | Any - the code for these sections is > included > > > as > > > >part of any module, and no separate INF is required. > > > >| .ui | This is a processed User Interface section > > > >| > > > > | EFI Version Section | Any - the code for these sections is > > > included as part > > > >of any module, and no separate INF is required. > > > >| .ver | This is a processed Version section | > > > >-- > > > >2.17.1