Index: uspace/lib/c/arch/sparc32/Makefile.common
===================================================================
--- uspace/lib/c/arch/sparc32/Makefile.common	(revision 8b6aa3923668ec2fbb91e100c43265f2f32fe31c)
+++ 	(revision )
@@ -1,34 +1,0 @@
-#
-# Copyright (c) 2006 Martin Decky
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# - Redistributions of source code must retain the above copyright
-#   notice, this list of conditions and the following disclaimer.
-# - Redistributions in binary form must reproduce the above copyright
-#   notice, this list of conditions and the following disclaimer in the
-#   documentation and/or other materials provided with the distribution.
-# - The name of the author may not be used to endorse or promote products
-#   derived from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-
-LFLAGS += -no-check-sections
-
-ENDIANESS = BE
-
-BFD_NAME = elf32-sparc
-BFD_ARCH = sparc
Index: uspace/lib/c/arch/sparc32/Makefile.inc
===================================================================
--- uspace/lib/c/arch/sparc32/Makefile.inc	(revision 8b6aa3923668ec2fbb91e100c43265f2f32fe31c)
+++ 	(revision )
@@ -1,38 +1,0 @@
-#
-# Copyright (c) 2006 Martin Decky
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# - Redistributions of source code must retain the above copyright
-#   notice, this list of conditions and the following disclaimer.
-# - Redistributions in binary form must reproduce the above copyright
-#   notice, this list of conditions and the following disclaimer in the
-#   documentation and/or other materials provided with the distribution.
-# - The name of the author may not be used to endorse or promote products
-#   derived from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-
-ARCH_SOURCES = \
-	arch/$(UARCH)/src/entry.S \
-	arch/$(UARCH)/src/entryjmp.S \
-	arch/$(UARCH)/src/thread_entry.S \
-	arch/$(UARCH)/src/fibril.S \
-	arch/$(UARCH)/src/tls.c \
-	arch/$(UARCH)/src/stacktrace.c \
-	arch/$(UARCH)/src/stacktrace_asm.S
-
-.PRECIOUS: arch/$(UARCH)/src/entry.o
Index: uspace/lib/c/arch/sparc32/_link.ld.in
===================================================================
--- uspace/lib/c/arch/sparc32/_link.ld.in	(revision 8b6aa3923668ec2fbb91e100c43265f2f32fe31c)
+++ 	(revision )
@@ -1,68 +1,0 @@
-STARTUP(LIBC_PATH/arch/UARCH/src/entry.o)
-ENTRY(__entry)
-
-PHDRS {
-#ifdef LOADER
-	interp PT_INTERP;
-	text PT_LOAD FILEHDR PHDRS FLAGS(5);
-#else
-	text PT_LOAD FLAGS(5);
-#endif
-	data PT_LOAD FLAGS(6);
-}
-
-SECTIONS {
-#ifdef LOADER
-	. = 0x70004000 + SIZEOF_HEADERS;
-#else
-	. = 0x4000 + SIZEOF_HEADERS;
-#endif
-	
-	.init : {
-		*(.init);
-	} :text
-	
-	.text : {
-		*(.text .text.*);
-		*(.rodata .rodata.*);
-	} :text
-	
-#ifdef LOADER
-	.interp : {
-		*(.interp);
-	} :interp :text
-#endif
-	
-	. = . + 0x4000;
-	
-	.got : {
-		 _gp = .;
-		 *(.got*);
-	} :data
-	
-	.data : {
-		*(.data);
-		*(.sdata);
-	} :data
-	
-	.tdata : {
-		_tdata_start = .;
-		*(.tdata);
-		_tdata_end = .;
-		_tbss_start = .;
-		*(.tbss);
-		_tbss_end = .;
-	} :data
-	
-	_tls_alignment = ALIGNOF(.tdata);
-	
-	.bss : {
-		*(.sbss);
-		*(COMMON);
-		*(.bss);
-	} :data
-	
-	/DISCARD/ : {
-		*(*);
-	}
-}
Index: uspace/lib/c/arch/sparc32/include/libarch/atomic.h
===================================================================
--- uspace/lib/c/arch/sparc32/include/libarch/atomic.h	(revision 8b6aa3923668ec2fbb91e100c43265f2f32fe31c)
+++ 	(revision )
@@ -1,93 +1,0 @@
-/*
- * Copyright (c) 2005 Jakub Jermar
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libcsparc32
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_sparc32_ATOMIC_H_
-#define LIBC_sparc32_ATOMIC_H_
-
-#define LIBC_ARCH_ATOMIC_H_
-
-#define CAS
-
-#include <atomicdflt.h>
-#include <sys/types.h>
-
-static inline bool cas(atomic_t *val, atomic_count_t ov, atomic_count_t nv)
-{
-	if (val->count == ov) {
-		val->count = nv;
-		return true;
-	}
-	
-	return false;
-}
-
-static inline void atomic_inc(atomic_t *val)
-{
-	// FIXME TODO
-	val->count++;
-}
-
-static inline void atomic_dec(atomic_t *val)
-{
-	// FIXME TODO
-	val->count++;
-}
-
-static inline atomic_count_t atomic_postinc(atomic_t *val)
-{
-	// FIXME TODO
-	
-	atomic_count_t prev = val->count;
-	
-	val->count++;
-	return prev;
-}
-
-static inline atomic_count_t atomic_postdec(atomic_t *val)
-{
-	// FIXME TODO
-	
-	atomic_count_t prev = val->count;
-	
-	val->count--;
-	return prev;
-}
-
-#define atomic_preinc(val) (atomic_postinc(val) + 1)
-#define atomic_predec(val) (atomic_postdec(val) - 1)
-
-#endif
-
-/** @}
- */
Index: uspace/lib/c/arch/sparc32/include/libarch/barrier.h
===================================================================
--- uspace/lib/c/arch/sparc32/include/libarch/barrier.h	(revision 8b6aa3923668ec2fbb91e100c43265f2f32fe31c)
+++ 	(revision )
@@ -1,1 +1,0 @@
-../../../../../../../kernel/arch/sparc32/include/arch/barrier.h
Index: uspace/lib/c/arch/sparc32/include/libarch/config.h
===================================================================
--- uspace/lib/c/arch/sparc32/include/libarch/config.h	(revision 8b6aa3923668ec2fbb91e100c43265f2f32fe31c)
+++ 	(revision )
@@ -1,44 +1,0 @@
-/*
- * Copyright (c) 2006 Jakub Jermar
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libcsparc32
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_sparc32_CONFIG_H_
-#define LIBC_sparc32_CONFIG_H_
-
-#define PAGE_WIDTH  12
-#define PAGE_SIZE   (1 << PAGE_WIDTH)
-
-#endif
-
-/** @}
- */
Index: uspace/lib/c/arch/sparc32/include/libarch/context_offset.h
===================================================================
--- uspace/lib/c/arch/sparc32/include/libarch/context_offset.h	(revision 8b6aa3923668ec2fbb91e100c43265f2f32fe31c)
+++ 	(revision )
@@ -1,1 +1,0 @@
-../../../../../../../kernel/arch/sparc32/include/arch/context_offset.h
Index: uspace/lib/c/arch/sparc32/include/libarch/ddi.h
===================================================================
--- uspace/lib/c/arch/sparc32/include/libarch/ddi.h	(revision 8b6aa3923668ec2fbb91e100c43265f2f32fe31c)
+++ 	(revision )
@@ -1,89 +1,0 @@
-/*
- * Copyright (c) 2009 Jakub Jermar
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @file
- * @ingroup libsparc32
- */
-
-#ifndef LIBC_sparc32_DDI_H_
-#define LIBC_sparc32_DDI_H_
-
-#include <sys/types.h>
-#include <libarch/types.h>
-
-static inline void memory_barrier(void)
-{
-	asm volatile (
-		"stbar\n"
-		::: "memory"
-	);
-}
-
-static inline void arch_pio_write_8(ioport8_t *port, uint8_t v)
-{
-	*port = v;
-	memory_barrier();
-}
-
-static inline void arch_pio_write_16(ioport16_t *port, uint16_t v)
-{
-	*port = v;
-	memory_barrier();
-}
-
-static inline void arch_pio_write_32(ioport32_t *port, uint32_t v)
-{
-	*port = v;
-	memory_barrier();
-}
-
-static inline uint8_t arch_pio_read_8(const ioport8_t *port)
-{
-	uint8_t rv = *port;
-	memory_barrier();
-	
-	return rv;
-}
-
-static inline uint16_t arch_pio_read_16(const ioport16_t *port)
-{
-	uint16_t rv = *port;
-	memory_barrier();
-	
-	return rv;
-}
-
-static inline uint32_t arch_pio_read_32(const ioport32_t *port)
-{
-	uint32_t rv = *port;
-	memory_barrier();
-	
-	return rv;
-}
-
-#endif
Index: uspace/lib/c/arch/sparc32/include/libarch/elf.h
===================================================================
--- uspace/lib/c/arch/sparc32/include/libarch/elf.h	(revision 8b6aa3923668ec2fbb91e100c43265f2f32fe31c)
+++ 	(revision )
@@ -1,1 +1,0 @@
-../../../../../../../kernel/arch/sparc32/include/arch/elf.h
Index: uspace/lib/c/arch/sparc32/include/libarch/elf_linux.h
===================================================================
--- uspace/lib/c/arch/sparc32/include/libarch/elf_linux.h	(revision 8b6aa3923668ec2fbb91e100c43265f2f32fe31c)
+++ 	(revision )
@@ -1,56 +1,0 @@
-/*
- * Copyright (c) 2011 Jiri Svoboda
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libcsparc32
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_sparc32_ELF_LINUX_H_
-#define LBIC_sparc32_ELF_LINUX_H_
-
-#include <libarch/istate.h>
-#include <sys/types.h>
-
-typedef struct {
-	/* TODO */
-	uint64_t pad[16];
-} elf_regs_t;
-
-static inline void istate_to_elf_regs(istate_t *istate, elf_regs_t *elf_regs)
-{
-	/* TODO */
-	(void) istate;
-	(void) elf_regs;
-}
-
-#endif
-
-/** @}
- */
Index: uspace/lib/c/arch/sparc32/include/libarch/faddr.h
===================================================================
--- uspace/lib/c/arch/sparc32/include/libarch/faddr.h	(revision 8b6aa3923668ec2fbb91e100c43265f2f32fe31c)
+++ 	(revision )
@@ -1,45 +1,0 @@
-/*
- * Copyright (c) 2005 Ondrej Palkovsky
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libcsparc32
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_sparc32_FADDR_H_
-#define LIBC_sparc32_FADDR_H_
-
-#include <libarch/types.h>
-
-#define FADDR(fptr)  ((uintptr_t) (fptr))
-
-#endif
-
-/** @}
- */
Index: uspace/lib/c/arch/sparc32/include/libarch/fibril.h
===================================================================
--- uspace/lib/c/arch/sparc32/include/libarch/fibril.h	(revision 8b6aa3923668ec2fbb91e100c43265f2f32fe31c)
+++ 	(revision )
@@ -1,87 +1,0 @@
-/*
- * Copyright (c) 2005 Jakub Jermar
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libcsparc32
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_sparc32_FIBRIL_H_
-#define LIBC_sparc32_FIBRIL_H_
-
-#include <libarch/stack.h>
-#include <sys/types.h>
-#include <align.h>
-
-#define SP_DELTA  (STACK_WINDOW_SAVE_AREA_SIZE + STACK_ARG_SAVE_AREA_SIZE)
-
-#define context_set(c, _pc, stack, size, ptls) \
-	do { \
-		(c)->pc = ((uintptr_t) _pc) - 8; \
-		(c)->sp = ((uintptr_t) stack) + ALIGN_UP((size), \
-		    STACK_ALIGNMENT) - (SP_DELTA); \
-		(c)->fp = 0; \
-		(c)->tp = (uint32_t) ptls; \
-	} while (0)
-
-/*
- * Save only registers that must be preserved across
- * function calls.
- */
-typedef struct {
-	uintptr_t sp;  /* %o6 */
-	uintptr_t pc;  /* %o7 */
-	uint32_t i0;
-	uint32_t i1;
-	uint32_t i2;
-	uint32_t i3;
-	uint32_t i4;
-	uint32_t i5;
-	uintptr_t fp;  /* %i6 */
-	uintptr_t i7;
-	uint32_t l0;
-	uint32_t l1;
-	uint32_t l2;
-	uint32_t l3;
-	uint32_t l4;
-	uint32_t l5;
-	uint32_t l6;
-	uint32_t l7;
-	uint32_t tp;  /* %g7 */
-} context_t;
-
-static inline uintptr_t context_get_fp(context_t *ctx)
-{
-	return ctx->sp;
-}
-
-#endif
-
-/** @}
- */
Index: uspace/lib/c/arch/sparc32/include/libarch/inttypes.h
===================================================================
--- uspace/lib/c/arch/sparc32/include/libarch/inttypes.h	(revision 8b6aa3923668ec2fbb91e100c43265f2f32fe31c)
+++ 	(revision )
@@ -1,44 +1,0 @@
-/*
- * Copyright (c) 2010 Jiri Svoboda
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libcsparc32
- * @{
- */
-
-#ifndef LIBC_sparc32_INTTYPES_H_
-#define LIBC_sparc32_INTTYPES_H_
-
-#define PRIdn  PRId32  /**< Format for native_t. */
-#define PRIun  PRIu32  /**< Format for sysarg_t. */
-#define PRIxn  PRIx32  /**< Format for hexadecimal sysarg_t. */
-#define PRIua  PRIu32  /**< Format for atomic_count_t. */
-
-#endif
-
-/** @}
- */
Index: uspace/lib/c/arch/sparc32/include/libarch/istate.h
===================================================================
--- uspace/lib/c/arch/sparc32/include/libarch/istate.h	(revision 8b6aa3923668ec2fbb91e100c43265f2f32fe31c)
+++ 	(revision )
@@ -1,1 +1,0 @@
-../../../../../../../kernel/arch/sparc32/include/arch/istate.h
Index: uspace/lib/c/arch/sparc32/include/libarch/stack.h
===================================================================
--- uspace/lib/c/arch/sparc32/include/libarch/stack.h	(revision 8b6aa3923668ec2fbb91e100c43265f2f32fe31c)
+++ 	(revision )
@@ -1,51 +1,0 @@
-/*
- * Copyright (c) 2005 Jakub Jermar
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libcsparc32
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_sparc32_STACK_H_
-#define LIBC_sparc32_STACK_H_
-
-#define STACK_ITEM_SIZE  4
-
-#define STACK_ALIGNMENT  8
-
-/** 16-extended-word save area for %i[0-7] and %l[0-7] registers. */
-#define STACK_WINDOW_SAVE_AREA_SIZE  (16 * STACK_ITEM_SIZE)
-
-/* Six extended words for first six arguments. */
-#define STACK_ARG_SAVE_AREA_SIZE  (6 * STACK_ITEM_SIZE)
-
-#endif
-
-/** @}
- */
Index: uspace/lib/c/arch/sparc32/include/libarch/stackarg.h
===================================================================
--- uspace/lib/c/arch/sparc32/include/libarch/stackarg.h	(revision 8b6aa3923668ec2fbb91e100c43265f2f32fe31c)
+++ 	(revision )
@@ -1,41 +1,0 @@
-/*
- * Copyright (c) 2006 Josef Cejka
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libcsparc32
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_sparc32_STACKARG_H_
-#define LIBC_sparc32_STACKARG_H_
-
-#endif
-
-/** @}
- */
Index: uspace/lib/c/arch/sparc32/include/libarch/stddef.h
===================================================================
--- uspace/lib/c/arch/sparc32/include/libarch/stddef.h	(revision 8b6aa3923668ec2fbb91e100c43265f2f32fe31c)
+++ 	(revision )
@@ -1,46 +1,0 @@
-/*
- * Copyright (c) 2006 Ondrej Palkovsky
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libcsparc32
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_sparc32_STDDEF_H_
-#define LIBC_sparc32_STDDEF_H_
-
-#include <libarch/common.h>
-
-typedef uint32_t size_t;
-typedef int32_t ptrdiff_t;
-
-#endif
-
-/** @}
- */
Index: uspace/lib/c/arch/sparc32/include/libarch/stdint.h
===================================================================
--- uspace/lib/c/arch/sparc32/include/libarch/stdint.h	(revision 8b6aa3923668ec2fbb91e100c43265f2f32fe31c)
+++ 	(revision )
@@ -1,59 +1,0 @@
-/*
- * Copyright (c) 2006 Ondrej Palkovsky
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libcsparc32
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_sparc32_STDINT_H_
-#define LIBC_sparc32_STDINT_H_
-
-#include <libarch/common.h>
-
-#define SIZE_MIN  UINT32_MIN
-#define SIZE_MAX  UINT32_MAX
-
-#define UINTPTR_MAX UINT32_MAX
-typedef uint32_t uintptr_t;
-
-#define INTPTR_MIN INT32_MIN
-#define INTPTR_MAX INT32_MAX
-typedef int32_t intptr_t;
-
-#define UINTMAX_MAX UINT64_MAX
-typedef uint64_t uintmax_t;
-
-#define INTMAX_MAX INT64_MAX
-typedef int64_t intmax_t;
-
-#endif
-
-/** @}
- */
Index: uspace/lib/c/arch/sparc32/include/libarch/syscall.h
===================================================================
--- uspace/lib/c/arch/sparc32/include/libarch/syscall.h	(revision 8b6aa3923668ec2fbb91e100c43265f2f32fe31c)
+++ 	(revision )
@@ -1,79 +1,0 @@
-/*
- * Copyright (c) 2005 Martin Decky
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libcsparc32
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_sparc32_SYSCALL_H_
-#define LIBC_sparc32_SYSCALL_H_
-
-#include <sys/types.h>
-#include <abi/syscall.h>
-
-#define __syscall0  __syscall
-#define __syscall1  __syscall
-#define __syscall2  __syscall
-#define __syscall3  __syscall
-#define __syscall4  __syscall
-#define __syscall5  __syscall
-#define __syscall6  __syscall
-
-static inline sysarg_t __syscall(const sysarg_t p1, const sysarg_t p2,
-    const sysarg_t p3, const sysarg_t p4, const sysarg_t p5, const sysarg_t p6,
-    const syscall_t id)
-{
-	register uint32_t a1 asm("o0") = p1;
-	register uint32_t a2 asm("o1") = p2;
-	register uint32_t a3 asm("o2") = p3;
-	register uint32_t a4 asm("o3") = p4;
-	register uint32_t a5 asm("o4") = p5;
-	register uint32_t a6 asm("o5") = p6;
-	
-	asm volatile (
-		"ta %7\n"
-		: "=r" (a1)
-		: "r" (a1),
-		  "r" (a2),
-		  "r" (a3),
-		  "r" (a4),
-		  "r" (a5),
-		  "r" (a6),
-		  "i" (id)
-		: "memory"
-	);
-	
-	return a1;
-}
-
-#endif
-
-/** @}
- */
Index: uspace/lib/c/arch/sparc32/include/libarch/thread.h
===================================================================
--- uspace/lib/c/arch/sparc32/include/libarch/thread.h	(revision 8b6aa3923668ec2fbb91e100c43265f2f32fe31c)
+++ 	(revision )
@@ -1,40 +1,0 @@
-/*
- * Copyright (c) 2006 Ondrej Palkovsky
- * Copyright (c) 2006 Jakub Jermar
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libcsparc32
- * @{
- */
-
-#ifndef LIBC_sparc32_THREAD_H_
-#define LIBC_sparc32_THREAD_H_
-
-#endif
-
-/** @}
- */
Index: uspace/lib/c/arch/sparc32/include/libarch/tls.h
===================================================================
--- uspace/lib/c/arch/sparc32/include/libarch/tls.h	(revision 8b6aa3923668ec2fbb91e100c43265f2f32fe31c)
+++ 	(revision )
@@ -1,71 +1,0 @@
-/*
- * Copyright (c) 2006 Ondrej Palkovsky
- * Copyright (c) 2006 Jakub Jermar
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libcsparc32
- * @{
- */
-/** @file
- * @brief sparc32 TLS functions.
- */
-
-#ifndef LIBC_sparc32_TLS_H_
-#define LIBC_sparc32_TLS_H_
-
-#define CONFIG_TLS_VARIANT_2
-
-typedef struct {
-	void *self;
-	void *fibril_data;
-} tcb_t;
-
-static inline void __tcb_set(tcb_t *tcb)
-{
-	asm volatile (
-		"mov %0, %%g7\n"
-		:: "r" (tcb)
-		: "g7"
-	);
-}
-
-static inline tcb_t *__tcb_get(void)
-{
-	void *retval;
-	
-	asm volatile (
-		"mov %%g7, %0\n"
-		: "=r" (retval)
-	);
-	
-	return retval;
-}
-
-#endif
-
-/** @}
- */
Index: uspace/lib/c/arch/sparc32/include/libarch/types.h
===================================================================
--- uspace/lib/c/arch/sparc32/include/libarch/types.h	(revision 8b6aa3923668ec2fbb91e100c43265f2f32fe31c)
+++ 	(revision )
@@ -1,58 +1,0 @@
-/*
- * Copyright (c) 2005 Martin Decky
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libcsparc32
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_sparc32_TYPES_H_
-#define LIBC_sparc32_TYPES_H_
-
-#include <libarch/common.h>
-#include <libarch/stddef.h>
-#include <libarch/stdint.h>
-
-#define __32_BITS__
-
-#define SSIZE_MIN  INT32_MIN
-#define SSIZE_MAX  INT32_MAX
-
-typedef uint32_t sysarg_t;
-typedef int32_t native_t;
-
-typedef int32_t ssize_t;
-
-typedef uint32_t atomic_count_t;
-typedef int32_t atomic_signed_t;
-
-#endif
-
-/** @}
- */
Index: uspace/lib/c/arch/sparc32/src/entry.S
===================================================================
--- uspace/lib/c/arch/sparc32/src/entry.S	(revision 8b6aa3923668ec2fbb91e100c43265f2f32fe31c)
+++ 	(revision )
@@ -1,67 +1,0 @@
-#
-# Copyright (c) 2006 Martin Decky
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# - Redistributions of source code must retain the above copyright
-#   notice, this list of conditions and the following disclaimer.
-# - Redistributions in binary form must reproduce the above copyright
-#   notice, this list of conditions and the following disclaimer in the
-#   documentation and/or other materials provided with the distribution.
-# - The name of the author may not be used to endorse or promote products
-#   derived from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-
-#include <abi/asmtool.h>
-
-.section .init, "ax"
-
-.org 0
-
-## User-space task entry point
-#
-# %o0 contains uarg
-# %o1 contains pcb_ptr
-#
-SYMBOL(__entry)
-	#
-	# Create the first stack frame.
-	#
-	
-	save %sp, -176, %sp
-	## XXX	flushw
-	mov 7, %g1
-	1:
-		subcc %g1, 1, %g1
-		bg 1b
-		save %sp, -64, %sp
-	
-	mov 7, %g1
-	1:
-		subcc %g1, 1, %g1
-		bg 1b
-		restore
-	
-	## XXX end flush
-	## add %g0, -0x7ff, %fp
-	set 0x80000000, %fp
-	
-	# Pass pcb_ptr as the first argument to __main()
-	mov %i1, %o0
-	sethi %hi(_gp), %l7
-	call __main
-	or %l7, %lo(_gp), %l7
Index: uspace/lib/c/arch/sparc32/src/entryjmp.S
===================================================================
--- uspace/lib/c/arch/sparc32/src/entryjmp.S	(revision 8b6aa3923668ec2fbb91e100c43265f2f32fe31c)
+++ 	(revision )
@@ -1,43 +1,0 @@
-#
-# Copyright (c) 2008 Jiri Svoboda
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# - Redistributions of source code must retain the above copyright
-#   notice, this list of conditions and the following disclaimer.
-# - Redistributions in binary form must reproduce the above copyright
-#   notice, this list of conditions and the following disclaimer in the
-#   documentation and/or other materials provided with the distribution.
-# - The name of the author may not be used to endorse or promote products
-#   derived from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-
-#include <abi/asmtool.h>
-
-## void entry_point_jmp(void *entry_point, void *pcb);
-#
-# %o0	contains entry_point
-# %o1	contains pcb
-#
-# Jump to program entry point
-FUNCTION_BEGIN(entry_point_jmp)
-	# Pass pcb pointer to entry point in %o1. As it is already
-	# there, no action is needed.
-	call %o0
-	nop
-	# FIXME: use branch instead of call
-FUNCTION_END(entry_point_jmp)
Index: uspace/lib/c/arch/sparc32/src/fibril.S
===================================================================
--- uspace/lib/c/arch/sparc32/src/fibril.S	(revision 8b6aa3923668ec2fbb91e100c43265f2f32fe31c)
+++ 	(revision )
@@ -1,84 +1,0 @@
-#
-# Copyright (c) 2005 Jakub Jermar
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# - Redistributions of source code must retain the above copyright
-#   notice, this list of conditions and the following disclaimer.
-# - Redistributions in binary form must reproduce the above copyright
-#   notice, this list of conditions and the following disclaimer in the
-#   documentation and/or other materials provided with the distribution.
-# - The name of the author may not be used to endorse or promote products
-#   derived from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-
-#include <abi/asmtool.h>
-#include <libarch/context_offset.h>
-
-.text
-
-FUNCTION_BEGIN(context_save)
-	#
-	# We rely on the kernel to flush our active register windows to memory
-	# should a thread switch occur.
-	#
-	
-	mov 7, %g1
-	1:
-		subcc %g1, 1, %g1
-		bg 1b
-		save %sp, -64, %sp
-	
-	mov 7, %g1
-	1:
-		subcc %g1, 1, %g1
-		bg 1b
-		restore
-	
-	CONTEXT_SAVE_ARCH_CORE %o0
-	retl
-	mov 1, %o0              ! context_save_arch returns 1
-FUNCTION_END(context_save)
-
-FUNCTION_BEGIN(context_restore)
-	#
-	# Flush all active windows.
-	# This is essential, because CONTEXT_RESTORE_ARCH_CORE overwrites %sp of
-	# CWP - 1 with the value written to %fp of CWP.  Flushing all active
-	# windows mitigates this problem as CWP - 1 becomes the overlap window.
-	#
-	
-	## XXX
-	## flushw
-	## ta 0x4f
-	## nop
-	mov 7, %g1
-	1:
-		subcc %g1, 1, %g1
-		bg 1b
-		save %sp, -64, %sp
-	
-	mov 7, %g1
-	1:
-		subcc %g1, 1, %g1
-		bg 1b
-		restore
-	
-	CONTEXT_RESTORE_ARCH_CORE %o0
-	retl
-	xor %o0, %o0, %o0       ! context_restore_arch returns 0
-FUNCTION_END(context_restore)
Index: uspace/lib/c/arch/sparc32/src/stacktrace.c
===================================================================
--- uspace/lib/c/arch/sparc32/src/stacktrace.c	(revision 8b6aa3923668ec2fbb91e100c43265f2f32fe31c)
+++ 	(revision )
@@ -1,69 +1,0 @@
-/*
- * Copyright (c) 2010 Jakub Jermar
- * Copyright (c) 2010 Jiri Svoboda
- * Copyright (c) 2013 Jakub Klama
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup sparc32
- * @{
- */
-/** @file
- */
-
-#include <sys/types.h>
-#include <stdbool.h>
-#include <libarch/stack.h>
-#include <errno.h>
-#include <stacktrace.h>
-
-#define FRAME_OFFSET_FP_PREV  (14 * 4)
-#define FRAME_OFFSET_RA       (15 * 4)
-
-bool stacktrace_fp_valid(stacktrace_t *st, uintptr_t fp)
-{
-	(void) st;
-	return fp != 0;
-}
-
-int stacktrace_fp_prev(stacktrace_t *st, uintptr_t fp, uintptr_t *prev)
-{
-	uintptr_t bprev;
-	int rc = (*st->ops->read_uintptr)(st->op_arg, fp + FRAME_OFFSET_FP_PREV,
-	    &bprev);
-	if (rc == EOK)
-		*prev = bprev;
-	
-	return rc;
-}
-
-int stacktrace_ra_get(stacktrace_t *st, uintptr_t fp, uintptr_t *ra)
-{
-	return (*st->ops->read_uintptr)(st->op_arg, fp + FRAME_OFFSET_RA, ra);
-}
-
-/** @}
- */
Index: uspace/lib/c/arch/sparc32/src/stacktrace_asm.S
===================================================================
--- uspace/lib/c/arch/sparc32/src/stacktrace_asm.S	(revision 8b6aa3923668ec2fbb91e100c43265f2f32fe31c)
+++ 	(revision )
@@ -1,63 +1,0 @@
-#
-# Copyright (c) 2009 Jakub Jermar
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# - Redistributions of source code must retain the above copyright
-#   notice, this list of conditions and the following disclaimer.
-# - Redistributions in binary form must reproduce the above copyright
-#   notice, this list of conditions and the following disclaimer in the
-#   documentation and/or other materials provided with the distribution.
-# - The name of the author may not be used to endorse or promote products
-#   derived from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-
-#include <abi/asmtool.h>
-#include <libarch/stack.h>
-
-.text
-
-FUNCTION_BEGIN(stacktrace_prepare)
-	save %sp, -(STACK_WINDOW_SAVE_AREA_SIZE+STACK_ARG_SAVE_AREA_SIZE), %sp
-	
-	# Flush all other windows to memory so that we can read their contents.
-	
-	mov 7, %g1
-	1:
-		subcc %g1, 1, %g1
-		bg 1b
-		save %sp, -64, %sp
-	
-	mov 7, %g1
-	1:
-		subcc %g1, 1, %g1
-		bg 1b
-	
-	ret
-	restore
-FUNCTION_END(stacktrace_prepare)
-
-FUNCTION_BEGIN(stacktrace_fp_get)
-	# Add the stack bias to %sp to get the actual address.
-	retl
-	mov %sp,  %o0
-FUNCTION_END(stacktrace_fp_get)
-
-FUNCTION_BEGIN(stacktrace_pc_get)
-	retl
-	mov %o7, %o0
-FUNCTION_END(stacktrace_pc_get)
Index: uspace/lib/c/arch/sparc32/src/thread_entry.S
===================================================================
--- uspace/lib/c/arch/sparc32/src/thread_entry.S	(revision 8b6aa3923668ec2fbb91e100c43265f2f32fe31c)
+++ 	(revision )
@@ -1,67 +1,0 @@
-#
-# Copyright (c) 2006 Jakub Jermar
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# - Redistributions of source code must retain the above copyright
-#   notice, this list of conditions and the following disclaimer.
-# - Redistributions in binary form must reproduce the above copyright
-#   notice, this list of conditions and the following disclaimer in the
-#   documentation and/or other materials provided with the distribution.
-# - The name of the author may not be used to endorse or promote products
-#   derived from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-
-#include <abi/asmtool.h>
-
-.text
-
-## User-space thread entry point for all but the first threads.
-#
-#
-SYMBOL(__thread_entry)
-	#
-	# Create the first stack frame.
-	#
-	
-	save %sp, -176, %sp
-	## XXX flushw
-	mov 7, %g1
-	1:
-		subcc %g1, 1, %g1
-		bg 1b
-		save %sp, -64, %sp
-	
-	mov 7, %g1
-	1:
-		subcc %g1, 1, %g1
-		bg 1b
-	
-	## XXX end flushw
-	set 0x80000000, %fp
-	
-	#
-	# Propagate the input arguments to the new window.
-	#
-	
-	mov %i0, %o0
-	
-	sethi %hi(_gp), %l7
-	call __thread_main      ! %o0 contains address of uarg
-	or %l7, %lo(_gp), %l7
-	
-	! not reached
Index: uspace/lib/c/arch/sparc32/src/tls.c
===================================================================
--- uspace/lib/c/arch/sparc32/src/tls.c	(revision 8b6aa3923668ec2fbb91e100c43265f2f32fe31c)
+++ 	(revision )
@@ -1,51 +1,0 @@
-/*
- * Copyright (c) 2006 Ondrej Palkovsky
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libcsparc32 sparc32
- * @ingroup lc
- * @{
- */
-/** @file
- *
- */
-
-#include <tls.h>
-#include <sys/types.h>
-
-tcb_t *tls_alloc_arch(void **data, size_t size)
-{
-	return tls_alloc_variant_2(data, size);
-}
-
-void tls_free_arch(tcb_t *tcb, size_t size)
-{
-	tls_free_variant_2(tcb, size);
-}
-
-/** @}
- */
