* [PATCH] ArmPkg-Drivers/CpuDxe: Fix Mmu Initialization Problem.
@ 2016-09-26 17:22 Kurt Kennett
2016-09-26 22:05 ` Ard Biesheuvel
0 siblings, 1 reply; 5+ messages in thread
From: Kurt Kennett @ 2016-09-26 17:22 UTC (permalink / raw)
To: edk2-devel@lists.01.org; +Cc: Leif Lindholm, Ard Biesheuvel
During Mmu initialization in the CpuDxe, for a page table any bits set
in the 'NextSectionAttributes' are garbage and were set from bits that
are actually part of the pagetable address. We clear it out to zero
so that the SyncCacheConfigPage will use the page attributes instead
of trying to convert the (bogus) section attributes into page
attributes.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Kurt Kennett <mailto:kurt.kennett@microsoft.com>
---
ArmPkg/Drivers/CpuDxe/Arm/Mmu.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/ArmPkg/Drivers/CpuDxe/Arm/Mmu.c b/ArmPkg/Drivers/CpuDxe/Arm/Mmu.c index 63da8ba..64ef1bb 100644
--- a/ArmPkg/Drivers/CpuDxe/Arm/Mmu.c
+++ b/ArmPkg/Drivers/CpuDxe/Arm/Mmu.c
@@ -297,6 +297,11 @@ SyncCacheConfig (
}
NextRegionLength += TT_DESCRIPTOR_SECTION_SIZE;
} else if (TT_DESCRIPTOR_SECTION_TYPE_IS_PAGE_TABLE(FirstLevelTable[i])) {
+ // In this case any bits set in the 'NextSectionAttributes' are garbage and were set from
+ // bits that are actually part of the pagetable address. We clear it out to zero so that
+ // the SyncCacheConfigPage will use the page attributes instead of trying to convert the
+ // section attributes into page attributes
+ NextSectionAttributes = 0;
Status = SyncCacheConfigPage (
i,FirstLevelTable[i],
NumberOfDescriptors, MemorySpaceMap,
--
2.9.0.windows.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ArmPkg-Drivers/CpuDxe: Fix Mmu Initialization Problem.
2016-09-26 17:22 [PATCH] ArmPkg-Drivers/CpuDxe: Fix Mmu Initialization Problem Kurt Kennett
@ 2016-09-26 22:05 ` Ard Biesheuvel
0 siblings, 0 replies; 5+ messages in thread
From: Ard Biesheuvel @ 2016-09-26 22:05 UTC (permalink / raw)
To: Kurt Kennett; +Cc: edk2-devel@lists.01.org, Leif Lindholm
On 26 September 2016 at 10:22, Kurt Kennett <Kurt.Kennett@microsoft.com> wrote:
> During Mmu initialization in the CpuDxe, for a page table any bits set
> in the 'NextSectionAttributes' are garbage and were set from bits that
> are actually part of the pagetable address. We clear it out to zero
> so that the SyncCacheConfigPage will use the page attributes instead
> of trying to convert the (bogus) section attributes into page
> attributes.
>
> Contributed-under: TianoCore Contribution Agreement 1.0
>
> Signed-off-by: Kurt Kennett <mailto:kurt.kennett@microsoft.com>
> ---
> ArmPkg/Drivers/CpuDxe/Arm/Mmu.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/ArmPkg/Drivers/CpuDxe/Arm/Mmu.c b/ArmPkg/Drivers/CpuDxe/Arm/Mmu.c index 63da8ba..64ef1bb 100644
> --- a/ArmPkg/Drivers/CpuDxe/Arm/Mmu.c
> +++ b/ArmPkg/Drivers/CpuDxe/Arm/Mmu.c
> @@ -297,6 +297,11 @@ SyncCacheConfig (
> }
> NextRegionLength += TT_DESCRIPTOR_SECTION_SIZE;
> } else if (TT_DESCRIPTOR_SECTION_TYPE_IS_PAGE_TABLE(FirstLevelTable[i])) {
> + // In this case any bits set in the 'NextSectionAttributes' are garbage and were set from
> + // bits that are actually part of the pagetable address. We clear it out to zero so that
> + // the SyncCacheConfigPage will use the page attributes instead of trying to convert the
> + // section attributes into page attributes
> + NextSectionAttributes = 0;
No, still wacky space characters here. Are you using MS Word :-)
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] ArmPkg-Drivers/CpuDxe: Fix Mmu Initialization Problem.
@ 2016-09-26 22:49 Kurt Kennett
2016-09-26 22:51 ` Ard Biesheuvel
0 siblings, 1 reply; 5+ messages in thread
From: Kurt Kennett @ 2016-09-26 22:49 UTC (permalink / raw)
To: edk2-devel@lists.01.org; +Cc: Ard Biesheuvel, Leif Lindholm
During Mmu initialization in the CpuDxe, for a page table any bits set
in the 'NextSectionAttributes' are garbage and were set from bits that
are actually part of the pagetable address. We clear it out to zero
so that the SyncCacheConfigPage will use the page attributes instead
of trying to convert the (bogus) section attributes into page
attributes.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Kurt Kennett <mailto:kurt.kennett@microsoft.com>
---
ArmPkg/Drivers/CpuDxe/Arm/Mmu.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/ArmPkg/Drivers/CpuDxe/Arm/Mmu.c
b/ArmPkg/Drivers/CpuDxe/Arm/Mmu.c index 63da8ba..64ef1bb 100644
--- a/ArmPkg/Drivers/CpuDxe/Arm/Mmu.c
+++ b/ArmPkg/Drivers/CpuDxe/Arm/Mmu.c
@@ -297,6 +297,11 @@ SyncCacheConfig (
}
NextRegionLength += TT_DESCRIPTOR_SECTION_SIZE;
} else if (TT_DESCRIPTOR_SECTION_TYPE_IS_PAGE_TABLE(FirstLevelTable[i])) {
+ // In this case any bits set in the 'NextSectionAttributes' are garbage and were set from
+ // bits that are actually part of the pagetable address. We clear it out to zero so that
+ // the SyncCacheConfigPage will use the page attributes instead of trying to convert the
+ // section attributes into page attributes
+ NextSectionAttributes = 0;
Status = SyncCacheConfigPage (
i,FirstLevelTable[i],
NumberOfDescriptors, MemorySpaceMap,
--
2.9.0.windows
K2
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ArmPkg-Drivers/CpuDxe: Fix Mmu Initialization Problem.
2016-09-26 22:49 Kurt Kennett
@ 2016-09-26 22:51 ` Ard Biesheuvel
0 siblings, 0 replies; 5+ messages in thread
From: Ard Biesheuvel @ 2016-09-26 22:51 UTC (permalink / raw)
To: Kurt Kennett; +Cc: edk2-devel@lists.01.org, Leif Lindholm
On 26 September 2016 at 15:49, Kurt Kennett <Kurt.Kennett@microsoft.com> wrote:
> During Mmu initialization in the CpuDxe, for a page table any bits set
> in the 'NextSectionAttributes' are garbage and were set from bits that
> are actually part of the pagetable address. We clear it out to zero
> so that the SyncCacheConfigPage will use the page attributes instead
> of trying to convert the (bogus) section attributes into page
> attributes.
>
> Contributed-under: TianoCore Contribution Agreement 1.0
>
> Signed-off-by: Kurt Kennett <mailto:kurt.kennett@microsoft.com>
> ---
> ArmPkg/Drivers/CpuDxe/Arm/Mmu.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/ArmPkg/Drivers/CpuDxe/Arm/Mmu.c
> b/ArmPkg/Drivers/CpuDxe/Arm/Mmu.c index 63da8ba..64ef1bb 100644
> --- a/ArmPkg/Drivers/CpuDxe/Arm/Mmu.c
> +++ b/ArmPkg/Drivers/CpuDxe/Arm/Mmu.c
> @@ -297,6 +297,11 @@ SyncCacheConfig (
> }
> NextRegionLength += TT_DESCRIPTOR_SECTION_SIZE;
> } else if (TT_DESCRIPTOR_SECTION_TYPE_IS_PAGE_TABLE(FirstLevelTable[i])) {
> + // In this case any bits set in the 'NextSectionAttributes' are garbage and were set from
> + // bits that are actually part of the pagetable address. We clear it out to zero so that
> + // the SyncCacheConfigPage will use the page attributes instead of trying to convert the
> + // section attributes into page attributes
> + NextSectionAttributes = 0;
> Status = SyncCacheConfigPage (
> i,FirstLevelTable[i],
> NumberOfDescriptors, MemorySpaceMap,
> --
> 2.9.0.windows
>
Reviewed-by: Ard Biesheuve <ard.biesheuvel@linaro.org>
Pushed as f6be48e9907d
Thanks Kurt!
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] ArmPkg-Drivers/CpuDxe: Fix Mmu Initialization Problem.
@ 2016-09-26 17:08 Kurt Kennett
0 siblings, 0 replies; 5+ messages in thread
From: Kurt Kennett @ 2016-09-26 17:08 UTC (permalink / raw)
To: edk2-devel@lists.01.org; +Cc: Leif Lindholm, Ard Biesheuvel
During Mmu initialization in the CpuDxe, for a page table any bits set
in the 'NextSectionAttributes' are garbage and were set from bits that
are actually part of the pagetable address. We clear it out to zero
so that the SyncCacheConfigPage will use the page attributes instead
of trying to convert the (bogus) section attributes into page
attributes.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Kurt Kennett <mailto:kurt.kennett@microsoft.com>
---
ArmPkg/Drivers/CpuDxe/Arm/Mmu.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/ArmPkg/Drivers/CpuDxe/Arm/Mmu.c b/ArmPkg/Drivers/CpuDxe/Arm/Mmu.c
index 63da8ba..64ef1bb 100644
--- a/ArmPkg/Drivers/CpuDxe/Arm/Mmu.c
+++ b/ArmPkg/Drivers/CpuDxe/Arm/Mmu.c
@@ -297,6 +297,11 @@ SyncCacheConfig (
}
NextRegionLength += TT_DESCRIPTOR_SECTION_SIZE;
} else if (TT_DESCRIPTOR_SECTION_TYPE_IS_PAGE_TABLE(FirstLevelTable[i])) {
+ // In this case any bits set in the 'NextSectionAttributes' are garbage and were set from
+ // bits that are actually part of the pagetable address. We clear it out to zero so that
+ // the SyncCacheConfigPage will use the page attributes instead of trying to convert the
+ // section attributes into page attributes
+ NextSectionAttributes = 0;
Status = SyncCacheConfigPage (
i,FirstLevelTable[i],
NumberOfDescriptors, MemorySpaceMap,
--
2.9.0.windows.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-09-26 22:51 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-26 17:22 [PATCH] ArmPkg-Drivers/CpuDxe: Fix Mmu Initialization Problem Kurt Kennett
2016-09-26 22:05 ` Ard Biesheuvel
-- strict thread matches above, loose matches on Subject: below --
2016-09-26 22:49 Kurt Kennett
2016-09-26 22:51 ` Ard Biesheuvel
2016-09-26 17:08 Kurt Kennett
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox