summaryrefslogtreecommitdiffstats
path: root/sys/powerpc
diff options
context:
space:
mode:
authormp <mp@FreeBSD.org>2001-09-20 00:48:30 +0000
committermp <mp@FreeBSD.org>2001-09-20 00:48:30 +0000
commit34c8082463d00bd1cac61a0dcb27a982d0dfe557 (patch)
tree50d5c6b8a59ddbd61d7dfd52e3a3007288f93ed2 /sys/powerpc
parenta2e5cb9c1ece11bd25f867c25e6f34022389125f (diff)
downloadFreeBSD-src-34c8082463d00bd1cac61a0dcb27a982d0dfe557.zip
FreeBSD-src-34c8082463d00bd1cac61a0dcb27a982d0dfe557.tar.gz
Use BATL/BATU macros instead of hardcoded hex constants.
Diffstat (limited to 'sys/powerpc')
-rw-r--r--sys/powerpc/aim/mmu_oea.c13
-rw-r--r--sys/powerpc/powerpc/mmu_oea.c13
-rw-r--r--sys/powerpc/powerpc/pmap.c13
3 files changed, 12 insertions, 27 deletions
diff --git a/sys/powerpc/aim/mmu_oea.c b/sys/powerpc/aim/mmu_oea.c
index 7b3f3e7..03b89d9 100644
--- a/sys/powerpc/aim/mmu_oea.c
+++ b/sys/powerpc/aim/mmu_oea.c
@@ -600,21 +600,16 @@ void
pmap_bootstrap()
{
int i;
+ u_int32_t batl, batu;
/*
* Initialize kernel pmap and hardware.
*/
kernel_pmap = &kernel_pmap_store;
- {
- int batu, batl;
-
- batu = 0x80001ffe;
- batl = 0x80000012;
-
- __asm ("mtdbatu 1,%0; mtdbatl 1,%1" :: "r" (batu), "r" (batl));
- }
-
+ batu = BATU(0x80000000, BAT_BL_256M, BAT_Vs);
+ batl = BATL(0x80000000, BAT_M, BAT_PP_RW);
+ __asm ("mtdbatu 1,%0; mtdbatl 1,%1" :: "r" (batu), "r" (batl));
#if NPMAPS >= KERNEL_SEGMENT / 16
usedsr[KERNEL_SEGMENT / 16 / (sizeof usedsr[0] * 8)]
diff --git a/sys/powerpc/powerpc/mmu_oea.c b/sys/powerpc/powerpc/mmu_oea.c
index 7b3f3e7..03b89d9 100644
--- a/sys/powerpc/powerpc/mmu_oea.c
+++ b/sys/powerpc/powerpc/mmu_oea.c
@@ -600,21 +600,16 @@ void
pmap_bootstrap()
{
int i;
+ u_int32_t batl, batu;
/*
* Initialize kernel pmap and hardware.
*/
kernel_pmap = &kernel_pmap_store;
- {
- int batu, batl;
-
- batu = 0x80001ffe;
- batl = 0x80000012;
-
- __asm ("mtdbatu 1,%0; mtdbatl 1,%1" :: "r" (batu), "r" (batl));
- }
-
+ batu = BATU(0x80000000, BAT_BL_256M, BAT_Vs);
+ batl = BATL(0x80000000, BAT_M, BAT_PP_RW);
+ __asm ("mtdbatu 1,%0; mtdbatl 1,%1" :: "r" (batu), "r" (batl));
#if NPMAPS >= KERNEL_SEGMENT / 16
usedsr[KERNEL_SEGMENT / 16 / (sizeof usedsr[0] * 8)]
diff --git a/sys/powerpc/powerpc/pmap.c b/sys/powerpc/powerpc/pmap.c
index 7b3f3e7..03b89d9 100644
--- a/sys/powerpc/powerpc/pmap.c
+++ b/sys/powerpc/powerpc/pmap.c
@@ -600,21 +600,16 @@ void
pmap_bootstrap()
{
int i;
+ u_int32_t batl, batu;
/*
* Initialize kernel pmap and hardware.
*/
kernel_pmap = &kernel_pmap_store;
- {
- int batu, batl;
-
- batu = 0x80001ffe;
- batl = 0x80000012;
-
- __asm ("mtdbatu 1,%0; mtdbatl 1,%1" :: "r" (batu), "r" (batl));
- }
-
+ batu = BATU(0x80000000, BAT_BL_256M, BAT_Vs);
+ batl = BATL(0x80000000, BAT_M, BAT_PP_RW);
+ __asm ("mtdbatu 1,%0; mtdbatl 1,%1" :: "r" (batu), "r" (batl));
#if NPMAPS >= KERNEL_SEGMENT / 16
usedsr[KERNEL_SEGMENT / 16 / (sizeof usedsr[0] * 8)]
OpenPOWER on IntegriCloud