Changeset 8b4d6cb in mainline
- Timestamp:
- 2009-01-03T15:33:55Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 2b70a6e
- Parents:
- fb69f39
- Location:
- kernel/arch/ia64/include
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ia64/include/asm.h
rfb69f39 r8b4d6cb 44 44 #define IA64_IOSPACE_ADDRESS 0xE001000000000000ULL 45 45 46 static inline void outb(ioport_t port,uint8_t v) 47 { 48 *((uint8_t *)(IA64_IOSPACE_ADDRESS + ( (port & 0xfff) | ( (port >> 2) << 12 )))) = v; 49 50 asm volatile ("mf\n" ::: "memory"); 51 } 52 53 static inline void outw(ioport_t port,uint16_t v) 54 { 55 *((uint16_t *)(IA64_IOSPACE_ADDRESS + ( (port & 0xfff) | ( (port >> 2) << 12 )))) = v; 56 57 asm volatile ("mf\n" ::: "memory"); 58 } 59 60 static inline void outl(ioport_t port,uint32_t v) 61 { 62 *((uint32_t *)(IA64_IOSPACE_ADDRESS + ( (port & 0xfff) | ( (port >> 2) << 12 )))) = v; 63 64 asm volatile ("mf\n" ::: "memory"); 65 } 66 67 46 static inline void outb(ioport_t port, uint8_t v) 47 { 48 *((uint8_t *)(IA64_IOSPACE_ADDRESS + 49 ((port & 0xfff) | ((port >> 2) << 12)))) = v; 50 51 asm volatile ("mf\n" ::: "memory"); 52 } 53 54 static inline void outw(ioport_t port, uint16_t v) 55 { 56 *((uint16_t *)(IA64_IOSPACE_ADDRESS + 57 ((port & 0xfff) | ((port >> 2) << 12)))) = v; 58 59 asm volatile ("mf\n" ::: "memory"); 60 } 61 62 static inline void outl(ioport_t port, uint32_t v) 63 { 64 *((uint32_t *)(IA64_IOSPACE_ADDRESS + 65 ((port & 0xfff) | ((port >> 2) << 12)))) = v; 66 67 asm volatile ("mf\n" ::: "memory"); 68 } 68 69 69 70 static inline uint8_t inb(ioport_t port) … … 71 72 asm volatile ("mf\n" ::: "memory"); 72 73 73 return *((uint8_t *)(IA64_IOSPACE_ADDRESS + ( (port & 0xfff) | ( (port >> 2) << 12 )))); 74 return *((uint8_t *)(IA64_IOSPACE_ADDRESS + 75 ((port & 0xfff) | ((port >> 2) << 12)))); 74 76 } 75 77 … … 78 80 asm volatile ("mf\n" ::: "memory"); 79 81 80 return *((uint16_t *)(IA64_IOSPACE_ADDRESS + ( (port & 0xffE) | ( (port >> 2) << 12 )))); 82 return *((uint16_t *)(IA64_IOSPACE_ADDRESS + 83 ((port & 0xffE) | ((port >> 2) << 12)))); 81 84 } 82 85 … … 85 88 asm volatile ("mf\n" ::: "memory"); 86 89 87 return *((uint32_t *)(IA64_IOSPACE_ADDRESS + ( (port & 0xfff) | ( (port >> 2) << 12 )))); 88 } 89 90 90 return *((uint32_t *)(IA64_IOSPACE_ADDRESS + 91 ((port & 0xfff) | ((port >> 2) << 12)))); 92 } 91 93 92 94 /** Return base address of current stack … … 343 345 extern void asm_delay_loop(uint32_t t); 344 346 345 extern void switch_to_userspace(uintptr_t entry, uintptr_t sp, uintptr_t bsp, uintptr_t uspace_uarg, uint64_t ipsr, uint64_t rsc); 347 extern void switch_to_userspace(uintptr_t, uintptr_t, uintptr_t, uintptr_t, 348 uint64_t, uint64_t); 346 349 347 350 #endif -
kernel/arch/ia64/include/atomic.h
rfb69f39 r8b4d6cb 38 38 /** Atomic addition. 39 39 * 40 * @param val 41 * @param imm 40 * @param val Atomic value. 41 * @param imm Value to add. 42 42 * 43 * @return 43 * @return Value before addition. 44 44 */ 45 45 static inline long atomic_add(atomic_t *val, int imm) … … 47 47 long v; 48 48 49 asm volatile ("fetchadd8.rel %0 = %1, %2\n" : "=r" (v), "+m" (val->count) : "i" (imm)); 49 asm volatile ("fetchadd8.rel %0 = %1, %2\n" : "=r" (v), 50 "+m" (val->count) : "i" (imm)); 50 51 51 52 return v; … … 57 58 58 59 asm volatile ( 59 "movl %0 =0x01;;\n"60 "xchg8 %0 =%1,%0;;\n"61 : "=r" (v), "+m" (val->count)60 "movl %0 = 0x01;;\n" 61 "xchg8 %0 = %1, %0;;\n" 62 : "=r" (v), "+m" (val->count) 62 63 ); 63 64 … … 66 67 67 68 68 static inline void atomic_inc(atomic_t *val) { atomic_add(val, 1); } 69 static inline void atomic_dec(atomic_t *val) { atomic_add(val, -1); } 69 static inline void atomic_inc(atomic_t *val) 70 { 71 atomic_add(val, 1); 72 } 70 73 71 static inline long atomic_preinc(atomic_t *val) { return atomic_add(val, 1) + 1; } 72 static inline long atomic_predec(atomic_t *val) { return atomic_add(val, -1) - 1; } 74 static inline void atomic_dec(atomic_t *val) 75 { 76 atomic_add(val, -1); 77 } 73 78 74 static inline long atomic_postinc(atomic_t *val) { return atomic_add(val, 1); } 75 static inline long atomic_postdec(atomic_t *val) { return atomic_add(val, -1); } 79 static inline long atomic_preinc(atomic_t *val) 80 { 81 return atomic_add(val, 1) + 1; 82 } 83 84 static inline long atomic_predec(atomic_t *val) 85 { 86 return atomic_add(val, -1) - 1; 87 } 88 89 static inline long atomic_postinc(atomic_t *val) 90 { 91 return atomic_add(val, 1); 92 } 93 94 static inline long atomic_postdec(atomic_t *val) 95 { 96 return atomic_add(val, -1); 97 } 76 98 77 99 #endif -
kernel/arch/ia64/include/bootinfo.h
rfb69f39 r8b4d6cb 69 69 unsigned int wakeup_intno; 70 70 int hello_configured; 71 72 71 } bootinfo_t; 73 72 -
kernel/arch/ia64/include/cpu.h
rfb69f39 r8b4d6cb 84 84 85 85 86 87 static inline void ipi_send_ipi(int id,int eid,int intno) 86 static inline void ipi_send_ipi(int id, int eid, int intno) 88 87 { 89 (bootinfo->sapic)[2 *(id*256+eid)]=intno;88 (bootinfo->sapic)[2 * (id * 256 + eid)] = intno; 90 89 srlz_d(); 91 90 92 91 } 93 94 95 92 96 93 #endif -
kernel/arch/ia64/include/debug.h
rfb69f39 r8b4d6cb 1 1 /* 2 * Copyright (c) 2005 2 * Copyright (c) 2005 Ondrej Palkovsky 3 3 * All rights reserved. 4 4 * -
kernel/arch/ia64/include/interrupt.h
rfb69f39 r8b4d6cb 54 54 #define VECTOR_TLB_SHOOTDOWN_IPI 0xf0 55 55 #define INTERRUPT_TIMER 255 56 #define IRQ_KBD (0x01 +LEGACY_INTERRUPT_BASE)57 #define IRQ_MOUSE (0x0c +LEGACY_INTERRUPT_BASE)56 #define IRQ_KBD (0x01 + LEGACY_INTERRUPT_BASE) 57 #define IRQ_MOUSE (0x0c + LEGACY_INTERRUPT_BASE) 58 58 #define INTERRUPT_SPURIOUS 15 59 59 #define LEGACY_INTERRUPT_BASE 0x20 … … 118 118 /* 119 119 * The following variables are defined only for break_instruction 120 * handler. 120 * handler. 121 121 */ 122 122 uint64_t in0; … … 154 154 extern void disabled_fp_register(uint64_t vector, istate_t *istate); 155 155 156 157 156 #endif 158 157 -
kernel/arch/ia64/include/mm/page.h
rfb69f39 r8b4d6cb 52 52 53 53 54 55 /** Staticly mapped IO spaces - offsets to 0xe...00 of virtual adresses 56 becauce of "minimal virtual bits implemented is 51" 57 it is possible to have here values up to 0x000700000000000058 */54 /* 55 * Statically mapped IO spaces - offsets to 0xe...00 of virtual addresses 56 * because of "minimal virtual bits implemented is 51" it is possible to 57 * have values up to 0x0007000000000000 58 */ 59 59 60 60 /* Firmware area (bellow 4GB in phys mem) */ … … 62 62 /* Legacy IO space */ 63 63 #define IO_OFFSET 0x0001000000000000 64 /* Videoram - now mapped to 0 as VGA text mode vram on 0xb8000 */64 /* Videoram - now mapped to 0 as VGA text mode vram on 0xb8000 */ 65 65 #define VIO_OFFSET 0x0002000000000000 66 67 68 66 69 67 … … 82 80 #define REGION_REGISTERS 8 83 81 84 #define KA2PA(x) ((uintptr_t) (x -(VRN_KERNEL<<VRN_SHIFT)))85 #define PA2KA(x) ((uintptr_t) (x +(VRN_KERNEL<<VRN_SHIFT)))82 #define KA2PA(x) ((uintptr_t) (x - (VRN_KERNEL << VRN_SHIFT))) 83 #define PA2KA(x) ((uintptr_t) (x + (VRN_KERNEL << VRN_SHIFT))) 86 84 87 85 #define VHPT_WIDTH 20 /* 1M */ -
kernel/arch/ia64/include/mm/vhpt.h
rfb69f39 r8b4d6cb 45 45 vhpt_entry_t ventry; 46 46 47 ventry.word[0] =tentry.word[0];48 ventry.word[1] =tentry.word[1];47 ventry.word[0] = tentry.word[0]; 48 ventry.word[1] = tentry.word[1]; 49 49 50 50 return ventry; -
kernel/arch/ia64/include/proc/task.h
rfb69f39 r8b4d6cb 44 44 45 45 46 #define task_create_arch(t) { (t)->arch.iomap=NULL;}46 #define task_create_arch(t) { (t)->arch.iomap = NULL; } 47 47 #define task_destroy_arch(t) 48 48 -
kernel/arch/ia64/include/register.h
rfb69f39 r8b4d6cb 41 41 #define PSR_PK_MASK 0x8000 42 42 43 #define PSR_DT_MASK (1 <<17)44 #define PSR_RT_MASK (1 <<27)45 46 #define PSR_DFL_MASK (1 <<18)47 #define PSR_DFH_MASK (1 <<19)43 #define PSR_DT_MASK (1 << 17) 44 #define PSR_RT_MASK (1 << 27) 45 46 #define PSR_DFL_MASK (1 << 18) 47 #define PSR_DFH_MASK (1 << 19) 48 48 49 49 #define PSR_IT_MASK 0x0000001000000000
Note:
See TracChangeset
for help on using the changeset viewer.