Changeset 361635c in mainline
- Timestamp:
- 2005-08-25T20:58:07Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- fde6429
- Parents:
- cfd6efd2
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/amd64/include/asm.h
rcfd6efd2 r361635c 1 /* 2 * Copyright (C) 2005 Jakub Jermar 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 #ifndef __amd64_ASM_H__ 30 #define __amd64_ASM_H__ 31 32 #include <arch/types.h> 33 #include <config.h> 34 35 /* TODO: implement the real stuff */ 36 static inline __address get_stack_base(void) 37 { 38 return NULL; 39 } 40 41 #endif -
arch/ia32/include/asm.h
rcfd6efd2 r361635c 35 35 #include <synch/spinlock.h> 36 36 #include <arch/boot/memmap.h> 37 #include <config.h> 37 38 38 39 extern __u32 interrupt_handler_size; … … 157 158 } 158 159 160 /** Return base address of current stack 161 * 162 * Return the base address of the current stack. 163 * The stack is assumed to be STACK_SIZE bytes long. 164 */ 165 static inline __address get_stack_base(void) 166 { 167 __address v; 168 169 __asm__ volatile ("andl %%esp, %0\n" : "=r" (v) : "0" (~(STACK_SIZE-1))); 170 171 return v; 172 } 173 159 174 #endif -
arch/ia64/include/asm.h
rcfd6efd2 r361635c 1 /* 2 * Copyright (C) 2005 Jakub Jermar 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 #ifndef __ia64_ASM_H__ 30 #define __ia64_ASM_H__ 31 32 #include <arch/types.h> 33 #include <config.h> 34 35 /* TODO: implement the real stuff */ 36 static inline __address get_stack_base(void) 37 { 38 return NULL; 39 } 40 41 #endif -
arch/ia64/include/context.h
rcfd6efd2 r361635c 42 42 #endif 43 43 44 #define context_set(c, _pc, stack, size) \45 (c)->pc = (__address) _pc; \46 (c)->bsp = ( __address) stack;\44 #define context_set(c, _pc, stack, size) \ 45 (c)->pc = (__address) _pc; \ 46 (c)->bsp = ((__address) stack) + (sizeof(the_t)); \ 47 47 (c)->sp = ((__address) stack) + (size) - SP_DELTA; 48 48 -
arch/mips/include/asm.h
rcfd6efd2 r361635c 30 30 #define __MIPS_ASM_H__ 31 31 32 #include <arch/types.h> 33 #include <config.h> 34 32 35 #define cpu_sleep() ; 33 36 37 /** Return base address of current stack 38 * 39 * Return the base address of the current stack. 40 * The stack is assumed to be STACK_SIZE bytes long. 41 */ 42 static inline __address get_stack_base(void) 43 { 44 __address v; 45 46 __asm__ volatile ("and %0, $29, %1\n" : "=r" (v) : "r" (~(STACK_SIZE-1))); 47 48 return v; 49 } 50 34 51 #endif -
arch/ppc/include/asm.h
rcfd6efd2 r361635c 1 /* 2 * Copyright (C) 2005 Jakub Jermar 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 #ifndef __ppc_ASM_H__ 30 #define __ppc_ASM_H__ 31 32 #include <arch/types.h> 33 #include <config.h> 34 35 /* TODO: implement the real stuff */ 36 static inline __address get_stack_base(void) 37 { 38 return NULL; 39 } 40 41 #endif -
include/arch.h
rcfd6efd2 r361635c 47 47 #define TASK (cpu_private_data[CPU_ID_ARCH].task) 48 48 49 /* 50 * For each possible kernel stack, structure 51 * of the following type will be placed at 52 * the bottom of the stack. 53 */ 54 struct the { 55 int preemption_disabled; 56 thread_t *thread; /* current thread */ 57 task_t *task; /* current task */ 58 cpu_t *cpu; /* executing cpu */ 59 }; 60 49 61 extern void arch_pre_mm_init(void); 50 62 extern void arch_post_mm_init(void); -
include/config.h
rcfd6efd2 r361635c 32 32 #include <arch/types.h> 33 33 #include <typedefs.h> 34 #include <arch/mm/page.h> 35 36 #define STACK_SIZE PAGE_SIZE 34 37 35 38 #define CONFIG_MEMORY_SIZE 4*1024*1024 36 39 #define CONFIG_HEAP_SIZE 300*1024 37 #define CONFIG_STACK_SIZE 32*102440 #define CONFIG_STACK_SIZE STACK_SIZE 38 41 39 42 struct config { -
include/cpu.h
rcfd6efd2 r361635c 40 40 #include <typedefs.h> 41 41 #include <arch/context.h> 42 #include <config.h> 42 43 43 #define CPU_STACK_SIZE PAGE_SIZE44 #define CPU_STACK_SIZE STACK_SIZE 44 45 45 46 struct cpu { -
include/proc/thread.h
rcfd6efd2 r361635c 40 40 #include <synch/rwlock.h> 41 41 #include <mm/page.h> 42 #include <config.h> 42 43 #include <list.h> 43 44 44 #define THREAD_STACK_SIZE PAGE_SIZE45 #define THREAD_STACK_SIZE STACK_SIZE 45 46 46 47 #define THREAD_USER_STACK 1 -
include/typedefs.h
rcfd6efd2 r361635c 72 72 typedef char *char_ptr; 73 73 74 typedef struct the the_t; 75 74 76 #endif
Note:
See TracChangeset
for help on using the changeset viewer.