mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-22 15:47:37 +00:00
The arm exception entry points currently vector through a function pointer
to the actual handler routine. All the pointers are static-intialized to the only handlers available, and yet various platform-specific inits still set those pointers (to the values they're already initialized to). Begin to drain the swamp by removing all the redundant external declarations and runtime setting of the pointers that's scattered around various places.
This commit is contained in:
parent
4ce4252794
commit
510ccb2fd4
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=262952
@ -143,10 +143,6 @@ extern vm_offset_t ksym_start, ksym_end;
|
||||
|
||||
static struct pv_addr kernel_pt_table[KERNEL_PT_MAX];
|
||||
|
||||
extern u_int data_abort_handler_address;
|
||||
extern u_int prefetch_abort_handler_address;
|
||||
extern u_int undefined_handler_address;
|
||||
|
||||
vm_paddr_t pmap_pa;
|
||||
|
||||
struct pv_addr systempage;
|
||||
@ -1279,10 +1275,6 @@ initarm(struct arm_boot_params *abp)
|
||||
*/
|
||||
cpu_idcache_wbinv_all();
|
||||
|
||||
/* Set stack for exception handlers */
|
||||
data_abort_handler_address = (u_int)data_abort_handler;
|
||||
prefetch_abort_handler_address = (u_int)prefetch_abort_handler;
|
||||
undefined_handler_address = (u_int)undefinedinstruction_bounce;
|
||||
undefined_init();
|
||||
|
||||
init_proc0(kernelstack.pv_va);
|
||||
|
@ -126,7 +126,6 @@ __FBSDID("$FreeBSD$");
|
||||
|
||||
|
||||
void swi_handler(struct trapframe *);
|
||||
void undefinedinstruction(struct trapframe *);
|
||||
|
||||
#include <machine/disassem.h>
|
||||
#include <machine/machdep.h>
|
||||
|
@ -111,10 +111,6 @@ __FBSDID("$FreeBSD$");
|
||||
/* this should be evenly divisable by PAGE_SIZE / L2_TABLE_SIZE_REAL (or 4) */
|
||||
#define NUM_KERNEL_PTS (KERNEL_PT_AFKERNEL + KERNEL_PT_AFKERNEL_NUM)
|
||||
|
||||
extern u_int data_abort_handler_address;
|
||||
extern u_int prefetch_abort_handler_address;
|
||||
extern u_int undefined_handler_address;
|
||||
|
||||
struct pv_addr kernel_pt_table[NUM_KERNEL_PTS];
|
||||
|
||||
/* Static device mappings. */
|
||||
@ -621,11 +617,6 @@ initarm(struct arm_boot_params *abp)
|
||||
*/
|
||||
cpu_idcache_wbinv_all();
|
||||
|
||||
/* Set stack for exception handlers */
|
||||
|
||||
data_abort_handler_address = (u_int)data_abort_handler;
|
||||
prefetch_abort_handler_address = (u_int)prefetch_abort_handler;
|
||||
undefined_handler_address = (u_int)undefinedinstruction_bounce;
|
||||
undefined_init();
|
||||
|
||||
init_proc0(kernelstack.pv_va);
|
||||
|
@ -91,10 +91,6 @@ __FBSDID("$FreeBSD$");
|
||||
/* this should be evenly divisable by PAGE_SIZE / L2_TABLE_SIZE_REAL (or 4) */
|
||||
#define NUM_KERNEL_PTS (KERNEL_PT_AFKERNEL + KERNEL_PT_AFKERNEL_NUM)
|
||||
|
||||
extern u_int data_abort_handler_address;
|
||||
extern u_int prefetch_abort_handler_address;
|
||||
extern u_int undefined_handler_address;
|
||||
|
||||
struct pv_addr kernel_pt_table[NUM_KERNEL_PTS];
|
||||
|
||||
/* Physical and virtual addresses for some global pages */
|
||||
@ -309,10 +305,6 @@ initarm(struct arm_boot_params *abp)
|
||||
cpu_idcache_wbinv_all();
|
||||
cpu_setup("");
|
||||
|
||||
/* Set stack for exception handlers */
|
||||
data_abort_handler_address = (u_int)data_abort_handler;
|
||||
prefetch_abort_handler_address = (u_int)prefetch_abort_handler;
|
||||
undefined_handler_address = (u_int)undefinedinstruction_bounce;
|
||||
undefined_init();
|
||||
|
||||
init_proc0(kernelstack.pv_va);
|
||||
|
@ -106,10 +106,6 @@ __FBSDID("$FreeBSD$");
|
||||
|
||||
extern int s3c2410_pclk;
|
||||
|
||||
extern u_int data_abort_handler_address;
|
||||
extern u_int prefetch_abort_handler_address;
|
||||
extern u_int undefined_handler_address;
|
||||
|
||||
struct pv_addr kernel_pt_table[NUM_KERNEL_PTS];
|
||||
|
||||
/* Physical and virtual addresses for some global pages */
|
||||
@ -372,10 +368,6 @@ initarm(struct arm_boot_params *abp)
|
||||
}
|
||||
cninit();
|
||||
|
||||
/* Set stack for exception handlers */
|
||||
data_abort_handler_address = (u_int)data_abort_handler;
|
||||
prefetch_abort_handler_address = (u_int)prefetch_abort_handler;
|
||||
undefined_handler_address = (u_int)undefinedinstruction_bounce;
|
||||
undefined_init();
|
||||
|
||||
init_proc0(kernelstack.pv_va);
|
||||
|
@ -109,10 +109,6 @@ __FBSDID("$FreeBSD$");
|
||||
#define KERNEL_VM_BASE (KERNBASE + 0x00100000)
|
||||
#define KERNEL_VM_SIZE 0x05000000
|
||||
|
||||
extern u_int data_abort_handler_address;
|
||||
extern u_int prefetch_abort_handler_address;
|
||||
extern u_int undefined_handler_address;
|
||||
|
||||
struct pv_addr kernel_pt_table[NUM_KERNEL_PTS];
|
||||
|
||||
extern vm_offset_t sa1110_uart_vaddr;
|
||||
@ -329,9 +325,6 @@ initarm(struct arm_boot_params *abp)
|
||||
pmap_map_chunk(l1pagetable, sa1_cache_clean_addr, 0xf0000000,
|
||||
CPU_SA110_CACHE_CLEAN_SIZE, VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE);
|
||||
|
||||
data_abort_handler_address = (u_int)data_abort_handler;
|
||||
prefetch_abort_handler_address = (u_int)prefetch_abort_handler;
|
||||
undefined_handler_address = (u_int)undefinedinstruction_bounce;
|
||||
undefined_init();
|
||||
cpu_domains((DOMAIN_CLIENT << (PMAP_DOMAIN_KERNEL*2)) | DOMAIN_CLIENT);
|
||||
setttb(kernel_l1pt.pv_pa);
|
||||
|
@ -103,10 +103,6 @@ __FBSDID("$FreeBSD$");
|
||||
/* this should be evenly divisable by PAGE_SIZE / L2_TABLE_SIZE_REAL (or 4) */
|
||||
#define NUM_KERNEL_PTS (KERNEL_PT_AFKERNEL + KERNEL_PT_AFKERNEL_NUM)
|
||||
|
||||
extern u_int data_abort_handler_address;
|
||||
extern u_int prefetch_abort_handler_address;
|
||||
extern u_int undefined_handler_address;
|
||||
|
||||
struct pv_addr kernel_pt_table[NUM_KERNEL_PTS];
|
||||
|
||||
/* Physical and virtual addresses for some global pages */
|
||||
@ -321,11 +317,6 @@ initarm(struct arm_boot_params *abp)
|
||||
physmem = memsize / PAGE_SIZE;
|
||||
cninit();
|
||||
|
||||
/* Set stack for exception handlers */
|
||||
|
||||
data_abort_handler_address = (u_int)data_abort_handler;
|
||||
prefetch_abort_handler_address = (u_int)prefetch_abort_handler;
|
||||
undefined_handler_address = (u_int)undefinedinstruction_bounce;
|
||||
undefined_init();
|
||||
|
||||
init_proc0(kernelstack.pv_va);
|
||||
|
@ -103,10 +103,6 @@ __FBSDID("$FreeBSD$");
|
||||
/* this should be evenly divisable by PAGE_SIZE / L2_TABLE_SIZE_REAL (or 4) */
|
||||
#define NUM_KERNEL_PTS (KERNEL_PT_AFKERNEL + KERNEL_PT_AFKERNEL_NUM)
|
||||
|
||||
extern u_int data_abort_handler_address;
|
||||
extern u_int prefetch_abort_handler_address;
|
||||
extern u_int undefined_handler_address;
|
||||
|
||||
struct pv_addr kernel_pt_table[NUM_KERNEL_PTS];
|
||||
|
||||
/* Physical and virtual addresses for some global pages */
|
||||
@ -322,11 +318,6 @@ initarm(struct arm_boot_params *abp)
|
||||
physmem = memsize / PAGE_SIZE;
|
||||
cninit();
|
||||
|
||||
/* Set stack for exception handlers */
|
||||
|
||||
data_abort_handler_address = (u_int)data_abort_handler;
|
||||
prefetch_abort_handler_address = (u_int)prefetch_abort_handler;
|
||||
undefined_handler_address = (u_int)undefinedinstruction_bounce;
|
||||
undefined_init();
|
||||
|
||||
init_proc0(kernelstack.pv_va);
|
||||
|
@ -106,10 +106,6 @@ __FBSDID("$FreeBSD$");
|
||||
/* this should be evenly divisable by PAGE_SIZE / L2_TABLE_SIZE_REAL (or 4) */
|
||||
#define NUM_KERNEL_PTS (KERNEL_PT_AFKERNEL + KERNEL_PT_AFKERNEL_NUM)
|
||||
|
||||
extern u_int data_abort_handler_address;
|
||||
extern u_int prefetch_abort_handler_address;
|
||||
extern u_int undefined_handler_address;
|
||||
|
||||
struct pv_addr kernel_pt_table[NUM_KERNEL_PTS];
|
||||
|
||||
/* Physical and virtual addresses for some global pages */
|
||||
@ -302,9 +298,6 @@ initarm(struct arm_boot_params *abp)
|
||||
cninit();
|
||||
/* Set stack for exception handlers */
|
||||
|
||||
data_abort_handler_address = (u_int)data_abort_handler;
|
||||
prefetch_abort_handler_address = (u_int)prefetch_abort_handler;
|
||||
undefined_handler_address = (u_int)undefinedinstruction_bounce;
|
||||
undefined_init();
|
||||
|
||||
init_proc0(kernelstack.pv_va);
|
||||
|
@ -102,10 +102,6 @@ __FBSDID("$FreeBSD$");
|
||||
/* this should be evenly divisable by PAGE_SIZE / L2_TABLE_SIZE_REAL (or 4) */
|
||||
#define NUM_KERNEL_PTS (KERNEL_PT_AFKERNEL + KERNEL_PT_AFKERNEL_NUM)
|
||||
|
||||
extern u_int data_abort_handler_address;
|
||||
extern u_int prefetch_abort_handler_address;
|
||||
extern u_int undefined_handler_address;
|
||||
|
||||
struct pv_addr kernel_pt_table[NUM_KERNEL_PTS];
|
||||
|
||||
/* Physical and virtual addresses for some global pages */
|
||||
@ -393,11 +389,6 @@ initarm(struct arm_boot_params *abp)
|
||||
else
|
||||
memsize = ixp425_sdram_size();
|
||||
|
||||
/* Set stack for exception handlers */
|
||||
|
||||
data_abort_handler_address = (u_int)data_abort_handler;
|
||||
prefetch_abort_handler_address = (u_int)prefetch_abort_handler;
|
||||
undefined_handler_address = (u_int)undefinedinstruction_bounce;
|
||||
undefined_init();
|
||||
|
||||
init_proc0(kernelstack.pv_va);
|
||||
|
@ -103,10 +103,6 @@ __FBSDID("$FreeBSD$");
|
||||
/* this should be evenly divisable by PAGE_SIZE / L2_TABLE_SIZE_REAL (or 4) */
|
||||
#define NUM_KERNEL_PTS (KERNEL_PT_AFKERNEL + KERNEL_PT_AFKERNEL_NUM)
|
||||
|
||||
extern u_int data_abort_handler_address;
|
||||
extern u_int prefetch_abort_handler_address;
|
||||
extern u_int undefined_handler_address;
|
||||
|
||||
struct pv_addr kernel_pt_table[NUM_KERNEL_PTS];
|
||||
|
||||
/* Physical and virtual addresses for some global pages */
|
||||
@ -311,10 +307,6 @@ initarm(struct arm_boot_params *abp)
|
||||
/* Fire up consoles. */
|
||||
cninit();
|
||||
|
||||
/* Set stack for exception handlers */
|
||||
data_abort_handler_address = (u_int)data_abort_handler;
|
||||
prefetch_abort_handler_address = (u_int)prefetch_abort_handler;
|
||||
undefined_handler_address = (u_int)undefinedinstruction_bounce;
|
||||
undefined_init();
|
||||
|
||||
init_proc0(kernelstack.pv_va);
|
||||
|
Loading…
Reference in New Issue
Block a user