Changeset c0699467 in mainline for kernel/arch
- Timestamp:
- 2011-08-09T18:08:23Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- b538ca5c
- Parents:
- 3666d386
- Location:
- kernel/arch
- Files:
-
- 65 edited
- 1 moved
-
abs32le/include/istate.h (modified) (1 diff)
-
abs32le/include/mm/frame.h (modified) (2 diffs)
-
abs32le/include/mm/page.h (modified) (2 diffs)
-
abs32le/src/userspace.c (modified) (1 diff)
-
amd64/include/context.h (modified) (2 diffs)
-
amd64/include/istate.h (modified) (1 diff)
-
amd64/include/mm/frame.h (modified) (2 diffs)
-
amd64/include/mm/page.h (modified) (2 diffs)
-
amd64/src/userspace.c (modified) (1 diff)
-
arm32/include/istate.h (modified) (1 diff)
-
arm32/include/mm/frame.h (modified) (2 diffs)
-
arm32/include/mm/page.h (modified) (2 diffs)
-
arm32/include/regutils.h (modified) (2 diffs)
-
arm32/src/arm32.c (modified) (1 diff)
-
arm32/src/mach/gta02/gta02.c (modified) (1 diff)
-
arm32/src/mach/integratorcp/integratorcp.c (modified) (1 diff)
-
arm32/src/mach/testarm/testarm.c (modified) (1 diff)
-
ia32/include/context.h (modified) (2 diffs)
-
ia32/include/elf.h (modified) (2 diffs)
-
ia32/include/istate.h (modified) (1 diff)
-
ia32/include/mm/frame.h (modified) (2 diffs)
-
ia32/include/mm/page.h (modified) (2 diffs)
-
ia32/src/drivers/vesa.c (modified) (1 diff)
-
ia32/src/smp/smp.c (modified) (1 diff)
-
ia32/src/userspace.c (modified) (1 diff)
-
ia64/include/elf.h (modified) (2 diffs)
-
ia64/include/istate.h (modified) (1 diff)
-
ia64/include/mm/frame.h (modified) (2 diffs)
-
ia64/include/mm/page.h (modified) (2 diffs)
-
ia64/include/register.h (modified) (2 diffs)
-
ia64/src/ia64.c (modified) (1 diff)
-
mips32/include/context_offset.h (modified) (1 diff)
-
mips32/include/cp0.h (modified) (2 diffs)
-
mips32/include/istate.h (modified) (1 diff)
-
mips32/include/mm/frame.h (modified) (2 diffs)
-
mips32/include/mm/page.h (modified) (2 diffs)
-
mips32/src/mips32.c (modified) (2 diffs)
-
mips64/include/context_offset.h (modified) (2 diffs)
-
mips64/include/cp0.h (modified) (1 diff)
-
mips64/include/istate.h (modified) (1 diff)
-
mips64/include/mm/frame.h (modified) (2 diffs)
-
mips64/include/mm/page.h (modified) (2 diffs)
-
mips64/src/mips64.c (modified) (2 diffs)
-
ppc32/include/asm.h (modified) (1 diff)
-
ppc32/include/context_offset.h (modified) (2 diffs)
-
ppc32/include/cpu.h (modified) (2 diffs)
-
ppc32/include/exception.h (modified) (1 diff)
-
ppc32/include/istate.h (modified) (1 diff)
-
ppc32/include/mm/frame.h (modified) (2 diffs)
-
ppc32/include/mm/page.h (modified) (2 diffs)
-
ppc32/include/msr.h (moved) (moved from uspace/lib/c/include/typedefs.h ) (2 diffs)
-
ppc32/src/asm.S (modified) (1 diff)
-
ppc32/src/exception.S (modified) (1 diff)
-
ppc32/src/ppc32.c (modified) (1 diff)
-
sparc64/include/barrier.h (modified) (1 diff)
-
sparc64/include/elf.h (modified) (2 diffs)
-
sparc64/include/istate.h (modified) (1 diff)
-
sparc64/include/mm/page.h (modified) (2 diffs)
-
sparc64/include/mm/sun4u/frame.h (modified) (2 diffs)
-
sparc64/include/mm/sun4v/frame.h (modified) (2 diffs)
-
sparc64/include/mm/sun4v/page.h (modified) (2 diffs)
-
sparc64/include/sun4v/regdef.h (modified) (2 diffs)
-
sparc64/src/drivers/scr.c (modified) (1 diff)
-
sparc64/src/smp/sun4u/smp.c (modified) (1 diff)
-
sparc64/src/smp/sun4v/smp.c (modified) (1 diff)
-
sparc64/src/sun4v/start.S (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/abs32le/include/istate.h
r3666d386 rc0699467 36 36 #define KERN_abs32le_ISTATE_H_ 37 37 38 #include <trace.h> 39 38 40 #ifdef KERNEL 39 41 40 #include <typedefs.h>41 42 #include <verify.h> 42 #include <trace.h>43 43 44 44 #else /* KERNEL */ 45 45 46 #include <sys/types.h>47 48 #define NO_TRACE49 46 #define REQUIRES_EXTENT_MUTABLE(arg) 50 47 #define WRITES(arg) -
kernel/arch/abs32le/include/mm/frame.h
r3666d386 rc0699467 39 39 #define FRAME_SIZE (1 << FRAME_WIDTH) 40 40 41 #ifdef KERNEL42 43 41 #include <typedefs.h> 44 42 … … 46 44 extern void physmem_print(void); 47 45 48 #endif /* KERNEL */49 50 46 #endif 51 47 -
kernel/arch/abs32le/include/mm/page.h
r3666d386 rc0699467 41 41 #define PAGE_WIDTH FRAME_WIDTH 42 42 #define PAGE_SIZE FRAME_SIZE 43 44 #ifdef KERNEL45 43 46 44 #define KA2PA(x) (((uintptr_t) (x)) - UINT32_C(0x80000000)) … … 178 176 extern void page_fault(unsigned int, istate_t *); 179 177 180 #endif /* KERNEL */181 182 178 #endif 183 179 -
kernel/arch/abs32le/src/userspace.c
r3666d386 rc0699467 36 36 #include <typedefs.h> 37 37 #include <arch.h> 38 #include < proc/uarg.h>38 #include <abi/proc/uarg.h> 39 39 #include <mm/as.h> 40 41 40 42 41 void userspace(uspace_arg_t *kernel_uarg) -
kernel/arch/amd64/include/context.h
r3666d386 rc0699467 36 36 #define KERN_amd64_CONTEXT_H_ 37 37 38 #ifdef KERNEL39 40 38 #include <typedefs.h> 41 39 … … 52 50 (c)->rbp = 0; \ 53 51 } while (0) 54 55 #endif /* KERNEL */56 52 57 53 /* We include only registers that must be preserved -
kernel/arch/amd64/include/istate.h
r3666d386 rc0699467 36 36 #define KERN_amd64_ISTATE_H_ 37 37 38 #ifdef KERNEL39 40 #include <typedefs.h>41 38 #include <trace.h> 42 43 #else /* KERNEL */44 45 #include <sys/types.h>46 47 #define NO_TRACE48 49 #endif /* KERNEL */50 39 51 40 /** This is passed to interrupt handlers */ -
kernel/arch/amd64/include/mm/frame.h
r3666d386 rc0699467 39 39 #define FRAME_SIZE (1 << FRAME_WIDTH) 40 40 41 #ifdef KERNEL42 41 #ifndef __ASM__ 43 42 … … 49 48 50 49 #endif /* __ASM__ */ 51 #endif /* KERNEL */52 50 53 51 #endif -
kernel/arch/amd64/include/mm/page.h
r3666d386 rc0699467 50 50 #define PAGE_WIDTH FRAME_WIDTH 51 51 #define PAGE_SIZE FRAME_SIZE 52 53 #ifdef KERNEL54 52 55 53 #ifndef __ASM__ … … 231 229 #endif /* __ASM__ */ 232 230 233 #endif /* KERNEL */234 235 231 #endif 236 232 -
kernel/arch/amd64/src/userspace.c
r3666d386 rc0699467 38 38 #include <typedefs.h> 39 39 #include <arch.h> 40 #include < proc/uarg.h>40 #include <abi/proc/uarg.h> 41 41 #include <mm/as.h> 42 43 42 44 43 /** Enter userspace -
kernel/arch/arm32/include/istate.h
r3666d386 rc0699467 35 35 #define KERN_arm32_ISTATE_H_ 36 36 37 #include <trace.h> 38 39 #ifdef KERNEL 40 37 41 #include <arch/regutils.h> 38 42 39 #ifdef KERNEL 40 #include <typedefs.h> 41 #include <trace.h> 42 #else 43 #include <sys/types.h> 44 #define NO_TRACE 45 #endif 43 #else /* KERNEL */ 44 45 #include <libarch/regutils.h> 46 47 #endif /* KERNEL */ 46 48 47 49 /** Struct representing CPU state saved when an exception occurs. */ -
kernel/arch/arm32/include/mm/frame.h
r3666d386 rc0699467 40 40 #define FRAME_SIZE (1 << FRAME_WIDTH) 41 41 42 #ifdef KERNEL43 42 #ifndef __ASM__ 44 43 … … 69 68 70 69 #endif /* __ASM__ */ 71 #endif /* KERNEL */72 70 73 71 #endif -
kernel/arch/arm32/include/mm/page.h
r3666d386 rc0699467 52 52 # define PA2KA(x) ((x) + 0x80000000) 53 53 #endif 54 55 #ifdef KERNEL56 54 57 55 /* Number of entries in each level. */ … … 320 318 #endif /* __ASM__ */ 321 319 322 #endif /* KERNEL */323 324 320 #endif 325 321 -
kernel/arch/arm32/include/regutils.h
r3666d386 rc0699467 30 30 * @{ 31 31 */ 32 /** 32 /** 33 33 * @file 34 34 * @brief Utilities for convenient manipulation with ARM registers. … … 38 38 #define KERN_arm32_REGUTILS_H_ 39 39 40 #define STATUS_REG_IRQ_DISABLED_BIT (1 << 7)41 #define STATUS_REG_MODE_MASK 0x1f40 #define STATUS_REG_IRQ_DISABLED_BIT (1 << 7) 41 #define STATUS_REG_MODE_MASK 0x1f 42 42 43 #define CP15_R1_HIGH_VECTORS_BIT (1 << 13) 44 43 #define CP15_R1_HIGH_VECTORS_BIT (1 << 13) 45 44 46 45 /* ARM Processor Operation Modes */ 47 #define USER_MODE 0x1048 #define FIQ_MODE 0x1149 #define IRQ_MODE0x1250 #define SUPERVISOR_MODE0x1351 #define ABORT_MODE0x1752 #define UNDEFINED_MODE0x1b53 #define SYSTEM_MODE0x1f46 #define USER_MODE 0x10 47 #define FIQ_MODE 0x11 48 #define IRQ_MODE 0x12 49 #define SUPERVISOR_MODE 0x13 50 #define ABORT_MODE 0x17 51 #define UNDEFINED_MODE 0x1b 52 #define SYSTEM_MODE 0x1f 54 53 55 54 /* [CS]PRS manipulation macros */ 56 #define GEN_STATUS_READ(nm,reg) \ 57 static inline uint32_t nm## _status_reg_read(void) \ 58 { \ 59 uint32_t retval; \ 60 asm volatile( \ 61 "mrs %[retval], " #reg \ 62 : [retval] "=r" (retval) \ 63 ); \ 64 return retval; \ 65 } 55 #define GEN_STATUS_READ(nm, reg) \ 56 static inline uint32_t nm## _status_reg_read(void) \ 57 { \ 58 uint32_t retval; \ 59 \ 60 asm volatile ( \ 61 "mrs %[retval], " #reg \ 62 : [retval] "=r" (retval) \ 63 ); \ 64 \ 65 return retval; \ 66 } 66 67 67 #define GEN_STATUS_WRITE(nm, reg,fieldname, field) \68 static inline void nm## _status_reg_ ##fieldname## _write(uint32_t value) \69 { \70 asm volatile( \71 "msr " #reg "_" #field ", %[value]" \72 :: [value] "r" (value) \73 ); \74 }68 #define GEN_STATUS_WRITE(nm, reg, fieldname, field) \ 69 static inline void nm## _status_reg_ ##fieldname## _write(uint32_t value) \ 70 { \ 71 asm volatile ( \ 72 "msr " #reg "_" #field ", %[value]" \ 73 :: [value] "r" (value) \ 74 ); \ 75 } 75 76 77 /** Return the value of CPSR (Current Program Status Register). */ 78 GEN_STATUS_READ(current, cpsr); 76 79 77 /** Returns the value of CPSR (Current Program Status Register). */ 78 GEN_STATUS_READ(current, cpsr) 79 80 81 /** Sets control bits of CPSR. */ 80 /** Set control bits of CPSR. */ 82 81 GEN_STATUS_WRITE(current, cpsr, control, c); 83 82 84 85 /** Returns the value of SPSR (Saved Program Status Register). */ 86 GEN_STATUS_READ(saved, spsr) 87 83 /** Return the value of SPSR (Saved Program Status Register). */ 84 GEN_STATUS_READ(saved, spsr); 88 85 89 86 #endif -
kernel/arch/arm32/src/arm32.c
r3666d386 rc0699467 37 37 #include <config.h> 38 38 #include <genarch/fb/fb.h> 39 #include < genarch/fb/visuals.h>39 #include <abi/fb/visuals.h> 40 40 #include <sysinfo/sysinfo.h> 41 41 #include <console/console.h> -
kernel/arch/arm32/src/mach/gta02/gta02.c
r3666d386 rc0699467 39 39 #include <mm/page.h> 40 40 #include <genarch/fb/fb.h> 41 #include < genarch/fb/visuals.h>41 #include <abi/fb/visuals.h> 42 42 #include <genarch/drivers/s3c24xx_uart/s3c24xx_uart.h> 43 43 #include <genarch/drivers/s3c24xx_irqc/s3c24xx_irqc.h> -
kernel/arch/arm32/src/mach/integratorcp/integratorcp.c
r3666d386 rc0699467 48 48 #include <arch/mach/integratorcp/integratorcp.h> 49 49 #include <genarch/fb/fb.h> 50 #include < genarch/fb/visuals.h>50 #include <abi/fb/visuals.h> 51 51 #include <ddi/ddi.h> 52 52 #include <print.h> -
kernel/arch/arm32/src/mach/testarm/testarm.c
r3666d386 rc0699467 38 38 #include <mm/page.h> 39 39 #include <genarch/fb/fb.h> 40 #include < genarch/fb/visuals.h>40 #include <abi/fb/visuals.h> 41 41 #include <genarch/drivers/dsrln/dsrlnin.h> 42 42 #include <genarch/drivers/dsrln/dsrlnout.h> -
kernel/arch/ia32/include/context.h
r3666d386 rc0699467 36 36 #define KERN_ia32_CONTEXT_H_ 37 37 38 #ifdef KERNEL39 40 38 #include <typedefs.h> 41 39 … … 57 55 } while (0) 58 56 59 #endif /* KERNEL */60 61 57 /* 62 58 * Only save registers that must be preserved across -
kernel/arch/ia32/include/elf.h
r3666d386 rc0699467 27 27 */ 28 28 29 /** @addtogroup ia32 29 /** @addtogroup ia32 30 30 * @{ 31 31 */ … … 36 36 #define KERN_ia32_ELF_H_ 37 37 38 #define ELF_MACHINEEM_38639 #define ELF_DATA_ENCODING ELFDATA2LSB40 #define ELF_CLASS ELFCLASS3238 #define ELF_MACHINE EM_386 39 #define ELF_DATA_ENCODING ELFDATA2LSB 40 #define ELF_CLASS ELFCLASS32 41 41 42 42 #endif -
kernel/arch/ia32/include/istate.h
r3666d386 rc0699467 36 36 #define KERN_ia32_ISTATE_H_ 37 37 38 #ifdef KERNEL39 40 #include <typedefs.h>41 38 #include <trace.h> 42 43 #else /* KERNEL */44 45 #include <sys/types.h>46 47 #define NO_TRACE48 49 #endif /* KERNEL */50 39 51 40 typedef struct istate { -
kernel/arch/ia32/include/mm/frame.h
r3666d386 rc0699467 39 39 #define FRAME_SIZE (1 << FRAME_WIDTH) 40 40 41 #ifdef KERNEL42 41 #ifndef __ASM__ 43 42 … … 50 49 51 50 #endif /* __ASM__ */ 52 #endif /* KERNEL */53 51 54 52 #endif -
kernel/arch/ia32/include/mm/page.h
r3666d386 rc0699467 42 42 #define PAGE_SIZE FRAME_SIZE 43 43 44 #ifdef KERNEL45 46 44 #ifndef __ASM__ 47 45 … … 201 199 #endif /* __ASM__ */ 202 200 203 #endif /* KERNEL */204 205 201 #endif 206 202 -
kernel/arch/ia32/src/drivers/vesa.c
r3666d386 rc0699467 38 38 39 39 #include <genarch/fb/fb.h> 40 #include <genarch/fb/visuals.h>41 40 #include <arch/drivers/vesa.h> 42 41 #include <console/chardev.h> -
kernel/arch/ia32/src/smp/smp.c
r3666d386 rc0699467 42 42 #include <config.h> 43 43 #include <synch/waitq.h> 44 #include <synch/synch.h>45 44 #include <arch/pm.h> 46 45 #include <func.h> -
kernel/arch/ia32/src/userspace.c
r3666d386 rc0699467 37 37 #include <typedefs.h> 38 38 #include <arch.h> 39 #include < proc/uarg.h>39 #include <abi/proc/uarg.h> 40 40 #include <mm/as.h> 41 42 41 43 42 /** Enter userspace -
kernel/arch/ia64/include/elf.h
r3666d386 rc0699467 27 27 */ 28 28 29 /** @addtogroup ia64 29 /** @addtogroup ia64 30 30 * @{ 31 31 */ … … 36 36 #define KERN_ia64_ELF_H_ 37 37 38 #define ELF_MACHINEEM_IA_6439 #define ELF_DATA_ENCODING ELFDATA2LSB40 #define ELF_CLASS ELFCLASS6438 #define ELF_MACHINE EM_IA_64 39 #define ELF_DATA_ENCODING ELFDATA2LSB 40 #define ELF_CLASS ELFCLASS64 41 41 42 42 #endif -
kernel/arch/ia64/include/istate.h
r3666d386 rc0699467 36 36 #define KERN_ia64_ISTATE_H_ 37 37 38 #include <trace.h> 39 40 #ifdef KERNEL 41 38 42 #include <arch/register.h> 39 43 40 #ifdef KERNEL 41 #include <typedefs.h> 42 #include <trace.h> 43 #else 44 #include <sys/types.h> 45 #define NO_TRACE 46 #endif 44 #else /* KERNEL */ 45 46 #include <libarch/register.h> 47 48 #endif /* KERNEL */ 47 49 48 50 typedef struct istate { -
kernel/arch/ia64/include/mm/frame.h
r3666d386 rc0699467 39 39 #define FRAME_SIZE (1 << FRAME_WIDTH) 40 40 41 #ifdef KERNEL42 41 #ifndef __ASM__ 43 42 … … 50 49 51 50 #endif /* __ASM__ */ 52 #endif /* KERNEL */53 51 54 52 #endif -
kernel/arch/ia64/include/mm/page.h
r3666d386 rc0699467 41 41 #define PAGE_SIZE FRAME_SIZE 42 42 #define PAGE_WIDTH FRAME_WIDTH 43 44 #ifdef KERNEL45 43 46 44 /** Bit width of the TLB-locked portion of kernel address space. */ … … 316 314 #endif /* __ASM__ */ 317 315 318 #endif /* KERNEL */319 320 316 #endif 321 317 -
kernel/arch/ia64/include/register.h
r3666d386 rc0699467 61 61 #define PSR_CPL_MASK_SHIFTED 3 62 62 63 #define PSR_RI_SHIFT 4164 #define PSR_RI_LEN 263 #define PSR_RI_SHIFT 41 64 #define PSR_RI_LEN 2 65 65 66 66 #define PFM_MASK (~0x3fffffffff) … … 145 145 #ifndef __ASM__ 146 146 147 #ifdef KERNEL148 #include <typedefs.h>149 #else150 #include <sys/types.h>151 #endif152 153 147 /** Processor Status Register. */ 154 148 typedef union { -
kernel/arch/ia64/src/ia64.c
r3666d386 rc0699467 50 50 #include <userspace.h> 51 51 #include <console/console.h> 52 #include < proc/uarg.h>52 #include <abi/proc/uarg.h> 53 53 #include <syscall/syscall.h> 54 54 #include <ddi/irq.h> -
kernel/arch/mips32/include/context_offset.h
r3666d386 rc0699467 63 63 #ifdef __ASM__ 64 64 65 #ifdef KERNEL 66 65 67 #include <arch/asm/regname.h> 66 68 67 # ctx: address of the structure with saved context 69 #else /* KERNEL */ 70 71 #include <libarch/regname.h> 72 73 #endif /* KERNEL */ 74 75 /* ctx: address of the structure with saved context */ 68 76 .macro CONTEXT_SAVE_ARCH_CORE ctx:req 69 sw $s0, OFFSET_S0(\ctx)70 sw $s1, OFFSET_S1(\ctx)71 sw $s2, OFFSET_S2(\ctx)72 sw $s3, OFFSET_S3(\ctx)73 sw $s4, OFFSET_S4(\ctx)74 sw $s5, OFFSET_S5(\ctx)75 sw $s6, OFFSET_S6(\ctx)76 sw $s7, OFFSET_S7(\ctx)77 sw $s8, OFFSET_S8(\ctx)78 sw $gp, OFFSET_GP(\ctx)79 77 sw $s0, OFFSET_S0(\ctx) 78 sw $s1, OFFSET_S1(\ctx) 79 sw $s2, OFFSET_S2(\ctx) 80 sw $s3, OFFSET_S3(\ctx) 81 sw $s4, OFFSET_S4(\ctx) 82 sw $s5, OFFSET_S5(\ctx) 83 sw $s6, OFFSET_S6(\ctx) 84 sw $s7, OFFSET_S7(\ctx) 85 sw $s8, OFFSET_S8(\ctx) 86 sw $gp, OFFSET_GP(\ctx) 87 80 88 #ifndef KERNEL 81 sw $k1, OFFSET_TLS(\ctx)82 89 sw $k1, OFFSET_TLS(\ctx) 90 83 91 #ifdef CONFIG_FPU 84 mfc1 $t0, $2092 mfc1 $t0, $20 85 93 sw $t0, OFFSET_F20(\ctx) 86 87 mfc1 $t0, $2194 95 mfc1 $t0, $21 88 96 sw $t0, OFFSET_F21(\ctx) 89 90 mfc1 $t0, $2297 98 mfc1 $t0, $22 91 99 sw $t0, OFFSET_F22(\ctx) 92 93 mfc1 $t0, $23100 101 mfc1 $t0, $23 94 102 sw $t0, OFFSET_F23(\ctx) 95 96 mfc1 $t0, $24103 104 mfc1 $t0, $24 97 105 sw $t0, OFFSET_F24(\ctx) 98 99 mfc1 $t0, $25106 107 mfc1 $t0, $25 100 108 sw $t0, OFFSET_F25(\ctx) 101 102 mfc1 $t0, $26109 110 mfc1 $t0, $26 103 111 sw $t0, OFFSET_F26(\ctx) 104 105 mfc1 $t0, $27112 113 mfc1 $t0, $27 106 114 sw $t0, OFFSET_F27(\ctx) 107 108 mfc1 $t0, $28115 116 mfc1 $t0, $28 109 117 sw $t0, OFFSET_F28(\ctx) 110 111 mfc1 $t0, $29118 119 mfc1 $t0, $29 112 120 sw $t0, OFFSET_F29(\ctx) 113 121 114 mfc1 $t0, $30122 mfc1 $t0, $30 115 123 sw $t0, OFFSET_F30(\ctx) 116 124 #endif /* CONFIG_FPU */ 117 125 #endif /* KERNEL */ 118 119 sw $ra, OFFSET_PC(\ctx)120 sw $sp, OFFSET_SP(\ctx)126 127 sw $ra, OFFSET_PC(\ctx) 128 sw $sp, OFFSET_SP(\ctx) 121 129 .endm 122 130 123 # ctx: address of the structure with saved context 131 /* ctx: address of the structure with saved context */ 124 132 .macro CONTEXT_RESTORE_ARCH_CORE ctx:req 125 lw $s0, OFFSET_S0(\ctx)126 lw $s1, OFFSET_S1(\ctx)127 lw $s2, OFFSET_S2(\ctx)128 lw $s3, OFFSET_S3(\ctx)129 lw $s4, OFFSET_S4(\ctx)130 lw $s5, OFFSET_S5(\ctx)131 lw $s6, OFFSET_S6(\ctx)132 lw $s7, OFFSET_S7(\ctx)133 lw $s8, OFFSET_S8(\ctx)134 lw $gp, OFFSET_GP(\ctx)133 lw $s0, OFFSET_S0(\ctx) 134 lw $s1, OFFSET_S1(\ctx) 135 lw $s2, OFFSET_S2(\ctx) 136 lw $s3, OFFSET_S3(\ctx) 137 lw $s4, OFFSET_S4(\ctx) 138 lw $s5, OFFSET_S5(\ctx) 139 lw $s6, OFFSET_S6(\ctx) 140 lw $s7, OFFSET_S7(\ctx) 141 lw $s8, OFFSET_S8(\ctx) 142 lw $gp, OFFSET_GP(\ctx) 135 143 #ifndef KERNEL 136 lw $k1, OFFSET_TLS(\ctx)137 144 lw $k1, OFFSET_TLS(\ctx) 145 138 146 #ifdef CONFIG_FPU 139 147 lw $t0, OFFSET_F20(\ctx) 140 mtc1 $t0, $20141 148 mtc1 $t0, $20 149 142 150 lw $t0, OFFSET_F21(\ctx) 143 mtc1 $t0, $21144 151 mtc1 $t0, $21 152 145 153 lw $t0, OFFSET_F22(\ctx) 146 mtc1 $t0, $22147 154 mtc1 $t0, $22 155 148 156 lw $t0, OFFSET_F23(\ctx) 149 mtc1 $t0, $23150 157 mtc1 $t0, $23 158 151 159 lw $t0, OFFSET_F24(\ctx) 152 mtc1 $t0, $24153 160 mtc1 $t0, $24 161 154 162 lw $t0, OFFSET_F25(\ctx) 155 mtc1 $t0, $25156 163 mtc1 $t0, $25 164 157 165 lw $t0, OFFSET_F26(\ctx) 158 mtc1 $t0, $26159 166 mtc1 $t0, $26 167 160 168 lw $t0, OFFSET_F27(\ctx) 161 mtc1 $t0, $27162 169 mtc1 $t0, $27 170 163 171 lw $t0, OFFSET_F28(\ctx) 164 mtc1 $t0, $28165 172 mtc1 $t0, $28 173 166 174 lw $t0, OFFSET_F29(\ctx) 167 mtc1 $t0, $29168 175 mtc1 $t0, $29 176 169 177 lw $t0, OFFSET_F30(\ctx) 170 mtc1 $t0, $30178 mtc1 $t0, $30 171 179 #endif /* CONFIG_FPU */ 172 180 #endif /* KERNEL */ 173 174 lw $ra, OFFSET_PC(\ctx)175 lw $sp, OFFSET_SP(\ctx)181 182 lw $ra, OFFSET_PC(\ctx) 183 lw $sp, OFFSET_SP(\ctx) 176 184 .endm 177 185 178 #endif 179 186 #endif /* __ASM__ */ 180 187 181 188 #endif -
kernel/arch/mips32/include/cp0.h
r3666d386 rc0699467 36 36 #define KERN_mips32_CP0_H_ 37 37 38 #ifdef KERNEL39 #include <typedefs.h>40 #else41 #include <sys/types.h>42 #endif43 44 38 #define cp0_status_ie_enabled_bit (1 << 0) 45 39 #define cp0_status_exl_exception_bit (1 << 1) … … 49 43 #define cp0_status_fpu_bit (1 << 29) 50 44 51 #define cp0_status_im_shift 852 #define cp0_status_im_mask 0xff0045 #define cp0_status_im_shift 8 46 #define cp0_status_im_mask 0xff00 53 47 54 #define cp0_cause_excno(cause) ((cause >> 2) & 0x1f)55 #define cp0_cause_coperr(cause) ((cause >> 28) & 0x3)48 #define cp0_cause_excno(cause) ((cause >> 2) & 0x1f) 49 #define cp0_cause_coperr(cause) ((cause >> 28) & 0x3) 56 50 57 #define fpu_cop_id 151 #define fpu_cop_id 1 58 52 59 53 /* 60 54 * Magic value for use in msim. 61 55 */ 62 #define cp0_compare_value 10000056 #define cp0_compare_value 100000 63 57 64 #define cp0_mask_all_int() cp0_status_write(cp0_status_read() & ~(cp0_status_im_mask)) 65 #define cp0_unmask_all_int() cp0_status_write(cp0_status_read() | cp0_status_im_mask) 66 #define cp0_mask_int(it) cp0_status_write(cp0_status_read() & ~(1 << (cp0_status_im_shift + (it)))) 67 #define cp0_unmask_int(it) cp0_status_write(cp0_status_read() | (1 << (cp0_status_im_shift + (it)))) 58 #define cp0_mask_all_int() \ 59 cp0_status_write(cp0_status_read() & ~(cp0_status_im_mask)) 68 60 69 #define GEN_READ_CP0(nm,reg) static inline uint32_t cp0_ ##nm##_read(void) \ 70 { \ 71 uint32_t retval; \ 72 asm volatile ("mfc0 %0, $" #reg : "=r"(retval)); \ 73 return retval; \ 74 } 61 #define cp0_unmask_all_int() \ 62 cp0_status_write(cp0_status_read() | cp0_status_im_mask) 75 63 76 #define GEN_WRITE_CP0(nm,reg) static inline void cp0_ ##nm##_write(uint32_t val) \ 77 { \ 78 asm volatile ("mtc0 %0, $" #reg : : "r"(val) ); \ 79 } 64 #define cp0_mask_int(it) \ 65 cp0_status_write(cp0_status_read() & ~(1 << (cp0_status_im_shift + (it)))) 66 67 #define cp0_unmask_int(it) \ 68 cp0_status_write(cp0_status_read() | (1 << (cp0_status_im_shift + (it)))) 69 70 #define GEN_READ_CP0(nm, reg) \ 71 static inline uint32_t cp0_ ##nm##_read(void) \ 72 { \ 73 uint32_t retval; \ 74 \ 75 asm volatile ( \ 76 "mfc0 %0, $" #reg \ 77 : "=r"(retval) \ 78 ); \ 79 \ 80 return retval; \ 81 } 82 83 #define GEN_WRITE_CP0(nm, reg) \ 84 static inline void cp0_ ##nm##_write(uint32_t val) \ 85 { \ 86 asm volatile ( \ 87 "mtc0 %0, $" #reg \ 88 :: "r"(val) \ 89 ); \ 90 } 80 91 81 92 GEN_READ_CP0(index, 0); -
kernel/arch/mips32/include/istate.h
r3666d386 rc0699467 36 36 #define KERN_mips32_ISTATE_H_ 37 37 38 #include <trace.h> 39 40 #ifdef KERNEL 41 38 42 #include <arch/cp0.h> 39 43 40 #ifdef KERNEL 41 #include <typedefs.h> 42 #include <trace.h> 43 #else 44 #include <sys/types.h> 45 #define NO_TRACE 46 #endif 44 #else /* KERNEL */ 45 46 #include <libarch/cp0.h> 47 48 #endif /* KERNEL */ 47 49 48 50 typedef struct istate { -
kernel/arch/mips32/include/mm/frame.h
r3666d386 rc0699467 39 39 #define FRAME_SIZE (1 << FRAME_WIDTH) 40 40 41 #ifdef KERNEL42 41 #ifndef __ASM__ 43 42 … … 46 45 47 46 #endif /* __ASM__ */ 48 #endif /* KERNEL */49 47 50 48 #endif -
kernel/arch/mips32/include/mm/page.h
r3666d386 rc0699467 49 49 # define PA2KA(x) ((x) + 0x80000000) 50 50 #endif 51 52 #ifdef KERNEL53 51 54 52 /* … … 188 186 #endif /* __ASM__ */ 189 187 190 #endif /* KERNEL */191 192 188 #endif 193 189 -
kernel/arch/mips32/src/mips32.c
r3666d386 rc0699467 41 41 #include <memstr.h> 42 42 #include <proc/thread.h> 43 #include < proc/uarg.h>43 #include <abi/proc/uarg.h> 44 44 #include <print.h> 45 45 #include <console/console.h> … … 52 52 #include <arch/debugger.h> 53 53 #include <genarch/fb/fb.h> 54 #include < genarch/fb/visuals.h>54 #include <abi/fb/visuals.h> 55 55 #include <genarch/drivers/dsrln/dsrlnin.h> 56 56 #include <genarch/drivers/dsrln/dsrlnout.h> -
kernel/arch/mips64/include/context_offset.h
r3666d386 rc0699467 63 63 #ifdef __ASM__ 64 64 65 #ifdef KERNEL 66 65 67 #include <arch/asm/regname.h> 66 68 67 # ctx: address of the structure with saved context 69 #else /* KERNEL */ 70 71 #include <libarch/regname.h> 72 73 #endif /* KERNEL */ 74 75 /* ctx: address of the structure with saved context */ 68 76 .macro CONTEXT_SAVE_ARCH_CORE ctx:req 69 77 sd $s0, OFFSET_S0(\ctx) … … 121 129 .endm 122 130 123 # ctx: address of the structure with saved context 131 /* ctx: address of the structure with saved context */ 124 132 .macro CONTEXT_RESTORE_ARCH_CORE ctx:req 125 133 ld $s0, OFFSET_S0(\ctx) -
kernel/arch/mips64/include/cp0.h
r3666d386 rc0699467 35 35 #ifndef KERN_mips64_CP0_H_ 36 36 #define KERN_mips64_CP0_H_ 37 38 #ifdef KERNEL39 40 #include <typedefs.h>41 42 #else43 44 #include <sys/types.h>45 46 #endif47 37 48 38 #define cp0_status_ie_enabled_bit (1 << 0) -
kernel/arch/mips64/include/istate.h
r3666d386 rc0699467 36 36 #define KERN_mips64_ISTATE_H_ 37 37 38 #include < arch/cp0.h>38 #include <trace.h> 39 39 40 40 #ifdef KERNEL 41 41 42 #include <typedefs.h> 43 #include <trace.h> 42 #include <arch/cp0.h> 44 43 45 #else 44 #else /* KERNEL */ 46 45 47 #include <sys/types.h> 48 #define NO_TRACE 46 #include <libarch/cp0.h> 49 47 50 #endif 48 #endif /* KERNEL */ 51 49 52 50 typedef struct istate { -
kernel/arch/mips64/include/mm/frame.h
r3666d386 rc0699467 39 39 #define FRAME_SIZE (1 << FRAME_WIDTH) 40 40 41 #ifdef KERNEL42 41 #ifndef __ASM__ 43 42 … … 46 45 47 46 #endif /* __ASM__ */ 48 #endif /* KERNEL */49 47 50 48 #endif -
kernel/arch/mips64/include/mm/page.h
r3666d386 rc0699467 50 50 #endif 51 51 52 #ifdef KERNEL53 52 #ifndef __ASM__ 54 53 … … 56 55 57 56 #endif /* __ASM__ */ 58 #endif /* KERNEL */59 57 60 58 #endif -
kernel/arch/mips64/src/mips64.c
r3666d386 rc0699467 41 41 #include <memstr.h> 42 42 #include <proc/thread.h> 43 #include < proc/uarg.h>43 #include <abi/proc/uarg.h> 44 44 #include <print.h> 45 45 #include <console/console.h> … … 52 52 #include <arch/debugger.h> 53 53 #include <genarch/fb/fb.h> 54 #include < genarch/fb/visuals.h>54 #include <abi/fb/visuals.h> 55 55 #include <genarch/drivers/dsrln/dsrlnin.h> 56 56 #include <genarch/drivers/dsrln/dsrlnout.h> -
kernel/arch/ppc32/include/asm.h
r3666d386 rc0699467 38 38 #include <typedefs.h> 39 39 #include <config.h> 40 #include <arch/ cpu.h>40 #include <arch/msr.h> 41 41 #include <arch/mm/asid.h> 42 42 #include <trace.h> -
kernel/arch/ppc32/include/context_offset.h
r3666d386 rc0699467 75 75 76 76 #ifdef __ASM__ 77 # include <arch/asm/regname.h>78 77 79 # ctx: address of the structure with saved context 78 #ifdef KERNEL 79 80 #include <arch/asm/regname.h> 81 82 #else /* KERNEL */ 83 84 #include <libarch/regname.h> 85 86 #endif /* KERNEL */ 87 88 /* ctx: address of the structure with saved context */ 80 89 .macro CONTEXT_SAVE_ARCH_CORE ctx:req 81 90 stw sp, OFFSET_SP(\ctx) … … 102 111 .endm 103 112 104 # ctx: address of the structure with saved context 113 /* ctx: address of the structure with saved context */ 105 114 .macro CONTEXT_RESTORE_ARCH_CORE ctx:req 106 115 lwz sp, OFFSET_SP(\ctx) -
kernel/arch/ppc32/include/cpu.h
r3666d386 rc0699467 36 36 #define KERN_ppc32_CPU_H_ 37 37 38 /* MSR bits */39 #define MSR_DR (1 << 4)40 #define MSR_IR (1 << 5)41 #define MSR_PR (1 << 14)42 #define MSR_EE (1 << 15)43 44 /* HID0 bits */45 #define HID0_STEN (1 << 24)46 #define HID0_ICE (1 << 15)47 #define HID0_DCE (1 << 14)48 #define HID0_ICFI (1 << 11)49 #define HID0_DCI (1 << 10)50 51 #ifndef __ASM__52 53 38 #include <typedefs.h> 54 39 #include <trace.h> … … 67 52 } 68 53 69 #endif /* __ASM__ */70 71 54 #endif 72 55 -
kernel/arch/ppc32/include/exception.h
r3666d386 rc0699467 37 37 38 38 #include <typedefs.h> 39 #include <arch/ cpu.h>39 #include <arch/msr.h> 40 40 #include <trace.h> 41 41 -
kernel/arch/ppc32/include/istate.h
r3666d386 rc0699467 36 36 #define KERN_ppc32_EXCEPTION_H_ 37 37 38 #include <typedefs.h>39 #include <arch/cpu.h>40 38 #include <trace.h> 39 40 #ifdef KERNEL 41 42 #include <arch/msr.h> 43 44 #else /* KERNEL */ 45 46 #include <libarch/msr.h> 47 48 #endif /* KERNEL */ 41 49 42 50 typedef struct istate { -
kernel/arch/ppc32/include/mm/frame.h
r3666d386 rc0699467 39 39 #define FRAME_SIZE (1 << FRAME_WIDTH) 40 40 41 #ifdef KERNEL42 41 #ifndef __ASM__ 43 42 … … 63 62 64 63 #endif /* __ASM__ */ 65 #endif /* KERNEL */66 64 67 65 #endif -
kernel/arch/ppc32/include/mm/page.h
r3666d386 rc0699467 41 41 #define PAGE_WIDTH FRAME_WIDTH 42 42 #define PAGE_SIZE FRAME_SIZE 43 44 #ifdef KERNEL45 43 46 44 #ifndef __ASM__ … … 181 179 #endif /* __ASM__ */ 182 180 183 #endif /* KERNEL */184 185 181 #endif 186 182 -
kernel/arch/ppc32/include/msr.h
r3666d386 rc0699467 1 1 /* 2 * Copyright (c) 20 11 Jiri Svoboda2 * Copyright (c) 2005 Martin Decky 3 3 * All rights reserved. 4 4 * … … 27 27 */ 28 28 29 /** @addtogroup generic29 /** @addtogroup ppc32 30 30 * @{ 31 31 */ 32 32 /** @file 33 *34 * This header allows including a kernel header using typedefs.h from35 * libc. User-space code should use sys/types.h directly.36 33 */ 37 34 38 #ifndef LIBC_TYPEDEFS_H_39 #define LIBC_TYPEDEFS_H_35 #ifndef KERN_ppc32_MSR_H_ 36 #define KERN_ppc32_MSR_H_ 40 37 41 #include <sys/types.h> 38 /* MSR bits */ 39 #define MSR_DR (1 << 4) 40 #define MSR_IR (1 << 5) 41 #define MSR_PR (1 << 14) 42 #define MSR_EE (1 << 15) 43 44 /* HID0 bits */ 45 #define HID0_STEN (1 << 24) 46 #define HID0_ICE (1 << 15) 47 #define HID0_DCE (1 << 14) 48 #define HID0_ICFI (1 << 11) 49 #define HID0_DCI (1 << 10) 42 50 43 51 #endif -
kernel/arch/ppc32/src/asm.S
r3666d386 rc0699467 28 28 29 29 #include <arch/asm/regname.h> 30 #include <arch/ cpu.h>30 #include <arch/msr.h> 31 31 32 32 .text -
kernel/arch/ppc32/src/exception.S
r3666d386 rc0699467 28 28 29 29 #include <arch/asm/regname.h> 30 #include <arch/ cpu.h>30 #include <arch/msr.h> 31 31 #include <arch/mm/page.h> 32 32 -
kernel/arch/ppc32/src/ppc32.c
r3666d386 rc0699467 41 41 #include <interrupt.h> 42 42 #include <genarch/fb/fb.h> 43 #include < genarch/fb/visuals.h>43 #include <abi/fb/visuals.h> 44 44 #include <genarch/ofw/ofw_tree.h> 45 45 #include <genarch/ofw/pci.h> 46 46 #include <userspace.h> 47 47 #include <mm/page.h> 48 #include < proc/uarg.h>48 #include <abi/proc/uarg.h> 49 49 #include <console/console.h> 50 50 #include <sysinfo/sysinfo.h> -
kernel/arch/sparc64/include/barrier.h
r3666d386 rc0699467 37 37 38 38 #include <trace.h> 39 40 #ifdef KERNEL41 42 #include <typedefs.h>43 44 #else45 46 #include <stdint.h>47 48 #endif49 39 50 40 /* -
kernel/arch/sparc64/include/elf.h
r3666d386 rc0699467 27 27 */ 28 28 29 /** @addtogroup sparc64 29 /** @addtogroup sparc64 30 30 * @{ 31 31 */ … … 36 36 #define KERN_sparc64_ELF_H_ 37 37 38 #define ELF_MACHINEEM_SPARCV939 #define ELF_DATA_ENCODING ELFDATA2MSB40 #define ELF_CLASS ELFCLASS6438 #define ELF_MACHINE EM_SPARCV9 39 #define ELF_DATA_ENCODING ELFDATA2MSB 40 #define ELF_CLASS ELFCLASS64 41 41 42 42 #endif -
kernel/arch/sparc64/include/istate.h
r3666d386 rc0699467 37 37 #define KERN_sparc64_ISTATE_H_ 38 38 39 #include <trace.h> 40 41 #ifdef KERNEL 42 39 43 #include <arch/regdef.h> 40 44 41 #ifdef KERNEL 42 #include <typedefs.h> 43 #include <trace.h> 44 #else 45 #include <sys/types.h> 46 #define NO_TRACE 47 #endif 45 #else /* KERNEL */ 46 47 #include <libarch/regdef.h> 48 49 #endif /* KERNEL */ 48 50 49 51 typedef struct istate { -
kernel/arch/sparc64/include/mm/page.h
r3666d386 rc0699467 54 54 #define MMU_PAGES_PER_PAGE (1 << (PAGE_WIDTH - MMU_PAGE_WIDTH)) 55 55 56 #ifdef KERNEL57 58 56 #ifndef __ASM__ 59 57 … … 77 75 #endif /* !def __ASM__ */ 78 76 79 #endif /* KERNEL */80 81 77 #endif 82 78 -
kernel/arch/sparc64/include/mm/sun4u/frame.h
r3666d386 rc0699467 52 52 #define FRAME_SIZE (1 << FRAME_WIDTH) 53 53 54 #ifdef KERNEL55 54 #ifndef __ASM__ 56 55 … … 80 79 81 80 #endif 82 #endif83 81 84 82 #endif -
kernel/arch/sparc64/include/mm/sun4v/frame.h
r3666d386 rc0699467 42 42 #define FRAME_SIZE (1 << FRAME_WIDTH) 43 43 44 #ifdef KERNEL45 44 #ifndef __ASM__ 46 45 … … 52 51 53 52 #endif 54 #endif55 53 56 54 #endif -
kernel/arch/sparc64/include/mm/sun4v/page.h
r3666d386 rc0699467 46 46 #define MMU_PAGES_PER_PAGE (1 << (PAGE_WIDTH - MMU_PAGE_WIDTH)) 47 47 48 #ifdef KERNEL49 50 48 #ifndef __ASM__ 51 49 … … 69 67 #endif /* !def __ASM__ */ 70 68 71 #endif /* KERNEL */72 73 69 #endif 74 70 -
kernel/arch/sparc64/include/sun4v/regdef.h
r3666d386 rc0699467 28 28 */ 29 29 30 /** @addtogroup sparc64 30 /** @addtogroup sparc64 31 31 * @{ 32 32 */ … … 37 37 #define KERN_sparc64_sun4v_REGDEF_H_ 38 38 39 #define PSTATE_IE_BIT (1 << 1) 40 #define PSTATE_PRIV_BIT (1 << 2) 41 #define PSTATE_PEF_BIT (1 << 4) 39 #define TSTATE_CWP_MASK 0x1f 42 40 43 #define TSTATE_PSTATE_SHIFT 8 44 #define TSTATE_PRIV_BIT (PSTATE_PRIV_BIT << TSTATE_PSTATE_SHIFT) 45 #define TSTATE_CWP_MASK 0x1f 46 #define TSTATE_IE_BIT (PSTATE_IE_BIT << TSTATE_PSTATE_SHIFT) 47 48 #define WSTATE_NORMAL(n) (n) 49 #define WSTATE_OTHER(n) ((n) << 3) 50 51 #define TSTATE_PEF_BIT (PSTATE_PEF_BIT << TSTATE_PSTATE_SHIFT) 41 #define WSTATE_NORMAL(n) (n) 42 #define WSTATE_OTHER(n) ((n) << 3) 52 43 53 44 #endif -
kernel/arch/sparc64/src/drivers/scr.c
r3666d386 rc0699467 39 39 #include <genarch/ofw/upa.h> 40 40 #include <genarch/fb/fb.h> 41 #include < genarch/fb/visuals.h>41 #include <abi/fb/visuals.h> 42 42 #include <console/chardev.h> 43 43 #include <console/console.h> -
kernel/arch/sparc64/src/smp/sun4u/smp.c
r3666d386 rc0699467 42 42 #include <macros.h> 43 43 #include <typedefs.h> 44 #include <synch/synch.h>45 44 #include <synch/waitq.h> 46 45 #include <print.h> -
kernel/arch/sparc64/src/smp/sun4v/smp.c
r3666d386 rc0699467 45 45 #include <func.h> 46 46 #include <typedefs.h> 47 #include <synch/synch.h>48 47 #include <synch/waitq.h> 49 48 #include <print.h> -
kernel/arch/sparc64/src/sun4v/start.S
r3666d386 rc0699467 30 30 #include <arch/arch.h> 31 31 #include <arch/stack.h> 32 #include <arch/regdef.h> 32 33 #include <arch/context_offset.h> 33 34 #include <arch/sun4v/regdef.h>
Note:
See TracChangeset
for help on using the changeset viewer.
