FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Crash Utility

 
 
LinkBack Thread Tools
 
Old 02-02-2012, 07:47 AM
"Suzuki K. Poulose"
 
Default virtual address translation bits for PPC440

This patch adds the definition for PPC440 virtual address translation.

On ppc44x, the virtual-address is split as below :

Bits |0 10|11 19|20 31|
-------------------------------------
| PGD | PMD | PAGE_OFFSET |
-----------------------------------

Also the physical address is 64bit.

Signed-off-by: Suzuki K. Poulose <suzuki@in.ibm.com>
---

defs.h | 5 +++++
ppc.c | 14 ++++++++++++++
2 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/defs.h b/defs.h
index aba13ea..7410412 100755
--- a/defs.h
+++ b/defs.h
@@ -2609,6 +2609,11 @@ struct load_module {
#define DEFAULT_PTRS_PER_PGD (1024)
#define DEFAULT_PTE_SIZE sizeof(ulong)

+/* PPC440 translation bits */
+#define PPC440_PGDIR_SHIFT (21)
+#define PPC440_PTRS_PER_PTE (512)
+#define PPC440_PTRS_PER_PGD (2048)
+#define PPC440_PTE_SIZE sizeof(unsigned long long)

#define PGDIR_SHIFT (base_platform->pgdir_shift)
#define PTRS_PER_PTE (base_platform->ptrs_per_pte)
diff --git a/ppc.c b/ppc.c
index 600df34..ea7247b 100755
--- a/ppc.c
+++ b/ppc.c
@@ -83,6 +83,20 @@ struct platform {
.pte_size = DEFAULT_PTE_SIZE,
},
{
+ .name = "ppc440",
+ .pgdir_shift = PPC440_PGDIR_SHIFT,
+ .ptrs_per_pgd = PPC440_PTRS_PER_PGD,
+ .ptrs_per_pte = PPC440_PTRS_PER_PTE,
+ .pte_size = PPC440_PTE_SIZE,
+ },
+ {
+ .name = "ppc440gp",
+ .pgdir_shift = PPC440_PGDIR_SHIFT,
+ .ptrs_per_pgd = PPC440_PTRS_PER_PGD,
+ .ptrs_per_pte = PPC440_PTRS_PER_PTE,
+ .pte_size = PPC440_PTE_SIZE,
+ },
+ {
/* Keep this at the end */
.name = NULL,
}

--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility
 

Thread Tools




All times are GMT. The time now is 08:53 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org