REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3440
The definition of EFI_MM_RESERVED_MMRAM_REGION, according to PI Spec 1.5
is also referenced in EFI_PEI_MM_CONFIGURATION_PPI. Defining this
structure as is will enforce any potential usage of MM Configuration PPI
interface to include <Protocol/MmConfiguration.h>.
This change moves EFI_MM_RESERVED_MMRAM_REGION definition into PiMmCis.h,
which is already included in Protocol/MmConfiguration.h. It also paves
way for introducing Ppi/MmConfiguration.h with proper dependency.
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Cc: Michael Kubacki <michael.kubacki@microsoft.com>
Signed-off-by: Kun Qin <kuqin12@gmail.com>
---
MdePkg/Include/Pi/PiMmCis.h | 16 ++++++++++++++++
MdePkg/Include/Protocol/MmConfiguration.h | 16 ----------------
2 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/MdePkg/Include/Pi/PiMmCis.h b/MdePkg/Include/Pi/PiMmCis.h
index fdf0591a03d6..422a3ea6c2bb 100644
--- a/MdePkg/Include/Pi/PiMmCis.h
+++ b/MdePkg/Include/Pi/PiMmCis.h
@@ -242,6 +242,22 @@ VOID
IN CONST EFI_MM_ENTRY_CONTEXT *MmEntryContext
);
+///
+/// Structure describing a MMRAM region which cannot be used for the MMRAM heap.
+///
+typedef struct _EFI_MM_RESERVED_MMRAM_REGION {
+ ///
+ /// Starting address of the reserved MMRAM area, as it appears while MMRAM is open.
+ /// Ignored if MmramReservedSize is 0.
+ ///
+ EFI_PHYSICAL_ADDRESS MmramReservedStart;
+ ///
+ /// Number of bytes occupied by the reserved MMRAM area. A size of zero indicates the
+ /// last MMRAM area.
+ ///
+ UINT64 MmramReservedSize;
+} EFI_MM_RESERVED_MMRAM_REGION;
+
///
/// Management Mode System Table (MMST)
///
diff --git a/MdePkg/Include/Protocol/MmConfiguration.h b/MdePkg/Include/Protocol/MmConfiguration.h
index eeb94f64bdf7..d2fb6a13d4af 100644
--- a/MdePkg/Include/Protocol/MmConfiguration.h
+++ b/MdePkg/Include/Protocol/MmConfiguration.h
@@ -21,22 +21,6 @@
0x26eeb3de, 0xb689, 0x492e, {0x80, 0xf0, 0xbe, 0x8b, 0xd7, 0xda, 0x4b, 0xa7 } \
}
-///
-/// Structure describing a MMRAM region which cannot be used for the MMRAM heap.
-///
-typedef struct _EFI_MM_RESERVED_MMRAM_REGION {
- ///
- /// Starting address of the reserved MMRAM area, as it appears while MMRAM is open.
- /// Ignored if MmramReservedSize is 0.
- ///
- EFI_PHYSICAL_ADDRESS MmramReservedStart;
- ///
- /// Number of bytes occupied by the reserved MMRAM area. A size of zero indicates the
- /// last MMRAM area.
- ///
- UINT64 MmramReservedSize;
-} EFI_MM_RESERVED_MMRAM_REGION;
-
typedef struct _EFI_MM_CONFIGURATION_PROTOCOL EFI_MM_CONFIGURATION_PROTOCOL;
/**
--
2.31.1.windows.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#76749): https://edk2.groups.io/g/devel/message/76749
Mute This Topic: https://groups.io/mt/83624719/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Kun:
There is one header file edk2\MdePkg\Include\PiMultiPhase.h for this
purpose. Can you place the common definition to it?
Thanks
Liming
> -----邮件原件-----
> 发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表 Kun Qin
> 发送时间: 2021年6月18日 17:48
> 收件人: devel@edk2.groups.io
> 抄送: Michael D Kinney <michael.d.kinney@intel.com>; Liming Gao
> <gaoliming@byosoft.com.cn>; Zhiguang Liu <zhiguang.liu@intel.com>;
> Michael Kubacki <michael.kubacki@microsoft.com>
> 主题: [edk2-devel] [PATCH v1 1/2] MdePkg: MmConfiguration: Moved
> EFI_MM_RESERVED_MMRAM_REGION to PiMmCis.h
>
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3440
>
> The definition of EFI_MM_RESERVED_MMRAM_REGION, according to PI Spec
> 1.5
> is also referenced in EFI_PEI_MM_CONFIGURATION_PPI. Defining this
> structure as is will enforce any potential usage of MM Configuration PPI
> interface to include <Protocol/MmConfiguration.h>.
>
> This change moves EFI_MM_RESERVED_MMRAM_REGION definition into
> PiMmCis.h,
> which is already included in Protocol/MmConfiguration.h. It also paves
> way for introducing Ppi/MmConfiguration.h with proper dependency.
>
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Cc: Zhiguang Liu <zhiguang.liu@intel.com>
> Cc: Michael Kubacki <michael.kubacki@microsoft.com>
>
> Signed-off-by: Kun Qin <kuqin12@gmail.com>
> ---
> MdePkg/Include/Pi/PiMmCis.h | 16 ++++++++++++++++
> MdePkg/Include/Protocol/MmConfiguration.h | 16 ----------------
> 2 files changed, 16 insertions(+), 16 deletions(-)
>
> diff --git a/MdePkg/Include/Pi/PiMmCis.h b/MdePkg/Include/Pi/PiMmCis.h
> index fdf0591a03d6..422a3ea6c2bb 100644
> --- a/MdePkg/Include/Pi/PiMmCis.h
> +++ b/MdePkg/Include/Pi/PiMmCis.h
> @@ -242,6 +242,22 @@ VOID
> IN CONST EFI_MM_ENTRY_CONTEXT *MmEntryContext
> );
>
> +///
> +/// Structure describing a MMRAM region which cannot be used for the
> MMRAM heap.
> +///
> +typedef struct _EFI_MM_RESERVED_MMRAM_REGION {
> + ///
> + /// Starting address of the reserved MMRAM area, as it appears while
> MMRAM is open.
> + /// Ignored if MmramReservedSize is 0.
> + ///
> + EFI_PHYSICAL_ADDRESS MmramReservedStart;
> + ///
> + /// Number of bytes occupied by the reserved MMRAM area. A size of
> zero indicates the
> + /// last MMRAM area.
> + ///
> + UINT64 MmramReservedSize;
> +} EFI_MM_RESERVED_MMRAM_REGION;
> +
> ///
> /// Management Mode System Table (MMST)
> ///
> diff --git a/MdePkg/Include/Protocol/MmConfiguration.h
> b/MdePkg/Include/Protocol/MmConfiguration.h
> index eeb94f64bdf7..d2fb6a13d4af 100644
> --- a/MdePkg/Include/Protocol/MmConfiguration.h
> +++ b/MdePkg/Include/Protocol/MmConfiguration.h
> @@ -21,22 +21,6 @@
> 0x26eeb3de, 0xb689, 0x492e, {0x80, 0xf0, 0xbe, 0x8b, 0xd7, 0xda,
0x4b,
> 0xa7 } \
> }
>
> -///
> -/// Structure describing a MMRAM region which cannot be used for the
> MMRAM heap.
> -///
> -typedef struct _EFI_MM_RESERVED_MMRAM_REGION {
> - ///
> - /// Starting address of the reserved MMRAM area, as it appears while
> MMRAM is open.
> - /// Ignored if MmramReservedSize is 0.
> - ///
> - EFI_PHYSICAL_ADDRESS MmramReservedStart;
> - ///
> - /// Number of bytes occupied by the reserved MMRAM area. A size of
> zero indicates the
> - /// last MMRAM area.
> - ///
> - UINT64 MmramReservedSize;
> -} EFI_MM_RESERVED_MMRAM_REGION;
> -
> typedef struct _EFI_MM_CONFIGURATION_PROTOCOL
> EFI_MM_CONFIGURATION_PROTOCOL;
>
> /**
> --
> 2.31.1.windows.1
>
>
>
>
>
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#76794): https://edk2.groups.io/g/devel/message/76794
Mute This Topic: https://groups.io/mt/83679481/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Hi Liming,
Thanks for pointing it out. I will updated the patches shortly.
Regards,
Kun
On 06/20/2021 18:22, gaoliming wrote:
> Kun:
> There is one header file edk2\MdePkg\Include\PiMultiPhase.h for this
> purpose. Can you place the common definition to it?
>
> Thanks
> Liming
>> -----邮件原件-----
>> 发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表 Kun Qin
>> 发送时间: 2021年6月18日 17:48
>> 收件人: devel@edk2.groups.io
>> 抄送: Michael D Kinney <michael.d.kinney@intel.com>; Liming Gao
>> <gaoliming@byosoft.com.cn>; Zhiguang Liu <zhiguang.liu@intel.com>;
>> Michael Kubacki <michael.kubacki@microsoft.com>
>> 主题: [edk2-devel] [PATCH v1 1/2] MdePkg: MmConfiguration: Moved
>> EFI_MM_RESERVED_MMRAM_REGION to PiMmCis.h
>>
>> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3440
>>
>> The definition of EFI_MM_RESERVED_MMRAM_REGION, according to PI Spec
>> 1.5
>> is also referenced in EFI_PEI_MM_CONFIGURATION_PPI. Defining this
>> structure as is will enforce any potential usage of MM Configuration PPI
>> interface to include <Protocol/MmConfiguration.h>.
>>
>> This change moves EFI_MM_RESERVED_MMRAM_REGION definition into
>> PiMmCis.h,
>> which is already included in Protocol/MmConfiguration.h. It also paves
>> way for introducing Ppi/MmConfiguration.h with proper dependency.
>>
>> Cc: Michael D Kinney <michael.d.kinney@intel.com>
>> Cc: Liming Gao <gaoliming@byosoft.com.cn>
>> Cc: Zhiguang Liu <zhiguang.liu@intel.com>
>> Cc: Michael Kubacki <michael.kubacki@microsoft.com>
>>
>> Signed-off-by: Kun Qin <kuqin12@gmail.com>
>> ---
>> MdePkg/Include/Pi/PiMmCis.h | 16 ++++++++++++++++
>> MdePkg/Include/Protocol/MmConfiguration.h | 16 ----------------
>> 2 files changed, 16 insertions(+), 16 deletions(-)
>>
>> diff --git a/MdePkg/Include/Pi/PiMmCis.h b/MdePkg/Include/Pi/PiMmCis.h
>> index fdf0591a03d6..422a3ea6c2bb 100644
>> --- a/MdePkg/Include/Pi/PiMmCis.h
>> +++ b/MdePkg/Include/Pi/PiMmCis.h
>> @@ -242,6 +242,22 @@ VOID
>> IN CONST EFI_MM_ENTRY_CONTEXT *MmEntryContext
>> );
>>
>> +///
>> +/// Structure describing a MMRAM region which cannot be used for the
>> MMRAM heap.
>> +///
>> +typedef struct _EFI_MM_RESERVED_MMRAM_REGION {
>> + ///
>> + /// Starting address of the reserved MMRAM area, as it appears while
>> MMRAM is open.
>> + /// Ignored if MmramReservedSize is 0.
>> + ///
>> + EFI_PHYSICAL_ADDRESS MmramReservedStart;
>> + ///
>> + /// Number of bytes occupied by the reserved MMRAM area. A size of
>> zero indicates the
>> + /// last MMRAM area.
>> + ///
>> + UINT64 MmramReservedSize;
>> +} EFI_MM_RESERVED_MMRAM_REGION;
>> +
>> ///
>> /// Management Mode System Table (MMST)
>> ///
>> diff --git a/MdePkg/Include/Protocol/MmConfiguration.h
>> b/MdePkg/Include/Protocol/MmConfiguration.h
>> index eeb94f64bdf7..d2fb6a13d4af 100644
>> --- a/MdePkg/Include/Protocol/MmConfiguration.h
>> +++ b/MdePkg/Include/Protocol/MmConfiguration.h
>> @@ -21,22 +21,6 @@
>> 0x26eeb3de, 0xb689, 0x492e, {0x80, 0xf0, 0xbe, 0x8b, 0xd7, 0xda,
> 0x4b,
>> 0xa7 } \
>> }
>>
>> -///
>> -/// Structure describing a MMRAM region which cannot be used for the
>> MMRAM heap.
>> -///
>> -typedef struct _EFI_MM_RESERVED_MMRAM_REGION {
>> - ///
>> - /// Starting address of the reserved MMRAM area, as it appears while
>> MMRAM is open.
>> - /// Ignored if MmramReservedSize is 0.
>> - ///
>> - EFI_PHYSICAL_ADDRESS MmramReservedStart;
>> - ///
>> - /// Number of bytes occupied by the reserved MMRAM area. A size of
>> zero indicates the
>> - /// last MMRAM area.
>> - ///
>> - UINT64 MmramReservedSize;
>> -} EFI_MM_RESERVED_MMRAM_REGION;
>> -
>> typedef struct _EFI_MM_CONFIGURATION_PROTOCOL
>> EFI_MM_CONFIGURATION_PROTOCOL;
>>
>> /**
>> --
>> 2.31.1.windows.1
>>
>>
>>
>>
>>
>
>
>
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#77023): https://edk2.groups.io/g/devel/message/77023
Mute This Topic: https://groups.io/mt/83679481/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
© 2016 - 2026 Red Hat, Inc.