Changeset bd5f3b7 in mainline for uspace/lib/c/arch
- Timestamp:
- 2011-08-21T13:07:35Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 00aece0, f1a9e87
- Parents:
- 86a34d3e (diff), a6480d5 (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:
-
- 46 added
- 22 edited
- 3 moved
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/arch/abs32le/include/elf_linux.h
r86a34d3e rbd5f3b7 1 1 /* 2 * Copyright (c) 2011 Vojtech Horky2 * Copyright (c) 2011 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 27 27 */ 28 28 29 /** @addtogroup drvusbmast29 /** @addtogroup libcabs32le 30 30 * @{ 31 31 */ 32 32 /** @file 33 * Generic functions for USB mass storage.34 33 */ 35 34 36 #ifndef USB_USBMAST_MAST_H_37 #define USB_USBMAST_MAST_H_35 #ifndef LIBC_abs32le_ELF_LINUX_H_ 36 #define LBIC_abs32le_ELF_LINUX_H_ 38 37 39 #include < scsi/spc.h>38 #include <libarch/istate.h> 40 39 #include <sys/types.h> 41 #include <usb/usb.h>42 #include <usb/dev/pipes.h>43 #include <usb/dev/driver.h>44 40 45 #define BULK_IN_EP 0 46 #define BULK_OUT_EP 1 41 typedef struct { 42 } elf_regs_t; 47 43 48 int usb_massstor_data_in(usb_device_t *dev, uint32_t, uint8_t, void *, 49 size_t, void *, size_t, size_t *); 50 int usb_massstor_reset(usb_device_t *); 51 void usb_massstor_reset_recovery(usb_device_t *); 52 int usb_massstor_get_max_lun(usb_device_t *); 53 size_t usb_masstor_get_lun_count(usb_device_t *); 44 static inline void istate_to_elf_regs(istate_t *istate, elf_regs_t *elf_regs) 45 { 46 (void) istate; (void) elf_regs; 47 } 54 48 55 49 #endif 56 50 57 /** 58 * @} 51 /** @} 59 52 */ -
uspace/lib/c/arch/abs32le/include/istate.h
-
Property mode
changed from
100644
to120000
r86a34d3e rbd5f3b7 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
r86a34d3e rbd5f3b7 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/amd64/include/istate.h
-
Property mode
changed from
100644
to120000
r86a34d3e rbd5f3b7 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/src/fibril.S
r86a34d3e rbd5f3b7 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/istate.h
-
Property mode
changed from
100644
to120000
r86a34d3e rbd5f3b7 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/ia32/Makefile.common
r86a34d3e rbd5f3b7 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
r86a34d3e rbd5f3b7 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/ddi.h
r86a34d3e rbd5f3b7 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
r86a34d3e rbd5f3b7 1 1 /* 2 * Copyright (c) 2011 Vojtech Horky2 * Copyright (c) 2011 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 27 27 */ 28 28 29 /** @addtogroup tester 30 * @brief Test devman service. 29 /** @addtogroup libcia32 31 30 * @{ 32 31 */ 33 /** 34 * @file 32 /** @file Definitions needed to write core files in Linux-ELF format. 35 33 */ 36 34 37 #include <inttypes.h> 38 #include <errno.h> 39 #include <str_error.h> 35 #ifndef LIBC_ia32_ELF_LINUX_H_ 36 #define LBIC_ia32_ELF_LINUX_H_ 37 38 #include <libarch/istate.h> 40 39 #include <sys/types.h> 41 #include <async.h>42 #include <devman.h>43 #include <str.h>44 #include <async.h>45 #include <vfs/vfs.h>46 #include <vfs/vfs_sess.h>47 #include <sys/stat.h>48 #include <fcntl.h>49 #include "../tester.h"50 40 51 #define DEVICE_CLASS "test3" 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 */ 46 typedef struct { 47 uint32_t ebx; 48 uint32_t ecx; 49 uint32_t edx; 50 uint32_t esi; 51 uint32_t edi; 52 uint32_t ebp; 53 uint32_t eax; 54 uint32_t ds; 55 uint32_t es; 56 uint32_t fs; 57 uint32_t gs; 58 uint32_t old_eax; 59 uint32_t eip; 60 uint32_t cs; 61 uint32_t eflags; 62 uint32_t esp; 63 uint32_t ss; 64 } elf_regs_t; 52 65 53 const char *test_devman2(void) 66 /** Convert istate_t to elf_regs_t. */ 67 static inline void istate_to_elf_regs(istate_t *istate, elf_regs_t *elf_regs) 54 68 { 55 size_t idx = 1; 56 int rc = EOK; 57 const char *err_msg = NULL; 58 char *path = NULL; 59 while (rc == EOK) { 60 rc = asprintf(&path, "/dev/class/%s\\%zu", DEVICE_CLASS, idx); 61 if (rc < 0) { 62 continue; 63 } 64 int fd = open(path, O_RDONLY); 65 if (fd < 0) { 66 TPRINTF("Failed opening `%s': %s.\n", 67 path, str_error(fd)); 68 rc = fd; 69 err_msg = "Failed opening file"; 70 continue; 71 } 72 async_sess_t *sess = fd_session(EXCHANGE_SERIALIZE, fd); 73 close(fd); 74 if (sess == NULL) { 75 TPRINTF("Failed opening phone: %s.\n", str_error(errno)); 76 rc = errno; 77 err_msg = "Failed opening file descriptor phone"; 78 continue; 79 } 80 async_hangup(sess); 81 TPRINTF("Path `%s' okay.\n", path); 82 free(path); 83 idx++; 84 rc = EOK; 85 } 86 87 if (path != NULL) 88 free(path); 89 90 return err_msg; 69 elf_regs->ebx = istate->ebx; 70 elf_regs->ecx = istate->ecx; 71 elf_regs->edx = istate->edx; 72 elf_regs->esi = istate->esi; 73 elf_regs->edi = istate->edi; 74 elf_regs->ebp = istate->ebp; 75 elf_regs->eax = istate->eax; 76 77 elf_regs->ds = istate->ds; 78 elf_regs->es = istate->es; 79 elf_regs->fs = istate->fs; 80 elf_regs->gs = istate->gs; 81 82 elf_regs->old_eax = 0; 83 elf_regs->eip = istate->eip; 84 elf_regs->cs = istate->cs; 85 elf_regs->eflags = istate->eflags; 86 elf_regs->esp = istate->esp; 87 elf_regs->ss = istate->ss; 91 88 } 89 90 #endif 92 91 93 92 /** @} -
uspace/lib/c/arch/ia32/include/istate.h
-
Property mode
changed from
100644
to120000
r86a34d3e rbd5f3b7 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
r86a34d3e rbd5f3b7 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/src/entry.S
r86a34d3e rbd5f3b7 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
r86a34d3e rbd5f3b7 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
r86a34d3e rbd5f3b7 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
100644
to120000
r86a34d3e rbd5f3b7 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/mips32/include/istate.h
-
Property mode
changed from
100644
to120000
r86a34d3e rbd5f3b7 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/src/fibril.S
r86a34d3e rbd5f3b7 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
100644
to120000
r86a34d3e rbd5f3b7 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/src/fibril.S
r86a34d3e rbd5f3b7 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/istate.h
-
Property mode
changed from
100644
to120000
r86a34d3e rbd5f3b7 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/src/fibril.S
r86a34d3e rbd5f3b7 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
100644
to120000
r86a34d3e rbd5f3b7 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
r86a34d3e rbd5f3b7 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/src/fibril.S
r86a34d3e rbd5f3b7 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.