summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDietmar Eggemann <dietmar.eggemann@arm.com>2012-02-09 10:17:04 +0000
committerDietmar Eggemann <dietmar.eggemann@arm.com>2012-02-09 10:17:04 +0000
commit50201c5436d6aa184c500bb6738708da43342bb0 (patch)
tree09981b357ccfc6fee45cfb61173b8ed52799a43b
parent9d6afa9b6509add6e4ea607bedb5e4c1d90f6992 (diff)
Bugfix: Calculate l2_desc in Add4KMapping correctly.
Signed-off-by: Dietmar Eggemann <dietmar.eggemann@arm.com>
-rwxr-xr-xbig-little/common/pagetable_setup.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/big-little/common/pagetable_setup.c b/big-little/common/pagetable_setup.c
index 132ad73..3a505f1 100755
--- a/big-little/common/pagetable_setup.c
+++ b/big-little/common/pagetable_setup.c
@@ -55,7 +55,7 @@ unsigned long long hyp_l1_pagetable[512] __attribute__ ((aligned(4096)));
/*
* Second level pagetables to cover each GB.
- * Arranged contigously for ease
+ * Arranged contiguously for ease
*/
unsigned long long hyp_l2_pagetable[4][512] __attribute__ ((aligned(16384)));
@@ -66,7 +66,7 @@ unsigned long long hyp_l2_pagetable[4][512] __attribute__ ((aligned(16384)));
unsigned long long hyp_l3_so_pt[512] __attribute__ ((aligned(4096)));
/*
- * Allocate space for 4 contigous level 2 page
+ * Allocate space for 4 contiguous level 2 page
* tables which will cover the 32 bit address
* space. Align it to the 16K boundary.
*/
@@ -175,8 +175,8 @@ static void Add4KMapping(four_kb_pt_desc * l3_mapping, unsigned level,
*)((unsigned)((&l1_desc)[0] & 0xfffff000UL));
l2_desc = &l2_pt_addr[two_mb_index - (512 * one_gb_index)];
} else {
- l2_pt_addr = &base_pt_addr[one_gb_index];
- l2_desc = &l2_pt_addr[two_mb_index - (512 * one_gb_index)];
+ l2_pt_addr = &base_pt_addr[one_gb_index << 9];
+ l2_desc = &base_pt_addr[two_mb_index - (512 * one_gb_index)];
}
/* Preserve the old attributes */
@@ -256,7 +256,7 @@ void CreateHypModePageTables(void)
/*
* Create a mapping for a device page to be used
- * for Locks, Events & anyything that is shared when both
+ * for Locks, Events & anything that is shared when both
* the clusters are executing at the same time.
*/
l3_desc.va = (unsigned)&BL_DV_PAGE$$Base;
@@ -352,7 +352,7 @@ void Create2ndStagePageTables(void)
/*
* Create a mapping for a device page to be used
- * for Locks, Events & anyything that is shared when both
+ * for Locks, Events & anything that is shared when both
* the clusters are executing at the same time.
*/
l3_desc.va = (unsigned)&BL_DV_PAGE$$Base;