The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/arm/include/cpu.h

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /* $NetBSD: cpu.h,v 1.2 2001/02/23 21:23:52 reinoud Exp $ */
    2 /* $FreeBSD: releng/10.2/sys/arm/include/cpu.h 278684 2015-02-13 17:53:11Z ian $ */
    3 
    4 #ifndef MACHINE_CPU_H
    5 #define MACHINE_CPU_H
    6 
    7 #include <machine/acle-compat.h>
    8 #include <machine/armreg.h>
    9 #include <machine/frame.h>
   10 
   11 void    cpu_halt(void);
   12 void    swi_vm(void *);
   13 
   14 #ifdef _KERNEL
   15 #if __ARM_ARCH >= 6
   16 #include <machine/cpu-v6.h>
   17 #endif
   18 static __inline uint64_t
   19 get_cyclecount(void)
   20 {
   21 #if __ARM_ARCH >= 6
   22         return cp15_pmccntr_get();
   23 #else /* No performance counters, so use binuptime(9). This is slooooow */
   24         struct bintime bt;
   25 
   26         binuptime(&bt);
   27         return ((uint64_t)bt.sec << 56 | bt.frac >> 8);
   28 #endif
   29 }
   30 #endif
   31 
   32 #define TRAPF_USERMODE(frame)   ((frame->tf_spsr & PSR_MODE) == PSR_USR32_MODE)
   33 
   34 #define TRAPF_PC(tfp)           ((tfp)->tf_pc)
   35 
   36 #define cpu_getstack(td)        ((td)->td_frame->tf_usr_sp)
   37 #define cpu_setstack(td, sp)    ((td)->td_frame->tf_usr_sp = (sp))
   38 #define cpu_spinwait()          /* nothing */
   39 
   40 #define ARM_NVEC                8
   41 #define ARM_VEC_ALL             0xffffffff
   42 
   43 extern vm_offset_t vector_page;
   44 
   45 /*
   46  * Params passed into initarm. If you change the size of this you will
   47  * need to update locore.S to allocate more memory on the stack before
   48  * it calls initarm.
   49  */
   50 struct arm_boot_params {
   51         register_t      abp_size;       /* Size of this structure */
   52         register_t      abp_r0;         /* r0 from the boot loader */
   53         register_t      abp_r1;         /* r1 from the boot loader */
   54         register_t      abp_r2;         /* r2 from the boot loader */
   55         register_t      abp_r3;         /* r3 from the boot loader */
   56         vm_offset_t     abp_physaddr;   /* The kernel physical address */
   57         vm_offset_t     abp_pagetable;  /* The early page table */
   58 };
   59 
   60 void    arm_vector_init(vm_offset_t, int);
   61 void    fork_trampoline(void);
   62 void    identify_arm_cpu(void);
   63 void    *initarm(struct arm_boot_params *);
   64 
   65 extern char btext[];
   66 extern char etext[];
   67 int badaddr_read(void *, size_t, void *);
   68 #endif /* !MACHINE_CPU_H */

Cache object: b422525d92e176dad8ef5222d2ef6b42


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.