From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.24; helo=mga09.intel.com; envelope-from=liming.gao@intel.com; receiver=edk2-devel@lists.01.org Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id BFDBD2194D3AE for ; Tue, 4 Dec 2018 19:59:34 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Dec 2018 19:59:34 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,316,1539673200"; d="scan'208";a="98730828" Received: from shwde7172.ccr.corp.intel.com ([10.239.158.23]) by orsmga008.jf.intel.com with ESMTP; 04 Dec 2018 19:59:33 -0800 From: Liming Gao To: edk2-devel@lists.01.org Cc: Bi Dandan Date: Wed, 5 Dec 2018 11:59:04 +0800 Message-Id: <1543982345-13708-3-git-send-email-liming.gao@intel.com> X-Mailer: git-send-email 2.8.0.windows.1 In-Reply-To: <1543982345-13708-1-git-send-email-liming.gao@intel.com> References: <1543982345-13708-1-git-send-email-liming.gao@intel.com> Subject: [Patch] ModuleWriteGuide: Add notes to define library instance module type X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Dec 2018 03:59:35 -0000 https://bugzilla.tianocore.org/show_bug.cgi?id=834 If the library instance supports the cross module types PEIM, UEFI_DIRVER, DXE_DRIVER. Its module type can be PEIM or UEFI_DRIVER or DXE_DRIVER. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao Cc: Bi Dandan --- 3_module_development/31_what_is_an_edk_ii_module.md | 2 ++ 3_module_development/32_creating_a_module.md | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/3_module_development/31_what_is_an_edk_ii_module.md b/3_module_development/31_what_is_an_edk_ii_module.md index ace8d53..9f0fe8d 100644 --- a/3_module_development/31_what_is_an_edk_ii_module.md +++ b/3_module_development/31_what_is_an_edk_ii_module.md @@ -78,6 +78,8 @@ EDK II defines many module types. The module type is used to: example, a PEIM/DXE_DRIVER type module can have "depex" section in .efi binary image; a UEFI_DRIVER can have .ui or .ver section in .efi binary image; +* Indicate EntryPoint() or Constructor() API for different types of modules. + * Indicate the suitable library instance for different types of modules. A library instance will point out what module types are supported in INF file. diff --git a/3_module_development/32_creating_a_module.md b/3_module_development/32_creating_a_module.md index 65a4ac7..325156f 100644 --- a/3_module_development/32_creating_a_module.md +++ b/3_module_development/32_creating_a_module.md @@ -197,6 +197,11 @@ instance: DebugLib ``` +Note: if the library supports the cross module types PEIM, UEFI_DIRVER, DXE_DRIVER. +Its module type can be PEIM or UEFI_DRIVER or DXE_DRIVER. If it has the library +constructor, its module type must be BASE. BASE type library constructor has no +the input parameter that can link to the cross driver types. + ### 3.2.3 Adding a Package Dependency The [Packages] section of the INF file describes all packages dependencies of -- 2.13.0.windows.1