IA32_MAP_ATTRIBUTE ChildAttribute;\r
IA32_MAP_ATTRIBUTE ChildMask;\r
IA32_MAP_ATTRIBUTE CurrentMask;\r
+ IA32_MAP_ATTRIBUTE LocalParentAttribute;\r
\r
ASSERT (Level != 0);\r
ASSERT ((Attribute != NULL) && (Mask != NULL));\r
NopAttribute.Bits.ReadWrite = 1;\r
NopAttribute.Bits.UserSupervisor = 1;\r
\r
+ LocalParentAttribute.Uint64 = ParentAttribute->Uint64;\r
+ ParentAttribute = &LocalParentAttribute;\r
+\r
//\r
// ParentPagingEntry ONLY is deferenced for checking Present and MustBeOne bits\r
// when Modify is FALSE.\r
}\r
\r
if (IsPle (&PagingEntry[Index], Level)) {\r
- PageTableLibSetPle (Level - 1, &PagingEntry[Index], 0, &ChildAttribute, &ChildMask);\r
+ PageTableLibSetPle (Level, &PagingEntry[Index], 0, &ChildAttribute, &ChildMask);\r
} else {\r
PageTableLibSetPnle (&PagingEntry[Index].Pnle, &ChildAttribute, &ChildMask);\r
}\r
//\r
// Update the page table when the supplied buffer is sufficient.\r
//\r
- ParentAttribute.Uint64 = 0;\r
- ParentAttribute.Bits.PageTableBaseAddress = 1;\r
- ParentAttribute.Bits.Present = 1;\r
- ParentAttribute.Bits.ReadWrite = 1;\r
- ParentAttribute.Bits.UserSupervisor = 1;\r
- ParentAttribute.Bits.Nx = 0;\r
-\r
Status = PageTableLibMapInLevel (\r
&TopPagingEntry,\r
&ParentAttribute,\r