ARM: remove old pmap-v6 code. The new pmap-v6 is mature enough, and
dual implementation is showstopper for major cleanup. This patch only removes old code from tree. Cleanups will follow asap.
This commit is contained in:
parent
05ef7ed17b
commit
41a7c569b0
@ -61,16 +61,16 @@ __FBSDID("$FreeBSD$");
|
||||
|
||||
ASSYM(KERNBASE, KERNBASE);
|
||||
ASSYM(PCB_NOALIGNFLT, PCB_NOALIGNFLT);
|
||||
#ifdef ARM_NEW_PMAP
|
||||
#if __ARM_ARCH >= 6
|
||||
ASSYM(CPU_ASID_KERNEL,CPU_ASID_KERNEL);
|
||||
#endif
|
||||
ASSYM(PCB_ONFAULT, offsetof(struct pcb, pcb_onfault));
|
||||
#ifndef ARM_NEW_PMAP
|
||||
#if __ARM_ARCH < 6
|
||||
ASSYM(PCB_DACR, offsetof(struct pcb, pcb_dacr));
|
||||
#endif
|
||||
ASSYM(PCB_FLAGS, offsetof(struct pcb, pcb_flags));
|
||||
ASSYM(PCB_PAGEDIR, offsetof(struct pcb, pcb_pagedir));
|
||||
#ifndef ARM_NEW_PMAP
|
||||
#if __ARM_ARCH < 6
|
||||
ASSYM(PCB_L1VEC, offsetof(struct pcb, pcb_l1vec));
|
||||
ASSYM(PCB_PL1VEC, offsetof(struct pcb, pcb_pl1vec));
|
||||
#endif
|
||||
|
@ -30,6 +30,7 @@
|
||||
|
||||
#include "assym.s"
|
||||
#include <sys/syscall.h>
|
||||
#include <machine/acle-compat.h>
|
||||
#include <machine/asm.h>
|
||||
#include <machine/asmacros.h>
|
||||
#include <machine/armreg.h>
|
||||
@ -39,11 +40,6 @@
|
||||
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
#ifndef ARM_NEW_PMAP
|
||||
#define PTE1_OFFSET L1_S_OFFSET
|
||||
#define PTE1_SHIFT L1_S_SHIFT
|
||||
#define PTE1_SIZE L1_S_SIZE
|
||||
#endif
|
||||
|
||||
#if __ARM_ARCH >= 7
|
||||
#if defined(__ARM_ARCH_7VE__) || defined(__clang__)
|
||||
@ -287,7 +283,6 @@ ASENTRY_NP(init_mmu)
|
||||
mov r0, #((DOMAIN_CLIENT << (PMAP_DOMAIN_KERNEL*2)) | DOMAIN_CLIENT)
|
||||
mcr CP15_DACR(r0)
|
||||
|
||||
#ifdef ARM_NEW_PMAP
|
||||
/*
|
||||
* Set TEX remap registers
|
||||
* - All is set to uncacheable memory
|
||||
@ -296,7 +291,6 @@ ASENTRY_NP(init_mmu)
|
||||
mcr CP15_PRRR(r0)
|
||||
mov r0, #0
|
||||
mcr CP15_NMRR(r0)
|
||||
#endif
|
||||
mcr CP15_TLBIALL /* Flush TLB */
|
||||
DSB
|
||||
ISB
|
||||
@ -305,9 +299,7 @@ ASENTRY_NP(init_mmu)
|
||||
mrc CP15_SCTLR(r0)
|
||||
orr r0, r0, #CPU_CONTROL_MMU_ENABLE
|
||||
orr r0, r0, #CPU_CONTROL_V6_EXTPAGE
|
||||
#ifdef ARM_NEW_PMAP
|
||||
orr r0, r0, #CPU_CONTROL_TR_ENABLE
|
||||
#endif
|
||||
orr r0, r0, #CPU_CONTROL_AF_ENABLE
|
||||
mcr CP15_SCTLR(r0)
|
||||
DSB
|
||||
@ -398,23 +390,11 @@ END(reinit_mmu)
|
||||
* Addresses must be 1MiB aligned
|
||||
*/
|
||||
build_device_pagetables:
|
||||
#if defined(ARM_NEW_PMAP)
|
||||
ldr r4, =PTE1_V|PTE1_A|PTE1_AP_KRW|TEX1_CLASS_0
|
||||
#elif defined(SMP)
|
||||
ldr r4, =(L1_TYPE_S|L1_S_AP(AP_KRW)|L1_SHARED)
|
||||
#else
|
||||
ldr r4, =(L1_TYPE_S|L1_S_AP(AP_KRW))
|
||||
#endif
|
||||
b 1f
|
||||
build_pagetables:
|
||||
/* Set the required page attributed */
|
||||
#if defined(ARM_NEW_PMAP)
|
||||
ldr r4, =PTE1_V|PTE1_A|PTE1_AP_KRW|TEX1_CLASS_0
|
||||
#elif defined(SMP)
|
||||
ldr r4, =(L1_TYPE_S|L1_S_C|L1_S_AP(AP_KRW)|L1_SHARED)
|
||||
#else
|
||||
ldr r4, =(L1_TYPE_S|L1_S_C|L1_S_AP(AP_KRW))
|
||||
#endif
|
||||
1:
|
||||
orr r1, r4
|
||||
|
||||
|
@ -199,7 +199,7 @@ static char *loader_envp;
|
||||
|
||||
vm_paddr_t pmap_pa;
|
||||
|
||||
#ifdef ARM_NEW_PMAP
|
||||
#if __ARM_ARCH >= 6
|
||||
vm_offset_t systempage;
|
||||
vm_offset_t irqstack;
|
||||
vm_offset_t undstack;
|
||||
@ -456,7 +456,7 @@ cpu_startup(void *dummy)
|
||||
pcb->pcb_regs.sf_sp = (u_int)thread0.td_kstack +
|
||||
USPACE_SVC_STACK_TOP;
|
||||
pmap_set_pcb_pagedir(pmap_kernel(), pcb);
|
||||
#ifndef ARM_NEW_PMAP
|
||||
#if __ARM_ARCH < 6
|
||||
vector_page_setprot(VM_PROT_READ);
|
||||
pmap_postinit();
|
||||
#endif
|
||||
@ -1283,7 +1283,7 @@ arm_predict_branch(void *cookie, u_int insn, register_t pc, register_t *new_pc,
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef ARM_NEW_PMAP
|
||||
#if __ARM_ARCH >= 6
|
||||
void
|
||||
set_stackptrs(int cpu)
|
||||
{
|
||||
@ -1447,7 +1447,7 @@ print_kenv(void)
|
||||
debugf(" %x %s\n", (uint32_t)cp, cp);
|
||||
}
|
||||
|
||||
#ifndef ARM_NEW_PMAP
|
||||
#if __ARM_ARCH < 6
|
||||
void *
|
||||
initarm(struct arm_boot_params *abp)
|
||||
{
|
||||
@ -1717,7 +1717,7 @@ initarm(struct arm_boot_params *abp)
|
||||
return ((void *)(kernelstack.pv_va + USPACE_SVC_STACK_TOP -
|
||||
sizeof(struct pcb)));
|
||||
}
|
||||
#else /* !ARM_NEW_PMAP */
|
||||
#else /* __ARM_ARCH < 6 */
|
||||
void *
|
||||
initarm(struct arm_boot_params *abp)
|
||||
{
|
||||
@ -1905,7 +1905,7 @@ initarm(struct arm_boot_params *abp)
|
||||
|
||||
}
|
||||
|
||||
#endif /* !ARM_NEW_PMAP */
|
||||
#endif /* __ARM_ARCH < 6 */
|
||||
#endif /* FDT */
|
||||
|
||||
uint32_t (*arm_cpu_fill_vdso_timehands)(struct vdso_timehands *,
|
||||
|
@ -63,6 +63,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include <vm/pmap.h>
|
||||
#include <vm/vm_extern.h>
|
||||
|
||||
#include <machine/acle-compat.h>
|
||||
#include <machine/memdev.h>
|
||||
#include <machine/vmparam.h>
|
||||
|
||||
@ -113,7 +114,7 @@ memrw(struct cdev *dev, struct uio *uio, int flags)
|
||||
return (EINVAL);
|
||||
sx_xlock(&tmppt_lock);
|
||||
pmap_kenter((vm_offset_t)_tmppt, v);
|
||||
#ifdef ARM_NEW_PMAP
|
||||
#if __ARM_ARCH >= 6
|
||||
pmap_tlb_flush(kernel_pmap, (vm_offset_t)_tmppt);
|
||||
#endif
|
||||
o = (int)uio->uio_offset & PAGE_MASK;
|
||||
|
@ -43,6 +43,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include <vm/vm_kern.h>
|
||||
#include <vm/pmap.h>
|
||||
|
||||
#include <machine/acle-compat.h>
|
||||
#include <machine/armreg.h>
|
||||
#include <machine/cpu.h>
|
||||
#include <machine/cpufunc.h>
|
||||
@ -155,7 +156,7 @@ init_secondary(int cpu)
|
||||
#ifndef ARM_INTRNG
|
||||
int start = 0, end = 0;
|
||||
#endif
|
||||
#ifdef ARM_NEW_PMAP
|
||||
#if __ARM_ARCH >= 6
|
||||
uint32_t actlr_mask, actlr_set;
|
||||
|
||||
pmap_set_tex();
|
||||
@ -167,11 +168,11 @@ init_secondary(int cpu)
|
||||
set_stackptrs(cpu);
|
||||
|
||||
enable_interrupts(PSR_A);
|
||||
#else /* ARM_NEW_PMAP */
|
||||
#else /* __ARM_ARCH >= 6 */
|
||||
cpu_setup();
|
||||
setttb(pmap_pa);
|
||||
cpu_tlb_flushID();
|
||||
#endif /* ARM_NEW_PMAP */
|
||||
#endif /* __ARM_ARCH >= 6 */
|
||||
pc = &__pcpu[cpu];
|
||||
|
||||
/*
|
||||
@ -183,7 +184,7 @@ init_secondary(int cpu)
|
||||
|
||||
pcpu_init(pc, cpu, sizeof(struct pcpu));
|
||||
dpcpu_init(dpcpu[cpu - 1], cpu);
|
||||
#ifndef ARM_NEW_PMAP
|
||||
#if __ARM_ARCH < 6
|
||||
/* Provide stack pointers for other processor modes. */
|
||||
set_stackptrs(cpu);
|
||||
#endif
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -114,7 +114,7 @@ __FBSDID("$FreeBSD$");
|
||||
.word _C_LABEL(blocked_lock)
|
||||
|
||||
|
||||
#ifndef ARM_NEW_PMAP
|
||||
#if __ARM_ARCH < 6
|
||||
|
||||
#define DOMAIN_CLIENT 0x01
|
||||
|
||||
@ -418,7 +418,7 @@ ENTRY(cpu_switch)
|
||||
END(cpu_switch)
|
||||
|
||||
|
||||
#else /* !ARM_NEW_PMAP */
|
||||
#else /* __ARM_ARCH < 6 */
|
||||
#include <machine/sysreg.h>
|
||||
|
||||
ENTRY(cpu_context_switch) /* QQQ: What about macro instead of function? */
|
||||
@ -789,7 +789,7 @@ sw4_panic_str:
|
||||
END(cpu_switch)
|
||||
|
||||
|
||||
#endif /* !ARM_NEW_PMAP */
|
||||
#endif /* __ARM_ARCH < 6 */
|
||||
|
||||
ENTRY(savectx)
|
||||
stmfd sp!, {lr}
|
||||
|
@ -334,13 +334,11 @@ abort_handler(struct trapframe *tf, int prefetch)
|
||||
* they are not from KVA space. Thus, no action is needed here.
|
||||
*/
|
||||
|
||||
#ifdef ARM_NEW_PMAP
|
||||
rv = pmap_fault(PCPU_GET(curpmap), far, fsr, idx, usermode);
|
||||
if (rv == KERN_SUCCESS)
|
||||
return;
|
||||
if (rv == KERN_INVALID_ADDRESS)
|
||||
goto nogo;
|
||||
#endif
|
||||
/*
|
||||
* Now, when we handled imprecise and debug aborts, the rest of
|
||||
* aborts should be really related to mapping.
|
||||
@ -488,13 +486,6 @@ abort_handler(struct trapframe *tf, int prefetch)
|
||||
last_fault_code = fsr;
|
||||
#endif
|
||||
|
||||
#ifndef ARM_NEW_PMAP
|
||||
if (pmap_fault_fixup(vmspace_pmap(td->td_proc->p_vmspace), va, ftype,
|
||||
usermode)) {
|
||||
goto out;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef INVARIANTS
|
||||
onfault = pcb->pcb_onfault;
|
||||
pcb->pcb_onfault = NULL;
|
||||
|
@ -37,8 +37,6 @@ options KBD_INSTALL_CDEV # install a CDEV entry in /dev
|
||||
options FREEBSD_BOOT_LOADER # Process metadata passed from loader(8)
|
||||
options VFP # Enable floating point hardware support
|
||||
|
||||
options ARM_NEW_PMAP # Use new pmap code.
|
||||
|
||||
# DTrace support
|
||||
options KDTRACE_HOOKS # Kernel DTrace hooks
|
||||
options DDB_CTF # all architectures - kernel ELF linker loads CTF data
|
||||
|
@ -4,8 +4,10 @@
|
||||
#ifndef _MACHDEP_BOOT_MACHDEP_H_
|
||||
#define _MACHDEP_BOOT_MACHDEP_H_
|
||||
|
||||
#include <machine/acle-compat.h>
|
||||
|
||||
/* Structs that need to be initialised by initarm */
|
||||
#ifdef ARM_NEW_PMAP
|
||||
#if __ARM_ARCH >= 6
|
||||
extern vm_offset_t irqstack;
|
||||
extern vm_offset_t undstack;
|
||||
extern vm_offset_t abtstack;
|
||||
|
@ -46,9 +46,11 @@
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
#ifdef ARM_NEW_PMAP
|
||||
#include <machine/acle-compat.h>
|
||||
|
||||
#if __ARM_ARCH >= 6
|
||||
#include <machine/pmap-v6.h>
|
||||
#else /* ARM_NEW_PMAP */
|
||||
#else /* __ARM_ARCH >= 6 */
|
||||
|
||||
#ifndef _MACHINE_PMAP_H_
|
||||
#define _MACHINE_PMAP_H_
|
||||
@ -704,4 +706,4 @@ extern vm_paddr_t dump_avail[];
|
||||
#endif /* !LOCORE */
|
||||
|
||||
#endif /* !_MACHINE_PMAP_H_ */
|
||||
#endif /* !ARM_NEW_PMAP */
|
||||
#endif /* __ARM_ARCH >= 6 */
|
||||
|
@ -33,9 +33,11 @@
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
#ifdef ARM_NEW_PMAP
|
||||
#include <machine/acle-compat.h>
|
||||
|
||||
#if __ARM_ARCH >= 6
|
||||
#include <machine/pte-v6.h>
|
||||
#else /* ARM_NEW_PMAP */
|
||||
#else /* __ARM_ARCH >= 6 */
|
||||
|
||||
#ifndef _MACHINE_PTE_H_
|
||||
#define _MACHINE_PTE_H_
|
||||
@ -356,6 +358,6 @@ typedef pt_entry_t pt2_entry_t; /* compatibility with v6 */
|
||||
* 1 X 1 1 1 Y Y WT Y Y
|
||||
*/
|
||||
#endif /* !_MACHINE_PTE_H_ */
|
||||
#endif /* !ARM_NEW_PMAP */
|
||||
#endif /* __ARM_ARCH >= 6 */
|
||||
|
||||
/* End of pte.h */
|
||||
|
@ -29,11 +29,13 @@
|
||||
#ifndef _MACHINE_SF_BUF_H_
|
||||
#define _MACHINE_SF_BUF_H_
|
||||
|
||||
#include <machine/acle-compat.h>
|
||||
|
||||
static inline void
|
||||
sf_buf_map(struct sf_buf *sf, int flags)
|
||||
{
|
||||
|
||||
#ifdef ARM_NEW_PMAP
|
||||
#if __ARM_ARCH >= 6
|
||||
pmap_qenter(sf->kva, &(sf->m), 1);
|
||||
#else
|
||||
pmap_kenter(sf->kva, VM_PAGE_TO_PHYS(sf->m));
|
||||
@ -44,7 +46,7 @@ static inline int
|
||||
sf_buf_unmap(struct sf_buf *sf)
|
||||
{
|
||||
|
||||
#ifdef ARM_NEW_PMAP
|
||||
#if __ARM_ARCH >= 6
|
||||
pmap_qremove(sf->kva, 1);
|
||||
#else
|
||||
pmap_kremove(sf->kva);
|
||||
|
@ -29,7 +29,9 @@
|
||||
#ifndef _MACHINE_VM_H_
|
||||
#define _MACHINE_VM_H_
|
||||
|
||||
#ifdef ARM_NEW_PMAP
|
||||
#include <machine/acle-compat.h>
|
||||
|
||||
#if __ARM_ARCH >= 6
|
||||
#include <machine/pte-v6.h>
|
||||
|
||||
#define VM_MEMATTR_WB_WA ((vm_memattr_t)PTE2_ATTR_WB_WA)
|
||||
@ -40,9 +42,11 @@
|
||||
|
||||
#define VM_MEMATTR_DEFAULT VM_MEMATTR_WB_WA
|
||||
#define VM_MEMATTR_UNCACHEABLE VM_MEMATTR_SO /* misused by DMA */
|
||||
#ifdef _KERNEL
|
||||
/* Don't export aliased VM_MEMATTR to userland */
|
||||
#define VM_MEMATTR_WRITE_COMBINING VM_MEMATTR_WT /* for DRM */
|
||||
#define VM_MEMATTR_WRITE_BACK VM_MEMATTR_WB_WA /* for DRM */
|
||||
|
||||
#endif
|
||||
#else
|
||||
/* Memory attribute configuration. */
|
||||
#define VM_MEMATTR_DEFAULT 0
|
||||
|
@ -64,8 +64,7 @@ arm/arm/pl310.c optional pl310
|
||||
arm/arm/platform.c optional platform
|
||||
arm/arm/platform_if.m optional platform
|
||||
arm/arm/pmap.c optional !armv6
|
||||
arm/arm/pmap-v6.c optional armv6 !arm_new_pmap
|
||||
arm/arm/pmap-v6-new.c optional armv6 arm_new_pmap
|
||||
arm/arm/pmap-v6-new.c optional armv6
|
||||
arm/arm/pmu.c optional pmu | fdt hwpmc
|
||||
arm/arm/sc_machdep.c optional sc
|
||||
arm/arm/setcpsr.S standard
|
||||
|
@ -5,7 +5,6 @@ ARM_INTRNG opt_global.h
|
||||
ARM_KERN_DIRECTMAP opt_vm.h
|
||||
ARM_L2_PIPT opt_global.h
|
||||
ARM_MANY_BOARD opt_global.h
|
||||
ARM_NEW_PMAP opt_global.h
|
||||
NKPT2PG opt_pmap.h
|
||||
ARM_WANT_TP_ADDRESS opt_global.h
|
||||
COUNTS_PER_SEC opt_timer.h
|
||||
|
Loading…
x
Reference in New Issue
Block a user