Update memory map descriptor merging logic to honor the bucket type information#1429
Merged
kuqin12 merged 21 commits intomicrosoft:dev/202502from Jul 9, 2025
Merged
Update memory map descriptor merging logic to honor the bucket type information#1429kuqin12 merged 21 commits intomicrosoft:dev/202502from
kuqin12 merged 21 commits intomicrosoft:dev/202502from
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev/202502 #1429 +/- ##
=============================================
Coverage ? 1.56%
=============================================
Files ? 631
Lines ? 233114
Branches ? 370
=============================================
Hits ? 3649
Misses ? 229452
Partials ? 13
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
os-d
reviewed
Jul 8, 2025
makubacki
reviewed
Jul 8, 2025
makubacki
reviewed
Jul 8, 2025
makubacki
reviewed
Jul 8, 2025
makubacki
approved these changes
Jul 8, 2025
Co-authored-by: Michael Kubacki <michael.kubacki@microsoft.com> Signed-off-by: kuqin12 <42554914+kuqin12@users.noreply.github.com>
Co-authored-by: Michael Kubacki <michael.kubacki@microsoft.com> Signed-off-by: kuqin12 <42554914+kuqin12@users.noreply.github.com>
Co-authored-by: Michael Kubacki <michael.kubacki@microsoft.com> Signed-off-by: kuqin12 <42554914+kuqin12@users.noreply.github.com>
cfernald
approved these changes
Jul 8, 2025
apop5
approved these changes
Jul 9, 2025
os-d
approved these changes
Jul 9, 2025
mu-automation bot
pushed a commit
that referenced
this pull request
Jul 9, 2025
…nformation (#1429) ## Description The current memory map merging logic in `CoreAddRange` and `MergeMemoryMapByAttribute` only checks the memory type without considering the bucket type. However, the `CoreGetMemoryMap` routine will only report the entries that are entirely inside a specific bucket type. This will confuse the consumer and report false free memory that belongs to special memory buckets. This change fixes the issue by gating the merging logic by checking the bucket type first. The merging is only allowed either if the bucket type is not one of the special types, or if the bucket type is the same for both entries. For details on how to complete these options and their meaning refer to [CONTRIBUTING.md](https://github.com/microsoft/mu/blob/HEAD/CONTRIBUTING.md). - [x] Impacts functionality? - [ ] Impacts security? - [ ] Breaking change? - [ ] Includes tests? - [ ] Includes documentation? - [x] Backport to release branch? ## How This Was Tested This was tested on proprietary hardware. ## Integration Instructions N/A --------- Signed-off-by: kuqin12 <42554914+kuqin12@users.noreply.github.com> Co-authored-by: Michael Kubacki <michael.kubacki@microsoft.com>
apop5
pushed a commit
to apop5/mu_basecore
that referenced
this pull request
Dec 2, 2025
…nformation (microsoft#1429) ## Description The current memory map merging logic in `CoreAddRange` and `MergeMemoryMapByAttribute` only checks the memory type without considering the bucket type. However, the `CoreGetMemoryMap` routine will only report the entries that are entirely inside a specific bucket type. This will confuse the consumer and report false free memory that belongs to special memory buckets. This change fixes the issue by gating the merging logic by checking the bucket type first. The merging is only allowed either if the bucket type is not one of the special types, or if the bucket type is the same for both entries. For details on how to complete these options and their meaning refer to [CONTRIBUTING.md](https://github.com/microsoft/mu/blob/HEAD/CONTRIBUTING.md). - [x] Impacts functionality? - [ ] Impacts security? - [ ] Breaking change? - [ ] Includes tests? - [ ] Includes documentation? - [x] Backport to release branch? ## How This Was Tested This was tested on proprietary hardware. ## Integration Instructions N/A --------- Signed-off-by: kuqin12 <42554914+kuqin12@users.noreply.github.com> Co-authored-by: Michael Kubacki <michael.kubacki@microsoft.com>
apop5
pushed a commit
to apop5/mu_basecore
that referenced
this pull request
Dec 15, 2025
…nformation (microsoft#1429) ## Description The current memory map merging logic in `CoreAddRange` and `MergeMemoryMapByAttribute` only checks the memory type without considering the bucket type. However, the `CoreGetMemoryMap` routine will only report the entries that are entirely inside a specific bucket type. This will confuse the consumer and report false free memory that belongs to special memory buckets. This change fixes the issue by gating the merging logic by checking the bucket type first. The merging is only allowed either if the bucket type is not one of the special types, or if the bucket type is the same for both entries. For details on how to complete these options and their meaning refer to [CONTRIBUTING.md](https://github.com/microsoft/mu/blob/HEAD/CONTRIBUTING.md). - [x] Impacts functionality? - [ ] Impacts security? - [ ] Breaking change? - [ ] Includes tests? - [ ] Includes documentation? - [x] Backport to release branch? ## How This Was Tested This was tested on proprietary hardware. ## Integration Instructions N/A --------- Signed-off-by: kuqin12 <42554914+kuqin12@users.noreply.github.com> Co-authored-by: Michael Kubacki <michael.kubacki@microsoft.com>
apop5
pushed a commit
to apop5/mu_basecore
that referenced
this pull request
Dec 16, 2025
…nformation (microsoft#1429) ## Description The current memory map merging logic in `CoreAddRange` and `MergeMemoryMapByAttribute` only checks the memory type without considering the bucket type. However, the `CoreGetMemoryMap` routine will only report the entries that are entirely inside a specific bucket type. This will confuse the consumer and report false free memory that belongs to special memory buckets. This change fixes the issue by gating the merging logic by checking the bucket type first. The merging is only allowed either if the bucket type is not one of the special types, or if the bucket type is the same for both entries. For details on how to complete these options and their meaning refer to [CONTRIBUTING.md](https://github.com/microsoft/mu/blob/HEAD/CONTRIBUTING.md). - [x] Impacts functionality? - [ ] Impacts security? - [ ] Breaking change? - [ ] Includes tests? - [ ] Includes documentation? - [x] Backport to release branch? ## How This Was Tested This was tested on proprietary hardware. ## Integration Instructions N/A --------- Signed-off-by: kuqin12 <42554914+kuqin12@users.noreply.github.com> Co-authored-by: Michael Kubacki <michael.kubacki@microsoft.com>
apop5
pushed a commit
to apop5/mu_basecore
that referenced
this pull request
Dec 17, 2025
…nformation (microsoft#1429) ## Description The current memory map merging logic in `CoreAddRange` and `MergeMemoryMapByAttribute` only checks the memory type without considering the bucket type. However, the `CoreGetMemoryMap` routine will only report the entries that are entirely inside a specific bucket type. This will confuse the consumer and report false free memory that belongs to special memory buckets. This change fixes the issue by gating the merging logic by checking the bucket type first. The merging is only allowed either if the bucket type is not one of the special types, or if the bucket type is the same for both entries. For details on how to complete these options and their meaning refer to [CONTRIBUTING.md](https://github.com/microsoft/mu/blob/HEAD/CONTRIBUTING.md). - [x] Impacts functionality? - [ ] Impacts security? - [ ] Breaking change? - [ ] Includes tests? - [ ] Includes documentation? - [x] Backport to release branch? ## How This Was Tested This was tested on proprietary hardware. ## Integration Instructions N/A --------- Signed-off-by: kuqin12 <42554914+kuqin12@users.noreply.github.com> Co-authored-by: Michael Kubacki <michael.kubacki@microsoft.com>
apop5
pushed a commit
to apop5/mu_basecore
that referenced
this pull request
Dec 19, 2025
…nformation (microsoft#1429) ## Description The current memory map merging logic in `CoreAddRange` and `MergeMemoryMapByAttribute` only checks the memory type without considering the bucket type. However, the `CoreGetMemoryMap` routine will only report the entries that are entirely inside a specific bucket type. This will confuse the consumer and report false free memory that belongs to special memory buckets. This change fixes the issue by gating the merging logic by checking the bucket type first. The merging is only allowed either if the bucket type is not one of the special types, or if the bucket type is the same for both entries. For details on how to complete these options and their meaning refer to [CONTRIBUTING.md](https://github.com/microsoft/mu/blob/HEAD/CONTRIBUTING.md). - [x] Impacts functionality? - [ ] Impacts security? - [ ] Breaking change? - [ ] Includes tests? - [ ] Includes documentation? - [x] Backport to release branch? ## How This Was Tested This was tested on proprietary hardware. ## Integration Instructions N/A --------- Signed-off-by: kuqin12 <42554914+kuqin12@users.noreply.github.com> Co-authored-by: Michael Kubacki <michael.kubacki@microsoft.com>
apop5
pushed a commit
to apop5/mu_basecore
that referenced
this pull request
Dec 22, 2025
…nformation (microsoft#1429) ## Description The current memory map merging logic in `CoreAddRange` and `MergeMemoryMapByAttribute` only checks the memory type without considering the bucket type. However, the `CoreGetMemoryMap` routine will only report the entries that are entirely inside a specific bucket type. This will confuse the consumer and report false free memory that belongs to special memory buckets. This change fixes the issue by gating the merging logic by checking the bucket type first. The merging is only allowed either if the bucket type is not one of the special types, or if the bucket type is the same for both entries. For details on how to complete these options and their meaning refer to [CONTRIBUTING.md](https://github.com/microsoft/mu/blob/HEAD/CONTRIBUTING.md). - [x] Impacts functionality? - [ ] Impacts security? - [ ] Breaking change? - [ ] Includes tests? - [ ] Includes documentation? - [x] Backport to release branch? ## How This Was Tested This was tested on proprietary hardware. ## Integration Instructions N/A --------- Signed-off-by: kuqin12 <42554914+kuqin12@users.noreply.github.com> Co-authored-by: Michael Kubacki <michael.kubacki@microsoft.com>
apop5
pushed a commit
to apop5/mu_basecore
that referenced
this pull request
Dec 30, 2025
…nformation (microsoft#1429) ## Description The current memory map merging logic in `CoreAddRange` and `MergeMemoryMapByAttribute` only checks the memory type without considering the bucket type. However, the `CoreGetMemoryMap` routine will only report the entries that are entirely inside a specific bucket type. This will confuse the consumer and report false free memory that belongs to special memory buckets. This change fixes the issue by gating the merging logic by checking the bucket type first. The merging is only allowed either if the bucket type is not one of the special types, or if the bucket type is the same for both entries. For details on how to complete these options and their meaning refer to [CONTRIBUTING.md](https://github.com/microsoft/mu/blob/HEAD/CONTRIBUTING.md). - [x] Impacts functionality? - [ ] Impacts security? - [ ] Breaking change? - [ ] Includes tests? - [ ] Includes documentation? - [x] Backport to release branch? ## How This Was Tested This was tested on proprietary hardware. ## Integration Instructions N/A --------- Signed-off-by: kuqin12 <42554914+kuqin12@users.noreply.github.com> Co-authored-by: Michael Kubacki <michael.kubacki@microsoft.com>
apop5
pushed a commit
to apop5/mu_basecore
that referenced
this pull request
Jan 7, 2026
…nformation (microsoft#1429) ## Description The current memory map merging logic in `CoreAddRange` and `MergeMemoryMapByAttribute` only checks the memory type without considering the bucket type. However, the `CoreGetMemoryMap` routine will only report the entries that are entirely inside a specific bucket type. This will confuse the consumer and report false free memory that belongs to special memory buckets. This change fixes the issue by gating the merging logic by checking the bucket type first. The merging is only allowed either if the bucket type is not one of the special types, or if the bucket type is the same for both entries. For details on how to complete these options and their meaning refer to [CONTRIBUTING.md](https://github.com/microsoft/mu/blob/HEAD/CONTRIBUTING.md). - [x] Impacts functionality? - [ ] Impacts security? - [ ] Breaking change? - [ ] Includes tests? - [ ] Includes documentation? - [x] Backport to release branch? ## How This Was Tested This was tested on proprietary hardware. ## Integration Instructions N/A --------- Signed-off-by: kuqin12 <42554914+kuqin12@users.noreply.github.com> Co-authored-by: Michael Kubacki <michael.kubacki@microsoft.com>
apop5
pushed a commit
that referenced
this pull request
Jan 10, 2026
…nformation (#1429) ## Description The current memory map merging logic in `CoreAddRange` and `MergeMemoryMapByAttribute` only checks the memory type without considering the bucket type. However, the `CoreGetMemoryMap` routine will only report the entries that are entirely inside a specific bucket type. This will confuse the consumer and report false free memory that belongs to special memory buckets. This change fixes the issue by gating the merging logic by checking the bucket type first. The merging is only allowed either if the bucket type is not one of the special types, or if the bucket type is the same for both entries. For details on how to complete these options and their meaning refer to [CONTRIBUTING.md](https://github.com/microsoft/mu/blob/HEAD/CONTRIBUTING.md). - [x] Impacts functionality? - [ ] Impacts security? - [ ] Breaking change? - [ ] Includes tests? - [ ] Includes documentation? - [x] Backport to release branch? ## How This Was Tested This was tested on proprietary hardware. ## Integration Instructions N/A --------- Signed-off-by: kuqin12 <42554914+kuqin12@users.noreply.github.com> Co-authored-by: Michael Kubacki <michael.kubacki@microsoft.com>
apop5
pushed a commit
that referenced
this pull request
Jan 12, 2026
…nformation (#1429) ## Description The current memory map merging logic in `CoreAddRange` and `MergeMemoryMapByAttribute` only checks the memory type without considering the bucket type. However, the `CoreGetMemoryMap` routine will only report the entries that are entirely inside a specific bucket type. This will confuse the consumer and report false free memory that belongs to special memory buckets. This change fixes the issue by gating the merging logic by checking the bucket type first. The merging is only allowed either if the bucket type is not one of the special types, or if the bucket type is the same for both entries. For details on how to complete these options and their meaning refer to [CONTRIBUTING.md](https://github.com/microsoft/mu/blob/HEAD/CONTRIBUTING.md). - [x] Impacts functionality? - [ ] Impacts security? - [ ] Breaking change? - [ ] Includes tests? - [ ] Includes documentation? - [x] Backport to release branch? ## How This Was Tested This was tested on proprietary hardware. ## Integration Instructions N/A --------- Signed-off-by: kuqin12 <42554914+kuqin12@users.noreply.github.com> Co-authored-by: Michael Kubacki <michael.kubacki@microsoft.com>
apop5
pushed a commit
that referenced
this pull request
Jan 13, 2026
…nformation (#1429) ## Description The current memory map merging logic in `CoreAddRange` and `MergeMemoryMapByAttribute` only checks the memory type without considering the bucket type. However, the `CoreGetMemoryMap` routine will only report the entries that are entirely inside a specific bucket type. This will confuse the consumer and report false free memory that belongs to special memory buckets. This change fixes the issue by gating the merging logic by checking the bucket type first. The merging is only allowed either if the bucket type is not one of the special types, or if the bucket type is the same for both entries. For details on how to complete these options and their meaning refer to [CONTRIBUTING.md](https://github.com/microsoft/mu/blob/HEAD/CONTRIBUTING.md). - [x] Impacts functionality? - [ ] Impacts security? - [ ] Breaking change? - [ ] Includes tests? - [ ] Includes documentation? - [x] Backport to release branch? ## How This Was Tested This was tested on proprietary hardware. ## Integration Instructions N/A --------- Signed-off-by: kuqin12 <42554914+kuqin12@users.noreply.github.com> Co-authored-by: Michael Kubacki <michael.kubacki@microsoft.com>
apop5
pushed a commit
that referenced
this pull request
Jan 15, 2026
…nformation (#1429) ## Description The current memory map merging logic in `CoreAddRange` and `MergeMemoryMapByAttribute` only checks the memory type without considering the bucket type. However, the `CoreGetMemoryMap` routine will only report the entries that are entirely inside a specific bucket type. This will confuse the consumer and report false free memory that belongs to special memory buckets. This change fixes the issue by gating the merging logic by checking the bucket type first. The merging is only allowed either if the bucket type is not one of the special types, or if the bucket type is the same for both entries. For details on how to complete these options and their meaning refer to [CONTRIBUTING.md](https://github.com/microsoft/mu/blob/HEAD/CONTRIBUTING.md). - [x] Impacts functionality? - [ ] Impacts security? - [ ] Breaking change? - [ ] Includes tests? - [ ] Includes documentation? - [x] Backport to release branch? ## How This Was Tested This was tested on proprietary hardware. ## Integration Instructions N/A --------- Signed-off-by: kuqin12 <42554914+kuqin12@users.noreply.github.com> Co-authored-by: Michael Kubacki <michael.kubacki@microsoft.com>
apop5
pushed a commit
that referenced
this pull request
Jan 28, 2026
…nformation (#1429) ## Description The current memory map merging logic in `CoreAddRange` and `MergeMemoryMapByAttribute` only checks the memory type without considering the bucket type. However, the `CoreGetMemoryMap` routine will only report the entries that are entirely inside a specific bucket type. This will confuse the consumer and report false free memory that belongs to special memory buckets. This change fixes the issue by gating the merging logic by checking the bucket type first. The merging is only allowed either if the bucket type is not one of the special types, or if the bucket type is the same for both entries. For details on how to complete these options and their meaning refer to [CONTRIBUTING.md](https://github.com/microsoft/mu/blob/HEAD/CONTRIBUTING.md). - [x] Impacts functionality? - [ ] Impacts security? - [ ] Breaking change? - [ ] Includes tests? - [ ] Includes documentation? - [x] Backport to release branch? ## How This Was Tested This was tested on proprietary hardware. ## Integration Instructions N/A --------- Signed-off-by: kuqin12 <42554914+kuqin12@users.noreply.github.com> Co-authored-by: Michael Kubacki <michael.kubacki@microsoft.com>
apop5
pushed a commit
that referenced
this pull request
Feb 5, 2026
…nformation (#1429) ## Description The current memory map merging logic in `CoreAddRange` and `MergeMemoryMapByAttribute` only checks the memory type without considering the bucket type. However, the `CoreGetMemoryMap` routine will only report the entries that are entirely inside a specific bucket type. This will confuse the consumer and report false free memory that belongs to special memory buckets. This change fixes the issue by gating the merging logic by checking the bucket type first. The merging is only allowed either if the bucket type is not one of the special types, or if the bucket type is the same for both entries. For details on how to complete these options and their meaning refer to [CONTRIBUTING.md](https://github.com/microsoft/mu/blob/HEAD/CONTRIBUTING.md). - [x] Impacts functionality? - [ ] Impacts security? - [ ] Breaking change? - [ ] Includes tests? - [ ] Includes documentation? - [x] Backport to release branch? ## How This Was Tested This was tested on proprietary hardware. ## Integration Instructions N/A --------- Signed-off-by: kuqin12 <42554914+kuqin12@users.noreply.github.com> Co-authored-by: Michael Kubacki <michael.kubacki@microsoft.com>
os-d
added a commit
to os-d/mu_basecore
that referenced
this pull request
Apr 10, 2026
…t type information (microsoft#1429)" This reverts commit b79a6ef as it was rejected upstream in favor a different solution.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The current memory map merging logic in
CoreAddRangeandMergeMemoryMapByAttributeonly checks the memory type without considering the bucket type. However, theCoreGetMemoryMaproutine will only report the entries that are entirely inside a specific bucket type. This will confuse the consumer and report false free memory that belongs to special memory buckets.This change fixes the issue by gating the merging logic by checking the bucket type first. The merging is only allowed either if the bucket type is not one of the special types, or if the bucket type is the same for both entries.
For details on how to complete these options and their meaning refer to CONTRIBUTING.md.
How This Was Tested
This was tested on proprietary hardware.
Integration Instructions
N/A