Date: Tue, 3 Apr 2018 00:45:38 +0000 (UTC) From: Justin Hibbits <jhibbits@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r331900 - in head/sys/powerpc: booke include Message-ID: <201804030045.w330jc1G037742@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhibbits Date: Tue Apr 3 00:45:38 2018 New Revision: 331900 URL: https://svnweb.freebsd.org/changeset/base/331900 Log: Add support for a pmap direct map for 64-bit Book-E As with AIM64, map the DMAP at the beginning of the fourth "quadrant" of memory, and move the KERNBASE to the the start of KVA. Eventually we may run the kernel out of the DMAP, but for now, continue booting as it has been. Modified: head/sys/powerpc/booke/pmap.c head/sys/powerpc/include/vmparam.h Modified: head/sys/powerpc/booke/pmap.c ============================================================================== --- head/sys/powerpc/booke/pmap.c Mon Apr 2 23:44:12 2018 (r331899) +++ head/sys/powerpc/booke/pmap.c Tue Apr 3 00:45:38 2018 (r331900) @@ -1724,7 +1724,11 @@ mmu_booke_bootstrap(mmu_t mmu, vm_offset_t start, vm_o debugf("mmu_booke_bootstrap: entered\n"); /* Set interesting system properties */ +#ifdef __powerpc64__ + hw_direct_map = 1; +#else hw_direct_map = 0; +#endif #if defined(COMPAT_FREEBSD32) || !defined(__powerpc64__) elf32_nxstack = 1; #endif @@ -1970,6 +1974,15 @@ mmu_booke_bootstrap(mmu_t mmu, vm_offset_t start, vm_o debugf("phys_avail_count = %d\n", phys_avail_count); debugf("physsz = 0x%09jx physmem = %jd (0x%09jx)\n", (uintmax_t)physsz, (uintmax_t)physmem, (uintmax_t)physmem); + +#ifdef __powerpc64__ + /* + * Map the physical memory contiguously in TLB1. + * Round so it fits into a single mapping. + */ + tlb1_mapin_region(DMAP_BASE_ADDRESS, 0, + phys_avail[i + 1]); +#endif /*******************************************************/ /* Initialize (statically allocated) kernel pmap. */ Modified: head/sys/powerpc/include/vmparam.h ============================================================================== --- head/sys/powerpc/include/vmparam.h Mon Apr 2 23:44:12 2018 (r331899) +++ head/sys/powerpc/include/vmparam.h Tue Apr 3 00:45:38 2018 (r331900) @@ -106,13 +106,8 @@ #define FREEBSD32_USRSTACK FREEBSD32_SHAREDPAGE #ifdef __powerpc64__ -#ifdef AIM #define VM_MIN_KERNEL_ADDRESS 0xe000000000000000UL #define VM_MAX_KERNEL_ADDRESS 0xe0000001c7ffffffUL -#else -#define VM_MIN_KERNEL_ADDRESS 0xc000000000000000UL -#define VM_MAX_KERNEL_ADDRESS 0xc0000001c7ffffffUL -#endif #define VM_MAX_SAFE_KERNEL_ADDRESS VM_MAX_KERNEL_ADDRESS #endif @@ -135,9 +130,9 @@ #ifdef __powerpc64__ #ifndef LOCORE -#define KERNBASE 0xc000000000000100UL /* start of kernel virtual */ +#define KERNBASE 0xe000000000000100UL /* start of kernel virtual */ #else -#define KERNBASE 0xc000000000000100 /* start of kernel virtual */ +#define KERNBASE 0xe000000000000100 /* start of kernel virtual */ #endif #else #define KERNBASE 0xc0000000 /* start of kernel virtual */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201804030045.w330jc1G037742>