Changeset 925a21e in mainline for uspace/lib/c/arch
- Timestamp:
- 2011-09-24T14:20:29Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 5bf76c1
- Parents:
- 867e2555 (diff), 1ab4aca (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - Location:
- uspace/lib/c/arch
- Files:
-
- 38 added
- 38 edited
- 1 moved
-
abs32le/include/barrier.h (added)
-
abs32le/include/context_offset.h (added)
-
abs32le/include/elf.h (added)
-
abs32le/include/istate.h (modified) (1 diff, 1 prop)
-
abs32le/include/syscall.h (modified) (1 diff)
-
abs32le/include/types.h (modified) (1 diff)
-
amd64/include/atomic.h (modified) (5 diffs)
-
amd64/include/barrier.h (added)
-
amd64/include/context_offset.h (added)
-
amd64/include/elf.h (added)
-
amd64/include/elf_linux.h (modified) (2 diffs)
-
amd64/include/istate.h (modified) (1 diff, 1 prop)
-
amd64/include/types.h (modified) (1 diff)
-
amd64/src/fibril.S (modified) (1 diff)
-
arm32/include/barrier.h (added)
-
arm32/include/elf.h (added)
-
arm32/include/elf_linux.h (modified) (2 diffs)
-
arm32/include/istate.h (modified) (1 diff, 1 prop)
-
arm32/include/regutils.h (added)
-
arm32/include/types.h (modified) (1 diff)
-
ia32/Makefile.common (modified) (1 diff)
-
ia32/Makefile.inc (modified) (1 diff)
-
ia32/include/atomic.h (modified) (5 diffs)
-
ia32/include/barrier.h (added)
-
ia32/include/context_offset.h (added)
-
ia32/include/ddi.h (modified) (1 diff)
-
ia32/include/elf.h (added)
-
ia32/include/elf_linux.h (modified) (3 diffs)
-
ia32/include/istate.h (modified) (1 diff, 1 prop)
-
ia32/include/syscall.h (modified) (1 diff)
-
ia32/include/types.h (modified) (1 diff)
-
ia32/src/entry.S (moved) (moved from uspace/lib/c/arch/ia32/src/entry.s ) (2 diffs)
-
ia32/src/fibril.S (modified) (1 diff)
-
ia32/src/setjmp.S (modified) (1 diff)
-
ia64/include/barrier.h (added)
-
ia64/include/elf.h (added)
-
ia64/include/istate.h (modified) (1 diff, 1 prop)
-
ia64/include/register.h (added)
-
ia64/include/types.h (modified) (1 diff)
-
mips32/include/barrier.h (added)
-
mips32/include/context_offset.h (added)
-
mips32/include/cp0.h (added)
-
mips32/include/elf.h (added)
-
mips32/include/elf_linux.h (modified) (2 diffs)
-
mips32/include/istate.h (modified) (1 diff, 1 prop)
-
mips32/include/regname.h (added)
-
mips32/include/types.h (modified) (1 diff)
-
mips32/src/fibril.S (modified) (1 diff)
-
mips32eb/include/barrier.h (added)
-
mips32eb/include/context_offset.h (added)
-
mips32eb/include/cp0.h (added)
-
mips32eb/include/elf.h (added)
-
mips32eb/include/regname.h (added)
-
mips64/include/barrier.h (added)
-
mips64/include/context_offset.h (added)
-
mips64/include/cp0.h (added)
-
mips64/include/elf.h (added)
-
mips64/include/istate.h (modified) (1 diff, 1 prop)
-
mips64/include/regname.h (added)
-
mips64/include/types.h (modified) (1 diff)
-
mips64/src/fibril.S (modified) (1 diff)
-
ppc32/include/barrier.h (added)
-
ppc32/include/context_offset.h (added)
-
ppc32/include/elf.h (added)
-
ppc32/include/elf_linux.h (modified) (2 diffs)
-
ppc32/include/istate.h (modified) (1 diff, 1 prop)
-
ppc32/include/msr.h (added)
-
ppc32/include/types.h (modified) (1 diff)
-
ppc32/src/fibril.S (modified) (1 diff)
-
sparc64/include/barrier.h (added)
-
sparc64/include/context_offset.h (added)
-
sparc64/include/elf.h (added)
-
sparc64/include/istate.h (modified) (1 diff, 1 prop)
-
sparc64/include/regdef.h (added)
-
sparc64/include/syscall.h (modified) (1 diff)
-
sparc64/include/types.h (modified) (1 diff)
-
sparc64/src/fibril.S (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/arch/abs32le/include/istate.h
-
Property mode
changed from
100644to120000
r867e2555 r925a21e 1 /* 2 * Copyright (c) 2010 Martin Decky 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 9 * - Redistributions of source code must retain the above copyright 10 * notice, this list of conditions and the following disclaimer. 11 * - Redistributions in binary form must reproduce the above copyright 12 * notice, this list of conditions and the following disclaimer in the 13 * documentation and/or other materials provided with the distribution. 14 * - The name of the author may not be used to endorse or promote products 15 * derived from this software without specific prior written permission. 16 * 17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 18 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 19 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 */ 28 29 /** @addtogroup debug 30 * @{ 31 */ 32 /** @file 33 */ 34 35 #ifndef LIBC_abs32le__ISTATE_H_ 36 #define LIBC_abs32le__ISTATE_H_ 37 38 #include <arch/istate.h> 39 40 #endif 41 42 /** @} 43 */ 1 ../../../../../../kernel/arch/abs32le/include/istate.h -
Property mode
changed from
-
uspace/lib/c/arch/abs32le/include/syscall.h
r867e2555 r925a21e 38 38 39 39 #include <sys/types.h> 40 #include < kernel/syscall/syscall.h>40 #include <abi/syscall.h> 41 41 42 42 #define __syscall0 __syscall -
uspace/lib/c/arch/abs32le/include/types.h
r867e2555 r925a21e 52 52 53 53 typedef uint32_t uintptr_t; 54 typedef int32_t intptr_t; 54 55 typedef uint32_t atomic_count_t; 55 56 typedef int32_t atomic_signed_t; -
uspace/lib/c/arch/amd64/include/atomic.h
r867e2555 r925a21e 44 44 static inline void atomic_inc(atomic_t *val) 45 45 { 46 #ifdef __PCC__ 47 asm volatile ( 48 "lock incq %0\n" 49 : "+m" (val->count) 50 ); 51 #else 46 52 asm volatile ( 47 53 "lock incq %[count]\n" 48 54 : [count] "+m" (val->count) 49 55 ); 56 #endif 50 57 } 51 58 52 59 static inline void atomic_dec(atomic_t *val) 53 60 { 61 #ifdef __PCC__ 62 asm volatile ( 63 "lock decq %0\n" 64 : "+m" (val->count) 65 ); 66 #else 54 67 asm volatile ( 55 68 "lock decq %[count]\n" 56 69 : [count] "+m" (val->count) 57 70 ); 71 #endif 58 72 } 59 73 … … 62 76 atomic_count_t r = 1; 63 77 78 #ifdef __PCC__ 79 asm volatile ( 80 "lock xaddq %1, %0\n" 81 : "+m" (val->count), 82 "+r" (r) 83 ); 84 #else 64 85 asm volatile ( 65 86 "lock xaddq %[r], %[count]\n" … … 67 88 [r] "+r" (r) 68 89 ); 90 #endif 69 91 70 92 return r; … … 75 97 atomic_count_t r = -1; 76 98 99 #ifdef __PCC__ 100 asm volatile ( 101 "lock xaddq %1, %0\n" 102 : "+m" (val->count), 103 "+r" (r) 104 ); 105 #else 77 106 asm volatile ( 78 107 "lock xaddq %[r], %[count]\n" … … 80 109 [r] "+r" (r) 81 110 ); 111 #endif 82 112 83 113 return r; -
uspace/lib/c/arch/amd64/include/elf_linux.h
r867e2555 r925a21e 30 30 * @{ 31 31 */ 32 /** @file 32 /** @file Definitions needed to write core files in Linux-ELF format. 33 33 */ 34 34 … … 39 39 #include <sys/types.h> 40 40 41 /** Linux kernel struct pt_regs structure. 42 * 43 * We need this to save register state to a core file in Linux format 44 * (readable by GDB configured for Linux target). 45 */ 41 46 typedef struct { 42 /* TODO */ 43 uint64_t pad[16]; 47 uint64_t r15; 48 uint64_t r14; 49 uint64_t r13; 50 uint64_t r12; 51 uint64_t rbp; 52 uint64_t rbx; 53 uint64_t r11; 54 uint64_t r10; 55 uint64_t r9; 56 uint64_t r8; 57 uint64_t rax; 58 uint64_t rcx; 59 uint64_t rdx; 60 uint64_t rsi; 61 uint64_t rdi; 62 uint64_t old_rax; 63 uint64_t rip; 64 uint64_t cs; 65 uint64_t rflags; 66 uint64_t rsp; 67 uint64_t ss; 44 68 } elf_regs_t; 45 69 70 /** Convert istate_t to elf_regs_t. */ 46 71 static inline void istate_to_elf_regs(istate_t *istate, elf_regs_t *elf_regs) 47 72 { 48 /* TODO */ 49 (void) istate; (void) elf_regs; 73 elf_regs->r15 = istate->r15; 74 elf_regs->r14 = istate->r14; 75 elf_regs->r13 = istate->r13; 76 elf_regs->r12 = istate->r12; 77 elf_regs->rbp = istate->rbp; 78 elf_regs->rbx = istate->rbx; 79 elf_regs->r11 = istate->r11; 80 elf_regs->r10 = istate->r10; 81 elf_regs->r9 = istate->r9; 82 elf_regs->r8 = istate->r8; 83 elf_regs->rax = istate->rax; 84 elf_regs->rcx = istate->rcx; 85 elf_regs->rdx = istate->rdx; 86 elf_regs->rsi = istate->rsi; 87 elf_regs->rdi = istate->rdi; 88 elf_regs->rip = istate->rip; 89 elf_regs->cs = istate->cs; 90 elf_regs->rflags = istate->rflags; 91 elf_regs->rsp = istate->rsp; 92 elf_regs->ss = istate->ss; 50 93 } 51 94 -
uspace/lib/c/arch/amd64/include/istate.h
-
Property mode
changed from
100644to120000
r867e2555 r925a21e 1 /* 2 * Copyright (c) 2010 Jiri Svoboda 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 9 * - Redistributions of source code must retain the above copyright 10 * notice, this list of conditions and the following disclaimer. 11 * - Redistributions in binary form must reproduce the above copyright 12 * notice, this list of conditions and the following disclaimer in the 13 * documentation and/or other materials provided with the distribution. 14 * - The name of the author may not be used to endorse or promote products 15 * derived from this software without specific prior written permission. 16 * 17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 18 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 19 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 */ 28 29 /** @addtogroup libcamd64 30 * @{ 31 */ 32 /** @file 33 */ 34 35 #ifndef LIBC_amd64_ISTATE_H_ 36 #define LIBC_amd64_ISTATE_H_ 37 38 #include <arch/istate.h> 39 40 #endif 41 42 /** @} 43 */ 1 ../../../../../../kernel/arch/amd64/include/istate.h -
Property mode
changed from
-
uspace/lib/c/arch/amd64/include/types.h
r867e2555 r925a21e 52 52 53 53 typedef uint64_t uintptr_t; 54 typedef int64_t intptr_t; 54 55 typedef uint64_t atomic_count_t; 55 56 typedef int64_t atomic_signed_t; -
uspace/lib/c/arch/amd64/src/fibril.S
r867e2555 r925a21e 32 32 .global context_restore 33 33 34 #include < kernel/arch/context_offset.h>34 #include <libarch/context_offset.h> 35 35 36 36 ## Save current CPU context -
uspace/lib/c/arch/arm32/include/elf_linux.h
r867e2555 r925a21e 30 30 * @{ 31 31 */ 32 /** @file 32 /** @file Definitions needed to write core files in Linux-ELF format. 33 33 */ 34 34 … … 39 39 #include <sys/types.h> 40 40 41 /** Linux kernel struct pt_regs structure. 42 * 43 * We need this to save register state to a core file in Linux format 44 * (readable by GDB configured for Linux target). 45 */ 41 46 typedef struct { 42 /* TODO */ 43 uint32_t pad[16]; 47 uint32_t r0; 48 uint32_t r1; 49 uint32_t r2; 50 uint32_t r3; 51 uint32_t r4; 52 uint32_t r5; 53 uint32_t r6; 54 uint32_t r7; 55 uint32_t r8; 56 uint32_t r9; 57 uint32_t r10; 58 uint32_t fp; 59 uint32_t r12; 60 uint32_t sp; 61 uint32_t lr; 62 uint32_t pc; 63 uint32_t cpsr; 64 uint32_t old_r0; 44 65 } elf_regs_t; 45 66 67 /** Convert istate_t to elf_regs_t. */ 46 68 static inline void istate_to_elf_regs(istate_t *istate, elf_regs_t *elf_regs) 47 69 { 48 /* TODO */ 49 (void) istate; (void) elf_regs; 70 elf_regs->r0 = istate->r0; 71 elf_regs->r1 = istate->r1; 72 elf_regs->r2 = istate->r2; 73 elf_regs->r3 = istate->r3; 74 elf_regs->r4 = istate->r4; 75 elf_regs->r5 = istate->r5; 76 elf_regs->r6 = istate->r6; 77 elf_regs->r7 = istate->r7; 78 elf_regs->r8 = istate->r8; 79 elf_regs->r9 = istate->r9; 80 elf_regs->r10 = istate->r10; 81 82 elf_regs->fp = istate->fp; 83 elf_regs->r12 = istate->r12; 84 elf_regs->sp = istate->sp; 85 elf_regs->lr = istate->lr; 86 elf_regs->pc = istate->pc; 87 elf_regs->cpsr = istate->spsr; 88 elf_regs->old_r0 = 0; 50 89 } 51 90 -
uspace/lib/c/arch/arm32/include/istate.h
-
Property mode
changed from
100644to120000
r867e2555 r925a21e 1 /* 2 * Copyright (c) 2010 Jiri Svoboda 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 9 * - Redistributions of source code must retain the above copyright 10 * notice, this list of conditions and the following disclaimer. 11 * - Redistributions in binary form must reproduce the above copyright 12 * notice, this list of conditions and the following disclaimer in the 13 * documentation and/or other materials provided with the distribution. 14 * - The name of the author may not be used to endorse or promote products 15 * derived from this software without specific prior written permission. 16 * 17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 18 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 19 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 */ 28 29 /** @addtogroup libcarm32 30 * @{ 31 */ 32 /** @file 33 */ 34 35 #ifndef LIBC_arm32__ISTATE_H_ 36 #define LIBC_arm32__ISTATE_H_ 37 38 #include <arch/istate.h> 39 40 #endif 41 42 /** @} 43 */ 1 ../../../../../../kernel/arch/arm32/include/istate.h -
Property mode
changed from
-
uspace/lib/c/arch/arm32/include/types.h
r867e2555 r925a21e 53 53 54 54 typedef uint32_t uintptr_t; 55 typedef int32_t intptr_t; 55 56 typedef uint32_t atomic_count_t; 56 57 typedef int32_t atomic_signed_t; -
uspace/lib/c/arch/ia32/Makefile.common
r867e2555 r925a21e 28 28 29 29 CLANG_ARCH = i386 30 GCC_CFLAGS += -march=pentium -fno-omit-frame-pointer 30 31 ifeq ($(PROCESSOR),i486) 32 GCC_CFLAGS += -march=i486 -fno-omit-frame-pointer 33 else 34 GCC_CFLAGS += -march=pentium -fno-omit-frame-pointer 35 endif 31 36 32 37 ENDIANESS = LE -
uspace/lib/c/arch/ia32/Makefile.inc
r867e2555 r925a21e 28 28 29 29 ARCH_SOURCES = \ 30 arch/$(UARCH)/src/entry. s\30 arch/$(UARCH)/src/entry.S \ 31 31 arch/$(UARCH)/src/entryjmp.s \ 32 32 arch/$(UARCH)/src/thread_entry.s \ -
uspace/lib/c/arch/ia32/include/atomic.h
r867e2555 r925a21e 42 42 static inline void atomic_inc(atomic_t *val) 43 43 { 44 #ifdef __PCC__ 45 asm volatile ( 46 "lock incl %0\n" 47 : "+m" (val->count) 48 ); 49 #else 44 50 asm volatile ( 45 51 "lock incl %[count]\n" 46 52 : [count] "+m" (val->count) 47 53 ); 54 #endif 48 55 } 49 56 50 57 static inline void atomic_dec(atomic_t *val) 51 58 { 59 #ifdef __PCC__ 60 asm volatile ( 61 "lock decl %0\n" 62 : "+m" (val->count) 63 ); 64 #else 52 65 asm volatile ( 53 66 "lock decl %[count]\n" 54 67 : [count] "+m" (val->count) 55 68 ); 69 #endif 56 70 } 57 71 … … 60 74 atomic_count_t r = 1; 61 75 76 #ifdef __PCC__ 77 asm volatile ( 78 "lock xaddl %1, %0\n" 79 : "+m" (val->count), 80 "+r" (r) 81 ); 82 #else 62 83 asm volatile ( 63 84 "lock xaddl %[r], %[count]\n" … … 65 86 [r] "+r" (r) 66 87 ); 88 #endif 67 89 68 90 return r; … … 73 95 atomic_count_t r = -1; 74 96 97 #ifdef __PCC__ 98 asm volatile ( 99 "lock xaddl %1, %0\n" 100 : "+m" (val->count), 101 "+r" (r) 102 ); 103 #else 75 104 asm volatile ( 76 105 "lock xaddl %[r], %[count]\n" … … 78 107 [r] "+r" (r) 79 108 ); 109 #endif 80 110 81 111 return r; -
uspace/lib/c/arch/ia32/include/ddi.h
r867e2555 r925a21e 41 41 static inline uint8_t pio_read_8(ioport8_t *port) 42 42 { 43 uint8_t val; 44 45 asm volatile ( 46 "inb %w[port], %b[val]\n" 47 : [val] "=a" (val) 48 : [port] "d" (port) 49 ); 50 51 return val; 43 if (port < (ioport8_t *) IO_SPACE_BOUNDARY) { 44 uint8_t val; 45 46 asm volatile ( 47 "inb %w[port], %b[val]\n" 48 : [val] "=a" (val) 49 : [port] "d" (port) 50 ); 51 52 return val; 53 } else 54 return (uint8_t) *port; 52 55 } 53 56 54 57 static inline uint16_t pio_read_16(ioport16_t *port) 55 58 { 56 uint16_t val; 57 58 asm volatile ( 59 "inw %w[port], %w[val]\n" 60 : [val] "=a" (val) 61 : [port] "d" (port) 62 ); 63 64 return val; 59 if (port < (ioport16_t *) IO_SPACE_BOUNDARY) { 60 uint16_t val; 61 62 asm volatile ( 63 "inw %w[port], %w[val]\n" 64 : [val] "=a" (val) 65 : [port] "d" (port) 66 ); 67 68 return val; 69 } else 70 return (uint16_t) *port; 65 71 } 66 72 67 73 static inline uint32_t pio_read_32(ioport32_t *port) 68 74 { 69 uint32_t val; 70 71 asm volatile ( 72 "inl %w[port], %[val]\n" 73 : [val] "=a" (val) 74 : [port] "d" (port) 75 ); 76 77 return val; 75 if (port < (ioport32_t *) IO_SPACE_BOUNDARY) { 76 uint32_t val; 77 78 asm volatile ( 79 "inl %w[port], %[val]\n" 80 : [val] "=a" (val) 81 : [port] "d" (port) 82 ); 83 84 return val; 85 } else 86 return (uint32_t) *port; 78 87 } 79 88 80 89 static inline void pio_write_8(ioport8_t *port, uint8_t val) 81 90 { 82 asm volatile ( 83 "outb %b[val], %w[port]\n" 84 :: [val] "a" (val), [port] "d" (port) 85 ); 91 if (port < (ioport8_t *) IO_SPACE_BOUNDARY) { 92 asm volatile ( 93 "outb %b[val], %w[port]\n" 94 :: [val] "a" (val), [port] "d" (port) 95 ); 96 } else 97 *port = val; 86 98 } 87 99 88 100 static inline void pio_write_16(ioport16_t *port, uint16_t val) 89 101 { 90 asm volatile ( 91 "outw %w[val], %w[port]\n" 92 :: [val] "a" (val), [port] "d" (port) 93 ); 102 if (port < (ioport16_t *) IO_SPACE_BOUNDARY) { 103 asm volatile ( 104 "outw %w[val], %w[port]\n" 105 :: [val] "a" (val), [port] "d" (port) 106 ); 107 } else 108 *port = val; 94 109 } 95 110 96 111 static inline void pio_write_32(ioport32_t *port, uint32_t val) 97 112 { 98 asm volatile ( 99 "outl %[val], %w[port]\n" 100 :: [val] "a" (val), [port] "d" (port) 101 ); 113 if (port < (ioport32_t *) IO_SPACE_BOUNDARY) { 114 asm volatile ( 115 "outl %[val], %w[port]\n" 116 :: [val] "a" (val), [port] "d" (port) 117 ); 118 } else 119 *port = val; 102 120 } 103 121 -
uspace/lib/c/arch/ia32/include/elf_linux.h
r867e2555 r925a21e 30 30 * @{ 31 31 */ 32 /** @file 32 /** @file Definitions needed to write core files in Linux-ELF format. 33 33 */ 34 34 … … 39 39 #include <sys/types.h> 40 40 41 /** Linux kernel struct pt_regs structure. 42 * 43 * We need this to save register state to a core file in Linux format 44 * (readable by GDB configured for Linux target). 45 */ 41 46 typedef struct { 42 47 uint32_t ebx; … … 59 64 } elf_regs_t; 60 65 66 /** Convert istate_t to elf_regs_t. */ 61 67 static inline void istate_to_elf_regs(istate_t *istate, elf_regs_t *elf_regs) 62 68 { -
uspace/lib/c/arch/ia32/include/istate.h
-
Property mode
changed from
100644to120000
r867e2555 r925a21e 1 /* 2 * Copyright (c) 2010 Jiri Svoboda 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 9 * - Redistributions of source code must retain the above copyright 10 * notice, this list of conditions and the following disclaimer. 11 * - Redistributions in binary form must reproduce the above copyright 12 * notice, this list of conditions and the following disclaimer in the 13 * documentation and/or other materials provided with the distribution. 14 * - The name of the author may not be used to endorse or promote products 15 * derived from this software without specific prior written permission. 16 * 17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 18 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 19 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 */ 28 29 /** @addtogroup debug 30 * @{ 31 */ 32 /** @file 33 */ 34 35 #ifndef LIBC_ia32__ISTATE_H_ 36 #define LIBC_ia32__ISTATE_H_ 37 38 #include <arch/istate.h> 39 40 #endif 41 42 /** @} 43 */ 1 ../../../../../../kernel/arch/ia32/include/istate.h -
Property mode
changed from
-
uspace/lib/c/arch/ia32/include/syscall.h
r867e2555 r925a21e 38 38 39 39 #include <sys/types.h> 40 #include < kernel/syscall/syscall.h>40 #include <abi/syscall.h> 41 41 42 42 #define __syscall0 __syscall_fast_func -
uspace/lib/c/arch/ia32/include/types.h
r867e2555 r925a21e 52 52 53 53 typedef uint32_t uintptr_t; 54 typedef int32_t intptr_t; 54 55 typedef uint32_t atomic_count_t; 55 56 typedef int32_t atomic_signed_t; -
uspace/lib/c/arch/ia32/src/entry.S
r867e2555 r925a21e 47 47 # Do not set %gs, it contains descriptor that can see TLS 48 48 49 #ifndef PROCESSOR_i486 49 50 # Detect the mechanism used for making syscalls 50 51 movl $(INTEL_CPUID_STANDARD), %eax … … 52 53 bt $(INTEL_SEP), %edx 53 54 jnc 0f 54 leal __syscall_fast_func, %eax 55 movl $__syscall_fast, (%eax) 56 0: 55 leal __syscall_fast_func, %eax 56 movl $__syscall_fast, (%eax) 57 0: 58 #endif 59 57 60 # 58 61 # Create the first stack frame. -
uspace/lib/c/arch/ia32/src/fibril.S
r867e2555 r925a21e 27 27 # 28 28 29 #include < kernel/arch/context_offset.h>29 #include <libarch/context_offset.h> 30 30 31 31 .text -
uspace/lib/c/arch/ia32/src/setjmp.S
r867e2555 r925a21e 27 27 # 28 28 29 #include < kernel/arch/context_offset.h>29 #include <libarch/context_offset.h> 30 30 31 31 .text -
uspace/lib/c/arch/ia64/include/istate.h
-
Property mode
changed from
100644to120000
r867e2555 r925a21e 1 /* 2 * Copyright (c) 2010 Jiri Svoboda 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 9 * - Redistributions of source code must retain the above copyright 10 * notice, this list of conditions and the following disclaimer. 11 * - Redistributions in binary form must reproduce the above copyright 12 * notice, this list of conditions and the following disclaimer in the 13 * documentation and/or other materials provided with the distribution. 14 * - The name of the author may not be used to endorse or promote products 15 * derived from this software without specific prior written permission. 16 * 17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 18 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 19 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 */ 28 29 /** @addtogroup libcsparc64 30 * @{ 31 */ 32 /** @file 33 */ 34 35 #ifndef LIBC_ia64_ISTATE_H_ 36 #define LIBC_ia64_ISTATE_H_ 37 38 #include <arch/istate.h> 39 40 #endif 41 42 /** @} 43 */ 1 ../../../../../../kernel/arch/ia64/include/istate.h -
Property mode
changed from
-
uspace/lib/c/arch/ia64/include/types.h
r867e2555 r925a21e 62 62 63 63 typedef uint64_t uintptr_t; 64 typedef int64_t intptr_t; 64 65 typedef uint64_t atomic_count_t; 65 66 typedef int64_t atomic_signed_t; -
uspace/lib/c/arch/mips32/include/elf_linux.h
r867e2555 r925a21e 30 30 * @{ 31 31 */ 32 /** @file 32 /** @file Definitions needed to write core files in Linux-ELF format. 33 33 */ 34 34 … … 39 39 #include <sys/types.h> 40 40 41 /** Linux kernel struct pt_regs structure. 42 * 43 * We need this to save register state to a core file in Linux format 44 * (readable by GDB configured for Linux target). 45 */ 41 46 typedef struct { 42 /* TODO */ 43 uint32_t pad[16]; 47 uint32_t pad0[6]; 48 49 uint32_t r0; 50 uint32_t r1; 51 uint32_t r2; 52 uint32_t r3; 53 uint32_t r4; 54 uint32_t r5; 55 uint32_t r6; 56 uint32_t r7; 57 uint32_t r8; 58 uint32_t r9; 59 uint32_t r10; 60 uint32_t r11; 61 uint32_t r12; 62 uint32_t r13; 63 uint32_t r14; 64 uint32_t r15; 65 uint32_t r16; 66 uint32_t r17; 67 uint32_t r18; 68 uint32_t r19; 69 uint32_t r20; 70 uint32_t r21; 71 uint32_t r22; 72 uint32_t r23; 73 uint32_t r24; 74 uint32_t r25; 75 uint32_t r26; 76 uint32_t r27; 77 uint32_t r28; 78 uint32_t r29; 79 uint32_t r30; 80 uint32_t r31; 81 82 uint32_t cp0_status; 83 uint32_t hi; 84 uint32_t lo; 85 uint32_t cp0_badvaddr; 86 uint32_t cp0_cause; 87 uint32_t cp0_epc; 44 88 } elf_regs_t; 45 89 90 /** Convert istate_t to elf_regs_t. */ 46 91 static inline void istate_to_elf_regs(istate_t *istate, elf_regs_t *elf_regs) 47 92 { 48 /* TODO */ 49 (void) istate; (void) elf_regs; 93 elf_regs->r1 = istate->at; 94 elf_regs->r2 = istate->v0; 95 elf_regs->r3 = istate->v1; 96 elf_regs->r4 = istate->a0; 97 elf_regs->r5 = istate->a1; 98 elf_regs->r6 = istate->a2; 99 elf_regs->r7 = istate->a3; 100 elf_regs->r8 = istate->t0; 101 elf_regs->r9 = istate->t1; 102 elf_regs->r10 = istate->t2; 103 elf_regs->r11 = istate->t3; 104 elf_regs->r12 = istate->t4; 105 elf_regs->r13 = istate->t5; 106 elf_regs->r14 = istate->t6; 107 elf_regs->r15 = istate->t7; 108 elf_regs->r16 = istate->s0; 109 elf_regs->r17 = istate->s1; 110 elf_regs->r18 = istate->s2; 111 elf_regs->r19 = istate->s3; 112 elf_regs->r20 = istate->s4; 113 elf_regs->r21 = istate->s5; 114 elf_regs->r22 = istate->s6; 115 elf_regs->r23 = istate->s7; 116 elf_regs->r24 = istate->t8; 117 elf_regs->r25 = istate->t9; 118 elf_regs->r26 = istate->kt0; 119 elf_regs->r27 = istate->kt1; 120 elf_regs->r28 = istate->gp; 121 elf_regs->r29 = istate->sp; 122 elf_regs->r30 = istate->s8; 123 elf_regs->r31 = istate->ra; 124 125 elf_regs->cp0_status = istate->status; 126 elf_regs->hi = istate->hi; 127 elf_regs->lo = istate->lo; 128 elf_regs->cp0_epc = istate->epc; 50 129 } 51 130 -
uspace/lib/c/arch/mips32/include/istate.h
-
Property mode
changed from
100644to120000
r867e2555 r925a21e 1 /* 2 * Copyright (c) 2010 Jiri Svoboda 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 9 * - Redistributions of source code must retain the above copyright 10 * notice, this list of conditions and the following disclaimer. 11 * - Redistributions in binary form must reproduce the above copyright 12 * notice, this list of conditions and the following disclaimer in the 13 * documentation and/or other materials provided with the distribution. 14 * - The name of the author may not be used to endorse or promote products 15 * derived from this software without specific prior written permission. 16 * 17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 18 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 19 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 */ 28 29 /** @addtogroup libcmips32 30 * @{ 31 */ 32 /** @file 33 */ 34 35 #ifndef LIBC_mips32__ISTATE_H_ 36 #define LIBC_mips32__ISTATE_H_ 37 38 #include <arch/istate.h> 39 40 #endif 41 42 /** @} 43 */ 1 ../../../../../../kernel/arch/mips32/include/istate.h -
Property mode
changed from
-
uspace/lib/c/arch/mips32/include/types.h
r867e2555 r925a21e 53 53 54 54 typedef uint32_t uintptr_t; 55 typedef int32_t intptr_t; 55 56 typedef uint32_t atomic_count_t; 56 57 typedef int32_t atomic_signed_t; -
uspace/lib/c/arch/mips32/src/fibril.S
r867e2555 r925a21e 32 32 .set noreorder 33 33 34 #include < arch/context_offset.h>34 #include <libarch/context_offset.h> 35 35 36 36 .global context_save -
uspace/lib/c/arch/mips64/include/istate.h
-
Property mode
changed from
100644to120000
r867e2555 r925a21e 1 /* 2 * Copyright (c) 2010 Jiri Svoboda 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 9 * - Redistributions of source code must retain the above copyright 10 * notice, this list of conditions and the following disclaimer. 11 * - Redistributions in binary form must reproduce the above copyright 12 * notice, this list of conditions and the following disclaimer in the 13 * documentation and/or other materials provided with the distribution. 14 * - The name of the author may not be used to endorse or promote products 15 * derived from this software without specific prior written permission. 16 * 17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 18 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 19 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 */ 28 29 /** @addtogroup libcmips64 30 * @{ 31 */ 32 /** @file 33 */ 34 35 #ifndef LIBC_mips64__ISTATE_H_ 36 #define LIBC_mips64__ISTATE_H_ 37 38 #include <arch/istate.h> 39 40 #endif 41 42 /** @} 43 */ 1 ../../../../../../kernel/arch/mips64/include/istate.h -
Property mode
changed from
-
uspace/lib/c/arch/mips64/include/types.h
r867e2555 r925a21e 53 53 54 54 typedef uint64_t uintptr_t; 55 typedef int64_t intptr_t; 55 56 typedef uint64_t atomic_count_t; 56 57 typedef int64_t atomic_signed_t; -
uspace/lib/c/arch/mips64/src/fibril.S
r867e2555 r925a21e 32 32 .set noreorder 33 33 34 #include < arch/context_offset.h>34 #include <libarch/context_offset.h> 35 35 36 36 .global context_save -
uspace/lib/c/arch/ppc32/include/elf_linux.h
r867e2555 r925a21e 30 30 * @{ 31 31 */ 32 /** @file 32 /** @file Definitions needed to write core files in Linux-ELF format. 33 33 */ 34 34 … … 39 39 #include <sys/types.h> 40 40 41 /** Linux kernel struct pt_regs structure. 42 * 43 * We need this to save register state to a core file in Linux format 44 * (readable by GDB configured for Linux target). 45 */ 41 46 typedef struct { 42 /* TODO */ 43 uint32_t pad[16]; 47 uint32_t r0; 48 uint32_t r1; 49 uint32_t r2; 50 uint32_t r3; 51 uint32_t r4; 52 uint32_t r5; 53 uint32_t r6; 54 uint32_t r7; 55 uint32_t r8; 56 uint32_t r9; 57 uint32_t r10; 58 uint32_t r11; 59 uint32_t r12; 60 uint32_t r13; 61 uint32_t r14; 62 uint32_t r15; 63 uint32_t r16; 64 uint32_t r17; 65 uint32_t r18; 66 uint32_t r19; 67 uint32_t r20; 68 uint32_t r21; 69 uint32_t r22; 70 uint32_t r23; 71 uint32_t r24; 72 uint32_t r25; 73 uint32_t r26; 74 uint32_t r27; 75 uint32_t r28; 76 uint32_t r29; 77 uint32_t r30; 78 uint32_t r31; 79 80 uint32_t nip; 81 uint32_t msr; 82 uint32_t old_r3; 83 uint32_t ctr; 84 uint32_t link; 85 uint32_t xer; 86 uint32_t ccr; 87 uint32_t mq; 88 uint32_t trap; 89 uint32_t dar; 90 uint32_t dsisr; 91 uint32_t result; 44 92 } elf_regs_t; 45 93 94 /** Convert istate_t to elf_regs_t. */ 46 95 static inline void istate_to_elf_regs(istate_t *istate, elf_regs_t *elf_regs) 47 96 { 48 /* TODO */ 49 (void) istate; (void) elf_regs; 97 elf_regs->r0 = istate->r0; 98 elf_regs->r1 = istate->sp; 99 elf_regs->r2 = istate->r2; 100 elf_regs->r3 = istate->r3; 101 elf_regs->r4 = istate->r4; 102 elf_regs->r5 = istate->r5; 103 elf_regs->r6 = istate->r6; 104 elf_regs->r7 = istate->r7; 105 elf_regs->r8 = istate->r8; 106 elf_regs->r9 = istate->r9; 107 elf_regs->r10 = istate->r10; 108 elf_regs->r11 = istate->r11; 109 elf_regs->r12 = istate->r12; 110 elf_regs->r13 = istate->r13; 111 elf_regs->r14 = istate->r14; 112 elf_regs->r15 = istate->r15; 113 elf_regs->r16 = istate->r16; 114 elf_regs->r17 = istate->r17; 115 elf_regs->r18 = istate->r18; 116 elf_regs->r19 = istate->r19; 117 elf_regs->r20 = istate->r20; 118 elf_regs->r21 = istate->r21; 119 elf_regs->r22 = istate->r22; 120 elf_regs->r23 = istate->r23; 121 elf_regs->r24 = istate->r24; 122 elf_regs->r25 = istate->r25; 123 elf_regs->r26 = istate->r26; 124 elf_regs->r27 = istate->r27; 125 elf_regs->r28 = istate->r28; 126 elf_regs->r29 = istate->r29; 127 elf_regs->r30 = istate->r30; 128 elf_regs->r31 = istate->r31; 129 130 elf_regs->ctr = istate->ctr; 131 elf_regs->link = istate->lr; 132 elf_regs->xer = istate->xer; 133 elf_regs->ccr = istate->cr; 134 elf_regs->dar = istate->dar; 50 135 } 51 136 -
uspace/lib/c/arch/ppc32/include/istate.h
-
Property mode
changed from
100644to120000
r867e2555 r925a21e 1 /* 2 * Copyright (c) 2010 Jiri Svoboda 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 9 * - Redistributions of source code must retain the above copyright 10 * notice, this list of conditions and the following disclaimer. 11 * - Redistributions in binary form must reproduce the above copyright 12 * notice, this list of conditions and the following disclaimer in the 13 * documentation and/or other materials provided with the distribution. 14 * - The name of the author may not be used to endorse or promote products 15 * derived from this software without specific prior written permission. 16 * 17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 18 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 19 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 */ 28 29 /** @addtogroup libcppc32 30 * @{ 31 */ 32 /** @file 33 */ 34 35 #ifndef LIBC_ppc32_ISTATE_H_ 36 #define LIBC_ppc32_ISTATE_H_ 37 38 #include <sys/types.h> 39 40 /** Interrupt context. 41 * 42 * This is a copy of the kernel definition with which it must be kept in sync. 43 */ 44 typedef struct istate { 45 uint32_t r0; 46 uint32_t r2; 47 uint32_t r3; 48 uint32_t r4; 49 uint32_t r5; 50 uint32_t r6; 51 uint32_t r7; 52 uint32_t r8; 53 uint32_t r9; 54 uint32_t r10; 55 uint32_t r11; 56 uint32_t r13; 57 uint32_t r14; 58 uint32_t r15; 59 uint32_t r16; 60 uint32_t r17; 61 uint32_t r18; 62 uint32_t r19; 63 uint32_t r20; 64 uint32_t r21; 65 uint32_t r22; 66 uint32_t r23; 67 uint32_t r24; 68 uint32_t r25; 69 uint32_t r26; 70 uint32_t r27; 71 uint32_t r28; 72 uint32_t r29; 73 uint32_t r30; 74 uint32_t r31; 75 uint32_t cr; 76 uint32_t pc; 77 uint32_t srr1; 78 uint32_t lr; 79 uint32_t ctr; 80 uint32_t xer; 81 uint32_t dar; 82 uint32_t r12; 83 uint32_t sp; 84 } istate_t; 85 86 static inline uintptr_t istate_get_pc(istate_t *istate) 87 { 88 return istate->pc; 89 } 90 91 static inline uintptr_t istate_get_fp(istate_t *istate) 92 { 93 return istate->sp; 94 } 95 96 #endif 97 98 /** @} 99 */ 1 ../../../../../../kernel/arch/ppc32/include/istate.h -
Property mode
changed from
-
uspace/lib/c/arch/ppc32/include/types.h
r867e2555 r925a21e 52 52 53 53 typedef uint32_t uintptr_t; 54 typedef int32_t intptr_t; 54 55 typedef uint32_t atomic_count_t; 55 56 typedef int32_t atomic_signed_t; -
uspace/lib/c/arch/ppc32/src/fibril.S
r867e2555 r925a21e 33 33 34 34 #include <libarch/regname.h> 35 #include < arch/context_offset.h>35 #include <libarch/context_offset.h> 36 36 37 37 context_save: -
uspace/lib/c/arch/sparc64/include/istate.h
-
Property mode
changed from
100644to120000
r867e2555 r925a21e 1 /* 2 * Copyright (c) 2010 Jiri Svoboda 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 9 * - Redistributions of source code must retain the above copyright 10 * notice, this list of conditions and the following disclaimer. 11 * - Redistributions in binary form must reproduce the above copyright 12 * notice, this list of conditions and the following disclaimer in the 13 * documentation and/or other materials provided with the distribution. 14 * - The name of the author may not be used to endorse or promote products 15 * derived from this software without specific prior written permission. 16 * 17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 18 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 19 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 */ 28 29 /** @addtogroup libcsparc64 30 * @{ 31 */ 32 /** @file 33 */ 34 35 #ifndef LIBC_sparc64_ISTATE_H_ 36 #define LIBC_sparc64_ISTATE_H_ 37 38 #include <arch/istate.h> 39 40 #endif 41 42 /** @} 43 */ 1 ../../../../../../kernel/arch/sparc64/include/istate.h -
Property mode
changed from
-
uspace/lib/c/arch/sparc64/include/syscall.h
r867e2555 r925a21e 37 37 38 38 #include <sys/types.h> 39 #include < kernel/syscall/syscall.h>39 #include <abi/syscall.h> 40 40 41 41 #define __syscall0 __syscall -
uspace/lib/c/arch/sparc64/include/types.h
r867e2555 r925a21e 52 52 53 53 typedef uint64_t uintptr_t; 54 typedef int64_t intptr_t; 54 55 typedef uint64_t atomic_count_t; 55 56 typedef int64_t atomic_signed_t; -
uspace/lib/c/arch/sparc64/src/fibril.S
r867e2555 r925a21e 27 27 # 28 28 29 #include < kernel/arch/context_offset.h>29 #include <libarch/context_offset.h> 30 30 31 .text 31 .text 32 32 33 33 .global context_save
Note:
See TracChangeset
for help on using the changeset viewer.
