Changeset 437ee6a4 in mainline
- Timestamp:
- 2005-10-30T13:49:39Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- df91be5
- Parents:
- 2cd0485d
- Files:
-
- 7 added
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/mips32/include/arg.h
r2cd0485d r437ee6a4 30 30 #define __mips32_ARG_H__ 31 31 32 //#include <stackarg.h>33 34 32 #include <arch/types.h> 35 33 … … 40 38 41 39 #define va_start(ap, lst) \ 42 (ap).pos = sizeof(lst); 40 (ap).pos = sizeof(lst); \ 43 41 (ap).last = (__u8 *) &(lst) 44 42 45 43 /** 46 * va_arg macro for MIPS32 - problem is that 64 bit values must be aligned on an 8-byte boundary (32bit values not)47 * To satisfy this, paddings must be sometimes inserted.48 */44 * va_arg macro for MIPS32 - problem is that 64 bit values must be aligned on an 8-byte boundary (32bit values not) 45 * To satisfy this, paddings must be sometimes inserted. 46 */ 49 47 #define va_arg(ap, type) \ 50 48 (*((type *)((ap).last + ((ap).pos += sizeof(type) + ((sizeof(type)==8)&&(((ap).pos)&(4))?4:0)) - sizeof(type)))) -
arch/ppc32/Makefile.inc
r2cd0485d r437ee6a4 19 19 20 20 arch_sources= \ 21 src/arch/console.c \ 21 22 src/arch/context.S \ 22 23 src/arch/debug/panic.s \ -
arch/sparc64/Makefile.inc
r2cd0485d r437ee6a4 15 15 16 16 DEFS=-DARCH=$(ARCH) 17 CFLAGS=$(DEFS) -nostdlib -fno-builtin - O217 CFLAGS=$(DEFS) -nostdlib -fno-builtin -mcpu=ultrasparc -m64 -O2 18 18 LFLAGS=-M -no-check-sections -N 19 19 20 20 arch_sources= \ 21 src/arch/asm.S \ 22 src/arch/console.c \ 23 src/arch/context.S \ 21 24 src/arch/dummy.s \ 25 src/arch/sparc64.c \ 22 26 src/arch/start.S \ 23 src/arch/sparc64.c 27 src/arch/mm/frame.c \ 28 src/arch/mm/page.c 29 24 30 -
arch/sparc64/_link.ld
r2cd0485d r437ee6a4 31 31 LONG(kdata_end - kdata_start); 32 32 hardcoded_load_address = .; 33 LONG(0x4000);33 QUAD(0x4000); 34 34 *(.bss); /* uninitialized static variables */ 35 35 *(COMMON); /* global variables */ -
arch/sparc64/include/arg.h
r2cd0485d r437ee6a4 30 30 #define __sparc64_ARG_H__ 31 31 32 #include <st ackarg.h>32 #include <stdarg.h> 33 33 34 34 #endif -
arch/sparc64/include/asm.h
r2cd0485d r437ee6a4 79 79 static inline __address get_stack_base(void) 80 80 { 81 __address v; 82 83 __asm__ volatile ("and %%o6, %1, %0\n" : "=r" (v) : "r" (~(STACK_SIZE-1))); 84 85 return v; 81 86 } 82 87 -
arch/sparc64/include/context.h
r2cd0485d r437ee6a4 30 30 #define __sparc64_CONTEXT_H__ 31 31 32 #i nclude <arch/types.h>33 # include <typedefs.h>34 # include <align.h>32 #ifndef __sparc64_TYPES_H__ 33 # include <arch/types.h> 34 #endif 35 35 36 #ifndef __ALIGN_H__ 37 # include <align.h> 38 #endif 39 40 #define STACK_ALIGNMENT 8 36 41 #define STACK_ITEM_SIZE 8 37 42 … … 41 46 #define SP_DELTA (0+STACK_ITEM_SIZE) 42 47 48 #ifdef context_set 49 #undef context_set 50 #endif 51 52 #define context_set(c, _pc, stack, size) \ 53 (c)->pc = ((__address) _pc) - 8; \ 54 (c)->sp = ((__address) stack) + (ALIGN((size), STACK_ALIGNMENT) + 1) - SP_DELTA; 55 43 56 /* 44 57 * Only save registers that must be preserved across … … 46 59 */ 47 60 struct context { 48 49 __address bsp; 50 __address sp; 51 __address pc; 61 __u64 l0; 62 __u64 l1; 63 __u64 l2; 64 __u64 l3; 65 __u64 l4; 66 __u64 l5; 67 __u64 l6; 68 __u64 l7; 69 __u64 i1; 70 __u64 i2; 71 __u64 i3; 72 __u64 i4; 73 __u64 i5; 74 __address sp; /* %i6 */ 75 __address pc; /* %i7 */ 52 76 ipl_t ipl; 53 } __attribute__ ((packed));77 }; 54 78 55 79 #endif -
arch/sparc64/include/types.h
r2cd0485d r437ee6a4 36 36 typedef unsigned char __u8; 37 37 typedef unsigned short __u16; 38 typedef unsigned long__u32;39 typedef longlong __u64;38 typedef unsigned int __u32; 39 typedef unsigned long __u64; 40 40 41 41 typedef __u64 __address; -
arch/sparc64/src/dummy.s
r2cd0485d r437ee6a4 31 31 .global asm_delay_loop 32 32 .global before_thread_runs_arch 33 .global context_restore_arch34 .global context_save_arch35 33 .global cpu_arch_init 36 34 .global cpu_halt … … 47 45 .global fpu_enable 48 46 .global fpu_init 49 .global frame_arch_init50 .global memcpy51 .global memsetb52 .global page_arch_init53 47 .global panic_printf 54 48 .global userspace … … 58 52 asm_delay_loop: 59 53 before_thread_runs_arch: 60 context_restore_arch:61 context_save_arch:62 54 cpu_arch_init: 63 55 cpu_halt: … … 74 66 fpu_enable: 75 67 fpu_init: 76 frame_arch_init:77 memcpy:78 memsetb:79 page_arch_init:80 68 panic_printf: 81 69 userspace: -
arch/sparc64/src/start.S
r2cd0485d r437ee6a4 27 27 # 28 28 29 .register %g2, #scratch 30 .register %g3, #scratch 31 .register %g6, #scratch 32 .register %g7, #scratch 33 29 34 .section K_TEXT_START, "ax" 30 35 … … 52 57 nop 53 58 59 call main_bsp 60 nop 61 62 /* Not reached. */ 63 54 64 2: 55 65 b 2b 56 66 nop 57 -
build.sparc64
r2cd0485d r437ee6a4 1 1 #! /bin/sh 2 2 3 # Generate context_offset.h 4 (cd tools/sparc64/;make gencontext;./gencontext) 5 3 6 make all ARCH=sparc64 -
clean.sparc64
r2cd0485d r437ee6a4 2 2 3 3 make dist-clean ARCH=sparc64 4 5 rm tools/sparc64/gencontext 6 rm arch/sparc64/include/context_offset.h -
genarch/include/firmware/ofw/ofw.h
r2cd0485d r437ee6a4 27 27 */ 28 28 29 #ifndef __ ppc32_OFW_H__30 #define __ ppc32_OFW_H__29 #ifndef __OFW_H__ 30 #define __OFW_H__ 31 31 32 32 #include <arch/types.h> … … 59 59 extern int ofw_get_property(const phandle device, const char *name, void *buf, const int buflen); 60 60 extern void *ofw_claim(const void *addr, const int size, const int align); 61 extern void putchar(const char ch);62 61 63 62 #endif -
genarch/src/firmware/ofw/ofw.c
r2cd0485d r437ee6a4 99 99 return (void *) ofw_call("claim", 3, 1, addr, size, align); 100 100 } 101 102 void putchar(const char ch)103 {104 ofw_putchar(ch);105 }
Note:
See TracChangeset
for help on using the changeset viewer.