Index: HelenOS.config
===================================================================
--- HelenOS.config	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ HelenOS.config	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -526,7 +526,7 @@
 @ "modular" Modular
 @ "module" One module
-! NETWORKING (choice)
+! CONFIG_NETWORKING (choice)
 
 % DP8390 (NE2k) network interface
-! [NETWORKING=modular|NETWORKING=module] CONFIG_NETIF_DP8390 (y/n)
-
+! [CONFIG_NETWORKING=modular|CONFIG_NETWORKING=module] CONFIG_NETIF_DP8390 (y/n)
+
Index: boot/Makefile.common
===================================================================
--- boot/Makefile.common	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ boot/Makefile.common	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -103,35 +103,30 @@
 	$(USPACEDIR)/srv/net/app/nettest2/nettest2
 
-ifneq ($(NETWORKING), none)
-NET_CFG = \
-	$(USPACEDIR)/srv/net/cfg/$(NETWORKING)/general \
-	$(USPACEDIR)/srv/net/cfg/$(NETWORKING)/lo
-
-ifeq ($(CONFIG_NETIF_DP8390),y)
-	NET_SRVS	+=	$(USPACEDIR)/srv/net/netif/dp8390/dp8390
-
-	NET_CFG	+=	$(USPACEDIR)/srv/net/cfg/$(NETWORKING)/ne2k
-endif
-
-ifeq ($(NETWORKING), module)
-	RD_APPS +=	$(NET_APPS)
-
-	RD_SRVS +=	$(NET_SRVS)
-
-	CFG		+=	$(NET_CFG)
-else
-ifeq ($(NETWORKING), modular)
-	RD_APPS +=	$(NET_APPS)
-
-	RD_SRVS +=	$(NET_SRVS)
-
-	RD_SRVS +=	$(USPACEDIR)/srv/net/il/ip/ip \
+ifneq ($(CONFIG_NETWORKING),none)
+	NET_CFG = \
+		$(USPACEDIR)/srv/net/cfg/$(CONFIG_NETWORKING)/general \
+		$(USPACEDIR)/srv/net/cfg/$(CONFIG_NETWORKING)/lo
+	
+	ifeq ($(CONFIG_NETIF_DP8390),y)
+		NET_SRVS += $(USPACEDIR)/srv/net/netif/dp8390/dp8390
+		NET_CFG += $(USPACEDIR)/srv/net/cfg/$(CONFIG_NETWORKING)/ne2k
+	endif
+	
+	ifeq ($(CONFIG_NETWORKING),module)
+		RD_APPS += $(NET_APPS)
+		RD_SRVS += $(NET_SRVS)
+		CFG += $(NET_CFG)
+	endif
+	
+	ifeq ($(CONFIG_NETWORKING),modular)
+		RD_APPS += $(NET_APPS)
+		RD_SRVS += $(NET_SRVS)
+		RD_SRVS += \
+			$(USPACEDIR)/srv/net/il/ip/ip \
 			$(USPACEDIR)/srv/net/il/arp/arp \
 			$(USPACEDIR)/srv/net/tl/udp/udp \
 			$(USPACEDIR)/srv/net/tl/tcp/tcp \
 			$(USPACEDIR)/srv/net/tl/icmp/icmp
-
-	CFG		+=	$(NET_CFG)
+		CFG += $(NET_CFG)
+	endif
 endif
-endif
-endif
Index: defaults/amd64/Makefile.config
===================================================================
--- defaults/amd64/Makefile.config	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ defaults/amd64/Makefile.config	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -63,3 +63,3 @@
 
 # Default networking architecture
-NETWORKING = modular
+CONFIG_NETWORKING = modular
Index: defaults/arm32/Makefile.config
===================================================================
--- defaults/arm32/Makefile.config	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ defaults/arm32/Makefile.config	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -39,3 +39,3 @@
 
 # Default networking architecture
-NETWORKING = none 
+CONFIG_NETWORKING = none
Index: defaults/ia32/Makefile.config
===================================================================
--- defaults/ia32/Makefile.config	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ defaults/ia32/Makefile.config	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -69,3 +69,3 @@
 
 # Default networking architecture
-NETWORKING = modular
+CONFIG_NETWORKING = modular
Index: defaults/ia64/Makefile.config
===================================================================
--- defaults/ia64/Makefile.config	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ defaults/ia64/Makefile.config	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -51,3 +51,3 @@
 
 # Default networking architecture
-NETWORKING = modular
+CONFIG_NETWORKING = modular
Index: defaults/mips32/Makefile.config
===================================================================
--- defaults/mips32/Makefile.config	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ defaults/mips32/Makefile.config	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -45,3 +45,3 @@
 
 # Default networking architecture
-NETWORKING = none 
+CONFIG_NETWORKING = none
Index: defaults/ppc32/Makefile.config
===================================================================
--- defaults/ppc32/Makefile.config	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ defaults/ppc32/Makefile.config	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -45,3 +45,3 @@
 
 # Default networking architecture
-NETWORKING = none 
+CONFIG_NETWORKING = none
Index: defaults/sparc64/Makefile.config
===================================================================
--- defaults/sparc64/Makefile.config	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ defaults/sparc64/Makefile.config	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -63,3 +63,3 @@
 
 # Default networking architecture
-NETWORKING = modular
+CONFIG_NETWORKING = modular
Index: defaults/sparc64/sun4v/Makefile.config
===================================================================
--- defaults/sparc64/sun4v/Makefile.config	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ defaults/sparc64/sun4v/Makefile.config	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -13,4 +13,3 @@
 CONFIG_FB = n
 
-NETWORKING = none
-
+CONFIG_NETWORKING = none
Index: defaults/special/abs32le/Makefile.config
===================================================================
--- defaults/special/abs32le/Makefile.config	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ defaults/special/abs32le/Makefile.config	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -6,3 +6,3 @@
 
 # Networking architecture
-NETWORKING = none
+CONFIG_NETWORKING = none
Index: kernel/Makefile
===================================================================
--- kernel/Makefile	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/Makefile	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -69,7 +69,4 @@
 SIZEOK_MAP = generic/src/debug/sizeok_map.o
 
-INCLUDES = generic/include
-OPTIMIZATION = 3
-
 .PHONY: all clean
 
@@ -84,7 +81,10 @@
 #
 
+INCLUDES = generic/include
+OPTIMIZATION = 3
+
 DEFS = -DKERNEL -DRELEASE=$(RELEASE) "-DNAME=$(NAME)" -D__$(BITS)_BITS__ -D__$(ENDIANESS)__
 
-GCC_CFLAGS = -I$(INCLUDES) -O$(OPTIMIZATION) -imacros ../config.h \
+GCC_CFLAGS = -I$(INCLUDES) -O$(OPTIMIZATION) -imacros $(CONFIG_HEADER) \
 	-fexec-charset=UTF-8 -fwide-exec-charset=UTF-32$(ENDIANESS) \
 	-finput-charset=UTF-8 -ffreestanding -fno-builtin -nostdlib -nostdinc \
@@ -93,5 +93,5 @@
 	-Werror -pipe
 
-ICC_CFLAGS = -I$(INCLUDES) -O$(OPTIMIZATION) -imacros ../config.h \
+ICC_CFLAGS = -I$(INCLUDES) -O$(OPTIMIZATION) -imacros $(CONFIG_HEADER) \
 	-ffreestanding -fno-builtin -nostdlib -nostdinc -Wall -Wmissing-prototypes \
 	-Werror-implicit-function-declaration -Werror -wd170
@@ -101,5 +101,5 @@
 	-erroff=E_ZERO_SIZED_STRUCT_UNION
 
-CLANG_CFLAGS = -I$(INCLUDES) -O$(OPTIMIZATION) -imacros ../config.h \
+CLANG_CFLAGS = -I$(INCLUDES) -O$(OPTIMIZATION) -imacros $(CONFIG_HEADER) \
 	-fexec-charset=UTF-8 -fwide-exec-charset=UTF-32$(ENDIANESS) \
 	-finput-charset=UTF-8 -ffreestanding -fno-builtin -nostdlib -nostdinc \
@@ -107,7 +107,4 @@
 	-Werror-implicit-function-declaration -Wwrite-strings \
 	-pipe -arch $(CLANG_ARCH)
-
-LFLAGS = -M
-AFLAGS =
 
 -include arch/$(KARCH)/Makefile.inc
@@ -204,5 +201,5 @@
 	generic/src/lib/memstr.c \
 	generic/src/lib/sort.c \
-	generic/src/lib/string.c \
+	generic/src/lib/str.c \
 	generic/src/lib/elf.c \
 	generic/src/lib/rd.c \
@@ -356,5 +353,5 @@
 
 $(RAW): $(LINK) $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) $(SYMTAB_OBJECTS)
-	$(LD) -T $(LINK) $(LFLAGS) $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) $(EXTRA_OBJECTS) $(SYMTAB_OBJECTS) -o $@ -Map $(MAP)
+	$(LD) $(LFLAGS) -T $(LINK) -M -Map $(MAP) -o $@  $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) $(EXTRA_OBJECTS) $(SYMTAB_OBJECTS)
 
 $(LINK): $(LINK).in $(DEPEND)
@@ -368,5 +365,5 @@
 
 %.o: %.s $(DEPEND)
-	$(AS) $(AFLAGS) $< -o $@
+	$(AS) $(AFLAGS) -o $@ $<
 ifeq ($(PRECHECK),y)
 	$(JOBFILE) $(JOB) $< $@ as asm $(DEFS) $(CFLAGS) $(EXTRA_FLAGS)
@@ -399,5 +396,5 @@
 $(REAL_MAP).bin: $(LINK) $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS)
 	echo $(SYMTAB_SECTION) | $(AS) $(AFLAGS) -o $(EMPTY_MAP)
-	$(LD) -T $(LINK) $(LFLAGS) $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) $(EXTRA_OBJECTS) $(EMPTY_MAP) -o $@ -Map $(MAP_PREV)
+	$(LD) $(LFLAGS) -T $(LINK) -M -Map $(MAP_PREV) -o $@  $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) $(EXTRA_OBJECTS) $(EMPTY_MAP)
 	$(OBJDUMP) -t $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) > $(DUMP)
 	$(GENMAP) $(MAP_PREV) $(DUMP) $@
@@ -407,5 +404,5 @@
 	
 	echo $(SYMTAB_SECTION)" .incbin \"$@\"" | $(AS) $(AFLAGS) -o $(SIZEOK_MAP)
-	$(LD) -T $(LINK) $(LFLAGS) $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) $(EXTRA_OBJECTS) $(SIZEOK_MAP) -o $@ -Map $(MAP_PREV)
+	$(LD) $(LFLAGS) -T $(LINK) -M -Map $(MAP_PREV) -o $@ $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) $(EXTRA_OBJECTS) $(SIZEOK_MAP)
 	$(OBJDUMP) -t $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) > $(DUMP)
 	$(GENMAP) $(MAP_PREV) $(DUMP) $@
Index: kernel/arch/abs32le/include/asm.h
===================================================================
--- kernel/arch/abs32le/include/asm.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/abs32le/include/asm.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,4 @@
 #define KERN_abs32le_ASM_H_
 
-#include <arch/types.h>
 #include <typedefs.h>
 #include <config.h>
Index: kernel/arch/abs32le/include/atomic.h
===================================================================
--- kernel/arch/abs32le/include/atomic.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/abs32le/include/atomic.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,5 @@
 #define KERN_abs32le_ATOMIC_H_
 
-#include <arch/types.h>
+#include <typedefs.h>
 #include <arch/barrier.h>
 #include <preemption.h>
Index: kernel/arch/abs32le/include/faddr.h
===================================================================
--- kernel/arch/abs32le/include/faddr.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/abs32le/include/faddr.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,5 @@
 #define KERN_abs32le_FADDR_H_
 
-#include <arch/types.h>
+#include <typedefs.h>
 
 #define FADDR(fptr)  ((uintptr_t) (fptr))
Index: kernel/arch/abs32le/include/fpu_context.h
===================================================================
--- kernel/arch/abs32le/include/fpu_context.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/abs32le/include/fpu_context.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,5 @@
 #define KERN_abs32le_FPU_CONTEXT_H_
 
-#include <arch/types.h>
+#include <typedefs.h>
 
 #define FPU_CONTEXT_ALIGN  16
Index: kernel/arch/abs32le/include/interrupt.h
===================================================================
--- kernel/arch/abs32le/include/interrupt.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/abs32le/include/interrupt.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,5 @@
 #define KERN_abs32le_INTERRUPT_H_
 
-#include <arch/types.h>
+#include <typedefs.h>
 
 #define IVT_ITEMS  0
Index: kernel/arch/abs32le/include/mm/asid.h
===================================================================
--- kernel/arch/abs32le/include/mm/asid.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/abs32le/include/mm/asid.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -34,5 +34,5 @@
 #define KERN_abs32le_ASID_H_
 
-#include <arch/types.h>
+#include <typedefs.h>
 
 typedef uint32_t asid_t;
Index: kernel/arch/abs32le/include/mm/frame.h
===================================================================
--- kernel/arch/abs32le/include/mm/frame.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/abs32le/include/mm/frame.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -41,5 +41,5 @@
 #ifdef KERNEL
 
-#include <arch/types.h>
+#include <typedefs.h>
 
 extern void frame_arch_init(void);
Index: kernel/arch/abs32le/include/mm/page.h
===================================================================
--- kernel/arch/abs32le/include/mm/page.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/abs32le/include/mm/page.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -119,5 +119,4 @@
 #include <mm/mm.h>
 #include <arch/interrupt.h>
-#include <arch/types.h>
 #include <typedefs.h>
 
Index: kernel/arch/abs32le/include/proc/task.h
===================================================================
--- kernel/arch/abs32le/include/proc/task.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/abs32le/include/proc/task.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,5 @@
 #define KERN_abs32le_TASK_H_
 
-#include <arch/types.h>
+#include <typedefs.h>
 #include <adt/bitmap.h>
 
Index: kernel/arch/abs32le/include/proc/thread.h
===================================================================
--- kernel/arch/abs32le/include/proc/thread.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/abs32le/include/proc/thread.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,5 @@
 #define KERN_abs32le_THREAD_H_
 
-#include <arch/types.h>
+#include <typedefs.h>
 
 typedef struct {
Index: kernel/arch/abs32le/include/types.h
===================================================================
--- kernel/arch/abs32le/include/types.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/abs32le/include/types.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -35,14 +35,4 @@
 #ifndef KERN_abs32le_TYPES_H_
 #define KERN_abs32le_TYPES_H_
-
-typedef signed char int8_t;
-typedef signed short int16_t;
-typedef signed long int32_t;
-typedef signed long long int64_t;
-
-typedef unsigned char uint8_t;
-typedef unsigned short uint16_t;
-typedef unsigned long uint32_t;
-typedef unsigned long long uint64_t;
 
 typedef uint32_t size_t;
Index: kernel/arch/abs32le/src/abs32le.c
===================================================================
--- kernel/arch/abs32le/src/abs32le.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/abs32le/src/abs32le.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -34,5 +34,5 @@
 
 #include <arch.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <arch/interrupt.h>
 #include <arch/asm.h>
Index: kernel/arch/abs32le/src/cpu/cpu.c
===================================================================
--- kernel/arch/abs32le/src/cpu/cpu.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/abs32le/src/cpu/cpu.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -35,5 +35,5 @@
 #include <arch/cpu.h>
 #include <arch.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <print.h>
 #include <fpu_context.h>
Index: kernel/arch/abs32le/src/ddi/ddi.c
===================================================================
--- kernel/arch/abs32le/src/ddi/ddi.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/abs32le/src/ddi/ddi.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,5 @@
 #include <ddi/ddi.h>
 #include <proc/task.h>
-#include <arch/types.h>
+#include <typedefs.h>
 
 /** Enable I/O space range for task.
Index: kernel/arch/abs32le/src/debug/stacktrace.c
===================================================================
--- kernel/arch/abs32le/src/debug/stacktrace.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/abs32le/src/debug/stacktrace.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -35,5 +35,4 @@
 #include <stacktrace.h>
 #include <syscall/copy.h>
-#include <arch/types.h>
 #include <typedefs.h>
 
Index: kernel/arch/abs32le/src/mm/page.c
===================================================================
--- kernel/arch/abs32le/src/mm/page.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/abs32le/src/mm/page.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -39,5 +39,5 @@
 #include <mm/page.h>
 #include <mm/as.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <align.h>
 #include <config.h>
Index: kernel/arch/abs32le/src/mm/tlb.c
===================================================================
--- kernel/arch/abs32le/src/mm/tlb.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/abs32le/src/mm/tlb.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -34,5 +34,5 @@
 #include <arch/mm/asid.h>
 #include <arch/asm.h>
-#include <arch/types.h>
+#include <typedefs.h>
 
 void tlb_invalidate_all(void)
Index: kernel/arch/abs32le/src/userspace.c
===================================================================
--- kernel/arch/abs32le/src/userspace.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/abs32le/src/userspace.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -34,5 +34,5 @@
 
 #include <userspace.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <arch.h>
 #include <proc/uarg.h>
Index: kernel/arch/amd64/include/asm.h
===================================================================
--- kernel/arch/amd64/include/asm.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/amd64/include/asm.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -37,5 +37,4 @@
 
 #include <config.h>
-#include <arch/types.h>
 #include <typedefs.h>
 
Index: kernel/arch/amd64/include/atomic.h
===================================================================
--- kernel/arch/amd64/include/atomic.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/amd64/include/atomic.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,5 @@
 #define KERN_amd64_ATOMIC_H_
 
-#include <arch/types.h>
+#include <typedefs.h>
 #include <arch/barrier.h>
 #include <preemption.h>
Index: kernel/arch/amd64/include/context.h
===================================================================
--- kernel/arch/amd64/include/context.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/amd64/include/context.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -38,5 +38,5 @@
 #ifdef KERNEL
 
-#include <arch/types.h>
+#include <typedefs.h>
 
 /* According to ABI the stack MUST be aligned on 
Index: kernel/arch/amd64/include/cpuid.h
===================================================================
--- kernel/arch/amd64/include/cpuid.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/amd64/include/cpuid.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -48,5 +48,5 @@
 #ifndef __ASM__
 
-#include <arch/types.h>
+#include <typedefs.h>
 
 typedef struct {
Index: kernel/arch/amd64/include/debugger.h
===================================================================
--- kernel/arch/amd64/include/debugger.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/amd64/include/debugger.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,5 @@
 #define KERN_amd64_DEBUGGER_H_
 
-#include <arch/types.h>
+#include <typedefs.h>
 
 #define BKPOINTS_MAX 4
Index: kernel/arch/amd64/include/faddr.h
===================================================================
--- kernel/arch/amd64/include/faddr.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/amd64/include/faddr.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,5 @@
 #define KERN_amd64_FADDR_H_
 
-#include <arch/types.h>
+#include <typedefs.h>
 
 #define FADDR(fptr)		((uintptr_t) (fptr))
Index: kernel/arch/amd64/include/interrupt.h
===================================================================
--- kernel/arch/amd64/include/interrupt.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/amd64/include/interrupt.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,5 @@
 #define KERN_amd64_INTERRUPT_H_
 
-#include <arch/types.h>
+#include <typedefs.h>
 #include <arch/pm.h>
 
Index: kernel/arch/amd64/include/mm/frame.h
===================================================================
--- kernel/arch/amd64/include/mm/frame.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/amd64/include/mm/frame.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -37,5 +37,5 @@
 
 #ifndef __ASM__
-#include <arch/types.h>
+#include <typedefs.h>
 #endif /* __ASM__ */
 
Index: kernel/arch/amd64/include/mm/page.h
===================================================================
--- kernel/arch/amd64/include/mm/page.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/amd64/include/mm/page.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -57,5 +57,5 @@
 #ifndef __ASM__
 #	include <mm/mm.h>
-#	include <arch/types.h>
+#	include <typedefs.h>
 #	include <arch/interrupt.h>
 
Index: kernel/arch/amd64/include/pm.h
===================================================================
--- kernel/arch/amd64/include/pm.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/amd64/include/pm.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -37,5 +37,5 @@
 
 #ifndef __ASM__
-	#include <arch/types.h>
+	#include <typedefs.h>
 	#include <arch/context.h>
 #endif
Index: kernel/arch/amd64/include/proc/task.h
===================================================================
--- kernel/arch/amd64/include/proc/task.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/amd64/include/proc/task.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,5 @@
 #define KERN_amd64_TASK_H_
 
-#include <arch/types.h>
+#include <typedefs.h>
 #include <adt/bitmap.h>
 
Index: kernel/arch/amd64/include/types.h
===================================================================
--- kernel/arch/amd64/include/types.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/amd64/include/types.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,14 +36,4 @@
 #define KERN_amd64_TYPES_H_
 
-typedef signed char int8_t;
-typedef signed short int16_t;
-typedef signed int int32_t;
-typedef signed long long int64_t;
-
-typedef unsigned char uint8_t;
-typedef unsigned short uint16_t;
-typedef unsigned int uint32_t;
-typedef unsigned long long uint64_t;
-
 typedef uint64_t size_t;
 
@@ -61,25 +51,25 @@
 
 /**< Formats for uintptr_t, size_t */
-#define PRIp "llx"
-#define PRIs "llu"
+#define PRIp  "llx"
+#define PRIs  "llu"
 
 /**< Formats for (u)int8_t, (u)int16_t, (u)int32_t, (u)int64_t and (u)native_t */
-#define PRId8 "d"
-#define PRId16 "d"
-#define PRId32 "d"
-#define PRId64 "lld"
-#define PRIdn "lld"
+#define PRId8   "d"
+#define PRId16  "d"
+#define PRId32  "d"
+#define PRId64  "lld"
+#define PRIdn   "lld"
 
-#define PRIu8 "u"
-#define PRIu16 "u"
-#define PRIu32 "u"
-#define PRIu64 "llu"
-#define PRIun "llu"
+#define PRIu8   "u"
+#define PRIu16  "u"
+#define PRIu32  "u"
+#define PRIu64  "llu"
+#define PRIun   "llu"
 
-#define PRIx8 "x"
-#define PRIx16 "x"
-#define PRIx32 "x"
-#define PRIx64 "llx"
-#define PRIxn "llx"
+#define PRIx8   "x"
+#define PRIx16  "x"
+#define PRIx32  "x"
+#define PRIx64  "llx"
+#define PRIxn   "llx"
 
 #endif
Index: kernel/arch/amd64/src/amd64.c
===================================================================
--- kernel/arch/amd64/src/amd64.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/amd64/src/amd64.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -35,5 +35,5 @@
 #include <arch.h>
 
-#include <arch/types.h>
+#include <typedefs.h>
 
 #include <config.h>
Index: kernel/arch/amd64/src/cpu/cpu.c
===================================================================
--- kernel/arch/amd64/src/cpu/cpu.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/amd64/src/cpu/cpu.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -39,5 +39,5 @@
 
 #include <arch.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <print.h>
 #include <fpu_context.h>
Index: kernel/arch/amd64/src/ddi/ddi.c
===================================================================
--- kernel/arch/amd64/src/ddi/ddi.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/amd64/src/ddi/ddi.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,5 @@
 #include <arch/ddi/ddi.h>
 #include <proc/task.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <adt/bitmap.h>
 #include <mm/slab.h>
Index: kernel/arch/amd64/src/debug/stacktrace.c
===================================================================
--- kernel/arch/amd64/src/debug/stacktrace.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/amd64/src/debug/stacktrace.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -35,5 +35,4 @@
 #include <stacktrace.h>
 #include <syscall/copy.h>
-#include <arch/types.h>
 #include <typedefs.h>
 
Index: kernel/arch/amd64/src/proc/task.c
===================================================================
--- kernel/arch/amd64/src/proc/task.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/amd64/src/proc/task.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -35,5 +35,5 @@
 #include <proc/task.h>
 #include <mm/slab.h>
-#include <arch/types.h>
+#include <typedefs.h>
 
 /** Perform amd64 specific task initialization.
Index: kernel/arch/amd64/src/userspace.c
===================================================================
--- kernel/arch/amd64/src/userspace.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/amd64/src/userspace.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,5 @@
 #include <arch/cpu.h>
 #include <arch/pm.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <arch.h>
 #include <proc/uarg.h>
Index: kernel/arch/arm32/include/asm.h
===================================================================
--- kernel/arch/arm32/include/asm.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/arm32/include/asm.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -38,5 +38,4 @@
 
 #include <typedefs.h>
-#include <arch/types.h>
 #include <arch/stack.h>
 #include <config.h>
Index: kernel/arch/arm32/include/context.h
===================================================================
--- kernel/arch/arm32/include/context.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/arm32/include/context.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -52,5 +52,5 @@
 #ifndef __ASM__
 
-#include <arch/types.h>
+#include <typedefs.h>
 
 /** Thread context containing registers that must be preserved across function
Index: kernel/arch/arm32/include/cpu.h
===================================================================
--- kernel/arch/arm32/include/cpu.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/arm32/include/cpu.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -37,5 +37,5 @@
 #define KERN_arm32_CPU_H_
 
-#include <arch/types.h>
+#include <typedefs.h>
 #include <arch/asm.h>
 
Index: kernel/arch/arm32/include/exception.h
===================================================================
--- kernel/arch/arm32/include/exception.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/arm32/include/exception.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -38,5 +38,5 @@
 #define KERN_arm32_EXCEPTION_H_
 
-#include <arch/types.h>
+#include <typedefs.h>
 #include <arch/regutils.h>
 
Index: kernel/arch/arm32/include/faddr.h
===================================================================
--- kernel/arch/arm32/include/faddr.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/arm32/include/faddr.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -37,5 +37,5 @@
 #define KERN_arm32_FADDR_H_
 
-#include <arch/types.h>
+#include <typedefs.h>
 
 /** Calculate absolute address of function referenced by fptr pointer.
Index: kernel/arch/arm32/include/fpu_context.h
===================================================================
--- kernel/arch/arm32/include/fpu_context.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/arm32/include/fpu_context.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -39,5 +39,5 @@
 #define KERN_arm32_FPU_CONTEXT_H_
 
-#include <arch/types.h>
+#include <typedefs.h>
 
 #define FPU_CONTEXT_ALIGN    0
Index: kernel/arch/arm32/include/interrupt.h
===================================================================
--- kernel/arch/arm32/include/interrupt.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/arm32/include/interrupt.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -37,5 +37,5 @@
 #define KERN_arm32_INTERRUPT_H_
 
-#include <arch/types.h>
+#include <typedefs.h>
 #include <arch/exception.h>
 
Index: kernel/arch/arm32/include/machine_func.h
===================================================================
--- kernel/arch/arm32/include/machine_func.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/arm32/include/machine_func.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -43,5 +43,5 @@
 
 #include <console/console.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <arch/exception.h>
 
Index: kernel/arch/arm32/include/mm/asid.h
===================================================================
--- kernel/arch/arm32/include/mm/asid.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/arm32/include/mm/asid.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -39,5 +39,5 @@
 #define KERN_arm32_ASID_H_
 
-#include <arch/types.h>
+#include <typedefs.h>
 
 #define ASID_MAX_ARCH		3	/* minimal required number */
Index: kernel/arch/arm32/include/mm/frame.h
===================================================================
--- kernel/arch/arm32/include/mm/frame.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/arm32/include/mm/frame.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -43,5 +43,5 @@
 #ifndef __ASM__
 
-#include <arch/types.h>
+#include <typedefs.h>
 
 #define BOOT_PAGE_TABLE_SIZE     0x4000
Index: kernel/arch/arm32/include/mm/page_fault.h
===================================================================
--- kernel/arch/arm32/include/mm/page_fault.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/arm32/include/mm/page_fault.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -37,5 +37,5 @@
 #define KERN_arm32_PAGE_FAULT_H_
 
-#include <arch/types.h>
+#include <typedefs.h>
 
 
Index: kernel/arch/arm32/include/ras.h
===================================================================
--- kernel/arch/arm32/include/ras.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/arm32/include/ras.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -38,5 +38,5 @@
 
 #include <arch/exception.h>
-#include <arch/types.h>
+#include <typedefs.h>
 
 #define RAS_START	0
Index: kernel/arch/arm32/include/types.h
===================================================================
--- kernel/arch/arm32/include/types.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/arm32/include/types.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -43,14 +43,4 @@
 #endif
 
-typedef signed char int8_t;
-typedef signed short int16_t;
-typedef signed long int32_t;
-typedef signed long long int64_t;
-
-typedef unsigned char uint8_t;
-typedef unsigned short uint16_t;
-typedef unsigned long uint32_t;
-typedef unsigned long long uint64_t;
-
 typedef uint32_t size_t;
 
@@ -67,24 +57,24 @@
 } fncptr_t;
 
-#define PRIp "x"	/**< Format for uintptr_t. */
-#define PRIs "u"	/**< Format for size_t. */
+#define PRIp "x"  /**< Format for uintptr_t. */
+#define PRIs "u"  /**< Format for size_t. */
 
-#define PRId8 "d"	/**< Format for int8_t. */
-#define PRId16 "d"	/**< Format for int16_t. */
-#define PRId32 "d"	/**< Format for int32_t. */
-#define PRId64 "lld"	/**< Format for int64_t. */
-#define PRIdn "d"	/**< Format for native_t. */
+#define PRId8 "d"     /**< Format for int8_t. */
+#define PRId16 "d"    /**< Format for int16_t. */
+#define PRId32 "d"    /**< Format for int32_t. */
+#define PRId64 "lld"  /**< Format for int64_t. */
+#define PRIdn "d"     /**< Format for native_t. */
 
-#define PRIu8 "u"	/**< Format for uint8_t. */
-#define PRIu16 "u"	/**< Format for uint16_t. */
-#define PRIu32 "u"	/**< Format for uint32_t. */
-#define PRIu64 "llu"	/**< Format for uint64_t. */
-#define PRIun "u"	/**< Format for unative_t. */
+#define PRIu8 "u"     /**< Format for uint8_t. */
+#define PRIu16 "u"    /**< Format for uint16_t. */
+#define PRIu32 "u"    /**< Format for uint32_t. */
+#define PRIu64 "llu"  /**< Format for uint64_t. */
+#define PRIun "u"     /**< Format for unative_t. */
 
-#define PRIx8 "x"	/**< Format for hexadecimal (u)int8_t. */
-#define PRIx16 "x"	/**< Format for hexadecimal (u)int16_t. */
-#define PRIx32 "x"	/**< Format for hexadecimal (u)uint32_t. */
-#define PRIx64 "llx"	/**< Format for hexadecimal (u)int64_t. */
-#define PRIxn "x"	/**< Format for hexadecimal (u)native_t. */
+#define PRIx8 "x"     /**< Format for hexadecimal (u)int8_t. */
+#define PRIx16 "x"    /**< Format for hexadecimal (u)int16_t. */
+#define PRIx32 "x"    /**< Format for hexadecimal (u)uint32_t. */
+#define PRIx64 "llx"  /**< Format for hexadecimal (u)int64_t. */
+#define PRIxn "x"     /**< Format for hexadecimal (u)native_t. */
 
 #endif
Index: kernel/arch/arm32/src/arm32.c
===================================================================
--- kernel/arch/arm32/src/arm32.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/arm32/src/arm32.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -47,5 +47,5 @@
 #include <userspace.h>
 #include <macros.h>
-#include <string.h>
+#include <str.h>
 #include <arch/ras.h>
 
Index: kernel/arch/arm32/src/ddi/ddi.c
===================================================================
--- kernel/arch/arm32/src/ddi/ddi.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/arm32/src/ddi/ddi.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,5 @@
 #include <ddi/ddi.h>
 #include <proc/task.h>
-#include <arch/types.h>
+#include <typedefs.h>
 
 /** Enable I/O space range for task.
Index: kernel/arch/arm32/src/debug/stacktrace.c
===================================================================
--- kernel/arch/arm32/src/debug/stacktrace.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/arm32/src/debug/stacktrace.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -35,5 +35,4 @@
 #include <stacktrace.h>
 #include <syscall/copy.h>
-#include <arch/types.h>
 #include <typedefs.h>
 
Index: kernel/arch/arm32/src/mm/page.c
===================================================================
--- kernel/arch/arm32/src/mm/page.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/arm32/src/mm/page.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -41,5 +41,4 @@
 #include <arch/exception.h>
 #include <typedefs.h>
-#include <arch/types.h>
 #include <interrupt.h>
 #include <arch/mm/frame.h>
Index: kernel/arch/arm32/src/mm/tlb.c
===================================================================
--- kernel/arch/arm32/src/mm/tlb.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/arm32/src/mm/tlb.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -37,5 +37,5 @@
 #include <arch/mm/asid.h>
 #include <arch/asm.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <arch/mm/page.h>
 
Index: kernel/arch/arm32/src/ras.c
===================================================================
--- kernel/arch/arm32/src/ras.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/arm32/src/ras.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -44,5 +44,5 @@
 #include <arch.h>
 #include <memstr.h>
-#include <arch/types.h>
+#include <typedefs.h>
 
 uintptr_t *ras_page = NULL;
Index: kernel/arch/ia32/include/asm.h
===================================================================
--- kernel/arch/ia32/include/asm.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/ia32/include/asm.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -38,5 +38,4 @@
 
 #include <arch/pm.h>
-#include <arch/types.h>
 #include <typedefs.h>
 #include <config.h>
Index: kernel/arch/ia32/include/atomic.h
===================================================================
--- kernel/arch/ia32/include/atomic.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/ia32/include/atomic.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,5 @@
 #define KERN_ia32_ATOMIC_H_
 
-#include <arch/types.h>
+#include <typedefs.h>
 #include <arch/barrier.h>
 #include <preemption.h>
Index: kernel/arch/ia32/include/bios/bios.h
===================================================================
--- kernel/arch/ia32/include/bios/bios.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/ia32/include/bios/bios.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,5 @@
 #define KERN_ia32_BIOS_H_
 
-#include <arch/types.h>
+#include <typedefs.h>
 
 #define BIOS_EBDA_PTR	0x40e
Index: kernel/arch/ia32/include/boot/memmap.h
===================================================================
--- kernel/arch/ia32/include/boot/memmap.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/ia32/include/boot/memmap.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -61,5 +61,5 @@
 #ifndef __ASM__
 
-#include <arch/types.h>
+#include <typedefs.h>
 
 typedef struct {
Index: kernel/arch/ia32/include/context.h
===================================================================
--- kernel/arch/ia32/include/context.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/ia32/include/context.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -37,5 +37,6 @@
 
 #ifdef KERNEL
-#include <arch/types.h>
+
+#include <typedefs.h>
 
 #define STACK_ITEM_SIZE	4
Index: kernel/arch/ia32/include/cpuid.h
===================================================================
--- kernel/arch/ia32/include/cpuid.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/ia32/include/cpuid.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -43,5 +43,5 @@
 #ifndef __ASM__
 
-#include <arch/types.h>
+#include <typedefs.h>
 
 typedef struct {
Index: kernel/arch/ia32/include/drivers/i8254.h
===================================================================
--- kernel/arch/ia32/include/drivers/i8254.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/ia32/include/drivers/i8254.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,6 +36,4 @@
 #define KERN_ia32_I8254_H_
 
-#include <arch/types.h>
-
 extern void i8254_init(void);
 extern void i8254_calibrate_delay_loop(void);
Index: kernel/arch/ia32/include/drivers/i8259.h
===================================================================
--- kernel/arch/ia32/include/drivers/i8259.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/ia32/include/drivers/i8259.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,5 @@
 #define KERN_ia32_I8259_H_
 
-#include <arch/types.h>
+#include <typedefs.h>
 #include <arch/interrupt.h>
 
Index: kernel/arch/ia32/include/drivers/vesa.h
===================================================================
--- kernel/arch/ia32/include/drivers/vesa.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/ia32/include/drivers/vesa.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,5 @@
 #define KERN_ia32_VESA_H_
 
-#include <arch/types.h>
+#include <typedefs.h>
 
 extern bool vesa_init(void);
Index: kernel/arch/ia32/include/faddr.h
===================================================================
--- kernel/arch/ia32/include/faddr.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/ia32/include/faddr.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup ia32	
+/** @addtogroup ia32
  * @{
  */
@@ -36,7 +36,7 @@
 #define KERN_ia32_FADDR_H_
 
-#include <arch/types.h>
+#include <typedefs.h>
 
-#define FADDR(fptr)		((uintptr_t) (fptr))
+#define FADDR(fptr)  ((uintptr_t) (fptr))
 
 #endif
Index: kernel/arch/ia32/include/fpu_context.h
===================================================================
--- kernel/arch/ia32/include/fpu_context.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/ia32/include/fpu_context.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,5 @@
 #define KERN_ia32_FPU_CONTEXT_H_
 
-#include <arch/types.h>
+#include <typedefs.h>
 
 #define FPU_CONTEXT_ALIGN 16
Index: kernel/arch/ia32/include/interrupt.h
===================================================================
--- kernel/arch/ia32/include/interrupt.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/ia32/include/interrupt.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,5 @@
 #define KERN_ia32_INTERRUPT_H_
 
-#include <arch/types.h>
+#include <typedefs.h>
 #include <arch/pm.h>
 
Index: kernel/arch/ia32/include/mm/asid.h
===================================================================
--- kernel/arch/ia32/include/mm/asid.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/ia32/include/mm/asid.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -43,5 +43,5 @@
 #define KERN_ia32_ASID_H_
 
-#include <arch/types.h>
+#include <typedefs.h>
 
 typedef int32_t asid_t;
Index: kernel/arch/ia32/include/mm/frame.h
===================================================================
--- kernel/arch/ia32/include/mm/frame.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/ia32/include/mm/frame.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -42,5 +42,5 @@
 #ifndef __ASM__
 
-#include <arch/types.h>
+#include <typedefs.h>
 
 extern uintptr_t last_frame;
Index: kernel/arch/ia32/include/mm/page.h
===================================================================
--- kernel/arch/ia32/include/mm/page.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/ia32/include/mm/page.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -127,5 +127,4 @@
 #include <mm/mm.h>
 #include <arch/interrupt.h>
-#include <arch/types.h>
 #include <typedefs.h>
 
Index: kernel/arch/ia32/include/pm.h
===================================================================
--- kernel/arch/ia32/include/pm.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/ia32/include/pm.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -80,5 +80,5 @@
 #ifndef __ASM__
 
-#include <arch/types.h>
+#include <typedefs.h>
 #include <arch/context.h>
 
Index: kernel/arch/ia32/include/proc/task.h
===================================================================
--- kernel/arch/ia32/include/proc/task.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/ia32/include/proc/task.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,5 @@
 #define KERN_ia32_TASK_H_
 
-#include <arch/types.h>
+#include <typedefs.h>
 #include <adt/bitmap.h>
 
Index: kernel/arch/ia32/include/proc/thread.h
===================================================================
--- kernel/arch/ia32/include/proc/thread.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/ia32/include/proc/thread.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,5 @@
 #define KERN_ia32_THREAD_H_
 
-#include <arch/types.h>
+#include <typedefs.h>
 
 typedef struct {
@@ -42,6 +42,6 @@
 } thread_arch_t;
 
-#define thr_constructor_arch(t)
-#define thr_destructor_arch(t)
+#define thr_constructor_arch(thr)
+#define thr_destructor_arch(thr)
 
 #endif
Index: kernel/arch/ia32/include/smp/apic.h
===================================================================
--- kernel/arch/ia32/include/smp/apic.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/ia32/include/smp/apic.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,5 @@
 #define KERN_ia32_APIC_H_
 
-#include <arch/types.h>
+#include <typedefs.h>
 #include <cpu.h>
 
Index: kernel/arch/ia32/include/smp/mps.h
===================================================================
--- kernel/arch/ia32/include/smp/mps.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/ia32/include/smp/mps.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,5 @@
 #define KERN_ia32_MPS_H_
 
-#include <arch/types.h>
+#include <typedefs.h>
 #include <synch/waitq.h>
 #include <config.h>
Index: kernel/arch/ia32/include/smp/smp.h
===================================================================
--- kernel/arch/ia32/include/smp/smp.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/ia32/include/smp/smp.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,5 @@
 #define KERN_ia32_SMP_H_
 
-#include <arch/types.h>
+#include <typedefs.h>
 
 /** SMP config opertaions interface. */
Index: kernel/arch/ia32/include/types.h
===================================================================
--- kernel/arch/ia32/include/types.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/ia32/include/types.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,6 +36,4 @@
 #define KERN_ia32_TYPES_H_
 
-#include <arch/common.h>
-
 typedef uint32_t size_t;
 
@@ -52,24 +50,24 @@
 } fncptr_t;
 
-#define PRIp "x"	/**< Format for uintptr_t. */
-#define PRIs "u"	/**< Format for size_t. */
+#define PRIp "x"  /**< Format for uintptr_t. */
+#define PRIs "u"  /**< Format for size_t. */
 
-#define PRId8 "d"	/**< Format for int8_t. */
-#define PRId16 "d"	/**< Format for int16_t. */
-#define PRId32 "d"	/**< Format for int32_t. */
-#define PRId64 "lld"	/**< Format for int64_t. */
-#define PRIdn "d"	/**< Format for native_t. */
+#define PRId8 "d"     /**< Format for int8_t. */
+#define PRId16 "d"    /**< Format for int16_t. */
+#define PRId32 "d"    /**< Format for int32_t. */
+#define PRId64 "lld"  /**< Format for int64_t. */
+#define PRIdn "d"     /**< Format for native_t. */
 
-#define PRIu8 "u"	/**< Format for uint8_t. */
-#define PRIu16 "u"	/**< Format for uint16_t. */
-#define PRIu32 "u"	/**< Format for uint32_t. */
-#define PRIu64 "llu"	/**< Format for uint64_t. */
-#define PRIun "u"	/**< Format for unative_t. */
+#define PRIu8 "u"     /**< Format for uint8_t. */
+#define PRIu16 "u"    /**< Format for uint16_t. */
+#define PRIu32 "u"    /**< Format for uint32_t. */
+#define PRIu64 "llu"  /**< Format for uint64_t. */
+#define PRIun "u"     /**< Format for unative_t. */
 
-#define PRIx8 "x"	/**< Format for hexadecimal (u)int8_t. */
-#define PRIx16 "x"	/**< Format for hexadecimal (u)int16_t. */
-#define PRIx32 "x"	/**< Format for hexadecimal (u)uint32_t. */
-#define PRIx64 "llx"	/**< Format for hexadecimal (u)int64_t. */
-#define PRIxn "x"	/**< Format for hexadecimal (u)native_t. */
+#define PRIx8 "x"     /**< Format for hexadecimal (u)int8_t. */
+#define PRIx16 "x"    /**< Format for hexadecimal (u)int16_t. */
+#define PRIx32 "x"    /**< Format for hexadecimal (u)uint32_t. */
+#define PRIx64 "llx"  /**< Format for hexadecimal (u)int64_t. */
+#define PRIxn "x"     /**< Format for hexadecimal (u)native_t. */
 
 #endif
Index: kernel/arch/ia32/src/bios/bios.c
===================================================================
--- kernel/arch/ia32/src/bios/bios.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/ia32/src/bios/bios.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -34,5 +34,5 @@
 
 #include <arch/bios/bios.h>
-#include <arch/types.h>
+#include <typedefs.h>
 
 uintptr_t ebda = 0;
Index: kernel/arch/ia32/src/cpu/cpu.c
===================================================================
--- kernel/arch/ia32/src/cpu/cpu.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/ia32/src/cpu/cpu.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -38,5 +38,5 @@
 
 #include <arch.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <print.h>
 #include <fpu_context.h>
Index: kernel/arch/ia32/src/ddi/ddi.c
===================================================================
--- kernel/arch/ia32/src/ddi/ddi.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/ia32/src/ddi/ddi.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,5 @@
 #include <arch/ddi/ddi.h>
 #include <proc/task.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <adt/bitmap.h>
 #include <mm/slab.h>
Index: kernel/arch/ia32/src/debug/stacktrace.c
===================================================================
--- kernel/arch/ia32/src/debug/stacktrace.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/ia32/src/debug/stacktrace.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -35,5 +35,4 @@
 #include <stacktrace.h>
 #include <syscall/copy.h>
-#include <arch/types.h>
 #include <typedefs.h>
 
Index: kernel/arch/ia32/src/drivers/i8254.c
===================================================================
--- kernel/arch/ia32/src/drivers/i8254.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/ia32/src/drivers/i8254.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -37,5 +37,5 @@
  */
 
-#include <arch/types.h>
+#include <typedefs.h>
 #include <time/clock.h>
 #include <time/delay.h>
Index: kernel/arch/ia32/src/drivers/i8259.c
===================================================================
--- kernel/arch/ia32/src/drivers/i8259.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/ia32/src/drivers/i8259.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -39,5 +39,5 @@
 #include <arch/drivers/i8259.h>
 #include <cpu.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <arch/asm.h>
 #include <arch.h>
Index: kernel/arch/ia32/src/drivers/vesa.c
===================================================================
--- kernel/arch/ia32/src/drivers/vesa.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/ia32/src/drivers/vesa.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -49,5 +49,5 @@
 #include <synch/spinlock.h>
 #include <arch/asm.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <memstr.h>
 #include <bitops.h>
Index: kernel/arch/ia32/src/ia32.c
===================================================================
--- kernel/arch/ia32/src/ia32.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/ia32/src/ia32.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -37,5 +37,5 @@
 #include <arch.h>
 
-#include <arch/types.h>
+#include <typedefs.h>
 
 #include <arch/pm.h>
Index: kernel/arch/ia32/src/mm/page.c
===================================================================
--- kernel/arch/ia32/src/mm/page.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/ia32/src/mm/page.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -39,5 +39,5 @@
 #include <mm/page.h>
 #include <mm/as.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <align.h>
 #include <config.h>
Index: kernel/arch/ia32/src/mm/tlb.c
===================================================================
--- kernel/arch/ia32/src/mm/tlb.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/ia32/src/mm/tlb.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -37,5 +37,5 @@
 #include <arch/mm/asid.h>
 #include <arch/asm.h>
-#include <arch/types.h>
+#include <typedefs.h>
 
 /** Invalidate all entries in TLB. */
Index: kernel/arch/ia32/src/pm.c
===================================================================
--- kernel/arch/ia32/src/pm.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/ia32/src/pm.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -35,5 +35,5 @@
 #include <arch/pm.h>
 #include <config.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <arch/interrupt.h>
 #include <arch/asm.h>
Index: kernel/arch/ia32/src/proc/task.c
===================================================================
--- kernel/arch/ia32/src/proc/task.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/ia32/src/proc/task.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -34,5 +34,5 @@
 
 #include <proc/task.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <adt/bitmap.h>
 #include <mm/slab.h>
Index: kernel/arch/ia32/src/smp/apic.c
===================================================================
--- kernel/arch/ia32/src/smp/apic.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/ia32/src/smp/apic.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -33,5 +33,5 @@
  */
 
-#include <arch/types.h>
+#include <typedefs.h>
 #include <arch/smp/apic.h>
 #include <arch/smp/ap.h>
Index: kernel/arch/ia32/src/smp/mps.c
===================================================================
--- kernel/arch/ia32/src/smp/mps.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/ia32/src/smp/mps.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -42,5 +42,5 @@
 #include <arch/smp/smp.h>
 #include <func.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <cpu.h>
 #include <arch/asm.h>
Index: kernel/arch/ia32/src/syscall.c
===================================================================
--- kernel/arch/ia32/src/syscall.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/ia32/src/syscall.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup ia32	
+/** @addtogroup ia32
  * @{
  */
@@ -36,5 +36,5 @@
 #include <arch/cpu.h>
 #include <arch/asm.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <arch/pm.h>
 
Index: kernel/arch/ia32/src/userspace.c
===================================================================
--- kernel/arch/ia32/src/userspace.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/ia32/src/userspace.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -35,5 +35,5 @@
 #include <userspace.h>
 #include <arch/pm.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <arch.h>
 #include <proc/uarg.h>
Index: kernel/arch/ia64/Makefile.inc
===================================================================
--- kernel/arch/ia64/Makefile.inc	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/ia64/Makefile.inc	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -34,6 +34,6 @@
 ICC_CFLAGS += $(CMN1)
 
-LFLAGS += -EL
-AFLAGS += -mconstant-gp
+LFLAGS = -EL
+AFLAGS = -mconstant-gp
 
 BITS = 64
Index: kernel/arch/ia64/include/asm.h
===================================================================
--- kernel/arch/ia64/include/asm.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/ia64/include/asm.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -38,5 +38,5 @@
 #include <config.h>
 #include <typedefs.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <arch/register.h>
 
Index: kernel/arch/ia64/include/bootinfo.h
===================================================================
--- kernel/arch/ia64/include/bootinfo.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/ia64/include/bootinfo.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -67,5 +67,5 @@
 	unsigned int memmap_items;
 
-	unsigned long * sapic;
+	unative_t *sapic;
 	unsigned long sys_freq;
 	unsigned long freq_scale;
Index: kernel/arch/ia64/include/context.h
===================================================================
--- kernel/arch/ia64/include/context.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/ia64/include/context.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,5 @@
 #define KERN_ia64_CONTEXT_H_
 
-#include <arch/types.h>
+#include <typedefs.h>
 #include <arch/register.h>
 #include <align.h>
Index: kernel/arch/ia64/include/cpu.h
===================================================================
--- kernel/arch/ia64/include/cpu.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/ia64/include/cpu.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,5 @@
 #define KERN_ia64_CPU_H_
 
-#include <arch/types.h>
+#include <typedefs.h>
 #include <arch/register.h>
 #include <arch/asm.h>
Index: kernel/arch/ia64/include/faddr.h
===================================================================
--- kernel/arch/ia64/include/faddr.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/ia64/include/faddr.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,5 @@
 #define KERN_ia64_FADDR_H_
 
-#include <arch/types.h>
+#include <typedefs.h>
 
 /**
Index: kernel/arch/ia64/include/fpu_context.h
===================================================================
--- kernel/arch/ia64/include/fpu_context.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/ia64/include/fpu_context.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -38,5 +38,5 @@
 #define FPU_CONTEXT_ALIGN 16
 
-#include <arch/types.h>
+#include <typedefs.h>
 
 #define FRS 96
Index: kernel/arch/ia64/include/interrupt.h
===================================================================
--- kernel/arch/ia64/include/interrupt.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/ia64/include/interrupt.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,5 @@
 #define KERN_ia64_INTERRUPT_H_
 
-#include <arch/types.h>
+#include <typedefs.h>
 #include <arch/register.h>
 
Index: kernel/arch/ia64/include/mm/asid.h
===================================================================
--- kernel/arch/ia64/include/mm/asid.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/ia64/include/mm/asid.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -38,5 +38,5 @@
 #ifndef __ASM__
 
-#include <arch/types.h>
+#include <typedefs.h>
 
 typedef uint16_t asid_t;
Index: kernel/arch/ia64/include/mm/frame.h
===================================================================
--- kernel/arch/ia64/include/mm/frame.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/ia64/include/mm/frame.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -42,5 +42,5 @@
 #ifndef __ASM__
 
-#include <arch/types.h>
+#include <typedefs.h>
 
 extern uintptr_t last_frame;
Index: kernel/arch/ia64/include/mm/page.h
===================================================================
--- kernel/arch/ia64/include/mm/page.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/ia64/include/mm/page.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -108,5 +108,5 @@
 #include <arch/barrier.h>
 #include <arch/mm/asid.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <debug.h>
 
Index: kernel/arch/ia64/include/mm/tlb.h
===================================================================
--- kernel/arch/ia64/include/mm/tlb.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/ia64/include/mm/tlb.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -39,5 +39,5 @@
 #include <arch/mm/asid.h>
 #include <arch/interrupt.h>
-#include <arch/types.h>
+#include <typedefs.h>
 
 /** Data and instruction Translation Register indices. */
Index: kernel/arch/ia64/include/register.h
===================================================================
--- kernel/arch/ia64/include/register.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/ia64/include/register.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -142,5 +142,5 @@
 #ifndef __ASM__
 
-#include <arch/types.h>
+#include <typedefs.h>
 
 /** Processor Status Register. */
Index: kernel/arch/ia64/include/types.h
===================================================================
--- kernel/arch/ia64/include/types.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/ia64/include/types.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,22 +36,4 @@
 #define KERN_ia64_TYPES_H_
 
-typedef signed char int8_t;
-typedef signed short int16_t;
-typedef signed int int32_t;
-typedef signed long int64_t;
-typedef struct {
-	int64_t lo;
-	int64_t hi;
-} int128_t;
-
-typedef unsigned char uint8_t;
-typedef unsigned short uint16_t;
-typedef unsigned int uint32_t;
-typedef unsigned long uint64_t;
-typedef struct {
-	uint64_t lo;
-	uint64_t hi;
-} uint128_t;
-
 typedef uint64_t size_t;
 
@@ -70,24 +52,24 @@
 } __attribute__((may_alias)) fncptr_t;
 
-#define PRIp "lx"	/**< Format for uintptr_t. */
-#define PRIs "lu"	/**< Format for size_t. */
+#define PRIp "lx"  /**< Format for uintptr_t. */
+#define PRIs "lu"  /**< Format for size_t. */
 
-#define PRId8 "d"	/**< Format for int8_t. */
-#define PRId16 "d"	/**< Format for int16_t. */
-#define PRId32 "d"	/**< Format for int32_t. */
-#define PRId64 "ld"	/**< Format for int64_t. */
-#define PRIdn "d"	/**< Format for native_t. */
+#define PRId8 "d"    /**< Format for int8_t. */
+#define PRId16 "d"   /**< Format for int16_t. */
+#define PRId32 "d"   /**< Format for int32_t. */
+#define PRId64 "ld"  /**< Format for int64_t. */
+#define PRIdn "d"    /**< Format for native_t. */
 
-#define PRIu8 "u"	/**< Format for uint8_t. */
-#define PRIu16 "u"	/**< Format for uint16_t. */
-#define PRIu32 "u"	/**< Format for uint32_t. */
-#define PRIu64 "lu"	/**< Format for uint64_t. */
-#define PRIun "u"	/**< Format for unative_t. */
+#define PRIu8 "u"    /**< Format for uint8_t. */
+#define PRIu16 "u"   /**< Format for uint16_t. */
+#define PRIu32 "u"   /**< Format for uint32_t. */
+#define PRIu64 "lu"  /**< Format for uint64_t. */
+#define PRIun "u"    /**< Format for unative_t. */
 
-#define PRIx8 "x"	/**< Format for hexadecimal (u)int8_t. */
-#define PRIx16 "x"	/**< Format for hexadecimal (u)int16_t. */
-#define PRIx32 "x"	/**< Format for hexadecimal (u)uint32_t. */
-#define PRIx64 "lx"	/**< Format for hexadecimal (u)int64_t. */
-#define PRIxn "x"	/**< Format for hexadecimal (u)native_t. */
+#define PRIx8 "x"    /**< Format for hexadecimal (u)int8_t. */
+#define PRIx16 "x"   /**< Format for hexadecimal (u)int16_t. */
+#define PRIx32 "x"   /**< Format for hexadecimal (u)uint32_t. */
+#define PRIx64 "lx"  /**< Format for hexadecimal (u)int64_t. */
+#define PRIxn "x"    /**< Format for hexadecimal (u)native_t. */
 
 #endif
Index: kernel/arch/ia64/src/ddi/ddi.c
===================================================================
--- kernel/arch/ia64/src/ddi/ddi.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/ia64/src/ddi/ddi.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,5 @@
 #include <ddi/ddi.h>
 #include <proc/task.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <mm/slab.h>
 #include <errno.h>
Index: kernel/arch/ia64/src/debug/stacktrace.c
===================================================================
--- kernel/arch/ia64/src/debug/stacktrace.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/ia64/src/debug/stacktrace.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -35,5 +35,4 @@
 #include <stacktrace.h>
 #include <syscall/copy.h>
-#include <arch/types.h>
 #include <typedefs.h>
 
Index: kernel/arch/ia64/src/drivers/ski.c
===================================================================
--- kernel/arch/ia64/src/drivers/ski.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/ia64/src/drivers/ski.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -37,10 +37,10 @@
 #include <console/chardev.h>
 #include <sysinfo/sysinfo.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <proc/thread.h>
 #include <synch/spinlock.h>
 #include <arch/asm.h>
 #include <arch/drivers/kbd.h>
-#include <string.h>
+#include <str.h>
 #include <arch.h>
 
Index: kernel/arch/ia64/src/ia64.c
===================================================================
--- kernel/arch/ia64/src/ia64.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/ia64/src/ia64.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -40,5 +40,5 @@
 #include <arch/asm.h>
 #include <arch/register.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <arch/context.h>
 #include <arch/stack.h>
@@ -66,5 +66,5 @@
 #include <print.h>
 #include <sysinfo/sysinfo.h>
-#include <string.h>
+#include <str.h>
 
 /* NS16550 as a COM 1 */
Index: kernel/arch/ia64/src/interrupt.c
===================================================================
--- kernel/arch/ia64/src/interrupt.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/ia64/src/interrupt.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -41,5 +41,5 @@
 #include <debug.h>
 #include <console/console.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <arch/asm.h>
 #include <arch/barrier.h>
Index: kernel/arch/ia64/src/mm/page.c
===================================================================
--- kernel/arch/ia64/src/mm/page.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/ia64/src/mm/page.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -39,5 +39,5 @@
 #include <arch/mm/asid.h>
 #include <arch/mm/vhpt.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <print.h>
 #include <mm/page.h>
Index: kernel/arch/ia64/src/smp/smp.c
===================================================================
--- kernel/arch/ia64/src/smp/smp.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/ia64/src/smp/smp.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -40,5 +40,5 @@
 #include <arch/asm.h>
 #include <arch/register.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <arch/context.h>
 #include <arch/stack.h>
Index: kernel/arch/mips32/include/asm.h
===================================================================
--- kernel/arch/mips32/include/asm.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/mips32/include/asm.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,4 @@
 #define KERN_mips32_ASM_H_
 
-#include <arch/types.h>
 #include <typedefs.h>
 #include <config.h>
Index: kernel/arch/mips32/include/context.h
===================================================================
--- kernel/arch/mips32/include/context.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/mips32/include/context.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -46,5 +46,5 @@
 #ifndef __ASM__
 
-#include <arch/types.h>
+#include <typedefs.h>
 
 #define context_set(ctx, pc, stack, size) \
Index: kernel/arch/mips32/include/cp0.h
===================================================================
--- kernel/arch/mips32/include/cp0.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/mips32/include/cp0.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,5 @@
 #define KERN_mips32_CP0_H_
 
-#include <arch/types.h>
+#include <typedefs.h>
 
 #define cp0_status_ie_enabled_bit	(1 << 0)
Index: kernel/arch/mips32/include/cpu.h
===================================================================
--- kernel/arch/mips32/include/cpu.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/mips32/include/cpu.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,5 @@
 #define KERN_mips32_CPU_H_
 
-#include <arch/types.h>
+#include <typedefs.h>
 #include <arch/asm.h>
 
Index: kernel/arch/mips32/include/debugger.h
===================================================================
--- kernel/arch/mips32/include/debugger.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/mips32/include/debugger.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -37,5 +37,5 @@
 
 #include <arch/exception.h>
-#include <arch/types.h>
+#include <typedefs.h>
 
 #define BKPOINTS_MAX 10
Index: kernel/arch/mips32/include/exception.h
===================================================================
--- kernel/arch/mips32/include/exception.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/mips32/include/exception.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,5 @@
 #define KERN_mips32_EXCEPTION_H_
 
-#include <arch/types.h>
+#include <typedefs.h>
 #include <arch/cp0.h>
 
Index: kernel/arch/mips32/include/faddr.h
===================================================================
--- kernel/arch/mips32/include/faddr.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/mips32/include/faddr.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,5 @@
 #define KERN_mips32_FADDR_H_
 
-#include <arch/types.h>
+#include <typedefs.h>
 
 #define FADDR(fptr)		((uintptr_t) (fptr))
Index: kernel/arch/mips32/include/fpu_context.h
===================================================================
--- kernel/arch/mips32/include/fpu_context.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/mips32/include/fpu_context.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,5 @@
 #define KERN_mips32_FPU_CONTEXT_H_
 
-#include <arch/types.h>
+#include <typedefs.h>
 
 #define FPU_CONTEXT_ALIGN    sizeof(unative_t)
Index: kernel/arch/mips32/include/mm/asid.h
===================================================================
--- kernel/arch/mips32/include/mm/asid.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/mips32/include/mm/asid.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,5 @@
 #define KERN_mips32_ASID_H_
 
-#include <arch/types.h>
+#include <typedefs.h>
 
 #define ASID_MAX_ARCH  255    /* 2^8 - 1 */
Index: kernel/arch/mips32/include/mm/tlb.h
===================================================================
--- kernel/arch/mips32/include/mm/tlb.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/mips32/include/mm/tlb.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,4 @@
 #define KERN_mips32_TLB_H_
 
-#include <arch/types.h>
 #include <typedefs.h>
 #include <arch/mm/asid.h>
Index: kernel/arch/mips32/include/types.h
===================================================================
--- kernel/arch/mips32/include/types.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/mips32/include/types.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,14 +36,4 @@
 #define KERN_mips32_TYPES_H_
 
-typedef signed char int8_t;
-typedef signed short int16_t;
-typedef signed long int32_t;
-typedef signed long long int64_t;
-
-typedef unsigned char uint8_t;
-typedef unsigned short uint16_t;
-typedef unsigned long uint32_t;
-typedef unsigned long long uint64_t;
-
 typedef uint32_t size_t;
 
@@ -60,24 +50,24 @@
 } fncptr_t;
 
-#define PRIp "x"	/**< Format for uintptr_t. */
-#define PRIs "u"	/**< Format for size_t. */
+#define PRIp "x"  /**< Format for uintptr_t. */
+#define PRIs "u"  /**< Format for size_t. */
 
-#define PRId8 "d"	/**< Format for int8_t. */
-#define PRId16 "d"	/**< Format for int16_t. */
-#define PRId32 "ld"	/**< Format for int32_t. */
-#define PRId64 "lld"	/**< Format for int64_t. */
-#define PRIdn "d"	/**< Format for native_t. */
+#define PRId8 "d"     /**< Format for int8_t. */
+#define PRId16 "d"    /**< Format for int16_t. */
+#define PRId32 "ld"   /**< Format for int32_t. */
+#define PRId64 "lld"  /**< Format for int64_t. */
+#define PRIdn "d"     /**< Format for native_t. */
 
-#define PRIu8 "u"	/**< Format for uint8_t. */
-#define PRIu16 "u"	/**< Format for uint16_t. */
-#define PRIu32 "u"	/**< Format for uint32_t. */
-#define PRIu64 "llu"	/**< Format for uint64_t. */
-#define PRIun "u"	/**< Format for unative_t. */
+#define PRIu8 "u"     /**< Format for uint8_t. */
+#define PRIu16 "u"    /**< Format for uint16_t. */
+#define PRIu32 "u"    /**< Format for uint32_t. */
+#define PRIu64 "llu"  /**< Format for uint64_t. */
+#define PRIun "u"     /**< Format for unative_t. */
 
-#define PRIx8 "x"	/**< Format for hexadecimal (u)int8_t. */
-#define PRIx16 "x"	/**< Format for hexadecimal (u)int16_t. */
-#define PRIx32 "x"	/**< Format for hexadecimal (u)uint32_t. */
-#define PRIx64 "llx"	/**< Format for hexadecimal (u)int64_t. */
-#define PRIxn "x"	/**< Format for hexadecimal (u)native_t. */
+#define PRIx8 "x"     /**< Format for hexadecimal (u)int8_t. */
+#define PRIx16 "x"    /**< Format for hexadecimal (u)int16_t. */
+#define PRIx32 "x"    /**< Format for hexadecimal (u)uint32_t. */
+#define PRIx64 "llx"  /**< Format for hexadecimal (u)int64_t. */
+#define PRIxn "x"     /**< Format for hexadecimal (u)native_t. */
 
 #endif
Index: kernel/arch/mips32/src/ddi/ddi.c
===================================================================
--- kernel/arch/mips32/src/ddi/ddi.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/mips32/src/ddi/ddi.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -35,5 +35,5 @@
 #include <ddi/ddi.h>
 #include <proc/task.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <security/cap.h>
 #include <arch.h>
Index: kernel/arch/mips32/src/debug/stacktrace.c
===================================================================
--- kernel/arch/mips32/src/debug/stacktrace.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/mips32/src/debug/stacktrace.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -35,5 +35,4 @@
 #include <stacktrace.h>
 #include <syscall/copy.h>
-#include <arch/types.h>
 #include <typedefs.h>
 
Index: kernel/arch/mips32/src/exception.c
===================================================================
--- kernel/arch/mips32/src/exception.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/mips32/src/exception.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -38,5 +38,5 @@
 #include <panic.h>
 #include <arch/cp0.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <arch.h>
 #include <debug.h>
Index: kernel/arch/mips32/src/interrupt.c
===================================================================
--- kernel/arch/mips32/src/interrupt.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/mips32/src/interrupt.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -35,5 +35,5 @@
 #include <interrupt.h>
 #include <arch/interrupt.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <arch.h>
 #include <arch/cp0.h>
Index: kernel/arch/mips32/src/mips32.c
===================================================================
--- kernel/arch/mips32/src/mips32.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/mips32/src/mips32.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -57,5 +57,5 @@
 #include <macros.h>
 #include <config.h>
-#include <string.h>
+#include <str.h>
 #include <arch/drivers/msim.h>
 #include <arch/asm/regname.h>
Index: kernel/arch/ppc32/Makefile.inc
===================================================================
--- kernel/arch/ppc32/Makefile.inc	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/ppc32/Makefile.inc	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -32,6 +32,6 @@
 
 GCC_CFLAGS += -mcpu=powerpc -msoft-float -m32
-AFLAGS += -a32
-LFLAGS += -no-check-sections -N
+AFLAGS = -a32
+LFLAGS = -no-check-sections -N
 
 BITS = 32
Index: kernel/arch/ppc32/include/asm.h
===================================================================
--- kernel/arch/ppc32/include/asm.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/ppc32/include/asm.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,4 @@
 #define KERN_ppc32_ASM_H_
 
-#include <arch/types.h>
 #include <typedefs.h>
 #include <config.h>
Index: kernel/arch/ppc32/include/boot/boot.h
===================================================================
--- kernel/arch/ppc32/include/boot/boot.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/ppc32/include/boot/boot.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -47,5 +47,5 @@
 #ifndef __ASM__
 
-#include <arch/types.h>
+#include <typedefs.h>
 #include <config.h>
 #include <genarch/ofw/ofw_tree.h>
Index: kernel/arch/ppc32/include/context.h
===================================================================
--- kernel/arch/ppc32/include/context.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/ppc32/include/context.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,5 @@
 #define KERN_ppc32_CONTEXT_H_
 
-#include <arch/types.h>
+#include <typedefs.h>
 
 #define SP_DELTA  16
Index: kernel/arch/ppc32/include/cpuid.h
===================================================================
--- kernel/arch/ppc32/include/cpuid.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/ppc32/include/cpuid.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,5 @@
 #define KERN_ppc32_CPUID_H_
 
-#include <arch/types.h>
+#include <typedefs.h>
 
 typedef struct {
Index: kernel/arch/ppc32/include/drivers/pic.h
===================================================================
--- kernel/arch/ppc32/include/drivers/pic.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/ppc32/include/drivers/pic.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,5 @@
 #define KERN_ppc32_PIC_H_
 
-#include <arch/types.h>
+#include <typedefs.h>
 #include <ddi/irq.h>
 
Index: kernel/arch/ppc32/include/exception.h
===================================================================
--- kernel/arch/ppc32/include/exception.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/ppc32/include/exception.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,5 @@
 #define KERN_ppc32_EXCEPTION_H_
 
-#include <arch/types.h>
+#include <typedefs.h>
 #include <arch/regutils.h>
 
Index: kernel/arch/ppc32/include/faddr.h
===================================================================
--- kernel/arch/ppc32/include/faddr.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/ppc32/include/faddr.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,5 @@
 #define KERN_ppc32_FADDR_H_
 
-#include <arch/types.h>
+#include <typedefs.h>
 
 #define FADDR(fptr)		((uintptr_t) (fptr))
Index: kernel/arch/ppc32/include/fpu_context.h
===================================================================
--- kernel/arch/ppc32/include/fpu_context.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/ppc32/include/fpu_context.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -37,5 +37,5 @@
 
 #ifndef KERN_ppc32_TYPES_H_
-# include <arch/types.h>
+	#include <typedefs.h>
 #endif
 
Index: kernel/arch/ppc32/include/mm/asid.h
===================================================================
--- kernel/arch/ppc32/include/mm/asid.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/ppc32/include/mm/asid.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,5 @@
 #define KERN_ppc32_ASID_H_
 
-#include <arch/types.h>
+#include <typedefs.h>
 
 #define ASID_MAX_ARCH		4096
Index: kernel/arch/ppc32/include/mm/frame.h
===================================================================
--- kernel/arch/ppc32/include/mm/frame.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/ppc32/include/mm/frame.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -42,5 +42,5 @@
 #ifndef __ASM__
 
-#include <arch/types.h>
+#include <typedefs.h>
 
 extern uintptr_t last_frame;
Index: kernel/arch/ppc32/include/mm/tlb.h
===================================================================
--- kernel/arch/ppc32/include/mm/tlb.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/ppc32/include/mm/tlb.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -37,5 +37,4 @@
 
 #include <arch/interrupt.h>
-#include <arch/types.h>
 #include <typedefs.h>
 
Index: kernel/arch/ppc32/include/types.h
===================================================================
--- kernel/arch/ppc32/include/types.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/ppc32/include/types.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,14 +36,4 @@
 #define KERN_ppc32_TYPES_H_
 
-typedef signed char int8_t;
-typedef signed short int16_t;
-typedef signed int int32_t;
-typedef signed long long int64_t;
-
-typedef unsigned char uint8_t;
-typedef unsigned short uint16_t;
-typedef unsigned int uint32_t;
-typedef unsigned long long uint64_t;
-
 typedef uint32_t size_t;
 
@@ -61,25 +51,25 @@
 
 /**< Formats for uintptr_t, size_t */
-#define PRIp "x"
-#define PRIs "u"
+#define PRIp  "x"
+#define PRIs  "u"
 
 /**< Formats for (u)int8_t, (u)int16_t, (u)int32_t, (u)int64_t and (u)native_t */
-#define PRId8 "d"
-#define PRId16 "d"
-#define PRId32 "d"
-#define PRId64 "lld"
-#define PRIdn "d"
+#define PRId8   "d"
+#define PRId16  "d"
+#define PRId32  "d"
+#define PRId64  "lld"
+#define PRIdn   "d"
 
-#define PRIu8 "u"
-#define PRIu16 "u"
-#define PRIu32 "u"
-#define PRIu64 "llu"
-#define PRIun "u"
+#define PRIu8   "u"
+#define PRIu16  "u"
+#define PRIu32  "u"
+#define PRIu64  "llu"
+#define PRIun   "u"
 
-#define PRIx8 "x"
-#define PRIx16 "x"
-#define PRIx32 "x"
-#define PRIx64 "llx"
-#define PRIxn "x"
+#define PRIx8   "x"
+#define PRIx16  "x"
+#define PRIx32  "x"
+#define PRIx64  "llx"
+#define PRIxn   "x"
 
 #endif
Index: kernel/arch/ppc32/src/ddi/ddi.c
===================================================================
--- kernel/arch/ppc32/src/ddi/ddi.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/ppc32/src/ddi/ddi.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -35,5 +35,5 @@
 #include <ddi/ddi.h>
 #include <proc/task.h>
-#include <arch/types.h>
+#include <typedefs.h>
 
 /** Enable I/O space range for task.
Index: kernel/arch/ppc32/src/debug/stacktrace.c
===================================================================
--- kernel/arch/ppc32/src/debug/stacktrace.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/ppc32/src/debug/stacktrace.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -35,5 +35,4 @@
 #include <stacktrace.h>
 #include <syscall/copy.h>
-#include <arch/types.h>
 #include <typedefs.h>
 
Index: kernel/arch/ppc32/src/interrupt.c
===================================================================
--- kernel/arch/ppc32/src/interrupt.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/ppc32/src/interrupt.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,5 @@
 #include <interrupt.h>
 #include <arch/interrupt.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <arch.h>
 #include <time/clock.h>
Index: kernel/arch/ppc32/src/ppc32.c
===================================================================
--- kernel/arch/ppc32/src/ppc32.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/ppc32/src/ppc32.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -53,5 +53,5 @@
 #include <align.h>
 #include <macros.h>
-#include <string.h>
+#include <str.h>
 #include <print.h>
 
Index: kernel/arch/sparc64/Makefile.inc
===================================================================
--- kernel/arch/sparc64/Makefile.inc	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/sparc64/Makefile.inc	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -34,5 +34,5 @@
 SUNCC_CFLAGS += -m64 -xarch=sparc -xregs=appl,no%float
 
-LFLAGS += -no-check-sections -N
+LFLAGS = -no-check-sections -N
 
 BITS = 64
Index: kernel/arch/sparc64/include/asm.h
===================================================================
--- kernel/arch/sparc64/include/asm.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/sparc64/include/asm.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -37,5 +37,4 @@
 
 #include <arch/arch.h>
-#include <arch/types.h>
 #include <typedefs.h>
 #include <align.h>
Index: kernel/arch/sparc64/include/atomic.h
===================================================================
--- kernel/arch/sparc64/include/atomic.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/sparc64/include/atomic.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -37,5 +37,5 @@
 
 #include <arch/barrier.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <preemption.h>
 
Index: kernel/arch/sparc64/include/boot/boot.h
===================================================================
--- kernel/arch/sparc64/include/boot/boot.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/sparc64/include/boot/boot.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -43,5 +43,5 @@
 
 #include <config.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <genarch/ofw/ofw_tree.h>
 
Index: kernel/arch/sparc64/include/context.h
===================================================================
--- kernel/arch/sparc64/include/context.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/sparc64/include/context.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -37,5 +37,5 @@
 
 #include <arch/stack.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <align.h>
 
Index: kernel/arch/sparc64/include/cpu.h
===================================================================
--- kernel/arch/sparc64/include/cpu.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/sparc64/include/cpu.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -54,5 +54,4 @@
 #ifndef __ASM__
 
-#include <arch/types.h>
 #include <typedefs.h>
 #include <arch/register.h>
Index: kernel/arch/sparc64/include/drivers/fhc.h
===================================================================
--- kernel/arch/sparc64/include/drivers/fhc.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/sparc64/include/drivers/fhc.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,5 @@
 #define KERN_sparc64_FHC_H_
 
-#include <arch/types.h>
+#include <typedefs.h>
 #include <genarch/ofw/ofw_tree.h>
 
Index: kernel/arch/sparc64/include/drivers/kbd.h
===================================================================
--- kernel/arch/sparc64/include/drivers/kbd.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/sparc64/include/drivers/kbd.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,5 @@
 #define KERN_sparc64_KBD_H_
 
-#include <arch/types.h>
+#include <typedefs.h>
 #include <genarch/ofw/ofw_tree.h>
 
Index: kernel/arch/sparc64/include/drivers/pci.h
===================================================================
--- kernel/arch/sparc64/include/drivers/pci.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/sparc64/include/drivers/pci.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,5 @@
 #define KERN_sparc64_PCI_H_
 
-#include <arch/types.h>
+#include <typedefs.h>
 #include <genarch/ofw/ofw_tree.h>
 #include <arch/arch.h>
Index: kernel/arch/sparc64/include/drivers/scr.h
===================================================================
--- kernel/arch/sparc64/include/drivers/scr.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/sparc64/include/drivers/scr.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,5 @@
 #define KERN_sparc64_SCR_H_
 
-#include <arch/types.h>
+#include <typedefs.h>
 #include <genarch/ofw/ofw_tree.h>
 
Index: kernel/arch/sparc64/include/drivers/sgcn.h
===================================================================
--- kernel/arch/sparc64/include/drivers/sgcn.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/sparc64/include/drivers/sgcn.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,5 @@
 #define KERN_sparc64_SGCN_H_
 
-#include <arch/types.h>
+#include <typedefs.h>
 #include <console/chardev.h>
 #include <proc/thread.h>
Index: kernel/arch/sparc64/include/faddr.h
===================================================================
--- kernel/arch/sparc64/include/faddr.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/sparc64/include/faddr.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,5 @@
 #define KERN_sparc64_FADDR_H_
 
-#include <arch/types.h>
+#include <typedefs.h>
 
 #define FADDR(fptr)		((uintptr_t) (fptr))
Index: kernel/arch/sparc64/include/fpu_context.h
===================================================================
--- kernel/arch/sparc64/include/fpu_context.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/sparc64/include/fpu_context.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,5 @@
 #define KERN_sparc64_FPU_CONTEXT_H_
 
-#include <arch/types.h>
+#include <typedefs.h>
 
 #define FPU_CONTEXT_ALIGN	8
Index: kernel/arch/sparc64/include/interrupt.h
===================================================================
--- kernel/arch/sparc64/include/interrupt.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/sparc64/include/interrupt.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -37,5 +37,5 @@
 #define KERN_sparc64_INTERRUPT_H_
 
-#include <arch/types.h>
+#include <typedefs.h>
 #include <arch/regdef.h>
 
Index: kernel/arch/sparc64/include/mm/asid.h
===================================================================
--- kernel/arch/sparc64/include/mm/asid.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/sparc64/include/mm/asid.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,5 @@
 #define KERN_sparc64_ASID_H_
 
-#include <arch/types.h>
+#include <typedefs.h>
 
 /*
Index: kernel/arch/sparc64/include/mm/sun4u/frame.h
===================================================================
--- kernel/arch/sparc64/include/mm/sun4u/frame.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/sparc64/include/mm/sun4u/frame.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -55,5 +55,5 @@
 #ifndef __ASM__
 
-#include <arch/types.h>
+#include <typedefs.h>
 
 union frame_address {
Index: kernel/arch/sparc64/include/mm/sun4u/mmu.h
===================================================================
--- kernel/arch/sparc64/include/mm/sun4u/mmu.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/sparc64/include/mm/sun4u/mmu.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -91,5 +91,5 @@
 #include <arch/asm.h>
 #include <arch/barrier.h>
-#include <arch/types.h>
+#include <typedefs.h>
 
 #if defined(US)
Index: kernel/arch/sparc64/include/mm/sun4u/tlb.h
===================================================================
--- kernel/arch/sparc64/include/mm/sun4u/tlb.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/sparc64/include/mm/sun4u/tlb.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -99,5 +99,5 @@
 #include <arch/asm.h>
 #include <arch/barrier.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <arch/register.h>
 #include <arch/cpu.h>
Index: kernel/arch/sparc64/include/mm/sun4u/tsb.h
===================================================================
--- kernel/arch/sparc64/include/mm/sun4u/tsb.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/sparc64/include/mm/sun4u/tsb.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -54,5 +54,5 @@
 #include <arch/mm/tte.h>
 #include <arch/mm/mmu.h>
-#include <arch/types.h>
+#include <typedefs.h>
 
 /** TSB Base register. */
Index: kernel/arch/sparc64/include/mm/sun4u/tte.h
===================================================================
--- kernel/arch/sparc64/include/mm/sun4u/tte.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/sparc64/include/mm/sun4u/tte.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -49,5 +49,5 @@
 #ifndef __ASM__
 
-#include <arch/types.h>
+#include <typedefs.h>
 
 /* TTE tag's VA_tag field contains bits <63:VA_TAG_PAGE_SHIFT> of the VA */
Index: kernel/arch/sparc64/include/mm/sun4v/frame.h
===================================================================
--- kernel/arch/sparc64/include/mm/sun4v/frame.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/sparc64/include/mm/sun4v/frame.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -45,5 +45,5 @@
 #ifndef __ASM__
 
-#include <arch/types.h>
+#include <typedefs.h>
 
 extern uintptr_t last_frame;
Index: kernel/arch/sparc64/include/mm/sun4v/tlb.h
===================================================================
--- kernel/arch/sparc64/include/mm/sun4v/tlb.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/sparc64/include/mm/sun4v/tlb.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -48,5 +48,5 @@
 #include <arch/asm.h>
 #include <arch/barrier.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <arch/register.h>
 #include <arch/cpu.h>
Index: kernel/arch/sparc64/include/mm/sun4v/tsb.h
===================================================================
--- kernel/arch/sparc64/include/mm/sun4v/tsb.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/sparc64/include/mm/sun4v/tsb.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -53,5 +53,4 @@
 #include <arch/mm/tte.h>
 #include <arch/mm/mmu.h>
-#include <arch/types.h>
 
 /** TSB description, used in hypercalls */
Index: kernel/arch/sparc64/include/mm/sun4v/tte.h
===================================================================
--- kernel/arch/sparc64/include/mm/sun4v/tte.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/sparc64/include/mm/sun4v/tte.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -50,5 +50,5 @@
 #ifndef __ASM__
 
-#include <arch/types.h>
+#include <typedefs.h>
 
 /** Translation Table Entry - Data. */
Index: kernel/arch/sparc64/include/proc/thread.h
===================================================================
--- kernel/arch/sparc64/include/proc/thread.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/sparc64/include/proc/thread.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,5 @@
 #define KERN_sparc64_THREAD_H_
 
-#include <arch/types.h>
+#include <typedefs.h>
 #include <arch/arch.h>
 
Index: kernel/arch/sparc64/include/register.h
===================================================================
--- kernel/arch/sparc64/include/register.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/sparc64/include/register.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -37,5 +37,5 @@
 
 #include <arch/regdef.h>
-#include <arch/types.h>
+#include <typedefs.h>
 
 /** Version Register. */
Index: kernel/arch/sparc64/include/sun4u/cpu.h
===================================================================
--- kernel/arch/sparc64/include/sun4u/cpu.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/sparc64/include/sun4u/cpu.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -54,5 +54,4 @@
 #ifndef __ASM__
 
-#include <arch/types.h>
 #include <typedefs.h>
 #include <arch/register.h>
Index: kernel/arch/sparc64/include/sun4v/hypercall.h
===================================================================
--- kernel/arch/sparc64/include/sun4v/hypercall.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/sparc64/include/sun4v/hypercall.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -120,5 +120,4 @@
 
 #include <typedefs.h>
-#include <arch/types.h>
 
 /*
Index: kernel/arch/sparc64/include/sun4v/ipi.h
===================================================================
--- kernel/arch/sparc64/include/sun4v/ipi.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/sparc64/include/sun4v/ipi.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -38,5 +38,5 @@
 #define KERN_sparc64_sun4v_IPI_H_
 
-#include <arch/types.h>
+#include <typedefs.h>
 
 extern uint64_t ipi_brodcast_to(void (*)(void), uint16_t cpu_list[], uint64_t);
Index: kernel/arch/sparc64/include/sun4v/register.h
===================================================================
--- kernel/arch/sparc64/include/sun4v/register.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/sparc64/include/sun4v/register.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -37,5 +37,5 @@
 
 #include <arch/regdef.h>
-#include <arch/types.h>
+#include <typedefs.h>
 
 /** Processor State Register. */
Index: kernel/arch/sparc64/include/trap/trap_table.h
===================================================================
--- kernel/arch/sparc64/include/trap/trap_table.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/sparc64/include/trap/trap_table.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -44,5 +44,5 @@
 #ifndef __ASM__
 
-#include <arch/types.h>
+#include <typedefs.h>
 
 struct trap_table_entry {
Index: kernel/arch/sparc64/include/types.h
===================================================================
--- kernel/arch/sparc64/include/types.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/sparc64/include/types.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,14 +36,4 @@
 #define KERN_sparc64_TYPES_H_
 
-typedef signed char int8_t;
-typedef signed short int16_t;
-typedef signed int int32_t;
-typedef signed long int64_t;
-
-typedef unsigned char uint8_t;
-typedef unsigned short uint16_t;
-typedef unsigned int uint32_t;
-typedef unsigned long uint64_t;
-
 typedef uint64_t size_t;
 
@@ -60,28 +50,28 @@
 } fncptr_t;
 
+typedef uint8_t asi_t;
+
 /**< Formats for uintptr_t, size_t */
-#define PRIp "llx"
-#define PRIs "llu"
+#define PRIp  "llx"
+#define PRIs  "llu"
 
 /**< Formats for (u)int8_t, (u)int16_t, (u)int32_t, (u)int64_t and (u)native_t */
-#define PRId8 "d"
-#define PRId16 "d"
-#define PRId32 "d"
-#define PRId64 "lld"
-#define PRIdn "lld"
+#define PRId8   "d"
+#define PRId16  "d"
+#define PRId32  "d"
+#define PRId64  "lld"
+#define PRIdn   "lld"
 
-#define PRIu8 "u"
-#define PRIu16 "u"
-#define PRIu32 "u"
-#define PRIu64 "llu"
-#define PRIun "llu"
+#define PRIu8   "u"
+#define PRIu16  "u"
+#define PRIu32  "u"
+#define PRIu64  "llu"
+#define PRIun   "llu"
 
-#define PRIx8 "x"
-#define PRIx16 "x"
-#define PRIx32 "x"
-#define PRIx64 "llx"
-#define PRIxn "llx"
-
-typedef uint8_t asi_t;
+#define PRIx8   "x"
+#define PRIx16  "x"
+#define PRIx32  "x"
+#define PRIx64  "llx"
+#define PRIxn   "llx"
 
 #endif
Index: kernel/arch/sparc64/src/console.c
===================================================================
--- kernel/arch/sparc64/src/console.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/sparc64/src/console.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -34,5 +34,5 @@
 
 #include <arch/console.h>
-#include <arch/types.h>
+#include <typedefs.h>
 
 #include <arch/drivers/scr.h>
@@ -49,5 +49,5 @@
 #include <arch.h>
 #include <panic.h>
-#include <string.h>
+#include <str.h>
 #include <print.h>
 
Index: kernel/arch/sparc64/src/ddi/ddi.c
===================================================================
--- kernel/arch/sparc64/src/ddi/ddi.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/sparc64/src/ddi/ddi.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -35,5 +35,5 @@
 #include <ddi/ddi.h>
 #include <proc/task.h>
-#include <arch/types.h>
+#include <typedefs.h>
 
 /** Enable I/O space range for task.
Index: kernel/arch/sparc64/src/debug/stacktrace.c
===================================================================
--- kernel/arch/sparc64/src/debug/stacktrace.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/sparc64/src/debug/stacktrace.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -35,5 +35,4 @@
 #include <stacktrace.h>
 #include <syscall/copy.h>
-#include <arch/types.h>
 #include <typedefs.h>
 
Index: kernel/arch/sparc64/src/drivers/fhc.c
===================================================================
--- kernel/arch/sparc64/src/drivers/fhc.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/sparc64/src/drivers/fhc.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -44,5 +44,5 @@
 #include <mm/page.h>
 #include <mm/slab.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <genarch/ofw/ofw_tree.h>
 #include <genarch/ofw/fhc.h>
Index: kernel/arch/sparc64/src/drivers/kbd.c
===================================================================
--- kernel/arch/sparc64/src/drivers/kbd.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/sparc64/src/drivers/kbd.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -41,7 +41,7 @@
 #include <mm/page.h>
 #include <arch/mm/page.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <align.h>
-#include <string.h>
+#include <str.h>
 #include <print.h>
 #include <sysinfo/sysinfo.h>
Index: kernel/arch/sparc64/src/drivers/pci.c
===================================================================
--- kernel/arch/sparc64/src/drivers/pci.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/sparc64/src/drivers/pci.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -41,13 +41,13 @@
 #include <mm/page.h>
 #include <mm/slab.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <debug.h>
 #include <print.h>
-#include <string.h>
+#include <str.h>
 #include <arch/asm.h>
 #include <sysinfo/sysinfo.h>
 
 #define SABRE_INTERNAL_REG	0
-#define PSYCHO_INTERNAL_REG	2	
+#define PSYCHO_INTERNAL_REG	2
 
 #define OBIO_IMR_BASE	0x200
Index: kernel/arch/sparc64/src/drivers/scr.c
===================================================================
--- kernel/arch/sparc64/src/drivers/scr.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/sparc64/src/drivers/scr.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -42,6 +42,6 @@
 #include <console/chardev.h>
 #include <console/console.h>
-#include <arch/types.h>
-#include <string.h>
+#include <typedefs.h>
+#include <str.h>
 #include <align.h>
 #include <print.h>
Index: kernel/arch/sparc64/src/drivers/sgcn.c
===================================================================
--- kernel/arch/sparc64/src/drivers/sgcn.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/sparc64/src/drivers/sgcn.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -40,5 +40,5 @@
 #include <genarch/ofw/ofw_tree.h>
 #include <debug.h>
-#include <string.h>
+#include <str.h>
 #include <print.h>
 #include <mm/page.h>
Index: kernel/arch/sparc64/src/mm/sun4u/frame.c
===================================================================
--- kernel/arch/sparc64/src/mm/sun4u/frame.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/sparc64/src/mm/sun4u/frame.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,5 @@
 #include <mm/frame.h>
 #include <arch/boot/boot.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <config.h>
 #include <align.h>
Index: kernel/arch/sparc64/src/mm/sun4u/tlb.c
===================================================================
--- kernel/arch/sparc64/src/mm/sun4u/tlb.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/sparc64/src/mm/sun4u/tlb.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -44,5 +44,5 @@
 #include <arch.h>
 #include <print.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <config.h>
 #include <arch/trap/trap.h>
Index: kernel/arch/sparc64/src/mm/sun4u/tsb.c
===================================================================
--- kernel/arch/sparc64/src/mm/sun4u/tsb.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/sparc64/src/mm/sun4u/tsb.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -38,5 +38,5 @@
 #include <arch/barrier.h>
 #include <mm/as.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <macros.h>
 #include <debug.h>
Index: kernel/arch/sparc64/src/mm/sun4v/frame.c
===================================================================
--- kernel/arch/sparc64/src/mm/sun4v/frame.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/sparc64/src/mm/sun4v/frame.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,5 @@
 #include <mm/frame.h>
 #include <arch/boot/boot.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <config.h>
 #include <align.h>
Index: kernel/arch/sparc64/src/mm/sun4v/tlb.c
===================================================================
--- kernel/arch/sparc64/src/mm/sun4v/tlb.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/sparc64/src/mm/sun4v/tlb.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -46,5 +46,5 @@
 #include <arch.h>
 #include <print.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <config.h>
 #include <arch/trap/trap.h>
Index: kernel/arch/sparc64/src/mm/sun4v/tsb.c
===================================================================
--- kernel/arch/sparc64/src/mm/sun4v/tsb.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/sparc64/src/mm/sun4v/tsb.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -40,5 +40,5 @@
 #include <arch/barrier.h>
 #include <mm/as.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <macros.h>
 #include <debug.h>
Index: kernel/arch/sparc64/src/smp/sun4u/smp.c
===================================================================
--- kernel/arch/sparc64/src/smp/sun4u/smp.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/sparc64/src/smp/sun4u/smp.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -41,5 +41,5 @@
 #include <config.h>
 #include <macros.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <synch/synch.h>
 #include <synch/waitq.h>
Index: kernel/arch/sparc64/src/smp/sun4v/smp.c
===================================================================
--- kernel/arch/sparc64/src/smp/sun4v/smp.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/sparc64/src/smp/sun4v/smp.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -44,5 +44,5 @@
 #include <macros.h>
 #include <func.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <synch/synch.h>
 #include <synch/waitq.h>
@@ -53,5 +53,5 @@
 #include <time/delay.h>
 #include <arch/smp/sun4v/smp.h>
-#include <string.h>
+#include <str.h>
 
 /** hypervisor code of the "running" state of the CPU */
Index: kernel/arch/sparc64/src/sun4u/sparc64.c
===================================================================
--- kernel/arch/sparc64/src/sun4u/sparc64.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/sparc64/src/sun4u/sparc64.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -48,5 +48,5 @@
 #include <userspace.h>
 #include <ddi/irq.h>
-#include <string.h>
+#include <str.h>
 
 bootinfo_t bootinfo;
Index: kernel/arch/sparc64/src/sun4v/md.c
===================================================================
--- kernel/arch/sparc64/src/sun4v/md.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/sparc64/src/sun4v/md.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -37,5 +37,5 @@
 #include <func.h>
 #include <print.h>
-#include <string.h>
+#include <str.h>
 #include <arch/sun4v/md.h>
 #include <arch/sun4v/hypercall.h>
Index: kernel/arch/sparc64/src/sun4v/sparc64.c
===================================================================
--- kernel/arch/sparc64/src/sun4v/sparc64.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/sparc64/src/sun4v/sparc64.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -49,5 +49,5 @@
 #include <userspace.h>
 #include <ddi/irq.h>
-#include <string.h>
+#include <str.h>
 #include <arch/drivers/niagara.h>
 
Index: kernel/arch/sparc64/src/trap/interrupt.c
===================================================================
--- kernel/arch/sparc64/src/trap/interrupt.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/sparc64/src/trap/interrupt.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -39,5 +39,5 @@
 #include <interrupt.h>
 #include <ddi/irq.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <debug.h>
 #include <arch/asm.h>
Index: kernel/arch/sparc64/src/trap/sun4u/interrupt.c
===================================================================
--- kernel/arch/sparc64/src/trap/sun4u/interrupt.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/sparc64/src/trap/sun4u/interrupt.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -38,5 +38,5 @@
 #include <interrupt.h>
 #include <ddi/irq.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <debug.h>
 #include <arch/asm.h>
Index: kernel/arch/sparc64/src/trap/sun4v/interrupt.c
===================================================================
--- kernel/arch/sparc64/src/trap/sun4v/interrupt.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/sparc64/src/trap/sun4v/interrupt.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -38,5 +38,5 @@
 #include <interrupt.h>
 #include <ddi/irq.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <debug.h>
 #include <arch/asm.h>
Index: kernel/arch/sparc64/src/trap/trap.c
===================================================================
--- kernel/arch/sparc64/src/trap/trap.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/arch/sparc64/src/trap/trap.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -43,5 +43,5 @@
 #include <memstr.h>
 #include <debug.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <arch/drivers/tick.h>
 
Index: kernel/genarch/include/acpi/acpi.h
===================================================================
--- kernel/genarch/include/acpi/acpi.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/genarch/include/acpi/acpi.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,5 @@
 #define KERN_ACPI_H_
 
-#include <arch/types.h>
+#include <typedefs.h>
 
 /* Root System Description Pointer */
Index: kernel/genarch/include/drivers/dsrln/dsrlnin.h
===================================================================
--- kernel/genarch/include/drivers/dsrln/dsrlnin.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/genarch/include/drivers/dsrln/dsrlnin.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -39,5 +39,4 @@
 
 #include <ddi/irq.h>
-#include <arch/types.h>
 #include <console/chardev.h>
 #include <typedefs.h>
Index: kernel/genarch/include/drivers/dsrln/dsrlnout.h
===================================================================
--- kernel/genarch/include/drivers/dsrln/dsrlnout.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/genarch/include/drivers/dsrln/dsrlnout.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -38,5 +38,4 @@
 #define KERN_DSRLNOUT_H_
 
-#include <arch/types.h>
 #include <typedefs.h>
 #include <console/chardev.h>
Index: kernel/genarch/include/drivers/ega/ega.h
===================================================================
--- kernel/genarch/include/drivers/ega/ega.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/genarch/include/drivers/ega/ega.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,4 @@
 #define KERN_EGA_H_
 
-#include <arch/types.h>
 #include <typedefs.h>
 #include <console/chardev.h>
Index: kernel/genarch/include/drivers/i8042/i8042.h
===================================================================
--- kernel/genarch/include/drivers/i8042/i8042.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/genarch/include/drivers/i8042/i8042.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -37,5 +37,4 @@
 
 #include <ddi/irq.h>
-#include <arch/types.h>
 #include <console/chardev.h>
 #include <typedefs.h>
Index: kernel/genarch/include/drivers/legacy/ia32/io.h
===================================================================
--- kernel/genarch/include/drivers/legacy/ia32/io.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/genarch/include/drivers/legacy/ia32/io.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -38,5 +38,5 @@
 #define KERN_LEGACY_IA32_IO_H
 
-#include <arch/types.h>
+#include <typedefs.h>
 
 #define I8042_BASE    ((ioport8_t *) 0x60)
Index: kernel/genarch/include/drivers/ns16550/ns16550.h
===================================================================
--- kernel/genarch/include/drivers/ns16550/ns16550.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/genarch/include/drivers/ns16550/ns16550.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -39,5 +39,5 @@
 
 #include <ddi/irq.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <console/chardev.h>
 
Index: kernel/genarch/include/drivers/pl050/pl050.h
===================================================================
--- kernel/genarch/include/drivers/pl050/pl050.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/genarch/include/drivers/pl050/pl050.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -42,5 +42,4 @@
 
 #include <ddi/irq.h>
-#include <arch/types.h>
 #include <console/chardev.h>
 #include <typedefs.h>
Index: kernel/genarch/include/drivers/via-cuda/cuda.h
===================================================================
--- kernel/genarch/include/drivers/via-cuda/cuda.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/genarch/include/drivers/via-cuda/cuda.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -37,5 +37,5 @@
 
 #include <ddi/irq.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <console/chardev.h>
 #include <synch/spinlock.h>
Index: kernel/genarch/include/drivers/z8530/z8530.h
===================================================================
--- kernel/genarch/include/drivers/z8530/z8530.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/genarch/include/drivers/z8530/z8530.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -39,5 +39,5 @@
 
 #include <ddi/irq.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <console/chardev.h>
 
Index: kernel/genarch/include/fb/fb.h
===================================================================
--- kernel/genarch/include/fb/fb.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/genarch/include/fb/fb.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,5 @@
 #define KERN_FB_H_
 
-#include <arch/types.h>
+#include <typedefs.h>
 #include <console/chardev.h>
 #include <genarch/fb/visuals.h>
Index: kernel/genarch/include/fb/logo-196x66.h
===================================================================
--- kernel/genarch/include/fb/logo-196x66.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/genarch/include/fb/logo-196x66.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -40,5 +40,5 @@
 #define LOGO_COLOR   0xffffff
 
-#include <arch/types.h>
+#include <typedefs.h>
 
 extern uint32_t fb_logo[LOGO_WIDTH * LOGO_HEIGHT];
Index: kernel/genarch/include/mm/as_ht.h
===================================================================
--- kernel/genarch/include/mm/as_ht.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/genarch/include/mm/as_ht.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -38,5 +38,5 @@
 #include <mm/mm.h>
 #include <adt/list.h>
-#include <arch/types.h>
+#include <typedefs.h>
 
 typedef struct {
Index: kernel/genarch/include/mm/page_ht.h
===================================================================
--- kernel/genarch/include/mm/page_ht.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/genarch/include/mm/page_ht.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -40,5 +40,5 @@
 #define KERN_PAGE_HT_H_
 
-#include <arch/types.h>
+#include <typedefs.h>
 #include <mm/as.h>
 #include <mm/page.h>
Index: kernel/genarch/include/mm/page_pt.h
===================================================================
--- kernel/genarch/include/mm/page_pt.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/genarch/include/mm/page_pt.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -47,5 +47,5 @@
 #include <mm/page.h>
 #include <arch/mm/page.h>
-#include <arch/types.h>
+#include <typedefs.h>
 
 /*
Index: kernel/genarch/include/multiboot/multiboot.h
===================================================================
--- kernel/genarch/include/multiboot/multiboot.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/genarch/include/multiboot/multiboot.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,5 @@
 #define KERN_MULTIBOOT_H_
 
-#include <arch/types.h>
+#include <typedefs.h>
 #include <arch/boot/memmap.h>
 
Index: kernel/genarch/include/ofw/ebus.h
===================================================================
--- kernel/genarch/include/ofw/ebus.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/genarch/include/ofw/ebus.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -31,5 +31,5 @@
 
 #include <genarch/ofw/ofw_tree.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <ddi/irq.h>
 #include <typedefs.h>
Index: kernel/genarch/include/ofw/fhc.h
===================================================================
--- kernel/genarch/include/ofw/fhc.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/genarch/include/ofw/fhc.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -31,5 +31,5 @@
 
 #include <genarch/ofw/ofw_tree.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <ddi/irq.h>
 #include <typedefs.h>
Index: kernel/genarch/include/ofw/ofw_tree.h
===================================================================
--- kernel/genarch/include/ofw/ofw_tree.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/genarch/include/ofw/ofw_tree.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -30,5 +30,4 @@
 #define KERN_OFW_TREE_H_
 
-#include <arch/types.h>
 #include <typedefs.h>
 
Index: kernel/genarch/include/ofw/pci.h
===================================================================
--- kernel/genarch/include/ofw/pci.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/genarch/include/ofw/pci.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -31,5 +31,5 @@
 
 #include <genarch/ofw/ofw_tree.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <ddi/irq.h>
 #include <typedefs.h>
Index: kernel/genarch/include/ofw/sbus.h
===================================================================
--- kernel/genarch/include/ofw/sbus.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/genarch/include/ofw/sbus.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -31,5 +31,5 @@
 
 #include <genarch/ofw/ofw_tree.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <ddi/irq.h>
 #include <typedefs.h>
Index: kernel/genarch/include/ofw/upa.h
===================================================================
--- kernel/genarch/include/ofw/upa.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/genarch/include/ofw/upa.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -31,5 +31,5 @@
 
 #include <genarch/ofw/ofw_tree.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <ddi/irq.h>
 #include <typedefs.h>
Index: kernel/genarch/src/acpi/madt.c
===================================================================
--- kernel/genarch/src/acpi/madt.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/genarch/src/acpi/madt.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -35,5 +35,5 @@
  */
 
-#include <arch/types.h>
+#include <typedefs.h>
 #include <genarch/acpi/acpi.h>
 #include <genarch/acpi/madt.h>
Index: kernel/genarch/src/drivers/dsrln/dsrlnout.c
===================================================================
--- kernel/genarch/src/drivers/dsrln/dsrlnout.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/genarch/src/drivers/dsrln/dsrlnout.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -41,5 +41,5 @@
 #include <console/console.h>
 #include <sysinfo/sysinfo.h>
-#include <string.h>
+#include <str.h>
 
 typedef struct {
Index: kernel/genarch/src/drivers/ega/ega.c
===================================================================
--- kernel/genarch/src/drivers/ega/ega.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/genarch/src/drivers/ega/ega.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -42,8 +42,8 @@
 #include <arch/mm/page.h>
 #include <synch/spinlock.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <arch/asm.h>
 #include <memstr.h>
-#include <string.h>
+#include <str.h>
 #include <console/chardev.h>
 #include <console/console.h>
Index: kernel/genarch/src/fb/fb.c
===================================================================
--- kernel/genarch/src/fb/fb.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/genarch/src/fb/fb.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -49,7 +49,7 @@
 #include <bitops.h>
 #include <print.h>
-#include <string.h>
+#include <str.h>
 #include <ddi/ddi.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <byteorder.h>
 
Index: kernel/genarch/src/kbrd/scanc_mac.c
===================================================================
--- kernel/genarch/src/kbrd/scanc_mac.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/genarch/src/kbrd/scanc_mac.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -37,5 +37,5 @@
 #include <genarch/kbrd/scanc.h>
 #include <typedefs.h>
-#include <string.h>
+#include <str.h>
 
 /** Primary meaning of scancodes. */
Index: kernel/genarch/src/kbrd/scanc_pc.c
===================================================================
--- kernel/genarch/src/kbrd/scanc_pc.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/genarch/src/kbrd/scanc_pc.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -37,5 +37,5 @@
 #include <genarch/kbrd/scanc.h>
 #include <typedefs.h>
-#include <string.h>
+#include <str.h>
 
 /** Primary meaning of scancodes. */
Index: kernel/genarch/src/kbrd/scanc_pl050.c
===================================================================
--- kernel/genarch/src/kbrd/scanc_pl050.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/genarch/src/kbrd/scanc_pl050.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,5 @@
 #include <genarch/kbrd/scanc.h>
 #include <typedefs.h>
-#include <string.h>
+#include <str.h>
 
 
Index: kernel/genarch/src/kbrd/scanc_sun.c
===================================================================
--- kernel/genarch/src/kbrd/scanc_sun.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/genarch/src/kbrd/scanc_sun.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -37,5 +37,5 @@
 #include <genarch/kbrd/scanc.h>
 #include <typedefs.h>
-#include <string.h>
+#include <str.h>
 
 /** Primary meaning of scancodes. */
Index: kernel/genarch/src/mm/as_ht.c
===================================================================
--- kernel/genarch/src/mm/as_ht.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/genarch/src/mm/as_ht.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -41,5 +41,5 @@
 #include <mm/as.h>
 #include <mm/frame.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <memstr.h>
 #include <adt/hash_table.h>
Index: kernel/genarch/src/mm/as_pt.c
===================================================================
--- kernel/genarch/src/mm/as_pt.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/genarch/src/mm/as_pt.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -43,5 +43,5 @@
 #include <arch/mm/page.h>
 #include <arch/mm/as.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <memstr.h>
 #include <arch.h>
Index: kernel/genarch/src/mm/page_ht.c
===================================================================
--- kernel/genarch/src/mm/page_ht.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/genarch/src/mm/page_ht.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -43,5 +43,5 @@
 #include <mm/as.h>
 #include <arch/mm/asid.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <arch/asm.h>
 #include <synch/spinlock.h>
Index: kernel/genarch/src/mm/page_pt.c
===================================================================
--- kernel/genarch/src/mm/page_pt.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/genarch/src/mm/page_pt.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -42,5 +42,5 @@
 #include <arch/mm/page.h>
 #include <arch/mm/as.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <arch/asm.h>
 #include <memstr.h>
Index: kernel/genarch/src/multiboot/multiboot.c
===================================================================
--- kernel/genarch/src/multiboot/multiboot.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/genarch/src/multiboot/multiboot.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -34,8 +34,7 @@
 
 #include <genarch/multiboot/multiboot.h>
-#include <arch/types.h>
 #include <typedefs.h>
 #include <config.h>
-#include <string.h>
+#include <str.h>
 #include <macros.h>
 
Index: kernel/genarch/src/ofw/ebus.c
===================================================================
--- kernel/genarch/src/ofw/ebus.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/genarch/src/ofw/ebus.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -40,5 +40,5 @@
 #include <genarch/ofw/pci.h>
 #include <arch/memstr.h>
-#include <string.h>
+#include <str.h>
 #include <panic.h>
 #include <debug.h>
Index: kernel/genarch/src/ofw/fhc.c
===================================================================
--- kernel/genarch/src/ofw/fhc.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/genarch/src/ofw/fhc.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -40,5 +40,5 @@
 #include <arch/drivers/fhc.h>
 #include <arch/memstr.h>
-#include <string.h>
+#include <str.h>
 #include <panic.h>
 #include <macros.h>
Index: kernel/genarch/src/ofw/ofw_tree.c
===================================================================
--- kernel/genarch/src/ofw/ofw_tree.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/genarch/src/ofw/ofw_tree.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -39,5 +39,5 @@
 #include <arch/memstr.h>
 #include <mm/slab.h>
-#include <string.h>
+#include <str.h>
 #include <panic.h>
 #include <print.h>
Index: kernel/genarch/src/ofw/pci.c
===================================================================
--- kernel/genarch/src/ofw/pci.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/genarch/src/ofw/pci.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -41,10 +41,10 @@
 #include <arch/trap/interrupt.h>
 #include <arch/memstr.h>
-#include <string.h>
+#include <str.h>
 #include <panic.h>
 #include <macros.h>
 
 #define PCI_SPACE_MASK		0x03000000
-#define PCI_ABS_MASK		0x80000000	
+#define PCI_ABS_MASK		0x80000000
 #define PCI_REG_MASK		0x000000ff
 
Index: kernel/genarch/src/srln/srln.c
===================================================================
--- kernel/genarch/src/srln/srln.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/genarch/src/srln/srln.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -40,5 +40,5 @@
 #include <proc/thread.h>
 #include <arch.h>
-#include <string.h>
+#include <str.h>
 
 static indev_operations_t srln_raw_ops = {
Index: kernel/generic/include/adt/avl.h
===================================================================
--- kernel/generic/include/adt/avl.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/generic/include/adt/avl.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,4 @@
 #define KERN_AVLTREE_H_ 
 
-#include <arch/types.h>
 #include <typedefs.h>
 
Index: kernel/generic/include/adt/bitmap.h
===================================================================
--- kernel/generic/include/adt/bitmap.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/generic/include/adt/bitmap.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,5 @@
 #define KERN_BITMAP_H_
 
-#include <arch/types.h>
+#include <typedefs.h>
 
 #define BITS2BYTES(bits)	(bits ? ((((bits)-1)>>3)+1) : 0)
Index: kernel/generic/include/adt/btree.h
===================================================================
--- kernel/generic/include/adt/btree.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/generic/include/adt/btree.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,5 @@
 #define KERN_BTREE_H_
 
-#include <arch/types.h>
+#include <typedefs.h>
 #include <adt/list.h>
 
Index: kernel/generic/include/adt/hash_table.h
===================================================================
--- kernel/generic/include/adt/hash_table.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/generic/include/adt/hash_table.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -37,5 +37,5 @@
 
 #include <adt/list.h>
-#include <arch/types.h>
+#include <typedefs.h>
 
 /** Set of operations for hash table. */
Index: kernel/generic/include/adt/list.h
===================================================================
--- kernel/generic/include/adt/list.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/generic/include/adt/list.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,4 @@
 #define KERN_LIST_H_
 
-#include <arch/types.h>
 #include <typedefs.h>
 
Index: kernel/generic/include/atomic.h
===================================================================
--- kernel/generic/include/atomic.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/generic/include/atomic.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,10 +36,5 @@
 #define KERN_ATOMIC_H_
 
-#include <arch/types.h>
-
-typedef struct atomic {
-	volatile atomic_count_t count;
-} atomic_t;
-
+#include <typedefs.h>
 #include <arch/atomic.h>
 
Index: kernel/generic/include/byteorder.h
===================================================================
--- kernel/generic/include/byteorder.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/generic/include/byteorder.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,5 @@
 #define KERN_BYTEORDER_H_
 
-#include <arch/types.h>
+#include <typedefs.h>
 
 #if !(defined(__BE__) ^ defined(__LE__))
Index: kernel/generic/include/config.h
===================================================================
--- kernel/generic/include/config.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/generic/include/config.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,5 @@
 #define KERN_CONFIG_H_
 
-#include <arch/types.h>
+#include <typedefs.h>
 #include <arch/mm/page.h>
 
Index: kernel/generic/include/console/chardev.h
===================================================================
--- kernel/generic/include/console/chardev.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/generic/include/console/chardev.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -37,5 +37,5 @@
 
 #include <adt/list.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <synch/waitq.h>
 #include <synch/spinlock.h>
Index: kernel/generic/include/console/console.h
===================================================================
--- kernel/generic/include/console/console.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/generic/include/console/console.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,5 @@
 #define KERN_CONSOLE_H_
 
-#include <arch/types.h>
+#include <typedefs.h>
 #include <console/chardev.h>
 
Index: kernel/generic/include/context.h
===================================================================
--- kernel/generic/include/context.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/generic/include/context.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,5 @@
 #define KERN_CONTEXT_H_
 
-#include <arch/types.h>
+#include <typedefs.h>
 #include <arch/context.h>
 
Index: kernel/generic/include/ddi/ddi.h
===================================================================
--- kernel/generic/include/ddi/ddi.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/generic/include/ddi/ddi.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -37,5 +37,5 @@
 
 #include <ddi/ddi_arg.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <proc/task.h>
 #include <adt/list.h>
Index: kernel/generic/include/ddi/device.h
===================================================================
--- kernel/generic/include/ddi/device.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/generic/include/ddi/device.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,4 @@
 #define KERN_DEVICE_H_
 
-#include <arch/types.h>
 #include <typedefs.h>
 
Index: kernel/generic/include/ddi/irq.h
===================================================================
--- kernel/generic/include/ddi/irq.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/generic/include/ddi/irq.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -81,5 +81,5 @@
 #ifdef KERNEL
 
-#include <arch/types.h>
+#include <typedefs.h>
 #include <adt/list.h>
 #include <adt/hash_table.h>
Index: kernel/generic/include/func.h
===================================================================
--- kernel/generic/include/func.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/generic/include/func.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup generic	
+/** @addtogroup generic
  * @{
  */
@@ -36,5 +36,5 @@
 #define KERN_FUNC_H_
 
-#include <arch/types.h>
+#include <typedefs.h>
 #include <atomic.h>
 
Index: kernel/generic/include/interrupt.h
===================================================================
--- kernel/generic/include/interrupt.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/generic/include/interrupt.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -37,5 +37,5 @@
 
 #include <arch/interrupt.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <proc/task.h>
 #include <proc/thread.h>
Index: kernel/generic/include/ipc/event.h
===================================================================
--- kernel/generic/include/ipc/event.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/generic/include/ipc/event.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -37,5 +37,5 @@
 
 #include <ipc/event_types.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <synch/spinlock.h>
 #include <ipc/ipc.h>
Index: kernel/generic/include/ipc/irq.h
===================================================================
--- kernel/generic/include/ipc/irq.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/generic/include/ipc/irq.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -41,5 +41,5 @@
 #include <ipc/ipc.h>
 #include <ddi/irq.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <adt/list.h>
 
Index: kernel/generic/include/ipc/sysipc.h
===================================================================
--- kernel/generic/include/ipc/sysipc.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/generic/include/ipc/sysipc.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -38,5 +38,5 @@
 #include <ipc/ipc.h>
 #include <ipc/irq.h>
-#include <arch/types.h>
+#include <typedefs.h>
 
 unative_t sys_ipc_call_sync_fast(unative_t phoneid, unative_t method, 
Index: kernel/generic/include/lib/elf.h
===================================================================
--- kernel/generic/include/lib/elf.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/generic/include/lib/elf.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -37,13 +37,13 @@
 
 #include <arch/elf.h>
-#include <arch/types.h>
+#include <typedefs.h>
 
 /**
  * current ELF version
  */
-#define	EV_CURRENT	1
-
-/** 
- * ELF types 
+#define EV_CURRENT	1
+
+/**
+ * ELF types
  */
 #define ET_NONE		0	/* No type */
Index: kernel/generic/include/lib/rd.h
===================================================================
--- kernel/generic/include/lib/rd.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/generic/include/lib/rd.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,10 +36,10 @@
 #define KERN_RD_H_
 
-#include <arch/types.h>
+#include <typedefs.h>
 
 /**
  * RAM disk version
  */
-#define	RD_VERSION	1
+#define RD_VERSION	1
 
 /**
Index: kernel/generic/include/macros.h
===================================================================
--- kernel/generic/include/macros.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/generic/include/macros.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -38,5 +38,5 @@
 #ifndef __ASM__
 
-#include <arch/types.h>
+#include <typedefs.h>
 
 /** Return true if the intervals overlap.
Index: kernel/generic/include/main/main.h
===================================================================
--- kernel/generic/include/main/main.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/generic/include/main/main.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,5 @@
 #define KERN_MAIN_H_
 
-#include <arch/types.h>
+#include <typedefs.h>
 
 extern size_t hardcoded_kdata_size;
Index: kernel/generic/include/main/uinit.h
===================================================================
--- kernel/generic/include/main/uinit.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/generic/include/main/uinit.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,6 +36,4 @@
 #define KERN_UINIT_H_
 
-#include <arch/types.h>
-
 extern void uinit(void *arg);
 
Index: kernel/generic/include/memstr.h
===================================================================
--- kernel/generic/include/memstr.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/generic/include/memstr.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup generic	
+/** @addtogroup generic
  * @{
  */
@@ -36,5 +36,5 @@
 #define KERN_MEMSTR_H_
 
-#include <arch/types.h>
+#include <typedefs.h>
 #include <arch/memstr.h>
 
Index: kernel/generic/include/mm/as.h
===================================================================
--- kernel/generic/include/mm/as.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/generic/include/mm/as.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -37,7 +37,7 @@
 
 #ifdef KERNEL
-#include <arch/types.h>
+	#include <typedefs.h>
 #else
-#include <sys/types.h>
+	#include <sys/types.h>
 #endif
 
@@ -65,5 +65,5 @@
 #include <arch/mm/as.h>
 #include <arch/mm/asid.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <synch/spinlock.h>
 #include <synch/mutex.h>
Index: kernel/generic/include/mm/buddy.h
===================================================================
--- kernel/generic/include/mm/buddy.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/generic/include/mm/buddy.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,5 @@
 #define KERN_BUDDY_H_
 
-#include <arch/types.h>
+#include <typedefs.h>
 #include <adt/list.h>
 
Index: kernel/generic/include/mm/frame.h
===================================================================
--- kernel/generic/include/mm/frame.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/generic/include/mm/frame.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -37,5 +37,5 @@
 #define KERN_FRAME_H_
 
-#include <arch/types.h>
+#include <typedefs.h>
 #include <adt/list.h>
 #include <mm/buddy.h>
Index: kernel/generic/include/mm/page.h
===================================================================
--- kernel/generic/include/mm/page.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/generic/include/mm/page.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,5 @@
 #define KERN_PAGE_H_
 
-#include <arch/types.h>
+#include <typedefs.h>
 #include <mm/as.h>
 #include <memstr.h>
Index: kernel/generic/include/mm/tlb.h
===================================================================
--- kernel/generic/include/mm/tlb.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/generic/include/mm/tlb.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -37,5 +37,5 @@
 
 #include <arch/mm/asid.h>
-#include <arch/types.h>
+#include <typedefs.h>
 
 /**
Index: kernel/generic/include/print.h
===================================================================
--- kernel/generic/include/print.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/generic/include/print.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,5 @@
 #define KERN_PRINT_H_
 
-#include <arch/types.h>
+#include <typedefs.h>
 #include <stdarg.h>
 
Index: kernel/generic/include/proc/program.h
===================================================================
--- kernel/generic/include/proc/program.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/generic/include/proc/program.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,5 @@
 #define KERN_PROGRAM_H_
 
-#include <arch/types.h>
+#include <typedefs.h>
 
 struct task;
Index: kernel/generic/include/proc/scheduler.h
===================================================================
--- kernel/generic/include/proc/scheduler.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/generic/include/proc/scheduler.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -37,16 +37,17 @@
 
 #include <synch/spinlock.h>
-#include <time/clock.h>		/* HZ */
+#include <time/clock.h>
+#include <typedefs.h>
 #include <atomic.h>
 #include <adt/list.h>
 
-#define RQ_COUNT 		16
-#define NEEDS_RELINK_MAX	(HZ)
+#define RQ_COUNT          16
+#define NEEDS_RELINK_MAX  (HZ)
 
 /** Scheduler run queue structure. */
 typedef struct {
 	SPINLOCK_DECLARE(lock);
-	link_t rq_head;		/**< List of ready threads. */
-	size_t n;		/**< Number of threads in rq_ready. */
+	link_t rq_head;          /**< List of ready threads. */
+	size_t n;                /**< Number of threads in rq_ready. */
 } runq_t;
 
@@ -61,5 +62,5 @@
 
 /*
- * To be defined by architectures:
+ * To be defined by architectures.
  */
 extern void before_task_runs_arch(void);
Index: kernel/generic/include/security/cap.h
===================================================================
--- kernel/generic/include/security/cap.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/generic/include/security/cap.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -49,5 +49,5 @@
 
 #include <syscall/sysarg64.h>
-#include <arch/types.h>
+#include <typedefs.h>
 
 /**
Index: kernel/generic/include/sort.h
===================================================================
--- kernel/generic/include/sort.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/generic/include/sort.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup generic	
+/** @addtogroup generic
  * @{
  */
@@ -36,5 +36,5 @@
 #define KERN_SORT_H_
 
-#include <arch/types.h>
+#include <typedefs.h>
 
 /* 
Index: kernel/generic/include/stacktrace.h
===================================================================
--- kernel/generic/include/stacktrace.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/generic/include/stacktrace.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup genericdebug 
+/** @addtogroup genericdebug
  * @{
  */
@@ -36,5 +36,4 @@
 #define KERN_STACKTRACE_H_
 
-#include <arch/types.h>
 #include <typedefs.h>
 
Index: kernel/generic/include/str.h
===================================================================
--- kernel/generic/include/str.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ kernel/generic/include/str.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,99 @@
+/*
+ * Copyright (c) 2001-2004 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 generic
+ * @{
+ */
+/** @file
+ */
+
+#ifndef KERN_STR_H_
+#define KERN_STR_H_
+
+#include <typedefs.h>
+
+/**< Common Unicode characters */
+#define U_SPECIAL      '?'
+
+#define U_LEFT_ARROW   0x2190
+#define U_UP_ARROW     0x2191
+#define U_RIGHT_ARROW  0x2192
+#define U_DOWN_ARROW   0x2193
+
+#define U_PAGE_UP      0x21de
+#define U_PAGE_DOWN    0x21df
+
+#define U_HOME_ARROW   0x21f1
+#define U_END_ARROW    0x21f2
+
+#define U_NULL         0x2400
+#define U_ESCAPE       0x241b
+#define U_DELETE       0x2421
+
+#define U_CURSOR       0x2588
+
+/**< No size limit constant */
+#define STR_NO_LIMIT  ((size_t) -1)
+
+/**< Maximum size of a string containing cnt characters */
+#define STR_BOUNDS(cnt)  (cnt << 2)
+
+extern wchar_t str_decode(const char *str, size_t *offset, size_t sz);
+extern int chr_encode(wchar_t ch, char *str, size_t *offset, size_t sz);
+
+extern size_t str_size(const char *str);
+extern size_t wstr_size(const wchar_t *str);
+
+extern size_t str_lsize(const char *str, size_t max_len);
+extern size_t wstr_lsize(const wchar_t *str, size_t max_len);
+
+extern size_t str_length(const char *str);
+extern size_t wstr_length(const wchar_t *wstr);
+
+extern size_t str_nlength(const char *str, size_t size);
+extern size_t wstr_nlength(const wchar_t *str, size_t size);
+
+extern bool ascii_check(wchar_t ch);
+extern bool chr_check(wchar_t ch);
+
+extern int str_cmp(const char *s1, const char *s2);
+extern int str_lcmp(const char *s1, const char *s2, size_t max_len);
+
+extern void str_cpy(char *dest, size_t size, const char *src);
+extern void str_ncpy(char *dest, size_t size, const char *src, size_t n);
+extern void wstr_to_str(char *dest, size_t size, const wchar_t *src);
+
+extern char *str_chr(const char *str, wchar_t ch);
+
+extern bool wstr_linsert(wchar_t *str, wchar_t ch, size_t pos, size_t max_pos);
+extern bool wstr_remove(wchar_t *str, size_t pos);
+
+#endif
+
+/** @}
+ */
Index: rnel/generic/include/string.h
===================================================================
--- kernel/generic/include/string.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,99 +1,0 @@
-/*
- * Copyright (c) 2001-2004 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 generic
- * @{
- */
-/** @file
- */
-
-#ifndef KERN_STRING_H_
-#define KERN_STRING_H_
-
-#include <typedefs.h>
-
-/**< Common Unicode characters */
-#define U_SPECIAL      '?'
-
-#define U_LEFT_ARROW   0x2190
-#define U_UP_ARROW     0x2191
-#define U_RIGHT_ARROW  0x2192
-#define U_DOWN_ARROW   0x2193
-
-#define U_PAGE_UP      0x21de
-#define U_PAGE_DOWN    0x21df
-
-#define U_HOME_ARROW   0x21f1
-#define U_END_ARROW    0x21f2
-
-#define U_NULL         0x2400
-#define U_ESCAPE       0x241b
-#define U_DELETE       0x2421
-
-#define U_CURSOR       0x2588
-
-/**< No size limit constant */
-#define STR_NO_LIMIT  ((size_t) -1)
-
-/**< Maximum size of a string containing cnt characters */
-#define STR_BOUNDS(cnt)  (cnt << 2)
-
-extern wchar_t str_decode(const char *str, size_t *offset, size_t sz);
-extern int chr_encode(wchar_t ch, char *str, size_t *offset, size_t sz);
-
-extern size_t str_size(const char *str);
-extern size_t wstr_size(const wchar_t *str);
-
-extern size_t str_lsize(const char *str, size_t max_len);
-extern size_t wstr_lsize(const wchar_t *str, size_t max_len);
-
-extern size_t str_length(const char *str);
-extern size_t wstr_length(const wchar_t *wstr);
-
-extern size_t str_nlength(const char *str, size_t size);
-extern size_t wstr_nlength(const wchar_t *str, size_t size);
-
-extern bool ascii_check(wchar_t ch);
-extern bool chr_check(wchar_t ch);
-
-extern int str_cmp(const char *s1, const char *s2);
-extern int str_lcmp(const char *s1, const char *s2, size_t max_len);
-
-extern void str_cpy(char *dest, size_t size, const char *src);
-extern void str_ncpy(char *dest, size_t size, const char *src, size_t n);
-extern void wstr_to_str(char *dest, size_t size, const wchar_t *src);
-
-extern char *str_chr(const char *str, wchar_t ch);
-
-extern bool wstr_linsert(wchar_t *str, wchar_t ch, size_t pos, size_t max_pos);
-extern bool wstr_remove(wchar_t *str, size_t pos);
-
-#endif
-
-/** @}
- */
Index: kernel/generic/include/symtab.h
===================================================================
--- kernel/generic/include/symtab.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/generic/include/symtab.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,5 @@
 #define KERN_SYMTAB_H_
 
-#include <arch/types.h>
+#include <typedefs.h>
 
 #define MAX_SYMBOL_NAME 64
Index: kernel/generic/include/synch/condvar.h
===================================================================
--- kernel/generic/include/synch/condvar.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/generic/include/synch/condvar.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,5 @@
 #define KERN_CONDVAR_H_
 
-#include <arch/types.h>
+#include <typedefs.h>
 #include <synch/waitq.h>
 #include <synch/mutex.h>
Index: kernel/generic/include/synch/futex.h
===================================================================
--- kernel/generic/include/synch/futex.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/generic/include/synch/futex.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,5 @@
 #define KERN_FUTEX_H_
 
-#include <arch/types.h>
+#include <typedefs.h>
 #include <synch/waitq.h>
 
Index: kernel/generic/include/synch/mutex.h
===================================================================
--- kernel/generic/include/synch/mutex.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/generic/include/synch/mutex.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,5 @@
 #define KERN_MUTEX_H_
 
-#include <arch/types.h>
+#include <typedefs.h>
 #include <synch/semaphore.h>
 #include <synch/synch.h>
Index: kernel/generic/include/synch/rwlock.h
===================================================================
--- kernel/generic/include/synch/rwlock.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/generic/include/synch/rwlock.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,5 @@
 #define KERN_RWLOCK_H_
 
-#include <arch/types.h>
+#include <typedefs.h>
 #include <synch/mutex.h>
 #include <synch/synch.h>
Index: kernel/generic/include/synch/semaphore.h
===================================================================
--- kernel/generic/include/synch/semaphore.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/generic/include/synch/semaphore.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,5 @@
 #define KERN_SEMAPHORE_H_
 
-#include <arch/types.h>
+#include <typedefs.h>
 #include <synch/waitq.h>
 #include <synch/synch.h>
Index: kernel/generic/include/synch/spinlock.h
===================================================================
--- kernel/generic/include/synch/spinlock.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/generic/include/synch/spinlock.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,5 @@
 #define KERN_SPINLOCK_H_
 
-#include <arch/types.h>
+#include <typedefs.h>
 #include <arch/barrier.h>
 #include <preemption.h>
Index: kernel/generic/include/synch/waitq.h
===================================================================
--- kernel/generic/include/synch/waitq.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/generic/include/synch/waitq.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,5 @@
 #define KERN_WAITQ_H_
 
-#include <arch/types.h>
+#include <typedefs.h>
 #include <synch/spinlock.h>
 #include <synch/synch.h>
Index: kernel/generic/include/syscall/copy.h
===================================================================
--- kernel/generic/include/syscall/copy.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/generic/include/syscall/copy.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,5 @@
 #define KERN_COPY_H_
 
-#include <arch/types.h>
+#include <typedefs.h>
 
 /** Label within memcpy_from_uspace() that contains return -1. */
Index: kernel/generic/include/syscall/syscall.h
===================================================================
--- kernel/generic/include/syscall/syscall.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/generic/include/syscall/syscall.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -93,5 +93,5 @@
 #ifdef KERNEL
 
-#include <arch/types.h>
+#include <typedefs.h>
 
 typedef unative_t (*syshandler_t)(unative_t, unative_t, unative_t, unative_t,
Index: kernel/generic/include/sysinfo/sysinfo.h
===================================================================
--- kernel/generic/include/sysinfo/sysinfo.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/generic/include/sysinfo/sysinfo.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,6 +36,6 @@
 #define KERN_SYSINFO_H_
 
-#include <arch/types.h>
-#include <string.h>
+#include <typedefs.h>
+#include <str.h>
 
 extern bool fb_exported;
Index: kernel/generic/include/time/clock.h
===================================================================
--- kernel/generic/include/time/clock.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/generic/include/time/clock.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,5 @@
 #define KERN_CLOCK_H_
 
-#include <arch/types.h>
+#include <typedefs.h>
 
 #define HZ		100
Index: kernel/generic/include/time/delay.h
===================================================================
--- kernel/generic/include/time/delay.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/generic/include/time/delay.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,5 @@
 #define KERN_DELAY_H_
 
-#include <arch/types.h>
+#include <typedefs.h>
 
 extern void delay(uint32_t microseconds);
Index: kernel/generic/include/time/timeout.h
===================================================================
--- kernel/generic/include/time/timeout.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/generic/include/time/timeout.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,5 @@
 #define KERN_TIMEOUT_H_
 
-#include <arch/types.h>
+#include <typedefs.h>
 #include <adt/list.h>
 #include <cpu.h>
Index: kernel/generic/include/typedefs.h
===================================================================
--- kernel/generic/include/typedefs.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/generic/include/typedefs.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,9 +36,25 @@
 #define KERN_TYPEDEFS_H_
 
+#include <arch/common.h>
 #include <arch/types.h>
 
-#define NULL 0
-#define false 0
-#define true 1
+#define NULL  0
+
+#define false  0
+#define true   1
+
+typedef struct {
+	uint64_t lo;
+	int64_t hi;
+} int128_t;
+
+typedef struct {
+	uint64_t lo;
+	uint64_t hi;
+} uint128_t;
+
+typedef struct {
+	volatile atomic_count_t count;
+} atomic_t;
 
 typedef void (* function)();
Index: kernel/generic/include/userspace.h
===================================================================
--- kernel/generic/include/userspace.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/generic/include/userspace.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup generic	
+/** @addtogroup generic
  * @{
  */
@@ -37,5 +37,5 @@
 
 #include <proc/thread.h>
-#include <arch/types.h>
+#include <typedefs.h>
 
 /** Switch to user-space (CPU user priviledge level) */
Index: kernel/generic/src/adt/bitmap.c
===================================================================
--- kernel/generic/src/adt/bitmap.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/generic/src/adt/bitmap.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -39,5 +39,5 @@
 
 #include <adt/bitmap.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <align.h>
 #include <debug.h>
Index: kernel/generic/src/adt/hash_table.c
===================================================================
--- kernel/generic/src/adt/hash_table.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/generic/src/adt/hash_table.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -40,5 +40,5 @@
 #include <adt/hash_table.h>
 #include <adt/list.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <debug.h>
 #include <mm/slab.h>
Index: kernel/generic/src/console/cmd.c
===================================================================
--- kernel/generic/src/console/cmd.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/generic/src/console/cmd.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -46,10 +46,10 @@
 #include <print.h>
 #include <panic.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <adt/list.h>
 #include <arch.h>
 #include <config.h>
 #include <func.h>
-#include <string.h>
+#include <str.h>
 #include <macros.h>
 #include <debug.h>
Index: kernel/generic/src/console/console.c
===================================================================
--- kernel/generic/src/console/console.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/generic/src/console/console.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -39,5 +39,5 @@
 #include <synch/waitq.h>
 #include <synch/spinlock.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <ddi/irq.h>
 #include <ddi/ddi.h>
@@ -51,5 +51,5 @@
 #include <syscall/copy.h>
 #include <errno.h>
-#include <string.h>
+#include <str.h>
 
 #define KLOG_PAGES    4
Index: kernel/generic/src/console/kconsole.c
===================================================================
--- kernel/generic/src/console/kconsole.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/generic/src/console/kconsole.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -45,5 +45,5 @@
 #include <print.h>
 #include <panic.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <adt/list.h>
 #include <arch.h>
@@ -51,5 +51,5 @@
 #include <debug.h>
 #include <func.h>
-#include <string.h>
+#include <str.h>
 #include <macros.h>
 #include <sysinfo/sysinfo.h>
@@ -58,5 +58,5 @@
 #include <errno.h>
 #include <putchar.h>
-#include <string.h>
+#include <str.h>
 
 /** Simple kernel console.
Index: kernel/generic/src/cpu/cpu.c
===================================================================
--- kernel/generic/src/cpu/cpu.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/generic/src/cpu/cpu.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -42,5 +42,5 @@
 #include <mm/page.h>
 #include <mm/frame.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <config.h>
 #include <panic.h>
Index: kernel/generic/src/ddi/device.c
===================================================================
--- kernel/generic/src/ddi/device.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/generic/src/ddi/device.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -35,5 +35,5 @@
  */
 
-#include <arch/types.h>
+#include <typedefs.h>
 #include <ddi/device.h>
 #include <atomic.h>
Index: kernel/generic/src/ddi/irq.c
===================================================================
--- kernel/generic/src/ddi/irq.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/generic/src/ddi/irq.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -71,5 +71,5 @@
 #include <adt/hash_table.h>
 #include <mm/slab.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <synch/spinlock.h>
 #include <console/console.h>
Index: kernel/generic/src/debug/stacktrace.c
===================================================================
--- kernel/generic/src/debug/stacktrace.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/generic/src/debug/stacktrace.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -35,5 +35,5 @@
 #include <stacktrace.h>
 #include <interrupt.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <symtab.h>
 
Index: kernel/generic/src/debug/symtab.c
===================================================================
--- kernel/generic/src/debug/symtab.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/generic/src/debug/symtab.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -38,7 +38,7 @@
 #include <symtab.h>
 #include <byteorder.h>
-#include <string.h>
+#include <str.h>
 #include <print.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <typedefs.h>
 #include <errno.h>
Index: kernel/generic/src/ipc/event.c
===================================================================
--- kernel/generic/src/ipc/event.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/generic/src/ipc/event.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -38,5 +38,5 @@
 #include <ipc/event_types.h>
 #include <mm/slab.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <synch/spinlock.h>
 #include <console/console.h>
Index: kernel/generic/src/lib/elf.c
===================================================================
--- kernel/generic/src/lib/elf.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/generic/src/lib/elf.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -39,5 +39,5 @@
 #include <lib/elf.h>
 #include <debug.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <mm/as.h>
 #include <mm/frame.h>
Index: kernel/generic/src/lib/memstr.c
===================================================================
--- kernel/generic/src/lib/memstr.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/generic/src/lib/memstr.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -43,5 +43,5 @@
 
 #include <memstr.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <align.h>
 
Index: kernel/generic/src/lib/str.c
===================================================================
--- kernel/generic/src/lib/str.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ kernel/generic/src/lib/str.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,708 @@
+/*
+ * Copyright (c) 2001-2004 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 generic
+ * @{
+ */
+
+/**
+ * @file
+ * @brief String functions.
+ *
+ * Strings and characters use the Universal Character Set (UCS). The standard
+ * strings, called just strings are encoded in UTF-8. Wide strings (encoded
+ * in UTF-32) are supported to a limited degree. A single character is
+ * represented as wchar_t.@n
+ *
+ * Overview of the terminology:@n
+ *
+ *  Term                  Meaning
+ *  --------------------  ----------------------------------------------------
+ *  byte                  8 bits stored in uint8_t (unsigned 8 bit integer)
+ *
+ *  character             UTF-32 encoded Unicode character, stored in wchar_t
+ *                        (signed 32 bit integer), code points 0 .. 1114111
+ *                        are valid
+ *
+ *  ASCII character       7 bit encoded ASCII character, stored in char
+ *                        (usually signed 8 bit integer), code points 0 .. 127
+ *                        are valid
+ *
+ *  string                UTF-8 encoded NULL-terminated Unicode string, char *
+ *
+ *  wide string           UTF-32 encoded NULL-terminated Unicode string,
+ *                        wchar_t *
+ *
+ *  [wide] string size    number of BYTES in a [wide] string (excluding
+ *                        the NULL-terminator), size_t
+ *
+ *  [wide] string length  number of CHARACTERS in a [wide] string (excluding
+ *                        the NULL-terminator), size_t
+ *
+ *  [wide] string width   number of display cells on a monospace display taken
+ *                        by a [wide] string, size_t
+ *
+ *
+ * Overview of string metrics:@n
+ *
+ *  Metric  Abbrev.  Type     Meaning
+ *  ------  ------   ------   -------------------------------------------------
+ *  size    n        size_t   number of BYTES in a string (excluding the
+ *                            NULL-terminator)
+ *
+ *  length  l        size_t   number of CHARACTERS in a string (excluding the
+ *                            null terminator)
+ *
+ *  width  w         size_t   number of display cells on a monospace display
+ *                            taken by a string
+ *
+ *
+ * Function naming prefixes:@n
+ *
+ *  chr_    operate on characters
+ *  ascii_  operate on ASCII characters
+ *  str_    operate on strings
+ *  wstr_   operate on wide strings
+ *
+ *  [w]str_[n|l|w]  operate on a prefix limited by size, length
+ *                  or width
+ *
+ *
+ * A specific character inside a [wide] string can be referred to by:@n
+ *
+ *  pointer (char *, wchar_t *)
+ *  byte offset (size_t)
+ *  character index (size_t)
+ *
+ */
+
+#include <str.h>
+#include <print.h>
+#include <cpu.h>
+#include <arch/asm.h>
+#include <arch.h>
+#include <errno.h>
+#include <align.h>
+#include <debug.h>
+
+/** Byte mask consisting of lowest @n bits (out of 8) */
+#define LO_MASK_8(n)  ((uint8_t) ((1 << (n)) - 1))
+
+/** Byte mask consisting of lowest @n bits (out of 32) */
+#define LO_MASK_32(n)  ((uint32_t) ((1 << (n)) - 1))
+
+/** Byte mask consisting of highest @n bits (out of 8) */
+#define HI_MASK_8(n)  (~LO_MASK_8(8 - (n)))
+
+/** Number of data bits in a UTF-8 continuation byte */
+#define CONT_BITS  6
+
+/** Decode a single character from a string.
+ *
+ * Decode a single character from a string of size @a size. Decoding starts
+ * at @a offset and this offset is moved to the beginning of the next
+ * character. In case of decoding error, offset generally advances at least
+ * by one. However, offset is never moved beyond size.
+ *
+ * @param str    String (not necessarily NULL-terminated).
+ * @param offset Byte offset in string where to start decoding.
+ * @param size   Size of the string (in bytes).
+ *
+ * @return Value of decoded character, U_SPECIAL on decoding error or
+ *         NULL if attempt to decode beyond @a size.
+ *
+ */
+wchar_t str_decode(const char *str, size_t *offset, size_t size)
+{
+	if (*offset + 1 > size)
+		return 0;
+	
+	/* First byte read from string */
+	uint8_t b0 = (uint8_t) str[(*offset)++];
+	
+	/* Determine code length */
+	
+	unsigned int b0_bits;  /* Data bits in first byte */
+	unsigned int cbytes;   /* Number of continuation bytes */
+	
+	if ((b0 & 0x80) == 0) {
+		/* 0xxxxxxx (Plain ASCII) */
+		b0_bits = 7;
+		cbytes = 0;
+	} else if ((b0 & 0xe0) == 0xc0) {
+		/* 110xxxxx 10xxxxxx */
+		b0_bits = 5;
+		cbytes = 1;
+	} else if ((b0 & 0xf0) == 0xe0) {
+		/* 1110xxxx 10xxxxxx 10xxxxxx */
+		b0_bits = 4;
+		cbytes = 2;
+	} else if ((b0 & 0xf8) == 0xf0) {
+		/* 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx */
+		b0_bits = 3;
+		cbytes = 3;
+	} else {
+		/* 10xxxxxx -- unexpected continuation byte */
+		return U_SPECIAL;
+	}
+	
+	if (*offset + cbytes > size)
+		return U_SPECIAL;
+	
+	wchar_t ch = b0 & LO_MASK_8(b0_bits);
+	
+	/* Decode continuation bytes */
+	while (cbytes > 0) {
+		uint8_t b = (uint8_t) str[(*offset)++];
+		
+		/* Must be 10xxxxxx */
+		if ((b & 0xc0) != 0x80)
+			return U_SPECIAL;
+		
+		/* Shift data bits to ch */
+		ch = (ch << CONT_BITS) | (wchar_t) (b & LO_MASK_8(CONT_BITS));
+		cbytes--;
+	}
+	
+	return ch;
+}
+
+/** Encode a single character to string representation.
+ *
+ * Encode a single character to string representation (i.e. UTF-8) and store
+ * it into a buffer at @a offset. Encoding starts at @a offset and this offset
+ * is moved to the position where the next character can be written to.
+ *
+ * @param ch     Input character.
+ * @param str    Output buffer.
+ * @param offset Byte offset where to start writing.
+ * @param size   Size of the output buffer (in bytes).
+ *
+ * @return EOK if the character was encoded successfully, EOVERFLOW if there
+ *	   was not enough space in the output buffer or EINVAL if the character
+ *	   code was invalid.
+ */
+int chr_encode(wchar_t ch, char *str, size_t *offset, size_t size)
+{
+	if (*offset >= size)
+		return EOVERFLOW;
+	
+	if (!chr_check(ch))
+		return EINVAL;
+	
+	/* Unsigned version of ch (bit operations should only be done
+	   on unsigned types). */
+	uint32_t cc = (uint32_t) ch;
+	
+	/* Determine how many continuation bytes are needed */
+	
+	unsigned int b0_bits;  /* Data bits in first byte */
+	unsigned int cbytes;   /* Number of continuation bytes */
+	
+	if ((cc & ~LO_MASK_32(7)) == 0) {
+		b0_bits = 7;
+		cbytes = 0;
+	} else if ((cc & ~LO_MASK_32(11)) == 0) {
+		b0_bits = 5;
+		cbytes = 1;
+	} else if ((cc & ~LO_MASK_32(16)) == 0) {
+		b0_bits = 4;
+		cbytes = 2;
+	} else if ((cc & ~LO_MASK_32(21)) == 0) {
+		b0_bits = 3;
+		cbytes = 3;
+	} else {
+		/* Codes longer than 21 bits are not supported */
+		return EINVAL;
+	}
+	
+	/* Check for available space in buffer */
+	if (*offset + cbytes >= size)
+		return EOVERFLOW;
+	
+	/* Encode continuation bytes */
+	unsigned int i;
+	for (i = cbytes; i > 0; i--) {
+		str[*offset + i] = 0x80 | (cc & LO_MASK_32(CONT_BITS));
+		cc = cc >> CONT_BITS;
+	}
+	
+	/* Encode first byte */
+	str[*offset] = (cc & LO_MASK_32(b0_bits)) | HI_MASK_8(8 - b0_bits - 1);
+	
+	/* Advance offset */
+	*offset += cbytes + 1;
+	
+	return EOK;
+}
+
+/** Get size of string.
+ *
+ * Get the number of bytes which are used by the string @a str (excluding the
+ * NULL-terminator).
+ *
+ * @param str String to consider.
+ *
+ * @return Number of bytes used by the string
+ *
+ */
+size_t str_size(const char *str)
+{
+	size_t size = 0;
+	
+	while (*str++ != 0)
+		size++;
+	
+	return size;
+}
+
+/** Get size of wide string.
+ *
+ * Get the number of bytes which are used by the wide string @a str (excluding the
+ * NULL-terminator).
+ *
+ * @param str Wide string to consider.
+ *
+ * @return Number of bytes used by the wide string
+ *
+ */
+size_t wstr_size(const wchar_t *str)
+{
+	return (wstr_length(str) * sizeof(wchar_t));
+}
+
+/** Get size of string with length limit.
+ *
+ * Get the number of bytes which are used by up to @a max_len first
+ * characters in the string @a str. If @a max_len is greater than
+ * the length of @a str, the entire string is measured (excluding the
+ * NULL-terminator).
+ *
+ * @param str     String to consider.
+ * @param max_len Maximum number of characters to measure.
+ *
+ * @return Number of bytes used by the characters.
+ *
+ */
+size_t str_lsize(const char *str, size_t max_len)
+{
+	size_t len = 0;
+	size_t offset = 0;
+	
+	while (len < max_len) {
+		if (str_decode(str, &offset, STR_NO_LIMIT) == 0)
+			break;
+		
+		len++;
+	}
+	
+	return offset;
+}
+
+/** Get size of wide string with length limit.
+ *
+ * Get the number of bytes which are used by up to @a max_len first
+ * wide characters in the wide string @a str. If @a max_len is greater than
+ * the length of @a str, the entire wide string is measured (excluding the
+ * NULL-terminator).
+ *
+ * @param str     Wide string to consider.
+ * @param max_len Maximum number of wide characters to measure.
+ *
+ * @return Number of bytes used by the wide characters.
+ *
+ */
+size_t wstr_lsize(const wchar_t *str, size_t max_len)
+{
+	return (wstr_nlength(str, max_len * sizeof(wchar_t)) * sizeof(wchar_t));
+}
+
+/** Get number of characters in a string.
+ *
+ * @param str NULL-terminated string.
+ *
+ * @return Number of characters in string.
+ *
+ */
+size_t str_length(const char *str)
+{
+	size_t len = 0;
+	size_t offset = 0;
+	
+	while (str_decode(str, &offset, STR_NO_LIMIT) != 0)
+		len++;
+	
+	return len;
+}
+
+/** Get number of characters in a wide string.
+ *
+ * @param str NULL-terminated wide string.
+ *
+ * @return Number of characters in @a str.
+ *
+ */
+size_t wstr_length(const wchar_t *wstr)
+{
+	size_t len = 0;
+	
+	while (*wstr++ != 0)
+		len++;
+	
+	return len;
+}
+
+/** Get number of characters in a string with size limit.
+ *
+ * @param str  NULL-terminated string.
+ * @param size Maximum number of bytes to consider.
+ *
+ * @return Number of characters in string.
+ *
+ */
+size_t str_nlength(const char *str, size_t size)
+{
+	size_t len = 0;
+	size_t offset = 0;
+	
+	while (str_decode(str, &offset, size) != 0)
+		len++;
+	
+	return len;
+}
+
+/** Get number of characters in a string with size limit.
+ *
+ * @param str  NULL-terminated string.
+ * @param size Maximum number of bytes to consider.
+ *
+ * @return Number of characters in string.
+ *
+ */
+size_t wstr_nlength(const wchar_t *str, size_t size)
+{
+	size_t len = 0;
+	size_t limit = ALIGN_DOWN(size, sizeof(wchar_t));
+	size_t offset = 0;
+	
+	while ((offset < limit) && (*str++ != 0)) {
+		len++;
+		offset += sizeof(wchar_t);
+	}
+	
+	return len;
+}
+
+/** Check whether character is plain ASCII.
+ *
+ * @return True if character is plain ASCII.
+ *
+ */
+bool ascii_check(wchar_t ch)
+{
+	if ((ch >= 0) && (ch <= 127))
+		return true;
+	
+	return false;
+}
+
+/** Check whether character is valid
+ *
+ * @return True if character is a valid Unicode code point.
+ *
+ */
+bool chr_check(wchar_t ch)
+{
+	if ((ch >= 0) && (ch <= 1114111))
+		return true;
+	
+	return false;
+}
+
+/** Compare two NULL terminated strings.
+ *
+ * Do a char-by-char comparison of two NULL-terminated strings.
+ * The strings are considered equal iff they consist of the same
+ * characters on the minimum of their lengths.
+ *
+ * @param s1 First string to compare.
+ * @param s2 Second string to compare.
+ *
+ * @return 0 if the strings are equal, -1 if first is smaller,
+ *         1 if second smaller.
+ *
+ */
+int str_cmp(const char *s1, const char *s2)
+{
+	wchar_t c1 = 0;
+	wchar_t c2 = 0;
+	
+	size_t off1 = 0;
+	size_t off2 = 0;
+
+	while (true) {
+		c1 = str_decode(s1, &off1, STR_NO_LIMIT);
+		c2 = str_decode(s2, &off2, STR_NO_LIMIT);
+
+		if (c1 < c2)
+			return -1;
+		
+		if (c1 > c2)
+			return 1;
+
+		if (c1 == 0 || c2 == 0)
+			break;		
+	}
+
+	return 0;
+}
+
+/** Compare two NULL terminated strings with length limit.
+ *
+ * Do a char-by-char comparison of two NULL-terminated strings.
+ * The strings are considered equal iff they consist of the same
+ * characters on the minimum of their lengths and the length limit.
+ *
+ * @param s1      First string to compare.
+ * @param s2      Second string to compare.
+ * @param max_len Maximum number of characters to consider.
+ *
+ * @return 0 if the strings are equal, -1 if first is smaller,
+ *         1 if second smaller.
+ *
+ */
+int str_lcmp(const char *s1, const char *s2, size_t max_len)
+{
+	wchar_t c1 = 0;
+	wchar_t c2 = 0;
+	
+	size_t off1 = 0;
+	size_t off2 = 0;
+	
+	size_t len = 0;
+
+	while (true) {
+		if (len >= max_len)
+			break;
+
+		c1 = str_decode(s1, &off1, STR_NO_LIMIT);
+		c2 = str_decode(s2, &off2, STR_NO_LIMIT);
+
+		if (c1 < c2)
+			return -1;
+
+		if (c1 > c2)
+			return 1;
+
+		if (c1 == 0 || c2 == 0)
+			break;
+
+		++len;	
+	}
+
+	return 0;
+
+}
+
+/** Copy string.
+ *
+ * Copy source string @a src to destination buffer @a dest.
+ * No more than @a size bytes are written. If the size of the output buffer
+ * is at least one byte, the output string will always be well-formed, i.e.
+ * null-terminated and containing only complete characters.
+ *
+ * @param dest   Destination buffer.
+ * @param count Size of the destination buffer (must be > 0).
+ * @param src   Source string.
+ */
+void str_cpy(char *dest, size_t size, const char *src)
+{
+	wchar_t ch;
+	size_t src_off;
+	size_t dest_off;
+
+	/* There must be space for a null terminator in the buffer. */
+	ASSERT(size > 0);
+	
+	src_off = 0;
+	dest_off = 0;
+
+	while ((ch = str_decode(src, &src_off, STR_NO_LIMIT)) != 0) {
+		if (chr_encode(ch, dest, &dest_off, size - 1) != EOK)
+			break;
+	}
+
+	dest[dest_off] = '\0';
+}
+
+/** Copy size-limited substring.
+ *
+ * Copy prefix of string @a src of max. size @a size to destination buffer
+ * @a dest. No more than @a size bytes are written. The output string will
+ * always be well-formed, i.e. null-terminated and containing only complete
+ * characters.
+ *
+ * No more than @a n bytes are read from the input string, so it does not
+ * have to be null-terminated.
+ *
+ * @param dest   Destination buffer.
+ * @param count Size of the destination buffer (must be > 0).
+ * @param src   Source string.
+ * @param n	Maximum number of bytes to read from @a src.
+ */
+void str_ncpy(char *dest, size_t size, const char *src, size_t n)
+{
+	wchar_t ch;
+	size_t src_off;
+	size_t dest_off;
+
+	/* There must be space for a null terminator in the buffer. */
+	ASSERT(size > 0);
+	
+	src_off = 0;
+	dest_off = 0;
+
+	while ((ch = str_decode(src, &src_off, n)) != 0) {
+		if (chr_encode(ch, dest, &dest_off, size - 1) != EOK)
+			break;
+	}
+
+	dest[dest_off] = '\0';
+}
+
+/** Convert wide string to string.
+ *
+ * Convert wide string @a src to string. The output is written to the buffer
+ * specified by @a dest and @a size. @a size must be non-zero and the string
+ * written will always be well-formed.
+ *
+ * @param dest	Destination buffer.
+ * @param size	Size of the destination buffer.
+ * @param src	Source wide string.
+ */
+void wstr_to_str(char *dest, size_t size, const wchar_t *src)
+{
+	wchar_t ch;
+	size_t src_idx;
+	size_t dest_off;
+
+	/* There must be space for a null terminator in the buffer. */
+	ASSERT(size > 0);
+
+	src_idx = 0;
+	dest_off = 0;
+	
+	while ((ch = src[src_idx++]) != 0) {
+		if (chr_encode(ch, dest, &dest_off, size - 1) != EOK)
+			break;
+	}
+
+	dest[dest_off] = '\0';
+}
+
+/** Find first occurence of character in string.
+ *
+ * @param str String to search.
+ * @param ch  Character to look for.
+ *
+ * @return Pointer to character in @a str or NULL if not found.
+ *
+ */
+char *str_chr(const char *str, wchar_t ch)
+{
+	wchar_t acc;
+	size_t off = 0;
+	size_t last = 0;
+	
+	while ((acc = str_decode(str, &off, STR_NO_LIMIT)) != 0) {
+		if (acc == ch)
+			return (char *) (str + last);
+		last = off;
+	}
+	
+	return NULL;
+}
+
+/** Insert a wide character into a wide string.
+ *
+ * Insert a wide character into a wide string at position
+ * @a pos. The characters after the position are shifted.
+ *
+ * @param str     String to insert to.
+ * @param ch      Character to insert to.
+ * @param pos     Character index where to insert.
+ @ @param max_pos Characters in the buffer.
+ *
+ * @return True if the insertion was sucessful, false if the position
+ *         is out of bounds.
+ *
+ */
+bool wstr_linsert(wchar_t *str, wchar_t ch, size_t pos, size_t max_pos)
+{
+	size_t len = wstr_length(str);
+	
+	if ((pos > len) || (pos + 1 > max_pos))
+		return false;
+	
+	size_t i;
+	for (i = len; i + 1 > pos; i--)
+		str[i + 1] = str[i];
+	
+	str[pos] = ch;
+	
+	return true;
+}
+
+/** Remove a wide character from a wide string.
+ *
+ * Remove a wide character from a wide string at position
+ * @a pos. The characters after the position are shifted.
+ *
+ * @param str String to remove from.
+ * @param pos Character index to remove.
+ *
+ * @return True if the removal was sucessful, false if the position
+ *         is out of bounds.
+ *
+ */
+bool wstr_remove(wchar_t *str, size_t pos)
+{
+	size_t len = wstr_length(str);
+	
+	if (pos >= len)
+		return false;
+	
+	size_t i;
+	for (i = pos + 1; i <= len; i++)
+		str[i - 1] = str[i];
+	
+	return true;
+}
+
+/** @}
+ */
Index: rnel/generic/src/lib/string.c
===================================================================
--- kernel/generic/src/lib/string.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,708 +1,0 @@
-/*
- * Copyright (c) 2001-2004 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 generic
- * @{
- */
-
-/**
- * @file
- * @brief String functions.
- *
- * Strings and characters use the Universal Character Set (UCS). The standard
- * strings, called just strings are encoded in UTF-8. Wide strings (encoded
- * in UTF-32) are supported to a limited degree. A single character is
- * represented as wchar_t.@n
- *
- * Overview of the terminology:@n
- *
- *  Term                  Meaning
- *  --------------------  ----------------------------------------------------
- *  byte                  8 bits stored in uint8_t (unsigned 8 bit integer)
- *
- *  character             UTF-32 encoded Unicode character, stored in wchar_t
- *                        (signed 32 bit integer), code points 0 .. 1114111
- *                        are valid
- *
- *  ASCII character       7 bit encoded ASCII character, stored in char
- *                        (usually signed 8 bit integer), code points 0 .. 127
- *                        are valid
- *
- *  string                UTF-8 encoded NULL-terminated Unicode string, char *
- *
- *  wide string           UTF-32 encoded NULL-terminated Unicode string,
- *                        wchar_t *
- *
- *  [wide] string size    number of BYTES in a [wide] string (excluding
- *                        the NULL-terminator), size_t
- *
- *  [wide] string length  number of CHARACTERS in a [wide] string (excluding
- *                        the NULL-terminator), size_t
- *
- *  [wide] string width   number of display cells on a monospace display taken
- *                        by a [wide] string, size_t
- *
- *
- * Overview of string metrics:@n
- *
- *  Metric  Abbrev.  Type     Meaning
- *  ------  ------   ------   -------------------------------------------------
- *  size    n        size_t   number of BYTES in a string (excluding the
- *                            NULL-terminator)
- *
- *  length  l        size_t   number of CHARACTERS in a string (excluding the
- *                            null terminator)
- *
- *  width  w         size_t   number of display cells on a monospace display
- *                            taken by a string
- *
- *
- * Function naming prefixes:@n
- *
- *  chr_    operate on characters
- *  ascii_  operate on ASCII characters
- *  str_    operate on strings
- *  wstr_   operate on wide strings
- *
- *  [w]str_[n|l|w]  operate on a prefix limited by size, length
- *                  or width
- *
- *
- * A specific character inside a [wide] string can be referred to by:@n
- *
- *  pointer (char *, wchar_t *)
- *  byte offset (size_t)
- *  character index (size_t)
- *
- */
-
-#include <string.h>
-#include <print.h>
-#include <cpu.h>
-#include <arch/asm.h>
-#include <arch.h>
-#include <errno.h>
-#include <align.h>
-#include <debug.h>
-
-/** Byte mask consisting of lowest @n bits (out of 8) */
-#define LO_MASK_8(n)  ((uint8_t) ((1 << (n)) - 1))
-
-/** Byte mask consisting of lowest @n bits (out of 32) */
-#define LO_MASK_32(n)  ((uint32_t) ((1 << (n)) - 1))
-
-/** Byte mask consisting of highest @n bits (out of 8) */
-#define HI_MASK_8(n)  (~LO_MASK_8(8 - (n)))
-
-/** Number of data bits in a UTF-8 continuation byte */
-#define CONT_BITS  6
-
-/** Decode a single character from a string.
- *
- * Decode a single character from a string of size @a size. Decoding starts
- * at @a offset and this offset is moved to the beginning of the next
- * character. In case of decoding error, offset generally advances at least
- * by one. However, offset is never moved beyond size.
- *
- * @param str    String (not necessarily NULL-terminated).
- * @param offset Byte offset in string where to start decoding.
- * @param size   Size of the string (in bytes).
- *
- * @return Value of decoded character, U_SPECIAL on decoding error or
- *         NULL if attempt to decode beyond @a size.
- *
- */
-wchar_t str_decode(const char *str, size_t *offset, size_t size)
-{
-	if (*offset + 1 > size)
-		return 0;
-	
-	/* First byte read from string */
-	uint8_t b0 = (uint8_t) str[(*offset)++];
-	
-	/* Determine code length */
-	
-	unsigned int b0_bits;  /* Data bits in first byte */
-	unsigned int cbytes;   /* Number of continuation bytes */
-	
-	if ((b0 & 0x80) == 0) {
-		/* 0xxxxxxx (Plain ASCII) */
-		b0_bits = 7;
-		cbytes = 0;
-	} else if ((b0 & 0xe0) == 0xc0) {
-		/* 110xxxxx 10xxxxxx */
-		b0_bits = 5;
-		cbytes = 1;
-	} else if ((b0 & 0xf0) == 0xe0) {
-		/* 1110xxxx 10xxxxxx 10xxxxxx */
-		b0_bits = 4;
-		cbytes = 2;
-	} else if ((b0 & 0xf8) == 0xf0) {
-		/* 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx */
-		b0_bits = 3;
-		cbytes = 3;
-	} else {
-		/* 10xxxxxx -- unexpected continuation byte */
-		return U_SPECIAL;
-	}
-	
-	if (*offset + cbytes > size)
-		return U_SPECIAL;
-	
-	wchar_t ch = b0 & LO_MASK_8(b0_bits);
-	
-	/* Decode continuation bytes */
-	while (cbytes > 0) {
-		uint8_t b = (uint8_t) str[(*offset)++];
-		
-		/* Must be 10xxxxxx */
-		if ((b & 0xc0) != 0x80)
-			return U_SPECIAL;
-		
-		/* Shift data bits to ch */
-		ch = (ch << CONT_BITS) | (wchar_t) (b & LO_MASK_8(CONT_BITS));
-		cbytes--;
-	}
-	
-	return ch;
-}
-
-/** Encode a single character to string representation.
- *
- * Encode a single character to string representation (i.e. UTF-8) and store
- * it into a buffer at @a offset. Encoding starts at @a offset and this offset
- * is moved to the position where the next character can be written to.
- *
- * @param ch     Input character.
- * @param str    Output buffer.
- * @param offset Byte offset where to start writing.
- * @param size   Size of the output buffer (in bytes).
- *
- * @return EOK if the character was encoded successfully, EOVERFLOW if there
- *	   was not enough space in the output buffer or EINVAL if the character
- *	   code was invalid.
- */
-int chr_encode(wchar_t ch, char *str, size_t *offset, size_t size)
-{
-	if (*offset >= size)
-		return EOVERFLOW;
-	
-	if (!chr_check(ch))
-		return EINVAL;
-	
-	/* Unsigned version of ch (bit operations should only be done
-	   on unsigned types). */
-	uint32_t cc = (uint32_t) ch;
-	
-	/* Determine how many continuation bytes are needed */
-	
-	unsigned int b0_bits;  /* Data bits in first byte */
-	unsigned int cbytes;   /* Number of continuation bytes */
-	
-	if ((cc & ~LO_MASK_32(7)) == 0) {
-		b0_bits = 7;
-		cbytes = 0;
-	} else if ((cc & ~LO_MASK_32(11)) == 0) {
-		b0_bits = 5;
-		cbytes = 1;
-	} else if ((cc & ~LO_MASK_32(16)) == 0) {
-		b0_bits = 4;
-		cbytes = 2;
-	} else if ((cc & ~LO_MASK_32(21)) == 0) {
-		b0_bits = 3;
-		cbytes = 3;
-	} else {
-		/* Codes longer than 21 bits are not supported */
-		return EINVAL;
-	}
-	
-	/* Check for available space in buffer */
-	if (*offset + cbytes >= size)
-		return EOVERFLOW;
-	
-	/* Encode continuation bytes */
-	unsigned int i;
-	for (i = cbytes; i > 0; i--) {
-		str[*offset + i] = 0x80 | (cc & LO_MASK_32(CONT_BITS));
-		cc = cc >> CONT_BITS;
-	}
-	
-	/* Encode first byte */
-	str[*offset] = (cc & LO_MASK_32(b0_bits)) | HI_MASK_8(8 - b0_bits - 1);
-	
-	/* Advance offset */
-	*offset += cbytes + 1;
-	
-	return EOK;
-}
-
-/** Get size of string.
- *
- * Get the number of bytes which are used by the string @a str (excluding the
- * NULL-terminator).
- *
- * @param str String to consider.
- *
- * @return Number of bytes used by the string
- *
- */
-size_t str_size(const char *str)
-{
-	size_t size = 0;
-	
-	while (*str++ != 0)
-		size++;
-	
-	return size;
-}
-
-/** Get size of wide string.
- *
- * Get the number of bytes which are used by the wide string @a str (excluding the
- * NULL-terminator).
- *
- * @param str Wide string to consider.
- *
- * @return Number of bytes used by the wide string
- *
- */
-size_t wstr_size(const wchar_t *str)
-{
-	return (wstr_length(str) * sizeof(wchar_t));
-}
-
-/** Get size of string with length limit.
- *
- * Get the number of bytes which are used by up to @a max_len first
- * characters in the string @a str. If @a max_len is greater than
- * the length of @a str, the entire string is measured (excluding the
- * NULL-terminator).
- *
- * @param str     String to consider.
- * @param max_len Maximum number of characters to measure.
- *
- * @return Number of bytes used by the characters.
- *
- */
-size_t str_lsize(const char *str, size_t max_len)
-{
-	size_t len = 0;
-	size_t offset = 0;
-	
-	while (len < max_len) {
-		if (str_decode(str, &offset, STR_NO_LIMIT) == 0)
-			break;
-		
-		len++;
-	}
-	
-	return offset;
-}
-
-/** Get size of wide string with length limit.
- *
- * Get the number of bytes which are used by up to @a max_len first
- * wide characters in the wide string @a str. If @a max_len is greater than
- * the length of @a str, the entire wide string is measured (excluding the
- * NULL-terminator).
- *
- * @param str     Wide string to consider.
- * @param max_len Maximum number of wide characters to measure.
- *
- * @return Number of bytes used by the wide characters.
- *
- */
-size_t wstr_lsize(const wchar_t *str, size_t max_len)
-{
-	return (wstr_nlength(str, max_len * sizeof(wchar_t)) * sizeof(wchar_t));
-}
-
-/** Get number of characters in a string.
- *
- * @param str NULL-terminated string.
- *
- * @return Number of characters in string.
- *
- */
-size_t str_length(const char *str)
-{
-	size_t len = 0;
-	size_t offset = 0;
-	
-	while (str_decode(str, &offset, STR_NO_LIMIT) != 0)
-		len++;
-	
-	return len;
-}
-
-/** Get number of characters in a wide string.
- *
- * @param str NULL-terminated wide string.
- *
- * @return Number of characters in @a str.
- *
- */
-size_t wstr_length(const wchar_t *wstr)
-{
-	size_t len = 0;
-	
-	while (*wstr++ != 0)
-		len++;
-	
-	return len;
-}
-
-/** Get number of characters in a string with size limit.
- *
- * @param str  NULL-terminated string.
- * @param size Maximum number of bytes to consider.
- *
- * @return Number of characters in string.
- *
- */
-size_t str_nlength(const char *str, size_t size)
-{
-	size_t len = 0;
-	size_t offset = 0;
-	
-	while (str_decode(str, &offset, size) != 0)
-		len++;
-	
-	return len;
-}
-
-/** Get number of characters in a string with size limit.
- *
- * @param str  NULL-terminated string.
- * @param size Maximum number of bytes to consider.
- *
- * @return Number of characters in string.
- *
- */
-size_t wstr_nlength(const wchar_t *str, size_t size)
-{
-	size_t len = 0;
-	size_t limit = ALIGN_DOWN(size, sizeof(wchar_t));
-	size_t offset = 0;
-	
-	while ((offset < limit) && (*str++ != 0)) {
-		len++;
-		offset += sizeof(wchar_t);
-	}
-	
-	return len;
-}
-
-/** Check whether character is plain ASCII.
- *
- * @return True if character is plain ASCII.
- *
- */
-bool ascii_check(wchar_t ch)
-{
-	if ((ch >= 0) && (ch <= 127))
-		return true;
-	
-	return false;
-}
-
-/** Check whether character is valid
- *
- * @return True if character is a valid Unicode code point.
- *
- */
-bool chr_check(wchar_t ch)
-{
-	if ((ch >= 0) && (ch <= 1114111))
-		return true;
-	
-	return false;
-}
-
-/** Compare two NULL terminated strings.
- *
- * Do a char-by-char comparison of two NULL-terminated strings.
- * The strings are considered equal iff they consist of the same
- * characters on the minimum of their lengths.
- *
- * @param s1 First string to compare.
- * @param s2 Second string to compare.
- *
- * @return 0 if the strings are equal, -1 if first is smaller,
- *         1 if second smaller.
- *
- */
-int str_cmp(const char *s1, const char *s2)
-{
-	wchar_t c1 = 0;
-	wchar_t c2 = 0;
-	
-	size_t off1 = 0;
-	size_t off2 = 0;
-
-	while (true) {
-		c1 = str_decode(s1, &off1, STR_NO_LIMIT);
-		c2 = str_decode(s2, &off2, STR_NO_LIMIT);
-
-		if (c1 < c2)
-			return -1;
-		
-		if (c1 > c2)
-			return 1;
-
-		if (c1 == 0 || c2 == 0)
-			break;		
-	}
-
-	return 0;
-}
-
-/** Compare two NULL terminated strings with length limit.
- *
- * Do a char-by-char comparison of two NULL-terminated strings.
- * The strings are considered equal iff they consist of the same
- * characters on the minimum of their lengths and the length limit.
- *
- * @param s1      First string to compare.
- * @param s2      Second string to compare.
- * @param max_len Maximum number of characters to consider.
- *
- * @return 0 if the strings are equal, -1 if first is smaller,
- *         1 if second smaller.
- *
- */
-int str_lcmp(const char *s1, const char *s2, size_t max_len)
-{
-	wchar_t c1 = 0;
-	wchar_t c2 = 0;
-	
-	size_t off1 = 0;
-	size_t off2 = 0;
-	
-	size_t len = 0;
-
-	while (true) {
-		if (len >= max_len)
-			break;
-
-		c1 = str_decode(s1, &off1, STR_NO_LIMIT);
-		c2 = str_decode(s2, &off2, STR_NO_LIMIT);
-
-		if (c1 < c2)
-			return -1;
-
-		if (c1 > c2)
-			return 1;
-
-		if (c1 == 0 || c2 == 0)
-			break;
-
-		++len;	
-	}
-
-	return 0;
-
-}
-
-/** Copy string.
- *
- * Copy source string @a src to destination buffer @a dest.
- * No more than @a size bytes are written. If the size of the output buffer
- * is at least one byte, the output string will always be well-formed, i.e.
- * null-terminated and containing only complete characters.
- *
- * @param dest   Destination buffer.
- * @param count Size of the destination buffer (must be > 0).
- * @param src   Source string.
- */
-void str_cpy(char *dest, size_t size, const char *src)
-{
-	wchar_t ch;
-	size_t src_off;
-	size_t dest_off;
-
-	/* There must be space for a null terminator in the buffer. */
-	ASSERT(size > 0);
-	
-	src_off = 0;
-	dest_off = 0;
-
-	while ((ch = str_decode(src, &src_off, STR_NO_LIMIT)) != 0) {
-		if (chr_encode(ch, dest, &dest_off, size - 1) != EOK)
-			break;
-	}
-
-	dest[dest_off] = '\0';
-}
-
-/** Copy size-limited substring.
- *
- * Copy prefix of string @a src of max. size @a size to destination buffer
- * @a dest. No more than @a size bytes are written. The output string will
- * always be well-formed, i.e. null-terminated and containing only complete
- * characters.
- *
- * No more than @a n bytes are read from the input string, so it does not
- * have to be null-terminated.
- *
- * @param dest   Destination buffer.
- * @param count Size of the destination buffer (must be > 0).
- * @param src   Source string.
- * @param n	Maximum number of bytes to read from @a src.
- */
-void str_ncpy(char *dest, size_t size, const char *src, size_t n)
-{
-	wchar_t ch;
-	size_t src_off;
-	size_t dest_off;
-
-	/* There must be space for a null terminator in the buffer. */
-	ASSERT(size > 0);
-	
-	src_off = 0;
-	dest_off = 0;
-
-	while ((ch = str_decode(src, &src_off, n)) != 0) {
-		if (chr_encode(ch, dest, &dest_off, size - 1) != EOK)
-			break;
-	}
-
-	dest[dest_off] = '\0';
-}
-
-/** Convert wide string to string.
- *
- * Convert wide string @a src to string. The output is written to the buffer
- * specified by @a dest and @a size. @a size must be non-zero and the string
- * written will always be well-formed.
- *
- * @param dest	Destination buffer.
- * @param size	Size of the destination buffer.
- * @param src	Source wide string.
- */
-void wstr_to_str(char *dest, size_t size, const wchar_t *src)
-{
-	wchar_t ch;
-	size_t src_idx;
-	size_t dest_off;
-
-	/* There must be space for a null terminator in the buffer. */
-	ASSERT(size > 0);
-
-	src_idx = 0;
-	dest_off = 0;
-	
-	while ((ch = src[src_idx++]) != 0) {
-		if (chr_encode(ch, dest, &dest_off, size - 1) != EOK)
-			break;
-	}
-
-	dest[dest_off] = '\0';
-}
-
-/** Find first occurence of character in string.
- *
- * @param str String to search.
- * @param ch  Character to look for.
- *
- * @return Pointer to character in @a str or NULL if not found.
- *
- */
-char *str_chr(const char *str, wchar_t ch)
-{
-	wchar_t acc;
-	size_t off = 0;
-	size_t last = 0;
-	
-	while ((acc = str_decode(str, &off, STR_NO_LIMIT)) != 0) {
-		if (acc == ch)
-			return (char *) (str + last);
-		last = off;
-	}
-	
-	return NULL;
-}
-
-/** Insert a wide character into a wide string.
- *
- * Insert a wide character into a wide string at position
- * @a pos. The characters after the position are shifted.
- *
- * @param str     String to insert to.
- * @param ch      Character to insert to.
- * @param pos     Character index where to insert.
- @ @param max_pos Characters in the buffer.
- *
- * @return True if the insertion was sucessful, false if the position
- *         is out of bounds.
- *
- */
-bool wstr_linsert(wchar_t *str, wchar_t ch, size_t pos, size_t max_pos)
-{
-	size_t len = wstr_length(str);
-	
-	if ((pos > len) || (pos + 1 > max_pos))
-		return false;
-	
-	size_t i;
-	for (i = len; i + 1 > pos; i--)
-		str[i + 1] = str[i];
-	
-	str[pos] = ch;
-	
-	return true;
-}
-
-/** Remove a wide character from a wide string.
- *
- * Remove a wide character from a wide string at position
- * @a pos. The characters after the position are shifted.
- *
- * @param str String to remove from.
- * @param pos Character index to remove.
- *
- * @return True if the removal was sucessful, false if the position
- *         is out of bounds.
- *
- */
-bool wstr_remove(wchar_t *str, size_t pos)
-{
-	size_t len = wstr_length(str);
-	
-	if (pos >= len)
-		return false;
-	
-	size_t i;
-	for (i = pos + 1; i <= len; i++)
-		str[i - 1] = str[i];
-	
-	return true;
-}
-
-/** @}
- */
Index: kernel/generic/src/main/kinit.c
===================================================================
--- kernel/generic/src/main/kinit.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/generic/src/main/kinit.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -66,5 +66,5 @@
 #include <ipc/ipc.h>
 #include <debug.h>
-#include <string.h>
+#include <str.h>
 
 #ifdef CONFIG_SMP
Index: kernel/generic/src/main/uinit.c
===================================================================
--- kernel/generic/src/main/uinit.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/generic/src/main/uinit.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -42,5 +42,5 @@
  
 #include <main/uinit.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <proc/thread.h>
 #include <userspace.h>
Index: kernel/generic/src/mm/as.c
===================================================================
--- kernel/generic/src/mm/as.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/generic/src/mm/as.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -75,5 +75,5 @@
 #include <config.h>
 #include <align.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <syscall/copy.h>
 #include <arch/interrupt.h>
Index: kernel/generic/src/mm/backend_anon.c
===================================================================
--- kernel/generic/src/mm/backend_anon.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/generic/src/mm/backend_anon.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -47,5 +47,5 @@
 #include <adt/btree.h>
 #include <errno.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <align.h>
 #include <arch.h>
Index: kernel/generic/src/mm/backend_elf.c
===================================================================
--- kernel/generic/src/mm/backend_elf.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/generic/src/mm/backend_elf.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -38,5 +38,5 @@
 #include <lib/elf.h>
 #include <debug.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <mm/as.h>
 #include <mm/frame.h>
Index: kernel/generic/src/mm/backend_phys.c
===================================================================
--- kernel/generic/src/mm/backend_phys.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/generic/src/mm/backend_phys.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -38,5 +38,5 @@
 
 #include <debug.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <mm/as.h>
 #include <mm/page.h>
Index: kernel/generic/src/mm/buddy.c
===================================================================
--- kernel/generic/src/mm/buddy.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/generic/src/mm/buddy.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -41,5 +41,5 @@
 #include <mm/buddy.h>
 #include <mm/frame.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <debug.h>
 #include <print.h>
Index: kernel/generic/src/mm/frame.c
===================================================================
--- kernel/generic/src/mm/frame.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/generic/src/mm/frame.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -43,5 +43,5 @@
  */
 
-#include <arch/types.h>
+#include <typedefs.h>
 #include <mm/frame.h>
 #include <mm/as.h>
Index: kernel/generic/src/mm/page.c
===================================================================
--- kernel/generic/src/mm/page.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/generic/src/mm/page.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -63,5 +63,5 @@
 #include <mm/frame.h>
 #include <arch/barrier.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <arch/asm.h>
 #include <memstr.h>
Index: kernel/generic/src/printf/printf_core.c
===================================================================
--- kernel/generic/src/printf/printf_core.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/generic/src/printf/printf_core.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -41,5 +41,5 @@
 #include <stdarg.h>
 #include <macros.h>
-#include <string.h>
+#include <str.h>
 #include <arch.h>
 
Index: kernel/generic/src/printf/vprintf.c
===================================================================
--- kernel/generic/src/printf/vprintf.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/generic/src/printf/vprintf.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -38,7 +38,7 @@
 #include <synch/spinlock.h>
 #include <arch/asm.h>
-#include <arch/types.h>
 #include <typedefs.h>
-#include <string.h>
+#include <typedefs.h>
+#include <str.h>
 
 SPINLOCK_STATIC_INITIALIZE_NAME(printf_lock, "*printf_lock");
Index: kernel/generic/src/printf/vsnprintf.c
===================================================================
--- kernel/generic/src/printf/vsnprintf.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/generic/src/printf/vsnprintf.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -35,5 +35,5 @@
 #include <print.h>
 #include <printf/printf_core.h>
-#include <string.h>
+#include <str.h>
 #include <memstr.h>
 #include <errno.h>
Index: kernel/generic/src/proc/task.c
===================================================================
--- kernel/generic/src/proc/task.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/generic/src/proc/task.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -53,5 +53,5 @@
 #include <errno.h>
 #include <func.h>
-#include <string.h>
+#include <str.h>
 #include <memstr.h>
 #include <syscall/copy.h>
Index: kernel/generic/src/synch/waitq.c
===================================================================
--- kernel/generic/src/synch/waitq.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/generic/src/synch/waitq.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -49,5 +49,5 @@
 #include <proc/scheduler.h>
 #include <arch/asm.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <time/timeout.h>
 #include <arch.h>
Index: kernel/generic/src/time/delay.c
===================================================================
--- kernel/generic/src/time/delay.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/generic/src/time/delay.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -37,5 +37,5 @@
  
 #include <time/delay.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <cpu.h>
 #include <arch/asm.h>
Index: kernel/generic/src/time/timeout.c
===================================================================
--- kernel/generic/src/time/timeout.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/generic/src/time/timeout.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -37,5 +37,5 @@
 
 #include <time/timeout.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <config.h>
 #include <panic.h>
Index: kernel/generic/src/udebug/udebug_ops.c
===================================================================
--- kernel/generic/src/udebug/udebug_ops.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/generic/src/udebug/udebug_ops.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -46,5 +46,5 @@
 #include <errno.h>
 #include <print.h>
-#include <string.h>
+#include <str.h>
 #include <syscall/copy.h>
 #include <ipc/ipc.h>
Index: kernel/test/avltree/avltree1.c
===================================================================
--- kernel/test/avltree/avltree1.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/test/avltree/avltree1.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -31,5 +31,5 @@
 #include <adt/avl.h>
 #include <debug.h>
-#include <arch/types.h>
+#include <typedefs.h>
 
 #define NODE_COUNT 100
Index: kernel/test/mm/falloc1.c
===================================================================
--- kernel/test/mm/falloc1.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/test/mm/falloc1.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -33,5 +33,5 @@
 #include <mm/slab.h>
 #include <arch/mm/page.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <debug.h>
 #include <align.h>
Index: kernel/test/mm/falloc2.c
===================================================================
--- kernel/test/mm/falloc2.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/test/mm/falloc2.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -33,5 +33,5 @@
 #include <mm/slab.h>
 #include <arch/mm/page.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <atomic.h>
 #include <debug.h>
Index: kernel/test/mm/mapping1.c
===================================================================
--- kernel/test/mm/mapping1.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/test/mm/mapping1.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -33,5 +33,5 @@
 #include <mm/as.h>
 #include <arch/mm/page.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <debug.h>
 
Index: kernel/test/mm/purge1.c
===================================================================
--- kernel/test/mm/purge1.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/test/mm/purge1.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -34,5 +34,5 @@
 #include <arch/mm/page.h>
 #include <arch/mm/tlb.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <debug.h>
 
Index: kernel/test/synch/rwlock4.c
===================================================================
--- kernel/test/synch/rwlock4.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/test/synch/rwlock4.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -32,5 +32,5 @@
 #include <print.h>
 #include <proc/thread.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <arch/context.h>
 #include <context.h>
Index: kernel/test/synch/semaphore2.c
===================================================================
--- kernel/test/synch/semaphore2.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/test/synch/semaphore2.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -32,5 +32,5 @@
 #include <print.h>
 #include <proc/thread.h>
-#include <arch/types.h>
+#include <typedefs.h>
 #include <arch/context.h>
 
Index: kernel/test/test.h
===================================================================
--- kernel/test/test.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ kernel/test/test.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,4 @@
 #define KERN_TEST_H_
 
-#include <arch/types.h>
 #include <typedefs.h>
 
Index: uspace/Makefile
===================================================================
--- uspace/Makefile	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/Makefile	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -27,9 +27,9 @@
 #
 
-## Include configuration
-#
-
 -include ../Makefile.common
 -include ../Makefile.config
+
+## Common binaries
+#
 
 DIRS = \
@@ -65,6 +65,8 @@
 	srv/hid/fb \
 	srv/hid/kbd \
-	srv/hw/char/i8042 \
-	srv/net
+	srv/hw/char/i8042
+
+## Platform-specific hardware support
+#
 
 ifneq ($(UARCH),abs32le)
@@ -90,17 +92,46 @@
 endif
 
-LIBC = lib/libc
+## Networking
+#
+
+ifeq ($(CONFIG_NETIF_DP8390),y)
+	DIRS += srv/net/netif/dp8390
+endif
+
+NETWORKING_COMMON = \
+	srv/net/netif/lo \
+	srv/net/nil/eth \
+	srv/net/nil/nildummy \
+	srv/net/net \
+	srv/net/net/start \
+	srv/net/socket \
+	srv/net/app/echo \
+	srv/net/app/ping \
+	srv/net/app/nettest1 \
+	srv/net/app/nettest2
+
+NETWORKING_MODULAR = \
+	srv/net/il/arp \
+	srv/net/il/ip \
+	srv/net/tl/icmp \
+	srv/net/tl/udp \
+	srv/net/tl/tcp
+
+## System libraries
+#
+
+LIBC = lib/c
 LIBS = \
-	lib/libfs \
-	lib/libblock \
+	lib/fs \
+	lib/block \
 	lib/softint \
 	lib/softfloat \
 
 ifeq ($(UARCH),amd64)
-	LIBS += lib/libpci
+	LIBS += lib/pci
 endif
 
 ifeq ($(UARCH),ia32)
-	LIBS += lib/libpci
+	LIBS += lib/pci
 endif
 
@@ -109,6 +140,17 @@
 LIBS_BUILD = $(addsuffix .build,$(LIBS))
 
-BUILDS := $(addsuffix .build,$(DIRS))
-CLEANS := $(addsuffix .clean,$(DIRS)) $(addsuffix .clean,$(LIBS)) $(addsuffix .clean,$(LIBC))
+ifeq ($(CONFIG_NETWORKING),modular)
+	BUILDS := $(addsuffix .build,$(DIRS)) $(addsuffix .build,$(NETWORKING_COMMON)) $(addsuffix .build,$(NETWORKING_MODULAR))
+endif
+
+ifeq ($(CONFIG_NETWORKING),module)
+	BUILDS := $(addsuffix .build,$(DIRS)) $(addsuffix .build,$(NETWORKING_COMMON))
+endif
+
+ifeq ($(CONFIG_NETWORKING),none)
+	BUILDS := $(addsuffix .build,$(DIRS))
+endif
+
+CLEANS := $(addsuffix .clean,$(DIRS)) $(addsuffix .clean,$(NETWORKING_COMMON)) $(addsuffix .clean,$(NETWORKING_MODULAR)) $(addsuffix .clean,$(LIBS)) $(addsuffix .clean,$(LIBC))
 
 .PHONY: all $(LIBC_BUILD) $(LIBS_BUILD) $(BUILDS) $(CLEANS) clean
Index: uspace/Makefile.common
===================================================================
--- uspace/Makefile.common	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/Makefile.common	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,188 @@
+#
+# Copyright (c) 2005 Martin Decky
+# Copyright (c) 2007 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.
+#
+
+# Individual makefiles set:
+#
+#   USPACE_PREFIX  (*) relative path to uspace/ directory
+#   SOURCES        (*) list of source files
+#   LIBS               libraries to link with
+#   DEFS               compiler defines
+#   EXTRA_CFLAGS       additional flags to pass to C compiler
+#   LINKER_SCRIPT      linker script
+#   PRE_DEPEND         targets required for dependency check
+#
+#   BINARY         (/) binary output name (like appname)
+#   LIBRARY        (/) library output name (like libname)
+#   EXTRA_OUTPUT       additional output targets
+#   EXTRA_CLEAN        additional cleanup targets
+#
+# (x) required variables
+# (/) exactly one of the variables must be defined
+#
+
+ROOT_PATH = $(USPACE_PREFIX)/..
+
+VERSION_DEF = $(ROOT_PATH)/version
+
+COMMON_MAKEFILE = $(ROOT_PATH)/Makefile.common
+COMMON_HEADER = $(ROOT_PATH)/common.h
+
+CONFIG_MAKEFILE = $(ROOT_PATH)/Makefile.config
+CONFIG_HEADER = $(ROOT_PATH)/config.h
+
+-include $(VERSION_DEF)
+-include $(COMMON_MAKEFILE)
+-include $(CONFIG_MAKEFILE)
+
+ifneq ($(BINARY),)
+	JOB = $(BINARY).job
+	OUTPUT = $(BINARY)
+	EXTRA_OUTPUT += $(BINARY).disasm
+	EXTRA_CLEAN += $(BINARY).map
+endif
+
+ifneq ($(LIBRARY),)
+	JOB = $(LIBRARY).job
+	OUTPUT = $(LIBRARY).a
+endif
+
+DEPEND = Makefile.depend
+DEPEND_PREV = $(DEPEND).prev
+
+LIBC_PREFIX = $(USPACE_PREFIX)/lib/c
+LIBBLOCK_PREFIX = $(USPACE_PREFIX)/lib/block
+LIBFS_PREFIX = $(USPACE_PREFIX)/lib/fs
+LIBPCI_PREFIX = $(USPACE_PREFIX)/lib/pci
+SOFTFLOAT_PREFIX = $(USPACE_PREFIX)/lib/softfloat
+SOFTINT_PREFIX = $(USPACE_PREFIX)/lib/softint
+
+BASE_LIBS = $(LIBC_PREFIX)/libc.a $(SOFTINT_PREFIX)/libsoftint.a
+
+LINKER_SCRIPT ?= $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld
+
+.PHONY: all clean
+
+all: $(VERSION_DEF) $(COMMON_MAKEFILE) $(CONFIG_MAKEFILE) $(CONFIG_HEADER) $(LIBS) $(OUTPUT) $(EXTRA_OUTPUT)
+	-[ -f $(DEPEND) ] && cp -a $(DEPEND) $(DEPEND_PREV)
+
+clean:
+	rm -f $(DEPEND) $(DEPEND_PREV) $(JOB) $(OUTPUT) $(EXTRA_OUTPUT) $(EXTRA_CLEAN)
+	find . -name '*.o' -follow -exec rm \{\} \;
+
+OPTIMIZATION = 3
+
+GCC_CFLAGS = -I$(LIBC_PREFIX)/include -O$(OPTIMIZATION) -imacros $(CONFIG_HEADER) \
+	-fexec-charset=UTF-8 -fwide-exec-charset=UTF-32$(ENDIANESS) \
+	-finput-charset=UTF-8 -ffreestanding -fno-builtin -nostdlib -nostdinc \
+	-Wall -Wextra -Wno-clobbered -Wno-unused-parameter -Wmissing-prototypes \
+	-Werror-implicit-function-declaration -Wwrite-strings \
+	-Werror -pipe -g -D__$(ENDIANESS)__
+
+ICC_CFLAGS = -I$(LIBC_PREFIX)/include -O$(OPTIMIZATION) -imacros $(CONFIG_HEADER) \
+	-fexec-charset=UTF-8 -fwide-exec-charset=UTF-32$(ENDIANESS) \
+	-finput-charset=UTF-8 -ffreestanding -fno-builtin -nostdlib -nostdinc \
+	-Wall -Wextra -Wno-clobbered -Wno-unused-parameter -Wmissing-prototypes \
+	-Werror-implicit-function-declaration -Wwrite-strings \
+	-Werror -pipe -g -D__$(ENDIANESS)__
+
+CLANG_CFLAGS = -I$(LIBC_PREFIX)/include -O$(OPTIMIZATION) -imacros $(CONFIG_HEADER) \
+	-fexec-charset=UTF-8 -fwide-exec-charset=UTF-32$(ENDIANESS) \
+	-finput-charset=UTF-8 -ffreestanding -fno-builtin -nostdlib -nostdinc \
+	-Wall -Wextra -Wno-unused-parameter -Wmissing-prototypes \
+	-Werror-implicit-function-declaration -Wwrite-strings \
+	-pipe -g -arch $(CLANG_ARCH) -D__$(ENDIANESS)__
+
+## Setup platform configuration
+#
+
+-include $(LIBC_PREFIX)/arch/$(UARCH)/Makefile.common
+
+## Compilation options
+#
+
+JOBFILE = $(LIBC_PREFIX)/../../../tools/jobfile.py
+
+ifeq ($(COMPILER),gcc_cross)
+	CFLAGS = $(GCC_CFLAGS) $(EXTRA_CFLAGS)
+	DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS)
+endif
+
+ifeq ($(COMPILER),gcc_native)
+	CFLAGS = $(GCC_CFLAGS) $(EXTRA_CFLAGS)
+	DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS)
+endif
+
+ifeq ($(COMPILER),icc)
+	CFLAGS = $(ICC_CFLAGS) $(EXTRA_CFLAGS)
+	DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS)
+endif
+
+ifeq ($(COMPILER),clang)
+	CFLAGS = $(CLANG_CFLAGS) $(EXTRA_CFLAGS)
+	DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS)
+endif
+
+-include $(DEPEND)
+
+OBJECTS := $(addsuffix .o,$(basename $(SOURCES)))
+
+ifneq ($(BINARY),)
+%.disasm: $(BINARY)
+	$(OBJDUMP) -d $< > $@
+
+$(BINARY): $(LINKER_SCRIPT) $(OBJECTS) $(LIBS) $(BASE_LIBS)
+	$(LD) -N $(LFLAGS) -T $(LINKER_SCRIPT) -M -Map $(BINARY).map -o $(BINARY) $(OBJECTS) $(LIBS) $(BASE_LIBS)
+endif
+
+ifneq ($(LIBRARY),)
+%.a: $(OBJECTS)
+	$(AR) rc $@ $(OBJECTS)
+endif
+
+%.o: %.S $(DEPEND)
+	$(CC) $(DEFS) $(CFLAGS) -D__ASM__ -c $< -o $@
+ifeq ($(PRECHECK),y)
+	$(JOBFILE) $(JOB) $< $@ as asm/preproc $(DEFS) $(CFLAGS) -D__ASM__
+endif
+
+%.o: %.s $(DEPEND)
+	$(AS) $(AFLAGS) -o $@ $<
+ifeq ($(PRECHECK),y)
+	$(JOBFILE) $(JOB) $< $@ as asm
+endif
+
+%.o: %.c $(DEPEND)
+	$(CC) $(DEFS) $(CFLAGS) -c $< -o $@
+ifeq ($(PRECHECK),y)
+	$(JOBFILE) $(JOB) $< $@ cc core $(DEFS) $(CFLAGS)
+endif
+
+$(DEPEND): $(PRE_DEPEND)
+	makedepend -f - -- $(DEPEND_DEFS) $(CFLAGS) -- $(SOURCES) > $@ 2> /dev/null
+	-[ -f $(DEPEND_PREV) ] && diff -q $(DEPEND_PREV) $@ && mv -f $(DEPEND_PREV) $@
Index: pace/app/Makefile.common
===================================================================
--- uspace/app/Makefile.common	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,92 +1,0 @@
-#
-# Copyright (c) 2005 Martin Decky
-# Copyright (c) 2007 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.
-#
-
-## Common rules for building apps.
-#
-
-# Individual makefiles set:
-#
-#	USPACE_PREFIX	relative path to uspace/ directory
-#	LIBS		libraries to link with (with relative path)
-#	EXTRA_CFLAGS	additional flags to pass to C compiler
-#	JOB		job file name (like appname.job)
-#	OUTPUT		output binary name (like appname)
-#	SOURCES		list of source files
-#
-
-DEPEND = Makefile.depend
-DEPEND_PREV = $(DEPEND).prev
-
-LIBC_PREFIX = $(USPACE_PREFIX)/lib/libc
-LIBBLOCK_PREFIX = $(USPACE_PREFIX)/lib/libblock
-SOFTINT_PREFIX = $(USPACE_PREFIX)/lib/softint
-
-JOB = $(OUTPUT).job
-
-OBJECTS := $(addsuffix .o,$(basename $(SOURCES)))
-
-include $(LIBC_PREFIX)/Makefile.toolchain
-
-CFLAGS += $(EXTRA_CFLAGS)
-
-.PHONY: all build clean
-
-all: \
-    $(LIBC_PREFIX)/../../../version \
-    $(LIBC_PREFIX)/../../../Makefile.common \
-    $(LIBC_PREFIX)/../../../Makefile.config \
-    $(LIBC_PREFIX)/../../../config.h \
-    $(LIBS) \
-    \
-    $(OUTPUT) $(OUTPUT).disasm
-	-[ -f $(DEPEND) ] && mv -f $(DEPEND) $(DEPEND_PREV)
-
-clean:
-	rm -f $(DEPEND) $(DEPEND_PREV) $(JOB) $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm
-	find . -name '*.o' -follow -exec rm \{\} \;
-
-build: 
-
--include $(DEPEND)
-
-$(OUTPUT).disasm: $(OUTPUT)
-	$(OBJDUMP) -d $< > $@
-
-$(OUTPUT): $(OBJECTS) $(LIBS)
-	$(LD) -T $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map
-
-%.o: %.c $(DEPEND)
-	$(CC) $(DEFS) $(CFLAGS) -c $< -o $@
-ifeq ($(PRECHECK),y)
-	$(JOBFILE) $(JOB) $< $@ cc core $(DEFS) $(CFLAGS)
-endif
-
-$(DEPEND):
-	makedepend -f - -- $(DEPEND_DEFS) $(CFLAGS) -- $(SOURCES) > $@ 2> /dev/null
-	-[ -f $(DEPEND_PREV) ] && diff -q $(DEPEND_PREV) $@ && mv -f $(DEPEND_PREV) $@
Index: uspace/app/bdsh/Makefile
===================================================================
--- uspace/app/bdsh/Makefile	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/app/bdsh/Makefile	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -29,8 +29,7 @@
 
 USPACE_PREFIX = ../..
-LIBS = $(LIBBLOCK_PREFIX)/libblock.a $(LIBC_PREFIX)/libc.a
+LIBS = $(LIBBLOCK_PREFIX)/libblock.a
 EXTRA_CFLAGS = -I$(LIBBLOCK_PREFIX) -I. -Icmds/ -Icmds/builtins -Icmds/modules
-
-OUTPUT = bdsh
+BINARY = bdsh
 
 SOURCES = \
@@ -60,3 +59,3 @@
 	scli.c
 
-include ../Makefile.common
+include $(USPACE_PREFIX)/Makefile.common
Index: uspace/app/bdsh/cmds/builtin_cmds.c
===================================================================
--- uspace/app/bdsh/cmds/builtin_cmds.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/app/bdsh/cmds/builtin_cmds.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -34,5 +34,5 @@
 #include <stdio.h>
 #include <stdlib.h>
-#include <string.h>
+#include <str.h>
 #include "errors.h"
 #include "cmds.h"
Index: uspace/app/bdsh/cmds/builtins/cd/cd.c
===================================================================
--- uspace/app/bdsh/cmds/builtins/cd/cd.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/app/bdsh/cmds/builtins/cd/cd.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -32,5 +32,5 @@
 #include <stdlib.h>
 #include <unistd.h>
-#include <string.h>
+#include <str.h>
 #include <errno.h>
 
Index: uspace/app/bdsh/cmds/mod_cmds.c
===================================================================
--- uspace/app/bdsh/cmds/mod_cmds.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/app/bdsh/cmds/mod_cmds.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -47,5 +47,5 @@
 #include <stdio.h>
 #include <stdlib.h>
-#include <string.h>
+#include <str.h>
 #include "errors.h"
 #include "cmds.h"
Index: uspace/app/bdsh/cmds/modules/bdd/bdd.c
===================================================================
--- uspace/app/bdsh/cmds/modules/bdd/bdd.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/app/bdsh/cmds/modules/bdd/bdd.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -29,5 +29,5 @@
 #include <stdio.h>
 #include <stdlib.h>
-#include <string.h>
+#include <str.h>
 #include "config.h"
 #include "util.h"
Index: uspace/app/bdsh/cmds/modules/cat/cat.c
===================================================================
--- uspace/app/bdsh/cmds/modules/cat/cat.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/app/bdsh/cmds/modules/cat/cat.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -33,5 +33,5 @@
 #include <unistd.h>
 #include <getopt.h>
-#include <string.h>
+#include <str.h>
 #include <fcntl.h>
 
Index: uspace/app/bdsh/cmds/modules/cp/cp.c
===================================================================
--- uspace/app/bdsh/cmds/modules/cp/cp.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/app/bdsh/cmds/modules/cp/cp.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -33,5 +33,5 @@
 #include <unistd.h>
 #include <getopt.h>
-#include <string.h>
+#include <str.h>
 #include <fcntl.h>
 #include "config.h"
Index: uspace/app/bdsh/cmds/modules/help/help.c
===================================================================
--- uspace/app/bdsh/cmds/modules/help/help.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/app/bdsh/cmds/modules/help/help.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -31,5 +31,5 @@
 #include <stdio.h>
 #include <stdlib.h>
-#include <string.h>
+#include <str.h>
 
 #include "config.h"
Index: uspace/app/bdsh/cmds/modules/ls/ls.c
===================================================================
--- uspace/app/bdsh/cmds/modules/ls/ls.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/app/bdsh/cmds/modules/ls/ls.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -40,5 +40,5 @@
 #include <sys/types.h>
 #include <sys/stat.h>
-#include <string.h>
+#include <str.h>
 
 #include "errors.h"
Index: uspace/app/bdsh/cmds/modules/mkdir/mkdir.c
===================================================================
--- uspace/app/bdsh/cmds/modules/mkdir/mkdir.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/app/bdsh/cmds/modules/mkdir/mkdir.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -38,5 +38,5 @@
 #include <getopt.h>
 #include <stdarg.h>
-#include <string.h>
+#include <str.h>
 
 #include "config.h"
Index: uspace/app/bdsh/cmds/modules/mkfile/mkfile.c
===================================================================
--- uspace/app/bdsh/cmds/modules/mkfile/mkfile.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/app/bdsh/cmds/modules/mkfile/mkfile.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -38,5 +38,5 @@
 #include <getopt.h>
 #include <stdarg.h>
-#include <string.h>
+#include <str.h>
 #include <ctype.h>
 
Index: uspace/app/bdsh/cmds/modules/rm/rm.c
===================================================================
--- uspace/app/bdsh/cmds/modules/rm/rm.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/app/bdsh/cmds/modules/rm/rm.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,5 @@
 #include <getopt.h>
 #include <mem.h>
-#include <string.h>
+#include <str.h>
 
 #include "config.h"
Index: uspace/app/bdsh/cmds/modules/touch/touch.c
===================================================================
--- uspace/app/bdsh/cmds/modules/touch/touch.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/app/bdsh/cmds/modules/touch/touch.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -38,5 +38,5 @@
 #include <dirent.h>
 #include <sys/types.h>
-#include <string.h>
+#include <str.h>
 
 #include "config.h"
Index: uspace/app/bdsh/errors.c
===================================================================
--- uspace/app/bdsh/errors.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/app/bdsh/errors.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -30,5 +30,5 @@
 
 #include <stdio.h>
-#include <string.h>
+#include <str.h>
 #include <stdlib.h>
 #include <unistd.h>
Index: uspace/app/bdsh/exec.c
===================================================================
--- uspace/app/bdsh/exec.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/app/bdsh/exec.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -38,5 +38,5 @@
 #include <stdlib.h>
 #include <unistd.h>
-#include <string.h>
+#include <str.h>
 #include <fcntl.h>
 
Index: uspace/app/bdsh/input.c
===================================================================
--- uspace/app/bdsh/input.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/app/bdsh/input.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -32,5 +32,5 @@
 #include <stdio.h>
 #include <stdlib.h>
-#include <string.h>
+#include <str.h>
 #include <io/console.h>
 #include <io/keycode.h>
Index: uspace/app/bdsh/scli.c
===================================================================
--- uspace/app/bdsh/scli.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/app/bdsh/scli.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -31,5 +31,5 @@
 #include <stdio.h>
 #include <stdlib.h>
-#include <string.h>
+#include <str.h>
 #include <unistd.h>
 #include "config.h"
Index: uspace/app/bdsh/util.c
===================================================================
--- uspace/app/bdsh/util.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/app/bdsh/util.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -29,5 +29,5 @@
 
 #include <stdio.h>
-#include <string.h>
+#include <str.h>
 #include <stdarg.h>
 #include <stdlib.h>
Index: uspace/app/edit/Makefile
===================================================================
--- uspace/app/edit/Makefile	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/app/edit/Makefile	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -29,7 +29,5 @@
 
 USPACE_PREFIX = ../..
-LIBS = $(LIBC_PREFIX)/libc.a
-
-OUTPUT = edit
+BINARY = edit
 
 SOURCES = \
@@ -37,3 +35,3 @@
 	sheet.c
 
-include ../Makefile.common
+include $(USPACE_PREFIX)/Makefile.common
Index: uspace/app/edit/sheet.c
===================================================================
--- uspace/app/edit/sheet.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/app/edit/sheet.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -50,5 +50,5 @@
 
 #include <stdlib.h>
-#include <string.h>
+#include <str.h>
 #include <errno.h>
 #include <adt/list.h>
Index: uspace/app/getterm/Makefile
===================================================================
--- uspace/app/getterm/Makefile	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/app/getterm/Makefile	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -28,11 +28,7 @@
 #
 
-include ../../../version
-DEFS += -DRELEASE=$(RELEASE) "-DNAME=$(NAME)"
-
 USPACE_PREFIX = ../..
-LIBS = $(LIBC_PREFIX)/libc.a
-
-OUTPUT = getterm
+DEFS = -DRELEASE=$(RELEASE) "-DNAME=$(NAME)"
+BINARY = getterm
 
 SOURCES = \
@@ -40,3 +36,3 @@
 	version.c
 
-include ../Makefile.common
+include $(USPACE_PREFIX)/Makefile.common
Index: uspace/app/init/Makefile
===================================================================
--- uspace/app/init/Makefile	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/app/init/Makefile	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -29,10 +29,8 @@
 
 USPACE_PREFIX = ../..
-LIBS = $(LIBC_PREFIX)/libc.a
-
-OUTPUT = init
+BINARY = init
 
 SOURCES = \
 	init.c
 
-include ../Makefile.common
+include $(USPACE_PREFIX)/Makefile.common
Index: uspace/app/init/init.c
===================================================================
--- uspace/app/init/init.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/app/init/init.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -46,5 +46,5 @@
 #include <malloc.h>
 #include <macros.h>
-#include <string.h>
+#include <str.h>
 #include <devmap.h>
 #include "init.h"
Index: uspace/app/klog/Makefile
===================================================================
--- uspace/app/klog/Makefile	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/app/klog/Makefile	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -29,10 +29,8 @@
 
 USPACE_PREFIX = ../..
-LIBS = $(LIBC_PREFIX)/libc.a
-
-OUTPUT = klog
+BINARY = klog
 
 SOURCES = \
 	klog.c
 
-include ../Makefile.common
+include $(USPACE_PREFIX)/Makefile.common
Index: uspace/app/mkfat/Makefile
===================================================================
--- uspace/app/mkfat/Makefile	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/app/mkfat/Makefile	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -29,11 +29,10 @@
 
 USPACE_PREFIX = ../..
-LIBS = $(LIBBLOCK_PREFIX)/libblock.a $(LIBC_PREFIX)/libc.a
+LIBS = $(LIBBLOCK_PREFIX)/libblock.a
 EXTRA_CFLAGS = -I$(LIBBLOCK_PREFIX)
-
-OUTPUT = mkfat
+BINARY = mkfat
 
 SOURCES = \
 	mkfat.c
 
-include ../Makefile.common
+include $(USPACE_PREFIX)/Makefile.common
Index: uspace/app/redir/Makefile
===================================================================
--- uspace/app/redir/Makefile	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/app/redir/Makefile	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -29,10 +29,8 @@
 
 USPACE_PREFIX = ../..
-LIBS = $(LIBC_PREFIX)/libc.a
-
-OUTPUT = redir
+BINARY = redir
 
 SOURCES = \
 	redir.c
 
-include ../Makefile.common
+include $(USPACE_PREFIX)/Makefile.common
Index: uspace/app/redir/redir.c
===================================================================
--- uspace/app/redir/redir.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/app/redir/redir.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -39,5 +39,5 @@
 #include <fcntl.h>
 #include <unistd.h>
-#include <string.h>
+#include <str.h>
 #include <stdio.h>
 #include <task.h>
Index: uspace/app/taskdump/Makefile
===================================================================
--- uspace/app/taskdump/Makefile	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/app/taskdump/Makefile	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -28,8 +28,6 @@
 
 USPACE_PREFIX = ../..
-LIBS = $(LIBC_PREFIX)/libc.a
 EXTRA_CFLAGS = -Iinclude
-
-OUTPUT = taskdump
+BINARY = taskdump
 
 SOURCES = \
@@ -38,3 +36,3 @@
 	symtab.c
 
-include ../Makefile.common
+include $(USPACE_PREFIX)/Makefile.common
Index: uspace/app/tester/Makefile
===================================================================
--- uspace/app/tester/Makefile	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/app/tester/Makefile	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -29,7 +29,5 @@
 
 USPACE_PREFIX = ../..
-LIBS = $(LIBC_PREFIX)/libc.a
-
-OUTPUT = tester
+BINARY = tester
 
 SOURCES = \
@@ -53,3 +51,3 @@
 	mm/malloc1.c
 
-include ../Makefile.common
+include $(USPACE_PREFIX)/Makefile.common
Index: uspace/app/tester/tester.c
===================================================================
--- uspace/app/tester/tester.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/app/tester/tester.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -38,5 +38,5 @@
 #include <unistd.h>
 #include <stdio.h>
-#include <string.h>
+#include <str.h>
 #include "tester.h"
 
Index: uspace/app/tester/vfs/vfs1.c
===================================================================
--- uspace/app/tester/vfs/vfs1.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/app/tester/vfs/vfs1.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -30,5 +30,5 @@
 #include <stdio.h>
 #include <stdlib.h>
-#include <string.h>
+#include <str.h>
 #include <vfs/vfs.h>
 #include <unistd.h>
Index: uspace/app/tetris/Makefile
===================================================================
--- uspace/app/tetris/Makefile	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/app/tetris/Makefile	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -29,7 +29,5 @@
 
 USPACE_PREFIX = ../..
-LIBS = $(LIBC_PREFIX)/libc.a
-
-OUTPUT = tetris
+BINARY = tetris
 
 SOURCES = \
@@ -40,3 +38,3 @@
 	screen.c
 
-include ../Makefile.common
+include $(USPACE_PREFIX)/Makefile.common
Index: uspace/app/tetris/input.c
===================================================================
--- uspace/app/tetris/input.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/app/tetris/input.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -52,5 +52,5 @@
 #include <errno.h>
 #include <unistd.h>
-#include <string.h>
+#include <str.h>
 
 #include "input.h"
Index: uspace/app/tetris/scores.c
===================================================================
--- uspace/app/tetris/scores.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/app/tetris/scores.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -52,5 +52,5 @@
 #include <errno.h>
 #include <stdio.h>
-#include <string.h>
+#include <str.h>
 #include <io/console.h>
 #include <io/keycode.h>
Index: uspace/app/tetris/scores.h
===================================================================
--- uspace/app/tetris/scores.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/app/tetris/scores.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -48,5 +48,5 @@
 
 #include <sys/time.h>
-#include <string.h>
+#include <str.h>
 
 #define MAXLOGNAME   16
Index: uspace/app/tetris/screen.c
===================================================================
--- uspace/app/tetris/screen.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/app/tetris/screen.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -49,5 +49,5 @@
 #include <stdio.h>
 #include <stdlib.h>
-#include <string.h>
+#include <str.h>
 #include <unistd.h>
 #include <vfs/vfs.h>
Index: uspace/app/tetris/tetris.c
===================================================================
--- uspace/app/tetris/tetris.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/app/tetris/tetris.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -53,5 +53,5 @@
 #include <stdio.h>
 #include <stdlib.h>
-#include <string.h>
+#include <str.h>
 #include <unistd.h>
 #include <getopt.h>
Index: uspace/app/trace/Makefile
===================================================================
--- uspace/app/trace/Makefile	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/app/trace/Makefile	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -29,7 +29,5 @@
 
 USPACE_PREFIX = ../..
-LIBS = $(LIBC_PREFIX)/libc.a
-
-OUTPUT = trace
+BINARY = trace
 
 SOURCES = \
@@ -41,3 +39,3 @@
 	errors.c
 
-include ../Makefile.common
+include $(USPACE_PREFIX)/Makefile.common
Index: uspace/app/trace/trace.c
===================================================================
--- uspace/app/trace/trace.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/app/trace/trace.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -43,5 +43,5 @@
 #include <task.h>
 #include <mem.h>
-#include <string.h>
+#include <str.h>
 #include <bool.h>
 #include <loader/loader.h>
Index: pace/lib/Makefile.common
===================================================================
--- uspace/lib/Makefile.common	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,102 +1,0 @@
-#
-# Copyright (c) 2005 Martin Decky
-# Copyright (c) 2007 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.
-#
-
-## Common rules for building apps.
-#
-
-# Individual makefiles set:
-#
-#   USPACE_PREFIX  relative path to uspace/ directory
-#   LIBS           libraries to link with (with relative path)
-#   EXTRA_CFLAGS   additional flags to pass to C compiler
-#   JOB            job file name (like appname.job)
-#   OUTPUT         output binary name (like appname)
-#   SOURCES        list of source files
-#
-
-DEPEND = Makefile.depend
-DEPEND_PREV = $(DEPEND).prev
-
-LIBC_PREFIX = $(USPACE_PREFIX)/lib/libc
-
-JOB = $(OUTPUT).job
-
-OBJECTS = $(addsuffix .o,$(basename $(SOURCES)))
-
--include $(USPACE_PREFIX)/../Makefile.common
--include $(USPACE_PREFIX)/../Makefile.config
-include $(LIBC_PREFIX)/Makefile.toolchain
-
-CFLAGS += $(EXTRA_CFLAGS)
-
-.PHONY: all build clean
-
-all: \
-    $(LIBC_PREFIX)/../../../version \
-    $(LIBC_PREFIX)/../../../Makefile.common \
-    $(LIBC_PREFIX)/../../../Makefile.config \
-    $(LIBC_PREFIX)/../../../config.h \
-    $(LIBS) \
-    \
-    $(OUTPUT) \
-    $(EXTRA_OUTPUT)
-	-[ -f $(DEPEND) ] && mv -f $(DEPEND) $(DEPEND_PREV)
-
-clean:
-	rm -f $(DEPEND) $(DEPEND_PREV) $(JOB) $(OUTPUT) $(EXTRA_OUTPUT) $(EXTRA_CLEAN)
-	find . -name '*.o' -follow -exec rm \{\} \;
-
-build:
-
--include $(DEPEND)
-
-$(OUTPUT): $(OBJECTS)
-	$(AR) rc $@ $(OBJECTS)
-
-%.o: %.S $(DEPEND)
-	$(CC) $(DEFS) $(AFLAGS) $(CFLAGS) -D__ASM__ -c $< -o $@
-ifeq ($(PRECHECK),y)
-	$(JOBFILE) $(JOB) $< $@ as asm/preproc $(DEFS) $(AFLAGS) $(CFLAGS) -D__ASM__
-endif
-
-%.o: %.s $(DEPEND)
-	$(AS) $(AFLAGS) $< -o $@
-ifeq ($(PRECHECK),y)
-	$(JOBFILE) $(JOB) $< $@ as asm $(AFLAGS)
-endif
-
-%.o: %.c $(DEPEND)
-	$(CC) $(DEFS) $(CFLAGS) -c $< -o $@
-ifeq ($(PRECHECK),y)
-	$(JOBFILE) $(JOB) $< $@ cc core $(DEFS) $(CFLAGS)
-endif
-
-$(DEPEND): $(PRE_DEPEND)
-	makedepend -f - -- $(DEPEND_DEFS) $(CFLAGS) -- $(SOURCES) > $@ 2> /dev/null
-	-[ -f $(DEPEND_PREV) ] && diff -q $(DEPEND_PREV) $@ && mv -f $(DEPEND_PREV) $@
Index: uspace/lib/block/Makefile
===================================================================
--- uspace/lib/block/Makefile	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/block/Makefile	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,36 @@
+#
+# Copyright (c) 2005 Martin Decky
+# Copyright (c) 2007 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.
+#
+
+USPACE_PREFIX = ../..
+LIBRARY = libblock
+
+SOURCES = \
+	libblock.c
+
+include $(USPACE_PREFIX)/Makefile.common
Index: uspace/lib/block/libblock.c
===================================================================
--- uspace/lib/block/libblock.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/block/libblock.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,882 @@
+/*
+ * Copyright (c) 2008 Jakub Jermar
+ * Copyright (c) 2008 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 libblock
+ * @{
+ */
+/**
+ * @file
+ * @brief
+ */
+
+#include "libblock.h"
+#include "../../srv/vfs/vfs.h"
+#include <ipc/devmap.h>
+#include <ipc/bd.h>
+#include <ipc/services.h>
+#include <errno.h>
+#include <sys/mman.h>
+#include <async.h>
+#include <ipc/ipc.h>
+#include <as.h>
+#include <assert.h>
+#include <fibril_synch.h>
+#include <adt/list.h>
+#include <adt/hash_table.h>
+#include <macros.h>
+#include <mem.h>
+#include <sys/typefmt.h>
+#include <stacktrace.h>
+
+/** Lock protecting the device connection list */
+static FIBRIL_MUTEX_INITIALIZE(dcl_lock);
+/** Device connection list head. */
+static LIST_INITIALIZE(dcl_head);
+
+#define CACHE_BUCKETS_LOG2		10
+#define CACHE_BUCKETS			(1 << CACHE_BUCKETS_LOG2)
+
+typedef struct {
+	fibril_mutex_t lock;
+	size_t lblock_size;		/**< Logical block size. */
+	unsigned block_count;		/**< Total number of blocks. */
+	unsigned blocks_cached;		/**< Number of cached blocks. */
+	hash_table_t block_hash;
+	link_t free_head;
+	enum cache_mode mode;
+} cache_t;
+
+typedef struct {
+	link_t link;
+	dev_handle_t dev_handle;
+	int dev_phone;
+	fibril_mutex_t comm_area_lock;
+	void *comm_area;
+	size_t comm_size;
+	void *bb_buf;
+	aoff64_t bb_addr;
+	size_t pblock_size;		/**< Physical block size. */
+	cache_t *cache;
+} devcon_t;
+
+static int read_blocks(devcon_t *devcon, aoff64_t ba, size_t cnt);
+static int write_blocks(devcon_t *devcon, aoff64_t ba, size_t cnt);
+static int get_block_size(int dev_phone, size_t *bsize);
+static int get_num_blocks(int dev_phone, aoff64_t *nblocks);
+
+static devcon_t *devcon_search(dev_handle_t dev_handle)
+{
+	link_t *cur;
+
+	fibril_mutex_lock(&dcl_lock);
+	for (cur = dcl_head.next; cur != &dcl_head; cur = cur->next) {
+		devcon_t *devcon = list_get_instance(cur, devcon_t, link);
+		if (devcon->dev_handle == dev_handle) {
+			fibril_mutex_unlock(&dcl_lock);
+			return devcon;
+		}
+	}
+	fibril_mutex_unlock(&dcl_lock);
+	return NULL;
+}
+
+static int devcon_add(dev_handle_t dev_handle, int dev_phone, size_t bsize,
+    void *comm_area, size_t comm_size)
+{
+	link_t *cur;
+	devcon_t *devcon;
+
+	if (comm_size < bsize)
+		return EINVAL;
+
+	devcon = malloc(sizeof(devcon_t));
+	if (!devcon)
+		return ENOMEM;
+	
+	link_initialize(&devcon->link);
+	devcon->dev_handle = dev_handle;
+	devcon->dev_phone = dev_phone;
+	fibril_mutex_initialize(&devcon->comm_area_lock);
+	devcon->comm_area = comm_area;
+	devcon->comm_size = comm_size;
+	devcon->bb_buf = NULL;
+	devcon->bb_addr = 0;
+	devcon->pblock_size = bsize;
+	devcon->cache = NULL;
+
+	fibril_mutex_lock(&dcl_lock);
+	for (cur = dcl_head.next; cur != &dcl_head; cur = cur->next) {
+		devcon_t *d = list_get_instance(cur, devcon_t, link);
+		if (d->dev_handle == dev_handle) {
+			fibril_mutex_unlock(&dcl_lock);
+			free(devcon);
+			return EEXIST;
+		}
+	}
+	list_append(&devcon->link, &dcl_head);
+	fibril_mutex_unlock(&dcl_lock);
+	return EOK;
+}
+
+static void devcon_remove(devcon_t *devcon)
+{
+	fibril_mutex_lock(&dcl_lock);
+	list_remove(&devcon->link);
+	fibril_mutex_unlock(&dcl_lock);
+}
+
+int block_init(dev_handle_t dev_handle, size_t comm_size)
+{
+	int rc;
+	int dev_phone;
+	void *comm_area;
+	size_t bsize;
+
+	comm_area = mmap(NULL, comm_size, PROTO_READ | PROTO_WRITE,
+	    MAP_ANONYMOUS | MAP_PRIVATE, 0, 0);
+	if (!comm_area) {
+		return ENOMEM;
+	}
+
+	dev_phone = devmap_device_connect(dev_handle, IPC_FLAG_BLOCKING);
+	if (dev_phone < 0) {
+		munmap(comm_area, comm_size);
+		return dev_phone;
+	}
+
+	rc = async_share_out_start(dev_phone, comm_area,
+	    AS_AREA_READ | AS_AREA_WRITE);
+	if (rc != EOK) {
+	    	munmap(comm_area, comm_size);
+		ipc_hangup(dev_phone);
+		return rc;
+	}
+
+	if (get_block_size(dev_phone, &bsize) != EOK) {
+		munmap(comm_area, comm_size);
+		ipc_hangup(dev_phone);
+		return rc;
+	}
+	
+	rc = devcon_add(dev_handle, dev_phone, bsize, comm_area, comm_size);
+	if (rc != EOK) {
+		munmap(comm_area, comm_size);
+		ipc_hangup(dev_phone);
+		return rc;
+	}
+
+	return EOK;
+}
+
+void block_fini(dev_handle_t dev_handle)
+{
+	devcon_t *devcon = devcon_search(dev_handle);
+	assert(devcon);
+	
+	if (devcon->cache)
+		(void) block_cache_fini(dev_handle);
+
+	devcon_remove(devcon);
+
+	if (devcon->bb_buf)
+		free(devcon->bb_buf);
+
+	munmap(devcon->comm_area, devcon->comm_size);
+	ipc_hangup(devcon->dev_phone);
+
+	free(devcon);	
+}
+
+int block_bb_read(dev_handle_t dev_handle, aoff64_t ba)
+{
+	void *bb_buf;
+	int rc;
+
+	devcon_t *devcon = devcon_search(dev_handle);
+	if (!devcon)
+		return ENOENT;
+	if (devcon->bb_buf)
+		return EEXIST;
+	bb_buf = malloc(devcon->pblock_size);
+	if (!bb_buf)
+		return ENOMEM;
+
+	fibril_mutex_lock(&devcon->comm_area_lock);
+	rc = read_blocks(devcon, 0, 1);
+	if (rc != EOK) {
+		fibril_mutex_unlock(&devcon->comm_area_lock);
+	    	free(bb_buf);
+		return rc;
+	}
+	memcpy(bb_buf, devcon->comm_area, devcon->pblock_size);
+	fibril_mutex_unlock(&devcon->comm_area_lock);
+
+	devcon->bb_buf = bb_buf;
+	devcon->bb_addr = ba;
+
+	return EOK;
+}
+
+void *block_bb_get(dev_handle_t dev_handle)
+{
+	devcon_t *devcon = devcon_search(dev_handle);
+	assert(devcon);
+	return devcon->bb_buf;
+}
+
+static hash_index_t cache_hash(unsigned long *key)
+{
+	return *key & (CACHE_BUCKETS - 1);
+}
+
+static int cache_compare(unsigned long *key, hash_count_t keys, link_t *item)
+{
+	block_t *b = hash_table_get_instance(item, block_t, hash_link);
+	return b->boff == *key;
+}
+
+static void cache_remove_callback(link_t *item)
+{
+}
+
+static hash_table_operations_t cache_ops = {
+	.hash = cache_hash,
+	.compare = cache_compare,
+	.remove_callback = cache_remove_callback
+};
+
+int block_cache_init(dev_handle_t dev_handle, size_t size, unsigned blocks,
+    enum cache_mode mode)
+{
+	devcon_t *devcon = devcon_search(dev_handle);
+	cache_t *cache;
+	if (!devcon)
+		return ENOENT;
+	if (devcon->cache)
+		return EEXIST;
+	cache = malloc(sizeof(cache_t));
+	if (!cache)
+		return ENOMEM;
+	
+	fibril_mutex_initialize(&cache->lock);
+	list_initialize(&cache->free_head);
+	cache->lblock_size = size;
+	cache->block_count = blocks;
+	cache->blocks_cached = 0;
+	cache->mode = mode;
+
+	/* No block size translation a.t.m. */
+	assert(cache->lblock_size == devcon->pblock_size);
+
+	if (!hash_table_create(&cache->block_hash, CACHE_BUCKETS, 1,
+	    &cache_ops)) {
+		free(cache);
+		return ENOMEM;
+	}
+
+	devcon->cache = cache;
+	return EOK;
+}
+
+int block_cache_fini(dev_handle_t dev_handle)
+{
+	devcon_t *devcon = devcon_search(dev_handle);
+	cache_t *cache;
+	int rc;
+
+	if (!devcon)
+		return ENOENT;
+	if (!devcon->cache)
+		return EOK;
+	cache = devcon->cache;
+	
+	/*
+	 * We are expecting to find all blocks for this device handle on the
+	 * free list, i.e. the block reference count should be zero. Do not
+	 * bother with the cache and block locks because we are single-threaded.
+	 */
+	while (!list_empty(&cache->free_head)) {
+		block_t *b = list_get_instance(cache->free_head.next,
+		    block_t, free_link);
+
+		list_remove(&b->free_link);
+		if (b->dirty) {
+			memcpy(devcon->comm_area, b->data, b->size);
+			rc = write_blocks(devcon, b->boff, 1);
+			if (rc != EOK)
+				return rc;
+		}
+
+		unsigned long key = b->boff;
+		hash_table_remove(&cache->block_hash, &key, 1);
+		
+		free(b->data);
+		free(b);
+	}
+
+	hash_table_destroy(&cache->block_hash);
+	devcon->cache = NULL;
+	free(cache);
+
+	return EOK;
+}
+
+#define CACHE_LO_WATERMARK	10	
+#define CACHE_HI_WATERMARK	20	
+static bool cache_can_grow(cache_t *cache)
+{
+	if (cache->blocks_cached < CACHE_LO_WATERMARK)
+		return true;
+	if (!list_empty(&cache->free_head))
+		return false;
+	return true;
+}
+
+static void block_initialize(block_t *b)
+{
+	fibril_mutex_initialize(&b->lock);
+	b->refcnt = 1;
+	b->dirty = false;
+	b->toxic = false;
+	fibril_rwlock_initialize(&b->contents_lock);
+	link_initialize(&b->free_link);
+	link_initialize(&b->hash_link);
+}
+
+/** Instantiate a block in memory and get a reference to it.
+ *
+ * @param block			Pointer to where the function will store the
+ * 				block pointer on success.
+ * @param dev_handle		Device handle of the block device.
+ * @param boff			Block offset.
+ * @param flags			If BLOCK_FLAGS_NOREAD is specified, block_get()
+ * 				will not read the contents of the block from the
+ *				device.
+ *
+ * @return			EOK on success or a negative error code.
+ */
+int block_get(block_t **block, dev_handle_t dev_handle, aoff64_t boff, int flags)
+{
+	devcon_t *devcon;
+	cache_t *cache;
+	block_t *b;
+	link_t *l;
+	unsigned long key = boff;
+	int rc;
+	
+	devcon = devcon_search(dev_handle);
+
+	assert(devcon);
+	assert(devcon->cache);
+	
+	cache = devcon->cache;
+
+retry:
+	rc = EOK;
+	b = NULL;
+
+	fibril_mutex_lock(&cache->lock);
+	l = hash_table_find(&cache->block_hash, &key);
+	if (l) {
+		/*
+		 * We found the block in the cache.
+		 */
+		b = hash_table_get_instance(l, block_t, hash_link);
+		fibril_mutex_lock(&b->lock);
+		if (b->refcnt++ == 0)
+			list_remove(&b->free_link);
+		if (b->toxic)
+			rc = EIO;
+		fibril_mutex_unlock(&b->lock);
+		fibril_mutex_unlock(&cache->lock);
+	} else {
+		/*
+		 * The block was not found in the cache.
+		 */
+		if (cache_can_grow(cache)) {
+			/*
+			 * We can grow the cache by allocating new blocks.
+			 * Should the allocation fail, we fail over and try to
+			 * recycle a block from the cache.
+			 */
+			b = malloc(sizeof(block_t));
+			if (!b)
+				goto recycle;
+			b->data = malloc(cache->lblock_size);
+			if (!b->data) {
+				free(b);
+				goto recycle;
+			}
+			cache->blocks_cached++;
+		} else {
+			/*
+			 * Try to recycle a block from the free list.
+			 */
+			unsigned long temp_key;
+recycle:
+			if (list_empty(&cache->free_head)) {
+				fibril_mutex_unlock(&cache->lock);
+				rc = ENOMEM;
+				goto out;
+			}
+			l = cache->free_head.next;
+			b = list_get_instance(l, block_t, free_link);
+
+			fibril_mutex_lock(&b->lock);
+			if (b->dirty) {
+				/*
+				 * The block needs to be written back to the
+				 * device before it changes identity. Do this
+				 * while not holding the cache lock so that
+				 * concurrency is not impeded. Also move the
+				 * block to the end of the free list so that we
+				 * do not slow down other instances of
+				 * block_get() draining the free list.
+				 */
+				list_remove(&b->free_link);
+				list_append(&b->free_link, &cache->free_head);
+				fibril_mutex_unlock(&cache->lock);
+				fibril_mutex_lock(&devcon->comm_area_lock);
+				memcpy(devcon->comm_area, b->data, b->size);
+				rc = write_blocks(devcon, b->boff, 1);
+				fibril_mutex_unlock(&devcon->comm_area_lock);
+				if (rc != EOK) {
+					/*
+					 * We did not manage to write the block
+					 * to the device. Keep it around for
+					 * another try. Hopefully, we will grab
+					 * another block next time.
+					 */
+					fibril_mutex_unlock(&b->lock);
+					goto retry;
+				}
+				b->dirty = false;
+				if (!fibril_mutex_trylock(&cache->lock)) {
+					/*
+					 * Somebody is probably racing with us.
+					 * Unlock the block and retry.
+					 */
+					fibril_mutex_unlock(&b->lock);
+					goto retry;
+				}
+
+			}
+			fibril_mutex_unlock(&b->lock);
+
+			/*
+			 * Unlink the block from the free list and the hash
+			 * table.
+			 */
+			list_remove(&b->free_link);
+			temp_key = b->boff;
+			hash_table_remove(&cache->block_hash, &temp_key, 1);
+		}
+
+		block_initialize(b);
+		b->dev_handle = dev_handle;
+		b->size = cache->lblock_size;
+		b->boff = boff;
+		hash_table_insert(&cache->block_hash, &key, &b->hash_link);
+
+		/*
+		 * Lock the block before releasing the cache lock. Thus we don't
+		 * kill concurrent operations on the cache while doing I/O on
+		 * the block.
+		 */
+		fibril_mutex_lock(&b->lock);
+		fibril_mutex_unlock(&cache->lock);
+
+		if (!(flags & BLOCK_FLAGS_NOREAD)) {
+			/*
+			 * The block contains old or no data. We need to read
+			 * the new contents from the device.
+			 */
+			fibril_mutex_lock(&devcon->comm_area_lock);
+			rc = read_blocks(devcon, b->boff, 1);
+			memcpy(b->data, devcon->comm_area, cache->lblock_size);
+			fibril_mutex_unlock(&devcon->comm_area_lock);
+			if (rc != EOK) 
+				b->toxic = true;
+		} else
+			rc = EOK;
+
+		fibril_mutex_unlock(&b->lock);
+	}
+out:
+	if ((rc != EOK) && b) {
+		assert(b->toxic);
+		(void) block_put(b);
+		b = NULL;
+	}
+	*block = b;
+	return rc;
+}
+
+/** Release a reference to a block.
+ *
+ * If the last reference is dropped, the block is put on the free list.
+ *
+ * @param block		Block of which a reference is to be released.
+ *
+ * @return		EOK on success or a negative error code.
+ */
+int block_put(block_t *block)
+{
+	devcon_t *devcon = devcon_search(block->dev_handle);
+	cache_t *cache;
+	unsigned blocks_cached;
+	enum cache_mode mode;
+	int rc = EOK;
+
+	assert(devcon);
+	assert(devcon->cache);
+
+	cache = devcon->cache;
+
+retry:
+	fibril_mutex_lock(&cache->lock);
+	blocks_cached = cache->blocks_cached;
+	mode = cache->mode;
+	fibril_mutex_unlock(&cache->lock);
+
+	/*
+	 * Determine whether to sync the block. Syncing the block is best done
+	 * when not holding the cache lock as it does not impede concurrency.
+	 * Since the situation may have changed when we unlocked the cache, the
+	 * blocks_cached and mode variables are mere hints. We will recheck the
+	 * conditions later when the cache lock is held again.
+	 */
+	fibril_mutex_lock(&block->lock);
+	if (block->toxic)
+		block->dirty = false;	/* will not write back toxic block */
+	if (block->dirty && (block->refcnt == 1) &&
+	    (blocks_cached > CACHE_HI_WATERMARK || mode != CACHE_MODE_WB)) {
+		fibril_mutex_lock(&devcon->comm_area_lock);
+		memcpy(devcon->comm_area, block->data, block->size);
+		rc = write_blocks(devcon, block->boff, 1);
+		fibril_mutex_unlock(&devcon->comm_area_lock);
+		block->dirty = false;
+	}
+	fibril_mutex_unlock(&block->lock);
+
+	fibril_mutex_lock(&cache->lock);
+	fibril_mutex_lock(&block->lock);
+	if (!--block->refcnt) {
+		/*
+		 * Last reference to the block was dropped. Either free the
+		 * block or put it on the free list. In case of an I/O error,
+		 * free the block.
+		 */
+		if ((cache->blocks_cached > CACHE_HI_WATERMARK) ||
+		    (rc != EOK)) {
+			/*
+			 * Currently there are too many cached blocks or there
+			 * was an I/O error when writing the block back to the
+			 * device.
+			 */
+			if (block->dirty) {
+				/*
+				 * We cannot sync the block while holding the
+				 * cache lock. Release everything and retry.
+				 */
+				block->refcnt++;
+				fibril_mutex_unlock(&block->lock);
+				fibril_mutex_unlock(&cache->lock);
+				goto retry;
+			}
+			/*
+			 * Take the block out of the cache and free it.
+			 */
+			unsigned long key = block->boff;
+			hash_table_remove(&cache->block_hash, &key, 1);
+			free(block);
+			free(block->data);
+			cache->blocks_cached--;
+			fibril_mutex_unlock(&cache->lock);
+			return rc;
+		}
+		/*
+		 * Put the block on the free list.
+		 */
+		if (cache->mode != CACHE_MODE_WB && block->dirty) {
+			/*
+			 * We cannot sync the block while holding the cache
+			 * lock. Release everything and retry.
+			 */
+			block->refcnt++;
+			fibril_mutex_unlock(&block->lock);
+			fibril_mutex_unlock(&cache->lock);
+			goto retry;
+		}
+		list_append(&block->free_link, &cache->free_head);
+	}
+	fibril_mutex_unlock(&block->lock);
+	fibril_mutex_unlock(&cache->lock);
+
+	return rc;
+}
+
+/** Read sequential data from a block device.
+ *
+ * @param dev_handle	Device handle of the block device.
+ * @param bufpos	Pointer to the first unread valid offset within the
+ * 			communication buffer.
+ * @param buflen	Pointer to the number of unread bytes that are ready in
+ * 			the communication buffer.
+ * @param pos		Device position to be read.
+ * @param dst		Destination buffer.
+ * @param size		Size of the destination buffer.
+ * @param block_size	Block size to be used for the transfer.
+ *
+ * @return		EOK on success or a negative return code on failure.
+ */
+int block_seqread(dev_handle_t dev_handle, size_t *bufpos, size_t *buflen,
+    aoff64_t *pos, void *dst, size_t size)
+{
+	size_t offset = 0;
+	size_t left = size;
+	size_t block_size;
+	devcon_t *devcon;
+
+	devcon = devcon_search(dev_handle);
+	assert(devcon);
+	block_size = devcon->pblock_size;
+	
+	fibril_mutex_lock(&devcon->comm_area_lock);
+	while (left > 0) {
+		size_t rd;
+		
+		if (*bufpos + left < *buflen)
+			rd = left;
+		else
+			rd = *buflen - *bufpos;
+		
+		if (rd > 0) {
+			/*
+			 * Copy the contents of the communication buffer to the
+			 * destination buffer.
+			 */
+			memcpy(dst + offset, devcon->comm_area + *bufpos, rd);
+			offset += rd;
+			*bufpos += rd;
+			*pos += rd;
+			left -= rd;
+		}
+		
+		if (*bufpos == *buflen) {
+			/* Refill the communication buffer with a new block. */
+			int rc;
+
+			rc = read_blocks(devcon, *pos / block_size, 1);
+			if (rc != EOK) {
+				fibril_mutex_unlock(&devcon->comm_area_lock);
+				return rc;
+			}
+			
+			*bufpos = 0;
+			*buflen = block_size;
+		}
+	}
+	fibril_mutex_unlock(&devcon->comm_area_lock);
+	
+	return EOK;
+}
+
+/** Read blocks directly from device (bypass cache).
+ *
+ * @param dev_handle	Device handle of the block device.
+ * @param ba		Address of first block.
+ * @param cnt		Number of blocks.
+ * @param src		Buffer for storing the data.
+ *
+ * @return		EOK on success or negative error code on failure.
+ */
+int block_read_direct(dev_handle_t dev_handle, aoff64_t ba, size_t cnt, void *buf)
+{
+	devcon_t *devcon;
+	int rc;
+
+	devcon = devcon_search(dev_handle);
+	assert(devcon);
+	
+	fibril_mutex_lock(&devcon->comm_area_lock);
+
+	rc = read_blocks(devcon, ba, cnt);
+	if (rc == EOK)
+		memcpy(buf, devcon->comm_area, devcon->pblock_size * cnt);
+
+	fibril_mutex_unlock(&devcon->comm_area_lock);
+
+	return rc;
+}
+
+/** Write blocks directly to device (bypass cache).
+ *
+ * @param dev_handle	Device handle of the block device.
+ * @param ba		Address of first block.
+ * @param cnt		Number of blocks.
+ * @param src		The data to be written.
+ *
+ * @return		EOK on success or negative error code on failure.
+ */
+int block_write_direct(dev_handle_t dev_handle, aoff64_t ba, size_t cnt,
+    const void *data)
+{
+	devcon_t *devcon;
+	int rc;
+
+	devcon = devcon_search(dev_handle);
+	assert(devcon);
+	
+	fibril_mutex_lock(&devcon->comm_area_lock);
+
+	memcpy(devcon->comm_area, data, devcon->pblock_size * cnt);
+	rc = write_blocks(devcon, ba, cnt);
+
+	fibril_mutex_unlock(&devcon->comm_area_lock);
+
+	return rc;
+}
+
+/** Get device block size.
+ *
+ * @param dev_handle	Device handle of the block device.
+ * @param bsize		Output block size.
+ *
+ * @return		EOK on success or negative error code on failure.
+ */
+int block_get_bsize(dev_handle_t dev_handle, size_t *bsize)
+{
+	devcon_t *devcon;
+
+	devcon = devcon_search(dev_handle);
+	assert(devcon);
+	
+	return get_block_size(devcon->dev_phone, bsize);
+}
+
+/** Get number of blocks on device.
+ *
+ * @param dev_handle	Device handle of the block device.
+ * @param nblocks	Output number of blocks.
+ *
+ * @return		EOK on success or negative error code on failure.
+ */
+int block_get_nblocks(dev_handle_t dev_handle, aoff64_t *nblocks)
+{
+	devcon_t *devcon;
+
+	devcon = devcon_search(dev_handle);
+	assert(devcon);
+	
+	return get_num_blocks(devcon->dev_phone, nblocks);
+}
+
+/** Read blocks from block device.
+ *
+ * @param devcon	Device connection.
+ * @param ba		Address of first block.
+ * @param cnt		Number of blocks.
+ * @param src		Buffer for storing the data.
+ *
+ * @return		EOK on success or negative error code on failure.
+ */
+static int read_blocks(devcon_t *devcon, aoff64_t ba, size_t cnt)
+{
+	int rc;
+
+	assert(devcon);
+	rc = async_req_3_0(devcon->dev_phone, BD_READ_BLOCKS, LOWER32(ba),
+	    UPPER32(ba), cnt);
+	if (rc != EOK) {
+		printf("Error %d reading %d blocks starting at block %" PRIuOFF64
+		    " from device handle %d\n", rc, cnt, ba,
+		    devcon->dev_handle);
+#ifndef NDEBUG
+		stacktrace_print();
+#endif
+	}
+	return rc;
+}
+
+/** Write block to block device.
+ *
+ * @param devcon	Device connection.
+ * @param ba		Address of first block.
+ * @param cnt		Number of blocks.
+ * @param src		Buffer containing the data to write.
+ *
+ * @return		EOK on success or negative error code on failure.
+ */
+static int write_blocks(devcon_t *devcon, aoff64_t ba, size_t cnt)
+{
+	int rc;
+
+	assert(devcon);
+	rc = async_req_3_0(devcon->dev_phone, BD_WRITE_BLOCKS, LOWER32(ba),
+	    UPPER32(ba), cnt);
+	if (rc != EOK) {
+		printf("Error %d writing %d blocks starting at block %" PRIuOFF64
+		    " to device handle %d\n", rc, cnt, ba, devcon->dev_handle);
+#ifndef NDEBUG
+		stacktrace_print();
+#endif
+	}
+	return rc;
+}
+
+/** Get block size used by the device. */
+static int get_block_size(int dev_phone, size_t *bsize)
+{
+	ipcarg_t bs;
+	int rc;
+
+	rc = async_req_0_1(dev_phone, BD_GET_BLOCK_SIZE, &bs);
+	if (rc == EOK)
+		*bsize = (size_t) bs;
+
+	return rc;
+}
+
+/** Get total number of blocks on block device. */
+static int get_num_blocks(int dev_phone, aoff64_t *nblocks)
+{
+	ipcarg_t nb_l, nb_h;
+	int rc;
+
+	rc = async_req_0_2(dev_phone, BD_GET_NUM_BLOCKS, &nb_l, &nb_h);
+	if (rc == EOK) {
+		*nblocks = (aoff64_t) MERGE_LOUP32(nb_l, nb_h);
+	}
+
+	return rc;
+}
+
+/** @}
+ */
Index: uspace/lib/block/libblock.h
===================================================================
--- uspace/lib/block/libblock.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/block/libblock.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,119 @@
+/*
+ * Copyright (c) 2008 Jakub Jermar
+ * Copyright (c) 2008 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 libblock 
+ * @{
+ */ 
+/**
+ * @file
+ */
+
+#ifndef LIBBLOCK_LIBBLOCK_H_
+#define LIBBLOCK_LIBBLOCK_H_
+
+#include <stdint.h>
+#include "../../srv/vfs/vfs.h"
+#include <fibril_synch.h>
+#include <adt/hash_table.h>
+#include <adt/list.h>
+
+/*
+ * Flags that can be used with block_get().
+ */
+
+/** 
+ * This macro is a symbolic value for situations where no special flags are
+ * needed.
+ */
+#define BLOCK_FLAGS_NONE	0
+
+/**
+ * When the client of block_get() intends to overwrite the current contents of
+ * the block, this flag is used to avoid the unnecessary read.
+ */
+#define BLOCK_FLAGS_NOREAD	1
+
+typedef struct block {
+	/** Mutex protecting the reference count. */
+	fibril_mutex_t lock;
+	/** Number of references to the block_t structure. */
+	unsigned refcnt;
+	/** If true, the block needs to be written back to the block device. */
+	bool dirty;
+	/** If true, the blcok does not contain valid data. */
+	bool toxic;
+	/** Readers / Writer lock protecting the contents of the block. */
+	fibril_rwlock_t contents_lock;
+	/** Handle of the device where the block resides. */
+	dev_handle_t dev_handle;
+	/** Block offset on the block device. Counted in 'size'-byte blocks. */
+	aoff64_t boff;
+	/** Size of the block. */
+	size_t size;
+	/** Link for placing the block into the free block list. */
+	link_t free_link;
+	/** Link for placing the block into the block hash table. */ 
+	link_t hash_link;
+	/** Buffer with the block data. */
+	void *data;
+} block_t;
+
+/** Caching mode */
+enum cache_mode {
+	/** Write-Through */
+	CACHE_MODE_WT,
+	/** Write-Back */
+	CACHE_MODE_WB
+};
+
+extern int block_init(dev_handle_t, size_t);
+extern void block_fini(dev_handle_t);
+
+extern int block_bb_read(dev_handle_t, aoff64_t);
+extern void *block_bb_get(dev_handle_t);
+
+extern int block_cache_init(dev_handle_t, size_t, unsigned, enum cache_mode);
+extern int block_cache_fini(dev_handle_t);
+
+extern int block_get(block_t **, dev_handle_t, aoff64_t, int);
+extern int block_put(block_t *);
+
+extern int block_seqread(dev_handle_t, size_t *, size_t *, aoff64_t *, void *,
+    size_t);
+
+extern int block_get_bsize(dev_handle_t, size_t *);
+extern int block_get_nblocks(dev_handle_t, aoff64_t *);
+extern int block_read_direct(dev_handle_t, aoff64_t, size_t, void *);
+extern int block_write_direct(dev_handle_t, aoff64_t, size_t, const void *);
+
+#endif
+
+/** @}
+ */
+
Index: uspace/lib/c/Makefile
===================================================================
--- uspace/lib/c/Makefile	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/Makefile	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,112 @@
+#
+# Copyright (c) 2005 Martin Decky
+# Copyright (c) 2007 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.
+#
+
+USPACE_PREFIX = ../..
+ROOT_PATH = $(USPACE_PREFIX)/..
+
+INCLUDE_KERNEL = include/kernel
+INCLUDE_ARCH = include/arch
+INCLUDE_LIBARCH = include/libarch
+
+PRE_DEPEND = $(INCLUDE_KERNEL) $(INCLUDE_ARCH) $(INCLUDE_LIBARCH)
+EXTRA_OUTPUT = $(LINKER_SCRIPT)
+EXTRA_CLEAN = $(INCLUDE_KERNEL) $(INCLUDE_ARCH) $(INCLUDE_LIBARCH) $(LINKER_SCRIPT)
+LIBRARY = libc
+
+COMMON_MAKEFILE = $(ROOT_PATH)/Makefile.common
+CONFIG_MAKEFILE = $(ROOT_PATH)/Makefile.config
+
+-include $(COMMON_MAKEFILE)
+-include $(CONFIG_MAKEFILE)
+-include arch/$(UARCH)/Makefile.inc
+
+GENERIC_SOURCES = \
+	generic/libc.c \
+	generic/ddi.c \
+	generic/as.c \
+	generic/cap.c \
+	generic/clipboard.c \
+	generic/devmap.c \
+	generic/event.c \
+	generic/errno.c \
+	generic/mem.c \
+	generic/str.c \
+	generic/fibril.c \
+	generic/fibril_synch.c \
+	generic/pcb.c \
+	generic/smc.c \
+	generic/thread.c \
+	generic/tls.c \
+	generic/task.c \
+	generic/futex.c \
+	generic/io/asprintf.c \
+	generic/io/io.c \
+	generic/io/printf.c \
+	generic/io/klog.c \
+	generic/io/snprintf.c \
+	generic/io/vprintf.c \
+	generic/io/vsnprintf.c \
+	generic/io/printf_core.c \
+	generic/io/console.c \
+	generic/malloc.c \
+	generic/sysinfo.c \
+	generic/ipc.c \
+	generic/async.c \
+	generic/loader.c \
+	generic/getopt.c \
+	generic/adt/list.o \
+	generic/adt/hash_table.o \
+	generic/time.c \
+	generic/err.c \
+	generic/stdlib.c \
+	generic/mman.c \
+	generic/udebug.c \
+	generic/vfs/vfs.c \
+	generic/vfs/canonify.c \
+	generic/stacktrace.c
+
+SOURCES = \
+	$(GENERIC_SOURCES) \
+	$(ARCH_SOURCES)
+
+include $(USPACE_PREFIX)/Makefile.common
+
+$(INCLUDE_ARCH): $(INCLUDE_KERNEL) $(INCLUDE_KERNEL)/arch
+	ln -sfn kernel/arch $@
+
+$(INCLUDE_LIBARCH): arch/$(UARCH)/include
+	ln -sfn ../$< $@
+
+$(INCLUDE_KERNEL)/arch: ../../../kernel/generic/include/arch $(INCLUDE_KERNEL)
+
+$(INCLUDE_KERNEL): ../../../kernel/generic/include/
+	ln -sfn ../$< $@
+
+$(LINKER_SCRIPT): $(LINKER_SCRIPT).in
+	$(GCC) $(DEFS) $(CFLAGS) -DLIBC_PATH=$(CURDIR) -E -x c $< | grep -v "^\#" > $@
Index: uspace/lib/c/Makefile.toolchain
===================================================================
--- uspace/lib/c/Makefile.toolchain	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/Makefile.toolchain	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,85 @@
+#
+# 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.
+#
+
+OPTIMIZATION = 3
+
+GCC_CFLAGS = -I$(LIBC_PREFIX)/include -O$(OPTIMIZATION) -imacros $(LIBC_PREFIX)/../../../config.h \
+	-fexec-charset=UTF-8 -fwide-exec-charset=UTF-32$(ENDIANESS) \
+	-finput-charset=UTF-8 -ffreestanding -fno-builtin -nostdlib -nostdinc \
+	-Wall -Wextra -Wno-clobbered -Wno-unused-parameter -Wmissing-prototypes \
+	-Werror-implicit-function-declaration -Wwrite-strings \
+	-Werror -pipe -g -D__$(ENDIANESS)__
+
+ICC_CFLAGS = -I$(LIBC_PREFIX)/include -O$(OPTIMIZATION) -imacros $(LIBC_PREFIX)/../../../config.h \
+	-fexec-charset=UTF-8 -fwide-exec-charset=UTF-32$(ENDIANESS) \
+	-finput-charset=UTF-8 -ffreestanding -fno-builtin -nostdlib -nostdinc \
+	-Wall -Wextra -Wno-clobbered -Wno-unused-parameter -Wmissing-prototypes \
+	-Werror-implicit-function-declaration -Wwrite-strings \
+	-Werror -pipe -g -D__$(ENDIANESS)__
+
+CLANG_CFLAGS = -I$(LIBC_PREFIX)/include -O$(OPTIMIZATION) -imacros $(LIBC_PREFIX)/../../../config.h \
+	-fexec-charset=UTF-8 -fwide-exec-charset=UTF-32$(ENDIANESS) \
+	-finput-charset=UTF-8 -ffreestanding -fno-builtin -nostdlib -nostdinc \
+	-Wall -Wextra -Wno-unused-parameter -Wmissing-prototypes \
+	-Werror-implicit-function-declaration -Wwrite-strings \
+	-pipe -g -arch $(CLANG_ARCH) -D__$(ENDIANESS)__
+
+LFLAGS = -M -N $(SOFTINT_PREFIX)/libsoftint.a
+AFLAGS =
+
+## Setup platform configuration
+#
+
+-include $(LIBC_PREFIX)/../../../Makefile.common
+-include $(LIBC_PREFIX)/../../../Makefile.config
+-include $(LIBC_PREFIX)/arch/$(UARCH)/Makefile.inc
+
+## Compilation options
+#
+
+JOBFILE = $(LIBC_PREFIX)/../../../tools/jobfile.py
+
+ifeq ($(COMPILER),gcc_cross)
+	CFLAGS = $(GCC_CFLAGS)
+	DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS)
+endif
+
+ifeq ($(COMPILER),gcc_native)
+	CFLAGS = $(GCC_CFLAGS)
+	DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS)
+endif
+
+ifeq ($(COMPILER),icc)
+	CFLAGS = $(ICC_CFLAGS)
+	DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS)
+endif
+
+ifeq ($(COMPILER),clang)
+	CFLAGS = $(CLANG_CFLAGS)
+	DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS)
+endif
Index: uspace/lib/c/arch/abs32le/Makefile.common
===================================================================
--- uspace/lib/c/arch/abs32le/Makefile.common	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/abs32le/Makefile.common	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,33 @@
+#
+# Copyright (c) 2010 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.
+#
+
+ifeq ($(COMPILER),clang)
+	CLANG_ARCH = i386
+endif
+
+ENDIANESS = LE
Index: uspace/lib/c/arch/abs32le/Makefile.inc
===================================================================
--- uspace/lib/c/arch/abs32le/Makefile.inc	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/abs32le/Makefile.inc	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,37 @@
+#
+# Copyright (c) 2010 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.c \
+	arch/$(UARCH)/src/thread_entry.c \
+	arch/$(UARCH)/src/fibril.c \
+	arch/$(UARCH)/src/tls.c \
+	arch/$(UARCH)/src/syscall.c \
+	arch/$(UARCH)/src/stacktrace.c
+
+.PRECIOUS: arch/$(UARCH)/src/entry.o
Index: uspace/lib/c/arch/abs32le/_link.ld.in
===================================================================
--- uspace/lib/c/arch/abs32le/_link.ld.in	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/abs32le/_link.ld.in	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,53 @@
+STARTUP(LIBC_PATH/arch/UARCH/src/entry.o)
+ENTRY(__entry)
+
+PHDRS {
+	text PT_LOAD FLAGS(5);
+	data PT_LOAD FLAGS(6);
+}
+
+SECTIONS {
+	. = 0x1000 + SIZEOF_HEADERS;
+	
+	.text : {
+		*(.text);
+		*(.rodata*);
+	} :text
+	
+	. = . + 0x1000;
+	
+	.data : {
+		*(.data);
+		*(.data.rel*);
+	} :data
+	
+	.tdata : {
+		_tdata_start = .;
+		*(.tdata);
+		*(.gnu.linkonce.tb.*);
+		_tdata_end = .;
+		_tbss_start = .;
+		*(.tbss);
+		_tbss_end = .;
+	} :data
+	
+	_tls_alignment = ALIGNOF(.tdata);
+	
+	.sbss : {
+		*(.scommon);
+		*(.sbss);
+	}
+	
+	.bss : {
+		*(COMMON);
+		*(.bss);
+	} :data
+	
+	. = ALIGN(0x1000);
+	
+	_heap = .;
+	
+	/DISCARD/ : {
+		*(*);
+	}
+}
Index: uspace/lib/c/arch/abs32le/include/atomic.h
===================================================================
--- uspace/lib/c/arch/abs32le/include/atomic.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/abs32le/include/atomic.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,99 @@
+/*
+ * Copyright (c) 2010 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 libcabs32le
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_abs32le_ATOMIC_H_
+#define LIBC_abs32le_ATOMIC_H_
+
+#include <bool.h>
+
+#define LIBC_ARCH_ATOMIC_H_
+#define CAS
+
+#include <atomicdflt.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) {
+	/* On real hardware the increment has to be done
+	   as an atomic action. */
+	
+	val->count++;
+}
+
+static inline void atomic_dec(atomic_t *val) {
+	/* On real hardware the decrement has to be done
+	   as an atomic action. */
+	
+	val->count++;
+}
+
+static inline atomic_count_t atomic_postinc(atomic_t *val)
+{
+	/* On real hardware both the storing of the previous
+	   value and the increment have to be done as a single
+	   atomic action. */
+	
+	atomic_count_t prev = val->count;
+	
+	val->count++;
+	return prev;
+}
+
+static inline atomic_count_t atomic_postdec(atomic_t *val)
+{
+	/* On real hardware both the storing of the previous
+	   value and the decrement have to be done as a single
+	   atomic action. */
+	
+	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/abs32le/include/config.h
===================================================================
--- uspace/lib/c/arch/abs32le/include/config.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/abs32le/include/config.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2010 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 libcabs32le
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_abs32le_CONFIG_H_
+#define LIBC_abs32le_CONFIG_H_
+
+#define PAGE_WIDTH  12
+#define PAGE_SIZE   (1 << PAGE_WIDTH)
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/abs32le/include/ddi.h
===================================================================
--- uspace/lib/c/arch/abs32le/include/ddi.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/abs32le/include/ddi.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2010 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.
+ */
+
+/** @file
+ */
+
+#ifndef LIBC_abs32le_DDI_H_
+#define LIBC_abs32le_DDI_H_
+
+static inline void pio_write_8(ioport8_t *port, uint8_t v)
+{
+	*port = v;
+}
+
+static inline void pio_write_16(ioport16_t *port, uint16_t v)
+{
+	*port = v;
+}
+
+static inline void pio_write_32(ioport32_t *port, uint32_t v)
+{
+	*port = v;
+}
+
+static inline uint8_t pio_read_8(ioport8_t *port)
+{
+	return *port;
+}
+
+static inline uint16_t pio_read_16(ioport16_t *port)
+{
+	return *port;
+}
+
+static inline uint32_t pio_read_32(ioport32_t *port)
+{
+	return *port;
+}
+
+#endif
Index: uspace/lib/c/arch/abs32le/include/entry.h
===================================================================
--- uspace/lib/c/arch/abs32le/include/entry.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/abs32le/include/entry.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2010 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 libc
+ * @{
+ */
+/**
+ * @file
+ */
+
+#ifndef LIBC_abs32le_ENTRY_H_
+#define LIBC_abs32le_ENTRY_H_
+
+extern void __entry(void);
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/abs32le/include/faddr.h
===================================================================
--- uspace/lib/c/arch/abs32le/include/faddr.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/abs32le/include/faddr.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2010 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 libabs32le
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_abs32le_FADDR_H_
+#define LIBC_abs32le_FADDR_H_
+
+#include <libarch/types.h>
+
+#define FADDR(fptr)  ((uintptr_t) (fptr))
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/abs32le/include/fibril.h
===================================================================
--- uspace/lib/c/arch/abs32le/include/fibril.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/abs32le/include/fibril.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2010 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 libcabs32le
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_abs32le_FIBRIL_H_
+#define LIBC_abs32le_FIBRIL_H_
+
+#include <sys/types.h>
+
+#define SP_DELTA  0
+
+#define context_set(ctx, _pc, stack, size, ptls) \
+	do { \
+		(ctx)->pc = (uintptr_t) (_pc); \
+		(ctx)->sp = ((uintptr_t) (stack)) + (size) - SP_DELTA; \
+		(ctx)->tls = ((uintptr_t) (ptls)) + sizeof(tcb_t); \
+	} while (0)
+
+/*
+ * On real hardware this stores the registers which
+ * need to be preserved across function calls.
+ */
+typedef struct {
+	uintptr_t sp;
+	uintptr_t pc;
+	uintptr_t tls;
+} context_t;
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/abs32le/include/inttypes.h
===================================================================
--- uspace/lib/c/arch/abs32le/include/inttypes.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/abs32le/include/inttypes.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,69 @@
+/*
+ * Copyright (c) 2010 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 libcabs32le
+ * @{
+ */
+
+#ifndef LIBC_abs32le_INTTYPES_H_
+#define LIBC_abs32le_INTTYPES_H_
+
+#define PRId8 "d"
+#define PRId16 "d"
+#define PRId32 "d"
+#define PRId64 "lld"
+#define PRIdPTR "d"
+
+#define PRIo8 "o"
+#define PRIo16 "o"
+#define PRIo32 "o"
+#define PRIo64 "llo"
+#define PRIoPTR "o"
+
+#define PRIu8 "u"
+#define PRIu16 "u"
+#define PRIu32 "u"
+#define PRIu64 "llu"
+#define PRIuPTR "u"
+
+#define PRIx8 "x"
+#define PRIx16 "x"
+#define PRIx32 "x"
+#define PRIx64 "llx"
+#define PRIxPTR "x"
+
+#define PRIX8 "X"
+#define PRIX16 "X"
+#define PRIX32 "X"
+#define PRIX64 "llX"
+#define PRIXPTR "X"
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/abs32le/include/istate.h
===================================================================
--- uspace/lib/c/arch/abs32le/include/istate.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/abs32le/include/istate.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2010 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 debug
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_abs32le__ISTATE_H_
+#define LIBC_abs32le__ISTATE_H_
+
+#include <sys/types.h>
+
+/** Interrupt context.
+ *
+ * On real hardware this stores the registers which
+ * need to be preserved during interupts.
+ */
+typedef struct istate {
+	uintptr_t ip;
+	uintptr_t fp;
+	uint32_t stack[];
+} istate_t;
+
+static inline uintptr_t istate_get_pc(istate_t *istate)
+{
+	return istate->ip;
+}
+
+static inline uintptr_t istate_get_fp(istate_t *istate)
+{
+	return istate->fp;
+}
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/abs32le/include/limits.h
===================================================================
--- uspace/lib/c/arch/abs32le/include/limits.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/abs32le/include/limits.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2010 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 libcabs32le
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_abs32le__LIMITS_H_
+#define LIBC_abs32le__LIMITS_H_
+
+#define LONG_MIN MIN_INT32
+#define LONG_MAX MAX_INT32
+#define ULONG_MIN MIN_UINT32
+#define ULONG_MAX MAX_UINT32
+
+#define SIZE_MIN MIN_UINT32
+#define SIZE_MAX MAX_UINT32
+#define SSIZE_MIN MIN_INT32
+#define SSIZE_MAX MAX_INT32
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/abs32le/include/syscall.h
===================================================================
--- uspace/lib/c/arch/abs32le/include/syscall.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/abs32le/include/syscall.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,56 @@
+/*
+ * Copyright (c) 2010 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 libc
+ * @{
+ */
+/**
+ * @file
+ */
+
+#ifndef LIBC_abs32le_SYSCALL_H_
+#define LIBC_abs32le_SYSCALL_H_
+
+#include <sys/types.h>
+#include <kernel/syscall/syscall.h>
+
+#define __syscall0  __syscall
+#define __syscall1  __syscall
+#define __syscall2  __syscall
+#define __syscall3  __syscall
+#define __syscall4  __syscall
+#define __syscall5  __syscall
+#define __syscall6  __syscall
+
+extern sysarg_t __syscall(const sysarg_t, const sysarg_t, const sysarg_t,
+    const sysarg_t, const sysarg_t, const sysarg_t, const syscall_t);
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/abs32le/include/thread.h
===================================================================
--- uspace/lib/c/arch/abs32le/include/thread.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/abs32le/include/thread.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2010 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 libcabs32le
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_abs32le_THREAD_H_
+#define LIBC_abs32le_THREAD_H_
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/abs32le/include/tls.h
===================================================================
--- uspace/lib/c/arch/abs32le/include/tls.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/abs32le/include/tls.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2010 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 libcabs32le
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_abs32le_TLS_H_
+#define LIBC_abs32le_TLS_H_
+
+#define CONFIG_TLS_VARIANT_2
+
+#include <libc.h>
+#include <unistd.h>
+
+typedef struct {
+	void *self;
+	void *fibril_data;
+} tcb_t;
+
+static inline void __tcb_set(tcb_t *tcb)
+{
+}
+
+static inline tcb_t *__tcb_get(void)
+{
+	return NULL;
+}
+
+extern uintptr_t __aeabi_read_tp(void);
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/abs32le/include/types.h
===================================================================
--- uspace/lib/c/arch/abs32le/include/types.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/abs32le/include/types.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2010 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 libcabs32le
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_abs32le_TYPES_H_
+#define LIBC_abs32le_TYPES_H_
+
+#define __32_BITS__
+
+typedef unsigned int sysarg_t;
+
+typedef char int8_t;
+typedef short int int16_t;
+typedef int int32_t;
+typedef long long int int64_t;
+
+typedef unsigned char uint8_t;
+typedef unsigned short int uint16_t;
+typedef unsigned int uint32_t;
+typedef unsigned long long int uint64_t;
+
+typedef int32_t ssize_t;
+typedef uint32_t size_t;
+
+typedef uint32_t uintptr_t;
+typedef uint32_t atomic_count_t;
+typedef int32_t atomic_signed_t;
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/abs32le/src/entry.c
===================================================================
--- uspace/lib/c/arch/abs32le/src/entry.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/abs32le/src/entry.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2010 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.
+ */
+
+/** @file
+ */
+
+#include <libc.h>
+#include <unistd.h>
+#include <libarch/entry.h>
+
+void __entry(void)
+{
+	__main(NULL);
+	__exit();
+}
+
+/** @}
+ */
Index: uspace/lib/c/arch/abs32le/src/fibril.c
===================================================================
--- uspace/lib/c/arch/abs32le/src/fibril.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/abs32le/src/fibril.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2010 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.
+ */
+
+/** @file
+ */
+
+#include <fibril.h>
+#include <bool.h>
+
+int context_save(context_t *ctx)
+{
+	return 1;
+}
+
+void context_restore(context_t *ctx)
+{
+	while (true);
+}
+
+/** @}
+ */
Index: uspace/lib/c/arch/abs32le/src/stacktrace.c
===================================================================
--- uspace/lib/c/arch/abs32le/src/stacktrace.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/abs32le/src/stacktrace.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,67 @@
+/*
+ * Copyright (c) 2010 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.
+ */
+
+/** @file
+ */
+
+#include <sys/types.h>
+#include <unistd.h>
+#include <bool.h>
+#include <stacktrace.h>
+
+bool stacktrace_fp_valid(stacktrace_t *st, uintptr_t fp)
+{
+	return true;
+}
+
+int stacktrace_fp_prev(stacktrace_t *st, uintptr_t fp, uintptr_t *prev)
+{
+	return 0;
+}
+
+int stacktrace_ra_get(stacktrace_t *st, uintptr_t fp, uintptr_t *ra)
+{
+	return 0;
+}
+
+void stacktrace_prepare(void)
+{
+}
+
+uintptr_t stacktrace_fp_get(void)
+{
+	return NULL;
+}
+
+uintptr_t stacktrace_pc_get(void)
+{
+	return NULL;
+}
+
+/** @}
+ */
Index: uspace/lib/c/arch/abs32le/src/syscall.c
===================================================================
--- uspace/lib/c/arch/abs32le/src/syscall.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/abs32le/src/syscall.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2010 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.
+ */
+
+/** @file
+ */
+
+#include <sys/types.h>
+#include <libarch/syscall.h>
+
+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)
+{
+	return 0;
+}
+
+/** @}
+ */
Index: uspace/lib/c/arch/abs32le/src/thread_entry.c
===================================================================
--- uspace/lib/c/arch/abs32le/src/thread_entry.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/abs32le/src/thread_entry.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2010 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.
+ */
+
+/** @file
+ */
+
+#include <unistd.h>
+#include <thread.h>
+
+void __thread_entry(void)
+{
+	__thread_main(NULL);
+}
+
+/** @}
+ */
Index: uspace/lib/c/arch/abs32le/src/tls.c
===================================================================
--- uspace/lib/c/arch/abs32le/src/tls.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/abs32le/src/tls.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2010 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.
+ */
+
+/** @file
+ */
+
+#include <tls.h>
+#include <sys/types.h>
+#include <unistd.h>
+
+tcb_t * __alloc_tls(void **data, size_t size)
+{
+	return tls_alloc_variant_2(data, size);
+}
+
+void __free_tls_arch(tcb_t *tcb, size_t size)
+{
+	tls_free_variant_2(tcb, size);
+}
+
+uintptr_t __aeabi_read_tp(void)
+{
+	return NULL;
+}
+
+/** @}
+ */
Index: uspace/lib/c/arch/amd64/Makefile.common
===================================================================
--- uspace/lib/c/arch/amd64/Makefile.common	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/amd64/Makefile.common	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,35 @@
+#
+# 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.
+#
+
+CLANG_ARCH = x86_64
+GCC_CFLAGS += -fno-omit-frame-pointer
+
+ENDIANESS = LE
+
+BFD_NAME = elf64-x86-64
+BFD_ARCH = i386:x86-64
Index: uspace/lib/c/arch/amd64/Makefile.inc
===================================================================
--- uspace/lib/c/arch/amd64/Makefile.inc	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/amd64/Makefile.inc	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,38 @@
+#
+# 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.
+#
+
+ARCH_SOURCES = \
+	arch/$(UARCH)/src/entry.s \
+	arch/$(UARCH)/src/thread_entry.s \
+	arch/$(UARCH)/src/syscall.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/amd64/_link.ld.in
===================================================================
--- uspace/lib/c/arch/amd64/_link.ld.in	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/amd64/_link.ld.in	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,46 @@
+STARTUP(LIBC_PATH/arch/UARCH/src/entry.o)
+ENTRY(__entry)
+
+PHDRS {
+	text PT_LOAD FLAGS(5);
+	data PT_LOAD FLAGS(6);
+}
+
+SECTIONS {
+	. = 0x1000 + SIZEOF_HEADERS;
+	
+	.init : {
+		*(.init);
+	} :text
+	.text : {
+		*(.text);
+		*(.rodata*);
+	} :text
+
+	. = . + 0x1000;
+
+	.data : {
+		*(.data);
+	} :data
+	.tdata : {
+		_tdata_start = .;
+		*(.tdata);
+		_tdata_end = .;
+		_tbss_start = .;
+		*(.tbss);
+		_tbss_end = .;
+	} :data
+	_tls_alignment = ALIGNOF(.tdata);
+	.bss : {
+		*(COMMON);
+		*(.bss);
+	} :data
+
+	. = ALIGN(0x1000);
+	_heap = .;
+	
+	/DISCARD/ : {
+		*(*);
+	}
+
+}
Index: uspace/lib/c/arch/amd64/include/atomic.h
===================================================================
--- uspace/lib/c/arch/amd64/include/atomic.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/amd64/include/atomic.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,92 @@
+/*
+ * Copyright (c) 2001-2004 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 libcamd64 amd64
+ * @ingroup lc
+ * @brief	amd64 architecture dependent parts of libc
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_amd64_ATOMIC_H_
+#define LIBC_amd64_ATOMIC_H_
+
+#define LIBC_ARCH_ATOMIC_H_
+
+#include <atomicdflt.h>
+
+static inline void atomic_inc(atomic_t *val)
+{
+	asm volatile (
+		"lock incq %[count]\n"
+		: [count] "+m" (val->count)
+	);
+}
+
+static inline void atomic_dec(atomic_t *val)
+{
+	asm volatile (
+		"lock decq %[count]\n"
+		: [count] "+m" (val->count)
+	);
+}
+
+static inline atomic_count_t atomic_postinc(atomic_t *val)
+{
+	atomic_count_t r = 1;
+	
+	asm volatile (
+		"lock xaddq %[r], %[count]\n"
+		: [count] "+m" (val->count),
+		  [r] "+r" (r)
+	);
+	
+	return r;
+}
+
+static inline atomic_count_t atomic_postdec(atomic_t *val)
+{
+	atomic_count_t r = -1;
+	
+	asm volatile (
+		"lock xaddq %[r], %[count]\n"
+		: [count] "+m" (val->count),
+		  [r] "+r" (r)
+	);
+	
+	return r;
+}
+
+#define atomic_preinc(val)  (atomic_postinc(val) + 1)
+#define atomic_predec(val)  (atomic_postdec(val) - 1)
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/amd64/include/config.h
===================================================================
--- uspace/lib/c/arch/amd64/include/config.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/amd64/include/config.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,44 @@
+/*
+ * 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 libcamd64
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_amd64_CONFIG_H_
+#define LIBC_amd64_CONFIG_H_
+
+#define PAGE_WIDTH	12
+#define PAGE_SIZE	(1 << PAGE_WIDTH)
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/amd64/include/ddi.h
===================================================================
--- uspace/lib/c/arch/amd64/include/ddi.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/amd64/include/ddi.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,1 @@
+../../ia32/include/ddi.h
Index: uspace/lib/c/arch/amd64/include/faddr.h
===================================================================
--- uspace/lib/c/arch/amd64/include/faddr.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/amd64/include/faddr.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,45 @@
+/*
+ * 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 libcamd64
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_amd64_FADDR_H_
+#define LIBC_amd64_FADDR_H_
+
+#include <libarch/types.h>
+
+#define FADDR(fptr)		((uintptr_t) (fptr))
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/amd64/include/fibril.h
===================================================================
--- uspace/lib/c/arch/amd64/include/fibril.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/amd64/include/fibril.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,75 @@
+/*
+ * 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 libcamd64
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_amd64_FIBRIL_H_
+#define LIBC_amd64_FIBRIL_H_
+
+#include <sys/types.h>
+
+/* According to ABI the stack MUST be aligned on 
+ * 16-byte boundary. If it is not, the va_arg calling will
+ * panic sooner or later
+ */
+#define SP_DELTA     16
+
+#define context_set(c, _pc, stack, size, ptls) \
+	do { \
+		(c)->pc = (sysarg_t) (_pc); \
+		(c)->sp = ((sysarg_t) (stack)) + (size) - SP_DELTA; \
+		(c)->tls = (sysarg_t) (ptls); \
+		(c)->rbp = 0; \
+	} while (0)
+
+/* We include only registers that must be preserved
+ * during function call
+ */
+typedef struct {
+    uint64_t sp;
+    uint64_t pc;
+    
+    uint64_t rbx;
+    uint64_t rbp;
+
+    uint64_t r12;
+    uint64_t r13;
+    uint64_t r14;
+    uint64_t r15;
+
+    uint64_t tls;
+} context_t;
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/amd64/include/inttypes.h
===================================================================
--- uspace/lib/c/arch/amd64/include/inttypes.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/amd64/include/inttypes.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,76 @@
+/*
+ * 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 libcamd64
+ * @{
+ */
+/** @file Macros for format specifiers.
+ *
+ * Macros for formatting stdint types as specified in section
+ * 7.8.1 Macros for format specifiers of the C99 draft specification
+ * (ISO/IEC 9899:201x). Only some macros from the specification are
+ * implemented.
+ */
+
+#ifndef LIBC_amd64_INTTYPES_H_
+#define LIBC_amd64_INTTYPES_H_
+
+#define PRId8 "d"
+#define PRId16 "d"
+#define PRId32 "d"
+#define PRId64 "lld"
+#define PRIdPTR "lld"
+
+#define PRIo8 "o"
+#define PRIo16 "o"
+#define PRIo32 "o"
+#define PRIo64 "llo"
+#define PRIoPTR "llo"
+
+#define PRIu8 "u"
+#define PRIu16 "u"
+#define PRIu32 "u"
+#define PRIu64 "llu"
+#define PRIuPTR "llu"
+
+#define PRIx8 "x"
+#define PRIx16 "x"
+#define PRIx32 "x"
+#define PRIx64 "llx"
+#define PRIxPTR "llx"
+
+#define PRIX8 "X"
+#define PRIX16 "X"
+#define PRIX32 "X"
+#define PRIX64 "llX"
+#define PRIXPTR "llX"
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/amd64/include/istate.h
===================================================================
--- uspace/lib/c/arch/amd64/include/istate.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/amd64/include/istate.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,75 @@
+/*
+ * 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 libcamd64
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_amd64_ISTATE_H_
+#define LIBC_amd64_ISTATE_H_
+
+#include <sys/types.h>
+
+/** Interrupt context.
+ *
+ * This is a copy of the kernel definition with which it must be kept in sync.
+ */
+typedef struct istate {
+	uint64_t rax;
+	uint64_t rcx;
+	uint64_t rdx;
+	uint64_t rsi;
+	uint64_t rdi;
+	uint64_t r8;
+	uint64_t r9;
+	uint64_t r10;
+	uint64_t r11;
+	uint64_t rbp;
+	uint64_t error_word;
+	uint64_t rip;
+	uint64_t cs;
+	uint64_t rflags;
+	uint64_t stack[]; /* Additional data on stack */
+} istate_t;
+
+static inline uintptr_t istate_get_pc(istate_t *istate)
+{
+	return istate->rip;
+}
+
+static inline uintptr_t istate_get_fp(istate_t *istate)
+{
+	return istate->rbp;
+}
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/amd64/include/limits.h
===================================================================
--- uspace/lib/c/arch/amd64/include/limits.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/amd64/include/limits.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,51 @@
+/*
+ * 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 libcamd64
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_amd64_LIMITS_H_
+#define LIBC_amd64_LIMITS_H_
+
+#define LONG_MIN MIN_INT64
+#define LONG_MAX MAX_INT64
+#define ULONG_MIN MIN_UINT64
+#define ULONG_MAX MAX_UINT64
+
+#define SIZE_MIN MIN_UINT64
+#define SIZE_MAX MAX_UINT64
+#define SSIZE_MIN MIN_INT64
+#define SSIZE_MAX MAX_INT64
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/amd64/include/stackarg.h
===================================================================
--- uspace/lib/c/arch/amd64/include/stackarg.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/amd64/include/stackarg.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,41 @@
+/*
+ * 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 libcamd64
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_STACKARG_H_
+#define LIBC_STACKARG_H_
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/amd64/include/syscall.h
===================================================================
--- uspace/lib/c/arch/amd64/include/syscall.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/amd64/include/syscall.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,46 @@
+/*
+ * 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 libc
+ * @{
+ */
+/**
+ * @file
+ */
+
+#ifndef LIBC_amd64_SYSCALL_H_
+#define LIBC_amd64_SYSCALL_H_
+
+#define LIBARCH_SYSCALL_GENERIC
+
+#include <syscall.h>
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/amd64/include/thread.h
===================================================================
--- uspace/lib/c/arch/amd64/include/thread.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/amd64/include/thread.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,41 @@
+/*
+ * 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 libcamd64
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_amd64_THREAD_H_
+#define LIBC_amd64_THREAD_H_
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/amd64/include/tls.h
===================================================================
--- uspace/lib/c/arch/amd64/include/tls.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/amd64/include/tls.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,63 @@
+/*
+ * 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 libcamd64
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_amd64_TLS_H_
+#define LIBC_amd64_TLS_H_
+
+#define CONFIG_TLS_VARIANT_2
+
+#include <libc.h>
+
+typedef struct {
+	void *self;
+	void *fibril_data;
+} tcb_t;
+
+static inline void __tcb_set(tcb_t *tcb)
+{
+	__SYSCALL1(SYS_TLS_SET, (sysarg_t) tcb);
+}
+
+static inline tcb_t * __tcb_get(void)
+{
+	void * retval;
+
+	asm ("movq %%fs:0, %0" : "=r"(retval));
+	return retval;
+}
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/amd64/include/types.h
===================================================================
--- uspace/lib/c/arch/amd64/include/types.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/amd64/include/types.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,62 @@
+/*
+ * 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 libcamd64
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_amd64_TYPES_H_
+#define LIBC_amd64_TYPES_H_
+
+#define __64_BITS__
+
+typedef unsigned long long sysarg_t;
+
+typedef signed char int8_t;
+typedef short int int16_t;
+typedef int int32_t;
+typedef long long int int64_t;
+
+typedef unsigned char uint8_t;
+typedef unsigned short int uint16_t;
+typedef unsigned int uint32_t;
+typedef unsigned long long int uint64_t;
+
+typedef int64_t ssize_t;
+typedef uint64_t size_t;
+
+typedef uint64_t uintptr_t;
+typedef uint64_t atomic_count_t;
+typedef int64_t atomic_signed_t;
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/amd64/src/entry.s
===================================================================
--- uspace/lib/c/arch/amd64/src/entry.s	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/amd64/src/entry.s	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,50 @@
+#
+# 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.
+#
+
+.section .init, "ax"
+
+.org 0
+
+.globl __entry
+
+## User-space task entry point
+#
+# %rdi contains the PCB pointer
+#
+__entry:
+	#
+	# Create the first stack frame.
+	#
+	pushq $0
+	mov %rsp, %rbp
+	
+	# %rdi was deliberately chosen as the first argument is also in %rdi
+	# Pass PCB pointer to __main (no operation)
+	call __main
+
+	call __exit
Index: uspace/lib/c/arch/amd64/src/fibril.S
===================================================================
--- uspace/lib/c/arch/amd64/src/fibril.S	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/amd64/src/fibril.S	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,73 @@
+#
+# Copyright (c) 2001-2004 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.
+#
+
+.text
+
+.global context_save
+.global context_restore
+
+#include <kernel/arch/context_offset.h>
+
+## Save current CPU context
+#
+# Save CPU context to context_t variable
+# pointed by the 1st argument. Returns 1 in EAX.
+#
+context_save:
+	movq (%rsp), %rdx     # the caller's return %eip
+	
+	# In %edi is passed 1st argument
+	CONTEXT_SAVE_ARCH_CORE %rdi %rdx 
+	
+	# Save TLS
+	movq %fs:0, %rax
+	movq %rax, OFFSET_TLS(%rdi)
+		
+	xorq %rax,%rax		# context_save returns 1
+	incq %rax
+	ret
+
+
+## Restore current CPU context
+#
+# Restore CPU context from context_t variable
+# pointed by the 1st argument. Returns 0 in EAX.
+#
+context_restore:
+	
+	CONTEXT_RESTORE_ARCH_CORE %rdi %rdx
+	
+	movq %rdx,(%rsp)
+
+	# Set thread local storage
+	movq OFFSET_TLS(%rdi), %rdi   # Set arg1 to TLS addr
+	movq $1, %rax		# SYS_TLS_SET
+	syscall
+
+	xorq %rax,%rax		# context_restore returns 0
+	ret
Index: uspace/lib/c/arch/amd64/src/stacktrace.c
===================================================================
--- uspace/lib/c/arch/amd64/src/stacktrace.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/amd64/src/stacktrace.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2010 Jakub Jermar
+ * 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 libcamd64 amd64
+ * @ingroup lc
+ * @{
+ */
+/** @file
+ */
+
+#include <sys/types.h>
+#include <bool.h>
+
+#include <stacktrace.h>
+
+#define FRAME_OFFSET_FP_PREV	0
+#define FRAME_OFFSET_RA		8
+
+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)
+{
+	return (*st->read_uintptr)(st->op_arg, fp + FRAME_OFFSET_FP_PREV, prev);
+}
+
+int stacktrace_ra_get(stacktrace_t *st, uintptr_t fp, uintptr_t *ra)
+{
+	return (*st->read_uintptr)(st->op_arg, fp + FRAME_OFFSET_RA, ra);
+}
+
+/** @}
+ */
Index: uspace/lib/c/arch/amd64/src/stacktrace_asm.S
===================================================================
--- uspace/lib/c/arch/amd64/src/stacktrace_asm.S	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/amd64/src/stacktrace_asm.S	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,44 @@
+#
+# 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.
+#
+
+.text
+
+.global stacktrace_prepare
+.global stacktrace_fp_get
+.global stacktrace_pc_get
+
+stacktrace_prepare:
+	ret
+
+stacktrace_fp_get:
+	movq %rbp, %rax
+	ret
+
+stacktrace_pc_get:
+	movq (%rsp), %rax
+	ret
Index: uspace/lib/c/arch/amd64/src/syscall.S
===================================================================
--- uspace/lib/c/arch/amd64/src/syscall.S	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/amd64/src/syscall.S	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,57 @@
+#
+# 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.
+#
+
+.text
+	
+.global __syscall
+	
+## Make a system call.
+#
+# @param rdi		First argument.
+# @param rsi		Second argument.
+# @param rdx		Third argument.
+# @param rcx		Fourth argument.
+# @param r8		Fifth argument.
+# @param r9		Sixth argument.
+# @param 8(%rsp)	Syscall number.
+#
+# @return		The return value will be stored in RAX.
+#
+__syscall:
+	#
+	# Move the syscall number into RAX.
+	movslq 8(%rsp), %rax
+
+	#
+	# Save RCX, the 4th argument, aside because RCX gets rewritten by the
+	# SYSCALL instruction.
+	#
+	movq %rcx, %r10
+	syscall
+	ret
+
Index: uspace/lib/c/arch/amd64/src/thread_entry.s
===================================================================
--- uspace/lib/c/arch/amd64/src/thread_entry.s	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/amd64/src/thread_entry.s	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,49 @@
+#
+# 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.
+#
+
+.text
+
+.globl __thread_entry
+
+## User-space thread entry point for all but the first threads.
+#
+#
+__thread_entry:
+	#
+	# Create the first stack frame.
+	#
+	pushq $0
+	movq %rsp, %rbp
+
+	#
+	# RAX contains address of uarg
+	#
+	movq %rax, %rdi
+	call __thread_main
+	
+.end __thread_entry
Index: uspace/lib/c/arch/amd64/src/tls.c
===================================================================
--- uspace/lib/c/arch/amd64/src/tls.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/amd64/src/tls.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,51 @@
+/*
+ * 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 libcamd64 amd64
+ * @ingroup lc
+ * @{
+ */
+/** @file
+  * @ingroup libcia32
+ */
+
+#include <tls.h>
+#include <sys/types.h>
+
+tcb_t * __alloc_tls(void **data, size_t size)
+{
+	return tls_alloc_variant_2(data, size);
+}
+
+void __free_tls_arch(tcb_t *tcb, size_t size)
+{
+	tls_free_variant_2(tcb, size);
+}
+
+/** @}
+ */
Index: uspace/lib/c/arch/arm32/Makefile.common
===================================================================
--- uspace/lib/c/arch/arm32/Makefile.common	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/arm32/Makefile.common	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,35 @@
+#
+# Copyright (c) 2007 Michal Kebrt
+# Copyright (c) 2007 Pavel Jancik
+# 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.
+#
+
+GCC_CFLAGS += -ffixed-r9 -mtp=soft -mapcs-frame -fno-omit-frame-pointer
+
+ENDIANESS = LE
+
+BFD_NAME = elf32-littlearm
+BFD_ARCH = arm
Index: uspace/lib/c/arch/arm32/Makefile.inc
===================================================================
--- uspace/lib/c/arch/arm32/Makefile.inc	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/arm32/Makefile.inc	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,40 @@
+#
+# Copyright (c) 2007 Michal Kebrt
+# Copyright (c) 2007 Pavel Jancik
+# 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/thread_entry.s \
+	arch/$(UARCH)/src/syscall.c \
+	arch/$(UARCH)/src/fibril.S \
+	arch/$(UARCH)/src/tls.c \
+	arch/$(UARCH)/src/eabi.S \
+	arch/$(UARCH)/src/stacktrace.c \
+	arch/$(UARCH)/src/stacktrace_asm.S
+
+.PRECIOUS: arch/$(UARCH)/src/entry.o
Index: uspace/lib/c/arch/arm32/_link.ld.in
===================================================================
--- uspace/lib/c/arch/arm32/_link.ld.in	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/arm32/_link.ld.in	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,50 @@
+STARTUP(LIBC_PATH/arch/UARCH/src/entry.o)
+ENTRY(__entry)
+
+PHDRS {
+	text PT_LOAD FLAGS(5);
+	data PT_LOAD FLAGS(6);
+}
+
+SECTIONS {
+	. = 0x1000 + SIZEOF_HEADERS;
+
+	.init : {
+		*(.init);
+	} : text
+	.text : {
+		*(.text);
+        *(.rodata*);
+	} :text
+
+	. = . + 0x1000;
+
+	.data : {
+		*(.opd);
+		*(.data .data.*);
+		*(.sdata);
+	} :data
+	.tdata : {
+		_tdata_start = .;
+		*(.tdata);
+		_tdata_end = .;
+		_tbss_start = .;
+		*(.tbss);
+		_tbss_end = .;
+	} :data
+	_tls_alignment = ALIGNOF(.tdata);
+	.bss : {
+		*(.sbss);
+		*(.scommon);
+        *(COMMON);
+        *(.bss);
+	} :data
+	
+	. = ALIGN(0x1000);
+	_heap = .;
+	
+	/DISCARD/ : {
+		*(*);
+	}
+
+}
Index: uspace/lib/c/arch/arm32/include/atomic.h
===================================================================
--- uspace/lib/c/arch/arm32/include/atomic.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/arm32/include/atomic.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,204 @@
+/*
+ * Copyright (c) 2007 Michal Kebrt
+ * 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 libcarm32
+ * @{
+ */
+/** @file
+ *  @brief Atomic operations.
+ */
+
+#ifndef LIBC_arm32_ATOMIC_H_
+#define LIBC_arm32_ATOMIC_H_
+
+#define LIBC_ARCH_ATOMIC_H_
+#define CAS
+
+#include <atomicdflt.h>
+#include <bool.h>
+#include <sys/types.h>
+
+extern uintptr_t *ras_page;
+
+static inline bool cas(atomic_t *val, atomic_count_t ov, atomic_count_t nv)
+{
+	atomic_count_t ret = 0;
+	
+	/*
+	 * The following instructions between labels 1 and 2 constitute a
+	 * Restartable Atomic Seqeunce. Should the sequence be non-atomic,
+	 * the kernel will restart it.
+	 */
+	asm volatile (
+		"1:\n"
+		"	adr %[ret], 1b\n"
+		"	str %[ret], %[rp0]\n"
+		"	adr %[ret], 2f\n"
+		"	str %[ret], %[rp1]\n"
+		"	ldr %[ret], %[addr]\n"
+		"	cmp %[ret], %[ov]\n"
+		"	streq %[nv], %[addr]\n"
+		"2:\n"
+		"	moveq %[ret], #1\n"
+		"	movne %[ret], #0\n"
+		: [ret] "+&r" (ret),
+		  [rp0] "=m" (ras_page[0]),
+		  [rp1] "=m" (ras_page[1]),
+		  [addr] "+m" (val->count)
+		: [ov] "r" (ov),
+		  [nv] "r" (nv)
+		: "memory"
+	);
+	
+	ras_page[0] = 0;
+	asm volatile (
+		"" ::: "memory"
+	);
+	ras_page[1] = 0xffffffff;
+	
+	return (bool) ret;
+}
+
+/** Atomic addition.
+ *
+ * @param val Where to add.
+ * @param i   Value to be added.
+ *
+ * @return Value after addition.
+ *
+ */
+static inline atomic_count_t atomic_add(atomic_t *val, atomic_count_t i)
+{
+	atomic_count_t ret = 0;
+	
+	/*
+	 * The following instructions between labels 1 and 2 constitute a
+	 * Restartable Atomic Seqeunce. Should the sequence be non-atomic,
+	 * the kernel will restart it.
+	 */
+	asm volatile (
+		"1:\n"
+		"	adr %[ret], 1b\n"
+		"	str %[ret], %[rp0]\n"
+		"	adr %[ret], 2f\n"
+		"	str %[ret], %[rp1]\n"
+		"	ldr %[ret], %[addr]\n"
+		"	add %[ret], %[ret], %[imm]\n"
+		"	str %[ret], %[addr]\n"
+		"2:\n"
+		: [ret] "+&r" (ret),
+		  [rp0] "=m" (ras_page[0]),
+		  [rp1] "=m" (ras_page[1]),
+		  [addr] "+m" (val->count)
+		: [imm] "r" (i)
+	);
+	
+	ras_page[0] = 0;
+	asm volatile (
+		"" ::: "memory"
+	);
+	ras_page[1] = 0xffffffff;
+	
+	return ret;
+}
+
+
+/** Atomic increment.
+ *
+ * @param val Variable to be incremented.
+ *
+ */
+static inline void atomic_inc(atomic_t *val)
+{
+	atomic_add(val, 1);
+}
+
+
+/** Atomic decrement.
+ *
+ * @param val Variable to be decremented.
+ *
+ */
+static inline void atomic_dec(atomic_t *val)
+{
+	atomic_add(val, -1);
+}
+
+
+/** Atomic pre-increment.
+ *
+ * @param val Variable to be incremented.
+ * @return    Value after incrementation.
+ *
+ */
+static inline atomic_count_t atomic_preinc(atomic_t *val)
+{
+	return atomic_add(val, 1);
+}
+
+
+/** Atomic pre-decrement.
+ *
+ * @param val Variable to be decremented.
+ * @return    Value after decrementation.
+ *
+ */
+static inline atomic_count_t atomic_predec(atomic_t *val)
+{
+	return atomic_add(val, -1);
+}
+
+
+/** Atomic post-increment.
+ *
+ * @param val Variable to be incremented.
+ * @return    Value before incrementation.
+ *
+ */
+static inline atomic_count_t atomic_postinc(atomic_t *val)
+{
+	return atomic_add(val, 1) - 1;
+}
+
+
+/** Atomic post-decrement.
+ *
+ * @param val Variable to be decremented.
+ * @return    Value before decrementation.
+ *
+ */
+static inline atomic_count_t atomic_postdec(atomic_t *val)
+{
+	return atomic_add(val, -1) + 1;
+}
+
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/arm32/include/config.h
===================================================================
--- uspace/lib/c/arch/arm32/include/config.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/arm32/include/config.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,45 @@
+/*
+ * 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 libcarm32
+ * @{
+ */
+/** @file  
+ *  @brief Configuration constants.
+ */
+
+#ifndef LIBC_arm32_CONFIG_H_
+#define LIBC_arm32_CONFIG_H_
+
+#define PAGE_WIDTH	12
+#define PAGE_SIZE	(1 << PAGE_WIDTH)
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/arm32/include/ddi.h
===================================================================
--- uspace/lib/c/arch/arm32/include/ddi.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/arm32/include/ddi.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,69 @@
+/*
+ * 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 libcarm32
+ */
+
+#ifndef LIBC_arm32_DDI_H_
+#define LIBC_arm32_DDI_H_
+
+#include <sys/types.h>
+#include <libarch/types.h>
+
+static inline void pio_write_8(ioport8_t *port, uint8_t v)
+{
+	*port = v;
+}
+
+static inline void pio_write_16(ioport16_t *port, uint16_t v)
+{
+	*port = v;
+}
+
+static inline void pio_write_32(ioport32_t *port, uint32_t v)
+{
+	*port = v;
+}
+
+static inline uint8_t pio_read_8(ioport8_t *port)
+{
+	return *port;
+}
+
+static inline uint16_t pio_read_16(ioport16_t *port)
+{
+	return *port;
+}
+
+static inline uint32_t pio_read_32(ioport32_t *port)
+{
+	return *port;
+}
+
+#endif
Index: uspace/lib/c/arch/arm32/include/faddr.h
===================================================================
--- uspace/lib/c/arch/arm32/include/faddr.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/arm32/include/faddr.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2007 Michal Kebrt
+ * 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 libcarm32	
+ * @{
+ */
+/** @file 
+ *  @brief Function address conversion.
+ */
+
+#ifndef LIBC_arm32_FADDR_H_
+#define LIBC_arm32_FADDR_H_
+
+#include <libarch/types.h>
+
+/** Calculate absolute address of function referenced by fptr pointer.
+ *
+ * @param f Function pointer.
+ */
+#define FADDR(f)	 (f)
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/arm32/include/fibril.h
===================================================================
--- uspace/lib/c/arch/arm32/include/fibril.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/arm32/include/fibril.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,92 @@
+/*
+ * Copyright (c) 2007 Michal Kebrt
+ * 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 libcarm32	
+ * @{
+ */
+/** @file 
+ *  @brief Fibrils related declarations.
+ */
+
+#ifndef LIBC_arm32_FIBRIL_H_
+#define LIBC_arm32_FIBRIL_H_
+
+#include <sys/types.h>
+#include <align.h>
+#include <thread.h>
+
+/** Size of a stack item */
+#define STACK_ITEM_SIZE		4
+
+/** Stack alignment - see <a href="http://www.arm.com/support/faqdev/14269.html">ABI</a> for details */
+#define STACK_ALIGNMENT		8
+
+#define SP_DELTA	(0 + ALIGN_UP(STACK_ITEM_SIZE, STACK_ALIGNMENT))
+
+
+/** Sets data to the context. 
+ *  
+ *  @param c     Context (#context_t).
+ *  @param _pc   Program counter.
+ *  @param stack Stack address.
+ *  @param size  Stack size.
+ *  @param ptls  Pointer to the TCB.
+ */
+#define context_set(c, _pc, stack, size, ptls) \
+	do { \
+		(c)->pc = (sysarg_t) (_pc); \
+		(c)->sp = ((sysarg_t) (stack)) + (size) - SP_DELTA; \
+ 		(c)->tls = ((sysarg_t)(ptls)) + sizeof(tcb_t) + ARM_TP_OFFSET; \
+		(c)->fp = 0; \
+	} while (0)
+
+/** Fibril context. 
+ *
+ *  Only registers preserved accross function calls are included. r9 is used 
+ *  to store a TLS address. -ffixed-r9 gcc forces gcc not to use this
+ *  register. -mtp=soft forces gcc to use #__aeabi_read_tp to obtain
+ *  TLS address.
+ */
+typedef struct  {
+	uint32_t sp;
+	uint32_t pc;
+	uint32_t r4;
+	uint32_t r5;
+	uint32_t r6;
+	uint32_t r7;
+	uint32_t r8;
+	uint32_t tls;	/* r9 */
+	uint32_t r10;
+	uint32_t fp;	/* r11 */
+} context_t;
+
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/arm32/include/inttypes.h
===================================================================
--- uspace/lib/c/arch/arm32/include/inttypes.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/arm32/include/inttypes.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,76 @@
+/*
+ * 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 libcarm32
+ * @{
+ */
+/** @file Macros for format specifiers.
+ *
+ * Macros for formatting stdint types as specified in section
+ * 7.8.1 Macros for format specifiers of the C99 draft specification
+ * (ISO/IEC 9899:201x). Only some macros from the specification are
+ * implemented.
+ */
+
+#ifndef LIBC_arm32_INTTYPES_H_
+#define LIBC_arm32_INTTYPES_H_
+
+#define PRId8 "d"
+#define PRId16 "d"
+#define PRId32 "d"
+#define PRId64 "lld"
+#define PRIdPTR "d"
+
+#define PRIo8 "o"
+#define PRIo16 "o"
+#define PRIo32 "o"
+#define PRIo64 "llo"
+#define PRIoPTR "o"
+
+#define PRIu8 "u"
+#define PRIu16 "u"
+#define PRIu32 "u"
+#define PRIu64 "llu"
+#define PRIuPTR "u"
+
+#define PRIx8 "x"
+#define PRIx16 "x"
+#define PRIx32 "x"
+#define PRIx64 "llx"
+#define PRIxPTR "x"
+
+#define PRIX8 "X"
+#define PRIX16 "X"
+#define PRIX32 "X"
+#define PRIX64 "llX"
+#define PRIXPTR "X"
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/arm32/include/istate.h
===================================================================
--- uspace/lib/c/arch/arm32/include/istate.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/arm32/include/istate.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,79 @@
+/*
+ * 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 libcarm32
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_arm32__ISTATE_H_
+#define LIBC_arm32__ISTATE_H_
+
+#include <sys/types.h>
+
+/** Interrupt context.
+ *
+ * This is a copy of the kernel definition with which it must be kept in sync.
+ */
+typedef struct istate {
+	uint32_t spsr;
+	uint32_t sp;
+	uint32_t lr;
+
+	uint32_t r0;
+	uint32_t r1;
+	uint32_t r2;
+	uint32_t r3;
+	uint32_t r4;
+	uint32_t r5;
+	uint32_t r6;
+	uint32_t r7;
+	uint32_t r8;
+	uint32_t r9;
+	uint32_t r10;
+	uint32_t fp;
+	uint32_t r12;
+
+	uint32_t pc;
+} istate_t;
+
+static inline uintptr_t istate_get_pc(istate_t *istate)
+{
+	return istate->pc;
+}
+
+static inline uintptr_t istate_get_fp(istate_t *istate)
+{
+	return istate->fp;
+}
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/arm32/include/limits.h
===================================================================
--- uspace/lib/c/arch/arm32/include/limits.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/arm32/include/limits.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2007 Michal Kebrt
+ * 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 libcarm32
+ * @{
+ */
+/** @file
+ *  @brief Limits declarations.
+ */
+
+#ifndef LIBC_arm32__LIMITS_H_
+#define LIBC_arm32__LIMITS_H_
+
+#define LONG_MIN MIN_INT32
+#define LONG_MAX MAX_INT32
+#define ULONG_MIN MIN_UINT32
+#define ULONG_MAX MAX_UINT32
+
+#define SIZE_MIN MIN_UINT32
+#define SIZE_MAX MAX_UINT32
+#define SSIZE_MIN MIN_INT32
+#define SSIZE_MAX MAX_INT32
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/arm32/include/stackarg.h
===================================================================
--- uspace/lib/c/arch/arm32/include/stackarg.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/arm32/include/stackarg.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2007 Michal Kebrt
+ * 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 libcarm32
+ * @{
+ */
+/** @file
+ *  @brief Empty.
+ */
+
+#ifndef LIBC_arm32_STACKARG_H_
+#define LIBC_arm32_STACKARG_H_
+
+#endif
+
+/** @}
+ */
+
Index: uspace/lib/c/arch/arm32/include/syscall.h
===================================================================
--- uspace/lib/c/arch/arm32/include/syscall.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/arm32/include/syscall.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2007 Michal Kebrt
+ * 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 libcarm32
+ * @{
+ */
+/** @file
+ *  @brief
+ */
+
+#ifndef LIBC_arm32_SYSCALL_H_
+#define LIBC_arm32_SYSCALL_H_
+
+#define LIBARCH_SYSCALL_GENERIC
+
+#include <syscall.h>
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/arm32/include/thread.h
===================================================================
--- uspace/lib/c/arch/arm32/include/thread.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/arm32/include/thread.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2007 Pavel Jancik
+ * Copyright (c) 2007 Michal Kebrt
+ * 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 libcarm32
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_arm32_THREAD_H_
+#define LIBC_arm32_THREAD_H_
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/arm32/include/tls.h
===================================================================
--- uspace/lib/c/arch/arm32/include/tls.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/arm32/include/tls.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,99 @@
+/*
+ * Copyright (c) 2007 Pavel Jancik
+ * Copyright (c) 2007 Michal Kebrt
+ * 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 libcarm32
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_arm32_TLS_H_
+#define LIBC_arm32_TLS_H_
+
+#include <sys/types.h>
+
+#define CONFIG_TLS_VARIANT_1
+
+/** Offsets for accessing thread-local variables are shifted 8 bytes higher. */
+#define ARM_TP_OFFSET  (-8)
+
+/** TCB (Thread Control Block) struct. 
+ *
+ *  TLS starts just after this struct.
+ */
+typedef struct {
+	/** Fibril data. */
+	void *fibril_data;
+} tcb_t;
+
+
+/** Sets TLS address to the r9 register.
+ *
+ *  @param tcb		TCB (TLS starts behind)
+ */
+static inline void __tcb_set(tcb_t *tcb)
+{
+	void *tls = (void *) tcb;
+	tls += sizeof(tcb_t) + ARM_TP_OFFSET;
+	asm volatile (
+		"mov r9, %0"
+		:
+		: "r" (tls)
+	);
+}
+
+
+/** Returns TCB address.
+ *
+ * @return		TCB address (starts before TLS which address is stored
+ * 			in r9 register).
+ */
+static inline tcb_t *__tcb_get(void)
+{
+	void *ret;
+	asm volatile (
+		"mov %0, r9"
+		: "=r"(ret)
+	);
+	return (tcb_t *) (ret - ARM_TP_OFFSET - sizeof(tcb_t));
+}
+
+
+/** Returns TLS address stored.
+ *
+ *  Implemented in assembly.
+ *
+ *  @return		TLS address stored in r9 register
+ */
+extern uintptr_t __aeabi_read_tp(void);
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/arm32/include/types.h
===================================================================
--- uspace/lib/c/arch/arm32/include/types.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/arm32/include/types.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,63 @@
+/*
+ * 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 libcarm32	
+ * @{
+ */
+/** @file 
+ *  @brief Definitions of basic types like #uintptr_t.
+ */
+
+#ifndef LIBC_arm32_TYPES_H_
+#define LIBC_arm32_TYPES_H_
+
+#define __32_BITS__
+
+typedef unsigned int sysarg_t;
+
+typedef char int8_t;
+typedef short int int16_t;
+typedef long int int32_t;
+typedef long long int int64_t;
+
+typedef unsigned char uint8_t;
+typedef unsigned short int uint16_t;
+typedef unsigned long int uint32_t;
+typedef unsigned long long int uint64_t;
+
+typedef int32_t ssize_t;
+typedef uint32_t size_t;
+
+typedef uint32_t uintptr_t;
+typedef uint32_t atomic_count_t;
+typedef int32_t atomic_signed_t;
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/arm32/src/eabi.S
===================================================================
--- uspace/lib/c/arch/arm32/src/eabi.S	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/arm32/src/eabi.S	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,35 @@
+#
+# Copyright (c) 2007 Pavel Jancik
+# 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.
+#
+
+.text
+
+.global __aeabi_read_tp
+
+__aeabi_read_tp:
+	mov r0, r9
+	mov pc, lr
Index: uspace/lib/c/arch/arm32/src/entry.s
===================================================================
--- uspace/lib/c/arch/arm32/src/entry.s	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/arm32/src/entry.s	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,64 @@
+#
+# Copyright (c) 2007 Michal Kebrt, Pavel Jancik
+# 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.
+#
+
+.section .init, "ax"
+
+.org 0
+
+.global __entry
+
+## User-space task entry point
+#
+# r1 contains the PCB pointer
+# r2 contains the RAS page address
+#
+__entry:
+	# Store the RAS page address into the ras_page variable
+	ldr r0, =ras_page
+	str r2, [r0]
+
+	#
+	# Create the first stack frame.
+	#
+	mov fp, #0
+	mov ip, sp
+	push {fp, ip, lr, pc}
+	sub fp, ip, #4
+
+	# Pass pcb_ptr to __main as the first argument (in r0)
+	mov r0, r1
+	bl __main
+
+	bl __exit
+
+.data
+
+.global ras_page
+ras_page:
+	.long 0
+
Index: uspace/lib/c/arch/arm32/src/fibril.S
===================================================================
--- uspace/lib/c/arch/arm32/src/fibril.S	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/arm32/src/fibril.S	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,49 @@
+#
+# Copyright (c) 2007 Michal Kebrt
+# 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.
+#
+
+.text
+
+.global context_save
+.global context_restore
+
+context_save:
+	stmia r0!, {sp, lr}
+	stmia r0!, {r4-r11}
+
+	# return 1
+	mov r0, #1
+	mov pc, lr
+
+context_restore:
+	ldmia r0!, {sp, lr}
+	ldmia r0!, {r4-r11}
+
+	#return 0
+	mov r0, #0
+	mov pc, lr
+
Index: uspace/lib/c/arch/arm32/src/stacktrace.c
===================================================================
--- uspace/lib/c/arch/arm32/src/stacktrace.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/arm32/src/stacktrace.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2010 Jakub Jermar
+ * 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 libcarm32 arm32
+ * @ingroup lc
+ * @{
+ */
+/** @file
+ */
+
+#include <sys/types.h>
+#include <bool.h>
+
+#include <stacktrace.h>
+
+#define FRAME_OFFSET_FP_PREV	-12
+#define FRAME_OFFSET_RA		-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)
+{
+	return (*st->read_uintptr)(st->op_arg, fp + FRAME_OFFSET_FP_PREV, prev);
+}
+
+int stacktrace_ra_get(stacktrace_t *st, uintptr_t fp, uintptr_t *ra)
+{
+	return (*st->read_uintptr)(st->op_arg, fp + FRAME_OFFSET_RA, ra);
+}
+
+/** @}
+ */
Index: uspace/lib/c/arch/arm32/src/stacktrace_asm.S
===================================================================
--- uspace/lib/c/arch/arm32/src/stacktrace_asm.S	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/arm32/src/stacktrace_asm.S	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,44 @@
+#
+# 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.
+#
+
+.text
+
+.global stacktrace_prepare
+.global stacktrace_fp_get
+.global stacktrace_pc_get
+
+stacktrace_prepare:
+	mov pc, lr
+
+stacktrace_fp_get:
+	mov r0, fp
+	mov pc, lr
+
+stacktrace_pc_get:
+	mov r0, lr 
+	mov pc, lr
Index: uspace/lib/c/arch/arm32/src/syscall.c
===================================================================
--- uspace/lib/c/arch/arm32/src/syscall.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/arm32/src/syscall.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,79 @@
+/*
+ * Copyright (c) 2007 Pavel Jancik
+ * 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 libcarm32
+ * @{
+ */
+/** @file
+ *  @brief Syscall routine.
+ */
+
+#include <libc.h>
+
+
+/** Syscall routine.
+ *
+ *  Stores p1-p4, id to r0-r4 registers and calls <code>swi</code>
+ *  instruction. Returned value is read from r0 register.
+ *
+ *  @param p1 Parameter 1.
+ *  @param p2 Parameter 2.
+ *  @param p3 Parameter 3.
+ *  @param p4 Parameter 4.
+ *  @param id Number of syscall.
+ *
+ *  @return Syscall return value.
+ */
+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 sysarg_t __arm_reg_r0 asm("r0") = p1;
+	register sysarg_t __arm_reg_r1 asm("r1") = p2;
+	register sysarg_t __arm_reg_r2 asm("r2") = p3;
+	register sysarg_t __arm_reg_r3 asm("r3") = p4;
+	register sysarg_t __arm_reg_r4 asm("r4") = p5;
+	register sysarg_t __arm_reg_r5 asm("r5") = p6;
+	register sysarg_t __arm_reg_r6 asm("r6") = id;
+	
+	asm volatile (
+		"swi 0"
+		: "=r" (__arm_reg_r0)
+		: "r" (__arm_reg_r0),
+		  "r" (__arm_reg_r1),
+		  "r" (__arm_reg_r2),
+		  "r" (__arm_reg_r3),
+		  "r" (__arm_reg_r4),
+		  "r" (__arm_reg_r5),
+		  "r" (__arm_reg_r6)
+	);
+	
+	return __arm_reg_r0;
+}
+
+/** @}
+ */
Index: uspace/lib/c/arch/arm32/src/thread_entry.s
===================================================================
--- uspace/lib/c/arch/arm32/src/thread_entry.s	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/arm32/src/thread_entry.s	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,45 @@
+#
+# 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.
+#
+
+.text
+
+.global __thread_entry
+
+## User-space thread entry point for all but the first threads.
+#
+#
+__thread_entry:
+	#
+	# Create the first stack frame.
+	#
+	mov fp, #0
+	mov ip, sp
+	push {fp, ip, lr, pc}
+	sub fp, ip, #4
+
+        b __thread_main
Index: uspace/lib/c/arch/arm32/src/tls.c
===================================================================
--- uspace/lib/c/arch/arm32/src/tls.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/arm32/src/tls.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2007 Pavel Jancik
+ * 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 libcarm32 arm32
+  * @brief arm32 architecture dependent parts of libc
+  * @ingroup lc
+ * @{
+ */
+/** @file
+ */
+
+#include <tls.h>
+#include <sys/types.h>
+
+tcb_t * __alloc_tls(void **data, size_t size)
+{
+	return tls_alloc_variant_1(data, size);
+}
+
+void __free_tls_arch(tcb_t *tcb, size_t size)
+{
+	tls_free_variant_1(tcb, size);
+}
+
+/** @}
+ */
Index: uspace/lib/c/arch/ia32/Makefile.common
===================================================================
--- uspace/lib/c/arch/ia32/Makefile.common	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/ia32/Makefile.common	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,35 @@
+#
+# 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.
+#
+
+CLANG_ARCH = i386
+GCC_CFLAGS += -march=pentium
+
+ENDIANESS = LE
+
+BFD_NAME = elf32-i386
+BFD_ARCH = i386
Index: uspace/lib/c/arch/ia32/Makefile.inc
===================================================================
--- uspace/lib/c/arch/ia32/Makefile.inc	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/ia32/Makefile.inc	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,39 @@
+#
+# 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.
+#
+
+ARCH_SOURCES = \
+	arch/$(UARCH)/src/entry.s \
+	arch/$(UARCH)/src/thread_entry.s \
+	arch/$(UARCH)/src/syscall.S \
+	arch/$(UARCH)/src/fibril.S \
+	arch/$(UARCH)/src/tls.c \
+	arch/$(UARCH)/src/setjmp.S \
+	arch/$(UARCH)/src/stacktrace.c \
+	arch/$(UARCH)/src/stacktrace_asm.S
+
+.PRECIOUS: arch/$(UARCH)/src/entry.o
Index: uspace/lib/c/arch/ia32/_link.ld.in
===================================================================
--- uspace/lib/c/arch/ia32/_link.ld.in	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/ia32/_link.ld.in	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,51 @@
+STARTUP(LIBC_PATH/arch/UARCH/src/entry.o)
+ENTRY(__entry)
+
+PHDRS {
+	text PT_LOAD FLAGS(5);
+	data PT_LOAD FLAGS(6);
+}
+
+SECTIONS {
+	. = 0x1000 + SIZEOF_HEADERS;
+	
+	.init : {
+		*(.init);
+	} :text
+	
+	.text : {
+		*(.text);
+		*(.rodata*);
+	} :text
+	
+	. = . + 0x1000;
+	
+	.data : {
+		*(.data);
+	} :data
+	
+	.tdata : {
+		_tdata_start = .;
+		*(.tdata);
+		*(.gnu.linkonce.tb.*);
+		_tdata_end = .;
+		_tbss_start = .;
+		*(.tbss);
+		_tbss_end = .;
+	} :data
+	
+	_tls_alignment = ALIGNOF(.tdata);
+	
+	.bss : {
+		*(COMMON);
+		*(.bss);
+	} :data
+	
+	. = ALIGN(0x1000);
+	
+	_heap = .;
+	
+	/DISCARD/ : {
+		*(*);
+	}
+}
Index: uspace/lib/c/arch/ia32/include/atomic.h
===================================================================
--- uspace/lib/c/arch/ia32/include/atomic.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/ia32/include/atomic.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,90 @@
+/*
+ * Copyright (c) 2001-2004 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 libcia32
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_ia32_ATOMIC_H_
+#define LIBC_ia32_ATOMIC_H_
+
+#define LIBC_ARCH_ATOMIC_H_
+
+#include <atomicdflt.h>
+
+static inline void atomic_inc(atomic_t *val)
+{
+	asm volatile (
+		"lock incl %[count]\n"
+		: [count] "+m" (val->count)
+	);
+}
+
+static inline void atomic_dec(atomic_t *val)
+{
+	asm volatile (
+		"lock decl %[count]\n"
+		: [count] "+m" (val->count)
+	);
+}
+
+static inline atomic_count_t atomic_postinc(atomic_t *val)
+{
+	atomic_count_t r = 1;
+	
+	asm volatile (
+		"lock xaddl %[r], %[count]\n"
+		: [count] "+m" (val->count),
+		  [r] "+r" (r)
+	);
+	
+	return r;
+}
+
+static inline atomic_count_t atomic_postdec(atomic_t *val)
+{
+	atomic_count_t r = -1;
+	
+	asm volatile (
+		"lock xaddl %[r], %[count]\n"
+		: [count] "+m" (val->count),
+		  [r] "+r" (r)
+	);
+	
+	return r;
+}
+
+#define atomic_preinc(val)  (atomic_postinc(val) + 1)
+#define atomic_predec(val)  (atomic_postdec(val) - 1)
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/ia32/include/config.h
===================================================================
--- uspace/lib/c/arch/ia32/include/config.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/ia32/include/config.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,44 @@
+/*
+ * 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 libcia32
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_ia32_CONFIG_H_
+#define LIBC_ia32_CONFIG_H_
+
+#define PAGE_WIDTH	12
+#define PAGE_SIZE	(1 << PAGE_WIDTH)
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/ia32/include/ddi.h
===================================================================
--- uspace/lib/c/arch/ia32/include/ddi.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/ia32/include/ddi.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,104 @@
+/*
+ * 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.
+ */
+
+/** @file
+ * @ingroup libcia32, libcamd64
+ */
+
+#ifndef LIBC_ia32_DDI_H_
+#define LIBC_ia32_DDI_H_
+
+#include <sys/types.h>
+#include <libarch/types.h>
+
+#define IO_SPACE_BOUNDARY	((void *) (64 * 1024))
+
+static inline uint8_t pio_read_8(ioport8_t *port)
+{
+	uint8_t val;
+	
+	asm volatile (
+		"inb %w[port], %b[val]\n"
+		: [val] "=a" (val)
+		: [port] "d" (port)
+	);
+	
+	return val;
+}
+
+static inline uint16_t pio_read_16(ioport16_t *port)
+{
+	uint16_t val;
+	
+	asm volatile (
+		"inw %w[port], %w[val]\n"
+		: [val] "=a" (val)
+		: [port] "d" (port)
+	);
+	
+	return val;
+}
+
+static inline uint32_t pio_read_32(ioport32_t *port)
+{
+	uint32_t val;
+	
+	asm volatile (
+		"inl %w[port], %[val]\n"
+		: [val] "=a" (val)
+		: [port] "d" (port)
+	);
+	
+	return val;
+}
+
+static inline void pio_write_8(ioport8_t *port, uint8_t val)
+{
+	asm volatile (
+		"outb %b[val], %w[port]\n"
+		:: [val] "a" (val), [port] "d" (port)
+	);
+}
+
+static inline void pio_write_16(ioport16_t *port, uint16_t val)
+{
+	asm volatile (
+		"outw %w[val], %w[port]\n"
+		:: [val] "a" (val), [port] "d" (port)
+	);
+}
+
+static inline void pio_write_32(ioport32_t *port, uint32_t val)
+{
+	asm volatile (
+		"outl %[val], %w[port]\n"
+		:: [val] "a" (val), [port] "d" (port)
+	);
+}
+
+#endif
Index: uspace/lib/c/arch/ia32/include/faddr.h
===================================================================
--- uspace/lib/c/arch/ia32/include/faddr.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/ia32/include/faddr.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,45 @@
+/*
+ * 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 libcia32
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_ia32_FADDR_H_
+#define LIBC_ia32_FADDR_H_
+
+#include <libarch/types.h>
+
+#define FADDR(fptr)		((uintptr_t) (fptr))
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/ia32/include/fibril.h
===================================================================
--- uspace/lib/c/arch/ia32/include/fibril.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/ia32/include/fibril.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,72 @@
+/*
+ * 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 libcia32
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_ia32_FIBRIL_H_
+#define LIBC_ia32_FIBRIL_H_
+
+#include <sys/types.h>
+
+/* According to ABI the stack MUST be aligned on 
+ * 16-byte boundary. If it is not, the va_arg calling will
+ * panic sooner or later
+ */
+#define SP_DELTA     (12)
+
+#define context_set(c, _pc, stack, size, ptls) \
+	do { \
+		(c)->pc = (sysarg_t) (_pc); \
+		(c)->sp = ((sysarg_t) (stack)) + (size) - SP_DELTA; \
+		(c)->tls = (sysarg_t) (ptls); \
+		(c)->ebp = 0; \
+	} while (0)
+	
+/* We include only registers that must be preserved
+ * during function call
+ */
+typedef struct {
+	uint32_t sp;
+	uint32_t pc;
+	
+	uint32_t ebx;
+	uint32_t esi;
+	uint32_t edi;
+	uint32_t ebp;
+	
+	uint32_t tls;
+} context_t;
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/ia32/include/inttypes.h
===================================================================
--- uspace/lib/c/arch/ia32/include/inttypes.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/ia32/include/inttypes.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,76 @@
+/*
+ * 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 libcia32
+ * @{
+ */
+/** @file Macros for format specifiers.
+ *
+ * Macros for formatting stdint types as specified in section
+ * 7.8.1 Macros for format specifiers of the C99 draft specification
+ * (ISO/IEC 9899:201x). Only some macros from the specification are
+ * implemented.
+ */
+
+#ifndef LIBC_ia32_INTTYPES_H_
+#define LIBC_ia32_INTTYPES_H_
+
+#define PRId8 "d"
+#define PRId16 "d"
+#define PRId32 "d"
+#define PRId64 "lld"
+#define PRIdPTR "d"
+
+#define PRIo8 "o"
+#define PRIo16 "o"
+#define PRIo32 "o"
+#define PRIo64 "llo"
+#define PRIoPTR "o"
+
+#define PRIu8 "u"
+#define PRIu16 "u"
+#define PRIu32 "u"
+#define PRIu64 "llu"
+#define PRIuPTR "u"
+
+#define PRIx8 "x"
+#define PRIx16 "x"
+#define PRIx32 "x"
+#define PRIx64 "llx"
+#define PRIxPTR "x"
+
+#define PRIX8 "X"
+#define PRIX16 "X"
+#define PRIX32 "X"
+#define PRIX64 "llX"
+#define PRIXPTR "X"
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/ia32/include/istate.h
===================================================================
--- uspace/lib/c/arch/ia32/include/istate.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/ia32/include/istate.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,75 @@
+/*
+ * 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 debug
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_ia32__ISTATE_H_
+#define LIBC_ia32__ISTATE_H_
+
+#include <sys/types.h>
+
+/** Interrupt context.
+ *
+ * This is a copy of the kernel definition with which it must be kept in sync.
+ */
+typedef struct istate {
+	uint32_t eax;
+	uint32_t ecx;
+	uint32_t edx;
+	uint32_t ebp;
+
+	uint32_t gs;
+	uint32_t fs;
+	uint32_t es;
+	uint32_t ds;
+
+	uint32_t error_word;
+	uint32_t eip;
+	uint32_t cs;
+	uint32_t eflags;
+	uint32_t stack[];
+} istate_t;
+
+static inline uintptr_t istate_get_pc(istate_t *istate)
+{
+	return istate->eip;
+}
+
+static inline uintptr_t istate_get_fp(istate_t *istate)
+{
+	return istate->ebp;
+}
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/ia32/include/limits.h
===================================================================
--- uspace/lib/c/arch/ia32/include/limits.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/ia32/include/limits.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,51 @@
+/*
+ * 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 libcia32
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_ia32__LIMITS_H_
+#define LIBC_ia32__LIMITS_H_
+
+#define LONG_MIN MIN_INT32
+#define LONG_MAX MAX_INT32
+#define ULONG_MIN MIN_UINT32
+#define ULONG_MAX MAX_UINT32
+
+#define SIZE_MIN MIN_UINT32
+#define SIZE_MAX MAX_UINT32
+#define SSIZE_MIN MIN_INT32
+#define SSIZE_MAX MAX_INT32
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/ia32/include/syscall.h
===================================================================
--- uspace/lib/c/arch/ia32/include/syscall.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/ia32/include/syscall.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,60 @@
+/*
+ * 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 libc
+ * @{
+ */
+/**
+ * @file
+ */
+
+#ifndef LIBC_ia32_SYSCALL_H_
+#define LIBC_ia32_SYSCALL_H_
+
+#include <sys/types.h>
+#include <kernel/syscall/syscall.h>
+
+#define __syscall0  __syscall_fast_func
+#define __syscall1  __syscall_fast_func
+#define __syscall2  __syscall_fast_func
+#define __syscall3  __syscall_fast_func
+#define __syscall4  __syscall_fast_func
+#define __syscall5  __syscall_slow
+#define __syscall6  __syscall_slow
+
+extern sysarg_t (* __syscall_fast_func)(const sysarg_t, const sysarg_t,
+    const sysarg_t, const sysarg_t, const sysarg_t, const sysarg_t,
+    const syscall_t);
+
+extern sysarg_t __syscall_slow(const sysarg_t, const sysarg_t, const sysarg_t,
+    const sysarg_t, const sysarg_t, const sysarg_t, const syscall_t);
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/ia32/include/thread.h
===================================================================
--- uspace/lib/c/arch/ia32/include/thread.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/ia32/include/thread.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,41 @@
+/*
+ * 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 libcia32
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_ia32_THREAD_H_
+#define LIBC_ia32_THREAD_H_
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/ia32/include/tls.h
===================================================================
--- uspace/lib/c/arch/ia32/include/tls.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/ia32/include/tls.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,67 @@
+/*
+ * 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 libcia32
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_ia32_TLS_H_
+#define LIBC_ia32_TLS_H_
+
+#define CONFIG_TLS_VARIANT_2
+
+#include <libc.h>
+
+typedef struct {
+	void *self;
+	void *fibril_data;
+} tcb_t;
+
+static inline void __tcb_set(tcb_t *tcb)
+{
+	__SYSCALL1(SYS_TLS_SET, (sysarg_t) tcb);
+}
+
+static inline tcb_t * __tcb_get(void)
+{
+	void *retval;
+	
+	asm (
+		"movl %%gs:0, %0"
+		: "=r" (retval)
+	);
+	
+	return retval;
+}
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/ia32/include/types.h
===================================================================
--- uspace/lib/c/arch/ia32/include/types.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/ia32/include/types.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,62 @@
+/*
+ * 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 libcia32
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_ia32_TYPES_H_
+#define LIBC_ia32_TYPES_H_
+
+#define __32_BITS__
+
+typedef unsigned int sysarg_t;
+
+typedef char int8_t;
+typedef short int int16_t;
+typedef int int32_t;
+typedef long long int int64_t;
+
+typedef unsigned char uint8_t;
+typedef unsigned short int uint16_t;
+typedef unsigned int uint32_t;
+typedef unsigned long long int uint64_t;
+
+typedef int32_t ssize_t;
+typedef uint32_t size_t;
+
+typedef uint32_t uintptr_t;
+typedef uint32_t atomic_count_t;
+typedef int32_t atomic_signed_t;
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/ia32/src/entry.s
===================================================================
--- uspace/lib/c/arch/ia32/src/entry.s	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/ia32/src/entry.s	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,67 @@
+#
+# 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.
+#
+
+INTEL_CPUID_STANDARD = 1
+INTEL_SEP = 11
+
+.section .init, "ax"
+
+.org 0
+
+.globl __entry
+
+## User-space task entry point
+#
+# %edi contains the PCB pointer
+#
+__entry:
+	mov %ss, %ax
+	mov %ax, %ds
+	mov %ax, %es
+	mov %ax, %fs
+	# Do not set %gs, it contains descriptor that can see TLS
+
+	# Detect the mechanism used for making syscalls
+	movl $(INTEL_CPUID_STANDARD), %eax
+	cpuid
+	bt $(INTEL_SEP), %edx
+	jnc 0f
+	leal __syscall_fast_func, %eax
+	movl $__syscall_fast, (%eax)
+0:
+	#
+	# Create the first stack frame.
+	#
+	pushl $0 
+	movl %esp, %ebp
+
+	# Pass the PCB pointer to __main as the first argument
+	pushl %edi
+	call __main
+
+	call __exit
Index: uspace/lib/c/arch/ia32/src/fibril.S
===================================================================
--- uspace/lib/c/arch/ia32/src/fibril.S	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/ia32/src/fibril.S	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,79 @@
+#
+# Copyright (c) 2001-2004 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 <kernel/arch/context_offset.h>
+
+.text
+
+.global context_save
+.global context_restore
+
+
+## Save current CPU context
+#
+# Save CPU context to the context_t variable
+# pointed by the 1st argument. Returns 1 in EAX.
+#
+context_save:
+	movl 0(%esp),%eax	# the caller's return %eip
+	movl 4(%esp),%edx	# address of the context variable to save context to
+
+		# save registers to the context structure
+	CONTEXT_SAVE_ARCH_CORE %edx %eax
+
+	# Save TLS
+	movl %gs:0, %eax
+	movl %eax, OFFSET_TLS(%edx)     # tls -> ctx->tls
+	
+	xorl %eax,%eax		# context_save returns 1
+	incl %eax
+	ret
+
+
+## Restore saved CPU context
+#
+# Restore CPU context from context_t variable
+# pointed by the 1st argument. Returns 0 in EAX.
+#
+context_restore:
+	movl 4(%esp),%eax	# address of the context variable to restore context from
+
+		# restore registers from the context structure
+	CONTEXT_RESTORE_ARCH_CORE %eax %edx
+
+	movl %edx,0(%esp)	# ctx->pc -> saver's return %eip
+
+	# Set thread local storage
+	pushl %edx
+	movl OFFSET_TLS(%eax), %edx   # Set arg1 to TLS addr
+	movl $1, %eax         # Syscall SYS_TLS_SET
+	int $0x30
+	popl %edx
+	
+	xorl %eax,%eax		# context_restore returns 0
+	ret
Index: uspace/lib/c/arch/ia32/src/setjmp.S
===================================================================
--- uspace/lib/c/arch/ia32/src/setjmp.S	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/ia32/src/setjmp.S	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,57 @@
+#
+# Copyright (c) 2008 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.
+#
+
+#include <kernel/arch/context_offset.h>
+
+.text
+.global setjmp
+.global longjmp
+
+.type setjmp,@function
+setjmp:
+	movl 0(%esp),%eax	# save pc value into eax	
+	movl 4(%esp),%edx	# address of the jmp_buf structure to save context to 
+
+		# save registers to the jmp_buf structure
+	CONTEXT_SAVE_ARCH_CORE %edx %eax
+
+	xorl %eax,%eax		# set_jmp returns 0
+	ret
+
+.type longjmp,@function
+longjmp:
+
+	movl 4(%esp), %ecx	# put address of jmp_buf into ecx
+	movl 8(%esp), %eax	# put return value into eax	
+
+		# restore registers from the jmp_buf structure
+	CONTEXT_RESTORE_ARCH_CORE %ecx %edx
+
+	movl %edx,0(%esp)	# put saved pc on stack
+	ret
+
Index: uspace/lib/c/arch/ia32/src/stacktrace.c
===================================================================
--- uspace/lib/c/arch/ia32/src/stacktrace.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/ia32/src/stacktrace.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2010 Jakub Jermar
+ * 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 libcia32 ia32
+ * @ingroup lc
+ * @{
+ */
+/** @file
+ */
+
+#include <sys/types.h>
+#include <bool.h>
+
+#include <stacktrace.h>
+
+#define FRAME_OFFSET_FP_PREV	0
+#define FRAME_OFFSET_RA		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)
+{
+	return (*st->read_uintptr)(st->op_arg, fp + FRAME_OFFSET_FP_PREV, prev);
+}
+
+int stacktrace_ra_get(stacktrace_t *st, uintptr_t fp, uintptr_t *ra)
+{
+	return (*st->read_uintptr)(st->op_arg, fp + FRAME_OFFSET_RA, ra);
+}
+
+/** @}
+ */
Index: uspace/lib/c/arch/ia32/src/stacktrace_asm.S
===================================================================
--- uspace/lib/c/arch/ia32/src/stacktrace_asm.S	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/ia32/src/stacktrace_asm.S	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,44 @@
+#
+# 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.
+#
+
+.text
+
+.global stacktrace_prepare
+.global stacktrace_fp_get
+.global stacktrace_pc_get
+
+stacktrace_prepare:
+	ret
+
+stacktrace_fp_get:
+	movl %ebp, %eax
+	ret
+
+stacktrace_pc_get:
+	movl (%esp), %eax
+	ret
Index: uspace/lib/c/arch/ia32/src/syscall.S
===================================================================
--- uspace/lib/c/arch/ia32/src/syscall.S	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/ia32/src/syscall.S	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,96 @@
+#
+# Copyright (c) 2007 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.
+#
+
+.data
+
+.global __syscall_fast_func
+__syscall_fast_func:
+	.long __syscall_slow
+
+.text
+
+/** Syscall wrapper - INT $0x30 version.
+ *
+ * Mind the order of arguments. First two arguments and the syscall number go to
+ * scratch registers. An optimized version of this wrapper for fewer arguments
+ * could benefit from this and not save unused registers on the stack.
+ */
+.global __syscall_slow
+__syscall_slow:
+	pushl %ebx
+	pushl %esi
+	pushl %edi
+	pushl %ebp
+	movl 20(%esp), %edx	# First argument.
+	movl 24(%esp), %ecx	# Second argument.
+	movl 28(%esp), %ebx	# Third argument.
+	movl 32(%esp), %esi	# Fourth argument.
+	movl 36(%esp), %edi	# Fifth argument.
+	movl 40(%esp), %ebp	# Sixth argument.
+	movl 44(%esp), %eax	# Syscall number.
+	int $0x30
+	popl %ebp
+	popl %edi
+	popl %esi
+	popl %ebx
+	ret
+
+
+/** Syscall wrapper - SYSENTER version.
+ *
+ * This is an optimized version of syscall for four or less arguments.  Note
+ * that EBP and EDI are used to remember user stack address and the return
+ * address. The kernel part doesn't save DS, ES and FS so the handler restores
+ * these to the selector immediately following CS (it must be the flat data
+ * segment, otherwise the SYSENTER wouldn't work in the first place).
+ */
+.global __syscall_fast
+__syscall_fast:
+	pushl %ebx
+	pushl %esi
+	pushl %edi
+	pushl %ebp
+	mov %esp, %ebp
+	lea ra, %edi
+	movl 20(%esp), %edx	# First argument.
+	movl 24(%esp), %ecx	# Second argument.
+	movl 28(%esp), %ebx	# Third argument.
+	movl 32(%esp), %esi	# Fourth argument.
+	movl 44(%esp), %eax	# Syscall number.
+	sysenter
+ra:
+	movw %cs, %cx
+	addw $8, %cx
+	movw %cx, %ds
+	movw %cx, %es
+	movw %cx, %fs
+	popl %ebp
+	popl %edi
+	popl %esi
+	popl %ebx
+	ret
Index: uspace/lib/c/arch/ia32/src/thread_entry.s
===================================================================
--- uspace/lib/c/arch/ia32/src/thread_entry.s	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/ia32/src/thread_entry.s	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,59 @@
+#
+# 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.
+#
+
+.text
+
+.globl __thread_entry
+
+## User-space thread entry point for all but the first threads.
+#
+#
+__thread_entry:
+	mov %ss, %dx
+	mov %dx, %ds
+	mov %dx, %es
+	mov %dx, %fs
+	# Do not set %gs, it contains descriptor that can see TLS
+
+	#
+	# Create the first stack frame.
+	#
+	pushl $0
+	mov %esp, %ebp
+
+	#
+	# EAX contains address of uarg.
+	#
+	pushl %eax
+	call __thread_main
+	
+	#
+	# Not reached.
+	#
+	
+.end __thread_entry
Index: uspace/lib/c/arch/ia32/src/tls.c
===================================================================
--- uspace/lib/c/arch/ia32/src/tls.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/ia32/src/tls.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,51 @@
+/*
+ * 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 libcamd64 amd64
+ * @ingroup lc
+ * @{
+ */
+/** @file
+  * @ingroup libcia32
+ */
+
+#include <tls.h>
+#include <sys/types.h>
+
+tcb_t * __alloc_tls(void **data, size_t size)
+{
+	return tls_alloc_variant_2(data, size);
+}
+
+void __free_tls_arch(tcb_t *tcb, size_t size)
+{
+	tls_free_variant_2(tcb, size);
+}
+
+/** @}
+ */
Index: uspace/lib/c/arch/ia64/Makefile.common
===================================================================
--- uspace/lib/c/arch/ia64/Makefile.common	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/ia64/Makefile.common	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,34 @@
+#
+# 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.
+#
+
+GCC_CFLAGS += -fno-unwind-tables
+
+ENDIANESS = LE
+
+BFD_NAME = elf64-ia64-little
+BFD_ARCH = ia64-elf64
Index: uspace/lib/c/arch/ia64/Makefile.inc
===================================================================
--- uspace/lib/c/arch/ia64/Makefile.inc	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/ia64/Makefile.inc	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,39 @@
+#
+# 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.
+#
+
+ARCH_SOURCES = \
+	arch/$(UARCH)/src/entry.s \
+	arch/$(UARCH)/src/thread_entry.s \
+	arch/$(UARCH)/src/syscall.S \
+	arch/$(UARCH)/src/fibril.S \
+	arch/$(UARCH)/src/tls.c \
+	arch/$(UARCH)/src/ddi.c \
+	arch/$(UARCH)/src/stacktrace.c \
+	arch/$(UARCH)/src/stacktrace_asm.S
+
+.PRECIOUS: arch/$(UARCH)/src/entry.o
Index: uspace/lib/c/arch/ia64/_link.ld.in
===================================================================
--- uspace/lib/c/arch/ia64/_link.ld.in	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/ia64/_link.ld.in	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,53 @@
+STARTUP(LIBC_PATH/arch/UARCH/src/entry.o)
+ENTRY(__entry)
+
+PHDRS {
+	text PT_LOAD FLAGS(5);
+	data PT_LOAD FLAGS(6);
+}
+
+SECTIONS {
+	. = 0x4000 + SIZEOF_HEADERS;
+
+	.init : {
+		*(.init);
+	} : text
+	.text : {
+		*(.text);
+		*(.rodata*);
+	} :text
+
+	. = . + 0x4000;
+
+	.got : {
+		_gp = .;
+		*(.got*);
+	} :data	
+	.data : {
+		*(.opd);
+		*(.data .data.*);
+		*(.sdata);
+	} :data
+	.tdata : {
+		_tdata_start = .;
+		*(.tdata);
+		_tdata_end = .;
+		_tbss_start = .;
+		*(.tbss);
+		_tbss_end = .;
+	} :data
+	_tls_alignment = ALIGNOF(.tdata);
+	.bss : {
+		*(.sbss);
+		*(.scommon);
+		*(COMMON);
+		*(.bss);
+	} :data
+
+	. = ALIGN(0x4000);
+	_heap = .;
+ 
+	/DISCARD/ : {
+		*(*);
+        }
+}
Index: uspace/lib/c/arch/ia64/include/atomic.h
===================================================================
--- uspace/lib/c/arch/ia64/include/atomic.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/ia64/include/atomic.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,119 @@
+/*
+ * 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 libcia64
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_ia64_ATOMIC_H_
+#define LIBC_ia64_ATOMIC_H_
+
+#define LIBC_ARCH_ATOMIC_H_
+
+#include <atomicdflt.h>
+
+static inline void atomic_inc(atomic_t *val)
+{
+	atomic_count_t v;
+	
+	asm volatile (
+		"fetchadd8.rel %[v] = %[count], 1\n"
+		: [v] "=r" (v),
+		  [count] "+m" (val->count)
+	);
+}
+
+static inline void atomic_dec(atomic_t *val)
+{
+	atomic_count_t v;
+	
+	asm volatile (
+		"fetchadd8.rel %[v] = %[count], -1\n"
+		: [v] "=r" (v),
+		  [count] "+m" (val->count)
+	);
+}
+
+static inline atomic_count_t atomic_preinc(atomic_t *val)
+{
+	atomic_count_t v;
+	
+	asm volatile (
+		"fetchadd8.rel %[v] = %[count], 1\n"
+		: [v] "=r" (v),
+		  [count] "+m" (val->count)
+	);
+	
+	return (v + 1);
+}
+
+static inline atomic_count_t atomic_predec(atomic_t *val)
+{
+	atomic_count_t v;
+	
+	asm volatile (
+		"fetchadd8.rel %[v] = %[count], -1\n"
+		: [v] "=r" (v),
+		  [count] "+m" (val->count)
+	);
+	
+	return (v - 1);
+}
+
+static inline atomic_count_t atomic_postinc(atomic_t *val)
+{
+	atomic_count_t v;
+	
+	asm volatile (
+		"fetchadd8.rel %[v] = %[count], 1\n"
+		: [v] "=r" (v),
+		  [count] "+m" (val->count)
+	);
+	
+	return v;
+}
+
+static inline atomic_count_t atomic_postdec(atomic_t *val)
+{
+	atomic_count_t v;
+	
+	asm volatile (
+		"fetchadd8.rel %[v] = %[count], -1\n"
+		: [v] "=r" (v),
+		  [count] "+m" (val->count)
+	);
+	
+	return v;
+}
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/ia64/include/config.h
===================================================================
--- uspace/lib/c/arch/ia64/include/config.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/ia64/include/config.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,44 @@
+/*
+ * 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 libcia64
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_ia64_CONFIG_H_
+#define LIBC_ia64_CONFIG_H_
+
+#define PAGE_WIDTH	14
+#define PAGE_SIZE	(1 << PAGE_WIDTH)
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/ia64/include/ddi.h
===================================================================
--- uspace/lib/c/arch/ia64/include/ddi.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/ia64/include/ddi.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,115 @@
+/*
+ * Copyright (c) 2005 Jakub Vana
+ * 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 libcia64	
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_ia64_DDI_H_
+#define LIBC_ia64_DDI_H_
+
+#include <sys/types.h>
+#include <libarch/types.h>
+
+#define IO_SPACE_BOUNDARY	((void *) (64 * 1024))
+
+uint64_t get_ia64_iospace_address(void);
+
+extern uint64_t ia64_iospace_address;
+
+#define IA64_IOSPACE_ADDRESS \
+	(ia64_iospace_address ? \
+	    ia64_iospace_address : \
+	    (ia64_iospace_address = get_ia64_iospace_address()))
+
+static inline void pio_write_8(ioport8_t *port, uint8_t v)
+{
+	uintptr_t prt = (uintptr_t) port;
+
+	*((ioport8_t *)(IA64_IOSPACE_ADDRESS +
+	    ((prt & 0xfff) | ((prt >> 2) << 12)))) = v;
+
+	asm volatile ("mf\n" ::: "memory");
+}
+
+static inline void pio_write_16(ioport16_t *port, uint16_t v)
+{
+	uintptr_t prt = (uintptr_t) port;
+
+	*((ioport16_t *)(IA64_IOSPACE_ADDRESS +
+	    ((prt & 0xfff) | ((prt >> 2) << 12)))) = v;
+
+	asm volatile ("mf\n" ::: "memory");
+}
+
+static inline void pio_write_32(ioport32_t *port, uint32_t v)
+{
+	uintptr_t prt = (uintptr_t) port;
+
+	*((ioport32_t *)(IA64_IOSPACE_ADDRESS +
+	    ((prt & 0xfff) | ((prt >> 2) << 12)))) = v;
+
+	asm volatile ("mf\n" ::: "memory");
+}
+
+static inline uint8_t pio_read_8(ioport8_t *port)
+{
+	uintptr_t prt = (uintptr_t) port;
+
+	asm volatile ("mf\n" ::: "memory");
+
+	return *((ioport8_t *)(IA64_IOSPACE_ADDRESS +
+	    ((prt & 0xfff) | ((prt >> 2) << 12))));
+}
+
+static inline uint16_t pio_read_16(ioport16_t *port)
+{
+	uintptr_t prt = (uintptr_t) port;
+
+	asm volatile ("mf\n" ::: "memory");
+
+	return *((ioport16_t *)(IA64_IOSPACE_ADDRESS +
+	    ((prt & 0xfff) | ((prt >> 2) << 12))));
+}
+
+static inline uint32_t pio_read_32(ioport32_t *port)
+{
+	uintptr_t prt = (uintptr_t) port;
+
+	asm volatile ("mf\n" ::: "memory");
+
+	return *((ioport32_t *)(IA64_IOSPACE_ADDRESS +
+	    ((prt & 0xfff) | ((prt >> 2) << 12))));
+}
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/ia64/include/faddr.h
===================================================================
--- uspace/lib/c/arch/ia64/include/faddr.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/ia64/include/faddr.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,53 @@
+/*
+ * 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 libcia64
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_ia64_FADDR_H_
+#define LIBC_ia64_FADDR_H_
+
+#include <libarch/types.h>
+
+/**
+ *
+ * Calculate absolute address of function
+ * referenced by fptr pointer.
+ *
+ * @param fptr Function pointer.
+ *
+ */
+#define FADDR(fptr)  (((fncptr_t *) (fptr))->fnc)
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/ia64/include/fibril.h
===================================================================
--- uspace/lib/c/arch/ia64/include/fibril.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/ia64/include/fibril.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,135 @@
+/*
+ * 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 libcia64	
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_ia64_FIBRIL_H_
+#define LIBC_ia64_FIBRIL_H_
+
+#include <sys/types.h>
+#include <align.h>
+#include <libarch/stack.h>
+#include <libarch/types.h>
+
+/*
+ * context_save() and context_restore() are both leaf procedures.
+ * No need to allocate scratch area.
+ */
+#define SP_DELTA	(0 + ALIGN_UP(STACK_ITEM_SIZE, STACK_ALIGNMENT))
+
+#define PFM_MASK        (~0x3fffffffff)
+
+#define PSTHREAD_INITIAL_STACK_PAGES_NO 2
+/* Stack is divided into two equal parts (for memory stack and register stack). */
+#define PSTHREAD_INITIAL_STACK_DIVISION 2  
+
+#define context_set(c, _pc, stack, size, tls) 								\
+	do {												\
+		(c)->pc = (uint64_t) _pc;								\
+		(c)->bsp = ((uint64_t) stack) + size / PSTHREAD_INITIAL_STACK_DIVISION;								\
+		(c)->ar_pfs &= PFM_MASK; 								\
+		(c)->sp = ((uint64_t) stack) + ALIGN_UP((size / PSTHREAD_INITIAL_STACK_DIVISION), STACK_ALIGNMENT) - SP_DELTA;		\
+		(c)->tp = (uint64_t) tls;								\
+	} while (0);
+	
+
+/*
+ * Only save registers that must be preserved across
+ * function calls.
+ */
+typedef struct context {
+
+	/*
+	 * Application registers
+	 */
+	uint64_t ar_pfs;
+	uint64_t ar_unat_caller;
+	uint64_t ar_unat_callee;
+	uint64_t ar_rsc;
+	uint64_t bsp;		/* ar_bsp */
+	uint64_t ar_rnat;
+	uint64_t ar_lc;
+
+	/*
+	 * General registers
+	 */
+	uint64_t r1;
+	uint64_t r4;
+	uint64_t r5;
+	uint64_t r6;
+	uint64_t r7;
+	uint64_t sp;		/* r12 */
+	uint64_t tp;		/* r13 */
+	
+	/*
+	 * Branch registers
+	 */
+	uint64_t pc;		/* b0 */
+	uint64_t b1;
+	uint64_t b2;
+	uint64_t b3;
+	uint64_t b4;
+	uint64_t b5;
+
+	/*
+	 * Predicate registers
+	 */
+	uint64_t pr;
+
+	uint128_t f2 __attribute__ ((aligned(16)));
+	uint128_t f3;
+	uint128_t f4;
+	uint128_t f5;
+
+	uint128_t f16;
+	uint128_t f17;
+	uint128_t f18;
+	uint128_t f19;
+	uint128_t f20;
+	uint128_t f21;
+	uint128_t f22;
+	uint128_t f23;
+	uint128_t f24;
+	uint128_t f25;
+	uint128_t f26;
+	uint128_t f27;
+	uint128_t f28;
+	uint128_t f29;
+	uint128_t f30;
+	uint128_t f31;
+
+} context_t;
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/ia64/include/inttypes.h
===================================================================
--- uspace/lib/c/arch/ia64/include/inttypes.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/ia64/include/inttypes.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,76 @@
+/*
+ * 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 libia64
+ * @{
+ */
+/** @file Macros for format specifiers.
+ *
+ * Macros for formatting stdint types as specified in section
+ * 7.8.1 Macros for format specifiers of the C99 draft specification
+ * (ISO/IEC 9899:201x). Only some macros from the specification are
+ * implemented.
+ */
+
+#ifndef LIBC_ia64_INTTYPES_H_
+#define LIBC_ia64_INTTYPES_H_
+
+#define PRId8 "d"
+#define PRId16 "d"
+#define PRId32 "d"
+#define PRId64 "ld"
+#define PRIdPTR "ld"
+
+#define PRIo8 "o"
+#define PRIo16 "o"
+#define PRIo32 "o"
+#define PRIo64 "lo"
+#define PRIoPTR "lo"
+
+#define PRIu8 "u"
+#define PRIu16 "u"
+#define PRIu32 "u"
+#define PRIu64 "lu"
+#define PRIuPTR "lu"
+
+#define PRIx8 "x"
+#define PRIx16 "x"
+#define PRIx32 "x"
+#define PRIx64 "lx"
+#define PRIxPTR "lx"
+
+#define PRIX8 "X"
+#define PRIX16 "X"
+#define PRIX32 "X"
+#define PRIX64 "lX"
+#define PRIXPTR "lX"
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/ia64/include/istate.h
===================================================================
--- uspace/lib/c/arch/ia64/include/istate.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/ia64/include/istate.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,63 @@
+/*
+ * 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 libcsparc64
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_ia64_ISTATE_H_
+#define LIBC_ia64_ISTATE_H_
+
+#include <sys/types.h>
+
+/** Interrupt context.
+ *
+ * This is a copy of the kernel definition with which it must be kept in sync.
+ */
+typedef struct istate {
+	/* TODO */
+} istate_t;
+
+static inline uintptr_t istate_get_pc(istate_t *istate)
+{
+	/* TODO */
+	return 0;
+}
+
+static inline uintptr_t istate_get_fp(istate_t *istate)
+{
+	/* TODO */
+	return 0;
+}
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/ia64/include/limits.h
===================================================================
--- uspace/lib/c/arch/ia64/include/limits.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/ia64/include/limits.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,51 @@
+/*
+ * 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 libcia64
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_ia64_LIMITS_H_
+#define LIBC_ia64_LIMITS_H_
+
+#define LONG_MIN MIN_INT64
+#define LONG_MAX MAX_INT64
+#define ULONG_MIN MIN_UINT64
+#define ULONG_MAX MAX_UINT64
+
+#define SIZE_MIN MIN_UINT64
+#define SIZE_MAX MAX_UINT64
+#define SSIZE_MIN MIN_INT64
+#define SSIZE_MAX MAX_INT64
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/ia64/include/stack.h
===================================================================
--- uspace/lib/c/arch/ia64/include/stack.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/ia64/include/stack.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,46 @@
+/*
+ * 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 libcia64	
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_ia64_STACK_H_
+#define LIBC_ia64_STACK_H_
+
+#define STACK_ITEM_SIZE			8
+#define STACK_ALIGNMENT			16
+#define STACK_SCRATCH_AREA_SIZE		16
+#define REGISTER_STACK_ALIGNMENT 	8
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/ia64/include/stackarg.h
===================================================================
--- uspace/lib/c/arch/ia64/include/stackarg.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/ia64/include/stackarg.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,43 @@
+/*
+ * 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 libcia64	
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_STACKARG_H_
+#define LIBC_STACKARG_H_
+
+#endif
+
+
+ /** @}
+ */
+
Index: uspace/lib/c/arch/ia64/include/syscall.h
===================================================================
--- uspace/lib/c/arch/ia64/include/syscall.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/ia64/include/syscall.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,46 @@
+/*
+ * 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 libc
+ * @{
+ */
+/**
+ * @file
+ */
+
+#ifndef LIBC_ia64_SYSCALL_H_
+#define LIBC_ia64_SYSCALL_H_
+
+#define LIBARCH_SYSCALL_GENERIC
+
+#include <syscall.h>
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/ia64/include/thread.h
===================================================================
--- uspace/lib/c/arch/ia64/include/thread.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/ia64/include/thread.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,43 @@
+/*
+ * 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 libcia64	
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_ia64_THREAD_H_
+#define LIBC_ia64_THREAD_H_
+
+#define THREAD_INITIAL_STACK_PAGES_NO 2
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/ia64/include/tls.h
===================================================================
--- uspace/lib/c/arch/ia64/include/tls.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/ia64/include/tls.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,65 @@
+/*
+ * 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 libcia64	
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_ia64_TLS_H_
+#define LIBC_ia64_TLS_H_
+
+#define CONFIG_TLS_VARIANT_1
+
+#include <sys/types.h>
+
+/* This structure must be exactly 16 bytes long */
+typedef struct {
+	void *dtv; /* unused in static linking*/
+	void *fibril_data;
+} tcb_t;
+
+static inline void __tcb_set(tcb_t *tcb)
+{
+	asm volatile ("mov r13 = %0\n" : : "r" (tcb) : "r13");
+}
+
+static inline tcb_t *__tcb_get(void)
+{
+	void *retval;
+
+	asm volatile ("mov %0 = r13\n" : "=r" (retval));
+
+	return retval;
+}
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/ia64/include/types.h
===================================================================
--- uspace/lib/c/arch/ia64/include/types.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/ia64/include/types.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,72 @@
+/*
+ * 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 libcia64
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_ia64_TYPES_H_
+#define LIBC_ia64_TYPES_H_
+
+#define __64_BITS__
+
+typedef unsigned long sysarg_t;
+
+typedef char int8_t;
+typedef short int int16_t;
+typedef int int32_t;
+typedef long int int64_t;
+
+typedef unsigned char uint8_t;
+typedef unsigned short int uint16_t;
+typedef unsigned int uint32_t;
+typedef unsigned long int uint64_t;
+
+typedef struct {
+	uint64_t lo;
+	uint64_t hi;
+} uint128_t;
+
+typedef int64_t ssize_t;
+typedef uint64_t size_t;
+
+typedef uint64_t uintptr_t;
+typedef uint64_t atomic_count_t;
+typedef int64_t atomic_signed_t;
+
+typedef struct {
+	uintptr_t fnc;
+	uintptr_t gp;
+} __attribute__((may_alias)) fncptr_t;
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/ia64/src/ddi.c
===================================================================
--- uspace/lib/c/arch/ia64/src/ddi.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/ia64/src/ddi.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,13 @@
+#include <libarch/ddi.h>
+#include <sysinfo.h>
+
+uint64_t ia64_iospace_address=0;
+
+
+uint64_t get_ia64_iospace_address(void)
+{
+
+	return sysinfo_value("ia64_iospace.address.virtual");
+
+}
+
Index: uspace/lib/c/arch/ia64/src/entry.s
===================================================================
--- uspace/lib/c/arch/ia64/src/entry.s	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/ia64/src/entry.s	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,47 @@
+#
+# 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.
+#
+
+.section .init, "ax"
+
+.org 0
+
+.globl __entry
+
+## User-space task entry point
+#
+# r2 contains the PCB pointer
+#
+__entry:
+	alloc loc0 = ar.pfs, 0, 1, 2, 0
+	movl r1 = _gp
+
+	# Pass PCB pointer as the first argument to __main
+	mov out0 = r2
+	br.call.sptk.many b0 = __main
+0:
+	br.call.sptk.many b0 = __exit
Index: uspace/lib/c/arch/ia64/src/fibril.S
===================================================================
--- uspace/lib/c/arch/ia64/src/fibril.S	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/ia64/src/fibril.S	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,246 @@
+#
+# 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.
+#
+
+.text
+
+.global context_save
+.global context_restore
+
+context_save:
+	alloc loc0 = ar.pfs, 1, 8, 0, 0
+	mov loc1 = ar.unat	;;
+	/* loc2 */
+	mov loc3 = ar.rsc
+
+	.auto
+
+	/*
+	 * Flush dirty registers to backing store.
+	 * After this ar.bsp and ar.bspstore are equal.
+	 */
+	flushrs
+	mov loc4 = ar.bsp	
+	
+	/*
+	 * Put RSE to enforced lazy mode.
+	 * So that ar.rnat can be read.
+	 */
+	and loc5 = ~3, loc3
+	mov ar.rsc = loc5
+	mov loc5 = ar.rnat
+
+	.explicit
+
+	mov loc6 = ar.lc
+	
+	/*
+	 * Save application registers
+	 */
+	st8 [in0] = loc0, 8	;;	/* save ar.pfs */
+	st8 [in0] = loc1, 8	;;	/* save ar.unat (caller) */
+	mov loc2 = in0		;;
+	add in0 = 8, in0	;;	/* skip ar.unat (callee) */
+	st8 [in0] = loc3, 8	;;	/* save ar.rsc */
+	st8 [in0] = loc4, 8	;;	/* save ar.bsp */
+	st8 [in0] = loc5, 8	;;	/* save ar.rnat */
+	st8 [in0] = loc6, 8	;;	/* save ar.lc */
+	
+	/*
+	 * Save general registers including NaT bits
+	 */
+	st8.spill [in0] = r1, 8		;;
+	st8.spill [in0] = r4, 8		;;
+	st8.spill [in0] = r5, 8		;;
+	st8.spill [in0] = r6, 8		;;
+	st8.spill [in0] = r7, 8		;;
+	st8.spill [in0] = r12, 8	;;	/* save sp */
+	st8.spill [in0] = r13, 8	;;	/* save tp */
+
+	mov loc3 = ar.unat		;;
+	st8 [loc2] = loc3		/* save ar.unat (callee) */
+
+	/*
+	 * Save branch registers
+	 */
+	mov loc2 = b0		;;
+	st8 [in0] = loc2, 8		/* save pc */
+	mov loc3 = b1		;;
+	st8 [in0] = loc3, 8
+	mov loc4 = b2		;;
+	st8 [in0] = loc4, 8
+	mov loc5 = b3		;;
+	st8 [in0] = loc5, 8
+	mov loc6 = b4		;;
+	st8 [in0] = loc6, 8
+	mov loc7 = b5		;;
+	st8 [in0] = loc7, 8
+
+	/*
+	 * Save predicate registers
+	 */
+	mov loc2 = pr		;;
+	st8 [in0] = loc2, 16;; 		/* Next fpu registers should be spilled to 16B aligned address */
+
+	/*
+	 * Save floating-point registers.
+	 */
+	stf.spill [in0] = f2, 16 ;;
+	stf.spill [in0] = f3, 16 ;;
+	stf.spill [in0] = f4, 16 ;;
+	stf.spill [in0] = f5, 16 ;;
+
+	stf.spill [in0] = f16, 16 ;;
+	stf.spill [in0] = f17, 16 ;;
+	stf.spill [in0] = f18, 16 ;;
+	stf.spill [in0] = f19, 16 ;;
+	stf.spill [in0] = f20, 16 ;;
+	stf.spill [in0] = f21, 16 ;;
+	stf.spill [in0] = f22, 16 ;;
+	stf.spill [in0] = f23, 16 ;;
+	stf.spill [in0] = f24, 16 ;;
+	stf.spill [in0] = f25, 16 ;;
+	stf.spill [in0] = f26, 16 ;;
+	stf.spill [in0] = f27, 16 ;;
+	stf.spill [in0] = f28, 16 ;;
+	stf.spill [in0] = f29, 16 ;;
+	stf.spill [in0] = f30, 16 ;;
+	stf.spill [in0] = f31, 16 ;;	
+
+	mov ar.unat = loc1
+	
+	add r8 = r0, r0, 1 		/* context_save returns 1 */
+	br.ret.sptk.many b0
+
+context_restore:
+	alloc loc0 = ar.pfs, 1, 9, 0, 0	;;
+
+	ld8 loc0 = [in0], 8	;;	/* load ar.pfs */
+	ld8 loc1 = [in0], 8	;;	/* load ar.unat (caller) */
+	ld8 loc2 = [in0], 8	;;	/* load ar.unat (callee) */
+	ld8 loc3 = [in0], 8	;;	/* load ar.rsc */
+	ld8 loc4 = [in0], 8	;;	/* load ar.bsp */
+	ld8 loc5 = [in0], 8	;;	/* load ar.rnat */
+	ld8 loc6 = [in0], 8	;;	/* load ar.lc */
+	
+	.auto	
+
+	/*
+	 * Invalidate the ALAT
+	 */
+	invala
+
+	/*
+	 * Put RSE to enforced lazy mode.
+	 * So that ar.bspstore and ar.rnat can be written.
+	 */
+	movl loc8 = ~3
+	and loc8 = loc3, loc8
+	mov ar.rsc = loc8
+
+	/*
+	 * Flush dirty registers to backing store.
+	 * We do this because we want the following move
+	 * to ar.bspstore to assign the same value to ar.bsp.
+	 */
+	flushrs
+
+	/*
+	 * Restore application registers
+	 */
+	mov ar.bspstore = loc4	/* rse.bspload = ar.bsp = ar.bspstore = loc4 */
+	mov ar.rnat = loc5
+	mov ar.pfs = loc0
+	mov ar.rsc = loc3
+
+	.explicit
+
+	mov ar.unat = loc2	;;
+	mov ar.lc = loc6
+	
+	/*
+	 * Restore general registers including NaT bits
+	 */
+	ld8.fill r1 = [in0], 8	;;
+	ld8.fill r4 = [in0], 8	;;
+	ld8.fill r5 = [in0], 8	;;
+	ld8.fill r6 = [in0], 8	;;
+	ld8.fill r7 = [in0], 8	;;
+	ld8.fill r12 = [in0], 8	;;	/* restore sp */
+	ld8.fill r13 = [in0], 8	;;
+
+	/* 
+	 * Restore branch registers
+	 */
+	ld8 loc2 = [in0], 8	;;	/* restore pc */
+	mov b0 = loc2
+	ld8 loc3 = [in0], 8	;;
+	mov b1 = loc3
+	ld8 loc4 = [in0], 8	;;
+	mov b2 = loc4
+	ld8 loc5 = [in0], 8	;;
+	mov b3 = loc5
+	ld8 loc6 = [in0], 8	;;
+	mov b4 = loc6
+	ld8 loc7 = [in0], 8	;;
+	mov b5 = loc7
+
+	/*
+	 * Restore predicate registers
+	 */
+	ld8 loc2 = [in0], 16	;;
+	mov pr = loc2, ~0
+
+	/*
+	 * Restore floating-point registers.
+	 */
+	ldf.fill f2 = [in0], 16 ;;
+	ldf.fill f3 = [in0], 16 ;;
+	ldf.fill f4 = [in0], 16 ;;
+	ldf.fill f5 = [in0], 16 ;;
+
+	ldf.fill f16 = [in0], 16 ;;
+	ldf.fill f17 = [in0], 16 ;;
+	ldf.fill f18 = [in0], 16 ;;
+	ldf.fill f19 = [in0], 16 ;;
+	ldf.fill f20 = [in0], 16 ;;
+	ldf.fill f21 = [in0], 16 ;;
+	ldf.fill f22 = [in0], 16 ;;
+	ldf.fill f23 = [in0], 16 ;;
+	ldf.fill f24 = [in0], 16 ;;
+	ldf.fill f25 = [in0], 16 ;;
+	ldf.fill f26 = [in0], 16 ;;
+	ldf.fill f27 = [in0], 16 ;;
+	ldf.fill f28 = [in0], 16 ;;
+	ldf.fill f29 = [in0], 16 ;;
+	ldf.fill f30 = [in0], 16 ;;
+	ldf.fill f31 = [in0], 16 ;;
+	
+	mov ar.unat = loc1
+	
+	mov r8 = r0			/* context_restore returns 0 */
+	br.ret.sptk.many b0
Index: uspace/lib/c/arch/ia64/src/stacktrace.c
===================================================================
--- uspace/lib/c/arch/ia64/src/stacktrace.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/ia64/src/stacktrace.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2010 Jakub Jermar
+ * 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 libcia64 ia64
+ * @ingroup lc
+ * @{
+ */
+/** @file
+ */
+
+#include <sys/types.h>
+#include <bool.h>
+#include <errno.h>
+
+#include <stacktrace.h>
+
+bool stacktrace_fp_valid(stacktrace_t *st, uintptr_t fp)
+{
+	(void) st; (void) fp;
+	return false;
+}
+
+int stacktrace_fp_prev(stacktrace_t *st, uintptr_t fp, uintptr_t *prev)
+{
+	(void) st; (void) fp; (void) prev;
+	return ENOTSUP;
+}
+
+int stacktrace_ra_get(stacktrace_t *st, uintptr_t fp, uintptr_t *ra)
+{
+	(void) st; (void) fp; (void) ra;
+	return ENOTSUP;
+}
+
+/** @}
+ */
Index: uspace/lib/c/arch/ia64/src/stacktrace_asm.S
===================================================================
--- uspace/lib/c/arch/ia64/src/stacktrace_asm.S	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/ia64/src/stacktrace_asm.S	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,41 @@
+#
+# 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.
+#
+
+.text
+
+.global stacktrace_prepare
+.global stacktrace_fp_get
+.global stacktrace_pc_get
+
+stacktrace_prepare:
+	br.ret.sptk.many b0
+
+stacktrace_fp_get:
+stacktrace_pc_get:
+	mov r8 = r0
+	br.ret.sptk.many b0
Index: uspace/lib/c/arch/ia64/src/syscall.S
===================================================================
--- uspace/lib/c/arch/ia64/src/syscall.S	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/ia64/src/syscall.S	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,44 @@
+#
+# 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.
+#
+
+/**
+ * Immediate operand for break instruction.
+ * Be carefull about the value as Ski simulator
+ * is somewhat sensitive to its value.
+ *
+ * 0 will be confused with Ski breakpoint.
+ * And higher values will be confused with SSC's.
+ */
+#define SYSCALL_IMM	1
+
+.global __syscall
+__syscall:
+	alloc r14 = ar.pfs, 7, 0, 0, 0 ;;
+	break SYSCALL_IMM
+	mov ar.pfs = r14 ;;
+	br.ret.sptk.many b0
Index: uspace/lib/c/arch/ia64/src/thread_entry.s
===================================================================
--- uspace/lib/c/arch/ia64/src/thread_entry.s	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/ia64/src/thread_entry.s	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,52 @@
+#
+# 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.
+#
+
+.text
+
+.globl __thread_entry
+
+## User-space thread entry point for all but the first threads.
+#
+#
+__thread_entry:
+	alloc loc0 = ar.pfs, 0, 1, 1, 0
+
+	movl r1 = _gp
+	
+	#
+	# r8 contains address of uarg structure.
+	#
+	
+	mov out0 = r8
+	br.call.sptk.many b0 = __thread_main
+	
+	#
+	# Not reached.
+	#
+	
+.end __thread_entry
Index: uspace/lib/c/arch/ia64/src/tls.c
===================================================================
--- uspace/lib/c/arch/ia64/src/tls.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/ia64/src/tls.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,51 @@
+/*
+ * 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 libcia64 ia64
+  * @brief ia64 architecture dependent parts of libc
+  * @ingroup lc
+ * @{
+ */
+/** @file
+ */
+
+#include <tls.h>
+#include <malloc.h>
+
+tcb_t * __alloc_tls(void **data, size_t size)
+{
+	return tls_alloc_variant_1(data, size);
+}
+
+void __free_tls_arch(tcb_t *tcb, size_t size)
+{
+	tls_free_variant_1(tcb, size);
+}
+
+/** @}
+ */
Index: uspace/lib/c/arch/mips32/Makefile.common
===================================================================
--- uspace/lib/c/arch/mips32/Makefile.common	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/mips32/Makefile.common	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,34 @@
+#
+# 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.
+#
+
+GCC_CFLAGS += -mips3
+
+ENDIANESS = LE
+
+BFD_ARCH = mips
+BFD_NAME = elf32-tradlittlemips
Index: uspace/lib/c/arch/mips32/Makefile.inc
===================================================================
--- uspace/lib/c/arch/mips32/Makefile.inc	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/mips32/Makefile.inc	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,38 @@
+#
+# 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.
+#
+
+ARCH_SOURCES = \
+	arch/$(UARCH)/src/entry.s \
+	arch/$(UARCH)/src/thread_entry.s \
+	arch/$(UARCH)/src/syscall.c \
+	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/mips32/_link.ld.in
===================================================================
--- uspace/lib/c/arch/mips32/_link.ld.in	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/mips32/_link.ld.in	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,57 @@
+STARTUP(LIBC_PATH/arch/UARCH/src/entry.o)
+ENTRY(__entry)
+
+PHDRS {
+	text PT_LOAD FLAGS(5);
+	data PT_LOAD FLAGS(6);
+}
+
+SECTIONS {
+	. = 0x4000 + SIZEOF_HEADERS;
+	
+	.init : {
+		*(.init);
+	} :text
+	.text : {
+	        *(.text);
+		*(.rodata*);
+	} :text
+
+	. = . + 0x4000;
+
+	.data : {
+		*(.data);
+		*(.data.rel*);
+	} :data
+
+	.got : {
+		_gp = .;
+		*(.got);
+	} :data
+
+	.tdata : {
+		_tdata_start = .;
+		*(.tdata);
+		_tdata_end = .;
+		_tbss_start = .;
+		*(.tbss);
+		_tbss_end = .;
+	} :data
+	_tls_alignment = ALIGNOF(.tdata);
+
+	.sbss : {
+		*(.scommon);
+		*(.sbss);
+	}	
+	.bss : {
+		*(.bss);
+		*(COMMON);
+	} :data
+
+	. = ALIGN(0x4000);
+	_heap = .;
+
+	/DISCARD/ : {
+		*(*);
+	}
+}
Index: uspace/lib/c/arch/mips32/include/atomic.h
===================================================================
--- uspace/lib/c/arch/mips32/include/atomic.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/mips32/include/atomic.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,87 @@
+/*
+ * 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 libcmips32
+ * @{
+ */
+/** @file
+ * @ingroup libcmips32eb
+ */
+
+#ifndef LIBC_mips32_ATOMIC_H_
+#define LIBC_mips32_ATOMIC_H_
+
+#define LIBC_ARCH_ATOMIC_H_
+
+#include <atomicdflt.h>
+
+#define atomic_inc(x)  ((void) atomic_add(x, 1))
+#define atomic_dec(x)  ((void) atomic_add(x, -1))
+
+#define atomic_postinc(x)  (atomic_add(x, 1) - 1)
+#define atomic_postdec(x)  (atomic_add(x, -1) + 1)
+
+#define atomic_preinc(x)  atomic_add(x, 1)
+#define atomic_predec(x)  atomic_add(x, -1)
+
+/* Atomic addition of immediate value.
+ *
+ * @param val Memory location to which will be the immediate value added.
+ * @param i   Signed immediate that will be added to *val.
+ *
+ * @return Value after addition.
+ *
+ */
+static inline atomic_count_t atomic_add(atomic_t *val, atomic_count_t i)
+{
+	atomic_count_t tmp;
+	atomic_count_t v;
+	
+	asm volatile (
+		"1:\n"
+		"	ll %0, %1\n"
+		"	addu %0, %0, %3\n"	/* same as add, but never traps on overflow */
+		"       move %2, %0\n"
+		"	sc %0, %1\n"
+		"	beq %0, %4, 1b\n"	/* if the atomic operation failed, try again */
+		/*	nop	*/		/* nop is inserted automatically by compiler */
+		"	nop\n"
+		: "=&r" (tmp),
+		  "+m" (val->count),
+		  "=&r" (v)
+		: "r" (i),
+		  "i" (0)
+	);
+	
+	return v;
+}
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/mips32/include/config.h
===================================================================
--- uspace/lib/c/arch/mips32/include/config.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/mips32/include/config.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,44 @@
+/*
+ * 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 libcmips32
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_mips32_CONFIG_H_
+#define LIBC_mips32_CONFIG_H_
+
+#define PAGE_WIDTH	14
+#define PAGE_SIZE	(1 << PAGE_WIDTH)
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/mips32/include/ddi.h
===================================================================
--- uspace/lib/c/arch/mips32/include/ddi.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/mips32/include/ddi.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,69 @@
+/*
+ * 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 libcmips32
+ */
+
+#ifndef LIBC_mips32_DDI_H_
+#define LIBC_mips32_DDI_H_
+
+#include <sys/types.h>
+#include <libarch/types.h>
+
+static inline void pio_write_8(ioport8_t *port, uint8_t v)
+{
+	*port = v;
+}
+
+static inline void pio_write_16(ioport16_t *port, uint16_t v)
+{
+	*port = v;
+}
+
+static inline void pio_write_32(ioport32_t *port, uint32_t v)
+{
+	*port = v;
+}
+
+static inline uint8_t pio_read_8(ioport8_t *port)
+{
+	return *port;
+}
+
+static inline uint16_t pio_read_16(ioport16_t *port)
+{
+	return *port;
+}
+
+static inline uint32_t pio_read_32(ioport32_t *port)
+{
+	return *port;
+}
+
+#endif
Index: uspace/lib/c/arch/mips32/include/faddr.h
===================================================================
--- uspace/lib/c/arch/mips32/include/faddr.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/mips32/include/faddr.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,45 @@
+/*
+ * 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 libcmips32
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_mips32_FADDR_H_
+#define LIBC_mips32_FADDR_H_
+
+#include <libarch/types.h>
+
+#define FADDR(fptr)		((uintptr_t) (fptr))
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/mips32/include/fibril.h
===================================================================
--- uspace/lib/c/arch/mips32/include/fibril.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/mips32/include/fibril.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,90 @@
+/*
+ * 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 libcmips32	
+ * @{
+ */
+/** @file
+ * @ingroup libcmips32eb	
+ */
+
+#ifndef LIBC_mips32_FIBRIL_H_
+#define LIBC_mips32_FIBRIL_H_
+
+#include <sys/types.h>
+
+/* We define our own context_set, because we need to set
+ * the TLS pointer to the tcb+0x7000
+ *
+ * See tls_set in thread.h
+ */
+#define context_set(c, _pc, stack, size, ptls) 			\
+	(c)->pc = (sysarg_t) (_pc);				\
+	(c)->sp = ((sysarg_t) (stack)) + (size) - SP_DELTA; 	\
+        (c)->tls = ((sysarg_t)(ptls)) + 0x7000 + sizeof(tcb_t);
+
+
+/* +16 is just for sure that the called function
+ * have space to store it's arguments
+ */
+#define SP_DELTA	(8+16)
+
+typedef struct  {
+	uint32_t sp;
+	uint32_t pc;
+	
+	uint32_t s0;
+	uint32_t s1;
+	uint32_t s2;
+	uint32_t s3;
+	uint32_t s4;
+	uint32_t s5;
+	uint32_t s6;
+	uint32_t s7;
+	uint32_t s8;
+	uint32_t gp;
+	uint32_t tls; /* Thread local storage(=k1) */
+
+	uint32_t f20;
+	uint32_t f21;
+	uint32_t f22;
+	uint32_t f23;
+	uint32_t f24;
+	uint32_t f25;
+	uint32_t f26;
+	uint32_t f27;
+	uint32_t f28;
+	uint32_t f29;
+	uint32_t f30;
+	
+} context_t;
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/mips32/include/inttypes.h
===================================================================
--- uspace/lib/c/arch/mips32/include/inttypes.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/mips32/include/inttypes.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,76 @@
+/*
+ * 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 libcmips32
+ * @{
+ */
+/** @file Macros for format specifiers.
+ *
+ * Macros for formatting stdint types as specified in section
+ * 7.8.1 Macros for format specifiers of the C99 draft specification
+ * (ISO/IEC 9899:201x). Only some macros from the specification are
+ * implemented.
+ */
+
+#ifndef LIBC_mips32_INTTYPES_H_
+#define LIBC_mips32_INTTYPES_H_
+
+#define PRId8 "d"
+#define PRId16 "d"
+#define PRId32 "d"
+#define PRId64 "lld"
+#define PRIdPTR "d"
+
+#define PRIo8 "o"
+#define PRIo16 "o"
+#define PRIo32 "o"
+#define PRIo64 "llo"
+#define PRIoPTR "o"
+
+#define PRIu8 "u"
+#define PRIu16 "u"
+#define PRIu32 "u"
+#define PRIu64 "llu"
+#define PRIuPTR "u"
+
+#define PRIx8 "x"
+#define PRIx16 "x"
+#define PRIx32 "x"
+#define PRIx64 "llx"
+#define PRIxPTR "x"
+
+#define PRIX8 "X"
+#define PRIX16 "X"
+#define PRIX32 "X"
+#define PRIX64 "llX"
+#define PRIXPTR "x"
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/mips32/include/istate.h
===================================================================
--- uspace/lib/c/arch/mips32/include/istate.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/mips32/include/istate.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,88 @@
+/*
+ * 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 libcmips32
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_mips32__ISTATE_H_
+#define LIBC_mips32__ISTATE_H_
+
+#include <sys/types.h>
+
+/** Interrupt context.
+ *
+ * This is a copy of the kernel definition with which it must be kept in sync.
+ */
+typedef struct istate {
+	uint32_t at;
+	uint32_t v0;
+	uint32_t v1;
+	uint32_t a0;
+	uint32_t a1;
+	uint32_t a2;
+	uint32_t a3;
+	uint32_t t0;
+	uint32_t t1;
+	uint32_t t2;
+	uint32_t t3;
+	uint32_t t4;
+	uint32_t t5;
+	uint32_t t6;
+	uint32_t t7;
+	uint32_t t8;
+	uint32_t t9;
+	uint32_t gp;
+	uint32_t sp;
+	uint32_t ra;
+
+	uint32_t lo;
+	uint32_t hi;
+
+	uint32_t status; /* cp0_status */
+	uint32_t epc; /* cp0_epc */
+	uint32_t k1; /* We use it as thread-local pointer */
+} istate_t;
+
+static inline uintptr_t istate_get_pc(istate_t *istate)
+{
+	return istate->epc;
+}
+
+static inline uintptr_t istate_get_fp(istate_t *istate)
+{
+	/* TODO */
+	return 0;
+}
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/mips32/include/limits.h
===================================================================
--- uspace/lib/c/arch/mips32/include/limits.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/mips32/include/limits.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,52 @@
+/*
+ * 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 libcmips32
+ * @{
+ */
+/** @file
+ * @ingroup libcmips32eb
+ */
+
+#ifndef LIBC_mips32__LIMITS_H_
+#define LIBC_mips32__LIMITS_H_
+
+#define LONG_MIN MIN_INT32
+#define LONG_MAX MAX_INT32
+#define ULONG_MIN MIN_UINT32
+#define ULONG_MAX MAX_UINT32
+
+#define SIZE_MIN MIN_UINT32
+#define SIZE_MAX MAX_UINT32
+#define SSIZE_MIN MIN_INT32
+#define SSIZE_MAX MAX_INT32
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/mips32/include/syscall.h
===================================================================
--- uspace/lib/c/arch/mips32/include/syscall.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/mips32/include/syscall.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,46 @@
+/*
+ * 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 libc
+ * @{
+ */
+/**
+ * @file
+ */
+
+#ifndef LIBC_mips32_SYSCALL_H_
+#define LIBC_mips32_SYSCALL_H_
+
+#define LIBARCH_SYSCALL_GENERIC
+
+#include <syscall.h>
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/mips32/include/thread.h
===================================================================
--- uspace/lib/c/arch/mips32/include/thread.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/mips32/include/thread.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,42 @@
+/*
+ * 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 libcmips32	
+ * @{
+ */
+/** @file
+ * @ingroup libcmips32eb	
+ */
+
+#ifndef LIBC_mips32_THREAD_H_
+#define LIBC_mips32_THREAD_H_
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/mips32/include/tls.h
===================================================================
--- uspace/lib/c/arch/mips32/include/tls.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/mips32/include/tls.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,86 @@
+/*
+ * 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 libcmips32	
+ * @{
+ */
+/** @file
+ * @ingroup libcmips32eb	
+ */
+
+/* TLS for MIPS is described in http://www.linux-mips.org/wiki/NPTL */
+
+#ifndef LIBC_mips32_TLS_H_
+#define LIBC_mips32_TLS_H_
+
+/*
+ * FIXME: Note that the use of variant I contradicts the observations made in
+ * the note below. Nevertheless the scheme we have used for allocating and
+ * deallocatin TLS corresponds to TLS variant I.
+ */
+#define CONFIG_TLS_VARIANT_1
+
+/* I did not find any specification (neither MIPS nor PowerPC), but
+ * as I found it
+ * - it uses Variant II
+ * - TCB is at Address(First TLS Block)+0x7000.
+ * - DTV is at Address(First TLS Block)+0x8000
+ * - What would happen if the TLS data was larger then 0x7000?
+ * - The linker never accesses DTV directly, has the second definition any
+ *   sense?
+ * We will make it this way:
+ * - TCB is at TP-0x7000-sizeof(tcb)
+ * - No assumption about DTV etc., but it will not have a fixed address
+ */
+#define MIPS_TP_OFFSET 0x7000
+
+typedef struct {
+	void *fibril_data;
+} tcb_t;
+
+static inline void __tcb_set(tcb_t *tcb)
+{
+	void *tp = tcb;
+	tp += MIPS_TP_OFFSET + sizeof(tcb_t);
+
+	asm volatile ("add $27, %0, $0" : : "r"(tp)); /* Move tls to K1 */
+}
+
+static inline tcb_t * __tcb_get(void)
+{
+	void * retval;
+
+	asm volatile("add %0, $27, $0" : "=r"(retval));
+
+	return (tcb_t *)(retval - MIPS_TP_OFFSET - sizeof(tcb_t));
+}
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/mips32/include/types.h
===================================================================
--- uspace/lib/c/arch/mips32/include/types.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/mips32/include/types.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,63 @@
+/*
+ * 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 libcmips32
+ * @{
+ */
+/** @file
+ * @ingroup libcmips32eb
+ */
+
+#ifndef LIBC_mips32_TYPES_H_
+#define LIBC_mips32_TYPES_H_
+
+#define __32_BITS__
+
+typedef unsigned int sysarg_t;
+
+typedef char int8_t;
+typedef short int int16_t;
+typedef long int int32_t;
+typedef long long int int64_t;
+
+typedef unsigned char uint8_t;
+typedef unsigned short int uint16_t;
+typedef unsigned long int uint32_t;
+typedef unsigned long long int uint64_t;
+
+typedef int32_t ssize_t;
+typedef uint32_t size_t;
+
+typedef uint32_t uintptr_t;
+typedef uint32_t atomic_count_t;
+typedef int32_t atomic_signed_t;
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/mips32/src/entry.s
===================================================================
--- uspace/lib/c/arch/mips32/src/entry.s	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/mips32/src/entry.s	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,65 @@
+#
+# 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.
+#
+
+.text
+.section .init, "ax"
+.global __entry
+.global __entry_driver
+.set noreorder
+.option pic2
+
+## User-space task entry point
+#
+# $a0 ($4) contains the PCB pointer
+#
+.ent __entry
+__entry:
+	.frame $sp, 32, $31
+	.cpload $25
+
+	# Mips o32 may store its arguments on stack, make space (16 bytes),
+	# so that it could work with -O0
+	# Make space additional 16 bytes for the stack frame
+
+	addiu $sp, -32
+	.cprestore 16   # Allow PIC code
+
+	# Pass pcb_ptr to __main() as the first argument. pcb_ptr is already
+	# in $a0. As the first argument is passed in $a0, no operation
+	# is needed.
+
+	jal __main
+	nop
+	
+	jal __exit
+	nop
+.end
+
+# Alignment of output section data to 0x4000
+.section .data
+.align 14
Index: uspace/lib/c/arch/mips32/src/fibril.S
===================================================================
--- uspace/lib/c/arch/mips32/src/fibril.S	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/mips32/src/fibril.S	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,55 @@
+#
+# Copyright (c) 2003-2004 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.
+#
+
+.text
+
+.set noat
+.set noreorder
+
+#include <arch/context_offset.h>
+	
+.global context_save
+.global context_restore
+	
+context_save:
+	CONTEXT_SAVE_ARCH_CORE $a0
+
+	# context_save returns 1
+	j $ra
+	li $v0, 1	
+	
+context_restore:
+	CONTEXT_RESTORE_ARCH_CORE $a0
+
+	# Just for the jump into first function, but one instruction
+	# should not bother us
+	move $t9, $ra	
+	# context_restore returns 0
+	j $ra
+	xor $v0, $v0	
+
Index: uspace/lib/c/arch/mips32/src/stacktrace.c
===================================================================
--- uspace/lib/c/arch/mips32/src/stacktrace.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/mips32/src/stacktrace.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2010 Jakub Jermar
+ * 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 libcmips32 mips32
+ * @ingroup lc
+ * @{
+ */
+/** @file
+ */
+
+#include <sys/types.h>
+#include <bool.h>
+#include <errno.h>
+
+#include <stacktrace.h>
+
+bool stacktrace_fp_valid(stacktrace_t *st, uintptr_t fp)
+{
+	(void) st; (void) fp;
+	return false;
+}
+
+int stacktrace_fp_prev(stacktrace_t *st, uintptr_t fp, uintptr_t *prev)
+{
+	(void) st; (void) fp; (void) prev;
+	return ENOTSUP;
+}
+
+int stacktrace_ra_get(stacktrace_t *st, uintptr_t fp, uintptr_t *ra)
+{
+	(void) st; (void) fp; (void) ra;
+	return ENOTSUP;
+}
+
+/** @}
+ */
Index: uspace/lib/c/arch/mips32/src/stacktrace_asm.S
===================================================================
--- uspace/lib/c/arch/mips32/src/stacktrace_asm.S	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/mips32/src/stacktrace_asm.S	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,42 @@
+#
+# 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.
+#
+
+.text
+
+.set noat
+.set noreorder
+
+.global stacktrace_prepare
+.global stacktrace_fp_get
+.global stacktrace_pc_get
+
+stacktrace_prepare:
+stacktrace_fp_get:
+stacktrace_pc_get:
+	j $ra
+	xor $v0, $v0
Index: uspace/lib/c/arch/mips32/src/syscall.c
===================================================================
--- uspace/lib/c/arch/mips32/src/syscall.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/mips32/src/syscall.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,68 @@
+/*
+ * 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 libcmips32
+ * @{
+ */
+/** @file
+  * @ingroup libcmips32eb	
+ */
+
+#include <libc.h>
+
+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 sysarg_t __mips_reg_a0 asm("$4") = p1;
+	register sysarg_t __mips_reg_a1 asm("$5") = p2;
+	register sysarg_t __mips_reg_a2 asm("$6") = p3;
+	register sysarg_t __mips_reg_a3 asm("$7") = p4;
+	register sysarg_t __mips_reg_t0 asm("$8") = p5;
+	register sysarg_t __mips_reg_t1 asm("$9") = p6;
+	register sysarg_t __mips_reg_v0 asm("$2") = id;
+	
+	asm volatile (
+		"syscall\n"
+		: "=r" (__mips_reg_v0)
+		: "r" (__mips_reg_a0),
+		  "r" (__mips_reg_a1),
+		  "r" (__mips_reg_a2),
+		  "r" (__mips_reg_a3),
+		  "r" (__mips_reg_t0),
+		  "r" (__mips_reg_t1),
+		  "r" (__mips_reg_v0)
+		: "%ra" /* We are a function call, although C does not 
+			 * know it */
+	);
+	
+	return __mips_reg_v0;
+}
+
+ /** @}
+ */
+
Index: uspace/lib/c/arch/mips32/src/thread_entry.s
===================================================================
--- uspace/lib/c/arch/mips32/src/thread_entry.s	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/mips32/src/thread_entry.s	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,59 @@
+#
+# 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.
+#
+
+.text
+	
+.set noat
+.set noreorder
+.option pic2
+	
+.globl __thread_entry
+
+## User-space thread entry point for all but the first threads.
+#
+#
+.ent __thread_entry
+__thread_entry:
+	.frame $sp, 32, $31
+	.cpload $25
+
+	#
+	# v0 contains address of uarg.
+	#
+	add $4, $2, 0
+	# Mips o32 may store its arguments on stack, make space
+	addiu $sp, -32
+	.cprestore 16
+	
+	jal __thread_main
+	nop
+		
+	#
+	# Not reached.
+	#
+.end __thread_entry
Index: uspace/lib/c/arch/mips32/src/tls.c
===================================================================
--- uspace/lib/c/arch/mips32/src/tls.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/mips32/src/tls.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,50 @@
+/*
+ * 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 libcmips32	
+ * @{
+ */
+/** @file
+ * @ingroup libcmips32eb	
+ */
+
+#include <tls.h>
+#include <sys/types.h>
+
+tcb_t * __alloc_tls(void **data, size_t size)
+{
+	return tls_alloc_variant_1(data, size);
+}
+
+void __free_tls_arch(tcb_t *tcb, size_t size)
+{
+	tls_free_variant_1(tcb, size);
+}
+
+/** @}
+ */
Index: uspace/lib/c/arch/mips32eb/Makefile.common
===================================================================
--- uspace/lib/c/arch/mips32eb/Makefile.common	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/mips32eb/Makefile.common	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,34 @@
+#
+# 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.
+#
+
+GCC_CFLAGS += -mips3
+
+ENDIANESS = BE
+
+BFD_ARCH = mips
+BFD_NAME = elf32-tradbigmips
Index: uspace/lib/c/arch/mips32eb/Makefile.inc
===================================================================
--- uspace/lib/c/arch/mips32eb/Makefile.inc	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/mips32eb/Makefile.inc	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,38 @@
+#
+# 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.
+#
+
+ARCH_SOURCES = \
+	arch/$(UARCH)/src/entry.s \
+	arch/$(UARCH)/src/thread_entry.s \
+	arch/$(UARCH)/src/syscall.c \
+	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/mips32eb/_link.ld.in
===================================================================
--- uspace/lib/c/arch/mips32eb/_link.ld.in	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/mips32eb/_link.ld.in	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,1 @@
+../mips32/_link.ld.in
Index: uspace/lib/c/arch/mips32eb/include/atomic.h
===================================================================
--- uspace/lib/c/arch/mips32eb/include/atomic.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/mips32eb/include/atomic.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,1 @@
+../../mips32/include/atomic.h
Index: uspace/lib/c/arch/mips32eb/include/config.h
===================================================================
--- uspace/lib/c/arch/mips32eb/include/config.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/mips32eb/include/config.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,1 @@
+../../mips32/include/config.h
Index: uspace/lib/c/arch/mips32eb/include/ddi.h
===================================================================
--- uspace/lib/c/arch/mips32eb/include/ddi.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/mips32eb/include/ddi.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,1 @@
+../../mips32/include/ddi.h
Index: uspace/lib/c/arch/mips32eb/include/faddr.h
===================================================================
--- uspace/lib/c/arch/mips32eb/include/faddr.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/mips32eb/include/faddr.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,1 @@
+../../mips32/include/faddr.h
Index: uspace/lib/c/arch/mips32eb/include/fibril.h
===================================================================
--- uspace/lib/c/arch/mips32eb/include/fibril.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/mips32eb/include/fibril.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,1 @@
+../../mips32/include/fibril.h
Index: uspace/lib/c/arch/mips32eb/include/inttypes.h
===================================================================
--- uspace/lib/c/arch/mips32eb/include/inttypes.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/mips32eb/include/inttypes.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,1 @@
+../../mips32/include/inttypes.h
Index: uspace/lib/c/arch/mips32eb/include/istate.h
===================================================================
--- uspace/lib/c/arch/mips32eb/include/istate.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/mips32eb/include/istate.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,1 @@
+../../mips32/include/istate.h
Index: uspace/lib/c/arch/mips32eb/include/limits.h
===================================================================
--- uspace/lib/c/arch/mips32eb/include/limits.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/mips32eb/include/limits.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,1 @@
+../../mips32/include/limits.h
Index: uspace/lib/c/arch/mips32eb/include/syscall.h
===================================================================
--- uspace/lib/c/arch/mips32eb/include/syscall.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/mips32eb/include/syscall.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,1 @@
+../../mips32/include/syscall.h
Index: uspace/lib/c/arch/mips32eb/include/thread.h
===================================================================
--- uspace/lib/c/arch/mips32eb/include/thread.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/mips32eb/include/thread.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,1 @@
+../../mips32/include/thread.h
Index: uspace/lib/c/arch/mips32eb/include/tls.h
===================================================================
--- uspace/lib/c/arch/mips32eb/include/tls.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/mips32eb/include/tls.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,1 @@
+../../mips32/include/tls.h
Index: uspace/lib/c/arch/mips32eb/include/types.h
===================================================================
--- uspace/lib/c/arch/mips32eb/include/types.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/mips32eb/include/types.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,1 @@
+../../mips32/include/types.h
Index: uspace/lib/c/arch/mips32eb/src
===================================================================
--- uspace/lib/c/arch/mips32eb/src	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/mips32eb/src	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,1 @@
+../mips32/src
Index: uspace/lib/c/arch/ppc32/Makefile.common
===================================================================
--- uspace/lib/c/arch/ppc32/Makefile.common	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/ppc32/Makefile.common	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,35 @@
+#
+# 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.
+#
+
+GCC_CFLAGS += -mcpu=powerpc -msoft-float -m32
+AFLAGS = -a32
+
+ENDIANESS = BE
+
+BFD_NAME = elf32-powerpc
+BFD_ARCH = powerpc:common
Index: uspace/lib/c/arch/ppc32/Makefile.inc
===================================================================
--- uspace/lib/c/arch/ppc32/Makefile.inc	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/ppc32/Makefile.inc	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,38 @@
+#
+# 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/thread_entry.s \
+	arch/$(UARCH)/src/syscall.c \
+	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/ppc32/_link.ld.in
===================================================================
--- uspace/lib/c/arch/ppc32/_link.ld.in	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/ppc32/_link.ld.in	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,48 @@
+STARTUP(LIBC_PATH/arch/UARCH/src/entry.o)
+ENTRY(__entry)
+
+PHDRS {
+	text PT_LOAD FLAGS(5);
+	data PT_LOAD FLAGS(6);
+}
+
+SECTIONS {
+	. = 0x1000 + SIZEOF_HEADERS;
+
+	.init : {
+		*(.init);
+	} :text
+	.text : {
+		*(.text);
+		*(.rodata*);
+	} :text
+
+	. = . + 0x1000;
+
+	.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
+
+	. = ALIGN(0x1000);
+	_heap = .;
+	
+	/DISCARD/ : {
+		*(*);
+	}
+
+}
Index: uspace/lib/c/arch/ppc32/include/atomic.h
===================================================================
--- uspace/lib/c/arch/ppc32/include/atomic.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/ppc32/include/atomic.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,105 @@
+/*
+ * 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 libcppc32
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_ppc32_ATOMIC_H_
+#define LIBC_ppc32_ATOMIC_H_
+
+#define LIBC_ARCH_ATOMIC_H_
+
+#include <atomicdflt.h>
+
+static inline void atomic_inc(atomic_t *val)
+{
+	atomic_count_t tmp;
+	
+	asm volatile (
+		"1:\n"
+		"lwarx %0, 0, %2\n"
+		"addic %0, %0, 1\n"
+		"stwcx. %0, 0, %2\n"
+		"bne- 1b"
+		: "=&r" (tmp),
+		  "=m" (val->count)
+		: "r" (&val->count),
+		  "m" (val->count)
+		: "cc"
+	);
+}
+
+static inline void atomic_dec(atomic_t *val)
+{
+	atomic_count_t tmp;
+	
+	asm volatile (
+		"1:\n"
+		"lwarx %0, 0, %2\n"
+		"addic %0, %0, -1\n"
+		"stwcx. %0, 0, %2\n"
+		"bne- 1b"
+		: "=&r" (tmp),
+		  "=m" (val->count)
+		: "r" (&val->count),
+		  "m" (val->count)
+		: "cc"
+	);
+}
+
+static inline atomic_count_t atomic_postinc(atomic_t *val)
+{
+	atomic_inc(val);
+	return val->count - 1;
+}
+
+static inline atomic_count_t atomic_postdec(atomic_t *val)
+{
+	atomic_dec(val);
+	return val->count + 1;
+}
+
+static inline atomic_count_t atomic_preinc(atomic_t *val)
+{
+	atomic_inc(val);
+	return val->count;
+}
+
+static inline atomic_count_t atomic_predec(atomic_t *val)
+{
+	atomic_dec(val);
+	return val->count;
+}
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/ppc32/include/config.h
===================================================================
--- uspace/lib/c/arch/ppc32/include/config.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/ppc32/include/config.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,44 @@
+/*
+ * 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 libppc32
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_ppc32_CONFIG_H_
+#define LIBC_ppc32_CONFIG_H_
+
+#define PAGE_WIDTH	12
+#define PAGE_SIZE	(1 << PAGE_WIDTH)
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/ppc32/include/ddi.h
===================================================================
--- uspace/lib/c/arch/ppc32/include/ddi.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/ppc32/include/ddi.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,69 @@
+/*
+ * 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 libcppc32
+ */
+
+#ifndef LIBC_ppc32_DDI_H_
+#define LIBC_ppc32_DDI_H_
+
+#include <sys/types.h>
+#include <libarch/types.h>
+
+static inline void pio_write_8(ioport8_t *port, uint8_t v)
+{
+	*port = v;
+}
+
+static inline void pio_write_16(ioport16_t *port, uint16_t v)
+{
+	*port = v;
+}
+
+static inline void pio_write_32(ioport32_t *port, uint32_t v)
+{
+	*port = v;
+}
+
+static inline uint8_t pio_read_8(ioport8_t *port)
+{
+	return *port;
+}
+
+static inline uint16_t pio_read_16(ioport16_t *port)
+{
+	return *port;
+}
+
+static inline uint32_t pio_read_32(ioport32_t *port)
+{
+	return *port;
+}
+
+#endif
Index: uspace/lib/c/arch/ppc32/include/faddr.h
===================================================================
--- uspace/lib/c/arch/ppc32/include/faddr.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/ppc32/include/faddr.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,45 @@
+/*
+ * 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 libcppc32
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_ppc32_FADDR_H_
+#define LIBC_ppc32_FADDR_H_
+
+#include <libarch/types.h>
+
+#define FADDR(fptr)		((uintptr_t) (fptr))
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/ppc32/include/fibril.h
===================================================================
--- uspace/lib/c/arch/ppc32/include/fibril.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/ppc32/include/fibril.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,83 @@
+/*
+ * 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.
+ */
+
+/** @addtogroup libcppc32	
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_ppc32_FIBRIL_H_
+#define LIBC_ppc32_FIBRIL_H_
+
+#include <sys/types.h>
+
+/* We define our own context_set, because we need to set
+ * the TLS pointer to the tcb+0x7000
+ *
+ * See tls_set in thread.h
+ */
+#define context_set(c, _pc, stack, size, ptls) 			\
+	(c)->pc = (sysarg_t) (_pc);				\
+	(c)->sp = ((sysarg_t) (stack)) + (size) - SP_DELTA; 	\
+	(c)->tls = ((sysarg_t) (ptls)) + 0x7000 + sizeof(tcb_t);
+
+#define SP_DELTA	16
+
+typedef struct {
+	uint32_t sp;
+	uint32_t pc;
+	
+	uint32_t tls;
+	uint32_t r13;
+	uint32_t r14;
+	uint32_t r15;
+	uint32_t r16;
+	uint32_t r17;
+	uint32_t r18;
+	uint32_t r19;
+	uint32_t r20;
+	uint32_t r21;
+	uint32_t r22;
+	uint32_t r23;
+	uint32_t r24;
+	uint32_t r25;
+	uint32_t r26;
+	uint32_t r27;
+	uint32_t r28;
+	uint32_t r29;
+	uint32_t r30;
+	uint32_t r31;
+	
+	uint32_t cr;
+} __attribute__ ((packed)) context_t;
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/ppc32/include/inttypes.h
===================================================================
--- uspace/lib/c/arch/ppc32/include/inttypes.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/ppc32/include/inttypes.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,76 @@
+/*
+ * 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 libcppc32
+ * @{
+ */
+/** @file Macros for format specifiers.
+ *
+ * Macros for formatting stdint types as specified in section
+ * 7.8.1 Macros for format specifiers of the C99 draft specification
+ * (ISO/IEC 9899:201x). Only some macros from the specification are
+ * implemented.
+ */
+
+#ifndef LIBC_ppc32_INTTYPES_H_
+#define LIBC_ppc32_INTTYPES_H_
+
+#define PRId8 "d"
+#define PRId16 "d"
+#define PRId32 "d"
+#define PRId64 "lld"
+#define PRIdPTR "d"
+
+#define PRIo8 "o"
+#define PRIo16 "o"
+#define PRIo32 "o"
+#define PRIo64 "llo"
+#define PRIoPTR "o"
+
+#define PRIu8 "u"
+#define PRIu16 "u"
+#define PRIu32 "u"
+#define PRIu64 "llu"
+#define PRIuPTR "u"
+
+#define PRIx8 "x"
+#define PRIx16 "x"
+#define PRIx32 "x"
+#define PRIx64 "llx"
+#define PRIxPTR "x"
+
+#define PRIX8 "X"
+#define PRIX16 "X"
+#define PRIX32 "X"
+#define PRIX64 "llX"
+#define PRIXPTR "X"
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/ppc32/include/istate.h
===================================================================
--- uspace/lib/c/arch/ppc32/include/istate.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/ppc32/include/istate.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,99 @@
+/*
+ * 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 libcppc32
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_ppc32_ISTATE_H_
+#define LIBC_ppc32_ISTATE_H_
+
+#include <sys/types.h>
+
+/** Interrupt context.
+ *
+ * This is a copy of the kernel definition with which it must be kept in sync.
+ */
+typedef struct istate {
+	uint32_t r0;
+	uint32_t r2;
+	uint32_t r3;
+	uint32_t r4;
+	uint32_t r5;
+	uint32_t r6;
+	uint32_t r7;
+	uint32_t r8;
+	uint32_t r9;
+	uint32_t r10;
+	uint32_t r11;
+	uint32_t r13;
+	uint32_t r14;
+	uint32_t r15;
+	uint32_t r16;
+	uint32_t r17;
+	uint32_t r18;
+	uint32_t r19;
+	uint32_t r20;
+	uint32_t r21;
+	uint32_t r22;
+	uint32_t r23;
+	uint32_t r24;
+	uint32_t r25;
+	uint32_t r26;
+	uint32_t r27;
+	uint32_t r28;
+	uint32_t r29;
+	uint32_t r30;
+	uint32_t r31;
+	uint32_t cr;
+	uint32_t pc;
+	uint32_t srr1;
+	uint32_t lr;
+	uint32_t ctr;
+	uint32_t xer;
+	uint32_t dar;
+	uint32_t r12;
+	uint32_t sp;
+} istate_t;
+
+static inline uintptr_t istate_get_pc(istate_t *istate)
+{
+	return istate->pc;
+}
+
+static inline uintptr_t istate_get_fp(istate_t *istate)
+{
+	return istate->sp;
+}
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/ppc32/include/limits.h
===================================================================
--- uspace/lib/c/arch/ppc32/include/limits.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/ppc32/include/limits.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,51 @@
+/*
+ * 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 libcppc32
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_ppc32_LIMITS_H_
+#define LIBC_ppc32_LIMITS_H_
+
+#define LONG_MIN MIN_INT32
+#define LONG_MAX MAX_INT32
+#define ULONG_MIN MIN_UINT32
+#define ULONG_MAX MAX_UINT32
+
+#define SIZE_MIN MIN_UINT32
+#define SIZE_MAX MAX_UINT32
+#define SSIZE_MIN MIN_INT32
+#define SSIZE_MAX MAX_INT32
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/ppc32/include/regname.h
===================================================================
--- uspace/lib/c/arch/ppc32/include/regname.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/ppc32/include/regname.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,188 @@
+/*
+ * 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.
+ */
+
+/** @addtogroup libcppc32	
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_ppc32_REGNAME_H_
+#define LIBC_ppc32_REGNAME_H_
+
+/* Condition Register Bit Fields */
+#define	cr0	0
+#define	cr1	1
+#define	cr2	2
+#define	cr3	3
+#define	cr4	4
+#define	cr5	5
+#define	cr6	6
+#define	cr7	7
+
+/* General Purpose Registers (GPRs) */
+#define	r0	0
+#define	r1	1
+#define	r2	2
+#define	r3	3
+#define	r4	4
+#define	r5	5
+#define	r6	6
+#define	r7	7
+#define	r8	8
+#define	r9	9
+#define	r10	10
+#define	r11	11
+#define	r12	12
+#define	r13	13
+#define	r14	14
+#define	r15	15
+#define	r16	16
+#define	r17	17
+#define	r18	18
+#define	r19	19
+#define	r20	20
+#define	r21	21
+#define	r22	22
+#define	r23	23
+#define	r24	24
+#define	r25	25
+#define	r26	26
+#define	r27	27
+#define	r28	28
+#define	r29	29
+#define	r30	30
+#define	r31	31
+
+/* GPR Aliases */
+#define	sp	1
+
+/* Floating Point Registers (FPRs) */
+#define	fr0		0
+#define	fr1		1
+#define	fr2		2
+#define	fr3		3
+#define	fr4		4
+#define	fr5		5
+#define	fr6		6
+#define	fr7		7
+#define	fr8		8
+#define	fr9		9
+#define	fr10	10
+#define	fr11	11
+#define	fr12	12
+#define	fr13	13
+#define	fr14	14
+#define	fr15	15
+#define	fr16	16
+#define	fr17	17
+#define	fr18	18
+#define	fr19	19
+#define	fr20	20
+#define	fr21	21
+#define	fr22	22
+#define	fr23	23
+#define	fr24	24
+#define	fr25	25
+#define	fr26	26
+#define	fr27	27
+#define	fr28	28
+#define	fr29	29
+#define	fr30	30
+#define	fr31	31
+
+#define	vr0		0
+#define	vr1		1
+#define	vr2		2
+#define	vr3		3
+#define	vr4		4
+#define	vr5		5
+#define	vr6		6
+#define	vr7		7
+#define	vr8		8
+#define	vr9		9
+#define	vr10	10
+#define	vr11	11
+#define	vr12	12
+#define	vr13	13
+#define	vr14	14
+#define	vr15	15
+#define	vr16	16
+#define	vr17	17
+#define	vr18	18
+#define	vr19	19
+#define	vr20	20
+#define	vr21	21
+#define	vr22	22
+#define	vr23	23
+#define	vr24	24
+#define	vr25	25
+#define	vr26	26
+#define	vr27	27
+#define	vr28	28
+#define	vr29	29
+#define	vr30	30
+#define	vr31	31
+
+#define	evr0	0
+#define	evr1	1
+#define	evr2	2
+#define	evr3	3
+#define	evr4	4
+#define	evr5	5
+#define	evr6	6
+#define	evr7	7
+#define	evr8	8
+#define	evr9	9
+#define	evr10	10
+#define	evr11	11
+#define	evr12	12
+#define	evr13	13
+#define	evr14	14
+#define	evr15	15
+#define	evr16	16
+#define	evr17	17
+#define	evr18	18
+#define	evr19	19
+#define	evr20	20
+#define	evr21	21
+#define	evr22	22
+#define	evr23	23
+#define	evr24	24
+#define	evr25	25
+#define	evr26	26
+#define	evr27	27
+#define	evr28	28
+#define	evr29	29
+#define	evr30	30
+#define	evr31	31
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/ppc32/include/stackarg.h
===================================================================
--- uspace/lib/c/arch/ppc32/include/stackarg.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/ppc32/include/stackarg.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,41 @@
+/*
+ * 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 libcppc32	
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_STACKARG_H_
+#define LIBC_STACKARG_H_
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/ppc32/include/syscall.h
===================================================================
--- uspace/lib/c/arch/ppc32/include/syscall.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/ppc32/include/syscall.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,46 @@
+/*
+ * 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 libc
+ * @{
+ */
+/**
+ * @file
+ */
+
+#ifndef LIBC_ppc32_SYSCALL_H_
+#define LIBC_ppc32_SYSCALL_H_
+
+#define LIBARCH_SYSCALL_GENERIC
+
+#include <syscall.h>
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/ppc32/include/thread.h
===================================================================
--- uspace/lib/c/arch/ppc32/include/thread.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/ppc32/include/thread.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,41 @@
+/*
+ * 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.
+ */
+
+/** @addtogroup libcppc32	
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_ppc32_THREAD_H_
+#define LIBC_ppc32_THREAD_H_
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/ppc32/include/tls.h
===================================================================
--- uspace/lib/c/arch/ppc32/include/tls.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/ppc32/include/tls.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,73 @@
+/*
+ * 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.
+ */
+
+/** @addtogroup libcppc32	
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_ppc32_TLS_H_
+#define LIBC_ppc32_TLS_H_
+
+#define CONFIG_TLS_VARIANT_1
+
+#define PPC_TP_OFFSET 0x7000
+
+typedef struct {
+	void *fibril_data;
+} tcb_t;
+
+static inline void __tcb_set(tcb_t *tcb)
+{
+	void *tp = tcb;
+	tp += PPC_TP_OFFSET + sizeof(tcb_t);
+	
+	asm volatile (
+		"mr %%r2, %0\n"
+		:
+		: "r" (tp)
+	);
+}
+
+static inline tcb_t * __tcb_get(void)
+{
+	void * retval;
+	
+	asm volatile (
+		"mr %0, %%r2\n"
+		: "=r" (retval)
+	);
+
+	return (tcb_t *)(retval - PPC_TP_OFFSET - sizeof(tcb_t));
+}
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/ppc32/include/types.h
===================================================================
--- uspace/lib/c/arch/ppc32/include/types.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/ppc32/include/types.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,63 @@
+/*
+ * 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 libcppc32
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_ppc32_TYPES_H_
+#define LIBC_ppc32_TYPES_H_
+
+#define __32_BITS__
+
+typedef unsigned int sysarg_t;
+
+typedef char int8_t;
+typedef short int int16_t;
+typedef int int32_t;
+typedef long long int int64_t;
+
+typedef unsigned char uint8_t;
+typedef unsigned short int uint16_t;
+typedef unsigned int uint32_t;
+typedef unsigned long long int uint64_t;
+
+typedef int32_t ssize_t;
+typedef uint32_t size_t;
+
+typedef uint32_t uintptr_t;
+typedef uint32_t atomic_count_t;
+typedef int32_t atomic_signed_t;
+
+#endif
+
+/** @}
+ */
+
Index: uspace/lib/c/arch/ppc32/src/entry.s
===================================================================
--- uspace/lib/c/arch/ppc32/src/entry.s	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/ppc32/src/entry.s	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,52 @@
+#
+# 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.
+#
+
+.section .init, "ax"
+
+.org 0
+
+.globl __entry
+
+## User-space task entry point
+#
+# r6 contains the PCB pointer
+#
+__entry:
+	#
+	# Create the first stack frame.
+	#
+	li %r3, 0
+	stw %r3, 0(%r1)
+	stwu %r1, -16(%r1)
+
+	# Pass the PCB pointer to __main() as the first argument.
+	# The first argument is passed in r3.
+	mr %r3, %r6
+	bl __main
+
+	bl __exit
Index: uspace/lib/c/arch/ppc32/src/fibril.S
===================================================================
--- uspace/lib/c/arch/ppc32/src/fibril.S	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/ppc32/src/fibril.S	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,62 @@
+#
+# 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.
+#
+
+.text
+
+.global context_save
+.global context_restore
+
+#include <libarch/regname.h>
+#include <arch/context_offset.h>
+
+context_save:
+	CONTEXT_SAVE_ARCH_CORE r3
+	
+	mflr r4
+	stw r4, OFFSET_PC(r3)
+	
+	mfcr r4
+	stw r4, OFFSET_CR(r3)
+	
+	# context_save returns 1
+	li r3, 1
+	blr
+
+
+context_restore:
+	CONTEXT_RESTORE_ARCH_CORE r3
+	
+	lwz r4, OFFSET_CR(r3)
+	mtcr r4
+	
+	lwz r4, OFFSET_PC(r3)
+	mtlr r4
+	
+	# context_restore returns 0
+	li r3, 0
+	blr
Index: uspace/lib/c/arch/ppc32/src/stacktrace.c
===================================================================
--- uspace/lib/c/arch/ppc32/src/stacktrace.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/ppc32/src/stacktrace.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2010 Jakub Jermar
+ * 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 libcppc32 ppc32
+ * @ingroup lc
+ * @{
+ */
+/** @file
+ */
+
+#include <sys/types.h>
+#include <bool.h>
+
+#include <stacktrace.h>
+
+#define FRAME_OFFSET_FP_PREV	0
+#define FRAME_OFFSET_RA		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)
+{
+	return (*st->read_uintptr)(st->op_arg, fp + FRAME_OFFSET_FP_PREV, prev);
+}
+
+int stacktrace_ra_get(stacktrace_t *st, uintptr_t fp, uintptr_t *ra)
+{
+	return (*st->read_uintptr)(st->op_arg, fp + FRAME_OFFSET_RA, ra);
+}
+
+/** @}
+ */
Index: uspace/lib/c/arch/ppc32/src/stacktrace_asm.S
===================================================================
--- uspace/lib/c/arch/ppc32/src/stacktrace_asm.S	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/ppc32/src/stacktrace_asm.S	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,46 @@
+#
+# 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.
+#
+
+.text
+
+#include <libarch/regname.h>
+
+.global stacktrace_prepare
+.global stacktrace_fp_get
+.global stacktrace_pc_get
+
+stacktrace_prepare:
+	blr
+
+stacktrace_fp_get:
+	mr r3, sp
+	blr
+
+stacktrace_pc_get:
+	mflr r3
+	blr
Index: uspace/lib/c/arch/ppc32/src/syscall.c
===================================================================
--- uspace/lib/c/arch/ppc32/src/syscall.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/ppc32/src/syscall.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,66 @@
+/*
+ * 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.
+ */
+
+/** @addtogroup libcppc32 ppc32
+  * @brief ppc32 architecture dependent parts of libc
+  * @ingroup lc
+ * @{
+ */
+/** @file
+ */
+
+#include <libc.h>
+
+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 sysarg_t __ppc32_reg_r3 asm("3") = p1;
+	register sysarg_t __ppc32_reg_r4 asm("4") = p2;
+	register sysarg_t __ppc32_reg_r5 asm("5") = p3;
+	register sysarg_t __ppc32_reg_r6 asm("6") = p4;
+	register sysarg_t __ppc32_reg_r7 asm("7") = p5;
+	register sysarg_t __ppc32_reg_r8 asm("8") = p6;
+	register sysarg_t __ppc32_reg_r9 asm("9") = id;
+	
+	asm volatile (
+		"sc\n"
+		: "=r" (__ppc32_reg_r3)
+		: "r" (__ppc32_reg_r3),
+		  "r" (__ppc32_reg_r4),
+		  "r" (__ppc32_reg_r5),
+		  "r" (__ppc32_reg_r6),
+		  "r" (__ppc32_reg_r7),
+		  "r" (__ppc32_reg_r8),
+		  "r" (__ppc32_reg_r9)
+	);
+	
+	return __ppc32_reg_r3;
+}
+
+/** @}
+ */
Index: uspace/lib/c/arch/ppc32/src/thread_entry.s
===================================================================
--- uspace/lib/c/arch/ppc32/src/thread_entry.s	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/ppc32/src/thread_entry.s	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,46 @@
+#
+# 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.
+#
+
+.text
+	
+.globl __thread_entry
+
+## User-space thread entry point for all but the first threads.
+#
+#
+__thread_entry:
+	#
+	# Create the first stack frame.
+	#
+	li %r4, 0
+	stw %r4, 0(%r1)
+	stwu %r1, -16(%r1)
+
+	b __thread_main
+
+.end __thread_entry
Index: uspace/lib/c/arch/ppc32/src/tls.c
===================================================================
--- uspace/lib/c/arch/ppc32/src/tls.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/ppc32/src/tls.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,49 @@
+/*
+ * 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 libcppc32	
+ * @{
+ */
+/** @file
+ */
+
+#include <tls.h>
+#include <sys/types.h>
+
+tcb_t * __alloc_tls(void **data, size_t size)
+{
+	return tls_alloc_variant_1(data, size);
+}
+
+void __free_tls_arch(tcb_t *tcb, size_t size)
+{
+	tls_free_variant_1(tcb, size);
+}
+
+/** @}
+ */
Index: uspace/lib/c/arch/sparc64/Makefile.common
===================================================================
--- uspace/lib/c/arch/sparc64/Makefile.common	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/sparc64/Makefile.common	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,47 @@
+#
+# 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.
+#
+
+GCC_CFLAGS += -mcpu=ultrasparc -m64
+LFLAGS = -no-check-sections
+
+ENDIANESS = BE
+
+BFD_NAME = elf64-sparc
+BFD_ARCH = sparc
+
+ifeq ($(PROCESSOR),us)
+	DEFS += -DSUN4U
+endif
+
+ifeq ($(PROCESSOR),us3)
+	DEFS += -DSUN4U
+endif
+
+ifeq ($(PROCESSOR),sun4v)
+	DEFS += -DSUN4V
+endif
Index: uspace/lib/c/arch/sparc64/Makefile.inc
===================================================================
--- uspace/lib/c/arch/sparc64/Makefile.inc	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/sparc64/Makefile.inc	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,37 @@
+#
+# 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/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/sparc64/_link.ld.in
===================================================================
--- uspace/lib/c/arch/sparc64/_link.ld.in	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/sparc64/_link.ld.in	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,52 @@
+STARTUP(LIBC_PATH/arch/UARCH/src/entry.o)
+ENTRY(__entry)
+
+PHDRS {
+	text PT_LOAD FLAGS(5);
+	data PT_LOAD FLAGS(6);
+}
+
+SECTIONS {
+	. = 0x4000 + SIZEOF_HEADERS;
+
+	.init : {
+		*(.init);
+	} :text
+	.text : {
+		*(.text);
+		*(.rodata*);
+	} :text
+
+	. = . + 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
+
+	. = ALIGN(0x4000);
+	_heap = .;
+	
+	/DISCARD/ : {
+		*(*);
+	}
+
+}
Index: uspace/lib/c/arch/sparc64/include/atomic.h
===================================================================
--- uspace/lib/c/arch/sparc64/include/atomic.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/sparc64/include/atomic.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,108 @@
+/*
+ * 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 libcsparc64
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_sparc64_ATOMIC_H_
+#define LIBC_sparc64_ATOMIC_H_
+
+#define LIBC_ARCH_ATOMIC_H_
+
+#include <atomicdflt.h>
+#include <sys/types.h>
+
+/** Atomic add operation.
+ *
+ * Use atomic compare and swap operation to atomically add signed value.
+ *
+ * @param val Atomic variable.
+ * @param i   Signed value to be added.
+ *
+ * @return Value of the atomic variable as it existed before addition.
+ *
+ */
+static inline atomic_count_t atomic_add(atomic_t *val, atomic_count_t i)
+{
+	atomic_count_t a;
+	atomic_count_t b;
+	
+	do {
+		volatile uintptr_t ptr = (uintptr_t) &val->count;
+		
+		a = *((atomic_count_t *) ptr);
+		b = a + i;
+		
+		asm volatile (
+			"casx %0, %2, %1\n"
+			: "+m" (*((atomic_count_t *) ptr)),
+			  "+r" (b)
+			: "r" (a)
+		);
+	} while (a != b);
+	
+	return a;
+}
+
+static inline atomic_count_t atomic_preinc(atomic_t *val)
+{
+	return atomic_add(val, 1) + 1;
+}
+
+static inline atomic_count_t atomic_postinc(atomic_t *val)
+{
+	return atomic_add(val, 1);
+}
+
+static inline atomic_count_t atomic_predec(atomic_t *val)
+{
+	return atomic_add(val, -1) - 1;
+}
+
+static inline atomic_count_t atomic_postdec(atomic_t *val)
+{
+	return atomic_add(val, -1);
+}
+
+static inline void atomic_inc(atomic_t *val)
+{
+	(void) atomic_add(val, 1);
+}
+
+static inline void atomic_dec(atomic_t *val)
+{
+	(void) atomic_add(val, -1);
+}
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/sparc64/include/config.h
===================================================================
--- uspace/lib/c/arch/sparc64/include/config.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/sparc64/include/config.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,49 @@
+/*
+ * 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 libcsparc64
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_sparc64_CONFIG_H_
+#define LIBC_sparc64_CONFIG_H_
+
+#if defined (SUN4U)
+#define PAGE_WIDTH	14
+#elif defined(SUN4V)
+#define PAGE_WIDTH	13
+#endif
+
+#define PAGE_SIZE	(1 << PAGE_WIDTH)
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/sparc64/include/ddi.h
===================================================================
--- uspace/lib/c/arch/sparc64/include/ddi.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/sparc64/include/ddi.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,95 @@
+/*
+ * 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 libsparc64
+ */
+
+#ifndef LIBC_sparc64_DDI_H_
+#define LIBC_sparc64_DDI_H_
+
+#include <sys/types.h>
+#include <libarch/types.h>
+
+static inline void memory_barrier(void)
+{
+	asm volatile (
+		"membar #LoadLoad | #StoreStore\n"
+		::: "memory"
+	);
+}
+
+static inline void pio_write_8(ioport8_t *port, uint8_t v)
+{
+	*port = v;
+	memory_barrier();
+}
+
+static inline void pio_write_16(ioport16_t *port, uint16_t v)
+{
+	*port = v;
+	memory_barrier();
+}
+
+static inline void pio_write_32(ioport32_t *port, uint32_t v)
+{
+	*port = v;
+	memory_barrier();
+}
+
+static inline uint8_t pio_read_8(ioport8_t *port)
+{
+	uint8_t rv;
+
+	rv = *port;
+	memory_barrier();
+
+	return rv;
+}
+
+static inline uint16_t pio_read_16(ioport16_t *port)
+{
+	uint16_t rv;
+
+	rv = *port;
+	memory_barrier();
+
+	return rv;
+}
+
+static inline uint32_t pio_read_32(ioport32_t *port)
+{
+	uint32_t rv;
+
+	rv = *port;
+	memory_barrier();
+
+	return rv;
+}
+
+#endif
Index: uspace/lib/c/arch/sparc64/include/faddr.h
===================================================================
--- uspace/lib/c/arch/sparc64/include/faddr.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/sparc64/include/faddr.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,45 @@
+/*
+ * 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 libcsparc64
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_sparc64_FADDR_H_
+#define LIBC_sparc64_FADDR_H_
+
+#include <libarch/types.h>
+
+#define FADDR(fptr)		((uintptr_t) (fptr))
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/sparc64/include/fibril.h
===================================================================
--- uspace/lib/c/arch/sparc64/include/fibril.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/sparc64/include/fibril.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,82 @@
+/*
+ * 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 libcsparc64
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_sparc64_FIBRIL_H_
+#define LIBC_sparc64_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) - (STACK_BIAS + SP_DELTA); \
+		(c)->fp = -STACK_BIAS; \
+		(c)->tp = (uint64_t) ptls; \
+	} while (0)
+	
+/*
+ * Save only registers that must be preserved across
+ * function calls.
+ */
+typedef struct {
+	uintptr_t sp;		/* %o6 */
+	uintptr_t pc;		/* %o7 */
+	uint64_t i0;
+	uint64_t i1;
+	uint64_t i2;
+	uint64_t i3;
+	uint64_t i4;
+	uint64_t i5;
+	uintptr_t fp;		/* %i6 */
+	uintptr_t i7;
+	uint64_t l0;
+	uint64_t l1;
+	uint64_t l2;
+	uint64_t l3;
+	uint64_t l4;
+	uint64_t l5;
+	uint64_t l6;
+	uint64_t l7;
+	uint64_t tp;		/* %g7 */
+} context_t;
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/sparc64/include/inttypes.h
===================================================================
--- uspace/lib/c/arch/sparc64/include/inttypes.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/sparc64/include/inttypes.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,76 @@
+/*
+ * 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 libcsparc64
+ * @{
+ */
+/** @file Macros for format specifiers.
+ *
+ * Macros for formatting stdint types as specified in section
+ * 7.8.1 Macros for format specifiers of the C99 draft specification
+ * (ISO/IEC 9899:201x). Only some macros from the specification are
+ * implemented.
+ */
+
+#ifndef LIBC_sparc64_INTTYPES_H_
+#define LIBC_sparc64_INTTYPES_H_
+
+#define PRId8 "d"
+#define PRId16 "d"
+#define PRId32 "d"
+#define PRId64 "lld"
+#define PRIdPTR "lld"
+
+#define PRIo8 "o"
+#define PRIo16 "o"
+#define PRIo32 "o"
+#define PRIo64 "llo"
+#define PRIoPTR "llo"
+
+#define PRIu8 "u"
+#define PRIu16 "u"
+#define PRIu32 "u"
+#define PRIu64 "llu"
+#define PRIuPTR "llu"
+
+#define PRIx8 "x"
+#define PRIx16 "x"
+#define PRIx32 "x"
+#define PRIx64 "llx"
+#define PRIxPTR "llx"
+
+#define PRIX8 "X"
+#define PRIX16 "X"
+#define PRIX32 "X"
+#define PRIX64 "llX"
+#define PRIXPTR "llX"
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/sparc64/include/istate.h
===================================================================
--- uspace/lib/c/arch/sparc64/include/istate.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/sparc64/include/istate.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,63 @@
+/*
+ * 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 libcsparc64
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_sparc64_ISTATE_H_
+#define LIBC_sparc64_ISTATE_H_
+
+#include <sys/types.h>
+
+/** Interrupt context.
+ *
+ * This is a copy of the kernel definition with which it must be kept in sync.
+ */
+typedef struct istate {
+	/* TODO */
+} istate_t;
+
+static inline uintptr_t istate_get_pc(istate_t *istate)
+{
+	/* TODO */
+	return 0;
+}
+
+static inline uintptr_t istate_get_fp(istate_t *istate)
+{
+	/* TODO */
+	return 0;
+}
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/sparc64/include/limits.h
===================================================================
--- uspace/lib/c/arch/sparc64/include/limits.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/sparc64/include/limits.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,51 @@
+/*
+ * 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 libcsparc64
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_sparc64_LIMITS_H_
+#define LIBC_sparc64_LIMITS_H_
+
+#define LONG_MIN MIN_INT64
+#define LONG_MAX MAX_INT64
+#define ULONG_MIN MIN_UINT64
+#define ULONG_MAX MAX_UINT64
+
+#define SIZE_MIN MIN_UINT64
+#define SIZE_MAX MAX_UINT64
+#define SSIZE_MIN MIN_INT64
+#define SSIZE_MAX MAX_INT64
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/sparc64/include/stack.h
===================================================================
--- uspace/lib/c/arch/sparc64/include/stack.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/sparc64/include/stack.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,61 @@
+/*
+ * 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 libcsparc64
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_sparc64_STACK_H_
+#define LIBC_sparc64_STACK_H_
+
+#define STACK_ITEM_SIZE			8
+
+/** According to SPARC Compliance Definition, every stack frame is 16-byte aligned. */
+#define STACK_ALIGNMENT			16
+
+/**
+ * 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)
+
+/**
+ * By convention, the actual top of the stack is %sp + STACK_BIAS.
+ */
+#define STACK_BIAS            2047
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/sparc64/include/stackarg.h
===================================================================
--- uspace/lib/c/arch/sparc64/include/stackarg.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/sparc64/include/stackarg.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,41 @@
+/*
+ * 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 libcsparc64	
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_sparc64_STACKARG_H_
+#define LIBC_sparc64_STACKARG_H_
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/sparc64/include/syscall.h
===================================================================
--- uspace/lib/c/arch/sparc64/include/syscall.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/sparc64/include/syscall.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,74 @@
+/*
+ * 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 libcsparc64
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_sparc64_SYSCALL_H_
+#define LIBC_sparc64_SYSCALL_H_
+
+#include <sys/types.h>
+#include <kernel/syscall/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 uint64_t a1 asm("o0") = p1;
+	register uint64_t a2 asm("o1") = p2;
+	register uint64_t a3 asm("o2") = p3;
+	register uint64_t a4 asm("o3") = p4;
+	register uint64_t a5 asm("o4") = p5;
+	register uint64_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/sparc64/include/thread.h
===================================================================
--- uspace/lib/c/arch/sparc64/include/thread.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/sparc64/include/thread.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,40 @@
+/*
+ * 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 libcsparc64
+ * @{
+ */
+
+#ifndef LIBC_sparc64_THREAD_H_
+#define LIBC_sparc64_THREAD_H_
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/sparc64/include/tls.h
===================================================================
--- uspace/lib/c/arch/sparc64/include/tls.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/sparc64/include/tls.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,65 @@
+/*
+ * 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 libcsparc64
+ * @{
+ */
+/**
+ * @file
+ * @brief	sparc64 TLS functions.
+ */
+
+#ifndef LIBC_sparc64_TLS_H_
+#define LIBC_sparc64_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/sparc64/include/types.h
===================================================================
--- uspace/lib/c/arch/sparc64/include/types.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/sparc64/include/types.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,62 @@
+/*
+ * 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 libcsparc64
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_sparc64_TYPES_H_
+#define LIBC_sparc64_TYPES_H_
+
+#define __64_BITS__
+
+typedef unsigned long sysarg_t;
+
+typedef signed char int8_t;
+typedef short int int16_t;
+typedef int int32_t;
+typedef long int int64_t;
+
+typedef unsigned char uint8_t;
+typedef unsigned short int uint16_t;
+typedef unsigned int uint32_t;
+typedef unsigned long int uint64_t;
+
+typedef int64_t ssize_t;
+typedef uint64_t size_t;
+
+typedef uint64_t uintptr_t;
+typedef uint64_t atomic_count_t;
+typedef int64_t atomic_signed_t;
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/arch/sparc64/src/entry.s
===================================================================
--- uspace/lib/c/arch/sparc64/src/entry.s	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/sparc64/src/entry.s	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,55 @@
+#
+# 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.
+#
+
+.section .init, "ax"
+
+.org 0
+
+.globl __entry
+
+## User-space task entry point
+#
+# %o0 contains uarg
+# %o1 contains pcb_ptr
+#
+__entry:
+	#
+	# Create the first stack frame.
+	#
+	save %sp, -176, %sp
+	flushw
+	add %g0, -0x7ff, %fp
+
+	# Pass pcb_ptr as the first argument to __main()
+	mov %i1, %o0
+	sethi %hi(_gp), %l7
+	call __main
+	or %l7, %lo(_gp), %l7
+
+	call __exit
+	nop
Index: uspace/lib/c/arch/sparc64/src/fibril.S
===================================================================
--- uspace/lib/c/arch/sparc64/src/fibril.S	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/sparc64/src/fibril.S	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,56 @@
+#
+# 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 <kernel/arch/context_offset.h>
+
+.text   
+
+.global context_save
+.global context_restore
+
+context_save:
+	#
+	# We rely on the kernel to flush our active register windows to memory
+	# should a thread switch occur.
+	#
+	CONTEXT_SAVE_ARCH_CORE %o0
+	retl
+	mov 1, %o0		! context_save_arch returns 1
+
+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.
+	#
+	flushw
+	
+	CONTEXT_RESTORE_ARCH_CORE %o0
+	retl
+	xor %o0, %o0, %o0	! context_restore_arch returns 0
Index: uspace/lib/c/arch/sparc64/src/stacktrace.c
===================================================================
--- uspace/lib/c/arch/sparc64/src/stacktrace.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/sparc64/src/stacktrace.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,69 @@
+/*
+ * Copyright (c) 2010 Jakub Jermar
+ * 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 sparc64
+ * @{
+ */
+/** @file
+ */
+
+#include <sys/types.h>
+#include <bool.h>
+#include <libarch/stack.h>
+#include <errno.h>
+
+#include <stacktrace.h>
+
+#define FRAME_OFFSET_FP_PREV	(14 * 8)
+#define FRAME_OFFSET_RA		(15 * 8)
+
+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;
+
+	rc = (*st->read_uintptr)(st->op_arg, fp + FRAME_OFFSET_FP_PREV, &bprev);
+	if (rc == EOK)
+		*prev = bprev + STACK_BIAS;
+	return rc;
+}
+
+int stacktrace_ra_get(stacktrace_t *st, uintptr_t fp, uintptr_t *ra)
+{
+	return (*st->read_uintptr)(st->op_arg, fp + FRAME_OFFSET_RA, ra);
+}
+
+/** @}
+ */
Index: uspace/lib/c/arch/sparc64/src/stacktrace_asm.S
===================================================================
--- uspace/lib/c/arch/sparc64/src/stacktrace_asm.S	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/sparc64/src/stacktrace_asm.S	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,51 @@
+#
+# 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 <libarch/stack.h>
+
+.text
+
+.global stacktrace_prepare
+.global stacktrace_fp_get
+.global stacktrace_pc_get
+
+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.
+	flushw
+	ret
+	restore
+
+stacktrace_fp_get:
+	# Add the stack bias to %sp to get the actual address.
+	retl
+	add %sp, STACK_BIAS, %o0
+
+stacktrace_pc_get:
+	retl
+	mov %o7, %o0
Index: uspace/lib/c/arch/sparc64/src/thread_entry.s
===================================================================
--- uspace/lib/c/arch/sparc64/src/thread_entry.s	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/sparc64/src/thread_entry.s	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,51 @@
+#
+# 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.
+#
+
+.text
+	
+.globl __thread_entry
+
+## User-space thread entry point for all but the first threads.
+#
+#
+__thread_entry:
+	#
+	# Create the first stack frame.
+	#
+
+	#save %sp, -176, %sp
+	#flushw
+	#add %g0, -0x7ff, %fp
+
+	sethi %hi(_gp), %l7
+	call __thread_main		! %o0 contains address of uarg
+	or %l7, %lo(_gp), %l7
+	
+	! not reached
+	
+.end __thread_entry
Index: uspace/lib/c/arch/sparc64/src/tls.c
===================================================================
--- uspace/lib/c/arch/sparc64/src/tls.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/arch/sparc64/src/tls.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,51 @@
+/*
+ * 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 libcsparc64 sparc64
+ * @ingroup lc
+ * @{
+ */
+/** @file
+ *
+ */
+
+#include <tls.h>
+#include <sys/types.h>
+
+tcb_t * __alloc_tls(void **data, size_t size)
+{
+	return tls_alloc_variant_2(data, size);
+}
+
+void __free_tls_arch(tcb_t *tcb, size_t size)
+{
+	tls_free_variant_2(tcb, size);
+}
+
+/** @}
+ */
Index: uspace/lib/c/generic/adt/hash_table.c
===================================================================
--- uspace/lib/c/generic/adt/hash_table.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/generic/adt/hash_table.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,216 @@
+/*
+ * Copyright (c) 2008 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 libc
+ * @{
+ */
+/** @file
+ */
+
+/*
+ * This is an implementation of generic chained hash table.
+ */
+
+#include <adt/hash_table.h>
+#include <adt/list.h>
+#include <unistd.h>
+#include <malloc.h>
+#include <assert.h>
+#include <stdio.h>
+#include <str.h>
+
+/** Create chained hash table.
+ *
+ * @param h		Hash table structure. Will be initialized by this call.
+ * @param m		Number of hash table buckets.
+ * @param max_keys	Maximal number of keys needed to identify an item.
+ * @param op		Hash table operations structure.
+ * @return		True on success
+ */
+int hash_table_create(hash_table_t *h, hash_count_t m, hash_count_t max_keys,
+    hash_table_operations_t *op)
+{
+	hash_count_t i;
+
+	assert(h);
+	assert(op && op->hash && op->compare);
+	assert(max_keys > 0);
+	
+	h->entry = malloc(m * sizeof(link_t));
+	if (!h->entry) {
+		printf("cannot allocate memory for hash table\n");
+		return false;
+	}
+	memset((void *) h->entry, 0,  m * sizeof(link_t));
+	
+	for (i = 0; i < m; i++)
+		list_initialize(&h->entry[i]);
+	
+	h->entries = m;
+	h->max_keys = max_keys;
+	h->op = op;
+	return true;
+}
+
+/** Destroy a hash table instance.
+ *
+ * @param h		Hash table to be destroyed.
+ */
+void hash_table_destroy(hash_table_t *h)
+{
+	assert(h);
+	assert(h->entry);
+	free(h->entry);
+}
+
+/** Insert item into a hash table.
+ *
+ * @param h		Hash table.
+ * @param key		Array of all keys necessary to compute hash index.
+ * @param item		Item to be inserted into the hash table.
+ */
+void hash_table_insert(hash_table_t *h, unsigned long key[], link_t *item)
+{
+	hash_index_t chain;
+
+	assert(item);
+	assert(h && h->op && h->op->hash && h->op->compare);
+
+	chain = h->op->hash(key);
+	assert(chain < h->entries);
+	
+	list_append(item, &h->entry[chain]);
+}
+
+/** Search hash table for an item matching keys.
+ *
+ * @param h		Hash table.
+ * @param key		Array of all keys needed to compute hash index.
+ *
+ * @return		Matching item on success, NULL if there is no such item.
+ */
+link_t *hash_table_find(hash_table_t *h, unsigned long key[])
+{
+	link_t *cur;
+	hash_index_t chain;
+
+	assert(h && h->op && h->op->hash && h->op->compare);
+
+	chain = h->op->hash(key);
+	assert(chain < h->entries);
+	
+	for (cur = h->entry[chain].next; cur != &h->entry[chain];
+	    cur = cur->next) {
+		if (h->op->compare(key, h->max_keys, cur)) {
+			/*
+			 * The entry is there.
+			 */
+			return cur;
+		}
+	}
+	
+	return NULL;
+}
+
+/** Remove all matching items from hash table.
+ *
+ * For each removed item, h->remove_callback() is called.
+ *
+ * @param h		Hash table.
+ * @param key		Array of keys that will be compared against items of
+ * 			the hash table.
+ * @param keys		Number of keys in the 'key' array.
+ */
+void hash_table_remove(hash_table_t *h, unsigned long key[], hash_count_t keys)
+{
+	hash_index_t chain;
+	link_t *cur;
+
+	assert(h && h->op && h->op->hash && h->op->compare &&
+	    h->op->remove_callback);
+	assert(keys <= h->max_keys);
+	
+	if (keys == h->max_keys) {
+
+		/*
+		 * All keys are known, hash_table_find() can be used to find the
+		 * entry.
+		 */
+	
+		cur = hash_table_find(h, key);
+		if (cur) {
+			list_remove(cur);
+			h->op->remove_callback(cur);
+		}
+		return;
+	}
+	
+	/*
+	 * Fewer keys were passed.
+	 * Any partially matching entries are to be removed.
+	 */
+	for (chain = 0; chain < h->entries; chain++) {
+		for (cur = h->entry[chain].next; cur != &h->entry[chain];
+		    cur = cur->next) {
+			if (h->op->compare(key, keys, cur)) {
+				link_t *hlp;
+				
+				hlp = cur;
+				cur = cur->prev;
+				
+				list_remove(hlp);
+				h->op->remove_callback(hlp);
+				
+				continue;
+			}
+		}
+	}
+}
+
+/** Apply fucntion to all items in hash table.
+ *
+ * @param h		Hash table.
+ * @param f		Function to be applied.
+ * @param arg		Argument to be passed to the function.
+ */
+void
+hash_table_apply(hash_table_t *h, void (*f)(link_t *, void *), void *arg)
+{
+	hash_index_t bucket;
+	link_t *cur;
+
+	for (bucket = 0; bucket < h->entries; bucket++) {
+		for (cur = h->entry[bucket].next; cur != &h->entry[bucket];
+		    cur = cur->next) {
+			f(cur, arg);
+		}
+	}
+}
+
+/** @}
+ */
Index: uspace/lib/c/generic/adt/list.c
===================================================================
--- uspace/lib/c/generic/adt/list.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/generic/adt/list.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,112 @@
+/*
+ * Copyright (c) 2004 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 libc
+ * @{
+ */
+/** @file
+ */
+
+#include <adt/list.h>
+
+
+/** Check for membership
+ *
+ * Check whether link is contained in the list head.
+ * The membership is defined as pointer equivalence.
+ *
+ * @param link Item to look for.
+ * @param head List to look in.
+ *
+ * @return true if link is contained in head, false otherwise.
+ *
+ */
+int list_member(const link_t *link, const link_t *head)
+{
+	int found = 0;
+	link_t *hlp = head->next;
+	
+	while (hlp != head) {
+		if (hlp == link) {
+			found = 1;
+			break;
+		}
+		hlp = hlp->next;
+	}
+	
+	return found;
+}
+
+
+/** Concatenate two lists
+ *
+ * Concatenate lists head1 and head2, producing a single
+ * list head1 containing items from both (in head1, head2
+ * order) and empty list head2.
+ *
+ * @param head1 First list and concatenated output
+ * @param head2 Second list and empty output.
+ *
+ */
+void list_concat(link_t *head1, link_t *head2)
+{
+	if (list_empty(head2))
+		return;
+	
+	head2->next->prev = head1->prev;
+	head2->prev->next = head1;
+	head1->prev->next = head2->next;
+	head1->prev = head2->prev;
+	list_initialize(head2);
+}
+
+
+/** Count list items
+ *
+ * Return the number of items in the list.
+ *
+ * @param link List to count.
+ *
+ * @return Number of items in the list.
+ *
+ */
+unsigned int list_count(const link_t *link)
+{
+	unsigned int count = 0;
+	link_t *hlp = link->next;
+	
+	while (hlp != link) {
+		count++;
+		hlp = hlp->next;
+	}
+	
+	return count;
+}
+
+/** @}
+ */
Index: uspace/lib/c/generic/as.c
===================================================================
--- uspace/lib/c/generic/as.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/generic/as.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,131 @@
+/*
+ * 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 libc
+ * @{
+ */
+/** @file
+ */
+
+#include <as.h>
+#include <libc.h>
+#include <unistd.h>
+#include <align.h>
+#include <sys/types.h>
+#include <bitops.h>
+#include <malloc.h>
+
+/** Last position allocated by as_get_mappable_page */
+static uintptr_t last_allocated = 0;
+
+/** Create address space area.
+ *
+ * @param address Virtual address where to place new address space area.
+ * @param size    Size of the area.
+ * @param flags   Flags describing type of the area.
+ *
+ * @return address on success, (void *) -1 otherwise.
+ *
+ */
+void *as_area_create(void *address, size_t size, int flags)
+{
+	return (void *) __SYSCALL3(SYS_AS_AREA_CREATE, (sysarg_t) address,
+	    (sysarg_t) size, (sysarg_t) flags);
+}
+
+/** Resize address space area.
+ *
+ * @param address Virtual address pointing into already existing address space
+ *                area.
+ * @param size    New requested size of the area.
+ * @param flags   Currently unused.
+ *
+ * @return zero on success or a code from @ref errno.h on failure.
+ *
+ */
+int as_area_resize(void *address, size_t size, int flags)
+{
+	return __SYSCALL3(SYS_AS_AREA_RESIZE, (sysarg_t) address,
+	    (sysarg_t) size, (sysarg_t) flags);
+}
+
+/** Destroy address space area.
+ *
+ * @param address Virtual address pointing into the address space area being
+ *                destroyed.
+ *
+ * @return zero on success or a code from @ref errno.h on failure.
+ *
+ */
+int as_area_destroy(void *address)
+{
+	return __SYSCALL1(SYS_AS_AREA_DESTROY, (sysarg_t) address);
+}
+
+/** Change address-space area flags.
+ *
+ * @param address Virtual address pointing into the address space area being
+ *                modified.
+ * @param flags   New flags describing type of the area.
+ *
+ * @return zero on success or a code from @ref errno.h on failure.
+ *
+ */
+int as_area_change_flags(void *address, int flags)
+{
+	return __SYSCALL2(SYS_AS_AREA_CHANGE_FLAGS, (sysarg_t) address,
+	    (sysarg_t) flags);
+}
+
+/** Return pointer to some unmapped area, where fits new as_area
+ *
+ * @param size Requested size of the allocation.
+ *
+ * @return pointer to the beginning
+ *
+ */
+void *as_get_mappable_page(size_t size)
+{
+	if (size == 0)
+		return NULL;
+	
+	size_t sz = 1 << (fnzb(size - 1) + 1);
+	if (last_allocated == 0)
+		last_allocated = get_max_heap_addr();
+	
+	/*
+	 * Make sure we allocate from naturally aligned address.
+	 */
+	uintptr_t res = ALIGN_UP(last_allocated, sz);
+	last_allocated = res + ALIGN_UP(size, PAGE_SIZE);
+	
+	return ((void *) res);
+}
+
+/** @}
+ */
Index: uspace/lib/c/generic/async.c
===================================================================
--- uspace/lib/c/generic/async.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/generic/async.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,1564 @@
+/*
+ * 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 libc
+ * @{
+ */
+/** @file
+ */
+
+/**
+ * Asynchronous library
+ *
+ * The aim of this library is to provide a facility for writing programs which
+ * utilize the asynchronous nature of HelenOS IPC, yet using a normal way of
+ * programming.
+ *
+ * You should be able to write very simple multithreaded programs, the async
+ * framework will automatically take care of most synchronization problems.
+ *
+ * Default semantics:
+ * - async_send_*(): Send asynchronously. If the kernel refuses to send
+ *                   more messages, [ try to get responses from kernel, if
+ *                   nothing found, might try synchronous ]
+ *
+ * Example of use (pseudo C):
+ *
+ * 1) Multithreaded client application
+ *
+ *   fibril_create(fibril1, ...);
+ *   fibril_create(fibril2, ...);
+ *   ...
+ *
+ *   int fibril1(void *arg)
+ *   {
+ *     conn = ipc_connect_me_to();
+ *     c1 = async_send(conn);
+ *     c2 = async_send(conn);
+ *     async_wait_for(c1);
+ *     async_wait_for(c2);
+ *     ...
+ *   }
+ *
+ *
+ * 2) Multithreaded server application
+ *
+ *   main()
+ *   {
+ *     async_manager();
+ *   }
+ *
+ *   my_client_connection(icallid, *icall)
+ *   {
+ *     if (want_refuse) {
+ *       ipc_answer_0(icallid, ELIMIT);
+ *       return;
+ *     }
+ *     ipc_answer_0(icallid, EOK);
+ *
+ *     callid = async_get_call(&call);
+ *     somehow_handle_the_call(callid, call);
+ *     ipc_answer_2(callid, 1, 2, 3);
+ *
+ *     callid = async_get_call(&call);
+ *     ...
+ *   }
+ *
+ */
+
+#include <futex.h>
+#include <async.h>
+#include <async_priv.h>
+#include <fibril.h>
+#include <stdio.h>
+#include <adt/hash_table.h>
+#include <adt/list.h>
+#include <ipc/ipc.h>
+#include <assert.h>
+#include <errno.h>
+#include <sys/time.h>
+#include <arch/barrier.h>
+#include <bool.h>
+
+atomic_t async_futex = FUTEX_INITIALIZER;
+
+/** Number of threads waiting for IPC in the kernel. */
+atomic_t threads_in_ipc_wait = { 0 };
+
+typedef struct {
+	awaiter_t wdata;
+	
+	/** If reply was received. */
+	bool done;
+	
+	/** Pointer to where the answer data is stored. */
+	ipc_call_t *dataptr;
+	
+	ipcarg_t retval;
+} amsg_t;
+
+/**
+ * Structures of this type are used to group information about a call and a
+ * message queue link.
+ */
+typedef struct {
+	link_t link;
+	ipc_callid_t callid;
+	ipc_call_t call;
+} msg_t;
+
+typedef struct {
+	awaiter_t wdata;
+	
+	/** Hash table link. */
+	link_t link;
+	
+	/** Incoming phone hash. */
+	ipcarg_t in_phone_hash;
+	
+	/** Messages that should be delivered to this fibril. */
+	link_t msg_queue;
+	
+	/** Identification of the opening call. */
+	ipc_callid_t callid;
+	/** Call data of the opening call. */
+	ipc_call_t call;
+	
+	/** Identification of the closing call. */
+	ipc_callid_t close_callid;
+	
+	/** Fibril function that will be used to handle the connection. */
+	void (*cfibril)(ipc_callid_t, ipc_call_t *);
+} connection_t;
+
+/** Identifier of the incoming connection handled by the current fibril. */
+fibril_local connection_t *FIBRIL_connection;
+
+static void default_client_connection(ipc_callid_t callid, ipc_call_t *call);
+static void default_interrupt_received(ipc_callid_t callid, ipc_call_t *call);
+
+/**
+ * Pointer to a fibril function that will be used to handle connections.
+ */
+static async_client_conn_t client_connection = default_client_connection;
+
+/**
+ * Pointer to a fibril function that will be used to handle interrupt
+ * notifications.
+ */
+static async_client_conn_t interrupt_received = default_interrupt_received;
+
+static hash_table_t conn_hash_table;
+static LIST_INITIALIZE(timeout_list);
+
+#define CONN_HASH_TABLE_CHAINS  32
+
+/** Compute hash into the connection hash table based on the source phone hash.
+ *
+ * @param key Pointer to source phone hash.
+ *
+ * @return Index into the connection hash table.
+ *
+ */
+static hash_index_t conn_hash(unsigned long *key)
+{
+	assert(key);
+	return (((*key) >> 4) % CONN_HASH_TABLE_CHAINS);
+}
+
+/** Compare hash table item with a key.
+ *
+ * @param key  Array containing the source phone hash as the only item.
+ * @param keys Expected 1 but ignored.
+ * @param item Connection hash table item.
+ *
+ * @return True on match, false otherwise.
+ *
+ */
+static int conn_compare(unsigned long key[], hash_count_t keys, link_t *item)
+{
+	connection_t *hs = hash_table_get_instance(item, connection_t, link);
+	return (key[0] == hs->in_phone_hash);
+}
+
+/** Connection hash table removal callback function.
+ *
+ * This function is called whenever a connection is removed from the connection
+ * hash table.
+ *
+ * @param item Connection hash table item being removed.
+ *
+ */
+static void conn_remove(link_t *item)
+{
+	free(hash_table_get_instance(item, connection_t, link));
+}
+
+
+/** Operations for the connection hash table. */
+static hash_table_operations_t conn_hash_table_ops = {
+	.hash = conn_hash,
+	.compare = conn_compare,
+	.remove_callback = conn_remove
+};
+
+/** Sort in current fibril's timeout request.
+ *
+ * @param wd Wait data of the current fibril.
+ *
+ */
+void async_insert_timeout(awaiter_t *wd)
+{
+	wd->to_event.occurred = false;
+	wd->to_event.inlist = true;
+	
+	link_t *tmp = timeout_list.next;
+	while (tmp != &timeout_list) {
+		awaiter_t *cur;
+		
+		cur = list_get_instance(tmp, awaiter_t, to_event.link);
+		if (tv_gteq(&cur->to_event.expires, &wd->to_event.expires))
+			break;
+		tmp = tmp->next;
+	}
+	
+	list_append(&wd->to_event.link, tmp);
+}
+
+/** Try to route a call to an appropriate connection fibril.
+ *
+ * If the proper connection fibril is found, a message with the call is added to
+ * its message queue. If the fibril was not active, it is activated and all
+ * timeouts are unregistered.
+ *
+ * @param callid Hash of the incoming call.
+ * @param call   Data of the incoming call.
+ *
+ * @return False if the call doesn't match any connection.
+ *         True if the call was passed to the respective connection fibril.
+ *
+ */
+static bool route_call(ipc_callid_t callid, ipc_call_t *call)
+{
+	futex_down(&async_futex);
+	
+	unsigned long key = call->in_phone_hash;
+	link_t *hlp = hash_table_find(&conn_hash_table, &key);
+	
+	if (!hlp) {
+		futex_up(&async_futex);
+		return false;
+	}
+	
+	connection_t *conn = hash_table_get_instance(hlp, connection_t, link);
+	
+	msg_t *msg = malloc(sizeof(*msg));
+	if (!msg) {
+		futex_up(&async_futex);
+		return false;
+	}
+	
+	msg->callid = callid;
+	msg->call = *call;
+	list_append(&msg->link, &conn->msg_queue);
+	
+	if (IPC_GET_METHOD(*call) == IPC_M_PHONE_HUNGUP)
+		conn->close_callid = callid;
+	
+	/* If the connection fibril is waiting for an event, activate it */
+	if (!conn->wdata.active) {
+		
+		/* If in timeout list, remove it */
+		if (conn->wdata.to_event.inlist) {
+			conn->wdata.to_event.inlist = false;
+			list_remove(&conn->wdata.to_event.link);
+		}
+		
+		conn->wdata.active = true;
+		fibril_add_ready(conn->wdata.fid);
+	}
+	
+	futex_up(&async_futex);
+	return true;
+}
+
+/** Notification fibril.
+ *
+ * When a notification arrives, a fibril with this implementing function is
+ * created. It calls interrupt_received() and does the final cleanup.
+ *
+ * @param arg Message structure pointer.
+ *
+ * @return Always zero.
+ *
+ */
+static int notification_fibril(void *arg)
+{
+	msg_t *msg = (msg_t *) arg;
+	interrupt_received(msg->callid, &msg->call);
+	
+	free(msg);
+	return 0;
+}
+
+/** Process interrupt notification.
+ *
+ * A new fibril is created which would process the notification.
+ *
+ * @param callid Hash of the incoming call.
+ * @param call   Data of the incoming call.
+ *
+ * @return False if an error occured.
+ *         True if the call was passed to the notification fibril.
+ *
+ */
+static bool process_notification(ipc_callid_t callid, ipc_call_t *call)
+{
+	futex_down(&async_futex);
+	
+	msg_t *msg = malloc(sizeof(*msg));
+	if (!msg) {
+		futex_up(&async_futex);
+		return false;
+	}
+	
+	msg->callid = callid;
+	msg->call = *call;
+	
+	fid_t fid = fibril_create(notification_fibril, msg);
+	fibril_add_ready(fid);
+	
+	futex_up(&async_futex);
+	return true;
+}
+
+/** Return new incoming message for the current (fibril-local) connection.
+ *
+ * @param call  Storage where the incoming call data will be stored.
+ * @param usecs Timeout in microseconds. Zero denotes no timeout.
+ *
+ * @return If no timeout was specified, then a hash of the
+ *         incoming call is returned. If a timeout is specified,
+ *         then a hash of the incoming call is returned unless
+ *         the timeout expires prior to receiving a message. In
+ *         that case zero is returned.
+ *
+ */
+ipc_callid_t async_get_call_timeout(ipc_call_t *call, suseconds_t usecs)
+{
+	assert(FIBRIL_connection);
+	
+	/* Why doing this?
+	 * GCC 4.1.0 coughs on FIBRIL_connection-> dereference.
+	 * GCC 4.1.1 happilly puts the rdhwr instruction in delay slot.
+	 *           I would never expect to find so many errors in
+	 *           a compiler.
+	 */
+	connection_t *conn = FIBRIL_connection;
+	
+	futex_down(&async_futex);
+	
+	if (usecs) {
+		gettimeofday(&conn->wdata.to_event.expires, NULL);
+		tv_add(&conn->wdata.to_event.expires, usecs);
+	} else
+		conn->wdata.to_event.inlist = false;
+	
+	/* If nothing in queue, wait until something arrives */
+	while (list_empty(&conn->msg_queue)) {
+		if (conn->close_callid) {
+			/*
+			 * Handle the case when the connection was already
+			 * closed by the client but the server did not notice
+			 * the first IPC_M_PHONE_HUNGUP call and continues to
+			 * call async_get_call_timeout(). Repeat
+			 * IPC_M_PHONE_HUNGUP until the caller notices. 
+			 */
+			memset(call, 0, sizeof(ipc_call_t));
+			IPC_SET_METHOD(*call, IPC_M_PHONE_HUNGUP);
+			futex_up(&async_futex);
+			return conn->close_callid;
+		}
+
+		if (usecs)
+			async_insert_timeout(&conn->wdata);
+		
+		conn->wdata.active = false;
+		
+		/*
+		 * Note: the current fibril will be rescheduled either due to a
+		 * timeout or due to an arriving message destined to it. In the
+		 * former case, handle_expired_timeouts() and, in the latter
+		 * case, route_call() will perform the wakeup.
+		 */
+		fibril_switch(FIBRIL_TO_MANAGER);
+		
+		/*
+		 * Futex is up after getting back from async_manager.
+		 * Get it again.
+		 */
+		futex_down(&async_futex);
+		if ((usecs) && (conn->wdata.to_event.occurred)
+		    && (list_empty(&conn->msg_queue))) {
+			/* If we timed out -> exit */
+			futex_up(&async_futex);
+			return 0;
+		}
+	}
+	
+	msg_t *msg = list_get_instance(conn->msg_queue.next, msg_t, link);
+	list_remove(&msg->link);
+	
+	ipc_callid_t callid = msg->callid;
+	*call = msg->call;
+	free(msg);
+	
+	futex_up(&async_futex);
+	return callid;
+}
+
+/** Default fibril function that gets called to handle new connection.
+ *
+ * This function is defined as a weak symbol - to be redefined in user code.
+ *
+ * @param callid Hash of the incoming call.
+ * @param call   Data of the incoming call.
+ *
+ */
+static void default_client_connection(ipc_callid_t callid, ipc_call_t *call)
+{
+	ipc_answer_0(callid, ENOENT);
+}
+
+/** Default fibril function that gets called to handle interrupt notifications.
+ *
+ * This function is defined as a weak symbol - to be redefined in user code.
+ *
+ * @param callid Hash of the incoming call.
+ * @param call   Data of the incoming call.
+ *
+ */
+static void default_interrupt_received(ipc_callid_t callid, ipc_call_t *call)
+{
+}
+
+/** Wrapper for client connection fibril.
+ *
+ * When a new connection arrives, a fibril with this implementing function is
+ * created. It calls client_connection() and does the final cleanup.
+ *
+ * @param arg Connection structure pointer.
+ *
+ * @return Always zero.
+ *
+ */
+static int connection_fibril(void *arg)
+{
+	/*
+	 * Setup fibril-local connection pointer and call client_connection().
+	 *
+	 */
+	FIBRIL_connection = (connection_t *) arg;
+	FIBRIL_connection->cfibril(FIBRIL_connection->callid,
+	    &FIBRIL_connection->call);
+	
+	/* Remove myself from the connection hash table */
+	futex_down(&async_futex);
+	unsigned long key = FIBRIL_connection->in_phone_hash;
+	hash_table_remove(&conn_hash_table, &key, 1);
+	futex_up(&async_futex);
+	
+	/* Answer all remaining messages with EHANGUP */
+	while (!list_empty(&FIBRIL_connection->msg_queue)) {
+		msg_t *msg;
+		
+		msg = list_get_instance(FIBRIL_connection->msg_queue.next,
+		    msg_t, link);
+		list_remove(&msg->link);
+		ipc_answer_0(msg->callid, EHANGUP);
+		free(msg);
+	}
+	
+	if (FIBRIL_connection->close_callid)
+		ipc_answer_0(FIBRIL_connection->close_callid, EOK);
+	
+	return 0;
+}
+
+/** Create a new fibril for a new connection.
+ *
+ * Create new fibril for connection, fill in connection structures and inserts
+ * it into the hash table, so that later we can easily do routing of messages to
+ * particular fibrils.
+ *
+ * @param in_phone_hash Identification of the incoming connection.
+ * @param callid        Hash of the opening IPC_M_CONNECT_ME_TO call.
+ *                      If callid is zero, the connection was opened by
+ *                      accepting the IPC_M_CONNECT_TO_ME call and this function
+ *                      is called directly by the server.
+ * @param call          Call data of the opening call.
+ * @param cfibril       Fibril function that should be called upon opening the
+ *                      connection.
+ *
+ * @return New fibril id or NULL on failure.
+ *
+ */
+fid_t async_new_connection(ipcarg_t in_phone_hash, ipc_callid_t callid,
+    ipc_call_t *call, void (*cfibril)(ipc_callid_t, ipc_call_t *))
+{
+	connection_t *conn = malloc(sizeof(*conn));
+	if (!conn) {
+		if (callid)
+			ipc_answer_0(callid, ENOMEM);
+		return NULL;
+	}
+	
+	conn->in_phone_hash = in_phone_hash;
+	list_initialize(&conn->msg_queue);
+	conn->callid = callid;
+	conn->close_callid = 0;
+	
+	if (call)
+		conn->call = *call;
+	
+	/* We will activate the fibril ASAP */
+	conn->wdata.active = true;
+	conn->cfibril = cfibril;
+	conn->wdata.fid = fibril_create(connection_fibril, conn);
+	
+	if (!conn->wdata.fid) {
+		free(conn);
+		if (callid)
+			ipc_answer_0(callid, ENOMEM);
+		return NULL;
+	}
+	
+	/* Add connection to the connection hash table */
+	unsigned long key = conn->in_phone_hash;
+	
+	futex_down(&async_futex);
+	hash_table_insert(&conn_hash_table, &key, &conn->link);
+	futex_up(&async_futex);
+	
+	fibril_add_ready(conn->wdata.fid);
+	
+	return conn->wdata.fid;
+}
+
+/** Handle a call that was received.
+ *
+ * If the call has the IPC_M_CONNECT_ME_TO method, a new connection is created.
+ * Otherwise the call is routed to its connection fibril.
+ *
+ * @param callid Hash of the incoming call.
+ * @param call   Data of the incoming call.
+ *
+ */
+static void handle_call(ipc_callid_t callid, ipc_call_t *call)
+{
+	/* Unrouted call - do some default behaviour */
+	if ((callid & IPC_CALLID_NOTIFICATION)) {
+		process_notification(callid, call);
+		goto out;
+	}
+	
+	switch (IPC_GET_METHOD(*call)) {
+	case IPC_M_CONNECT_ME:
+	case IPC_M_CONNECT_ME_TO:
+		/* Open new connection with fibril etc. */
+		async_new_connection(IPC_GET_ARG5(*call), callid, call,
+		    client_connection);
+		goto out;
+	}
+	
+	/* Try to route the call through the connection hash table */
+	if (route_call(callid, call))
+		goto out;
+	
+	/* Unknown call from unknown phone - hang it up */
+	ipc_answer_0(callid, EHANGUP);
+	return;
+	
+out:
+	;
+}
+
+/** Fire all timeouts that expired. */
+static void handle_expired_timeouts(void)
+{
+	struct timeval tv;
+	gettimeofday(&tv, NULL);
+	
+	futex_down(&async_futex);
+	
+	link_t *cur = timeout_list.next;
+	while (cur != &timeout_list) {
+		awaiter_t *waiter;
+		
+		waiter = list_get_instance(cur, awaiter_t, to_event.link);
+		if (tv_gt(&waiter->to_event.expires, &tv))
+			break;
+
+		cur = cur->next;
+
+		list_remove(&waiter->to_event.link);
+		waiter->to_event.inlist = false;
+		waiter->to_event.occurred = true;
+		
+		/*
+		 * Redundant condition?
+		 * The fibril should not be active when it gets here.
+		 */
+		if (!waiter->active) {
+			waiter->active = true;
+			fibril_add_ready(waiter->fid);
+		}
+	}
+	
+	futex_up(&async_futex);
+}
+
+/** Endless loop dispatching incoming calls and answers.
+ *
+ * @return Never returns.
+ *
+ */
+static int async_manager_worker(void)
+{
+	while (true) {
+		if (fibril_switch(FIBRIL_FROM_MANAGER)) {
+			futex_up(&async_futex); 
+			/*
+			 * async_futex is always held when entering a manager
+			 * fibril.
+			 */
+			continue;
+		}
+		
+		futex_down(&async_futex);
+		
+		suseconds_t timeout;
+		if (!list_empty(&timeout_list)) {
+			awaiter_t *waiter = list_get_instance(timeout_list.next,
+			    awaiter_t, to_event.link);
+			
+			struct timeval tv;
+			gettimeofday(&tv, NULL);
+			
+			if (tv_gteq(&tv, &waiter->to_event.expires)) {
+				futex_up(&async_futex);
+				handle_expired_timeouts();
+				continue;
+			} else
+				timeout = tv_sub(&waiter->to_event.expires,
+				    &tv);
+		} else
+			timeout = SYNCH_NO_TIMEOUT;
+		
+		futex_up(&async_futex);
+
+		atomic_inc(&threads_in_ipc_wait);
+		
+		ipc_call_t call;
+		ipc_callid_t callid = ipc_wait_cycle(&call, timeout,
+		    SYNCH_FLAGS_NONE);
+		
+		atomic_dec(&threads_in_ipc_wait);
+
+		if (!callid) {
+			handle_expired_timeouts();
+			continue;
+		}
+		
+		if (callid & IPC_CALLID_ANSWERED)
+			continue;
+		
+		handle_call(callid, &call);
+	}
+	
+	return 0;
+}
+
+/** Function to start async_manager as a standalone fibril.
+ *
+ * When more kernel threads are used, one async manager should exist per thread.
+ *
+ * @param arg Unused.
+ * @return Never returns.
+ *
+ */
+static int async_manager_fibril(void *arg)
+{
+	futex_up(&async_futex);
+	
+	/*
+	 * async_futex is always locked when entering manager
+	 */
+	async_manager_worker();
+	
+	return 0;
+}
+
+/** Add one manager to manager list. */
+void async_create_manager(void)
+{
+	fid_t fid = fibril_create(async_manager_fibril, NULL);
+	fibril_add_manager(fid);
+}
+
+/** Remove one manager from manager list */
+void async_destroy_manager(void)
+{
+	fibril_remove_manager();
+}
+
+/** Initialize the async framework.
+ *
+ * @return Zero on success or an error code.
+ */
+int __async_init(void)
+{
+	if (!hash_table_create(&conn_hash_table, CONN_HASH_TABLE_CHAINS, 1,
+	    &conn_hash_table_ops)) {
+		printf("%s: cannot create hash table\n", "async");
+		return ENOMEM;
+	}
+	
+	return 0;
+}
+
+/** Reply received callback.
+ *
+ * This function is called whenever a reply for an asynchronous message sent out
+ * by the asynchronous framework is received.
+ *
+ * Notify the fibril which is waiting for this message that it has arrived.
+ *
+ * @param arg    Pointer to the asynchronous message record.
+ * @param retval Value returned in the answer.
+ * @param data   Call data of the answer.
+ */
+static void reply_received(void *arg, int retval, ipc_call_t *data)
+{
+	futex_down(&async_futex);
+	
+	amsg_t *msg = (amsg_t *) arg;
+	msg->retval = retval;
+	
+	/* Copy data after futex_down, just in case the call was detached */
+	if ((msg->dataptr) && (data))
+		*msg->dataptr = *data;
+	
+	write_barrier();
+	
+	/* Remove message from timeout list */
+	if (msg->wdata.to_event.inlist)
+		list_remove(&msg->wdata.to_event.link);
+	
+	msg->done = true;
+	if (!msg->wdata.active) {
+		msg->wdata.active = true;
+		fibril_add_ready(msg->wdata.fid);
+	}
+	
+	futex_up(&async_futex);
+}
+
+/** Send message and return id of the sent message.
+ *
+ * The return value can be used as input for async_wait() to wait for
+ * completion.
+ *
+ * @param phoneid Handle of the phone that will be used for the send.
+ * @param method  Service-defined method.
+ * @param arg1    Service-defined payload argument.
+ * @param arg2    Service-defined payload argument.
+ * @param arg3    Service-defined payload argument.
+ * @param arg4    Service-defined payload argument.
+ * @param dataptr If non-NULL, storage where the reply data will be
+ *                stored.
+ *
+ * @return Hash of the sent message or 0 on error.
+ *
+ */
+aid_t async_send_fast(int phoneid, ipcarg_t method, ipcarg_t arg1,
+    ipcarg_t arg2, ipcarg_t arg3, ipcarg_t arg4, ipc_call_t *dataptr)
+{
+	amsg_t *msg = malloc(sizeof(*msg));
+	
+	if (!msg)
+		return 0;
+	
+	msg->done = false;
+	msg->dataptr = dataptr;
+	
+	msg->wdata.to_event.inlist = false;
+	/* We may sleep in the next method, but it will use its own mechanism */
+	msg->wdata.active = true;
+	
+	ipc_call_async_4(phoneid, method, arg1, arg2, arg3, arg4, msg,
+	    reply_received, true);
+	
+	return (aid_t) msg;
+}
+
+/** Send message and return id of the sent message
+ *
+ * The return value can be used as input for async_wait() to wait for
+ * completion.
+ *
+ * @param phoneid Handle of the phone that will be used for the send.
+ * @param method  Service-defined method.
+ * @param arg1    Service-defined payload argument.
+ * @param arg2    Service-defined payload argument.
+ * @param arg3    Service-defined payload argument.
+ * @param arg4    Service-defined payload argument.
+ * @param arg5    Service-defined payload argument.
+ * @param dataptr If non-NULL, storage where the reply data will be
+ *                stored.
+ *
+ * @return Hash of the sent message or 0 on error.
+ *
+ */
+aid_t async_send_slow(int phoneid, ipcarg_t method, ipcarg_t arg1,
+    ipcarg_t arg2, ipcarg_t arg3, ipcarg_t arg4, ipcarg_t arg5,
+    ipc_call_t *dataptr)
+{
+	amsg_t *msg = malloc(sizeof(*msg));
+	
+	if (!msg)
+		return 0;
+	
+	msg->done = false;
+	msg->dataptr = dataptr;
+	
+	msg->wdata.to_event.inlist = false;
+	/* We may sleep in next method, but it will use its own mechanism */
+	msg->wdata.active = true;
+	
+	ipc_call_async_5(phoneid, method, arg1, arg2, arg3, arg4, arg5, msg,
+	    reply_received, true);
+	
+	return (aid_t) msg;
+}
+
+/** Wait for a message sent by the async framework.
+ *
+ * @param amsgid Hash of the message to wait for.
+ * @param retval Pointer to storage where the retval of the answer will
+ *               be stored.
+ *
+ */
+void async_wait_for(aid_t amsgid, ipcarg_t *retval)
+{
+	amsg_t *msg = (amsg_t *) amsgid;
+	
+	futex_down(&async_futex);
+	if (msg->done) {
+		futex_up(&async_futex);
+		goto done;
+	}
+	
+	msg->wdata.fid = fibril_get_id();
+	msg->wdata.active = false;
+	msg->wdata.to_event.inlist = false;
+	
+	/* Leave the async_futex locked when entering this function */
+	fibril_switch(FIBRIL_TO_MANAGER);
+	
+	/* Futex is up automatically after fibril_switch */
+	
+done:
+	if (retval)
+		*retval = msg->retval;
+	
+	free(msg);
+}
+
+/** Wait for a message sent by the async framework, timeout variant.
+ *
+ * @param amsgid  Hash of the message to wait for.
+ * @param retval  Pointer to storage where the retval of the answer will
+ *                be stored.
+ * @param timeout Timeout in microseconds.
+ *
+ * @return Zero on success, ETIMEOUT if the timeout has expired.
+ *
+ */
+int async_wait_timeout(aid_t amsgid, ipcarg_t *retval, suseconds_t timeout)
+{
+	amsg_t *msg = (amsg_t *) amsgid;
+	
+	/* TODO: Let it go through the event read at least once */
+	if (timeout < 0)
+		return ETIMEOUT;
+	
+	futex_down(&async_futex);
+	if (msg->done) {
+		futex_up(&async_futex);
+		goto done;
+	}
+	
+	gettimeofday(&msg->wdata.to_event.expires, NULL);
+	tv_add(&msg->wdata.to_event.expires, timeout);
+	
+	msg->wdata.fid = fibril_get_id();
+	msg->wdata.active = false;
+	async_insert_timeout(&msg->wdata);
+	
+	/* Leave the async_futex locked when entering this function */
+	fibril_switch(FIBRIL_TO_MANAGER);
+	
+	/* Futex is up automatically after fibril_switch */
+	
+	if (!msg->done)
+		return ETIMEOUT;
+	
+done:
+	if (retval)
+		*retval = msg->retval;
+	
+	free(msg);
+	
+	return 0;
+}
+
+/** Wait for specified time.
+ *
+ * The current fibril is suspended but the thread continues to execute.
+ *
+ * @param timeout Duration of the wait in microseconds.
+ *
+ */
+void async_usleep(suseconds_t timeout)
+{
+	amsg_t *msg = malloc(sizeof(*msg));
+	
+	if (!msg)
+		return;
+	
+	msg->wdata.fid = fibril_get_id();
+	msg->wdata.active = false;
+	
+	gettimeofday(&msg->wdata.to_event.expires, NULL);
+	tv_add(&msg->wdata.to_event.expires, timeout);
+	
+	futex_down(&async_futex);
+	
+	async_insert_timeout(&msg->wdata);
+	
+	/* Leave the async_futex locked when entering this function */
+	fibril_switch(FIBRIL_TO_MANAGER);
+	
+	/* Futex is up automatically after fibril_switch() */
+	
+	free(msg);
+}
+
+/** Setter for client_connection function pointer.
+ *
+ * @param conn Function that will implement a new connection fibril.
+ *
+ */
+void async_set_client_connection(async_client_conn_t conn)
+{
+	client_connection = conn;
+}
+
+/** Setter for interrupt_received function pointer.
+ *
+ * @param intr Function that will implement a new interrupt
+ *             notification fibril.
+ */
+void async_set_interrupt_received(async_client_conn_t intr)
+{
+	interrupt_received = intr;
+}
+
+/** Pseudo-synchronous message sending - fast version.
+ *
+ * Send message asynchronously and return only after the reply arrives.
+ *
+ * This function can only transfer 4 register payload arguments. For
+ * transferring more arguments, see the slower async_req_slow().
+ *
+ * @param phoneid Hash of the phone through which to make the call.
+ * @param method  Method of the call.
+ * @param arg1    Service-defined payload argument.
+ * @param arg2    Service-defined payload argument.
+ * @param arg3    Service-defined payload argument.
+ * @param arg4    Service-defined payload argument.
+ * @param r1      If non-NULL, storage for the 1st reply argument.
+ * @param r2      If non-NULL, storage for the 2nd reply argument.
+ * @param r3      If non-NULL, storage for the 3rd reply argument.
+ * @param r4      If non-NULL, storage for the 4th reply argument.
+ * @param r5      If non-NULL, storage for the 5th reply argument.
+ *
+ * @return Return code of the reply or a negative error code.
+ *
+ */
+ipcarg_t async_req_fast(int phoneid, ipcarg_t method, ipcarg_t arg1,
+    ipcarg_t arg2, ipcarg_t arg3, ipcarg_t arg4, ipcarg_t *r1, ipcarg_t *r2,
+    ipcarg_t *r3, ipcarg_t *r4, ipcarg_t *r5)
+{
+	ipc_call_t result;
+	aid_t eid = async_send_4(phoneid, method, arg1, arg2, arg3, arg4,
+	    &result);
+	
+	ipcarg_t rc;
+	async_wait_for(eid, &rc);
+	
+	if (r1)
+		*r1 = IPC_GET_ARG1(result);
+	
+	if (r2)
+		*r2 = IPC_GET_ARG2(result);
+	
+	if (r3)
+		*r3 = IPC_GET_ARG3(result);
+	
+	if (r4)
+		*r4 = IPC_GET_ARG4(result);
+	
+	if (r5)
+		*r5 = IPC_GET_ARG5(result);
+	
+	return rc;
+}
+
+/** Pseudo-synchronous message sending - slow version.
+ *
+ * Send message asynchronously and return only after the reply arrives.
+ *
+ * @param phoneid Hash of the phone through which to make the call.
+ * @param method  Method of the call.
+ * @param arg1    Service-defined payload argument.
+ * @param arg2    Service-defined payload argument.
+ * @param arg3    Service-defined payload argument.
+ * @param arg4    Service-defined payload argument.
+ * @param arg5    Service-defined payload argument.
+ * @param r1      If non-NULL, storage for the 1st reply argument.
+ * @param r2      If non-NULL, storage for the 2nd reply argument.
+ * @param r3      If non-NULL, storage for the 3rd reply argument.
+ * @param r4      If non-NULL, storage for the 4th reply argument.
+ * @param r5      If non-NULL, storage for the 5th reply argument.
+ *
+ * @return Return code of the reply or a negative error code.
+ *
+ */
+ipcarg_t async_req_slow(int phoneid, ipcarg_t method, ipcarg_t arg1,
+    ipcarg_t arg2, ipcarg_t arg3, ipcarg_t arg4, ipcarg_t arg5, ipcarg_t *r1,
+    ipcarg_t *r2, ipcarg_t *r3, ipcarg_t *r4, ipcarg_t *r5)
+{
+	ipc_call_t result;
+	aid_t eid = async_send_5(phoneid, method, arg1, arg2, arg3, arg4, arg5,
+	    &result);
+	
+	ipcarg_t rc;
+	async_wait_for(eid, &rc);
+	
+	if (r1)
+		*r1 = IPC_GET_ARG1(result);
+	
+	if (r2)
+		*r2 = IPC_GET_ARG2(result);
+	
+	if (r3)
+		*r3 = IPC_GET_ARG3(result);
+	
+	if (r4)
+		*r4 = IPC_GET_ARG4(result);
+	
+	if (r5)
+		*r5 = IPC_GET_ARG5(result);
+	
+	return rc;
+}
+
+/** Wrapper for making IPC_M_CONNECT_ME_TO calls using the async framework.
+ * 
+ * Ask through phone for a new connection to some service.
+ *
+ * @param phoneid	Phone handle used for contacting the other side.
+ * @param arg1		User defined argument.
+ * @param arg2		User defined argument.
+ * @param arg3		User defined argument.
+ *
+ * @return		New phone handle on success or a negative error code.
+ */
+int
+async_connect_me_to(int phoneid, ipcarg_t arg1, ipcarg_t arg2, ipcarg_t arg3)
+{
+	int rc;
+	ipcarg_t newphid;
+
+	rc = async_req_3_5(phoneid, IPC_M_CONNECT_ME_TO, arg1, arg2, arg3, NULL,
+	    NULL, NULL, NULL, &newphid);
+	
+	if (rc != EOK)	
+		return rc;
+
+	return newphid;
+}
+
+/** Wrapper for making IPC_M_CONNECT_ME_TO calls using the async framework.
+ * 
+ * Ask through phone for a new connection to some service and block until
+ * success.
+ *
+ * @param phoneid	Phone handle used for contacting the other side.
+ * @param arg1		User defined argument.
+ * @param arg2		User defined argument.
+ * @param arg3		User defined argument.
+ *
+ * @return		New phone handle on success or a negative error code.
+ */
+int
+async_connect_me_to_blocking(int phoneid, ipcarg_t arg1, ipcarg_t arg2,
+    ipcarg_t arg3)
+{
+	int rc;
+	ipcarg_t newphid;
+
+	rc = async_req_4_5(phoneid, IPC_M_CONNECT_ME_TO, arg1, arg2, arg3,
+	    IPC_FLAG_BLOCKING, NULL, NULL, NULL, NULL, &newphid);
+	
+	if (rc != EOK)	
+		return rc;
+
+	return newphid;
+}
+
+/** Wrapper for making IPC_M_SHARE_IN calls using the async framework.
+ *
+ * @param phoneid	Phone that will be used to contact the receiving side.
+ * @param dst		Destination address space area base.
+ * @param size		Size of the destination address space area.
+ * @param arg		User defined argument.
+ * @param flags		Storage where the received flags will be stored. Can be
+ *			NULL.
+ *
+ * @return		Zero on success or a negative error code from errno.h.
+ */
+int async_share_in_start(int phoneid, void *dst, size_t size, ipcarg_t arg,
+    int *flags)
+{
+	int res;
+	sysarg_t tmp_flags;
+	res = async_req_3_2(phoneid, IPC_M_SHARE_IN, (ipcarg_t) dst,
+	    (ipcarg_t) size, arg, NULL, &tmp_flags);
+	if (flags)
+		*flags = tmp_flags;
+	return res;
+}
+
+/** Wrapper for receiving the IPC_M_SHARE_IN calls using the async framework.
+ *
+ * This wrapper only makes it more comfortable to receive IPC_M_SHARE_IN calls
+ * so that the user doesn't have to remember the meaning of each IPC argument.
+ *
+ * So far, this wrapper is to be used from within a connection fibril.
+ *
+ * @param callid	Storage where the hash of the IPC_M_SHARE_IN call will
+ * 			be stored.
+ * @param size		Destination address space area size.	
+ *
+ * @return		Non-zero on success, zero on failure.
+ */
+int async_share_in_receive(ipc_callid_t *callid, size_t *size)
+{
+	ipc_call_t data;
+	
+	assert(callid);
+	assert(size);
+
+	*callid = async_get_call(&data);
+	if (IPC_GET_METHOD(data) != IPC_M_SHARE_IN)
+		return 0;
+	*size = (size_t) IPC_GET_ARG2(data);
+	return 1;
+}
+
+/** Wrapper for answering the IPC_M_SHARE_IN calls using the async framework.
+ *
+ * This wrapper only makes it more comfortable to answer IPC_M_DATA_READ calls
+ * so that the user doesn't have to remember the meaning of each IPC argument.
+ *
+ * @param callid	Hash of the IPC_M_DATA_READ call to answer.
+ * @param src		Source address space base.
+ * @param flags		Flags to be used for sharing. Bits can be only cleared.
+ *
+ * @return		Zero on success or a value from @ref errno.h on failure.
+ */
+int async_share_in_finalize(ipc_callid_t callid, void *src, int flags)
+{
+	return ipc_share_in_finalize(callid, src, flags);
+}
+
+/** Wrapper for making IPC_M_SHARE_OUT calls using the async framework.
+ *
+ * @param phoneid	Phone that will be used to contact the receiving side.
+ * @param src		Source address space area base address.
+ * @param flags		Flags to be used for sharing. Bits can be only cleared.
+ *
+ * @return		Zero on success or a negative error code from errno.h.
+ */
+int async_share_out_start(int phoneid, void *src, int flags)
+{
+	return async_req_3_0(phoneid, IPC_M_SHARE_OUT, (ipcarg_t) src, 0,
+	    (ipcarg_t) flags);
+}
+
+/** Wrapper for receiving the IPC_M_SHARE_OUT calls using the async framework.
+ *
+ * This wrapper only makes it more comfortable to receive IPC_M_SHARE_OUT calls
+ * so that the user doesn't have to remember the meaning of each IPC argument.
+ *
+ * So far, this wrapper is to be used from within a connection fibril.
+ *
+ * @param callid	Storage where the hash of the IPC_M_SHARE_OUT call will
+ * 			be stored.
+ * @param size		Storage where the source address space area size will be
+ *			stored.
+ * @param flags		Storage where the sharing flags will be stored.
+ *
+ * @return		Non-zero on success, zero on failure.
+ */
+int async_share_out_receive(ipc_callid_t *callid, size_t *size, int *flags)
+{
+	ipc_call_t data;
+	
+	assert(callid);
+	assert(size);
+	assert(flags);
+
+	*callid = async_get_call(&data);
+	if (IPC_GET_METHOD(data) != IPC_M_SHARE_OUT)
+		return 0;
+	*size = (size_t) IPC_GET_ARG2(data);
+	*flags = (int) IPC_GET_ARG3(data);
+	return 1;
+}
+
+/** Wrapper for answering the IPC_M_SHARE_OUT calls using the async framework.
+ *
+ * This wrapper only makes it more comfortable to answer IPC_M_SHARE_OUT calls
+ * so that the user doesn't have to remember the meaning of each IPC argument.
+ *
+ * @param callid	Hash of the IPC_M_DATA_WRITE call to answer.
+ * @param dst		Destination address space area base address.	
+ *
+ * @return		Zero on success or a value from @ref errno.h on failure.
+ */
+int async_share_out_finalize(ipc_callid_t callid, void *dst)
+{
+	return ipc_share_out_finalize(callid, dst);
+}
+
+
+/** Wrapper for making IPC_M_DATA_READ calls using the async framework.
+ *
+ * @param phoneid	Phone that will be used to contact the receiving side.
+ * @param dst		Address of the beginning of the destination buffer.
+ * @param size		Size of the destination buffer.
+ *
+ * @return		Zero on success or a negative error code from errno.h.
+ */
+int async_data_read_start(int phoneid, void *dst, size_t size)
+{
+	return async_req_2_0(phoneid, IPC_M_DATA_READ, (ipcarg_t) dst,
+	    (ipcarg_t) size);
+}
+
+/** Wrapper for receiving the IPC_M_DATA_READ calls using the async framework.
+ *
+ * This wrapper only makes it more comfortable to receive IPC_M_DATA_READ calls
+ * so that the user doesn't have to remember the meaning of each IPC argument.
+ *
+ * So far, this wrapper is to be used from within a connection fibril.
+ *
+ * @param callid	Storage where the hash of the IPC_M_DATA_READ call will
+ * 			be stored.
+ * @param size		Storage where the maximum size will be stored. Can be
+ *			NULL.
+ *
+ * @return		Non-zero on success, zero on failure.
+ */
+int async_data_read_receive(ipc_callid_t *callid, size_t *size)
+{
+	ipc_call_t data;
+	
+	assert(callid);
+
+	*callid = async_get_call(&data);
+	if (IPC_GET_METHOD(data) != IPC_M_DATA_READ)
+		return 0;
+	if (size)
+		*size = (size_t) IPC_GET_ARG2(data);
+	return 1;
+}
+
+/** Wrapper for answering the IPC_M_DATA_READ calls using the async framework.
+ *
+ * This wrapper only makes it more comfortable to answer IPC_M_DATA_READ calls
+ * so that the user doesn't have to remember the meaning of each IPC argument.
+ *
+ * @param callid	Hash of the IPC_M_DATA_READ call to answer.
+ * @param src		Source address for the IPC_M_DATA_READ call.
+ * @param size		Size for the IPC_M_DATA_READ call. Can be smaller than
+ *			the maximum size announced by the sender.
+ *
+ * @return		Zero on success or a value from @ref errno.h on failure.
+ */
+int async_data_read_finalize(ipc_callid_t callid, const void *src, size_t size)
+{
+	return ipc_data_read_finalize(callid, src, size);
+}
+
+/** Wrapper for forwarding any read request
+ *
+ *
+ */
+int async_data_read_forward_fast(int phoneid, ipcarg_t method, ipcarg_t arg1,
+    ipcarg_t arg2, ipcarg_t arg3, ipcarg_t arg4, ipc_call_t *dataptr)
+{
+	ipc_callid_t callid;
+	if (!async_data_read_receive(&callid, NULL)) {
+		ipc_answer_0(callid, EINVAL);
+		return EINVAL;
+	}
+	
+	aid_t msg = async_send_fast(phoneid, method, arg1, arg2, arg3, arg4,
+	    dataptr);
+	if (msg == 0) {
+		ipc_answer_0(callid, EINVAL);
+		return EINVAL;
+	}
+	
+	int retval = ipc_forward_fast(callid, phoneid, 0, 0, 0,
+	    IPC_FF_ROUTE_FROM_ME);
+	if (retval != EOK) {
+		async_wait_for(msg, NULL);
+		ipc_answer_0(callid, retval);
+		return retval;
+	}
+	
+	ipcarg_t rc;
+	async_wait_for(msg, &rc);
+	
+	return (int) rc;
+}
+
+/** Wrapper for making IPC_M_DATA_WRITE calls using the async framework.
+ *
+ * @param phoneid Phone that will be used to contact the receiving side.
+ * @param src     Address of the beginning of the source buffer.
+ * @param size    Size of the source buffer.
+ *
+ * @return Zero on success or a negative error code from errno.h.
+ *
+ */
+int async_data_write_start(int phoneid, const void *src, size_t size)
+{
+	return async_req_2_0(phoneid, IPC_M_DATA_WRITE, (ipcarg_t) src,
+	    (ipcarg_t) size);
+}
+
+/** Wrapper for receiving the IPC_M_DATA_WRITE calls using the async framework.
+ *
+ * This wrapper only makes it more comfortable to receive IPC_M_DATA_WRITE calls
+ * so that the user doesn't have to remember the meaning of each IPC argument.
+ *
+ * So far, this wrapper is to be used from within a connection fibril.
+ *
+ * @param callid Storage where the hash of the IPC_M_DATA_WRITE call will
+ *               be stored.
+ * @param size   Storage where the suggested size will be stored. May be
+ *               NULL
+ *
+ * @return Non-zero on success, zero on failure.
+ *
+ */
+int async_data_write_receive(ipc_callid_t *callid, size_t *size)
+{
+	ipc_call_t data;
+	
+	assert(callid);
+	
+	*callid = async_get_call(&data);
+	if (IPC_GET_METHOD(data) != IPC_M_DATA_WRITE)
+		return 0;
+	
+	if (size)
+		*size = (size_t) IPC_GET_ARG2(data);
+	
+	return 1;
+}
+
+/** Wrapper for answering the IPC_M_DATA_WRITE calls using the async framework.
+ *
+ * This wrapper only makes it more comfortable to answer IPC_M_DATA_WRITE calls
+ * so that the user doesn't have to remember the meaning of each IPC argument.
+ *
+ * @param callid Hash of the IPC_M_DATA_WRITE call to answer.
+ * @param dst    Final destination address for the IPC_M_DATA_WRITE call.
+ * @param size   Final size for the IPC_M_DATA_WRITE call.
+ *
+ * @return Zero on success or a value from @ref errno.h on failure.
+ *
+ */
+int async_data_write_finalize(ipc_callid_t callid, void *dst, size_t size)
+{
+	return ipc_data_write_finalize(callid, dst, size);
+}
+
+/** Wrapper for receiving binary data or strings
+ *
+ * This wrapper only makes it more comfortable to use async_data_write_*
+ * functions to receive binary data or strings.
+ *
+ * @param data       Pointer to data pointer (which should be later disposed
+ *                   by free()). If the operation fails, the pointer is not
+ *                   touched.
+ * @param nullterm   If true then the received data is always zero terminated.
+ *                   This also causes to allocate one extra byte beyond the
+ *                   raw transmitted data.
+ * @param min_size   Minimum size (in bytes) of the data to receive.
+ * @param max_size   Maximum size (in bytes) of the data to receive. 0 means
+ *                   no limit.
+ * @param granulariy If non-zero then the size of the received data has to
+ *                   be divisible by this value.
+ * @param received   If not NULL, the size of the received data is stored here.
+ *
+ * @return Zero on success or a value from @ref errno.h on failure.
+ *
+ */
+int async_data_write_accept(void **data, const bool nullterm,
+    const size_t min_size, const size_t max_size, const size_t granularity,
+    size_t *received)
+{
+	ipc_callid_t callid;
+	size_t size;
+	if (!async_data_write_receive(&callid, &size)) {
+		ipc_answer_0(callid, EINVAL);
+		return EINVAL;
+	}
+	
+	if (size < min_size) {
+		ipc_answer_0(callid, EINVAL);
+		return EINVAL;
+	}
+	
+	if ((max_size > 0) && (size > max_size)) {
+		ipc_answer_0(callid, EINVAL);
+		return EINVAL;
+	}
+	
+	if ((granularity > 0) && ((size % granularity) != 0)) {
+		ipc_answer_0(callid, EINVAL);
+		return EINVAL;
+	}
+	
+	void *_data;
+	
+	if (nullterm)
+		_data = malloc(size + 1);
+	else
+		_data = malloc(size);
+	
+	if (_data == NULL) {
+		ipc_answer_0(callid, ENOMEM);
+		return ENOMEM;
+	}
+	
+	int rc = async_data_write_finalize(callid, _data, size);
+	if (rc != EOK) {
+		free(_data);
+		return rc;
+	}
+	
+	if (nullterm)
+		((char *) _data)[size] = 0;
+	
+	*data = _data;
+	if (received != NULL)
+		*received = size;
+	
+	return EOK;
+}
+
+/** Wrapper for voiding any data that is about to be received
+ *
+ * This wrapper can be used to void any pending data
+ *
+ * @param retval Error value from @ref errno.h to be returned to the caller.
+ *
+ */
+void async_data_write_void(const int retval)
+{
+	ipc_callid_t callid;
+	async_data_write_receive(&callid, NULL);
+	ipc_answer_0(callid, retval);
+}
+
+/** Wrapper for forwarding any data that is about to be received
+ *
+ *
+ */
+int async_data_write_forward_fast(int phoneid, ipcarg_t method, ipcarg_t arg1,
+    ipcarg_t arg2, ipcarg_t arg3, ipcarg_t arg4, ipc_call_t *dataptr)
+{
+	ipc_callid_t callid;
+	if (!async_data_write_receive(&callid, NULL)) {
+		ipc_answer_0(callid, EINVAL);
+		return EINVAL;
+	}
+	
+	aid_t msg = async_send_fast(phoneid, method, arg1, arg2, arg3, arg4,
+	    dataptr);
+	if (msg == 0) {
+		ipc_answer_0(callid, EINVAL);
+		return EINVAL;
+	}
+	
+	int retval = ipc_forward_fast(callid, phoneid, 0, 0, 0,
+	    IPC_FF_ROUTE_FROM_ME);
+	if (retval != EOK) {
+		async_wait_for(msg, NULL);
+		ipc_answer_0(callid, retval);
+		return retval;
+	}
+	
+	ipcarg_t rc;
+	async_wait_for(msg, &rc);
+	
+	return (int) rc;
+}
+
+/** @}
+ */
Index: uspace/lib/c/generic/cap.c
===================================================================
--- uspace/lib/c/generic/cap.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/generic/cap.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,75 @@
+/*
+ * 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 libc
+ * @{
+ */
+/**
+ * @file	cap.c
+ * @brief	Functions to grant/revoke capabilities to/from a task.
+ */
+
+#include <cap.h>
+#include <task.h>
+#include <libc.h>
+#include <kernel/syscall/sysarg64.h>
+
+/** Grant capabilities to a task.
+ *
+ * @param id Destination task ID.
+ * @param caps Capabilities to grant.
+ *
+ * @return Zero on success or a value from @ref errno.h on failure.
+ */
+int cap_grant(task_id_t id, unsigned int caps)
+{
+	sysarg64_t arg;
+	
+	arg.value = (unsigned long long) id;
+
+	return __SYSCALL2(SYS_CAP_GRANT, (sysarg_t) &arg, (sysarg_t) caps);
+}
+
+/** Revoke capabilities from a task.
+ *
+ * @param id Destination task ID.
+ * @param caps Capabilities to revoke.
+ *
+ * @return Zero on success or a value from @ref errno.h on failure.
+ */
+int cap_revoke(task_id_t id, unsigned int caps)
+{
+	sysarg64_t arg;
+	
+	arg.value = (unsigned long long) id;
+
+	return __SYSCALL2(SYS_CAP_REVOKE, (sysarg_t) &arg, (sysarg_t) caps);
+}
+
+/** @}
+ */
Index: uspace/lib/c/generic/clipboard.c
===================================================================
--- uspace/lib/c/generic/clipboard.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/generic/clipboard.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,185 @@
+/*
+ * Copyright (c) 2009 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 libc
+ * @{
+ */
+/** @file
+ * @brief System clipboard API.
+ *
+ * The clipboard data is managed by the clipboard service and it is shared by
+ * the entire system.
+ *
+ */
+
+#include <clipboard.h>
+#include <ipc/services.h>
+#include <ipc/clipboard.h>
+#include <async.h>
+#include <str.h>
+#include <errno.h>
+#include <malloc.h>
+
+static int clip_phone = -1;
+
+/** Connect to clipboard server
+ *
+ */
+static void clip_connect(void)
+{
+	while (clip_phone < 0)
+		clip_phone = ipc_connect_me_to_blocking(PHONE_NS, SERVICE_CLIPBOARD, 0, 0);
+}
+
+/** Copy string to clipboard.
+ *
+ * Sets the clipboard contents to @a str. Passing an empty string or NULL
+ * makes the clipboard empty.
+ *
+ * @param str String to put to clipboard or NULL.
+ *
+ * @return Zero on success or negative error code.
+ *
+ */
+int clipboard_put_str(const char *str)
+{
+	size_t size = str_size(str);
+	
+	if (size == 0) {
+		async_serialize_start();
+		clip_connect();
+		
+		ipcarg_t rc = async_req_1_0(clip_phone, CLIPBOARD_PUT_DATA, CLIPBOARD_TAG_NONE);
+		
+		async_serialize_end();
+		
+		return (int) rc;
+	} else {
+		async_serialize_start();
+		clip_connect();
+		
+		aid_t req = async_send_1(clip_phone, CLIPBOARD_PUT_DATA, CLIPBOARD_TAG_DATA, NULL);
+		ipcarg_t rc = async_data_write_start(clip_phone, (void *) str, size);
+		if (rc != EOK) {
+			ipcarg_t rc_orig;
+			async_wait_for(req, &rc_orig);
+			async_serialize_end();
+			if (rc_orig == EOK)
+				return (int) rc;
+			else
+				return (int) rc_orig;
+		}
+		
+		async_wait_for(req, &rc);
+		async_serialize_end();
+		
+		return (int) rc;
+	}
+}
+
+/** Get a copy of clipboard contents.
+ *
+ * Returns a new string that can be deallocated with free().
+ *
+ * @param str Here pointer to the newly allocated string is stored.
+ *
+ * @return Zero on success or negative error code.
+ *
+ */
+int clipboard_get_str(char **str)
+{
+	/* Loop until clipboard read succesful */
+	while (true) {
+		async_serialize_start();
+		clip_connect();
+		
+		ipcarg_t size;
+		ipcarg_t tag;
+		ipcarg_t rc = async_req_0_2(clip_phone, CLIPBOARD_CONTENT, &size, &tag);
+		
+		async_serialize_end();
+		
+		if (rc != EOK)
+			return (int) rc;
+		
+		char *sbuf;
+		
+		switch (tag) {
+		case CLIPBOARD_TAG_NONE:
+			sbuf = malloc(1);
+			if (sbuf == NULL)
+				return ENOMEM;
+			
+			sbuf[0] = 0;
+			*str = sbuf;
+			return EOK;
+		case CLIPBOARD_TAG_DATA:
+			sbuf = malloc(size + 1);
+			if (sbuf == NULL)
+				return ENOMEM;
+			
+			async_serialize_start();
+			
+			aid_t req = async_send_1(clip_phone, CLIPBOARD_GET_DATA, tag, NULL);
+			rc = async_data_read_start(clip_phone, (void *) sbuf, size);
+			if ((int) rc == EOVERFLOW) {
+				/*
+				 * The data in the clipboard has changed since
+				 * the last call of CLIPBOARD_CONTENT
+				 */
+				async_serialize_end();
+				break;
+			}
+			
+			if (rc != EOK) {
+				ipcarg_t rc_orig;
+				async_wait_for(req, &rc_orig);
+				async_serialize_end();
+				if (rc_orig == EOK)
+					return (int) rc;
+				else
+					return (int) rc_orig;
+			}
+			
+			async_wait_for(req, &rc);
+			async_serialize_end();
+			
+			if (rc == EOK) {
+				sbuf[size] = 0;
+				*str = sbuf;
+			}
+			
+			return rc;
+		default:
+			return EINVAL;
+		}
+	}
+}
+
+/** @}
+ */
Index: uspace/lib/c/generic/ddi.c
===================================================================
--- uspace/lib/c/generic/ddi.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/generic/ddi.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,139 @@
+/*
+ * 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 libc
+ * @{
+ */
+/** @file
+ */ 
+
+#include <ddi.h>
+#include <libarch/ddi.h>
+#include <libc.h>
+#include <task.h>
+#include <as.h>
+#include <align.h>
+#include <libarch/config.h>
+#include <kernel/ddi/ddi_arg.h>
+
+/** Return unique device number.
+ *
+ * @return New unique device number.
+ *
+ */
+int device_assign_devno(void)
+{
+	return __SYSCALL0(SYS_DEVICE_ASSIGN_DEVNO);
+}
+
+/** Map piece of physical memory to task.
+ *
+ * Caller of this function must have the CAP_MEM_MANAGER capability.
+ *
+ * @param pf		Physical address of the starting frame.
+ * @param vp		Virtual address of the starting page.
+ * @param pages		Number of pages to map.
+ * @param flags		Flags for the new address space area.
+ *
+ * @return 		0 on success, EPERM if the caller lacks the
+ *			CAP_MEM_MANAGER capability, ENOENT if there is no task
+ *			with specified ID and ENOMEM if there was some problem
+ *			in creating address space area.
+ */
+int physmem_map(void *pf, void *vp, unsigned long pages, int flags)
+{
+	return __SYSCALL4(SYS_PHYSMEM_MAP, (sysarg_t) pf, (sysarg_t) vp, pages,
+	    flags);
+}
+
+/** Enable I/O space range to task.
+ *
+ * Caller of this function must have the IO_MEM_MANAGER capability.
+ *
+ * @param id		Task ID.
+ * @param ioaddr	Starting address of the I/O range.
+ * @param size		Size of the range.
+ *
+ * @return		0 on success, EPERM if the caller lacks the
+ *			CAP_IO_MANAGER capability, ENOENT if there is no task
+ *			with specified ID and ENOMEM if there was some problem
+ *			in allocating memory.
+ */
+int iospace_enable(task_id_t id, void *ioaddr, unsigned long size)
+{
+	ddi_ioarg_t arg;
+
+	arg.task_id = id;
+	arg.ioaddr = ioaddr;
+	arg.size = size;
+
+	return __SYSCALL1(SYS_IOSPACE_ENABLE, (sysarg_t) &arg);
+}
+
+/** Interrupt control
+ *
+ * @param enable	1 - enable interrupts, 0 - disable interrupts
+ */
+int preemption_control(int enable)
+{
+	return __SYSCALL1(SYS_PREEMPT_CONTROL, (sysarg_t) enable);
+}
+
+/** Enable PIO for specified I/O range.
+ *
+ * @param pio_addr	I/O start address.
+ * @param size		Size of the I/O region.
+ * @param use_addr	Address where the final address for application's PIO
+ * 			will be stored.
+ *
+ * @return		Zero on success or negative error code.
+ */
+int pio_enable(void *pio_addr, size_t size, void **use_addr)
+{
+	void *phys;
+	void *virt;
+	size_t offset;
+	unsigned int pages;
+
+#ifdef IO_SPACE_BOUNDARY
+	if (pio_addr < IO_SPACE_BOUNDARY) {
+		*use_addr = pio_addr;
+		return iospace_enable(task_get_id(), pio_addr, size);
+	}
+#endif
+
+	phys = (void *) ALIGN_DOWN((uintptr_t) pio_addr, PAGE_SIZE);
+	offset = pio_addr - phys;
+	pages = ALIGN_UP(offset + size, PAGE_SIZE) >> PAGE_WIDTH;
+	virt = as_get_mappable_page(pages << PAGE_WIDTH);
+	*use_addr = virt + offset;
+	return physmem_map(phys, virt, pages, AS_AREA_READ | AS_AREA_WRITE);
+}
+
+/** @}
+ */
Index: uspace/lib/c/generic/devmap.c
===================================================================
--- uspace/lib/c/generic/devmap.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/generic/devmap.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,439 @@
+/*
+ * Copyright (c) 2007 Josef Cejka
+ * Copyright (c) 2009 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 <str.h>
+#include <ipc/ipc.h>
+#include <ipc/services.h>
+#include <ipc/devmap.h>
+#include <devmap.h>
+#include <async.h>
+#include <errno.h>
+#include <malloc.h>
+#include <bool.h>
+
+static int devmap_phone_driver = -1;
+static int devmap_phone_client = -1;
+
+/** Get phone to device mapper task. */
+int devmap_get_phone(devmap_interface_t iface, unsigned int flags)
+{
+	switch (iface) {
+	case DEVMAP_DRIVER:
+		if (devmap_phone_driver >= 0)
+			return devmap_phone_driver;
+		
+		if (flags & IPC_FLAG_BLOCKING)
+			devmap_phone_driver = ipc_connect_me_to_blocking(PHONE_NS,
+			    SERVICE_DEVMAP, DEVMAP_DRIVER, 0);
+		else
+			devmap_phone_driver = ipc_connect_me_to(PHONE_NS,
+			    SERVICE_DEVMAP, DEVMAP_DRIVER, 0);
+		
+		return devmap_phone_driver;
+	case DEVMAP_CLIENT:
+		if (devmap_phone_client >= 0)
+			return devmap_phone_client;
+		
+		if (flags & IPC_FLAG_BLOCKING)
+			devmap_phone_client = ipc_connect_me_to_blocking(PHONE_NS,
+			    SERVICE_DEVMAP, DEVMAP_CLIENT, 0);
+		else
+			devmap_phone_client = ipc_connect_me_to(PHONE_NS,
+			    SERVICE_DEVMAP, DEVMAP_CLIENT, 0);
+		
+		return devmap_phone_client;
+	default:
+		return -1;
+	}
+}
+
+void devmap_hangup_phone(devmap_interface_t iface)
+{
+	switch (iface) {
+	case DEVMAP_DRIVER:
+		if (devmap_phone_driver >= 0) {
+			ipc_hangup(devmap_phone_driver);
+			devmap_phone_driver = -1;
+		}
+		break;
+	case DEVMAP_CLIENT:
+		if (devmap_phone_client >= 0) {
+			ipc_hangup(devmap_phone_client);
+			devmap_phone_client = -1;
+		}
+		break;
+	default:
+		break;
+	}
+}
+
+/** Register new driver with devmap. */
+int devmap_driver_register(const char *name, async_client_conn_t conn)
+{
+	int phone = devmap_get_phone(DEVMAP_DRIVER, IPC_FLAG_BLOCKING);
+	
+	if (phone < 0)
+		return phone;
+	
+	async_serialize_start();
+	
+	ipc_call_t answer;
+	aid_t req = async_send_2(phone, DEVMAP_DRIVER_REGISTER, 0, 0, &answer);
+	
+	ipcarg_t retval = async_data_write_start(phone, name, str_size(name));
+	if (retval != EOK) {
+		async_wait_for(req, NULL);
+		async_serialize_end();
+		return -1;
+	}
+	
+	async_set_client_connection(conn);
+	
+	ipcarg_t callback_phonehash;
+	ipc_connect_to_me(phone, 0, 0, 0, &callback_phonehash);
+	async_wait_for(req, &retval);
+	
+	async_serialize_end();
+	
+	return retval;
+}
+
+/** Register new device.
+ *
+ * @param namespace Namespace name.
+ * @param fqdn      Fully qualified device name.
+ * @param handle    Output: Handle to the created instance of device.
+ *
+ */
+int devmap_device_register(const char *fqdn, dev_handle_t *handle)
+{
+	int phone = devmap_get_phone(DEVMAP_DRIVER, IPC_FLAG_BLOCKING);
+	
+	if (phone < 0)
+		return phone;
+	
+	async_serialize_start();
+	
+	ipc_call_t answer;
+	aid_t req = async_send_2(phone, DEVMAP_DEVICE_REGISTER, 0, 0,
+	    &answer);
+	
+	ipcarg_t retval = async_data_write_start(phone, fqdn, str_size(fqdn));
+	if (retval != EOK) {
+		async_wait_for(req, NULL);
+		async_serialize_end();
+		return retval;
+	}
+	
+	async_wait_for(req, &retval);
+	
+	async_serialize_end();
+	
+	if (retval != EOK) {
+		if (handle != NULL)
+			*handle = -1;
+		return retval;
+	}
+	
+	if (handle != NULL)
+		*handle = (dev_handle_t) IPC_GET_ARG1(answer);
+	
+	return retval;
+}
+
+int devmap_device_get_handle(const char *fqdn, dev_handle_t *handle, unsigned int flags)
+{
+	int phone = devmap_get_phone(DEVMAP_CLIENT, flags);
+	
+	if (phone < 0)
+		return phone;
+	
+	async_serialize_start();
+	
+	ipc_call_t answer;
+	aid_t req = async_send_2(phone, DEVMAP_DEVICE_GET_HANDLE, flags, 0,
+	    &answer);
+	
+	ipcarg_t retval = async_data_write_start(phone, fqdn, str_size(fqdn));
+	if (retval != EOK) {
+		async_wait_for(req, NULL);
+		async_serialize_end();
+		return retval;
+	}
+	
+	async_wait_for(req, &retval);
+	
+	async_serialize_end();
+	
+	if (retval != EOK) {
+		if (handle != NULL)
+			*handle = (dev_handle_t) -1;
+		return retval;
+	}
+	
+	if (handle != NULL)
+		*handle = (dev_handle_t) IPC_GET_ARG1(answer);
+	
+	return retval;
+}
+
+int devmap_namespace_get_handle(const char *name, dev_handle_t *handle, unsigned int flags)
+{
+	int phone = devmap_get_phone(DEVMAP_CLIENT, flags);
+	
+	if (phone < 0)
+		return phone;
+	
+	async_serialize_start();
+	
+	ipc_call_t answer;
+	aid_t req = async_send_2(phone, DEVMAP_NAMESPACE_GET_HANDLE, flags, 0,
+	    &answer);
+	
+	ipcarg_t retval = async_data_write_start(phone, name, str_size(name));
+	if (retval != EOK) {
+		async_wait_for(req, NULL);
+		async_serialize_end();
+		return retval;
+	}
+	
+	async_wait_for(req, &retval);
+	
+	async_serialize_end();
+	
+	if (retval != EOK) {
+		if (handle != NULL)
+			*handle = (dev_handle_t) -1;
+		return retval;
+	}
+	
+	if (handle != NULL)
+		*handle = (dev_handle_t) IPC_GET_ARG1(answer);
+	
+	return retval;
+}
+
+devmap_handle_type_t devmap_handle_probe(dev_handle_t handle)
+{
+	int phone = devmap_get_phone(DEVMAP_CLIENT, IPC_FLAG_BLOCKING);
+	
+	if (phone < 0)
+		return phone;
+	
+	ipcarg_t type;
+	int retval = async_req_1_1(phone, DEVMAP_HANDLE_PROBE, handle, &type);
+	if (retval != EOK)
+		return DEV_HANDLE_NONE;
+	
+	return (devmap_handle_type_t) type;
+}
+
+int devmap_device_connect(dev_handle_t handle, unsigned int flags)
+{
+	int phone;
+	
+	if (flags & IPC_FLAG_BLOCKING) {
+		phone = ipc_connect_me_to_blocking(PHONE_NS, SERVICE_DEVMAP,
+		    DEVMAP_CONNECT_TO_DEVICE, handle);
+	} else {
+		phone = ipc_connect_me_to(PHONE_NS, SERVICE_DEVMAP,
+		    DEVMAP_CONNECT_TO_DEVICE, handle);
+	}
+	
+	return phone;
+}
+
+int devmap_null_create(void)
+{
+	int phone = devmap_get_phone(DEVMAP_CLIENT, IPC_FLAG_BLOCKING);
+	
+	if (phone < 0)
+		return -1;
+	
+	ipcarg_t null_id;
+	int retval = async_req_0_1(phone, DEVMAP_NULL_CREATE, &null_id);
+	if (retval != EOK)
+		return -1;
+	
+	return (int) null_id;
+}
+
+void devmap_null_destroy(int null_id)
+{
+	int phone = devmap_get_phone(DEVMAP_CLIENT, IPC_FLAG_BLOCKING);
+	
+	if (phone < 0)
+		return;
+	
+	async_req_1_0(phone, DEVMAP_NULL_DESTROY, (ipcarg_t) null_id);
+}
+
+static size_t devmap_count_namespaces_internal(int phone)
+{
+	ipcarg_t count;
+	int retval = async_req_0_1(phone, DEVMAP_GET_NAMESPACE_COUNT, &count);
+	if (retval != EOK)
+		return 0;
+	
+	return count;
+}
+
+static size_t devmap_count_devices_internal(int phone, dev_handle_t ns_handle)
+{
+	ipcarg_t count;
+	int retval = async_req_1_1(phone, DEVMAP_GET_DEVICE_COUNT, ns_handle, &count);
+	if (retval != EOK)
+		return 0;
+	
+	return count;
+}
+
+size_t devmap_count_namespaces(void)
+{
+	int phone = devmap_get_phone(DEVMAP_CLIENT, IPC_FLAG_BLOCKING);
+	
+	if (phone < 0)
+		return 0;
+	
+	return devmap_count_namespaces_internal(phone);
+}
+
+size_t devmap_count_devices(dev_handle_t ns_handle)
+{
+	int phone = devmap_get_phone(DEVMAP_CLIENT, IPC_FLAG_BLOCKING);
+	
+	if (phone < 0)
+		return 0;
+	
+	return devmap_count_devices_internal(phone, ns_handle);
+}
+
+size_t devmap_get_namespaces(dev_desc_t **data)
+{
+	int phone = devmap_get_phone(DEVMAP_CLIENT, IPC_FLAG_BLOCKING);
+	
+	if (phone < 0)
+		return 0;
+	
+	/* Loop until namespaces read succesful */
+	while (true) {
+		size_t count = devmap_count_namespaces_internal(phone);
+		if (count == 0)
+			return 0;
+		
+		dev_desc_t *devs = (dev_desc_t *) calloc(count, sizeof(dev_desc_t));
+		if (devs == NULL)
+			return 0;
+		
+		async_serialize_start();
+		
+		ipc_call_t answer;
+		aid_t req = async_send_0(phone, DEVMAP_GET_NAMESPACES, &answer);
+		
+		int rc = async_data_read_start(phone, devs, count * sizeof(dev_desc_t));
+		if (rc == EOVERFLOW) {
+			/*
+			 * Number of namespaces has changed since
+			 * the last call of DEVMAP_DEVICE_GET_NAMESPACE_COUNT
+			 */
+			async_serialize_end();
+			free(devs);
+			continue;
+		}
+		
+		if (rc != EOK) {
+			async_wait_for(req, NULL);
+			async_serialize_end();
+			free(devs);
+			return 0;
+		}
+		
+		ipcarg_t retval;
+		async_wait_for(req, &retval);
+		async_serialize_end();
+		
+		if (retval != EOK)
+			return 0;
+		
+		*data = devs;
+		return count;
+	}
+}
+
+size_t devmap_get_devices(dev_handle_t ns_handle, dev_desc_t **data)
+{
+	int phone = devmap_get_phone(DEVMAP_CLIENT, IPC_FLAG_BLOCKING);
+	
+	if (phone < 0)
+		return 0;
+	
+	/* Loop until namespaces read succesful */
+	while (true) {
+		size_t count = devmap_count_devices_internal(phone, ns_handle);
+		if (count == 0)
+			return 0;
+		
+		dev_desc_t *devs = (dev_desc_t *) calloc(count, sizeof(dev_desc_t));
+		if (devs == NULL)
+			return 0;
+		
+		async_serialize_start();
+		
+		ipc_call_t answer;
+		aid_t req = async_send_1(phone, DEVMAP_GET_DEVICES, ns_handle, &answer);
+		
+		int rc = async_data_read_start(phone, devs, count * sizeof(dev_desc_t));
+		if (rc == EOVERFLOW) {
+			/*
+			 * Number of devices has changed since
+			 * the last call of DEVMAP_DEVICE_GET_DEVICE_COUNT
+			 */
+			async_serialize_end();
+			free(devs);
+			continue;
+		}
+		
+		if (rc != EOK) {
+			async_wait_for(req, NULL);
+			async_serialize_end();
+			free(devs);
+			return 0;
+		}
+		
+		ipcarg_t retval;
+		async_wait_for(req, &retval);
+		async_serialize_end();
+		
+		if (retval != EOK)
+			return 0;
+		
+		*data = devs;
+		return count;
+	}
+}
Index: uspace/lib/c/generic/err.c
===================================================================
--- uspace/lib/c/generic/err.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/generic/err.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,46 @@
+/*
+ * 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 libc
+ * @{
+ */
+/** @file
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+
+/* TODO
+void errx(int __status, __const char *__format, ...)
+{
+	_exit(0);
+}
+*/
+
+/** @}
+ */
Index: uspace/lib/c/generic/errno.c
===================================================================
--- uspace/lib/c/generic/errno.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/generic/errno.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2009 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 libc
+ * @{
+ */
+/** @file
+ */
+
+#include <errno.h>
+#include <fibril.h>
+
+int _errno;
+
+/** @}
+ */
Index: uspace/lib/c/generic/event.c
===================================================================
--- uspace/lib/c/generic/event.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/generic/event.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,57 @@
+/*
+ * 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.
+ */
+
+/** @addtogroup libc
+ * @{
+ * @}
+ */
+
+/** @addtogroup libc
+ */
+/** @file
+ */ 
+
+#include <libc.h>
+#include <event.h>
+#include <kernel/ipc/event_types.h>
+#include <ipc/ipc.h>
+
+/** Subscribe for event notifications.
+ *
+ * @param evno   Event number.
+ * @param method Use this method for notifying me.
+ *
+ * @return Value returned by the kernel.
+ */
+int event_subscribe(event_type_t e, ipcarg_t method)
+{
+	return __SYSCALL2(SYS_EVENT_SUBSCRIBE, (sysarg_t) e, (sysarg_t) method);
+}
+
+/** @}
+ */
Index: uspace/lib/c/generic/fibril.c
===================================================================
--- uspace/lib/c/generic/fibril.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/generic/fibril.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,354 @@
+/*
+ * Copyright (c) 2006 Ondrej Palkovsky
+ * Copyright (c) 2007 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 libc
+ * @{
+ */
+/** @file
+ */
+
+#include <adt/list.h>
+#include <fibril.h>
+#include <thread.h>
+#include <tls.h>
+#include <malloc.h>
+#include <unistd.h>
+#include <stdio.h>
+#include <arch/barrier.h>
+#include <libarch/faddr.h>
+#include <futex.h>
+#include <assert.h>
+#include <async.h>
+
+#ifndef FIBRIL_INITIAL_STACK_PAGES_NO
+#define FIBRIL_INITIAL_STACK_PAGES_NO	1
+#endif
+
+/**
+ * This futex serializes access to ready_list, serialized_list and manager_list.
+ */ 
+static atomic_t fibril_futex = FUTEX_INITIALIZER;
+
+static LIST_INITIALIZE(ready_list);
+static LIST_INITIALIZE(serialized_list);
+static LIST_INITIALIZE(manager_list);
+
+static void fibril_main(void);
+
+/** Number of threads that are executing a manager fibril. */
+static int threads_in_manager;
+/** Number of threads that are executing a manager fibril and are serialized. */
+static int serialized_threads;	/* Protected by async_futex */
+/** Fibril-local count of serialization. If > 0, we must not preempt */
+static fibril_local int serialization_count;
+
+/** Setup fibril information into TCB structure */
+fibril_t *fibril_setup(void)
+{
+	fibril_t *f;
+	tcb_t *tcb;
+
+	tcb = __make_tls();
+	if (!tcb)
+		return NULL;
+
+	f = malloc(sizeof(fibril_t));
+	if (!f) {
+		__free_tls(tcb);
+		return NULL;
+	}
+
+	tcb->fibril_data = f;
+	f->tcb = tcb;
+
+	f->func = NULL;
+	f->arg = NULL;
+	f->stack = NULL;
+	f->clean_after_me = NULL;
+	f->retval = 0;
+	f->flags = 0;
+
+	return f;
+}
+
+void fibril_teardown(fibril_t *f)
+{
+	__free_tls(f->tcb);
+	free(f);
+}
+
+/** Function that spans the whole life-cycle of a fibril.
+ *
+ * Each fibril begins execution in this function. Then the function implementing
+ * the fibril logic is called.  After its return, the return value is saved.
+ * The fibril then switches to another fibril, which cleans up after it.
+ */
+void fibril_main(void)
+{
+	fibril_t *f = __tcb_get()->fibril_data;
+
+	/* Call the implementing function. */
+	f->retval = f->func(f->arg);
+
+	fibril_switch(FIBRIL_FROM_DEAD);
+	/* not reached */
+}
+
+/** Switch from the current fibril.
+ *
+ * If calling with FIBRIL_TO_MANAGER parameter, the async_futex should be
+ * held.
+ *
+ * @param stype		Switch type. One of FIBRIL_PREEMPT, FIBRIL_TO_MANAGER,
+ * 			FIBRIL_FROM_MANAGER, FIBRIL_FROM_DEAD. The parameter
+ * 			describes the circumstances of the switch.
+ * @return		Return 0 if there is no ready fibril,
+ * 			return 1 otherwise.
+ */
+int fibril_switch(fibril_switch_type_t stype)
+{
+	int retval = 0;
+	
+	futex_down(&fibril_futex);
+	
+	if (stype == FIBRIL_PREEMPT && list_empty(&ready_list))
+		goto ret_0;
+	
+	if (stype == FIBRIL_FROM_MANAGER) {
+		if ((list_empty(&ready_list)) && (list_empty(&serialized_list)))
+			goto ret_0;
+		
+		/*
+		 * Do not preempt if there is not enough threads to run the
+		 * ready fibrils which are not serialized.
+		 */
+		if ((list_empty(&serialized_list)) &&
+		    (threads_in_manager <= serialized_threads)) {
+			goto ret_0;
+		}
+	}
+	
+	/* If we are going to manager and none exists, create it */
+	if ((stype == FIBRIL_TO_MANAGER) || (stype == FIBRIL_FROM_DEAD)) {
+		while (list_empty(&manager_list)) {
+			futex_up(&fibril_futex);
+			async_create_manager();
+			futex_down(&fibril_futex);
+		}
+	}
+	
+	fibril_t *srcf = __tcb_get()->fibril_data;
+	if (stype != FIBRIL_FROM_DEAD) {
+		
+		/* Save current state */
+		if (!context_save(&srcf->ctx)) {
+			if (serialization_count)
+				srcf->flags &= ~FIBRIL_SERIALIZED;
+			
+			if (srcf->clean_after_me) {
+				/*
+				 * Cleanup after the dead fibril from which we
+				 * restored context here.
+				 */
+				void *stack = srcf->clean_after_me->stack;
+				if (stack) {
+					/*
+					 * This check is necessary because a
+					 * thread could have exited like a
+					 * normal fibril using the
+					 * FIBRIL_FROM_DEAD switch type. In that
+					 * case, its fibril will not have the
+					 * stack member filled.
+					 */
+					free(stack);
+				}
+				fibril_teardown(srcf->clean_after_me);
+				srcf->clean_after_me = NULL;
+			}
+			
+			return 1;	/* futex_up already done here */
+		}
+		
+		/* Save myself to the correct run list */
+		if (stype == FIBRIL_PREEMPT)
+			list_append(&srcf->link, &ready_list);
+		else if (stype == FIBRIL_FROM_MANAGER) {
+			list_append(&srcf->link, &manager_list);
+			threads_in_manager--;
+		} else {
+			/*
+			 * If stype == FIBRIL_TO_MANAGER, don't put ourselves to
+			 * any list, we should already be somewhere, or we will
+			 * be lost.
+			 */
+		}
+	}
+	
+	/* Choose a new fibril to run */
+	fibril_t *dstf;
+	if ((stype == FIBRIL_TO_MANAGER) || (stype == FIBRIL_FROM_DEAD)) {
+		dstf = list_get_instance(manager_list.next, fibril_t, link);
+		if (serialization_count && stype == FIBRIL_TO_MANAGER) {
+			serialized_threads++;
+			srcf->flags |= FIBRIL_SERIALIZED;
+		}
+		threads_in_manager++;
+		
+		if (stype == FIBRIL_FROM_DEAD) 
+			dstf->clean_after_me = srcf;
+	} else {
+		if (!list_empty(&serialized_list)) {
+			dstf = list_get_instance(serialized_list.next, fibril_t,
+			    link);
+			serialized_threads--;
+		} else {
+			dstf = list_get_instance(ready_list.next, fibril_t,
+			    link);
+		}
+	}
+	list_remove(&dstf->link);
+	
+	futex_up(&fibril_futex);
+	context_restore(&dstf->ctx);
+	/* not reached */
+	
+ret_0:
+	futex_up(&fibril_futex);
+	return retval;
+}
+
+/** Create a new fibril.
+ *
+ * @param func		Implementing function of the new fibril.
+ * @param arg		Argument to pass to func.
+ *
+ * @return		Return 0 on failure or TLS of the new fibril.
+ */
+fid_t fibril_create(int (*func)(void *), void *arg)
+{
+	fibril_t *f;
+
+	f = fibril_setup();
+	if (!f) 
+		return 0;
+	f->stack = (char *) malloc(FIBRIL_INITIAL_STACK_PAGES_NO *
+	    getpagesize());
+	if (!f->stack) {
+		fibril_teardown(f);
+		return 0;
+	}
+	
+	f->func = func;
+	f->arg = arg;
+
+	context_save(&f->ctx);
+	context_set(&f->ctx, FADDR(fibril_main), f->stack,
+	    FIBRIL_INITIAL_STACK_PAGES_NO * getpagesize(), f->tcb);
+
+	return (fid_t) f;
+}
+
+/** Add a fibril to the ready list.
+ *
+ * @param fid		Pointer to the fibril structure of the fibril to be
+ *			added.
+ */
+void fibril_add_ready(fid_t fid)
+{
+	fibril_t *f;
+
+	f = (fibril_t *) fid;
+	futex_down(&fibril_futex);
+	if ((f->flags & FIBRIL_SERIALIZED))
+		list_append(&f->link, &serialized_list);
+	else
+		list_append(&f->link, &ready_list);
+	futex_up(&fibril_futex);
+}
+
+/** Add a fibril to the manager list.
+ *
+ * @param fid		Pointer to the fibril structure of the fibril to be
+ *			added.
+ */
+void fibril_add_manager(fid_t fid)
+{
+	fibril_t *f;
+
+	f = (fibril_t *) fid;
+
+	futex_down(&fibril_futex);
+	list_append(&f->link, &manager_list);
+	futex_up(&fibril_futex);
+}
+
+/** Remove one manager from the manager list. */
+void fibril_remove_manager(void)
+{
+	futex_down(&fibril_futex);
+	if (list_empty(&manager_list)) {
+		futex_up(&fibril_futex);
+		return;
+	}
+	list_remove(manager_list.next);
+	futex_up(&fibril_futex);
+}
+
+/** Return fibril id of the currently running fibril.
+ *
+ * @return fibril ID of the currently running fibril.
+ *
+ */
+fid_t fibril_get_id(void)
+{
+	return (fid_t) __tcb_get()->fibril_data;
+}
+
+/** Disable preemption
+ *
+ * If the fibril wants to send several message in a row and does not want to be
+ * preempted, it should start async_serialize_start() in the beginning of
+ * communication and async_serialize_end() in the end. If it is a true
+ * multithreaded application, it should protect the communication channel by a
+ * futex as well.
+ *
+ */
+void fibril_inc_sercount(void)
+{
+	serialization_count++;
+}
+
+/** Restore the preemption counter to the previous state. */
+void fibril_dec_sercount(void)
+{
+	serialization_count--;
+}
+
+/** @}
+ */
Index: uspace/lib/c/generic/fibril_synch.c
===================================================================
--- uspace/lib/c/generic/fibril_synch.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/generic/fibril_synch.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,308 @@
+/*
+ * 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.
+ */
+
+/** @addtogroup libc
+ * @{
+ */
+/** @file
+ */
+
+#include <fibril_synch.h>
+#include <fibril.h>
+#include <async.h>
+#include <async_priv.h>
+#include <adt/list.h>
+#include <futex.h>
+#include <sys/time.h>
+#include <errno.h>
+#include <assert.h>
+
+static void optimize_execution_power(void)
+{
+	/*
+	 * When waking up a worker fibril previously blocked in fibril
+	 * synchronization, chances are that there is an idle manager fibril
+	 * waiting for IPC, that could start executing the awakened worker
+	 * fibril right away. We try to detect this and bring the manager
+	 * fibril back to fruitful work.
+	 */
+	if (atomic_get(&threads_in_ipc_wait) > 0)
+		ipc_poke();
+}
+
+void fibril_mutex_initialize(fibril_mutex_t *fm)
+{
+	fm->counter = 1;
+	list_initialize(&fm->waiters);
+}
+
+void fibril_mutex_lock(fibril_mutex_t *fm)
+{
+	futex_down(&async_futex);
+	if (fm->counter-- <= 0) {
+		awaiter_t wdata;
+
+		wdata.fid = fibril_get_id();
+		wdata.active = false;
+		wdata.wu_event.inlist = true;
+		link_initialize(&wdata.wu_event.link);
+		list_append(&wdata.wu_event.link, &fm->waiters);
+		fibril_switch(FIBRIL_TO_MANAGER);
+	} else {
+		futex_up(&async_futex);
+	}
+}
+
+bool fibril_mutex_trylock(fibril_mutex_t *fm)
+{
+	bool locked = false;
+	
+	futex_down(&async_futex);
+	if (fm->counter > 0) {
+		fm->counter--;
+		locked = true;
+	}
+	futex_up(&async_futex);
+	
+	return locked;
+}
+
+static void _fibril_mutex_unlock_unsafe(fibril_mutex_t *fm)
+{
+	assert(fm->counter <= 0);
+	if (fm->counter++ < 0) {
+		link_t *tmp;
+		awaiter_t *wdp;
+	
+		assert(!list_empty(&fm->waiters));
+		tmp = fm->waiters.next;
+		wdp = list_get_instance(tmp, awaiter_t, wu_event.link);
+		wdp->active = true;
+		wdp->wu_event.inlist = false;
+		list_remove(&wdp->wu_event.link);
+		fibril_add_ready(wdp->fid);
+		optimize_execution_power();
+	}
+}
+
+void fibril_mutex_unlock(fibril_mutex_t *fm)
+{
+	futex_down(&async_futex);
+	_fibril_mutex_unlock_unsafe(fm);
+	futex_up(&async_futex);
+}
+
+void fibril_rwlock_initialize(fibril_rwlock_t *frw)
+{
+	frw->writers = 0;
+	frw->readers = 0;
+	list_initialize(&frw->waiters);
+}
+
+void fibril_rwlock_read_lock(fibril_rwlock_t *frw)
+{
+	futex_down(&async_futex);
+	if (frw->writers) {
+		fibril_t *f = (fibril_t *) fibril_get_id();
+		awaiter_t wdata;
+
+		wdata.fid = (fid_t) f;
+		wdata.active = false;
+		wdata.wu_event.inlist = true;
+		link_initialize(&wdata.wu_event.link);
+		f->flags &= ~FIBRIL_WRITER;
+		list_append(&wdata.wu_event.link, &frw->waiters);
+		fibril_switch(FIBRIL_TO_MANAGER);
+	} else {
+		frw->readers++;
+		futex_up(&async_futex);
+	}
+}
+
+void fibril_rwlock_write_lock(fibril_rwlock_t *frw)
+{
+	futex_down(&async_futex);
+	if (frw->writers || frw->readers) {
+		fibril_t *f = (fibril_t *) fibril_get_id();
+		awaiter_t wdata;
+
+		wdata.fid = (fid_t) f;
+		wdata.active = false;
+		wdata.wu_event.inlist = true;
+		link_initialize(&wdata.wu_event.link);
+		f->flags |= FIBRIL_WRITER;
+		list_append(&wdata.wu_event.link, &frw->waiters);
+		fibril_switch(FIBRIL_TO_MANAGER);
+	} else {
+		frw->writers++;
+		futex_up(&async_futex);
+	}
+}
+
+static void _fibril_rwlock_common_unlock(fibril_rwlock_t *frw)
+{
+	futex_down(&async_futex);
+	assert(frw->readers || (frw->writers == 1));
+	if (frw->readers) {
+		if (--frw->readers)
+			goto out;
+	} else {
+		frw->writers--;
+	}
+	
+	assert(!frw->readers && !frw->writers);
+	
+	while (!list_empty(&frw->waiters)) {
+		link_t *tmp = frw->waiters.next;
+		awaiter_t *wdp;
+		fibril_t *f;
+		
+		wdp = list_get_instance(tmp, awaiter_t, wu_event.link);
+		f = (fibril_t *) wdp->fid;
+		
+		if (f->flags & FIBRIL_WRITER) {
+			if (frw->readers)
+				break;
+			wdp->active = true;
+			wdp->wu_event.inlist = false;
+			list_remove(&wdp->wu_event.link);
+			fibril_add_ready(wdp->fid);
+			frw->writers++;
+			optimize_execution_power();
+			break;
+		} else {
+			wdp->active = true;
+			wdp->wu_event.inlist = false;
+			list_remove(&wdp->wu_event.link);
+			fibril_add_ready(wdp->fid);
+			frw->readers++;
+			optimize_execution_power();
+		}
+	}
+out:
+	futex_up(&async_futex);
+}
+
+void fibril_rwlock_read_unlock(fibril_rwlock_t *frw)
+{
+	_fibril_rwlock_common_unlock(frw);
+}
+
+void fibril_rwlock_write_unlock(fibril_rwlock_t *frw)
+{
+	_fibril_rwlock_common_unlock(frw);
+}
+
+void fibril_condvar_initialize(fibril_condvar_t *fcv)
+{
+	list_initialize(&fcv->waiters);
+}
+
+int
+fibril_condvar_wait_timeout(fibril_condvar_t *fcv, fibril_mutex_t *fm,
+    suseconds_t timeout)
+{
+	awaiter_t wdata;
+
+	if (timeout < 0)
+		return ETIMEOUT;
+
+	wdata.fid = fibril_get_id();
+	wdata.active = false;
+	
+	wdata.to_event.inlist = timeout > 0;
+	wdata.to_event.occurred = false;
+	link_initialize(&wdata.to_event.link);
+
+	wdata.wu_event.inlist = true;
+	link_initialize(&wdata.wu_event.link);
+
+	futex_down(&async_futex);
+	if (timeout) {
+		gettimeofday(&wdata.to_event.expires, NULL);
+		tv_add(&wdata.to_event.expires, timeout);
+		async_insert_timeout(&wdata);
+	}
+	list_append(&wdata.wu_event.link, &fcv->waiters);
+	_fibril_mutex_unlock_unsafe(fm);
+	fibril_switch(FIBRIL_TO_MANAGER);
+	fibril_mutex_lock(fm);
+
+	/* async_futex not held after fibril_switch() */
+	futex_down(&async_futex);
+	if (wdata.to_event.inlist)
+		list_remove(&wdata.to_event.link);
+	if (wdata.wu_event.inlist)
+		list_remove(&wdata.wu_event.link);
+	futex_up(&async_futex);
+	
+	return wdata.to_event.occurred ? ETIMEOUT : EOK;
+}
+
+void fibril_condvar_wait(fibril_condvar_t *fcv, fibril_mutex_t *fm)
+{
+	int rc;
+
+	rc = fibril_condvar_wait_timeout(fcv, fm, 0);
+	assert(rc == EOK);
+}
+
+static void _fibril_condvar_wakeup_common(fibril_condvar_t *fcv, bool once)
+{
+	link_t *tmp;
+	awaiter_t *wdp;
+
+	futex_down(&async_futex);
+	while (!list_empty(&fcv->waiters)) {
+		tmp = fcv->waiters.next;
+		wdp = list_get_instance(tmp, awaiter_t, wu_event.link);
+		list_remove(&wdp->wu_event.link);
+		wdp->wu_event.inlist = false;
+		if (!wdp->active) {
+			wdp->active = true;
+			fibril_add_ready(wdp->fid);
+			optimize_execution_power();
+			if (once)
+				break;
+		}
+	}
+	futex_up(&async_futex);
+}
+
+void fibril_condvar_signal(fibril_condvar_t *fcv)
+{
+	_fibril_condvar_wakeup_common(fcv, true);
+}
+
+void fibril_condvar_broadcast(fibril_condvar_t *fcv)
+{
+	_fibril_condvar_wakeup_common(fcv, false);
+}
+
+/** @}
+ */
Index: uspace/lib/c/generic/futex.c
===================================================================
--- uspace/lib/c/generic/futex.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/generic/futex.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,91 @@
+/*
+ * Copyright (c) 2008 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 libc
+ * @{
+ */
+/** @file
+ */ 
+
+#include <futex.h>
+#include <atomic.h>
+#include <libc.h>
+#include <sys/types.h>
+
+/** Initialize futex counter.
+ *
+ * @param futex		Futex.
+ * @param val		Initialization value.
+ */
+void futex_initialize(futex_t *futex, int val)
+{
+	atomic_set(futex, val);
+}
+
+/** Try to down the futex.
+ *
+ * @param futex		Futex.
+ * @return		Non-zero if the futex was acquired.
+ * @return		Zero if the futex was not acquired.
+ */
+int futex_trydown(futex_t *futex)
+{
+	return cas(futex, 1, 0);
+}
+
+/** Down the futex.
+ *
+ * @param futex		Futex.
+ * @return		ENOENT if there is no such virtual address.
+ * @return		Zero in the uncontended case. 
+ * @return		Otherwise one of ESYNCH_OK_ATOMIC or ESYNCH_OK_BLOCKED.
+ */
+int futex_down(futex_t *futex)
+{
+	if ((atomic_signed_t) atomic_predec(futex) < 0)
+		return __SYSCALL1(SYS_FUTEX_SLEEP, (sysarg_t) &futex->count);
+
+	return 0;
+}
+
+/** Up the futex.
+ *
+ * @param futex		Futex.
+ * @return		ENOENT if there is no such virtual address.
+ * @return		Zero in the uncontended case.
+ */
+int futex_up(futex_t *futex)
+{
+	if ((atomic_signed_t) atomic_postinc(futex) < 0)
+		return __SYSCALL1(SYS_FUTEX_WAKEUP, (sysarg_t) &futex->count);
+		
+	return 0;
+}
+
+/** @}
+ */
Index: uspace/lib/c/generic/getopt.c
===================================================================
--- uspace/lib/c/generic/getopt.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/generic/getopt.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,479 @@
+/*	$NetBSD: getopt_long.c,v 1.21.4.1 2008/01/09 01:34:14 matt Exp $	*/
+
+/*-
+ * Copyright (c) 2000 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Dieter Baron and Thomas Klausner.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``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 FOUNDATION OR CONTRIBUTORS
+ * 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.
+ */
+
+/* Ported to HelenOS August 2008 by Tim Post <echo@echoreply.us> */
+
+#include <assert.h>
+#include <stdarg.h>
+#include <err.h>
+#include <errno.h>
+#include <getopt.h>
+#include <stdlib.h>
+#include <str.h>
+
+/* HelenOS Port : We're incorporating only the modern getopt_long with wrappers
+ * to keep legacy getopt() usage from breaking. All references to REPLACE_GETOPT
+ * are dropped, we just include the code */
+
+int	opterr = 1;		/* if error message should be printed */
+int	optind = 1;		/* index into parent argv vector */
+int	optopt = '?';		/* character checked for validity */
+int	optreset;		/* reset getopt */
+const char *optarg;		/* argument associated with option */
+
+
+#define IGNORE_FIRST	(*options == '-' || *options == '+')
+#define PRINT_ERROR	((opterr) && ((*options != ':') \
+				      || (IGNORE_FIRST && options[1] != ':')))
+/*HelenOS Port - POSIXLY_CORRECT is always false */
+#define IS_POSIXLY_CORRECT 0
+#define PERMUTE         (!IS_POSIXLY_CORRECT && !IGNORE_FIRST)
+/* XXX: GNU ignores PC if *options == '-' */
+#define IN_ORDER        (!IS_POSIXLY_CORRECT && *options == '-')
+
+/* return values */
+#define	BADCH	(int)'?'
+#define	BADARG		((IGNORE_FIRST && options[1] == ':') \
+			 || (*options == ':') ? (int)':' : (int)'?')
+#define INORDER (int)1
+
+#define	EMSG	""
+
+static int getopt_internal(int, char **, const char *);
+static int gcd(int, int);
+static void permute_args(int, int, int, char **);
+
+static const char *place = EMSG; /* option letter processing */
+
+/* XXX: set optreset to 1 rather than these two */
+static int nonopt_start = -1; /* first non option argument (for permute) */
+static int nonopt_end = -1;   /* first option after non options (for permute) */
+
+/* Error messages */
+
+/* HelenOS Port: Calls to warnx() were eliminated (as we have no stderr that
+ * may be redirected) and replaced with printf. As such, error messages now
+ * end in a newline */
+
+static const char recargchar[] = "option requires an argument -- %c\n";
+static const char recargstring[] = "option requires an argument -- %s\n";
+static const char ambig[] = "ambiguous option -- %.*s\n";
+static const char noarg[] = "option doesn't take an argument -- %.*s\n";
+static const char illoptchar[] = "unknown option -- %c\n";
+static const char illoptstring[] = "unknown option -- %s\n";
+
+
+/*
+ * Compute the greatest common divisor of a and b.
+ */
+static int
+gcd(a, b)
+	int a;
+	int b;
+{
+	int c;
+
+	c = a % b;
+	while (c != 0) {
+		a = b;
+		b = c;
+		c = a % b;
+	}
+	   
+	return b;
+}
+
+/*
+ * Exchange the block from nonopt_start to nonopt_end with the block
+ * from nonopt_end to opt_end (keeping the same order of arguments
+ * in each block).
+ */
+static void
+permute_args(panonopt_start, panonopt_end, opt_end, nargv)
+	int panonopt_start;
+	int panonopt_end;
+	int opt_end;
+	char **nargv;
+{
+	int cstart, cyclelen, i, j, ncycle, nnonopts, nopts, pos;
+	char *swap;
+
+	assert(nargv != NULL);
+
+	/*
+	 * compute lengths of blocks and number and size of cycles
+	 */
+	nnonopts = panonopt_end - panonopt_start;
+	nopts = opt_end - panonopt_end;
+	ncycle = gcd(nnonopts, nopts);
+	cyclelen = (opt_end - panonopt_start) / ncycle;
+
+	for (i = 0; i < ncycle; i++) {
+		cstart = panonopt_end+i;
+		pos = cstart;
+		for (j = 0; j < cyclelen; j++) {
+			if (pos >= panonopt_end)
+				pos -= nnonopts;
+			else
+				pos += nopts;
+			swap = nargv[pos];
+			nargv[pos] = nargv[cstart];
+			nargv[cstart] = swap;
+		}
+	}
+}
+
+/*
+ * getopt_internal --
+ *	Parse argc/argv argument vector.  Called by user level routines.
+ *  Returns -2 if -- is found (can be long option or end of options marker).
+ */
+static int
+getopt_internal(nargc, nargv, options)
+	int nargc;
+	char **nargv;
+	const char *options;
+{
+	const char *oli;				/* option letter list index */
+	int optchar;
+
+	assert(nargv != NULL);
+	assert(options != NULL);
+
+	optarg = NULL;
+
+	/*
+	 * XXX Some programs (like rsyncd) expect to be able to
+	 * XXX re-initialize optind to 0 and have getopt_long(3)
+	 * XXX properly function again.  Work around this braindamage.
+	 */
+	if (optind == 0)
+		optind = 1;
+
+	if (optreset)
+		nonopt_start = nonopt_end = -1;
+start:
+	if (optreset || !*place) {		/* update scanning pointer */
+		optreset = 0;
+		if (optind >= nargc) {          /* end of argument vector */
+			place = EMSG;
+			if (nonopt_end != -1) {
+				/* do permutation, if we have to */
+				permute_args(nonopt_start, nonopt_end,
+				    optind, nargv);
+				optind -= nonopt_end - nonopt_start;
+			}
+			else if (nonopt_start != -1) {
+				/*
+				 * If we skipped non-options, set optind
+				 * to the first of them.
+				 */
+				optind = nonopt_start;
+			}
+			nonopt_start = nonopt_end = -1;
+			return -1;
+		}
+		if ((*(place = nargv[optind]) != '-')
+		    || (place[1] == '\0')) {    /* found non-option */
+			place = EMSG;
+			if (IN_ORDER) {
+				/*
+				 * GNU extension: 
+				 * return non-option as argument to option 1
+				 */
+				optarg = nargv[optind++];
+				return INORDER;
+			}
+			if (!PERMUTE) {
+				/*
+				 * if no permutation wanted, stop parsing
+				 * at first non-option
+				 */
+				return -1;
+			}
+			/* do permutation */
+			if (nonopt_start == -1)
+				nonopt_start = optind;
+			else if (nonopt_end != -1) {
+				permute_args(nonopt_start, nonopt_end,
+				    optind, nargv);
+				nonopt_start = optind -
+				    (nonopt_end - nonopt_start);
+				nonopt_end = -1;
+			}
+			optind++;
+			/* process next argument */
+			goto start;
+		}
+		if (nonopt_start != -1 && nonopt_end == -1)
+			nonopt_end = optind;
+		if (place[1] && *++place == '-') {	/* found "--" */
+			place++;
+			return -2;
+		}
+	}
+	if ((optchar = (int)*place++) == (int)':' ||
+	    (oli = str_chr(options + (IGNORE_FIRST ? 1 : 0), optchar)) == NULL) {
+		/* option letter unknown or ':' */
+		if (!*place)
+			++optind;
+		if (PRINT_ERROR)
+			printf(illoptchar, optchar);
+		optopt = optchar;
+		return BADCH;
+	}
+	if (optchar == 'W' && oli[1] == ';') {		/* -W long-option */
+		/* XXX: what if no long options provided (called by getopt)? */
+		if (*place) 
+			return -2;
+
+		if (++optind >= nargc) {	/* no arg */
+			place = EMSG;
+			if (PRINT_ERROR)
+				printf(recargchar, optchar);
+			optopt = optchar;
+			return BADARG;
+		} else				/* white space */
+			place = nargv[optind];
+		/*
+		 * Handle -W arg the same as --arg (which causes getopt to
+		 * stop parsing).
+		 */
+		return -2;
+	}
+	if (*++oli != ':') {			/* doesn't take argument */
+		if (!*place)
+			++optind;
+	} else {				/* takes (optional) argument */
+		optarg = NULL;
+		if (*place)			/* no white space */
+			optarg = place;
+		/* XXX: disable test for :: if PC? (GNU doesn't) */
+		else if (oli[1] != ':') {	/* arg not optional */
+			if (++optind >= nargc) {	/* no arg */
+				place = EMSG;
+				if (PRINT_ERROR)
+					printf(recargchar, optchar);
+				optopt = optchar;
+				return BADARG;
+			} else
+				optarg = nargv[optind];
+		}
+		place = EMSG;
+		++optind;
+	}
+	/* dump back option letter */
+	return optchar;
+}
+
+/*
+ * getopt --
+ *	Parse argc/argv argument vector.
+ */
+int
+getopt(nargc, nargv, options)
+	int nargc;
+	char * const *nargv;
+	const char *options;
+{
+	int retval;
+
+	assert(nargv != NULL);
+	assert(options != NULL);
+
+	retval = getopt_internal(nargc, (char **)nargv, options);
+	if (retval == -2) {
+		++optind;
+		/*
+		 * We found an option (--), so if we skipped non-options,
+		 * we have to permute.
+		 */
+		if (nonopt_end != -1) {
+			permute_args(nonopt_start, nonopt_end, optind,
+				       (char **)nargv);
+			optind -= nonopt_end - nonopt_start;
+		}
+		nonopt_start = nonopt_end = -1;
+		retval = -1;
+	}
+	return retval;
+}
+
+/*
+ * getopt_long --
+ *	Parse argc/argv argument vector.
+ */
+int
+getopt_long(nargc, nargv, options, long_options, idx)
+	int nargc;
+	char * const *nargv;
+	const char *options;
+	const struct option *long_options;
+	int *idx;
+{
+	int retval;
+
+#define IDENTICAL_INTERPRETATION(_x, _y)				\
+	(long_options[(_x)].has_arg == long_options[(_y)].has_arg &&	\
+	 long_options[(_x)].flag == long_options[(_y)].flag &&		\
+	 long_options[(_x)].val == long_options[(_y)].val)
+
+	assert(nargv != NULL);
+	assert(options != NULL);
+	assert(long_options != NULL);
+	/* idx may be NULL */
+
+	retval = getopt_internal(nargc, (char **)nargv, options);
+	if (retval == -2) {
+		char *current_argv;
+		const char *has_equal;
+		size_t current_argv_len;
+		int i, ambiguous, match;
+
+		current_argv = (char *)place;
+		match = -1;
+		ambiguous = 0;
+
+		optind++;
+		place = EMSG;
+
+		if (*current_argv == '\0') {		/* found "--" */
+			/*
+			 * We found an option (--), so if we skipped
+			 * non-options, we have to permute.
+			 */
+			if (nonopt_end != -1) {
+				permute_args(nonopt_start, nonopt_end,
+				    optind, (char **)nargv);
+				optind -= nonopt_end - nonopt_start;
+			}
+			nonopt_start = nonopt_end = -1;
+			return -1;
+		}
+		if ((has_equal = str_chr(current_argv, '=')) != NULL) {
+			/* argument found (--option=arg) */
+			current_argv_len = has_equal - current_argv;
+			has_equal++;
+		} else
+			current_argv_len = str_size(current_argv);
+	    
+		for (i = 0; long_options[i].name; i++) {
+			/* find matching long option */
+			if (str_lcmp(current_argv, long_options[i].name,
+			    str_nlength(current_argv, current_argv_len)))
+				continue;
+
+			if (str_size(long_options[i].name) ==
+			    (unsigned)current_argv_len) {
+				/* exact match */
+				match = i;
+				ambiguous = 0;
+				break;
+			}
+			if (match == -1)		/* partial match */
+				match = i;
+			else if (!IDENTICAL_INTERPRETATION(i, match))
+				ambiguous = 1;
+		}
+		if (ambiguous) {
+			/* ambiguous abbreviation */
+			if (PRINT_ERROR)
+				printf(ambig, (int)current_argv_len,
+				     current_argv);
+			optopt = 0;
+			return BADCH;
+		}
+		if (match != -1) {			/* option found */
+		        if (long_options[match].has_arg == no_argument
+			    && has_equal) {
+				if (PRINT_ERROR)
+					printf(noarg, (int)current_argv_len,
+					     current_argv);
+				/*
+				 * XXX: GNU sets optopt to val regardless of
+				 * flag
+				 */
+				if (long_options[match].flag == NULL)
+					optopt = long_options[match].val;
+				else
+					optopt = 0;
+				return BADARG;
+			}
+			if (long_options[match].has_arg == required_argument ||
+			    long_options[match].has_arg == optional_argument) {
+				if (has_equal)
+					optarg = has_equal;
+				else if (long_options[match].has_arg ==
+				    required_argument) {
+					/*
+					 * optional argument doesn't use
+					 * next nargv
+					 */
+					optarg = nargv[optind++];
+				}
+			}
+			if ((long_options[match].has_arg == required_argument)
+			    && (optarg == NULL)) {
+				/*
+				 * Missing argument; leading ':'
+				 * indicates no error should be generated
+				 */
+				if (PRINT_ERROR)
+					printf(recargstring, current_argv);
+				/*
+				 * XXX: GNU sets optopt to val regardless
+				 * of flag
+				 */
+				if (long_options[match].flag == NULL)
+					optopt = long_options[match].val;
+				else
+					optopt = 0;
+				--optind;
+				return BADARG;
+			}
+		} else {			/* unknown option */
+			if (PRINT_ERROR)
+				printf(illoptstring, current_argv);
+			optopt = 0;
+			return BADCH;
+		}
+		if (long_options[match].flag) {
+			*long_options[match].flag = long_options[match].val;
+			retval = 0;
+		} else 
+			retval = long_options[match].val;
+		if (idx)
+			*idx = match;
+	}
+	return retval;
+#undef IDENTICAL_INTERPRETATION
+}
+
Index: uspace/lib/c/generic/io/asprintf.c
===================================================================
--- uspace/lib/c/generic/io/asprintf.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/generic/io/asprintf.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,89 @@
+/*
+ * Copyright (c) 2006 Josef Cejka
+ * Copyright (c) 2008 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 libc
+ * @{
+ */
+/** @file
+ */
+
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <str.h>
+#include <io/printf_core.h>
+
+static int asprintf_str_write(const char *str, size_t count, void *unused)
+{
+	return str_nlength(str, count);
+}
+
+static int asprintf_wstr_write(const wchar_t *str, size_t count, void *unused)
+{
+	return wstr_nlength(str, count);
+}
+
+/** Allocate and print to string.
+ *
+ * @param strp Address of the pointer where to store the address of
+ *             the newly allocated string.
+ * @fmt        Format string.
+ *
+ * @return Number of characters printed or a negative error code.
+ *
+ */
+int asprintf(char **strp, const char *fmt, ...)
+{
+	struct printf_spec ps = {
+		asprintf_str_write,
+		asprintf_wstr_write,
+		NULL
+	};
+	
+	va_list args;
+	va_start(args, fmt);
+	
+	int ret = printf_core(fmt, &ps, args);
+	va_end(args);
+	
+	if (ret > 0) {
+		*strp = malloc(STR_BOUNDS(ret) + 1);
+		if (*strp == NULL)
+			return -1;
+		
+		va_start(args, fmt);
+		vsnprintf(*strp, STR_BOUNDS(ret) + 1, fmt, args);
+		va_end(args);
+	}
+	
+	return ret;
+}
+
+/** @}
+ */
Index: uspace/lib/c/generic/io/console.c
===================================================================
--- uspace/lib/c/generic/io/console.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/generic/io/console.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,134 @@
+/*
+ * Copyright (c) 2006 Josef Cejka
+ * Copyright (c) 2006 Jakub Vana
+ * 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.
+ */
+
+/** @addtogroup libc
+ * @{
+ */
+/** @file
+ */
+
+#include <libc.h>
+#include <async.h>
+#include <io/console.h>
+#include <ipc/console.h>
+
+void console_clear(int phone)
+{
+	async_msg_0(phone, CONSOLE_CLEAR);
+}
+
+int console_get_size(int phone, int *cols, int *rows)
+{
+	ipcarg_t cols_v;
+	ipcarg_t rows_v;
+	int rc;
+
+	rc = async_req_0_2(phone, CONSOLE_GET_SIZE, &cols_v, &rows_v);
+
+	*cols = (int) cols_v;
+	*rows = (int) rows_v;
+	return rc;
+}
+
+void console_set_style(int phone, int style)
+{
+	async_msg_1(phone, CONSOLE_SET_STYLE, style);
+}
+
+void console_set_color(int phone, int fg_color, int bg_color, int flags)
+{
+	async_msg_3(phone, CONSOLE_SET_COLOR, fg_color, bg_color, flags);
+}
+
+void console_set_rgb_color(int phone, int fg_color, int bg_color)
+{
+	async_msg_2(phone, CONSOLE_SET_RGB_COLOR, fg_color, bg_color);
+}
+
+void console_cursor_visibility(int phone, bool show)
+{
+	async_msg_1(phone, CONSOLE_CURSOR_VISIBILITY, show != false);
+}
+
+int console_get_color_cap(int phone, int *ccap)
+{
+	ipcarg_t ccap_tmp;
+	int rc;
+
+	rc = async_req_0_1(phone, CONSOLE_GET_COLOR_CAP, &ccap_tmp);
+	*ccap = ccap_tmp;
+
+	return rc;
+}
+
+void console_kcon_enable(int phone)
+{
+	async_msg_0(phone, CONSOLE_KCON_ENABLE);
+}
+
+int console_get_pos(int phone, int *col, int *row)
+{
+	ipcarg_t col_v;
+	ipcarg_t row_v;
+	int rc;
+
+	rc = async_req_0_2(phone, CONSOLE_GET_POS, &col_v, &row_v);
+
+	*col = (int) col_v;
+	*row = (int) row_v;
+	return rc;
+}
+
+void console_goto(int phone, int col, int row)
+{
+	async_msg_2(phone, CONSOLE_GOTO, col, row);
+}
+
+bool console_get_event(int phone, console_event_t *event)
+{
+	ipcarg_t type;
+	ipcarg_t key;
+	ipcarg_t mods;
+	ipcarg_t c;
+	
+	int rc = async_req_0_4(phone, CONSOLE_GET_EVENT, &type, &key, &mods, &c);
+	if (rc < 0)
+		return false;
+	
+	event->type = type;
+	event->key = key;
+	event->mods = mods;
+	event->c = c;
+	
+	return true;
+}
+
+/** @}
+ */
Index: uspace/lib/c/generic/io/io.c
===================================================================
--- uspace/lib/c/generic/io/io.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/generic/io/io.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,780 @@
+/*
+ * 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 libc
+ * @{
+ */
+/** @file
+ */
+
+#include <stdio.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <assert.h>
+#include <str.h>
+#include <errno.h>
+#include <bool.h>
+#include <malloc.h>
+#include <io/klog.h>
+#include <vfs/vfs.h>
+#include <ipc/devmap.h>
+#include <adt/list.h>
+
+static void _ffillbuf(FILE *stream);
+static void _fflushbuf(FILE *stream);
+
+static FILE stdin_null = {
+	.fd = -1,
+	.error = true,
+	.eof = true,
+	.klog = false,
+	.phone = -1,
+	.btype = _IONBF,
+	.buf = NULL,
+	.buf_size = 0,
+	.buf_head = NULL,
+	.buf_tail = NULL,
+	.buf_state = _bs_empty
+};
+
+static FILE stdout_klog = {
+	.fd = -1,
+	.error = false,
+	.eof = false,
+	.klog = true,
+	.phone = -1,
+	.btype = _IOLBF,
+	.buf = NULL,
+	.buf_size = BUFSIZ,
+	.buf_head = NULL,
+	.buf_tail = NULL,
+	.buf_state = _bs_empty
+};
+
+static FILE stderr_klog = {
+	.fd = -1,
+	.error = false,
+	.eof = false,
+	.klog = true,
+	.phone = -1,
+	.btype = _IONBF,
+	.buf = NULL,
+	.buf_size = 0,
+	.buf_head = NULL,
+	.buf_tail = NULL,
+	.buf_state = _bs_empty
+};
+
+FILE *stdin = NULL;
+FILE *stdout = NULL;
+FILE *stderr = NULL;
+
+static LIST_INITIALIZE(files);
+
+void __stdio_init(int filc, fdi_node_t *filv[])
+{
+	if (filc > 0) {
+		stdin = fopen_node(filv[0], "r");
+	} else {
+		stdin = &stdin_null;
+		list_append(&stdin->link, &files);
+	}
+	
+	if (filc > 1) {
+		stdout = fopen_node(filv[1], "w");
+	} else {
+		stdout = &stdout_klog;
+		list_append(&stdout->link, &files);
+	}
+	
+	if (filc > 2) {
+		stderr = fopen_node(filv[2], "w");
+	} else {
+		stderr = &stderr_klog;
+		list_append(&stderr->link, &files);
+	}
+}
+
+void __stdio_done(void)
+{
+	link_t *link = files.next;
+	
+	while (link != &files) {
+		FILE *file = list_get_instance(link, FILE, link);
+		fclose(file);
+		link = files.next;
+	}
+}
+
+static bool parse_mode(const char *mode, int *flags)
+{
+	/* Parse mode except first character. */
+	const char *mp = mode;
+	if (*mp++ == 0) {
+		errno = EINVAL;
+		return false;
+	}
+	
+	if ((*mp == 'b') || (*mp == 't'))
+		mp++;
+	
+	bool plus;
+	if (*mp == '+') {
+		mp++;
+		plus = true;
+	} else
+		plus = false;
+	
+	if (*mp != 0) {
+		errno = EINVAL;
+		return false;
+	}
+	
+	/* Parse first character of mode and determine flags for open(). */
+	switch (mode[0]) {
+	case 'r':
+		*flags = plus ? O_RDWR : O_RDONLY;
+		break;
+	case 'w':
+		*flags = (O_TRUNC | O_CREAT) | (plus ? O_RDWR : O_WRONLY);
+		break;
+	case 'a':
+		/* TODO: a+ must read from beginning, append to the end. */
+		if (plus) {
+			errno = ENOTSUP;
+			return false;
+		}
+		*flags = (O_APPEND | O_CREAT) | (plus ? O_RDWR : O_WRONLY);
+	default:
+		errno = EINVAL;
+		return false;
+	}
+	
+	return true;
+}
+
+/** Set stream buffer. */
+void setvbuf(FILE *stream, void *buf, int mode, size_t size)
+{
+	stream->btype = mode;
+	stream->buf = buf;
+	stream->buf_size = size;
+	stream->buf_head = stream->buf;
+	stream->buf_tail = stream->buf;
+	stream->buf_state = _bs_empty;
+}
+
+static void _setvbuf(FILE *stream)
+{
+	/* FIXME: Use more complex rules for setting buffering options. */
+	
+	switch (stream->fd) {
+	case 1:
+		setvbuf(stream, NULL, _IOLBF, BUFSIZ);
+		break;
+	case 0:
+	case 2:
+		setvbuf(stream, NULL, _IONBF, 0);
+		break;
+	default:
+		setvbuf(stream, NULL, _IOFBF, BUFSIZ);
+	}
+}
+
+/** Allocate stream buffer. */
+static int _fallocbuf(FILE *stream)
+{
+	assert(stream->buf == NULL);
+	
+	stream->buf = malloc(stream->buf_size);
+	if (stream->buf == NULL) {
+		errno = ENOMEM;
+		return -1;
+	}
+	
+	stream->buf_head = stream->buf;
+	stream->buf_tail = stream->buf;
+	return 0;
+}
+
+/** Open a stream.
+ *
+ * @param path Path of the file to open.
+ * @param mode Mode string, (r|w|a)[b|t][+].
+ *
+ */
+FILE *fopen(const char *path, const char *mode)
+{
+	int flags;
+	if (!parse_mode(mode, &flags))
+		return NULL;
+	
+	/* Open file. */
+	FILE *stream = malloc(sizeof(FILE));
+	if (stream == NULL) {
+		errno = ENOMEM;
+		return NULL;
+	}
+	
+	stream->fd = open(path, flags, 0666);
+	if (stream->fd < 0) {
+		/* errno was set by open() */
+		free(stream);
+		return NULL;
+	}
+	
+	stream->error = false;
+	stream->eof = false;
+	stream->klog = false;
+	stream->phone = -1;
+	stream->need_sync = false;
+	_setvbuf(stream);
+	
+	list_append(&stream->link, &files);
+	
+	return stream;
+}
+
+FILE *fdopen(int fd, const char *mode)
+{
+	/* Open file. */
+	FILE *stream = malloc(sizeof(FILE));
+	if (stream == NULL) {
+		errno = ENOMEM;
+		return NULL;
+	}
+	
+	stream->fd = fd;
+	stream->error = false;
+	stream->eof = false;
+	stream->klog = false;
+	stream->phone = -1;
+	stream->need_sync = false;
+	_setvbuf(stream);
+	
+	list_append(&stream->link, &files);
+	
+	return stream;
+}
+
+FILE *fopen_node(fdi_node_t *node, const char *mode)
+{
+	int flags;
+	if (!parse_mode(mode, &flags))
+		return NULL;
+	
+	/* Open file. */
+	FILE *stream = malloc(sizeof(FILE));
+	if (stream == NULL) {
+		errno = ENOMEM;
+		return NULL;
+	}
+	
+	stream->fd = open_node(node, flags);
+	if (stream->fd < 0) {
+		/* errno was set by open_node() */
+		free(stream);
+		return NULL;
+	}
+	
+	stream->error = false;
+	stream->eof = false;
+	stream->klog = false;
+	stream->phone = -1;
+	stream->need_sync = false;
+	_setvbuf(stream);
+	
+	list_append(&stream->link, &files);
+	
+	return stream;
+}
+
+int fclose(FILE *stream)
+{
+	int rc = 0;
+	
+	fflush(stream);
+	
+	if (stream->phone >= 0)
+		ipc_hangup(stream->phone);
+	
+	if (stream->fd >= 0)
+		rc = close(stream->fd);
+	
+	list_remove(&stream->link);
+	
+	if ((stream != &stdin_null)
+	    && (stream != &stdout_klog)
+	    && (stream != &stderr_klog))
+		free(stream);
+	
+	stream = NULL;
+	
+	if (rc != 0) {
+		/* errno was set by close() */
+		return EOF;
+	}
+	
+	return 0;
+}
+
+/** Read from a stream (unbuffered).
+ *
+ * @param buf    Destination buffer.
+ * @param size   Size of each record.
+ * @param nmemb  Number of records to read.
+ * @param stream Pointer to the stream.
+ */
+static size_t _fread(void *buf, size_t size, size_t nmemb, FILE *stream)
+{
+	size_t left, done;
+
+	if (size == 0 || nmemb == 0)
+		return 0;
+
+	left = size * nmemb;
+	done = 0;
+	
+	while ((left > 0) && (!stream->error) && (!stream->eof)) {
+		ssize_t rd = read(stream->fd, buf + done, left);
+		
+		if (rd < 0)
+			stream->error = true;
+		else if (rd == 0)
+			stream->eof = true;
+		else {
+			left -= rd;
+			done += rd;
+		}
+	}
+	
+	return (done / size);
+}
+
+/** Write to a stream (unbuffered).
+ *
+ * @param buf    Source buffer.
+ * @param size   Size of each record.
+ * @param nmemb  Number of records to write.
+ * @param stream Pointer to the stream.
+ */
+static size_t _fwrite(const void *buf, size_t size, size_t nmemb, FILE *stream)
+{
+	size_t left;
+	size_t done;
+
+	if (size == 0 || nmemb == 0)
+		return 0;
+
+	left = size * nmemb;
+	done = 0;
+
+	while ((left > 0) && (!stream->error)) {
+		ssize_t wr;
+		
+		if (stream->klog)
+			wr = klog_write(buf + done, left);
+		else
+			wr = write(stream->fd, buf + done, left);
+		
+		if (wr <= 0)
+			stream->error = true;
+		else {
+			left -= wr;
+			done += wr;
+		}
+	}
+
+	if (done > 0)
+		stream->need_sync = true;
+	
+	return (done / size);
+}
+
+/** Read some data in stream buffer. */
+static void _ffillbuf(FILE *stream)
+{
+	ssize_t rc;
+
+	stream->buf_head = stream->buf_tail = stream->buf;
+
+	rc = read(stream->fd, stream->buf, stream->buf_size);
+	if (rc < 0) {
+		stream->error = true;
+		return;
+	}
+
+	if (rc == 0) {
+		stream->eof = true;
+		return;
+	}
+
+	stream->buf_head += rc;
+	stream->buf_state = _bs_read;
+}
+
+/** Write out stream buffer, do not sync stream. */
+static void _fflushbuf(FILE *stream)
+{
+	size_t bytes_used;
+
+	if ((!stream->buf) || (stream->btype == _IONBF) || (stream->error))
+		return;
+
+	bytes_used = stream->buf_head - stream->buf_tail;
+	if (bytes_used == 0)
+		return;
+
+	/* If buffer has prefetched read data, we need to seek back. */
+	if (stream->buf_state == _bs_read)
+		lseek(stream->fd, - (ssize_t) bytes_used, SEEK_CUR);
+
+	/* If buffer has unwritten data, we need to write them out. */
+	if (stream->buf_state == _bs_write)
+		(void) _fwrite(stream->buf_tail, 1, bytes_used, stream);
+
+	stream->buf_head = stream->buf;
+	stream->buf_tail = stream->buf;
+	stream->buf_state = _bs_empty;
+}
+
+/** Read from a stream.
+ *
+ * @param dest   Destination buffer.
+ * @param size   Size of each record.
+ * @param nmemb  Number of records to read.
+ * @param stream Pointer to the stream.
+ *
+ */
+size_t fread(void *dest, size_t size, size_t nmemb, FILE *stream)
+{
+	uint8_t *dp;
+	size_t bytes_left;
+	size_t now;
+	size_t data_avail;
+	size_t total_read;
+	size_t i;
+
+	if (size == 0 || nmemb == 0)
+		return 0;
+
+	/* If not buffered stream, read in directly. */
+	if (stream->btype == _IONBF) {
+		now = _fread(dest, size, nmemb, stream);
+		return now;
+	}
+
+	/* Make sure no data is pending write. */
+	if (stream->buf_state == _bs_write)
+		_fflushbuf(stream);
+
+	/* Perform lazy allocation of stream buffer. */
+	if (stream->buf == NULL) {
+		if (_fallocbuf(stream) != 0)
+			return 0; /* Errno set by _fallocbuf(). */
+	}
+
+	bytes_left = size * nmemb;
+	total_read = 0;
+	dp = (uint8_t *) dest;
+
+	while ((!stream->error) && (!stream->eof) && (bytes_left > 0)) {
+		if (stream->buf_head == stream->buf_tail)
+			_ffillbuf(stream);
+
+		if (stream->error || stream->eof)
+			break;
+
+		data_avail = stream->buf_head - stream->buf_tail;
+
+		if (bytes_left > data_avail)
+			now = data_avail;
+		else
+			now = bytes_left;
+
+		for (i = 0; i < now; i++) {
+			dp[i] = stream->buf_tail[i];
+		}
+
+		dp += now;
+		stream->buf_tail += now;
+		bytes_left -= now;
+		total_read += now;
+	}
+
+	return (total_read / size);
+}
+
+
+/** Write to a stream.
+ *
+ * @param buf    Source buffer.
+ * @param size   Size of each record.
+ * @param nmemb  Number of records to write.
+ * @param stream Pointer to the stream.
+ *
+ */
+size_t fwrite(const void *buf, size_t size, size_t nmemb, FILE *stream)
+{
+	uint8_t *data;
+	size_t bytes_left;
+	size_t now;
+	size_t buf_free;
+	size_t total_written;
+	size_t i;
+	uint8_t b;
+	bool need_flush;
+
+	if (size == 0 || nmemb == 0)
+		return 0;
+
+	/* If not buffered stream, write out directly. */
+	if (stream->btype == _IONBF) {
+		now = _fwrite(buf, size, nmemb, stream);
+		fflush(stream);
+		return now;
+	}
+
+	/* Make sure buffer contains no prefetched data. */
+	if (stream->buf_state == _bs_read)
+		_fflushbuf(stream);
+
+
+	/* Perform lazy allocation of stream buffer. */
+	if (stream->buf == NULL) {
+		if (_fallocbuf(stream) != 0)
+			return 0; /* Errno set by _fallocbuf(). */
+	}
+	
+	data = (uint8_t *) buf;
+	bytes_left = size * nmemb;
+	total_written = 0;
+	need_flush = false;
+	
+	while ((!stream->error) && (bytes_left > 0)) {
+		buf_free = stream->buf_size - (stream->buf_head - stream->buf);
+		if (bytes_left > buf_free)
+			now = buf_free;
+		else
+			now = bytes_left;
+		
+		for (i = 0; i < now; i++) {
+			b = data[i];
+			stream->buf_head[i] = b;
+			
+			if ((b == '\n') && (stream->btype == _IOLBF))
+				need_flush = true;
+		}
+		
+		buf += now;
+		stream->buf_head += now;
+		buf_free -= now;
+		bytes_left -= now;
+		total_written += now;
+		
+		if (buf_free == 0) {
+			/* Only need to drain buffer. */
+			_fflushbuf(stream);
+			need_flush = false;
+		}
+	}
+	
+	if (total_written > 0)
+		stream->buf_state = _bs_write;
+
+	if (need_flush)
+		fflush(stream);
+	
+	return (total_written / size);
+}
+
+int fputc(wchar_t c, FILE *stream)
+{
+	char buf[STR_BOUNDS(1)];
+	size_t sz = 0;
+	
+	if (chr_encode(c, buf, &sz, STR_BOUNDS(1)) == EOK) {
+		size_t wr = fwrite(buf, 1, sz, stream);
+		
+		if (wr < sz)
+			return EOF;
+		
+		return (int) c;
+	}
+	
+	return EOF;
+}
+
+int putchar(wchar_t c)
+{
+	return fputc(c, stdout);
+}
+
+int fputs(const char *str, FILE *stream)
+{
+	return fwrite(str, str_size(str), 1, stream);
+}
+
+int puts(const char *str)
+{
+	return fputs(str, stdout);
+}
+
+int fgetc(FILE *stream)
+{
+	char c;
+	
+	/* This could be made faster by only flushing when needed. */
+	if (stdout)
+		fflush(stdout);
+	if (stderr)
+		fflush(stderr);
+	
+	if (fread(&c, sizeof(char), 1, stream) < sizeof(char))
+		return EOF;
+	
+	return (int) c;
+}
+
+char *fgets(char *str, int size, FILE *stream)
+{
+	int c;
+	int idx;
+
+	idx = 0;
+	while (idx < size - 1) {
+		c = fgetc(stream);
+		if (c == EOF)
+			break;
+
+		str[idx++] = c;
+
+		if (c == '\n')
+			break;
+	}
+
+	if (ferror(stream))
+		return NULL;
+
+	if (idx == 0)
+		return NULL;
+
+	str[idx] = '\0';
+	return str;
+}
+
+int getchar(void)
+{
+	return fgetc(stdin);
+}
+
+int fseek(FILE *stream, off64_t offset, int whence)
+{
+	off64_t rc;
+
+	_fflushbuf(stream);
+
+	rc = lseek(stream->fd, offset, whence);
+	if (rc == (off64_t) (-1)) {
+		/* errno has been set by lseek64. */
+		return -1;
+	}
+
+	stream->eof = false;
+	return 0;
+}
+
+off64_t ftell(FILE *stream)
+{
+	return lseek(stream->fd, 0, SEEK_CUR);
+}
+
+void rewind(FILE *stream)
+{
+	(void) fseek(stream, 0, SEEK_SET);
+}
+
+int fflush(FILE *stream)
+{
+	_fflushbuf(stream);
+	
+	if (stream->klog) {
+		klog_update();
+		return EOK;
+	}
+	
+	if (stream->fd >= 0 && stream->need_sync) {
+		/**
+		 * Better than syncing always, but probably still not the
+		 * right thing to do.
+		 */
+		stream->need_sync = false;
+		return fsync(stream->fd);
+	}
+	
+	return ENOENT;
+}
+
+int feof(FILE *stream)
+{
+	return stream->eof;
+}
+
+int ferror(FILE *stream)
+{
+	return stream->error;
+}
+
+void clearerr(FILE *stream)
+{
+	stream->eof = false;
+	stream->error = false;
+}
+
+int fphone(FILE *stream)
+{
+	if (stream->fd >= 0) {
+		if (stream->phone < 0)
+			stream->phone = fd_phone(stream->fd);
+		
+		return stream->phone;
+	}
+	
+	return -1;
+}
+
+int fnode(FILE *stream, fdi_node_t *node)
+{
+	if (stream->fd >= 0)
+		return fd_node(stream->fd, node);
+	
+	return ENOENT;
+}
+
+/** @}
+ */
Index: uspace/lib/c/generic/io/klog.c
===================================================================
--- uspace/lib/c/generic/io/klog.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/generic/io/klog.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,58 @@
+/*
+ * Copyright (c) 2006 Josef Cejka
+ * Copyright (c) 2006 Jakub Vana
+ * 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 libc
+ * @{
+ */
+/** @file
+ */
+
+#include <libc.h>
+#include <str.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <io/klog.h>
+
+size_t klog_write(const void *buf, size_t size)
+{
+	ssize_t ret = (ssize_t) __SYSCALL3(SYS_KLOG, 1, (sysarg_t) buf, size);
+	
+	if (ret >= 0)
+		return (size_t) ret;
+	
+	return 0;
+}
+
+void klog_update(void)
+{
+	(void) __SYSCALL3(SYS_KLOG, 1, NULL, 0);
+}
+
+/** @}
+ */
Index: uspace/lib/c/generic/io/printf.c
===================================================================
--- uspace/lib/c/generic/io/printf.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/generic/io/printf.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,78 @@
+/*
+ * 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 libc
+ * @{
+ */
+/** @file
+ */
+
+#include <io/printf_core.h>
+#include <stdio.h>
+
+/** Print formatted text.
+ *
+ * @param stream Output stream
+ * @param fmt    Format string
+ *
+ * \see For more details about format string see printf_core.
+ *
+ */
+int fprintf(FILE *stream, const char *fmt, ...)
+{
+	va_list args;
+	va_start(args, fmt);
+	
+	int ret = vfprintf(stream, fmt, args);
+	
+	va_end(args);
+	
+	return ret;
+}
+
+/** Print formatted text to stdout.
+ *
+ * @param fmt Format string
+ *
+ * \see For more details about format string see printf_core.
+ *
+ */
+int printf(const char *fmt, ...)
+{
+	va_list args;
+	va_start(args, fmt);
+	
+	int ret = vprintf(fmt, args);
+	
+	va_end(args);
+	
+	return ret;
+}
+
+/** @}
+ */
Index: uspace/lib/c/generic/io/printf_core.c
===================================================================
--- uspace/lib/c/generic/io/printf_core.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/generic/io/printf_core.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,891 @@
+/*
+ * Copyright (c) 2001-2004 Jakub Jermar
+ * Copyright (c) 2006 Josef Cejka
+ * Copyright (c) 2009 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 generic
+ * @{
+ */
+/**
+ * @file
+ * @brief Printing functions.
+ */
+
+#include <unistd.h>
+#include <stdio.h>
+#include <io/printf_core.h>
+#include <ctype.h>
+#include <str.h>
+
+/** show prefixes 0x or 0 */
+#define __PRINTF_FLAG_PREFIX       0x00000001
+/** signed / unsigned number */
+#define __PRINTF_FLAG_SIGNED       0x00000002
+/** print leading zeroes */
+#define __PRINTF_FLAG_ZEROPADDED   0x00000004
+/** align to left */
+#define __PRINTF_FLAG_LEFTALIGNED  0x00000010
+/** always show + sign */
+#define __PRINTF_FLAG_SHOWPLUS     0x00000020
+/** print space instead of plus */
+#define __PRINTF_FLAG_SPACESIGN    0x00000040
+/** show big characters */
+#define __PRINTF_FLAG_BIGCHARS     0x00000080
+/** number has - sign */
+#define __PRINTF_FLAG_NEGATIVE     0x00000100
+
+/**
+ * Buffer big enough for 64-bit number printed in base 2, sign, prefix and 0
+ * to terminate string... (last one is only for better testing end of buffer by
+ * zero-filling subroutine)
+ */
+#define PRINT_NUMBER_BUFFER_SIZE  (64 + 5)
+
+/** Enumeration of possible arguments types.
+ */
+typedef enum {
+	PrintfQualifierByte = 0,
+	PrintfQualifierShort,
+	PrintfQualifierInt,
+	PrintfQualifierLong,
+	PrintfQualifierLongLong,
+	PrintfQualifierPointer
+} qualifier_t;
+
+static char nullstr[] = "(NULL)";
+static char digits_small[] = "0123456789abcdef";
+static char digits_big[] = "0123456789ABCDEF";
+static char invalch = U_SPECIAL;
+
+/** Print one or more characters without adding newline.
+ *
+ * @param buf  Buffer holding characters with size of
+ *             at least size bytes. NULL is not allowed!
+ * @param size Size of the buffer in bytes.
+ * @param ps   Output method and its data.
+ *
+ * @return Number of characters printed.
+ *
+ */
+static int printf_putnchars(const char *buf, size_t size,
+    printf_spec_t *ps)
+{
+	return ps->str_write((void *) buf, size, ps->data);
+}
+
+/** Print one or more wide characters without adding newline.
+ *
+ * @param buf  Buffer holding wide characters with size of
+ *             at least size bytes. NULL is not allowed!
+ * @param size Size of the buffer in bytes.
+ * @param ps   Output method and its data.
+ *
+ * @return Number of wide characters printed.
+ *
+ */
+static int printf_wputnchars(const wchar_t *buf, size_t size,
+    printf_spec_t *ps)
+{
+	return ps->wstr_write((void *) buf, size, ps->data);
+}
+
+/** Print string without adding a newline.
+ *
+ * @param str String to print.
+ * @param ps  Write function specification and support data.
+ *
+ * @return Number of characters printed.
+ *
+ */
+static int printf_putstr(const char *str, printf_spec_t *ps)
+{
+	if (str == NULL)
+		return printf_putnchars(nullstr, str_size(nullstr), ps);
+	
+	return ps->str_write((void *) str, str_size(str), ps->data);
+}
+
+/** Print one ASCII character.
+ *
+ * @param c  ASCII character to be printed.
+ * @param ps Output method.
+ *
+ * @return Number of characters printed.
+ *
+ */
+static int printf_putchar(const char ch, printf_spec_t *ps)
+{
+	if (!ascii_check(ch))
+		return ps->str_write((void *) &invalch, 1, ps->data);
+	
+	return ps->str_write(&ch, 1, ps->data);
+}
+
+/** Print one wide character.
+ *
+ * @param c  Wide character to be printed.
+ * @param ps Output method.
+ *
+ * @return Number of characters printed.
+ *
+ */
+static int printf_putwchar(const wchar_t ch, printf_spec_t *ps)
+{
+	if (!chr_check(ch))
+		return ps->str_write((void *) &invalch, 1, ps->data);
+	
+	return ps->wstr_write(&ch, sizeof(wchar_t), ps->data);
+}
+
+/** Print one formatted ASCII character.
+ *
+ * @param ch    Character to print.
+ * @param width Width modifier.
+ * @param flags Flags that change the way the character is printed.
+ *
+ * @return Number of characters printed, negative value on failure.
+ *
+ */
+static int print_char(const char ch, int width, uint32_t flags, printf_spec_t *ps)
+{
+	size_t counter = 0;
+	if (!(flags & __PRINTF_FLAG_LEFTALIGNED)) {
+		while (--width > 0) {
+			/*
+			 * One space is consumed by the character itself, hence
+			 * the predecrement.
+			 */
+			if (printf_putchar(' ', ps) > 0)
+				counter++;
+		}
+	}
+	
+	if (printf_putchar(ch, ps) > 0)
+		counter++;
+	
+	while (--width > 0) {
+		/*
+		 * One space is consumed by the character itself, hence
+		 * the predecrement.
+		 */
+		if (printf_putchar(' ', ps) > 0)
+			counter++;
+	}
+	
+	return (int) (counter + 1);
+}
+
+/** Print one formatted wide character.
+ *
+ * @param ch    Character to print.
+ * @param width Width modifier.
+ * @param flags Flags that change the way the character is printed.
+ *
+ * @return Number of characters printed, negative value on failure.
+ *
+ */
+static int print_wchar(const wchar_t ch, int width, uint32_t flags, printf_spec_t *ps)
+{
+	size_t counter = 0;
+	if (!(flags & __PRINTF_FLAG_LEFTALIGNED)) {
+		while (--width > 0) {
+			/*
+			 * One space is consumed by the character itself, hence
+			 * the predecrement.
+			 */
+			if (printf_putchar(' ', ps) > 0)
+				counter++;
+		}
+	}
+	
+	if (printf_putwchar(ch, ps) > 0)
+		counter++;
+	
+	while (--width > 0) {
+		/*
+		 * One space is consumed by the character itself, hence
+		 * the predecrement.
+		 */
+		if (printf_putchar(' ', ps) > 0)
+			counter++;
+	}
+	
+	return (int) (counter + 1);
+}
+
+/** Print string.
+ *
+ * @param str       String to be printed.
+ * @param width     Width modifier.
+ * @param precision Precision modifier.
+ * @param flags     Flags that modify the way the string is printed.
+ *
+ * @return Number of characters printed, negative value on failure.
+ */
+static int print_str(char *str, int width, unsigned int precision,
+    uint32_t flags, printf_spec_t *ps)
+{
+	if (str == NULL)
+		return printf_putstr(nullstr, ps);
+
+	/* Print leading spaces. */
+	size_t strw = str_length(str);
+	if (precision == 0)
+		precision = strw;
+
+	/* Left padding */
+	size_t counter = 0;
+	width -= precision;
+	if (!(flags & __PRINTF_FLAG_LEFTALIGNED)) {
+		while (width-- > 0) {
+			if (printf_putchar(' ', ps) == 1)
+				counter++;
+		}
+	}
+
+	/* Part of @a str fitting into the alloted space. */
+	int retval;
+	size_t size = str_lsize(str, precision);
+	if ((retval = printf_putnchars(str, size, ps)) < 0)
+		return -counter;
+
+	counter += retval;
+
+	/* Right padding */
+	while (width-- > 0) {
+		if (printf_putchar(' ', ps) == 1)
+			counter++;
+	}
+
+	return ((int) counter);
+
+}
+
+/** Print wide string.
+ *
+ * @param str       Wide string to be printed.
+ * @param width     Width modifier.
+ * @param precision Precision modifier.
+ * @param flags     Flags that modify the way the string is printed.
+ *
+ * @return Number of wide characters printed, negative value on failure.
+ */
+static int print_wstr(wchar_t *str, int width, unsigned int precision,
+    uint32_t flags, printf_spec_t *ps)
+{
+	if (str == NULL)
+		return printf_putstr(nullstr, ps);
+	
+	/* Print leading spaces. */
+	size_t strw = wstr_length(str);
+	if (precision == 0)
+		precision = strw;
+	
+	/* Left padding */
+	size_t counter = 0;
+	width -= precision;
+	if (!(flags & __PRINTF_FLAG_LEFTALIGNED)) {
+		while (width-- > 0) {
+			if (printf_putchar(' ', ps) == 1)
+				counter++;
+		}
+	}
+	
+	/* Part of @a wstr fitting into the alloted space. */
+	int retval;
+	size_t size = wstr_lsize(str, precision);
+	if ((retval = printf_wputnchars(str, size, ps)) < 0)
+		return -counter;
+	
+	counter += retval;
+	
+	/* Right padding */
+	while (width-- > 0) {
+		if (printf_putchar(' ', ps) == 1)
+			counter++;
+	}
+
+	return ((int) counter);
+}
+
+/** Print a number in a given base.
+ *
+ * Print significant digits of a number in given base.
+ *
+ * @param num       Number to print.
+ * @param width     Width modifier.
+ * @param precision Precision modifier.
+ * @param base      Base to print the number in (must be between 2 and 16).
+ * @param flags     Flags that modify the way the number is printed.
+ *
+ * @return Number of characters printed.
+ *
+ */
+static int print_number(uint64_t num, int width, int precision, int base,
+    uint32_t flags, printf_spec_t *ps)
+{
+	char *digits;
+	if (flags & __PRINTF_FLAG_BIGCHARS)
+		digits = digits_big;
+	else
+		digits = digits_small;
+	
+	char data[PRINT_NUMBER_BUFFER_SIZE];
+	char *ptr = &data[PRINT_NUMBER_BUFFER_SIZE - 1];
+	
+	/* Size of number with all prefixes and signs */
+	int size = 0;
+	
+	/* Put zero at end of string */
+	*ptr-- = 0;
+	
+	if (num == 0) {
+		*ptr-- = '0';
+		size++;
+	} else {
+		do {
+			*ptr-- = digits[num % base];
+			size++;
+		} while (num /= base);
+	}
+	
+	/* Size of plain number */
+	int number_size = size;
+	
+	/*
+	 * Collect the sum of all prefixes/signs/etc. to calculate padding and
+	 * leading zeroes.
+	 */
+	if (flags & __PRINTF_FLAG_PREFIX) {
+		switch(base) {
+		case 2:
+			/* Binary formating is not standard, but usefull */
+			size += 2;
+			break;
+		case 8:
+			size++;
+			break;
+		case 16:
+			size += 2;
+			break;
+		}
+	}
+	
+	char sgn = 0;
+	if (flags & __PRINTF_FLAG_SIGNED) {
+		if (flags & __PRINTF_FLAG_NEGATIVE) {
+			sgn = '-';
+			size++;
+		} else if (flags & __PRINTF_FLAG_SHOWPLUS) {
+			sgn = '+';
+			size++;
+		} else if (flags & __PRINTF_FLAG_SPACESIGN) {
+			sgn = ' ';
+			size++;
+		}
+	}
+	
+	if (flags & __PRINTF_FLAG_LEFTALIGNED)
+		flags &= ~__PRINTF_FLAG_ZEROPADDED;
+	
+	/*
+	 * If the number is left-aligned or precision is specified then
+	 * padding with zeros is ignored.
+	 */
+	if (flags & __PRINTF_FLAG_ZEROPADDED) {
+		if ((precision == 0) && (width > size))
+			precision = width - size + number_size;
+	}
+	
+	/* Print leading spaces */
+	if (number_size > precision) {
+		/* Print the whole number, not only a part */
+		precision = number_size;
+	}
+	
+	width -= precision + size - number_size;
+	size_t counter = 0;
+	
+	if (!(flags & __PRINTF_FLAG_LEFTALIGNED)) {
+		while (width-- > 0) {
+			if (printf_putchar(' ', ps) == 1)
+				counter++;
+		}
+	}
+	
+	/* Print sign */
+	if (sgn) {
+		if (printf_putchar(sgn, ps) == 1)
+			counter++;
+	}
+	
+	/* Print prefix */
+	if (flags & __PRINTF_FLAG_PREFIX) {
+		switch(base) {
+		case 2:
+			/* Binary formating is not standard, but usefull */
+			if (printf_putchar('0', ps) == 1)
+				counter++;
+			if (flags & __PRINTF_FLAG_BIGCHARS) {
+				if (printf_putchar('B', ps) == 1)
+					counter++;
+			} else {
+				if (printf_putchar('b', ps) == 1)
+					counter++;
+			}
+			break;
+		case 8:
+			if (printf_putchar('o', ps) == 1)
+				counter++;
+			break;
+		case 16:
+			if (printf_putchar('0', ps) == 1)
+				counter++;
+			if (flags & __PRINTF_FLAG_BIGCHARS) {
+				if (printf_putchar('X', ps) == 1)
+					counter++;
+			} else {
+				if (printf_putchar('x', ps) == 1)
+					counter++;
+			}
+			break;
+		}
+	}
+	
+	/* Print leading zeroes */
+	precision -= number_size;
+	while (precision-- > 0) {
+		if (printf_putchar('0', ps) == 1)
+			counter++;
+	}
+	
+	/* Print the number itself */
+	int retval;
+	if ((retval = printf_putstr(++ptr, ps)) > 0)
+		counter += retval;
+	
+	/* Print trailing spaces */
+	
+	while (width-- > 0) {
+		if (printf_putchar(' ', ps) == 1)
+			counter++;
+	}
+	
+	return ((int) counter);
+}
+
+/** Print formatted string.
+ *
+ * Print string formatted according to the fmt parameter and variadic arguments.
+ * Each formatting directive must have the following form:
+ *
+ *  \% [ FLAGS ] [ WIDTH ] [ .PRECISION ] [ TYPE ] CONVERSION
+ *
+ * FLAGS:@n
+ *  - "#" Force to print prefix. For \%o conversion, the prefix is 0, for
+ *        \%x and \%X prefixes are 0x and 0X and for conversion \%b the
+ *        prefix is 0b.
+ *
+ *  - "-" Align to left.
+ *
+ *  - "+" Print positive sign just as negative.
+ *
+ *  - " " If the printed number is positive and "+" flag is not set,
+ *        print space in place of sign.
+ *
+ *  - "0" Print 0 as padding instead of spaces. Zeroes are placed between
+ *        sign and the rest of the number. This flag is ignored if "-"
+ *        flag is specified.
+ *
+ * WIDTH:@n
+ *  - Specify the minimal width of a printed argument. If it is bigger,
+ *    width is ignored. If width is specified with a "*" character instead of
+ *    number, width is taken from parameter list. And integer parameter is
+ *    expected before parameter for processed conversion specification. If
+ *    this value is negative its absolute value is taken and the "-" flag is
+ *    set.
+ *
+ * PRECISION:@n
+ *  - Value precision. For numbers it specifies minimum valid numbers.
+ *    Smaller numbers are printed with leading zeroes. Bigger numbers are not
+ *    affected. Strings with more than precision characters are cut off. Just
+ *    as with width, an "*" can be used used instead of a number. An integer
+ *    value is then expected in parameters. When both width and precision are
+ *    specified using "*", the first parameter is used for width and the
+ *    second one for precision.
+ *
+ * TYPE:@n
+ *  - "hh" Signed or unsigned char.@n
+ *  - "h"  Signed or unsigned short.@n
+ *  - ""   Signed or unsigned int (default value).@n
+ *  - "l"  Signed or unsigned long int.@n
+ *         If conversion is "c", the character is wchar_t (wide character).@n
+ *         If conversion is "s", the string is wchar_t * (wide string).@n
+ *  - "ll" Signed or unsigned long long int.@n
+ *
+ * CONVERSION:@n
+ *  - % Print percentile character itself.
+ *
+ *  - c Print single character. The character is expected to be plain
+ *      ASCII (e.g. only values 0 .. 127 are valid).@n
+ *      If type is "l", then the character is expected to be wide character
+ *      (e.g. values 0 .. 0x10ffff are valid).
+ *
+ *  - s Print zero terminated string. If a NULL value is passed as
+ *      value, "(NULL)" is printed instead.@n
+ *      If type is "l", then the string is expected to be wide string.
+ *
+ *  - P, p Print value of a pointer. Void * value is expected and it is
+ *         printed in hexadecimal notation with prefix (as with \%#X / \%#x
+ *         for 32-bit or \%#X / \%#x for 64-bit long pointers).
+ *
+ *  - b Print value as unsigned binary number. Prefix is not printed by
+ *      default. (Nonstandard extension.)
+ *
+ *  - o Print value as unsigned octal number. Prefix is not printed by
+ *      default.
+ *
+ *  - d, i Print signed decimal number. There is no difference between d
+ *         and i conversion.
+ *
+ *  - u Print unsigned decimal number.
+ *
+ *  - X, x Print hexadecimal number with upper- or lower-case. Prefix is
+ *         not printed by default.
+ *
+ * All other characters from fmt except the formatting directives are printed
+ * verbatim.
+ *
+ * @param fmt Format NULL-terminated string.
+ *
+ * @return Number of characters printed, negative value on failure.
+ *
+ */
+int printf_core(const char *fmt, printf_spec_t *ps, va_list ap)
+{
+	size_t i;        /* Index of the currently processed character from fmt */
+	size_t nxt = 0;  /* Index of the next character from fmt */
+	size_t j = 0;    /* Index to the first not printed nonformating character */
+	
+	size_t counter = 0;   /* Number of characters printed */
+	int retval;           /* Return values from nested functions */
+	
+	while (true) {
+		i = nxt;
+		wchar_t uc = str_decode(fmt, &nxt, STR_NO_LIMIT);
+		
+		if (uc == 0)
+			break;
+		
+		/* Control character */
+		if (uc == '%') {
+			/* Print common characters if any processed */
+			if (i > j) {
+				if ((retval = printf_putnchars(&fmt[j], i - j, ps)) < 0) {
+					/* Error */
+					counter = -counter;
+					goto out;
+				}
+				counter += retval;
+			}
+			
+			j = i;
+			
+			/* Parse modifiers */
+			uint32_t flags = 0;
+			bool end = false;
+			
+			do {
+				i = nxt;
+				uc = str_decode(fmt, &nxt, STR_NO_LIMIT);
+				switch (uc) {
+				case '#':
+					flags |= __PRINTF_FLAG_PREFIX;
+					break;
+				case '-':
+					flags |= __PRINTF_FLAG_LEFTALIGNED;
+					break;
+				case '+':
+					flags |= __PRINTF_FLAG_SHOWPLUS;
+					break;
+				case ' ':
+					flags |= __PRINTF_FLAG_SPACESIGN;
+					break;
+				case '0':
+					flags |= __PRINTF_FLAG_ZEROPADDED;
+					break;
+				default:
+					end = true;
+				};
+			} while (!end);
+			
+			/* Width & '*' operator */
+			int width = 0;
+			if (isdigit(uc)) {
+				while (true) {
+					width *= 10;
+					width += uc - '0';
+					
+					i = nxt;
+					uc = str_decode(fmt, &nxt, STR_NO_LIMIT);
+					if (uc == 0)
+						break;
+					if (!isdigit(uc))
+						break;
+				}
+			} else if (uc == '*') {
+				/* Get width value from argument list */
+				i = nxt;
+				uc = str_decode(fmt, &nxt, STR_NO_LIMIT);
+				width = (int) va_arg(ap, int);
+				if (width < 0) {
+					/* Negative width sets '-' flag */
+					width *= -1;
+					flags |= __PRINTF_FLAG_LEFTALIGNED;
+				}
+			}
+			
+			/* Precision and '*' operator */
+			int precision = 0;
+			if (uc == '.') {
+				i = nxt;
+				uc = str_decode(fmt, &nxt, STR_NO_LIMIT);
+				if (isdigit(uc)) {
+					while (true) {
+						precision *= 10;
+						precision += uc - '0';
+						
+						i = nxt;
+						uc = str_decode(fmt, &nxt, STR_NO_LIMIT);
+						if (uc == 0)
+							break;
+						if (!isdigit(uc))
+							break;
+					}
+				} else if (uc == '*') {
+					/* Get precision value from the argument list */
+					i = nxt;
+					uc = str_decode(fmt, &nxt, STR_NO_LIMIT);
+					precision = (int) va_arg(ap, int);
+					if (precision < 0) {
+						/* Ignore negative precision */
+						precision = 0;
+					}
+				}
+			}
+			
+			qualifier_t qualifier;
+			
+			switch (uc) {
+			/** @todo Unimplemented qualifiers:
+			 *        t ptrdiff_t - ISO C 99
+			 */
+			case 'h':
+				/* Char or short */
+				qualifier = PrintfQualifierShort;
+				i = nxt;
+				uc = str_decode(fmt, &nxt, STR_NO_LIMIT);
+				if (uc == 'h') {
+					i = nxt;
+					uc = str_decode(fmt, &nxt, STR_NO_LIMIT);
+					qualifier = PrintfQualifierByte;
+				}
+				break;
+			case 'l':
+				/* Long or long long */
+				qualifier = PrintfQualifierLong;
+				i = nxt;
+				uc = str_decode(fmt, &nxt, STR_NO_LIMIT);
+				if (uc == 'l') {
+					i = nxt;
+					uc = str_decode(fmt, &nxt, STR_NO_LIMIT);
+					qualifier = PrintfQualifierLongLong;
+				}
+				break;
+			default:
+				/* Default type */
+				qualifier = PrintfQualifierInt;
+			}
+			
+			unsigned int base = 10;
+			
+			switch (uc) {
+			/*
+			 * String and character conversions.
+			 */
+			case 's':
+				if (qualifier == PrintfQualifierLong)
+					retval = print_wstr(va_arg(ap, wchar_t *), width, precision, flags, ps);
+				else
+					retval = print_str(va_arg(ap, char *), width, precision, flags, ps);
+				
+				if (retval < 0) {
+					counter = -counter;
+					goto out;
+				}
+				
+				counter += retval;
+				j = nxt;
+				goto next_char;
+			case 'c':
+				if (qualifier == PrintfQualifierLong)
+					retval = print_wchar(va_arg(ap, wchar_t), width, flags, ps);
+				else
+					retval = print_char(va_arg(ap, unsigned int), width, flags, ps);
+				
+				if (retval < 0) {
+					counter = -counter;
+					goto out;
+				};
+				
+				counter += retval;
+				j = nxt;
+				goto next_char;
+			
+			/*
+			 * Integer values
+			 */
+			case 'P':
+				/* Pointer */
+				flags |= __PRINTF_FLAG_BIGCHARS;
+			case 'p':
+				flags |= __PRINTF_FLAG_PREFIX;
+				base = 16;
+				qualifier = PrintfQualifierPointer;
+				break;
+			case 'b':
+				base = 2;
+				break;
+			case 'o':
+				base = 8;
+				break;
+			case 'd':
+			case 'i':
+				flags |= __PRINTF_FLAG_SIGNED;
+			case 'u':
+				break;
+			case 'X':
+				flags |= __PRINTF_FLAG_BIGCHARS;
+			case 'x':
+				base = 16;
+				break;
+			
+			/* Percentile itself */
+			case '%':
+				j = i;
+				goto next_char;
+			
+			/*
+			 * Bad formatting.
+			 */
+			default:
+				/*
+				 * Unknown format. Now, j is the index of '%'
+				 * so we will print whole bad format sequence.
+				 */
+				goto next_char;
+			}
+			
+			/* Print integers */
+			size_t size;
+			uint64_t number;
+			switch (qualifier) {
+			case PrintfQualifierByte:
+				size = sizeof(unsigned char);
+				number = (uint64_t) va_arg(ap, unsigned int);
+				break;
+			case PrintfQualifierShort:
+				size = sizeof(unsigned short);
+				number = (uint64_t) va_arg(ap, unsigned int);
+				break;
+			case PrintfQualifierInt:
+				size = sizeof(unsigned int);
+				number = (uint64_t) va_arg(ap, unsigned int);
+				break;
+			case PrintfQualifierLong:
+				size = sizeof(unsigned long);
+				number = (uint64_t) va_arg(ap, unsigned long);
+				break;
+			case PrintfQualifierLongLong:
+				size = sizeof(unsigned long long);
+				number = (uint64_t) va_arg(ap, unsigned long long);
+				break;
+			case PrintfQualifierPointer:
+				size = sizeof(void *);
+				number = (uint64_t) (unsigned long) va_arg(ap, void *);
+				break;
+			default:
+				/* Unknown qualifier */
+				counter = -counter;
+				goto out;
+			}
+			
+			if (flags & __PRINTF_FLAG_SIGNED) {
+				if (number & (0x1 << (size * 8 - 1))) {
+					flags |= __PRINTF_FLAG_NEGATIVE;
+					
+					if (size == sizeof(uint64_t)) {
+						number = -((int64_t) number);
+					} else {
+						number = ~number;
+						number &=
+						    ~(0xFFFFFFFFFFFFFFFFll <<
+						    (size * 8));
+						number++;
+					}
+				}
+			}
+			
+			if ((retval = print_number(number, width, precision,
+			    base, flags, ps)) < 0) {
+				counter = -counter;
+				goto out;
+			}
+			
+			counter += retval;
+			j = nxt;
+		}
+next_char:
+		;
+	}
+	
+	if (i > j) {
+		if ((retval = printf_putnchars(&fmt[j], i - j, ps)) < 0) {
+			/* Error */
+			counter = -counter;
+			goto out;
+		}
+		counter += retval;
+	}
+	
+out:
+	return ((int) counter);
+}
+
+/** @}
+ */
Index: uspace/lib/c/generic/io/snprintf.c
===================================================================
--- uspace/lib/c/generic/io/snprintf.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/generic/io/snprintf.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,61 @@
+/*
+ * 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 libc
+ * @{
+ */
+/** @file
+ */
+
+#include <stdarg.h>
+#include <stdio.h>
+#include <io/printf_core.h>
+
+/** Print formatted to the given buffer with limited size.
+ *
+ * @param str  Buffer
+ * @param size Buffer size
+ * @param fmt  Format string
+ *
+ * \see For more details about format string see printf_core.
+ *
+ */
+int snprintf(char *str, size_t size, const char *fmt, ...)
+{
+	va_list args;
+	va_start(args, fmt);
+	
+	int ret = vsnprintf(str, size, fmt, args);
+	
+	va_end(args);
+	
+	return ret;
+}
+
+/** @}
+ */
Index: uspace/lib/c/generic/io/vprintf.c
===================================================================
--- uspace/lib/c/generic/io/vprintf.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/generic/io/vprintf.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,118 @@
+/*
+ * 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 libc
+ * @{
+ */
+/** @file
+ */
+
+#include <stdarg.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <io/printf_core.h>
+#include <futex.h>
+#include <async.h>
+#include <str.h>
+
+static atomic_t printf_futex = FUTEX_INITIALIZER;
+
+static int vprintf_str_write(const char *str, size_t size, void *stream)
+{
+	size_t wr = fwrite(str, 1, size, (FILE *) stream);
+	return str_nlength(str, wr);
+}
+
+static int vprintf_wstr_write(const wchar_t *str, size_t size, void *stream)
+{
+	size_t offset = 0;
+	size_t chars = 0;
+	
+	while (offset < size) {
+		if (fputc(str[chars], (FILE *) stream) <= 0)
+			break;
+		
+		chars++;
+		offset += sizeof(wchar_t);
+	}
+	
+	return chars;
+}
+
+/** Print formatted text.
+ *
+ * @param stream Output stream
+ * @param fmt    Format string
+ * @param ap     Format parameters
+ *
+ * \see For more details about format string see printf_core.
+ *
+ */
+int vfprintf(FILE *stream, const char *fmt, va_list ap)
+{
+	struct printf_spec ps = {
+		vprintf_str_write,
+		vprintf_wstr_write,
+		stream
+	};
+	
+	/*
+	 * Prevent other threads to execute printf_core()
+	 */
+	futex_down(&printf_futex);
+	
+	/*
+	 * Prevent other fibrils of the same thread
+	 * to execute printf_core()
+	 */
+	async_serialize_start();
+	
+	int ret = printf_core(fmt, &ps, ap);
+	
+	async_serialize_end();
+	futex_up(&printf_futex);
+	
+	return ret;
+}
+
+/** Print formatted text to stdout.
+ *
+ * @param file Output stream
+ * @param fmt  Format string
+ * @param ap   Format parameters
+ *
+ * \see For more details about format string see printf_core.
+ *
+ */
+int vprintf(const char *fmt, va_list ap)
+{
+	return vfprintf(stdout, fmt, ap);
+}
+
+/** @}
+ */
Index: uspace/lib/c/generic/io/vsnprintf.c
===================================================================
--- uspace/lib/c/generic/io/vsnprintf.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/generic/io/vsnprintf.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,186 @@
+/*
+ * 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 libc
+ * @{
+ */
+/** @file
+ */
+
+#include <stdarg.h>
+#include <stdio.h>
+#include <str.h>
+#include <io/printf_core.h>
+#include <errno.h>
+
+typedef struct {
+	size_t size;    /* Total size of the buffer (in bytes) */
+	size_t len;     /* Number of already used bytes */
+	char *dst;      /* Destination */
+} vsnprintf_data_t;
+
+/** Write string to given buffer.
+ *
+ * Write at most data->size plain characters including trailing zero.
+ * According to C99, snprintf() has to return number of characters that
+ * would have been written if enough space had been available. Hence
+ * the return value is not the number of actually printed characters
+ * but size of the input string.
+ *
+ * @param str  Source string to print.
+ * @param size Number of plain characters in str.
+ * @param data Structure describing destination string, counter
+ *             of used space and total string size.
+ *
+ * @return Number of characters to print (not characters actually
+ *         printed).
+ *
+ */
+static int vsnprintf_str_write(const char *str, size_t size, vsnprintf_data_t *data)
+{
+	size_t left = data->size - data->len;
+	
+	if (left == 0)
+		return ((int) size);
+	
+	if (left == 1) {
+		/* We have only one free byte left in buffer
+		 * -> store trailing zero
+		 */
+		data->dst[data->size - 1] = 0;
+		data->len = data->size;
+		return ((int) size);
+	}
+	
+	if (left <= size) {
+		/* We do not have enough space for the whole string
+		 * with the trailing zero => print only a part
+		 * of string
+		 */
+		size_t index = 0;
+		
+		while (index < size) {
+			wchar_t uc = str_decode(str, &index, size);
+			
+			if (chr_encode(uc, data->dst, &data->len, data->size - 1) != EOK)
+				break;
+		}
+		
+		/* Put trailing zero at end, but not count it
+		 * into data->len so it could be rewritten next time
+		 */
+		data->dst[data->len] = 0;
+		
+		return ((int) size);
+	}
+	
+	/* Buffer is big enough to print the whole string */
+	memcpy((void *)(data->dst + data->len), (void *) str, size);
+	data->len += size;
+	
+	/* Put trailing zero at end, but not count it
+	 * into data->len so it could be rewritten next time
+	 */
+	data->dst[data->len] = 0;
+	
+	return ((int) size);
+}
+
+/** Write wide string to given buffer.
+ *
+ * Write at most data->size plain characters including trailing zero.
+ * According to C99, snprintf() has to return number of characters that
+ * would have been written if enough space had been available. Hence
+ * the return value is not the number of actually printed characters
+ * but size of the input string.
+ *
+ * @param str  Source wide string to print.
+ * @param size Number of bytes in str.
+ * @param data Structure describing destination string, counter
+ *             of used space and total string size.
+ *
+ * @return Number of wide characters to print (not characters actually
+ *         printed).
+ *
+ */
+static int vsnprintf_wstr_write(const wchar_t *str, size_t size, vsnprintf_data_t *data)
+{
+	size_t index = 0;
+	
+	while (index < (size / sizeof(wchar_t))) {
+		size_t left = data->size - data->len;
+		
+		if (left == 0)
+			return ((int) size);
+		
+		if (left == 1) {
+			/* We have only one free byte left in buffer
+			 * -> store trailing zero
+			 */
+			data->dst[data->size - 1] = 0;
+			data->len = data->size;
+			return ((int) size);
+		}
+		
+		if (chr_encode(str[index], data->dst, &data->len, data->size - 1) != EOK)
+			break;
+		
+		index++;
+	}
+	
+	/* Put trailing zero at end, but not count it
+	 * into data->len so it could be rewritten next time
+	 */
+	data->dst[data->len] = 0;
+	
+	return ((int) size);
+}
+
+int vsnprintf(char *str, size_t size, const char *fmt, va_list ap)
+{
+	vsnprintf_data_t data = {
+		size,
+		0,
+		str
+	};
+	printf_spec_t ps = {
+		(int(*) (const char *, size_t, void *)) vsnprintf_str_write,
+		(int(*) (const wchar_t *, size_t, void *)) vsnprintf_wstr_write,
+		&data
+	};
+	
+	/* Print 0 at end of string - fix the case that nothing will be printed */
+	if (size > 0)
+		str[0] = 0;
+	
+	/* vsnprintf_write ensures that str will be terminated by zero. */
+	return printf_core(fmt, &ps, ap);
+}
+
+/** @}
+ */
Index: uspace/lib/c/generic/ipc.c
===================================================================
--- uspace/lib/c/generic/ipc.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/generic/ipc.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,860 @@
+/*
+ * 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 libc
+ * @{
+ * @}
+ */
+
+/** @addtogroup libcipc IPC
+ * @brief HelenOS uspace IPC
+ * @{
+ * @ingroup libc
+ */
+/** @file
+ */ 
+
+#include <ipc/ipc.h>
+#include <libc.h>
+#include <malloc.h>
+#include <errno.h>
+#include <adt/list.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <futex.h>
+#include <kernel/synch/synch.h>
+#include <async.h>
+#include <fibril.h>
+#include <assert.h>
+
+/**
+ * Structures of this type are used for keeping track of sent asynchronous calls
+ * and queing unsent calls.
+ */
+typedef struct {
+	link_t list;
+
+	ipc_async_callback_t callback;
+	void *private;
+	union {
+		ipc_callid_t callid;
+		struct {
+			ipc_call_t data;
+			int phoneid;
+		} msg;
+	} u;
+	fid_t fid;	/**< Fibril waiting for sending this call. */
+} async_call_t;
+
+LIST_INITIALIZE(dispatched_calls);
+
+/** List of asynchronous calls that were not accepted by kernel.
+ *
+ * It is protected by async_futex, because if the call cannot be sent into the
+ * kernel, the async framework is used automatically.
+ */
+LIST_INITIALIZE(queued_calls);
+
+static atomic_t ipc_futex = FUTEX_INITIALIZER;
+
+/** Make a fast synchronous call.
+ *
+ * Only three payload arguments can be passed using this function. However, this
+ * function is faster than the generic ipc_call_sync_slow() because the payload
+ * is passed directly in registers.
+ *
+ * @param phoneid	Phone handle for the call.
+ * @param method	Requested method.
+ * @param arg1		Service-defined payload argument.
+ * @param arg2		Service-defined payload argument.
+ * @param arg3		Service-defined payload argument.
+ * @param result1	If non-NULL, the return ARG1 will be stored there.
+ * @param result2	If non-NULL, the return ARG2 will be stored there.
+ * @param result3	If non-NULL, the return ARG3 will be stored there.
+ * @param result4	If non-NULL, the return ARG4 will be stored there.
+ * @param result5	If non-NULL, the return ARG5 will be stored there.
+ *
+ * @return		Negative values represent errors returned by IPC.
+ *			Otherwise the RETVAL of the answer is returned.
+ */
+int
+ipc_call_sync_fast(int phoneid, ipcarg_t method, ipcarg_t arg1, ipcarg_t arg2,
+    ipcarg_t arg3, ipcarg_t *result1, ipcarg_t *result2, ipcarg_t *result3,
+    ipcarg_t *result4, ipcarg_t *result5)
+{
+	ipc_call_t resdata;
+	int callres;
+	
+	callres = __SYSCALL6(SYS_IPC_CALL_SYNC_FAST, phoneid, method, arg1,
+	    arg2, arg3, (sysarg_t) &resdata);
+	if (callres)
+		return callres;
+	if (result1)
+		*result1 = IPC_GET_ARG1(resdata);
+	if (result2)
+		*result2 = IPC_GET_ARG2(resdata);
+	if (result3)
+		*result3 = IPC_GET_ARG3(resdata);
+	if (result4)
+		*result4 = IPC_GET_ARG4(resdata);
+	if (result5)
+		*result5 = IPC_GET_ARG5(resdata);
+
+	return IPC_GET_RETVAL(resdata);
+}
+
+/** Make a synchronous call transmitting 5 arguments of payload.
+ *
+ * @param phoneid	Phone handle for the call.
+ * @param method	Requested method.
+ * @param arg1		Service-defined payload argument.
+ * @param arg2		Service-defined payload argument.
+ * @param arg3		Service-defined payload argument.
+ * @param arg4		Service-defined payload argument.
+ * @param arg5		Service-defined payload argument.
+ * @param result1	If non-NULL, storage for the first return argument.
+ * @param result2	If non-NULL, storage for the second return argument.
+ * @param result3	If non-NULL, storage for the third return argument.
+ * @param result4	If non-NULL, storage for the fourth return argument.
+ * @param result5	If non-NULL, storage for the fifth return argument.
+ *
+ * @return		Negative value means IPC error.
+ *			Otherwise the RETVAL of the answer.
+ */
+int
+ipc_call_sync_slow(int phoneid, ipcarg_t method, ipcarg_t arg1, ipcarg_t arg2,
+    ipcarg_t arg3, ipcarg_t arg4, ipcarg_t arg5, ipcarg_t *result1,
+    ipcarg_t *result2, ipcarg_t *result3, ipcarg_t *result4, ipcarg_t *result5)
+{
+	ipc_call_t data;
+	int callres;
+
+	IPC_SET_METHOD(data, method);
+	IPC_SET_ARG1(data, arg1);
+	IPC_SET_ARG2(data, arg2);
+	IPC_SET_ARG3(data, arg3);
+	IPC_SET_ARG4(data, arg4);
+	IPC_SET_ARG5(data, arg5);
+
+	callres = __SYSCALL3(SYS_IPC_CALL_SYNC_SLOW, phoneid, (sysarg_t) &data,
+	    (sysarg_t) &data);
+	if (callres)
+		return callres;
+
+	if (result1)
+		*result1 = IPC_GET_ARG1(data);
+	if (result2)
+		*result2 = IPC_GET_ARG2(data);
+	if (result3)
+		*result3 = IPC_GET_ARG3(data);
+	if (result4)
+		*result4 = IPC_GET_ARG4(data);
+	if (result5)
+		*result5 = IPC_GET_ARG5(data);
+
+	return IPC_GET_RETVAL(data);
+}
+
+/** Syscall to send asynchronous message.
+ *
+ * @param phoneid	Phone handle for the call.
+ * @param data		Call data with the request.
+ *
+ * @return		Hash of the call or an error code.
+ */
+static ipc_callid_t _ipc_call_async(int phoneid, ipc_call_t *data)
+{
+	return __SYSCALL2(SYS_IPC_CALL_ASYNC_SLOW, phoneid, (sysarg_t) data);
+}
+
+/** Prolog to ipc_call_async_*() functions.
+ *
+ * @param private	Argument for the answer/error callback.
+ * @param callback	Answer/error callback.
+ *
+ * @return		New, partially initialized async_call structure or NULL.
+ */
+static inline async_call_t *ipc_prepare_async(void *private,
+    ipc_async_callback_t callback)
+{
+	async_call_t *call;
+
+	call = malloc(sizeof(*call));
+	if (!call) {
+		if (callback)
+			callback(private, ENOMEM, NULL);
+		return NULL;
+	}
+	call->callback = callback;
+	call->private = private;
+
+	return call;
+}
+
+/** Epilogue of ipc_call_async_*() functions.
+ *
+ * @param callid	Value returned by the SYS_IPC_CALL_ASYNC_* syscall.
+ * @param phoneid	Phone handle through which the call was made.
+ * @param call		async_call structure returned by ipc_prepare_async().
+ * @param can_preempt	If non-zero, the current fibril can be preempted in this
+ *			call.
+ */
+static inline void ipc_finish_async(ipc_callid_t callid, int phoneid,
+    async_call_t *call, int can_preempt)
+{
+	if (!call) { /* Nothing to do regardless if failed or not */
+		futex_up(&ipc_futex);
+		return;
+	}
+
+	if (callid == (ipc_callid_t) IPC_CALLRET_FATAL) {
+		futex_up(&ipc_futex);
+		/* Call asynchronous handler with error code */
+		if (call->callback)
+			call->callback(call->private, ENOENT, NULL);
+		free(call);
+		return;
+	}
+
+	if (callid == (ipc_callid_t) IPC_CALLRET_TEMPORARY) {
+		futex_up(&ipc_futex);
+
+		call->u.msg.phoneid = phoneid;
+		
+		futex_down(&async_futex);
+		list_append(&call->list, &queued_calls);
+
+		if (can_preempt) {
+			call->fid = fibril_get_id();
+			fibril_switch(FIBRIL_TO_MANAGER);
+			/* Async futex unlocked by previous call */
+		} else {
+			call->fid = 0;
+			futex_up(&async_futex);
+		}
+		return;
+	}
+	call->u.callid = callid;
+	/* Add call to the list of dispatched calls */
+	list_append(&call->list, &dispatched_calls);
+	futex_up(&ipc_futex);
+	
+}
+
+/** Make a fast asynchronous call.
+ *
+ * This function can only handle four arguments of payload. It is, however,
+ * faster than the more generic ipc_call_async_slow().
+ *
+ * Note that this function is a void function.
+ * During normal opertation, answering this call will trigger the callback.
+ * In case of fatal error, call the callback handler with the proper error code.
+ * If the call cannot be temporarily made, queue it.
+ *
+ * @param phoneid	Phone handle for the call.
+ * @param method	Requested method.
+ * @param arg1		Service-defined payload argument.
+ * @param arg2		Service-defined payload argument.
+ * @param arg3		Service-defined payload argument.
+ * @param arg4		Service-defined payload argument.
+ * @param private	Argument to be passed to the answer/error callback.
+ * @param callback	Answer or error callback.
+ * @param can_preempt	If non-zero, the current fibril will be preempted in
+ *			case the kernel temporarily refuses to accept more
+ *			asynchronous calls.
+ */
+void ipc_call_async_fast(int phoneid, ipcarg_t method, ipcarg_t arg1,
+    ipcarg_t arg2, ipcarg_t arg3, ipcarg_t arg4, void *private,
+    ipc_async_callback_t callback, int can_preempt)
+{
+	async_call_t *call = NULL;
+	ipc_callid_t callid;
+
+	if (callback) {
+		call = ipc_prepare_async(private, callback);
+		if (!call)
+			return;
+	}
+
+	/*
+	 * We need to make sure that we get callid before another thread
+	 * accesses the queue again.
+	 */
+	futex_down(&ipc_futex);
+	callid = __SYSCALL6(SYS_IPC_CALL_ASYNC_FAST, phoneid, method, arg1,
+	    arg2, arg3, arg4);
+
+	if (callid == (ipc_callid_t) IPC_CALLRET_TEMPORARY) {
+		if (!call) {
+			call = ipc_prepare_async(private, callback);
+			if (!call)
+				return;
+		}
+		IPC_SET_METHOD(call->u.msg.data, method);
+		IPC_SET_ARG1(call->u.msg.data, arg1);
+		IPC_SET_ARG2(call->u.msg.data, arg2);
+		IPC_SET_ARG3(call->u.msg.data, arg3);
+		IPC_SET_ARG4(call->u.msg.data, arg4);
+		/*
+		 * To achieve deterministic behavior, we always zero out the
+		 * arguments that are beyond the limits of the fast version.
+		 */
+		IPC_SET_ARG5(call->u.msg.data, 0);
+	}
+	ipc_finish_async(callid, phoneid, call, can_preempt);
+}
+
+/** Make an asynchronous call transmitting the entire payload.
+ *
+ * Note that this function is a void function.
+ * During normal opertation, answering this call will trigger the callback.
+ * In case of fatal error, call the callback handler with the proper error code.
+ * If the call cannot be temporarily made, queue it.
+ *
+ * @param phoneid	Phone handle for the call.
+ * @param method	Requested method.
+ * @param arg1		Service-defined payload argument.
+ * @param arg2		Service-defined payload argument.
+ * @param arg3		Service-defined payload argument.
+ * @param arg4		Service-defined payload argument.
+ * @param arg5		Service-defined payload argument.
+ * @param private	Argument to be passed to the answer/error callback.
+ * @param callback	Answer or error callback.
+ * @param can_preempt	If non-zero, the current fibril will be preempted in
+ *			case the kernel temporarily refuses to accept more
+ *			asynchronous calls.
+ *
+ */
+void ipc_call_async_slow(int phoneid, ipcarg_t method, ipcarg_t arg1,
+    ipcarg_t arg2, ipcarg_t arg3, ipcarg_t arg4, ipcarg_t arg5, void *private,
+    ipc_async_callback_t callback, int can_preempt)
+{
+	async_call_t *call;
+	ipc_callid_t callid;
+
+	call = ipc_prepare_async(private, callback);
+	if (!call)
+		return;
+
+	IPC_SET_METHOD(call->u.msg.data, method);
+	IPC_SET_ARG1(call->u.msg.data, arg1);
+	IPC_SET_ARG2(call->u.msg.data, arg2);
+	IPC_SET_ARG3(call->u.msg.data, arg3);
+	IPC_SET_ARG4(call->u.msg.data, arg4);
+	IPC_SET_ARG5(call->u.msg.data, arg5);
+	/*
+	 * We need to make sure that we get callid before another thread
+	 * accesses the queue again.
+	 */
+	futex_down(&ipc_futex);
+	callid = _ipc_call_async(phoneid, &call->u.msg.data);
+
+	ipc_finish_async(callid, phoneid, call, can_preempt);
+}
+
+
+/** Answer a received call - fast version.
+ *
+ * The fast answer makes use of passing retval and first four arguments in
+ * registers. If you need to return more, use the ipc_answer_slow() instead.
+ *
+ * @param callid	Hash of the call being answered.
+ * @param retval	Return value.
+ * @param arg1		First return argument.
+ * @param arg2		Second return argument.
+ * @param arg3		Third return argument.
+ * @param arg4		Fourth return argument.
+ *
+ * @return		Zero on success or a value from @ref errno.h on failure.
+ */
+ipcarg_t ipc_answer_fast(ipc_callid_t callid, ipcarg_t retval, ipcarg_t arg1,
+    ipcarg_t arg2, ipcarg_t arg3, ipcarg_t arg4)
+{
+	return __SYSCALL6(SYS_IPC_ANSWER_FAST, callid, retval, arg1, arg2, arg3,
+	    arg4);
+}
+
+/** Answer a received call - slow full version.
+ *
+ * @param callid	Hash of the call being answered.
+ * @param retval	Return value.
+ * @param arg1		First return argument.
+ * @param arg2		Second return argument.
+ * @param arg3		Third return argument.
+ * @param arg4		Fourth return argument.
+ * @param arg5		Fifth return argument.
+ *
+ * @return		Zero on success or a value from @ref errno.h on failure.
+ */
+ipcarg_t ipc_answer_slow(ipc_callid_t callid, ipcarg_t retval, ipcarg_t arg1,
+    ipcarg_t arg2, ipcarg_t arg3, ipcarg_t arg4, ipcarg_t arg5)
+{
+	ipc_call_t data;
+
+	IPC_SET_RETVAL(data, retval);
+	IPC_SET_ARG1(data, arg1);
+	IPC_SET_ARG2(data, arg2);
+	IPC_SET_ARG3(data, arg3);
+	IPC_SET_ARG4(data, arg4);
+	IPC_SET_ARG5(data, arg5);
+
+	return __SYSCALL2(SYS_IPC_ANSWER_SLOW, callid, (sysarg_t) &data);
+}
+
+
+/** Try to dispatch queued calls from the async queue. */
+static void try_dispatch_queued_calls(void)
+{
+	async_call_t *call;
+	ipc_callid_t callid;
+
+	/** @todo
+	 * Integrate intelligently ipc_futex, so that it is locked during
+	 * ipc_call_async_*(), until it is added to dispatched_calls.
+	 */
+	futex_down(&async_futex);
+	while (!list_empty(&queued_calls)) {
+		call = list_get_instance(queued_calls.next, async_call_t, list);
+		callid = _ipc_call_async(call->u.msg.phoneid,
+		    &call->u.msg.data);
+		if (callid == (ipc_callid_t) IPC_CALLRET_TEMPORARY) {
+			break;
+		}
+		list_remove(&call->list);
+
+		futex_up(&async_futex);
+		if (call->fid)
+			fibril_add_ready(call->fid);
+		
+		if (callid == (ipc_callid_t) IPC_CALLRET_FATAL) {
+			if (call->callback)
+				call->callback(call->private, ENOENT, NULL);
+			free(call);
+		} else {
+			call->u.callid = callid;
+			futex_down(&ipc_futex);
+			list_append(&call->list, &dispatched_calls);
+			futex_up(&ipc_futex);
+		}
+		futex_down(&async_futex);
+	}
+	futex_up(&async_futex);
+}
+
+/** Handle a received answer.
+ *
+ * Find the hash of the answer and call the answer callback.
+ *
+ * @todo Make it use hash table.
+ *
+ * @param callid	Hash of the received answer.
+ *			The answer has the same hash as the request OR'ed with
+ *			the IPC_CALLID_ANSWERED bit.
+ * @param data		Call data of the answer.
+ */
+static void handle_answer(ipc_callid_t callid, ipc_call_t *data)
+{
+	link_t *item;
+	async_call_t *call;
+
+	callid &= ~IPC_CALLID_ANSWERED;
+	
+	futex_down(&ipc_futex);
+	for (item = dispatched_calls.next; item != &dispatched_calls;
+	    item = item->next) {
+		call = list_get_instance(item, async_call_t, list);
+		if (call->u.callid == callid) {
+			list_remove(&call->list);
+			futex_up(&ipc_futex);
+			if (call->callback)
+				call->callback(call->private, 
+				    IPC_GET_RETVAL(*data), data);
+			free(call);
+			return;
+		}
+	}
+	futex_up(&ipc_futex);
+}
+
+
+/** Wait for a first call to come.
+ *
+ * @param call		Storage where the incoming call data will be stored.
+ * @param usec		Timeout in microseconds
+ * @param flags		Flags passed to SYS_IPC_WAIT (blocking, nonblocking).
+ *
+ * @return		Hash of the call. Note that certain bits have special
+ *			meaning. IPC_CALLID_ANSWERED will be set in an answer
+ *			and IPC_CALLID_NOTIFICATION is used for notifications.
+ *			
+ */
+ipc_callid_t ipc_wait_cycle(ipc_call_t *call, uint32_t usec, int flags)
+{
+	ipc_callid_t callid;
+
+	callid = __SYSCALL3(SYS_IPC_WAIT, (sysarg_t) call, usec, flags);
+	/* Handle received answers */
+	if (callid & IPC_CALLID_ANSWERED) {
+		handle_answer(callid, call);
+		try_dispatch_queued_calls();
+	}
+
+	return callid;
+}
+
+/** Wait some time for an IPC call.
+ *
+ * The call will return after an answer is received.
+ *
+ * @param call		Storage where the incoming call data will be stored.
+ * @param usec		Timeout in microseconds.
+ *
+ * @return		Hash of the answer.
+ */
+ipc_callid_t ipc_wait_for_call_timeout(ipc_call_t *call, uint32_t usec)
+{
+	ipc_callid_t callid;
+
+	do {
+		callid = ipc_wait_cycle(call, usec, SYNCH_FLAGS_NONE);
+	} while (callid & IPC_CALLID_ANSWERED);
+
+	return callid;
+}
+
+/** Check if there is an IPC call waiting to be picked up.
+ *
+ * @param call		Storage where the incoming call will be stored.
+ * @return		Hash of the answer.
+ */
+ipc_callid_t ipc_trywait_for_call(ipc_call_t *call)
+{
+	ipc_callid_t callid;
+
+	do {
+		callid = ipc_wait_cycle(call, SYNCH_NO_TIMEOUT,
+		    SYNCH_FLAGS_NON_BLOCKING);
+	} while (callid & IPC_CALLID_ANSWERED);
+
+	return callid;
+}
+
+/** Interrupt one thread of this task from waiting for IPC. */
+void ipc_poke(void)
+{
+	__SYSCALL0(SYS_IPC_POKE);
+}
+
+/** Ask destination to do a callback connection.
+ *
+ * @param phoneid	Phone handle used for contacting the other side.
+ * @param arg1		Service-defined argument.
+ * @param arg2		Service-defined argument.
+ * @param arg3		Service-defined argument.
+ * @param phonehash	Storage where the library will store an opaque
+ *			identifier of the phone that will be used for incoming
+ *			calls. This identifier can be used for connection
+ *			tracking.
+ *
+ * @return		Zero on success or a negative error code.
+ */
+int ipc_connect_to_me(int phoneid, int arg1, int arg2, int arg3, 
+    ipcarg_t *phonehash)
+{
+	return ipc_call_sync_3_5(phoneid, IPC_M_CONNECT_TO_ME, arg1, arg2,
+	    arg3, NULL, NULL, NULL, NULL, phonehash);
+}
+
+/** Ask through phone for a new connection to some service.
+ *
+ * @param phoneid	Phone handle used for contacting the other side.
+ * @param arg1		User defined argument.
+ * @param arg2		User defined argument.
+ * @param arg3		User defined argument.
+ *
+ * @return		New phone handle on success or a negative error code.
+ */
+int ipc_connect_me_to(int phoneid, int arg1, int arg2, int arg3)
+{
+	ipcarg_t newphid;
+	int res;
+
+	res = ipc_call_sync_3_5(phoneid, IPC_M_CONNECT_ME_TO, arg1, arg2, arg3,
+	    NULL, NULL, NULL, NULL, &newphid);
+	if (res)
+		return res;
+	return newphid;
+}
+
+/** Ask through phone for a new connection to some service.
+ *
+ * If the connection is not available at the moment, the
+ * call will block.
+ *
+ * @param phoneid	Phone handle used for contacting the other side.
+ * @param arg1		User defined argument.
+ * @param arg2		User defined argument.
+ * @param arg3		User defined argument.
+ *
+ * @return		New phone handle on success or a negative error code.
+ */
+int ipc_connect_me_to_blocking(int phoneid, int arg1, int arg2, int arg3)
+{
+	ipcarg_t newphid;
+	int res;
+
+	res = ipc_call_sync_4_5(phoneid, IPC_M_CONNECT_ME_TO, arg1, arg2, arg3,
+	    IPC_FLAG_BLOCKING, NULL, NULL, NULL, NULL, &newphid);
+	if (res)
+		return res;
+	return newphid;
+}
+
+/** Hang up a phone.
+ *
+ * @param phoneid	Handle of the phone to be hung up.
+ *
+ * @return		Zero on success or a negative error code.
+ */
+int ipc_hangup(int phoneid)
+{
+	return __SYSCALL1(SYS_IPC_HANGUP, phoneid);
+}
+
+/** Register IRQ notification.
+ *
+ * @param inr		IRQ number.
+ * @param devno		Device number of the device generating inr.
+ * @param method	Use this method for notifying me.
+ * @param ucode		Top-half pseudocode handler.
+ *
+ * @return		Value returned by the kernel.
+ */
+int ipc_register_irq(int inr, int devno, int method, irq_code_t *ucode)
+{
+	return __SYSCALL4(SYS_IPC_REGISTER_IRQ, inr, devno, method,
+	    (sysarg_t) ucode);
+}
+
+/** Unregister IRQ notification.
+ *
+ * @param inr		IRQ number.
+ * @param devno		Device number of the device generating inr.
+ *
+ * @return		Value returned by the kernel.
+ */
+int ipc_unregister_irq(int inr, int devno)
+{
+	return __SYSCALL2(SYS_IPC_UNREGISTER_IRQ, inr, devno);
+}
+
+/** Forward a received call to another destination.
+ *
+ * @param callid	Hash of the call to forward.
+ * @param phoneid	Phone handle to use for forwarding.
+ * @param method	New method for the forwarded call.
+ * @param arg1		New value of the first argument for the forwarded call.
+ * @param arg2		New value of the second argument for the forwarded call.
+ * @param mode		Flags specifying mode of the forward operation.
+ *
+ * @return		Zero on success or an error code.
+ *
+ * For non-system methods, the old method, arg1 and arg2 are rewritten by the
+ * new values. For system methods, the new method, arg1 and arg2 are written 
+ * to the old arg1, arg2 and arg3, respectivelly. Calls with immutable 
+ * methods are forwarded verbatim.
+ */
+int ipc_forward_fast(ipc_callid_t callid, int phoneid, int method,
+    ipcarg_t arg1, ipcarg_t arg2, int mode)
+{
+	return __SYSCALL6(SYS_IPC_FORWARD_FAST, callid, phoneid, method, arg1, 
+	    arg2, mode);
+}
+
+
+int ipc_forward_slow(ipc_callid_t callid, int phoneid, int method,
+    ipcarg_t arg1, ipcarg_t arg2, ipcarg_t arg3, ipcarg_t arg4, ipcarg_t arg5,
+    int mode)
+{
+	ipc_call_t data;
+
+	IPC_SET_METHOD(data, method);
+	IPC_SET_ARG1(data, arg1);
+	IPC_SET_ARG2(data, arg2);
+	IPC_SET_ARG3(data, arg3);
+	IPC_SET_ARG4(data, arg4);
+	IPC_SET_ARG5(data, arg5);
+
+	return __SYSCALL4(SYS_IPC_FORWARD_SLOW, callid, phoneid, (sysarg_t) &data, mode);
+}
+
+/** Wrapper for making IPC_M_SHARE_IN calls.
+ *
+ * @param phoneid	Phone that will be used to contact the receiving side.
+ * @param dst		Destination address space area base.
+ * @param size		Size of the destination address space area.
+ * @param arg		User defined argument.
+ * @param flags		Storage where the received flags will be stored. Can be
+ *			NULL.
+ *
+ * @return		Zero on success or a negative error code from errno.h.
+ */
+int ipc_share_in_start(int phoneid, void *dst, size_t size, ipcarg_t arg,
+    int *flags)
+{
+	sysarg_t tmp_flags = 0;
+	int res = ipc_call_sync_3_2(phoneid, IPC_M_SHARE_IN, (ipcarg_t) dst,
+	    (ipcarg_t) size, arg, NULL, &tmp_flags);
+	
+	if (flags)
+		*flags = tmp_flags;
+	
+	return res;
+}
+
+/** Wrapper for answering the IPC_M_SHARE_IN calls.
+ *
+ * This wrapper only makes it more comfortable to answer IPC_M_DATA_READ calls
+ * so that the user doesn't have to remember the meaning of each IPC argument.
+ *
+ * @param callid	Hash of the IPC_M_DATA_READ call to answer.
+ * @param src		Source address space base.
+ * @param flags		Flags to be used for sharing. Bits can be only cleared.
+ *
+ * @return		Zero on success or a value from @ref errno.h on failure.
+ */
+int ipc_share_in_finalize(ipc_callid_t callid, void *src, int flags)
+{
+	return ipc_answer_2(callid, EOK, (ipcarg_t) src, (ipcarg_t) flags);
+}
+
+/** Wrapper for making IPC_M_SHARE_OUT calls.
+ *
+ * @param phoneid	Phone that will be used to contact the receiving side.
+ * @param src		Source address space area base address.
+ * @param flags		Flags to be used for sharing. Bits can be only cleared.
+ *
+ * @return		Zero on success or a negative error code from errno.h.
+ */
+int ipc_share_out_start(int phoneid, void *src, int flags)
+{
+	return ipc_call_sync_3_0(phoneid, IPC_M_SHARE_OUT, (ipcarg_t) src, 0,
+	    (ipcarg_t) flags);
+}
+
+/** Wrapper for answering the IPC_M_SHARE_OUT calls.
+ *
+ * This wrapper only makes it more comfortable to answer IPC_M_SHARE_OUT calls
+ * so that the user doesn't have to remember the meaning of each IPC argument.
+ *
+ * @param callid	Hash of the IPC_M_DATA_WRITE call to answer.
+ * @param dst		Destination address space area base address.	
+ *
+ * @return		Zero on success or a value from @ref errno.h on failure.
+ */
+int ipc_share_out_finalize(ipc_callid_t callid, void *dst)
+{
+	return ipc_answer_1(callid, EOK, (ipcarg_t) dst);
+}
+
+
+/** Wrapper for making IPC_M_DATA_READ calls.
+ *
+ * @param phoneid	Phone that will be used to contact the receiving side.
+ * @param dst		Address of the beginning of the destination buffer.
+ * @param size		Size of the destination buffer.
+ *
+ * @return		Zero on success or a negative error code from errno.h.
+ */
+int ipc_data_read_start(int phoneid, void *dst, size_t size)
+{
+	return ipc_call_sync_2_0(phoneid, IPC_M_DATA_READ, (ipcarg_t) dst,
+	    (ipcarg_t) size);
+}
+
+/** Wrapper for answering the IPC_M_DATA_READ calls.
+ *
+ * This wrapper only makes it more comfortable to answer IPC_M_DATA_READ calls
+ * so that the user doesn't have to remember the meaning of each IPC argument.
+ *
+ * @param callid	Hash of the IPC_M_DATA_READ call to answer.
+ * @param src		Source address for the IPC_M_DATA_READ call.
+ * @param size		Size for the IPC_M_DATA_READ call. Can be smaller than
+ *			the maximum size announced by the sender.
+ *
+ * @return		Zero on success or a value from @ref errno.h on failure.
+ */
+int ipc_data_read_finalize(ipc_callid_t callid, const void *src, size_t size)
+{
+	return ipc_answer_2(callid, EOK, (ipcarg_t) src, (ipcarg_t) size);
+}
+
+/** Wrapper for making IPC_M_DATA_WRITE calls.
+ *
+ * @param phoneid	Phone that will be used to contact the receiving side.
+ * @param src		Address of the beginning of the source buffer.
+ * @param size		Size of the source buffer.
+ *
+ * @return		Zero on success or a negative error code from errno.h.
+ */
+int ipc_data_write_start(int phoneid, const void *src, size_t size)
+{
+	return ipc_call_sync_2_0(phoneid, IPC_M_DATA_WRITE, (ipcarg_t) src,
+	    (ipcarg_t) size);
+}
+
+/** Wrapper for answering the IPC_M_DATA_WRITE calls.
+ *
+ * This wrapper only makes it more comfortable to answer IPC_M_DATA_WRITE calls
+ * so that the user doesn't have to remember the meaning of each IPC argument.
+ *
+ * @param callid	Hash of the IPC_M_DATA_WRITE call to answer.
+ * @param dst		Final destination address for the IPC_M_DATA_WRITE call.
+ * @param size		Final size for the IPC_M_DATA_WRITE call.
+ *
+ * @return		Zero on success or a value from @ref errno.h on failure.
+ */
+int ipc_data_write_finalize(ipc_callid_t callid, void *dst, size_t size)
+{
+	return ipc_answer_2(callid, EOK, (ipcarg_t) dst, (ipcarg_t) size);
+}
+
+#include <kernel/syscall/sysarg64.h>
+/** Connect to a task specified by id.
+ */
+int ipc_connect_kbox(task_id_t id)
+{
+	sysarg64_t arg;
+
+	arg.value = (unsigned long long) id;
+
+	return __SYSCALL1(SYS_IPC_CONNECT_KBOX, (sysarg_t) &arg);
+}
+ 
+/** @}
+ */
Index: uspace/lib/c/generic/libc.c
===================================================================
--- uspace/lib/c/generic/libc.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/generic/libc.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,101 @@
+/*
+ * 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 lc Libc
+ * @brief HelenOS C library
+ * @{
+ * @}
+ */
+
+/** @addtogroup libc generic
+ * @ingroup lc
+ * @{
+ */
+
+/** @file
+ */
+
+#include <libc.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <malloc.h>
+#include <tls.h>
+#include <thread.h>
+#include <fibril.h>
+#include <ipc/ipc.h>
+#include <async.h>
+#include <as.h>
+#include <loader/pcb.h>
+
+extern int main(int argc, char *argv[]);
+
+void _exit(int status)
+{
+	thread_exit(status);
+}
+
+void __main(void *pcb_ptr)
+{
+	int retval;
+
+	__heap_init();
+	__async_init();
+	fibril_t *fibril = fibril_setup();
+	__tcb_set(fibril->tcb);
+	
+	/* Save the PCB pointer */
+	__pcb = (pcb_t *) pcb_ptr;
+	
+	int argc;
+	char **argv;
+	
+	if (__pcb == NULL) {
+		argc = 0;
+		argv = NULL;
+		__stdio_init(0, NULL);
+	} else {
+		argc = __pcb->argc;
+		argv = __pcb->argv;
+		__stdio_init(__pcb->filc, __pcb->filv);
+		(void) chdir(__pcb->cwd);
+	}
+	
+	retval = main(argc, argv);
+
+	__stdio_done();
+	(void) task_retval(retval);
+}
+
+void __exit(void)
+{
+	fibril_teardown(__tcb_get()->fibril_data);
+	_exit(0);
+}
+
+/** @}
+ */
Index: uspace/lib/c/generic/loader.c
===================================================================
--- uspace/lib/c/generic/loader.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/generic/loader.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,344 @@
+/*
+ * 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.
+ */
+
+/** @addtogroup libc
+ * @{
+ */
+/** @file
+ */
+
+#include <ipc/ipc.h>
+#include <ipc/loader.h>
+#include <ipc/services.h>
+#include <libc.h>
+#include <task.h>
+#include <str.h>
+#include <stdlib.h>
+#include <async.h>
+#include <errno.h>
+#include <vfs/vfs.h>
+#include <loader/loader.h>
+
+/** Connect to a new program loader.
+ *
+ * Spawns a new program loader task and returns the connection structure.
+ *
+ * @param name Symbolic name to set on the newly created task.
+ *
+ * @return Pointer to the loader connection structure (should be
+ *         deallocated using free() after use).
+ *
+ */
+int loader_spawn(const char *name)
+{
+	return __SYSCALL2(SYS_PROGRAM_SPAWN_LOADER,
+	    (sysarg_t) name, str_size(name));
+}
+
+loader_t *loader_connect(void)
+{
+	int phone_id = ipc_connect_me_to_blocking(PHONE_NS, SERVICE_LOAD, 0, 0);
+	if (phone_id < 0)
+		return NULL;
+	
+	loader_t *ldr = malloc(sizeof(loader_t));
+	if (ldr == NULL)
+		return NULL;
+	
+	ldr->phone_id = phone_id;
+	return ldr;
+}
+
+/** Get ID of the new task.
+ *
+ * Retrieves the ID of the new task from the loader.
+ *
+ * @param ldr     Loader connection structure.
+ * @param task_id Points to a variable where the ID should be stored.
+ *
+ * @return Zero on success or negative error code.
+ *
+ */
+int loader_get_task_id(loader_t *ldr, task_id_t *task_id)
+{
+	/* Get task ID. */
+	ipc_call_t answer;
+	aid_t req = async_send_0(ldr->phone_id, LOADER_GET_TASKID, &answer);
+	int rc = async_data_read_start(ldr->phone_id, task_id, sizeof(task_id_t));
+	if (rc != EOK) {
+		async_wait_for(req, NULL);
+		return rc;
+	}
+	
+	ipcarg_t retval;
+	async_wait_for(req, &retval);
+	return (int) retval;
+}
+
+/** Set current working directory for the loaded task.
+ *
+ * Sets the current working directory for the loaded task.
+ *
+ * @param ldr  Loader connection structure.
+ *
+ * @return Zero on success or negative error code.
+ *
+ */
+int loader_set_cwd(loader_t *ldr)
+{
+	char *cwd;
+	size_t len;
+
+	cwd = (char *) malloc(MAX_PATH_LEN + 1);
+	if (!cwd)
+		return ENOMEM;
+	if (!getcwd(cwd, MAX_PATH_LEN + 1))
+		str_cpy(cwd, MAX_PATH_LEN + 1, "/"); 
+	len = str_length(cwd);
+	
+	ipc_call_t answer;
+	aid_t req = async_send_0(ldr->phone_id, LOADER_SET_CWD, &answer);
+	int rc = async_data_write_start(ldr->phone_id, cwd, len);
+	free(cwd);
+	if (rc != EOK) {
+		async_wait_for(req, NULL);
+		return rc;
+	}
+	
+	ipcarg_t retval;
+	async_wait_for(req, &retval);
+	return (int) retval;
+}
+
+/** Set pathname of the program to load.
+ *
+ * Sets the name of the program file to load. The name can be relative
+ * to the current working directory (it will be absolutized before
+ * sending to the loader).
+ *
+ * @param ldr  Loader connection structure.
+ * @param path Pathname of the program file.
+ *
+ * @return Zero on success or negative error code.
+ *
+ */
+int loader_set_pathname(loader_t *ldr, const char *path)
+{
+	size_t pa_len;
+	char *pa = absolutize(path, &pa_len);
+	if (!pa)
+		return 0;
+	
+	/* Send program pathname */
+	ipc_call_t answer;
+	aid_t req = async_send_0(ldr->phone_id, LOADER_SET_PATHNAME, &answer);
+	int rc = async_data_write_start(ldr->phone_id, (void *) pa, pa_len);
+	if (rc != EOK) {
+		async_wait_for(req, NULL);
+		return rc;
+	}
+	
+	free(pa);
+	
+	ipcarg_t retval;
+	async_wait_for(req, &retval);
+	return (int) retval;
+}
+
+/** Set command-line arguments for the program.
+ *
+ * Sets the vector of command-line arguments to be passed to the loaded
+ * program. By convention, the very first argument is typically the same as
+ * the command used to execute the program.
+ *
+ * @param ldr  Loader connection structure.
+ * @param argv NULL-terminated array of pointers to arguments.
+ *
+ * @return Zero on success or negative error code.
+ *
+ */
+int loader_set_args(loader_t *ldr, const char *const argv[])
+{
+	/*
+	 * Serialize the arguments into a single array. First
+	 * compute size of the buffer needed.
+	 */
+	const char *const *ap = argv;
+	size_t buffer_size = 0;
+	while (*ap != NULL) {
+		buffer_size += str_size(*ap) + 1;
+		ap++;
+	}
+	
+	char *arg_buf = malloc(buffer_size);
+	if (arg_buf == NULL)
+		return ENOMEM;
+	
+	/* Now fill the buffer with null-terminated argument strings */
+	ap = argv;
+	char *dp = arg_buf;
+	
+	while (*ap != NULL) {
+		str_cpy(dp, buffer_size - (dp - arg_buf), *ap);
+		dp += str_size(*ap) + 1;
+		ap++;
+	}
+	
+	/* Send serialized arguments to the loader */
+	ipc_call_t answer;
+	aid_t req = async_send_0(ldr->phone_id, LOADER_SET_ARGS, &answer);
+	ipcarg_t rc = async_data_write_start(ldr->phone_id, (void *) arg_buf, buffer_size);
+	if (rc != EOK) {
+		async_wait_for(req, NULL);
+		return rc;
+	}
+	
+	async_wait_for(req, &rc);
+	if (rc != EOK)
+		return rc;
+	
+	/* Free temporary buffer */
+	free(arg_buf);
+	
+	return EOK;
+}
+
+/** Set preset files for the program.
+ *
+ * Sets the vector of preset files to be passed to the loaded
+ * program. By convention, the first three files represent stdin,
+ * stdout and stderr respectively.
+ *
+ * @param ldr   Loader connection structure.
+ * @param files NULL-terminated array of pointers to files.
+ *
+ * @return Zero on success or negative error code.
+ *
+ */
+int loader_set_files(loader_t *ldr, fdi_node_t *const files[])
+{
+	/*
+	 * Serialize the arguments into a single array. First
+	 * compute size of the buffer needed.
+	 */
+	fdi_node_t *const *ap = files;
+	size_t count = 0;
+	while (*ap != NULL) {
+		count++;
+		ap++;
+	}
+	
+	fdi_node_t *files_buf;
+	files_buf = (fdi_node_t *) malloc(count * sizeof(fdi_node_t));
+	if (files_buf == NULL)
+		return ENOMEM;
+	
+	/* Fill the buffer */
+	size_t i;
+	for (i = 0; i < count; i++)
+		files_buf[i] = *files[i];
+	
+	/* Send serialized files to the loader */
+	ipc_call_t answer;
+	aid_t req = async_send_0(ldr->phone_id, LOADER_SET_FILES, &answer);
+	ipcarg_t rc = async_data_write_start(ldr->phone_id, (void *) files_buf,
+	    count * sizeof(fdi_node_t));
+	if (rc != EOK) {
+		async_wait_for(req, NULL);
+		return rc;
+	}
+	
+	async_wait_for(req, &rc);
+	if (rc != EOK)
+		return rc;
+	
+	/* Free temporary buffer */
+	free(files_buf);
+	
+	return EOK;
+}
+
+/** Instruct loader to load the program.
+ *
+ * If this function succeeds, the program has been successfully loaded
+ * and is ready to be executed.
+ *
+ * @param ldr Loader connection structure.
+ *
+ * @return Zero on success or negative error code.
+ *
+ */
+int loader_load_program(loader_t *ldr)
+{
+	return (int) async_req_0_0(ldr->phone_id, LOADER_LOAD);
+}
+
+/** Instruct loader to execute the program.
+ *
+ * Note that this function blocks until the loader actually replies
+ * so you cannot expect this function to return if you are debugging
+ * the task and its thread is stopped.
+ *
+ * After using this function, no further operations must be performed
+ * on the loader structure. It should be de-allocated using free().
+ *
+ * @param ldr Loader connection structure.
+ *
+ * @return Zero on success or negative error code.
+ *
+ */
+int loader_run(loader_t *ldr)
+{
+	int rc = async_req_0_0(ldr->phone_id, LOADER_RUN);
+	if (rc != EOK)
+		return rc;
+	
+	ipc_hangup(ldr->phone_id);
+	ldr->phone_id = 0;
+	return EOK;
+}
+
+/** Cancel the loader session.
+ *
+ * Tells the loader not to load any program and terminate.
+ * After using this function, no further operations must be performed
+ * on the loader structure. It should be de-allocated using free().
+ *
+ * @param ldr Loader connection structure.
+ *
+ * @return Zero on success or negative error code.
+ *
+ */
+void loader_abort(loader_t *ldr)
+{
+	ipc_hangup(ldr->phone_id);
+	ldr->phone_id = 0;
+}
+
+/** @}
+ */
Index: uspace/lib/c/generic/malloc.c
===================================================================
--- uspace/lib/c/generic/malloc.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/generic/malloc.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,488 @@
+/*
+ * Copyright (c) 2009 Martin Decky
+ * Copyright (c) 2009 Petr Tuma
+ * 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 libc
+ * @{
+ */
+/** @file
+ */
+
+#include <malloc.h>
+#include <bool.h>
+#include <as.h>
+#include <align.h>
+#include <macros.h>
+#include <assert.h>
+#include <errno.h>
+#include <bitops.h>
+#include <mem.h>
+#include <adt/gcdlcm.h>
+
+/* Magic used in heap headers. */
+#define HEAP_BLOCK_HEAD_MAGIC  0xBEEF0101
+
+/* Magic used in heap footers. */
+#define HEAP_BLOCK_FOOT_MAGIC  0xBEEF0202
+
+/** Allocation alignment (this also covers the alignment of fields
+    in the heap header and footer) */
+#define BASE_ALIGN  16
+
+/**
+ * Either 4 * 256M on 32-bit architecures or 16 * 256M on 64-bit architectures
+ */
+#define MAX_HEAP_SIZE  (sizeof(uintptr_t) << 28)
+
+/**
+ *
+ */
+#define STRUCT_OVERHEAD  (sizeof(heap_block_head_t) + sizeof(heap_block_foot_t))
+
+/**
+ * Calculate real size of a heap block (with header and footer)
+ */
+#define GROSS_SIZE(size)  ((size) + STRUCT_OVERHEAD)
+
+/**
+ * Calculate net size of a heap block (without header and footer)
+ */
+#define NET_SIZE(size)  ((size) - STRUCT_OVERHEAD)
+
+
+/** Header of a heap block
+ *
+ */
+typedef struct {
+	/* Size of the block (including header and footer) */
+	size_t size;
+	
+	/* Indication of a free block */
+	bool free;
+	
+	/* A magic value to detect overwrite of heap header */
+	uint32_t magic;
+} heap_block_head_t;
+
+/** Footer of a heap block
+ *
+ */
+typedef struct {
+	/* Size of the block (including header and footer) */
+	size_t size;
+	
+	/* A magic value to detect overwrite of heap footer */
+	uint32_t magic;
+} heap_block_foot_t;
+
+/** Linker heap symbol */
+extern char _heap;
+
+/** Address of heap start */
+static void *heap_start = 0;
+
+/** Address of heap end */
+static void *heap_end = 0;
+
+/** Maximum heap size */
+static size_t max_heap_size = (size_t) -1;
+
+/** Current number of pages of heap area */
+static size_t heap_pages = 0;
+
+/** Initialize a heap block
+ *
+ * Fills in the structures related to a heap block.
+ *
+ * @param addr Address of the block.
+ * @param size Size of the block including the header and the footer.
+ * @param free Indication of a free block.
+ *
+ */
+static void block_init(void *addr, size_t size, bool free)
+{
+	/* Calculate the position of the header and the footer */
+	heap_block_head_t *head = (heap_block_head_t *) addr;
+	heap_block_foot_t *foot =
+	    (heap_block_foot_t *) (addr + size - sizeof(heap_block_foot_t));
+	
+	head->size = size;
+	head->free = free;
+	head->magic = HEAP_BLOCK_HEAD_MAGIC;
+	
+	foot->size = size;
+	foot->magic = HEAP_BLOCK_FOOT_MAGIC;
+}
+
+/** Check a heap block
+ *
+ * Verifies that the structures related to a heap block still contain
+ * the magic constants. This helps detect heap corruption early on.
+ *
+ * @param addr Address of the block.
+ *
+ */
+static void block_check(void *addr)
+{
+	heap_block_head_t *head = (heap_block_head_t *) addr;
+	
+	assert(head->magic == HEAP_BLOCK_HEAD_MAGIC);
+	
+	heap_block_foot_t *foot =
+	    (heap_block_foot_t *) (addr + head->size - sizeof(heap_block_foot_t));
+	
+	assert(foot->magic == HEAP_BLOCK_FOOT_MAGIC);
+	assert(head->size == foot->size);
+}
+
+static bool grow_heap(size_t size)
+{
+	if (size == 0)
+		return false;
+
+	if ((heap_start + size < heap_start) || (heap_end + size < heap_end))
+		return false;
+	
+	size_t heap_size = (size_t) (heap_end - heap_start);
+	
+	if ((max_heap_size != (size_t) -1) && (heap_size + size > max_heap_size))
+		return false;
+	
+	size_t pages = (size - 1) / PAGE_SIZE + 1;
+	
+	if (as_area_resize((void *) &_heap, (heap_pages + pages) * PAGE_SIZE, 0)
+	    == EOK) {
+		void *end = (void *) ALIGN_DOWN(((uintptr_t) &_heap) +
+		    (heap_pages + pages) * PAGE_SIZE, BASE_ALIGN);
+		block_init(heap_end, end - heap_end, true);
+		heap_pages += pages;
+		heap_end = end;
+		return true;
+	}
+	
+	return false;
+}
+
+static void shrink_heap(void)
+{
+	// TODO
+}
+
+/** Initialize the heap allocator
+ *
+ * Finds how much physical memory we have and creates
+ * the heap management structures that mark the whole
+ * physical memory as a single free block.
+ *
+ */
+void __heap_init(void)
+{
+	if (as_area_create((void *) &_heap, PAGE_SIZE,
+	    AS_AREA_WRITE | AS_AREA_READ)) {
+		heap_pages = 1;
+		heap_start = (void *) ALIGN_UP((uintptr_t) &_heap, BASE_ALIGN);
+		heap_end =
+		    (void *) ALIGN_DOWN(((uintptr_t) &_heap) + PAGE_SIZE, BASE_ALIGN);
+		
+		/* Make the entire area one large block. */
+		block_init(heap_start, heap_end - heap_start, true);
+	}
+}
+
+uintptr_t get_max_heap_addr(void)
+{
+	if (max_heap_size == (size_t) -1)
+		max_heap_size =
+		    max((size_t) (heap_end - heap_start), MAX_HEAP_SIZE);
+	
+	return ((uintptr_t) heap_start + max_heap_size);
+}
+
+static void split_mark(heap_block_head_t *cur, const size_t size)
+{
+	assert(cur->size >= size);
+	
+	/* See if we should split the block. */
+	size_t split_limit = GROSS_SIZE(size);
+	
+	if (cur->size > split_limit) {
+		/* Block big enough -> split. */
+		void *next = ((void *) cur) + size;
+		block_init(next, cur->size - size, true);
+		block_init(cur, size, false);
+	} else {
+		/* Block too small -> use as is. */
+		cur->free = false;
+	}
+}
+
+/** Allocate a memory block
+ *
+ * @param size  The size of the block to allocate.
+ * @param align Memory address alignment.
+ *
+ * @return the address of the block or NULL when not enough memory.
+ *
+ */
+static void *malloc_internal(const size_t size, const size_t align)
+{
+	if (align == 0)
+		return NULL;
+	
+	size_t falign = lcm(align, BASE_ALIGN);
+	size_t real_size = GROSS_SIZE(ALIGN_UP(size, falign));
+	
+	bool grown = false;
+	void *result;
+	
+loop:
+	result = NULL;
+	heap_block_head_t *cur = (heap_block_head_t *) heap_start;
+	
+	while ((result == NULL) && ((void *) cur < heap_end)) {
+		block_check(cur);
+		
+		/* Try to find a block that is free and large enough. */
+		if ((cur->free) && (cur->size >= real_size)) {
+			/* We have found a suitable block.
+			   Check for alignment properties. */
+			void *addr = ((void *) cur) + sizeof(heap_block_head_t);
+			void *aligned = (void *) ALIGN_UP(addr, falign);
+			
+			if (addr == aligned) {
+				/* Exact block start including alignment. */
+				split_mark(cur, real_size);
+				result = addr;
+			} else {
+				/* Block start has to be aligned */
+				size_t excess = (size_t) (aligned - addr);
+				
+				if (cur->size >= real_size + excess) {
+					/* The current block is large enough to fit
+					   data in including alignment */
+					if ((void *) cur > heap_start) {
+						/* There is a block before the current block.
+						   This previous block can be enlarged to compensate
+						   for the alignment excess */
+						heap_block_foot_t *prev_foot =
+						    ((void *) cur) - sizeof(heap_block_foot_t);
+						
+						heap_block_head_t *prev_head =
+						    (heap_block_head_t *) (((void *) cur) - prev_foot->size);
+						
+						block_check(prev_head);
+						
+						size_t reduced_size = cur->size - excess;
+						heap_block_head_t *next_head = ((void *) cur) + excess;
+						
+						if ((!prev_head->free) && (excess >= STRUCT_OVERHEAD)) {
+							/* The previous block is not free and there is enough
+							   space to fill in a new free block between the previous
+							   and current block */
+							block_init(cur, excess, true);
+						} else {
+							/* The previous block is free (thus there is no need to
+							   induce additional fragmentation to the heap) or the
+							   excess is small, thus just enlarge the previous block */
+							block_init(prev_head, prev_head->size + excess, prev_head->free);
+						}
+						
+						block_init(next_head, reduced_size, true);
+						split_mark(next_head, real_size);
+						result = aligned;
+						cur = next_head;
+					} else {
+						/* The current block is the first block on the heap.
+						   We have to make sure that the alignment excess
+						   is large enough to fit a new free block just
+						   before the current block */
+						while (excess < STRUCT_OVERHEAD) {
+							aligned += falign;
+							excess += falign;
+						}
+						
+						/* Check for current block size again */
+						if (cur->size >= real_size + excess) {
+							size_t reduced_size = cur->size - excess;
+							cur = (heap_block_head_t *) (heap_start + excess);
+							
+							block_init(heap_start, excess, true);
+							block_init(cur, reduced_size, true);
+							split_mark(cur, real_size);
+							result = aligned;
+						}
+					}
+				}
+			}
+		}
+		
+		/* Advance to the next block. */
+		cur = (heap_block_head_t *) (((void *) cur) + cur->size);
+	}
+	
+	if ((result == NULL) && (!grown)) {
+		if (grow_heap(real_size)) {
+			grown = true;
+			goto loop;
+		}
+	}
+	
+	return result;
+}
+
+void *calloc(const size_t nmemb, const size_t size)
+{
+	void *block = malloc(nmemb * size);
+	if (block == NULL)
+		return NULL;
+
+	memset(block, 0, nmemb * size);
+	return block;
+}
+
+void *malloc(const size_t size)
+{
+	return malloc_internal(size, BASE_ALIGN);
+}
+
+void *memalign(const size_t align, const size_t size)
+{
+	if (align == 0)
+		return NULL;
+	
+	size_t palign =
+	    1 << (fnzb(max(sizeof(void *), align) - 1) + 1);
+	
+	return malloc_internal(size, palign);
+}
+
+void *realloc(const void *addr, const size_t size)
+{
+	if (addr == NULL)
+		return malloc(size);
+	
+	/* Calculate the position of the header. */
+	heap_block_head_t *head =
+	    (heap_block_head_t *) (addr - sizeof(heap_block_head_t));
+	
+	assert((void *) head >= heap_start);
+	assert((void *) head < heap_end);
+	
+	block_check(head);
+	assert(!head->free);
+	
+	void *ptr = NULL;
+	size_t real_size = GROSS_SIZE(ALIGN_UP(size, BASE_ALIGN));
+	size_t orig_size = head->size;
+	
+	if (orig_size > real_size) {
+		/* Shrink */
+		if (orig_size - real_size >= STRUCT_OVERHEAD) {
+			/* Split the original block to a full block
+			   and a trailing free block */
+			block_init((void *) head, real_size, false);
+			block_init((void *) head + real_size,
+			    orig_size - real_size, true);
+			shrink_heap();
+		}
+		
+		ptr = ((void *) head) + sizeof(heap_block_head_t);
+	} else {
+		/* Look at the next block. If it is free and the size is
+		   sufficient then merge the two. */
+		heap_block_head_t *next_head =
+		    (heap_block_head_t *) (((void *) head) + head->size);
+		
+		if (((void *) next_head < heap_end) &&
+		    (head->size + next_head->size >= real_size) &&
+		    (next_head->free)) {
+			block_check(next_head);
+			block_init(head, head->size + next_head->size, false);
+			split_mark(head, real_size);
+			
+			ptr = ((void *) head) + sizeof(heap_block_head_t);
+		} else {
+			ptr = malloc(size);
+			if (ptr != NULL) {
+				memcpy(ptr, addr, NET_SIZE(orig_size));
+				free(addr);
+			}
+		}
+	}
+	
+	return ptr;
+}
+
+/** Free a memory block
+ *
+ * @param addr The address of the block.
+ */
+void free(const void *addr)
+{
+	/* Calculate the position of the header. */
+	heap_block_head_t *head
+	    = (heap_block_head_t *) (addr - sizeof(heap_block_head_t));
+	
+	assert((void *) head >= heap_start);
+	assert((void *) head < heap_end);
+	
+	block_check(head);
+	assert(!head->free);
+	
+	/* Mark the block itself as free. */
+	head->free = true;
+	
+	/* Look at the next block. If it is free, merge the two. */
+	heap_block_head_t *next_head
+	    = (heap_block_head_t *) (((void *) head) + head->size);
+	
+	if ((void *) next_head < heap_end) {
+		block_check(next_head);
+		if (next_head->free)
+			block_init(head, head->size + next_head->size, true);
+	}
+	
+	/* Look at the previous block. If it is free, merge the two. */
+	if ((void *) head > heap_start) {
+		heap_block_foot_t *prev_foot =
+		    (heap_block_foot_t *) (((void *) head) - sizeof(heap_block_foot_t));
+		
+		heap_block_head_t *prev_head =
+		    (heap_block_head_t *) (((void *) head) - prev_foot->size);
+		
+		block_check(prev_head);
+		
+		if (prev_head->free)
+			block_init(prev_head, prev_head->size + head->size, true);
+	}
+	
+	shrink_heap();
+}
+
+/** @}
+ */
Index: uspace/lib/c/generic/mem.c
===================================================================
--- uspace/lib/c/generic/mem.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/generic/mem.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,239 @@
+/*
+ * Copyright (c) 2005 Martin Decky
+ * 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.
+ */
+
+/** @addtogroup libc
+ * @{
+ */
+/** @file
+ */
+
+#include <mem.h>
+#include <stdlib.h>
+#include <sys/types.h>
+
+/** Fill memory block with a constant value. */
+void *memset(void *dest, int b, size_t n)
+{
+	char *pb;
+	unsigned long *pw;
+	size_t word_size;
+	size_t n_words;
+
+	unsigned long pattern;
+	size_t i;
+	size_t fill;
+
+	/* Fill initial segment. */
+	word_size = sizeof(unsigned long);
+	fill = word_size - ((uintptr_t) dest & (word_size - 1));
+	if (fill > n) fill = n;
+
+	pb = dest;
+
+	i = fill;
+	while (i-- != 0)
+		*pb++ = b;
+
+	/* Compute remaining size. */
+	n -= fill;
+	if (n == 0) return dest;
+
+	n_words = n / word_size;
+	n = n % word_size;
+	pw = (unsigned long *) pb;
+
+	/* Create word-sized pattern for aligned segment. */
+	pattern = 0;
+	i = word_size;
+	while (i-- != 0)
+		pattern = (pattern << 8) | (uint8_t) b;
+
+	/* Fill aligned segment. */
+	i = n_words;
+	while (i-- != 0)
+		*pw++ = pattern;
+
+	pb = (char *) pw;
+
+	/* Fill final segment. */
+	i = n;
+	while (i-- != 0)
+		*pb++ = b;
+
+	return dest;
+}
+
+struct along {
+	unsigned long n;
+} __attribute__ ((packed));
+
+static void *unaligned_memcpy(void *dst, const void *src, size_t n)
+{
+	size_t i, j;
+	struct along *adst = dst;
+	const struct along *asrc = src;
+
+	for (i = 0; i < n / sizeof(unsigned long); i++)
+		adst[i].n = asrc[i].n;
+		
+	for (j = 0; j < n % sizeof(unsigned long); j++)
+		((unsigned char *) (((unsigned long *) dst) + i))[j] =
+		    ((unsigned char *) (((unsigned long *) src) + i))[j];
+		
+	return (char *) dst;
+}
+
+/** Copy memory block. */
+void *memcpy(void *dst, const void *src, size_t n)
+{
+	size_t i;
+	size_t mod, fill;
+	size_t word_size;
+	size_t n_words;
+
+	const unsigned long *srcw;
+	unsigned long *dstw;
+	const uint8_t *srcb;
+	uint8_t *dstb;
+
+	word_size = sizeof(unsigned long);
+
+	/*
+	 * Are source and destination addresses congruent modulo word_size?
+	 * If not, use unaligned_memcpy().
+	 */
+
+	if (((uintptr_t) dst & (word_size - 1)) !=
+	    ((uintptr_t) src & (word_size - 1)))
+ 		return unaligned_memcpy(dst, src, n);
+
+	/*
+	 * mod is the address modulo word size. fill is the length of the
+	 * initial buffer segment before the first word boundary.
+	 * If the buffer is very short, use unaligned_memcpy(), too.
+	 */
+
+	mod = (uintptr_t) dst & (word_size - 1);
+	fill = word_size - mod;
+	if (fill > n) fill = n;
+
+	/* Copy the initial segment. */
+
+	srcb = src;
+	dstb = dst;
+
+	i = fill;
+	while (i-- != 0)
+		*dstb++ = *srcb++;
+
+	/* Compute remaining length. */
+
+	n -= fill;
+	if (n == 0) return dst;
+
+	/* Pointers to aligned segment. */
+
+	dstw = (unsigned long *) dstb;
+	srcw = (const unsigned long *) srcb;
+
+	n_words = n / word_size;	/* Number of whole words to copy. */
+	n -= n_words * word_size;	/* Remaining bytes at the end. */
+
+	/* "Fast" copy. */
+	i = n_words;
+	while (i-- != 0)
+		*dstw++ = *srcw++;
+
+	/*
+	 * Copy the rest.
+	 */
+
+	srcb = (const uint8_t *) srcw;
+	dstb = (uint8_t *) dstw;
+
+	i = n;
+	while (i-- != 0)
+		*dstb++ = *srcb++;
+
+	return dst;
+}
+
+/** Move memory block with possible overlapping. */
+void *memmove(void *dst, const void *src, size_t n)
+{
+	const uint8_t *sp;
+	uint8_t *dp;
+
+	/* Nothing to do? */
+	if (src == dst)
+		return dst;
+
+	/* Non-overlapping? */
+	if (dst >= src + n || src >= dst + n) {	
+		return memcpy(dst, src, n);
+	}
+
+	/* Which direction? */
+	if (src > dst) {
+		/* Forwards. */
+		sp = src;
+		dp = dst;
+
+		while (n-- != 0)
+			*dp++ = *sp++;
+	} else {
+		/* Backwards. */
+		sp = src + (n - 1);
+		dp = dst + (n - 1);
+
+		while (n-- != 0)
+			*dp-- = *sp--;
+	}
+
+	return dst;
+}
+
+/** Compare two memory areas.
+ *
+ * @param s1		Pointer to the first area to compare.
+ * @param s2		Pointer to the second area to compare.
+ * @param len		Size of the first area in bytes. Both areas must have
+ * 			the same length.
+ * @return		If len is 0, return zero. If the areas match, return
+ * 			zero. Otherwise return non-zero.
+ */
+int bcmp(const char *s1, const char *s2, size_t len)
+{
+	for (; len && *s1++ == *s2++; len--)
+		;
+	return len;
+}
+
+/** @}
+ */
Index: uspace/lib/c/generic/mman.c
===================================================================
--- uspace/lib/c/generic/mman.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/generic/mman.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,61 @@
+/*
+ * 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 libc
+ * @{
+ */
+/** @file
+ */
+
+#include <sys/mman.h>
+#include <sys/types.h>
+#include <as.h>
+#include <unistd.h>
+
+void *mmap(void *start, size_t length, int prot, int flags, int fd,
+    aoff64_t offset)
+{
+	if (!start)
+		start = as_get_mappable_page(length);
+	
+//	if (!((flags & MAP_SHARED) ^ (flags & MAP_PRIVATE)))
+//		return MAP_FAILED;
+	
+	if (!(flags & MAP_ANONYMOUS))
+		return MAP_FAILED;
+	
+	return as_area_create(start, length, prot);
+}
+
+int munmap(void *start, size_t length)
+{
+	return as_area_destroy(start);
+}
+
+/** @}
+ */
Index: uspace/lib/c/generic/pcb.c
===================================================================
--- uspace/lib/c/generic/pcb.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/generic/pcb.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,40 @@
+/*
+ * 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.
+ */
+
+/** @addtogroup libc
+ * @{
+ */
+/** @file
+ */
+
+#include <loader/pcb.h>
+
+pcb_t *__pcb;
+
+/** @}
+ */
Index: uspace/lib/c/generic/smc.c
===================================================================
--- uspace/lib/c/generic/smc.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/generic/smc.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,46 @@
+/*
+ * 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.
+ */
+
+/** @addtogroup libc
+ * @{
+ */
+/** @file
+ */
+
+#include <libc.h>
+#include <sys/types.h>
+#include <smc.h>
+
+int smc_coherence(void *address, size_t size)
+{
+	return __SYSCALL2(SYS_SMC_COHERENCE, (sysarg_t) address,
+	    (sysarg_t) size);
+}
+
+/** @}
+ */
Index: uspace/lib/c/generic/stacktrace.c
===================================================================
--- uspace/lib/c/generic/stacktrace.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/generic/stacktrace.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,78 @@
+/*
+ * Copyright (c) 2009 Jakub Jermar
+ * 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 libc
+ * @{
+ */
+/** @file
+ */
+
+#include <stacktrace.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <errno.h>
+
+static int stacktrace_read_uintptr(void *arg, uintptr_t addr, uintptr_t *data);
+
+void stacktrace_print_fp_pc(uintptr_t fp, uintptr_t pc)
+{
+	stacktrace_t st;
+	uintptr_t nfp;
+
+	st.op_arg = NULL;
+	st.read_uintptr = stacktrace_read_uintptr;
+
+	while (stacktrace_fp_valid(&st, fp)) {
+		printf("%p: %p()\n", fp, pc);
+		(void) stacktrace_ra_get(&st, fp, &pc);
+		(void) stacktrace_fp_prev(&st, fp, &nfp);
+		fp = nfp;
+	}
+}
+
+void stacktrace_print(void)
+{
+	stacktrace_prepare();
+	stacktrace_print_fp_pc(stacktrace_fp_get(), stacktrace_pc_get());
+	/*
+	 * Prevent the tail call optimization of the previous call by
+	 * making it a non-tail call.
+	 */
+	(void) stacktrace_fp_get();
+}
+
+static int stacktrace_read_uintptr(void *arg, uintptr_t addr, uintptr_t *data)
+{
+	(void) arg;
+	*data = *((uintptr_t *) addr);
+	return EOK;
+}
+
+/** @}
+ */
Index: uspace/lib/c/generic/stdlib.c
===================================================================
--- uspace/lib/c/generic/stdlib.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/generic/stdlib.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,50 @@
+/*
+ * 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 libc
+ * @{
+ */
+/** @file
+ */
+
+#include <stdlib.h>
+
+static long glbl_seed = 1;
+
+long int random(void)
+{
+	return glbl_seed = ((1366*glbl_seed + 150889) % RAND_MAX);
+}
+
+void srandom(unsigned int seed)
+{
+	glbl_seed = seed;
+}
+
+/** @}
+ */
Index: uspace/lib/c/generic/str.c
===================================================================
--- uspace/lib/c/generic/str.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/generic/str.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,982 @@
+/*
+ * Copyright (c) 2005 Martin Decky
+ * 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.
+ */
+
+/** @addtogroup libc
+ * @{
+ */
+/** @file
+ */
+
+#include <str.h>
+#include <stdlib.h>
+#include <assert.h>
+#include <limits.h>
+#include <ctype.h>
+#include <malloc.h>
+#include <errno.h>
+#include <align.h>
+#include <mem.h>
+#include <str.h>
+
+/** Byte mask consisting of lowest @n bits (out of 8) */
+#define LO_MASK_8(n)  ((uint8_t) ((1 << (n)) - 1))
+
+/** Byte mask consisting of lowest @n bits (out of 32) */
+#define LO_MASK_32(n)  ((uint32_t) ((1 << (n)) - 1))
+
+/** Byte mask consisting of highest @n bits (out of 8) */
+#define HI_MASK_8(n)  (~LO_MASK_8(8 - (n)))
+
+/** Number of data bits in a UTF-8 continuation byte */
+#define CONT_BITS  6
+
+/** Decode a single character from a string.
+ *
+ * Decode a single character from a string of size @a size. Decoding starts
+ * at @a offset and this offset is moved to the beginning of the next
+ * character. In case of decoding error, offset generally advances at least
+ * by one. However, offset is never moved beyond size.
+ *
+ * @param str    String (not necessarily NULL-terminated).
+ * @param offset Byte offset in string where to start decoding.
+ * @param size   Size of the string (in bytes).
+ *
+ * @return Value of decoded character, U_SPECIAL on decoding error or
+ *         NULL if attempt to decode beyond @a size.
+ *
+ */
+wchar_t str_decode(const char *str, size_t *offset, size_t size)
+{
+	if (*offset + 1 > size)
+		return 0;
+	
+	/* First byte read from string */
+	uint8_t b0 = (uint8_t) str[(*offset)++];
+	
+	/* Determine code length */
+	
+	unsigned int b0_bits;  /* Data bits in first byte */
+	unsigned int cbytes;   /* Number of continuation bytes */
+	
+	if ((b0 & 0x80) == 0) {
+		/* 0xxxxxxx (Plain ASCII) */
+		b0_bits = 7;
+		cbytes = 0;
+	} else if ((b0 & 0xe0) == 0xc0) {
+		/* 110xxxxx 10xxxxxx */
+		b0_bits = 5;
+		cbytes = 1;
+	} else if ((b0 & 0xf0) == 0xe0) {
+		/* 1110xxxx 10xxxxxx 10xxxxxx */
+		b0_bits = 4;
+		cbytes = 2;
+	} else if ((b0 & 0xf8) == 0xf0) {
+		/* 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx */
+		b0_bits = 3;
+		cbytes = 3;
+	} else {
+		/* 10xxxxxx -- unexpected continuation byte */
+		return U_SPECIAL;
+	}
+	
+	if (*offset + cbytes > size)
+		return U_SPECIAL;
+	
+	wchar_t ch = b0 & LO_MASK_8(b0_bits);
+	
+	/* Decode continuation bytes */
+	while (cbytes > 0) {
+		uint8_t b = (uint8_t) str[(*offset)++];
+		
+		/* Must be 10xxxxxx */
+		if ((b & 0xc0) != 0x80)
+			return U_SPECIAL;
+		
+		/* Shift data bits to ch */
+		ch = (ch << CONT_BITS) | (wchar_t) (b & LO_MASK_8(CONT_BITS));
+		cbytes--;
+	}
+	
+	return ch;
+}
+
+/** Encode a single character to string representation.
+ *
+ * Encode a single character to string representation (i.e. UTF-8) and store
+ * it into a buffer at @a offset. Encoding starts at @a offset and this offset
+ * is moved to the position where the next character can be written to.
+ *
+ * @param ch     Input character.
+ * @param str    Output buffer.
+ * @param offset Byte offset where to start writing.
+ * @param size   Size of the output buffer (in bytes).
+ *
+ * @return EOK if the character was encoded successfully, EOVERFLOW if there
+ *         was not enough space in the output buffer or EINVAL if the character
+ *         code was invalid.
+ */
+int chr_encode(const wchar_t ch, char *str, size_t *offset, size_t size)
+{
+	if (*offset >= size)
+		return EOVERFLOW;
+	
+	if (!chr_check(ch))
+		return EINVAL;
+	
+	/* Unsigned version of ch (bit operations should only be done
+	   on unsigned types). */
+	uint32_t cc = (uint32_t) ch;
+	
+	/* Determine how many continuation bytes are needed */
+	
+	unsigned int b0_bits;  /* Data bits in first byte */
+	unsigned int cbytes;   /* Number of continuation bytes */
+	
+	if ((cc & ~LO_MASK_32(7)) == 0) {
+		b0_bits = 7;
+		cbytes = 0;
+	} else if ((cc & ~LO_MASK_32(11)) == 0) {
+		b0_bits = 5;
+		cbytes = 1;
+	} else if ((cc & ~LO_MASK_32(16)) == 0) {
+		b0_bits = 4;
+		cbytes = 2;
+	} else if ((cc & ~LO_MASK_32(21)) == 0) {
+		b0_bits = 3;
+		cbytes = 3;
+	} else {
+		/* Codes longer than 21 bits are not supported */
+		return EINVAL;
+	}
+	
+	/* Check for available space in buffer */
+	if (*offset + cbytes >= size)
+		return EOVERFLOW;
+	
+	/* Encode continuation bytes */
+	unsigned int i;
+	for (i = cbytes; i > 0; i--) {
+		str[*offset + i] = 0x80 | (cc & LO_MASK_32(CONT_BITS));
+		cc = cc >> CONT_BITS;
+	}
+	
+	/* Encode first byte */
+	str[*offset] = (cc & LO_MASK_32(b0_bits)) | HI_MASK_8(8 - b0_bits - 1);
+	
+	/* Advance offset */
+	*offset += cbytes + 1;
+	
+	return EOK;
+}
+
+/** Get size of string.
+ *
+ * Get the number of bytes which are used by the string @a str (excluding the
+ * NULL-terminator).
+ *
+ * @param str String to consider.
+ *
+ * @return Number of bytes used by the string
+ *
+ */
+size_t str_size(const char *str)
+{
+	size_t size = 0;
+	
+	while (*str++ != 0)
+		size++;
+	
+	return size;
+}
+
+/** Get size of wide string.
+ *
+ * Get the number of bytes which are used by the wide string @a str (excluding the
+ * NULL-terminator).
+ *
+ * @param str Wide string to consider.
+ *
+ * @return Number of bytes used by the wide string
+ *
+ */
+size_t wstr_size(const wchar_t *str)
+{
+	return (wstr_length(str) * sizeof(wchar_t));
+}
+
+/** Get size of string with length limit.
+ *
+ * Get the number of bytes which are used by up to @a max_len first
+ * characters in the string @a str. If @a max_len is greater than
+ * the length of @a str, the entire string is measured (excluding the
+ * NULL-terminator).
+ *
+ * @param str     String to consider.
+ * @param max_len Maximum number of characters to measure.
+ *
+ * @return Number of bytes used by the characters.
+ *
+ */
+size_t str_lsize(const char *str, size_t max_len)
+{
+	size_t len = 0;
+	size_t offset = 0;
+	
+	while (len < max_len) {
+		if (str_decode(str, &offset, STR_NO_LIMIT) == 0)
+			break;
+		
+		len++;
+	}
+	
+	return offset;
+}
+
+/** Get size of wide string with length limit.
+ *
+ * Get the number of bytes which are used by up to @a max_len first
+ * wide characters in the wide string @a str. If @a max_len is greater than
+ * the length of @a str, the entire wide string is measured (excluding the
+ * NULL-terminator).
+ *
+ * @param str     Wide string to consider.
+ * @param max_len Maximum number of wide characters to measure.
+ *
+ * @return Number of bytes used by the wide characters.
+ *
+ */
+size_t wstr_lsize(const wchar_t *str, size_t max_len)
+{
+	return (wstr_nlength(str, max_len * sizeof(wchar_t)) * sizeof(wchar_t));
+}
+
+/** Get number of characters in a string.
+ *
+ * @param str NULL-terminated string.
+ *
+ * @return Number of characters in string.
+ *
+ */
+size_t str_length(const char *str)
+{
+	size_t len = 0;
+	size_t offset = 0;
+	
+	while (str_decode(str, &offset, STR_NO_LIMIT) != 0)
+		len++;
+	
+	return len;
+}
+
+/** Get number of characters in a wide string.
+ *
+ * @param str NULL-terminated wide string.
+ *
+ * @return Number of characters in @a str.
+ *
+ */
+size_t wstr_length(const wchar_t *wstr)
+{
+	size_t len = 0;
+	
+	while (*wstr++ != 0)
+		len++;
+	
+	return len;
+}
+
+/** Get number of characters in a string with size limit.
+ *
+ * @param str  NULL-terminated string.
+ * @param size Maximum number of bytes to consider.
+ *
+ * @return Number of characters in string.
+ *
+ */
+size_t str_nlength(const char *str, size_t size)
+{
+	size_t len = 0;
+	size_t offset = 0;
+	
+	while (str_decode(str, &offset, size) != 0)
+		len++;
+	
+	return len;
+}
+
+/** Get number of characters in a string with size limit.
+ *
+ * @param str  NULL-terminated string.
+ * @param size Maximum number of bytes to consider.
+ *
+ * @return Number of characters in string.
+ *
+ */
+size_t wstr_nlength(const wchar_t *str, size_t size)
+{
+	size_t len = 0;
+	size_t limit = ALIGN_DOWN(size, sizeof(wchar_t));
+	size_t offset = 0;
+	
+	while ((offset < limit) && (*str++ != 0)) {
+		len++;
+		offset += sizeof(wchar_t);
+	}
+	
+	return len;
+}
+
+/** Check whether character is plain ASCII.
+ *
+ * @return True if character is plain ASCII.
+ *
+ */
+bool ascii_check(wchar_t ch)
+{
+	if ((ch >= 0) && (ch <= 127))
+		return true;
+	
+	return false;
+}
+
+/** Check whether character is valid
+ *
+ * @return True if character is a valid Unicode code point.
+ *
+ */
+bool chr_check(wchar_t ch)
+{
+	if ((ch >= 0) && (ch <= 1114111))
+		return true;
+	
+	return false;
+}
+
+/** Compare two NULL terminated strings.
+ *
+ * Do a char-by-char comparison of two NULL-terminated strings.
+ * The strings are considered equal iff they consist of the same
+ * characters on the minimum of their lengths.
+ *
+ * @param s1 First string to compare.
+ * @param s2 Second string to compare.
+ *
+ * @return 0 if the strings are equal, -1 if first is smaller,
+ *         1 if second smaller.
+ *
+ */
+int str_cmp(const char *s1, const char *s2)
+{
+	wchar_t c1 = 0;
+	wchar_t c2 = 0;
+	
+	size_t off1 = 0;
+	size_t off2 = 0;
+
+	while (true) {
+		c1 = str_decode(s1, &off1, STR_NO_LIMIT);
+		c2 = str_decode(s2, &off2, STR_NO_LIMIT);
+
+		if (c1 < c2)
+			return -1;
+		
+		if (c1 > c2)
+			return 1;
+
+		if (c1 == 0 || c2 == 0)
+			break;		
+	}
+
+	return 0;
+}
+
+/** Compare two NULL terminated strings with length limit.
+ *
+ * Do a char-by-char comparison of two NULL-terminated strings.
+ * The strings are considered equal iff they consist of the same
+ * characters on the minimum of their lengths and the length limit.
+ *
+ * @param s1      First string to compare.
+ * @param s2      Second string to compare.
+ * @param max_len Maximum number of characters to consider.
+ *
+ * @return 0 if the strings are equal, -1 if first is smaller,
+ *         1 if second smaller.
+ *
+ */
+int str_lcmp(const char *s1, const char *s2, size_t max_len)
+{
+	wchar_t c1 = 0;
+	wchar_t c2 = 0;
+	
+	size_t off1 = 0;
+	size_t off2 = 0;
+	
+	size_t len = 0;
+
+	while (true) {
+		if (len >= max_len)
+			break;
+
+		c1 = str_decode(s1, &off1, STR_NO_LIMIT);
+		c2 = str_decode(s2, &off2, STR_NO_LIMIT);
+
+		if (c1 < c2)
+			return -1;
+
+		if (c1 > c2)
+			return 1;
+
+		if (c1 == 0 || c2 == 0)
+			break;
+
+		++len;	
+	}
+
+	return 0;
+
+}
+
+/** Copy string.
+ *
+ * Copy source string @a src to destination buffer @a dest.
+ * No more than @a size bytes are written. If the size of the output buffer
+ * is at least one byte, the output string will always be well-formed, i.e.
+ * null-terminated and containing only complete characters.
+ *
+ * @param dest   Destination buffer.
+ * @param count Size of the destination buffer (must be > 0).
+ * @param src   Source string.
+ */
+void str_cpy(char *dest, size_t size, const char *src)
+{
+	wchar_t ch;
+	size_t src_off;
+	size_t dest_off;
+
+	/* There must be space for a null terminator in the buffer. */
+	assert(size > 0);
+	
+	src_off = 0;
+	dest_off = 0;
+
+	while ((ch = str_decode(src, &src_off, STR_NO_LIMIT)) != 0) {
+		if (chr_encode(ch, dest, &dest_off, size - 1) != EOK)
+			break;
+	}
+
+	dest[dest_off] = '\0';
+}
+
+/** Copy size-limited substring.
+ *
+ * Copy prefix of string @a src of max. size @a size to destination buffer
+ * @a dest. No more than @a size bytes are written. The output string will
+ * always be well-formed, i.e. null-terminated and containing only complete
+ * characters.
+ *
+ * No more than @a n bytes are read from the input string, so it does not
+ * have to be null-terminated.
+ *
+ * @param dest   Destination buffer.
+ * @param count Size of the destination buffer (must be > 0).
+ * @param src   Source string.
+ * @param n	Maximum number of bytes to read from @a src.
+ */
+void str_ncpy(char *dest, size_t size, const char *src, size_t n)
+{
+	wchar_t ch;
+	size_t src_off;
+	size_t dest_off;
+
+	/* There must be space for a null terminator in the buffer. */
+	assert(size > 0);
+	
+	src_off = 0;
+	dest_off = 0;
+
+	while ((ch = str_decode(src, &src_off, n)) != 0) {
+		if (chr_encode(ch, dest, &dest_off, size - 1) != EOK)
+			break;
+	}
+
+	dest[dest_off] = '\0';
+}
+
+/** Append one string to another.
+ *
+ * Append source string @a src to string in destination buffer @a dest.
+ * Size of the destination buffer is @a dest. If the size of the output buffer
+ * is at least one byte, the output string will always be well-formed, i.e.
+ * null-terminated and containing only complete characters.
+ *
+ * @param dest   Destination buffer.
+ * @param count Size of the destination buffer.
+ * @param src   Source string.
+ */
+void str_append(char *dest, size_t size, const char *src)
+{
+	size_t dstr_size;
+
+	dstr_size = str_size(dest);
+	str_cpy(dest + dstr_size, size - dstr_size, src);
+}
+
+/** Convert wide string to string.
+ *
+ * Convert wide string @a src to string. The output is written to the buffer
+ * specified by @a dest and @a size. @a size must be non-zero and the string
+ * written will always be well-formed.
+ *
+ * @param dest	Destination buffer.
+ * @param size	Size of the destination buffer.
+ * @param src	Source wide string.
+ */
+void wstr_to_str(char *dest, size_t size, const wchar_t *src)
+{
+	wchar_t ch;
+	size_t src_idx;
+	size_t dest_off;
+
+	/* There must be space for a null terminator in the buffer. */
+	assert(size > 0);
+	
+	src_idx = 0;
+	dest_off = 0;
+
+	while ((ch = src[src_idx++]) != 0) {
+		if (chr_encode(ch, dest, &dest_off, size - 1) != EOK)
+			break;
+	}
+
+	dest[dest_off] = '\0';
+}
+
+/** Convert wide string to new string.
+ *
+ * Convert wide string @a src to string. Space for the new string is allocated
+ * on the heap.
+ *
+ * @param src	Source wide string.
+ * @return	New string.
+ */
+char *wstr_to_astr(const wchar_t *src)
+{
+	char dbuf[STR_BOUNDS(1)];
+	char *str;
+	wchar_t ch;
+
+	size_t src_idx;
+	size_t dest_off;
+	size_t dest_size;
+
+	/* Compute size of encoded string. */
+
+	src_idx = 0;
+	dest_size = 0;
+
+	while ((ch = src[src_idx++]) != 0) {
+		dest_off = 0;
+		if (chr_encode(ch, dbuf, &dest_off, STR_BOUNDS(1)) != EOK)
+			break;
+		dest_size += dest_off;
+	}
+
+	str = malloc(dest_size + 1);
+	if (str == NULL)
+		return NULL;
+
+	/* Encode string. */
+
+	src_idx = 0;
+	dest_off = 0;
+
+	while ((ch = src[src_idx++]) != 0) {
+		if (chr_encode(ch, str, &dest_off, dest_size) != EOK)
+			break;
+	}
+
+	str[dest_size] = '\0';
+	return str;
+}
+
+
+/** Convert string to wide string.
+ *
+ * Convert string @a src to wide string. The output is written to the
+ * buffer specified by @a dest and @a dlen. @a dlen must be non-zero
+ * and the wide string written will always be null-terminated.
+ *
+ * @param dest	Destination buffer.
+ * @param dlen	Length of destination buffer (number of wchars).
+ * @param src	Source string.
+ */
+void str_to_wstr(wchar_t *dest, size_t dlen, const char *src)
+{
+	size_t offset;
+	size_t di;
+	wchar_t c;
+
+	assert(dlen > 0);
+
+	offset = 0;
+	di = 0;
+
+	do {
+		if (di >= dlen - 1)
+			break;
+
+		c = str_decode(src, &offset, STR_NO_LIMIT);
+		dest[di++] = c;
+	} while (c != '\0');
+
+	dest[dlen - 1] = '\0';
+}
+
+/** Find first occurence of character in string.
+ *
+ * @param str String to search.
+ * @param ch  Character to look for.
+ *
+ * @return Pointer to character in @a str or NULL if not found.
+ */
+char *str_chr(const char *str, wchar_t ch)
+{
+	wchar_t acc;
+	size_t off = 0;
+	size_t last = 0;
+	
+	while ((acc = str_decode(str, &off, STR_NO_LIMIT)) != 0) {
+		if (acc == ch)
+			return (char *) (str + last);
+		last = off;
+	}
+	
+	return NULL;
+}
+
+/** Find last occurence of character in string.
+ *
+ * @param str String to search.
+ * @param ch  Character to look for.
+ *
+ * @return Pointer to character in @a str or NULL if not found.
+ */
+char *str_rchr(const char *str, wchar_t ch)
+{
+	wchar_t acc;
+	size_t off = 0;
+	size_t last = 0;
+	const char *res = NULL;
+	
+	while ((acc = str_decode(str, &off, STR_NO_LIMIT)) != 0) {
+		if (acc == ch)
+			res = (str + last);
+		last = off;
+	}
+	
+	return (char *) res;
+}
+
+/** Insert a wide character into a wide string.
+ *
+ * Insert a wide character into a wide string at position
+ * @a pos. The characters after the position are shifted.
+ *
+ * @param str     String to insert to.
+ * @param ch      Character to insert to.
+ * @param pos     Character index where to insert.
+ @ @param max_pos Characters in the buffer.
+ *
+ * @return True if the insertion was sucessful, false if the position
+ *         is out of bounds.
+ *
+ */
+bool wstr_linsert(wchar_t *str, wchar_t ch, size_t pos, size_t max_pos)
+{
+	size_t len = wstr_length(str);
+	
+	if ((pos > len) || (pos + 1 > max_pos))
+		return false;
+	
+	size_t i;
+	for (i = len; i + 1 > pos; i--)
+		str[i + 1] = str[i];
+	
+	str[pos] = ch;
+	
+	return true;
+}
+
+/** Remove a wide character from a wide string.
+ *
+ * Remove a wide character from a wide string at position
+ * @a pos. The characters after the position are shifted.
+ *
+ * @param str String to remove from.
+ * @param pos Character index to remove.
+ *
+ * @return True if the removal was sucessful, false if the position
+ *         is out of bounds.
+ *
+ */
+bool wstr_remove(wchar_t *str, size_t pos)
+{
+	size_t len = wstr_length(str);
+	
+	if (pos >= len)
+		return false;
+	
+	size_t i;
+	for (i = pos + 1; i <= len; i++)
+		str[i - 1] = str[i];
+	
+	return true;
+}
+
+int stricmp(const char *a, const char *b)
+{
+	int c = 0;
+	
+	while (a[c] && b[c] && (!(tolower(a[c]) - tolower(b[c]))))
+		c++;
+	
+	return (tolower(a[c]) - tolower(b[c]));
+}
+
+/** Convert string to a number. 
+ * Core of strtol and strtoul functions.
+ *
+ * @param nptr		Pointer to string.
+ * @param endptr	If not NULL, function stores here pointer to the first
+ * 			invalid character.
+ * @param base		Zero or number between 2 and 36 inclusive.
+ * @param sgn		It's set to 1 if minus found.
+ * @return		Result of conversion.
+ */
+static unsigned long
+_strtoul(const char *nptr, char **endptr, int base, char *sgn)
+{
+	unsigned char c;
+	unsigned long result = 0;
+	unsigned long a, b;
+	const char *str = nptr;
+	const char *tmpptr;
+	
+	while (isspace(*str))
+		str++;
+	
+	if (*str == '-') {
+		*sgn = 1;
+		++str;
+	} else if (*str == '+')
+		++str;
+	
+	if (base) {
+		if ((base == 1) || (base > 36)) {
+			/* FIXME: set errno to EINVAL */
+			return 0;
+		}
+		if ((base == 16) && (*str == '0') && ((str[1] == 'x') ||
+		    (str[1] == 'X'))) {
+			str += 2;
+		}
+	} else {
+		base = 10;
+		
+		if (*str == '0') {
+			base = 8;
+			if ((str[1] == 'X') || (str[1] == 'x'))  {
+				base = 16;
+				str += 2;
+			}
+		} 
+	}
+	
+	tmpptr = str;
+
+	while (*str) {
+		c = *str;
+		c = (c >= 'a' ? c - 'a' + 10 : (c >= 'A' ? c - 'A' + 10 :
+		    (c <= '9' ? c - '0' : 0xff)));
+		if (c > base) {
+			break;
+		}
+		
+		a = (result & 0xff) * base + c;
+		b = (result >> 8) * base + (a >> 8);
+		
+		if (b > (ULONG_MAX >> 8)) {
+			/* overflow */
+			/* FIXME: errno = ERANGE*/
+			return ULONG_MAX;
+		}
+	
+		result = (b << 8) + (a & 0xff);
+		++str;
+	}
+	
+	if (str == tmpptr) {
+		/*
+		 * No number was found => first invalid character is the first
+		 * character of the string.
+		 */
+		/* FIXME: set errno to EINVAL */
+		str = nptr;
+		result = 0;
+	}
+	
+	if (endptr)
+		*endptr = (char *) str;
+
+	if (nptr == str) { 
+		/*FIXME: errno = EINVAL*/
+		return 0;
+	}
+
+	return result;
+}
+
+/** Convert initial part of string to long int according to given base.
+ * The number may begin with an arbitrary number of whitespaces followed by
+ * optional sign (`+' or `-'). If the base is 0 or 16, the prefix `0x' may be
+ * inserted and the number will be taken as hexadecimal one. If the base is 0
+ * and the number begin with a zero, number will be taken as octal one (as with
+ * base 8). Otherwise the base 0 is taken as decimal.
+ *
+ * @param nptr		Pointer to string.
+ * @param endptr	If not NULL, function stores here pointer to the first
+ * 			invalid character.
+ * @param base		Zero or number between 2 and 36 inclusive.
+ * @return		Result of conversion.
+ */
+long int strtol(const char *nptr, char **endptr, int base)
+{
+	char sgn = 0;
+	unsigned long number = 0;
+	
+	number = _strtoul(nptr, endptr, base, &sgn);
+
+	if (number > LONG_MAX) {
+		if ((sgn) && (number == (unsigned long) (LONG_MAX) + 1)) {
+			/* FIXME: set 0 to errno */
+			return number;		
+		}
+		/* FIXME: set ERANGE to errno */
+		return (sgn ? LONG_MIN : LONG_MAX);	
+	}
+	
+	return (sgn ? -number : number);
+}
+
+char *str_dup(const char *src)
+{
+	size_t size = str_size(src);
+	void *dest = malloc(size + 1);
+	
+	if (dest == NULL)
+		return (char *) NULL;
+	
+	return (char *) memcpy(dest, src, size + 1);
+}
+
+char *str_ndup(const char *src, size_t max_size)
+{
+	size_t size = str_size(src);
+	if (size > max_size)
+		size = max_size;
+	
+	char *dest = (char *) malloc(size + 1);
+	
+	if (dest == NULL)
+		return (char *) NULL;
+	
+	memcpy(dest, src, size);
+	dest[size] = 0;
+	return dest;
+}
+
+
+/** Convert initial part of string to unsigned long according to given base.
+ * The number may begin with an arbitrary number of whitespaces followed by
+ * optional sign (`+' or `-'). If the base is 0 or 16, the prefix `0x' may be
+ * inserted and the number will be taken as hexadecimal one. If the base is 0
+ * and the number begin with a zero, number will be taken as octal one (as with
+ * base 8). Otherwise the base 0 is taken as decimal.
+ *
+ * @param nptr		Pointer to string.
+ * @param endptr	If not NULL, function stores here pointer to the first
+ * 			invalid character
+ * @param base		Zero or number between 2 and 36 inclusive.
+ * @return		Result of conversion.
+ */
+unsigned long strtoul(const char *nptr, char **endptr, int base)
+{
+	char sgn = 0;
+	unsigned long number = 0;
+	
+	number = _strtoul(nptr, endptr, base, &sgn);
+
+	return (sgn ? -number : number);
+}
+
+char *strtok(char *s, const char *delim)
+{
+	static char *next;
+
+	return strtok_r(s, delim, &next);
+}
+
+char *strtok_r(char *s, const char *delim, char **next)
+{
+	char *start, *end;
+
+	if (s == NULL)
+		s = *next;
+
+	/* Skip over leading delimiters. */
+	while (*s && (str_chr(delim, *s) != NULL)) ++s;
+	start = s;
+
+	/* Skip over token characters. */
+	while (*s && (str_chr(delim, *s) == NULL)) ++s;
+	end = s;
+	*next = (*s ? s + 1 : s);
+
+	if (start == end) {
+		return NULL;	/* No more tokens. */
+	}
+
+	/* Overwrite delimiter with NULL terminator. */
+	*end = '\0';
+	return start;
+}
+
+/** @}
+ */
Index: uspace/lib/c/generic/sysinfo.c
===================================================================
--- uspace/lib/c/generic/sysinfo.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/generic/sysinfo.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,46 @@
+/*
+ * 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 libc
+ * @{
+ */
+/** @file
+ */ 
+
+#include <libc.h>
+#include <sysinfo.h>
+#include <str.h>
+
+sysarg_t sysinfo_value(const char *name)
+{
+	return __SYSCALL2(SYS_SYSINFO_VALUE, (sysarg_t) name,
+	    (sysarg_t) str_size(name));
+}
+
+/** @}
+ */
Index: uspace/lib/c/generic/task.c
===================================================================
--- uspace/lib/c/generic/task.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/generic/task.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,174 @@
+/*
+ * Copyright (c) 2006 Jakub Jermar
+ * 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.
+ */
+
+/** @addtogroup libc
+ * @{
+ */
+/** @file
+ */
+
+#include <task.h>
+#include <libc.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <loader/loader.h>
+#include <str.h>
+#include <ipc/ns.h>
+#include <macros.h>
+#include <async.h>
+
+task_id_t task_get_id(void)
+{
+	task_id_t task_id;
+	(void) __SYSCALL1(SYS_TASK_GET_ID, (sysarg_t) &task_id);
+	
+	return task_id;
+}
+
+/** Set the task name.
+ *
+ * @param name The new name, typically the command used to execute the
+ *             program.
+ *
+ * @return Zero on success or negative error code.
+ *
+ */
+int task_set_name(const char *name)
+{
+	return __SYSCALL2(SYS_TASK_SET_NAME, (sysarg_t) name, str_size(name));
+}
+
+/** Create a new task by running an executable from the filesystem.
+ *
+ * This is really just a convenience wrapper over the more complicated
+ * loader API.
+ *
+ * @param path pathname of the binary to execute
+ * @param argv command-line arguments
+ *
+ * @return ID of the newly created task or zero on error.
+ *
+ */
+task_id_t task_spawn(const char *path, const char *const args[])
+{
+	/* Connect to a program loader. */
+	loader_t *ldr = loader_connect();
+	if (ldr == NULL)
+		return 0;
+	
+	/* Get task ID. */
+	task_id_t task_id;
+	int rc = loader_get_task_id(ldr, &task_id);
+	if (rc != EOK)
+		goto error;
+	
+	/* Send spawner's current working directory. */
+	rc = loader_set_cwd(ldr);
+	if (rc != EOK)
+		goto error;
+	
+	/* Send program pathname. */
+	rc = loader_set_pathname(ldr, path);
+	if (rc != EOK)
+		goto error;
+	
+	/* Send arguments. */
+	rc = loader_set_args(ldr, args);
+	if (rc != EOK)
+		goto error;
+	
+	/* Send default files */
+	fdi_node_t *files[4];
+	fdi_node_t stdin_node;
+	fdi_node_t stdout_node;
+	fdi_node_t stderr_node;
+	
+	if ((stdin != NULL) && (fnode(stdin, &stdin_node) == EOK))
+		files[0] = &stdin_node;
+	else
+		files[0] = NULL;
+	
+	if ((stdout != NULL) && (fnode(stdout, &stdout_node) == EOK))
+		files[1] = &stdout_node;
+	else
+		files[1] = NULL;
+	
+	if ((stderr != NULL) && (fnode(stderr, &stderr_node) == EOK))
+		files[2] = &stderr_node;
+	else
+		files[2] = NULL;
+	
+	files[3] = NULL;
+	
+	rc = loader_set_files(ldr, files);
+	if (rc != EOK)
+		goto error;
+	
+	/* Load the program. */
+	rc = loader_load_program(ldr);
+	if (rc != EOK)
+		goto error;
+	
+	/* Run it. */
+	rc = loader_run(ldr);
+	if (rc != EOK)
+		goto error;
+	
+	/* Success */
+	free(ldr);
+	return task_id;
+	
+error:
+	/* Error exit */
+	loader_abort(ldr);
+	free(ldr);
+	
+	return 0;
+}
+
+int task_wait(task_id_t id, task_exit_t *texit, int *retval)
+{
+	ipcarg_t te, rv;
+	int rc;
+
+	rc = (int) async_req_2_2(PHONE_NS, NS_TASK_WAIT, LOWER32(id),
+	    UPPER32(id), &te, &rv);
+	*texit = te;
+	*retval = rv;
+
+	return rc;
+}
+
+int task_retval(int val)
+{
+	return (int) async_req_1_0(PHONE_NS, NS_RETVAL, val);
+}
+
+/** @}
+ */
Index: uspace/lib/c/generic/thread.c
===================================================================
--- uspace/lib/c/generic/thread.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/generic/thread.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,174 @@
+/*
+ * 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 libc
+ * @{
+ */
+/** @file
+ */ 
+
+#include <thread.h>
+#include <libc.h>
+#include <stdlib.h>
+#include <libarch/faddr.h>
+#include <kernel/proc/uarg.h>
+#include <fibril.h>
+#include <str.h>
+#include <async.h>
+
+#ifndef THREAD_INITIAL_STACK_PAGES_NO
+#define THREAD_INITIAL_STACK_PAGES_NO 1
+#endif
+
+/** Main thread function.
+ *
+ * This function is called from __thread_entry() and is used
+ * to call the thread's implementing function and perform cleanup
+ * and exit when thread returns back. Do not call this function
+ * directly.
+ *
+ * @param uarg Pointer to userspace argument structure.
+ */
+void __thread_main(uspace_arg_t *uarg)
+{
+	fibril_t *f;
+
+	f = fibril_setup();
+	__tcb_set(f->tcb);
+
+	uarg->uspace_thread_function(uarg->uspace_thread_arg);
+	/* XXX: we cannot free the userspace stack while running on it */
+//	free(uarg->uspace_stack);
+//	free(uarg);
+
+	/* If there is a manager, destroy it */
+	async_destroy_manager();
+	fibril_teardown(f);
+
+	thread_exit(0);
+}
+
+/** Create userspace thread.
+ *
+ * This function creates new userspace thread and allocates userspace
+ * stack and userspace argument structure for it.
+ *
+ * @param function Function implementing the thread.
+ * @param arg Argument to be passed to thread.
+ * @param name Symbolic name of the thread.
+ * @param tid Thread ID of the newly created thread.
+ *
+ * @return Zero on success or a code from @ref errno.h on failure.
+ */
+int thread_create(void (* function)(void *), void *arg, const char *name,
+    thread_id_t *tid)
+{
+	char *stack;
+	uspace_arg_t *uarg;
+	int rc;
+
+	stack = (char *) malloc(getpagesize() * THREAD_INITIAL_STACK_PAGES_NO);
+	if (!stack)
+		return -1;
+		
+	uarg = (uspace_arg_t *) malloc(sizeof(uspace_arg_t));
+	if (!uarg) {
+		free(stack);
+		return -1;
+	}
+	
+	uarg->uspace_entry = (void *) FADDR(__thread_entry);
+	uarg->uspace_stack = (void *) stack;
+	uarg->uspace_thread_function = function;
+	uarg->uspace_thread_arg = arg;
+	uarg->uspace_uarg = uarg;
+	
+	rc = __SYSCALL4(SYS_THREAD_CREATE, (sysarg_t) uarg, (sysarg_t) name,
+	    (sysarg_t) str_size(name), (sysarg_t) tid);
+	
+	if (rc) {
+		/*
+		 * Failed to create a new thread.
+		 * Free up the allocated structures.
+		 */
+		free(uarg);
+		free(stack);
+	}
+
+	return rc;
+}
+
+/** Terminate current thread.
+ *
+ * @param status Exit status. Currently not used.
+ */
+void thread_exit(int status)
+{
+	__SYSCALL1(SYS_THREAD_EXIT, (sysarg_t) status);
+	for (;;)
+		;
+}
+
+/** Detach thread.
+ *
+ * Currently not implemented.
+ *
+ * @param thread TID.
+ */
+void thread_detach(thread_id_t thread)
+{
+}
+
+/** Join thread.
+ *
+ * Currently not implemented.
+ *
+ * @param thread TID.
+ *
+ * @return Thread exit status.
+ */
+int thread_join(thread_id_t thread)
+{
+	return 0;
+}
+
+/** Get current thread ID.
+ *
+ * @return Current thread ID.
+ */
+thread_id_t thread_get_id(void)
+{
+	thread_id_t thread_id;
+
+	(void) __SYSCALL1(SYS_THREAD_GET_ID, (sysarg_t) &thread_id);
+
+	return thread_id;
+}
+
+/** @}
+ */
Index: uspace/lib/c/generic/time.c
===================================================================
--- uspace/lib/c/generic/time.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/generic/time.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,212 @@
+/*
+ * 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 libc
+ * @{
+ */
+/** @file
+ */
+
+#include <sys/time.h>
+#include <unistd.h>
+#include <ipc/ipc.h>
+#include <stdio.h>
+#include <arch/barrier.h>
+#include <unistd.h>
+#include <atomic.h>
+#include <sysinfo.h>
+#include <ipc/services.h>
+#include <libc.h>
+
+#include <sysinfo.h>
+#include <as.h>
+#include <ddi.h>
+
+#include <time.h>
+
+/* Pointers to public variables with time */
+struct {
+	volatile sysarg_t seconds1;
+	volatile sysarg_t useconds;
+	volatile sysarg_t seconds2;
+} *ktime = NULL;
+
+/** Add microseconds to given timeval.
+ *
+ * @param tv		Destination timeval.
+ * @param usecs		Number of microseconds to add.
+ */
+void tv_add(struct timeval *tv, suseconds_t usecs)
+{
+	tv->tv_sec += usecs / 1000000;
+	tv->tv_usec += usecs % 1000000;
+	if (tv->tv_usec > 1000000) {
+		tv->tv_sec++;
+		tv->tv_usec -= 1000000;
+	}
+}
+
+/** Subtract two timevals.
+ *
+ * @param tv1		First timeval.
+ * @param tv2		Second timeval.
+ *
+ * @return		Return difference between tv1 and tv2 (tv1 - tv2) in
+ * 			microseconds.
+ */
+suseconds_t tv_sub(struct timeval *tv1, struct timeval *tv2)
+{
+	suseconds_t result;
+
+	result = tv1->tv_usec - tv2->tv_usec;
+	result += (tv1->tv_sec - tv2->tv_sec) * 1000000;
+
+	return result;
+}
+
+/** Decide if one timeval is greater than the other.
+ *
+ * @param t1		First timeval.
+ * @param t2		Second timeval.
+ *
+ * @return		Return true tv1 is greater than tv2. Otherwise return
+ * 			false.
+ */
+int tv_gt(struct timeval *tv1, struct timeval *tv2)
+{
+	if (tv1->tv_sec > tv2->tv_sec)
+		return 1;
+	if (tv1->tv_sec == tv2->tv_sec && tv1->tv_usec > tv2->tv_usec)
+		return 1;
+	return 0;
+}
+
+/** Decide if one timeval is greater than or equal to the other.
+ *
+ * @param tv1		First timeval.
+ * @param tv2		Second timeval.
+ *
+ * @return		Return true if tv1 is greater than or equal to tv2.
+ * 			Otherwise return false.
+ */
+int tv_gteq(struct timeval *tv1, struct timeval *tv2)
+{
+	if (tv1->tv_sec > tv2->tv_sec)
+		return 1;
+	if (tv1->tv_sec == tv2->tv_sec && tv1->tv_usec >= tv2->tv_usec)
+		return 1;
+	return 0;
+}
+
+
+/** POSIX gettimeofday
+ *
+ * The time variables are memory mapped(RO) from kernel, which updates
+ * them periodically. As it is impossible to read 2 values atomically, we
+ * use a trick: First read a seconds, then read microseconds, then
+ * read seconds again. If a second elapsed in the meantime, set it to zero. 
+ * This provides assurance, that at least the
+ * sequence of subsequent gettimeofday calls is ordered.
+ */
+int gettimeofday(struct timeval *tv, struct timezone *tz)
+{
+	void *mapping;
+	sysarg_t s1, s2;
+	int rights;
+	int res;
+
+	if (!ktime) {
+		mapping = as_get_mappable_page(PAGE_SIZE);
+		/* Get the mapping of kernel clock */
+		res = ipc_share_in_start_1_1(PHONE_NS, mapping, PAGE_SIZE,
+		    SERVICE_MEM_REALTIME, &rights);
+		if (res) {
+			printf("Failed to initialize timeofday memarea\n");
+			_exit(1);
+		}
+		if (!(rights & AS_AREA_READ)) {
+			printf("Received bad rights on time area: %X\n",
+			    rights);
+			as_area_destroy(mapping);
+			_exit(1);
+		}
+		ktime = mapping;
+	}
+	if (tz) {
+		tz->tz_minuteswest = 0;
+		tz->tz_dsttime = DST_NONE;
+	}
+
+	s2 = ktime->seconds2;
+	read_barrier();
+	tv->tv_usec = ktime->useconds;
+	read_barrier();
+	s1 = ktime->seconds1;
+	if (s1 != s2) {
+		tv->tv_usec = 0;
+		tv->tv_sec = s1 > s2 ? s1 : s2;
+	} else
+		tv->tv_sec = s1;
+
+	return 0;
+}
+
+time_t time(time_t *tloc)
+{
+	struct timeval tv;
+
+	if (gettimeofday(&tv, NULL))
+		return (time_t) -1;
+	if (tloc)
+		*tloc = tv.tv_sec;
+	return tv.tv_sec;
+}
+
+/** Wait unconditionally for specified number of microseconds */
+int usleep(useconds_t usec)
+{
+	(void) __SYSCALL1(SYS_THREAD_USLEEP, usec);
+	return 0;
+}
+
+/** Wait unconditionally for specified number of seconds */
+unsigned int sleep(unsigned int sec)
+{
+	/* Sleep in 1000 second steps to support
+	   full argument range */
+	while (sec > 0) {
+		unsigned int period = (sec > 1000) ? 1000 : sec;
+	
+		usleep(period * 1000000);
+		sec -= period;
+	}
+	return 0;
+}
+
+/** @}
+ */
Index: uspace/lib/c/generic/tls.c
===================================================================
--- uspace/lib/c/generic/tls.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/generic/tls.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,141 @@
+/*
+ * 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 libc
+ * @{
+ */
+/** @file
+ *
+ * Support for thread-local storage, as described in:
+ * 	Drepper U.: ELF Handling For Thread-Local Storage, 2005
+ *
+ * Only static model is supported.
+ */ 
+
+#include <tls.h>
+#include <malloc.h>
+#include <str.h>
+#include <align.h>
+
+/** Create TLS (Thread Local Storage) data structures.
+ *
+ * The code requires, that sections .tdata and .tbss are adjacent. It may be
+ * changed in the future.
+ *
+ * @return Pointer to TCB.
+ */
+tcb_t *__make_tls(void)
+{
+	void *data;
+	tcb_t *tcb;
+	size_t tls_size = &_tbss_end - &_tdata_start;
+	
+	tcb = __alloc_tls(&data, tls_size);
+	
+	/*
+	 * Copy thread local data from the initialization image.
+	 */
+	memcpy(data, &_tdata_start, &_tdata_end - &_tdata_start);
+	/*
+	 * Zero out the thread local uninitialized data.
+	 */
+	memset(data + (&_tbss_start - &_tdata_start), 0,
+	    &_tbss_end - &_tbss_start);
+
+	return tcb;
+}
+
+void __free_tls(tcb_t *tcb)
+{
+	size_t tls_size = &_tbss_end - &_tdata_start;
+	__free_tls_arch(tcb, tls_size);
+}
+
+#ifdef CONFIG_TLS_VARIANT_1
+/** Allocate TLS variant 1 data structures.
+ *
+ * @param data 		Start of TLS section. This is an output argument.
+ * @param size		Size of tdata + tbss section.
+ * @return 		Pointer to tcb_t structure.
+ */
+tcb_t *tls_alloc_variant_1(void **data, size_t size)
+{
+	tcb_t *result;
+
+	result = malloc(sizeof(tcb_t) + size);
+	*data = ((void *)result) + sizeof(tcb_t);
+	return result;
+}
+
+/** Free TLS variant I data structures.
+ *
+ * @param tcb		Pointer to TCB structure.
+ * @param size		This argument is ignored.
+ */
+void tls_free_variant_1(tcb_t *tcb, size_t size)
+{
+	free(tcb);
+}
+#endif
+
+#ifdef CONFIG_TLS_VARIANT_2
+/** Allocate TLS variant II data structures.
+ *
+ * @param data		Pointer to pointer to thread local data. This is
+ * 			actually an output argument.
+ * @param size		Size of thread local data.
+ * @return		Pointer to TCB structure.
+ */
+tcb_t * tls_alloc_variant_2(void **data, size_t size)
+{
+	tcb_t *tcb;
+	
+	size = ALIGN_UP(size, &_tls_alignment);
+	*data = memalign((uintptr_t) &_tls_alignment, sizeof(tcb_t) + size);
+
+	tcb = (tcb_t *) (*data + size);
+	tcb->self = tcb;
+
+	return tcb;
+}
+
+/** Free TLS variant II data structures.
+ *
+ * @param tcb		Pointer to TCB structure.
+ * @param size		Size of thread local data.
+ */
+void tls_free_variant_2(tcb_t *tcb, size_t size)
+{
+	size = ALIGN_UP(size, &_tls_alignment);
+	void *start = ((void *) tcb) - size;
+	free(start);
+}
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/generic/udebug.c
===================================================================
--- uspace/lib/c/generic/udebug.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/generic/udebug.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,139 @@
+/*
+ * 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.
+ */
+
+/** @addtogroup libc
+ * @{
+ */
+/** @file
+ */ 
+
+#include <udebug.h>
+#include <sys/types.h>
+#include <ipc/ipc.h>
+#include <async.h>
+
+int udebug_begin(int phoneid)
+{
+	return async_req_1_0(phoneid, IPC_M_DEBUG_ALL, UDEBUG_M_BEGIN);
+}
+
+int udebug_end(int phoneid)
+{
+	return async_req_1_0(phoneid, IPC_M_DEBUG_ALL, UDEBUG_M_END);
+}
+
+int udebug_set_evmask(int phoneid, udebug_evmask_t mask)
+{
+	return async_req_2_0(phoneid, IPC_M_DEBUG_ALL, UDEBUG_M_SET_EVMASK,
+		mask);
+}
+
+int udebug_thread_read(int phoneid, void *buffer, size_t n,
+	size_t *copied, size_t *needed)
+{
+	ipcarg_t a_copied, a_needed;
+	int rc;
+
+	rc = async_req_3_3(phoneid, IPC_M_DEBUG_ALL, UDEBUG_M_THREAD_READ,
+		(sysarg_t)buffer, n, NULL, &a_copied, &a_needed);
+
+	*copied = (size_t)a_copied;
+	*needed = (size_t)a_needed;
+
+	return rc;
+}
+
+int udebug_name_read(int phoneid, void *buffer, size_t n,
+	size_t *copied, size_t *needed)
+{
+	ipcarg_t a_copied, a_needed;
+	int rc;
+
+	rc = async_req_3_3(phoneid, IPC_M_DEBUG_ALL, UDEBUG_M_NAME_READ,
+		(sysarg_t)buffer, n, NULL, &a_copied, &a_needed);
+
+	*copied = (size_t)a_copied;
+	*needed = (size_t)a_needed;
+
+	return rc;
+}
+
+int udebug_areas_read(int phoneid, void *buffer, size_t n,
+	size_t *copied, size_t *needed)
+{
+	ipcarg_t a_copied, a_needed;
+	int rc;
+
+	rc = async_req_3_3(phoneid, IPC_M_DEBUG_ALL, UDEBUG_M_AREAS_READ,
+		(sysarg_t)buffer, n, NULL, &a_copied, &a_needed);
+
+	*copied = (size_t)a_copied;
+	*needed = (size_t)a_needed;
+
+	return rc;
+}
+
+int udebug_mem_read(int phoneid, void *buffer, uintptr_t addr, size_t n)
+{
+	return async_req_4_0(phoneid, IPC_M_DEBUG_ALL, UDEBUG_M_MEM_READ,
+	    (sysarg_t)buffer, addr, n);
+}
+
+int udebug_args_read(int phoneid, thash_t tid, sysarg_t *buffer)
+{
+	return async_req_3_0(phoneid, IPC_M_DEBUG_ALL, UDEBUG_M_ARGS_READ,
+	    tid, (sysarg_t)buffer);
+}
+
+int udebug_regs_read(int phoneid, thash_t tid, void *buffer)
+{
+	return async_req_3_0(phoneid, IPC_M_DEBUG_ALL, UDEBUG_M_REGS_READ,
+	    tid, (sysarg_t)buffer);
+}
+
+int udebug_go(int phoneid, thash_t tid, udebug_event_t *ev_type,
+    sysarg_t *val0, sysarg_t *val1)
+{
+	ipcarg_t a_ev_type;
+	int rc;
+
+	rc =  async_req_2_3(phoneid, IPC_M_DEBUG_ALL, UDEBUG_M_GO,
+	    tid, &a_ev_type, val0, val1);
+
+	*ev_type = a_ev_type;
+	return rc;
+}
+
+int udebug_stop(int phoneid, thash_t tid)
+{
+	return async_req_2_0(phoneid, IPC_M_DEBUG_ALL, UDEBUG_M_STOP,
+	    tid);
+}
+
+/** @}
+ */
Index: uspace/lib/c/generic/vfs/canonify.c
===================================================================
--- uspace/lib/c/generic/vfs/canonify.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/generic/vfs/canonify.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,347 @@
+/*
+ * Copyright (c) 2008 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 libc 
+ * @{
+ */ 
+
+/**
+ * @file
+ * @brief
+ */
+
+#include <stdlib.h>
+#include <vfs/canonify.h>
+
+/** Token types used for tokenization of path. */
+typedef enum {
+	TK_INVALID,
+	TK_SLASH,
+	TK_DOT,
+	TK_DOTDOT,
+	TK_COMP,
+	TK_NUL
+} tokval_t;
+
+typedef struct {
+	tokval_t kind;
+	char *start;
+	char *stop;
+} token_t;
+
+/** Fake up the TK_SLASH token. */
+static token_t slash_token(char *start)
+{
+	token_t ret;
+	ret.kind = TK_SLASH;
+	ret.start = start;
+	ret.stop = start;
+	return ret;
+}
+
+/** Given a token, return the next token. */
+static token_t next_token(token_t *cur)
+{
+	token_t ret;
+
+	if (cur->stop[1] == '\0') {
+		ret.kind = TK_NUL;
+		ret.start = cur->stop + 1;
+		ret.stop = ret.start;
+		return ret;
+	}
+	if (cur->stop[1] == '/') {
+		ret.kind = TK_SLASH;
+		ret.start = cur->stop + 1;
+		ret.stop = ret.start;
+		return ret;
+	}
+	if (cur->stop[1] == '.' && (!cur->stop[2] || cur->stop[2] == '/')) {
+		ret.kind = TK_DOT;
+		ret.start = cur->stop + 1;
+		ret.stop = ret.start;
+		return ret;
+	}
+	if (cur->stop[1] == '.' && cur->stop[2] == '.' &&
+	    (!cur->stop[3] || cur->stop[3] == '/')) {
+		ret.kind = TK_DOTDOT;
+		ret.start = cur->stop + 1;
+		ret.stop = cur->stop + 2;
+		return ret;
+	}
+	unsigned i;
+	for (i = 1; cur->stop[i] && cur->stop[i] != '/'; i++)
+		;
+	ret.kind = TK_COMP;
+	ret.start = &cur->stop[1];
+	ret.stop = &cur->stop[i - 1];
+	return ret;
+}
+
+/** States used by canonify(). */
+typedef enum {
+	S_INI,
+	S_A,
+	S_B,
+	S_C,
+	S_ACCEPT,
+	S_RESTART,
+	S_REJECT
+} state_t;
+
+typedef struct {
+	state_t s;
+	void (* f)(token_t *, token_t *, token_t *);
+} change_state_t;
+
+/*
+ * Actions that can be performed when transitioning from one
+ * state of canonify() to another.
+ */
+static void set_first_slash(token_t *t, token_t *tfsl, token_t *tlcomp)
+{
+	*tfsl = *t;
+	*tlcomp = *t;
+}
+static void save_component(token_t *t, token_t *tfsl, token_t *tlcomp)
+{
+	*tlcomp = *t;
+}
+static void terminate_slash(token_t *t, token_t *tfsl, token_t *tlcomp)
+{
+	if (tfsl->stop[1])	/* avoid writing to a well-formatted path */
+		tfsl->stop[1] = '\0';
+}
+static void remove_trailing_slash(token_t *t, token_t *tfsl, token_t *tlcomp)
+{
+	t->start[-1] = '\0';
+}
+/** Eat the extra '/'.
+ *
+ * @param t		The current TK_SLASH token.
+ */
+static void shift_slash(token_t *t, token_t *tfsl, token_t *tlcomp)
+{
+	char *p = t->start;
+	char *q = t->stop + 1;
+	while ((*p++ = *q++))
+		;
+}
+/** Eat the extra '.'.
+ *
+ * @param t		The current TK_DOT token.
+ */
+static void shift_dot(token_t *t, token_t *tfsl, token_t *tlcomp)
+{
+	char *p = t->start;
+	char *q = t->stop + 1;
+	while ((*p++ = *q++))
+		;
+}
+/** Collapse the TK_COMP TK_SLASH TK_DOTDOT pattern.
+ *
+ * @param t		The current TK_DOTDOT token.
+ * @param tlcomp	The last TK_COMP token.
+ */
+static void shift_dotdot(token_t *t, token_t *tfsl, token_t *tlcomp)
+{
+	char *p = tlcomp->start;
+	char *q = t->stop + 1;
+	while ((*p++ = *q++))
+		;
+}
+
+/** Transition function for canonify(). */
+static change_state_t trans[4][6] = {
+	[S_INI] = {
+		[TK_SLASH] = {
+			.s = S_A,
+			.f = set_first_slash,
+		},
+		[TK_DOT] = {
+			.s = S_REJECT,
+			.f = NULL,
+		},
+		[TK_DOTDOT] = {
+			.s = S_REJECT,
+			.f = NULL,
+		},
+		[TK_COMP] = {
+			.s = S_REJECT,
+			.f = NULL,
+		},
+		[TK_NUL] = {
+			.s = S_REJECT,
+			.f = NULL,
+		},
+		[TK_INVALID] = {
+			.s = S_REJECT,
+			.f = NULL,
+		},
+	},
+	[S_A] = {
+		[TK_SLASH] = {
+			.s = S_A,
+			.f = set_first_slash,
+		},
+		[TK_DOT] = {
+			.s = S_A,
+			.f = NULL,
+		},
+		[TK_DOTDOT] = {
+			.s = S_A,
+			.f = NULL,
+		},
+		[TK_COMP] = {
+			.s = S_B,
+			.f = save_component,
+		},
+		[TK_NUL] = {
+			.s = S_ACCEPT,
+			.f = terminate_slash,
+		},
+		[TK_INVALID] = {
+			.s = S_REJECT,
+			.f = NULL,
+		},
+	},
+	[S_B] = {
+		[TK_SLASH] = {
+			.s = S_C,
+			.f = NULL,
+		},
+		[TK_DOT] = {
+			.s = S_REJECT,
+			.f = NULL,
+		},
+		[TK_DOTDOT] = {
+			.s = S_REJECT,
+			.f = NULL,
+		},
+		[TK_COMP] = {
+			.s = S_REJECT,
+			.f = NULL,
+		},
+		[TK_NUL] = {
+			.s = S_ACCEPT,
+			.f = NULL,
+		},
+		[TK_INVALID] = {
+			.s = S_REJECT,
+			.f = NULL,
+		},
+	},
+	[S_C] = {
+		[TK_SLASH] = {
+			.s = S_RESTART,
+			.f = shift_slash,
+		},
+		[TK_DOT] = {
+			.s = S_RESTART,
+			.f = shift_dot,
+		},
+		[TK_DOTDOT] = {
+			.s = S_RESTART,
+			.f = shift_dotdot,
+		},
+		[TK_COMP] = {
+			.s = S_B,
+			.f = save_component,
+		},
+		[TK_NUL] = {
+			.s = S_ACCEPT,
+			.f = remove_trailing_slash,
+		},
+		[TK_INVALID] = {
+			.s = S_REJECT,
+			.f = NULL,
+		},
+	}
+};
+
+/** Canonify a file system path.
+ *
+ * A file system path is canonical, if the following holds:
+ *
+ * 1) the path is absolute
+ *    (i.e. a/b/c is not canonical)
+ * 2) there is no trailing slash in the path if it has components
+ *    (i.e. /a/b/c/ is not canonical)
+ * 3) there is no extra slash in the path
+ *    (i.e. /a//b/c is not canonical)
+ * 4) there is no '.' component in the path
+ *    (i.e. /a/./b/c is not canonical)
+ * 5) there is no '..' component in the path
+ *    (i.e. /a/b/../c is not canonical)
+ *
+ * This function makes a potentially non-canonical file system path canonical.
+ * It works in-place and requires a NULL-terminated input string.
+ *
+ * @param path		Path to be canonified.
+ * @param lenp		Pointer where the length of the final path will be
+ *			stored. Can be NULL.
+ *
+ * @return		Canonified path or NULL on failure.
+ */
+char *canonify(char *path, size_t *lenp)
+{
+	state_t state;
+	token_t t;
+	token_t tfsl;		/* first slash */
+	token_t tlcomp;		/* last component */
+	if (*path != '/')
+		return NULL;
+	tfsl = slash_token(path);
+restart:
+	state = S_INI;
+	t = tfsl;
+	tlcomp = tfsl;
+	while (state != S_ACCEPT && state != S_RESTART && state != S_REJECT) {
+		if (trans[state][t.kind].f)
+			trans[state][t.kind].f(&t, &tfsl, &tlcomp);
+		state = trans[state][t.kind].s;
+		t = next_token(&t);
+	}
+	
+	switch (state) {
+	case S_RESTART:
+		goto restart;
+	case S_REJECT:
+		return NULL;
+	case S_ACCEPT:
+		if (lenp)
+			*lenp = (size_t)((tlcomp.stop - tfsl.start) + 1);
+		return tfsl.start; 
+	default:
+		abort();
+	}
+}
+
+/**
+ * @}
+ */
Index: uspace/lib/c/generic/vfs/vfs.c
===================================================================
--- uspace/lib/c/generic/vfs/vfs.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/generic/vfs/vfs.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,825 @@
+/*
+ * Copyright (c) 2008 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 libc
+ * @{
+ */
+/** @file
+ */
+
+#include <vfs/vfs.h>
+#include <vfs/canonify.h>
+#include <macros.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <dirent.h>
+#include <fcntl.h>
+#include <stdio.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <ipc/ipc.h>
+#include <ipc/services.h>
+#include <async.h>
+#include <atomic.h>
+#include <futex.h>
+#include <errno.h>
+#include <str.h>
+#include <devmap.h>
+#include <ipc/vfs.h>
+#include <ipc/devmap.h>
+
+static int vfs_phone = -1;
+static futex_t vfs_phone_futex = FUTEX_INITIALIZER;
+static futex_t cwd_futex = FUTEX_INITIALIZER;
+
+static int cwd_fd = -1;
+static char *cwd_path = NULL;
+static size_t cwd_size = 0;
+
+char *absolutize(const char *path, size_t *retlen)
+{
+	char *ncwd_path;
+	char *ncwd_path_nc;
+
+	futex_down(&cwd_futex);
+	size_t size = str_size(path);
+	if (*path != '/') {
+		if (!cwd_path) {
+			futex_up(&cwd_futex);
+			return NULL;
+		}
+		ncwd_path_nc = malloc(cwd_size + 1 + size + 1);
+		if (!ncwd_path_nc) {
+			futex_up(&cwd_futex);
+			return NULL;
+		}
+		str_cpy(ncwd_path_nc, cwd_size + 1 + size + 1, cwd_path);
+		ncwd_path_nc[cwd_size] = '/';
+		ncwd_path_nc[cwd_size + 1] = '\0';
+	} else {
+		ncwd_path_nc = malloc(size + 1);
+		if (!ncwd_path_nc) {
+			futex_up(&cwd_futex);
+			return NULL;
+		}
+		ncwd_path_nc[0] = '\0';
+	}
+	str_append(ncwd_path_nc, cwd_size + 1 + size + 1, path);
+	ncwd_path = canonify(ncwd_path_nc, retlen);
+	if (!ncwd_path) {
+		futex_up(&cwd_futex);
+		free(ncwd_path_nc);
+		return NULL;
+	}
+	/*
+	 * We need to clone ncwd_path because canonify() works in-place and thus
+	 * the address in ncwd_path need not be the same as ncwd_path_nc, even
+	 * though they both point into the same dynamically allocated buffer.
+	 */
+	ncwd_path = str_dup(ncwd_path);
+	free(ncwd_path_nc);
+	if (!ncwd_path) {
+		futex_up(&cwd_futex);
+		return NULL;
+	}
+	futex_up(&cwd_futex);
+	return ncwd_path;
+}
+
+static void vfs_connect(void)
+{
+	while (vfs_phone < 0)
+		vfs_phone = ipc_connect_me_to_blocking(PHONE_NS, SERVICE_VFS, 0, 0);
+}
+
+int mount(const char *fs_name, const char *mp, const char *fqdn,
+    const char *opts, unsigned int flags)
+{
+	int null_id = -1;
+	char null[DEVMAP_NAME_MAXLEN];
+	
+	if (str_cmp(fqdn, "") == 0) {
+		/* No device specified, create a fresh
+		   null/%d device instead */
+		null_id = devmap_null_create();
+		
+		if (null_id == -1)
+			return ENOMEM;
+		
+		snprintf(null, DEVMAP_NAME_MAXLEN, "null/%d", null_id);
+		fqdn = null;
+	}
+	
+	dev_handle_t dev_handle;
+	int res = devmap_device_get_handle(fqdn, &dev_handle, flags);
+	if (res != EOK) {
+		if (null_id != -1)
+			devmap_null_destroy(null_id);
+		
+		return res;
+	}
+	
+	size_t mpa_size;
+	char *mpa = absolutize(mp, &mpa_size);
+	if (!mpa) {
+		if (null_id != -1)
+			devmap_null_destroy(null_id);
+		
+		return ENOMEM;
+	}
+	
+	futex_down(&vfs_phone_futex);
+	async_serialize_start();
+	vfs_connect();
+	
+	ipcarg_t rc_orig;
+	aid_t req = async_send_2(vfs_phone, VFS_IN_MOUNT, dev_handle, flags, NULL);
+	ipcarg_t rc = async_data_write_start(vfs_phone, (void *) mpa, mpa_size);
+	if (rc != EOK) {
+		async_wait_for(req, &rc_orig);
+		async_serialize_end();
+		futex_up(&vfs_phone_futex);
+		free(mpa);
+		
+		if (null_id != -1)
+			devmap_null_destroy(null_id);
+		
+		if (rc_orig == EOK)
+			return (int) rc;
+		else
+			return (int) rc_orig;
+	}
+	
+	rc = async_data_write_start(vfs_phone, (void *) opts, str_size(opts));
+	if (rc != EOK) {
+		async_wait_for(req, &rc_orig);
+		async_serialize_end();
+		futex_up(&vfs_phone_futex);
+		free(mpa);
+		
+		if (null_id != -1)
+			devmap_null_destroy(null_id);
+		
+		if (rc_orig == EOK)
+			return (int) rc;
+		else
+			return (int) rc_orig;
+	}
+	
+	rc = async_data_write_start(vfs_phone, (void *) fs_name, str_size(fs_name));
+	if (rc != EOK) {
+		async_wait_for(req, &rc_orig);
+		async_serialize_end();
+		futex_up(&vfs_phone_futex);
+		free(mpa);
+		
+		if (null_id != -1)
+			devmap_null_destroy(null_id);
+		
+		if (rc_orig == EOK)
+			return (int) rc;
+		else
+			return (int) rc_orig;
+	}
+	
+	/* Ask VFS whether it likes fs_name. */
+	rc = async_req_0_0(vfs_phone, IPC_M_PING);
+	if (rc != EOK) {
+		async_wait_for(req, &rc_orig);
+		async_serialize_end();
+		futex_up(&vfs_phone_futex);
+		free(mpa);
+		
+		if (null_id != -1)
+			devmap_null_destroy(null_id);
+		
+		if (rc_orig == EOK)
+			return (int) rc;
+		else
+			return (int) rc_orig;
+	}
+	
+	async_wait_for(req, &rc);
+	async_serialize_end();
+	futex_up(&vfs_phone_futex);
+	free(mpa);
+	
+	if ((rc != EOK) && (null_id != -1))
+		devmap_null_destroy(null_id);
+	
+	return (int) rc;
+}
+
+int unmount(const char *mp)
+{
+	ipcarg_t rc;
+	ipcarg_t rc_orig;
+	aid_t req;
+	size_t mpa_size;
+	char *mpa;
+	
+	mpa = absolutize(mp, &mpa_size);
+	if (!mpa)
+		return ENOMEM;
+	
+	futex_down(&vfs_phone_futex);
+	async_serialize_start();
+	vfs_connect();
+	
+	req = async_send_0(vfs_phone, VFS_IN_UNMOUNT, NULL);
+	rc = async_data_write_start(vfs_phone, (void *) mpa, mpa_size);
+	if (rc != EOK) {
+		async_wait_for(req, &rc_orig);
+		async_serialize_end();
+		futex_up(&vfs_phone_futex);
+		free(mpa);
+		if (rc_orig == EOK)
+			return (int) rc;
+		else
+			return (int) rc_orig;
+	}
+	
+
+	async_wait_for(req, &rc);
+	async_serialize_end();
+	futex_up(&vfs_phone_futex);
+	free(mpa);
+	
+	return (int) rc;
+}
+
+static int open_internal(const char *abs, size_t abs_size, int lflag, int oflag)
+{
+	futex_down(&vfs_phone_futex);
+	async_serialize_start();
+	vfs_connect();
+	
+	ipc_call_t answer;
+	aid_t req = async_send_3(vfs_phone, VFS_IN_OPEN, lflag, oflag, 0, &answer);
+	ipcarg_t rc = async_data_write_start(vfs_phone, abs, abs_size);
+	
+	if (rc != EOK) {
+		ipcarg_t rc_orig;
+		async_wait_for(req, &rc_orig);
+		
+		async_serialize_end();
+		futex_up(&vfs_phone_futex);
+		
+		if (rc_orig == EOK)
+			return (int) rc;
+		else
+			return (int) rc_orig;
+	}
+	
+	async_wait_for(req, &rc);
+	async_serialize_end();
+	futex_up(&vfs_phone_futex);
+	
+	if (rc != EOK)
+	    return (int) rc;
+	
+	return (int) IPC_GET_ARG1(answer);
+}
+
+int open(const char *path, int oflag, ...)
+{
+	size_t abs_size;
+	char *abs = absolutize(path, &abs_size);
+	if (!abs)
+		return ENOMEM;
+	
+	int ret = open_internal(abs, abs_size, L_FILE, oflag);
+	free(abs);
+	
+	return ret;
+}
+
+int open_node(fdi_node_t *node, int oflag)
+{
+	futex_down(&vfs_phone_futex);
+	async_serialize_start();
+	vfs_connect();
+	
+	ipc_call_t answer;
+	aid_t req = async_send_4(vfs_phone, VFS_IN_OPEN_NODE, node->fs_handle,
+	    node->dev_handle, node->index, oflag, &answer);
+	
+	ipcarg_t rc;
+	async_wait_for(req, &rc);
+	async_serialize_end();
+	futex_up(&vfs_phone_futex);
+	
+	if (rc != EOK)
+		return (int) rc;
+	
+	return (int) IPC_GET_ARG1(answer);
+}
+
+int close(int fildes)
+{
+	ipcarg_t rc;
+	
+	futex_down(&vfs_phone_futex);
+	async_serialize_start();
+	vfs_connect();
+	
+	rc = async_req_1_0(vfs_phone, VFS_IN_CLOSE, fildes);
+	
+	async_serialize_end();
+	futex_up(&vfs_phone_futex);
+	
+	return (int)rc;
+}
+
+ssize_t read(int fildes, void *buf, size_t nbyte) 
+{
+	ipcarg_t rc;
+	ipc_call_t answer;
+	aid_t req;
+
+	futex_down(&vfs_phone_futex);
+	async_serialize_start();
+	vfs_connect();
+	
+	req = async_send_1(vfs_phone, VFS_IN_READ, fildes, &answer);
+	rc = async_data_read_start(vfs_phone, (void *)buf, nbyte);
+	if (rc != EOK) {
+		ipcarg_t rc_orig;
+	
+		async_wait_for(req, &rc_orig);
+		async_serialize_end();
+		futex_up(&vfs_phone_futex);
+		if (rc_orig == EOK)
+			return (ssize_t) rc;
+		else
+			return (ssize_t) rc_orig;
+	}
+	async_wait_for(req, &rc);
+	async_serialize_end();
+	futex_up(&vfs_phone_futex);
+	if (rc == EOK)
+		return (ssize_t) IPC_GET_ARG1(answer);
+	else
+		return rc;
+}
+
+ssize_t write(int fildes, const void *buf, size_t nbyte) 
+{
+	ipcarg_t rc;
+	ipc_call_t answer;
+	aid_t req;
+
+	futex_down(&vfs_phone_futex);
+	async_serialize_start();
+	vfs_connect();
+	
+	req = async_send_1(vfs_phone, VFS_IN_WRITE, fildes, &answer);
+	rc = async_data_write_start(vfs_phone, (void *)buf, nbyte);
+	if (rc != EOK) {
+		ipcarg_t rc_orig;
+	
+		async_wait_for(req, &rc_orig);
+		async_serialize_end();
+		futex_up(&vfs_phone_futex);
+		if (rc_orig == EOK)
+			return (ssize_t) rc;
+		else
+			return (ssize_t) rc_orig;
+	}
+	async_wait_for(req, &rc);
+	async_serialize_end();
+	futex_up(&vfs_phone_futex);
+	if (rc == EOK)
+		return (ssize_t) IPC_GET_ARG1(answer);
+	else
+		return -1;
+}
+
+int fsync(int fildes)
+{
+	futex_down(&vfs_phone_futex);
+	async_serialize_start();
+	vfs_connect();
+	
+	ipcarg_t rc = async_req_1_0(vfs_phone, VFS_IN_SYNC, fildes);
+	
+	async_serialize_end();
+	futex_up(&vfs_phone_futex);
+	
+	return (int) rc;
+}
+
+off64_t lseek(int fildes, off64_t offset, int whence)
+{
+	futex_down(&vfs_phone_futex);
+	async_serialize_start();
+	vfs_connect();
+	
+	ipcarg_t newoff_lo;
+	ipcarg_t newoff_hi;
+	ipcarg_t rc = async_req_4_2(vfs_phone, VFS_IN_SEEK, fildes,
+	    LOWER32(offset), UPPER32(offset), whence,
+	    &newoff_lo, &newoff_hi);
+	
+	async_serialize_end();
+	futex_up(&vfs_phone_futex);
+	
+	if (rc != EOK)
+		return (off64_t) -1;
+	
+	return (off64_t) MERGE_LOUP32(newoff_lo, newoff_hi);
+}
+
+int ftruncate(int fildes, aoff64_t length)
+{
+	ipcarg_t rc;
+	
+	futex_down(&vfs_phone_futex);
+	async_serialize_start();
+	vfs_connect();
+	
+	rc = async_req_3_0(vfs_phone, VFS_IN_TRUNCATE, fildes,
+	    LOWER32(length), UPPER32(length));
+	async_serialize_end();
+	futex_up(&vfs_phone_futex);
+	
+	return (int) rc;
+}
+
+int fstat(int fildes, struct stat *stat)
+{
+	ipcarg_t rc;
+	aid_t req;
+
+	futex_down(&vfs_phone_futex);
+	async_serialize_start();
+	vfs_connect();
+	
+	req = async_send_1(vfs_phone, VFS_IN_FSTAT, fildes, NULL);
+	rc = async_data_read_start(vfs_phone, (void *) stat, sizeof(struct stat));
+	if (rc != EOK) {
+		ipcarg_t rc_orig;
+		
+		async_wait_for(req, &rc_orig);
+		async_serialize_end();
+		futex_up(&vfs_phone_futex);
+		if (rc_orig == EOK)
+			return (ssize_t) rc;
+		else
+			return (ssize_t) rc_orig;
+	}
+	async_wait_for(req, &rc);
+	async_serialize_end();
+	futex_up(&vfs_phone_futex);
+
+	return rc;
+}
+
+int stat(const char *path, struct stat *stat)
+{
+	ipcarg_t rc;
+	ipcarg_t rc_orig;
+	aid_t req;
+	
+	size_t pa_size;
+	char *pa = absolutize(path, &pa_size);
+	if (!pa)
+		return ENOMEM;
+	
+	futex_down(&vfs_phone_futex);
+	async_serialize_start();
+	vfs_connect();
+	
+	req = async_send_0(vfs_phone, VFS_IN_STAT, NULL);
+	rc = async_data_write_start(vfs_phone, pa, pa_size);
+	if (rc != EOK) {
+		async_wait_for(req, &rc_orig);
+		async_serialize_end();
+		futex_up(&vfs_phone_futex);
+		free(pa);
+		if (rc_orig == EOK)
+			return (int) rc;
+		else
+			return (int) rc_orig;
+	}
+	rc = async_data_read_start(vfs_phone, stat, sizeof(struct stat));
+	if (rc != EOK) {
+		async_wait_for(req, &rc_orig);
+		async_serialize_end();
+		futex_up(&vfs_phone_futex);
+		free(pa);
+		if (rc_orig == EOK)
+			return (int) rc;
+		else
+			return (int) rc_orig;
+	}
+	async_wait_for(req, &rc);
+	async_serialize_end();
+	futex_up(&vfs_phone_futex);
+	free(pa);
+	return rc;
+}
+
+DIR *opendir(const char *dirname)
+{
+	DIR *dirp = malloc(sizeof(DIR));
+	if (!dirp)
+		return NULL;
+	
+	size_t abs_size;
+	char *abs = absolutize(dirname, &abs_size);
+	if (!abs) {
+		free(dirp);
+		return NULL;
+	}
+	
+	int ret = open_internal(abs, abs_size, L_DIRECTORY, 0);
+	free(abs);
+	
+	if (ret < 0) {
+		free(dirp);
+		return NULL;
+	}
+	
+	dirp->fd = ret;
+	return dirp;
+}
+
+struct dirent *readdir(DIR *dirp)
+{
+	ssize_t len = read(dirp->fd, &dirp->res.d_name[0], NAME_MAX + 1);
+	if (len <= 0)
+		return NULL;
+	return &dirp->res;
+}
+
+void rewinddir(DIR *dirp)
+{
+	(void) lseek(dirp->fd, 0, SEEK_SET);
+}
+
+int closedir(DIR *dirp)
+{
+	(void) close(dirp->fd);
+	free(dirp);
+	return 0;
+}
+
+int mkdir(const char *path, mode_t mode)
+{
+	ipcarg_t rc;
+	aid_t req;
+	
+	size_t pa_size;
+	char *pa = absolutize(path, &pa_size);
+	if (!pa)
+		return ENOMEM;
+	
+	futex_down(&vfs_phone_futex);
+	async_serialize_start();
+	vfs_connect();
+	
+	req = async_send_1(vfs_phone, VFS_IN_MKDIR, mode, NULL);
+	rc = async_data_write_start(vfs_phone, pa, pa_size);
+	if (rc != EOK) {
+		ipcarg_t rc_orig;
+	
+		async_wait_for(req, &rc_orig);
+		async_serialize_end();
+		futex_up(&vfs_phone_futex);
+		free(pa);
+		if (rc_orig == EOK)
+			return (int) rc;
+		else
+			return (int) rc_orig;
+	}
+	async_wait_for(req, &rc);
+	async_serialize_end();
+	futex_up(&vfs_phone_futex);
+	free(pa);
+	return rc;
+}
+
+static int _unlink(const char *path, int lflag)
+{
+	ipcarg_t rc;
+	aid_t req;
+	
+	size_t pa_size;
+	char *pa = absolutize(path, &pa_size);
+	if (!pa)
+		return ENOMEM;
+
+	futex_down(&vfs_phone_futex);
+	async_serialize_start();
+	vfs_connect();
+	
+	req = async_send_0(vfs_phone, VFS_IN_UNLINK, NULL);
+	rc = async_data_write_start(vfs_phone, pa, pa_size);
+	if (rc != EOK) {
+		ipcarg_t rc_orig;
+
+		async_wait_for(req, &rc_orig);
+		async_serialize_end();
+		futex_up(&vfs_phone_futex);
+		free(pa);
+		if (rc_orig == EOK)
+			return (int) rc;
+		else
+			return (int) rc_orig;
+	}
+	async_wait_for(req, &rc);
+	async_serialize_end();
+	futex_up(&vfs_phone_futex);
+	free(pa);
+	return rc;
+}
+
+int unlink(const char *path)
+{
+	return _unlink(path, L_NONE);
+}
+
+int rmdir(const char *path)
+{
+	return _unlink(path, L_DIRECTORY);
+}
+
+int rename(const char *old, const char *new)
+{
+	ipcarg_t rc;
+	ipcarg_t rc_orig;
+	aid_t req;
+	
+	size_t olda_size;
+	char *olda = absolutize(old, &olda_size);
+	if (!olda)
+		return ENOMEM;
+
+	size_t newa_size;
+	char *newa = absolutize(new, &newa_size);
+	if (!newa) {
+		free(olda);
+		return ENOMEM;
+	}
+
+	futex_down(&vfs_phone_futex);
+	async_serialize_start();
+	vfs_connect();
+	
+	req = async_send_0(vfs_phone, VFS_IN_RENAME, NULL);
+	rc = async_data_write_start(vfs_phone, olda, olda_size);
+	if (rc != EOK) {
+		async_wait_for(req, &rc_orig);
+		async_serialize_end();
+		futex_up(&vfs_phone_futex);
+		free(olda);
+		free(newa);
+		if (rc_orig == EOK)
+			return (int) rc;
+		else
+			return (int) rc_orig;
+	}
+	rc = async_data_write_start(vfs_phone, newa, newa_size);
+	if (rc != EOK) {
+		async_wait_for(req, &rc_orig);
+		async_serialize_end();
+		futex_up(&vfs_phone_futex);
+		free(olda);
+		free(newa);
+		if (rc_orig == EOK)
+			return (int) rc;
+		else
+			return (int) rc_orig;
+	}
+	async_wait_for(req, &rc);
+	async_serialize_end();
+	futex_up(&vfs_phone_futex);
+	free(olda);
+	free(newa);
+	return rc;
+}
+
+int chdir(const char *path)
+{
+	size_t abs_size;
+	char *abs = absolutize(path, &abs_size);
+	if (!abs)
+		return ENOMEM;
+	
+	int fd = open_internal(abs, abs_size, L_DIRECTORY, O_DESC);
+	
+	if (fd < 0) {
+		free(abs);
+		return ENOENT;
+	}
+	
+	futex_down(&cwd_futex);
+	
+	if (cwd_fd >= 0)
+		close(cwd_fd);
+	
+	
+	if (cwd_path)
+		free(cwd_path);
+	
+	cwd_fd = fd;
+	cwd_path = abs;
+	cwd_size = abs_size;
+	
+	futex_up(&cwd_futex);
+	return EOK;
+}
+
+char *getcwd(char *buf, size_t size)
+{
+	if (size == 0)
+		return NULL;
+	
+	futex_down(&cwd_futex);
+	
+	if ((cwd_size == 0) || (size < cwd_size + 1)) {
+		futex_up(&cwd_futex);
+		return NULL;
+	}
+	
+	str_cpy(buf, size, cwd_path);
+	futex_up(&cwd_futex);
+	
+	return buf;
+}
+
+int fd_phone(int fildes)
+{
+	struct stat stat;
+	int rc;
+
+	rc = fstat(fildes, &stat);
+
+	if (!stat.device)
+		return -1;
+	
+	return devmap_device_connect(stat.device, 0);
+}
+
+int fd_node(int fildes, fdi_node_t *node)
+{
+	struct stat stat;
+	int rc;
+
+	rc = fstat(fildes, &stat);
+	
+	if (rc == EOK) {
+		node->fs_handle = stat.fs_handle;
+		node->dev_handle = stat.dev_handle;
+		node->index = stat.index;
+	}
+	
+	return rc;
+}
+
+int dup2(int oldfd, int newfd)
+{
+	futex_down(&vfs_phone_futex);
+	async_serialize_start();
+	vfs_connect();
+	
+	ipcarg_t ret;
+	ipcarg_t rc = async_req_2_1(vfs_phone, VFS_IN_DUP, oldfd, newfd, &ret);
+	
+	async_serialize_end();
+	futex_up(&vfs_phone_futex);
+	
+	if (rc == EOK)
+		return (int) ret;
+	
+	return (int) rc;
+}
+
+/** @}
+ */
Index: uspace/lib/c/include/adt/fifo.h
===================================================================
--- uspace/lib/c/include/adt/fifo.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/include/adt/fifo.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,127 @@
+/*
+ * 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 libc
+ * @{
+ */
+/** @file
+ */
+
+/*
+ * This implementation of FIFO stores values in an array
+ * (static or dynamic). As such, these FIFOs have upper bound
+ * on number of values they can store. Push and pop operations
+ * are done via accessing the array through head and tail indices.
+ * Because of better operation ordering in fifo_pop(), the access
+ * policy for these two indices is to 'increment (mod size of FIFO)
+ * and use'.
+ */
+
+#ifndef LIBC_FIFO_H_
+#define LIBC_FIFO_H_
+
+#include <malloc.h>
+
+typedef unsigned long fifo_count_t;
+typedef unsigned long fifo_index_t;
+
+#define FIFO_CREATE_STATIC(name, t, itms)		\
+	struct {					\
+		t fifo[(itms)];				\
+		fifo_count_t items;			\
+		fifo_index_t head;			\
+		fifo_index_t tail;			\
+	} name
+
+/** Create and initialize static FIFO.
+ *
+ * FIFO is allocated statically.
+ * This macro is suitable for creating smaller FIFOs.
+ *
+ * @param name Name of FIFO.
+ * @param t Type of values stored in FIFO.
+ * @param itms Number of items that can be stored in FIFO.
+ */
+#define FIFO_INITIALIZE_STATIC(name, t, itms)		\
+	FIFO_CREATE_STATIC(name, t, itms) = {		\
+		.items = (itms),			\
+		.head = 0,				\
+		.tail = 0				\
+	}
+
+/** Create and prepare dynamic FIFO.
+ *
+ * FIFO is allocated dynamically.
+ * This macro is suitable for creating larger FIFOs. 
+ *
+ * @param name Name of FIFO.
+ * @param t Type of values stored in FIFO.
+ * @param itms Number of items that can be stored in FIFO.
+ */
+#define FIFO_INITIALIZE_DYNAMIC(name, t, itms)		\
+	struct {					\
+		t *fifo;				\
+		fifo_count_t items;			\
+		fifo_index_t head;			\
+		fifo_index_t tail;			\
+	} name = {					\
+		.fifo = NULL,				\
+		.items = (itms),			\
+		.head = 0,				\
+		.tail = 0				\
+	}
+
+/** Pop value from head of FIFO.
+ *
+ * @param name FIFO name.
+ *
+ * @return Leading value in FIFO.
+ */
+#define fifo_pop(name) \
+	name.fifo[name.head = (name.head + 1) < name.items ? (name.head + 1) : 0]
+
+/** Push value to tail of FIFO.
+ *
+ * @param name FIFO name.
+ * @param value Value to be appended to FIFO.
+ *
+ */
+#define fifo_push(name, value) \
+	name.fifo[name.tail = (name.tail + 1) < name.items ? (name.tail + 1) : 0] = (value) 
+
+/** Allocate memory for dynamic FIFO.
+ *
+ * @param name FIFO name.
+ */
+#define fifo_create(name) \
+	name.fifo = malloc(sizeof(*name.fifo) * name.items)
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/include/adt/gcdlcm.h
===================================================================
--- uspace/lib/c/include/adt/gcdlcm.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/include/adt/gcdlcm.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,73 @@
+/*
+ * Copyright (c) 2009 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 libc
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_GCDLCM_H_
+#define LIBC_GCDLCM_H_
+
+#include <sys/types.h>
+
+#define DECLARE_GCD(type, name) \
+	static inline type name(type a, type b) \
+	{ \
+		if (a == 0) \
+			return b; \
+		 \
+		while (b != 0) { \
+			if (a > b) \
+				a -= b; \
+			else \
+				b -= a; \
+		} \
+		 \
+		return a; \
+	}
+
+#define DECLARE_LCM(type, name, gcd) \
+	static inline type name(type a, type b) \
+	{ \
+		return (a * b) / gcd(a, b); \
+	}
+
+DECLARE_GCD(uint32_t, gcd32);
+DECLARE_GCD(uint64_t, gcd64);
+DECLARE_GCD(size_t, gcd);
+
+DECLARE_LCM(uint32_t, lcm32, gcd32);
+DECLARE_LCM(uint64_t, lcm64, gcd64);
+DECLARE_LCM(size_t, lcm, gcd);
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/include/adt/hash_table.h
===================================================================
--- uspace/lib/c/include/adt/hash_table.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/include/adt/hash_table.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,96 @@
+/*
+ * 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 libc
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_HASH_TABLE_H_
+#define LIBC_HASH_TABLE_H_
+
+#include <adt/list.h>
+#include <unistd.h>
+
+typedef unsigned long hash_count_t;
+typedef unsigned long hash_index_t;
+typedef struct hash_table hash_table_t;
+typedef struct hash_table_operations hash_table_operations_t;
+
+/** Hash table structure. */
+struct hash_table {
+	link_t *entry;
+	hash_count_t entries;
+	hash_count_t max_keys;
+	hash_table_operations_t *op;
+};
+
+/** Set of operations for hash table. */
+struct hash_table_operations {
+	/** Hash function.
+	 *
+	 * @param key 	Array of keys needed to compute hash index. All keys
+	 *		must be passed.
+	 *
+	 * @return	Index into hash table.
+	 */
+	hash_index_t (* hash)(unsigned long key[]);
+	
+	/** Hash table item comparison function.
+	 *
+	 * @param key 	Array of keys that will be compared with item. It is
+	 *		not necessary to pass all keys.
+	 *
+	 * @return 	true if the keys match, false otherwise.
+	 */
+	int (*compare)(unsigned long key[], hash_count_t keys, link_t *item);
+
+	/** Hash table item removal callback.
+	 *
+	 * @param item 	Item that was removed from the hash table.
+	 */
+	void (*remove_callback)(link_t *item);
+};
+
+#define hash_table_get_instance(item, type, member) \
+    list_get_instance((item), type, member)
+
+extern int hash_table_create(hash_table_t *, hash_count_t, hash_count_t,
+    hash_table_operations_t *);
+extern void hash_table_insert(hash_table_t *, unsigned long [], link_t *);
+extern link_t *hash_table_find(hash_table_t *, unsigned long []);
+extern void hash_table_remove(hash_table_t *, unsigned long [], hash_count_t);
+extern void hash_table_destroy(hash_table_t *);
+extern void hash_table_apply(hash_table_t *, void (*)(link_t *, void *),
+    void *);
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/include/adt/list.h
===================================================================
--- uspace/lib/c/include/adt/list.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/include/adt/list.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,201 @@
+/*
+ * Copyright (c) 2001-2004 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 libc
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_LIST_H_
+#define LIBC_LIST_H_
+
+#include <unistd.h>
+
+/** Doubly linked list head and link type. */
+typedef struct link {
+	struct link *prev;  /**< Pointer to the previous item in the list. */
+	struct link *next;  /**< Pointer to the next item in the list. */
+} link_t;
+
+/** Declare and initialize statically allocated list.
+ *
+ * @param name Name of the new statically allocated list.
+ */
+#define LIST_INITIALIZE(name)  link_t name = { \
+	.prev = &name, \
+	.next = &name \
+}
+
+/** Initialize doubly-linked circular list link
+ *
+ * Initialize doubly-linked list link.
+ *
+ * @param link Pointer to link_t structure to be initialized.
+ */
+static inline void link_initialize(link_t *link)
+{
+	link->prev = NULL;
+	link->next = NULL;
+}
+
+/** Initialize doubly-linked circular list
+ *
+ * Initialize doubly-linked circular list.
+ *
+ * @param head Pointer to link_t structure representing head of the list.
+ */
+static inline void list_initialize(link_t *head)
+{
+	head->prev = head;
+	head->next = head;
+}
+
+/** Add item to the beginning of doubly-linked circular list
+ *
+ * Add item to the beginning of doubly-linked circular list.
+ *
+ * @param link Pointer to link_t structure to be added.
+ * @param head Pointer to link_t structure representing head of the list.
+ */
+static inline void list_prepend(link_t *link, link_t *head)
+{
+	link->next = head->next;
+	link->prev = head;
+	head->next->prev = link;
+	head->next = link;
+}
+
+/** Add item to the end of doubly-linked circular list
+ *
+ * Add item to the end of doubly-linked circular list.
+ *
+ * @param link Pointer to link_t structure to be added.
+ * @param head Pointer to link_t structure representing head of the list.
+ */
+static inline void list_append(link_t *link, link_t *head)
+{
+	link->prev = head->prev;
+	link->next = head;
+	head->prev->next = link;
+	head->prev = link;
+}
+
+/** Insert item before another item in doubly-linked circular list. */
+static inline void list_insert_before(link_t *l, link_t *r)
+{
+	list_append(l, r);
+}
+
+/** Insert item after another item in doubly-linked circular list. */
+static inline void list_insert_after(link_t *r, link_t *l)
+{
+	list_prepend(l, r);
+}
+
+/** Remove item from doubly-linked circular list
+ *
+ * Remove item from doubly-linked circular list.
+ *
+ * @param link Pointer to link_t structure to be removed from the list it is contained in.
+ */
+static inline void list_remove(link_t *link)
+{
+	link->next->prev = link->prev;
+	link->prev->next = link->next;
+	link_initialize(link);
+}
+
+/** Query emptiness of doubly-linked circular list
+ *
+ * Query emptiness of doubly-linked circular list.
+ *
+ * @param head Pointer to link_t structure representing head of the list.
+ */
+static inline int list_empty(link_t *head)
+{
+	return ((head->next == head) ? 1 : 0);
+}
+
+
+/** Split or concatenate headless doubly-linked circular list
+ *
+ * Split or concatenate headless doubly-linked circular list.
+ *
+ * Note that the algorithm works both directions:
+ * concatenates splitted lists and splits concatenated lists.
+ *
+ * @param part1 Pointer to link_t structure leading the first (half of the headless) list.
+ * @param part2 Pointer to link_t structure leading the second (half of the headless) list. 
+ */
+static inline void headless_list_split_or_concat(link_t *part1, link_t *part2)
+{
+	part1->prev->next = part2;
+	part2->prev->next = part1;
+	
+	link_t *hlp = part1->prev;
+	
+	part1->prev = part2->prev;
+	part2->prev = hlp;
+}
+
+
+/** Split headless doubly-linked circular list
+ *
+ * Split headless doubly-linked circular list.
+ *
+ * @param part1 Pointer to link_t structure leading the first half of the headless list.
+ * @param part2 Pointer to link_t structure leading the second half of the headless list. 
+ */
+static inline void headless_list_split(link_t *part1, link_t *part2)
+{
+	headless_list_split_or_concat(part1, part2);
+}
+
+/** Concatenate two headless doubly-linked circular lists
+ *
+ * Concatenate two headless doubly-linked circular lists.
+ *
+ * @param part1 Pointer to link_t structure leading the first headless list.
+ * @param part2 Pointer to link_t structure leading the second headless list. 
+ */
+static inline void headless_list_concat(link_t *part1, link_t *part2)
+{
+	headless_list_split_or_concat(part1, part2);
+}
+
+#define list_get_instance(link, type, member)  ((type *) (((void *)(link)) - ((void *) &(((type *) NULL)->member))))
+
+extern int list_member(const link_t *link, const link_t *head);
+extern void list_concat(link_t *head1, link_t *head2);
+extern unsigned int list_count(const link_t *link);
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/include/align.h
===================================================================
--- uspace/lib/c/include/align.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/include/align.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,63 @@
+/*
+ * 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 libc
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_ALIGN_H_
+#define LIBC_ALIGN_H_
+
+/** Align to the nearest lower address which is a power of two.
+ *
+ * @param s		Address or size to be aligned.
+ * @param a		Size of alignment, must be power of 2.
+ */
+#define ALIGN_DOWN(s, a)	((s) & ~((a) - 1))
+
+
+/** Align to the nearest higher address which is a power of two.
+ *
+ * @param s		Address or size to be aligned.
+ * @param a		Size of alignment, must be power of 2.
+ */
+#define ALIGN_UP(s, a)		((long)((s) + ((a) - 1)) & ~((long) (a) - 1))
+
+/** Round up to the nearest higher boundary.
+ *
+ * @param n		Number to be aligned.
+ * @param b		Boundary, arbitrary unsigned number.
+ */
+#define ROUND_UP(n, b)		(((n) / (b) + ((n) % (b) != 0)) * (b))
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/include/as.h
===================================================================
--- uspace/lib/c/include/as.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/include/as.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,53 @@
+/*
+ * 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 libc
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_AS_H_
+#define LIBC_AS_H_
+
+#include <sys/types.h>
+#include <task.h>
+#include <kernel/mm/as.h>
+#include <libarch/config.h>
+
+extern void *as_area_create(void *address, size_t size, int flags);
+extern int as_area_resize(void *address, size_t size, int flags);
+extern int as_area_change_flags(void *address, int flags);
+extern int as_area_destroy(void *address);
+extern void *set_maxheapsize(size_t mhs);
+extern void * as_get_mappable_page(size_t sz);
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/include/assert.h
===================================================================
--- uspace/lib/c/include/assert.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/include/assert.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,68 @@
+/*
+ * Copyright (c) 2005 Martin Decky
+ * 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 libc
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_ASSERT_H_
+#define LIBC_ASSERT_H_
+
+/** Debugging assert macro
+ *
+ * If NDEBUG is not set, the assert() macro
+ * evaluates expr and if it is false prints 
+ * error message and terminate program.
+ *
+ * @param expr Expression which is expected to be true.
+ *
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#ifndef NDEBUG
+#	define assert(expr) \
+		do { \
+			if (!(expr)) { \
+				printf("Assertion failed (%s) at file '%s', " \
+				    "line %d.\n", #expr, __FILE__, __LINE__); \
+				abort(); \
+			} \
+		} while (0)
+#else
+#	define assert(expr)
+#endif
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/include/async.h
===================================================================
--- uspace/lib/c/include/async.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/include/async.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,364 @@
+/*
+ * 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 libc
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_ASYNC_H_
+#define LIBC_ASYNC_H_
+
+#include <ipc/ipc.h>
+#include <fibril.h>
+#include <sys/time.h>
+#include <atomic.h>
+#include <bool.h>
+
+typedef ipc_callid_t aid_t;
+typedef void (*async_client_conn_t)(ipc_callid_t callid, ipc_call_t *call);
+
+extern atomic_t async_futex;
+
+extern atomic_t threads_in_ipc_wait;
+
+extern int __async_init(void);
+extern ipc_callid_t async_get_call_timeout(ipc_call_t *call, suseconds_t usecs);
+
+static inline ipc_callid_t async_get_call(ipc_call_t *data)
+{
+	return async_get_call_timeout(data, 0);
+}
+
+static inline void async_manager(void)
+{
+	fibril_switch(FIBRIL_TO_MANAGER);
+}
+
+/*
+ * User-friendly wrappers for async_send_fast() and async_send_slow(). The
+ * macros are in the form async_send_m(), where m denotes the number of payload
+ * arguments.  Each macros chooses between the fast and the slow version based
+ * on m.
+ */
+
+#define async_send_0(phoneid, method, dataptr) \
+	async_send_fast((phoneid), (method), 0, 0, 0, 0, (dataptr))
+#define async_send_1(phoneid, method, arg1, dataptr) \
+	async_send_fast((phoneid), (method), (arg1), 0, 0, 0, (dataptr))
+#define async_send_2(phoneid, method, arg1, arg2, dataptr) \
+	async_send_fast((phoneid), (method), (arg1), (arg2), 0, 0, (dataptr))
+#define async_send_3(phoneid, method, arg1, arg2, arg3, dataptr) \
+	async_send_fast((phoneid), (method), (arg1), (arg2), (arg3), 0, (dataptr))
+#define async_send_4(phoneid, method, arg1, arg2, arg3, arg4, dataptr) \
+	async_send_fast((phoneid), (method), (arg1), (arg2), (arg3), (arg4), \
+	    (dataptr))
+#define async_send_5(phoneid, method, arg1, arg2, arg3, arg4, arg5, dataptr) \
+	async_send_slow((phoneid), (method), (arg1), (arg2), (arg3), (arg4), \
+	    (arg5), (dataptr))
+
+extern aid_t async_send_fast(int phoneid, ipcarg_t method, ipcarg_t arg1,
+    ipcarg_t arg2, ipcarg_t arg3, ipcarg_t arg4, ipc_call_t *dataptr);
+extern aid_t async_send_slow(int phoneid, ipcarg_t method, ipcarg_t arg1,
+    ipcarg_t arg2, ipcarg_t arg3, ipcarg_t arg4, ipcarg_t arg5,
+    ipc_call_t *dataptr);
+extern void async_wait_for(aid_t amsgid, ipcarg_t *result);
+extern int async_wait_timeout(aid_t amsgid, ipcarg_t *retval,
+    suseconds_t timeout);
+
+extern fid_t async_new_connection(ipcarg_t in_phone_hash, ipc_callid_t callid,
+    ipc_call_t *call, void (*cthread)(ipc_callid_t, ipc_call_t *));
+extern void async_usleep(suseconds_t timeout);
+extern void async_create_manager(void);
+extern void async_destroy_manager(void);
+
+extern void async_set_client_connection(async_client_conn_t conn);
+extern void async_set_interrupt_received(async_client_conn_t conn);
+
+/* Wrappers for simple communication */
+#define async_msg_0(phone, method) \
+	ipc_call_async_0((phone), (method), NULL, NULL, true)
+#define async_msg_1(phone, method, arg1) \
+	ipc_call_async_1((phone), (method), (arg1), NULL, NULL, \
+	    true)
+#define async_msg_2(phone, method, arg1, arg2) \
+	ipc_call_async_2((phone), (method), (arg1), (arg2), NULL, NULL, \
+	    true)
+#define async_msg_3(phone, method, arg1, arg2, arg3) \
+	ipc_call_async_3((phone), (method), (arg1), (arg2), (arg3), NULL, NULL, \
+	    true)
+#define async_msg_4(phone, method, arg1, arg2, arg3, arg4) \
+	ipc_call_async_4((phone), (method), (arg1), (arg2), (arg3), (arg4), NULL, \
+	    NULL, true)
+#define async_msg_5(phone, method, arg1, arg2, arg3, arg4, arg5) \
+	ipc_call_async_5((phone), (method), (arg1), (arg2), (arg3), (arg4), \
+	    (arg5), NULL, NULL, true)
+
+/*
+ * User-friendly wrappers for async_req_fast() and async_req_slow(). The macros
+ * are in the form async_req_m_n(), where m is the number of payload arguments
+ * and n is the number of return arguments. The macros decide between the fast
+ * and slow verion based on m.
+ */
+#define async_req_0_0(phoneid, method) \
+	async_req_fast((phoneid), (method), 0, 0, 0, 0, NULL, NULL, NULL, NULL, \
+	    NULL)
+#define async_req_0_1(phoneid, method, r1) \
+	async_req_fast((phoneid), (method), 0, 0, 0, 0, (r1), NULL, NULL, NULL, \
+	    NULL)
+#define async_req_0_2(phoneid, method, r1, r2) \
+	async_req_fast((phoneid), (method), 0, 0, 0, 0, (r1), (r2), NULL, NULL, \
+	    NULL)
+#define async_req_0_3(phoneid, method, r1, r2, r3) \
+	async_req_fast((phoneid), (method), 0, 0, 0, 0, (r1), (r2), (r3), NULL, \
+	    NULL)
+#define async_req_0_4(phoneid, method, r1, r2, r3, r4) \
+	async_req_fast((phoneid), (method), 0, 0, 0, 0, (r1), (r2), (r3), (r4), \
+	    NULL)
+#define async_req_0_5(phoneid, method, r1, r2, r3, r4, r5) \
+	async_req_fast((phoneid), (method), 0, 0, 0, 0, (r1), (r2), (r3), (r4), \
+	    (r5))
+#define async_req_1_0(phoneid, method, arg1) \
+	async_req_fast((phoneid), (method), (arg1), 0, 0, 0, NULL, NULL, NULL, \
+	    NULL, NULL)
+#define async_req_1_1(phoneid, method, arg1, rc1) \
+	async_req_fast((phoneid), (method), (arg1), 0, 0, 0, (rc1), NULL, NULL, \
+	    NULL, NULL)
+#define async_req_1_2(phoneid, method, arg1, rc1, rc2) \
+	async_req_fast((phoneid), (method), (arg1), 0, 0, 0, (rc1), (rc2), NULL, \
+	    NULL, NULL)
+#define async_req_1_3(phoneid, method, arg1, rc1, rc2, rc3) \
+	async_req_fast((phoneid), (method), (arg1), 0, 0, 0, (rc1), (rc2), (rc3), \
+	    NULL, NULL)
+#define async_req_1_4(phoneid, method, arg1, rc1, rc2, rc3, rc4) \
+	async_req_fast((phoneid), (method), (arg1), 0, 0, 0, (rc1), (rc2), (rc3), \
+	    (rc4), NULL)
+#define async_req_1_5(phoneid, method, arg1, rc1, rc2, rc3, rc4, rc5) \
+	async_req_fast((phoneid), (method), (arg1), 0, 0, 0, (rc1), (rc2), (rc3), \
+	    (rc4), (rc5))
+#define async_req_2_0(phoneid, method, arg1, arg2) \
+	async_req_fast((phoneid), (method), (arg1), (arg2), 0, 0, NULL, NULL, \
+	    NULL, NULL, NULL)
+#define async_req_2_1(phoneid, method, arg1, arg2, rc1) \
+	async_req_fast((phoneid), (method), (arg1), (arg2), 0, 0, (rc1), NULL, \
+	    NULL, NULL, NULL)
+#define async_req_2_2(phoneid, method, arg1, arg2, rc1, rc2) \
+	async_req_fast((phoneid), (method), (arg1), (arg2), 0, 0, (rc1), (rc2), \
+	    NULL, NULL, NULL)
+#define async_req_2_3(phoneid, method, arg1, arg2, rc1, rc2, rc3) \
+	async_req_fast((phoneid), (method), (arg1), (arg2), 0, 0, (rc1), (rc2), \
+	    (rc3), NULL, NULL)
+#define async_req_2_4(phoneid, method, arg1, arg2, rc1, rc2, rc3, rc4) \
+	async_req_fast((phoneid), (method), (arg1), (arg2), 0, 0, (rc1), (rc2), \
+	    (rc3), (rc4), NULL)
+#define async_req_2_5(phoneid, method, arg1, arg2, rc1, rc2, rc3, rc4, rc5) \
+	async_req_fast((phoneid), (method), (arg1), (arg2), 0, 0, (rc1), (rc2), \
+	    (rc3), (rc4), (rc5))
+#define async_req_3_0(phoneid, method, arg1, arg2, arg3) \
+	async_req_fast((phoneid), (method), (arg1), (arg2), (arg3), 0, NULL, NULL, \
+	    NULL, NULL, NULL)
+#define async_req_3_1(phoneid, method, arg1, arg2, arg3, rc1) \
+	async_req_fast((phoneid), (method), (arg1), (arg2), (arg3), 0, (rc1), \
+	    NULL, NULL, NULL, NULL)
+#define async_req_3_2(phoneid, method, arg1, arg2, arg3, rc1, rc2) \
+	async_req_fast((phoneid), (method), (arg1), (arg2), (arg3), 0, (rc1), \
+	    (rc2), NULL, NULL, NULL)
+#define async_req_3_3(phoneid, method, arg1, arg2, arg3, rc1, rc2, rc3) \
+	async_req_fast((phoneid), (method), (arg1), (arg2), (arg3), 0, (rc1), \
+	    (rc2), (rc3), NULL, NULL)
+#define async_req_3_4(phoneid, method, arg1, arg2, arg3, rc1, rc2, rc3, rc4) \
+	async_req_fast((phoneid), (method), (arg1), (arg2), (arg3), 0, (rc1), \
+	    (rc2), (rc3), (rc4), NULL)
+#define async_req_3_5(phoneid, method, arg1, arg2, arg3, rc1, rc2, rc3, rc4, \
+    rc5) \
+	async_req_fast((phoneid), (method), (arg1), (arg2), (arg3), 0, (rc1), \
+	    (rc2), (rc3), (rc4), (rc5))
+#define async_req_4_0(phoneid, method, arg1, arg2, arg3, arg4) \
+	async_req_fast((phoneid), (method), (arg1), (arg2), (arg3), (arg4), NULL, \
+	    NULL, NULL, NULL, NULL)
+#define async_req_4_1(phoneid, method, arg1, arg2, arg3, arg4, rc1) \
+	async_req_fast((phoneid), (method), (arg1), (arg2), (arg3), (arg4), (rc1), \
+	    NULL, NULL, NULL, NULL)
+#define async_req_4_2(phoneid, method, arg1, arg2, arg3, arg4, rc1, rc2) \
+	async_req_fast((phoneid), (method), (arg1), (arg2), (arg3), (arg4), (rc1), \
+	    (rc2), NULL, NULL, NULL)
+#define async_req_4_3(phoneid, method, arg1, arg2, arg3, arg4, rc1, rc2, rc3) \
+	async_req_fast((phoneid), (method), (arg1), (arg2), (arg3), (arg4), (rc1), \
+	    (rc2), (rc3), NULL, NULL)
+#define async_req_4_4(phoneid, method, arg1, arg2, arg3, arg4, rc1, rc2, rc3, \
+    rc4) \
+	async_req_fast((phoneid), (method), (arg1), (arg2), (arg3), (arg4), \
+	    (rc1), (rc2), (rc3), (rc4), NULL)
+#define async_req_4_5(phoneid, method, arg1, arg2, arg3, arg4, rc1, rc2, rc3, \
+    rc4, rc5) \
+	async_req_fast((phoneid), (method), (arg1), (arg2), (arg3), (arg4), \
+	    (rc1), (rc2), (rc3), (rc4), (rc5))
+#define async_req_5_0(phoneid, method, arg1, arg2, arg3, arg4, arg5) \
+	async_req_slow((phoneid), (method), (arg1), (arg2), (arg3), (arg4), \
+	    (arg5), NULL, NULL, NULL, NULL, NULL)
+#define async_req_5_1(phoneid, method, arg1, arg2, arg3, arg4, arg5, rc1) \
+	async_req_slow((phoneid), (method), (arg1), (arg2), (arg3), (arg4), \
+	    (arg5), (rc1), NULL, NULL, NULL, NULL)
+#define async_req_5_2(phoneid, method, arg1, arg2, arg3, arg4, arg5, rc1, rc2) \
+	async_req_slow((phoneid), (method), (arg1), (arg2), (arg3), (arg4), \
+	    (arg5), (rc1), (rc2), NULL, NULL, NULL)
+#define async_req_5_3(phoneid, method, arg1, arg2, arg3, arg4, arg5, rc1, rc2, \
+    rc3) \
+	async_req_slow((phoneid), (method), (arg1), (arg2), (arg3), (arg4), \
+	    (arg5), (rc1), (rc2), (rc3), NULL, NULL)
+#define async_req_5_4(phoneid, method, arg1, arg2, arg3, arg4, arg5, rc1, rc2, \
+    rc3, rc4) \
+	async_req_slow((phoneid), (method), (arg1), (arg2), (arg3), (arg4), \
+	    (arg5), (rc1), (rc2), (rc3), (rc4), NULL)
+#define async_req_5_5(phoneid, method, arg1, arg2, arg3, arg4, arg5, rc1, rc2, \
+    rc3, rc4, rc5) \
+	async_req_slow((phoneid), (method), (arg1), (arg2), (arg3), (arg4), \
+	    (arg5), (rc1), (rc2), (rc3), (rc4), (rc5))
+
+extern ipcarg_t async_req_fast(int phoneid, ipcarg_t method, ipcarg_t arg1,
+    ipcarg_t arg2, ipcarg_t arg3, ipcarg_t arg4, ipcarg_t *r1, ipcarg_t *r2,
+    ipcarg_t *r3, ipcarg_t *r4, ipcarg_t *r5);
+extern ipcarg_t async_req_slow(int phoneid, ipcarg_t method, ipcarg_t arg1,
+    ipcarg_t arg2, ipcarg_t arg3, ipcarg_t arg4, ipcarg_t arg5, ipcarg_t *r1,
+    ipcarg_t *r2, ipcarg_t *r3, ipcarg_t *r4, ipcarg_t *r5);
+
+static inline void async_serialize_start(void)
+{
+	fibril_inc_sercount();
+}
+
+static inline void async_serialize_end(void)
+{
+	fibril_dec_sercount();
+}
+
+extern int async_connect_me_to(int, ipcarg_t, ipcarg_t, ipcarg_t);
+extern int async_connect_me_to_blocking(int, ipcarg_t, ipcarg_t, ipcarg_t);
+
+/*
+ * User-friendly wrappers for async_share_in_start().
+ */
+#define async_share_in_start_0_0(phoneid, dst, size) \
+	async_share_in_start((phoneid), (dst), (size), 0, NULL)
+#define async_share_in_start_0_1(phoneid, dst, size, flags) \
+	async_share_in_start((phoneid), (dst), (size), 0, (flags))
+#define async_share_in_start_1_0(phoneid, dst, size, arg) \
+	async_share_in_start((phoneid), (dst), (size), (arg), NULL)
+#define async_share_in_start_1_1(phoneid, dst, size, arg, flags) \
+	async_share_in_start((phoneid), (dst), (size), (arg), (flags))
+
+extern int async_share_in_start(int, void *, size_t, ipcarg_t, int *);
+extern int async_share_in_receive(ipc_callid_t *, size_t *);
+extern int async_share_in_finalize(ipc_callid_t, void *, int );
+extern int async_share_out_start(int, void *, int);
+extern int async_share_out_receive(ipc_callid_t *, size_t *, int *);
+extern int async_share_out_finalize(ipc_callid_t, void *);
+
+/*
+ * User-friendly wrappers for async_data_read_forward_fast().
+ */
+#define async_data_read_forward_0_0(phoneid, method, answer) \
+	async_data_read_forward_fast((phoneid), (method), 0, 0, 0, 0, NULL)
+#define async_data_read_forward_0_1(phoneid, method, answer) \
+	async_data_read_forward_fast((phoneid), (method), 0, 0, 0, 0, (answer))
+#define async_data_read_forward_1_0(phoneid, method, arg1, answer) \
+	async_data_read_forward_fast((phoneid), (method), (arg1), 0, 0, 0, NULL)
+#define async_data_read_forward_1_1(phoneid, method, arg1, answer) \
+	async_data_read_forward_fast((phoneid), (method), (arg1), 0, 0, 0, (answer))
+#define async_data_read_forward_2_0(phoneid, method, arg1, arg2, answer) \
+	async_data_read_forward_fast((phoneid), (method), (arg1), (arg2), 0, 0, NULL)
+#define async_data_read_forward_2_1(phoneid, method, arg1, arg2, answer) \
+	async_data_read_forward_fast((phoneid), (method), (arg1), (arg2), 0, 0, \
+	    (answer))
+#define async_data_read_forward_3_0(phoneid, method, arg1, arg2, arg3, answer) \
+	async_data_read_forward_fast((phoneid), (method), (arg1), (arg2), (arg3), 0, \
+	    NULL)
+#define async_data_read_forward_3_1(phoneid, method, arg1, arg2, arg3, answer) \
+	async_data_read_forward_fast((phoneid), (method), (arg1), (arg2), (arg3), 0, \
+	    (answer))
+#define async_data_read_forward_4_0(phoneid, method, arg1, arg2, arg3, arg4, answer) \
+	async_data_read_forward_fast((phoneid), (method), (arg1), (arg2), (arg3), \
+	    (arg4), NULL)
+#define async_data_read_forward_4_1(phoneid, method, arg1, arg2, arg3, arg4, answer) \
+	async_data_read_forward_fast((phoneid), (method), (arg1), (arg2), (arg3), \
+	    (arg4), (answer))
+
+extern int async_data_read_start(int, void *, size_t);
+extern int async_data_read_receive(ipc_callid_t *, size_t *);
+extern int async_data_read_finalize(ipc_callid_t, const void *, size_t);
+
+extern int async_data_read_forward_fast(int, ipcarg_t, ipcarg_t, ipcarg_t,
+    ipcarg_t, ipcarg_t, ipc_call_t *);
+
+/*
+ * User-friendly wrappers for async_data_write_forward_fast().
+ */
+#define async_data_write_forward_0_0(phoneid, method, answer) \
+	async_data_write_forward_fast((phoneid), (method), 0, 0, 0, 0, NULL)
+#define async_data_write_forward_0_1(phoneid, method, answer) \
+	async_data_write_forward_fast((phoneid), (method), 0, 0, 0, 0, (answer))
+#define async_data_write_forward_1_0(phoneid, method, arg1, answer) \
+	async_data_write_forward_fast((phoneid), (method), (arg1), 0, 0, 0, NULL)
+#define async_data_write_forward_1_1(phoneid, method, arg1, answer) \
+	async_data_write_forward_fast((phoneid), (method), (arg1), 0, 0, 0, \
+	    (answer))
+#define async_data_write_forward_2_0(phoneid, method, arg1, arg2, answer) \
+	async_data_write_forward_fast((phoneid), (method), (arg1), (arg2), 0, 0, \
+	    NULL)
+#define async_data_write_forward_2_1(phoneid, method, arg1, arg2, answer) \
+	async_data_write_forward_fast((phoneid), (method), (arg1), (arg2), 0, 0, \
+	    (answer))
+#define async_data_write_forward_3_0(phoneid, method, arg1, arg2, arg3, answer) \
+	async_data_write_forward_fast((phoneid), (method), (arg1), (arg2), (arg3), \
+	    0, NULL)
+#define async_data_write_forward_3_1(phoneid, method, arg1, arg2, arg3, answer) \
+	async_data_write_forward_fast((phoneid), (method), (arg1), (arg2), (arg3), \
+	    0, (answer))
+#define async_data_write_forward_4_0(phoneid, method, arg1, arg2, arg3, arg4, answer) \
+	async_data_write_forward_fast((phoneid), (method), (arg1), (arg2), (arg3), \
+	    (arg4), NULL)
+#define async_data_write_forward_4_1(phoneid, method, arg1, arg2, arg3, arg4, answer) \
+	async_data_write_forward_fast((phoneid), (method), (arg1), (arg2), (arg3), \
+	    (arg4), (answer))
+
+extern int async_data_write_start(int, const void *, size_t);
+extern int async_data_write_receive(ipc_callid_t *, size_t *);
+extern int async_data_write_finalize(ipc_callid_t, void *, size_t);
+
+extern int async_data_write_accept(void **, const bool, const size_t,
+    const size_t, const size_t, size_t *);
+extern void async_data_write_void(const int);
+
+extern int async_data_write_forward_fast(int, ipcarg_t, ipcarg_t, ipcarg_t,
+    ipcarg_t, ipcarg_t, ipc_call_t *);
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/include/async_priv.h
===================================================================
--- uspace/lib/c/include/async_priv.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/include/async_priv.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,87 @@
+/*
+ * 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 libc
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_ASYNC_PRIV_H_
+#define LIBC_ASYNC_PRIV_H_
+
+#include <adt/list.h>
+#include <fibril.h>
+#include <sys/time.h>
+#include <bool.h>
+
+/** Structures of this type are used to track the timeout events. */
+typedef struct {
+	/** If true, this struct is in the timeout list. */
+	bool inlist;
+	
+	/** Timeout list link. */
+	link_t link;
+	
+	/** If true, we have timed out. */
+	bool occurred;
+
+	/** Expiration time. */
+	struct timeval expires;
+} to_event_t;
+
+/** Structures of this type are used to track the wakeup events. */
+typedef struct {
+	/** If true, this struct is in a synchronization object wait queue. */
+	bool inlist;
+	
+	/** Wait queue linkage. */
+	link_t link;
+} wu_event_t;
+
+
+/** Structures of this type represent a waiting fibril. */
+typedef struct {
+	/** Identification of and link to the waiting fibril. */
+	fid_t fid;
+	
+	/** If true, this fibril is currently active. */
+	bool active;
+
+	/** Timeout wait data. */
+	to_event_t to_event;
+	/** Wakeup wait data. */
+	wu_event_t wu_event;
+} awaiter_t;
+
+extern void async_insert_timeout(awaiter_t *wd);
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/include/atomic.h
===================================================================
--- uspace/lib/c/include/atomic.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/include/atomic.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,43 @@
+/*
+ * 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.
+ */
+
+/** @addtogroup libc
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_ATOMIC_H_
+#define LIBC_ATOMIC_H_
+
+#include <libarch/atomic.h>
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/include/atomicdflt.h
===================================================================
--- uspace/lib/c/include/atomicdflt.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/include/atomicdflt.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,69 @@
+/*
+ * 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 libc
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_ATOMICDFLT_H_
+#define LIBC_ATOMICDFLT_H_
+
+#ifndef LIBC_ARCH_ATOMIC_H_
+	#error This file cannot be included directly, include atomic.h instead.
+#endif
+
+#include <stdint.h>
+#include <bool.h>
+
+typedef struct atomic {
+	volatile atomic_count_t count;
+} atomic_t;
+
+static inline void atomic_set(atomic_t *val, atomic_count_t i)
+{
+	val->count = i;
+}
+
+static inline atomic_count_t atomic_get(atomic_t *val)
+{
+	return val->count;
+}
+
+#ifndef CAS
+static inline bool cas(atomic_t *val, atomic_count_t ov, atomic_count_t nv)
+{
+	return __sync_bool_compare_and_swap(&val->count, ov, nv);
+}
+#endif
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/include/bitops.h
===================================================================
--- uspace/lib/c/include/bitops.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/include/bitops.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,97 @@
+/*
+ * 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 generic
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_BITOPS_H_
+#define LIBC_BITOPS_H_
+
+#include <sys/types.h>
+
+
+/** Return position of first non-zero bit from left (i.e. [log_2(arg)]).
+ *
+ * If number is zero, it returns 0
+ */
+static inline unsigned int fnzb32(uint32_t arg)
+{
+	unsigned int n = 0;
+	
+	if (arg >> 16) {
+		arg >>= 16;
+		n += 16;
+	}
+	
+	if (arg >> 8) {
+		arg >>= 8;
+		n += 8;
+	}
+	
+	if (arg >> 4) {
+		arg >>= 4;
+		n += 4;
+	}
+	
+	if (arg >> 2) {
+		arg >>= 2;
+		n += 2;
+	}
+	
+	if (arg >> 1) {
+		arg >>= 1;
+		n += 1;
+	}
+	
+	return n;
+}
+
+static inline unsigned int fnzb64(uint64_t arg)
+{
+	unsigned int n = 0;
+	
+	if (arg >> 32) {
+		arg >>= 32;
+		n += 32;
+	}
+	
+	return (n + fnzb32((uint32_t) arg));
+}
+
+static inline unsigned int fnzb(size_t arg)
+{
+	return fnzb64(arg);
+}
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/include/bool.h
===================================================================
--- uspace/lib/c/include/bool.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/include/bool.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,46 @@
+/*
+ * 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.
+ */
+
+/** @addtogroup libc
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_BOOL_H_
+#define LIBC_BOOL_H_
+
+#define false 0
+#define true 1
+
+typedef short bool;
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/include/byteorder.h
===================================================================
--- uspace/lib/c/include/byteorder.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/include/byteorder.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,111 @@
+/*
+ * 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 libc
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_BYTEORDER_H_
+#define LIBC_BYTEORDER_H_
+
+#include <stdint.h>
+
+#if !(defined(__BE__) ^ defined(__LE__))
+	#error The architecture must be either big-endian or little-endian.
+#endif
+
+#ifdef __BE__
+
+#define uint16_t_le2host(n)  (uint16_t_byteorder_swap(n))
+#define uint32_t_le2host(n)  (uint32_t_byteorder_swap(n))
+#define uint64_t_le2host(n)  (uint64_t_byteorder_swap(n))
+
+#define uint16_t_be2host(n)  (n)
+#define uint32_t_be2host(n)  (n)
+#define uint64_t_be2host(n)  (n)
+
+#define host2uint16_t_le(n)  (uint16_t_byteorder_swap(n))
+#define host2uint32_t_le(n)  (uint32_t_byteorder_swap(n))
+#define host2uint64_t_le(n)  (uint64_t_byteorder_swap(n))
+
+#define host2uint16_t_be(n)  (n)
+#define host2uint32_t_be(n)  (n)
+#define host2uint64_t_be(n)  (n)
+
+#else
+
+#define uint16_t_le2host(n)  (n)
+#define uint32_t_le2host(n)  (n)
+#define uint64_t_le2host(n)  (n)
+
+#define uint16_t_be2host(n)  (uint16_t_byteorder_swap(n))
+#define uint32_t_be2host(n)  (uint32_t_byteorder_swap(n))
+#define uint64_t_be2host(n)  (uint64_t_byteorder_swap(n))
+
+#define host2uint16_t_le(n)  (n)
+#define host2uint32_t_le(n)  (n)
+#define host2uint64_t_le(n)  (n)
+
+#define host2uint16_t_be(n)  (uint16_t_byteorder_swap(n))
+#define host2uint32_t_be(n)  (uint32_t_byteorder_swap(n))
+#define host2uint64_t_be(n)  (uint64_t_byteorder_swap(n))
+
+#endif
+
+static inline uint64_t uint64_t_byteorder_swap(uint64_t n)
+{
+	return ((n & 0xff) << 56) |
+	    ((n & 0xff00) << 40) |
+	    ((n & 0xff0000) << 24) |
+	    ((n & 0xff000000LL) << 8) |
+	    ((n & 0xff00000000LL) >> 8) |
+	    ((n & 0xff0000000000LL) >> 24) |
+	    ((n & 0xff000000000000LL) >> 40) |
+	    ((n & 0xff00000000000000LL) >> 56);
+}
+
+static inline uint32_t uint32_t_byteorder_swap(uint32_t n)
+{
+	return ((n & 0xff) << 24) |
+	    ((n & 0xff00) << 8) |
+	    ((n & 0xff0000) >> 8) |
+	    ((n & 0xff000000) >> 24);
+}
+
+static inline uint16_t uint16_t_byteorder_swap(uint16_t n)
+{
+	return ((n & 0xff) << 8) |
+	    ((n & 0xff00) >> 8);
+}
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/include/cap.h
===================================================================
--- uspace/lib/c/include/cap.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/include/cap.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,46 @@
+/*
+ * 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 libc
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIB_CAP_H_
+#define LIB_CAP_H_
+
+#include <task.h>
+
+extern int cap_grant(task_id_t id, unsigned int caps);
+extern int cap_revoke(task_id_t id, unsigned int caps);
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/include/clipboard.h
===================================================================
--- uspace/lib/c/include/clipboard.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/include/clipboard.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2009 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 libc
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_CLIPBOARD_H_
+#define LIBC_CLIPBOARD_H_
+
+extern int clipboard_put_str(const char *);
+extern int clipboard_get_str(char **);
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/include/ctype.h
===================================================================
--- uspace/lib/c/include/ctype.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/include/ctype.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,98 @@
+/*
+ * 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 libc
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_CTYPE_H_
+#define LIBC_CTYPE_H_
+
+static inline int islower(int c)
+{
+	return ((c >= 'a') && (c <= 'z'));
+}
+
+static inline int isupper(int c)
+{
+	return ((c >= 'A') && (c <= 'Z'));
+}
+
+static inline int isalpha(int c)
+{
+	return (islower(c) || isupper(c));
+}
+
+static inline int isdigit(int c)
+{
+	return ((c >= '0') && (c <= '9'));
+}
+
+static inline int isalnum(int c)
+{
+	return (isalpha(c) || isdigit(c));
+}
+
+static inline int isspace(int c)
+{
+	switch (c) {
+	case ' ':
+	case '\n':
+	case '\t':
+	case '\f':
+	case '\r':
+	case '\v':
+		return 1;
+		break;
+	default:
+		return 0;
+	}
+}
+
+static inline int tolower(int c)
+{
+	if (isupper(c))
+		return (c + ('a' - 'A'));
+	else
+		return c;
+}
+
+static inline int toupper(int c)
+{
+	if (islower(c))
+		return (c + ('A' - 'a'));
+	else
+		return c;
+}
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/include/ddi.h
===================================================================
--- uspace/lib/c/include/ddi.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/include/ddi.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,49 @@
+/*
+ * 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 libc
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_DDI_H_
+#define LIBC_DDI_H_
+
+#include <task.h>
+
+extern int device_assign_devno(void);
+extern int physmem_map(void *, void *, unsigned long, int);
+extern int iospace_enable(task_id_t, void *, unsigned long);
+extern int preemption_control(int);
+extern int pio_enable(void *, size_t, void **);
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/include/devmap.h
===================================================================
--- uspace/lib/c/include/devmap.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/include/devmap.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,66 @@
+/*
+ * Copyright (c) 2009 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 libc
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_DEVMAP_H_
+#define LIBC_DEVMAP_H_
+
+#include <ipc/devmap.h>
+#include <async.h>
+#include <bool.h>
+
+extern int devmap_get_phone(devmap_interface_t, unsigned int);
+extern void devmap_hangup_phone(devmap_interface_t iface);
+
+extern int devmap_driver_register(const char *, async_client_conn_t);
+extern int devmap_device_register(const char *, dev_handle_t *);
+
+extern int devmap_device_get_handle(const char *, dev_handle_t *, unsigned int);
+extern int devmap_namespace_get_handle(const char *, dev_handle_t *, unsigned int);
+extern devmap_handle_type_t devmap_handle_probe(dev_handle_t);
+
+extern int devmap_device_connect(dev_handle_t, unsigned int);
+
+extern int devmap_null_create(void);
+extern void devmap_null_destroy(int);
+
+extern size_t devmap_count_namespaces(void);
+extern size_t devmap_count_devices(dev_handle_t);
+
+extern size_t devmap_get_namespaces(dev_desc_t **);
+extern size_t devmap_get_devices(dev_handle_t, dev_desc_t **);
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/include/dirent.h
===================================================================
--- uspace/lib/c/include/dirent.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/include/dirent.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,57 @@
+/*
+ * Copyright (c) 2008 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 libc
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_DIRENT_H_
+#define LIBC_DIRENT_H_
+
+#define NAME_MAX  256
+
+struct dirent {
+	char d_name[NAME_MAX + 1];
+};
+
+typedef struct {
+	int fd;
+	struct dirent res;
+} DIR;
+
+extern DIR *opendir(const char *);
+extern struct dirent *readdir(DIR *);
+extern void rewinddir(DIR *);
+extern int closedir(DIR *);
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/include/err.h
===================================================================
--- uspace/lib/c/include/err.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/include/err.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,46 @@
+/*
+ * 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 libc
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_ERR_H_
+#define LIBC_ERR_H_
+
+#define errx(status, fmt, ...) { \
+	printf((fmt), ##__VA_ARGS__); \
+	_exit(status); \
+}
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/include/errno.h
===================================================================
--- uspace/lib/c/include/errno.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/include/errno.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,61 @@
+/*
+ * 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 libc
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_ERRNO_H_
+#define LIBC_ERRNO_H_
+
+#include <kernel/errno.h>
+#include <fibril.h>
+
+extern int _errno;
+
+#define errno _errno
+
+#define EMFILE        (-17)
+#define ENAMETOOLONG  (-256)
+#define EISDIR        (-257)
+#define ENOTDIR       (-258)
+#define ENOSPC        (-259)
+#define EEXIST        (-260)
+#define ENOTEMPTY     (-261)
+#define EBADF         (-262)
+#define ERANGE        (-263)
+#define EXDEV         (-264)
+#define EIO           (-265)
+#define EMLINK        (-266)
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/include/event.h
===================================================================
--- uspace/lib/c/include/event.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/include/event.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,46 @@
+/*
+ * 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.
+ */
+
+/** @addtogroup libc
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_EVENT_H_
+#define LIBC_EVENT_H_
+
+#include <kernel/ipc/event_types.h>
+#include <ipc/ipc.h>
+
+extern int event_subscribe(event_type_t, ipcarg_t);
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/include/fcntl.h
===================================================================
--- uspace/lib/c/include/fcntl.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/include/fcntl.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2007 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 libc
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_FCNTL_H_
+#define LIBC_FCNTL_H_
+
+#define O_CREAT   1
+#define O_EXCL    2
+#define O_TRUNC   4
+#define O_APPEND  8
+#define O_RDONLY  16
+#define O_RDWR    32
+#define O_WRONLY  64
+#define O_DESC    128
+
+extern int open(const char *, int, ...);
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/include/fibril.h
===================================================================
--- uspace/lib/c/include/fibril.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/include/fibril.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,97 @@
+/*
+ * 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 libc
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_FIBRIL_H_
+#define LIBC_FIBRIL_H_
+
+#include <libarch/fibril.h>
+#include <adt/list.h>
+#include <libarch/tls.h>
+
+#define context_set_generic(c, _pc, stack, size, ptls) \
+	(c)->pc = (sysarg_t) (_pc); \
+	(c)->sp = ((sysarg_t) (stack)) + (size) - SP_DELTA; \
+	(c)->tls = (sysarg_t) (ptls);
+
+#define FIBRIL_SERIALIZED  1
+#define FIBRIL_WRITER      2
+
+typedef enum {
+	FIBRIL_PREEMPT,
+	FIBRIL_TO_MANAGER,
+	FIBRIL_FROM_MANAGER,
+	FIBRIL_FROM_DEAD
+} fibril_switch_type_t;
+
+typedef sysarg_t fid_t;
+
+typedef struct fibril {
+	link_t link;
+	context_t ctx;
+	void *stack;
+	void *arg;
+	int (*func)(void *);
+	tcb_t *tcb;
+
+	struct fibril *clean_after_me;
+	int retval;
+	int flags;
+} fibril_t;
+
+/** Fibril-local variable specifier */
+#define fibril_local __thread
+
+extern int context_save(context_t *ctx) __attribute__((returns_twice));
+extern void context_restore(context_t *ctx) __attribute__((noreturn));
+
+extern fid_t fibril_create(int (*func)(void *), void *arg);
+extern fibril_t *fibril_setup(void);
+extern void fibril_teardown(fibril_t *f);
+extern int fibril_switch(fibril_switch_type_t stype);
+extern void fibril_add_ready(fid_t fid);
+extern void fibril_add_manager(fid_t fid);
+extern void fibril_remove_manager(void);
+extern fid_t fibril_get_id(void);
+extern void fibril_inc_sercount(void);
+extern void fibril_dec_sercount(void);
+
+static inline int fibril_yield(void)
+{
+	return fibril_switch(FIBRIL_PREEMPT);
+}
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/include/fibril_synch.h
===================================================================
--- uspace/lib/c/include/fibril_synch.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/include/fibril_synch.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,107 @@
+/*
+ * 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.
+ */
+
+/** @addtogroup libc
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_FIBRIL_SYNCH_H_
+#define LIBC_FIBRIL_SYNCH_H_
+
+#include <async.h>
+#include <fibril.h>
+#include <adt/list.h>
+#include <libarch/tls.h>
+#include <sys/time.h>
+
+typedef struct {
+	int counter;
+	link_t waiters;
+} fibril_mutex_t;
+
+#define FIBRIL_MUTEX_INITIALIZE(name) \
+	fibril_mutex_t name = {	\
+		.counter = 1, \
+		.waiters = { \
+			.prev = &name.waiters, \
+			.next = &name.waiters, \
+		} \
+	}
+
+typedef struct {
+	unsigned writers;
+	unsigned readers;
+	link_t waiters;
+} fibril_rwlock_t;
+
+#define FIBRIL_RWLOCK_INITIALIZE(name) \
+	fibril_rwlock_t name = { \
+		.readers = 0, \
+		.writers = 0, \
+		.waiters = { \
+			.prev = &name.waiters, \
+			.next = &name.waiters, \
+		} \
+	}
+
+typedef struct {
+	link_t waiters;
+} fibril_condvar_t;
+
+#define FIBRIL_CONDVAR_INITIALIZE(name) \
+	fibril_condvar_t name = { \
+		.waiters = { \
+			.next = &name.waiters, \
+			.prev = &name.waiters, \
+		} \
+	}
+
+extern void fibril_mutex_initialize(fibril_mutex_t *);
+extern void fibril_mutex_lock(fibril_mutex_t *);
+extern bool fibril_mutex_trylock(fibril_mutex_t *);
+extern void fibril_mutex_unlock(fibril_mutex_t *);
+
+extern void fibril_rwlock_initialize(fibril_rwlock_t *);
+extern void fibril_rwlock_read_lock(fibril_rwlock_t *);
+extern void fibril_rwlock_write_lock(fibril_rwlock_t *);
+extern void fibril_rwlock_read_unlock(fibril_rwlock_t *);
+extern void fibril_rwlock_write_unlock(fibril_rwlock_t *);
+
+extern void fibril_condvar_initialize(fibril_condvar_t *);
+extern int fibril_condvar_wait_timeout(fibril_condvar_t *, fibril_mutex_t *,
+    suseconds_t);
+extern void fibril_condvar_wait(fibril_condvar_t *, fibril_mutex_t *);
+extern void fibril_condvar_signal(fibril_condvar_t *);
+extern void fibril_condvar_broadcast(fibril_condvar_t *);
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/include/futex.h
===================================================================
--- uspace/lib/c/include/futex.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/include/futex.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,53 @@
+/*
+ * 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 libc
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_FUTEX_H_
+#define LIBC_FUTEX_H_
+
+#include <atomic.h>
+#include <sys/types.h>
+
+#define FUTEX_INITIALIZER     {1}
+
+typedef atomic_t futex_t;
+
+extern void futex_initialize(futex_t *futex, int value);
+extern int futex_down(futex_t *futex);
+extern int futex_trydown(futex_t *futex);
+extern int futex_up(futex_t *futex);
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/include/getopt.h
===================================================================
--- uspace/lib/c/include/getopt.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/include/getopt.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,71 @@
+/*	$NetBSD: getopt.h,v 1.10.6.1 2008/05/18 12:30:09 yamt Exp $	*/
+
+/*-
+ * Copyright (c) 2000 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Dieter Baron and Thomas Klausner.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``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 FOUNDATION OR CONTRIBUTORS
+ * 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.
+ */
+
+/* Ported to HelenOS August 2008 by Tim Post <echo@echoreply.us> */
+
+#ifndef _GETOPT_H_
+#define _GETOPT_H_
+
+#include <unistd.h>
+
+/*
+ * Gnu like getopt_long() and BSD4.4 getsubopt()/optreset extensions
+ */
+#define no_argument        0
+#define required_argument  1
+#define optional_argument  2
+
+struct option {
+	/* name of long option */
+	const char *name;
+	/*
+	 * one of no_argument, required_argument, and optional_argument:
+	 * whether option takes an argument
+	 */
+	int has_arg;
+	/* if not NULL, set *flag to val when option found */
+	int *flag;
+	/* if flag not NULL, value to set *flag to; else return value */
+	int val;
+};
+
+/* HelenOS Port - These need to be exposed for legacy getopt() */
+extern const char *optarg;
+extern int optind, opterr, optopt;
+extern int optreset;
+
+int getopt_long(int, char * const *, const char *,
+    const struct option *, int *);
+
+/* HelenOS Port : Expose legacy getopt() */
+int	 getopt(int, char * const [], const char *);
+
+#endif /* !_GETOPT_H_ */
Index: uspace/lib/c/include/inttypes.h
===================================================================
--- uspace/lib/c/include/inttypes.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/include/inttypes.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,43 @@
+/*
+ * 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 libc
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_INTTYPES_H_
+#define LIBC_INTTYPES_H_
+
+#include <libarch/inttypes.h>
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/include/io/color.h
===================================================================
--- uspace/lib/c/include/io/color.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/include/io/color.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,55 @@
+/*
+ * 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.
+ */
+
+/** @addtogroup libc
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_IO_COLOR_H_
+#define LIBC_IO_COLOR_H_
+
+enum console_color {
+	COLOR_BLACK   = 0,
+	COLOR_BLUE    = 1,
+	COLOR_GREEN   = 2,
+	COLOR_CYAN    = 3,
+	COLOR_RED     = 4,
+	COLOR_MAGENTA = 5,
+	COLOR_YELLOW  = 6,
+	COLOR_WHITE   = 7,
+	
+	CATTR_BRIGHT  = 8,
+	CATTR_BLINK   = 8
+};
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/include/io/console.h
===================================================================
--- uspace/lib/c/include/io/console.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/include/io/console.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,87 @@
+/*
+ * 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.
+ */
+
+/** @addtogroup libc
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_IO_CONSOLE_H_
+#define LIBC_IO_CONSOLE_H_
+
+#include <ipc/ipc.h>
+#include <bool.h>
+
+typedef enum {
+	KEY_PRESS,
+	KEY_RELEASE
+} console_ev_type_t;
+
+enum {
+	CONSOLE_CCAP_NONE = 0,
+	CONSOLE_CCAP_STYLE,
+	CONSOLE_CCAP_INDEXED,
+	CONSOLE_CCAP_RGB
+};
+
+/** Console event structure. */
+typedef struct {
+	/** Press or release event. */
+	console_ev_type_t type;
+	
+	/** Keycode of the key that was pressed or released. */
+	unsigned int key;
+	
+	/** Bitmask of modifiers held. */
+	unsigned int mods;
+	
+	/** The character that was generated or '\0' for none. */
+	wchar_t c;
+} console_event_t;
+
+extern void console_clear(int phone);
+
+extern int console_get_size(int phone, int *cols, int *rows);
+extern int console_get_pos(int phone, int *col, int *row);
+extern void console_goto(int phone, int col, int row);
+
+extern void console_set_style(int phone, int style);
+extern void console_set_color(int phone, int fg_color, int bg_color, int flags);
+extern void console_set_rgb_color(int phone, int fg_color, int bg_color);
+
+extern void console_cursor_visibility(int phone, bool show);
+extern int console_get_color_cap(int phone, int *ccap);
+extern void console_kcon_enable(int phone);
+
+extern bool console_get_event(int phone, console_event_t *event);
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/include/io/keycode.h
===================================================================
--- uspace/lib/c/include/io/keycode.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/include/io/keycode.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,220 @@
+/*
+ * Copyright (c) 2009 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 libc
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_IO_KEYCODE_H_
+#define LIBC_IO_KEYCODE_H_
+
+/** Keycode definitions.
+ *
+ * A keycode identifies a key by its position on the keyboard, rather
+ * than by its label. For human readability, key positions are noted
+ * with the key label on a keyboard with US layout. This label has
+ * nothing to do with the character, that the key produces
+ * -- this is determined by the keymap.
+ *
+ * The keyboard model reflects a standard PC keyboard layout.
+ * Non-standard keyboards need to be mapped to this model in some
+ * logical way. Scancodes are mapped to keycodes with a scanmap.
+ *
+ * For easier mapping to the model and to emphasize the nature of keycodes,
+ * they really are organized here by position, rather than by label.
+ */
+enum keycode {
+
+	/* Main block row 1 */
+
+	KC_BACKTICK = 1,
+
+	KC_1,
+	KC_2,
+	KC_3,
+	KC_4,
+	KC_5,
+	KC_6,
+	KC_7,
+	KC_8,
+	KC_9,
+	KC_0,
+
+	KC_MINUS,
+	KC_EQUALS,
+	KC_BACKSPACE,
+
+	/* Main block row 2 */
+
+	KC_TAB,
+
+	KC_Q,
+	KC_W,
+	KC_E,
+	KC_R,
+	KC_T,
+	KC_Y,
+	KC_U,
+	KC_I,
+	KC_O,
+	KC_P,
+
+	KC_LBRACKET,
+	KC_RBRACKET,
+
+	/* Main block row 3 */
+
+	KC_CAPS_LOCK,
+	
+	KC_A,
+	KC_S,
+	KC_D,
+	KC_F,
+	KC_G,
+	KC_H,
+	KC_J,
+	KC_K,
+	KC_L,
+
+	KC_SEMICOLON,
+	KC_QUOTE,
+	KC_BACKSLASH,
+
+	KC_ENTER,
+
+	/* Main block row 4 */
+
+	KC_LSHIFT,
+
+	KC_Z,
+	KC_X,
+	KC_C,
+	KC_V,
+	KC_B,
+	KC_N,
+	KC_M,
+
+	KC_COMMA,
+	KC_PERIOD,
+	KC_SLASH,
+
+	KC_RSHIFT,
+
+	/* Main block row 5 */
+
+	KC_LCTRL,
+	KC_LALT,
+	KC_SPACE,
+	KC_RALT,
+	KC_RCTRL,
+
+	/* Function keys block */
+
+	KC_ESCAPE,
+
+	KC_F1,
+	KC_F2,
+	KC_F3,
+	KC_F4,
+	KC_F5,
+	KC_F6,
+	KC_F7,
+	KC_F8,
+	KC_F9,
+	KC_F10,
+	KC_F11,
+	KC_F12,
+
+	KC_PRTSCR,
+	KC_SCROLL_LOCK,
+	KC_PAUSE,
+
+	/* Cursor keys block */
+
+	KC_INSERT,
+	KC_HOME,
+	KC_PAGE_UP,
+
+	KC_DELETE,
+	KC_END,
+	KC_PAGE_DOWN,
+
+	KC_UP,
+	KC_LEFT,
+	KC_DOWN,
+	KC_RIGHT,
+
+	/* Numeric block */
+
+	KC_NUM_LOCK,
+	KC_NSLASH,
+	KC_NTIMES,
+	KC_NMINUS,
+
+	KC_NPLUS,
+	KC_NENTER,
+
+	KC_N7,
+	KC_N8,
+	KC_N9,
+
+	KC_N4,
+	KC_N5,
+	KC_N6,
+
+	KC_N1,
+	KC_N2,
+	KC_N3,
+
+	KC_N0,
+	KC_NPERIOD
+	
+} keycode_t;
+
+enum keymod {
+	KM_LSHIFT      = 0x001,
+	KM_RSHIFT      = 0x002,
+	KM_LCTRL       = 0x004,
+	KM_RCTRL       = 0x008,
+	KM_LALT        = 0x010,
+	KM_RALT        = 0x020,
+	KM_CAPS_LOCK   = 0x040,
+	KM_NUM_LOCK    = 0x080,
+	KM_SCROLL_LOCK = 0x100,
+	
+	KM_SHIFT       = KM_LSHIFT | KM_RSHIFT,
+	KM_CTRL        = KM_LCTRL | KM_RCTRL,
+	KM_ALT         = KM_LALT | KM_RALT
+} keymod_t;
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/include/io/klog.h
===================================================================
--- uspace/lib/c/include/io/klog.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/include/io/klog.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2006 Jakub Vana
+ * 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 libc
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_STREAM_H_
+#define LIBC_STREAM_H_
+
+#include <sys/types.h>
+
+extern size_t klog_write(const void *buf, size_t size);
+extern void klog_update(void);
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/include/io/printf_core.h
===================================================================
--- uspace/lib/c/include/io/printf_core.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/include/io/printf_core.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,58 @@
+/*
+ * 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 libc
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_PRINTF_CORE_H_
+#define LIBC_PRINTF_CORE_H_
+
+#include <sys/types.h>
+#include <stdarg.h>
+
+/** Structure for specifying output methods for different printf clones. */
+typedef struct printf_spec {
+	/* String output function, returns number of printed characters or EOF */
+	int (*str_write)(const char *, size_t, void *);
+	
+	/* Wide string output function, returns number of printed characters or EOF */
+	int (*wstr_write)(const wchar_t *, size_t, void *);
+	
+	/* User data - output stream specification, state, locks, etc. */
+	void *data;
+} printf_spec_t;
+
+int printf_core(const char *fmt, printf_spec_t *ps, va_list ap);
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/include/io/style.h
===================================================================
--- uspace/lib/c/include/io/style.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/include/io/style.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,46 @@
+/*
+ * 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.
+ */
+
+/** @addtogroup libc
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_IO_STYLE_H_
+#define LIBC_IO_STYLE_H_
+
+enum console_style {
+	STYLE_NORMAL   = 0,
+	STYLE_EMPHASIS = 1
+};
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/include/ipc/adb.h
===================================================================
--- uspace/lib/c/include/ipc/adb.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/include/ipc/adb.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,53 @@
+/*
+ * 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 libcipc
+ * @{
+ */
+/** @file
+ * @brief ADB device interface.
+ */ 
+
+#ifndef LIBC_IPC_ADB_H_
+#define LIBC_IPC_ADB_H_
+
+#include <ipc/ipc.h>
+
+typedef enum {
+	ADB_REG_WRITE = IPC_FIRST_USER_METHOD
+} adb_request_t;
+
+
+typedef enum {
+	ADB_REG_NOTIF = IPC_FIRST_USER_METHOD
+} adb_notif_t;
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/include/ipc/bd.h
===================================================================
--- uspace/lib/c/include/ipc/bd.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/include/ipc/bd.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2009 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 libcipc
+ * @{
+ */
+/** @file
+ */ 
+
+#ifndef LIBC_IPC_BD_H_
+#define LIBC_IPC_BD_H_
+
+#include <ipc/ipc.h>
+
+typedef enum {
+	BD_GET_BLOCK_SIZE = IPC_FIRST_USER_METHOD,
+	BD_GET_NUM_BLOCKS,
+	BD_READ_BLOCKS,
+	BD_WRITE_BLOCKS
+} bd_request_t;
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/include/ipc/bus.h
===================================================================
--- uspace/lib/c/include/ipc/bus.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/include/ipc/bus.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,47 @@
+/*
+ * 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.
+ */
+
+/** @addtogroup libcipc
+ * @{
+ */
+/** @file
+ */ 
+
+#ifndef LIBC_BUS_H_
+#define LIBC_BUS_H_
+
+#include <ipc/ipc.h>
+
+typedef enum {
+	BUS_CLEAR_INTERRUPT = IPC_FIRST_USER_METHOD
+} bus_request_t;
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/include/ipc/char.h
===================================================================
--- uspace/lib/c/include/ipc/char.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/include/ipc/char.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 2009 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 libcipc
+ * @{
+ */
+/** @file
+ * @brief Character device interface.
+ */ 
+
+#ifndef LIBC_IPC_CHAR_H_
+#define LIBC_IPC_CHAR_H_
+
+#include <ipc/ipc.h>
+
+typedef enum {
+	CHAR_WRITE_BYTE = IPC_FIRST_USER_METHOD
+} char_request_t;
+
+
+typedef enum {
+	CHAR_NOTIF_BYTE = IPC_FIRST_USER_METHOD
+} char_notif_t;
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/include/ipc/clipboard.h
===================================================================
--- uspace/lib/c/include/ipc/clipboard.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/include/ipc/clipboard.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,54 @@
+/*
+ * Copyright (c) 2009 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 libcipc
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_IPC_CLIPBOARD_H_
+#define LIBC_IPC_CLIPBOARD_H_
+
+#include <ipc/ipc.h>
+
+typedef enum {
+	CLIPBOARD_PUT_DATA = IPC_FIRST_USER_METHOD,
+	CLIPBOARD_GET_DATA,
+	CLIPBOARD_CONTENT
+} clipboard_request_t;
+
+typedef enum {
+	CLIPBOARD_TAG_NONE,
+	CLIPBOARD_TAG_DATA
+} clipboard_tag_t;
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/include/ipc/console.h
===================================================================
--- uspace/lib/c/include/ipc/console.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/include/ipc/console.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,58 @@
+/*
+ * 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 libcipc
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_IPC_CONSOLE_H_
+#define LIBC_IPC_CONSOLE_H_
+
+#include <ipc/ipc.h>
+#include <ipc/vfs.h>
+
+typedef enum {
+	CONSOLE_GET_SIZE = VFS_OUT_LAST,
+	CONSOLE_GET_COLOR_CAP,
+	CONSOLE_GET_EVENT,
+	CONSOLE_GET_POS,
+	CONSOLE_GOTO,
+	CONSOLE_CLEAR,
+	CONSOLE_SET_STYLE,
+	CONSOLE_SET_COLOR,
+	CONSOLE_SET_RGB_COLOR,
+	CONSOLE_CURSOR_VISIBILITY,
+	CONSOLE_KCON_ENABLE
+} console_request_t;
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/include/ipc/devmap.h
===================================================================
--- uspace/lib/c/include/ipc/devmap.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/include/ipc/devmap.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,87 @@
+/*
+ * Copyright (c) 2007 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 devmap
+ * @{
+ */
+
+#ifndef DEVMAP_DEVMAP_H_
+#define DEVMAP_DEVMAP_H_
+
+#include <atomic.h>
+#include <ipc/ipc.h>
+#include <adt/list.h>
+
+#define DEVMAP_NAME_MAXLEN  255
+
+typedef ipcarg_t dev_handle_t;
+
+typedef enum {
+	DEV_HANDLE_NONE,
+	DEV_HANDLE_NAMESPACE,
+	DEV_HANDLE_DEVICE
+} devmap_handle_type_t;
+
+typedef enum {
+	DEVMAP_DRIVER_REGISTER = IPC_FIRST_USER_METHOD,
+	DEVMAP_DRIVER_UNREGISTER,
+	DEVMAP_DEVICE_REGISTER,
+	DEVMAP_DEVICE_UNREGISTER,
+	DEVMAP_DEVICE_GET_HANDLE,
+	DEVMAP_NAMESPACE_GET_HANDLE,
+	DEVMAP_HANDLE_PROBE,
+	DEVMAP_NULL_CREATE,
+	DEVMAP_NULL_DESTROY,
+	DEVMAP_GET_NAMESPACE_COUNT,
+	DEVMAP_GET_DEVICE_COUNT,
+	DEVMAP_GET_NAMESPACES,
+	DEVMAP_GET_DEVICES
+} devmap_request_t;
+
+/** Interface provided by devmap.
+ *
+ * Every process that connects to devmap must ask one of following
+ * interfaces otherwise connection will be refused.
+ *
+ */
+typedef enum {
+	/** Connect as device driver */
+	DEVMAP_DRIVER = 1,
+	/** Connect as client */
+	DEVMAP_CLIENT,
+	/** Create new connection to instance of device that
+	    is specified by second argument of call. */
+	DEVMAP_CONNECT_TO_DEVICE
+} devmap_interface_t;
+
+typedef struct {
+	dev_handle_t handle;
+	char name[DEVMAP_NAME_MAXLEN + 1];
+} dev_desc_t;
+
+#endif
Index: uspace/lib/c/include/ipc/fb.h
===================================================================
--- uspace/lib/c/include/ipc/fb.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/include/ipc/fb.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,85 @@
+/*
+ * 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 libcipc
+ * @{
+ */
+/** @file
+ */ 
+
+#ifndef LIBC_FB_H_
+#define LIBC_FB_H_
+
+#include <ipc/ipc.h>
+
+typedef enum {
+	FB_PUTCHAR = IPC_FIRST_USER_METHOD,
+	FB_CLEAR,
+	FB_GET_CSIZE,
+	FB_GET_COLOR_CAP,
+	FB_CURSOR_VISIBILITY,
+	FB_CURSOR_GOTO,
+	FB_SCROLL,
+	FB_VIEWPORT_SWITCH,
+	FB_VIEWPORT_CREATE,
+	FB_VIEWPORT_DELETE,
+	FB_SET_STYLE,
+	FB_SET_COLOR,
+	FB_SET_RGB_COLOR,
+	FB_GET_RESOLUTION,
+	FB_DRAW_TEXT_DATA,
+	FB_FLUSH,
+	FB_DRAW_PPM,
+	FB_PREPARE_SHM,
+	FB_DROP_SHM,
+	FB_SHM2PIXMAP,
+	FB_VP_DRAW_PIXMAP,
+	FB_VP2PIXMAP,
+	FB_DROP_PIXMAP,
+	FB_ANIM_CREATE,
+	FB_ANIM_DROP,
+	FB_ANIM_ADDPIXMAP,
+	FB_ANIM_CHGVP,
+	FB_ANIM_START,
+	FB_ANIM_STOP,
+	FB_POINTER_MOVE,
+	FB_SCREEN_YIELD,
+	FB_SCREEN_RECLAIM
+} fb_request_t;
+
+enum {
+	FB_CCAP_NONE = 0,
+	FB_CCAP_STYLE,
+	FB_CCAP_INDEXED,
+	FB_CCAP_RGB
+};
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/include/ipc/ipc.h
===================================================================
--- uspace/lib/c/include/ipc/ipc.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/include/ipc/ipc.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,298 @@
+/*
+ * 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 libcipc
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBIPC_IPC_H_
+#define LIBIPC_IPC_H_
+
+#include <task.h>
+#include <kernel/ipc/ipc.h>
+#include <kernel/ddi/irq.h>
+#include <sys/types.h>
+#include <kernel/synch/synch.h>
+
+#define IPC_FLAG_BLOCKING  0x01
+
+typedef sysarg_t ipcarg_t;
+
+typedef struct {
+	ipcarg_t args[IPC_CALL_LEN];
+	ipcarg_t in_phone_hash;
+} ipc_call_t;
+
+typedef sysarg_t ipc_callid_t;
+
+typedef void (* ipc_async_callback_t)(void *, int, ipc_call_t *);
+
+/*
+ * User-friendly wrappers for ipc_call_sync_fast() and ipc_call_sync_slow().
+ * They are in the form ipc_call_sync_m_n(), where m denotes the number of
+ * arguments of payload and n denotes number of return values. Whenever
+ * possible, the fast version is used.
+ */
+#define ipc_call_sync_0_0(phoneid, method) \
+	ipc_call_sync_fast((phoneid), (method), 0, 0, 0, 0, 0, 0, 0, 0)
+#define ipc_call_sync_0_1(phoneid, method, res1) \
+	ipc_call_sync_fast((phoneid), (method), 0, 0, 0, (res1), 0, 0, 0, 0)
+#define ipc_call_sync_0_2(phoneid, method, res1, res2) \
+	ipc_call_sync_fast((phoneid), (method), 0, 0, 0, (res1), (res2), 0, 0, 0)
+#define ipc_call_sync_0_3(phoneid, method, res1, res2, res3) \
+	ipc_call_sync_fast((phoneid), (method), 0, 0, 0, (res1), (res2), (res3), \
+	    0, 0)
+#define ipc_call_sync_0_4(phoneid, method, res1, res2, res3, res4) \
+	ipc_call_sync_fast((phoneid), (method), 0, 0, 0, (res1), (res2), (res3), \
+	    (res4), 0)
+#define ipc_call_sync_0_5(phoneid, method, res1, res2, res3, res4, res5) \
+	ipc_call_sync_fast((phoneid), (method), 0, 0, 0, (res1), (res2), (res3), \
+	    (res4), (res5))
+
+#define ipc_call_sync_1_0(phoneid, method, arg1) \
+	ipc_call_sync_fast((phoneid), (method), (arg1), 0, 0, 0, 0, 0, 0, 0)
+#define ipc_call_sync_1_1(phoneid, method, arg1, res1) \
+	ipc_call_sync_fast((phoneid), (method), (arg1), 0, 0, (res1), 0, 0, 0, 0)
+#define ipc_call_sync_1_2(phoneid, method, arg1, res1, res2) \
+	ipc_call_sync_fast((phoneid), (method), (arg1), 0, 0, (res1), (res2), 0, \
+	    0, 0)
+#define ipc_call_sync_1_3(phoneid, method, arg1, res1, res2, res3) \
+	ipc_call_sync_fast((phoneid), (method), (arg1), 0, 0, (res1), (res2), \
+	    (res3), 0, 0)
+#define ipc_call_sync_1_4(phoneid, method, arg1, res1, res2, res3, res4) \
+	ipc_call_sync_fast((phoneid), (method), (arg1), 0, 0, (res1), (res2), \
+	    (res3), (res4), 0)
+#define ipc_call_sync_1_5(phoneid, method, arg1, res1, res2, res3, res4, \
+    res5) \
+	ipc_call_sync_fast((phoneid), (method), (arg1), 0, 0, (res1), (res2), \
+	    (res3), (res4), (res5))
+
+#define ipc_call_sync_2_0(phoneid, method, arg1, arg2) \
+	ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), 0, 0, 0, 0, \
+	    0, 0)
+#define ipc_call_sync_2_1(phoneid, method, arg1, arg2, res1) \
+	ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), 0, (res1), 0, 0, \
+	    0, 0)
+#define ipc_call_sync_2_2(phoneid, method, arg1, arg2, res1, res2) \
+	ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), 0, (res1), \
+	    (res2), 0, 0, 0)
+#define ipc_call_sync_2_3(phoneid, method, arg1, arg2, res1, res2, res3) \
+	ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), 0, (res1), \
+	    (res2), (res3), 0, 0)
+#define ipc_call_sync_2_4(phoneid, method, arg1, arg2, res1, res2, res3, \
+    res4) \
+	ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), 0, (res1), \
+	    (res2), (res3), (res4), 0)
+#define ipc_call_sync_2_5(phoneid, method, arg1, arg2, res1, res2, res3, \
+    res4, res5)\
+	ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), 0, (res1), \
+	    (res2), (res3), (res4), (res5))
+
+#define ipc_call_sync_3_0(phoneid, method, arg1, arg2, arg3) \
+	ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), (arg3), 0, 0, 0, \
+	    0, 0)
+#define ipc_call_sync_3_1(phoneid, method, arg1, arg2, arg3, res1) \
+	ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), (arg3), (res1), \
+	    0, 0, 0, 0)
+#define ipc_call_sync_3_2(phoneid, method, arg1, arg2, arg3, res1, res2) \
+	ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), (arg3), (res1), \
+	    (res2), 0, 0, 0)
+#define ipc_call_sync_3_3(phoneid, method, arg1, arg2, arg3, res1, res2, \
+    res3) \
+	ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), (arg3), \
+	    (res1), (res2), (res3), 0, 0)
+#define ipc_call_sync_3_4(phoneid, method, arg1, arg2, arg3, res1, res2, \
+    res3, res4) \
+	ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), (arg3), \
+	    (res1), (res2), (res3), (res4), 0)
+#define ipc_call_sync_3_5(phoneid, method, arg1, arg2, arg3, res1, res2, \
+    res3, res4, res5) \
+	ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), (arg3), \
+	    (res1), (res2), (res3), (res4), (res5))
+
+#define ipc_call_sync_4_0(phoneid, method, arg1, arg2, arg3, arg4) \
+	ipc_call_sync_slow((phoneid), (method), (arg1), (arg2), (arg3), (arg4), 0, \
+	    0, 0, 0, 0, 0)
+#define ipc_call_sync_4_1(phoneid, method, arg1, arg2, arg3, arg4, res1) \
+	ipc_call_sync_slow((phoneid), (method), (arg1), (arg2), (arg3), (arg4), 0, \
+	    (res1), 0, 0, 0, 0)
+#define ipc_call_sync_4_2(phoneid, method, arg1, arg2, arg3, arg4, res1, res2) \
+	ipc_call_sync_slow((phoneid), (method), (arg1), (arg2), (arg3), (arg4), 0, \
+	    (res1), (res2), 0, 0, 0)
+#define ipc_call_sync_4_3(phoneid, method, arg1, arg2, arg3, arg4, res1, res2, \
+    res3) \
+	ipc_call_sync_slow((phoneid), (method), (arg1), (arg2), (arg3), \
+	    (arg4), 0, (res1), (res2), (res3), 0, 0)
+#define ipc_call_sync_4_4(phoneid, method, arg1, arg2, arg3, arg4, res1, res2, \
+    res3, res4) \
+	ipc_call_sync_slow((phoneid), (method), (arg1), (arg2), (arg3), \
+	    (arg4), 0, (res1), (res2), (res3), (res4), 0)
+#define ipc_call_sync_4_5(phoneid, method, arg1, arg2, arg3, arg4, res1, res2, \
+    res3, res4, res5) \
+	ipc_call_sync_slow((phoneid), (method), (arg1), (arg2), (arg3), \
+	    (arg4), 0, (res1), (res2), (res3), (res4), (res5))
+
+#define ipc_call_sync_5_0(phoneid, method, arg1, arg2, arg3, arg4, arg5) \
+	ipc_call_sync_slow((phoneid), (method), (arg1), (arg2), (arg3), (arg4), \
+	    (arg5), 0, 0, 0, 0, 0)
+#define ipc_call_sync_5_1(phoneid, method, arg1, arg2, arg3, arg4, arg5, res1) \
+	ipc_call_sync_slow((phoneid), (method), (arg1), (arg2), (arg3), (arg4), \
+	    (arg5), (res1), 0, 0, 0, 0)
+#define ipc_call_sync_5_2(phoneid, method, arg1, arg2, arg3, arg4, arg5, res1, \
+    res2) \
+	ipc_call_sync_slow((phoneid), (method), (arg1), (arg2), (arg3), \
+	    (arg4), (arg5), (res1), (res2), 0, 0, 0)
+#define ipc_call_sync_5_3(phoneid, method, arg1, arg2, arg3, arg4, arg5, res1, \
+    res2, res3) \
+	ipc_call_sync_slow((phoneid), (method), (arg1), (arg2), (arg3), \
+	    (arg4), (arg5), (res1), (res2), (res3), 0, 0)
+#define ipc_call_sync_5_4(phoneid, method, arg1, arg2, arg3, arg4, arg5, res1, \
+    res2, res3, res4) \
+	ipc_call_sync_slow((phoneid), (method), (arg1), (arg2), (arg3), \
+	    (arg4), (arg5), (res1), (res2), (res3), (res4), 0)
+#define ipc_call_sync_5_5(phoneid, method, arg1, arg2, arg3, arg4, arg5, res1, \
+    res2, res3, res4, res5) \
+	ipc_call_sync_slow((phoneid), (method), (arg1), (arg2), (arg3), \
+	    (arg4), (arg5), (res1), (res2), (res3), (res4), (res5))
+
+extern int ipc_call_sync_fast(int, ipcarg_t, ipcarg_t, ipcarg_t, ipcarg_t,
+    ipcarg_t *, ipcarg_t *, ipcarg_t *, ipcarg_t *, ipcarg_t *);
+
+extern int ipc_call_sync_slow(int, ipcarg_t, ipcarg_t, ipcarg_t, ipcarg_t,
+    ipcarg_t, ipcarg_t, ipcarg_t *, ipcarg_t *, ipcarg_t *, ipcarg_t *,
+    ipcarg_t *);
+
+extern ipc_callid_t ipc_wait_cycle(ipc_call_t *, uint32_t, int);
+extern ipc_callid_t ipc_wait_for_call_timeout(ipc_call_t *, uint32_t);
+extern void ipc_poke(void);
+
+static inline ipc_callid_t ipc_wait_for_call(ipc_call_t *data)
+{
+	return ipc_wait_for_call_timeout(data, SYNCH_NO_TIMEOUT);
+}
+
+extern ipc_callid_t ipc_trywait_for_call(ipc_call_t *);
+
+/*
+ * User-friendly wrappers for ipc_answer_fast() and ipc_answer_slow().
+ * They are in the form of ipc_answer_m(), where m is the number of return
+ * arguments. The macros decide between the fast and the slow version according
+ * to m.
+ */
+#define ipc_answer_0(callid, retval) \
+	ipc_answer_fast((callid), (retval), 0, 0, 0, 0)
+#define ipc_answer_1(callid, retval, arg1) \
+	ipc_answer_fast((callid), (retval), (arg1), 0, 0, 0)
+#define ipc_answer_2(callid, retval, arg1, arg2) \
+	ipc_answer_fast((callid), (retval), (arg1), (arg2), 0, 0)
+#define ipc_answer_3(callid, retval, arg1, arg2, arg3) \
+	ipc_answer_fast((callid), (retval), (arg1), (arg2), (arg3), 0)
+#define ipc_answer_4(callid, retval, arg1, arg2, arg3, arg4) \
+	ipc_answer_fast((callid), (retval), (arg1), (arg2), (arg3), (arg4))
+#define ipc_answer_5(callid, retval, arg1, arg2, arg3, arg4, arg5) \
+	ipc_answer_slow((callid), (retval), (arg1), (arg2), (arg3), (arg4), (arg5))
+
+extern ipcarg_t ipc_answer_fast(ipc_callid_t, ipcarg_t, ipcarg_t, ipcarg_t,
+    ipcarg_t, ipcarg_t);
+extern ipcarg_t ipc_answer_slow(ipc_callid_t, ipcarg_t, ipcarg_t, ipcarg_t,
+    ipcarg_t, ipcarg_t, ipcarg_t);
+
+/*
+ * User-friendly wrappers for ipc_call_async_fast() and ipc_call_async_slow().
+ * They are in the form of ipc_call_async_m(), where m is the number of payload
+ * arguments. The macros decide between the fast and the slow version according
+ * to m.
+ */
+#define ipc_call_async_0(phoneid, method, private, callback, can_preempt) \
+	ipc_call_async_fast((phoneid), (method), 0, 0, 0, 0, (private), \
+	    (callback), (can_preempt))
+#define ipc_call_async_1(phoneid, method, arg1, private, callback, \
+    can_preempt) \
+	ipc_call_async_fast((phoneid), (method), (arg1), 0, 0, 0, (private), \
+	    (callback), (can_preempt))
+#define ipc_call_async_2(phoneid, method, arg1, arg2, private, callback, \
+    can_preempt) \
+	ipc_call_async_fast((phoneid), (method), (arg1), (arg2), 0, 0, \
+	    (private), (callback), (can_preempt))
+#define ipc_call_async_3(phoneid, method, arg1, arg2, arg3, private, callback, \
+    can_preempt) \
+	ipc_call_async_fast((phoneid), (method), (arg1), (arg2), (arg3), 0, \
+	    (private), (callback), (can_preempt))
+#define ipc_call_async_4(phoneid, method, arg1, arg2, arg3, arg4, private, \
+    callback, can_preempt) \
+	ipc_call_async_fast((phoneid), (method), (arg1), (arg2), (arg3), \
+	    (arg4), (private), (callback), (can_preempt))
+#define ipc_call_async_5(phoneid, method, arg1, arg2, arg3, arg4, arg5, \
+    private, callback, can_preempt) \
+	ipc_call_async_slow((phoneid), (method), (arg1), (arg2), (arg3), \
+	    (arg4), (arg5), (private), (callback), (can_preempt))
+
+extern void ipc_call_async_fast(int, ipcarg_t, ipcarg_t, ipcarg_t, ipcarg_t,
+    ipcarg_t, void *, ipc_async_callback_t, int);
+extern void ipc_call_async_slow(int, ipcarg_t, ipcarg_t, ipcarg_t, ipcarg_t,
+    ipcarg_t, ipcarg_t, void *, ipc_async_callback_t, int);
+
+extern int ipc_connect_to_me(int, int, int, int, ipcarg_t *);
+extern int ipc_connect_me_to(int, int, int, int);
+extern int ipc_connect_me_to_blocking(int, int, int, int);
+extern int ipc_hangup(int);
+extern int ipc_register_irq(int, int, int, irq_code_t *);
+extern int ipc_unregister_irq(int, int);
+extern int ipc_forward_fast(ipc_callid_t, int, int, ipcarg_t, ipcarg_t, int);
+extern int ipc_forward_slow(ipc_callid_t, int, int, ipcarg_t, ipcarg_t,
+    ipcarg_t, ipcarg_t, ipcarg_t, int);
+
+/*
+ * User-friendly wrappers for ipc_share_in_start().
+ */
+#define ipc_share_in_start_0_0(phoneid, dst, size) \
+	ipc_share_in_start((phoneid), (dst), (size), 0, NULL)
+#define ipc_share_in_start_0_1(phoneid, dst, size, flags) \
+	ipc_share_in_start((phoneid), (dst), (size), 0, (flags))
+#define ipc_share_in_start_1_0(phoneid, dst, size, arg) \
+	ipc_share_in_start((phoneid), (dst), (size), (arg), NULL)
+#define ipc_share_in_start_1_1(phoneid, dst, size, arg, flags) \
+	ipc_share_in_start((phoneid), (dst), (size), (arg), (flags))
+
+extern int ipc_share_in_start(int, void *, size_t, ipcarg_t, int *);
+extern int ipc_share_in_finalize(ipc_callid_t, void *, int );
+extern int ipc_share_out_start(int, void *, int);
+extern int ipc_share_out_finalize(ipc_callid_t, void *);
+extern int ipc_data_read_start(int, void *, size_t);
+extern int ipc_data_read_finalize(ipc_callid_t, const void *, size_t);
+extern int ipc_data_write_start(int, const void *, size_t);
+extern int ipc_data_write_finalize(ipc_callid_t, void *, size_t);
+
+extern int ipc_connect_kbox(task_id_t);
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/include/ipc/kbd.h
===================================================================
--- uspace/lib/c/include/ipc/kbd.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/include/ipc/kbd.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,55 @@
+/*
+ * Copyright (c) 2009 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 kbdgen generic
+ * @brief HelenOS generic uspace keyboard handler.
+ * @ingroup kbd
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_IPC_KBD_H_
+#define LIBC_IPC_KBD_H_
+
+#include <ipc/ipc.h>
+
+typedef enum {
+	KBD_YIELD = IPC_FIRST_USER_METHOD,
+	KBD_RECLAIM
+} kbd_request_t;
+
+typedef enum {
+	KBD_EVENT = IPC_FIRST_USER_METHOD
+} kbd_notif_t;
+
+#endif
+
+/**
+ * @}
+ */
Index: uspace/lib/c/include/ipc/loader.h
===================================================================
--- uspace/lib/c/include/ipc/loader.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/include/ipc/loader.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,54 @@
+/*
+ * 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.
+ */
+
+/** @addtogroup libcipc
+ * @{
+ */
+/** @file
+ */ 
+
+#ifndef LIBC_IPC_LOADER_H_
+#define LIBC_IPC_LOADER_H_
+
+#include <ipc/ipc.h>
+
+typedef enum {
+	LOADER_HELLO = IPC_FIRST_USER_METHOD,
+	LOADER_GET_TASKID,
+	LOADER_SET_CWD,
+	LOADER_SET_PATHNAME,
+	LOADER_SET_ARGS,
+	LOADER_SET_FILES,
+	LOADER_LOAD,
+	LOADER_RUN
+} loader_request_t;
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/include/ipc/mouse.h
===================================================================
--- uspace/lib/c/include/ipc/mouse.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/include/ipc/mouse.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2009 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 mouse
+ * @brief
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_IPC_MOUSE_H_
+#define LIBC_IPC_MOUSE_H_
+
+#include <ipc/ipc.h>
+
+typedef enum {
+	MEVENT_BUTTON = IPC_FIRST_USER_METHOD,
+	MEVENT_MOVE
+} mouse_notif_t;
+
+#endif
+
+/**
+ * @}
+ */
Index: uspace/lib/c/include/ipc/ns.h
===================================================================
--- uspace/lib/c/include/ipc/ns.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/include/ipc/ns.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,50 @@
+/*
+ * 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 libcipc
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBIPC_NS_H_
+#define LIBIPC_NS_H_
+
+#include <ipc/ipc.h>
+
+typedef enum {
+	NS_PING = IPC_FIRST_USER_METHOD,
+	NS_TASK_WAIT,
+	NS_ID_INTRO,
+	NS_RETVAL
+} ns_request_t;
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/include/ipc/services.h
===================================================================
--- uspace/lib/c/include/ipc/services.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/include/ipc/services.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,71 @@
+/*
+ * 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 libcipc
+ * @{
+ */
+/**
+ * @file  services.h
+ * @brief List of all known services and their codes.
+ */
+
+#ifndef LIBIPC_SERVICES_H_
+#define LIBIPC_SERVICES_H_
+
+typedef enum {
+	SERVICE_LOAD = 1,
+	SERVICE_PCI,
+	SERVICE_VIDEO,
+	SERVICE_CONSOLE,
+	SERVICE_VFS,
+	SERVICE_DEVMAP,
+	SERVICE_FHC,
+	SERVICE_OBIO,
+	SERVICE_CLIPBOARD,
+	SERVICE_NETWORKING,
+	SERVICE_LO,
+	SERVICE_DP8390,
+	SERVICE_ETHERNET,
+	SERVICE_NILDUMMY,
+	SERVICE_IP,
+	SERVICE_ARP,
+	SERVICE_RARP,
+	SERVICE_ICMP,
+	SERVICE_UDP,
+	SERVICE_TCP,
+	SERVICE_SOCKET
+} services_t;
+
+/* Memory area to be received from NS */
+#define SERVICE_MEM_REALTIME    1
+#define SERVICE_MEM_KLOG        2
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/include/ipc/vfs.h
===================================================================
--- uspace/lib/c/include/ipc/vfs.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/include/ipc/vfs.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,166 @@
+/*
+ * Copyright (c) 2009 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 libcipc
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_IPC_VFS_H_
+#define LIBC_IPC_VFS_H_
+
+#include <sys/types.h>
+#include <ipc/ipc.h>
+
+#define FS_NAME_MAXLEN  20
+#define MAX_PATH_LEN    (64 * 1024)
+#define PLB_SIZE        (2 * MAX_PATH_LEN)
+
+/* Basic types. */
+typedef int16_t fs_handle_t;
+typedef uint32_t fs_index_t;
+
+/**
+ * A structure like this is passed to VFS by each individual FS upon its
+ * registration. It assosiates a human-readable identifier with each
+ * registered FS.
+ */
+typedef struct {
+	/** Unique identifier of the fs. */
+	char name[FS_NAME_MAXLEN + 1];
+} vfs_info_t;
+
+typedef enum {
+	VFS_IN_OPEN = IPC_FIRST_USER_METHOD,
+	VFS_IN_OPEN_NODE,
+	VFS_IN_READ,
+	VFS_IN_WRITE,
+	VFS_IN_SEEK,
+	VFS_IN_TRUNCATE,
+	VFS_IN_FSTAT,
+	VFS_IN_CLOSE,
+	VFS_IN_MOUNT,
+	VFS_IN_UNMOUNT,
+	VFS_IN_SYNC,
+	VFS_IN_REGISTER,
+	VFS_IN_MKDIR,
+	VFS_IN_UNLINK,
+	VFS_IN_RENAME,
+	VFS_IN_STAT,
+	VFS_IN_DUP
+} vfs_in_request_t;
+
+typedef enum {
+	VFS_OUT_OPEN_NODE = IPC_FIRST_USER_METHOD,
+	VFS_OUT_READ,
+	VFS_OUT_WRITE,
+	VFS_OUT_TRUNCATE,
+	VFS_OUT_CLOSE,
+	VFS_OUT_MOUNT,
+	VFS_OUT_MOUNTED,
+	VFS_OUT_UNMOUNT,
+	VFS_OUT_UNMOUNTED,
+	VFS_OUT_SYNC,
+	VFS_OUT_STAT,
+	VFS_OUT_LOOKUP,
+	VFS_OUT_DESTROY,
+	VFS_OUT_LAST
+} vfs_out_request_t;
+
+/*
+ * Lookup flags.
+ */
+
+/**
+ * No lookup flags used.
+ */
+#define L_NONE			0
+
+/**
+ * Lookup will succeed only if the object is a regular file.  If L_CREATE is
+ * specified, an empty file will be created. This flag is mutually exclusive
+ * with L_DIRECTORY.
+ */
+#define L_FILE			1
+
+/**
+ * Lookup will succeed only if the object is a directory. If L_CREATE is
+ * specified, an empty directory will be created. This flag is mutually
+ * exclusive with L_FILE.
+ */
+#define L_DIRECTORY		2
+
+/**
+ * Lookup will succeed only if the object is a root directory. The flag is
+ * mutually exclusive with L_FILE and L_MP.
+ */
+#define L_ROOT			4
+
+/**
+ * Lookup will succeed only if the object is a mount point. The flag is mutually
+ * exclusive with L_FILE and L_ROOT.
+ */
+#define L_MP			8
+
+
+/**
+ * When used with L_CREATE, L_EXCLUSIVE will cause the lookup to fail if the
+ * object already exists. L_EXCLUSIVE is implied when L_DIRECTORY is used.
+ */
+#define L_EXCLUSIVE 		16
+
+/**
+ * L_CREATE is used for creating both regular files and directories.
+ */
+#define L_CREATE		32
+
+/**
+ * L_LINK is used for linking to an already existing nodes.
+ */
+#define L_LINK			64
+
+/**
+ * L_UNLINK is used to remove leaves from the file system namespace. This flag
+ * cannot be passed directly by the client, but will be set by VFS during
+ * VFS_UNLINK.
+ */
+#define L_UNLINK		128
+
+/**
+ * L_OPEN is used to indicate that the lookup operation is a part of VFS_IN_OPEN
+ * call from the client. This means that the server might allocate some
+ * resources for the opened file. This flag cannot be passed directly by the
+ * client.
+ */
+#define L_OPEN			256
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/include/libc.h
===================================================================
--- uspace/lib/c/include/libc.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/include/libc.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,63 @@
+/*
+ * 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 libc
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_LIBC_H_
+#define LIBC_LIBC_H_
+
+#include <sys/types.h>
+#include <kernel/syscall/syscall.h>
+#include <libarch/syscall.h>
+
+#define __SYSCALL0(id) \
+	__syscall0(0, 0, 0, 0, 0, 0, id)
+#define __SYSCALL1(id, p1) \
+	__syscall1(p1, 0, 0, 0, 0, 0, id)
+#define __SYSCALL2(id, p1, p2) \
+	__syscall2(p1, p2, 0, 0, 0, 0, id)
+#define __SYSCALL3(id, p1, p2, p3) \
+	__syscall3(p1, p2, p3, 0, 0, 0, id)
+#define __SYSCALL4(id, p1, p2, p3, p4) \
+	__syscall4(p1, p2, p3, p4, 0, 0, id)
+#define __SYSCALL5(id, p1, p2, p3, p4, p5) \
+	__syscall5(p1, p2, p3, p4, p5, 0, id)
+#define __SYSCALL6(id, p1, p2, p3, p4, p5, p6) \
+    __syscall6(p1, p2, p3, p4, p5, p6, id)
+
+extern void __main(void *pcb_ptr);
+extern void __exit(void);
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/include/limits.h
===================================================================
--- uspace/lib/c/include/limits.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/include/limits.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,84 @@
+/*
+ * 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 libc
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_LIMITS_H_
+#define LIBC_LIMITS_H_
+
+#include <stdint.h>
+#include <libarch/limits.h>
+
+/* char */
+#define SCHAR_MIN MIN_INT8
+#define SCHAR_MAX MAX_INT8
+#define UCHAR_MIN MIN_UINT8
+#define UCHAR_MAX MAX_UINT8
+
+#ifdef __CHAR_UNSIGNED__
+	#define CHAR_MIN UCHAR_MIN
+	#define CHAR_MAX UCHAR_MAX
+#else
+	#define CHAR_MIN SCHAR_MIN
+	#define CHAR_MAX SCHAR_MAX
+#endif
+
+/* short int */
+#define SHRT_MIN MIN_INT16
+#define SHRT_MAX MAX_INT16
+#define USHRT_MIN MIN_UINT16
+#define USHRT_MAX MAX_UINT16
+
+/* int */
+#define INT_MIN MIN_INT32
+#define INT_MAX MAX_INT32
+#define UINT_MIN MIN_UINT32
+#define UINT_MAX MAX_UINT32
+
+/* long long int */
+#define LLONG_MIN MIN_INT64
+#define LLONG_MAX MAX_INT64
+#define ULLONG_MIN MIN_UINT64
+#define ULLONG_MAX MAX_UINT64
+
+/* off64_t */
+#define OFF64_MIN MIN_INT64
+#define OFF64_MAX MAX_INT64
+
+/* aoff64_t */
+#define AOFF64_MIN MIN_UINT64
+#define AOFF64_MAX MAX_UINT64
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/include/loader/loader.h
===================================================================
--- uspace/lib/c/include/loader/loader.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/include/loader/loader.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,63 @@
+/*
+ * 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.
+ */
+
+/** @addtogroup fs
+ * @{
+ */
+/** @file
+ * @brief Program loader interface.
+ */
+
+#ifndef LIBC_LOADER_H_
+#define LIBC_LOADER_H_
+
+#include <task.h>
+#include <vfs/vfs.h>
+
+/** Abstraction of a loader connection */
+typedef struct {
+	/** ID of the phone connected to the loader. */
+	int phone_id;
+} loader_t;
+
+extern int loader_spawn(const char *);
+extern loader_t *loader_connect(void);
+extern int loader_get_task_id(loader_t *, task_id_t *);
+extern int loader_set_cwd(loader_t *);
+extern int loader_set_pathname(loader_t *, const char *);
+extern int loader_set_args(loader_t *, const char *const[]);
+extern int loader_set_files(loader_t *, fdi_node_t *const[]);
+extern int loader_load_program(loader_t *);
+extern int loader_run(loader_t *);
+extern void loader_abort(loader_t *);
+
+#endif
+
+/**
+ * @}
+ */
Index: uspace/lib/c/include/loader/pcb.h
===================================================================
--- uspace/lib/c/include/loader/pcb.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/include/loader/pcb.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,86 @@
+/*
+ * 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.
+ */
+
+/** @addtogroup fs
+ * @{
+ */
+/** @file
+ * @brief Program Control Block interface.
+ */
+
+#ifndef LIBC_PCB_H_
+#define LIBC_PCB_H_
+
+#include <sys/types.h>
+#include <vfs/vfs.h>
+
+typedef void (*entry_point_t)(void);
+
+/** Program Control Block.
+ *
+ * Holds pointers to data passed from the program loader to the program
+ * and/or to the dynamic linker. This includes the program entry point,
+ * arguments, environment variables etc.
+ *
+ */
+typedef struct {
+	/** Program entry point. */
+	entry_point_t entry;
+
+	/** Current working directory. */
+	char *cwd;
+	
+	/** Number of command-line arguments. */
+	int argc;
+	/** Command-line arguments. */
+	char **argv;
+	
+	/** Number of preset files. */
+	int filc;
+	/** Preset files. */
+	fdi_node_t **filv;
+	
+	/*
+	 * ELF-specific data.
+	 */
+	
+	/** Pointer to ELF dynamic section of the program. */
+	void *dynamic;
+} pcb_t;
+
+/**
+ * A pointer to the program control block. Having received the PCB pointer,
+ * the C library startup code stores it here for later use.
+ */
+extern pcb_t *__pcb;
+
+#endif
+
+/**
+ * @}
+ */
Index: uspace/lib/c/include/macros.h
===================================================================
--- uspace/lib/c/include/macros.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/include/macros.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 2009 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 libc
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_MACROS_H_
+#define LIBC_MACROS_H_
+
+#define min(a, b)  ((a) < (b) ? (a) : (b))
+#define max(a, b)  ((a) > (b) ? (a) : (b))
+
+#define SIZE2KB(size)  ((size) >> 10)
+#define SIZE2MB(size)  ((size) >> 20)
+
+#define KB2SIZE(kb)  ((kb) << 10)
+#define MB2SIZE(mb)  ((mb) << 20)
+
+#define STRING(arg)      STRING_ARG(arg)
+#define STRING_ARG(arg)  #arg
+
+#define LOWER32(arg)  (((uint64_t) (arg)) & 0xffffffff)
+#define UPPER32(arg)  (((((uint64_t) arg)) >> 32) & 0xffffffff)
+
+#define MERGE_LOUP32(lo, up) \
+	((((uint64_t) (lo)) & 0xffffffff) \
+	    | ((((uint64_t) (up)) & 0xffffffff) << 32))
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/include/malloc.h
===================================================================
--- uspace/lib/c/include/malloc.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/include/malloc.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2009 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 libc
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_MALLOC_H_
+#define LIBC_MALLOC_H_
+
+#include <sys/types.h>
+
+extern void __heap_init(void);
+extern uintptr_t get_max_heap_addr(void);
+
+extern void *malloc(const size_t size);
+extern void *calloc(const size_t nmemb, const size_t size);
+extern void *memalign(const size_t align, const size_t size);
+extern void *realloc(const void *addr, const size_t size);
+extern void free(const void *addr);
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/include/mem.h
===================================================================
--- uspace/lib/c/include/mem.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/include/mem.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,51 @@
+/*
+ * 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 libc
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_MEM_H_
+#define LIBC_MEM_H_
+
+#include <sys/types.h>
+
+#define bzero(ptr, len)  memset((ptr), 0, (len))
+
+extern void *memset(void *, int, size_t);
+extern void *memcpy(void *, const void *, size_t);
+extern void *memmove(void *, const void *, size_t);
+
+extern int bcmp(const char *, const char *, size_t);
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/include/rwlock.h
===================================================================
--- uspace/lib/c/include/rwlock.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/include/rwlock.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,59 @@
+/*
+ * Copyright (c) 2008 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 libc
+ * @{
+ */
+/**
+ * @file
+ * @brief	This file contains rwlock API and provides its fake
+ *		implementation based on futexes.
+ */
+
+#ifndef LIBC_RWLOCK_H_
+#define LIBC_RWLOCK_H_
+
+#include <atomic.h>
+#include <sys/types.h>
+#include <futex.h>
+
+typedef atomic_t rwlock_t;
+
+#define RWLOCK_INITIALIZE(rwlock)	\
+    rwlock_t rwlock = FUTEX_INITIALIZER
+
+#define rwlock_initialize(rwlock)	futex_initialize((rwlock), 1)
+#define rwlock_read_lock(rwlock)	futex_down((rwlock))
+#define rwlock_write_lock(rwlock)	futex_down((rwlock))
+#define rwlock_read_unlock(rwlock)	futex_up((rwlock))
+#define rwlock_write_unlock(rwlock)	futex_up((rwlock))
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/include/setjmp.h
===================================================================
--- uspace/lib/c/include/setjmp.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/include/setjmp.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2008 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 libc
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_SETJMP_H_
+#define LIBC_SETJMP_H_
+
+#include <libarch/fibril.h>
+
+typedef context_t jmp_buf;
+
+extern int setjmp(jmp_buf env);
+extern void longjmp(jmp_buf env,int val) __attribute__((__noreturn__));
+
+#endif
+
+/** @}
+ */
+
Index: uspace/lib/c/include/smc.h
===================================================================
--- uspace/lib/c/include/smc.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/include/smc.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,45 @@
+/*
+ * 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.
+ */
+
+/** @addtogroup libc
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_SMC_H_
+#define LIBC_SMC_H_
+
+#include <sys/types.h>
+
+extern int smc_coherence(void *address, size_t size);
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/include/stacktrace.h
===================================================================
--- uspace/lib/c/include/stacktrace.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/include/stacktrace.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2009 Jakub Jermar
+ * 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 libc
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_STACKTRACE_H_
+#define LIBC_STACKTRACE_H_
+
+#include <sys/types.h>
+#include <bool.h>
+
+typedef struct {
+	void *op_arg;
+	int (*read_uintptr)(void *, uintptr_t, uintptr_t *);
+} stacktrace_t;
+
+extern void stacktrace_print(void);
+extern void stacktrace_print_fp_pc(uintptr_t, uintptr_t);
+
+/*
+ * The following interface is to be implemented by each architecture.
+ */
+extern bool stacktrace_fp_valid(stacktrace_t *, uintptr_t);
+extern int stacktrace_fp_prev(stacktrace_t *, uintptr_t, uintptr_t *);
+extern int stacktrace_ra_get(stacktrace_t *, uintptr_t, uintptr_t *);
+
+extern void stacktrace_prepare(void);
+extern uintptr_t stacktrace_fp_get(void);
+extern uintptr_t stacktrace_pc_get(void);
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/include/stdarg.h
===================================================================
--- uspace/lib/c/include/stdarg.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/include/stdarg.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,49 @@
+/*
+ * 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 libc
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_STDARG_H_
+#define LIBC_STDARG_H_
+
+#include <sys/types.h>
+
+typedef __builtin_va_list va_list;
+
+#define va_start(ap, last)  __builtin_va_start(ap, last)
+#define va_arg(ap, type)    __builtin_va_arg(ap, type)
+#define va_end(ap)          __builtin_va_end(ap)
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/include/stddef.h
===================================================================
--- uspace/lib/c/include/stddef.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/include/stddef.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,43 @@
+/*
+ * 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 libc
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_STDDEF_H_
+#define LIBC_STDDEF_H_
+
+#include <sys/types.h>
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/include/stdint.h
===================================================================
--- uspace/lib/c/include/stdint.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/include/stdint.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,64 @@
+/*
+ * 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 libc
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_STDINT_H_
+#define LIBC_STDINT_H_
+
+/* Definitions of types with fixed size */
+#include <libarch/types.h>
+
+#define MAX_INT8 (0x7F)
+#define MIN_INT8 (0x80)
+#define MAX_UINT8 (0xFFu)
+#define MIN_UINT8 (0u)
+
+#define MAX_INT16 (0x7FFF)
+#define MIN_INT16 (0x8000)
+#define MAX_UINT16 (0xFFFFu)
+#define MIN_UINT16 (0u)
+
+#define MAX_INT32 (0x7FFFFFFF)
+#define MIN_INT32 (0x80000000)
+#define MAX_UINT32 (0xFFFFFFFFu)
+#define MIN_UINT32 (0u)
+
+#define MAX_INT64 (0x7FFFFFFFFFFFFFFFll)
+#define MIN_INT64 (0x8000000000000000ll)
+#define MAX_UINT64 (0xFFFFFFFFFFFFFFFFull)
+#define MIN_UINT64 (0ull)
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/include/stdio.h
===================================================================
--- uspace/lib/c/include/stdio.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/include/stdio.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,186 @@
+/*
+ * 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 libc
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_STDIO_H_
+#define LIBC_STDIO_H_
+
+#include <sys/types.h>
+#include <stdarg.h>
+#include <str.h>
+#include <adt/list.h>
+
+#define EOF  (-1)
+
+/** Default size for stream I/O buffers */
+#define BUFSIZ  4096
+
+#define DEBUG(fmt, ...)se\
+	{ \
+		char _buf[256]; \
+		int _n = snprintf(_buf, sizeof(_buf), fmt, ##__VA_ARGS__); \
+		if (_n > 0) \
+			(void) __SYSCALL3(SYS_KLOG, 1, (sysarg_t) _buf, str_size(_buf)); \
+	}
+
+#ifndef SEEK_SET
+	#define SEEK_SET  0
+#endif
+
+#ifndef SEEK_CUR
+	#define SEEK_CUR  1
+#endif
+
+#ifndef SEEK_END
+	#define SEEK_END  2
+#endif
+
+enum _buffer_type {
+	/** No buffering */
+	_IONBF,
+	/** Line buffering */
+	_IOLBF,
+	/** Full buffering */
+	_IOFBF
+};
+
+enum _buffer_state {
+	/** Buffer is empty */
+	_bs_empty,
+
+	/** Buffer contains data to be written */
+	_bs_write,
+
+	/** Buffer contains prefetched data for reading */
+	_bs_read
+};
+
+typedef struct {
+	/** Linked list pointer. */
+	link_t link;
+	
+	/** Underlying file descriptor. */
+	int fd;
+	
+	/** Error indicator. */
+	int error;
+	
+	/** End-of-file indicator. */
+	int eof;
+	
+	/** Klog indicator */
+	int klog;
+	
+	/** Phone to the file provider */
+	int phone;
+
+	/**
+	 * Non-zero if the stream needs sync on fflush(). XXX change
+	 * console semantics so that sync is not needed.
+	 */
+	int need_sync;
+
+	/** Buffering type */
+	enum _buffer_type btype;
+
+	/** Buffer */
+	uint8_t *buf;
+
+	/** Buffer size */
+	size_t buf_size;
+
+	/** Buffer state */
+	enum _buffer_state buf_state;
+
+	/** Buffer I/O pointer */
+	uint8_t *buf_head;
+
+	/** Points to end of occupied space when in read mode. */
+	uint8_t *buf_tail;
+} FILE;
+
+extern FILE *stdin;
+extern FILE *stdout;
+extern FILE *stderr;
+
+/* Character and string input functions */
+extern int fgetc(FILE *);
+extern char *fgets(char *, int, FILE *);
+
+extern int getchar(void);
+extern char *gets(char *, size_t);
+
+/* Character and string output functions */
+extern int fputc(wchar_t, FILE *);
+extern int fputs(const char *, FILE *);
+
+extern int putchar(wchar_t);
+extern int puts(const char *);
+
+/* Formatted string output functions */
+extern int fprintf(FILE *, const char*, ...);
+extern int vfprintf(FILE *, const char *, va_list);
+
+extern int printf(const char *, ...);
+extern int vprintf(const char *, va_list);
+
+extern int snprintf(char *, size_t , const char *, ...);
+extern int asprintf(char **, const char *, ...);
+extern int vsnprintf(char *, size_t, const char *, va_list);
+
+/* File stream functions */
+extern FILE *fopen(const char *, const char *);
+extern FILE *fdopen(int, const char *);
+extern int fclose(FILE *);
+
+extern size_t fread(void *, size_t, size_t, FILE *);
+extern size_t fwrite(const void *, size_t, size_t, FILE *);
+
+extern int fseek(FILE *, off64_t, int);
+extern void rewind(FILE *);
+extern off64_t ftell(FILE *);
+extern int feof(FILE *);
+
+extern int fflush(FILE *);
+extern int ferror(FILE *);
+extern void clearerr(FILE *);
+
+extern void setvbuf(FILE *, void *, int, size_t);
+
+/* Misc file functions */
+extern int rename(const char *, const char *);
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/include/stdlib.h
===================================================================
--- uspace/lib/c/include/stdlib.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/include/stdlib.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,68 @@
+/*
+ * 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 libc
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_STDLIB_H_
+#define LIBC_STDLIB_H_
+
+#include <unistd.h>
+#include <malloc.h>
+#include <stacktrace.h>
+
+#define abort() \
+	do { \
+		stacktrace_print(); \
+		_exit(1); \
+	} while (0)
+
+#define exit(status)  _exit((status))
+
+#define RAND_MAX  714025
+
+extern long int random(void);
+extern void srandom(unsigned int seed);
+
+static inline int rand(void)
+{
+	return random();
+}
+
+static inline void srand(unsigned int seed)
+{
+	srandom(seed);
+}
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/include/str.h
===================================================================
--- uspace/lib/c/include/str.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/include/str.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,103 @@
+/*
+ * 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 libc
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_STR_H_
+#define LIBC_STR_H_
+
+#include <mem.h>
+#include <sys/types.h>
+#include <bool.h>
+
+#define U_SPECIAL  '?'
+
+/** No size limit constant */
+#define STR_NO_LIMIT  ((size_t) -1)
+
+/** Maximum size of a string containing @c length characters */
+#define STR_BOUNDS(length)  ((length) << 2)
+
+extern wchar_t str_decode(const char *str, size_t *offset, size_t sz);
+extern int chr_encode(const wchar_t ch, char *str, size_t *offset, size_t sz);
+
+extern size_t str_size(const char *str);
+extern size_t wstr_size(const wchar_t *str);
+
+extern size_t str_lsize(const char *str, size_t max_len);
+extern size_t wstr_lsize(const wchar_t *str, size_t max_len);
+
+extern size_t str_length(const char *str);
+extern size_t wstr_length(const wchar_t *wstr);
+
+extern size_t str_nlength(const char *str, size_t size);
+extern size_t wstr_nlength(const wchar_t *str, size_t size);
+
+extern bool ascii_check(wchar_t ch);
+extern bool chr_check(wchar_t ch);
+
+extern int str_cmp(const char *s1, const char *s2);
+extern int str_lcmp(const char *s1, const char *s2, size_t max_len);
+
+extern void str_cpy(char *dest, size_t size, const char *src);
+extern void str_ncpy(char *dest, size_t size, const char *src, size_t n);
+extern void str_append(char *dest, size_t size, const char *src);
+
+extern void wstr_to_str(char *dest, size_t size, const wchar_t *src);
+extern char *wstr_to_astr(const wchar_t *src);
+extern void str_to_wstr(wchar_t *dest, size_t dlen, const char *src);
+
+extern char *str_chr(const char *str, wchar_t ch);
+extern char *str_rchr(const char *str, wchar_t ch);
+
+extern bool wstr_linsert(wchar_t *str, wchar_t ch, size_t pos, size_t max_pos);
+extern bool wstr_remove(wchar_t *str, size_t pos);
+
+extern char *str_dup(const char *);
+extern char *str_ndup(const char *, size_t max_size);
+
+/*
+ * TODO: Get rid of this.
+ */
+
+extern int stricmp(const char *, const char *);
+
+extern long int strtol(const char *, char **, int);
+extern unsigned long strtoul(const char *, char **, int);
+
+extern char * strtok_r(char *, const char *, char **);
+extern char * strtok(char *, const char *);
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/include/sys/mman.h
===================================================================
--- uspace/lib/c/include/sys/mman.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/include/sys/mman.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,59 @@
+/*
+ * 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 libc
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_MMAN_H_
+#define LIBC_MMAN_H_
+
+#include <as.h>
+#include <sys/types.h>
+
+#define MAP_FAILED  ((void *) -1)
+
+#define MAP_SHARED     (1 << 0)
+#define MAP_PRIVATE    (1 << 1)
+#define MAP_FIXED      (1 << 2)
+#define MAP_ANONYMOUS  (1 << 3)
+
+#define PROTO_READ   AS_AREA_READ
+#define PROTO_WRITE  AS_AREA_WRITE
+#define PROTO_EXEC   AS_AREA_EXEC
+
+extern void *mmap(void *start, size_t length, int prot, int flags, int fd,
+    aoff64_t offset);
+extern int munmap(void *start, size_t length);
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/include/sys/stat.h
===================================================================
--- uspace/lib/c/include/sys/stat.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/include/sys/stat.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2008 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 libc
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_SYS_STAT_H_
+#define LIBC_SYS_STAT_H_
+
+#include <sys/types.h>
+#include <bool.h>
+#include <ipc/vfs.h>
+#include <ipc/devmap.h>
+
+struct stat {
+	fs_handle_t fs_handle;
+	dev_handle_t dev_handle;
+	fs_index_t index;
+	unsigned int lnkcnt;
+	bool is_file;
+	bool is_directory;
+	aoff64_t size;
+	dev_handle_t device;
+};
+
+extern int fstat(int, struct stat *);
+extern int stat(const char *, struct stat *);
+extern int mkdir(const char *, mode_t);
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/include/sys/time.h
===================================================================
--- uspace/lib/c/include/sys/time.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/include/sys/time.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,64 @@
+/*
+ * 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 libc
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_SYS_TIME_H_
+#define LIBC_SYS_TIME_H_
+
+#include <sys/types.h>
+
+#define DST_NONE 0
+
+typedef long time_t;
+typedef long suseconds_t;
+
+struct timeval {
+	time_t tv_sec;        /* seconds */
+	suseconds_t tv_usec;  /* microseconds */
+};
+
+struct timezone {
+	int tz_minuteswest;  /* minutes W of Greenwich */
+	int tz_dsttime;      /* type of dst correction */
+};
+
+extern void tv_add(struct timeval *tv, suseconds_t usecs);
+extern suseconds_t tv_sub(struct timeval *tv1, struct timeval *tv2);
+extern int tv_gt(struct timeval *tv1, struct timeval *tv2);
+extern int tv_gteq(struct timeval *tv1, struct timeval *tv2);
+extern int gettimeofday(struct timeval *tv, struct timezone *tz);
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/include/sys/typefmt.h
===================================================================
--- uspace/lib/c/include/sys/typefmt.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/include/sys/typefmt.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,74 @@
+/*
+ * 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 libc
+ * @{
+ */
+/** @file Formatting macros for types from sys/types.h and some other
+ * system types.
+ */
+
+#ifndef LIBC_SYS_TYPEFMT_H_
+#define LIBC_SYS_TYPEFMT_H_
+
+#include <inttypes.h>
+
+/* off64_t */
+#define PRIdOFF64 PRId64
+#define PRIuOFF64 PRIu64
+#define PRIxOFF64 PRIx64
+#define PRIXOFF64 PRIX64
+
+/* (s)size_t */
+#define PRIdSIZE PRIdPTR
+#define PRIuSIZE PRIuPTR
+#define PRIxSIZE PRIxPTR
+#define PRIXSIZE PRIXPTR
+
+/* sysarg_t */
+#define PRIdSYSARG PRIdPTR
+#define PRIuSYSARG PRIuPTR
+#define PRIxSYSARG PRIxPTR
+#define PRIXSYSARG PRIxPTR
+
+/* ipcarg_t */
+#define PRIdIPCARG PRIdPTR
+#define PRIuIPCARG PRIuPTR
+#define PRIxIPCARG PRIxPTR
+#define PRIXIPCARG PRIXPTR
+
+/* taskid_t */
+#define PRIdTASKID PRId64
+#define PRIuTASKID PRIu64
+#define PRIxTASKID PRIx64
+#define PRIXTASKID PRIx64
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/include/sys/types.h
===================================================================
--- uspace/lib/c/include/sys/types.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/include/sys/types.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,58 @@
+/*
+ * 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 libc
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_SYS_TYPES_H_
+#define LIBC_SYS_TYPES_H_
+
+#include <libarch/types.h>
+
+typedef unsigned int mode_t;
+
+/** Relative offset */
+typedef int64_t off64_t;
+
+/** Absolute offset */
+typedef uint64_t aoff64_t;
+
+/** Unicode code point */
+typedef int32_t wchar_t;
+
+typedef volatile uint8_t ioport8_t;
+typedef volatile uint16_t ioport16_t;
+typedef volatile uint32_t ioport32_t;
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/include/syscall.h
===================================================================
--- uspace/lib/c/include/syscall.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/include/syscall.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,64 @@
+/*
+ * 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 libc
+ * @{
+ */
+/**
+ * @file
+ * @brief	Syscall function declaration for architectures that don't
+ *		inline syscalls or architectures that handle syscalls
+ *		according to the number of arguments.
+ */
+
+#ifndef LIBC_SYSCALL_H_
+#define LIBC_SYSCALL_H_
+
+#ifndef	LIBARCH_SYSCALL_GENERIC
+#error "You can't include this file directly."
+#endif
+
+#include <sys/types.h>
+#include <kernel/syscall/syscall.h>
+
+#define __syscall0	__syscall
+#define __syscall1	__syscall
+#define __syscall2	__syscall
+#define __syscall3	__syscall
+#define __syscall4	__syscall
+#define __syscall5	__syscall
+#define __syscall6	__syscall
+
+extern 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);
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/include/sysinfo.h
===================================================================
--- uspace/lib/c/include/sysinfo.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/include/sysinfo.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,47 @@
+/*
+ * 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 libc
+ * @{
+ */
+/** @file
+ */ 
+
+#ifndef LIBC_SYSINFO_H_
+#define LIBC_SYSINFO_H_
+
+#include <libc.h>
+#include <sysinfo.h>
+#include <str.h>
+
+sysarg_t sysinfo_value(const char *name);
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/include/task.h
===================================================================
--- uspace/lib/c/include/task.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/include/task.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,57 @@
+/*
+ * 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 libc
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_TASK_H_
+#define LIBC_TASK_H_
+
+#include <sys/types.h>
+
+typedef uint64_t task_id_t;
+
+typedef enum {
+	TASK_EXIT_NORMAL,
+	TASK_EXIT_UNEXPECTED
+} task_exit_t;
+
+extern task_id_t task_get_id(void);
+extern int task_set_name(const char *name);
+extern task_id_t task_spawn(const char *path, const char *const argv[]);
+extern int task_wait(task_id_t id, task_exit_t *texit, int *retval);
+extern int task_retval(int val);
+
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/include/thread.h
===================================================================
--- uspace/lib/c/include/thread.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/include/thread.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,56 @@
+/*
+ * 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 libc
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_THREAD_H_
+#define LIBC_THREAD_H_
+
+#include <kernel/proc/uarg.h>
+#include <libarch/thread.h>
+#include <sys/types.h>
+
+typedef uint64_t thread_id_t;
+
+extern void __thread_entry(void);
+extern void __thread_main(uspace_arg_t *);
+
+extern int thread_create(void (*)(void *), void *, const char *, thread_id_t *);
+extern void thread_exit(int) __attribute__ ((noreturn));
+extern void thread_detach(thread_id_t);
+extern int thread_join(thread_id_t);
+extern thread_id_t thread_get_id(void);
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/include/time.h
===================================================================
--- uspace/lib/c/include/time.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/include/time.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2007 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 libc
+ * @{
+ */
+/** @file
+ */ 
+
+#ifndef LIBC_TIME_H_
+#define LIBC_TIME_H_
+
+#include <sys/time.h>
+
+extern time_t time(time_t *);
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/include/tls.h
===================================================================
--- uspace/lib/c/include/tls.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/include/tls.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,67 @@
+/*
+ * Copyright (c) 2007 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 libc
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_TLS_H_
+#define LIBC_TLS_H_
+
+#include <libarch/tls.h>
+#include <sys/types.h>
+
+/*
+ * Symbols defined in the respective linker script.
+ */
+extern char _tls_alignment;
+extern char _tdata_start;
+extern char _tdata_end;
+extern char _tbss_start;
+extern char _tbss_end;
+
+extern tcb_t *__make_tls(void);
+extern tcb_t *__alloc_tls(void **, size_t);
+extern void __free_tls(tcb_t *);
+extern void __free_tls_arch(tcb_t *, size_t);
+
+#ifdef CONFIG_TLS_VARIANT_1
+extern tcb_t *tls_alloc_variant_1(void **, size_t);
+extern void tls_free_variant_1(tcb_t *, size_t);
+#endif
+#ifdef CONFIG_TLS_VARIANT_2
+extern tcb_t *tls_alloc_variant_2(void **, size_t);
+extern void tls_free_variant_2(tcb_t *, size_t);
+#endif
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/include/udebug.h
===================================================================
--- uspace/lib/c/include/udebug.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/include/udebug.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,63 @@
+/*
+ * 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.
+ */
+
+/** @addtogroup libc
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_UDEBUG_H_
+#define LIBC_UDEBUG_H_
+
+#include <kernel/udebug/udebug.h>
+#include <sys/types.h>
+#include <libarch/types.h>
+
+typedef sysarg_t thash_t;
+
+int udebug_begin(int phoneid);
+int udebug_end(int phoneid);
+int udebug_set_evmask(int phoneid, udebug_evmask_t mask);
+int udebug_thread_read(int phoneid, void *buffer, size_t n,
+	size_t *copied, size_t *needed);
+int udebug_name_read(int phoneid, void *buffer, size_t n,
+	size_t *copied, size_t *needed);
+int udebug_areas_read(int phoneid, void *buffer, size_t n,
+	size_t *copied, size_t *needed);
+int udebug_mem_read(int phoneid, void *buffer, uintptr_t addr, size_t n);
+int udebug_args_read(int phoneid, thash_t tid, sysarg_t *buffer);
+int udebug_regs_read(int phoneid, thash_t tid, void *buffer);
+int udebug_go(int phoneid, thash_t tid, udebug_event_t *ev_type,
+	sysarg_t *val0, sysarg_t *val1);
+int udebug_stop(int phoneid, thash_t tid);
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/include/unistd.h
===================================================================
--- uspace/lib/c/include/unistd.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/include/unistd.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,84 @@
+/*
+ * 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 libc
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_UNISTD_H_
+#define LIBC_UNISTD_H_
+
+#include <sys/types.h>
+#include <libarch/config.h>
+
+#ifndef NULL
+	#define NULL  0
+#endif
+
+#define getpagesize()  (PAGE_SIZE)
+
+#ifndef SEEK_SET
+	#define SEEK_SET  0
+#endif
+
+#ifndef SEEK_CUR
+	#define SEEK_CUR  1
+#endif
+
+#ifndef SEEK_END
+	#define SEEK_END  2
+#endif
+
+typedef uint32_t useconds_t;
+
+extern int dup2(int oldfd, int newfd);
+
+extern ssize_t write(int, const void *, size_t);
+extern ssize_t read(int, void *, size_t);
+
+extern off64_t lseek(int, off64_t, int);
+extern int ftruncate(int, aoff64_t);
+
+extern int close(int);
+extern int fsync(int);
+extern int unlink(const char *);
+
+extern char *getcwd(char *buf, size_t);
+extern int rmdir(const char *);
+extern int chdir(const char *);
+
+extern void _exit(int) __attribute__((noreturn));
+extern int usleep(useconds_t);
+extern unsigned int sleep(unsigned int);
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/include/vfs/canonify.h
===================================================================
--- uspace/lib/c/include/vfs/canonify.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/include/vfs/canonify.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2008 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 libc
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_VFS_CANONIFY_H_
+#define LIBC_VFS_CANONIFY_H_
+
+#include <sys/types.h>
+
+extern char *canonify(char *, size_t *);
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/c/include/vfs/vfs.h
===================================================================
--- uspace/lib/c/include/vfs/vfs.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/c/include/vfs/vfs.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,73 @@
+/*
+ * Copyright (c) 2007 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 libc
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_VFS_H_
+#define LIBC_VFS_H_
+
+#include <sys/types.h>
+#include <ipc/vfs.h>
+#include <ipc/devmap.h>
+#include <stdio.h>
+
+/**
+ * This type is a libc version of the VFS triplet.
+ * It uniquely identifies a file system node within a file system instance.
+ */
+typedef struct {
+	fs_handle_t fs_handle;
+	dev_handle_t dev_handle;
+	fs_index_t index;
+} fdi_node_t;
+
+extern char *absolutize(const char *, size_t *);
+
+extern int mount(const char *, const char *, const char *, const char *,
+    unsigned int);
+extern int unmount(const char *);
+
+extern void __stdio_init(int filc, fdi_node_t *filv[]);
+extern void __stdio_done(void);
+
+extern int open_node(fdi_node_t *, int);
+extern int fd_phone(int);
+extern int fd_node(int, fdi_node_t *);
+
+extern FILE *fopen_node(fdi_node_t *, const char *);
+extern int fphone(FILE *);
+extern int fnode(FILE *, fdi_node_t *);
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/fs/Makefile
===================================================================
--- uspace/lib/fs/Makefile	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/fs/Makefile	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,36 @@
+#
+# Copyright (c) 2005 Martin Decky
+# Copyright (c) 2007 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.
+#
+
+USPACE_PREFIX = ../..
+LIBRARY = libfs
+
+SOURCES = \
+	libfs.c
+
+include $(USPACE_PREFIX)/Makefile.common
Index: uspace/lib/fs/libfs.c
===================================================================
--- uspace/lib/fs/libfs.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/fs/libfs.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,640 @@
+/*
+ * 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.
+ */
+
+/** @addtogroup libfs
+ * @{
+ */
+/**
+ * @file
+ * Glue code which is common to all FS implementations.
+ */
+
+#include "libfs.h"
+#include "../../srv/vfs/vfs.h"
+#include <macros.h>
+#include <errno.h>
+#include <async.h>
+#include <ipc/ipc.h>
+#include <as.h>
+#include <assert.h>
+#include <dirent.h>
+#include <mem.h>
+#include <sys/stat.h>
+
+#define on_error(rc, action) \
+	do { \
+		if ((rc) != EOK) \
+			action; \
+	} while (0)
+
+#define combine_rc(rc1, rc2) \
+	((rc1) == EOK ? (rc2) : (rc1))
+
+#define answer_and_return(rid, rc) \
+	do { \
+		ipc_answer_0((rid), (rc)); \
+		return; \
+	} while (0)
+
+/** Register file system server.
+ *
+ * This function abstracts away the tedious registration protocol from
+ * file system implementations and lets them to reuse this registration glue
+ * code.
+ *
+ * @param vfs_phone Open phone for communication with VFS.
+ * @param reg       File system registration structure. It will be
+ *                  initialized by this function.
+ * @param info      VFS info structure supplied by the file system
+ *                  implementation.
+ * @param conn      Connection fibril for handling all calls originating in
+ *                  VFS.
+ *
+ * @return EOK on success or a non-zero error code on errror.
+ *
+ */
+int fs_register(int vfs_phone, fs_reg_t *reg, vfs_info_t *info,
+    async_client_conn_t conn)
+{
+	/*
+	 * Tell VFS that we are here and want to get registered.
+	 * We use the async framework because VFS will answer the request
+	 * out-of-order, when it knows that the operation succeeded or failed.
+	 */
+	ipc_call_t answer;
+	aid_t req = async_send_0(vfs_phone, VFS_IN_REGISTER, &answer);
+	
+	/*
+	 * Send our VFS info structure to VFS.
+	 */
+	int rc = async_data_write_start(vfs_phone, info, sizeof(*info)); 
+	if (rc != EOK) {
+		async_wait_for(req, NULL);
+		return rc;
+	}
+	
+	/*
+	 * Ask VFS for callback connection.
+	 */
+	ipc_connect_to_me(vfs_phone, 0, 0, 0, &reg->vfs_phonehash);
+	
+	/*
+	 * Allocate piece of address space for PLB.
+	 */
+	reg->plb_ro = as_get_mappable_page(PLB_SIZE);
+	if (!reg->plb_ro) {
+		async_wait_for(req, NULL);
+		return ENOMEM;
+	}
+	
+	/*
+	 * Request sharing the Path Lookup Buffer with VFS.
+	 */
+	rc = async_share_in_start_0_0(vfs_phone, reg->plb_ro, PLB_SIZE);
+	if (rc) {
+		async_wait_for(req, NULL);
+		return rc;
+	}
+	 
+	/*
+	 * Pick up the answer for the request to the VFS_IN_REQUEST call.
+	 */
+	async_wait_for(req, NULL);
+	reg->fs_handle = (int) IPC_GET_ARG1(answer);
+	
+	/*
+	 * Create a connection fibril to handle the callback connection.
+	 */
+	async_new_connection(reg->vfs_phonehash, 0, NULL, conn);
+	
+	/*
+	 * Tell the async framework that other connections are to be handled by
+	 * the same connection fibril as well.
+	 */
+	async_set_client_connection(conn);
+	
+	return IPC_GET_RETVAL(answer);
+}
+
+void fs_node_initialize(fs_node_t *fn)
+{
+	memset(fn, 0, sizeof(fs_node_t));
+}
+
+void libfs_mount(libfs_ops_t *ops, fs_handle_t fs_handle, ipc_callid_t rid,
+    ipc_call_t *request)
+{
+	dev_handle_t mp_dev_handle = (dev_handle_t) IPC_GET_ARG1(*request);
+	fs_index_t mp_fs_index = (fs_index_t) IPC_GET_ARG2(*request);
+	fs_handle_t mr_fs_handle = (fs_handle_t) IPC_GET_ARG3(*request);
+	dev_handle_t mr_dev_handle = (dev_handle_t) IPC_GET_ARG4(*request);
+	int res;
+	ipcarg_t rc;
+	
+	ipc_call_t call;
+	ipc_callid_t callid;
+	
+	/* Accept the phone */
+	callid = async_get_call(&call);
+	int mountee_phone = (int) IPC_GET_ARG1(call);
+	if ((IPC_GET_METHOD(call) != IPC_M_CONNECTION_CLONE) ||
+	    (mountee_phone < 0)) {
+		ipc_answer_0(callid, EINVAL);
+		ipc_answer_0(rid, EINVAL);
+		return;
+	}
+	
+	/* Acknowledge the mountee_phone */
+	ipc_answer_0(callid, EOK);
+	
+	fs_node_t *fn;
+	res = ops->node_get(&fn, mp_dev_handle, mp_fs_index);
+	if ((res != EOK) || (!fn)) {
+		ipc_hangup(mountee_phone);
+		async_data_write_void(combine_rc(res, ENOENT));
+		ipc_answer_0(rid, combine_rc(res, ENOENT));
+		return;
+	}
+	
+	if (fn->mp_data.mp_active) {
+		ipc_hangup(mountee_phone);
+		(void) ops->node_put(fn);
+		async_data_write_void(EBUSY);
+		ipc_answer_0(rid, EBUSY);
+		return;
+	}
+	
+	rc = async_req_0_0(mountee_phone, IPC_M_CONNECT_ME);
+	if (rc != EOK) {
+		ipc_hangup(mountee_phone);
+		(void) ops->node_put(fn);
+		async_data_write_void(rc);
+		ipc_answer_0(rid, rc);
+		return;
+	}
+	
+	ipc_call_t answer;
+	rc = async_data_write_forward_1_1(mountee_phone, VFS_OUT_MOUNTED,
+	    mr_dev_handle, &answer);
+	
+	if (rc == EOK) {
+		fn->mp_data.mp_active = true;
+		fn->mp_data.fs_handle = mr_fs_handle;
+		fn->mp_data.dev_handle = mr_dev_handle;
+		fn->mp_data.phone = mountee_phone;
+	}
+	
+	/*
+	 * Do not release the FS node so that it stays in memory.
+	 */
+	ipc_answer_3(rid, rc, IPC_GET_ARG1(answer), IPC_GET_ARG2(answer),
+	    IPC_GET_ARG3(answer));
+}
+
+void libfs_unmount(libfs_ops_t *ops, ipc_callid_t rid, ipc_call_t *request)
+{
+	dev_handle_t mp_dev_handle = (dev_handle_t) IPC_GET_ARG1(*request);
+	fs_index_t mp_fs_index = (fs_index_t) IPC_GET_ARG2(*request);
+	fs_node_t *fn;
+	int res;
+
+	res = ops->node_get(&fn, mp_dev_handle, mp_fs_index);
+	if ((res != EOK) || (!fn)) {
+		ipc_answer_0(rid, combine_rc(res, ENOENT));
+		return;
+	}
+
+	/*
+	 * We are clearly expecting to find the mount point active.
+	 */
+	if (!fn->mp_data.mp_active) {
+		(void) ops->node_put(fn);
+		ipc_answer_0(rid, EINVAL);
+		return;
+	}
+
+	/*
+	 * Tell the mounted file system to unmount.
+	 */
+	res = async_req_1_0(fn->mp_data.phone, VFS_OUT_UNMOUNTED,
+	    fn->mp_data.dev_handle);
+
+	/*
+	 * If everything went well, perform the clean-up on our side.
+	 */
+	if (res == EOK) {
+		ipc_hangup(fn->mp_data.phone);
+		fn->mp_data.mp_active = false;
+		fn->mp_data.fs_handle = 0;
+		fn->mp_data.dev_handle = 0;
+		fn->mp_data.phone = 0;
+		/* Drop the reference created in libfs_mount(). */
+		(void) ops->node_put(fn);
+	}
+
+	(void) ops->node_put(fn);
+	ipc_answer_0(rid, res);
+}
+
+/** Lookup VFS triplet by name in the file system name space.
+ *
+ * The path passed in the PLB must be in the canonical file system path format
+ * as returned by the canonify() function.
+ *
+ * @param ops       libfs operations structure with function pointers to
+ *                  file system implementation
+ * @param fs_handle File system handle of the file system where to perform
+ *                  the lookup.
+ * @param rid       Request ID of the VFS_OUT_LOOKUP request.
+ * @param request   VFS_OUT_LOOKUP request data itself.
+ *
+ */
+void libfs_lookup(libfs_ops_t *ops, fs_handle_t fs_handle, ipc_callid_t rid,
+    ipc_call_t *request)
+{
+	unsigned int first = IPC_GET_ARG1(*request);
+	unsigned int last = IPC_GET_ARG2(*request);
+	unsigned int next = first;
+	dev_handle_t dev_handle = IPC_GET_ARG3(*request);
+	int lflag = IPC_GET_ARG4(*request);
+	fs_index_t index = IPC_GET_ARG5(*request);
+	char component[NAME_MAX + 1];
+	int len;
+	int rc;
+	
+	if (last < next)
+		last += PLB_SIZE;
+	
+	fs_node_t *par = NULL;
+	fs_node_t *cur = NULL;
+	fs_node_t *tmp = NULL;
+	
+	rc = ops->root_get(&cur, dev_handle);
+	on_error(rc, goto out_with_answer);
+	
+	if (cur->mp_data.mp_active) {
+		ipc_forward_slow(rid, cur->mp_data.phone, VFS_OUT_LOOKUP,
+		    next, last, cur->mp_data.dev_handle, lflag, index,
+		    IPC_FF_ROUTE_FROM_ME);
+		(void) ops->node_put(cur);
+		return;
+	}
+	
+	/* Eat slash */
+	if (ops->plb_get_char(next) == '/')
+		next++;
+	
+	while (next <= last) {
+		bool has_children;
+		
+		rc = ops->has_children(&has_children, cur);
+		on_error(rc, goto out_with_answer);
+		if (!has_children)
+			break;
+		
+		/* Collect the component */
+		len = 0;
+		while ((next <= last) && (ops->plb_get_char(next) != '/')) {
+			if (len + 1 == NAME_MAX) {
+				/* Component length overflow */
+				ipc_answer_0(rid, ENAMETOOLONG);
+				goto out;
+			}
+			component[len++] = ops->plb_get_char(next);
+			/* Process next character */
+			next++;
+		}
+		
+		assert(len);
+		component[len] = '\0';
+		/* Eat slash */
+		next++;
+		
+		/* Match the component */
+		rc = ops->match(&tmp, cur, component);
+		on_error(rc, goto out_with_answer);
+		
+		/*
+		 * If the matching component is a mount point, there are two
+		 * legitimate semantics of the lookup operation. The first is
+		 * the commonly used one in which the lookup crosses each mount
+		 * point into the mounted file system. The second semantics is
+		 * used mostly during unmount() and differs from the first one
+		 * only in that the last mount point in the looked up path,
+		 * which is also its last component, is not crossed.
+		 */
+
+		if ((tmp) && (tmp->mp_data.mp_active) &&
+		    (!(lflag & L_MP) || (next <= last))) {
+			if (next > last)
+				next = last = first;
+			else
+				next--;
+			
+			ipc_forward_slow(rid, tmp->mp_data.phone,
+			    VFS_OUT_LOOKUP, next, last, tmp->mp_data.dev_handle,
+			    lflag, index, IPC_FF_ROUTE_FROM_ME);
+			(void) ops->node_put(cur);
+			(void) ops->node_put(tmp);
+			if (par)
+				(void) ops->node_put(par);
+			return;
+		}
+		
+		/* Handle miss: match amongst siblings */
+		if (!tmp) {
+			if (next <= last) {
+				/* There are unprocessed components */
+				ipc_answer_0(rid, ENOENT);
+				goto out;
+			}
+			
+			/* Miss in the last component */
+			if (lflag & (L_CREATE | L_LINK)) {
+				/* Request to create a new link */
+				if (!ops->is_directory(cur)) {
+					ipc_answer_0(rid, ENOTDIR);
+					goto out;
+				}
+				
+				fs_node_t *fn;
+				if (lflag & L_CREATE)
+					rc = ops->create(&fn, dev_handle,
+					    lflag);
+				else
+					rc = ops->node_get(&fn, dev_handle,
+					    index);
+				on_error(rc, goto out_with_answer);
+				
+				if (fn) {
+					rc = ops->link(cur, fn, component);
+					if (rc != EOK) {
+						if (lflag & L_CREATE)
+							(void) ops->destroy(fn);
+						ipc_answer_0(rid, rc);
+					} else {
+						aoff64_t size = ops->size_get(fn);
+						ipc_answer_5(rid, fs_handle,
+						    dev_handle,
+						    ops->index_get(fn),
+						    LOWER32(size),
+						    UPPER32(size),
+						    ops->lnkcnt_get(fn));
+						(void) ops->node_put(fn);
+					}
+				} else
+					ipc_answer_0(rid, ENOSPC);
+				
+				goto out;
+			}
+			
+			ipc_answer_0(rid, ENOENT);
+			goto out;
+		}
+		
+		if (par) {
+			rc = ops->node_put(par);
+			on_error(rc, goto out_with_answer);
+		}
+		
+		/* Descend one level */
+		par = cur;
+		cur = tmp;
+		tmp = NULL;
+	}
+	
+	/* Handle miss: excessive components */
+	if (next <= last) {
+		bool has_children;
+		rc = ops->has_children(&has_children, cur);
+		on_error(rc, goto out_with_answer);
+		
+		if (has_children)
+			goto skip_miss;
+		
+		if (lflag & (L_CREATE | L_LINK)) {
+			if (!ops->is_directory(cur)) {
+				ipc_answer_0(rid, ENOTDIR);
+				goto out;
+			}
+			
+			/* Collect next component */
+			len = 0;
+			while (next <= last) {
+				if (ops->plb_get_char(next) == '/') {
+					/* More than one component */
+					ipc_answer_0(rid, ENOENT);
+					goto out;
+				}
+				
+				if (len + 1 == NAME_MAX) {
+					/* Component length overflow */
+					ipc_answer_0(rid, ENAMETOOLONG);
+					goto out;
+				}
+				
+				component[len++] = ops->plb_get_char(next);
+				/* Process next character */
+				next++;
+			}
+			
+			assert(len);
+			component[len] = '\0';
+			
+			fs_node_t *fn;
+			if (lflag & L_CREATE)
+				rc = ops->create(&fn, dev_handle, lflag);
+			else
+				rc = ops->node_get(&fn, dev_handle, index);
+			on_error(rc, goto out_with_answer);
+			
+			if (fn) {
+				rc = ops->link(cur, fn, component);
+				if (rc != EOK) {
+					if (lflag & L_CREATE)
+						(void) ops->destroy(fn);
+					ipc_answer_0(rid, rc);
+				} else {
+					aoff64_t size = ops->size_get(fn);
+					ipc_answer_5(rid, fs_handle,
+					    dev_handle,
+					    ops->index_get(fn),
+					    LOWER32(size),
+					    UPPER32(size),
+					    ops->lnkcnt_get(fn));
+					(void) ops->node_put(fn);
+				}
+			} else
+				ipc_answer_0(rid, ENOSPC);
+			
+			goto out;
+		}
+		
+		ipc_answer_0(rid, ENOENT);
+		goto out;
+	}
+	
+skip_miss:
+	
+	/* Handle hit */
+	if (lflag & L_UNLINK) {
+		unsigned int old_lnkcnt = ops->lnkcnt_get(cur);
+		rc = ops->unlink(par, cur, component);
+		
+		if (rc == EOK) {
+			aoff64_t size = ops->size_get(cur);
+			ipc_answer_5(rid, fs_handle, dev_handle,
+			    ops->index_get(cur), LOWER32(size), UPPER32(size),
+			    old_lnkcnt);
+		} else
+			ipc_answer_0(rid, rc);
+		
+		goto out;
+	}
+	
+	if (((lflag & (L_CREATE | L_EXCLUSIVE)) == (L_CREATE | L_EXCLUSIVE)) ||
+	    (lflag & L_LINK)) {
+		ipc_answer_0(rid, EEXIST);
+		goto out;
+	}
+	
+	if ((lflag & L_FILE) && (ops->is_directory(cur))) {
+		ipc_answer_0(rid, EISDIR);
+		goto out;
+	}
+	
+	if ((lflag & L_DIRECTORY) && (ops->is_file(cur))) {
+		ipc_answer_0(rid, ENOTDIR);
+		goto out;
+	}
+
+	if ((lflag & L_ROOT) && par) {
+		ipc_answer_0(rid, EINVAL);
+		goto out;
+	}
+	
+out_with_answer:
+	
+	if (rc == EOK) {
+		if (lflag & L_OPEN)
+			rc = ops->node_open(cur);
+		
+		if (rc == EOK) {
+			aoff64_t size = ops->size_get(cur);
+			ipc_answer_5(rid, fs_handle, dev_handle,
+			    ops->index_get(cur), LOWER32(size), UPPER32(size),
+			    ops->lnkcnt_get(cur));
+		} else
+			ipc_answer_0(rid, rc);
+		
+	} else
+		ipc_answer_0(rid, rc);
+	
+out:
+	
+	if (par)
+		(void) ops->node_put(par);
+	
+	if (cur)
+		(void) ops->node_put(cur);
+	
+	if (tmp)
+		(void) ops->node_put(tmp);
+}
+
+void libfs_stat(libfs_ops_t *ops, fs_handle_t fs_handle, ipc_callid_t rid,
+    ipc_call_t *request)
+{
+	dev_handle_t dev_handle = (dev_handle_t) IPC_GET_ARG1(*request);
+	fs_index_t index = (fs_index_t) IPC_GET_ARG2(*request);
+	
+	fs_node_t *fn;
+	int rc = ops->node_get(&fn, dev_handle, index);
+	on_error(rc, answer_and_return(rid, rc));
+	
+	ipc_callid_t callid;
+	size_t size;
+	if ((!async_data_read_receive(&callid, &size)) ||
+	    (size != sizeof(struct stat))) {
+		ops->node_put(fn);
+		ipc_answer_0(callid, EINVAL);
+		ipc_answer_0(rid, EINVAL);
+		return;
+	}
+	
+	struct stat stat;
+	memset(&stat, 0, sizeof(struct stat));
+	
+	stat.fs_handle = fs_handle;
+	stat.dev_handle = dev_handle;
+	stat.index = index;
+	stat.lnkcnt = ops->lnkcnt_get(fn);
+	stat.is_file = ops->is_file(fn);
+	stat.is_directory = ops->is_directory(fn);
+	stat.size = ops->size_get(fn);
+	stat.device = ops->device_get(fn);
+	
+	ops->node_put(fn);
+	
+	async_data_read_finalize(callid, &stat, sizeof(struct stat));
+	ipc_answer_0(rid, EOK);
+}
+
+/** Open VFS triplet.
+ *
+ * @param ops     libfs operations structure with function pointers to
+ *                file system implementation
+ * @param rid     Request ID of the VFS_OUT_OPEN_NODE request.
+ * @param request VFS_OUT_OPEN_NODE request data itself.
+ *
+ */
+void libfs_open_node(libfs_ops_t *ops, fs_handle_t fs_handle, ipc_callid_t rid,
+    ipc_call_t *request)
+{
+	dev_handle_t dev_handle = IPC_GET_ARG1(*request);
+	fs_index_t index = IPC_GET_ARG2(*request);
+	
+	fs_node_t *fn;
+	int rc = ops->node_get(&fn, dev_handle, index);
+	on_error(rc, answer_and_return(rid, rc));
+	
+	if (fn == NULL) {
+		ipc_answer_0(rid, ENOENT);
+		return;
+	}
+	
+	rc = ops->node_open(fn);
+	aoff64_t size = ops->size_get(fn);
+	ipc_answer_4(rid, rc, LOWER32(size), UPPER32(size), ops->lnkcnt_get(fn),
+	    (ops->is_file(fn) ? L_FILE : 0) | (ops->is_directory(fn) ? L_DIRECTORY : 0));
+	
+	(void) ops->node_put(fn);
+}
+
+/** @}
+ */
Index: uspace/lib/fs/libfs.h
===================================================================
--- uspace/lib/fs/libfs.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/fs/libfs.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,106 @@
+/*
+ * 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.
+ */
+
+/** @addtogroup libfs
+ * @{
+ */
+/**
+ * @file
+ */
+
+#ifndef LIBFS_LIBFS_H_
+#define LIBFS_LIBFS_H_
+
+#include <ipc/vfs.h>
+#include <stdint.h>
+#include <ipc/ipc.h>
+#include <async.h>
+#include <devmap.h>
+
+typedef struct {
+	bool mp_active;
+	int phone;
+	fs_handle_t fs_handle;
+	dev_handle_t dev_handle;
+} mp_data_t;
+
+typedef struct {
+	mp_data_t mp_data;  /**< Mount point info. */
+	void *data;         /**< Data of the file system implementation. */
+} fs_node_t;
+
+typedef struct {
+	/*
+	 * The first set of methods are functions that return an integer error
+	 * code. If some additional return value is to be returned, the first
+	 * argument holds the output argument.
+	 */
+	int (* root_get)(fs_node_t **, dev_handle_t);
+	int (* match)(fs_node_t **, fs_node_t *, const char *);
+	int (* node_get)(fs_node_t **, dev_handle_t, fs_index_t);
+	int (* node_open)(fs_node_t *);
+	int (* node_put)(fs_node_t *);
+	int (* create)(fs_node_t **, dev_handle_t, int);
+	int (* destroy)(fs_node_t *);
+	int (* link)(fs_node_t *, fs_node_t *, const char *);
+	int (* unlink)(fs_node_t *, fs_node_t *, const char *);
+	int (* has_children)(bool *, fs_node_t *);
+	/*
+	 * The second set of methods are usually mere getters that do not return
+	 * an integer error code.
+	 */
+	fs_index_t (* index_get)(fs_node_t *);
+	aoff64_t (* size_get)(fs_node_t *);
+	unsigned int (* lnkcnt_get)(fs_node_t *);
+	char (* plb_get_char)(unsigned pos);
+	bool (* is_directory)(fs_node_t *);
+	bool (* is_file)(fs_node_t *);
+	dev_handle_t (* device_get)(fs_node_t *);
+} libfs_ops_t;
+
+typedef struct {
+	int fs_handle;           /**< File system handle. */
+	ipcarg_t vfs_phonehash;  /**< Initial VFS phonehash. */
+	uint8_t *plb_ro;         /**< Read-only PLB view. */
+} fs_reg_t;
+
+extern int fs_register(int, fs_reg_t *, vfs_info_t *, async_client_conn_t);
+
+extern void fs_node_initialize(fs_node_t *);
+
+extern void libfs_mount(libfs_ops_t *, fs_handle_t, ipc_callid_t, ipc_call_t *);
+extern void libfs_unmount(libfs_ops_t *, ipc_callid_t, ipc_call_t *);
+extern void libfs_lookup(libfs_ops_t *, fs_handle_t, ipc_callid_t, ipc_call_t *);
+extern void libfs_stat(libfs_ops_t *, fs_handle_t, ipc_callid_t, ipc_call_t *);
+extern void libfs_open_node(libfs_ops_t *, fs_handle_t, ipc_callid_t,
+    ipc_call_t *);
+
+#endif
+
+/** @}
+ */
Index: pace/lib/libblock/Makefile
===================================================================
--- uspace/lib/libblock/Makefile	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,38 +1,0 @@
-#
-# Copyright (c) 2005 Martin Decky
-# Copyright (c) 2007 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.
-#
-
-USPACE_PREFIX = ../..
-LIBS = $(LIBC_PREFIX)/libc.a
-
-OUTPUT = libblock.a
-
-SOURCES = \
-	libblock.c
-
-include ../Makefile.common
Index: pace/lib/libblock/libblock.c
===================================================================
--- uspace/lib/libblock/libblock.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,882 +1,0 @@
-/*
- * Copyright (c) 2008 Jakub Jermar
- * Copyright (c) 2008 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 libblock
- * @{
- */
-/**
- * @file
- * @brief
- */
-
-#include "libblock.h"
-#include "../../srv/vfs/vfs.h"
-#include <ipc/devmap.h>
-#include <ipc/bd.h>
-#include <ipc/services.h>
-#include <errno.h>
-#include <sys/mman.h>
-#include <async.h>
-#include <ipc/ipc.h>
-#include <as.h>
-#include <assert.h>
-#include <fibril_synch.h>
-#include <adt/list.h>
-#include <adt/hash_table.h>
-#include <macros.h>
-#include <mem.h>
-#include <sys/typefmt.h>
-#include <stacktrace.h>
-
-/** Lock protecting the device connection list */
-static FIBRIL_MUTEX_INITIALIZE(dcl_lock);
-/** Device connection list head. */
-static LIST_INITIALIZE(dcl_head);
-
-#define CACHE_BUCKETS_LOG2		10
-#define CACHE_BUCKETS			(1 << CACHE_BUCKETS_LOG2)
-
-typedef struct {
-	fibril_mutex_t lock;
-	size_t lblock_size;		/**< Logical block size. */
-	unsigned block_count;		/**< Total number of blocks. */
-	unsigned blocks_cached;		/**< Number of cached blocks. */
-	hash_table_t block_hash;
-	link_t free_head;
-	enum cache_mode mode;
-} cache_t;
-
-typedef struct {
-	link_t link;
-	dev_handle_t dev_handle;
-	int dev_phone;
-	fibril_mutex_t comm_area_lock;
-	void *comm_area;
-	size_t comm_size;
-	void *bb_buf;
-	aoff64_t bb_addr;
-	size_t pblock_size;		/**< Physical block size. */
-	cache_t *cache;
-} devcon_t;
-
-static int read_blocks(devcon_t *devcon, aoff64_t ba, size_t cnt);
-static int write_blocks(devcon_t *devcon, aoff64_t ba, size_t cnt);
-static int get_block_size(int dev_phone, size_t *bsize);
-static int get_num_blocks(int dev_phone, aoff64_t *nblocks);
-
-static devcon_t *devcon_search(dev_handle_t dev_handle)
-{
-	link_t *cur;
-
-	fibril_mutex_lock(&dcl_lock);
-	for (cur = dcl_head.next; cur != &dcl_head; cur = cur->next) {
-		devcon_t *devcon = list_get_instance(cur, devcon_t, link);
-		if (devcon->dev_handle == dev_handle) {
-			fibril_mutex_unlock(&dcl_lock);
-			return devcon;
-		}
-	}
-	fibril_mutex_unlock(&dcl_lock);
-	return NULL;
-}
-
-static int devcon_add(dev_handle_t dev_handle, int dev_phone, size_t bsize,
-    void *comm_area, size_t comm_size)
-{
-	link_t *cur;
-	devcon_t *devcon;
-
-	if (comm_size < bsize)
-		return EINVAL;
-
-	devcon = malloc(sizeof(devcon_t));
-	if (!devcon)
-		return ENOMEM;
-	
-	link_initialize(&devcon->link);
-	devcon->dev_handle = dev_handle;
-	devcon->dev_phone = dev_phone;
-	fibril_mutex_initialize(&devcon->comm_area_lock);
-	devcon->comm_area = comm_area;
-	devcon->comm_size = comm_size;
-	devcon->bb_buf = NULL;
-	devcon->bb_addr = 0;
-	devcon->pblock_size = bsize;
-	devcon->cache = NULL;
-
-	fibril_mutex_lock(&dcl_lock);
-	for (cur = dcl_head.next; cur != &dcl_head; cur = cur->next) {
-		devcon_t *d = list_get_instance(cur, devcon_t, link);
-		if (d->dev_handle == dev_handle) {
-			fibril_mutex_unlock(&dcl_lock);
-			free(devcon);
-			return EEXIST;
-		}
-	}
-	list_append(&devcon->link, &dcl_head);
-	fibril_mutex_unlock(&dcl_lock);
-	return EOK;
-}
-
-static void devcon_remove(devcon_t *devcon)
-{
-	fibril_mutex_lock(&dcl_lock);
-	list_remove(&devcon->link);
-	fibril_mutex_unlock(&dcl_lock);
-}
-
-int block_init(dev_handle_t dev_handle, size_t comm_size)
-{
-	int rc;
-	int dev_phone;
-	void *comm_area;
-	size_t bsize;
-
-	comm_area = mmap(NULL, comm_size, PROTO_READ | PROTO_WRITE,
-	    MAP_ANONYMOUS | MAP_PRIVATE, 0, 0);
-	if (!comm_area) {
-		return ENOMEM;
-	}
-
-	dev_phone = devmap_device_connect(dev_handle, IPC_FLAG_BLOCKING);
-	if (dev_phone < 0) {
-		munmap(comm_area, comm_size);
-		return dev_phone;
-	}
-
-	rc = async_share_out_start(dev_phone, comm_area,
-	    AS_AREA_READ | AS_AREA_WRITE);
-	if (rc != EOK) {
-	    	munmap(comm_area, comm_size);
-		ipc_hangup(dev_phone);
-		return rc;
-	}
-
-	if (get_block_size(dev_phone, &bsize) != EOK) {
-		munmap(comm_area, comm_size);
-		ipc_hangup(dev_phone);
-		return rc;
-	}
-	
-	rc = devcon_add(dev_handle, dev_phone, bsize, comm_area, comm_size);
-	if (rc != EOK) {
-		munmap(comm_area, comm_size);
-		ipc_hangup(dev_phone);
-		return rc;
-	}
-
-	return EOK;
-}
-
-void block_fini(dev_handle_t dev_handle)
-{
-	devcon_t *devcon = devcon_search(dev_handle);
-	assert(devcon);
-	
-	if (devcon->cache)
-		(void) block_cache_fini(dev_handle);
-
-	devcon_remove(devcon);
-
-	if (devcon->bb_buf)
-		free(devcon->bb_buf);
-
-	munmap(devcon->comm_area, devcon->comm_size);
-	ipc_hangup(devcon->dev_phone);
-
-	free(devcon);	
-}
-
-int block_bb_read(dev_handle_t dev_handle, aoff64_t ba)
-{
-	void *bb_buf;
-	int rc;
-
-	devcon_t *devcon = devcon_search(dev_handle);
-	if (!devcon)
-		return ENOENT;
-	if (devcon->bb_buf)
-		return EEXIST;
-	bb_buf = malloc(devcon->pblock_size);
-	if (!bb_buf)
-		return ENOMEM;
-
-	fibril_mutex_lock(&devcon->comm_area_lock);
-	rc = read_blocks(devcon, 0, 1);
-	if (rc != EOK) {
-		fibril_mutex_unlock(&devcon->comm_area_lock);
-	    	free(bb_buf);
-		return rc;
-	}
-	memcpy(bb_buf, devcon->comm_area, devcon->pblock_size);
-	fibril_mutex_unlock(&devcon->comm_area_lock);
-
-	devcon->bb_buf = bb_buf;
-	devcon->bb_addr = ba;
-
-	return EOK;
-}
-
-void *block_bb_get(dev_handle_t dev_handle)
-{
-	devcon_t *devcon = devcon_search(dev_handle);
-	assert(devcon);
-	return devcon->bb_buf;
-}
-
-static hash_index_t cache_hash(unsigned long *key)
-{
-	return *key & (CACHE_BUCKETS - 1);
-}
-
-static int cache_compare(unsigned long *key, hash_count_t keys, link_t *item)
-{
-	block_t *b = hash_table_get_instance(item, block_t, hash_link);
-	return b->boff == *key;
-}
-
-static void cache_remove_callback(link_t *item)
-{
-}
-
-static hash_table_operations_t cache_ops = {
-	.hash = cache_hash,
-	.compare = cache_compare,
-	.remove_callback = cache_remove_callback
-};
-
-int block_cache_init(dev_handle_t dev_handle, size_t size, unsigned blocks,
-    enum cache_mode mode)
-{
-	devcon_t *devcon = devcon_search(dev_handle);
-	cache_t *cache;
-	if (!devcon)
-		return ENOENT;
-	if (devcon->cache)
-		return EEXIST;
-	cache = malloc(sizeof(cache_t));
-	if (!cache)
-		return ENOMEM;
-	
-	fibril_mutex_initialize(&cache->lock);
-	list_initialize(&cache->free_head);
-	cache->lblock_size = size;
-	cache->block_count = blocks;
-	cache->blocks_cached = 0;
-	cache->mode = mode;
-
-	/* No block size translation a.t.m. */
-	assert(cache->lblock_size == devcon->pblock_size);
-
-	if (!hash_table_create(&cache->block_hash, CACHE_BUCKETS, 1,
-	    &cache_ops)) {
-		free(cache);
-		return ENOMEM;
-	}
-
-	devcon->cache = cache;
-	return EOK;
-}
-
-int block_cache_fini(dev_handle_t dev_handle)
-{
-	devcon_t *devcon = devcon_search(dev_handle);
-	cache_t *cache;
-	int rc;
-
-	if (!devcon)
-		return ENOENT;
-	if (!devcon->cache)
-		return EOK;
-	cache = devcon->cache;
-	
-	/*
-	 * We are expecting to find all blocks for this device handle on the
-	 * free list, i.e. the block reference count should be zero. Do not
-	 * bother with the cache and block locks because we are single-threaded.
-	 */
-	while (!list_empty(&cache->free_head)) {
-		block_t *b = list_get_instance(cache->free_head.next,
-		    block_t, free_link);
-
-		list_remove(&b->free_link);
-		if (b->dirty) {
-			memcpy(devcon->comm_area, b->data, b->size);
-			rc = write_blocks(devcon, b->boff, 1);
-			if (rc != EOK)
-				return rc;
-		}
-
-		unsigned long key = b->boff;
-		hash_table_remove(&cache->block_hash, &key, 1);
-		
-		free(b->data);
-		free(b);
-	}
-
-	hash_table_destroy(&cache->block_hash);
-	devcon->cache = NULL;
-	free(cache);
-
-	return EOK;
-}
-
-#define CACHE_LO_WATERMARK	10	
-#define CACHE_HI_WATERMARK	20	
-static bool cache_can_grow(cache_t *cache)
-{
-	if (cache->blocks_cached < CACHE_LO_WATERMARK)
-		return true;
-	if (!list_empty(&cache->free_head))
-		return false;
-	return true;
-}
-
-static void block_initialize(block_t *b)
-{
-	fibril_mutex_initialize(&b->lock);
-	b->refcnt = 1;
-	b->dirty = false;
-	b->toxic = false;
-	fibril_rwlock_initialize(&b->contents_lock);
-	link_initialize(&b->free_link);
-	link_initialize(&b->hash_link);
-}
-
-/** Instantiate a block in memory and get a reference to it.
- *
- * @param block			Pointer to where the function will store the
- * 				block pointer on success.
- * @param dev_handle		Device handle of the block device.
- * @param boff			Block offset.
- * @param flags			If BLOCK_FLAGS_NOREAD is specified, block_get()
- * 				will not read the contents of the block from the
- *				device.
- *
- * @return			EOK on success or a negative error code.
- */
-int block_get(block_t **block, dev_handle_t dev_handle, aoff64_t boff, int flags)
-{
-	devcon_t *devcon;
-	cache_t *cache;
-	block_t *b;
-	link_t *l;
-	unsigned long key = boff;
-	int rc;
-	
-	devcon = devcon_search(dev_handle);
-
-	assert(devcon);
-	assert(devcon->cache);
-	
-	cache = devcon->cache;
-
-retry:
-	rc = EOK;
-	b = NULL;
-
-	fibril_mutex_lock(&cache->lock);
-	l = hash_table_find(&cache->block_hash, &key);
-	if (l) {
-		/*
-		 * We found the block in the cache.
-		 */
-		b = hash_table_get_instance(l, block_t, hash_link);
-		fibril_mutex_lock(&b->lock);
-		if (b->refcnt++ == 0)
-			list_remove(&b->free_link);
-		if (b->toxic)
-			rc = EIO;
-		fibril_mutex_unlock(&b->lock);
-		fibril_mutex_unlock(&cache->lock);
-	} else {
-		/*
-		 * The block was not found in the cache.
-		 */
-		if (cache_can_grow(cache)) {
-			/*
-			 * We can grow the cache by allocating new blocks.
-			 * Should the allocation fail, we fail over and try to
-			 * recycle a block from the cache.
-			 */
-			b = malloc(sizeof(block_t));
-			if (!b)
-				goto recycle;
-			b->data = malloc(cache->lblock_size);
-			if (!b->data) {
-				free(b);
-				goto recycle;
-			}
-			cache->blocks_cached++;
-		} else {
-			/*
-			 * Try to recycle a block from the free list.
-			 */
-			unsigned long temp_key;
-recycle:
-			if (list_empty(&cache->free_head)) {
-				fibril_mutex_unlock(&cache->lock);
-				rc = ENOMEM;
-				goto out;
-			}
-			l = cache->free_head.next;
-			b = list_get_instance(l, block_t, free_link);
-
-			fibril_mutex_lock(&b->lock);
-			if (b->dirty) {
-				/*
-				 * The block needs to be written back to the
-				 * device before it changes identity. Do this
-				 * while not holding the cache lock so that
-				 * concurrency is not impeded. Also move the
-				 * block to the end of the free list so that we
-				 * do not slow down other instances of
-				 * block_get() draining the free list.
-				 */
-				list_remove(&b->free_link);
-				list_append(&b->free_link, &cache->free_head);
-				fibril_mutex_unlock(&cache->lock);
-				fibril_mutex_lock(&devcon->comm_area_lock);
-				memcpy(devcon->comm_area, b->data, b->size);
-				rc = write_blocks(devcon, b->boff, 1);
-				fibril_mutex_unlock(&devcon->comm_area_lock);
-				if (rc != EOK) {
-					/*
-					 * We did not manage to write the block
-					 * to the device. Keep it around for
-					 * another try. Hopefully, we will grab
-					 * another block next time.
-					 */
-					fibril_mutex_unlock(&b->lock);
-					goto retry;
-				}
-				b->dirty = false;
-				if (!fibril_mutex_trylock(&cache->lock)) {
-					/*
-					 * Somebody is probably racing with us.
-					 * Unlock the block and retry.
-					 */
-					fibril_mutex_unlock(&b->lock);
-					goto retry;
-				}
-
-			}
-			fibril_mutex_unlock(&b->lock);
-
-			/*
-			 * Unlink the block from the free list and the hash
-			 * table.
-			 */
-			list_remove(&b->free_link);
-			temp_key = b->boff;
-			hash_table_remove(&cache->block_hash, &temp_key, 1);
-		}
-
-		block_initialize(b);
-		b->dev_handle = dev_handle;
-		b->size = cache->lblock_size;
-		b->boff = boff;
-		hash_table_insert(&cache->block_hash, &key, &b->hash_link);
-
-		/*
-		 * Lock the block before releasing the cache lock. Thus we don't
-		 * kill concurrent operations on the cache while doing I/O on
-		 * the block.
-		 */
-		fibril_mutex_lock(&b->lock);
-		fibril_mutex_unlock(&cache->lock);
-
-		if (!(flags & BLOCK_FLAGS_NOREAD)) {
-			/*
-			 * The block contains old or no data. We need to read
-			 * the new contents from the device.
-			 */
-			fibril_mutex_lock(&devcon->comm_area_lock);
-			rc = read_blocks(devcon, b->boff, 1);
-			memcpy(b->data, devcon->comm_area, cache->lblock_size);
-			fibril_mutex_unlock(&devcon->comm_area_lock);
-			if (rc != EOK) 
-				b->toxic = true;
-		} else
-			rc = EOK;
-
-		fibril_mutex_unlock(&b->lock);
-	}
-out:
-	if ((rc != EOK) && b) {
-		assert(b->toxic);
-		(void) block_put(b);
-		b = NULL;
-	}
-	*block = b;
-	return rc;
-}
-
-/** Release a reference to a block.
- *
- * If the last reference is dropped, the block is put on the free list.
- *
- * @param block		Block of which a reference is to be released.
- *
- * @return		EOK on success or a negative error code.
- */
-int block_put(block_t *block)
-{
-	devcon_t *devcon = devcon_search(block->dev_handle);
-	cache_t *cache;
-	unsigned blocks_cached;
-	enum cache_mode mode;
-	int rc = EOK;
-
-	assert(devcon);
-	assert(devcon->cache);
-
-	cache = devcon->cache;
-
-retry:
-	fibril_mutex_lock(&cache->lock);
-	blocks_cached = cache->blocks_cached;
-	mode = cache->mode;
-	fibril_mutex_unlock(&cache->lock);
-
-	/*
-	 * Determine whether to sync the block. Syncing the block is best done
-	 * when not holding the cache lock as it does not impede concurrency.
-	 * Since the situation may have changed when we unlocked the cache, the
-	 * blocks_cached and mode variables are mere hints. We will recheck the
-	 * conditions later when the cache lock is held again.
-	 */
-	fibril_mutex_lock(&block->lock);
-	if (block->toxic)
-		block->dirty = false;	/* will not write back toxic block */
-	if (block->dirty && (block->refcnt == 1) &&
-	    (blocks_cached > CACHE_HI_WATERMARK || mode != CACHE_MODE_WB)) {
-		fibril_mutex_lock(&devcon->comm_area_lock);
-		memcpy(devcon->comm_area, block->data, block->size);
-		rc = write_blocks(devcon, block->boff, 1);
-		fibril_mutex_unlock(&devcon->comm_area_lock);
-		block->dirty = false;
-	}
-	fibril_mutex_unlock(&block->lock);
-
-	fibril_mutex_lock(&cache->lock);
-	fibril_mutex_lock(&block->lock);
-	if (!--block->refcnt) {
-		/*
-		 * Last reference to the block was dropped. Either free the
-		 * block or put it on the free list. In case of an I/O error,
-		 * free the block.
-		 */
-		if ((cache->blocks_cached > CACHE_HI_WATERMARK) ||
-		    (rc != EOK)) {
-			/*
-			 * Currently there are too many cached blocks or there
-			 * was an I/O error when writing the block back to the
-			 * device.
-			 */
-			if (block->dirty) {
-				/*
-				 * We cannot sync the block while holding the
-				 * cache lock. Release everything and retry.
-				 */
-				block->refcnt++;
-				fibril_mutex_unlock(&block->lock);
-				fibril_mutex_unlock(&cache->lock);
-				goto retry;
-			}
-			/*
-			 * Take the block out of the cache and free it.
-			 */
-			unsigned long key = block->boff;
-			hash_table_remove(&cache->block_hash, &key, 1);
-			free(block);
-			free(block->data);
-			cache->blocks_cached--;
-			fibril_mutex_unlock(&cache->lock);
-			return rc;
-		}
-		/*
-		 * Put the block on the free list.
-		 */
-		if (cache->mode != CACHE_MODE_WB && block->dirty) {
-			/*
-			 * We cannot sync the block while holding the cache
-			 * lock. Release everything and retry.
-			 */
-			block->refcnt++;
-			fibril_mutex_unlock(&block->lock);
-			fibril_mutex_unlock(&cache->lock);
-			goto retry;
-		}
-		list_append(&block->free_link, &cache->free_head);
-	}
-	fibril_mutex_unlock(&block->lock);
-	fibril_mutex_unlock(&cache->lock);
-
-	return rc;
-}
-
-/** Read sequential data from a block device.
- *
- * @param dev_handle	Device handle of the block device.
- * @param bufpos	Pointer to the first unread valid offset within the
- * 			communication buffer.
- * @param buflen	Pointer to the number of unread bytes that are ready in
- * 			the communication buffer.
- * @param pos		Device position to be read.
- * @param dst		Destination buffer.
- * @param size		Size of the destination buffer.
- * @param block_size	Block size to be used for the transfer.
- *
- * @return		EOK on success or a negative return code on failure.
- */
-int block_seqread(dev_handle_t dev_handle, size_t *bufpos, size_t *buflen,
-    aoff64_t *pos, void *dst, size_t size)
-{
-	size_t offset = 0;
-	size_t left = size;
-	size_t block_size;
-	devcon_t *devcon;
-
-	devcon = devcon_search(dev_handle);
-	assert(devcon);
-	block_size = devcon->pblock_size;
-	
-	fibril_mutex_lock(&devcon->comm_area_lock);
-	while (left > 0) {
-		size_t rd;
-		
-		if (*bufpos + left < *buflen)
-			rd = left;
-		else
-			rd = *buflen - *bufpos;
-		
-		if (rd > 0) {
-			/*
-			 * Copy the contents of the communication buffer to the
-			 * destination buffer.
-			 */
-			memcpy(dst + offset, devcon->comm_area + *bufpos, rd);
-			offset += rd;
-			*bufpos += rd;
-			*pos += rd;
-			left -= rd;
-		}
-		
-		if (*bufpos == *buflen) {
-			/* Refill the communication buffer with a new block. */
-			int rc;
-
-			rc = read_blocks(devcon, *pos / block_size, 1);
-			if (rc != EOK) {
-				fibril_mutex_unlock(&devcon->comm_area_lock);
-				return rc;
-			}
-			
-			*bufpos = 0;
-			*buflen = block_size;
-		}
-	}
-	fibril_mutex_unlock(&devcon->comm_area_lock);
-	
-	return EOK;
-}
-
-/** Read blocks directly from device (bypass cache).
- *
- * @param dev_handle	Device handle of the block device.
- * @param ba		Address of first block.
- * @param cnt		Number of blocks.
- * @param src		Buffer for storing the data.
- *
- * @return		EOK on success or negative error code on failure.
- */
-int block_read_direct(dev_handle_t dev_handle, aoff64_t ba, size_t cnt, void *buf)
-{
-	devcon_t *devcon;
-	int rc;
-
-	devcon = devcon_search(dev_handle);
-	assert(devcon);
-	
-	fibril_mutex_lock(&devcon->comm_area_lock);
-
-	rc = read_blocks(devcon, ba, cnt);
-	if (rc == EOK)
-		memcpy(buf, devcon->comm_area, devcon->pblock_size * cnt);
-
-	fibril_mutex_unlock(&devcon->comm_area_lock);
-
-	return rc;
-}
-
-/** Write blocks directly to device (bypass cache).
- *
- * @param dev_handle	Device handle of the block device.
- * @param ba		Address of first block.
- * @param cnt		Number of blocks.
- * @param src		The data to be written.
- *
- * @return		EOK on success or negative error code on failure.
- */
-int block_write_direct(dev_handle_t dev_handle, aoff64_t ba, size_t cnt,
-    const void *data)
-{
-	devcon_t *devcon;
-	int rc;
-
-	devcon = devcon_search(dev_handle);
-	assert(devcon);
-	
-	fibril_mutex_lock(&devcon->comm_area_lock);
-
-	memcpy(devcon->comm_area, data, devcon->pblock_size * cnt);
-	rc = write_blocks(devcon, ba, cnt);
-
-	fibril_mutex_unlock(&devcon->comm_area_lock);
-
-	return rc;
-}
-
-/** Get device block size.
- *
- * @param dev_handle	Device handle of the block device.
- * @param bsize		Output block size.
- *
- * @return		EOK on success or negative error code on failure.
- */
-int block_get_bsize(dev_handle_t dev_handle, size_t *bsize)
-{
-	devcon_t *devcon;
-
-	devcon = devcon_search(dev_handle);
-	assert(devcon);
-	
-	return get_block_size(devcon->dev_phone, bsize);
-}
-
-/** Get number of blocks on device.
- *
- * @param dev_handle	Device handle of the block device.
- * @param nblocks	Output number of blocks.
- *
- * @return		EOK on success or negative error code on failure.
- */
-int block_get_nblocks(dev_handle_t dev_handle, aoff64_t *nblocks)
-{
-	devcon_t *devcon;
-
-	devcon = devcon_search(dev_handle);
-	assert(devcon);
-	
-	return get_num_blocks(devcon->dev_phone, nblocks);
-}
-
-/** Read blocks from block device.
- *
- * @param devcon	Device connection.
- * @param ba		Address of first block.
- * @param cnt		Number of blocks.
- * @param src		Buffer for storing the data.
- *
- * @return		EOK on success or negative error code on failure.
- */
-static int read_blocks(devcon_t *devcon, aoff64_t ba, size_t cnt)
-{
-	int rc;
-
-	assert(devcon);
-	rc = async_req_3_0(devcon->dev_phone, BD_READ_BLOCKS, LOWER32(ba),
-	    UPPER32(ba), cnt);
-	if (rc != EOK) {
-		printf("Error %d reading %d blocks starting at block %" PRIuOFF64
-		    " from device handle %d\n", rc, cnt, ba,
-		    devcon->dev_handle);
-#ifndef NDEBUG
-		stacktrace_print();
-#endif
-	}
-	return rc;
-}
-
-/** Write block to block device.
- *
- * @param devcon	Device connection.
- * @param ba		Address of first block.
- * @param cnt		Number of blocks.
- * @param src		Buffer containing the data to write.
- *
- * @return		EOK on success or negative error code on failure.
- */
-static int write_blocks(devcon_t *devcon, aoff64_t ba, size_t cnt)
-{
-	int rc;
-
-	assert(devcon);
-	rc = async_req_3_0(devcon->dev_phone, BD_WRITE_BLOCKS, LOWER32(ba),
-	    UPPER32(ba), cnt);
-	if (rc != EOK) {
-		printf("Error %d writing %d blocks starting at block %" PRIuOFF64
-		    " to device handle %d\n", rc, cnt, ba, devcon->dev_handle);
-#ifndef NDEBUG
-		stacktrace_print();
-#endif
-	}
-	return rc;
-}
-
-/** Get block size used by the device. */
-static int get_block_size(int dev_phone, size_t *bsize)
-{
-	ipcarg_t bs;
-	int rc;
-
-	rc = async_req_0_1(dev_phone, BD_GET_BLOCK_SIZE, &bs);
-	if (rc == EOK)
-		*bsize = (size_t) bs;
-
-	return rc;
-}
-
-/** Get total number of blocks on block device. */
-static int get_num_blocks(int dev_phone, aoff64_t *nblocks)
-{
-	ipcarg_t nb_l, nb_h;
-	int rc;
-
-	rc = async_req_0_2(dev_phone, BD_GET_NUM_BLOCKS, &nb_l, &nb_h);
-	if (rc == EOK) {
-		*nblocks = (aoff64_t) MERGE_LOUP32(nb_l, nb_h);
-	}
-
-	return rc;
-}
-
-/** @}
- */
Index: pace/lib/libblock/libblock.h
===================================================================
--- uspace/lib/libblock/libblock.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,119 +1,0 @@
-/*
- * Copyright (c) 2008 Jakub Jermar
- * Copyright (c) 2008 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 libblock 
- * @{
- */ 
-/**
- * @file
- */
-
-#ifndef LIBBLOCK_LIBBLOCK_H_
-#define LIBBLOCK_LIBBLOCK_H_
-
-#include <stdint.h>
-#include "../../srv/vfs/vfs.h"
-#include <fibril_synch.h>
-#include <adt/hash_table.h>
-#include <adt/list.h>
-
-/*
- * Flags that can be used with block_get().
- */
-
-/** 
- * This macro is a symbolic value for situations where no special flags are
- * needed.
- */
-#define BLOCK_FLAGS_NONE	0
-
-/**
- * When the client of block_get() intends to overwrite the current contents of
- * the block, this flag is used to avoid the unnecessary read.
- */
-#define BLOCK_FLAGS_NOREAD	1
-
-typedef struct block {
-	/** Mutex protecting the reference count. */
-	fibril_mutex_t lock;
-	/** Number of references to the block_t structure. */
-	unsigned refcnt;
-	/** If true, the block needs to be written back to the block device. */
-	bool dirty;
-	/** If true, the blcok does not contain valid data. */
-	bool toxic;
-	/** Readers / Writer lock protecting the contents of the block. */
-	fibril_rwlock_t contents_lock;
-	/** Handle of the device where the block resides. */
-	dev_handle_t dev_handle;
-	/** Block offset on the block device. Counted in 'size'-byte blocks. */
-	aoff64_t boff;
-	/** Size of the block. */
-	size_t size;
-	/** Link for placing the block into the free block list. */
-	link_t free_link;
-	/** Link for placing the block into the block hash table. */ 
-	link_t hash_link;
-	/** Buffer with the block data. */
-	void *data;
-} block_t;
-
-/** Caching mode */
-enum cache_mode {
-	/** Write-Through */
-	CACHE_MODE_WT,
-	/** Write-Back */
-	CACHE_MODE_WB
-};
-
-extern int block_init(dev_handle_t, size_t);
-extern void block_fini(dev_handle_t);
-
-extern int block_bb_read(dev_handle_t, aoff64_t);
-extern void *block_bb_get(dev_handle_t);
-
-extern int block_cache_init(dev_handle_t, size_t, unsigned, enum cache_mode);
-extern int block_cache_fini(dev_handle_t);
-
-extern int block_get(block_t **, dev_handle_t, aoff64_t, int);
-extern int block_put(block_t *);
-
-extern int block_seqread(dev_handle_t, size_t *, size_t *, aoff64_t *, void *,
-    size_t);
-
-extern int block_get_bsize(dev_handle_t, size_t *);
-extern int block_get_nblocks(dev_handle_t, aoff64_t *);
-extern int block_read_direct(dev_handle_t, aoff64_t, size_t, void *);
-extern int block_write_direct(dev_handle_t, aoff64_t, size_t, const void *);
-
-#endif
-
-/** @}
- */
-
Index: pace/lib/libc/Makefile
===================================================================
--- uspace/lib/libc/Makefile	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,111 +1,0 @@
-#
-# Copyright (c) 2005 Martin Decky
-# Copyright (c) 2007 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 ../../../Makefile.common
--include ../../../Makefile.config
-
-USPACE_PREFIX = $(shell pwd)/../..
-LIBS =
-
-LINK = arch/$(UARCH)/_link.ld
-
-PRE_DEPEND = $(INCLUDE_KERNEL) $(INCLUDE_ARCH) $(INCLUDE_LIBARCH)
-EXTRA_CLEAN = $(INCLUDE_KERNEL) $(INCLUDE_ARCH) $(INCLUDE_LIBARCH)
-EXTRA_OUTPUT = $(LINK)
-
-INCLUDE_KERNEL = include/kernel
-INCLUDE_ARCH = include/arch
-INCLUDE_LIBARCH = include/libarch
-
-OUTPUT = libc.a
-
-GENERIC_SOURCES = \
-	generic/libc.c \
-	generic/ddi.c \
-	generic/as.c \
-	generic/cap.c \
-	generic/clipboard.c \
-	generic/devmap.c \
-	generic/event.c \
-	generic/errno.c \
-	generic/mem.c \
-	generic/string.c \
-	generic/fibril.c \
-	generic/fibril_synch.c \
-	generic/pcb.c \
-	generic/smc.c \
-	generic/thread.c \
-	generic/tls.c \
-	generic/task.c \
-	generic/futex.c \
-	generic/io/asprintf.c \
-	generic/io/io.c \
-	generic/io/printf.c \
-	generic/io/klog.c \
-	generic/io/snprintf.c \
-	generic/io/vprintf.c \
-	generic/io/vsnprintf.c \
-	generic/io/printf_core.c \
-	generic/io/console.c \
-	generic/malloc.c \
-	generic/sysinfo.c \
-	generic/ipc.c \
-	generic/async.c \
-	generic/loader.c \
-	generic/getopt.c \
-	generic/adt/list.o \
-	generic/adt/hash_table.o \
-	generic/time.c \
-	generic/err.c \
-	generic/stdlib.c \
-	generic/mman.c \
-	generic/udebug.c \
-	generic/vfs/vfs.c \
-	generic/vfs/canonify.c \
-	generic/stacktrace.c
-
-SOURCES = \
-	$(GENERIC_SOURCES) \
-	$(ARCH_SOURCES)
-
-include ../Makefile.common
-
-$(INCLUDE_ARCH): $(INCLUDE_KERNEL) $(INCLUDE_KERNEL)/arch
-	ln -sfn kernel/arch $@
-
-$(INCLUDE_LIBARCH): arch/$(UARCH)/include
-	ln -sfn ../$< $@
-
-$(INCLUDE_KERNEL)/arch: ../../../kernel/generic/include/arch $(INCLUDE_KERNEL)
-
-$(INCLUDE_KERNEL): ../../../kernel/generic/include/
-	ln -sfn ../$< $@
-
-$(LINK): $(LINK).in
-	$(GCC) $(DEFS) $(CFLAGS) -DLIBC_PREFIX=$(LIBC_PREFIX) -E -x c $< | grep -v "^\#" > $@
Index: pace/lib/libc/Makefile.toolchain
===================================================================
--- uspace/lib/libc/Makefile.toolchain	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,85 +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.
-#
-
-OPTIMIZATION = 3
-
-GCC_CFLAGS = -I$(LIBC_PREFIX)/include -O$(OPTIMIZATION) -imacros $(LIBC_PREFIX)/../../../config.h \
-	-fexec-charset=UTF-8 -fwide-exec-charset=UTF-32$(ENDIANESS) \
-	-finput-charset=UTF-8 -ffreestanding -fno-builtin -nostdlib -nostdinc \
-	-Wall -Wextra -Wno-clobbered -Wno-unused-parameter -Wmissing-prototypes \
-	-Werror-implicit-function-declaration -Wwrite-strings \
-	-Werror -pipe -g -D__$(ENDIANESS)__
-
-ICC_CFLAGS = -I$(LIBC_PREFIX)/include -O$(OPTIMIZATION) -imacros $(LIBC_PREFIX)/../../../config.h \
-	-fexec-charset=UTF-8 -fwide-exec-charset=UTF-32$(ENDIANESS) \
-	-finput-charset=UTF-8 -ffreestanding -fno-builtin -nostdlib -nostdinc \
-	-Wall -Wextra -Wno-clobbered -Wno-unused-parameter -Wmissing-prototypes \
-	-Werror-implicit-function-declaration -Wwrite-strings \
-	-Werror -pipe -g -D__$(ENDIANESS)__
-
-CLANG_CFLAGS = -I$(LIBC_PREFIX)/include -O$(OPTIMIZATION) -imacros $(LIBC_PREFIX)/../../../config.h \
-	-fexec-charset=UTF-8 -fwide-exec-charset=UTF-32$(ENDIANESS) \
-	-finput-charset=UTF-8 -ffreestanding -fno-builtin -nostdlib -nostdinc \
-	-Wall -Wextra -Wno-unused-parameter -Wmissing-prototypes \
-	-Werror-implicit-function-declaration -Wwrite-strings \
-	-pipe -g -arch $(CLANG_ARCH) -D__$(ENDIANESS)__
-
-LFLAGS = -M -N $(SOFTINT_PREFIX)/libsoftint.a
-AFLAGS =
-
-## Setup platform configuration
-#
-
--include $(LIBC_PREFIX)/../../../Makefile.common
--include $(LIBC_PREFIX)/../../../Makefile.config
--include $(LIBC_PREFIX)/arch/$(UARCH)/Makefile.inc
-
-## Compilation options
-#
-
-JOBFILE = $(LIBC_PREFIX)/../../../tools/jobfile.py
-
-ifeq ($(COMPILER),gcc_cross)
-	CFLAGS = $(GCC_CFLAGS)
-	DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS)
-endif
-
-ifeq ($(COMPILER),gcc_native)
-	CFLAGS = $(GCC_CFLAGS)
-	DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS)
-endif
-
-ifeq ($(COMPILER),icc)
-	CFLAGS = $(ICC_CFLAGS)
-	DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS)
-endif
-
-ifeq ($(COMPILER),clang)
-	CFLAGS = $(CLANG_CFLAGS)
-	DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS)
-endif
Index: pace/lib/libc/arch/abs32le/Makefile.inc
===================================================================
--- uspace/lib/libc/arch/abs32le/Makefile.inc	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,41 +1,0 @@
-#
-# Copyright (c) 2010 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.
-#
-
-ifeq ($(COMPILER),clang)
-	CLANG_ARCH = i386
-endif
-
-ARCH_SOURCES = \
-	arch/$(UARCH)/src/entry.c \
-	arch/$(UARCH)/src/thread_entry.c \
-	arch/$(UARCH)/src/fibril.c \
-	arch/$(UARCH)/src/tls.c \
-	arch/$(UARCH)/src/syscall.c \
-	arch/$(UARCH)/src/stacktrace.c
-
-ENDIANESS = LE
Index: pace/lib/libc/arch/abs32le/_link.ld.in
===================================================================
--- uspace/lib/libc/arch/abs32le/_link.ld.in	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,53 +1,0 @@
-STARTUP(LIBC_PREFIX/arch/UARCH/src/entry.o)
-ENTRY(__entry)
-
-PHDRS {
-	text PT_LOAD FLAGS(5);
-	data PT_LOAD FLAGS(6);
-}
-
-SECTIONS {
-	. = 0x1000 + SIZEOF_HEADERS;
-	
-	.text : {
-		*(.text);
-		*(.rodata*);
-	} :text
-	
-	. = . + 0x1000;
-	
-	.data : {
-		*(.data);
-		*(.data.rel*);
-	} :data
-	
-	.tdata : {
-		_tdata_start = .;
-		*(.tdata);
-		*(.gnu.linkonce.tb.*);
-		_tdata_end = .;
-		_tbss_start = .;
-		*(.tbss);
-		_tbss_end = .;
-	} :data
-	
-	_tls_alignment = ALIGNOF(.tdata);
-	
-	.sbss : {
-		*(.scommon);
-		*(.sbss);
-	}
-	
-	.bss : {
-		*(COMMON);
-		*(.bss);
-	} :data
-	
-	. = ALIGN(0x1000);
-	
-	_heap = .;
-	
-	/DISCARD/ : {
-		*(*);
-	}
-}
Index: pace/lib/libc/arch/abs32le/include/atomic.h
===================================================================
--- uspace/lib/libc/arch/abs32le/include/atomic.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,99 +1,0 @@
-/*
- * Copyright (c) 2010 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 libcabs32le
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_abs32le_ATOMIC_H_
-#define LIBC_abs32le_ATOMIC_H_
-
-#include <bool.h>
-
-#define LIBC_ARCH_ATOMIC_H_
-#define CAS
-
-#include <atomicdflt.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) {
-	/* On real hardware the increment has to be done
-	   as an atomic action. */
-	
-	val->count++;
-}
-
-static inline void atomic_dec(atomic_t *val) {
-	/* On real hardware the decrement has to be done
-	   as an atomic action. */
-	
-	val->count++;
-}
-
-static inline atomic_count_t atomic_postinc(atomic_t *val)
-{
-	/* On real hardware both the storing of the previous
-	   value and the increment have to be done as a single
-	   atomic action. */
-	
-	atomic_count_t prev = val->count;
-	
-	val->count++;
-	return prev;
-}
-
-static inline atomic_count_t atomic_postdec(atomic_t *val)
-{
-	/* On real hardware both the storing of the previous
-	   value and the decrement have to be done as a single
-	   atomic action. */
-	
-	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: pace/lib/libc/arch/abs32le/include/config.h
===================================================================
--- uspace/lib/libc/arch/abs32le/include/config.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,44 +1,0 @@
-/*
- * Copyright (c) 2010 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 libcabs32le
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_abs32le_CONFIG_H_
-#define LIBC_abs32le_CONFIG_H_
-
-#define PAGE_WIDTH  12
-#define PAGE_SIZE   (1 << PAGE_WIDTH)
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/arch/abs32le/include/ddi.h
===================================================================
--- uspace/lib/libc/arch/abs32le/include/ddi.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,65 +1,0 @@
-/*
- * Copyright (c) 2010 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.
- */
-
-/** @file
- */
-
-#ifndef LIBC_abs32le_DDI_H_
-#define LIBC_abs32le_DDI_H_
-
-static inline void pio_write_8(ioport8_t *port, uint8_t v)
-{
-	*port = v;
-}
-
-static inline void pio_write_16(ioport16_t *port, uint16_t v)
-{
-	*port = v;
-}
-
-static inline void pio_write_32(ioport32_t *port, uint32_t v)
-{
-	*port = v;
-}
-
-static inline uint8_t pio_read_8(ioport8_t *port)
-{
-	return *port;
-}
-
-static inline uint16_t pio_read_16(ioport16_t *port)
-{
-	return *port;
-}
-
-static inline uint32_t pio_read_32(ioport32_t *port)
-{
-	return *port;
-}
-
-#endif
Index: pace/lib/libc/arch/abs32le/include/entry.h
===================================================================
--- uspace/lib/libc/arch/abs32le/include/entry.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,44 +1,0 @@
-/*
- * Copyright (c) 2010 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 libc
- * @{
- */
-/**
- * @file
- */
-
-#ifndef LIBC_abs32le_ENTRY_H_
-#define LIBC_abs32le_ENTRY_H_
-
-extern void __entry(void);
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/arch/abs32le/include/faddr.h
===================================================================
--- uspace/lib/libc/arch/abs32le/include/faddr.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,45 +1,0 @@
-/*
- * Copyright (c) 2010 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 libabs32le
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_abs32le_FADDR_H_
-#define LIBC_abs32le_FADDR_H_
-
-#include <libarch/types.h>
-
-#define FADDR(fptr)  ((uintptr_t) (fptr))
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/arch/abs32le/include/fibril.h
===================================================================
--- uspace/lib/libc/arch/abs32le/include/fibril.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,62 +1,0 @@
-/*
- * Copyright (c) 2010 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 libcabs32le
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_abs32le_FIBRIL_H_
-#define LIBC_abs32le_FIBRIL_H_
-
-#include <sys/types.h>
-
-#define SP_DELTA  0
-
-#define context_set(ctx, _pc, stack, size, ptls) \
-	do { \
-		(ctx)->pc = (uintptr_t) (_pc); \
-		(ctx)->sp = ((uintptr_t) (stack)) + (size) - SP_DELTA; \
-		(ctx)->tls = ((uintptr_t) (ptls)) + sizeof(tcb_t); \
-	} while (0)
-
-/*
- * On real hardware this stores the registers which
- * need to be preserved across function calls.
- */
-typedef struct {
-	uintptr_t sp;
-	uintptr_t pc;
-	uintptr_t tls;
-} context_t;
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/arch/abs32le/include/inttypes.h
===================================================================
--- uspace/lib/libc/arch/abs32le/include/inttypes.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,69 +1,0 @@
-/*
- * Copyright (c) 2010 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 libcabs32le
- * @{
- */
-
-#ifndef LIBC_abs32le_INTTYPES_H_
-#define LIBC_abs32le_INTTYPES_H_
-
-#define PRId8 "d"
-#define PRId16 "d"
-#define PRId32 "d"
-#define PRId64 "lld"
-#define PRIdPTR "d"
-
-#define PRIo8 "o"
-#define PRIo16 "o"
-#define PRIo32 "o"
-#define PRIo64 "llo"
-#define PRIoPTR "o"
-
-#define PRIu8 "u"
-#define PRIu16 "u"
-#define PRIu32 "u"
-#define PRIu64 "llu"
-#define PRIuPTR "u"
-
-#define PRIx8 "x"
-#define PRIx16 "x"
-#define PRIx32 "x"
-#define PRIx64 "llx"
-#define PRIxPTR "x"
-
-#define PRIX8 "X"
-#define PRIX16 "X"
-#define PRIX32 "X"
-#define PRIX64 "llX"
-#define PRIXPTR "X"
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/arch/abs32le/include/istate.h
===================================================================
--- uspace/lib/libc/arch/abs32le/include/istate.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,64 +1,0 @@
-/*
- * Copyright (c) 2010 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 debug
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_abs32le__ISTATE_H_
-#define LIBC_abs32le__ISTATE_H_
-
-#include <sys/types.h>
-
-/** Interrupt context.
- *
- * On real hardware this stores the registers which
- * need to be preserved during interupts.
- */
-typedef struct istate {
-	uintptr_t ip;
-	uintptr_t fp;
-	uint32_t stack[];
-} istate_t;
-
-static inline uintptr_t istate_get_pc(istate_t *istate)
-{
-	return istate->ip;
-}
-
-static inline uintptr_t istate_get_fp(istate_t *istate)
-{
-	return istate->fp;
-}
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/arch/abs32le/include/limits.h
===================================================================
--- uspace/lib/libc/arch/abs32le/include/limits.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,51 +1,0 @@
-/*
- * Copyright (c) 2010 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 libcabs32le
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_abs32le__LIMITS_H_
-#define LIBC_abs32le__LIMITS_H_
-
-#define LONG_MIN MIN_INT32
-#define LONG_MAX MAX_INT32
-#define ULONG_MIN MIN_UINT32
-#define ULONG_MAX MAX_UINT32
-
-#define SIZE_MIN MIN_UINT32
-#define SIZE_MAX MAX_UINT32
-#define SSIZE_MIN MIN_INT32
-#define SSIZE_MAX MAX_INT32
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/arch/abs32le/include/syscall.h
===================================================================
--- uspace/lib/libc/arch/abs32le/include/syscall.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,56 +1,0 @@
-/*
- * Copyright (c) 2010 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 libc
- * @{
- */
-/**
- * @file
- */
-
-#ifndef LIBC_abs32le_SYSCALL_H_
-#define LIBC_abs32le_SYSCALL_H_
-
-#include <sys/types.h>
-#include <kernel/syscall/syscall.h>
-
-#define __syscall0  __syscall
-#define __syscall1  __syscall
-#define __syscall2  __syscall
-#define __syscall3  __syscall
-#define __syscall4  __syscall
-#define __syscall5  __syscall
-#define __syscall6  __syscall
-
-extern sysarg_t __syscall(const sysarg_t, const sysarg_t, const sysarg_t,
-    const sysarg_t, const sysarg_t, const sysarg_t, const syscall_t);
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/arch/abs32le/include/thread.h
===================================================================
--- uspace/lib/libc/arch/abs32le/include/thread.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,41 +1,0 @@
-/*
- * Copyright (c) 2010 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 libcabs32le
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_abs32le_THREAD_H_
-#define LIBC_abs32le_THREAD_H_
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/arch/abs32le/include/tls.h
===================================================================
--- uspace/lib/libc/arch/abs32le/include/tls.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,62 +1,0 @@
-/*
- * Copyright (c) 2010 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 libcabs32le
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_abs32le_TLS_H_
-#define LIBC_abs32le_TLS_H_
-
-#define CONFIG_TLS_VARIANT_2
-
-#include <libc.h>
-#include <unistd.h>
-
-typedef struct {
-	void *self;
-	void *fibril_data;
-} tcb_t;
-
-static inline void __tcb_set(tcb_t *tcb)
-{
-}
-
-static inline tcb_t *__tcb_get(void)
-{
-	return NULL;
-}
-
-extern uintptr_t __aeabi_read_tp(void);
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/arch/abs32le/include/types.h
===================================================================
--- uspace/lib/libc/arch/abs32le/include/types.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,62 +1,0 @@
-/*
- * Copyright (c) 2010 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 libcabs32le
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_abs32le_TYPES_H_
-#define LIBC_abs32le_TYPES_H_
-
-#define __32_BITS__
-
-typedef unsigned int sysarg_t;
-
-typedef char int8_t;
-typedef short int int16_t;
-typedef int int32_t;
-typedef long long int int64_t;
-
-typedef unsigned char uint8_t;
-typedef unsigned short int uint16_t;
-typedef unsigned int uint32_t;
-typedef unsigned long long int uint64_t;
-
-typedef int32_t ssize_t;
-typedef uint32_t size_t;
-
-typedef uint32_t uintptr_t;
-typedef uint32_t atomic_count_t;
-typedef int32_t atomic_signed_t;
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/arch/abs32le/src/entry.c
===================================================================
--- uspace/lib/libc/arch/abs32le/src/entry.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,43 +1,0 @@
-/*
- * Copyright (c) 2010 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.
- */
-
-/** @file
- */
-
-#include <libc.h>
-#include <unistd.h>
-#include <libarch/entry.h>
-
-void __entry(void)
-{
-	__main(NULL);
-	__exit();
-}
-
-/** @}
- */
Index: pace/lib/libc/arch/abs32le/src/fibril.c
===================================================================
--- uspace/lib/libc/arch/abs32le/src/fibril.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,46 +1,0 @@
-/*
- * Copyright (c) 2010 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.
- */
-
-/** @file
- */
-
-#include <fibril.h>
-#include <bool.h>
-
-int context_save(context_t *ctx)
-{
-	return 1;
-}
-
-void context_restore(context_t *ctx)
-{
-	while (true);
-}
-
-/** @}
- */
Index: pace/lib/libc/arch/abs32le/src/stacktrace.c
===================================================================
--- uspace/lib/libc/arch/abs32le/src/stacktrace.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,67 +1,0 @@
-/*
- * Copyright (c) 2010 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.
- */
-
-/** @file
- */
-
-#include <sys/types.h>
-#include <unistd.h>
-#include <bool.h>
-#include <stacktrace.h>
-
-bool stacktrace_fp_valid(stacktrace_t *st, uintptr_t fp)
-{
-	return true;
-}
-
-int stacktrace_fp_prev(stacktrace_t *st, uintptr_t fp, uintptr_t *prev)
-{
-	return 0;
-}
-
-int stacktrace_ra_get(stacktrace_t *st, uintptr_t fp, uintptr_t *ra)
-{
-	return 0;
-}
-
-void stacktrace_prepare(void)
-{
-}
-
-uintptr_t stacktrace_fp_get(void)
-{
-	return NULL;
-}
-
-uintptr_t stacktrace_pc_get(void)
-{
-	return NULL;
-}
-
-/** @}
- */
Index: pace/lib/libc/arch/abs32le/src/syscall.c
===================================================================
--- uspace/lib/libc/arch/abs32le/src/syscall.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,43 +1,0 @@
-/*
- * Copyright (c) 2010 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.
- */
-
-/** @file
- */
-
-#include <sys/types.h>
-#include <libarch/syscall.h>
-
-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)
-{
-	return 0;
-}
-
-/** @}
- */
Index: pace/lib/libc/arch/abs32le/src/thread_entry.c
===================================================================
--- uspace/lib/libc/arch/abs32le/src/thread_entry.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,41 +1,0 @@
-/*
- * Copyright (c) 2010 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.
- */
-
-/** @file
- */
-
-#include <unistd.h>
-#include <thread.h>
-
-void __thread_entry(void)
-{
-	__thread_main(NULL);
-}
-
-/** @}
- */
Index: pace/lib/libc/arch/abs32le/src/tls.c
===================================================================
--- uspace/lib/libc/arch/abs32le/src/tls.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,52 +1,0 @@
-/*
- * Copyright (c) 2010 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.
- */
-
-/** @file
- */
-
-#include <tls.h>
-#include <sys/types.h>
-#include <unistd.h>
-
-tcb_t * __alloc_tls(void **data, size_t size)
-{
-	return tls_alloc_variant_2(data, size);
-}
-
-void __free_tls_arch(tcb_t *tcb, size_t size)
-{
-	tls_free_variant_2(tcb, size);
-}
-
-uintptr_t __aeabi_read_tp(void)
-{
-	return NULL;
-}
-
-/** @}
- */
Index: pace/lib/libc/arch/amd64/Makefile.inc
===================================================================
--- uspace/lib/libc/arch/amd64/Makefile.inc	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,46 +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.
-#
-
-CLANG_ARCH = x86_64
-
-ARCH_SOURCES = \
-	arch/$(UARCH)/src/entry.s \
-	arch/$(UARCH)/src/thread_entry.s \
-	arch/$(UARCH)/src/syscall.S \
-	arch/$(UARCH)/src/fibril.S \
-	arch/$(UARCH)/src/tls.c \
-	arch/$(UARCH)/src/stacktrace.c \
-	arch/$(UARCH)/src/stacktrace_asm.S
-
-GCC_CFLAGS += -fno-omit-frame-pointer
-LFLAGS += -N
-
-ENDIANESS = LE
-
-BFD_NAME = elf64-x86-64
-BFD_ARCH = i386:x86-64
Index: pace/lib/libc/arch/amd64/_link.ld.in
===================================================================
--- uspace/lib/libc/arch/amd64/_link.ld.in	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,46 +1,0 @@
-STARTUP(LIBC_PREFIX/arch/UARCH/src/entry.o)
-ENTRY(__entry)
-
-PHDRS {
-	text PT_LOAD FLAGS(5);
-	data PT_LOAD FLAGS(6);
-}
-
-SECTIONS {
-	. = 0x1000 + SIZEOF_HEADERS;
-	
-	.init : {
-		*(.init);
-	} :text
-	.text : {
-		*(.text);
-		*(.rodata*);
-	} :text
-
-	. = . + 0x1000;
-
-	.data : {
-		*(.data);
-	} :data
-	.tdata : {
-		_tdata_start = .;
-		*(.tdata);
-		_tdata_end = .;
-		_tbss_start = .;
-		*(.tbss);
-		_tbss_end = .;
-	} :data
-	_tls_alignment = ALIGNOF(.tdata);
-	.bss : {
-		*(COMMON);
-		*(.bss);
-	} :data
-
-	. = ALIGN(0x1000);
-	_heap = .;
-	
-	/DISCARD/ : {
-		*(*);
-	}
-
-}
Index: pace/lib/libc/arch/amd64/include/atomic.h
===================================================================
--- uspace/lib/libc/arch/amd64/include/atomic.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,92 +1,0 @@
-/*
- * Copyright (c) 2001-2004 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 libcamd64 amd64
- * @ingroup lc
- * @brief	amd64 architecture dependent parts of libc
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_amd64_ATOMIC_H_
-#define LIBC_amd64_ATOMIC_H_
-
-#define LIBC_ARCH_ATOMIC_H_
-
-#include <atomicdflt.h>
-
-static inline void atomic_inc(atomic_t *val)
-{
-	asm volatile (
-		"lock incq %[count]\n"
-		: [count] "+m" (val->count)
-	);
-}
-
-static inline void atomic_dec(atomic_t *val)
-{
-	asm volatile (
-		"lock decq %[count]\n"
-		: [count] "+m" (val->count)
-	);
-}
-
-static inline atomic_count_t atomic_postinc(atomic_t *val)
-{
-	atomic_count_t r = 1;
-	
-	asm volatile (
-		"lock xaddq %[r], %[count]\n"
-		: [count] "+m" (val->count),
-		  [r] "+r" (r)
-	);
-	
-	return r;
-}
-
-static inline atomic_count_t atomic_postdec(atomic_t *val)
-{
-	atomic_count_t r = -1;
-	
-	asm volatile (
-		"lock xaddq %[r], %[count]\n"
-		: [count] "+m" (val->count),
-		  [r] "+r" (r)
-	);
-	
-	return r;
-}
-
-#define atomic_preinc(val)  (atomic_postinc(val) + 1)
-#define atomic_predec(val)  (atomic_postdec(val) - 1)
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/arch/amd64/include/config.h
===================================================================
--- uspace/lib/libc/arch/amd64/include/config.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(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 libcamd64
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_amd64_CONFIG_H_
-#define LIBC_amd64_CONFIG_H_
-
-#define PAGE_WIDTH	12
-#define PAGE_SIZE	(1 << PAGE_WIDTH)
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/arch/amd64/include/ddi.h
===================================================================
--- uspace/lib/libc/arch/amd64/include/ddi.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,1 +1,0 @@
-../../ia32/include/ddi.h
Index: pace/lib/libc/arch/amd64/include/faddr.h
===================================================================
--- uspace/lib/libc/arch/amd64/include/faddr.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(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 libcamd64
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_amd64_FADDR_H_
-#define LIBC_amd64_FADDR_H_
-
-#include <libarch/types.h>
-
-#define FADDR(fptr)		((uintptr_t) (fptr))
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/arch/amd64/include/fibril.h
===================================================================
--- uspace/lib/libc/arch/amd64/include/fibril.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,75 +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 libcamd64
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_amd64_FIBRIL_H_
-#define LIBC_amd64_FIBRIL_H_
-
-#include <sys/types.h>
-
-/* According to ABI the stack MUST be aligned on 
- * 16-byte boundary. If it is not, the va_arg calling will
- * panic sooner or later
- */
-#define SP_DELTA     16
-
-#define context_set(c, _pc, stack, size, ptls) \
-	do { \
-		(c)->pc = (sysarg_t) (_pc); \
-		(c)->sp = ((sysarg_t) (stack)) + (size) - SP_DELTA; \
-		(c)->tls = (sysarg_t) (ptls); \
-		(c)->rbp = 0; \
-	} while (0)
-
-/* We include only registers that must be preserved
- * during function call
- */
-typedef struct {
-    uint64_t sp;
-    uint64_t pc;
-    
-    uint64_t rbx;
-    uint64_t rbp;
-
-    uint64_t r12;
-    uint64_t r13;
-    uint64_t r14;
-    uint64_t r15;
-
-    uint64_t tls;
-} context_t;
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/arch/amd64/include/inttypes.h
===================================================================
--- uspace/lib/libc/arch/amd64/include/inttypes.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,76 +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 libcamd64
- * @{
- */
-/** @file Macros for format specifiers.
- *
- * Macros for formatting stdint types as specified in section
- * 7.8.1 Macros for format specifiers of the C99 draft specification
- * (ISO/IEC 9899:201x). Only some macros from the specification are
- * implemented.
- */
-
-#ifndef LIBC_amd64_INTTYPES_H_
-#define LIBC_amd64_INTTYPES_H_
-
-#define PRId8 "d"
-#define PRId16 "d"
-#define PRId32 "d"
-#define PRId64 "lld"
-#define PRIdPTR "lld"
-
-#define PRIo8 "o"
-#define PRIo16 "o"
-#define PRIo32 "o"
-#define PRIo64 "llo"
-#define PRIoPTR "llo"
-
-#define PRIu8 "u"
-#define PRIu16 "u"
-#define PRIu32 "u"
-#define PRIu64 "llu"
-#define PRIuPTR "llu"
-
-#define PRIx8 "x"
-#define PRIx16 "x"
-#define PRIx32 "x"
-#define PRIx64 "llx"
-#define PRIxPTR "llx"
-
-#define PRIX8 "X"
-#define PRIX16 "X"
-#define PRIX32 "X"
-#define PRIX64 "llX"
-#define PRIXPTR "llX"
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/arch/amd64/include/istate.h
===================================================================
--- uspace/lib/libc/arch/amd64/include/istate.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,75 +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 libcamd64
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_amd64_ISTATE_H_
-#define LIBC_amd64_ISTATE_H_
-
-#include <sys/types.h>
-
-/** Interrupt context.
- *
- * This is a copy of the kernel definition with which it must be kept in sync.
- */
-typedef struct istate {
-	uint64_t rax;
-	uint64_t rcx;
-	uint64_t rdx;
-	uint64_t rsi;
-	uint64_t rdi;
-	uint64_t r8;
-	uint64_t r9;
-	uint64_t r10;
-	uint64_t r11;
-	uint64_t rbp;
-	uint64_t error_word;
-	uint64_t rip;
-	uint64_t cs;
-	uint64_t rflags;
-	uint64_t stack[]; /* Additional data on stack */
-} istate_t;
-
-static inline uintptr_t istate_get_pc(istate_t *istate)
-{
-	return istate->rip;
-}
-
-static inline uintptr_t istate_get_fp(istate_t *istate)
-{
-	return istate->rbp;
-}
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/arch/amd64/include/limits.h
===================================================================
--- uspace/lib/libc/arch/amd64/include/limits.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,51 +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 libcamd64
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_amd64_LIMITS_H_
-#define LIBC_amd64_LIMITS_H_
-
-#define LONG_MIN MIN_INT64
-#define LONG_MAX MAX_INT64
-#define ULONG_MIN MIN_UINT64
-#define ULONG_MAX MAX_UINT64
-
-#define SIZE_MIN MIN_UINT64
-#define SIZE_MAX MAX_UINT64
-#define SSIZE_MIN MIN_INT64
-#define SSIZE_MAX MAX_INT64
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/arch/amd64/include/stackarg.h
===================================================================
--- uspace/lib/libc/arch/amd64/include/stackarg.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(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 libcamd64
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_STACKARG_H_
-#define LIBC_STACKARG_H_
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/arch/amd64/include/syscall.h
===================================================================
--- uspace/lib/libc/arch/amd64/include/syscall.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,46 +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 libc
- * @{
- */
-/**
- * @file
- */
-
-#ifndef LIBC_amd64_SYSCALL_H_
-#define LIBC_amd64_SYSCALL_H_
-
-#define LIBARCH_SYSCALL_GENERIC
-
-#include <syscall.h>
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/arch/amd64/include/thread.h
===================================================================
--- uspace/lib/libc/arch/amd64/include/thread.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,41 +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 libcamd64
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_amd64_THREAD_H_
-#define LIBC_amd64_THREAD_H_
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/arch/amd64/include/tls.h
===================================================================
--- uspace/lib/libc/arch/amd64/include/tls.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,63 +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 libcamd64
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_amd64_TLS_H_
-#define LIBC_amd64_TLS_H_
-
-#define CONFIG_TLS_VARIANT_2
-
-#include <libc.h>
-
-typedef struct {
-	void *self;
-	void *fibril_data;
-} tcb_t;
-
-static inline void __tcb_set(tcb_t *tcb)
-{
-	__SYSCALL1(SYS_TLS_SET, (sysarg_t) tcb);
-}
-
-static inline tcb_t * __tcb_get(void)
-{
-	void * retval;
-
-	asm ("movq %%fs:0, %0" : "=r"(retval));
-	return retval;
-}
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/arch/amd64/include/types.h
===================================================================
--- uspace/lib/libc/arch/amd64/include/types.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,62 +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 libcamd64
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_amd64_TYPES_H_
-#define LIBC_amd64_TYPES_H_
-
-#define __64_BITS__
-
-typedef unsigned long long sysarg_t;
-
-typedef signed char int8_t;
-typedef short int int16_t;
-typedef int int32_t;
-typedef long long int int64_t;
-
-typedef unsigned char uint8_t;
-typedef unsigned short int uint16_t;
-typedef unsigned int uint32_t;
-typedef unsigned long long int uint64_t;
-
-typedef int64_t ssize_t;
-typedef uint64_t size_t;
-
-typedef uint64_t uintptr_t;
-typedef uint64_t atomic_count_t;
-typedef int64_t atomic_signed_t;
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/arch/amd64/src/entry.s
===================================================================
--- uspace/lib/libc/arch/amd64/src/entry.s	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,50 +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.
-#
-
-.section .init, "ax"
-
-.org 0
-
-.globl __entry
-
-## User-space task entry point
-#
-# %rdi contains the PCB pointer
-#
-__entry:
-	#
-	# Create the first stack frame.
-	#
-	pushq $0
-	mov %rsp, %rbp
-	
-	# %rdi was deliberately chosen as the first argument is also in %rdi
-	# Pass PCB pointer to __main (no operation)
-	call __main
-
-	call __exit
Index: pace/lib/libc/arch/amd64/src/fibril.S
===================================================================
--- uspace/lib/libc/arch/amd64/src/fibril.S	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,73 +1,0 @@
-#
-# Copyright (c) 2001-2004 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.
-#
-
-.text
-
-.global context_save
-.global context_restore
-
-#include <kernel/arch/context_offset.h>
-
-## Save current CPU context
-#
-# Save CPU context to context_t variable
-# pointed by the 1st argument. Returns 1 in EAX.
-#
-context_save:
-	movq (%rsp), %rdx     # the caller's return %eip
-	
-	# In %edi is passed 1st argument
-	CONTEXT_SAVE_ARCH_CORE %rdi %rdx 
-	
-	# Save TLS
-	movq %fs:0, %rax
-	movq %rax, OFFSET_TLS(%rdi)
-		
-	xorq %rax,%rax		# context_save returns 1
-	incq %rax
-	ret
-
-
-## Restore current CPU context
-#
-# Restore CPU context from context_t variable
-# pointed by the 1st argument. Returns 0 in EAX.
-#
-context_restore:
-	
-	CONTEXT_RESTORE_ARCH_CORE %rdi %rdx
-	
-	movq %rdx,(%rsp)
-
-	# Set thread local storage
-	movq OFFSET_TLS(%rdi), %rdi   # Set arg1 to TLS addr
-	movq $1, %rax		# SYS_TLS_SET
-	syscall
-
-	xorq %rax,%rax		# context_restore returns 0
-	ret
Index: pace/lib/libc/arch/amd64/src/stacktrace.c
===================================================================
--- uspace/lib/libc/arch/amd64/src/stacktrace.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,62 +1,0 @@
-/*
- * Copyright (c) 2010 Jakub Jermar
- * 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 libcamd64 amd64
- * @ingroup lc
- * @{
- */
-/** @file
- */
-
-#include <sys/types.h>
-#include <bool.h>
-
-#include <stacktrace.h>
-
-#define FRAME_OFFSET_FP_PREV	0
-#define FRAME_OFFSET_RA		8
-
-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)
-{
-	return (*st->read_uintptr)(st->op_arg, fp + FRAME_OFFSET_FP_PREV, prev);
-}
-
-int stacktrace_ra_get(stacktrace_t *st, uintptr_t fp, uintptr_t *ra)
-{
-	return (*st->read_uintptr)(st->op_arg, fp + FRAME_OFFSET_RA, ra);
-}
-
-/** @}
- */
Index: pace/lib/libc/arch/amd64/src/stacktrace_asm.S
===================================================================
--- uspace/lib/libc/arch/amd64/src/stacktrace_asm.S	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,44 +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.
-#
-
-.text
-
-.global stacktrace_prepare
-.global stacktrace_fp_get
-.global stacktrace_pc_get
-
-stacktrace_prepare:
-	ret
-
-stacktrace_fp_get:
-	movq %rbp, %rax
-	ret
-
-stacktrace_pc_get:
-	movq (%rsp), %rax
-	ret
Index: pace/lib/libc/arch/amd64/src/syscall.S
===================================================================
--- uspace/lib/libc/arch/amd64/src/syscall.S	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,57 +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.
-#
-
-.text
-	
-.global __syscall
-	
-## Make a system call.
-#
-# @param rdi		First argument.
-# @param rsi		Second argument.
-# @param rdx		Third argument.
-# @param rcx		Fourth argument.
-# @param r8		Fifth argument.
-# @param r9		Sixth argument.
-# @param 8(%rsp)	Syscall number.
-#
-# @return		The return value will be stored in RAX.
-#
-__syscall:
-	#
-	# Move the syscall number into RAX.
-	movslq 8(%rsp), %rax
-
-	#
-	# Save RCX, the 4th argument, aside because RCX gets rewritten by the
-	# SYSCALL instruction.
-	#
-	movq %rcx, %r10
-	syscall
-	ret
-
Index: pace/lib/libc/arch/amd64/src/thread_entry.s
===================================================================
--- uspace/lib/libc/arch/amd64/src/thread_entry.s	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,49 +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.
-#
-
-.text
-
-.globl __thread_entry
-
-## User-space thread entry point for all but the first threads.
-#
-#
-__thread_entry:
-	#
-	# Create the first stack frame.
-	#
-	pushq $0
-	movq %rsp, %rbp
-
-	#
-	# RAX contains address of uarg
-	#
-	movq %rax, %rdi
-	call __thread_main
-	
-.end __thread_entry
Index: pace/lib/libc/arch/amd64/src/tls.c
===================================================================
--- uspace/lib/libc/arch/amd64/src/tls.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(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 libcamd64 amd64
- * @ingroup lc
- * @{
- */
-/** @file
-  * @ingroup libcia32
- */
-
-#include <tls.h>
-#include <sys/types.h>
-
-tcb_t * __alloc_tls(void **data, size_t size)
-{
-	return tls_alloc_variant_2(data, size);
-}
-
-void __free_tls_arch(tcb_t *tcb, size_t size)
-{
-	tls_free_variant_2(tcb, size);
-}
-
-/** @}
- */
Index: pace/lib/libc/arch/arm32/Makefile.inc
===================================================================
--- uspace/lib/libc/arch/arm32/Makefile.inc	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,46 +1,0 @@
-#
-# Copyright (c) 2007 Michal Kebrt
-# Copyright (c) 2007 Pavel Jancik
-# 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/thread_entry.s \
-	arch/$(UARCH)/src/syscall.c \
-	arch/$(UARCH)/src/fibril.S \
-	arch/$(UARCH)/src/tls.c \
-	arch/$(UARCH)/src/eabi.S \
-	arch/$(UARCH)/src/stacktrace.c \
-	arch/$(UARCH)/src/stacktrace_asm.S
-
-GCC_CFLAGS += -ffixed-r9 -mtp=soft -mapcs-frame -fno-omit-frame-pointer
-LFLAGS += -N $(SOFTINT_PREFIX)/libsoftint.a
-
-ENDIANESS = LE
-
-BFD_NAME = elf32-littlearm
-BFD_ARCH = arm
Index: pace/lib/libc/arch/arm32/_link.ld.in
===================================================================
--- uspace/lib/libc/arch/arm32/_link.ld.in	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,50 +1,0 @@
-STARTUP(LIBC_PREFIX/arch/UARCH/src/entry.o)
-ENTRY(__entry)
-
-PHDRS {
-	text PT_LOAD FLAGS(5);
-	data PT_LOAD FLAGS(6);
-}
-
-SECTIONS {
-	. = 0x1000 + SIZEOF_HEADERS;
-
-	.init : {
-		*(.init);
-	} : text
-	.text : {
-		*(.text);
-        *(.rodata*);
-	} :text
-
-	. = . + 0x1000;
-
-	.data : {
-		*(.opd);
-		*(.data .data.*);
-		*(.sdata);
-	} :data
-	.tdata : {
-		_tdata_start = .;
-		*(.tdata);
-		_tdata_end = .;
-		_tbss_start = .;
-		*(.tbss);
-		_tbss_end = .;
-	} :data
-	_tls_alignment = ALIGNOF(.tdata);
-	.bss : {
-		*(.sbss);
-		*(.scommon);
-        *(COMMON);
-        *(.bss);
-	} :data
-	
-	. = ALIGN(0x1000);
-	_heap = .;
-	
-	/DISCARD/ : {
-		*(*);
-	}
-
-}
Index: pace/lib/libc/arch/arm32/include/atomic.h
===================================================================
--- uspace/lib/libc/arch/arm32/include/atomic.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,204 +1,0 @@
-/*
- * Copyright (c) 2007 Michal Kebrt
- * 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 libcarm32
- * @{
- */
-/** @file
- *  @brief Atomic operations.
- */
-
-#ifndef LIBC_arm32_ATOMIC_H_
-#define LIBC_arm32_ATOMIC_H_
-
-#define LIBC_ARCH_ATOMIC_H_
-#define CAS
-
-#include <atomicdflt.h>
-#include <bool.h>
-#include <sys/types.h>
-
-extern uintptr_t *ras_page;
-
-static inline bool cas(atomic_t *val, atomic_count_t ov, atomic_count_t nv)
-{
-	atomic_count_t ret = 0;
-	
-	/*
-	 * The following instructions between labels 1 and 2 constitute a
-	 * Restartable Atomic Seqeunce. Should the sequence be non-atomic,
-	 * the kernel will restart it.
-	 */
-	asm volatile (
-		"1:\n"
-		"	adr %[ret], 1b\n"
-		"	str %[ret], %[rp0]\n"
-		"	adr %[ret], 2f\n"
-		"	str %[ret], %[rp1]\n"
-		"	ldr %[ret], %[addr]\n"
-		"	cmp %[ret], %[ov]\n"
-		"	streq %[nv], %[addr]\n"
-		"2:\n"
-		"	moveq %[ret], #1\n"
-		"	movne %[ret], #0\n"
-		: [ret] "+&r" (ret),
-		  [rp0] "=m" (ras_page[0]),
-		  [rp1] "=m" (ras_page[1]),
-		  [addr] "+m" (val->count)
-		: [ov] "r" (ov),
-		  [nv] "r" (nv)
-		: "memory"
-	);
-	
-	ras_page[0] = 0;
-	asm volatile (
-		"" ::: "memory"
-	);
-	ras_page[1] = 0xffffffff;
-	
-	return (bool) ret;
-}
-
-/** Atomic addition.
- *
- * @param val Where to add.
- * @param i   Value to be added.
- *
- * @return Value after addition.
- *
- */
-static inline atomic_count_t atomic_add(atomic_t *val, atomic_count_t i)
-{
-	atomic_count_t ret = 0;
-	
-	/*
-	 * The following instructions between labels 1 and 2 constitute a
-	 * Restartable Atomic Seqeunce. Should the sequence be non-atomic,
-	 * the kernel will restart it.
-	 */
-	asm volatile (
-		"1:\n"
-		"	adr %[ret], 1b\n"
-		"	str %[ret], %[rp0]\n"
-		"	adr %[ret], 2f\n"
-		"	str %[ret], %[rp1]\n"
-		"	ldr %[ret], %[addr]\n"
-		"	add %[ret], %[ret], %[imm]\n"
-		"	str %[ret], %[addr]\n"
-		"2:\n"
-		: [ret] "+&r" (ret),
-		  [rp0] "=m" (ras_page[0]),
-		  [rp1] "=m" (ras_page[1]),
-		  [addr] "+m" (val->count)
-		: [imm] "r" (i)
-	);
-	
-	ras_page[0] = 0;
-	asm volatile (
-		"" ::: "memory"
-	);
-	ras_page[1] = 0xffffffff;
-	
-	return ret;
-}
-
-
-/** Atomic increment.
- *
- * @param val Variable to be incremented.
- *
- */
-static inline void atomic_inc(atomic_t *val)
-{
-	atomic_add(val, 1);
-}
-
-
-/** Atomic decrement.
- *
- * @param val Variable to be decremented.
- *
- */
-static inline void atomic_dec(atomic_t *val)
-{
-	atomic_add(val, -1);
-}
-
-
-/** Atomic pre-increment.
- *
- * @param val Variable to be incremented.
- * @return    Value after incrementation.
- *
- */
-static inline atomic_count_t atomic_preinc(atomic_t *val)
-{
-	return atomic_add(val, 1);
-}
-
-
-/** Atomic pre-decrement.
- *
- * @param val Variable to be decremented.
- * @return    Value after decrementation.
- *
- */
-static inline atomic_count_t atomic_predec(atomic_t *val)
-{
-	return atomic_add(val, -1);
-}
-
-
-/** Atomic post-increment.
- *
- * @param val Variable to be incremented.
- * @return    Value before incrementation.
- *
- */
-static inline atomic_count_t atomic_postinc(atomic_t *val)
-{
-	return atomic_add(val, 1) - 1;
-}
-
-
-/** Atomic post-decrement.
- *
- * @param val Variable to be decremented.
- * @return    Value before decrementation.
- *
- */
-static inline atomic_count_t atomic_postdec(atomic_t *val)
-{
-	return atomic_add(val, -1) + 1;
-}
-
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/arch/arm32/include/config.h
===================================================================
--- uspace/lib/libc/arch/arm32/include/config.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,45 +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 libcarm32
- * @{
- */
-/** @file  
- *  @brief Configuration constants.
- */
-
-#ifndef LIBC_arm32_CONFIG_H_
-#define LIBC_arm32_CONFIG_H_
-
-#define PAGE_WIDTH	12
-#define PAGE_SIZE	(1 << PAGE_WIDTH)
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/arch/arm32/include/ddi.h
===================================================================
--- uspace/lib/libc/arch/arm32/include/ddi.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,69 +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 libcarm32
- */
-
-#ifndef LIBC_arm32_DDI_H_
-#define LIBC_arm32_DDI_H_
-
-#include <sys/types.h>
-#include <libarch/types.h>
-
-static inline void pio_write_8(ioport8_t *port, uint8_t v)
-{
-	*port = v;
-}
-
-static inline void pio_write_16(ioport16_t *port, uint16_t v)
-{
-	*port = v;
-}
-
-static inline void pio_write_32(ioport32_t *port, uint32_t v)
-{
-	*port = v;
-}
-
-static inline uint8_t pio_read_8(ioport8_t *port)
-{
-	return *port;
-}
-
-static inline uint16_t pio_read_16(ioport16_t *port)
-{
-	return *port;
-}
-
-static inline uint32_t pio_read_32(ioport32_t *port)
-{
-	return *port;
-}
-
-#endif
Index: pace/lib/libc/arch/arm32/include/faddr.h
===================================================================
--- uspace/lib/libc/arch/arm32/include/faddr.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,50 +1,0 @@
-/*
- * Copyright (c) 2007 Michal Kebrt
- * 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 libcarm32	
- * @{
- */
-/** @file 
- *  @brief Function address conversion.
- */
-
-#ifndef LIBC_arm32_FADDR_H_
-#define LIBC_arm32_FADDR_H_
-
-#include <libarch/types.h>
-
-/** Calculate absolute address of function referenced by fptr pointer.
- *
- * @param f Function pointer.
- */
-#define FADDR(f)	 (f)
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/arch/arm32/include/fibril.h
===================================================================
--- uspace/lib/libc/arch/arm32/include/fibril.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,92 +1,0 @@
-/*
- * Copyright (c) 2007 Michal Kebrt
- * 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 libcarm32	
- * @{
- */
-/** @file 
- *  @brief Fibrils related declarations.
- */
-
-#ifndef LIBC_arm32_FIBRIL_H_
-#define LIBC_arm32_FIBRIL_H_
-
-#include <sys/types.h>
-#include <align.h>
-#include <thread.h>
-
-/** Size of a stack item */
-#define STACK_ITEM_SIZE		4
-
-/** Stack alignment - see <a href="http://www.arm.com/support/faqdev/14269.html">ABI</a> for details */
-#define STACK_ALIGNMENT		8
-
-#define SP_DELTA	(0 + ALIGN_UP(STACK_ITEM_SIZE, STACK_ALIGNMENT))
-
-
-/** Sets data to the context. 
- *  
- *  @param c     Context (#context_t).
- *  @param _pc   Program counter.
- *  @param stack Stack address.
- *  @param size  Stack size.
- *  @param ptls  Pointer to the TCB.
- */
-#define context_set(c, _pc, stack, size, ptls) \
-	do { \
-		(c)->pc = (sysarg_t) (_pc); \
-		(c)->sp = ((sysarg_t) (stack)) + (size) - SP_DELTA; \
- 		(c)->tls = ((sysarg_t)(ptls)) + sizeof(tcb_t) + ARM_TP_OFFSET; \
-		(c)->fp = 0; \
-	} while (0)
-
-/** Fibril context. 
- *
- *  Only registers preserved accross function calls are included. r9 is used 
- *  to store a TLS address. -ffixed-r9 gcc forces gcc not to use this
- *  register. -mtp=soft forces gcc to use #__aeabi_read_tp to obtain
- *  TLS address.
- */
-typedef struct  {
-	uint32_t sp;
-	uint32_t pc;
-	uint32_t r4;
-	uint32_t r5;
-	uint32_t r6;
-	uint32_t r7;
-	uint32_t r8;
-	uint32_t tls;	/* r9 */
-	uint32_t r10;
-	uint32_t fp;	/* r11 */
-} context_t;
-
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/arch/arm32/include/inttypes.h
===================================================================
--- uspace/lib/libc/arch/arm32/include/inttypes.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,76 +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 libcarm32
- * @{
- */
-/** @file Macros for format specifiers.
- *
- * Macros for formatting stdint types as specified in section
- * 7.8.1 Macros for format specifiers of the C99 draft specification
- * (ISO/IEC 9899:201x). Only some macros from the specification are
- * implemented.
- */
-
-#ifndef LIBC_arm32_INTTYPES_H_
-#define LIBC_arm32_INTTYPES_H_
-
-#define PRId8 "d"
-#define PRId16 "d"
-#define PRId32 "d"
-#define PRId64 "lld"
-#define PRIdPTR "d"
-
-#define PRIo8 "o"
-#define PRIo16 "o"
-#define PRIo32 "o"
-#define PRIo64 "llo"
-#define PRIoPTR "o"
-
-#define PRIu8 "u"
-#define PRIu16 "u"
-#define PRIu32 "u"
-#define PRIu64 "llu"
-#define PRIuPTR "u"
-
-#define PRIx8 "x"
-#define PRIx16 "x"
-#define PRIx32 "x"
-#define PRIx64 "llx"
-#define PRIxPTR "x"
-
-#define PRIX8 "X"
-#define PRIX16 "X"
-#define PRIX32 "X"
-#define PRIX64 "llX"
-#define PRIXPTR "X"
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/arch/arm32/include/istate.h
===================================================================
--- uspace/lib/libc/arch/arm32/include/istate.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,79 +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 libcarm32
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_arm32__ISTATE_H_
-#define LIBC_arm32__ISTATE_H_
-
-#include <sys/types.h>
-
-/** Interrupt context.
- *
- * This is a copy of the kernel definition with which it must be kept in sync.
- */
-typedef struct istate {
-	uint32_t spsr;
-	uint32_t sp;
-	uint32_t lr;
-
-	uint32_t r0;
-	uint32_t r1;
-	uint32_t r2;
-	uint32_t r3;
-	uint32_t r4;
-	uint32_t r5;
-	uint32_t r6;
-	uint32_t r7;
-	uint32_t r8;
-	uint32_t r9;
-	uint32_t r10;
-	uint32_t fp;
-	uint32_t r12;
-
-	uint32_t pc;
-} istate_t;
-
-static inline uintptr_t istate_get_pc(istate_t *istate)
-{
-	return istate->pc;
-}
-
-static inline uintptr_t istate_get_fp(istate_t *istate)
-{
-	return istate->fp;
-}
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/arch/arm32/include/limits.h
===================================================================
--- uspace/lib/libc/arch/arm32/include/limits.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,52 +1,0 @@
-/*
- * Copyright (c) 2007 Michal Kebrt
- * 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 libcarm32
- * @{
- */
-/** @file
- *  @brief Limits declarations.
- */
-
-#ifndef LIBC_arm32__LIMITS_H_
-#define LIBC_arm32__LIMITS_H_
-
-#define LONG_MIN MIN_INT32
-#define LONG_MAX MAX_INT32
-#define ULONG_MIN MIN_UINT32
-#define ULONG_MAX MAX_UINT32
-
-#define SIZE_MIN MIN_UINT32
-#define SIZE_MAX MAX_UINT32
-#define SSIZE_MIN MIN_INT32
-#define SSIZE_MAX MAX_INT32
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/arch/arm32/include/stackarg.h
===================================================================
--- uspace/lib/libc/arch/arm32/include/stackarg.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,43 +1,0 @@
-/*
- * Copyright (c) 2007 Michal Kebrt
- * 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 libcarm32
- * @{
- */
-/** @file
- *  @brief Empty.
- */
-
-#ifndef LIBC_arm32_STACKARG_H_
-#define LIBC_arm32_STACKARG_H_
-
-#endif
-
-/** @}
- */
-
Index: pace/lib/libc/arch/arm32/include/syscall.h
===================================================================
--- uspace/lib/libc/arch/arm32/include/syscall.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,46 +1,0 @@
-/*
- * Copyright (c) 2007 Michal Kebrt
- * 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 libcarm32
- * @{
- */
-/** @file
- *  @brief
- */
-
-#ifndef LIBC_arm32_SYSCALL_H_
-#define LIBC_arm32_SYSCALL_H_
-
-#define LIBARCH_SYSCALL_GENERIC
-
-#include <syscall.h>
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/arch/arm32/include/thread.h
===================================================================
--- uspace/lib/libc/arch/arm32/include/thread.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,42 +1,0 @@
-/*
- * Copyright (c) 2007 Pavel Jancik
- * Copyright (c) 2007 Michal Kebrt
- * 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 libcarm32
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_arm32_THREAD_H_
-#define LIBC_arm32_THREAD_H_
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/arch/arm32/include/tls.h
===================================================================
--- uspace/lib/libc/arch/arm32/include/tls.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,99 +1,0 @@
-/*
- * Copyright (c) 2007 Pavel Jancik
- * Copyright (c) 2007 Michal Kebrt
- * 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 libcarm32
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_arm32_TLS_H_
-#define LIBC_arm32_TLS_H_
-
-#include <sys/types.h>
-
-#define CONFIG_TLS_VARIANT_1
-
-/** Offsets for accessing thread-local variables are shifted 8 bytes higher. */
-#define ARM_TP_OFFSET  (-8)
-
-/** TCB (Thread Control Block) struct. 
- *
- *  TLS starts just after this struct.
- */
-typedef struct {
-	/** Fibril data. */
-	void *fibril_data;
-} tcb_t;
-
-
-/** Sets TLS address to the r9 register.
- *
- *  @param tcb		TCB (TLS starts behind)
- */
-static inline void __tcb_set(tcb_t *tcb)
-{
-	void *tls = (void *) tcb;
-	tls += sizeof(tcb_t) + ARM_TP_OFFSET;
-	asm volatile (
-		"mov r9, %0"
-		:
-		: "r" (tls)
-	);
-}
-
-
-/** Returns TCB address.
- *
- * @return		TCB address (starts before TLS which address is stored
- * 			in r9 register).
- */
-static inline tcb_t *__tcb_get(void)
-{
-	void *ret;
-	asm volatile (
-		"mov %0, r9"
-		: "=r"(ret)
-	);
-	return (tcb_t *) (ret - ARM_TP_OFFSET - sizeof(tcb_t));
-}
-
-
-/** Returns TLS address stored.
- *
- *  Implemented in assembly.
- *
- *  @return		TLS address stored in r9 register
- */
-extern uintptr_t __aeabi_read_tp(void);
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/arch/arm32/include/types.h
===================================================================
--- uspace/lib/libc/arch/arm32/include/types.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,63 +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 libcarm32	
- * @{
- */
-/** @file 
- *  @brief Definitions of basic types like #uintptr_t.
- */
-
-#ifndef LIBC_arm32_TYPES_H_
-#define LIBC_arm32_TYPES_H_
-
-#define __32_BITS__
-
-typedef unsigned int sysarg_t;
-
-typedef char int8_t;
-typedef short int int16_t;
-typedef long int int32_t;
-typedef long long int int64_t;
-
-typedef unsigned char uint8_t;
-typedef unsigned short int uint16_t;
-typedef unsigned long int uint32_t;
-typedef unsigned long long int uint64_t;
-
-typedef int32_t ssize_t;
-typedef uint32_t size_t;
-
-typedef uint32_t uintptr_t;
-typedef uint32_t atomic_count_t;
-typedef int32_t atomic_signed_t;
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/arch/arm32/src/eabi.S
===================================================================
--- uspace/lib/libc/arch/arm32/src/eabi.S	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,35 +1,0 @@
-#
-# Copyright (c) 2007 Pavel Jancik
-# 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.
-#
-
-.text
-
-.global __aeabi_read_tp
-
-__aeabi_read_tp:
-	mov r0, r9
-	mov pc, lr
Index: pace/lib/libc/arch/arm32/src/entry.s
===================================================================
--- uspace/lib/libc/arch/arm32/src/entry.s	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,64 +1,0 @@
-#
-# Copyright (c) 2007 Michal Kebrt, Pavel Jancik
-# 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.
-#
-
-.section .init, "ax"
-
-.org 0
-
-.global __entry
-
-## User-space task entry point
-#
-# r1 contains the PCB pointer
-# r2 contains the RAS page address
-#
-__entry:
-	# Store the RAS page address into the ras_page variable
-	ldr r0, =ras_page
-	str r2, [r0]
-
-	#
-	# Create the first stack frame.
-	#
-	mov fp, #0
-	mov ip, sp
-	push {fp, ip, lr, pc}
-	sub fp, ip, #4
-
-	# Pass pcb_ptr to __main as the first argument (in r0)
-	mov r0, r1
-	bl __main
-
-	bl __exit
-
-.data
-
-.global ras_page
-ras_page:
-	.long 0
-
Index: pace/lib/libc/arch/arm32/src/fibril.S
===================================================================
--- uspace/lib/libc/arch/arm32/src/fibril.S	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,49 +1,0 @@
-#
-# Copyright (c) 2007 Michal Kebrt
-# 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.
-#
-
-.text
-
-.global context_save
-.global context_restore
-
-context_save:
-	stmia r0!, {sp, lr}
-	stmia r0!, {r4-r11}
-
-	# return 1
-	mov r0, #1
-	mov pc, lr
-
-context_restore:
-	ldmia r0!, {sp, lr}
-	ldmia r0!, {r4-r11}
-
-	#return 0
-	mov r0, #0
-	mov pc, lr
-
Index: pace/lib/libc/arch/arm32/src/stacktrace.c
===================================================================
--- uspace/lib/libc/arch/arm32/src/stacktrace.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,62 +1,0 @@
-/*
- * Copyright (c) 2010 Jakub Jermar
- * 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 libcarm32 arm32
- * @ingroup lc
- * @{
- */
-/** @file
- */
-
-#include <sys/types.h>
-#include <bool.h>
-
-#include <stacktrace.h>
-
-#define FRAME_OFFSET_FP_PREV	-12
-#define FRAME_OFFSET_RA		-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)
-{
-	return (*st->read_uintptr)(st->op_arg, fp + FRAME_OFFSET_FP_PREV, prev);
-}
-
-int stacktrace_ra_get(stacktrace_t *st, uintptr_t fp, uintptr_t *ra)
-{
-	return (*st->read_uintptr)(st->op_arg, fp + FRAME_OFFSET_RA, ra);
-}
-
-/** @}
- */
Index: pace/lib/libc/arch/arm32/src/stacktrace_asm.S
===================================================================
--- uspace/lib/libc/arch/arm32/src/stacktrace_asm.S	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,44 +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.
-#
-
-.text
-
-.global stacktrace_prepare
-.global stacktrace_fp_get
-.global stacktrace_pc_get
-
-stacktrace_prepare:
-	mov pc, lr
-
-stacktrace_fp_get:
-	mov r0, fp
-	mov pc, lr
-
-stacktrace_pc_get:
-	mov r0, lr 
-	mov pc, lr
Index: pace/lib/libc/arch/arm32/src/syscall.c
===================================================================
--- uspace/lib/libc/arch/arm32/src/syscall.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,79 +1,0 @@
-/*
- * Copyright (c) 2007 Pavel Jancik
- * 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 libcarm32
- * @{
- */
-/** @file
- *  @brief Syscall routine.
- */
-
-#include <libc.h>
-
-
-/** Syscall routine.
- *
- *  Stores p1-p4, id to r0-r4 registers and calls <code>swi</code>
- *  instruction. Returned value is read from r0 register.
- *
- *  @param p1 Parameter 1.
- *  @param p2 Parameter 2.
- *  @param p3 Parameter 3.
- *  @param p4 Parameter 4.
- *  @param id Number of syscall.
- *
- *  @return Syscall return value.
- */
-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 sysarg_t __arm_reg_r0 asm("r0") = p1;
-	register sysarg_t __arm_reg_r1 asm("r1") = p2;
-	register sysarg_t __arm_reg_r2 asm("r2") = p3;
-	register sysarg_t __arm_reg_r3 asm("r3") = p4;
-	register sysarg_t __arm_reg_r4 asm("r4") = p5;
-	register sysarg_t __arm_reg_r5 asm("r5") = p6;
-	register sysarg_t __arm_reg_r6 asm("r6") = id;
-	
-	asm volatile (
-		"swi 0"
-		: "=r" (__arm_reg_r0)
-		: "r" (__arm_reg_r0),
-		  "r" (__arm_reg_r1),
-		  "r" (__arm_reg_r2),
-		  "r" (__arm_reg_r3),
-		  "r" (__arm_reg_r4),
-		  "r" (__arm_reg_r5),
-		  "r" (__arm_reg_r6)
-	);
-	
-	return __arm_reg_r0;
-}
-
-/** @}
- */
Index: pace/lib/libc/arch/arm32/src/thread_entry.s
===================================================================
--- uspace/lib/libc/arch/arm32/src/thread_entry.s	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,45 +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.
-#
-
-.text
-
-.global __thread_entry
-
-## User-space thread entry point for all but the first threads.
-#
-#
-__thread_entry:
-	#
-	# Create the first stack frame.
-	#
-	mov fp, #0
-	mov ip, sp
-	push {fp, ip, lr, pc}
-	sub fp, ip, #4
-
-        b __thread_main
Index: pace/lib/libc/arch/arm32/src/tls.c
===================================================================
--- uspace/lib/libc/arch/arm32/src/tls.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,51 +1,0 @@
-/*
- * Copyright (c) 2007 Pavel Jancik
- * 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 libcarm32 arm32
-  * @brief arm32 architecture dependent parts of libc
-  * @ingroup lc
- * @{
- */
-/** @file
- */
-
-#include <tls.h>
-#include <sys/types.h>
-
-tcb_t * __alloc_tls(void **data, size_t size)
-{
-	return tls_alloc_variant_1(data, size);
-}
-
-void __free_tls_arch(tcb_t *tcb, size_t size)
-{
-	tls_free_variant_1(tcb, size);
-}
-
-/** @}
- */
Index: pace/lib/libc/arch/ia32/Makefile.inc
===================================================================
--- uspace/lib/libc/arch/ia32/Makefile.inc	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,47 +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.
-#
-
-CLANG_ARCH = i386
-
-ARCH_SOURCES = \
-	arch/$(UARCH)/src/entry.s \
-	arch/$(UARCH)/src/thread_entry.s \
-	arch/$(UARCH)/src/syscall.S \
-	arch/$(UARCH)/src/fibril.S \
-	arch/$(UARCH)/src/tls.c \
-	arch/$(UARCH)/src/setjmp.S \
-	arch/$(UARCH)/src/stacktrace.c \
-	arch/$(UARCH)/src/stacktrace_asm.S
-
-GCC_CFLAGS += -march=pentium
-LFLAGS += -N
-
-ENDIANESS = LE
-
-BFD_NAME = elf32-i386
-BFD_ARCH = i386
Index: pace/lib/libc/arch/ia32/_link.ld.in
===================================================================
--- uspace/lib/libc/arch/ia32/_link.ld.in	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,51 +1,0 @@
-STARTUP(LIBC_PREFIX/arch/UARCH/src/entry.o)
-ENTRY(__entry)
-
-PHDRS {
-	text PT_LOAD FLAGS(5);
-	data PT_LOAD FLAGS(6);
-}
-
-SECTIONS {
-	. = 0x1000 + SIZEOF_HEADERS;
-	
-	.init : {
-		*(.init);
-	} :text
-	
-	.text : {
-		*(.text);
-		*(.rodata*);
-	} :text
-	
-	. = . + 0x1000;
-	
-	.data : {
-		*(.data);
-	} :data
-	
-	.tdata : {
-		_tdata_start = .;
-		*(.tdata);
-		*(.gnu.linkonce.tb.*);
-		_tdata_end = .;
-		_tbss_start = .;
-		*(.tbss);
-		_tbss_end = .;
-	} :data
-	
-	_tls_alignment = ALIGNOF(.tdata);
-	
-	.bss : {
-		*(COMMON);
-		*(.bss);
-	} :data
-	
-	. = ALIGN(0x1000);
-	
-	_heap = .;
-	
-	/DISCARD/ : {
-		*(*);
-	}
-}
Index: pace/lib/libc/arch/ia32/include/atomic.h
===================================================================
--- uspace/lib/libc/arch/ia32/include/atomic.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,90 +1,0 @@
-/*
- * Copyright (c) 2001-2004 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 libcia32
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_ia32_ATOMIC_H_
-#define LIBC_ia32_ATOMIC_H_
-
-#define LIBC_ARCH_ATOMIC_H_
-
-#include <atomicdflt.h>
-
-static inline void atomic_inc(atomic_t *val)
-{
-	asm volatile (
-		"lock incl %[count]\n"
-		: [count] "+m" (val->count)
-	);
-}
-
-static inline void atomic_dec(atomic_t *val)
-{
-	asm volatile (
-		"lock decl %[count]\n"
-		: [count] "+m" (val->count)
-	);
-}
-
-static inline atomic_count_t atomic_postinc(atomic_t *val)
-{
-	atomic_count_t r = 1;
-	
-	asm volatile (
-		"lock xaddl %[r], %[count]\n"
-		: [count] "+m" (val->count),
-		  [r] "+r" (r)
-	);
-	
-	return r;
-}
-
-static inline atomic_count_t atomic_postdec(atomic_t *val)
-{
-	atomic_count_t r = -1;
-	
-	asm volatile (
-		"lock xaddl %[r], %[count]\n"
-		: [count] "+m" (val->count),
-		  [r] "+r" (r)
-	);
-	
-	return r;
-}
-
-#define atomic_preinc(val)  (atomic_postinc(val) + 1)
-#define atomic_predec(val)  (atomic_postdec(val) - 1)
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/arch/ia32/include/config.h
===================================================================
--- uspace/lib/libc/arch/ia32/include/config.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(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 libcia32
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_ia32_CONFIG_H_
-#define LIBC_ia32_CONFIG_H_
-
-#define PAGE_WIDTH	12
-#define PAGE_SIZE	(1 << PAGE_WIDTH)
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/arch/ia32/include/ddi.h
===================================================================
--- uspace/lib/libc/arch/ia32/include/ddi.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,104 +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.
- */
-
-/** @file
- * @ingroup libcia32, libcamd64
- */
-
-#ifndef LIBC_ia32_DDI_H_
-#define LIBC_ia32_DDI_H_
-
-#include <sys/types.h>
-#include <libarch/types.h>
-
-#define IO_SPACE_BOUNDARY	((void *) (64 * 1024))
-
-static inline uint8_t pio_read_8(ioport8_t *port)
-{
-	uint8_t val;
-	
-	asm volatile (
-		"inb %w[port], %b[val]\n"
-		: [val] "=a" (val)
-		: [port] "d" (port)
-	);
-	
-	return val;
-}
-
-static inline uint16_t pio_read_16(ioport16_t *port)
-{
-	uint16_t val;
-	
-	asm volatile (
-		"inw %w[port], %w[val]\n"
-		: [val] "=a" (val)
-		: [port] "d" (port)
-	);
-	
-	return val;
-}
-
-static inline uint32_t pio_read_32(ioport32_t *port)
-{
-	uint32_t val;
-	
-	asm volatile (
-		"inl %w[port], %[val]\n"
-		: [val] "=a" (val)
-		: [port] "d" (port)
-	);
-	
-	return val;
-}
-
-static inline void pio_write_8(ioport8_t *port, uint8_t val)
-{
-	asm volatile (
-		"outb %b[val], %w[port]\n"
-		:: [val] "a" (val), [port] "d" (port)
-	);
-}
-
-static inline void pio_write_16(ioport16_t *port, uint16_t val)
-{
-	asm volatile (
-		"outw %w[val], %w[port]\n"
-		:: [val] "a" (val), [port] "d" (port)
-	);
-}
-
-static inline void pio_write_32(ioport32_t *port, uint32_t val)
-{
-	asm volatile (
-		"outl %[val], %w[port]\n"
-		:: [val] "a" (val), [port] "d" (port)
-	);
-}
-
-#endif
Index: pace/lib/libc/arch/ia32/include/faddr.h
===================================================================
--- uspace/lib/libc/arch/ia32/include/faddr.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(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 libcia32
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_ia32_FADDR_H_
-#define LIBC_ia32_FADDR_H_
-
-#include <libarch/types.h>
-
-#define FADDR(fptr)		((uintptr_t) (fptr))
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/arch/ia32/include/fibril.h
===================================================================
--- uspace/lib/libc/arch/ia32/include/fibril.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,72 +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 libcia32
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_ia32_FIBRIL_H_
-#define LIBC_ia32_FIBRIL_H_
-
-#include <sys/types.h>
-
-/* According to ABI the stack MUST be aligned on 
- * 16-byte boundary. If it is not, the va_arg calling will
- * panic sooner or later
- */
-#define SP_DELTA     (12)
-
-#define context_set(c, _pc, stack, size, ptls) \
-	do { \
-		(c)->pc = (sysarg_t) (_pc); \
-		(c)->sp = ((sysarg_t) (stack)) + (size) - SP_DELTA; \
-		(c)->tls = (sysarg_t) (ptls); \
-		(c)->ebp = 0; \
-	} while (0)
-	
-/* We include only registers that must be preserved
- * during function call
- */
-typedef struct {
-	uint32_t sp;
-	uint32_t pc;
-	
-	uint32_t ebx;
-	uint32_t esi;
-	uint32_t edi;
-	uint32_t ebp;
-	
-	uint32_t tls;
-} context_t;
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/arch/ia32/include/inttypes.h
===================================================================
--- uspace/lib/libc/arch/ia32/include/inttypes.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,76 +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 libcia32
- * @{
- */
-/** @file Macros for format specifiers.
- *
- * Macros for formatting stdint types as specified in section
- * 7.8.1 Macros for format specifiers of the C99 draft specification
- * (ISO/IEC 9899:201x). Only some macros from the specification are
- * implemented.
- */
-
-#ifndef LIBC_ia32_INTTYPES_H_
-#define LIBC_ia32_INTTYPES_H_
-
-#define PRId8 "d"
-#define PRId16 "d"
-#define PRId32 "d"
-#define PRId64 "lld"
-#define PRIdPTR "d"
-
-#define PRIo8 "o"
-#define PRIo16 "o"
-#define PRIo32 "o"
-#define PRIo64 "llo"
-#define PRIoPTR "o"
-
-#define PRIu8 "u"
-#define PRIu16 "u"
-#define PRIu32 "u"
-#define PRIu64 "llu"
-#define PRIuPTR "u"
-
-#define PRIx8 "x"
-#define PRIx16 "x"
-#define PRIx32 "x"
-#define PRIx64 "llx"
-#define PRIxPTR "x"
-
-#define PRIX8 "X"
-#define PRIX16 "X"
-#define PRIX32 "X"
-#define PRIX64 "llX"
-#define PRIXPTR "X"
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/arch/ia32/include/istate.h
===================================================================
--- uspace/lib/libc/arch/ia32/include/istate.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,75 +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 debug
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_ia32__ISTATE_H_
-#define LIBC_ia32__ISTATE_H_
-
-#include <sys/types.h>
-
-/** Interrupt context.
- *
- * This is a copy of the kernel definition with which it must be kept in sync.
- */
-typedef struct istate {
-	uint32_t eax;
-	uint32_t ecx;
-	uint32_t edx;
-	uint32_t ebp;
-
-	uint32_t gs;
-	uint32_t fs;
-	uint32_t es;
-	uint32_t ds;
-
-	uint32_t error_word;
-	uint32_t eip;
-	uint32_t cs;
-	uint32_t eflags;
-	uint32_t stack[];
-} istate_t;
-
-static inline uintptr_t istate_get_pc(istate_t *istate)
-{
-	return istate->eip;
-}
-
-static inline uintptr_t istate_get_fp(istate_t *istate)
-{
-	return istate->ebp;
-}
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/arch/ia32/include/limits.h
===================================================================
--- uspace/lib/libc/arch/ia32/include/limits.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,51 +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 libcia32
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_ia32__LIMITS_H_
-#define LIBC_ia32__LIMITS_H_
-
-#define LONG_MIN MIN_INT32
-#define LONG_MAX MAX_INT32
-#define ULONG_MIN MIN_UINT32
-#define ULONG_MAX MAX_UINT32
-
-#define SIZE_MIN MIN_UINT32
-#define SIZE_MAX MAX_UINT32
-#define SSIZE_MIN MIN_INT32
-#define SSIZE_MAX MAX_INT32
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/arch/ia32/include/syscall.h
===================================================================
--- uspace/lib/libc/arch/ia32/include/syscall.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,60 +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 libc
- * @{
- */
-/**
- * @file
- */
-
-#ifndef LIBC_ia32_SYSCALL_H_
-#define LIBC_ia32_SYSCALL_H_
-
-#include <sys/types.h>
-#include <kernel/syscall/syscall.h>
-
-#define __syscall0  __syscall_fast_func
-#define __syscall1  __syscall_fast_func
-#define __syscall2  __syscall_fast_func
-#define __syscall3  __syscall_fast_func
-#define __syscall4  __syscall_fast_func
-#define __syscall5  __syscall_slow
-#define __syscall6  __syscall_slow
-
-extern sysarg_t (* __syscall_fast_func)(const sysarg_t, const sysarg_t,
-    const sysarg_t, const sysarg_t, const sysarg_t, const sysarg_t,
-    const syscall_t);
-
-extern sysarg_t __syscall_slow(const sysarg_t, const sysarg_t, const sysarg_t,
-    const sysarg_t, const sysarg_t, const sysarg_t, const syscall_t);
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/arch/ia32/include/thread.h
===================================================================
--- uspace/lib/libc/arch/ia32/include/thread.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,41 +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 libcia32
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_ia32_THREAD_H_
-#define LIBC_ia32_THREAD_H_
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/arch/ia32/include/tls.h
===================================================================
--- uspace/lib/libc/arch/ia32/include/tls.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,67 +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 libcia32
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_ia32_TLS_H_
-#define LIBC_ia32_TLS_H_
-
-#define CONFIG_TLS_VARIANT_2
-
-#include <libc.h>
-
-typedef struct {
-	void *self;
-	void *fibril_data;
-} tcb_t;
-
-static inline void __tcb_set(tcb_t *tcb)
-{
-	__SYSCALL1(SYS_TLS_SET, (sysarg_t) tcb);
-}
-
-static inline tcb_t * __tcb_get(void)
-{
-	void *retval;
-	
-	asm (
-		"movl %%gs:0, %0"
-		: "=r" (retval)
-	);
-	
-	return retval;
-}
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/arch/ia32/include/types.h
===================================================================
--- uspace/lib/libc/arch/ia32/include/types.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,62 +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 libcia32
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_ia32_TYPES_H_
-#define LIBC_ia32_TYPES_H_
-
-#define __32_BITS__
-
-typedef unsigned int sysarg_t;
-
-typedef char int8_t;
-typedef short int int16_t;
-typedef int int32_t;
-typedef long long int int64_t;
-
-typedef unsigned char uint8_t;
-typedef unsigned short int uint16_t;
-typedef unsigned int uint32_t;
-typedef unsigned long long int uint64_t;
-
-typedef int32_t ssize_t;
-typedef uint32_t size_t;
-
-typedef uint32_t uintptr_t;
-typedef uint32_t atomic_count_t;
-typedef int32_t atomic_signed_t;
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/arch/ia32/src/entry.s
===================================================================
--- uspace/lib/libc/arch/ia32/src/entry.s	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,67 +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.
-#
-
-INTEL_CPUID_STANDARD = 1
-INTEL_SEP = 11
-
-.section .init, "ax"
-
-.org 0
-
-.globl __entry
-
-## User-space task entry point
-#
-# %edi contains the PCB pointer
-#
-__entry:
-	mov %ss, %ax
-	mov %ax, %ds
-	mov %ax, %es
-	mov %ax, %fs
-	# Do not set %gs, it contains descriptor that can see TLS
-
-	# Detect the mechanism used for making syscalls
-	movl $(INTEL_CPUID_STANDARD), %eax
-	cpuid
-	bt $(INTEL_SEP), %edx
-	jnc 0f
-	leal __syscall_fast_func, %eax
-	movl $__syscall_fast, (%eax)
-0:
-	#
-	# Create the first stack frame.
-	#
-	pushl $0 
-	movl %esp, %ebp
-
-	# Pass the PCB pointer to __main as the first argument
-	pushl %edi
-	call __main
-
-	call __exit
Index: pace/lib/libc/arch/ia32/src/fibril.S
===================================================================
--- uspace/lib/libc/arch/ia32/src/fibril.S	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,79 +1,0 @@
-#
-# Copyright (c) 2001-2004 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 <kernel/arch/context_offset.h>
-
-.text
-
-.global context_save
-.global context_restore
-
-
-## Save current CPU context
-#
-# Save CPU context to the context_t variable
-# pointed by the 1st argument. Returns 1 in EAX.
-#
-context_save:
-	movl 0(%esp),%eax	# the caller's return %eip
-	movl 4(%esp),%edx	# address of the context variable to save context to
-
-		# save registers to the context structure
-	CONTEXT_SAVE_ARCH_CORE %edx %eax
-
-	# Save TLS
-	movl %gs:0, %eax
-	movl %eax, OFFSET_TLS(%edx)     # tls -> ctx->tls
-	
-	xorl %eax,%eax		# context_save returns 1
-	incl %eax
-	ret
-
-
-## Restore saved CPU context
-#
-# Restore CPU context from context_t variable
-# pointed by the 1st argument. Returns 0 in EAX.
-#
-context_restore:
-	movl 4(%esp),%eax	# address of the context variable to restore context from
-
-		# restore registers from the context structure
-	CONTEXT_RESTORE_ARCH_CORE %eax %edx
-
-	movl %edx,0(%esp)	# ctx->pc -> saver's return %eip
-
-	# Set thread local storage
-	pushl %edx
-	movl OFFSET_TLS(%eax), %edx   # Set arg1 to TLS addr
-	movl $1, %eax         # Syscall SYS_TLS_SET
-	int $0x30
-	popl %edx
-	
-	xorl %eax,%eax		# context_restore returns 0
-	ret
Index: pace/lib/libc/arch/ia32/src/setjmp.S
===================================================================
--- uspace/lib/libc/arch/ia32/src/setjmp.S	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,57 +1,0 @@
-#
-# Copyright (c) 2008 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.
-#
-
-#include <kernel/arch/context_offset.h>
-
-.text
-.global setjmp
-.global longjmp
-
-.type setjmp,@function
-setjmp:
-	movl 0(%esp),%eax	# save pc value into eax	
-	movl 4(%esp),%edx	# address of the jmp_buf structure to save context to 
-
-		# save registers to the jmp_buf structure
-	CONTEXT_SAVE_ARCH_CORE %edx %eax
-
-	xorl %eax,%eax		# set_jmp returns 0
-	ret
-
-.type longjmp,@function
-longjmp:
-
-	movl 4(%esp), %ecx	# put address of jmp_buf into ecx
-	movl 8(%esp), %eax	# put return value into eax	
-
-		# restore registers from the jmp_buf structure
-	CONTEXT_RESTORE_ARCH_CORE %ecx %edx
-
-	movl %edx,0(%esp)	# put saved pc on stack
-	ret
-
Index: pace/lib/libc/arch/ia32/src/stacktrace.c
===================================================================
--- uspace/lib/libc/arch/ia32/src/stacktrace.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,62 +1,0 @@
-/*
- * Copyright (c) 2010 Jakub Jermar
- * 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 libcia32 ia32
- * @ingroup lc
- * @{
- */
-/** @file
- */
-
-#include <sys/types.h>
-#include <bool.h>
-
-#include <stacktrace.h>
-
-#define FRAME_OFFSET_FP_PREV	0
-#define FRAME_OFFSET_RA		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)
-{
-	return (*st->read_uintptr)(st->op_arg, fp + FRAME_OFFSET_FP_PREV, prev);
-}
-
-int stacktrace_ra_get(stacktrace_t *st, uintptr_t fp, uintptr_t *ra)
-{
-	return (*st->read_uintptr)(st->op_arg, fp + FRAME_OFFSET_RA, ra);
-}
-
-/** @}
- */
Index: pace/lib/libc/arch/ia32/src/stacktrace_asm.S
===================================================================
--- uspace/lib/libc/arch/ia32/src/stacktrace_asm.S	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,44 +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.
-#
-
-.text
-
-.global stacktrace_prepare
-.global stacktrace_fp_get
-.global stacktrace_pc_get
-
-stacktrace_prepare:
-	ret
-
-stacktrace_fp_get:
-	movl %ebp, %eax
-	ret
-
-stacktrace_pc_get:
-	movl (%esp), %eax
-	ret
Index: pace/lib/libc/arch/ia32/src/syscall.S
===================================================================
--- uspace/lib/libc/arch/ia32/src/syscall.S	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,96 +1,0 @@
-#
-# Copyright (c) 2007 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.
-#
-
-.data
-
-.global __syscall_fast_func
-__syscall_fast_func:
-	.long __syscall_slow
-
-.text
-
-/** Syscall wrapper - INT $0x30 version.
- *
- * Mind the order of arguments. First two arguments and the syscall number go to
- * scratch registers. An optimized version of this wrapper for fewer arguments
- * could benefit from this and not save unused registers on the stack.
- */
-.global __syscall_slow
-__syscall_slow:
-	pushl %ebx
-	pushl %esi
-	pushl %edi
-	pushl %ebp
-	movl 20(%esp), %edx	# First argument.
-	movl 24(%esp), %ecx	# Second argument.
-	movl 28(%esp), %ebx	# Third argument.
-	movl 32(%esp), %esi	# Fourth argument.
-	movl 36(%esp), %edi	# Fifth argument.
-	movl 40(%esp), %ebp	# Sixth argument.
-	movl 44(%esp), %eax	# Syscall number.
-	int $0x30
-	popl %ebp
-	popl %edi
-	popl %esi
-	popl %ebx
-	ret
-
-
-/** Syscall wrapper - SYSENTER version.
- *
- * This is an optimized version of syscall for four or less arguments.  Note
- * that EBP and EDI are used to remember user stack address and the return
- * address. The kernel part doesn't save DS, ES and FS so the handler restores
- * these to the selector immediately following CS (it must be the flat data
- * segment, otherwise the SYSENTER wouldn't work in the first place).
- */
-.global __syscall_fast
-__syscall_fast:
-	pushl %ebx
-	pushl %esi
-	pushl %edi
-	pushl %ebp
-	mov %esp, %ebp
-	lea ra, %edi
-	movl 20(%esp), %edx	# First argument.
-	movl 24(%esp), %ecx	# Second argument.
-	movl 28(%esp), %ebx	# Third argument.
-	movl 32(%esp), %esi	# Fourth argument.
-	movl 44(%esp), %eax	# Syscall number.
-	sysenter
-ra:
-	movw %cs, %cx
-	addw $8, %cx
-	movw %cx, %ds
-	movw %cx, %es
-	movw %cx, %fs
-	popl %ebp
-	popl %edi
-	popl %esi
-	popl %ebx
-	ret
Index: pace/lib/libc/arch/ia32/src/thread_entry.s
===================================================================
--- uspace/lib/libc/arch/ia32/src/thread_entry.s	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,59 +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.
-#
-
-.text
-
-.globl __thread_entry
-
-## User-space thread entry point for all but the first threads.
-#
-#
-__thread_entry:
-	mov %ss, %dx
-	mov %dx, %ds
-	mov %dx, %es
-	mov %dx, %fs
-	# Do not set %gs, it contains descriptor that can see TLS
-
-	#
-	# Create the first stack frame.
-	#
-	pushl $0
-	mov %esp, %ebp
-
-	#
-	# EAX contains address of uarg.
-	#
-	pushl %eax
-	call __thread_main
-	
-	#
-	# Not reached.
-	#
-	
-.end __thread_entry
Index: pace/lib/libc/arch/ia32/src/tls.c
===================================================================
--- uspace/lib/libc/arch/ia32/src/tls.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(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 libcamd64 amd64
- * @ingroup lc
- * @{
- */
-/** @file
-  * @ingroup libcia32
- */
-
-#include <tls.h>
-#include <sys/types.h>
-
-tcb_t * __alloc_tls(void **data, size_t size)
-{
-	return tls_alloc_variant_2(data, size);
-}
-
-void __free_tls_arch(tcb_t *tcb, size_t size)
-{
-	tls_free_variant_2(tcb, size);
-}
-
-/** @}
- */
Index: pace/lib/libc/arch/ia64/Makefile.inc
===================================================================
--- uspace/lib/libc/arch/ia64/Makefile.inc	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,45 +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.
-#
-
-ARCH_SOURCES = \
-	arch/$(UARCH)/src/entry.s \
-	arch/$(UARCH)/src/thread_entry.s \
-	arch/$(UARCH)/src/syscall.S \
-	arch/$(UARCH)/src/fibril.S \
-	arch/$(UARCH)/src/tls.c \
-	arch/$(UARCH)/src/ddi.c \
-	arch/$(UARCH)/src/stacktrace.c \
-	arch/$(UARCH)/src/stacktrace_asm.S
-
-GCC_CFLAGS += -fno-unwind-tables
-LFLAGS += -N $(SOFTINT_PREFIX)/libsoftint.a
-
-ENDIANESS = LE
-
-BFD_NAME = elf64-ia64-little
-BFD_ARCH = ia64-elf64
Index: pace/lib/libc/arch/ia64/_link.ld.in
===================================================================
--- uspace/lib/libc/arch/ia64/_link.ld.in	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,53 +1,0 @@
-STARTUP(LIBC_PREFIX/arch/UARCH/src/entry.o)
-ENTRY(__entry)
-
-PHDRS {
-	text PT_LOAD FLAGS(5);
-	data PT_LOAD FLAGS(6);
-}
-
-SECTIONS {
-	. = 0x4000 + SIZEOF_HEADERS;
-
-	.init : {
-		*(.init);
-	} : text
-	.text : {
-		*(.text);
-		*(.rodata*);
-	} :text
-
-	. = . + 0x4000;
-
-	.got : {
-		_gp = .;
-		*(.got*);
-	} :data	
-	.data : {
-		*(.opd);
-		*(.data .data.*);
-		*(.sdata);
-	} :data
-	.tdata : {
-		_tdata_start = .;
-		*(.tdata);
-		_tdata_end = .;
-		_tbss_start = .;
-		*(.tbss);
-		_tbss_end = .;
-	} :data
-	_tls_alignment = ALIGNOF(.tdata);
-	.bss : {
-		*(.sbss);
-		*(.scommon);
-		*(COMMON);
-		*(.bss);
-	} :data
-
-	. = ALIGN(0x4000);
-	_heap = .;
- 
-	/DISCARD/ : {
-		*(*);
-        }
-}
Index: pace/lib/libc/arch/ia64/include/atomic.h
===================================================================
--- uspace/lib/libc/arch/ia64/include/atomic.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,119 +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 libcia64
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_ia64_ATOMIC_H_
-#define LIBC_ia64_ATOMIC_H_
-
-#define LIBC_ARCH_ATOMIC_H_
-
-#include <atomicdflt.h>
-
-static inline void atomic_inc(atomic_t *val)
-{
-	atomic_count_t v;
-	
-	asm volatile (
-		"fetchadd8.rel %[v] = %[count], 1\n"
-		: [v] "=r" (v),
-		  [count] "+m" (val->count)
-	);
-}
-
-static inline void atomic_dec(atomic_t *val)
-{
-	atomic_count_t v;
-	
-	asm volatile (
-		"fetchadd8.rel %[v] = %[count], -1\n"
-		: [v] "=r" (v),
-		  [count] "+m" (val->count)
-	);
-}
-
-static inline atomic_count_t atomic_preinc(atomic_t *val)
-{
-	atomic_count_t v;
-	
-	asm volatile (
-		"fetchadd8.rel %[v] = %[count], 1\n"
-		: [v] "=r" (v),
-		  [count] "+m" (val->count)
-	);
-	
-	return (v + 1);
-}
-
-static inline atomic_count_t atomic_predec(atomic_t *val)
-{
-	atomic_count_t v;
-	
-	asm volatile (
-		"fetchadd8.rel %[v] = %[count], -1\n"
-		: [v] "=r" (v),
-		  [count] "+m" (val->count)
-	);
-	
-	return (v - 1);
-}
-
-static inline atomic_count_t atomic_postinc(atomic_t *val)
-{
-	atomic_count_t v;
-	
-	asm volatile (
-		"fetchadd8.rel %[v] = %[count], 1\n"
-		: [v] "=r" (v),
-		  [count] "+m" (val->count)
-	);
-	
-	return v;
-}
-
-static inline atomic_count_t atomic_postdec(atomic_t *val)
-{
-	atomic_count_t v;
-	
-	asm volatile (
-		"fetchadd8.rel %[v] = %[count], -1\n"
-		: [v] "=r" (v),
-		  [count] "+m" (val->count)
-	);
-	
-	return v;
-}
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/arch/ia64/include/config.h
===================================================================
--- uspace/lib/libc/arch/ia64/include/config.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(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 libcia64
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_ia64_CONFIG_H_
-#define LIBC_ia64_CONFIG_H_
-
-#define PAGE_WIDTH	14
-#define PAGE_SIZE	(1 << PAGE_WIDTH)
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/arch/ia64/include/ddi.h
===================================================================
--- uspace/lib/libc/arch/ia64/include/ddi.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,115 +1,0 @@
-/*
- * Copyright (c) 2005 Jakub Vana
- * 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 libcia64	
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_ia64_DDI_H_
-#define LIBC_ia64_DDI_H_
-
-#include <sys/types.h>
-#include <libarch/types.h>
-
-#define IO_SPACE_BOUNDARY	((void *) (64 * 1024))
-
-uint64_t get_ia64_iospace_address(void);
-
-extern uint64_t ia64_iospace_address;
-
-#define IA64_IOSPACE_ADDRESS \
-	(ia64_iospace_address ? \
-	    ia64_iospace_address : \
-	    (ia64_iospace_address = get_ia64_iospace_address()))
-
-static inline void pio_write_8(ioport8_t *port, uint8_t v)
-{
-	uintptr_t prt = (uintptr_t) port;
-
-	*((ioport8_t *)(IA64_IOSPACE_ADDRESS +
-	    ((prt & 0xfff) | ((prt >> 2) << 12)))) = v;
-
-	asm volatile ("mf\n" ::: "memory");
-}
-
-static inline void pio_write_16(ioport16_t *port, uint16_t v)
-{
-	uintptr_t prt = (uintptr_t) port;
-
-	*((ioport16_t *)(IA64_IOSPACE_ADDRESS +
-	    ((prt & 0xfff) | ((prt >> 2) << 12)))) = v;
-
-	asm volatile ("mf\n" ::: "memory");
-}
-
-static inline void pio_write_32(ioport32_t *port, uint32_t v)
-{
-	uintptr_t prt = (uintptr_t) port;
-
-	*((ioport32_t *)(IA64_IOSPACE_ADDRESS +
-	    ((prt & 0xfff) | ((prt >> 2) << 12)))) = v;
-
-	asm volatile ("mf\n" ::: "memory");
-}
-
-static inline uint8_t pio_read_8(ioport8_t *port)
-{
-	uintptr_t prt = (uintptr_t) port;
-
-	asm volatile ("mf\n" ::: "memory");
-
-	return *((ioport8_t *)(IA64_IOSPACE_ADDRESS +
-	    ((prt & 0xfff) | ((prt >> 2) << 12))));
-}
-
-static inline uint16_t pio_read_16(ioport16_t *port)
-{
-	uintptr_t prt = (uintptr_t) port;
-
-	asm volatile ("mf\n" ::: "memory");
-
-	return *((ioport16_t *)(IA64_IOSPACE_ADDRESS +
-	    ((prt & 0xfff) | ((prt >> 2) << 12))));
-}
-
-static inline uint32_t pio_read_32(ioport32_t *port)
-{
-	uintptr_t prt = (uintptr_t) port;
-
-	asm volatile ("mf\n" ::: "memory");
-
-	return *((ioport32_t *)(IA64_IOSPACE_ADDRESS +
-	    ((prt & 0xfff) | ((prt >> 2) << 12))));
-}
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/arch/ia64/include/faddr.h
===================================================================
--- uspace/lib/libc/arch/ia64/include/faddr.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,53 +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 libcia64
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_ia64_FADDR_H_
-#define LIBC_ia64_FADDR_H_
-
-#include <libarch/types.h>
-
-/**
- *
- * Calculate absolute address of function
- * referenced by fptr pointer.
- *
- * @param fptr Function pointer.
- *
- */
-#define FADDR(fptr)  (((fncptr_t *) (fptr))->fnc)
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/arch/ia64/include/fibril.h
===================================================================
--- uspace/lib/libc/arch/ia64/include/fibril.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,135 +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 libcia64	
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_ia64_FIBRIL_H_
-#define LIBC_ia64_FIBRIL_H_
-
-#include <sys/types.h>
-#include <align.h>
-#include <libarch/stack.h>
-#include <libarch/types.h>
-
-/*
- * context_save() and context_restore() are both leaf procedures.
- * No need to allocate scratch area.
- */
-#define SP_DELTA	(0 + ALIGN_UP(STACK_ITEM_SIZE, STACK_ALIGNMENT))
-
-#define PFM_MASK        (~0x3fffffffff)
-
-#define PSTHREAD_INITIAL_STACK_PAGES_NO 2
-/* Stack is divided into two equal parts (for memory stack and register stack). */
-#define PSTHREAD_INITIAL_STACK_DIVISION 2  
-
-#define context_set(c, _pc, stack, size, tls) 								\
-	do {												\
-		(c)->pc = (uint64_t) _pc;								\
-		(c)->bsp = ((uint64_t) stack) + size / PSTHREAD_INITIAL_STACK_DIVISION;								\
-		(c)->ar_pfs &= PFM_MASK; 								\
-		(c)->sp = ((uint64_t) stack) + ALIGN_UP((size / PSTHREAD_INITIAL_STACK_DIVISION), STACK_ALIGNMENT) - SP_DELTA;		\
-		(c)->tp = (uint64_t) tls;								\
-	} while (0);
-	
-
-/*
- * Only save registers that must be preserved across
- * function calls.
- */
-typedef struct context {
-
-	/*
-	 * Application registers
-	 */
-	uint64_t ar_pfs;
-	uint64_t ar_unat_caller;
-	uint64_t ar_unat_callee;
-	uint64_t ar_rsc;
-	uint64_t bsp;		/* ar_bsp */
-	uint64_t ar_rnat;
-	uint64_t ar_lc;
-
-	/*
-	 * General registers
-	 */
-	uint64_t r1;
-	uint64_t r4;
-	uint64_t r5;
-	uint64_t r6;
-	uint64_t r7;
-	uint64_t sp;		/* r12 */
-	uint64_t tp;		/* r13 */
-	
-	/*
-	 * Branch registers
-	 */
-	uint64_t pc;		/* b0 */
-	uint64_t b1;
-	uint64_t b2;
-	uint64_t b3;
-	uint64_t b4;
-	uint64_t b5;
-
-	/*
-	 * Predicate registers
-	 */
-	uint64_t pr;
-
-	uint128_t f2 __attribute__ ((aligned(16)));
-	uint128_t f3;
-	uint128_t f4;
-	uint128_t f5;
-
-	uint128_t f16;
-	uint128_t f17;
-	uint128_t f18;
-	uint128_t f19;
-	uint128_t f20;
-	uint128_t f21;
-	uint128_t f22;
-	uint128_t f23;
-	uint128_t f24;
-	uint128_t f25;
-	uint128_t f26;
-	uint128_t f27;
-	uint128_t f28;
-	uint128_t f29;
-	uint128_t f30;
-	uint128_t f31;
-
-} context_t;
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/arch/ia64/include/inttypes.h
===================================================================
--- uspace/lib/libc/arch/ia64/include/inttypes.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,76 +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 libia64
- * @{
- */
-/** @file Macros for format specifiers.
- *
- * Macros for formatting stdint types as specified in section
- * 7.8.1 Macros for format specifiers of the C99 draft specification
- * (ISO/IEC 9899:201x). Only some macros from the specification are
- * implemented.
- */
-
-#ifndef LIBC_ia64_INTTYPES_H_
-#define LIBC_ia64_INTTYPES_H_
-
-#define PRId8 "d"
-#define PRId16 "d"
-#define PRId32 "d"
-#define PRId64 "ld"
-#define PRIdPTR "ld"
-
-#define PRIo8 "o"
-#define PRIo16 "o"
-#define PRIo32 "o"
-#define PRIo64 "lo"
-#define PRIoPTR "lo"
-
-#define PRIu8 "u"
-#define PRIu16 "u"
-#define PRIu32 "u"
-#define PRIu64 "lu"
-#define PRIuPTR "lu"
-
-#define PRIx8 "x"
-#define PRIx16 "x"
-#define PRIx32 "x"
-#define PRIx64 "lx"
-#define PRIxPTR "lx"
-
-#define PRIX8 "X"
-#define PRIX16 "X"
-#define PRIX32 "X"
-#define PRIX64 "lX"
-#define PRIXPTR "lX"
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/arch/ia64/include/istate.h
===================================================================
--- uspace/lib/libc/arch/ia64/include/istate.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,63 +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 libcsparc64
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_ia64_ISTATE_H_
-#define LIBC_ia64_ISTATE_H_
-
-#include <sys/types.h>
-
-/** Interrupt context.
- *
- * This is a copy of the kernel definition with which it must be kept in sync.
- */
-typedef struct istate {
-	/* TODO */
-} istate_t;
-
-static inline uintptr_t istate_get_pc(istate_t *istate)
-{
-	/* TODO */
-	return 0;
-}
-
-static inline uintptr_t istate_get_fp(istate_t *istate)
-{
-	/* TODO */
-	return 0;
-}
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/arch/ia64/include/limits.h
===================================================================
--- uspace/lib/libc/arch/ia64/include/limits.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,51 +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 libcia64
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_ia64_LIMITS_H_
-#define LIBC_ia64_LIMITS_H_
-
-#define LONG_MIN MIN_INT64
-#define LONG_MAX MAX_INT64
-#define ULONG_MIN MIN_UINT64
-#define ULONG_MAX MAX_UINT64
-
-#define SIZE_MIN MIN_UINT64
-#define SIZE_MAX MAX_UINT64
-#define SSIZE_MIN MIN_INT64
-#define SSIZE_MAX MAX_INT64
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/arch/ia64/include/stack.h
===================================================================
--- uspace/lib/libc/arch/ia64/include/stack.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,46 +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 libcia64	
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_ia64_STACK_H_
-#define LIBC_ia64_STACK_H_
-
-#define STACK_ITEM_SIZE			8
-#define STACK_ALIGNMENT			16
-#define STACK_SCRATCH_AREA_SIZE		16
-#define REGISTER_STACK_ALIGNMENT 	8
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/arch/ia64/include/stackarg.h
===================================================================
--- uspace/lib/libc/arch/ia64/include/stackarg.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,43 +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 libcia64	
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_STACKARG_H_
-#define LIBC_STACKARG_H_
-
-#endif
-
-
- /** @}
- */
-
Index: pace/lib/libc/arch/ia64/include/syscall.h
===================================================================
--- uspace/lib/libc/arch/ia64/include/syscall.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,46 +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 libc
- * @{
- */
-/**
- * @file
- */
-
-#ifndef LIBC_ia64_SYSCALL_H_
-#define LIBC_ia64_SYSCALL_H_
-
-#define LIBARCH_SYSCALL_GENERIC
-
-#include <syscall.h>
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/arch/ia64/include/thread.h
===================================================================
--- uspace/lib/libc/arch/ia64/include/thread.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,43 +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 libcia64	
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_ia64_THREAD_H_
-#define LIBC_ia64_THREAD_H_
-
-#define THREAD_INITIAL_STACK_PAGES_NO 2
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/arch/ia64/include/tls.h
===================================================================
--- uspace/lib/libc/arch/ia64/include/tls.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,65 +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 libcia64	
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_ia64_TLS_H_
-#define LIBC_ia64_TLS_H_
-
-#define CONFIG_TLS_VARIANT_1
-
-#include <sys/types.h>
-
-/* This structure must be exactly 16 bytes long */
-typedef struct {
-	void *dtv; /* unused in static linking*/
-	void *fibril_data;
-} tcb_t;
-
-static inline void __tcb_set(tcb_t *tcb)
-{
-	asm volatile ("mov r13 = %0\n" : : "r" (tcb) : "r13");
-}
-
-static inline tcb_t *__tcb_get(void)
-{
-	void *retval;
-
-	asm volatile ("mov %0 = r13\n" : "=r" (retval));
-
-	return retval;
-}
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/arch/ia64/include/types.h
===================================================================
--- uspace/lib/libc/arch/ia64/include/types.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,72 +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 libcia64
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_ia64_TYPES_H_
-#define LIBC_ia64_TYPES_H_
-
-#define __64_BITS__
-
-typedef unsigned long long sysarg_t;
-
-typedef char int8_t;
-typedef short int int16_t;
-typedef int int32_t;
-typedef long int int64_t;
-
-typedef unsigned char uint8_t;
-typedef unsigned short int uint16_t;
-typedef unsigned int uint32_t;
-typedef unsigned long int uint64_t;
-
-typedef struct {
-	uint64_t lo;
-	uint64_t hi;
-} uint128_t;
-
-typedef int64_t ssize_t;
-typedef uint64_t size_t;
-
-typedef uint64_t uintptr_t;
-typedef uint64_t atomic_count_t;
-typedef int64_t atomic_signed_t;
-
-typedef struct {
-	uintptr_t fnc;
-	uintptr_t gp;
-} __attribute__((may_alias)) fncptr_t;
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/arch/ia64/src/ddi.c
===================================================================
--- uspace/lib/libc/arch/ia64/src/ddi.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,13 +1,0 @@
-#include <libarch/ddi.h>
-#include <sysinfo.h>
-
-uint64_t ia64_iospace_address=0;
-
-
-uint64_t get_ia64_iospace_address(void)
-{
-
-	return sysinfo_value("ia64_iospace.address.virtual");
-
-}
-
Index: pace/lib/libc/arch/ia64/src/entry.s
===================================================================
--- uspace/lib/libc/arch/ia64/src/entry.s	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,47 +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.
-#
-
-.section .init, "ax"
-
-.org 0
-
-.globl __entry
-
-## User-space task entry point
-#
-# r2 contains the PCB pointer
-#
-__entry:
-	alloc loc0 = ar.pfs, 0, 1, 2, 0
-	movl r1 = _gp
-
-	# Pass PCB pointer as the first argument to __main
-	mov out0 = r2
-	br.call.sptk.many b0 = __main
-0:
-	br.call.sptk.many b0 = __exit
Index: pace/lib/libc/arch/ia64/src/fibril.S
===================================================================
--- uspace/lib/libc/arch/ia64/src/fibril.S	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,246 +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.
-#
-
-.text
-
-.global context_save
-.global context_restore
-
-context_save:
-	alloc loc0 = ar.pfs, 1, 8, 0, 0
-	mov loc1 = ar.unat	;;
-	/* loc2 */
-	mov loc3 = ar.rsc
-
-	.auto
-
-	/*
-	 * Flush dirty registers to backing store.
-	 * After this ar.bsp and ar.bspstore are equal.
-	 */
-	flushrs
-	mov loc4 = ar.bsp	
-	
-	/*
-	 * Put RSE to enforced lazy mode.
-	 * So that ar.rnat can be read.
-	 */
-	and loc5 = ~3, loc3
-	mov ar.rsc = loc5
-	mov loc5 = ar.rnat
-
-	.explicit
-
-	mov loc6 = ar.lc
-	
-	/*
-	 * Save application registers
-	 */
-	st8 [in0] = loc0, 8	;;	/* save ar.pfs */
-	st8 [in0] = loc1, 8	;;	/* save ar.unat (caller) */
-	mov loc2 = in0		;;
-	add in0 = 8, in0	;;	/* skip ar.unat (callee) */
-	st8 [in0] = loc3, 8	;;	/* save ar.rsc */
-	st8 [in0] = loc4, 8	;;	/* save ar.bsp */
-	st8 [in0] = loc5, 8	;;	/* save ar.rnat */
-	st8 [in0] = loc6, 8	;;	/* save ar.lc */
-	
-	/*
-	 * Save general registers including NaT bits
-	 */
-	st8.spill [in0] = r1, 8		;;
-	st8.spill [in0] = r4, 8		;;
-	st8.spill [in0] = r5, 8		;;
-	st8.spill [in0] = r6, 8		;;
-	st8.spill [in0] = r7, 8		;;
-	st8.spill [in0] = r12, 8	;;	/* save sp */
-	st8.spill [in0] = r13, 8	;;	/* save tp */
-
-	mov loc3 = ar.unat		;;
-	st8 [loc2] = loc3		/* save ar.unat (callee) */
-
-	/*
-	 * Save branch registers
-	 */
-	mov loc2 = b0		;;
-	st8 [in0] = loc2, 8		/* save pc */
-	mov loc3 = b1		;;
-	st8 [in0] = loc3, 8
-	mov loc4 = b2		;;
-	st8 [in0] = loc4, 8
-	mov loc5 = b3		;;
-	st8 [in0] = loc5, 8
-	mov loc6 = b4		;;
-	st8 [in0] = loc6, 8
-	mov loc7 = b5		;;
-	st8 [in0] = loc7, 8
-
-	/*
-	 * Save predicate registers
-	 */
-	mov loc2 = pr		;;
-	st8 [in0] = loc2, 16;; 		/* Next fpu registers should be spilled to 16B aligned address */
-
-	/*
-	 * Save floating-point registers.
-	 */
-	stf.spill [in0] = f2, 16 ;;
-	stf.spill [in0] = f3, 16 ;;
-	stf.spill [in0] = f4, 16 ;;
-	stf.spill [in0] = f5, 16 ;;
-
-	stf.spill [in0] = f16, 16 ;;
-	stf.spill [in0] = f17, 16 ;;
-	stf.spill [in0] = f18, 16 ;;
-	stf.spill [in0] = f19, 16 ;;
-	stf.spill [in0] = f20, 16 ;;
-	stf.spill [in0] = f21, 16 ;;
-	stf.spill [in0] = f22, 16 ;;
-	stf.spill [in0] = f23, 16 ;;
-	stf.spill [in0] = f24, 16 ;;
-	stf.spill [in0] = f25, 16 ;;
-	stf.spill [in0] = f26, 16 ;;
-	stf.spill [in0] = f27, 16 ;;
-	stf.spill [in0] = f28, 16 ;;
-	stf.spill [in0] = f29, 16 ;;
-	stf.spill [in0] = f30, 16 ;;
-	stf.spill [in0] = f31, 16 ;;	
-
-	mov ar.unat = loc1
-	
-	add r8 = r0, r0, 1 		/* context_save returns 1 */
-	br.ret.sptk.many b0
-
-context_restore:
-	alloc loc0 = ar.pfs, 1, 9, 0, 0	;;
-
-	ld8 loc0 = [in0], 8	;;	/* load ar.pfs */
-	ld8 loc1 = [in0], 8	;;	/* load ar.unat (caller) */
-	ld8 loc2 = [in0], 8	;;	/* load ar.unat (callee) */
-	ld8 loc3 = [in0], 8	;;	/* load ar.rsc */
-	ld8 loc4 = [in0], 8	;;	/* load ar.bsp */
-	ld8 loc5 = [in0], 8	;;	/* load ar.rnat */
-	ld8 loc6 = [in0], 8	;;	/* load ar.lc */
-	
-	.auto	
-
-	/*
-	 * Invalidate the ALAT
-	 */
-	invala
-
-	/*
-	 * Put RSE to enforced lazy mode.
-	 * So that ar.bspstore and ar.rnat can be written.
-	 */
-	movl loc8 = ~3
-	and loc8 = loc3, loc8
-	mov ar.rsc = loc8
-
-	/*
-	 * Flush dirty registers to backing store.
-	 * We do this because we want the following move
-	 * to ar.bspstore to assign the same value to ar.bsp.
-	 */
-	flushrs
-
-	/*
-	 * Restore application registers
-	 */
-	mov ar.bspstore = loc4	/* rse.bspload = ar.bsp = ar.bspstore = loc4 */
-	mov ar.rnat = loc5
-	mov ar.pfs = loc0
-	mov ar.rsc = loc3
-
-	.explicit
-
-	mov ar.unat = loc2	;;
-	mov ar.lc = loc6
-	
-	/*
-	 * Restore general registers including NaT bits
-	 */
-	ld8.fill r1 = [in0], 8	;;
-	ld8.fill r4 = [in0], 8	;;
-	ld8.fill r5 = [in0], 8	;;
-	ld8.fill r6 = [in0], 8	;;
-	ld8.fill r7 = [in0], 8	;;
-	ld8.fill r12 = [in0], 8	;;	/* restore sp */
-	ld8.fill r13 = [in0], 8	;;
-
-	/* 
-	 * Restore branch registers
-	 */
-	ld8 loc2 = [in0], 8	;;	/* restore pc */
-	mov b0 = loc2
-	ld8 loc3 = [in0], 8	;;
-	mov b1 = loc3
-	ld8 loc4 = [in0], 8	;;
-	mov b2 = loc4
-	ld8 loc5 = [in0], 8	;;
-	mov b3 = loc5
-	ld8 loc6 = [in0], 8	;;
-	mov b4 = loc6
-	ld8 loc7 = [in0], 8	;;
-	mov b5 = loc7
-
-	/*
-	 * Restore predicate registers
-	 */
-	ld8 loc2 = [in0], 16	;;
-	mov pr = loc2, ~0
-
-	/*
-	 * Restore floating-point registers.
-	 */
-	ldf.fill f2 = [in0], 16 ;;
-	ldf.fill f3 = [in0], 16 ;;
-	ldf.fill f4 = [in0], 16 ;;
-	ldf.fill f5 = [in0], 16 ;;
-
-	ldf.fill f16 = [in0], 16 ;;
-	ldf.fill f17 = [in0], 16 ;;
-	ldf.fill f18 = [in0], 16 ;;
-	ldf.fill f19 = [in0], 16 ;;
-	ldf.fill f20 = [in0], 16 ;;
-	ldf.fill f21 = [in0], 16 ;;
-	ldf.fill f22 = [in0], 16 ;;
-	ldf.fill f23 = [in0], 16 ;;
-	ldf.fill f24 = [in0], 16 ;;
-	ldf.fill f25 = [in0], 16 ;;
-	ldf.fill f26 = [in0], 16 ;;
-	ldf.fill f27 = [in0], 16 ;;
-	ldf.fill f28 = [in0], 16 ;;
-	ldf.fill f29 = [in0], 16 ;;
-	ldf.fill f30 = [in0], 16 ;;
-	ldf.fill f31 = [in0], 16 ;;
-	
-	mov ar.unat = loc1
-	
-	mov r8 = r0			/* context_restore returns 0 */
-	br.ret.sptk.many b0
Index: pace/lib/libc/arch/ia64/src/stacktrace.c
===================================================================
--- uspace/lib/libc/arch/ia64/src/stacktrace.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,62 +1,0 @@
-/*
- * Copyright (c) 2010 Jakub Jermar
- * 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 libcia64 ia64
- * @ingroup lc
- * @{
- */
-/** @file
- */
-
-#include <sys/types.h>
-#include <bool.h>
-#include <errno.h>
-
-#include <stacktrace.h>
-
-bool stacktrace_fp_valid(stacktrace_t *st, uintptr_t fp)
-{
-	(void) st; (void) fp;
-	return false;
-}
-
-int stacktrace_fp_prev(stacktrace_t *st, uintptr_t fp, uintptr_t *prev)
-{
-	(void) st; (void) fp; (void) prev;
-	return ENOTSUP;
-}
-
-int stacktrace_ra_get(stacktrace_t *st, uintptr_t fp, uintptr_t *ra)
-{
-	(void) st; (void) fp; (void) ra;
-	return ENOTSUP;
-}
-
-/** @}
- */
Index: pace/lib/libc/arch/ia64/src/stacktrace_asm.S
===================================================================
--- uspace/lib/libc/arch/ia64/src/stacktrace_asm.S	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,41 +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.
-#
-
-.text
-
-.global stacktrace_prepare
-.global stacktrace_fp_get
-.global stacktrace_pc_get
-
-stacktrace_prepare:
-	br.ret.sptk.many b0
-
-stacktrace_fp_get:
-stacktrace_pc_get:
-	mov r8 = r0
-	br.ret.sptk.many b0
Index: pace/lib/libc/arch/ia64/src/syscall.S
===================================================================
--- uspace/lib/libc/arch/ia64/src/syscall.S	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(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.
-#
-
-/**
- * Immediate operand for break instruction.
- * Be carefull about the value as Ski simulator
- * is somewhat sensitive to its value.
- *
- * 0 will be confused with Ski breakpoint.
- * And higher values will be confused with SSC's.
- */
-#define SYSCALL_IMM	1
-
-.global __syscall
-__syscall:
-	alloc r14 = ar.pfs, 7, 0, 0, 0 ;;
-	break SYSCALL_IMM
-	mov ar.pfs = r14 ;;
-	br.ret.sptk.many b0
Index: pace/lib/libc/arch/ia64/src/thread_entry.s
===================================================================
--- uspace/lib/libc/arch/ia64/src/thread_entry.s	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,52 +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.
-#
-
-.text
-
-.globl __thread_entry
-
-## User-space thread entry point for all but the first threads.
-#
-#
-__thread_entry:
-	alloc loc0 = ar.pfs, 0, 1, 1, 0
-
-	movl r1 = _gp
-	
-	#
-	# r8 contains address of uarg structure.
-	#
-	
-	mov out0 = r8
-	br.call.sptk.many b0 = __thread_main
-	
-	#
-	# Not reached.
-	#
-	
-.end __thread_entry
Index: pace/lib/libc/arch/ia64/src/tls.c
===================================================================
--- uspace/lib/libc/arch/ia64/src/tls.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(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 libcia64 ia64
-  * @brief ia64 architecture dependent parts of libc
-  * @ingroup lc
- * @{
- */
-/** @file
- */
-
-#include <tls.h>
-#include <malloc.h>
-
-tcb_t * __alloc_tls(void **data, size_t size)
-{
-	return tls_alloc_variant_1(data, size);
-}
-
-void __free_tls_arch(tcb_t *tcb, size_t size)
-{
-	tls_free_variant_1(tcb, size);
-}
-
-/** @}
- */
Index: pace/lib/libc/arch/mips32/Makefile.inc
===================================================================
--- uspace/lib/libc/arch/mips32/Makefile.inc	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,43 +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.
-#
-
-ARCH_SOURCES = \
-	arch/$(UARCH)/src/entry.s \
-	arch/$(UARCH)/src/thread_entry.s \
-	arch/$(UARCH)/src/syscall.c \
-	arch/$(UARCH)/src/fibril.S \
-	arch/$(UARCH)/src/tls.c \
-	arch/$(UARCH)/src/stacktrace.c \
-	arch/$(UARCH)/src/stacktrace_asm.S
-
-GCC_CFLAGS += -mips3
-
-ENDIANESS = LE
-
-BFD_ARCH = mips
-BFD_NAME = elf32-tradlittlemips
Index: pace/lib/libc/arch/mips32/_link.ld.in
===================================================================
--- uspace/lib/libc/arch/mips32/_link.ld.in	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,57 +1,0 @@
-STARTUP(LIBC_PREFIX/arch/UARCH/src/entry.o)
-ENTRY(__entry)
-
-PHDRS {
-	text PT_LOAD FLAGS(5);
-	data PT_LOAD FLAGS(6);
-}
-
-SECTIONS {
-	. = 0x4000 + SIZEOF_HEADERS;
-	
-	.init : {
-		*(.init);
-	} :text
-	.text : {
-	        *(.text);
-		*(.rodata*);
-	} :text
-
-	. = . + 0x4000;
-
-	.data : {
-		*(.data);
-		*(.data.rel*);
-	} :data
-
-	.got : {
-		_gp = .;
-		*(.got);
-	} :data
-
-	.tdata : {
-		_tdata_start = .;
-		*(.tdata);
-		_tdata_end = .;
-		_tbss_start = .;
-		*(.tbss);
-		_tbss_end = .;
-	} :data
-	_tls_alignment = ALIGNOF(.tdata);
-
-	.sbss : {
-		*(.scommon);
-		*(.sbss);
-	}	
-	.bss : {
-		*(.bss);
-		*(COMMON);
-	} :data
-
-	. = ALIGN(0x4000);
-	_heap = .;
-
-	/DISCARD/ : {
-		*(*);
-	}
-}
Index: pace/lib/libc/arch/mips32/include/atomic.h
===================================================================
--- uspace/lib/libc/arch/mips32/include/atomic.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,87 +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 libcmips32
- * @{
- */
-/** @file
- * @ingroup libcmips32eb
- */
-
-#ifndef LIBC_mips32_ATOMIC_H_
-#define LIBC_mips32_ATOMIC_H_
-
-#define LIBC_ARCH_ATOMIC_H_
-
-#include <atomicdflt.h>
-
-#define atomic_inc(x)  ((void) atomic_add(x, 1))
-#define atomic_dec(x)  ((void) atomic_add(x, -1))
-
-#define atomic_postinc(x)  (atomic_add(x, 1) - 1)
-#define atomic_postdec(x)  (atomic_add(x, -1) + 1)
-
-#define atomic_preinc(x)  atomic_add(x, 1)
-#define atomic_predec(x)  atomic_add(x, -1)
-
-/* Atomic addition of immediate value.
- *
- * @param val Memory location to which will be the immediate value added.
- * @param i   Signed immediate that will be added to *val.
- *
- * @return Value after addition.
- *
- */
-static inline atomic_count_t atomic_add(atomic_t *val, atomic_count_t i)
-{
-	atomic_count_t tmp;
-	atomic_count_t v;
-	
-	asm volatile (
-		"1:\n"
-		"	ll %0, %1\n"
-		"	addu %0, %0, %3\n"	/* same as add, but never traps on overflow */
-		"       move %2, %0\n"
-		"	sc %0, %1\n"
-		"	beq %0, %4, 1b\n"	/* if the atomic operation failed, try again */
-		/*	nop	*/		/* nop is inserted automatically by compiler */
-		"	nop\n"
-		: "=&r" (tmp),
-		  "+m" (val->count),
-		  "=&r" (v)
-		: "r" (i),
-		  "i" (0)
-	);
-	
-	return v;
-}
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/arch/mips32/include/config.h
===================================================================
--- uspace/lib/libc/arch/mips32/include/config.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(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 libcmips32
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_mips32_CONFIG_H_
-#define LIBC_mips32_CONFIG_H_
-
-#define PAGE_WIDTH	14
-#define PAGE_SIZE	(1 << PAGE_WIDTH)
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/arch/mips32/include/ddi.h
===================================================================
--- uspace/lib/libc/arch/mips32/include/ddi.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,69 +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 libcmips32
- */
-
-#ifndef LIBC_mips32_DDI_H_
-#define LIBC_mips32_DDI_H_
-
-#include <sys/types.h>
-#include <libarch/types.h>
-
-static inline void pio_write_8(ioport8_t *port, uint8_t v)
-{
-	*port = v;
-}
-
-static inline void pio_write_16(ioport16_t *port, uint16_t v)
-{
-	*port = v;
-}
-
-static inline void pio_write_32(ioport32_t *port, uint32_t v)
-{
-	*port = v;
-}
-
-static inline uint8_t pio_read_8(ioport8_t *port)
-{
-	return *port;
-}
-
-static inline uint16_t pio_read_16(ioport16_t *port)
-{
-	return *port;
-}
-
-static inline uint32_t pio_read_32(ioport32_t *port)
-{
-	return *port;
-}
-
-#endif
Index: pace/lib/libc/arch/mips32/include/faddr.h
===================================================================
--- uspace/lib/libc/arch/mips32/include/faddr.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(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 libcmips32
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_mips32_FADDR_H_
-#define LIBC_mips32_FADDR_H_
-
-#include <libarch/types.h>
-
-#define FADDR(fptr)		((uintptr_t) (fptr))
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/arch/mips32/include/fibril.h
===================================================================
--- uspace/lib/libc/arch/mips32/include/fibril.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,90 +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 libcmips32	
- * @{
- */
-/** @file
- * @ingroup libcmips32eb	
- */
-
-#ifndef LIBC_mips32_FIBRIL_H_
-#define LIBC_mips32_FIBRIL_H_
-
-#include <sys/types.h>
-
-/* We define our own context_set, because we need to set
- * the TLS pointer to the tcb+0x7000
- *
- * See tls_set in thread.h
- */
-#define context_set(c, _pc, stack, size, ptls) 			\
-	(c)->pc = (sysarg_t) (_pc);				\
-	(c)->sp = ((sysarg_t) (stack)) + (size) - SP_DELTA; 	\
-        (c)->tls = ((sysarg_t)(ptls)) + 0x7000 + sizeof(tcb_t);
-
-
-/* +16 is just for sure that the called function
- * have space to store it's arguments
- */
-#define SP_DELTA	(8+16)
-
-typedef struct  {
-	uint32_t sp;
-	uint32_t pc;
-	
-	uint32_t s0;
-	uint32_t s1;
-	uint32_t s2;
-	uint32_t s3;
-	uint32_t s4;
-	uint32_t s5;
-	uint32_t s6;
-	uint32_t s7;
-	uint32_t s8;
-	uint32_t gp;
-	uint32_t tls; /* Thread local storage(=k1) */
-
-	uint32_t f20;
-	uint32_t f21;
-	uint32_t f22;
-	uint32_t f23;
-	uint32_t f24;
-	uint32_t f25;
-	uint32_t f26;
-	uint32_t f27;
-	uint32_t f28;
-	uint32_t f29;
-	uint32_t f30;
-	
-} context_t;
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/arch/mips32/include/inttypes.h
===================================================================
--- uspace/lib/libc/arch/mips32/include/inttypes.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,76 +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 libcmips32
- * @{
- */
-/** @file Macros for format specifiers.
- *
- * Macros for formatting stdint types as specified in section
- * 7.8.1 Macros for format specifiers of the C99 draft specification
- * (ISO/IEC 9899:201x). Only some macros from the specification are
- * implemented.
- */
-
-#ifndef LIBC_mips32_INTTYPES_H_
-#define LIBC_mips32_INTTYPES_H_
-
-#define PRId8 "d"
-#define PRId16 "d"
-#define PRId32 "d"
-#define PRId64 "lld"
-#define PRIdPTR "d"
-
-#define PRIo8 "o"
-#define PRIo16 "o"
-#define PRIo32 "o"
-#define PRIo64 "llo"
-#define PRIoPTR "o"
-
-#define PRIu8 "u"
-#define PRIu16 "u"
-#define PRIu32 "u"
-#define PRIu64 "llu"
-#define PRIuPTR "u"
-
-#define PRIx8 "x"
-#define PRIx16 "x"
-#define PRIx32 "x"
-#define PRIx64 "llx"
-#define PRIxPTR "x"
-
-#define PRIX8 "X"
-#define PRIX16 "X"
-#define PRIX32 "X"
-#define PRIX64 "llX"
-#define PRIXPTR "x"
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/arch/mips32/include/istate.h
===================================================================
--- uspace/lib/libc/arch/mips32/include/istate.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,88 +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 libcmips32
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_mips32__ISTATE_H_
-#define LIBC_mips32__ISTATE_H_
-
-#include <sys/types.h>
-
-/** Interrupt context.
- *
- * This is a copy of the kernel definition with which it must be kept in sync.
- */
-typedef struct istate {
-	uint32_t at;
-	uint32_t v0;
-	uint32_t v1;
-	uint32_t a0;
-	uint32_t a1;
-	uint32_t a2;
-	uint32_t a3;
-	uint32_t t0;
-	uint32_t t1;
-	uint32_t t2;
-	uint32_t t3;
-	uint32_t t4;
-	uint32_t t5;
-	uint32_t t6;
-	uint32_t t7;
-	uint32_t t8;
-	uint32_t t9;
-	uint32_t gp;
-	uint32_t sp;
-	uint32_t ra;
-
-	uint32_t lo;
-	uint32_t hi;
-
-	uint32_t status; /* cp0_status */
-	uint32_t epc; /* cp0_epc */
-	uint32_t k1; /* We use it as thread-local pointer */
-} istate_t;
-
-static inline uintptr_t istate_get_pc(istate_t *istate)
-{
-	return istate->epc;
-}
-
-static inline uintptr_t istate_get_fp(istate_t *istate)
-{
-	/* TODO */
-	return 0;
-}
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/arch/mips32/include/limits.h
===================================================================
--- uspace/lib/libc/arch/mips32/include/limits.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,52 +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 libcmips32
- * @{
- */
-/** @file
- * @ingroup libcmips32eb
- */
-
-#ifndef LIBC_mips32__LIMITS_H_
-#define LIBC_mips32__LIMITS_H_
-
-#define LONG_MIN MIN_INT32
-#define LONG_MAX MAX_INT32
-#define ULONG_MIN MIN_UINT32
-#define ULONG_MAX MAX_UINT32
-
-#define SIZE_MIN MIN_UINT32
-#define SIZE_MAX MAX_UINT32
-#define SSIZE_MIN MIN_INT32
-#define SSIZE_MAX MAX_INT32
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/arch/mips32/include/syscall.h
===================================================================
--- uspace/lib/libc/arch/mips32/include/syscall.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,46 +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 libc
- * @{
- */
-/**
- * @file
- */
-
-#ifndef LIBC_mips32_SYSCALL_H_
-#define LIBC_mips32_SYSCALL_H_
-
-#define LIBARCH_SYSCALL_GENERIC
-
-#include <syscall.h>
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/arch/mips32/include/thread.h
===================================================================
--- uspace/lib/libc/arch/mips32/include/thread.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,42 +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 libcmips32	
- * @{
- */
-/** @file
- * @ingroup libcmips32eb	
- */
-
-#ifndef LIBC_mips32_THREAD_H_
-#define LIBC_mips32_THREAD_H_
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/arch/mips32/include/tls.h
===================================================================
--- uspace/lib/libc/arch/mips32/include/tls.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,86 +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 libcmips32	
- * @{
- */
-/** @file
- * @ingroup libcmips32eb	
- */
-
-/* TLS for MIPS is described in http://www.linux-mips.org/wiki/NPTL */
-
-#ifndef LIBC_mips32_TLS_H_
-#define LIBC_mips32_TLS_H_
-
-/*
- * FIXME: Note that the use of variant I contradicts the observations made in
- * the note below. Nevertheless the scheme we have used for allocating and
- * deallocatin TLS corresponds to TLS variant I.
- */
-#define CONFIG_TLS_VARIANT_1
-
-/* I did not find any specification (neither MIPS nor PowerPC), but
- * as I found it
- * - it uses Variant II
- * - TCB is at Address(First TLS Block)+0x7000.
- * - DTV is at Address(First TLS Block)+0x8000
- * - What would happen if the TLS data was larger then 0x7000?
- * - The linker never accesses DTV directly, has the second definition any
- *   sense?
- * We will make it this way:
- * - TCB is at TP-0x7000-sizeof(tcb)
- * - No assumption about DTV etc., but it will not have a fixed address
- */
-#define MIPS_TP_OFFSET 0x7000
-
-typedef struct {
-	void *fibril_data;
-} tcb_t;
-
-static inline void __tcb_set(tcb_t *tcb)
-{
-	void *tp = tcb;
-	tp += MIPS_TP_OFFSET + sizeof(tcb_t);
-
-	asm volatile ("add $27, %0, $0" : : "r"(tp)); /* Move tls to K1 */
-}
-
-static inline tcb_t * __tcb_get(void)
-{
-	void * retval;
-
-	asm volatile("add %0, $27, $0" : "=r"(retval));
-
-	return (tcb_t *)(retval - MIPS_TP_OFFSET - sizeof(tcb_t));
-}
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/arch/mips32/include/types.h
===================================================================
--- uspace/lib/libc/arch/mips32/include/types.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,63 +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 libcmips32
- * @{
- */
-/** @file
- * @ingroup libcmips32eb
- */
-
-#ifndef LIBC_mips32_TYPES_H_
-#define LIBC_mips32_TYPES_H_
-
-#define __32_BITS__
-
-typedef unsigned int sysarg_t;
-
-typedef char int8_t;
-typedef short int int16_t;
-typedef long int int32_t;
-typedef long long int int64_t;
-
-typedef unsigned char uint8_t;
-typedef unsigned short int uint16_t;
-typedef unsigned long int uint32_t;
-typedef unsigned long long int uint64_t;
-
-typedef int32_t ssize_t;
-typedef uint32_t size_t;
-
-typedef uint32_t uintptr_t;
-typedef uint32_t atomic_count_t;
-typedef int32_t atomic_signed_t;
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/arch/mips32/src/entry.s
===================================================================
--- uspace/lib/libc/arch/mips32/src/entry.s	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,65 +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.
-#
-
-.text
-.section .init, "ax"
-.global __entry
-.global __entry_driver
-.set noreorder
-.option pic2
-
-## User-space task entry point
-#
-# $a0 ($4) contains the PCB pointer
-#
-.ent __entry
-__entry:
-	.frame $sp, 32, $31
-	.cpload $25
-
-	# Mips o32 may store its arguments on stack, make space (16 bytes),
-	# so that it could work with -O0
-	# Make space additional 16 bytes for the stack frame
-
-	addiu $sp, -32
-	.cprestore 16   # Allow PIC code
-
-	# Pass pcb_ptr to __main() as the first argument. pcb_ptr is already
-	# in $a0. As the first argument is passed in $a0, no operation
-	# is needed.
-
-	jal __main
-	nop
-	
-	jal __exit
-	nop
-.end
-
-# Alignment of output section data to 0x4000
-.section .data
-.align 14
Index: pace/lib/libc/arch/mips32/src/fibril.S
===================================================================
--- uspace/lib/libc/arch/mips32/src/fibril.S	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,55 +1,0 @@
-#
-# Copyright (c) 2003-2004 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.
-#
-
-.text
-
-.set noat
-.set noreorder
-
-#include <arch/context_offset.h>
-	
-.global context_save
-.global context_restore
-	
-context_save:
-	CONTEXT_SAVE_ARCH_CORE $a0
-
-	# context_save returns 1
-	j $ra
-	li $v0, 1	
-	
-context_restore:
-	CONTEXT_RESTORE_ARCH_CORE $a0
-
-	# Just for the jump into first function, but one instruction
-	# should not bother us
-	move $t9, $ra	
-	# context_restore returns 0
-	j $ra
-	xor $v0, $v0	
-
Index: pace/lib/libc/arch/mips32/src/stacktrace.c
===================================================================
--- uspace/lib/libc/arch/mips32/src/stacktrace.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,62 +1,0 @@
-/*
- * Copyright (c) 2010 Jakub Jermar
- * 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 libcmips32 mips32
- * @ingroup lc
- * @{
- */
-/** @file
- */
-
-#include <sys/types.h>
-#include <bool.h>
-#include <errno.h>
-
-#include <stacktrace.h>
-
-bool stacktrace_fp_valid(stacktrace_t *st, uintptr_t fp)
-{
-	(void) st; (void) fp;
-	return false;
-}
-
-int stacktrace_fp_prev(stacktrace_t *st, uintptr_t fp, uintptr_t *prev)
-{
-	(void) st; (void) fp; (void) prev;
-	return ENOTSUP;
-}
-
-int stacktrace_ra_get(stacktrace_t *st, uintptr_t fp, uintptr_t *ra)
-{
-	(void) st; (void) fp; (void) ra;
-	return ENOTSUP;
-}
-
-/** @}
- */
Index: pace/lib/libc/arch/mips32/src/stacktrace_asm.S
===================================================================
--- uspace/lib/libc/arch/mips32/src/stacktrace_asm.S	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,42 +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.
-#
-
-.text
-
-.set noat
-.set noreorder
-
-.global stacktrace_prepare
-.global stacktrace_fp_get
-.global stacktrace_pc_get
-
-stacktrace_prepare:
-stacktrace_fp_get:
-stacktrace_pc_get:
-	j $ra
-	xor $v0, $v0
Index: pace/lib/libc/arch/mips32/src/syscall.c
===================================================================
--- uspace/lib/libc/arch/mips32/src/syscall.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,68 +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 libcmips32
- * @{
- */
-/** @file
-  * @ingroup libcmips32eb	
- */
-
-#include <libc.h>
-
-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 sysarg_t __mips_reg_a0 asm("$4") = p1;
-	register sysarg_t __mips_reg_a1 asm("$5") = p2;
-	register sysarg_t __mips_reg_a2 asm("$6") = p3;
-	register sysarg_t __mips_reg_a3 asm("$7") = p4;
-	register sysarg_t __mips_reg_t0 asm("$8") = p5;
-	register sysarg_t __mips_reg_t1 asm("$9") = p6;
-	register sysarg_t __mips_reg_v0 asm("$2") = id;
-	
-	asm volatile (
-		"syscall\n"
-		: "=r" (__mips_reg_v0)
-		: "r" (__mips_reg_a0),
-		  "r" (__mips_reg_a1),
-		  "r" (__mips_reg_a2),
-		  "r" (__mips_reg_a3),
-		  "r" (__mips_reg_t0),
-		  "r" (__mips_reg_t1),
-		  "r" (__mips_reg_v0)
-		: "%ra" /* We are a function call, although C does not 
-			 * know it */
-	);
-	
-	return __mips_reg_v0;
-}
-
- /** @}
- */
-
Index: pace/lib/libc/arch/mips32/src/thread_entry.s
===================================================================
--- uspace/lib/libc/arch/mips32/src/thread_entry.s	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,59 +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.
-#
-
-.text
-	
-.set noat
-.set noreorder
-.option pic2
-	
-.globl __thread_entry
-
-## User-space thread entry point for all but the first threads.
-#
-#
-.ent __thread_entry
-__thread_entry:
-	.frame $sp, 32, $31
-	.cpload $25
-
-	#
-	# v0 contains address of uarg.
-	#
-	add $4, $2, 0
-	# Mips o32 may store its arguments on stack, make space
-	addiu $sp, -32
-	.cprestore 16
-	
-	jal __thread_main
-	nop
-		
-	#
-	# Not reached.
-	#
-.end __thread_entry
Index: pace/lib/libc/arch/mips32/src/tls.c
===================================================================
--- uspace/lib/libc/arch/mips32/src/tls.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,50 +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 libcmips32	
- * @{
- */
-/** @file
- * @ingroup libcmips32eb	
- */
-
-#include <tls.h>
-#include <sys/types.h>
-
-tcb_t * __alloc_tls(void **data, size_t size)
-{
-	return tls_alloc_variant_1(data, size);
-}
-
-void __free_tls_arch(tcb_t *tcb, size_t size)
-{
-	tls_free_variant_1(tcb, size);
-}
-
-/** @}
- */
Index: pace/lib/libc/arch/mips32eb/Makefile.inc
===================================================================
--- uspace/lib/libc/arch/mips32eb/Makefile.inc	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,44 +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.
-#
-
-ARCH_SOURCES = \
-	arch/$(UARCH)/src/entry.s \
-	arch/$(UARCH)/src/thread_entry.s \
-	arch/$(UARCH)/src/syscall.c \
-	arch/$(UARCH)/src/fibril.S \
-	arch/$(UARCH)/src/tls.c \
-	arch/$(UARCH)/src/stacktrace.c \
-	arch/$(UARCH)/src/stacktrace_asm.S
-
-GCC_CFLAGS += -mips3
-LFLAGS += -N
-
-ENDIANESS = BE
-
-BFD_ARCH = mips
-BFD_NAME = elf32-tradbigmips
Index: pace/lib/libc/arch/mips32eb/_link.ld.in
===================================================================
--- uspace/lib/libc/arch/mips32eb/_link.ld.in	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,1 +1,0 @@
-../mips32/_link.ld.in
Index: pace/lib/libc/arch/mips32eb/include/atomic.h
===================================================================
--- uspace/lib/libc/arch/mips32eb/include/atomic.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,1 +1,0 @@
-../../mips32/include/atomic.h
Index: pace/lib/libc/arch/mips32eb/include/config.h
===================================================================
--- uspace/lib/libc/arch/mips32eb/include/config.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,1 +1,0 @@
-../../mips32/include/config.h
Index: pace/lib/libc/arch/mips32eb/include/ddi.h
===================================================================
--- uspace/lib/libc/arch/mips32eb/include/ddi.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,1 +1,0 @@
-../../mips32/include/ddi.h
Index: pace/lib/libc/arch/mips32eb/include/faddr.h
===================================================================
--- uspace/lib/libc/arch/mips32eb/include/faddr.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,1 +1,0 @@
-../../mips32/include/faddr.h
Index: pace/lib/libc/arch/mips32eb/include/fibril.h
===================================================================
--- uspace/lib/libc/arch/mips32eb/include/fibril.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,1 +1,0 @@
-../../mips32/include/fibril.h
Index: pace/lib/libc/arch/mips32eb/include/inttypes.h
===================================================================
--- uspace/lib/libc/arch/mips32eb/include/inttypes.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,1 +1,0 @@
-../../mips32/include/inttypes.h
Index: pace/lib/libc/arch/mips32eb/include/istate.h
===================================================================
--- uspace/lib/libc/arch/mips32eb/include/istate.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,1 +1,0 @@
-../../mips32/include/istate.h
Index: pace/lib/libc/arch/mips32eb/include/limits.h
===================================================================
--- uspace/lib/libc/arch/mips32eb/include/limits.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,1 +1,0 @@
-../../mips32/include/limits.h
Index: pace/lib/libc/arch/mips32eb/include/syscall.h
===================================================================
--- uspace/lib/libc/arch/mips32eb/include/syscall.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,1 +1,0 @@
-../../mips32/include/syscall.h
Index: pace/lib/libc/arch/mips32eb/include/thread.h
===================================================================
--- uspace/lib/libc/arch/mips32eb/include/thread.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,1 +1,0 @@
-../../mips32/include/thread.h
Index: pace/lib/libc/arch/mips32eb/include/tls.h
===================================================================
--- uspace/lib/libc/arch/mips32eb/include/tls.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,1 +1,0 @@
-../../mips32/include/tls.h
Index: pace/lib/libc/arch/mips32eb/include/types.h
===================================================================
--- uspace/lib/libc/arch/mips32eb/include/types.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,1 +1,0 @@
-../../mips32/include/types.h
Index: pace/lib/libc/arch/mips32eb/src
===================================================================
--- uspace/lib/libc/arch/mips32eb/src	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,1 +1,0 @@
-../mips32/src
Index: pace/lib/libc/arch/ppc32/Makefile.inc
===================================================================
--- uspace/lib/libc/arch/ppc32/Makefile.inc	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,45 +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/thread_entry.s \
-	arch/$(UARCH)/src/syscall.c \
-	arch/$(UARCH)/src/fibril.S \
-	arch/$(UARCH)/src/tls.c \
-	arch/$(UARCH)/src/stacktrace.c \
-	arch/$(UARCH)/src/stacktrace_asm.S
-
-GCC_CFLAGS += -mcpu=powerpc -msoft-float -m32
-AFLAGS += -a32
-LFLAGS += -N
-
-ENDIANESS = BE
-
-BFD_NAME = elf32-powerpc
-BFD_ARCH = powerpc:common
Index: pace/lib/libc/arch/ppc32/_link.ld.in
===================================================================
--- uspace/lib/libc/arch/ppc32/_link.ld.in	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,48 +1,0 @@
-STARTUP(LIBC_PREFIX/arch/UARCH/src/entry.o)
-ENTRY(__entry)
-
-PHDRS {
-	text PT_LOAD FLAGS(5);
-	data PT_LOAD FLAGS(6);
-}
-
-SECTIONS {
-	. = 0x1000 + SIZEOF_HEADERS;
-
-	.init : {
-		*(.init);
-	} :text
-	.text : {
-		*(.text);
-		*(.rodata*);
-	} :text
-
-	. = . + 0x1000;
-
-	.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
-
-	. = ALIGN(0x1000);
-	_heap = .;
-	
-	/DISCARD/ : {
-		*(*);
-	}
-
-}
Index: pace/lib/libc/arch/ppc32/include/atomic.h
===================================================================
--- uspace/lib/libc/arch/ppc32/include/atomic.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,105 +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 libcppc32
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_ppc32_ATOMIC_H_
-#define LIBC_ppc32_ATOMIC_H_
-
-#define LIBC_ARCH_ATOMIC_H_
-
-#include <atomicdflt.h>
-
-static inline void atomic_inc(atomic_t *val)
-{
-	atomic_count_t tmp;
-	
-	asm volatile (
-		"1:\n"
-		"lwarx %0, 0, %2\n"
-		"addic %0, %0, 1\n"
-		"stwcx. %0, 0, %2\n"
-		"bne- 1b"
-		: "=&r" (tmp),
-		  "=m" (val->count)
-		: "r" (&val->count),
-		  "m" (val->count)
-		: "cc"
-	);
-}
-
-static inline void atomic_dec(atomic_t *val)
-{
-	atomic_count_t tmp;
-	
-	asm volatile (
-		"1:\n"
-		"lwarx %0, 0, %2\n"
-		"addic %0, %0, -1\n"
-		"stwcx. %0, 0, %2\n"
-		"bne- 1b"
-		: "=&r" (tmp),
-		  "=m" (val->count)
-		: "r" (&val->count),
-		  "m" (val->count)
-		: "cc"
-	);
-}
-
-static inline atomic_count_t atomic_postinc(atomic_t *val)
-{
-	atomic_inc(val);
-	return val->count - 1;
-}
-
-static inline atomic_count_t atomic_postdec(atomic_t *val)
-{
-	atomic_dec(val);
-	return val->count + 1;
-}
-
-static inline atomic_count_t atomic_preinc(atomic_t *val)
-{
-	atomic_inc(val);
-	return val->count;
-}
-
-static inline atomic_count_t atomic_predec(atomic_t *val)
-{
-	atomic_dec(val);
-	return val->count;
-}
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/arch/ppc32/include/config.h
===================================================================
--- uspace/lib/libc/arch/ppc32/include/config.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(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 libppc32
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_ppc32_CONFIG_H_
-#define LIBC_ppc32_CONFIG_H_
-
-#define PAGE_WIDTH	12
-#define PAGE_SIZE	(1 << PAGE_WIDTH)
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/arch/ppc32/include/ddi.h
===================================================================
--- uspace/lib/libc/arch/ppc32/include/ddi.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,69 +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 libcppc32
- */
-
-#ifndef LIBC_ppc32_DDI_H_
-#define LIBC_ppc32_DDI_H_
-
-#include <sys/types.h>
-#include <libarch/types.h>
-
-static inline void pio_write_8(ioport8_t *port, uint8_t v)
-{
-	*port = v;
-}
-
-static inline void pio_write_16(ioport16_t *port, uint16_t v)
-{
-	*port = v;
-}
-
-static inline void pio_write_32(ioport32_t *port, uint32_t v)
-{
-	*port = v;
-}
-
-static inline uint8_t pio_read_8(ioport8_t *port)
-{
-	return *port;
-}
-
-static inline uint16_t pio_read_16(ioport16_t *port)
-{
-	return *port;
-}
-
-static inline uint32_t pio_read_32(ioport32_t *port)
-{
-	return *port;
-}
-
-#endif
Index: pace/lib/libc/arch/ppc32/include/faddr.h
===================================================================
--- uspace/lib/libc/arch/ppc32/include/faddr.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(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 libcppc32
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_ppc32_FADDR_H_
-#define LIBC_ppc32_FADDR_H_
-
-#include <libarch/types.h>
-
-#define FADDR(fptr)		((uintptr_t) (fptr))
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/arch/ppc32/include/fibril.h
===================================================================
--- uspace/lib/libc/arch/ppc32/include/fibril.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,83 +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.
- */
-
-/** @addtogroup libcppc32	
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_ppc32_FIBRIL_H_
-#define LIBC_ppc32_FIBRIL_H_
-
-#include <sys/types.h>
-
-/* We define our own context_set, because we need to set
- * the TLS pointer to the tcb+0x7000
- *
- * See tls_set in thread.h
- */
-#define context_set(c, _pc, stack, size, ptls) 			\
-	(c)->pc = (sysarg_t) (_pc);				\
-	(c)->sp = ((sysarg_t) (stack)) + (size) - SP_DELTA; 	\
-	(c)->tls = ((sysarg_t) (ptls)) + 0x7000 + sizeof(tcb_t);
-
-#define SP_DELTA	16
-
-typedef struct {
-	uint32_t sp;
-	uint32_t pc;
-	
-	uint32_t tls;
-	uint32_t r13;
-	uint32_t r14;
-	uint32_t r15;
-	uint32_t r16;
-	uint32_t r17;
-	uint32_t r18;
-	uint32_t r19;
-	uint32_t r20;
-	uint32_t r21;
-	uint32_t r22;
-	uint32_t r23;
-	uint32_t r24;
-	uint32_t r25;
-	uint32_t r26;
-	uint32_t r27;
-	uint32_t r28;
-	uint32_t r29;
-	uint32_t r30;
-	uint32_t r31;
-	
-	uint32_t cr;
-} __attribute__ ((packed)) context_t;
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/arch/ppc32/include/inttypes.h
===================================================================
--- uspace/lib/libc/arch/ppc32/include/inttypes.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,76 +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 libcppc32
- * @{
- */
-/** @file Macros for format specifiers.
- *
- * Macros for formatting stdint types as specified in section
- * 7.8.1 Macros for format specifiers of the C99 draft specification
- * (ISO/IEC 9899:201x). Only some macros from the specification are
- * implemented.
- */
-
-#ifndef LIBC_ppc32_INTTYPES_H_
-#define LIBC_ppc32_INTTYPES_H_
-
-#define PRId8 "d"
-#define PRId16 "d"
-#define PRId32 "d"
-#define PRId64 "lld"
-#define PRIdPTR "d"
-
-#define PRIo8 "o"
-#define PRIo16 "o"
-#define PRIo32 "o"
-#define PRIo64 "llo"
-#define PRIoPTR "o"
-
-#define PRIu8 "u"
-#define PRIu16 "u"
-#define PRIu32 "u"
-#define PRIu64 "llu"
-#define PRIuPTR "u"
-
-#define PRIx8 "x"
-#define PRIx16 "x"
-#define PRIx32 "x"
-#define PRIx64 "llx"
-#define PRIxPTR "x"
-
-#define PRIX8 "X"
-#define PRIX16 "X"
-#define PRIX32 "X"
-#define PRIX64 "llX"
-#define PRIXPTR "X"
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/arch/ppc32/include/istate.h
===================================================================
--- uspace/lib/libc/arch/ppc32/include/istate.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,99 +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 libcppc32
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_ppc32_ISTATE_H_
-#define LIBC_ppc32_ISTATE_H_
-
-#include <sys/types.h>
-
-/** Interrupt context.
- *
- * This is a copy of the kernel definition with which it must be kept in sync.
- */
-typedef struct istate {
-	uint32_t r0;
-	uint32_t r2;
-	uint32_t r3;
-	uint32_t r4;
-	uint32_t r5;
-	uint32_t r6;
-	uint32_t r7;
-	uint32_t r8;
-	uint32_t r9;
-	uint32_t r10;
-	uint32_t r11;
-	uint32_t r13;
-	uint32_t r14;
-	uint32_t r15;
-	uint32_t r16;
-	uint32_t r17;
-	uint32_t r18;
-	uint32_t r19;
-	uint32_t r20;
-	uint32_t r21;
-	uint32_t r22;
-	uint32_t r23;
-	uint32_t r24;
-	uint32_t r25;
-	uint32_t r26;
-	uint32_t r27;
-	uint32_t r28;
-	uint32_t r29;
-	uint32_t r30;
-	uint32_t r31;
-	uint32_t cr;
-	uint32_t pc;
-	uint32_t srr1;
-	uint32_t lr;
-	uint32_t ctr;
-	uint32_t xer;
-	uint32_t dar;
-	uint32_t r12;
-	uint32_t sp;
-} istate_t;
-
-static inline uintptr_t istate_get_pc(istate_t *istate)
-{
-	return istate->pc;
-}
-
-static inline uintptr_t istate_get_fp(istate_t *istate)
-{
-	return istate->sp;
-}
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/arch/ppc32/include/limits.h
===================================================================
--- uspace/lib/libc/arch/ppc32/include/limits.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,51 +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 libcppc32
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_ppc32_LIMITS_H_
-#define LIBC_ppc32_LIMITS_H_
-
-#define LONG_MIN MIN_INT32
-#define LONG_MAX MAX_INT32
-#define ULONG_MIN MIN_UINT32
-#define ULONG_MAX MAX_UINT32
-
-#define SIZE_MIN MIN_UINT32
-#define SIZE_MAX MAX_UINT32
-#define SSIZE_MIN MIN_INT32
-#define SSIZE_MAX MAX_INT32
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/arch/ppc32/include/regname.h
===================================================================
--- uspace/lib/libc/arch/ppc32/include/regname.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,188 +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.
- */
-
-/** @addtogroup libcppc32	
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_ppc32_REGNAME_H_
-#define LIBC_ppc32_REGNAME_H_
-
-/* Condition Register Bit Fields */
-#define	cr0	0
-#define	cr1	1
-#define	cr2	2
-#define	cr3	3
-#define	cr4	4
-#define	cr5	5
-#define	cr6	6
-#define	cr7	7
-
-/* General Purpose Registers (GPRs) */
-#define	r0	0
-#define	r1	1
-#define	r2	2
-#define	r3	3
-#define	r4	4
-#define	r5	5
-#define	r6	6
-#define	r7	7
-#define	r8	8
-#define	r9	9
-#define	r10	10
-#define	r11	11
-#define	r12	12
-#define	r13	13
-#define	r14	14
-#define	r15	15
-#define	r16	16
-#define	r17	17
-#define	r18	18
-#define	r19	19
-#define	r20	20
-#define	r21	21
-#define	r22	22
-#define	r23	23
-#define	r24	24
-#define	r25	25
-#define	r26	26
-#define	r27	27
-#define	r28	28
-#define	r29	29
-#define	r30	30
-#define	r31	31
-
-/* GPR Aliases */
-#define	sp	1
-
-/* Floating Point Registers (FPRs) */
-#define	fr0		0
-#define	fr1		1
-#define	fr2		2
-#define	fr3		3
-#define	fr4		4
-#define	fr5		5
-#define	fr6		6
-#define	fr7		7
-#define	fr8		8
-#define	fr9		9
-#define	fr10	10
-#define	fr11	11
-#define	fr12	12
-#define	fr13	13
-#define	fr14	14
-#define	fr15	15
-#define	fr16	16
-#define	fr17	17
-#define	fr18	18
-#define	fr19	19
-#define	fr20	20
-#define	fr21	21
-#define	fr22	22
-#define	fr23	23
-#define	fr24	24
-#define	fr25	25
-#define	fr26	26
-#define	fr27	27
-#define	fr28	28
-#define	fr29	29
-#define	fr30	30
-#define	fr31	31
-
-#define	vr0		0
-#define	vr1		1
-#define	vr2		2
-#define	vr3		3
-#define	vr4		4
-#define	vr5		5
-#define	vr6		6
-#define	vr7		7
-#define	vr8		8
-#define	vr9		9
-#define	vr10	10
-#define	vr11	11
-#define	vr12	12
-#define	vr13	13
-#define	vr14	14
-#define	vr15	15
-#define	vr16	16
-#define	vr17	17
-#define	vr18	18
-#define	vr19	19
-#define	vr20	20
-#define	vr21	21
-#define	vr22	22
-#define	vr23	23
-#define	vr24	24
-#define	vr25	25
-#define	vr26	26
-#define	vr27	27
-#define	vr28	28
-#define	vr29	29
-#define	vr30	30
-#define	vr31	31
-
-#define	evr0	0
-#define	evr1	1
-#define	evr2	2
-#define	evr3	3
-#define	evr4	4
-#define	evr5	5
-#define	evr6	6
-#define	evr7	7
-#define	evr8	8
-#define	evr9	9
-#define	evr10	10
-#define	evr11	11
-#define	evr12	12
-#define	evr13	13
-#define	evr14	14
-#define	evr15	15
-#define	evr16	16
-#define	evr17	17
-#define	evr18	18
-#define	evr19	19
-#define	evr20	20
-#define	evr21	21
-#define	evr22	22
-#define	evr23	23
-#define	evr24	24
-#define	evr25	25
-#define	evr26	26
-#define	evr27	27
-#define	evr28	28
-#define	evr29	29
-#define	evr30	30
-#define	evr31	31
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/arch/ppc32/include/stackarg.h
===================================================================
--- uspace/lib/libc/arch/ppc32/include/stackarg.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(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 libcppc32	
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_STACKARG_H_
-#define LIBC_STACKARG_H_
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/arch/ppc32/include/syscall.h
===================================================================
--- uspace/lib/libc/arch/ppc32/include/syscall.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,46 +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 libc
- * @{
- */
-/**
- * @file
- */
-
-#ifndef LIBC_ppc32_SYSCALL_H_
-#define LIBC_ppc32_SYSCALL_H_
-
-#define LIBARCH_SYSCALL_GENERIC
-
-#include <syscall.h>
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/arch/ppc32/include/thread.h
===================================================================
--- uspace/lib/libc/arch/ppc32/include/thread.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,41 +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.
- */
-
-/** @addtogroup libcppc32	
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_ppc32_THREAD_H_
-#define LIBC_ppc32_THREAD_H_
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/arch/ppc32/include/tls.h
===================================================================
--- uspace/lib/libc/arch/ppc32/include/tls.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,73 +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.
- */
-
-/** @addtogroup libcppc32	
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_ppc32_TLS_H_
-#define LIBC_ppc32_TLS_H_
-
-#define CONFIG_TLS_VARIANT_1
-
-#define PPC_TP_OFFSET 0x7000
-
-typedef struct {
-	void *fibril_data;
-} tcb_t;
-
-static inline void __tcb_set(tcb_t *tcb)
-{
-	void *tp = tcb;
-	tp += PPC_TP_OFFSET + sizeof(tcb_t);
-	
-	asm volatile (
-		"mr %%r2, %0\n"
-		:
-		: "r" (tp)
-	);
-}
-
-static inline tcb_t * __tcb_get(void)
-{
-	void * retval;
-	
-	asm volatile (
-		"mr %0, %%r2\n"
-		: "=r" (retval)
-	);
-
-	return (tcb_t *)(retval - PPC_TP_OFFSET - sizeof(tcb_t));
-}
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/arch/ppc32/include/types.h
===================================================================
--- uspace/lib/libc/arch/ppc32/include/types.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,63 +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 libcppc32
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_ppc32_TYPES_H_
-#define LIBC_ppc32_TYPES_H_
-
-#define __32_BITS__
-
-typedef unsigned int sysarg_t;
-
-typedef char int8_t;
-typedef short int int16_t;
-typedef int int32_t;
-typedef long long int int64_t;
-
-typedef unsigned char uint8_t;
-typedef unsigned short int uint16_t;
-typedef unsigned int uint32_t;
-typedef unsigned long long int uint64_t;
-
-typedef int32_t ssize_t;
-typedef uint32_t size_t;
-
-typedef uint32_t uintptr_t;
-typedef uint32_t atomic_count_t;
-typedef int32_t atomic_signed_t;
-
-#endif
-
-/** @}
- */
-
Index: pace/lib/libc/arch/ppc32/src/entry.s
===================================================================
--- uspace/lib/libc/arch/ppc32/src/entry.s	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,52 +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.
-#
-
-.section .init, "ax"
-
-.org 0
-
-.globl __entry
-
-## User-space task entry point
-#
-# r6 contains the PCB pointer
-#
-__entry:
-	#
-	# Create the first stack frame.
-	#
-	li %r3, 0
-	stw %r3, 0(%r1)
-	stwu %r1, -16(%r1)
-
-	# Pass the PCB pointer to __main() as the first argument.
-	# The first argument is passed in r3.
-	mr %r3, %r6
-	bl __main
-
-	bl __exit
Index: pace/lib/libc/arch/ppc32/src/fibril.S
===================================================================
--- uspace/lib/libc/arch/ppc32/src/fibril.S	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,62 +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.
-#
-
-.text
-
-.global context_save
-.global context_restore
-
-#include <libarch/regname.h>
-#include <arch/context_offset.h>
-
-context_save:
-	CONTEXT_SAVE_ARCH_CORE r3
-	
-	mflr r4
-	stw r4, OFFSET_PC(r3)
-	
-	mfcr r4
-	stw r4, OFFSET_CR(r3)
-	
-	# context_save returns 1
-	li r3, 1
-	blr
-
-
-context_restore:
-	CONTEXT_RESTORE_ARCH_CORE r3
-	
-	lwz r4, OFFSET_CR(r3)
-	mtcr r4
-	
-	lwz r4, OFFSET_PC(r3)
-	mtlr r4
-	
-	# context_restore returns 0
-	li r3, 0
-	blr
Index: pace/lib/libc/arch/ppc32/src/stacktrace.c
===================================================================
--- uspace/lib/libc/arch/ppc32/src/stacktrace.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,62 +1,0 @@
-/*
- * Copyright (c) 2010 Jakub Jermar
- * 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 libcppc32 ppc32
- * @ingroup lc
- * @{
- */
-/** @file
- */
-
-#include <sys/types.h>
-#include <bool.h>
-
-#include <stacktrace.h>
-
-#define FRAME_OFFSET_FP_PREV	0
-#define FRAME_OFFSET_RA		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)
-{
-	return (*st->read_uintptr)(st->op_arg, fp + FRAME_OFFSET_FP_PREV, prev);
-}
-
-int stacktrace_ra_get(stacktrace_t *st, uintptr_t fp, uintptr_t *ra)
-{
-	return (*st->read_uintptr)(st->op_arg, fp + FRAME_OFFSET_RA, ra);
-}
-
-/** @}
- */
Index: pace/lib/libc/arch/ppc32/src/stacktrace_asm.S
===================================================================
--- uspace/lib/libc/arch/ppc32/src/stacktrace_asm.S	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,46 +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.
-#
-
-.text
-
-#include <libarch/regname.h>
-
-.global stacktrace_prepare
-.global stacktrace_fp_get
-.global stacktrace_pc_get
-
-stacktrace_prepare:
-	blr
-
-stacktrace_fp_get:
-	mr r3, sp
-	blr
-
-stacktrace_pc_get:
-	mflr r3
-	blr
Index: pace/lib/libc/arch/ppc32/src/syscall.c
===================================================================
--- uspace/lib/libc/arch/ppc32/src/syscall.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,66 +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.
- */
-
-/** @addtogroup libcppc32 ppc32
-  * @brief ppc32 architecture dependent parts of libc
-  * @ingroup lc
- * @{
- */
-/** @file
- */
-
-#include <libc.h>
-
-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 sysarg_t __ppc32_reg_r3 asm("3") = p1;
-	register sysarg_t __ppc32_reg_r4 asm("4") = p2;
-	register sysarg_t __ppc32_reg_r5 asm("5") = p3;
-	register sysarg_t __ppc32_reg_r6 asm("6") = p4;
-	register sysarg_t __ppc32_reg_r7 asm("7") = p5;
-	register sysarg_t __ppc32_reg_r8 asm("8") = p6;
-	register sysarg_t __ppc32_reg_r9 asm("9") = id;
-	
-	asm volatile (
-		"sc\n"
-		: "=r" (__ppc32_reg_r3)
-		: "r" (__ppc32_reg_r3),
-		  "r" (__ppc32_reg_r4),
-		  "r" (__ppc32_reg_r5),
-		  "r" (__ppc32_reg_r6),
-		  "r" (__ppc32_reg_r7),
-		  "r" (__ppc32_reg_r8),
-		  "r" (__ppc32_reg_r9)
-	);
-	
-	return __ppc32_reg_r3;
-}
-
-/** @}
- */
Index: pace/lib/libc/arch/ppc32/src/thread_entry.s
===================================================================
--- uspace/lib/libc/arch/ppc32/src/thread_entry.s	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,46 +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.
-#
-
-.text
-	
-.globl __thread_entry
-
-## User-space thread entry point for all but the first threads.
-#
-#
-__thread_entry:
-	#
-	# Create the first stack frame.
-	#
-	li %r4, 0
-	stw %r4, 0(%r1)
-	stwu %r1, -16(%r1)
-
-	b __thread_main
-
-.end __thread_entry
Index: pace/lib/libc/arch/ppc32/src/tls.c
===================================================================
--- uspace/lib/libc/arch/ppc32/src/tls.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,49 +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 libcppc32	
- * @{
- */
-/** @file
- */
-
-#include <tls.h>
-#include <sys/types.h>
-
-tcb_t * __alloc_tls(void **data, size_t size)
-{
-	return tls_alloc_variant_1(data, size);
-}
-
-void __free_tls_arch(tcb_t *tcb, size_t size)
-{
-	tls_free_variant_1(tcb, size);
-}
-
-/** @}
- */
Index: pace/lib/libc/arch/sparc64/Makefile.inc
===================================================================
--- uspace/lib/libc/arch/sparc64/Makefile.inc	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,55 +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/thread_entry.s \
-	arch/$(UARCH)/src/fibril.S \
-	arch/$(UARCH)/src/tls.c \
-	arch/$(UARCH)/src/stacktrace.c \
-	arch/$(UARCH)/src/stacktrace_asm.S
-
-GCC_CFLAGS += -mcpu=ultrasparc -m64
-LFLAGS += -no-check-sections -N
-
-ENDIANESS = BE
-
-BFD_NAME = elf64-sparc
-BFD_ARCH = sparc
-
-ifeq ($(PROCESSOR),us)
-	DEFS += -DSUN4U
-endif
-
-ifeq ($(PROCESSOR),us3)
-	DEFS += -DSUN4U
-endif
-
-ifeq ($(PROCESSOR),sun4v)
-	DEFS += -DSUN4V
-endif
Index: pace/lib/libc/arch/sparc64/_link.ld.in
===================================================================
--- uspace/lib/libc/arch/sparc64/_link.ld.in	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,52 +1,0 @@
-STARTUP(LIBC_PREFIX/arch/UARCH/src/entry.o)
-ENTRY(__entry)
-
-PHDRS {
-	text PT_LOAD FLAGS(5);
-	data PT_LOAD FLAGS(6);
-}
-
-SECTIONS {
-	. = 0x4000 + SIZEOF_HEADERS;
-
-	.init : {
-		*(.init);
-	} :text
-	.text : {
-		*(.text);
-		*(.rodata*);
-	} :text
-
-	. = . + 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
-
-	. = ALIGN(0x4000);
-	_heap = .;
-	
-	/DISCARD/ : {
-		*(*);
-	}
-
-}
Index: pace/lib/libc/arch/sparc64/include/atomic.h
===================================================================
--- uspace/lib/libc/arch/sparc64/include/atomic.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,108 +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 libcsparc64
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_sparc64_ATOMIC_H_
-#define LIBC_sparc64_ATOMIC_H_
-
-#define LIBC_ARCH_ATOMIC_H_
-
-#include <atomicdflt.h>
-#include <sys/types.h>
-
-/** Atomic add operation.
- *
- * Use atomic compare and swap operation to atomically add signed value.
- *
- * @param val Atomic variable.
- * @param i   Signed value to be added.
- *
- * @return Value of the atomic variable as it existed before addition.
- *
- */
-static inline atomic_count_t atomic_add(atomic_t *val, atomic_count_t i)
-{
-	atomic_count_t a;
-	atomic_count_t b;
-	
-	do {
-		volatile uintptr_t ptr = (uintptr_t) &val->count;
-		
-		a = *((atomic_count_t *) ptr);
-		b = a + i;
-		
-		asm volatile (
-			"casx %0, %2, %1\n"
-			: "+m" (*((atomic_count_t *) ptr)),
-			  "+r" (b)
-			: "r" (a)
-		);
-	} while (a != b);
-	
-	return a;
-}
-
-static inline atomic_count_t atomic_preinc(atomic_t *val)
-{
-	return atomic_add(val, 1) + 1;
-}
-
-static inline atomic_count_t atomic_postinc(atomic_t *val)
-{
-	return atomic_add(val, 1);
-}
-
-static inline atomic_count_t atomic_predec(atomic_t *val)
-{
-	return atomic_add(val, -1) - 1;
-}
-
-static inline atomic_count_t atomic_postdec(atomic_t *val)
-{
-	return atomic_add(val, -1);
-}
-
-static inline void atomic_inc(atomic_t *val)
-{
-	(void) atomic_add(val, 1);
-}
-
-static inline void atomic_dec(atomic_t *val)
-{
-	(void) atomic_add(val, -1);
-}
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/arch/sparc64/include/config.h
===================================================================
--- uspace/lib/libc/arch/sparc64/include/config.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,49 +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 libcsparc64
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_sparc64_CONFIG_H_
-#define LIBC_sparc64_CONFIG_H_
-
-#if defined (SUN4U)
-#define PAGE_WIDTH	14
-#elif defined(SUN4V)
-#define PAGE_WIDTH	13
-#endif
-
-#define PAGE_SIZE	(1 << PAGE_WIDTH)
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/arch/sparc64/include/ddi.h
===================================================================
--- uspace/lib/libc/arch/sparc64/include/ddi.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,95 +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 libsparc64
- */
-
-#ifndef LIBC_sparc64_DDI_H_
-#define LIBC_sparc64_DDI_H_
-
-#include <sys/types.h>
-#include <libarch/types.h>
-
-static inline void memory_barrier(void)
-{
-	asm volatile (
-		"membar #LoadLoad | #StoreStore\n"
-		::: "memory"
-	);
-}
-
-static inline void pio_write_8(ioport8_t *port, uint8_t v)
-{
-	*port = v;
-	memory_barrier();
-}
-
-static inline void pio_write_16(ioport16_t *port, uint16_t v)
-{
-	*port = v;
-	memory_barrier();
-}
-
-static inline void pio_write_32(ioport32_t *port, uint32_t v)
-{
-	*port = v;
-	memory_barrier();
-}
-
-static inline uint8_t pio_read_8(ioport8_t *port)
-{
-	uint8_t rv;
-
-	rv = *port;
-	memory_barrier();
-
-	return rv;
-}
-
-static inline uint16_t pio_read_16(ioport16_t *port)
-{
-	uint16_t rv;
-
-	rv = *port;
-	memory_barrier();
-
-	return rv;
-}
-
-static inline uint32_t pio_read_32(ioport32_t *port)
-{
-	uint32_t rv;
-
-	rv = *port;
-	memory_barrier();
-
-	return rv;
-}
-
-#endif
Index: pace/lib/libc/arch/sparc64/include/faddr.h
===================================================================
--- uspace/lib/libc/arch/sparc64/include/faddr.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(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 libcsparc64
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_sparc64_FADDR_H_
-#define LIBC_sparc64_FADDR_H_
-
-#include <libarch/types.h>
-
-#define FADDR(fptr)		((uintptr_t) (fptr))
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/arch/sparc64/include/fibril.h
===================================================================
--- uspace/lib/libc/arch/sparc64/include/fibril.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,82 +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 libcsparc64
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_sparc64_FIBRIL_H_
-#define LIBC_sparc64_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) - (STACK_BIAS + SP_DELTA); \
-		(c)->fp = -STACK_BIAS; \
-		(c)->tp = (uint64_t) ptls; \
-	} while (0)
-	
-/*
- * Save only registers that must be preserved across
- * function calls.
- */
-typedef struct {
-	uintptr_t sp;		/* %o6 */
-	uintptr_t pc;		/* %o7 */
-	uint64_t i0;
-	uint64_t i1;
-	uint64_t i2;
-	uint64_t i3;
-	uint64_t i4;
-	uint64_t i5;
-	uintptr_t fp;		/* %i6 */
-	uintptr_t i7;
-	uint64_t l0;
-	uint64_t l1;
-	uint64_t l2;
-	uint64_t l3;
-	uint64_t l4;
-	uint64_t l5;
-	uint64_t l6;
-	uint64_t l7;
-	uint64_t tp;		/* %g7 */
-} context_t;
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/arch/sparc64/include/inttypes.h
===================================================================
--- uspace/lib/libc/arch/sparc64/include/inttypes.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,76 +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 libcsparc64
- * @{
- */
-/** @file Macros for format specifiers.
- *
- * Macros for formatting stdint types as specified in section
- * 7.8.1 Macros for format specifiers of the C99 draft specification
- * (ISO/IEC 9899:201x). Only some macros from the specification are
- * implemented.
- */
-
-#ifndef LIBC_sparc64_INTTYPES_H_
-#define LIBC_sparc64_INTTYPES_H_
-
-#define PRId8 "d"
-#define PRId16 "d"
-#define PRId32 "d"
-#define PRId64 "lld"
-#define PRIdPTR "lld"
-
-#define PRIo8 "o"
-#define PRIo16 "o"
-#define PRIo32 "o"
-#define PRIo64 "llo"
-#define PRIoPTR "llo"
-
-#define PRIu8 "u"
-#define PRIu16 "u"
-#define PRIu32 "u"
-#define PRIu64 "llu"
-#define PRIuPTR "llu"
-
-#define PRIx8 "x"
-#define PRIx16 "x"
-#define PRIx32 "x"
-#define PRIx64 "llx"
-#define PRIxPTR "llx"
-
-#define PRIX8 "X"
-#define PRIX16 "X"
-#define PRIX32 "X"
-#define PRIX64 "llX"
-#define PRIXPTR "llX"
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/arch/sparc64/include/istate.h
===================================================================
--- uspace/lib/libc/arch/sparc64/include/istate.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,63 +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 libcsparc64
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_sparc64_ISTATE_H_
-#define LIBC_sparc64_ISTATE_H_
-
-#include <sys/types.h>
-
-/** Interrupt context.
- *
- * This is a copy of the kernel definition with which it must be kept in sync.
- */
-typedef struct istate {
-	/* TODO */
-} istate_t;
-
-static inline uintptr_t istate_get_pc(istate_t *istate)
-{
-	/* TODO */
-	return 0;
-}
-
-static inline uintptr_t istate_get_fp(istate_t *istate)
-{
-	/* TODO */
-	return 0;
-}
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/arch/sparc64/include/limits.h
===================================================================
--- uspace/lib/libc/arch/sparc64/include/limits.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,51 +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 libcsparc64
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_sparc64_LIMITS_H_
-#define LIBC_sparc64_LIMITS_H_
-
-#define LONG_MIN MIN_INT64
-#define LONG_MAX MAX_INT64
-#define ULONG_MIN MIN_UINT64
-#define ULONG_MAX MAX_UINT64
-
-#define SIZE_MIN MIN_UINT64
-#define SIZE_MAX MAX_UINT64
-#define SSIZE_MIN MIN_INT64
-#define SSIZE_MAX MAX_INT64
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/arch/sparc64/include/stack.h
===================================================================
--- uspace/lib/libc/arch/sparc64/include/stack.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,61 +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 libcsparc64
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_sparc64_STACK_H_
-#define LIBC_sparc64_STACK_H_
-
-#define STACK_ITEM_SIZE			8
-
-/** According to SPARC Compliance Definition, every stack frame is 16-byte aligned. */
-#define STACK_ALIGNMENT			16
-
-/**
- * 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)
-
-/**
- * By convention, the actual top of the stack is %sp + STACK_BIAS.
- */
-#define STACK_BIAS            2047
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/arch/sparc64/include/stackarg.h
===================================================================
--- uspace/lib/libc/arch/sparc64/include/stackarg.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(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 libcsparc64	
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_sparc64_STACKARG_H_
-#define LIBC_sparc64_STACKARG_H_
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/arch/sparc64/include/syscall.h
===================================================================
--- uspace/lib/libc/arch/sparc64/include/syscall.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,74 +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 libcsparc64
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_sparc64_SYSCALL_H_
-#define LIBC_sparc64_SYSCALL_H_
-
-#include <sys/types.h>
-#include <kernel/syscall/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 uint64_t a1 asm("o0") = p1;
-	register uint64_t a2 asm("o1") = p2;
-	register uint64_t a3 asm("o2") = p3;
-	register uint64_t a4 asm("o3") = p4;
-	register uint64_t a5 asm("o4") = p5;
-	register uint64_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: pace/lib/libc/arch/sparc64/include/thread.h
===================================================================
--- uspace/lib/libc/arch/sparc64/include/thread.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(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 libcsparc64
- * @{
- */
-
-#ifndef LIBC_sparc64_THREAD_H_
-#define LIBC_sparc64_THREAD_H_
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/arch/sparc64/include/tls.h
===================================================================
--- uspace/lib/libc/arch/sparc64/include/tls.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,65 +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 libcsparc64
- * @{
- */
-/**
- * @file
- * @brief	sparc64 TLS functions.
- */
-
-#ifndef LIBC_sparc64_TLS_H_
-#define LIBC_sparc64_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: pace/lib/libc/arch/sparc64/include/types.h
===================================================================
--- uspace/lib/libc/arch/sparc64/include/types.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,62 +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 libcsparc64
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_sparc64_TYPES_H_
-#define LIBC_sparc64_TYPES_H_
-
-#define __64_BITS__
-
-typedef unsigned long sysarg_t;
-
-typedef signed char int8_t;
-typedef short int int16_t;
-typedef int int32_t;
-typedef long int int64_t;
-
-typedef unsigned char uint8_t;
-typedef unsigned short int uint16_t;
-typedef unsigned int uint32_t;
-typedef unsigned long int uint64_t;
-
-typedef int64_t ssize_t;
-typedef uint64_t size_t;
-
-typedef uint64_t uintptr_t;
-typedef uint64_t atomic_count_t;
-typedef int64_t atomic_signed_t;
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/arch/sparc64/src/entry.s
===================================================================
--- uspace/lib/libc/arch/sparc64/src/entry.s	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,55 +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.
-#
-
-.section .init, "ax"
-
-.org 0
-
-.globl __entry
-
-## User-space task entry point
-#
-# %o0 contains uarg
-# %o1 contains pcb_ptr
-#
-__entry:
-	#
-	# Create the first stack frame.
-	#
-	save %sp, -176, %sp
-	flushw
-	add %g0, -0x7ff, %fp
-
-	# Pass pcb_ptr as the first argument to __main()
-	mov %i1, %o0
-	sethi %hi(_gp), %l7
-	call __main
-	or %l7, %lo(_gp), %l7
-
-	call __exit
-	nop
Index: pace/lib/libc/arch/sparc64/src/fibril.S
===================================================================
--- uspace/lib/libc/arch/sparc64/src/fibril.S	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,56 +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 <kernel/arch/context_offset.h>
-
-.text   
-
-.global context_save
-.global context_restore
-
-context_save:
-	#
-	# We rely on the kernel to flush our active register windows to memory
-	# should a thread switch occur.
-	#
-	CONTEXT_SAVE_ARCH_CORE %o0
-	retl
-	mov 1, %o0		! context_save_arch returns 1
-
-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.
-	#
-	flushw
-	
-	CONTEXT_RESTORE_ARCH_CORE %o0
-	retl
-	xor %o0, %o0, %o0	! context_restore_arch returns 0
Index: pace/lib/libc/arch/sparc64/src/stacktrace.c
===================================================================
--- uspace/lib/libc/arch/sparc64/src/stacktrace.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,69 +1,0 @@
-/*
- * Copyright (c) 2010 Jakub Jermar
- * 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 sparc64
- * @{
- */
-/** @file
- */
-
-#include <sys/types.h>
-#include <bool.h>
-#include <libarch/stack.h>
-#include <errno.h>
-
-#include <stacktrace.h>
-
-#define FRAME_OFFSET_FP_PREV	(14 * 8)
-#define FRAME_OFFSET_RA		(15 * 8)
-
-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;
-
-	rc = (*st->read_uintptr)(st->op_arg, fp + FRAME_OFFSET_FP_PREV, &bprev);
-	if (rc == EOK)
-		*prev = bprev + STACK_BIAS;
-	return rc;
-}
-
-int stacktrace_ra_get(stacktrace_t *st, uintptr_t fp, uintptr_t *ra)
-{
-	return (*st->read_uintptr)(st->op_arg, fp + FRAME_OFFSET_RA, ra);
-}
-
-/** @}
- */
Index: pace/lib/libc/arch/sparc64/src/stacktrace_asm.S
===================================================================
--- uspace/lib/libc/arch/sparc64/src/stacktrace_asm.S	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,51 +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 <libarch/stack.h>
-
-.text
-
-.global stacktrace_prepare
-.global stacktrace_fp_get
-.global stacktrace_pc_get
-
-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.
-	flushw
-	ret
-	restore
-
-stacktrace_fp_get:
-	# Add the stack bias to %sp to get the actual address.
-	retl
-	add %sp, STACK_BIAS, %o0
-
-stacktrace_pc_get:
-	retl
-	mov %o7, %o0
Index: pace/lib/libc/arch/sparc64/src/thread_entry.s
===================================================================
--- uspace/lib/libc/arch/sparc64/src/thread_entry.s	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,51 +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.
-#
-
-.text
-	
-.globl __thread_entry
-
-## User-space thread entry point for all but the first threads.
-#
-#
-__thread_entry:
-	#
-	# Create the first stack frame.
-	#
-
-	#save %sp, -176, %sp
-	#flushw
-	#add %g0, -0x7ff, %fp
-
-	sethi %hi(_gp), %l7
-	call __thread_main		! %o0 contains address of uarg
-	or %l7, %lo(_gp), %l7
-	
-	! not reached
-	
-.end __thread_entry
Index: pace/lib/libc/arch/sparc64/src/tls.c
===================================================================
--- uspace/lib/libc/arch/sparc64/src/tls.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(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 libcsparc64 sparc64
- * @ingroup lc
- * @{
- */
-/** @file
- *
- */
-
-#include <tls.h>
-#include <sys/types.h>
-
-tcb_t * __alloc_tls(void **data, size_t size)
-{
-	return tls_alloc_variant_2(data, size);
-}
-
-void __free_tls_arch(tcb_t *tcb, size_t size)
-{
-	tls_free_variant_2(tcb, size);
-}
-
-/** @}
- */
Index: pace/lib/libc/generic/adt/hash_table.c
===================================================================
--- uspace/lib/libc/generic/adt/hash_table.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,216 +1,0 @@
-/*
- * Copyright (c) 2008 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 libc
- * @{
- */
-/** @file
- */
-
-/*
- * This is an implementation of generic chained hash table.
- */
-
-#include <adt/hash_table.h>
-#include <adt/list.h>
-#include <unistd.h>
-#include <malloc.h>
-#include <assert.h>
-#include <stdio.h>
-#include <string.h>
-
-/** Create chained hash table.
- *
- * @param h		Hash table structure. Will be initialized by this call.
- * @param m		Number of hash table buckets.
- * @param max_keys	Maximal number of keys needed to identify an item.
- * @param op		Hash table operations structure.
- * @return		True on success
- */
-int hash_table_create(hash_table_t *h, hash_count_t m, hash_count_t max_keys,
-    hash_table_operations_t *op)
-{
-	hash_count_t i;
-
-	assert(h);
-	assert(op && op->hash && op->compare);
-	assert(max_keys > 0);
-	
-	h->entry = malloc(m * sizeof(link_t));
-	if (!h->entry) {
-		printf("cannot allocate memory for hash table\n");
-		return false;
-	}
-	memset((void *) h->entry, 0,  m * sizeof(link_t));
-	
-	for (i = 0; i < m; i++)
-		list_initialize(&h->entry[i]);
-	
-	h->entries = m;
-	h->max_keys = max_keys;
-	h->op = op;
-	return true;
-}
-
-/** Destroy a hash table instance.
- *
- * @param h		Hash table to be destroyed.
- */
-void hash_table_destroy(hash_table_t *h)
-{
-	assert(h);
-	assert(h->entry);
-	free(h->entry);
-}
-
-/** Insert item into a hash table.
- *
- * @param h		Hash table.
- * @param key		Array of all keys necessary to compute hash index.
- * @param item		Item to be inserted into the hash table.
- */
-void hash_table_insert(hash_table_t *h, unsigned long key[], link_t *item)
-{
-	hash_index_t chain;
-
-	assert(item);
-	assert(h && h->op && h->op->hash && h->op->compare);
-
-	chain = h->op->hash(key);
-	assert(chain < h->entries);
-	
-	list_append(item, &h->entry[chain]);
-}
-
-/** Search hash table for an item matching keys.
- *
- * @param h		Hash table.
- * @param key		Array of all keys needed to compute hash index.
- *
- * @return		Matching item on success, NULL if there is no such item.
- */
-link_t *hash_table_find(hash_table_t *h, unsigned long key[])
-{
-	link_t *cur;
-	hash_index_t chain;
-
-	assert(h && h->op && h->op->hash && h->op->compare);
-
-	chain = h->op->hash(key);
-	assert(chain < h->entries);
-	
-	for (cur = h->entry[chain].next; cur != &h->entry[chain];
-	    cur = cur->next) {
-		if (h->op->compare(key, h->max_keys, cur)) {
-			/*
-			 * The entry is there.
-			 */
-			return cur;
-		}
-	}
-	
-	return NULL;
-}
-
-/** Remove all matching items from hash table.
- *
- * For each removed item, h->remove_callback() is called.
- *
- * @param h		Hash table.
- * @param key		Array of keys that will be compared against items of
- * 			the hash table.
- * @param keys		Number of keys in the 'key' array.
- */
-void hash_table_remove(hash_table_t *h, unsigned long key[], hash_count_t keys)
-{
-	hash_index_t chain;
-	link_t *cur;
-
-	assert(h && h->op && h->op->hash && h->op->compare &&
-	    h->op->remove_callback);
-	assert(keys <= h->max_keys);
-	
-	if (keys == h->max_keys) {
-
-		/*
-		 * All keys are known, hash_table_find() can be used to find the
-		 * entry.
-		 */
-	
-		cur = hash_table_find(h, key);
-		if (cur) {
-			list_remove(cur);
-			h->op->remove_callback(cur);
-		}
-		return;
-	}
-	
-	/*
-	 * Fewer keys were passed.
-	 * Any partially matching entries are to be removed.
-	 */
-	for (chain = 0; chain < h->entries; chain++) {
-		for (cur = h->entry[chain].next; cur != &h->entry[chain];
-		    cur = cur->next) {
-			if (h->op->compare(key, keys, cur)) {
-				link_t *hlp;
-				
-				hlp = cur;
-				cur = cur->prev;
-				
-				list_remove(hlp);
-				h->op->remove_callback(hlp);
-				
-				continue;
-			}
-		}
-	}
-}
-
-/** Apply fucntion to all items in hash table.
- *
- * @param h		Hash table.
- * @param f		Function to be applied.
- * @param arg		Argument to be passed to the function.
- */
-void
-hash_table_apply(hash_table_t *h, void (*f)(link_t *, void *), void *arg)
-{
-	hash_index_t bucket;
-	link_t *cur;
-
-	for (bucket = 0; bucket < h->entries; bucket++) {
-		for (cur = h->entry[bucket].next; cur != &h->entry[bucket];
-		    cur = cur->next) {
-			f(cur, arg);
-		}
-	}
-}
-
-/** @}
- */
Index: pace/lib/libc/generic/adt/list.c
===================================================================
--- uspace/lib/libc/generic/adt/list.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,112 +1,0 @@
-/*
- * Copyright (c) 2004 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 libc
- * @{
- */
-/** @file
- */
-
-#include <adt/list.h>
-
-
-/** Check for membership
- *
- * Check whether link is contained in the list head.
- * The membership is defined as pointer equivalence.
- *
- * @param link Item to look for.
- * @param head List to look in.
- *
- * @return true if link is contained in head, false otherwise.
- *
- */
-int list_member(const link_t *link, const link_t *head)
-{
-	int found = 0;
-	link_t *hlp = head->next;
-	
-	while (hlp != head) {
-		if (hlp == link) {
-			found = 1;
-			break;
-		}
-		hlp = hlp->next;
-	}
-	
-	return found;
-}
-
-
-/** Concatenate two lists
- *
- * Concatenate lists head1 and head2, producing a single
- * list head1 containing items from both (in head1, head2
- * order) and empty list head2.
- *
- * @param head1 First list and concatenated output
- * @param head2 Second list and empty output.
- *
- */
-void list_concat(link_t *head1, link_t *head2)
-{
-	if (list_empty(head2))
-		return;
-	
-	head2->next->prev = head1->prev;
-	head2->prev->next = head1;
-	head1->prev->next = head2->next;
-	head1->prev = head2->prev;
-	list_initialize(head2);
-}
-
-
-/** Count list items
- *
- * Return the number of items in the list.
- *
- * @param link List to count.
- *
- * @return Number of items in the list.
- *
- */
-unsigned int list_count(const link_t *link)
-{
-	unsigned int count = 0;
-	link_t *hlp = link->next;
-	
-	while (hlp != link) {
-		count++;
-		hlp = hlp->next;
-	}
-	
-	return count;
-}
-
-/** @}
- */
Index: pace/lib/libc/generic/as.c
===================================================================
--- uspace/lib/libc/generic/as.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,131 +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 libc
- * @{
- */
-/** @file
- */
-
-#include <as.h>
-#include <libc.h>
-#include <unistd.h>
-#include <align.h>
-#include <sys/types.h>
-#include <bitops.h>
-#include <malloc.h>
-
-/** Last position allocated by as_get_mappable_page */
-static uintptr_t last_allocated = 0;
-
-/** Create address space area.
- *
- * @param address Virtual address where to place new address space area.
- * @param size    Size of the area.
- * @param flags   Flags describing type of the area.
- *
- * @return address on success, (void *) -1 otherwise.
- *
- */
-void *as_area_create(void *address, size_t size, int flags)
-{
-	return (void *) __SYSCALL3(SYS_AS_AREA_CREATE, (sysarg_t) address,
-	    (sysarg_t) size, (sysarg_t) flags);
-}
-
-/** Resize address space area.
- *
- * @param address Virtual address pointing into already existing address space
- *                area.
- * @param size    New requested size of the area.
- * @param flags   Currently unused.
- *
- * @return zero on success or a code from @ref errno.h on failure.
- *
- */
-int as_area_resize(void *address, size_t size, int flags)
-{
-	return __SYSCALL3(SYS_AS_AREA_RESIZE, (sysarg_t) address,
-	    (sysarg_t) size, (sysarg_t) flags);
-}
-
-/** Destroy address space area.
- *
- * @param address Virtual address pointing into the address space area being
- *                destroyed.
- *
- * @return zero on success or a code from @ref errno.h on failure.
- *
- */
-int as_area_destroy(void *address)
-{
-	return __SYSCALL1(SYS_AS_AREA_DESTROY, (sysarg_t) address);
-}
-
-/** Change address-space area flags.
- *
- * @param address Virtual address pointing into the address space area being
- *                modified.
- * @param flags   New flags describing type of the area.
- *
- * @return zero on success or a code from @ref errno.h on failure.
- *
- */
-int as_area_change_flags(void *address, int flags)
-{
-	return __SYSCALL2(SYS_AS_AREA_CHANGE_FLAGS, (sysarg_t) address,
-	    (sysarg_t) flags);
-}
-
-/** Return pointer to some unmapped area, where fits new as_area
- *
- * @param size Requested size of the allocation.
- *
- * @return pointer to the beginning
- *
- */
-void *as_get_mappable_page(size_t size)
-{
-	if (size == 0)
-		return NULL;
-	
-	size_t sz = 1 << (fnzb(size - 1) + 1);
-	if (last_allocated == 0)
-		last_allocated = get_max_heap_addr();
-	
-	/*
-	 * Make sure we allocate from naturally aligned address.
-	 */
-	uintptr_t res = ALIGN_UP(last_allocated, sz);
-	last_allocated = res + ALIGN_UP(size, PAGE_SIZE);
-	
-	return ((void *) res);
-}
-
-/** @}
- */
Index: pace/lib/libc/generic/async.c
===================================================================
--- uspace/lib/libc/generic/async.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,1564 +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 libc
- * @{
- */
-/** @file
- */
-
-/**
- * Asynchronous library
- *
- * The aim of this library is to provide a facility for writing programs which
- * utilize the asynchronous nature of HelenOS IPC, yet using a normal way of
- * programming.
- *
- * You should be able to write very simple multithreaded programs, the async
- * framework will automatically take care of most synchronization problems.
- *
- * Default semantics:
- * - async_send_*(): Send asynchronously. If the kernel refuses to send
- *                   more messages, [ try to get responses from kernel, if
- *                   nothing found, might try synchronous ]
- *
- * Example of use (pseudo C):
- *
- * 1) Multithreaded client application
- *
- *   fibril_create(fibril1, ...);
- *   fibril_create(fibril2, ...);
- *   ...
- *
- *   int fibril1(void *arg)
- *   {
- *     conn = ipc_connect_me_to();
- *     c1 = async_send(conn);
- *     c2 = async_send(conn);
- *     async_wait_for(c1);
- *     async_wait_for(c2);
- *     ...
- *   }
- *
- *
- * 2) Multithreaded server application
- *
- *   main()
- *   {
- *     async_manager();
- *   }
- *
- *   my_client_connection(icallid, *icall)
- *   {
- *     if (want_refuse) {
- *       ipc_answer_0(icallid, ELIMIT);
- *       return;
- *     }
- *     ipc_answer_0(icallid, EOK);
- *
- *     callid = async_get_call(&call);
- *     somehow_handle_the_call(callid, call);
- *     ipc_answer_2(callid, 1, 2, 3);
- *
- *     callid = async_get_call(&call);
- *     ...
- *   }
- *
- */
-
-#include <futex.h>
-#include <async.h>
-#include <async_priv.h>
-#include <fibril.h>
-#include <stdio.h>
-#include <adt/hash_table.h>
-#include <adt/list.h>
-#include <ipc/ipc.h>
-#include <assert.h>
-#include <errno.h>
-#include <sys/time.h>
-#include <arch/barrier.h>
-#include <bool.h>
-
-atomic_t async_futex = FUTEX_INITIALIZER;
-
-/** Number of threads waiting for IPC in the kernel. */
-atomic_t threads_in_ipc_wait = { 0 };
-
-typedef struct {
-	awaiter_t wdata;
-	
-	/** If reply was received. */
-	bool done;
-	
-	/** Pointer to where the answer data is stored. */
-	ipc_call_t *dataptr;
-	
-	ipcarg_t retval;
-} amsg_t;
-
-/**
- * Structures of this type are used to group information about a call and a
- * message queue link.
- */
-typedef struct {
-	link_t link;
-	ipc_callid_t callid;
-	ipc_call_t call;
-} msg_t;
-
-typedef struct {
-	awaiter_t wdata;
-	
-	/** Hash table link. */
-	link_t link;
-	
-	/** Incoming phone hash. */
-	ipcarg_t in_phone_hash;
-	
-	/** Messages that should be delivered to this fibril. */
-	link_t msg_queue;
-	
-	/** Identification of the opening call. */
-	ipc_callid_t callid;
-	/** Call data of the opening call. */
-	ipc_call_t call;
-	
-	/** Identification of the closing call. */
-	ipc_callid_t close_callid;
-	
-	/** Fibril function that will be used to handle the connection. */
-	void (*cfibril)(ipc_callid_t, ipc_call_t *);
-} connection_t;
-
-/** Identifier of the incoming connection handled by the current fibril. */
-fibril_local connection_t *FIBRIL_connection;
-
-static void default_client_connection(ipc_callid_t callid, ipc_call_t *call);
-static void default_interrupt_received(ipc_callid_t callid, ipc_call_t *call);
-
-/**
- * Pointer to a fibril function that will be used to handle connections.
- */
-static async_client_conn_t client_connection = default_client_connection;
-
-/**
- * Pointer to a fibril function that will be used to handle interrupt
- * notifications.
- */
-static async_client_conn_t interrupt_received = default_interrupt_received;
-
-static hash_table_t conn_hash_table;
-static LIST_INITIALIZE(timeout_list);
-
-#define CONN_HASH_TABLE_CHAINS  32
-
-/** Compute hash into the connection hash table based on the source phone hash.
- *
- * @param key Pointer to source phone hash.
- *
- * @return Index into the connection hash table.
- *
- */
-static hash_index_t conn_hash(unsigned long *key)
-{
-	assert(key);
-	return (((*key) >> 4) % CONN_HASH_TABLE_CHAINS);
-}
-
-/** Compare hash table item with a key.
- *
- * @param key  Array containing the source phone hash as the only item.
- * @param keys Expected 1 but ignored.
- * @param item Connection hash table item.
- *
- * @return True on match, false otherwise.
- *
- */
-static int conn_compare(unsigned long key[], hash_count_t keys, link_t *item)
-{
-	connection_t *hs = hash_table_get_instance(item, connection_t, link);
-	return (key[0] == hs->in_phone_hash);
-}
-
-/** Connection hash table removal callback function.
- *
- * This function is called whenever a connection is removed from the connection
- * hash table.
- *
- * @param item Connection hash table item being removed.
- *
- */
-static void conn_remove(link_t *item)
-{
-	free(hash_table_get_instance(item, connection_t, link));
-}
-
-
-/** Operations for the connection hash table. */
-static hash_table_operations_t conn_hash_table_ops = {
-	.hash = conn_hash,
-	.compare = conn_compare,
-	.remove_callback = conn_remove
-};
-
-/** Sort in current fibril's timeout request.
- *
- * @param wd Wait data of the current fibril.
- *
- */
-void async_insert_timeout(awaiter_t *wd)
-{
-	wd->to_event.occurred = false;
-	wd->to_event.inlist = true;
-	
-	link_t *tmp = timeout_list.next;
-	while (tmp != &timeout_list) {
-		awaiter_t *cur;
-		
-		cur = list_get_instance(tmp, awaiter_t, to_event.link);
-		if (tv_gteq(&cur->to_event.expires, &wd->to_event.expires))
-			break;
-		tmp = tmp->next;
-	}
-	
-	list_append(&wd->to_event.link, tmp);
-}
-
-/** Try to route a call to an appropriate connection fibril.
- *
- * If the proper connection fibril is found, a message with the call is added to
- * its message queue. If the fibril was not active, it is activated and all
- * timeouts are unregistered.
- *
- * @param callid Hash of the incoming call.
- * @param call   Data of the incoming call.
- *
- * @return False if the call doesn't match any connection.
- *         True if the call was passed to the respective connection fibril.
- *
- */
-static bool route_call(ipc_callid_t callid, ipc_call_t *call)
-{
-	futex_down(&async_futex);
-	
-	unsigned long key = call->in_phone_hash;
-	link_t *hlp = hash_table_find(&conn_hash_table, &key);
-	
-	if (!hlp) {
-		futex_up(&async_futex);
-		return false;
-	}
-	
-	connection_t *conn = hash_table_get_instance(hlp, connection_t, link);
-	
-	msg_t *msg = malloc(sizeof(*msg));
-	if (!msg) {
-		futex_up(&async_futex);
-		return false;
-	}
-	
-	msg->callid = callid;
-	msg->call = *call;
-	list_append(&msg->link, &conn->msg_queue);
-	
-	if (IPC_GET_METHOD(*call) == IPC_M_PHONE_HUNGUP)
-		conn->close_callid = callid;
-	
-	/* If the connection fibril is waiting for an event, activate it */
-	if (!conn->wdata.active) {
-		
-		/* If in timeout list, remove it */
-		if (conn->wdata.to_event.inlist) {
-			conn->wdata.to_event.inlist = false;
-			list_remove(&conn->wdata.to_event.link);
-		}
-		
-		conn->wdata.active = true;
-		fibril_add_ready(conn->wdata.fid);
-	}
-	
-	futex_up(&async_futex);
-	return true;
-}
-
-/** Notification fibril.
- *
- * When a notification arrives, a fibril with this implementing function is
- * created. It calls interrupt_received() and does the final cleanup.
- *
- * @param arg Message structure pointer.
- *
- * @return Always zero.
- *
- */
-static int notification_fibril(void *arg)
-{
-	msg_t *msg = (msg_t *) arg;
-	interrupt_received(msg->callid, &msg->call);
-	
-	free(msg);
-	return 0;
-}
-
-/** Process interrupt notification.
- *
- * A new fibril is created which would process the notification.
- *
- * @param callid Hash of the incoming call.
- * @param call   Data of the incoming call.
- *
- * @return False if an error occured.
- *         True if the call was passed to the notification fibril.
- *
- */
-static bool process_notification(ipc_callid_t callid, ipc_call_t *call)
-{
-	futex_down(&async_futex);
-	
-	msg_t *msg = malloc(sizeof(*msg));
-	if (!msg) {
-		futex_up(&async_futex);
-		return false;
-	}
-	
-	msg->callid = callid;
-	msg->call = *call;
-	
-	fid_t fid = fibril_create(notification_fibril, msg);
-	fibril_add_ready(fid);
-	
-	futex_up(&async_futex);
-	return true;
-}
-
-/** Return new incoming message for the current (fibril-local) connection.
- *
- * @param call  Storage where the incoming call data will be stored.
- * @param usecs Timeout in microseconds. Zero denotes no timeout.
- *
- * @return If no timeout was specified, then a hash of the
- *         incoming call is returned. If a timeout is specified,
- *         then a hash of the incoming call is returned unless
- *         the timeout expires prior to receiving a message. In
- *         that case zero is returned.
- *
- */
-ipc_callid_t async_get_call_timeout(ipc_call_t *call, suseconds_t usecs)
-{
-	assert(FIBRIL_connection);
-	
-	/* Why doing this?
-	 * GCC 4.1.0 coughs on FIBRIL_connection-> dereference.
-	 * GCC 4.1.1 happilly puts the rdhwr instruction in delay slot.
-	 *           I would never expect to find so many errors in
-	 *           a compiler.
-	 */
-	connection_t *conn = FIBRIL_connection;
-	
-	futex_down(&async_futex);
-	
-	if (usecs) {
-		gettimeofday(&conn->wdata.to_event.expires, NULL);
-		tv_add(&conn->wdata.to_event.expires, usecs);
-	} else
-		conn->wdata.to_event.inlist = false;
-	
-	/* If nothing in queue, wait until something arrives */
-	while (list_empty(&conn->msg_queue)) {
-		if (conn->close_callid) {
-			/*
-			 * Handle the case when the connection was already
-			 * closed by the client but the server did not notice
-			 * the first IPC_M_PHONE_HUNGUP call and continues to
-			 * call async_get_call_timeout(). Repeat
-			 * IPC_M_PHONE_HUNGUP until the caller notices. 
-			 */
-			memset(call, 0, sizeof(ipc_call_t));
-			IPC_SET_METHOD(*call, IPC_M_PHONE_HUNGUP);
-			futex_up(&async_futex);
-			return conn->close_callid;
-		}
-
-		if (usecs)
-			async_insert_timeout(&conn->wdata);
-		
-		conn->wdata.active = false;
-		
-		/*
-		 * Note: the current fibril will be rescheduled either due to a
-		 * timeout or due to an arriving message destined to it. In the
-		 * former case, handle_expired_timeouts() and, in the latter
-		 * case, route_call() will perform the wakeup.
-		 */
-		fibril_switch(FIBRIL_TO_MANAGER);
-		
-		/*
-		 * Futex is up after getting back from async_manager.
-		 * Get it again.
-		 */
-		futex_down(&async_futex);
-		if ((usecs) && (conn->wdata.to_event.occurred)
-		    && (list_empty(&conn->msg_queue))) {
-			/* If we timed out -> exit */
-			futex_up(&async_futex);
-			return 0;
-		}
-	}
-	
-	msg_t *msg = list_get_instance(conn->msg_queue.next, msg_t, link);
-	list_remove(&msg->link);
-	
-	ipc_callid_t callid = msg->callid;
-	*call = msg->call;
-	free(msg);
-	
-	futex_up(&async_futex);
-	return callid;
-}
-
-/** Default fibril function that gets called to handle new connection.
- *
- * This function is defined as a weak symbol - to be redefined in user code.
- *
- * @param callid Hash of the incoming call.
- * @param call   Data of the incoming call.
- *
- */
-static void default_client_connection(ipc_callid_t callid, ipc_call_t *call)
-{
-	ipc_answer_0(callid, ENOENT);
-}
-
-/** Default fibril function that gets called to handle interrupt notifications.
- *
- * This function is defined as a weak symbol - to be redefined in user code.
- *
- * @param callid Hash of the incoming call.
- * @param call   Data of the incoming call.
- *
- */
-static void default_interrupt_received(ipc_callid_t callid, ipc_call_t *call)
-{
-}
-
-/** Wrapper for client connection fibril.
- *
- * When a new connection arrives, a fibril with this implementing function is
- * created. It calls client_connection() and does the final cleanup.
- *
- * @param arg Connection structure pointer.
- *
- * @return Always zero.
- *
- */
-static int connection_fibril(void *arg)
-{
-	/*
-	 * Setup fibril-local connection pointer and call client_connection().
-	 *
-	 */
-	FIBRIL_connection = (connection_t *) arg;
-	FIBRIL_connection->cfibril(FIBRIL_connection->callid,
-	    &FIBRIL_connection->call);
-	
-	/* Remove myself from the connection hash table */
-	futex_down(&async_futex);
-	unsigned long key = FIBRIL_connection->in_phone_hash;
-	hash_table_remove(&conn_hash_table, &key, 1);
-	futex_up(&async_futex);
-	
-	/* Answer all remaining messages with EHANGUP */
-	while (!list_empty(&FIBRIL_connection->msg_queue)) {
-		msg_t *msg;
-		
-		msg = list_get_instance(FIBRIL_connection->msg_queue.next,
-		    msg_t, link);
-		list_remove(&msg->link);
-		ipc_answer_0(msg->callid, EHANGUP);
-		free(msg);
-	}
-	
-	if (FIBRIL_connection->close_callid)
-		ipc_answer_0(FIBRIL_connection->close_callid, EOK);
-	
-	return 0;
-}
-
-/** Create a new fibril for a new connection.
- *
- * Create new fibril for connection, fill in connection structures and inserts
- * it into the hash table, so that later we can easily do routing of messages to
- * particular fibrils.
- *
- * @param in_phone_hash Identification of the incoming connection.
- * @param callid        Hash of the opening IPC_M_CONNECT_ME_TO call.
- *                      If callid is zero, the connection was opened by
- *                      accepting the IPC_M_CONNECT_TO_ME call and this function
- *                      is called directly by the server.
- * @param call          Call data of the opening call.
- * @param cfibril       Fibril function that should be called upon opening the
- *                      connection.
- *
- * @return New fibril id or NULL on failure.
- *
- */
-fid_t async_new_connection(ipcarg_t in_phone_hash, ipc_callid_t callid,
-    ipc_call_t *call, void (*cfibril)(ipc_callid_t, ipc_call_t *))
-{
-	connection_t *conn = malloc(sizeof(*conn));
-	if (!conn) {
-		if (callid)
-			ipc_answer_0(callid, ENOMEM);
-		return NULL;
-	}
-	
-	conn->in_phone_hash = in_phone_hash;
-	list_initialize(&conn->msg_queue);
-	conn->callid = callid;
-	conn->close_callid = 0;
-	
-	if (call)
-		conn->call = *call;
-	
-	/* We will activate the fibril ASAP */
-	conn->wdata.active = true;
-	conn->cfibril = cfibril;
-	conn->wdata.fid = fibril_create(connection_fibril, conn);
-	
-	if (!conn->wdata.fid) {
-		free(conn);
-		if (callid)
-			ipc_answer_0(callid, ENOMEM);
-		return NULL;
-	}
-	
-	/* Add connection to the connection hash table */
-	unsigned long key = conn->in_phone_hash;
-	
-	futex_down(&async_futex);
-	hash_table_insert(&conn_hash_table, &key, &conn->link);
-	futex_up(&async_futex);
-	
-	fibril_add_ready(conn->wdata.fid);
-	
-	return conn->wdata.fid;
-}
-
-/** Handle a call that was received.
- *
- * If the call has the IPC_M_CONNECT_ME_TO method, a new connection is created.
- * Otherwise the call is routed to its connection fibril.
- *
- * @param callid Hash of the incoming call.
- * @param call   Data of the incoming call.
- *
- */
-static void handle_call(ipc_callid_t callid, ipc_call_t *call)
-{
-	/* Unrouted call - do some default behaviour */
-	if ((callid & IPC_CALLID_NOTIFICATION)) {
-		process_notification(callid, call);
-		goto out;
-	}
-	
-	switch (IPC_GET_METHOD(*call)) {
-	case IPC_M_CONNECT_ME:
-	case IPC_M_CONNECT_ME_TO:
-		/* Open new connection with fibril etc. */
-		async_new_connection(IPC_GET_ARG5(*call), callid, call,
-		    client_connection);
-		goto out;
-	}
-	
-	/* Try to route the call through the connection hash table */
-	if (route_call(callid, call))
-		goto out;
-	
-	/* Unknown call from unknown phone - hang it up */
-	ipc_answer_0(callid, EHANGUP);
-	return;
-	
-out:
-	;
-}
-
-/** Fire all timeouts that expired. */
-static void handle_expired_timeouts(void)
-{
-	struct timeval tv;
-	gettimeofday(&tv, NULL);
-	
-	futex_down(&async_futex);
-	
-	link_t *cur = timeout_list.next;
-	while (cur != &timeout_list) {
-		awaiter_t *waiter;
-		
-		waiter = list_get_instance(cur, awaiter_t, to_event.link);
-		if (tv_gt(&waiter->to_event.expires, &tv))
-			break;
-
-		cur = cur->next;
-
-		list_remove(&waiter->to_event.link);
-		waiter->to_event.inlist = false;
-		waiter->to_event.occurred = true;
-		
-		/*
-		 * Redundant condition?
-		 * The fibril should not be active when it gets here.
-		 */
-		if (!waiter->active) {
-			waiter->active = true;
-			fibril_add_ready(waiter->fid);
-		}
-	}
-	
-	futex_up(&async_futex);
-}
-
-/** Endless loop dispatching incoming calls and answers.
- *
- * @return Never returns.
- *
- */
-static int async_manager_worker(void)
-{
-	while (true) {
-		if (fibril_switch(FIBRIL_FROM_MANAGER)) {
-			futex_up(&async_futex); 
-			/*
-			 * async_futex is always held when entering a manager
-			 * fibril.
-			 */
-			continue;
-		}
-		
-		futex_down(&async_futex);
-		
-		suseconds_t timeout;
-		if (!list_empty(&timeout_list)) {
-			awaiter_t *waiter = list_get_instance(timeout_list.next,
-			    awaiter_t, to_event.link);
-			
-			struct timeval tv;
-			gettimeofday(&tv, NULL);
-			
-			if (tv_gteq(&tv, &waiter->to_event.expires)) {
-				futex_up(&async_futex);
-				handle_expired_timeouts();
-				continue;
-			} else
-				timeout = tv_sub(&waiter->to_event.expires,
-				    &tv);
-		} else
-			timeout = SYNCH_NO_TIMEOUT;
-		
-		futex_up(&async_futex);
-
-		atomic_inc(&threads_in_ipc_wait);
-		
-		ipc_call_t call;
-		ipc_callid_t callid = ipc_wait_cycle(&call, timeout,
-		    SYNCH_FLAGS_NONE);
-		
-		atomic_dec(&threads_in_ipc_wait);
-
-		if (!callid) {
-			handle_expired_timeouts();
-			continue;
-		}
-		
-		if (callid & IPC_CALLID_ANSWERED)
-			continue;
-		
-		handle_call(callid, &call);
-	}
-	
-	return 0;
-}
-
-/** Function to start async_manager as a standalone fibril.
- *
- * When more kernel threads are used, one async manager should exist per thread.
- *
- * @param arg Unused.
- * @return Never returns.
- *
- */
-static int async_manager_fibril(void *arg)
-{
-	futex_up(&async_futex);
-	
-	/*
-	 * async_futex is always locked when entering manager
-	 */
-	async_manager_worker();
-	
-	return 0;
-}
-
-/** Add one manager to manager list. */
-void async_create_manager(void)
-{
-	fid_t fid = fibril_create(async_manager_fibril, NULL);
-	fibril_add_manager(fid);
-}
-
-/** Remove one manager from manager list */
-void async_destroy_manager(void)
-{
-	fibril_remove_manager();
-}
-
-/** Initialize the async framework.
- *
- * @return Zero on success or an error code.
- */
-int __async_init(void)
-{
-	if (!hash_table_create(&conn_hash_table, CONN_HASH_TABLE_CHAINS, 1,
-	    &conn_hash_table_ops)) {
-		printf("%s: cannot create hash table\n", "async");
-		return ENOMEM;
-	}
-	
-	return 0;
-}
-
-/** Reply received callback.
- *
- * This function is called whenever a reply for an asynchronous message sent out
- * by the asynchronous framework is received.
- *
- * Notify the fibril which is waiting for this message that it has arrived.
- *
- * @param arg    Pointer to the asynchronous message record.
- * @param retval Value returned in the answer.
- * @param data   Call data of the answer.
- */
-static void reply_received(void *arg, int retval, ipc_call_t *data)
-{
-	futex_down(&async_futex);
-	
-	amsg_t *msg = (amsg_t *) arg;
-	msg->retval = retval;
-	
-	/* Copy data after futex_down, just in case the call was detached */
-	if ((msg->dataptr) && (data))
-		*msg->dataptr = *data;
-	
-	write_barrier();
-	
-	/* Remove message from timeout list */
-	if (msg->wdata.to_event.inlist)
-		list_remove(&msg->wdata.to_event.link);
-	
-	msg->done = true;
-	if (!msg->wdata.active) {
-		msg->wdata.active = true;
-		fibril_add_ready(msg->wdata.fid);
-	}
-	
-	futex_up(&async_futex);
-}
-
-/** Send message and return id of the sent message.
- *
- * The return value can be used as input for async_wait() to wait for
- * completion.
- *
- * @param phoneid Handle of the phone that will be used for the send.
- * @param method  Service-defined method.
- * @param arg1    Service-defined payload argument.
- * @param arg2    Service-defined payload argument.
- * @param arg3    Service-defined payload argument.
- * @param arg4    Service-defined payload argument.
- * @param dataptr If non-NULL, storage where the reply data will be
- *                stored.
- *
- * @return Hash of the sent message or 0 on error.
- *
- */
-aid_t async_send_fast(int phoneid, ipcarg_t method, ipcarg_t arg1,
-    ipcarg_t arg2, ipcarg_t arg3, ipcarg_t arg4, ipc_call_t *dataptr)
-{
-	amsg_t *msg = malloc(sizeof(*msg));
-	
-	if (!msg)
-		return 0;
-	
-	msg->done = false;
-	msg->dataptr = dataptr;
-	
-	msg->wdata.to_event.inlist = false;
-	/* We may sleep in the next method, but it will use its own mechanism */
-	msg->wdata.active = true;
-	
-	ipc_call_async_4(phoneid, method, arg1, arg2, arg3, arg4, msg,
-	    reply_received, true);
-	
-	return (aid_t) msg;
-}
-
-/** Send message and return id of the sent message
- *
- * The return value can be used as input for async_wait() to wait for
- * completion.
- *
- * @param phoneid Handle of the phone that will be used for the send.
- * @param method  Service-defined method.
- * @param arg1    Service-defined payload argument.
- * @param arg2    Service-defined payload argument.
- * @param arg3    Service-defined payload argument.
- * @param arg4    Service-defined payload argument.
- * @param arg5    Service-defined payload argument.
- * @param dataptr If non-NULL, storage where the reply data will be
- *                stored.
- *
- * @return Hash of the sent message or 0 on error.
- *
- */
-aid_t async_send_slow(int phoneid, ipcarg_t method, ipcarg_t arg1,
-    ipcarg_t arg2, ipcarg_t arg3, ipcarg_t arg4, ipcarg_t arg5,
-    ipc_call_t *dataptr)
-{
-	amsg_t *msg = malloc(sizeof(*msg));
-	
-	if (!msg)
-		return 0;
-	
-	msg->done = false;
-	msg->dataptr = dataptr;
-	
-	msg->wdata.to_event.inlist = false;
-	/* We may sleep in next method, but it will use its own mechanism */
-	msg->wdata.active = true;
-	
-	ipc_call_async_5(phoneid, method, arg1, arg2, arg3, arg4, arg5, msg,
-	    reply_received, true);
-	
-	return (aid_t) msg;
-}
-
-/** Wait for a message sent by the async framework.
- *
- * @param amsgid Hash of the message to wait for.
- * @param retval Pointer to storage where the retval of the answer will
- *               be stored.
- *
- */
-void async_wait_for(aid_t amsgid, ipcarg_t *retval)
-{
-	amsg_t *msg = (amsg_t *) amsgid;
-	
-	futex_down(&async_futex);
-	if (msg->done) {
-		futex_up(&async_futex);
-		goto done;
-	}
-	
-	msg->wdata.fid = fibril_get_id();
-	msg->wdata.active = false;
-	msg->wdata.to_event.inlist = false;
-	
-	/* Leave the async_futex locked when entering this function */
-	fibril_switch(FIBRIL_TO_MANAGER);
-	
-	/* Futex is up automatically after fibril_switch */
-	
-done:
-	if (retval)
-		*retval = msg->retval;
-	
-	free(msg);
-}
-
-/** Wait for a message sent by the async framework, timeout variant.
- *
- * @param amsgid  Hash of the message to wait for.
- * @param retval  Pointer to storage where the retval of the answer will
- *                be stored.
- * @param timeout Timeout in microseconds.
- *
- * @return Zero on success, ETIMEOUT if the timeout has expired.
- *
- */
-int async_wait_timeout(aid_t amsgid, ipcarg_t *retval, suseconds_t timeout)
-{
-	amsg_t *msg = (amsg_t *) amsgid;
-	
-	/* TODO: Let it go through the event read at least once */
-	if (timeout < 0)
-		return ETIMEOUT;
-	
-	futex_down(&async_futex);
-	if (msg->done) {
-		futex_up(&async_futex);
-		goto done;
-	}
-	
-	gettimeofday(&msg->wdata.to_event.expires, NULL);
-	tv_add(&msg->wdata.to_event.expires, timeout);
-	
-	msg->wdata.fid = fibril_get_id();
-	msg->wdata.active = false;
-	async_insert_timeout(&msg->wdata);
-	
-	/* Leave the async_futex locked when entering this function */
-	fibril_switch(FIBRIL_TO_MANAGER);
-	
-	/* Futex is up automatically after fibril_switch */
-	
-	if (!msg->done)
-		return ETIMEOUT;
-	
-done:
-	if (retval)
-		*retval = msg->retval;
-	
-	free(msg);
-	
-	return 0;
-}
-
-/** Wait for specified time.
- *
- * The current fibril is suspended but the thread continues to execute.
- *
- * @param timeout Duration of the wait in microseconds.
- *
- */
-void async_usleep(suseconds_t timeout)
-{
-	amsg_t *msg = malloc(sizeof(*msg));
-	
-	if (!msg)
-		return;
-	
-	msg->wdata.fid = fibril_get_id();
-	msg->wdata.active = false;
-	
-	gettimeofday(&msg->wdata.to_event.expires, NULL);
-	tv_add(&msg->wdata.to_event.expires, timeout);
-	
-	futex_down(&async_futex);
-	
-	async_insert_timeout(&msg->wdata);
-	
-	/* Leave the async_futex locked when entering this function */
-	fibril_switch(FIBRIL_TO_MANAGER);
-	
-	/* Futex is up automatically after fibril_switch() */
-	
-	free(msg);
-}
-
-/** Setter for client_connection function pointer.
- *
- * @param conn Function that will implement a new connection fibril.
- *
- */
-void async_set_client_connection(async_client_conn_t conn)
-{
-	client_connection = conn;
-}
-
-/** Setter for interrupt_received function pointer.
- *
- * @param intr Function that will implement a new interrupt
- *             notification fibril.
- */
-void async_set_interrupt_received(async_client_conn_t intr)
-{
-	interrupt_received = intr;
-}
-
-/** Pseudo-synchronous message sending - fast version.
- *
- * Send message asynchronously and return only after the reply arrives.
- *
- * This function can only transfer 4 register payload arguments. For
- * transferring more arguments, see the slower async_req_slow().
- *
- * @param phoneid Hash of the phone through which to make the call.
- * @param method  Method of the call.
- * @param arg1    Service-defined payload argument.
- * @param arg2    Service-defined payload argument.
- * @param arg3    Service-defined payload argument.
- * @param arg4    Service-defined payload argument.
- * @param r1      If non-NULL, storage for the 1st reply argument.
- * @param r2      If non-NULL, storage for the 2nd reply argument.
- * @param r3      If non-NULL, storage for the 3rd reply argument.
- * @param r4      If non-NULL, storage for the 4th reply argument.
- * @param r5      If non-NULL, storage for the 5th reply argument.
- *
- * @return Return code of the reply or a negative error code.
- *
- */
-ipcarg_t async_req_fast(int phoneid, ipcarg_t method, ipcarg_t arg1,
-    ipcarg_t arg2, ipcarg_t arg3, ipcarg_t arg4, ipcarg_t *r1, ipcarg_t *r2,
-    ipcarg_t *r3, ipcarg_t *r4, ipcarg_t *r5)
-{
-	ipc_call_t result;
-	aid_t eid = async_send_4(phoneid, method, arg1, arg2, arg3, arg4,
-	    &result);
-	
-	ipcarg_t rc;
-	async_wait_for(eid, &rc);
-	
-	if (r1)
-		*r1 = IPC_GET_ARG1(result);
-	
-	if (r2)
-		*r2 = IPC_GET_ARG2(result);
-	
-	if (r3)
-		*r3 = IPC_GET_ARG3(result);
-	
-	if (r4)
-		*r4 = IPC_GET_ARG4(result);
-	
-	if (r5)
-		*r5 = IPC_GET_ARG5(result);
-	
-	return rc;
-}
-
-/** Pseudo-synchronous message sending - slow version.
- *
- * Send message asynchronously and return only after the reply arrives.
- *
- * @param phoneid Hash of the phone through which to make the call.
- * @param method  Method of the call.
- * @param arg1    Service-defined payload argument.
- * @param arg2    Service-defined payload argument.
- * @param arg3    Service-defined payload argument.
- * @param arg4    Service-defined payload argument.
- * @param arg5    Service-defined payload argument.
- * @param r1      If non-NULL, storage for the 1st reply argument.
- * @param r2      If non-NULL, storage for the 2nd reply argument.
- * @param r3      If non-NULL, storage for the 3rd reply argument.
- * @param r4      If non-NULL, storage for the 4th reply argument.
- * @param r5      If non-NULL, storage for the 5th reply argument.
- *
- * @return Return code of the reply or a negative error code.
- *
- */
-ipcarg_t async_req_slow(int phoneid, ipcarg_t method, ipcarg_t arg1,
-    ipcarg_t arg2, ipcarg_t arg3, ipcarg_t arg4, ipcarg_t arg5, ipcarg_t *r1,
-    ipcarg_t *r2, ipcarg_t *r3, ipcarg_t *r4, ipcarg_t *r5)
-{
-	ipc_call_t result;
-	aid_t eid = async_send_5(phoneid, method, arg1, arg2, arg3, arg4, arg5,
-	    &result);
-	
-	ipcarg_t rc;
-	async_wait_for(eid, &rc);
-	
-	if (r1)
-		*r1 = IPC_GET_ARG1(result);
-	
-	if (r2)
-		*r2 = IPC_GET_ARG2(result);
-	
-	if (r3)
-		*r3 = IPC_GET_ARG3(result);
-	
-	if (r4)
-		*r4 = IPC_GET_ARG4(result);
-	
-	if (r5)
-		*r5 = IPC_GET_ARG5(result);
-	
-	return rc;
-}
-
-/** Wrapper for making IPC_M_CONNECT_ME_TO calls using the async framework.
- * 
- * Ask through phone for a new connection to some service.
- *
- * @param phoneid	Phone handle used for contacting the other side.
- * @param arg1		User defined argument.
- * @param arg2		User defined argument.
- * @param arg3		User defined argument.
- *
- * @return		New phone handle on success or a negative error code.
- */
-int
-async_connect_me_to(int phoneid, ipcarg_t arg1, ipcarg_t arg2, ipcarg_t arg3)
-{
-	int rc;
-	ipcarg_t newphid;
-
-	rc = async_req_3_5(phoneid, IPC_M_CONNECT_ME_TO, arg1, arg2, arg3, NULL,
-	    NULL, NULL, NULL, &newphid);
-	
-	if (rc != EOK)	
-		return rc;
-
-	return newphid;
-}
-
-/** Wrapper for making IPC_M_CONNECT_ME_TO calls using the async framework.
- * 
- * Ask through phone for a new connection to some service and block until
- * success.
- *
- * @param phoneid	Phone handle used for contacting the other side.
- * @param arg1		User defined argument.
- * @param arg2		User defined argument.
- * @param arg3		User defined argument.
- *
- * @return		New phone handle on success or a negative error code.
- */
-int
-async_connect_me_to_blocking(int phoneid, ipcarg_t arg1, ipcarg_t arg2,
-    ipcarg_t arg3)
-{
-	int rc;
-	ipcarg_t newphid;
-
-	rc = async_req_4_5(phoneid, IPC_M_CONNECT_ME_TO, arg1, arg2, arg3,
-	    IPC_FLAG_BLOCKING, NULL, NULL, NULL, NULL, &newphid);
-	
-	if (rc != EOK)	
-		return rc;
-
-	return newphid;
-}
-
-/** Wrapper for making IPC_M_SHARE_IN calls using the async framework.
- *
- * @param phoneid	Phone that will be used to contact the receiving side.
- * @param dst		Destination address space area base.
- * @param size		Size of the destination address space area.
- * @param arg		User defined argument.
- * @param flags		Storage where the received flags will be stored. Can be
- *			NULL.
- *
- * @return		Zero on success or a negative error code from errno.h.
- */
-int async_share_in_start(int phoneid, void *dst, size_t size, ipcarg_t arg,
-    int *flags)
-{
-	int res;
-	sysarg_t tmp_flags;
-	res = async_req_3_2(phoneid, IPC_M_SHARE_IN, (ipcarg_t) dst,
-	    (ipcarg_t) size, arg, NULL, &tmp_flags);
-	if (flags)
-		*flags = tmp_flags;
-	return res;
-}
-
-/** Wrapper for receiving the IPC_M_SHARE_IN calls using the async framework.
- *
- * This wrapper only makes it more comfortable to receive IPC_M_SHARE_IN calls
- * so that the user doesn't have to remember the meaning of each IPC argument.
- *
- * So far, this wrapper is to be used from within a connection fibril.
- *
- * @param callid	Storage where the hash of the IPC_M_SHARE_IN call will
- * 			be stored.
- * @param size		Destination address space area size.	
- *
- * @return		Non-zero on success, zero on failure.
- */
-int async_share_in_receive(ipc_callid_t *callid, size_t *size)
-{
-	ipc_call_t data;
-	
-	assert(callid);
-	assert(size);
-
-	*callid = async_get_call(&data);
-	if (IPC_GET_METHOD(data) != IPC_M_SHARE_IN)
-		return 0;
-	*size = (size_t) IPC_GET_ARG2(data);
-	return 1;
-}
-
-/** Wrapper for answering the IPC_M_SHARE_IN calls using the async framework.
- *
- * This wrapper only makes it more comfortable to answer IPC_M_DATA_READ calls
- * so that the user doesn't have to remember the meaning of each IPC argument.
- *
- * @param callid	Hash of the IPC_M_DATA_READ call to answer.
- * @param src		Source address space base.
- * @param flags		Flags to be used for sharing. Bits can be only cleared.
- *
- * @return		Zero on success or a value from @ref errno.h on failure.
- */
-int async_share_in_finalize(ipc_callid_t callid, void *src, int flags)
-{
-	return ipc_share_in_finalize(callid, src, flags);
-}
-
-/** Wrapper for making IPC_M_SHARE_OUT calls using the async framework.
- *
- * @param phoneid	Phone that will be used to contact the receiving side.
- * @param src		Source address space area base address.
- * @param flags		Flags to be used for sharing. Bits can be only cleared.
- *
- * @return		Zero on success or a negative error code from errno.h.
- */
-int async_share_out_start(int phoneid, void *src, int flags)
-{
-	return async_req_3_0(phoneid, IPC_M_SHARE_OUT, (ipcarg_t) src, 0,
-	    (ipcarg_t) flags);
-}
-
-/** Wrapper for receiving the IPC_M_SHARE_OUT calls using the async framework.
- *
- * This wrapper only makes it more comfortable to receive IPC_M_SHARE_OUT calls
- * so that the user doesn't have to remember the meaning of each IPC argument.
- *
- * So far, this wrapper is to be used from within a connection fibril.
- *
- * @param callid	Storage where the hash of the IPC_M_SHARE_OUT call will
- * 			be stored.
- * @param size		Storage where the source address space area size will be
- *			stored.
- * @param flags		Storage where the sharing flags will be stored.
- *
- * @return		Non-zero on success, zero on failure.
- */
-int async_share_out_receive(ipc_callid_t *callid, size_t *size, int *flags)
-{
-	ipc_call_t data;
-	
-	assert(callid);
-	assert(size);
-	assert(flags);
-
-	*callid = async_get_call(&data);
-	if (IPC_GET_METHOD(data) != IPC_M_SHARE_OUT)
-		return 0;
-	*size = (size_t) IPC_GET_ARG2(data);
-	*flags = (int) IPC_GET_ARG3(data);
-	return 1;
-}
-
-/** Wrapper for answering the IPC_M_SHARE_OUT calls using the async framework.
- *
- * This wrapper only makes it more comfortable to answer IPC_M_SHARE_OUT calls
- * so that the user doesn't have to remember the meaning of each IPC argument.
- *
- * @param callid	Hash of the IPC_M_DATA_WRITE call to answer.
- * @param dst		Destination address space area base address.	
- *
- * @return		Zero on success or a value from @ref errno.h on failure.
- */
-int async_share_out_finalize(ipc_callid_t callid, void *dst)
-{
-	return ipc_share_out_finalize(callid, dst);
-}
-
-
-/** Wrapper for making IPC_M_DATA_READ calls using the async framework.
- *
- * @param phoneid	Phone that will be used to contact the receiving side.
- * @param dst		Address of the beginning of the destination buffer.
- * @param size		Size of the destination buffer.
- *
- * @return		Zero on success or a negative error code from errno.h.
- */
-int async_data_read_start(int phoneid, void *dst, size_t size)
-{
-	return async_req_2_0(phoneid, IPC_M_DATA_READ, (ipcarg_t) dst,
-	    (ipcarg_t) size);
-}
-
-/** Wrapper for receiving the IPC_M_DATA_READ calls using the async framework.
- *
- * This wrapper only makes it more comfortable to receive IPC_M_DATA_READ calls
- * so that the user doesn't have to remember the meaning of each IPC argument.
- *
- * So far, this wrapper is to be used from within a connection fibril.
- *
- * @param callid	Storage where the hash of the IPC_M_DATA_READ call will
- * 			be stored.
- * @param size		Storage where the maximum size will be stored. Can be
- *			NULL.
- *
- * @return		Non-zero on success, zero on failure.
- */
-int async_data_read_receive(ipc_callid_t *callid, size_t *size)
-{
-	ipc_call_t data;
-	
-	assert(callid);
-
-	*callid = async_get_call(&data);
-	if (IPC_GET_METHOD(data) != IPC_M_DATA_READ)
-		return 0;
-	if (size)
-		*size = (size_t) IPC_GET_ARG2(data);
-	return 1;
-}
-
-/** Wrapper for answering the IPC_M_DATA_READ calls using the async framework.
- *
- * This wrapper only makes it more comfortable to answer IPC_M_DATA_READ calls
- * so that the user doesn't have to remember the meaning of each IPC argument.
- *
- * @param callid	Hash of the IPC_M_DATA_READ call to answer.
- * @param src		Source address for the IPC_M_DATA_READ call.
- * @param size		Size for the IPC_M_DATA_READ call. Can be smaller than
- *			the maximum size announced by the sender.
- *
- * @return		Zero on success or a value from @ref errno.h on failure.
- */
-int async_data_read_finalize(ipc_callid_t callid, const void *src, size_t size)
-{
-	return ipc_data_read_finalize(callid, src, size);
-}
-
-/** Wrapper for forwarding any read request
- *
- *
- */
-int async_data_read_forward_fast(int phoneid, ipcarg_t method, ipcarg_t arg1,
-    ipcarg_t arg2, ipcarg_t arg3, ipcarg_t arg4, ipc_call_t *dataptr)
-{
-	ipc_callid_t callid;
-	if (!async_data_read_receive(&callid, NULL)) {
-		ipc_answer_0(callid, EINVAL);
-		return EINVAL;
-	}
-	
-	aid_t msg = async_send_fast(phoneid, method, arg1, arg2, arg3, arg4,
-	    dataptr);
-	if (msg == 0) {
-		ipc_answer_0(callid, EINVAL);
-		return EINVAL;
-	}
-	
-	int retval = ipc_forward_fast(callid, phoneid, 0, 0, 0,
-	    IPC_FF_ROUTE_FROM_ME);
-	if (retval != EOK) {
-		async_wait_for(msg, NULL);
-		ipc_answer_0(callid, retval);
-		return retval;
-	}
-	
-	ipcarg_t rc;
-	async_wait_for(msg, &rc);
-	
-	return (int) rc;
-}
-
-/** Wrapper for making IPC_M_DATA_WRITE calls using the async framework.
- *
- * @param phoneid Phone that will be used to contact the receiving side.
- * @param src     Address of the beginning of the source buffer.
- * @param size    Size of the source buffer.
- *
- * @return Zero on success or a negative error code from errno.h.
- *
- */
-int async_data_write_start(int phoneid, const void *src, size_t size)
-{
-	return async_req_2_0(phoneid, IPC_M_DATA_WRITE, (ipcarg_t) src,
-	    (ipcarg_t) size);
-}
-
-/** Wrapper for receiving the IPC_M_DATA_WRITE calls using the async framework.
- *
- * This wrapper only makes it more comfortable to receive IPC_M_DATA_WRITE calls
- * so that the user doesn't have to remember the meaning of each IPC argument.
- *
- * So far, this wrapper is to be used from within a connection fibril.
- *
- * @param callid Storage where the hash of the IPC_M_DATA_WRITE call will
- *               be stored.
- * @param size   Storage where the suggested size will be stored. May be
- *               NULL
- *
- * @return Non-zero on success, zero on failure.
- *
- */
-int async_data_write_receive(ipc_callid_t *callid, size_t *size)
-{
-	ipc_call_t data;
-	
-	assert(callid);
-	
-	*callid = async_get_call(&data);
-	if (IPC_GET_METHOD(data) != IPC_M_DATA_WRITE)
-		return 0;
-	
-	if (size)
-		*size = (size_t) IPC_GET_ARG2(data);
-	
-	return 1;
-}
-
-/** Wrapper for answering the IPC_M_DATA_WRITE calls using the async framework.
- *
- * This wrapper only makes it more comfortable to answer IPC_M_DATA_WRITE calls
- * so that the user doesn't have to remember the meaning of each IPC argument.
- *
- * @param callid Hash of the IPC_M_DATA_WRITE call to answer.
- * @param dst    Final destination address for the IPC_M_DATA_WRITE call.
- * @param size   Final size for the IPC_M_DATA_WRITE call.
- *
- * @return Zero on success or a value from @ref errno.h on failure.
- *
- */
-int async_data_write_finalize(ipc_callid_t callid, void *dst, size_t size)
-{
-	return ipc_data_write_finalize(callid, dst, size);
-}
-
-/** Wrapper for receiving binary data or strings
- *
- * This wrapper only makes it more comfortable to use async_data_write_*
- * functions to receive binary data or strings.
- *
- * @param data       Pointer to data pointer (which should be later disposed
- *                   by free()). If the operation fails, the pointer is not
- *                   touched.
- * @param nullterm   If true then the received data is always zero terminated.
- *                   This also causes to allocate one extra byte beyond the
- *                   raw transmitted data.
- * @param min_size   Minimum size (in bytes) of the data to receive.
- * @param max_size   Maximum size (in bytes) of the data to receive. 0 means
- *                   no limit.
- * @param granulariy If non-zero then the size of the received data has to
- *                   be divisible by this value.
- * @param received   If not NULL, the size of the received data is stored here.
- *
- * @return Zero on success or a value from @ref errno.h on failure.
- *
- */
-int async_data_write_accept(void **data, const bool nullterm,
-    const size_t min_size, const size_t max_size, const size_t granularity,
-    size_t *received)
-{
-	ipc_callid_t callid;
-	size_t size;
-	if (!async_data_write_receive(&callid, &size)) {
-		ipc_answer_0(callid, EINVAL);
-		return EINVAL;
-	}
-	
-	if (size < min_size) {
-		ipc_answer_0(callid, EINVAL);
-		return EINVAL;
-	}
-	
-	if ((max_size > 0) && (size > max_size)) {
-		ipc_answer_0(callid, EINVAL);
-		return EINVAL;
-	}
-	
-	if ((granularity > 0) && ((size % granularity) != 0)) {
-		ipc_answer_0(callid, EINVAL);
-		return EINVAL;
-	}
-	
-	void *_data;
-	
-	if (nullterm)
-		_data = malloc(size + 1);
-	else
-		_data = malloc(size);
-	
-	if (_data == NULL) {
-		ipc_answer_0(callid, ENOMEM);
-		return ENOMEM;
-	}
-	
-	int rc = async_data_write_finalize(callid, _data, size);
-	if (rc != EOK) {
-		free(_data);
-		return rc;
-	}
-	
-	if (nullterm)
-		((char *) _data)[size] = 0;
-	
-	*data = _data;
-	if (received != NULL)
-		*received = size;
-	
-	return EOK;
-}
-
-/** Wrapper for voiding any data that is about to be received
- *
- * This wrapper can be used to void any pending data
- *
- * @param retval Error value from @ref errno.h to be returned to the caller.
- *
- */
-void async_data_write_void(const int retval)
-{
-	ipc_callid_t callid;
-	async_data_write_receive(&callid, NULL);
-	ipc_answer_0(callid, retval);
-}
-
-/** Wrapper for forwarding any data that is about to be received
- *
- *
- */
-int async_data_write_forward_fast(int phoneid, ipcarg_t method, ipcarg_t arg1,
-    ipcarg_t arg2, ipcarg_t arg3, ipcarg_t arg4, ipc_call_t *dataptr)
-{
-	ipc_callid_t callid;
-	if (!async_data_write_receive(&callid, NULL)) {
-		ipc_answer_0(callid, EINVAL);
-		return EINVAL;
-	}
-	
-	aid_t msg = async_send_fast(phoneid, method, arg1, arg2, arg3, arg4,
-	    dataptr);
-	if (msg == 0) {
-		ipc_answer_0(callid, EINVAL);
-		return EINVAL;
-	}
-	
-	int retval = ipc_forward_fast(callid, phoneid, 0, 0, 0,
-	    IPC_FF_ROUTE_FROM_ME);
-	if (retval != EOK) {
-		async_wait_for(msg, NULL);
-		ipc_answer_0(callid, retval);
-		return retval;
-	}
-	
-	ipcarg_t rc;
-	async_wait_for(msg, &rc);
-	
-	return (int) rc;
-}
-
-/** @}
- */
Index: pace/lib/libc/generic/cap.c
===================================================================
--- uspace/lib/libc/generic/cap.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,75 +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 libc
- * @{
- */
-/**
- * @file	cap.c
- * @brief	Functions to grant/revoke capabilities to/from a task.
- */
-
-#include <cap.h>
-#include <task.h>
-#include <libc.h>
-#include <kernel/syscall/sysarg64.h>
-
-/** Grant capabilities to a task.
- *
- * @param id Destination task ID.
- * @param caps Capabilities to grant.
- *
- * @return Zero on success or a value from @ref errno.h on failure.
- */
-int cap_grant(task_id_t id, unsigned int caps)
-{
-	sysarg64_t arg;
-	
-	arg.value = (unsigned long long) id;
-
-	return __SYSCALL2(SYS_CAP_GRANT, (sysarg_t) &arg, (sysarg_t) caps);
-}
-
-/** Revoke capabilities from a task.
- *
- * @param id Destination task ID.
- * @param caps Capabilities to revoke.
- *
- * @return Zero on success or a value from @ref errno.h on failure.
- */
-int cap_revoke(task_id_t id, unsigned int caps)
-{
-	sysarg64_t arg;
-	
-	arg.value = (unsigned long long) id;
-
-	return __SYSCALL2(SYS_CAP_REVOKE, (sysarg_t) &arg, (sysarg_t) caps);
-}
-
-/** @}
- */
Index: pace/lib/libc/generic/clipboard.c
===================================================================
--- uspace/lib/libc/generic/clipboard.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,185 +1,0 @@
-/*
- * Copyright (c) 2009 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 libc
- * @{
- */
-/** @file
- * @brief System clipboard API.
- *
- * The clipboard data is managed by the clipboard service and it is shared by
- * the entire system.
- *
- */
-
-#include <clipboard.h>
-#include <ipc/services.h>
-#include <ipc/clipboard.h>
-#include <async.h>
-#include <string.h>
-#include <errno.h>
-#include <malloc.h>
-
-static int clip_phone = -1;
-
-/** Connect to clipboard server
- *
- */
-static void clip_connect(void)
-{
-	while (clip_phone < 0)
-		clip_phone = ipc_connect_me_to_blocking(PHONE_NS, SERVICE_CLIPBOARD, 0, 0);
-}
-
-/** Copy string to clipboard.
- *
- * Sets the clipboard contents to @a str. Passing an empty string or NULL
- * makes the clipboard empty.
- *
- * @param str String to put to clipboard or NULL.
- *
- * @return Zero on success or negative error code.
- *
- */
-int clipboard_put_str(const char *str)
-{
-	size_t size = str_size(str);
-	
-	if (size == 0) {
-		async_serialize_start();
-		clip_connect();
-		
-		ipcarg_t rc = async_req_1_0(clip_phone, CLIPBOARD_PUT_DATA, CLIPBOARD_TAG_NONE);
-		
-		async_serialize_end();
-		
-		return (int) rc;
-	} else {
-		async_serialize_start();
-		clip_connect();
-		
-		aid_t req = async_send_1(clip_phone, CLIPBOARD_PUT_DATA, CLIPBOARD_TAG_DATA, NULL);
-		ipcarg_t rc = async_data_write_start(clip_phone, (void *) str, size);
-		if (rc != EOK) {
-			ipcarg_t rc_orig;
-			async_wait_for(req, &rc_orig);
-			async_serialize_end();
-			if (rc_orig == EOK)
-				return (int) rc;
-			else
-				return (int) rc_orig;
-		}
-		
-		async_wait_for(req, &rc);
-		async_serialize_end();
-		
-		return (int) rc;
-	}
-}
-
-/** Get a copy of clipboard contents.
- *
- * Returns a new string that can be deallocated with free().
- *
- * @param str Here pointer to the newly allocated string is stored.
- *
- * @return Zero on success or negative error code.
- *
- */
-int clipboard_get_str(char **str)
-{
-	/* Loop until clipboard read succesful */
-	while (true) {
-		async_serialize_start();
-		clip_connect();
-		
-		ipcarg_t size;
-		ipcarg_t tag;
-		ipcarg_t rc = async_req_0_2(clip_phone, CLIPBOARD_CONTENT, &size, &tag);
-		
-		async_serialize_end();
-		
-		if (rc != EOK)
-			return (int) rc;
-		
-		char *sbuf;
-		
-		switch (tag) {
-		case CLIPBOARD_TAG_NONE:
-			sbuf = malloc(1);
-			if (sbuf == NULL)
-				return ENOMEM;
-			
-			sbuf[0] = 0;
-			*str = sbuf;
-			return EOK;
-		case CLIPBOARD_TAG_DATA:
-			sbuf = malloc(size + 1);
-			if (sbuf == NULL)
-				return ENOMEM;
-			
-			async_serialize_start();
-			
-			aid_t req = async_send_1(clip_phone, CLIPBOARD_GET_DATA, tag, NULL);
-			rc = async_data_read_start(clip_phone, (void *) sbuf, size);
-			if ((int) rc == EOVERFLOW) {
-				/*
-				 * The data in the clipboard has changed since
-				 * the last call of CLIPBOARD_CONTENT
-				 */
-				async_serialize_end();
-				break;
-			}
-			
-			if (rc != EOK) {
-				ipcarg_t rc_orig;
-				async_wait_for(req, &rc_orig);
-				async_serialize_end();
-				if (rc_orig == EOK)
-					return (int) rc;
-				else
-					return (int) rc_orig;
-			}
-			
-			async_wait_for(req, &rc);
-			async_serialize_end();
-			
-			if (rc == EOK) {
-				sbuf[size] = 0;
-				*str = sbuf;
-			}
-			
-			return rc;
-		default:
-			return EINVAL;
-		}
-	}
-}
-
-/** @}
- */
Index: pace/lib/libc/generic/ddi.c
===================================================================
--- uspace/lib/libc/generic/ddi.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,139 +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 libc
- * @{
- */
-/** @file
- */ 
-
-#include <ddi.h>
-#include <libarch/ddi.h>
-#include <libc.h>
-#include <task.h>
-#include <as.h>
-#include <align.h>
-#include <libarch/config.h>
-#include <kernel/ddi/ddi_arg.h>
-
-/** Return unique device number.
- *
- * @return New unique device number.
- *
- */
-int device_assign_devno(void)
-{
-	return __SYSCALL0(SYS_DEVICE_ASSIGN_DEVNO);
-}
-
-/** Map piece of physical memory to task.
- *
- * Caller of this function must have the CAP_MEM_MANAGER capability.
- *
- * @param pf		Physical address of the starting frame.
- * @param vp		Virtual address of the starting page.
- * @param pages		Number of pages to map.
- * @param flags		Flags for the new address space area.
- *
- * @return 		0 on success, EPERM if the caller lacks the
- *			CAP_MEM_MANAGER capability, ENOENT if there is no task
- *			with specified ID and ENOMEM if there was some problem
- *			in creating address space area.
- */
-int physmem_map(void *pf, void *vp, unsigned long pages, int flags)
-{
-	return __SYSCALL4(SYS_PHYSMEM_MAP, (sysarg_t) pf, (sysarg_t) vp, pages,
-	    flags);
-}
-
-/** Enable I/O space range to task.
- *
- * Caller of this function must have the IO_MEM_MANAGER capability.
- *
- * @param id		Task ID.
- * @param ioaddr	Starting address of the I/O range.
- * @param size		Size of the range.
- *
- * @return		0 on success, EPERM if the caller lacks the
- *			CAP_IO_MANAGER capability, ENOENT if there is no task
- *			with specified ID and ENOMEM if there was some problem
- *			in allocating memory.
- */
-int iospace_enable(task_id_t id, void *ioaddr, unsigned long size)
-{
-	ddi_ioarg_t arg;
-
-	arg.task_id = id;
-	arg.ioaddr = ioaddr;
-	arg.size = size;
-
-	return __SYSCALL1(SYS_IOSPACE_ENABLE, (sysarg_t) &arg);
-}
-
-/** Interrupt control
- *
- * @param enable	1 - enable interrupts, 0 - disable interrupts
- */
-int preemption_control(int enable)
-{
-	return __SYSCALL1(SYS_PREEMPT_CONTROL, (sysarg_t) enable);
-}
-
-/** Enable PIO for specified I/O range.
- *
- * @param pio_addr	I/O start address.
- * @param size		Size of the I/O region.
- * @param use_addr	Address where the final address for application's PIO
- * 			will be stored.
- *
- * @return		Zero on success or negative error code.
- */
-int pio_enable(void *pio_addr, size_t size, void **use_addr)
-{
-	void *phys;
-	void *virt;
-	size_t offset;
-	unsigned int pages;
-
-#ifdef IO_SPACE_BOUNDARY
-	if (pio_addr < IO_SPACE_BOUNDARY) {
-		*use_addr = pio_addr;
-		return iospace_enable(task_get_id(), pio_addr, size);
-	}
-#endif
-
-	phys = (void *) ALIGN_DOWN((uintptr_t) pio_addr, PAGE_SIZE);
-	offset = pio_addr - phys;
-	pages = ALIGN_UP(offset + size, PAGE_SIZE) >> PAGE_WIDTH;
-	virt = as_get_mappable_page(pages << PAGE_WIDTH);
-	*use_addr = virt + offset;
-	return physmem_map(phys, virt, pages, AS_AREA_READ | AS_AREA_WRITE);
-}
-
-/** @}
- */
Index: pace/lib/libc/generic/devmap.c
===================================================================
--- uspace/lib/libc/generic/devmap.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,439 +1,0 @@
-/*
- * Copyright (c) 2007 Josef Cejka
- * Copyright (c) 2009 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 <string.h>
-#include <ipc/ipc.h>
-#include <ipc/services.h>
-#include <ipc/devmap.h>
-#include <devmap.h>
-#include <async.h>
-#include <errno.h>
-#include <malloc.h>
-#include <bool.h>
-
-static int devmap_phone_driver = -1;
-static int devmap_phone_client = -1;
-
-/** Get phone to device mapper task. */
-int devmap_get_phone(devmap_interface_t iface, unsigned int flags)
-{
-	switch (iface) {
-	case DEVMAP_DRIVER:
-		if (devmap_phone_driver >= 0)
-			return devmap_phone_driver;
-		
-		if (flags & IPC_FLAG_BLOCKING)
-			devmap_phone_driver = ipc_connect_me_to_blocking(PHONE_NS,
-			    SERVICE_DEVMAP, DEVMAP_DRIVER, 0);
-		else
-			devmap_phone_driver = ipc_connect_me_to(PHONE_NS,
-			    SERVICE_DEVMAP, DEVMAP_DRIVER, 0);
-		
-		return devmap_phone_driver;
-	case DEVMAP_CLIENT:
-		if (devmap_phone_client >= 0)
-			return devmap_phone_client;
-		
-		if (flags & IPC_FLAG_BLOCKING)
-			devmap_phone_client = ipc_connect_me_to_blocking(PHONE_NS,
-			    SERVICE_DEVMAP, DEVMAP_CLIENT, 0);
-		else
-			devmap_phone_client = ipc_connect_me_to(PHONE_NS,
-			    SERVICE_DEVMAP, DEVMAP_CLIENT, 0);
-		
-		return devmap_phone_client;
-	default:
-		return -1;
-	}
-}
-
-void devmap_hangup_phone(devmap_interface_t iface)
-{
-	switch (iface) {
-	case DEVMAP_DRIVER:
-		if (devmap_phone_driver >= 0) {
-			ipc_hangup(devmap_phone_driver);
-			devmap_phone_driver = -1;
-		}
-		break;
-	case DEVMAP_CLIENT:
-		if (devmap_phone_client >= 0) {
-			ipc_hangup(devmap_phone_client);
-			devmap_phone_client = -1;
-		}
-		break;
-	default:
-		break;
-	}
-}
-
-/** Register new driver with devmap. */
-int devmap_driver_register(const char *name, async_client_conn_t conn)
-{
-	int phone = devmap_get_phone(DEVMAP_DRIVER, IPC_FLAG_BLOCKING);
-	
-	if (phone < 0)
-		return phone;
-	
-	async_serialize_start();
-	
-	ipc_call_t answer;
-	aid_t req = async_send_2(phone, DEVMAP_DRIVER_REGISTER, 0, 0, &answer);
-	
-	ipcarg_t retval = async_data_write_start(phone, name, str_size(name));
-	if (retval != EOK) {
-		async_wait_for(req, NULL);
-		async_serialize_end();
-		return -1;
-	}
-	
-	async_set_client_connection(conn);
-	
-	ipcarg_t callback_phonehash;
-	ipc_connect_to_me(phone, 0, 0, 0, &callback_phonehash);
-	async_wait_for(req, &retval);
-	
-	async_serialize_end();
-	
-	return retval;
-}
-
-/** Register new device.
- *
- * @param namespace Namespace name.
- * @param fqdn      Fully qualified device name.
- * @param handle    Output: Handle to the created instance of device.
- *
- */
-int devmap_device_register(const char *fqdn, dev_handle_t *handle)
-{
-	int phone = devmap_get_phone(DEVMAP_DRIVER, IPC_FLAG_BLOCKING);
-	
-	if (phone < 0)
-		return phone;
-	
-	async_serialize_start();
-	
-	ipc_call_t answer;
-	aid_t req = async_send_2(phone, DEVMAP_DEVICE_REGISTER, 0, 0,
-	    &answer);
-	
-	ipcarg_t retval = async_data_write_start(phone, fqdn, str_size(fqdn));
-	if (retval != EOK) {
-		async_wait_for(req, NULL);
-		async_serialize_end();
-		return retval;
-	}
-	
-	async_wait_for(req, &retval);
-	
-	async_serialize_end();
-	
-	if (retval != EOK) {
-		if (handle != NULL)
-			*handle = -1;
-		return retval;
-	}
-	
-	if (handle != NULL)
-		*handle = (dev_handle_t) IPC_GET_ARG1(answer);
-	
-	return retval;
-}
-
-int devmap_device_get_handle(const char *fqdn, dev_handle_t *handle, unsigned int flags)
-{
-	int phone = devmap_get_phone(DEVMAP_CLIENT, flags);
-	
-	if (phone < 0)
-		return phone;
-	
-	async_serialize_start();
-	
-	ipc_call_t answer;
-	aid_t req = async_send_2(phone, DEVMAP_DEVICE_GET_HANDLE, flags, 0,
-	    &answer);
-	
-	ipcarg_t retval = async_data_write_start(phone, fqdn, str_size(fqdn));
-	if (retval != EOK) {
-		async_wait_for(req, NULL);
-		async_serialize_end();
-		return retval;
-	}
-	
-	async_wait_for(req, &retval);
-	
-	async_serialize_end();
-	
-	if (retval != EOK) {
-		if (handle != NULL)
-			*handle = (dev_handle_t) -1;
-		return retval;
-	}
-	
-	if (handle != NULL)
-		*handle = (dev_handle_t) IPC_GET_ARG1(answer);
-	
-	return retval;
-}
-
-int devmap_namespace_get_handle(const char *name, dev_handle_t *handle, unsigned int flags)
-{
-	int phone = devmap_get_phone(DEVMAP_CLIENT, flags);
-	
-	if (phone < 0)
-		return phone;
-	
-	async_serialize_start();
-	
-	ipc_call_t answer;
-	aid_t req = async_send_2(phone, DEVMAP_NAMESPACE_GET_HANDLE, flags, 0,
-	    &answer);
-	
-	ipcarg_t retval = async_data_write_start(phone, name, str_size(name));
-	if (retval != EOK) {
-		async_wait_for(req, NULL);
-		async_serialize_end();
-		return retval;
-	}
-	
-	async_wait_for(req, &retval);
-	
-	async_serialize_end();
-	
-	if (retval != EOK) {
-		if (handle != NULL)
-			*handle = (dev_handle_t) -1;
-		return retval;
-	}
-	
-	if (handle != NULL)
-		*handle = (dev_handle_t) IPC_GET_ARG1(answer);
-	
-	return retval;
-}
-
-devmap_handle_type_t devmap_handle_probe(dev_handle_t handle)
-{
-	int phone = devmap_get_phone(DEVMAP_CLIENT, IPC_FLAG_BLOCKING);
-	
-	if (phone < 0)
-		return phone;
-	
-	ipcarg_t type;
-	int retval = async_req_1_1(phone, DEVMAP_HANDLE_PROBE, handle, &type);
-	if (retval != EOK)
-		return DEV_HANDLE_NONE;
-	
-	return (devmap_handle_type_t) type;
-}
-
-int devmap_device_connect(dev_handle_t handle, unsigned int flags)
-{
-	int phone;
-	
-	if (flags & IPC_FLAG_BLOCKING) {
-		phone = ipc_connect_me_to_blocking(PHONE_NS, SERVICE_DEVMAP,
-		    DEVMAP_CONNECT_TO_DEVICE, handle);
-	} else {
-		phone = ipc_connect_me_to(PHONE_NS, SERVICE_DEVMAP,
-		    DEVMAP_CONNECT_TO_DEVICE, handle);
-	}
-	
-	return phone;
-}
-
-int devmap_null_create(void)
-{
-	int phone = devmap_get_phone(DEVMAP_CLIENT, IPC_FLAG_BLOCKING);
-	
-	if (phone < 0)
-		return -1;
-	
-	ipcarg_t null_id;
-	int retval = async_req_0_1(phone, DEVMAP_NULL_CREATE, &null_id);
-	if (retval != EOK)
-		return -1;
-	
-	return (int) null_id;
-}
-
-void devmap_null_destroy(int null_id)
-{
-	int phone = devmap_get_phone(DEVMAP_CLIENT, IPC_FLAG_BLOCKING);
-	
-	if (phone < 0)
-		return;
-	
-	async_req_1_0(phone, DEVMAP_NULL_DESTROY, (ipcarg_t) null_id);
-}
-
-static size_t devmap_count_namespaces_internal(int phone)
-{
-	ipcarg_t count;
-	int retval = async_req_0_1(phone, DEVMAP_GET_NAMESPACE_COUNT, &count);
-	if (retval != EOK)
-		return 0;
-	
-	return count;
-}
-
-static size_t devmap_count_devices_internal(int phone, dev_handle_t ns_handle)
-{
-	ipcarg_t count;
-	int retval = async_req_1_1(phone, DEVMAP_GET_DEVICE_COUNT, ns_handle, &count);
-	if (retval != EOK)
-		return 0;
-	
-	return count;
-}
-
-size_t devmap_count_namespaces(void)
-{
-	int phone = devmap_get_phone(DEVMAP_CLIENT, IPC_FLAG_BLOCKING);
-	
-	if (phone < 0)
-		return 0;
-	
-	return devmap_count_namespaces_internal(phone);
-}
-
-size_t devmap_count_devices(dev_handle_t ns_handle)
-{
-	int phone = devmap_get_phone(DEVMAP_CLIENT, IPC_FLAG_BLOCKING);
-	
-	if (phone < 0)
-		return 0;
-	
-	return devmap_count_devices_internal(phone, ns_handle);
-}
-
-size_t devmap_get_namespaces(dev_desc_t **data)
-{
-	int phone = devmap_get_phone(DEVMAP_CLIENT, IPC_FLAG_BLOCKING);
-	
-	if (phone < 0)
-		return 0;
-	
-	/* Loop until namespaces read succesful */
-	while (true) {
-		size_t count = devmap_count_namespaces_internal(phone);
-		if (count == 0)
-			return 0;
-		
-		dev_desc_t *devs = (dev_desc_t *) calloc(count, sizeof(dev_desc_t));
-		if (devs == NULL)
-			return 0;
-		
-		async_serialize_start();
-		
-		ipc_call_t answer;
-		aid_t req = async_send_0(phone, DEVMAP_GET_NAMESPACES, &answer);
-		
-		int rc = async_data_read_start(phone, devs, count * sizeof(dev_desc_t));
-		if (rc == EOVERFLOW) {
-			/*
-			 * Number of namespaces has changed since
-			 * the last call of DEVMAP_DEVICE_GET_NAMESPACE_COUNT
-			 */
-			async_serialize_end();
-			free(devs);
-			continue;
-		}
-		
-		if (rc != EOK) {
-			async_wait_for(req, NULL);
-			async_serialize_end();
-			free(devs);
-			return 0;
-		}
-		
-		ipcarg_t retval;
-		async_wait_for(req, &retval);
-		async_serialize_end();
-		
-		if (retval != EOK)
-			return 0;
-		
-		*data = devs;
-		return count;
-	}
-}
-
-size_t devmap_get_devices(dev_handle_t ns_handle, dev_desc_t **data)
-{
-	int phone = devmap_get_phone(DEVMAP_CLIENT, IPC_FLAG_BLOCKING);
-	
-	if (phone < 0)
-		return 0;
-	
-	/* Loop until namespaces read succesful */
-	while (true) {
-		size_t count = devmap_count_devices_internal(phone, ns_handle);
-		if (count == 0)
-			return 0;
-		
-		dev_desc_t *devs = (dev_desc_t *) calloc(count, sizeof(dev_desc_t));
-		if (devs == NULL)
-			return 0;
-		
-		async_serialize_start();
-		
-		ipc_call_t answer;
-		aid_t req = async_send_1(phone, DEVMAP_GET_DEVICES, ns_handle, &answer);
-		
-		int rc = async_data_read_start(phone, devs, count * sizeof(dev_desc_t));
-		if (rc == EOVERFLOW) {
-			/*
-			 * Number of devices has changed since
-			 * the last call of DEVMAP_DEVICE_GET_DEVICE_COUNT
-			 */
-			async_serialize_end();
-			free(devs);
-			continue;
-		}
-		
-		if (rc != EOK) {
-			async_wait_for(req, NULL);
-			async_serialize_end();
-			free(devs);
-			return 0;
-		}
-		
-		ipcarg_t retval;
-		async_wait_for(req, &retval);
-		async_serialize_end();
-		
-		if (retval != EOK)
-			return 0;
-		
-		*data = devs;
-		return count;
-	}
-}
Index: pace/lib/libc/generic/err.c
===================================================================
--- uspace/lib/libc/generic/err.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(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 libc
- * @{
- */
-/** @file
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-
-/* TODO
-void errx(int __status, __const char *__format, ...)
-{
-	_exit(0);
-}
-*/
-
-/** @}
- */
Index: pace/lib/libc/generic/errno.c
===================================================================
--- uspace/lib/libc/generic/errno.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,41 +1,0 @@
-/*
- * Copyright (c) 2009 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 libc
- * @{
- */
-/** @file
- */
-
-#include <errno.h>
-#include <fibril.h>
-
-int _errno;
-
-/** @}
- */
Index: pace/lib/libc/generic/event.c
===================================================================
--- uspace/lib/libc/generic/event.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,57 +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.
- */
-
-/** @addtogroup libc
- * @{
- * @}
- */
-
-/** @addtogroup libc
- */
-/** @file
- */ 
-
-#include <libc.h>
-#include <event.h>
-#include <kernel/ipc/event_types.h>
-#include <ipc/ipc.h>
-
-/** Subscribe for event notifications.
- *
- * @param evno   Event number.
- * @param method Use this method for notifying me.
- *
- * @return Value returned by the kernel.
- */
-int event_subscribe(event_type_t e, ipcarg_t method)
-{
-	return __SYSCALL2(SYS_EVENT_SUBSCRIBE, (sysarg_t) e, (sysarg_t) method);
-}
-
-/** @}
- */
Index: pace/lib/libc/generic/fibril.c
===================================================================
--- uspace/lib/libc/generic/fibril.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,354 +1,0 @@
-/*
- * Copyright (c) 2006 Ondrej Palkovsky
- * Copyright (c) 2007 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 libc
- * @{
- */
-/** @file
- */
-
-#include <adt/list.h>
-#include <fibril.h>
-#include <thread.h>
-#include <tls.h>
-#include <malloc.h>
-#include <unistd.h>
-#include <stdio.h>
-#include <arch/barrier.h>
-#include <libarch/faddr.h>
-#include <futex.h>
-#include <assert.h>
-#include <async.h>
-
-#ifndef FIBRIL_INITIAL_STACK_PAGES_NO
-#define FIBRIL_INITIAL_STACK_PAGES_NO	1
-#endif
-
-/**
- * This futex serializes access to ready_list, serialized_list and manager_list.
- */ 
-static atomic_t fibril_futex = FUTEX_INITIALIZER;
-
-static LIST_INITIALIZE(ready_list);
-static LIST_INITIALIZE(serialized_list);
-static LIST_INITIALIZE(manager_list);
-
-static void fibril_main(void);
-
-/** Number of threads that are executing a manager fibril. */
-static int threads_in_manager;
-/** Number of threads that are executing a manager fibril and are serialized. */
-static int serialized_threads;	/* Protected by async_futex */
-/** Fibril-local count of serialization. If > 0, we must not preempt */
-static fibril_local int serialization_count;
-
-/** Setup fibril information into TCB structure */
-fibril_t *fibril_setup(void)
-{
-	fibril_t *f;
-	tcb_t *tcb;
-
-	tcb = __make_tls();
-	if (!tcb)
-		return NULL;
-
-	f = malloc(sizeof(fibril_t));
-	if (!f) {
-		__free_tls(tcb);
-		return NULL;
-	}
-
-	tcb->fibril_data = f;
-	f->tcb = tcb;
-
-	f->func = NULL;
-	f->arg = NULL;
-	f->stack = NULL;
-	f->clean_after_me = NULL;
-	f->retval = 0;
-	f->flags = 0;
-
-	return f;
-}
-
-void fibril_teardown(fibril_t *f)
-{
-	__free_tls(f->tcb);
-	free(f);
-}
-
-/** Function that spans the whole life-cycle of a fibril.
- *
- * Each fibril begins execution in this function. Then the function implementing
- * the fibril logic is called.  After its return, the return value is saved.
- * The fibril then switches to another fibril, which cleans up after it.
- */
-void fibril_main(void)
-{
-	fibril_t *f = __tcb_get()->fibril_data;
-
-	/* Call the implementing function. */
-	f->retval = f->func(f->arg);
-
-	fibril_switch(FIBRIL_FROM_DEAD);
-	/* not reached */
-}
-
-/** Switch from the current fibril.
- *
- * If calling with FIBRIL_TO_MANAGER parameter, the async_futex should be
- * held.
- *
- * @param stype		Switch type. One of FIBRIL_PREEMPT, FIBRIL_TO_MANAGER,
- * 			FIBRIL_FROM_MANAGER, FIBRIL_FROM_DEAD. The parameter
- * 			describes the circumstances of the switch.
- * @return		Return 0 if there is no ready fibril,
- * 			return 1 otherwise.
- */
-int fibril_switch(fibril_switch_type_t stype)
-{
-	int retval = 0;
-	
-	futex_down(&fibril_futex);
-	
-	if (stype == FIBRIL_PREEMPT && list_empty(&ready_list))
-		goto ret_0;
-	
-	if (stype == FIBRIL_FROM_MANAGER) {
-		if ((list_empty(&ready_list)) && (list_empty(&serialized_list)))
-			goto ret_0;
-		
-		/*
-		 * Do not preempt if there is not enough threads to run the
-		 * ready fibrils which are not serialized.
-		 */
-		if ((list_empty(&serialized_list)) &&
-		    (threads_in_manager <= serialized_threads)) {
-			goto ret_0;
-		}
-	}
-	
-	/* If we are going to manager and none exists, create it */
-	if ((stype == FIBRIL_TO_MANAGER) || (stype == FIBRIL_FROM_DEAD)) {
-		while (list_empty(&manager_list)) {
-			futex_up(&fibril_futex);
-			async_create_manager();
-			futex_down(&fibril_futex);
-		}
-	}
-	
-	fibril_t *srcf = __tcb_get()->fibril_data;
-	if (stype != FIBRIL_FROM_DEAD) {
-		
-		/* Save current state */
-		if (!context_save(&srcf->ctx)) {
-			if (serialization_count)
-				srcf->flags &= ~FIBRIL_SERIALIZED;
-			
-			if (srcf->clean_after_me) {
-				/*
-				 * Cleanup after the dead fibril from which we
-				 * restored context here.
-				 */
-				void *stack = srcf->clean_after_me->stack;
-				if (stack) {
-					/*
-					 * This check is necessary because a
-					 * thread could have exited like a
-					 * normal fibril using the
-					 * FIBRIL_FROM_DEAD switch type. In that
-					 * case, its fibril will not have the
-					 * stack member filled.
-					 */
-					free(stack);
-				}
-				fibril_teardown(srcf->clean_after_me);
-				srcf->clean_after_me = NULL;
-			}
-			
-			return 1;	/* futex_up already done here */
-		}
-		
-		/* Save myself to the correct run list */
-		if (stype == FIBRIL_PREEMPT)
-			list_append(&srcf->link, &ready_list);
-		else if (stype == FIBRIL_FROM_MANAGER) {
-			list_append(&srcf->link, &manager_list);
-			threads_in_manager--;
-		} else {
-			/*
-			 * If stype == FIBRIL_TO_MANAGER, don't put ourselves to
-			 * any list, we should already be somewhere, or we will
-			 * be lost.
-			 */
-		}
-	}
-	
-	/* Choose a new fibril to run */
-	fibril_t *dstf;
-	if ((stype == FIBRIL_TO_MANAGER) || (stype == FIBRIL_FROM_DEAD)) {
-		dstf = list_get_instance(manager_list.next, fibril_t, link);
-		if (serialization_count && stype == FIBRIL_TO_MANAGER) {
-			serialized_threads++;
-			srcf->flags |= FIBRIL_SERIALIZED;
-		}
-		threads_in_manager++;
-		
-		if (stype == FIBRIL_FROM_DEAD) 
-			dstf->clean_after_me = srcf;
-	} else {
-		if (!list_empty(&serialized_list)) {
-			dstf = list_get_instance(serialized_list.next, fibril_t,
-			    link);
-			serialized_threads--;
-		} else {
-			dstf = list_get_instance(ready_list.next, fibril_t,
-			    link);
-		}
-	}
-	list_remove(&dstf->link);
-	
-	futex_up(&fibril_futex);
-	context_restore(&dstf->ctx);
-	/* not reached */
-	
-ret_0:
-	futex_up(&fibril_futex);
-	return retval;
-}
-
-/** Create a new fibril.
- *
- * @param func		Implementing function of the new fibril.
- * @param arg		Argument to pass to func.
- *
- * @return		Return 0 on failure or TLS of the new fibril.
- */
-fid_t fibril_create(int (*func)(void *), void *arg)
-{
-	fibril_t *f;
-
-	f = fibril_setup();
-	if (!f) 
-		return 0;
-	f->stack = (char *) malloc(FIBRIL_INITIAL_STACK_PAGES_NO *
-	    getpagesize());
-	if (!f->stack) {
-		fibril_teardown(f);
-		return 0;
-	}
-	
-	f->func = func;
-	f->arg = arg;
-
-	context_save(&f->ctx);
-	context_set(&f->ctx, FADDR(fibril_main), f->stack,
-	    FIBRIL_INITIAL_STACK_PAGES_NO * getpagesize(), f->tcb);
-
-	return (fid_t) f;
-}
-
-/** Add a fibril to the ready list.
- *
- * @param fid		Pointer to the fibril structure of the fibril to be
- *			added.
- */
-void fibril_add_ready(fid_t fid)
-{
-	fibril_t *f;
-
-	f = (fibril_t *) fid;
-	futex_down(&fibril_futex);
-	if ((f->flags & FIBRIL_SERIALIZED))
-		list_append(&f->link, &serialized_list);
-	else
-		list_append(&f->link, &ready_list);
-	futex_up(&fibril_futex);
-}
-
-/** Add a fibril to the manager list.
- *
- * @param fid		Pointer to the fibril structure of the fibril to be
- *			added.
- */
-void fibril_add_manager(fid_t fid)
-{
-	fibril_t *f;
-
-	f = (fibril_t *) fid;
-
-	futex_down(&fibril_futex);
-	list_append(&f->link, &manager_list);
-	futex_up(&fibril_futex);
-}
-
-/** Remove one manager from the manager list. */
-void fibril_remove_manager(void)
-{
-	futex_down(&fibril_futex);
-	if (list_empty(&manager_list)) {
-		futex_up(&fibril_futex);
-		return;
-	}
-	list_remove(manager_list.next);
-	futex_up(&fibril_futex);
-}
-
-/** Return fibril id of the currently running fibril.
- *
- * @return fibril ID of the currently running fibril.
- *
- */
-fid_t fibril_get_id(void)
-{
-	return (fid_t) __tcb_get()->fibril_data;
-}
-
-/** Disable preemption
- *
- * If the fibril wants to send several message in a row and does not want to be
- * preempted, it should start async_serialize_start() in the beginning of
- * communication and async_serialize_end() in the end. If it is a true
- * multithreaded application, it should protect the communication channel by a
- * futex as well.
- *
- */
-void fibril_inc_sercount(void)
-{
-	serialization_count++;
-}
-
-/** Restore the preemption counter to the previous state. */
-void fibril_dec_sercount(void)
-{
-	serialization_count--;
-}
-
-/** @}
- */
Index: pace/lib/libc/generic/fibril_synch.c
===================================================================
--- uspace/lib/libc/generic/fibril_synch.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,308 +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.
- */
-
-/** @addtogroup libc
- * @{
- */
-/** @file
- */
-
-#include <fibril_synch.h>
-#include <fibril.h>
-#include <async.h>
-#include <async_priv.h>
-#include <adt/list.h>
-#include <futex.h>
-#include <sys/time.h>
-#include <errno.h>
-#include <assert.h>
-
-static void optimize_execution_power(void)
-{
-	/*
-	 * When waking up a worker fibril previously blocked in fibril
-	 * synchronization, chances are that there is an idle manager fibril
-	 * waiting for IPC, that could start executing the awakened worker
-	 * fibril right away. We try to detect this and bring the manager
-	 * fibril back to fruitful work.
-	 */
-	if (atomic_get(&threads_in_ipc_wait) > 0)
-		ipc_poke();
-}
-
-void fibril_mutex_initialize(fibril_mutex_t *fm)
-{
-	fm->counter = 1;
-	list_initialize(&fm->waiters);
-}
-
-void fibril_mutex_lock(fibril_mutex_t *fm)
-{
-	futex_down(&async_futex);
-	if (fm->counter-- <= 0) {
-		awaiter_t wdata;
-
-		wdata.fid = fibril_get_id();
-		wdata.active = false;
-		wdata.wu_event.inlist = true;
-		link_initialize(&wdata.wu_event.link);
-		list_append(&wdata.wu_event.link, &fm->waiters);
-		fibril_switch(FIBRIL_TO_MANAGER);
-	} else {
-		futex_up(&async_futex);
-	}
-}
-
-bool fibril_mutex_trylock(fibril_mutex_t *fm)
-{
-	bool locked = false;
-	
-	futex_down(&async_futex);
-	if (fm->counter > 0) {
-		fm->counter--;
-		locked = true;
-	}
-	futex_up(&async_futex);
-	
-	return locked;
-}
-
-static void _fibril_mutex_unlock_unsafe(fibril_mutex_t *fm)
-{
-	assert(fm->counter <= 0);
-	if (fm->counter++ < 0) {
-		link_t *tmp;
-		awaiter_t *wdp;
-	
-		assert(!list_empty(&fm->waiters));
-		tmp = fm->waiters.next;
-		wdp = list_get_instance(tmp, awaiter_t, wu_event.link);
-		wdp->active = true;
-		wdp->wu_event.inlist = false;
-		list_remove(&wdp->wu_event.link);
-		fibril_add_ready(wdp->fid);
-		optimize_execution_power();
-	}
-}
-
-void fibril_mutex_unlock(fibril_mutex_t *fm)
-{
-	futex_down(&async_futex);
-	_fibril_mutex_unlock_unsafe(fm);
-	futex_up(&async_futex);
-}
-
-void fibril_rwlock_initialize(fibril_rwlock_t *frw)
-{
-	frw->writers = 0;
-	frw->readers = 0;
-	list_initialize(&frw->waiters);
-}
-
-void fibril_rwlock_read_lock(fibril_rwlock_t *frw)
-{
-	futex_down(&async_futex);
-	if (frw->writers) {
-		fibril_t *f = (fibril_t *) fibril_get_id();
-		awaiter_t wdata;
-
-		wdata.fid = (fid_t) f;
-		wdata.active = false;
-		wdata.wu_event.inlist = true;
-		link_initialize(&wdata.wu_event.link);
-		f->flags &= ~FIBRIL_WRITER;
-		list_append(&wdata.wu_event.link, &frw->waiters);
-		fibril_switch(FIBRIL_TO_MANAGER);
-	} else {
-		frw->readers++;
-		futex_up(&async_futex);
-	}
-}
-
-void fibril_rwlock_write_lock(fibril_rwlock_t *frw)
-{
-	futex_down(&async_futex);
-	if (frw->writers || frw->readers) {
-		fibril_t *f = (fibril_t *) fibril_get_id();
-		awaiter_t wdata;
-
-		wdata.fid = (fid_t) f;
-		wdata.active = false;
-		wdata.wu_event.inlist = true;
-		link_initialize(&wdata.wu_event.link);
-		f->flags |= FIBRIL_WRITER;
-		list_append(&wdata.wu_event.link, &frw->waiters);
-		fibril_switch(FIBRIL_TO_MANAGER);
-	} else {
-		frw->writers++;
-		futex_up(&async_futex);
-	}
-}
-
-static void _fibril_rwlock_common_unlock(fibril_rwlock_t *frw)
-{
-	futex_down(&async_futex);
-	assert(frw->readers || (frw->writers == 1));
-	if (frw->readers) {
-		if (--frw->readers)
-			goto out;
-	} else {
-		frw->writers--;
-	}
-	
-	assert(!frw->readers && !frw->writers);
-	
-	while (!list_empty(&frw->waiters)) {
-		link_t *tmp = frw->waiters.next;
-		awaiter_t *wdp;
-		fibril_t *f;
-		
-		wdp = list_get_instance(tmp, awaiter_t, wu_event.link);
-		f = (fibril_t *) wdp->fid;
-		
-		if (f->flags & FIBRIL_WRITER) {
-			if (frw->readers)
-				break;
-			wdp->active = true;
-			wdp->wu_event.inlist = false;
-			list_remove(&wdp->wu_event.link);
-			fibril_add_ready(wdp->fid);
-			frw->writers++;
-			optimize_execution_power();
-			break;
-		} else {
-			wdp->active = true;
-			wdp->wu_event.inlist = false;
-			list_remove(&wdp->wu_event.link);
-			fibril_add_ready(wdp->fid);
-			frw->readers++;
-			optimize_execution_power();
-		}
-	}
-out:
-	futex_up(&async_futex);
-}
-
-void fibril_rwlock_read_unlock(fibril_rwlock_t *frw)
-{
-	_fibril_rwlock_common_unlock(frw);
-}
-
-void fibril_rwlock_write_unlock(fibril_rwlock_t *frw)
-{
-	_fibril_rwlock_common_unlock(frw);
-}
-
-void fibril_condvar_initialize(fibril_condvar_t *fcv)
-{
-	list_initialize(&fcv->waiters);
-}
-
-int
-fibril_condvar_wait_timeout(fibril_condvar_t *fcv, fibril_mutex_t *fm,
-    suseconds_t timeout)
-{
-	awaiter_t wdata;
-
-	if (timeout < 0)
-		return ETIMEOUT;
-
-	wdata.fid = fibril_get_id();
-	wdata.active = false;
-	
-	wdata.to_event.inlist = timeout > 0;
-	wdata.to_event.occurred = false;
-	link_initialize(&wdata.to_event.link);
-
-	wdata.wu_event.inlist = true;
-	link_initialize(&wdata.wu_event.link);
-
-	futex_down(&async_futex);
-	if (timeout) {
-		gettimeofday(&wdata.to_event.expires, NULL);
-		tv_add(&wdata.to_event.expires, timeout);
-		async_insert_timeout(&wdata);
-	}
-	list_append(&wdata.wu_event.link, &fcv->waiters);
-	_fibril_mutex_unlock_unsafe(fm);
-	fibril_switch(FIBRIL_TO_MANAGER);
-	fibril_mutex_lock(fm);
-
-	/* async_futex not held after fibril_switch() */
-	futex_down(&async_futex);
-	if (wdata.to_event.inlist)
-		list_remove(&wdata.to_event.link);
-	if (wdata.wu_event.inlist)
-		list_remove(&wdata.wu_event.link);
-	futex_up(&async_futex);
-	
-	return wdata.to_event.occurred ? ETIMEOUT : EOK;
-}
-
-void fibril_condvar_wait(fibril_condvar_t *fcv, fibril_mutex_t *fm)
-{
-	int rc;
-
-	rc = fibril_condvar_wait_timeout(fcv, fm, 0);
-	assert(rc == EOK);
-}
-
-static void _fibril_condvar_wakeup_common(fibril_condvar_t *fcv, bool once)
-{
-	link_t *tmp;
-	awaiter_t *wdp;
-
-	futex_down(&async_futex);
-	while (!list_empty(&fcv->waiters)) {
-		tmp = fcv->waiters.next;
-		wdp = list_get_instance(tmp, awaiter_t, wu_event.link);
-		list_remove(&wdp->wu_event.link);
-		wdp->wu_event.inlist = false;
-		if (!wdp->active) {
-			wdp->active = true;
-			fibril_add_ready(wdp->fid);
-			optimize_execution_power();
-			if (once)
-				break;
-		}
-	}
-	futex_up(&async_futex);
-}
-
-void fibril_condvar_signal(fibril_condvar_t *fcv)
-{
-	_fibril_condvar_wakeup_common(fcv, true);
-}
-
-void fibril_condvar_broadcast(fibril_condvar_t *fcv)
-{
-	_fibril_condvar_wakeup_common(fcv, false);
-}
-
-/** @}
- */
Index: pace/lib/libc/generic/futex.c
===================================================================
--- uspace/lib/libc/generic/futex.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,91 +1,0 @@
-/*
- * Copyright (c) 2008 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 libc
- * @{
- */
-/** @file
- */ 
-
-#include <futex.h>
-#include <atomic.h>
-#include <libc.h>
-#include <sys/types.h>
-
-/** Initialize futex counter.
- *
- * @param futex		Futex.
- * @param val		Initialization value.
- */
-void futex_initialize(futex_t *futex, int val)
-{
-	atomic_set(futex, val);
-}
-
-/** Try to down the futex.
- *
- * @param futex		Futex.
- * @return		Non-zero if the futex was acquired.
- * @return		Zero if the futex was not acquired.
- */
-int futex_trydown(futex_t *futex)
-{
-	return cas(futex, 1, 0);
-}
-
-/** Down the futex.
- *
- * @param futex		Futex.
- * @return		ENOENT if there is no such virtual address.
- * @return		Zero in the uncontended case. 
- * @return		Otherwise one of ESYNCH_OK_ATOMIC or ESYNCH_OK_BLOCKED.
- */
-int futex_down(futex_t *futex)
-{
-	if ((atomic_signed_t) atomic_predec(futex) < 0)
-		return __SYSCALL1(SYS_FUTEX_SLEEP, (sysarg_t) &futex->count);
-
-	return 0;
-}
-
-/** Up the futex.
- *
- * @param futex		Futex.
- * @return		ENOENT if there is no such virtual address.
- * @return		Zero in the uncontended case.
- */
-int futex_up(futex_t *futex)
-{
-	if ((atomic_signed_t) atomic_postinc(futex) < 0)
-		return __SYSCALL1(SYS_FUTEX_WAKEUP, (sysarg_t) &futex->count);
-		
-	return 0;
-}
-
-/** @}
- */
Index: pace/lib/libc/generic/getopt.c
===================================================================
--- uspace/lib/libc/generic/getopt.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,479 +1,0 @@
-/*	$NetBSD: getopt_long.c,v 1.21.4.1 2008/01/09 01:34:14 matt Exp $	*/
-
-/*-
- * Copyright (c) 2000 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Dieter Baron and Thomas Klausner.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. 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.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``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 FOUNDATION OR CONTRIBUTORS
- * 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.
- */
-
-/* Ported to HelenOS August 2008 by Tim Post <echo@echoreply.us> */
-
-#include <assert.h>
-#include <stdarg.h>
-#include <err.h>
-#include <errno.h>
-#include <getopt.h>
-#include <stdlib.h>
-#include <string.h>
-
-/* HelenOS Port : We're incorporating only the modern getopt_long with wrappers
- * to keep legacy getopt() usage from breaking. All references to REPLACE_GETOPT
- * are dropped, we just include the code */
-
-int	opterr = 1;		/* if error message should be printed */
-int	optind = 1;		/* index into parent argv vector */
-int	optopt = '?';		/* character checked for validity */
-int	optreset;		/* reset getopt */
-const char *optarg;		/* argument associated with option */
-
-
-#define IGNORE_FIRST	(*options == '-' || *options == '+')
-#define PRINT_ERROR	((opterr) && ((*options != ':') \
-				      || (IGNORE_FIRST && options[1] != ':')))
-/*HelenOS Port - POSIXLY_CORRECT is always false */
-#define IS_POSIXLY_CORRECT 0
-#define PERMUTE         (!IS_POSIXLY_CORRECT && !IGNORE_FIRST)
-/* XXX: GNU ignores PC if *options == '-' */
-#define IN_ORDER        (!IS_POSIXLY_CORRECT && *options == '-')
-
-/* return values */
-#define	BADCH	(int)'?'
-#define	BADARG		((IGNORE_FIRST && options[1] == ':') \
-			 || (*options == ':') ? (int)':' : (int)'?')
-#define INORDER (int)1
-
-#define	EMSG	""
-
-static int getopt_internal(int, char **, const char *);
-static int gcd(int, int);
-static void permute_args(int, int, int, char **);
-
-static const char *place = EMSG; /* option letter processing */
-
-/* XXX: set optreset to 1 rather than these two */
-static int nonopt_start = -1; /* first non option argument (for permute) */
-static int nonopt_end = -1;   /* first option after non options (for permute) */
-
-/* Error messages */
-
-/* HelenOS Port: Calls to warnx() were eliminated (as we have no stderr that
- * may be redirected) and replaced with printf. As such, error messages now
- * end in a newline */
-
-static const char recargchar[] = "option requires an argument -- %c\n";
-static const char recargstring[] = "option requires an argument -- %s\n";
-static const char ambig[] = "ambiguous option -- %.*s\n";
-static const char noarg[] = "option doesn't take an argument -- %.*s\n";
-static const char illoptchar[] = "unknown option -- %c\n";
-static const char illoptstring[] = "unknown option -- %s\n";
-
-
-/*
- * Compute the greatest common divisor of a and b.
- */
-static int
-gcd(a, b)
-	int a;
-	int b;
-{
-	int c;
-
-	c = a % b;
-	while (c != 0) {
-		a = b;
-		b = c;
-		c = a % b;
-	}
-	   
-	return b;
-}
-
-/*
- * Exchange the block from nonopt_start to nonopt_end with the block
- * from nonopt_end to opt_end (keeping the same order of arguments
- * in each block).
- */
-static void
-permute_args(panonopt_start, panonopt_end, opt_end, nargv)
-	int panonopt_start;
-	int panonopt_end;
-	int opt_end;
-	char **nargv;
-{
-	int cstart, cyclelen, i, j, ncycle, nnonopts, nopts, pos;
-	char *swap;
-
-	assert(nargv != NULL);
-
-	/*
-	 * compute lengths of blocks and number and size of cycles
-	 */
-	nnonopts = panonopt_end - panonopt_start;
-	nopts = opt_end - panonopt_end;
-	ncycle = gcd(nnonopts, nopts);
-	cyclelen = (opt_end - panonopt_start) / ncycle;
-
-	for (i = 0; i < ncycle; i++) {
-		cstart = panonopt_end+i;
-		pos = cstart;
-		for (j = 0; j < cyclelen; j++) {
-			if (pos >= panonopt_end)
-				pos -= nnonopts;
-			else
-				pos += nopts;
-			swap = nargv[pos];
-			nargv[pos] = nargv[cstart];
-			nargv[cstart] = swap;
-		}
-	}
-}
-
-/*
- * getopt_internal --
- *	Parse argc/argv argument vector.  Called by user level routines.
- *  Returns -2 if -- is found (can be long option or end of options marker).
- */
-static int
-getopt_internal(nargc, nargv, options)
-	int nargc;
-	char **nargv;
-	const char *options;
-{
-	const char *oli;				/* option letter list index */
-	int optchar;
-
-	assert(nargv != NULL);
-	assert(options != NULL);
-
-	optarg = NULL;
-
-	/*
-	 * XXX Some programs (like rsyncd) expect to be able to
-	 * XXX re-initialize optind to 0 and have getopt_long(3)
-	 * XXX properly function again.  Work around this braindamage.
-	 */
-	if (optind == 0)
-		optind = 1;
-
-	if (optreset)
-		nonopt_start = nonopt_end = -1;
-start:
-	if (optreset || !*place) {		/* update scanning pointer */
-		optreset = 0;
-		if (optind >= nargc) {          /* end of argument vector */
-			place = EMSG;
-			if (nonopt_end != -1) {
-				/* do permutation, if we have to */
-				permute_args(nonopt_start, nonopt_end,
-				    optind, nargv);
-				optind -= nonopt_end - nonopt_start;
-			}
-			else if (nonopt_start != -1) {
-				/*
-				 * If we skipped non-options, set optind
-				 * to the first of them.
-				 */
-				optind = nonopt_start;
-			}
-			nonopt_start = nonopt_end = -1;
-			return -1;
-		}
-		if ((*(place = nargv[optind]) != '-')
-		    || (place[1] == '\0')) {    /* found non-option */
-			place = EMSG;
-			if (IN_ORDER) {
-				/*
-				 * GNU extension: 
-				 * return non-option as argument to option 1
-				 */
-				optarg = nargv[optind++];
-				return INORDER;
-			}
-			if (!PERMUTE) {
-				/*
-				 * if no permutation wanted, stop parsing
-				 * at first non-option
-				 */
-				return -1;
-			}
-			/* do permutation */
-			if (nonopt_start == -1)
-				nonopt_start = optind;
-			else if (nonopt_end != -1) {
-				permute_args(nonopt_start, nonopt_end,
-				    optind, nargv);
-				nonopt_start = optind -
-				    (nonopt_end - nonopt_start);
-				nonopt_end = -1;
-			}
-			optind++;
-			/* process next argument */
-			goto start;
-		}
-		if (nonopt_start != -1 && nonopt_end == -1)
-			nonopt_end = optind;
-		if (place[1] && *++place == '-') {	/* found "--" */
-			place++;
-			return -2;
-		}
-	}
-	if ((optchar = (int)*place++) == (int)':' ||
-	    (oli = str_chr(options + (IGNORE_FIRST ? 1 : 0), optchar)) == NULL) {
-		/* option letter unknown or ':' */
-		if (!*place)
-			++optind;
-		if (PRINT_ERROR)
-			printf(illoptchar, optchar);
-		optopt = optchar;
-		return BADCH;
-	}
-	if (optchar == 'W' && oli[1] == ';') {		/* -W long-option */
-		/* XXX: what if no long options provided (called by getopt)? */
-		if (*place) 
-			return -2;
-
-		if (++optind >= nargc) {	/* no arg */
-			place = EMSG;
-			if (PRINT_ERROR)
-				printf(recargchar, optchar);
-			optopt = optchar;
-			return BADARG;
-		} else				/* white space */
-			place = nargv[optind];
-		/*
-		 * Handle -W arg the same as --arg (which causes getopt to
-		 * stop parsing).
-		 */
-		return -2;
-	}
-	if (*++oli != ':') {			/* doesn't take argument */
-		if (!*place)
-			++optind;
-	} else {				/* takes (optional) argument */
-		optarg = NULL;
-		if (*place)			/* no white space */
-			optarg = place;
-		/* XXX: disable test for :: if PC? (GNU doesn't) */
-		else if (oli[1] != ':') {	/* arg not optional */
-			if (++optind >= nargc) {	/* no arg */
-				place = EMSG;
-				if (PRINT_ERROR)
-					printf(recargchar, optchar);
-				optopt = optchar;
-				return BADARG;
-			} else
-				optarg = nargv[optind];
-		}
-		place = EMSG;
-		++optind;
-	}
-	/* dump back option letter */
-	return optchar;
-}
-
-/*
- * getopt --
- *	Parse argc/argv argument vector.
- */
-int
-getopt(nargc, nargv, options)
-	int nargc;
-	char * const *nargv;
-	const char *options;
-{
-	int retval;
-
-	assert(nargv != NULL);
-	assert(options != NULL);
-
-	retval = getopt_internal(nargc, (char **)nargv, options);
-	if (retval == -2) {
-		++optind;
-		/*
-		 * We found an option (--), so if we skipped non-options,
-		 * we have to permute.
-		 */
-		if (nonopt_end != -1) {
-			permute_args(nonopt_start, nonopt_end, optind,
-				       (char **)nargv);
-			optind -= nonopt_end - nonopt_start;
-		}
-		nonopt_start = nonopt_end = -1;
-		retval = -1;
-	}
-	return retval;
-}
-
-/*
- * getopt_long --
- *	Parse argc/argv argument vector.
- */
-int
-getopt_long(nargc, nargv, options, long_options, idx)
-	int nargc;
-	char * const *nargv;
-	const char *options;
-	const struct option *long_options;
-	int *idx;
-{
-	int retval;
-
-#define IDENTICAL_INTERPRETATION(_x, _y)				\
-	(long_options[(_x)].has_arg == long_options[(_y)].has_arg &&	\
-	 long_options[(_x)].flag == long_options[(_y)].flag &&		\
-	 long_options[(_x)].val == long_options[(_y)].val)
-
-	assert(nargv != NULL);
-	assert(options != NULL);
-	assert(long_options != NULL);
-	/* idx may be NULL */
-
-	retval = getopt_internal(nargc, (char **)nargv, options);
-	if (retval == -2) {
-		char *current_argv;
-		const char *has_equal;
-		size_t current_argv_len;
-		int i, ambiguous, match;
-
-		current_argv = (char *)place;
-		match = -1;
-		ambiguous = 0;
-
-		optind++;
-		place = EMSG;
-
-		if (*current_argv == '\0') {		/* found "--" */
-			/*
-			 * We found an option (--), so if we skipped
-			 * non-options, we have to permute.
-			 */
-			if (nonopt_end != -1) {
-				permute_args(nonopt_start, nonopt_end,
-				    optind, (char **)nargv);
-				optind -= nonopt_end - nonopt_start;
-			}
-			nonopt_start = nonopt_end = -1;
-			return -1;
-		}
-		if ((has_equal = str_chr(current_argv, '=')) != NULL) {
-			/* argument found (--option=arg) */
-			current_argv_len = has_equal - current_argv;
-			has_equal++;
-		} else
-			current_argv_len = str_size(current_argv);
-	    
-		for (i = 0; long_options[i].name; i++) {
-			/* find matching long option */
-			if (str_lcmp(current_argv, long_options[i].name,
-			    str_nlength(current_argv, current_argv_len)))
-				continue;
-
-			if (str_size(long_options[i].name) ==
-			    (unsigned)current_argv_len) {
-				/* exact match */
-				match = i;
-				ambiguous = 0;
-				break;
-			}
-			if (match == -1)		/* partial match */
-				match = i;
-			else if (!IDENTICAL_INTERPRETATION(i, match))
-				ambiguous = 1;
-		}
-		if (ambiguous) {
-			/* ambiguous abbreviation */
-			if (PRINT_ERROR)
-				printf(ambig, (int)current_argv_len,
-				     current_argv);
-			optopt = 0;
-			return BADCH;
-		}
-		if (match != -1) {			/* option found */
-		        if (long_options[match].has_arg == no_argument
-			    && has_equal) {
-				if (PRINT_ERROR)
-					printf(noarg, (int)current_argv_len,
-					     current_argv);
-				/*
-				 * XXX: GNU sets optopt to val regardless of
-				 * flag
-				 */
-				if (long_options[match].flag == NULL)
-					optopt = long_options[match].val;
-				else
-					optopt = 0;
-				return BADARG;
-			}
-			if (long_options[match].has_arg == required_argument ||
-			    long_options[match].has_arg == optional_argument) {
-				if (has_equal)
-					optarg = has_equal;
-				else if (long_options[match].has_arg ==
-				    required_argument) {
-					/*
-					 * optional argument doesn't use
-					 * next nargv
-					 */
-					optarg = nargv[optind++];
-				}
-			}
-			if ((long_options[match].has_arg == required_argument)
-			    && (optarg == NULL)) {
-				/*
-				 * Missing argument; leading ':'
-				 * indicates no error should be generated
-				 */
-				if (PRINT_ERROR)
-					printf(recargstring, current_argv);
-				/*
-				 * XXX: GNU sets optopt to val regardless
-				 * of flag
-				 */
-				if (long_options[match].flag == NULL)
-					optopt = long_options[match].val;
-				else
-					optopt = 0;
-				--optind;
-				return BADARG;
-			}
-		} else {			/* unknown option */
-			if (PRINT_ERROR)
-				printf(illoptstring, current_argv);
-			optopt = 0;
-			return BADCH;
-		}
-		if (long_options[match].flag) {
-			*long_options[match].flag = long_options[match].val;
-			retval = 0;
-		} else 
-			retval = long_options[match].val;
-		if (idx)
-			*idx = match;
-	}
-	return retval;
-#undef IDENTICAL_INTERPRETATION
-}
-
Index: pace/lib/libc/generic/io/asprintf.c
===================================================================
--- uspace/lib/libc/generic/io/asprintf.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,89 +1,0 @@
-/*
- * Copyright (c) 2006 Josef Cejka
- * Copyright (c) 2008 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 libc
- * @{
- */
-/** @file
- */
-
-#include <stdarg.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <io/printf_core.h>
-
-static int asprintf_str_write(const char *str, size_t count, void *unused)
-{
-	return str_nlength(str, count);
-}
-
-static int asprintf_wstr_write(const wchar_t *str, size_t count, void *unused)
-{
-	return wstr_nlength(str, count);
-}
-
-/** Allocate and print to string.
- *
- * @param strp Address of the pointer where to store the address of
- *             the newly allocated string.
- * @fmt        Format string.
- *
- * @return Number of characters printed or a negative error code.
- *
- */
-int asprintf(char **strp, const char *fmt, ...)
-{
-	struct printf_spec ps = {
-		asprintf_str_write,
-		asprintf_wstr_write,
-		NULL
-	};
-	
-	va_list args;
-	va_start(args, fmt);
-	
-	int ret = printf_core(fmt, &ps, args);
-	va_end(args);
-	
-	if (ret > 0) {
-		*strp = malloc(STR_BOUNDS(ret) + 1);
-		if (*strp == NULL)
-			return -1;
-		
-		va_start(args, fmt);
-		vsnprintf(*strp, STR_BOUNDS(ret) + 1, fmt, args);
-		va_end(args);
-	}
-	
-	return ret;
-}
-
-/** @}
- */
Index: pace/lib/libc/generic/io/console.c
===================================================================
--- uspace/lib/libc/generic/io/console.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,134 +1,0 @@
-/*
- * Copyright (c) 2006 Josef Cejka
- * Copyright (c) 2006 Jakub Vana
- * 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.
- */
-
-/** @addtogroup libc
- * @{
- */
-/** @file
- */
-
-#include <libc.h>
-#include <async.h>
-#include <io/console.h>
-#include <ipc/console.h>
-
-void console_clear(int phone)
-{
-	async_msg_0(phone, CONSOLE_CLEAR);
-}
-
-int console_get_size(int phone, int *cols, int *rows)
-{
-	ipcarg_t cols_v;
-	ipcarg_t rows_v;
-	int rc;
-
-	rc = async_req_0_2(phone, CONSOLE_GET_SIZE, &cols_v, &rows_v);
-
-	*cols = (int) cols_v;
-	*rows = (int) rows_v;
-	return rc;
-}
-
-void console_set_style(int phone, int style)
-{
-	async_msg_1(phone, CONSOLE_SET_STYLE, style);
-}
-
-void console_set_color(int phone, int fg_color, int bg_color, int flags)
-{
-	async_msg_3(phone, CONSOLE_SET_COLOR, fg_color, bg_color, flags);
-}
-
-void console_set_rgb_color(int phone, int fg_color, int bg_color)
-{
-	async_msg_2(phone, CONSOLE_SET_RGB_COLOR, fg_color, bg_color);
-}
-
-void console_cursor_visibility(int phone, bool show)
-{
-	async_msg_1(phone, CONSOLE_CURSOR_VISIBILITY, show != false);
-}
-
-int console_get_color_cap(int phone, int *ccap)
-{
-	ipcarg_t ccap_tmp;
-	int rc;
-
-	rc = async_req_0_1(phone, CONSOLE_GET_COLOR_CAP, &ccap_tmp);
-	*ccap = ccap_tmp;
-
-	return rc;
-}
-
-void console_kcon_enable(int phone)
-{
-	async_msg_0(phone, CONSOLE_KCON_ENABLE);
-}
-
-int console_get_pos(int phone, int *col, int *row)
-{
-	ipcarg_t col_v;
-	ipcarg_t row_v;
-	int rc;
-
-	rc = async_req_0_2(phone, CONSOLE_GET_POS, &col_v, &row_v);
-
-	*col = (int) col_v;
-	*row = (int) row_v;
-	return rc;
-}
-
-void console_goto(int phone, int col, int row)
-{
-	async_msg_2(phone, CONSOLE_GOTO, col, row);
-}
-
-bool console_get_event(int phone, console_event_t *event)
-{
-	ipcarg_t type;
-	ipcarg_t key;
-	ipcarg_t mods;
-	ipcarg_t c;
-	
-	int rc = async_req_0_4(phone, CONSOLE_GET_EVENT, &type, &key, &mods, &c);
-	if (rc < 0)
-		return false;
-	
-	event->type = type;
-	event->key = key;
-	event->mods = mods;
-	event->c = c;
-	
-	return true;
-}
-
-/** @}
- */
Index: pace/lib/libc/generic/io/io.c
===================================================================
--- uspace/lib/libc/generic/io/io.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,780 +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 libc
- * @{
- */
-/** @file
- */
-
-#include <stdio.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <assert.h>
-#include <string.h>
-#include <errno.h>
-#include <bool.h>
-#include <malloc.h>
-#include <io/klog.h>
-#include <vfs/vfs.h>
-#include <ipc/devmap.h>
-#include <adt/list.h>
-
-static void _ffillbuf(FILE *stream);
-static void _fflushbuf(FILE *stream);
-
-static FILE stdin_null = {
-	.fd = -1,
-	.error = true,
-	.eof = true,
-	.klog = false,
-	.phone = -1,
-	.btype = _IONBF,
-	.buf = NULL,
-	.buf_size = 0,
-	.buf_head = NULL,
-	.buf_tail = NULL,
-	.buf_state = _bs_empty
-};
-
-static FILE stdout_klog = {
-	.fd = -1,
-	.error = false,
-	.eof = false,
-	.klog = true,
-	.phone = -1,
-	.btype = _IOLBF,
-	.buf = NULL,
-	.buf_size = BUFSIZ,
-	.buf_head = NULL,
-	.buf_tail = NULL,
-	.buf_state = _bs_empty
-};
-
-static FILE stderr_klog = {
-	.fd = -1,
-	.error = false,
-	.eof = false,
-	.klog = true,
-	.phone = -1,
-	.btype = _IONBF,
-	.buf = NULL,
-	.buf_size = 0,
-	.buf_head = NULL,
-	.buf_tail = NULL,
-	.buf_state = _bs_empty
-};
-
-FILE *stdin = NULL;
-FILE *stdout = NULL;
-FILE *stderr = NULL;
-
-static LIST_INITIALIZE(files);
-
-void __stdio_init(int filc, fdi_node_t *filv[])
-{
-	if (filc > 0) {
-		stdin = fopen_node(filv[0], "r");
-	} else {
-		stdin = &stdin_null;
-		list_append(&stdin->link, &files);
-	}
-	
-	if (filc > 1) {
-		stdout = fopen_node(filv[1], "w");
-	} else {
-		stdout = &stdout_klog;
-		list_append(&stdout->link, &files);
-	}
-	
-	if (filc > 2) {
-		stderr = fopen_node(filv[2], "w");
-	} else {
-		stderr = &stderr_klog;
-		list_append(&stderr->link, &files);
-	}
-}
-
-void __stdio_done(void)
-{
-	link_t *link = files.next;
-	
-	while (link != &files) {
-		FILE *file = list_get_instance(link, FILE, link);
-		fclose(file);
-		link = files.next;
-	}
-}
-
-static bool parse_mode(const char *mode, int *flags)
-{
-	/* Parse mode except first character. */
-	const char *mp = mode;
-	if (*mp++ == 0) {
-		errno = EINVAL;
-		return false;
-	}
-	
-	if ((*mp == 'b') || (*mp == 't'))
-		mp++;
-	
-	bool plus;
-	if (*mp == '+') {
-		mp++;
-		plus = true;
-	} else
-		plus = false;
-	
-	if (*mp != 0) {
-		errno = EINVAL;
-		return false;
-	}
-	
-	/* Parse first character of mode and determine flags for open(). */
-	switch (mode[0]) {
-	case 'r':
-		*flags = plus ? O_RDWR : O_RDONLY;
-		break;
-	case 'w':
-		*flags = (O_TRUNC | O_CREAT) | (plus ? O_RDWR : O_WRONLY);
-		break;
-	case 'a':
-		/* TODO: a+ must read from beginning, append to the end. */
-		if (plus) {
-			errno = ENOTSUP;
-			return false;
-		}
-		*flags = (O_APPEND | O_CREAT) | (plus ? O_RDWR : O_WRONLY);
-	default:
-		errno = EINVAL;
-		return false;
-	}
-	
-	return true;
-}
-
-/** Set stream buffer. */
-void setvbuf(FILE *stream, void *buf, int mode, size_t size)
-{
-	stream->btype = mode;
-	stream->buf = buf;
-	stream->buf_size = size;
-	stream->buf_head = stream->buf;
-	stream->buf_tail = stream->buf;
-	stream->buf_state = _bs_empty;
-}
-
-static void _setvbuf(FILE *stream)
-{
-	/* FIXME: Use more complex rules for setting buffering options. */
-	
-	switch (stream->fd) {
-	case 1:
-		setvbuf(stream, NULL, _IOLBF, BUFSIZ);
-		break;
-	case 0:
-	case 2:
-		setvbuf(stream, NULL, _IONBF, 0);
-		break;
-	default:
-		setvbuf(stream, NULL, _IOFBF, BUFSIZ);
-	}
-}
-
-/** Allocate stream buffer. */
-static int _fallocbuf(FILE *stream)
-{
-	assert(stream->buf == NULL);
-	
-	stream->buf = malloc(stream->buf_size);
-	if (stream->buf == NULL) {
-		errno = ENOMEM;
-		return -1;
-	}
-	
-	stream->buf_head = stream->buf;
-	stream->buf_tail = stream->buf;
-	return 0;
-}
-
-/** Open a stream.
- *
- * @param path Path of the file to open.
- * @param mode Mode string, (r|w|a)[b|t][+].
- *
- */
-FILE *fopen(const char *path, const char *mode)
-{
-	int flags;
-	if (!parse_mode(mode, &flags))
-		return NULL;
-	
-	/* Open file. */
-	FILE *stream = malloc(sizeof(FILE));
-	if (stream == NULL) {
-		errno = ENOMEM;
-		return NULL;
-	}
-	
-	stream->fd = open(path, flags, 0666);
-	if (stream->fd < 0) {
-		/* errno was set by open() */
-		free(stream);
-		return NULL;
-	}
-	
-	stream->error = false;
-	stream->eof = false;
-	stream->klog = false;
-	stream->phone = -1;
-	stream->need_sync = false;
-	_setvbuf(stream);
-	
-	list_append(&stream->link, &files);
-	
-	return stream;
-}
-
-FILE *fdopen(int fd, const char *mode)
-{
-	/* Open file. */
-	FILE *stream = malloc(sizeof(FILE));
-	if (stream == NULL) {
-		errno = ENOMEM;
-		return NULL;
-	}
-	
-	stream->fd = fd;
-	stream->error = false;
-	stream->eof = false;
-	stream->klog = false;
-	stream->phone = -1;
-	stream->need_sync = false;
-	_setvbuf(stream);
-	
-	list_append(&stream->link, &files);
-	
-	return stream;
-}
-
-FILE *fopen_node(fdi_node_t *node, const char *mode)
-{
-	int flags;
-	if (!parse_mode(mode, &flags))
-		return NULL;
-	
-	/* Open file. */
-	FILE *stream = malloc(sizeof(FILE));
-	if (stream == NULL) {
-		errno = ENOMEM;
-		return NULL;
-	}
-	
-	stream->fd = open_node(node, flags);
-	if (stream->fd < 0) {
-		/* errno was set by open_node() */
-		free(stream);
-		return NULL;
-	}
-	
-	stream->error = false;
-	stream->eof = false;
-	stream->klog = false;
-	stream->phone = -1;
-	stream->need_sync = false;
-	_setvbuf(stream);
-	
-	list_append(&stream->link, &files);
-	
-	return stream;
-}
-
-int fclose(FILE *stream)
-{
-	int rc = 0;
-	
-	fflush(stream);
-	
-	if (stream->phone >= 0)
-		ipc_hangup(stream->phone);
-	
-	if (stream->fd >= 0)
-		rc = close(stream->fd);
-	
-	list_remove(&stream->link);
-	
-	if ((stream != &stdin_null)
-	    && (stream != &stdout_klog)
-	    && (stream != &stderr_klog))
-		free(stream);
-	
-	stream = NULL;
-	
-	if (rc != 0) {
-		/* errno was set by close() */
-		return EOF;
-	}
-	
-	return 0;
-}
-
-/** Read from a stream (unbuffered).
- *
- * @param buf    Destination buffer.
- * @param size   Size of each record.
- * @param nmemb  Number of records to read.
- * @param stream Pointer to the stream.
- */
-static size_t _fread(void *buf, size_t size, size_t nmemb, FILE *stream)
-{
-	size_t left, done;
-
-	if (size == 0 || nmemb == 0)
-		return 0;
-
-	left = size * nmemb;
-	done = 0;
-	
-	while ((left > 0) && (!stream->error) && (!stream->eof)) {
-		ssize_t rd = read(stream->fd, buf + done, left);
-		
-		if (rd < 0)
-			stream->error = true;
-		else if (rd == 0)
-			stream->eof = true;
-		else {
-			left -= rd;
-			done += rd;
-		}
-	}
-	
-	return (done / size);
-}
-
-/** Write to a stream (unbuffered).
- *
- * @param buf    Source buffer.
- * @param size   Size of each record.
- * @param nmemb  Number of records to write.
- * @param stream Pointer to the stream.
- */
-static size_t _fwrite(const void *buf, size_t size, size_t nmemb, FILE *stream)
-{
-	size_t left;
-	size_t done;
-
-	if (size == 0 || nmemb == 0)
-		return 0;
-
-	left = size * nmemb;
-	done = 0;
-
-	while ((left > 0) && (!stream->error)) {
-		ssize_t wr;
-		
-		if (stream->klog)
-			wr = klog_write(buf + done, left);
-		else
-			wr = write(stream->fd, buf + done, left);
-		
-		if (wr <= 0)
-			stream->error = true;
-		else {
-			left -= wr;
-			done += wr;
-		}
-	}
-
-	if (done > 0)
-		stream->need_sync = true;
-	
-	return (done / size);
-}
-
-/** Read some data in stream buffer. */
-static void _ffillbuf(FILE *stream)
-{
-	ssize_t rc;
-
-	stream->buf_head = stream->buf_tail = stream->buf;
-
-	rc = read(stream->fd, stream->buf, stream->buf_size);
-	if (rc < 0) {
-		stream->error = true;
-		return;
-	}
-
-	if (rc == 0) {
-		stream->eof = true;
-		return;
-	}
-
-	stream->buf_head += rc;
-	stream->buf_state = _bs_read;
-}
-
-/** Write out stream buffer, do not sync stream. */
-static void _fflushbuf(FILE *stream)
-{
-	size_t bytes_used;
-
-	if ((!stream->buf) || (stream->btype == _IONBF) || (stream->error))
-		return;
-
-	bytes_used = stream->buf_head - stream->buf_tail;
-	if (bytes_used == 0)
-		return;
-
-	/* If buffer has prefetched read data, we need to seek back. */
-	if (stream->buf_state == _bs_read)
-		lseek(stream->fd, - (ssize_t) bytes_used, SEEK_CUR);
-
-	/* If buffer has unwritten data, we need to write them out. */
-	if (stream->buf_state == _bs_write)
-		(void) _fwrite(stream->buf_tail, 1, bytes_used, stream);
-
-	stream->buf_head = stream->buf;
-	stream->buf_tail = stream->buf;
-	stream->buf_state = _bs_empty;
-}
-
-/** Read from a stream.
- *
- * @param dest   Destination buffer.
- * @param size   Size of each record.
- * @param nmemb  Number of records to read.
- * @param stream Pointer to the stream.
- *
- */
-size_t fread(void *dest, size_t size, size_t nmemb, FILE *stream)
-{
-	uint8_t *dp;
-	size_t bytes_left;
-	size_t now;
-	size_t data_avail;
-	size_t total_read;
-	size_t i;
-
-	if (size == 0 || nmemb == 0)
-		return 0;
-
-	/* If not buffered stream, read in directly. */
-	if (stream->btype == _IONBF) {
-		now = _fread(dest, size, nmemb, stream);
-		return now;
-	}
-
-	/* Make sure no data is pending write. */
-	if (stream->buf_state == _bs_write)
-		_fflushbuf(stream);
-
-	/* Perform lazy allocation of stream buffer. */
-	if (stream->buf == NULL) {
-		if (_fallocbuf(stream) != 0)
-			return 0; /* Errno set by _fallocbuf(). */
-	}
-
-	bytes_left = size * nmemb;
-	total_read = 0;
-	dp = (uint8_t *) dest;
-
-	while ((!stream->error) && (!stream->eof) && (bytes_left > 0)) {
-		if (stream->buf_head == stream->buf_tail)
-			_ffillbuf(stream);
-
-		if (stream->error || stream->eof)
-			break;
-
-		data_avail = stream->buf_head - stream->buf_tail;
-
-		if (bytes_left > data_avail)
-			now = data_avail;
-		else
-			now = bytes_left;
-
-		for (i = 0; i < now; i++) {
-			dp[i] = stream->buf_tail[i];
-		}
-
-		dp += now;
-		stream->buf_tail += now;
-		bytes_left -= now;
-		total_read += now;
-	}
-
-	return (total_read / size);
-}
-
-
-/** Write to a stream.
- *
- * @param buf    Source buffer.
- * @param size   Size of each record.
- * @param nmemb  Number of records to write.
- * @param stream Pointer to the stream.
- *
- */
-size_t fwrite(const void *buf, size_t size, size_t nmemb, FILE *stream)
-{
-	uint8_t *data;
-	size_t bytes_left;
-	size_t now;
-	size_t buf_free;
-	size_t total_written;
-	size_t i;
-	uint8_t b;
-	bool need_flush;
-
-	if (size == 0 || nmemb == 0)
-		return 0;
-
-	/* If not buffered stream, write out directly. */
-	if (stream->btype == _IONBF) {
-		now = _fwrite(buf, size, nmemb, stream);
-		fflush(stream);
-		return now;
-	}
-
-	/* Make sure buffer contains no prefetched data. */
-	if (stream->buf_state == _bs_read)
-		_fflushbuf(stream);
-
-
-	/* Perform lazy allocation of stream buffer. */
-	if (stream->buf == NULL) {
-		if (_fallocbuf(stream) != 0)
-			return 0; /* Errno set by _fallocbuf(). */
-	}
-	
-	data = (uint8_t *) buf;
-	bytes_left = size * nmemb;
-	total_written = 0;
-	need_flush = false;
-	
-	while ((!stream->error) && (bytes_left > 0)) {
-		buf_free = stream->buf_size - (stream->buf_head - stream->buf);
-		if (bytes_left > buf_free)
-			now = buf_free;
-		else
-			now = bytes_left;
-		
-		for (i = 0; i < now; i++) {
-			b = data[i];
-			stream->buf_head[i] = b;
-			
-			if ((b == '\n') && (stream->btype == _IOLBF))
-				need_flush = true;
-		}
-		
-		buf += now;
-		stream->buf_head += now;
-		buf_free -= now;
-		bytes_left -= now;
-		total_written += now;
-		
-		if (buf_free == 0) {
-			/* Only need to drain buffer. */
-			_fflushbuf(stream);
-			need_flush = false;
-		}
-	}
-	
-	if (total_written > 0)
-		stream->buf_state = _bs_write;
-
-	if (need_flush)
-		fflush(stream);
-	
-	return (total_written / size);
-}
-
-int fputc(wchar_t c, FILE *stream)
-{
-	char buf[STR_BOUNDS(1)];
-	size_t sz = 0;
-	
-	if (chr_encode(c, buf, &sz, STR_BOUNDS(1)) == EOK) {
-		size_t wr = fwrite(buf, 1, sz, stream);
-		
-		if (wr < sz)
-			return EOF;
-		
-		return (int) c;
-	}
-	
-	return EOF;
-}
-
-int putchar(wchar_t c)
-{
-	return fputc(c, stdout);
-}
-
-int fputs(const char *str, FILE *stream)
-{
-	return fwrite(str, str_size(str), 1, stream);
-}
-
-int puts(const char *str)
-{
-	return fputs(str, stdout);
-}
-
-int fgetc(FILE *stream)
-{
-	char c;
-	
-	/* This could be made faster by only flushing when needed. */
-	if (stdout)
-		fflush(stdout);
-	if (stderr)
-		fflush(stderr);
-	
-	if (fread(&c, sizeof(char), 1, stream) < sizeof(char))
-		return EOF;
-	
-	return (int) c;
-}
-
-char *fgets(char *str, int size, FILE *stream)
-{
-	int c;
-	int idx;
-
-	idx = 0;
-	while (idx < size - 1) {
-		c = fgetc(stream);
-		if (c == EOF)
-			break;
-
-		str[idx++] = c;
-
-		if (c == '\n')
-			break;
-	}
-
-	if (ferror(stream))
-		return NULL;
-
-	if (idx == 0)
-		return NULL;
-
-	str[idx] = '\0';
-	return str;
-}
-
-int getchar(void)
-{
-	return fgetc(stdin);
-}
-
-int fseek(FILE *stream, off64_t offset, int whence)
-{
-	off64_t rc;
-
-	_fflushbuf(stream);
-
-	rc = lseek(stream->fd, offset, whence);
-	if (rc == (off64_t) (-1)) {
-		/* errno has been set by lseek64. */
-		return -1;
-	}
-
-	stream->eof = false;
-	return 0;
-}
-
-off64_t ftell(FILE *stream)
-{
-	return lseek(stream->fd, 0, SEEK_CUR);
-}
-
-void rewind(FILE *stream)
-{
-	(void) fseek(stream, 0, SEEK_SET);
-}
-
-int fflush(FILE *stream)
-{
-	_fflushbuf(stream);
-	
-	if (stream->klog) {
-		klog_update();
-		return EOK;
-	}
-	
-	if (stream->fd >= 0 && stream->need_sync) {
-		/**
-		 * Better than syncing always, but probably still not the
-		 * right thing to do.
-		 */
-		stream->need_sync = false;
-		return fsync(stream->fd);
-	}
-	
-	return ENOENT;
-}
-
-int feof(FILE *stream)
-{
-	return stream->eof;
-}
-
-int ferror(FILE *stream)
-{
-	return stream->error;
-}
-
-void clearerr(FILE *stream)
-{
-	stream->eof = false;
-	stream->error = false;
-}
-
-int fphone(FILE *stream)
-{
-	if (stream->fd >= 0) {
-		if (stream->phone < 0)
-			stream->phone = fd_phone(stream->fd);
-		
-		return stream->phone;
-	}
-	
-	return -1;
-}
-
-int fnode(FILE *stream, fdi_node_t *node)
-{
-	if (stream->fd >= 0)
-		return fd_node(stream->fd, node);
-	
-	return ENOENT;
-}
-
-/** @}
- */
Index: pace/lib/libc/generic/io/klog.c
===================================================================
--- uspace/lib/libc/generic/io/klog.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,58 +1,0 @@
-/*
- * Copyright (c) 2006 Josef Cejka
- * Copyright (c) 2006 Jakub Vana
- * 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 libc
- * @{
- */
-/** @file
- */
-
-#include <libc.h>
-#include <string.h>
-#include <sys/types.h>
-#include <unistd.h>
-#include <io/klog.h>
-
-size_t klog_write(const void *buf, size_t size)
-{
-	ssize_t ret = (ssize_t) __SYSCALL3(SYS_KLOG, 1, (sysarg_t) buf, size);
-	
-	if (ret >= 0)
-		return (size_t) ret;
-	
-	return 0;
-}
-
-void klog_update(void)
-{
-	(void) __SYSCALL3(SYS_KLOG, 1, NULL, 0);
-}
-
-/** @}
- */
Index: pace/lib/libc/generic/io/printf.c
===================================================================
--- uspace/lib/libc/generic/io/printf.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,78 +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 libc
- * @{
- */
-/** @file
- */
-
-#include <io/printf_core.h>
-#include <stdio.h>
-
-/** Print formatted text.
- *
- * @param stream Output stream
- * @param fmt    Format string
- *
- * \see For more details about format string see printf_core.
- *
- */
-int fprintf(FILE *stream, const char *fmt, ...)
-{
-	va_list args;
-	va_start(args, fmt);
-	
-	int ret = vfprintf(stream, fmt, args);
-	
-	va_end(args);
-	
-	return ret;
-}
-
-/** Print formatted text to stdout.
- *
- * @param fmt Format string
- *
- * \see For more details about format string see printf_core.
- *
- */
-int printf(const char *fmt, ...)
-{
-	va_list args;
-	va_start(args, fmt);
-	
-	int ret = vprintf(fmt, args);
-	
-	va_end(args);
-	
-	return ret;
-}
-
-/** @}
- */
Index: pace/lib/libc/generic/io/printf_core.c
===================================================================
--- uspace/lib/libc/generic/io/printf_core.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,891 +1,0 @@
-/*
- * Copyright (c) 2001-2004 Jakub Jermar
- * Copyright (c) 2006 Josef Cejka
- * Copyright (c) 2009 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 generic
- * @{
- */
-/**
- * @file
- * @brief Printing functions.
- */
-
-#include <unistd.h>
-#include <stdio.h>
-#include <io/printf_core.h>
-#include <ctype.h>
-#include <string.h>
-
-/** show prefixes 0x or 0 */
-#define __PRINTF_FLAG_PREFIX       0x00000001
-/** signed / unsigned number */
-#define __PRINTF_FLAG_SIGNED       0x00000002
-/** print leading zeroes */
-#define __PRINTF_FLAG_ZEROPADDED   0x00000004
-/** align to left */
-#define __PRINTF_FLAG_LEFTALIGNED  0x00000010
-/** always show + sign */
-#define __PRINTF_FLAG_SHOWPLUS     0x00000020
-/** print space instead of plus */
-#define __PRINTF_FLAG_SPACESIGN    0x00000040
-/** show big characters */
-#define __PRINTF_FLAG_BIGCHARS     0x00000080
-/** number has - sign */
-#define __PRINTF_FLAG_NEGATIVE     0x00000100
-
-/**
- * Buffer big enough for 64-bit number printed in base 2, sign, prefix and 0
- * to terminate string... (last one is only for better testing end of buffer by
- * zero-filling subroutine)
- */
-#define PRINT_NUMBER_BUFFER_SIZE  (64 + 5)
-
-/** Enumeration of possible arguments types.
- */
-typedef enum {
-	PrintfQualifierByte = 0,
-	PrintfQualifierShort,
-	PrintfQualifierInt,
-	PrintfQualifierLong,
-	PrintfQualifierLongLong,
-	PrintfQualifierPointer
-} qualifier_t;
-
-static char nullstr[] = "(NULL)";
-static char digits_small[] = "0123456789abcdef";
-static char digits_big[] = "0123456789ABCDEF";
-static char invalch = U_SPECIAL;
-
-/** Print one or more characters without adding newline.
- *
- * @param buf  Buffer holding characters with size of
- *             at least size bytes. NULL is not allowed!
- * @param size Size of the buffer in bytes.
- * @param ps   Output method and its data.
- *
- * @return Number of characters printed.
- *
- */
-static int printf_putnchars(const char *buf, size_t size,
-    printf_spec_t *ps)
-{
-	return ps->str_write((void *) buf, size, ps->data);
-}
-
-/** Print one or more wide characters without adding newline.
- *
- * @param buf  Buffer holding wide characters with size of
- *             at least size bytes. NULL is not allowed!
- * @param size Size of the buffer in bytes.
- * @param ps   Output method and its data.
- *
- * @return Number of wide characters printed.
- *
- */
-static int printf_wputnchars(const wchar_t *buf, size_t size,
-    printf_spec_t *ps)
-{
-	return ps->wstr_write((void *) buf, size, ps->data);
-}
-
-/** Print string without adding a newline.
- *
- * @param str String to print.
- * @param ps  Write function specification and support data.
- *
- * @return Number of characters printed.
- *
- */
-static int printf_putstr(const char *str, printf_spec_t *ps)
-{
-	if (str == NULL)
-		return printf_putnchars(nullstr, str_size(nullstr), ps);
-	
-	return ps->str_write((void *) str, str_size(str), ps->data);
-}
-
-/** Print one ASCII character.
- *
- * @param c  ASCII character to be printed.
- * @param ps Output method.
- *
- * @return Number of characters printed.
- *
- */
-static int printf_putchar(const char ch, printf_spec_t *ps)
-{
-	if (!ascii_check(ch))
-		return ps->str_write((void *) &invalch, 1, ps->data);
-	
-	return ps->str_write(&ch, 1, ps->data);
-}
-
-/** Print one wide character.
- *
- * @param c  Wide character to be printed.
- * @param ps Output method.
- *
- * @return Number of characters printed.
- *
- */
-static int printf_putwchar(const wchar_t ch, printf_spec_t *ps)
-{
-	if (!chr_check(ch))
-		return ps->str_write((void *) &invalch, 1, ps->data);
-	
-	return ps->wstr_write(&ch, sizeof(wchar_t), ps->data);
-}
-
-/** Print one formatted ASCII character.
- *
- * @param ch    Character to print.
- * @param width Width modifier.
- * @param flags Flags that change the way the character is printed.
- *
- * @return Number of characters printed, negative value on failure.
- *
- */
-static int print_char(const char ch, int width, uint32_t flags, printf_spec_t *ps)
-{
-	size_t counter = 0;
-	if (!(flags & __PRINTF_FLAG_LEFTALIGNED)) {
-		while (--width > 0) {
-			/*
-			 * One space is consumed by the character itself, hence
-			 * the predecrement.
-			 */
-			if (printf_putchar(' ', ps) > 0)
-				counter++;
-		}
-	}
-	
-	if (printf_putchar(ch, ps) > 0)
-		counter++;
-	
-	while (--width > 0) {
-		/*
-		 * One space is consumed by the character itself, hence
-		 * the predecrement.
-		 */
-		if (printf_putchar(' ', ps) > 0)
-			counter++;
-	}
-	
-	return (int) (counter + 1);
-}
-
-/** Print one formatted wide character.
- *
- * @param ch    Character to print.
- * @param width Width modifier.
- * @param flags Flags that change the way the character is printed.
- *
- * @return Number of characters printed, negative value on failure.
- *
- */
-static int print_wchar(const wchar_t ch, int width, uint32_t flags, printf_spec_t *ps)
-{
-	size_t counter = 0;
-	if (!(flags & __PRINTF_FLAG_LEFTALIGNED)) {
-		while (--width > 0) {
-			/*
-			 * One space is consumed by the character itself, hence
-			 * the predecrement.
-			 */
-			if (printf_putchar(' ', ps) > 0)
-				counter++;
-		}
-	}
-	
-	if (printf_putwchar(ch, ps) > 0)
-		counter++;
-	
-	while (--width > 0) {
-		/*
-		 * One space is consumed by the character itself, hence
-		 * the predecrement.
-		 */
-		if (printf_putchar(' ', ps) > 0)
-			counter++;
-	}
-	
-	return (int) (counter + 1);
-}
-
-/** Print string.
- *
- * @param str       String to be printed.
- * @param width     Width modifier.
- * @param precision Precision modifier.
- * @param flags     Flags that modify the way the string is printed.
- *
- * @return Number of characters printed, negative value on failure.
- */
-static int print_str(char *str, int width, unsigned int precision,
-    uint32_t flags, printf_spec_t *ps)
-{
-	if (str == NULL)
-		return printf_putstr(nullstr, ps);
-
-	/* Print leading spaces. */
-	size_t strw = str_length(str);
-	if (precision == 0)
-		precision = strw;
-
-	/* Left padding */
-	size_t counter = 0;
-	width -= precision;
-	if (!(flags & __PRINTF_FLAG_LEFTALIGNED)) {
-		while (width-- > 0) {
-			if (printf_putchar(' ', ps) == 1)
-				counter++;
-		}
-	}
-
-	/* Part of @a str fitting into the alloted space. */
-	int retval;
-	size_t size = str_lsize(str, precision);
-	if ((retval = printf_putnchars(str, size, ps)) < 0)
-		return -counter;
-
-	counter += retval;
-
-	/* Right padding */
-	while (width-- > 0) {
-		if (printf_putchar(' ', ps) == 1)
-			counter++;
-	}
-
-	return ((int) counter);
-
-}
-
-/** Print wide string.
- *
- * @param str       Wide string to be printed.
- * @param width     Width modifier.
- * @param precision Precision modifier.
- * @param flags     Flags that modify the way the string is printed.
- *
- * @return Number of wide characters printed, negative value on failure.
- */
-static int print_wstr(wchar_t *str, int width, unsigned int precision,
-    uint32_t flags, printf_spec_t *ps)
-{
-	if (str == NULL)
-		return printf_putstr(nullstr, ps);
-	
-	/* Print leading spaces. */
-	size_t strw = wstr_length(str);
-	if (precision == 0)
-		precision = strw;
-	
-	/* Left padding */
-	size_t counter = 0;
-	width -= precision;
-	if (!(flags & __PRINTF_FLAG_LEFTALIGNED)) {
-		while (width-- > 0) {
-			if (printf_putchar(' ', ps) == 1)
-				counter++;
-		}
-	}
-	
-	/* Part of @a wstr fitting into the alloted space. */
-	int retval;
-	size_t size = wstr_lsize(str, precision);
-	if ((retval = printf_wputnchars(str, size, ps)) < 0)
-		return -counter;
-	
-	counter += retval;
-	
-	/* Right padding */
-	while (width-- > 0) {
-		if (printf_putchar(' ', ps) == 1)
-			counter++;
-	}
-
-	return ((int) counter);
-}
-
-/** Print a number in a given base.
- *
- * Print significant digits of a number in given base.
- *
- * @param num       Number to print.
- * @param width     Width modifier.
- * @param precision Precision modifier.
- * @param base      Base to print the number in (must be between 2 and 16).
- * @param flags     Flags that modify the way the number is printed.
- *
- * @return Number of characters printed.
- *
- */
-static int print_number(uint64_t num, int width, int precision, int base,
-    uint32_t flags, printf_spec_t *ps)
-{
-	char *digits;
-	if (flags & __PRINTF_FLAG_BIGCHARS)
-		digits = digits_big;
-	else
-		digits = digits_small;
-	
-	char data[PRINT_NUMBER_BUFFER_SIZE];
-	char *ptr = &data[PRINT_NUMBER_BUFFER_SIZE - 1];
-	
-	/* Size of number with all prefixes and signs */
-	int size = 0;
-	
-	/* Put zero at end of string */
-	*ptr-- = 0;
-	
-	if (num == 0) {
-		*ptr-- = '0';
-		size++;
-	} else {
-		do {
-			*ptr-- = digits[num % base];
-			size++;
-		} while (num /= base);
-	}
-	
-	/* Size of plain number */
-	int number_size = size;
-	
-	/*
-	 * Collect the sum of all prefixes/signs/etc. to calculate padding and
-	 * leading zeroes.
-	 */
-	if (flags & __PRINTF_FLAG_PREFIX) {
-		switch(base) {
-		case 2:
-			/* Binary formating is not standard, but usefull */
-			size += 2;
-			break;
-		case 8:
-			size++;
-			break;
-		case 16:
-			size += 2;
-			break;
-		}
-	}
-	
-	char sgn = 0;
-	if (flags & __PRINTF_FLAG_SIGNED) {
-		if (flags & __PRINTF_FLAG_NEGATIVE) {
-			sgn = '-';
-			size++;
-		} else if (flags & __PRINTF_FLAG_SHOWPLUS) {
-			sgn = '+';
-			size++;
-		} else if (flags & __PRINTF_FLAG_SPACESIGN) {
-			sgn = ' ';
-			size++;
-		}
-	}
-	
-	if (flags & __PRINTF_FLAG_LEFTALIGNED)
-		flags &= ~__PRINTF_FLAG_ZEROPADDED;
-	
-	/*
-	 * If the number is left-aligned or precision is specified then
-	 * padding with zeros is ignored.
-	 */
-	if (flags & __PRINTF_FLAG_ZEROPADDED) {
-		if ((precision == 0) && (width > size))
-			precision = width - size + number_size;
-	}
-	
-	/* Print leading spaces */
-	if (number_size > precision) {
-		/* Print the whole number, not only a part */
-		precision = number_size;
-	}
-	
-	width -= precision + size - number_size;
-	size_t counter = 0;
-	
-	if (!(flags & __PRINTF_FLAG_LEFTALIGNED)) {
-		while (width-- > 0) {
-			if (printf_putchar(' ', ps) == 1)
-				counter++;
-		}
-	}
-	
-	/* Print sign */
-	if (sgn) {
-		if (printf_putchar(sgn, ps) == 1)
-			counter++;
-	}
-	
-	/* Print prefix */
-	if (flags & __PRINTF_FLAG_PREFIX) {
-		switch(base) {
-		case 2:
-			/* Binary formating is not standard, but usefull */
-			if (printf_putchar('0', ps) == 1)
-				counter++;
-			if (flags & __PRINTF_FLAG_BIGCHARS) {
-				if (printf_putchar('B', ps) == 1)
-					counter++;
-			} else {
-				if (printf_putchar('b', ps) == 1)
-					counter++;
-			}
-			break;
-		case 8:
-			if (printf_putchar('o', ps) == 1)
-				counter++;
-			break;
-		case 16:
-			if (printf_putchar('0', ps) == 1)
-				counter++;
-			if (flags & __PRINTF_FLAG_BIGCHARS) {
-				if (printf_putchar('X', ps) == 1)
-					counter++;
-			} else {
-				if (printf_putchar('x', ps) == 1)
-					counter++;
-			}
-			break;
-		}
-	}
-	
-	/* Print leading zeroes */
-	precision -= number_size;
-	while (precision-- > 0) {
-		if (printf_putchar('0', ps) == 1)
-			counter++;
-	}
-	
-	/* Print the number itself */
-	int retval;
-	if ((retval = printf_putstr(++ptr, ps)) > 0)
-		counter += retval;
-	
-	/* Print trailing spaces */
-	
-	while (width-- > 0) {
-		if (printf_putchar(' ', ps) == 1)
-			counter++;
-	}
-	
-	return ((int) counter);
-}
-
-/** Print formatted string.
- *
- * Print string formatted according to the fmt parameter and variadic arguments.
- * Each formatting directive must have the following form:
- *
- *  \% [ FLAGS ] [ WIDTH ] [ .PRECISION ] [ TYPE ] CONVERSION
- *
- * FLAGS:@n
- *  - "#" Force to print prefix. For \%o conversion, the prefix is 0, for
- *        \%x and \%X prefixes are 0x and 0X and for conversion \%b the
- *        prefix is 0b.
- *
- *  - "-" Align to left.
- *
- *  - "+" Print positive sign just as negative.
- *
- *  - " " If the printed number is positive and "+" flag is not set,
- *        print space in place of sign.
- *
- *  - "0" Print 0 as padding instead of spaces. Zeroes are placed between
- *        sign and the rest of the number. This flag is ignored if "-"
- *        flag is specified.
- *
- * WIDTH:@n
- *  - Specify the minimal width of a printed argument. If it is bigger,
- *    width is ignored. If width is specified with a "*" character instead of
- *    number, width is taken from parameter list. And integer parameter is
- *    expected before parameter for processed conversion specification. If
- *    this value is negative its absolute value is taken and the "-" flag is
- *    set.
- *
- * PRECISION:@n
- *  - Value precision. For numbers it specifies minimum valid numbers.
- *    Smaller numbers are printed with leading zeroes. Bigger numbers are not
- *    affected. Strings with more than precision characters are cut off. Just
- *    as with width, an "*" can be used used instead of a number. An integer
- *    value is then expected in parameters. When both width and precision are
- *    specified using "*", the first parameter is used for width and the
- *    second one for precision.
- *
- * TYPE:@n
- *  - "hh" Signed or unsigned char.@n
- *  - "h"  Signed or unsigned short.@n
- *  - ""   Signed or unsigned int (default value).@n
- *  - "l"  Signed or unsigned long int.@n
- *         If conversion is "c", the character is wchar_t (wide character).@n
- *         If conversion is "s", the string is wchar_t * (wide string).@n
- *  - "ll" Signed or unsigned long long int.@n
- *
- * CONVERSION:@n
- *  - % Print percentile character itself.
- *
- *  - c Print single character. The character is expected to be plain
- *      ASCII (e.g. only values 0 .. 127 are valid).@n
- *      If type is "l", then the character is expected to be wide character
- *      (e.g. values 0 .. 0x10ffff are valid).
- *
- *  - s Print zero terminated string. If a NULL value is passed as
- *      value, "(NULL)" is printed instead.@n
- *      If type is "l", then the string is expected to be wide string.
- *
- *  - P, p Print value of a pointer. Void * value is expected and it is
- *         printed in hexadecimal notation with prefix (as with \%#X / \%#x
- *         for 32-bit or \%#X / \%#x for 64-bit long pointers).
- *
- *  - b Print value as unsigned binary number. Prefix is not printed by
- *      default. (Nonstandard extension.)
- *
- *  - o Print value as unsigned octal number. Prefix is not printed by
- *      default.
- *
- *  - d, i Print signed decimal number. There is no difference between d
- *         and i conversion.
- *
- *  - u Print unsigned decimal number.
- *
- *  - X, x Print hexadecimal number with upper- or lower-case. Prefix is
- *         not printed by default.
- *
- * All other characters from fmt except the formatting directives are printed
- * verbatim.
- *
- * @param fmt Format NULL-terminated string.
- *
- * @return Number of characters printed, negative value on failure.
- *
- */
-int printf_core(const char *fmt, printf_spec_t *ps, va_list ap)
-{
-	size_t i;        /* Index of the currently processed character from fmt */
-	size_t nxt = 0;  /* Index of the next character from fmt */
-	size_t j = 0;    /* Index to the first not printed nonformating character */
-	
-	size_t counter = 0;   /* Number of characters printed */
-	int retval;           /* Return values from nested functions */
-	
-	while (true) {
-		i = nxt;
-		wchar_t uc = str_decode(fmt, &nxt, STR_NO_LIMIT);
-		
-		if (uc == 0)
-			break;
-		
-		/* Control character */
-		if (uc == '%') {
-			/* Print common characters if any processed */
-			if (i > j) {
-				if ((retval = printf_putnchars(&fmt[j], i - j, ps)) < 0) {
-					/* Error */
-					counter = -counter;
-					goto out;
-				}
-				counter += retval;
-			}
-			
-			j = i;
-			
-			/* Parse modifiers */
-			uint32_t flags = 0;
-			bool end = false;
-			
-			do {
-				i = nxt;
-				uc = str_decode(fmt, &nxt, STR_NO_LIMIT);
-				switch (uc) {
-				case '#':
-					flags |= __PRINTF_FLAG_PREFIX;
-					break;
-				case '-':
-					flags |= __PRINTF_FLAG_LEFTALIGNED;
-					break;
-				case '+':
-					flags |= __PRINTF_FLAG_SHOWPLUS;
-					break;
-				case ' ':
-					flags |= __PRINTF_FLAG_SPACESIGN;
-					break;
-				case '0':
-					flags |= __PRINTF_FLAG_ZEROPADDED;
-					break;
-				default:
-					end = true;
-				};
-			} while (!end);
-			
-			/* Width & '*' operator */
-			int width = 0;
-			if (isdigit(uc)) {
-				while (true) {
-					width *= 10;
-					width += uc - '0';
-					
-					i = nxt;
-					uc = str_decode(fmt, &nxt, STR_NO_LIMIT);
-					if (uc == 0)
-						break;
-					if (!isdigit(uc))
-						break;
-				}
-			} else if (uc == '*') {
-				/* Get width value from argument list */
-				i = nxt;
-				uc = str_decode(fmt, &nxt, STR_NO_LIMIT);
-				width = (int) va_arg(ap, int);
-				if (width < 0) {
-					/* Negative width sets '-' flag */
-					width *= -1;
-					flags |= __PRINTF_FLAG_LEFTALIGNED;
-				}
-			}
-			
-			/* Precision and '*' operator */
-			int precision = 0;
-			if (uc == '.') {
-				i = nxt;
-				uc = str_decode(fmt, &nxt, STR_NO_LIMIT);
-				if (isdigit(uc)) {
-					while (true) {
-						precision *= 10;
-						precision += uc - '0';
-						
-						i = nxt;
-						uc = str_decode(fmt, &nxt, STR_NO_LIMIT);
-						if (uc == 0)
-							break;
-						if (!isdigit(uc))
-							break;
-					}
-				} else if (uc == '*') {
-					/* Get precision value from the argument list */
-					i = nxt;
-					uc = str_decode(fmt, &nxt, STR_NO_LIMIT);
-					precision = (int) va_arg(ap, int);
-					if (precision < 0) {
-						/* Ignore negative precision */
-						precision = 0;
-					}
-				}
-			}
-			
-			qualifier_t qualifier;
-			
-			switch (uc) {
-			/** @todo Unimplemented qualifiers:
-			 *        t ptrdiff_t - ISO C 99
-			 */
-			case 'h':
-				/* Char or short */
-				qualifier = PrintfQualifierShort;
-				i = nxt;
-				uc = str_decode(fmt, &nxt, STR_NO_LIMIT);
-				if (uc == 'h') {
-					i = nxt;
-					uc = str_decode(fmt, &nxt, STR_NO_LIMIT);
-					qualifier = PrintfQualifierByte;
-				}
-				break;
-			case 'l':
-				/* Long or long long */
-				qualifier = PrintfQualifierLong;
-				i = nxt;
-				uc = str_decode(fmt, &nxt, STR_NO_LIMIT);
-				if (uc == 'l') {
-					i = nxt;
-					uc = str_decode(fmt, &nxt, STR_NO_LIMIT);
-					qualifier = PrintfQualifierLongLong;
-				}
-				break;
-			default:
-				/* Default type */
-				qualifier = PrintfQualifierInt;
-			}
-			
-			unsigned int base = 10;
-			
-			switch (uc) {
-			/*
-			 * String and character conversions.
-			 */
-			case 's':
-				if (qualifier == PrintfQualifierLong)
-					retval = print_wstr(va_arg(ap, wchar_t *), width, precision, flags, ps);
-				else
-					retval = print_str(va_arg(ap, char *), width, precision, flags, ps);
-				
-				if (retval < 0) {
-					counter = -counter;
-					goto out;
-				}
-				
-				counter += retval;
-				j = nxt;
-				goto next_char;
-			case 'c':
-				if (qualifier == PrintfQualifierLong)
-					retval = print_wchar(va_arg(ap, wchar_t), width, flags, ps);
-				else
-					retval = print_char(va_arg(ap, unsigned int), width, flags, ps);
-				
-				if (retval < 0) {
-					counter = -counter;
-					goto out;
-				};
-				
-				counter += retval;
-				j = nxt;
-				goto next_char;
-			
-			/*
-			 * Integer values
-			 */
-			case 'P':
-				/* Pointer */
-				flags |= __PRINTF_FLAG_BIGCHARS;
-			case 'p':
-				flags |= __PRINTF_FLAG_PREFIX;
-				base = 16;
-				qualifier = PrintfQualifierPointer;
-				break;
-			case 'b':
-				base = 2;
-				break;
-			case 'o':
-				base = 8;
-				break;
-			case 'd':
-			case 'i':
-				flags |= __PRINTF_FLAG_SIGNED;
-			case 'u':
-				break;
-			case 'X':
-				flags |= __PRINTF_FLAG_BIGCHARS;
-			case 'x':
-				base = 16;
-				break;
-			
-			/* Percentile itself */
-			case '%':
-				j = i;
-				goto next_char;
-			
-			/*
-			 * Bad formatting.
-			 */
-			default:
-				/*
-				 * Unknown format. Now, j is the index of '%'
-				 * so we will print whole bad format sequence.
-				 */
-				goto next_char;
-			}
-			
-			/* Print integers */
-			size_t size;
-			uint64_t number;
-			switch (qualifier) {
-			case PrintfQualifierByte:
-				size = sizeof(unsigned char);
-				number = (uint64_t) va_arg(ap, unsigned int);
-				break;
-			case PrintfQualifierShort:
-				size = sizeof(unsigned short);
-				number = (uint64_t) va_arg(ap, unsigned int);
-				break;
-			case PrintfQualifierInt:
-				size = sizeof(unsigned int);
-				number = (uint64_t) va_arg(ap, unsigned int);
-				break;
-			case PrintfQualifierLong:
-				size = sizeof(unsigned long);
-				number = (uint64_t) va_arg(ap, unsigned long);
-				break;
-			case PrintfQualifierLongLong:
-				size = sizeof(unsigned long long);
-				number = (uint64_t) va_arg(ap, unsigned long long);
-				break;
-			case PrintfQualifierPointer:
-				size = sizeof(void *);
-				number = (uint64_t) (unsigned long) va_arg(ap, void *);
-				break;
-			default:
-				/* Unknown qualifier */
-				counter = -counter;
-				goto out;
-			}
-			
-			if (flags & __PRINTF_FLAG_SIGNED) {
-				if (number & (0x1 << (size * 8 - 1))) {
-					flags |= __PRINTF_FLAG_NEGATIVE;
-					
-					if (size == sizeof(uint64_t)) {
-						number = -((int64_t) number);
-					} else {
-						number = ~number;
-						number &=
-						    ~(0xFFFFFFFFFFFFFFFFll <<
-						    (size * 8));
-						number++;
-					}
-				}
-			}
-			
-			if ((retval = print_number(number, width, precision,
-			    base, flags, ps)) < 0) {
-				counter = -counter;
-				goto out;
-			}
-			
-			counter += retval;
-			j = nxt;
-		}
-next_char:
-		;
-	}
-	
-	if (i > j) {
-		if ((retval = printf_putnchars(&fmt[j], i - j, ps)) < 0) {
-			/* Error */
-			counter = -counter;
-			goto out;
-		}
-		counter += retval;
-	}
-	
-out:
-	return ((int) counter);
-}
-
-/** @}
- */
Index: pace/lib/libc/generic/io/snprintf.c
===================================================================
--- uspace/lib/libc/generic/io/snprintf.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,61 +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 libc
- * @{
- */
-/** @file
- */
-
-#include <stdarg.h>
-#include <stdio.h>
-#include <io/printf_core.h>
-
-/** Print formatted to the given buffer with limited size.
- *
- * @param str  Buffer
- * @param size Buffer size
- * @param fmt  Format string
- *
- * \see For more details about format string see printf_core.
- *
- */
-int snprintf(char *str, size_t size, const char *fmt, ...)
-{
-	va_list args;
-	va_start(args, fmt);
-	
-	int ret = vsnprintf(str, size, fmt, args);
-	
-	va_end(args);
-	
-	return ret;
-}
-
-/** @}
- */
Index: pace/lib/libc/generic/io/vprintf.c
===================================================================
--- uspace/lib/libc/generic/io/vprintf.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,118 +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 libc
- * @{
- */
-/** @file
- */
-
-#include <stdarg.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <io/printf_core.h>
-#include <futex.h>
-#include <async.h>
-#include <string.h>
-
-static atomic_t printf_futex = FUTEX_INITIALIZER;
-
-static int vprintf_str_write(const char *str, size_t size, void *stream)
-{
-	size_t wr = fwrite(str, 1, size, (FILE *) stream);
-	return str_nlength(str, wr);
-}
-
-static int vprintf_wstr_write(const wchar_t *str, size_t size, void *stream)
-{
-	size_t offset = 0;
-	size_t chars = 0;
-	
-	while (offset < size) {
-		if (fputc(str[chars], (FILE *) stream) <= 0)
-			break;
-		
-		chars++;
-		offset += sizeof(wchar_t);
-	}
-	
-	return chars;
-}
-
-/** Print formatted text.
- *
- * @param stream Output stream
- * @param fmt    Format string
- * @param ap     Format parameters
- *
- * \see For more details about format string see printf_core.
- *
- */
-int vfprintf(FILE *stream, const char *fmt, va_list ap)
-{
-	struct printf_spec ps = {
-		vprintf_str_write,
-		vprintf_wstr_write,
-		stream
-	};
-	
-	/*
-	 * Prevent other threads to execute printf_core()
-	 */
-	futex_down(&printf_futex);
-	
-	/*
-	 * Prevent other fibrils of the same thread
-	 * to execute printf_core()
-	 */
-	async_serialize_start();
-	
-	int ret = printf_core(fmt, &ps, ap);
-	
-	async_serialize_end();
-	futex_up(&printf_futex);
-	
-	return ret;
-}
-
-/** Print formatted text to stdout.
- *
- * @param file Output stream
- * @param fmt  Format string
- * @param ap   Format parameters
- *
- * \see For more details about format string see printf_core.
- *
- */
-int vprintf(const char *fmt, va_list ap)
-{
-	return vfprintf(stdout, fmt, ap);
-}
-
-/** @}
- */
Index: pace/lib/libc/generic/io/vsnprintf.c
===================================================================
--- uspace/lib/libc/generic/io/vsnprintf.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,186 +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 libc
- * @{
- */
-/** @file
- */
-
-#include <stdarg.h>
-#include <stdio.h>
-#include <string.h>
-#include <io/printf_core.h>
-#include <errno.h>
-
-typedef struct {
-	size_t size;    /* Total size of the buffer (in bytes) */
-	size_t len;     /* Number of already used bytes */
-	char *dst;      /* Destination */
-} vsnprintf_data_t;
-
-/** Write string to given buffer.
- *
- * Write at most data->size plain characters including trailing zero.
- * According to C99, snprintf() has to return number of characters that
- * would have been written if enough space had been available. Hence
- * the return value is not the number of actually printed characters
- * but size of the input string.
- *
- * @param str  Source string to print.
- * @param size Number of plain characters in str.
- * @param data Structure describing destination string, counter
- *             of used space and total string size.
- *
- * @return Number of characters to print (not characters actually
- *         printed).
- *
- */
-static int vsnprintf_str_write(const char *str, size_t size, vsnprintf_data_t *data)
-{
-	size_t left = data->size - data->len;
-	
-	if (left == 0)
-		return ((int) size);
-	
-	if (left == 1) {
-		/* We have only one free byte left in buffer
-		 * -> store trailing zero
-		 */
-		data->dst[data->size - 1] = 0;
-		data->len = data->size;
-		return ((int) size);
-	}
-	
-	if (left <= size) {
-		/* We do not have enough space for the whole string
-		 * with the trailing zero => print only a part
-		 * of string
-		 */
-		size_t index = 0;
-		
-		while (index < size) {
-			wchar_t uc = str_decode(str, &index, size);
-			
-			if (chr_encode(uc, data->dst, &data->len, data->size - 1) != EOK)
-				break;
-		}
-		
-		/* Put trailing zero at end, but not count it
-		 * into data->len so it could be rewritten next time
-		 */
-		data->dst[data->len] = 0;
-		
-		return ((int) size);
-	}
-	
-	/* Buffer is big enough to print the whole string */
-	memcpy((void *)(data->dst + data->len), (void *) str, size);
-	data->len += size;
-	
-	/* Put trailing zero at end, but not count it
-	 * into data->len so it could be rewritten next time
-	 */
-	data->dst[data->len] = 0;
-	
-	return ((int) size);
-}
-
-/** Write wide string to given buffer.
- *
- * Write at most data->size plain characters including trailing zero.
- * According to C99, snprintf() has to return number of characters that
- * would have been written if enough space had been available. Hence
- * the return value is not the number of actually printed characters
- * but size of the input string.
- *
- * @param str  Source wide string to print.
- * @param size Number of bytes in str.
- * @param data Structure describing destination string, counter
- *             of used space and total string size.
- *
- * @return Number of wide characters to print (not characters actually
- *         printed).
- *
- */
-static int vsnprintf_wstr_write(const wchar_t *str, size_t size, vsnprintf_data_t *data)
-{
-	size_t index = 0;
-	
-	while (index < (size / sizeof(wchar_t))) {
-		size_t left = data->size - data->len;
-		
-		if (left == 0)
-			return ((int) size);
-		
-		if (left == 1) {
-			/* We have only one free byte left in buffer
-			 * -> store trailing zero
-			 */
-			data->dst[data->size - 1] = 0;
-			data->len = data->size;
-			return ((int) size);
-		}
-		
-		if (chr_encode(str[index], data->dst, &data->len, data->size - 1) != EOK)
-			break;
-		
-		index++;
-	}
-	
-	/* Put trailing zero at end, but not count it
-	 * into data->len so it could be rewritten next time
-	 */
-	data->dst[data->len] = 0;
-	
-	return ((int) size);
-}
-
-int vsnprintf(char *str, size_t size, const char *fmt, va_list ap)
-{
-	vsnprintf_data_t data = {
-		size,
-		0,
-		str
-	};
-	printf_spec_t ps = {
-		(int(*) (const char *, size_t, void *)) vsnprintf_str_write,
-		(int(*) (const wchar_t *, size_t, void *)) vsnprintf_wstr_write,
-		&data
-	};
-	
-	/* Print 0 at end of string - fix the case that nothing will be printed */
-	if (size > 0)
-		str[0] = 0;
-	
-	/* vsnprintf_write ensures that str will be terminated by zero. */
-	return printf_core(fmt, &ps, ap);
-}
-
-/** @}
- */
Index: pace/lib/libc/generic/ipc.c
===================================================================
--- uspace/lib/libc/generic/ipc.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,860 +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 libc
- * @{
- * @}
- */
-
-/** @addtogroup libcipc IPC
- * @brief HelenOS uspace IPC
- * @{
- * @ingroup libc
- */
-/** @file
- */ 
-
-#include <ipc/ipc.h>
-#include <libc.h>
-#include <malloc.h>
-#include <errno.h>
-#include <adt/list.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <futex.h>
-#include <kernel/synch/synch.h>
-#include <async.h>
-#include <fibril.h>
-#include <assert.h>
-
-/**
- * Structures of this type are used for keeping track of sent asynchronous calls
- * and queing unsent calls.
- */
-typedef struct {
-	link_t list;
-
-	ipc_async_callback_t callback;
-	void *private;
-	union {
-		ipc_callid_t callid;
-		struct {
-			ipc_call_t data;
-			int phoneid;
-		} msg;
-	} u;
-	fid_t fid;	/**< Fibril waiting for sending this call. */
-} async_call_t;
-
-LIST_INITIALIZE(dispatched_calls);
-
-/** List of asynchronous calls that were not accepted by kernel.
- *
- * It is protected by async_futex, because if the call cannot be sent into the
- * kernel, the async framework is used automatically.
- */
-LIST_INITIALIZE(queued_calls);
-
-static atomic_t ipc_futex = FUTEX_INITIALIZER;
-
-/** Make a fast synchronous call.
- *
- * Only three payload arguments can be passed using this function. However, this
- * function is faster than the generic ipc_call_sync_slow() because the payload
- * is passed directly in registers.
- *
- * @param phoneid	Phone handle for the call.
- * @param method	Requested method.
- * @param arg1		Service-defined payload argument.
- * @param arg2		Service-defined payload argument.
- * @param arg3		Service-defined payload argument.
- * @param result1	If non-NULL, the return ARG1 will be stored there.
- * @param result2	If non-NULL, the return ARG2 will be stored there.
- * @param result3	If non-NULL, the return ARG3 will be stored there.
- * @param result4	If non-NULL, the return ARG4 will be stored there.
- * @param result5	If non-NULL, the return ARG5 will be stored there.
- *
- * @return		Negative values represent errors returned by IPC.
- *			Otherwise the RETVAL of the answer is returned.
- */
-int
-ipc_call_sync_fast(int phoneid, ipcarg_t method, ipcarg_t arg1, ipcarg_t arg2,
-    ipcarg_t arg3, ipcarg_t *result1, ipcarg_t *result2, ipcarg_t *result3,
-    ipcarg_t *result4, ipcarg_t *result5)
-{
-	ipc_call_t resdata;
-	int callres;
-	
-	callres = __SYSCALL6(SYS_IPC_CALL_SYNC_FAST, phoneid, method, arg1,
-	    arg2, arg3, (sysarg_t) &resdata);
-	if (callres)
-		return callres;
-	if (result1)
-		*result1 = IPC_GET_ARG1(resdata);
-	if (result2)
-		*result2 = IPC_GET_ARG2(resdata);
-	if (result3)
-		*result3 = IPC_GET_ARG3(resdata);
-	if (result4)
-		*result4 = IPC_GET_ARG4(resdata);
-	if (result5)
-		*result5 = IPC_GET_ARG5(resdata);
-
-	return IPC_GET_RETVAL(resdata);
-}
-
-/** Make a synchronous call transmitting 5 arguments of payload.
- *
- * @param phoneid	Phone handle for the call.
- * @param method	Requested method.
- * @param arg1		Service-defined payload argument.
- * @param arg2		Service-defined payload argument.
- * @param arg3		Service-defined payload argument.
- * @param arg4		Service-defined payload argument.
- * @param arg5		Service-defined payload argument.
- * @param result1	If non-NULL, storage for the first return argument.
- * @param result2	If non-NULL, storage for the second return argument.
- * @param result3	If non-NULL, storage for the third return argument.
- * @param result4	If non-NULL, storage for the fourth return argument.
- * @param result5	If non-NULL, storage for the fifth return argument.
- *
- * @return		Negative value means IPC error.
- *			Otherwise the RETVAL of the answer.
- */
-int
-ipc_call_sync_slow(int phoneid, ipcarg_t method, ipcarg_t arg1, ipcarg_t arg2,
-    ipcarg_t arg3, ipcarg_t arg4, ipcarg_t arg5, ipcarg_t *result1,
-    ipcarg_t *result2, ipcarg_t *result3, ipcarg_t *result4, ipcarg_t *result5)
-{
-	ipc_call_t data;
-	int callres;
-
-	IPC_SET_METHOD(data, method);
-	IPC_SET_ARG1(data, arg1);
-	IPC_SET_ARG2(data, arg2);
-	IPC_SET_ARG3(data, arg3);
-	IPC_SET_ARG4(data, arg4);
-	IPC_SET_ARG5(data, arg5);
-
-	callres = __SYSCALL3(SYS_IPC_CALL_SYNC_SLOW, phoneid, (sysarg_t) &data,
-	    (sysarg_t) &data);
-	if (callres)
-		return callres;
-
-	if (result1)
-		*result1 = IPC_GET_ARG1(data);
-	if (result2)
-		*result2 = IPC_GET_ARG2(data);
-	if (result3)
-		*result3 = IPC_GET_ARG3(data);
-	if (result4)
-		*result4 = IPC_GET_ARG4(data);
-	if (result5)
-		*result5 = IPC_GET_ARG5(data);
-
-	return IPC_GET_RETVAL(data);
-}
-
-/** Syscall to send asynchronous message.
- *
- * @param phoneid	Phone handle for the call.
- * @param data		Call data with the request.
- *
- * @return		Hash of the call or an error code.
- */
-static ipc_callid_t _ipc_call_async(int phoneid, ipc_call_t *data)
-{
-	return __SYSCALL2(SYS_IPC_CALL_ASYNC_SLOW, phoneid, (sysarg_t) data);
-}
-
-/** Prolog to ipc_call_async_*() functions.
- *
- * @param private	Argument for the answer/error callback.
- * @param callback	Answer/error callback.
- *
- * @return		New, partially initialized async_call structure or NULL.
- */
-static inline async_call_t *ipc_prepare_async(void *private,
-    ipc_async_callback_t callback)
-{
-	async_call_t *call;
-
-	call = malloc(sizeof(*call));
-	if (!call) {
-		if (callback)
-			callback(private, ENOMEM, NULL);
-		return NULL;
-	}
-	call->callback = callback;
-	call->private = private;
-
-	return call;
-}
-
-/** Epilogue of ipc_call_async_*() functions.
- *
- * @param callid	Value returned by the SYS_IPC_CALL_ASYNC_* syscall.
- * @param phoneid	Phone handle through which the call was made.
- * @param call		async_call structure returned by ipc_prepare_async().
- * @param can_preempt	If non-zero, the current fibril can be preempted in this
- *			call.
- */
-static inline void ipc_finish_async(ipc_callid_t callid, int phoneid,
-    async_call_t *call, int can_preempt)
-{
-	if (!call) { /* Nothing to do regardless if failed or not */
-		futex_up(&ipc_futex);
-		return;
-	}
-
-	if (callid == (ipc_callid_t) IPC_CALLRET_FATAL) {
-		futex_up(&ipc_futex);
-		/* Call asynchronous handler with error code */
-		if (call->callback)
-			call->callback(call->private, ENOENT, NULL);
-		free(call);
-		return;
-	}
-
-	if (callid == (ipc_callid_t) IPC_CALLRET_TEMPORARY) {
-		futex_up(&ipc_futex);
-
-		call->u.msg.phoneid = phoneid;
-		
-		futex_down(&async_futex);
-		list_append(&call->list, &queued_calls);
-
-		if (can_preempt) {
-			call->fid = fibril_get_id();
-			fibril_switch(FIBRIL_TO_MANAGER);
-			/* Async futex unlocked by previous call */
-		} else {
-			call->fid = 0;
-			futex_up(&async_futex);
-		}
-		return;
-	}
-	call->u.callid = callid;
-	/* Add call to the list of dispatched calls */
-	list_append(&call->list, &dispatched_calls);
-	futex_up(&ipc_futex);
-	
-}
-
-/** Make a fast asynchronous call.
- *
- * This function can only handle four arguments of payload. It is, however,
- * faster than the more generic ipc_call_async_slow().
- *
- * Note that this function is a void function.
- * During normal opertation, answering this call will trigger the callback.
- * In case of fatal error, call the callback handler with the proper error code.
- * If the call cannot be temporarily made, queue it.
- *
- * @param phoneid	Phone handle for the call.
- * @param method	Requested method.
- * @param arg1		Service-defined payload argument.
- * @param arg2		Service-defined payload argument.
- * @param arg3		Service-defined payload argument.
- * @param arg4		Service-defined payload argument.
- * @param private	Argument to be passed to the answer/error callback.
- * @param callback	Answer or error callback.
- * @param can_preempt	If non-zero, the current fibril will be preempted in
- *			case the kernel temporarily refuses to accept more
- *			asynchronous calls.
- */
-void ipc_call_async_fast(int phoneid, ipcarg_t method, ipcarg_t arg1,
-    ipcarg_t arg2, ipcarg_t arg3, ipcarg_t arg4, void *private,
-    ipc_async_callback_t callback, int can_preempt)
-{
-	async_call_t *call = NULL;
-	ipc_callid_t callid;
-
-	if (callback) {
-		call = ipc_prepare_async(private, callback);
-		if (!call)
-			return;
-	}
-
-	/*
-	 * We need to make sure that we get callid before another thread
-	 * accesses the queue again.
-	 */
-	futex_down(&ipc_futex);
-	callid = __SYSCALL6(SYS_IPC_CALL_ASYNC_FAST, phoneid, method, arg1,
-	    arg2, arg3, arg4);
-
-	if (callid == (ipc_callid_t) IPC_CALLRET_TEMPORARY) {
-		if (!call) {
-			call = ipc_prepare_async(private, callback);
-			if (!call)
-				return;
-		}
-		IPC_SET_METHOD(call->u.msg.data, method);
-		IPC_SET_ARG1(call->u.msg.data, arg1);
-		IPC_SET_ARG2(call->u.msg.data, arg2);
-		IPC_SET_ARG3(call->u.msg.data, arg3);
-		IPC_SET_ARG4(call->u.msg.data, arg4);
-		/*
-		 * To achieve deterministic behavior, we always zero out the
-		 * arguments that are beyond the limits of the fast version.
-		 */
-		IPC_SET_ARG5(call->u.msg.data, 0);
-	}
-	ipc_finish_async(callid, phoneid, call, can_preempt);
-}
-
-/** Make an asynchronous call transmitting the entire payload.
- *
- * Note that this function is a void function.
- * During normal opertation, answering this call will trigger the callback.
- * In case of fatal error, call the callback handler with the proper error code.
- * If the call cannot be temporarily made, queue it.
- *
- * @param phoneid	Phone handle for the call.
- * @param method	Requested method.
- * @param arg1		Service-defined payload argument.
- * @param arg2		Service-defined payload argument.
- * @param arg3		Service-defined payload argument.
- * @param arg4		Service-defined payload argument.
- * @param arg5		Service-defined payload argument.
- * @param private	Argument to be passed to the answer/error callback.
- * @param callback	Answer or error callback.
- * @param can_preempt	If non-zero, the current fibril will be preempted in
- *			case the kernel temporarily refuses to accept more
- *			asynchronous calls.
- *
- */
-void ipc_call_async_slow(int phoneid, ipcarg_t method, ipcarg_t arg1,
-    ipcarg_t arg2, ipcarg_t arg3, ipcarg_t arg4, ipcarg_t arg5, void *private,
-    ipc_async_callback_t callback, int can_preempt)
-{
-	async_call_t *call;
-	ipc_callid_t callid;
-
-	call = ipc_prepare_async(private, callback);
-	if (!call)
-		return;
-
-	IPC_SET_METHOD(call->u.msg.data, method);
-	IPC_SET_ARG1(call->u.msg.data, arg1);
-	IPC_SET_ARG2(call->u.msg.data, arg2);
-	IPC_SET_ARG3(call->u.msg.data, arg3);
-	IPC_SET_ARG4(call->u.msg.data, arg4);
-	IPC_SET_ARG5(call->u.msg.data, arg5);
-	/*
-	 * We need to make sure that we get callid before another thread
-	 * accesses the queue again.
-	 */
-	futex_down(&ipc_futex);
-	callid = _ipc_call_async(phoneid, &call->u.msg.data);
-
-	ipc_finish_async(callid, phoneid, call, can_preempt);
-}
-
-
-/** Answer a received call - fast version.
- *
- * The fast answer makes use of passing retval and first four arguments in
- * registers. If you need to return more, use the ipc_answer_slow() instead.
- *
- * @param callid	Hash of the call being answered.
- * @param retval	Return value.
- * @param arg1		First return argument.
- * @param arg2		Second return argument.
- * @param arg3		Third return argument.
- * @param arg4		Fourth return argument.
- *
- * @return		Zero on success or a value from @ref errno.h on failure.
- */
-ipcarg_t ipc_answer_fast(ipc_callid_t callid, ipcarg_t retval, ipcarg_t arg1,
-    ipcarg_t arg2, ipcarg_t arg3, ipcarg_t arg4)
-{
-	return __SYSCALL6(SYS_IPC_ANSWER_FAST, callid, retval, arg1, arg2, arg3,
-	    arg4);
-}
-
-/** Answer a received call - slow full version.
- *
- * @param callid	Hash of the call being answered.
- * @param retval	Return value.
- * @param arg1		First return argument.
- * @param arg2		Second return argument.
- * @param arg3		Third return argument.
- * @param arg4		Fourth return argument.
- * @param arg5		Fifth return argument.
- *
- * @return		Zero on success or a value from @ref errno.h on failure.
- */
-ipcarg_t ipc_answer_slow(ipc_callid_t callid, ipcarg_t retval, ipcarg_t arg1,
-    ipcarg_t arg2, ipcarg_t arg3, ipcarg_t arg4, ipcarg_t arg5)
-{
-	ipc_call_t data;
-
-	IPC_SET_RETVAL(data, retval);
-	IPC_SET_ARG1(data, arg1);
-	IPC_SET_ARG2(data, arg2);
-	IPC_SET_ARG3(data, arg3);
-	IPC_SET_ARG4(data, arg4);
-	IPC_SET_ARG5(data, arg5);
-
-	return __SYSCALL2(SYS_IPC_ANSWER_SLOW, callid, (sysarg_t) &data);
-}
-
-
-/** Try to dispatch queued calls from the async queue. */
-static void try_dispatch_queued_calls(void)
-{
-	async_call_t *call;
-	ipc_callid_t callid;
-
-	/** @todo
-	 * Integrate intelligently ipc_futex, so that it is locked during
-	 * ipc_call_async_*(), until it is added to dispatched_calls.
-	 */
-	futex_down(&async_futex);
-	while (!list_empty(&queued_calls)) {
-		call = list_get_instance(queued_calls.next, async_call_t, list);
-		callid = _ipc_call_async(call->u.msg.phoneid,
-		    &call->u.msg.data);
-		if (callid == (ipc_callid_t) IPC_CALLRET_TEMPORARY) {
-			break;
-		}
-		list_remove(&call->list);
-
-		futex_up(&async_futex);
-		if (call->fid)
-			fibril_add_ready(call->fid);
-		
-		if (callid == (ipc_callid_t) IPC_CALLRET_FATAL) {
-			if (call->callback)
-				call->callback(call->private, ENOENT, NULL);
-			free(call);
-		} else {
-			call->u.callid = callid;
-			futex_down(&ipc_futex);
-			list_append(&call->list, &dispatched_calls);
-			futex_up(&ipc_futex);
-		}
-		futex_down(&async_futex);
-	}
-	futex_up(&async_futex);
-}
-
-/** Handle a received answer.
- *
- * Find the hash of the answer and call the answer callback.
- *
- * @todo Make it use hash table.
- *
- * @param callid	Hash of the received answer.
- *			The answer has the same hash as the request OR'ed with
- *			the IPC_CALLID_ANSWERED bit.
- * @param data		Call data of the answer.
- */
-static void handle_answer(ipc_callid_t callid, ipc_call_t *data)
-{
-	link_t *item;
-	async_call_t *call;
-
-	callid &= ~IPC_CALLID_ANSWERED;
-	
-	futex_down(&ipc_futex);
-	for (item = dispatched_calls.next; item != &dispatched_calls;
-	    item = item->next) {
-		call = list_get_instance(item, async_call_t, list);
-		if (call->u.callid == callid) {
-			list_remove(&call->list);
-			futex_up(&ipc_futex);
-			if (call->callback)
-				call->callback(call->private, 
-				    IPC_GET_RETVAL(*data), data);
-			free(call);
-			return;
-		}
-	}
-	futex_up(&ipc_futex);
-}
-
-
-/** Wait for a first call to come.
- *
- * @param call		Storage where the incoming call data will be stored.
- * @param usec		Timeout in microseconds
- * @param flags		Flags passed to SYS_IPC_WAIT (blocking, nonblocking).
- *
- * @return		Hash of the call. Note that certain bits have special
- *			meaning. IPC_CALLID_ANSWERED will be set in an answer
- *			and IPC_CALLID_NOTIFICATION is used for notifications.
- *			
- */
-ipc_callid_t ipc_wait_cycle(ipc_call_t *call, uint32_t usec, int flags)
-{
-	ipc_callid_t callid;
-
-	callid = __SYSCALL3(SYS_IPC_WAIT, (sysarg_t) call, usec, flags);
-	/* Handle received answers */
-	if (callid & IPC_CALLID_ANSWERED) {
-		handle_answer(callid, call);
-		try_dispatch_queued_calls();
-	}
-
-	return callid;
-}
-
-/** Wait some time for an IPC call.
- *
- * The call will return after an answer is received.
- *
- * @param call		Storage where the incoming call data will be stored.
- * @param usec		Timeout in microseconds.
- *
- * @return		Hash of the answer.
- */
-ipc_callid_t ipc_wait_for_call_timeout(ipc_call_t *call, uint32_t usec)
-{
-	ipc_callid_t callid;
-
-	do {
-		callid = ipc_wait_cycle(call, usec, SYNCH_FLAGS_NONE);
-	} while (callid & IPC_CALLID_ANSWERED);
-
-	return callid;
-}
-
-/** Check if there is an IPC call waiting to be picked up.
- *
- * @param call		Storage where the incoming call will be stored.
- * @return		Hash of the answer.
- */
-ipc_callid_t ipc_trywait_for_call(ipc_call_t *call)
-{
-	ipc_callid_t callid;
-
-	do {
-		callid = ipc_wait_cycle(call, SYNCH_NO_TIMEOUT,
-		    SYNCH_FLAGS_NON_BLOCKING);
-	} while (callid & IPC_CALLID_ANSWERED);
-
-	return callid;
-}
-
-/** Interrupt one thread of this task from waiting for IPC. */
-void ipc_poke(void)
-{
-	__SYSCALL0(SYS_IPC_POKE);
-}
-
-/** Ask destination to do a callback connection.
- *
- * @param phoneid	Phone handle used for contacting the other side.
- * @param arg1		Service-defined argument.
- * @param arg2		Service-defined argument.
- * @param arg3		Service-defined argument.
- * @param phonehash	Storage where the library will store an opaque
- *			identifier of the phone that will be used for incoming
- *			calls. This identifier can be used for connection
- *			tracking.
- *
- * @return		Zero on success or a negative error code.
- */
-int ipc_connect_to_me(int phoneid, int arg1, int arg2, int arg3, 
-    ipcarg_t *phonehash)
-{
-	return ipc_call_sync_3_5(phoneid, IPC_M_CONNECT_TO_ME, arg1, arg2,
-	    arg3, NULL, NULL, NULL, NULL, phonehash);
-}
-
-/** Ask through phone for a new connection to some service.
- *
- * @param phoneid	Phone handle used for contacting the other side.
- * @param arg1		User defined argument.
- * @param arg2		User defined argument.
- * @param arg3		User defined argument.
- *
- * @return		New phone handle on success or a negative error code.
- */
-int ipc_connect_me_to(int phoneid, int arg1, int arg2, int arg3)
-{
-	ipcarg_t newphid;
-	int res;
-
-	res = ipc_call_sync_3_5(phoneid, IPC_M_CONNECT_ME_TO, arg1, arg2, arg3,
-	    NULL, NULL, NULL, NULL, &newphid);
-	if (res)
-		return res;
-	return newphid;
-}
-
-/** Ask through phone for a new connection to some service.
- *
- * If the connection is not available at the moment, the
- * call will block.
- *
- * @param phoneid	Phone handle used for contacting the other side.
- * @param arg1		User defined argument.
- * @param arg2		User defined argument.
- * @param arg3		User defined argument.
- *
- * @return		New phone handle on success or a negative error code.
- */
-int ipc_connect_me_to_blocking(int phoneid, int arg1, int arg2, int arg3)
-{
-	ipcarg_t newphid;
-	int res;
-
-	res = ipc_call_sync_4_5(phoneid, IPC_M_CONNECT_ME_TO, arg1, arg2, arg3,
-	    IPC_FLAG_BLOCKING, NULL, NULL, NULL, NULL, &newphid);
-	if (res)
-		return res;
-	return newphid;
-}
-
-/** Hang up a phone.
- *
- * @param phoneid	Handle of the phone to be hung up.
- *
- * @return		Zero on success or a negative error code.
- */
-int ipc_hangup(int phoneid)
-{
-	return __SYSCALL1(SYS_IPC_HANGUP, phoneid);
-}
-
-/** Register IRQ notification.
- *
- * @param inr		IRQ number.
- * @param devno		Device number of the device generating inr.
- * @param method	Use this method for notifying me.
- * @param ucode		Top-half pseudocode handler.
- *
- * @return		Value returned by the kernel.
- */
-int ipc_register_irq(int inr, int devno, int method, irq_code_t *ucode)
-{
-	return __SYSCALL4(SYS_IPC_REGISTER_IRQ, inr, devno, method,
-	    (sysarg_t) ucode);
-}
-
-/** Unregister IRQ notification.
- *
- * @param inr		IRQ number.
- * @param devno		Device number of the device generating inr.
- *
- * @return		Value returned by the kernel.
- */
-int ipc_unregister_irq(int inr, int devno)
-{
-	return __SYSCALL2(SYS_IPC_UNREGISTER_IRQ, inr, devno);
-}
-
-/** Forward a received call to another destination.
- *
- * @param callid	Hash of the call to forward.
- * @param phoneid	Phone handle to use for forwarding.
- * @param method	New method for the forwarded call.
- * @param arg1		New value of the first argument for the forwarded call.
- * @param arg2		New value of the second argument for the forwarded call.
- * @param mode		Flags specifying mode of the forward operation.
- *
- * @return		Zero on success or an error code.
- *
- * For non-system methods, the old method, arg1 and arg2 are rewritten by the
- * new values. For system methods, the new method, arg1 and arg2 are written 
- * to the old arg1, arg2 and arg3, respectivelly. Calls with immutable 
- * methods are forwarded verbatim.
- */
-int ipc_forward_fast(ipc_callid_t callid, int phoneid, int method,
-    ipcarg_t arg1, ipcarg_t arg2, int mode)
-{
-	return __SYSCALL6(SYS_IPC_FORWARD_FAST, callid, phoneid, method, arg1, 
-	    arg2, mode);
-}
-
-
-int ipc_forward_slow(ipc_callid_t callid, int phoneid, int method,
-    ipcarg_t arg1, ipcarg_t arg2, ipcarg_t arg3, ipcarg_t arg4, ipcarg_t arg5,
-    int mode)
-{
-	ipc_call_t data;
-
-	IPC_SET_METHOD(data, method);
-	IPC_SET_ARG1(data, arg1);
-	IPC_SET_ARG2(data, arg2);
-	IPC_SET_ARG3(data, arg3);
-	IPC_SET_ARG4(data, arg4);
-	IPC_SET_ARG5(data, arg5);
-
-	return __SYSCALL4(SYS_IPC_FORWARD_SLOW, callid, phoneid, (sysarg_t) &data, mode);
-}
-
-/** Wrapper for making IPC_M_SHARE_IN calls.
- *
- * @param phoneid	Phone that will be used to contact the receiving side.
- * @param dst		Destination address space area base.
- * @param size		Size of the destination address space area.
- * @param arg		User defined argument.
- * @param flags		Storage where the received flags will be stored. Can be
- *			NULL.
- *
- * @return		Zero on success or a negative error code from errno.h.
- */
-int ipc_share_in_start(int phoneid, void *dst, size_t size, ipcarg_t arg,
-    int *flags)
-{
-	sysarg_t tmp_flags = 0;
-	int res = ipc_call_sync_3_2(phoneid, IPC_M_SHARE_IN, (ipcarg_t) dst,
-	    (ipcarg_t) size, arg, NULL, &tmp_flags);
-	
-	if (flags)
-		*flags = tmp_flags;
-	
-	return res;
-}
-
-/** Wrapper for answering the IPC_M_SHARE_IN calls.
- *
- * This wrapper only makes it more comfortable to answer IPC_M_DATA_READ calls
- * so that the user doesn't have to remember the meaning of each IPC argument.
- *
- * @param callid	Hash of the IPC_M_DATA_READ call to answer.
- * @param src		Source address space base.
- * @param flags		Flags to be used for sharing. Bits can be only cleared.
- *
- * @return		Zero on success or a value from @ref errno.h on failure.
- */
-int ipc_share_in_finalize(ipc_callid_t callid, void *src, int flags)
-{
-	return ipc_answer_2(callid, EOK, (ipcarg_t) src, (ipcarg_t) flags);
-}
-
-/** Wrapper for making IPC_M_SHARE_OUT calls.
- *
- * @param phoneid	Phone that will be used to contact the receiving side.
- * @param src		Source address space area base address.
- * @param flags		Flags to be used for sharing. Bits can be only cleared.
- *
- * @return		Zero on success or a negative error code from errno.h.
- */
-int ipc_share_out_start(int phoneid, void *src, int flags)
-{
-	return ipc_call_sync_3_0(phoneid, IPC_M_SHARE_OUT, (ipcarg_t) src, 0,
-	    (ipcarg_t) flags);
-}
-
-/** Wrapper for answering the IPC_M_SHARE_OUT calls.
- *
- * This wrapper only makes it more comfortable to answer IPC_M_SHARE_OUT calls
- * so that the user doesn't have to remember the meaning of each IPC argument.
- *
- * @param callid	Hash of the IPC_M_DATA_WRITE call to answer.
- * @param dst		Destination address space area base address.	
- *
- * @return		Zero on success or a value from @ref errno.h on failure.
- */
-int ipc_share_out_finalize(ipc_callid_t callid, void *dst)
-{
-	return ipc_answer_1(callid, EOK, (ipcarg_t) dst);
-}
-
-
-/** Wrapper for making IPC_M_DATA_READ calls.
- *
- * @param phoneid	Phone that will be used to contact the receiving side.
- * @param dst		Address of the beginning of the destination buffer.
- * @param size		Size of the destination buffer.
- *
- * @return		Zero on success or a negative error code from errno.h.
- */
-int ipc_data_read_start(int phoneid, void *dst, size_t size)
-{
-	return ipc_call_sync_2_0(phoneid, IPC_M_DATA_READ, (ipcarg_t) dst,
-	    (ipcarg_t) size);
-}
-
-/** Wrapper for answering the IPC_M_DATA_READ calls.
- *
- * This wrapper only makes it more comfortable to answer IPC_M_DATA_READ calls
- * so that the user doesn't have to remember the meaning of each IPC argument.
- *
- * @param callid	Hash of the IPC_M_DATA_READ call to answer.
- * @param src		Source address for the IPC_M_DATA_READ call.
- * @param size		Size for the IPC_M_DATA_READ call. Can be smaller than
- *			the maximum size announced by the sender.
- *
- * @return		Zero on success or a value from @ref errno.h on failure.
- */
-int ipc_data_read_finalize(ipc_callid_t callid, const void *src, size_t size)
-{
-	return ipc_answer_2(callid, EOK, (ipcarg_t) src, (ipcarg_t) size);
-}
-
-/** Wrapper for making IPC_M_DATA_WRITE calls.
- *
- * @param phoneid	Phone that will be used to contact the receiving side.
- * @param src		Address of the beginning of the source buffer.
- * @param size		Size of the source buffer.
- *
- * @return		Zero on success or a negative error code from errno.h.
- */
-int ipc_data_write_start(int phoneid, const void *src, size_t size)
-{
-	return ipc_call_sync_2_0(phoneid, IPC_M_DATA_WRITE, (ipcarg_t) src,
-	    (ipcarg_t) size);
-}
-
-/** Wrapper for answering the IPC_M_DATA_WRITE calls.
- *
- * This wrapper only makes it more comfortable to answer IPC_M_DATA_WRITE calls
- * so that the user doesn't have to remember the meaning of each IPC argument.
- *
- * @param callid	Hash of the IPC_M_DATA_WRITE call to answer.
- * @param dst		Final destination address for the IPC_M_DATA_WRITE call.
- * @param size		Final size for the IPC_M_DATA_WRITE call.
- *
- * @return		Zero on success or a value from @ref errno.h on failure.
- */
-int ipc_data_write_finalize(ipc_callid_t callid, void *dst, size_t size)
-{
-	return ipc_answer_2(callid, EOK, (ipcarg_t) dst, (ipcarg_t) size);
-}
-
-#include <kernel/syscall/sysarg64.h>
-/** Connect to a task specified by id.
- */
-int ipc_connect_kbox(task_id_t id)
-{
-	sysarg64_t arg;
-
-	arg.value = (unsigned long long) id;
-
-	return __SYSCALL1(SYS_IPC_CONNECT_KBOX, (sysarg_t) &arg);
-}
- 
-/** @}
- */
Index: pace/lib/libc/generic/libc.c
===================================================================
--- uspace/lib/libc/generic/libc.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,101 +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 lc Libc
- * @brief HelenOS C library
- * @{
- * @}
- */
-
-/** @addtogroup libc generic
- * @ingroup lc
- * @{
- */
-
-/** @file
- */
-
-#include <libc.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <malloc.h>
-#include <tls.h>
-#include <thread.h>
-#include <fibril.h>
-#include <ipc/ipc.h>
-#include <async.h>
-#include <as.h>
-#include <loader/pcb.h>
-
-extern int main(int argc, char *argv[]);
-
-void _exit(int status)
-{
-	thread_exit(status);
-}
-
-void __main(void *pcb_ptr)
-{
-	int retval;
-
-	__heap_init();
-	__async_init();
-	fibril_t *fibril = fibril_setup();
-	__tcb_set(fibril->tcb);
-	
-	/* Save the PCB pointer */
-	__pcb = (pcb_t *) pcb_ptr;
-	
-	int argc;
-	char **argv;
-	
-	if (__pcb == NULL) {
-		argc = 0;
-		argv = NULL;
-		__stdio_init(0, NULL);
-	} else {
-		argc = __pcb->argc;
-		argv = __pcb->argv;
-		__stdio_init(__pcb->filc, __pcb->filv);
-		(void) chdir(__pcb->cwd);
-	}
-	
-	retval = main(argc, argv);
-
-	__stdio_done();
-	(void) task_retval(retval);
-}
-
-void __exit(void)
-{
-	fibril_teardown(__tcb_get()->fibril_data);
-	_exit(0);
-}
-
-/** @}
- */
Index: pace/lib/libc/generic/loader.c
===================================================================
--- uspace/lib/libc/generic/loader.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,344 +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.
- */
-
-/** @addtogroup libc
- * @{
- */
-/** @file
- */
-
-#include <ipc/ipc.h>
-#include <ipc/loader.h>
-#include <ipc/services.h>
-#include <libc.h>
-#include <task.h>
-#include <string.h>
-#include <stdlib.h>
-#include <async.h>
-#include <errno.h>
-#include <vfs/vfs.h>
-#include <loader/loader.h>
-
-/** Connect to a new program loader.
- *
- * Spawns a new program loader task and returns the connection structure.
- *
- * @param name Symbolic name to set on the newly created task.
- *
- * @return Pointer to the loader connection structure (should be
- *         deallocated using free() after use).
- *
- */
-int loader_spawn(const char *name)
-{
-	return __SYSCALL2(SYS_PROGRAM_SPAWN_LOADER,
-	    (sysarg_t) name, str_size(name));
-}
-
-loader_t *loader_connect(void)
-{
-	int phone_id = ipc_connect_me_to_blocking(PHONE_NS, SERVICE_LOAD, 0, 0);
-	if (phone_id < 0)
-		return NULL;
-	
-	loader_t *ldr = malloc(sizeof(loader_t));
-	if (ldr == NULL)
-		return NULL;
-	
-	ldr->phone_id = phone_id;
-	return ldr;
-}
-
-/** Get ID of the new task.
- *
- * Retrieves the ID of the new task from the loader.
- *
- * @param ldr     Loader connection structure.
- * @param task_id Points to a variable where the ID should be stored.
- *
- * @return Zero on success or negative error code.
- *
- */
-int loader_get_task_id(loader_t *ldr, task_id_t *task_id)
-{
-	/* Get task ID. */
-	ipc_call_t answer;
-	aid_t req = async_send_0(ldr->phone_id, LOADER_GET_TASKID, &answer);
-	int rc = async_data_read_start(ldr->phone_id, task_id, sizeof(task_id_t));
-	if (rc != EOK) {
-		async_wait_for(req, NULL);
-		return rc;
-	}
-	
-	ipcarg_t retval;
-	async_wait_for(req, &retval);
-	return (int) retval;
-}
-
-/** Set current working directory for the loaded task.
- *
- * Sets the current working directory for the loaded task.
- *
- * @param ldr  Loader connection structure.
- *
- * @return Zero on success or negative error code.
- *
- */
-int loader_set_cwd(loader_t *ldr)
-{
-	char *cwd;
-	size_t len;
-
-	cwd = (char *) malloc(MAX_PATH_LEN + 1);
-	if (!cwd)
-		return ENOMEM;
-	if (!getcwd(cwd, MAX_PATH_LEN + 1))
-		str_cpy(cwd, MAX_PATH_LEN + 1, "/"); 
-	len = str_length(cwd);
-	
-	ipc_call_t answer;
-	aid_t req = async_send_0(ldr->phone_id, LOADER_SET_CWD, &answer);
-	int rc = async_data_write_start(ldr->phone_id, cwd, len);
-	free(cwd);
-	if (rc != EOK) {
-		async_wait_for(req, NULL);
-		return rc;
-	}
-	
-	ipcarg_t retval;
-	async_wait_for(req, &retval);
-	return (int) retval;
-}
-
-/** Set pathname of the program to load.
- *
- * Sets the name of the program file to load. The name can be relative
- * to the current working directory (it will be absolutized before
- * sending to the loader).
- *
- * @param ldr  Loader connection structure.
- * @param path Pathname of the program file.
- *
- * @return Zero on success or negative error code.
- *
- */
-int loader_set_pathname(loader_t *ldr, const char *path)
-{
-	size_t pa_len;
-	char *pa = absolutize(path, &pa_len);
-	if (!pa)
-		return 0;
-	
-	/* Send program pathname */
-	ipc_call_t answer;
-	aid_t req = async_send_0(ldr->phone_id, LOADER_SET_PATHNAME, &answer);
-	int rc = async_data_write_start(ldr->phone_id, (void *) pa, pa_len);
-	if (rc != EOK) {
-		async_wait_for(req, NULL);
-		return rc;
-	}
-	
-	free(pa);
-	
-	ipcarg_t retval;
-	async_wait_for(req, &retval);
-	return (int) retval;
-}
-
-/** Set command-line arguments for the program.
- *
- * Sets the vector of command-line arguments to be passed to the loaded
- * program. By convention, the very first argument is typically the same as
- * the command used to execute the program.
- *
- * @param ldr  Loader connection structure.
- * @param argv NULL-terminated array of pointers to arguments.
- *
- * @return Zero on success or negative error code.
- *
- */
-int loader_set_args(loader_t *ldr, const char *const argv[])
-{
-	/*
-	 * Serialize the arguments into a single array. First
-	 * compute size of the buffer needed.
-	 */
-	const char *const *ap = argv;
-	size_t buffer_size = 0;
-	while (*ap != NULL) {
-		buffer_size += str_size(*ap) + 1;
-		ap++;
-	}
-	
-	char *arg_buf = malloc(buffer_size);
-	if (arg_buf == NULL)
-		return ENOMEM;
-	
-	/* Now fill the buffer with null-terminated argument strings */
-	ap = argv;
-	char *dp = arg_buf;
-	
-	while (*ap != NULL) {
-		str_cpy(dp, buffer_size - (dp - arg_buf), *ap);
-		dp += str_size(*ap) + 1;
-		ap++;
-	}
-	
-	/* Send serialized arguments to the loader */
-	ipc_call_t answer;
-	aid_t req = async_send_0(ldr->phone_id, LOADER_SET_ARGS, &answer);
-	ipcarg_t rc = async_data_write_start(ldr->phone_id, (void *) arg_buf, buffer_size);
-	if (rc != EOK) {
-		async_wait_for(req, NULL);
-		return rc;
-	}
-	
-	async_wait_for(req, &rc);
-	if (rc != EOK)
-		return rc;
-	
-	/* Free temporary buffer */
-	free(arg_buf);
-	
-	return EOK;
-}
-
-/** Set preset files for the program.
- *
- * Sets the vector of preset files to be passed to the loaded
- * program. By convention, the first three files represent stdin,
- * stdout and stderr respectively.
- *
- * @param ldr   Loader connection structure.
- * @param files NULL-terminated array of pointers to files.
- *
- * @return Zero on success or negative error code.
- *
- */
-int loader_set_files(loader_t *ldr, fdi_node_t *const files[])
-{
-	/*
-	 * Serialize the arguments into a single array. First
-	 * compute size of the buffer needed.
-	 */
-	fdi_node_t *const *ap = files;
-	size_t count = 0;
-	while (*ap != NULL) {
-		count++;
-		ap++;
-	}
-	
-	fdi_node_t *files_buf;
-	files_buf = (fdi_node_t *) malloc(count * sizeof(fdi_node_t));
-	if (files_buf == NULL)
-		return ENOMEM;
-	
-	/* Fill the buffer */
-	size_t i;
-	for (i = 0; i < count; i++)
-		files_buf[i] = *files[i];
-	
-	/* Send serialized files to the loader */
-	ipc_call_t answer;
-	aid_t req = async_send_0(ldr->phone_id, LOADER_SET_FILES, &answer);
-	ipcarg_t rc = async_data_write_start(ldr->phone_id, (void *) files_buf,
-	    count * sizeof(fdi_node_t));
-	if (rc != EOK) {
-		async_wait_for(req, NULL);
-		return rc;
-	}
-	
-	async_wait_for(req, &rc);
-	if (rc != EOK)
-		return rc;
-	
-	/* Free temporary buffer */
-	free(files_buf);
-	
-	return EOK;
-}
-
-/** Instruct loader to load the program.
- *
- * If this function succeeds, the program has been successfully loaded
- * and is ready to be executed.
- *
- * @param ldr Loader connection structure.
- *
- * @return Zero on success or negative error code.
- *
- */
-int loader_load_program(loader_t *ldr)
-{
-	return (int) async_req_0_0(ldr->phone_id, LOADER_LOAD);
-}
-
-/** Instruct loader to execute the program.
- *
- * Note that this function blocks until the loader actually replies
- * so you cannot expect this function to return if you are debugging
- * the task and its thread is stopped.
- *
- * After using this function, no further operations must be performed
- * on the loader structure. It should be de-allocated using free().
- *
- * @param ldr Loader connection structure.
- *
- * @return Zero on success or negative error code.
- *
- */
-int loader_run(loader_t *ldr)
-{
-	int rc = async_req_0_0(ldr->phone_id, LOADER_RUN);
-	if (rc != EOK)
-		return rc;
-	
-	ipc_hangup(ldr->phone_id);
-	ldr->phone_id = 0;
-	return EOK;
-}
-
-/** Cancel the loader session.
- *
- * Tells the loader not to load any program and terminate.
- * After using this function, no further operations must be performed
- * on the loader structure. It should be de-allocated using free().
- *
- * @param ldr Loader connection structure.
- *
- * @return Zero on success or negative error code.
- *
- */
-void loader_abort(loader_t *ldr)
-{
-	ipc_hangup(ldr->phone_id);
-	ldr->phone_id = 0;
-}
-
-/** @}
- */
Index: pace/lib/libc/generic/malloc.c
===================================================================
--- uspace/lib/libc/generic/malloc.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,488 +1,0 @@
-/*
- * Copyright (c) 2009 Martin Decky
- * Copyright (c) 2009 Petr Tuma
- * 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 libc
- * @{
- */
-/** @file
- */
-
-#include <malloc.h>
-#include <bool.h>
-#include <as.h>
-#include <align.h>
-#include <macros.h>
-#include <assert.h>
-#include <errno.h>
-#include <bitops.h>
-#include <mem.h>
-#include <adt/gcdlcm.h>
-
-/* Magic used in heap headers. */
-#define HEAP_BLOCK_HEAD_MAGIC  0xBEEF0101
-
-/* Magic used in heap footers. */
-#define HEAP_BLOCK_FOOT_MAGIC  0xBEEF0202
-
-/** Allocation alignment (this also covers the alignment of fields
-    in the heap header and footer) */
-#define BASE_ALIGN  16
-
-/**
- * Either 4 * 256M on 32-bit architecures or 16 * 256M on 64-bit architectures
- */
-#define MAX_HEAP_SIZE  (sizeof(uintptr_t) << 28)
-
-/**
- *
- */
-#define STRUCT_OVERHEAD  (sizeof(heap_block_head_t) + sizeof(heap_block_foot_t))
-
-/**
- * Calculate real size of a heap block (with header and footer)
- */
-#define GROSS_SIZE(size)  ((size) + STRUCT_OVERHEAD)
-
-/**
- * Calculate net size of a heap block (without header and footer)
- */
-#define NET_SIZE(size)  ((size) - STRUCT_OVERHEAD)
-
-
-/** Header of a heap block
- *
- */
-typedef struct {
-	/* Size of the block (including header and footer) */
-	size_t size;
-	
-	/* Indication of a free block */
-	bool free;
-	
-	/* A magic value to detect overwrite of heap header */
-	uint32_t magic;
-} heap_block_head_t;
-
-/** Footer of a heap block
- *
- */
-typedef struct {
-	/* Size of the block (including header and footer) */
-	size_t size;
-	
-	/* A magic value to detect overwrite of heap footer */
-	uint32_t magic;
-} heap_block_foot_t;
-
-/** Linker heap symbol */
-extern char _heap;
-
-/** Address of heap start */
-static void *heap_start = 0;
-
-/** Address of heap end */
-static void *heap_end = 0;
-
-/** Maximum heap size */
-static size_t max_heap_size = (size_t) -1;
-
-/** Current number of pages of heap area */
-static size_t heap_pages = 0;
-
-/** Initialize a heap block
- *
- * Fills in the structures related to a heap block.
- *
- * @param addr Address of the block.
- * @param size Size of the block including the header and the footer.
- * @param free Indication of a free block.
- *
- */
-static void block_init(void *addr, size_t size, bool free)
-{
-	/* Calculate the position of the header and the footer */
-	heap_block_head_t *head = (heap_block_head_t *) addr;
-	heap_block_foot_t *foot =
-	    (heap_block_foot_t *) (addr + size - sizeof(heap_block_foot_t));
-	
-	head->size = size;
-	head->free = free;
-	head->magic = HEAP_BLOCK_HEAD_MAGIC;
-	
-	foot->size = size;
-	foot->magic = HEAP_BLOCK_FOOT_MAGIC;
-}
-
-/** Check a heap block
- *
- * Verifies that the structures related to a heap block still contain
- * the magic constants. This helps detect heap corruption early on.
- *
- * @param addr Address of the block.
- *
- */
-static void block_check(void *addr)
-{
-	heap_block_head_t *head = (heap_block_head_t *) addr;
-	
-	assert(head->magic == HEAP_BLOCK_HEAD_MAGIC);
-	
-	heap_block_foot_t *foot =
-	    (heap_block_foot_t *) (addr + head->size - sizeof(heap_block_foot_t));
-	
-	assert(foot->magic == HEAP_BLOCK_FOOT_MAGIC);
-	assert(head->size == foot->size);
-}
-
-static bool grow_heap(size_t size)
-{
-	if (size == 0)
-		return false;
-
-	if ((heap_start + size < heap_start) || (heap_end + size < heap_end))
-		return false;
-	
-	size_t heap_size = (size_t) (heap_end - heap_start);
-	
-	if ((max_heap_size != (size_t) -1) && (heap_size + size > max_heap_size))
-		return false;
-	
-	size_t pages = (size - 1) / PAGE_SIZE + 1;
-	
-	if (as_area_resize((void *) &_heap, (heap_pages + pages) * PAGE_SIZE, 0)
-	    == EOK) {
-		void *end = (void *) ALIGN_DOWN(((uintptr_t) &_heap) +
-		    (heap_pages + pages) * PAGE_SIZE, BASE_ALIGN);
-		block_init(heap_end, end - heap_end, true);
-		heap_pages += pages;
-		heap_end = end;
-		return true;
-	}
-	
-	return false;
-}
-
-static void shrink_heap(void)
-{
-	// TODO
-}
-
-/** Initialize the heap allocator
- *
- * Finds how much physical memory we have and creates
- * the heap management structures that mark the whole
- * physical memory as a single free block.
- *
- */
-void __heap_init(void)
-{
-	if (as_area_create((void *) &_heap, PAGE_SIZE,
-	    AS_AREA_WRITE | AS_AREA_READ)) {
-		heap_pages = 1;
-		heap_start = (void *) ALIGN_UP((uintptr_t) &_heap, BASE_ALIGN);
-		heap_end =
-		    (void *) ALIGN_DOWN(((uintptr_t) &_heap) + PAGE_SIZE, BASE_ALIGN);
-		
-		/* Make the entire area one large block. */
-		block_init(heap_start, heap_end - heap_start, true);
-	}
-}
-
-uintptr_t get_max_heap_addr(void)
-{
-	if (max_heap_size == (size_t) -1)
-		max_heap_size =
-		    max((size_t) (heap_end - heap_start), MAX_HEAP_SIZE);
-	
-	return ((uintptr_t) heap_start + max_heap_size);
-}
-
-static void split_mark(heap_block_head_t *cur, const size_t size)
-{
-	assert(cur->size >= size);
-	
-	/* See if we should split the block. */
-	size_t split_limit = GROSS_SIZE(size);
-	
-	if (cur->size > split_limit) {
-		/* Block big enough -> split. */
-		void *next = ((void *) cur) + size;
-		block_init(next, cur->size - size, true);
-		block_init(cur, size, false);
-	} else {
-		/* Block too small -> use as is. */
-		cur->free = false;
-	}
-}
-
-/** Allocate a memory block
- *
- * @param size  The size of the block to allocate.
- * @param align Memory address alignment.
- *
- * @return the address of the block or NULL when not enough memory.
- *
- */
-static void *malloc_internal(const size_t size, const size_t align)
-{
-	if (align == 0)
-		return NULL;
-	
-	size_t falign = lcm(align, BASE_ALIGN);
-	size_t real_size = GROSS_SIZE(ALIGN_UP(size, falign));
-	
-	bool grown = false;
-	void *result;
-	
-loop:
-	result = NULL;
-	heap_block_head_t *cur = (heap_block_head_t *) heap_start;
-	
-	while ((result == NULL) && ((void *) cur < heap_end)) {
-		block_check(cur);
-		
-		/* Try to find a block that is free and large enough. */
-		if ((cur->free) && (cur->size >= real_size)) {
-			/* We have found a suitable block.
-			   Check for alignment properties. */
-			void *addr = ((void *) cur) + sizeof(heap_block_head_t);
-			void *aligned = (void *) ALIGN_UP(addr, falign);
-			
-			if (addr == aligned) {
-				/* Exact block start including alignment. */
-				split_mark(cur, real_size);
-				result = addr;
-			} else {
-				/* Block start has to be aligned */
-				size_t excess = (size_t) (aligned - addr);
-				
-				if (cur->size >= real_size + excess) {
-					/* The current block is large enough to fit
-					   data in including alignment */
-					if ((void *) cur > heap_start) {
-						/* There is a block before the current block.
-						   This previous block can be enlarged to compensate
-						   for the alignment excess */
-						heap_block_foot_t *prev_foot =
-						    ((void *) cur) - sizeof(heap_block_foot_t);
-						
-						heap_block_head_t *prev_head =
-						    (heap_block_head_t *) (((void *) cur) - prev_foot->size);
-						
-						block_check(prev_head);
-						
-						size_t reduced_size = cur->size - excess;
-						heap_block_head_t *next_head = ((void *) cur) + excess;
-						
-						if ((!prev_head->free) && (excess >= STRUCT_OVERHEAD)) {
-							/* The previous block is not free and there is enough
-							   space to fill in a new free block between the previous
-							   and current block */
-							block_init(cur, excess, true);
-						} else {
-							/* The previous block is free (thus there is no need to
-							   induce additional fragmentation to the heap) or the
-							   excess is small, thus just enlarge the previous block */
-							block_init(prev_head, prev_head->size + excess, prev_head->free);
-						}
-						
-						block_init(next_head, reduced_size, true);
-						split_mark(next_head, real_size);
-						result = aligned;
-						cur = next_head;
-					} else {
-						/* The current block is the first block on the heap.
-						   We have to make sure that the alignment excess
-						   is large enough to fit a new free block just
-						   before the current block */
-						while (excess < STRUCT_OVERHEAD) {
-							aligned += falign;
-							excess += falign;
-						}
-						
-						/* Check for current block size again */
-						if (cur->size >= real_size + excess) {
-							size_t reduced_size = cur->size - excess;
-							cur = (heap_block_head_t *) (heap_start + excess);
-							
-							block_init(heap_start, excess, true);
-							block_init(cur, reduced_size, true);
-							split_mark(cur, real_size);
-							result = aligned;
-						}
-					}
-				}
-			}
-		}
-		
-		/* Advance to the next block. */
-		cur = (heap_block_head_t *) (((void *) cur) + cur->size);
-	}
-	
-	if ((result == NULL) && (!grown)) {
-		if (grow_heap(real_size)) {
-			grown = true;
-			goto loop;
-		}
-	}
-	
-	return result;
-}
-
-void *calloc(const size_t nmemb, const size_t size)
-{
-	void *block = malloc(nmemb * size);
-	if (block == NULL)
-		return NULL;
-
-	memset(block, 0, nmemb * size);
-	return block;
-}
-
-void *malloc(const size_t size)
-{
-	return malloc_internal(size, BASE_ALIGN);
-}
-
-void *memalign(const size_t align, const size_t size)
-{
-	if (align == 0)
-		return NULL;
-	
-	size_t palign =
-	    1 << (fnzb(max(sizeof(void *), align) - 1) + 1);
-	
-	return malloc_internal(size, palign);
-}
-
-void *realloc(const void *addr, const size_t size)
-{
-	if (addr == NULL)
-		return malloc(size);
-	
-	/* Calculate the position of the header. */
-	heap_block_head_t *head =
-	    (heap_block_head_t *) (addr - sizeof(heap_block_head_t));
-	
-	assert((void *) head >= heap_start);
-	assert((void *) head < heap_end);
-	
-	block_check(head);
-	assert(!head->free);
-	
-	void *ptr = NULL;
-	size_t real_size = GROSS_SIZE(ALIGN_UP(size, BASE_ALIGN));
-	size_t orig_size = head->size;
-	
-	if (orig_size > real_size) {
-		/* Shrink */
-		if (orig_size - real_size >= STRUCT_OVERHEAD) {
-			/* Split the original block to a full block
-			   and a trailing free block */
-			block_init((void *) head, real_size, false);
-			block_init((void *) head + real_size,
-			    orig_size - real_size, true);
-			shrink_heap();
-		}
-		
-		ptr = ((void *) head) + sizeof(heap_block_head_t);
-	} else {
-		/* Look at the next block. If it is free and the size is
-		   sufficient then merge the two. */
-		heap_block_head_t *next_head =
-		    (heap_block_head_t *) (((void *) head) + head->size);
-		
-		if (((void *) next_head < heap_end) &&
-		    (head->size + next_head->size >= real_size) &&
-		    (next_head->free)) {
-			block_check(next_head);
-			block_init(head, head->size + next_head->size, false);
-			split_mark(head, real_size);
-			
-			ptr = ((void *) head) + sizeof(heap_block_head_t);
-		} else {
-			ptr = malloc(size);
-			if (ptr != NULL) {
-				memcpy(ptr, addr, NET_SIZE(orig_size));
-				free(addr);
-			}
-		}
-	}
-	
-	return ptr;
-}
-
-/** Free a memory block
- *
- * @param addr The address of the block.
- */
-void free(const void *addr)
-{
-	/* Calculate the position of the header. */
-	heap_block_head_t *head
-	    = (heap_block_head_t *) (addr - sizeof(heap_block_head_t));
-	
-	assert((void *) head >= heap_start);
-	assert((void *) head < heap_end);
-	
-	block_check(head);
-	assert(!head->free);
-	
-	/* Mark the block itself as free. */
-	head->free = true;
-	
-	/* Look at the next block. If it is free, merge the two. */
-	heap_block_head_t *next_head
-	    = (heap_block_head_t *) (((void *) head) + head->size);
-	
-	if ((void *) next_head < heap_end) {
-		block_check(next_head);
-		if (next_head->free)
-			block_init(head, head->size + next_head->size, true);
-	}
-	
-	/* Look at the previous block. If it is free, merge the two. */
-	if ((void *) head > heap_start) {
-		heap_block_foot_t *prev_foot =
-		    (heap_block_foot_t *) (((void *) head) - sizeof(heap_block_foot_t));
-		
-		heap_block_head_t *prev_head =
-		    (heap_block_head_t *) (((void *) head) - prev_foot->size);
-		
-		block_check(prev_head);
-		
-		if (prev_head->free)
-			block_init(prev_head, prev_head->size + head->size, true);
-	}
-	
-	shrink_heap();
-}
-
-/** @}
- */
Index: pace/lib/libc/generic/mem.c
===================================================================
--- uspace/lib/libc/generic/mem.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,239 +1,0 @@
-/*
- * Copyright (c) 2005 Martin Decky
- * 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.
- */
-
-/** @addtogroup libc
- * @{
- */
-/** @file
- */
-
-#include <mem.h>
-#include <stdlib.h>
-#include <sys/types.h>
-
-/** Fill memory block with a constant value. */
-void *memset(void *dest, int b, size_t n)
-{
-	char *pb;
-	unsigned long *pw;
-	size_t word_size;
-	size_t n_words;
-
-	unsigned long pattern;
-	size_t i;
-	size_t fill;
-
-	/* Fill initial segment. */
-	word_size = sizeof(unsigned long);
-	fill = word_size - ((uintptr_t) dest & (word_size - 1));
-	if (fill > n) fill = n;
-
-	pb = dest;
-
-	i = fill;
-	while (i-- != 0)
-		*pb++ = b;
-
-	/* Compute remaining size. */
-	n -= fill;
-	if (n == 0) return dest;
-
-	n_words = n / word_size;
-	n = n % word_size;
-	pw = (unsigned long *) pb;
-
-	/* Create word-sized pattern for aligned segment. */
-	pattern = 0;
-	i = word_size;
-	while (i-- != 0)
-		pattern = (pattern << 8) | (uint8_t) b;
-
-	/* Fill aligned segment. */
-	i = n_words;
-	while (i-- != 0)
-		*pw++ = pattern;
-
-	pb = (char *) pw;
-
-	/* Fill final segment. */
-	i = n;
-	while (i-- != 0)
-		*pb++ = b;
-
-	return dest;
-}
-
-struct along {
-	unsigned long n;
-} __attribute__ ((packed));
-
-static void *unaligned_memcpy(void *dst, const void *src, size_t n)
-{
-	size_t i, j;
-	struct along *adst = dst;
-	const struct along *asrc = src;
-
-	for (i = 0; i < n / sizeof(unsigned long); i++)
-		adst[i].n = asrc[i].n;
-		
-	for (j = 0; j < n % sizeof(unsigned long); j++)
-		((unsigned char *) (((unsigned long *) dst) + i))[j] =
-		    ((unsigned char *) (((unsigned long *) src) + i))[j];
-		
-	return (char *) dst;
-}
-
-/** Copy memory block. */
-void *memcpy(void *dst, const void *src, size_t n)
-{
-	size_t i;
-	size_t mod, fill;
-	size_t word_size;
-	size_t n_words;
-
-	const unsigned long *srcw;
-	unsigned long *dstw;
-	const uint8_t *srcb;
-	uint8_t *dstb;
-
-	word_size = sizeof(unsigned long);
-
-	/*
-	 * Are source and destination addresses congruent modulo word_size?
-	 * If not, use unaligned_memcpy().
-	 */
-
-	if (((uintptr_t) dst & (word_size - 1)) !=
-	    ((uintptr_t) src & (word_size - 1)))
- 		return unaligned_memcpy(dst, src, n);
-
-	/*
-	 * mod is the address modulo word size. fill is the length of the
-	 * initial buffer segment before the first word boundary.
-	 * If the buffer is very short, use unaligned_memcpy(), too.
-	 */
-
-	mod = (uintptr_t) dst & (word_size - 1);
-	fill = word_size - mod;
-	if (fill > n) fill = n;
-
-	/* Copy the initial segment. */
-
-	srcb = src;
-	dstb = dst;
-
-	i = fill;
-	while (i-- != 0)
-		*dstb++ = *srcb++;
-
-	/* Compute remaining length. */
-
-	n -= fill;
-	if (n == 0) return dst;
-
-	/* Pointers to aligned segment. */
-
-	dstw = (unsigned long *) dstb;
-	srcw = (const unsigned long *) srcb;
-
-	n_words = n / word_size;	/* Number of whole words to copy. */
-	n -= n_words * word_size;	/* Remaining bytes at the end. */
-
-	/* "Fast" copy. */
-	i = n_words;
-	while (i-- != 0)
-		*dstw++ = *srcw++;
-
-	/*
-	 * Copy the rest.
-	 */
-
-	srcb = (const uint8_t *) srcw;
-	dstb = (uint8_t *) dstw;
-
-	i = n;
-	while (i-- != 0)
-		*dstb++ = *srcb++;
-
-	return dst;
-}
-
-/** Move memory block with possible overlapping. */
-void *memmove(void *dst, const void *src, size_t n)
-{
-	const uint8_t *sp;
-	uint8_t *dp;
-
-	/* Nothing to do? */
-	if (src == dst)
-		return dst;
-
-	/* Non-overlapping? */
-	if (dst >= src + n || src >= dst + n) {	
-		return memcpy(dst, src, n);
-	}
-
-	/* Which direction? */
-	if (src > dst) {
-		/* Forwards. */
-		sp = src;
-		dp = dst;
-
-		while (n-- != 0)
-			*dp++ = *sp++;
-	} else {
-		/* Backwards. */
-		sp = src + (n - 1);
-		dp = dst + (n - 1);
-
-		while (n-- != 0)
-			*dp-- = *sp--;
-	}
-
-	return dst;
-}
-
-/** Compare two memory areas.
- *
- * @param s1		Pointer to the first area to compare.
- * @param s2		Pointer to the second area to compare.
- * @param len		Size of the first area in bytes. Both areas must have
- * 			the same length.
- * @return		If len is 0, return zero. If the areas match, return
- * 			zero. Otherwise return non-zero.
- */
-int bcmp(const char *s1, const char *s2, size_t len)
-{
-	for (; len && *s1++ == *s2++; len--)
-		;
-	return len;
-}
-
-/** @}
- */
Index: pace/lib/libc/generic/mman.c
===================================================================
--- uspace/lib/libc/generic/mman.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,61 +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 libc
- * @{
- */
-/** @file
- */
-
-#include <sys/mman.h>
-#include <sys/types.h>
-#include <as.h>
-#include <unistd.h>
-
-void *mmap(void *start, size_t length, int prot, int flags, int fd,
-    aoff64_t offset)
-{
-	if (!start)
-		start = as_get_mappable_page(length);
-	
-//	if (!((flags & MAP_SHARED) ^ (flags & MAP_PRIVATE)))
-//		return MAP_FAILED;
-	
-	if (!(flags & MAP_ANONYMOUS))
-		return MAP_FAILED;
-	
-	return as_area_create(start, length, prot);
-}
-
-int munmap(void *start, size_t length)
-{
-	return as_area_destroy(start);
-}
-
-/** @}
- */
Index: pace/lib/libc/generic/pcb.c
===================================================================
--- uspace/lib/libc/generic/pcb.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,40 +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.
- */
-
-/** @addtogroup libc
- * @{
- */
-/** @file
- */
-
-#include <loader/pcb.h>
-
-pcb_t *__pcb;
-
-/** @}
- */
Index: pace/lib/libc/generic/smc.c
===================================================================
--- uspace/lib/libc/generic/smc.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,46 +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.
- */
-
-/** @addtogroup libc
- * @{
- */
-/** @file
- */
-
-#include <libc.h>
-#include <sys/types.h>
-#include <smc.h>
-
-int smc_coherence(void *address, size_t size)
-{
-	return __SYSCALL2(SYS_SMC_COHERENCE, (sysarg_t) address,
-	    (sysarg_t) size);
-}
-
-/** @}
- */
Index: pace/lib/libc/generic/stacktrace.c
===================================================================
--- uspace/lib/libc/generic/stacktrace.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,78 +1,0 @@
-/*
- * Copyright (c) 2009 Jakub Jermar
- * 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 libc
- * @{
- */
-/** @file
- */
-
-#include <stacktrace.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <errno.h>
-
-static int stacktrace_read_uintptr(void *arg, uintptr_t addr, uintptr_t *data);
-
-void stacktrace_print_fp_pc(uintptr_t fp, uintptr_t pc)
-{
-	stacktrace_t st;
-	uintptr_t nfp;
-
-	st.op_arg = NULL;
-	st.read_uintptr = stacktrace_read_uintptr;
-
-	while (stacktrace_fp_valid(&st, fp)) {
-		printf("%p: %p()\n", fp, pc);
-		(void) stacktrace_ra_get(&st, fp, &pc);
-		(void) stacktrace_fp_prev(&st, fp, &nfp);
-		fp = nfp;
-	}
-}
-
-void stacktrace_print(void)
-{
-	stacktrace_prepare();
-	stacktrace_print_fp_pc(stacktrace_fp_get(), stacktrace_pc_get());
-	/*
-	 * Prevent the tail call optimization of the previous call by
-	 * making it a non-tail call.
-	 */
-	(void) stacktrace_fp_get();
-}
-
-static int stacktrace_read_uintptr(void *arg, uintptr_t addr, uintptr_t *data)
-{
-	(void) arg;
-	*data = *((uintptr_t *) addr);
-	return EOK;
-}
-
-/** @}
- */
Index: pace/lib/libc/generic/stdlib.c
===================================================================
--- uspace/lib/libc/generic/stdlib.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,50 +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 libc
- * @{
- */
-/** @file
- */
-
-#include <stdlib.h>
-
-static long glbl_seed = 1;
-
-long int random(void)
-{
-	return glbl_seed = ((1366*glbl_seed + 150889) % RAND_MAX);
-}
-
-void srandom(unsigned int seed)
-{
-	glbl_seed = seed;
-}
-
-/** @}
- */
Index: pace/lib/libc/generic/string.c
===================================================================
--- uspace/lib/libc/generic/string.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,982 +1,0 @@
-/*
- * Copyright (c) 2005 Martin Decky
- * 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.
- */
-
-/** @addtogroup libc
- * @{
- */
-/** @file
- */
-
-#include <string.h>
-#include <stdlib.h>
-#include <assert.h>
-#include <limits.h>
-#include <ctype.h>
-#include <malloc.h>
-#include <errno.h>
-#include <align.h>
-#include <mem.h>
-#include <string.h>
-
-/** Byte mask consisting of lowest @n bits (out of 8) */
-#define LO_MASK_8(n)  ((uint8_t) ((1 << (n)) - 1))
-
-/** Byte mask consisting of lowest @n bits (out of 32) */
-#define LO_MASK_32(n)  ((uint32_t) ((1 << (n)) - 1))
-
-/** Byte mask consisting of highest @n bits (out of 8) */
-#define HI_MASK_8(n)  (~LO_MASK_8(8 - (n)))
-
-/** Number of data bits in a UTF-8 continuation byte */
-#define CONT_BITS  6
-
-/** Decode a single character from a string.
- *
- * Decode a single character from a string of size @a size. Decoding starts
- * at @a offset and this offset is moved to the beginning of the next
- * character. In case of decoding error, offset generally advances at least
- * by one. However, offset is never moved beyond size.
- *
- * @param str    String (not necessarily NULL-terminated).
- * @param offset Byte offset in string where to start decoding.
- * @param size   Size of the string (in bytes).
- *
- * @return Value of decoded character, U_SPECIAL on decoding error or
- *         NULL if attempt to decode beyond @a size.
- *
- */
-wchar_t str_decode(const char *str, size_t *offset, size_t size)
-{
-	if (*offset + 1 > size)
-		return 0;
-	
-	/* First byte read from string */
-	uint8_t b0 = (uint8_t) str[(*offset)++];
-	
-	/* Determine code length */
-	
-	unsigned int b0_bits;  /* Data bits in first byte */
-	unsigned int cbytes;   /* Number of continuation bytes */
-	
-	if ((b0 & 0x80) == 0) {
-		/* 0xxxxxxx (Plain ASCII) */
-		b0_bits = 7;
-		cbytes = 0;
-	} else if ((b0 & 0xe0) == 0xc0) {
-		/* 110xxxxx 10xxxxxx */
-		b0_bits = 5;
-		cbytes = 1;
-	} else if ((b0 & 0xf0) == 0xe0) {
-		/* 1110xxxx 10xxxxxx 10xxxxxx */
-		b0_bits = 4;
-		cbytes = 2;
-	} else if ((b0 & 0xf8) == 0xf0) {
-		/* 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx */
-		b0_bits = 3;
-		cbytes = 3;
-	} else {
-		/* 10xxxxxx -- unexpected continuation byte */
-		return U_SPECIAL;
-	}
-	
-	if (*offset + cbytes > size)
-		return U_SPECIAL;
-	
-	wchar_t ch = b0 & LO_MASK_8(b0_bits);
-	
-	/* Decode continuation bytes */
-	while (cbytes > 0) {
-		uint8_t b = (uint8_t) str[(*offset)++];
-		
-		/* Must be 10xxxxxx */
-		if ((b & 0xc0) != 0x80)
-			return U_SPECIAL;
-		
-		/* Shift data bits to ch */
-		ch = (ch << CONT_BITS) | (wchar_t) (b & LO_MASK_8(CONT_BITS));
-		cbytes--;
-	}
-	
-	return ch;
-}
-
-/** Encode a single character to string representation.
- *
- * Encode a single character to string representation (i.e. UTF-8) and store
- * it into a buffer at @a offset. Encoding starts at @a offset and this offset
- * is moved to the position where the next character can be written to.
- *
- * @param ch     Input character.
- * @param str    Output buffer.
- * @param offset Byte offset where to start writing.
- * @param size   Size of the output buffer (in bytes).
- *
- * @return EOK if the character was encoded successfully, EOVERFLOW if there
- *         was not enough space in the output buffer or EINVAL if the character
- *         code was invalid.
- */
-int chr_encode(const wchar_t ch, char *str, size_t *offset, size_t size)
-{
-	if (*offset >= size)
-		return EOVERFLOW;
-	
-	if (!chr_check(ch))
-		return EINVAL;
-	
-	/* Unsigned version of ch (bit operations should only be done
-	   on unsigned types). */
-	uint32_t cc = (uint32_t) ch;
-	
-	/* Determine how many continuation bytes are needed */
-	
-	unsigned int b0_bits;  /* Data bits in first byte */
-	unsigned int cbytes;   /* Number of continuation bytes */
-	
-	if ((cc & ~LO_MASK_32(7)) == 0) {
-		b0_bits = 7;
-		cbytes = 0;
-	} else if ((cc & ~LO_MASK_32(11)) == 0) {
-		b0_bits = 5;
-		cbytes = 1;
-	} else if ((cc & ~LO_MASK_32(16)) == 0) {
-		b0_bits = 4;
-		cbytes = 2;
-	} else if ((cc & ~LO_MASK_32(21)) == 0) {
-		b0_bits = 3;
-		cbytes = 3;
-	} else {
-		/* Codes longer than 21 bits are not supported */
-		return EINVAL;
-	}
-	
-	/* Check for available space in buffer */
-	if (*offset + cbytes >= size)
-		return EOVERFLOW;
-	
-	/* Encode continuation bytes */
-	unsigned int i;
-	for (i = cbytes; i > 0; i--) {
-		str[*offset + i] = 0x80 | (cc & LO_MASK_32(CONT_BITS));
-		cc = cc >> CONT_BITS;
-	}
-	
-	/* Encode first byte */
-	str[*offset] = (cc & LO_MASK_32(b0_bits)) | HI_MASK_8(8 - b0_bits - 1);
-	
-	/* Advance offset */
-	*offset += cbytes + 1;
-	
-	return EOK;
-}
-
-/** Get size of string.
- *
- * Get the number of bytes which are used by the string @a str (excluding the
- * NULL-terminator).
- *
- * @param str String to consider.
- *
- * @return Number of bytes used by the string
- *
- */
-size_t str_size(const char *str)
-{
-	size_t size = 0;
-	
-	while (*str++ != 0)
-		size++;
-	
-	return size;
-}
-
-/** Get size of wide string.
- *
- * Get the number of bytes which are used by the wide string @a str (excluding the
- * NULL-terminator).
- *
- * @param str Wide string to consider.
- *
- * @return Number of bytes used by the wide string
- *
- */
-size_t wstr_size(const wchar_t *str)
-{
-	return (wstr_length(str) * sizeof(wchar_t));
-}
-
-/** Get size of string with length limit.
- *
- * Get the number of bytes which are used by up to @a max_len first
- * characters in the string @a str. If @a max_len is greater than
- * the length of @a str, the entire string is measured (excluding the
- * NULL-terminator).
- *
- * @param str     String to consider.
- * @param max_len Maximum number of characters to measure.
- *
- * @return Number of bytes used by the characters.
- *
- */
-size_t str_lsize(const char *str, size_t max_len)
-{
-	size_t len = 0;
-	size_t offset = 0;
-	
-	while (len < max_len) {
-		if (str_decode(str, &offset, STR_NO_LIMIT) == 0)
-			break;
-		
-		len++;
-	}
-	
-	return offset;
-}
-
-/** Get size of wide string with length limit.
- *
- * Get the number of bytes which are used by up to @a max_len first
- * wide characters in the wide string @a str. If @a max_len is greater than
- * the length of @a str, the entire wide string is measured (excluding the
- * NULL-terminator).
- *
- * @param str     Wide string to consider.
- * @param max_len Maximum number of wide characters to measure.
- *
- * @return Number of bytes used by the wide characters.
- *
- */
-size_t wstr_lsize(const wchar_t *str, size_t max_len)
-{
-	return (wstr_nlength(str, max_len * sizeof(wchar_t)) * sizeof(wchar_t));
-}
-
-/** Get number of characters in a string.
- *
- * @param str NULL-terminated string.
- *
- * @return Number of characters in string.
- *
- */
-size_t str_length(const char *str)
-{
-	size_t len = 0;
-	size_t offset = 0;
-	
-	while (str_decode(str, &offset, STR_NO_LIMIT) != 0)
-		len++;
-	
-	return len;
-}
-
-/** Get number of characters in a wide string.
- *
- * @param str NULL-terminated wide string.
- *
- * @return Number of characters in @a str.
- *
- */
-size_t wstr_length(const wchar_t *wstr)
-{
-	size_t len = 0;
-	
-	while (*wstr++ != 0)
-		len++;
-	
-	return len;
-}
-
-/** Get number of characters in a string with size limit.
- *
- * @param str  NULL-terminated string.
- * @param size Maximum number of bytes to consider.
- *
- * @return Number of characters in string.
- *
- */
-size_t str_nlength(const char *str, size_t size)
-{
-	size_t len = 0;
-	size_t offset = 0;
-	
-	while (str_decode(str, &offset, size) != 0)
-		len++;
-	
-	return len;
-}
-
-/** Get number of characters in a string with size limit.
- *
- * @param str  NULL-terminated string.
- * @param size Maximum number of bytes to consider.
- *
- * @return Number of characters in string.
- *
- */
-size_t wstr_nlength(const wchar_t *str, size_t size)
-{
-	size_t len = 0;
-	size_t limit = ALIGN_DOWN(size, sizeof(wchar_t));
-	size_t offset = 0;
-	
-	while ((offset < limit) && (*str++ != 0)) {
-		len++;
-		offset += sizeof(wchar_t);
-	}
-	
-	return len;
-}
-
-/** Check whether character is plain ASCII.
- *
- * @return True if character is plain ASCII.
- *
- */
-bool ascii_check(wchar_t ch)
-{
-	if ((ch >= 0) && (ch <= 127))
-		return true;
-	
-	return false;
-}
-
-/** Check whether character is valid
- *
- * @return True if character is a valid Unicode code point.
- *
- */
-bool chr_check(wchar_t ch)
-{
-	if ((ch >= 0) && (ch <= 1114111))
-		return true;
-	
-	return false;
-}
-
-/** Compare two NULL terminated strings.
- *
- * Do a char-by-char comparison of two NULL-terminated strings.
- * The strings are considered equal iff they consist of the same
- * characters on the minimum of their lengths.
- *
- * @param s1 First string to compare.
- * @param s2 Second string to compare.
- *
- * @return 0 if the strings are equal, -1 if first is smaller,
- *         1 if second smaller.
- *
- */
-int str_cmp(const char *s1, const char *s2)
-{
-	wchar_t c1 = 0;
-	wchar_t c2 = 0;
-	
-	size_t off1 = 0;
-	size_t off2 = 0;
-
-	while (true) {
-		c1 = str_decode(s1, &off1, STR_NO_LIMIT);
-		c2 = str_decode(s2, &off2, STR_NO_LIMIT);
-
-		if (c1 < c2)
-			return -1;
-		
-		if (c1 > c2)
-			return 1;
-
-		if (c1 == 0 || c2 == 0)
-			break;		
-	}
-
-	return 0;
-}
-
-/** Compare two NULL terminated strings with length limit.
- *
- * Do a char-by-char comparison of two NULL-terminated strings.
- * The strings are considered equal iff they consist of the same
- * characters on the minimum of their lengths and the length limit.
- *
- * @param s1      First string to compare.
- * @param s2      Second string to compare.
- * @param max_len Maximum number of characters to consider.
- *
- * @return 0 if the strings are equal, -1 if first is smaller,
- *         1 if second smaller.
- *
- */
-int str_lcmp(const char *s1, const char *s2, size_t max_len)
-{
-	wchar_t c1 = 0;
-	wchar_t c2 = 0;
-	
-	size_t off1 = 0;
-	size_t off2 = 0;
-	
-	size_t len = 0;
-
-	while (true) {
-		if (len >= max_len)
-			break;
-
-		c1 = str_decode(s1, &off1, STR_NO_LIMIT);
-		c2 = str_decode(s2, &off2, STR_NO_LIMIT);
-
-		if (c1 < c2)
-			return -1;
-
-		if (c1 > c2)
-			return 1;
-
-		if (c1 == 0 || c2 == 0)
-			break;
-
-		++len;	
-	}
-
-	return 0;
-
-}
-
-/** Copy string.
- *
- * Copy source string @a src to destination buffer @a dest.
- * No more than @a size bytes are written. If the size of the output buffer
- * is at least one byte, the output string will always be well-formed, i.e.
- * null-terminated and containing only complete characters.
- *
- * @param dest   Destination buffer.
- * @param count Size of the destination buffer (must be > 0).
- * @param src   Source string.
- */
-void str_cpy(char *dest, size_t size, const char *src)
-{
-	wchar_t ch;
-	size_t src_off;
-	size_t dest_off;
-
-	/* There must be space for a null terminator in the buffer. */
-	assert(size > 0);
-	
-	src_off = 0;
-	dest_off = 0;
-
-	while ((ch = str_decode(src, &src_off, STR_NO_LIMIT)) != 0) {
-		if (chr_encode(ch, dest, &dest_off, size - 1) != EOK)
-			break;
-	}
-
-	dest[dest_off] = '\0';
-}
-
-/** Copy size-limited substring.
- *
- * Copy prefix of string @a src of max. size @a size to destination buffer
- * @a dest. No more than @a size bytes are written. The output string will
- * always be well-formed, i.e. null-terminated and containing only complete
- * characters.
- *
- * No more than @a n bytes are read from the input string, so it does not
- * have to be null-terminated.
- *
- * @param dest   Destination buffer.
- * @param count Size of the destination buffer (must be > 0).
- * @param src   Source string.
- * @param n	Maximum number of bytes to read from @a src.
- */
-void str_ncpy(char *dest, size_t size, const char *src, size_t n)
-{
-	wchar_t ch;
-	size_t src_off;
-	size_t dest_off;
-
-	/* There must be space for a null terminator in the buffer. */
-	assert(size > 0);
-	
-	src_off = 0;
-	dest_off = 0;
-
-	while ((ch = str_decode(src, &src_off, n)) != 0) {
-		if (chr_encode(ch, dest, &dest_off, size - 1) != EOK)
-			break;
-	}
-
-	dest[dest_off] = '\0';
-}
-
-/** Append one string to another.
- *
- * Append source string @a src to string in destination buffer @a dest.
- * Size of the destination buffer is @a dest. If the size of the output buffer
- * is at least one byte, the output string will always be well-formed, i.e.
- * null-terminated and containing only complete characters.
- *
- * @param dest   Destination buffer.
- * @param count Size of the destination buffer.
- * @param src   Source string.
- */
-void str_append(char *dest, size_t size, const char *src)
-{
-	size_t dstr_size;
-
-	dstr_size = str_size(dest);
-	str_cpy(dest + dstr_size, size - dstr_size, src);
-}
-
-/** Convert wide string to string.
- *
- * Convert wide string @a src to string. The output is written to the buffer
- * specified by @a dest and @a size. @a size must be non-zero and the string
- * written will always be well-formed.
- *
- * @param dest	Destination buffer.
- * @param size	Size of the destination buffer.
- * @param src	Source wide string.
- */
-void wstr_to_str(char *dest, size_t size, const wchar_t *src)
-{
-	wchar_t ch;
-	size_t src_idx;
-	size_t dest_off;
-
-	/* There must be space for a null terminator in the buffer. */
-	assert(size > 0);
-	
-	src_idx = 0;
-	dest_off = 0;
-
-	while ((ch = src[src_idx++]) != 0) {
-		if (chr_encode(ch, dest, &dest_off, size - 1) != EOK)
-			break;
-	}
-
-	dest[dest_off] = '\0';
-}
-
-/** Convert wide string to new string.
- *
- * Convert wide string @a src to string. Space for the new string is allocated
- * on the heap.
- *
- * @param src	Source wide string.
- * @return	New string.
- */
-char *wstr_to_astr(const wchar_t *src)
-{
-	char dbuf[STR_BOUNDS(1)];
-	char *str;
-	wchar_t ch;
-
-	size_t src_idx;
-	size_t dest_off;
-	size_t dest_size;
-
-	/* Compute size of encoded string. */
-
-	src_idx = 0;
-	dest_size = 0;
-
-	while ((ch = src[src_idx++]) != 0) {
-		dest_off = 0;
-		if (chr_encode(ch, dbuf, &dest_off, STR_BOUNDS(1)) != EOK)
-			break;
-		dest_size += dest_off;
-	}
-
-	str = malloc(dest_size + 1);
-	if (str == NULL)
-		return NULL;
-
-	/* Encode string. */
-
-	src_idx = 0;
-	dest_off = 0;
-
-	while ((ch = src[src_idx++]) != 0) {
-		if (chr_encode(ch, str, &dest_off, dest_size) != EOK)
-			break;
-	}
-
-	str[dest_size] = '\0';
-	return str;
-}
-
-
-/** Convert string to wide string.
- *
- * Convert string @a src to wide string. The output is written to the
- * buffer specified by @a dest and @a dlen. @a dlen must be non-zero
- * and the wide string written will always be null-terminated.
- *
- * @param dest	Destination buffer.
- * @param dlen	Length of destination buffer (number of wchars).
- * @param src	Source string.
- */
-void str_to_wstr(wchar_t *dest, size_t dlen, const char *src)
-{
-	size_t offset;
-	size_t di;
-	wchar_t c;
-
-	assert(dlen > 0);
-
-	offset = 0;
-	di = 0;
-
-	do {
-		if (di >= dlen - 1)
-			break;
-
-		c = str_decode(src, &offset, STR_NO_LIMIT);
-		dest[di++] = c;
-	} while (c != '\0');
-
-	dest[dlen - 1] = '\0';
-}
-
-/** Find first occurence of character in string.
- *
- * @param str String to search.
- * @param ch  Character to look for.
- *
- * @return Pointer to character in @a str or NULL if not found.
- */
-char *str_chr(const char *str, wchar_t ch)
-{
-	wchar_t acc;
-	size_t off = 0;
-	size_t last = 0;
-	
-	while ((acc = str_decode(str, &off, STR_NO_LIMIT)) != 0) {
-		if (acc == ch)
-			return (char *) (str + last);
-		last = off;
-	}
-	
-	return NULL;
-}
-
-/** Find last occurence of character in string.
- *
- * @param str String to search.
- * @param ch  Character to look for.
- *
- * @return Pointer to character in @a str or NULL if not found.
- */
-char *str_rchr(const char *str, wchar_t ch)
-{
-	wchar_t acc;
-	size_t off = 0;
-	size_t last = 0;
-	const char *res = NULL;
-	
-	while ((acc = str_decode(str, &off, STR_NO_LIMIT)) != 0) {
-		if (acc == ch)
-			res = (str + last);
-		last = off;
-	}
-	
-	return (char *) res;
-}
-
-/** Insert a wide character into a wide string.
- *
- * Insert a wide character into a wide string at position
- * @a pos. The characters after the position are shifted.
- *
- * @param str     String to insert to.
- * @param ch      Character to insert to.
- * @param pos     Character index where to insert.
- @ @param max_pos Characters in the buffer.
- *
- * @return True if the insertion was sucessful, false if the position
- *         is out of bounds.
- *
- */
-bool wstr_linsert(wchar_t *str, wchar_t ch, size_t pos, size_t max_pos)
-{
-	size_t len = wstr_length(str);
-	
-	if ((pos > len) || (pos + 1 > max_pos))
-		return false;
-	
-	size_t i;
-	for (i = len; i + 1 > pos; i--)
-		str[i + 1] = str[i];
-	
-	str[pos] = ch;
-	
-	return true;
-}
-
-/** Remove a wide character from a wide string.
- *
- * Remove a wide character from a wide string at position
- * @a pos. The characters after the position are shifted.
- *
- * @param str String to remove from.
- * @param pos Character index to remove.
- *
- * @return True if the removal was sucessful, false if the position
- *         is out of bounds.
- *
- */
-bool wstr_remove(wchar_t *str, size_t pos)
-{
-	size_t len = wstr_length(str);
-	
-	if (pos >= len)
-		return false;
-	
-	size_t i;
-	for (i = pos + 1; i <= len; i++)
-		str[i - 1] = str[i];
-	
-	return true;
-}
-
-int stricmp(const char *a, const char *b)
-{
-	int c = 0;
-	
-	while (a[c] && b[c] && (!(tolower(a[c]) - tolower(b[c]))))
-		c++;
-	
-	return (tolower(a[c]) - tolower(b[c]));
-}
-
-/** Convert string to a number. 
- * Core of strtol and strtoul functions.
- *
- * @param nptr		Pointer to string.
- * @param endptr	If not NULL, function stores here pointer to the first
- * 			invalid character.
- * @param base		Zero or number between 2 and 36 inclusive.
- * @param sgn		It's set to 1 if minus found.
- * @return		Result of conversion.
- */
-static unsigned long
-_strtoul(const char *nptr, char **endptr, int base, char *sgn)
-{
-	unsigned char c;
-	unsigned long result = 0;
-	unsigned long a, b;
-	const char *str = nptr;
-	const char *tmpptr;
-	
-	while (isspace(*str))
-		str++;
-	
-	if (*str == '-') {
-		*sgn = 1;
-		++str;
-	} else if (*str == '+')
-		++str;
-	
-	if (base) {
-		if ((base == 1) || (base > 36)) {
-			/* FIXME: set errno to EINVAL */
-			return 0;
-		}
-		if ((base == 16) && (*str == '0') && ((str[1] == 'x') ||
-		    (str[1] == 'X'))) {
-			str += 2;
-		}
-	} else {
-		base = 10;
-		
-		if (*str == '0') {
-			base = 8;
-			if ((str[1] == 'X') || (str[1] == 'x'))  {
-				base = 16;
-				str += 2;
-			}
-		} 
-	}
-	
-	tmpptr = str;
-
-	while (*str) {
-		c = *str;
-		c = (c >= 'a' ? c - 'a' + 10 : (c >= 'A' ? c - 'A' + 10 :
-		    (c <= '9' ? c - '0' : 0xff)));
-		if (c > base) {
-			break;
-		}
-		
-		a = (result & 0xff) * base + c;
-		b = (result >> 8) * base + (a >> 8);
-		
-		if (b > (ULONG_MAX >> 8)) {
-			/* overflow */
-			/* FIXME: errno = ERANGE*/
-			return ULONG_MAX;
-		}
-	
-		result = (b << 8) + (a & 0xff);
-		++str;
-	}
-	
-	if (str == tmpptr) {
-		/*
-		 * No number was found => first invalid character is the first
-		 * character of the string.
-		 */
-		/* FIXME: set errno to EINVAL */
-		str = nptr;
-		result = 0;
-	}
-	
-	if (endptr)
-		*endptr = (char *) str;
-
-	if (nptr == str) { 
-		/*FIXME: errno = EINVAL*/
-		return 0;
-	}
-
-	return result;
-}
-
-/** Convert initial part of string to long int according to given base.
- * The number may begin with an arbitrary number of whitespaces followed by
- * optional sign (`+' or `-'). If the base is 0 or 16, the prefix `0x' may be
- * inserted and the number will be taken as hexadecimal one. If the base is 0
- * and the number begin with a zero, number will be taken as octal one (as with
- * base 8). Otherwise the base 0 is taken as decimal.
- *
- * @param nptr		Pointer to string.
- * @param endptr	If not NULL, function stores here pointer to the first
- * 			invalid character.
- * @param base		Zero or number between 2 and 36 inclusive.
- * @return		Result of conversion.
- */
-long int strtol(const char *nptr, char **endptr, int base)
-{
-	char sgn = 0;
-	unsigned long number = 0;
-	
-	number = _strtoul(nptr, endptr, base, &sgn);
-
-	if (number > LONG_MAX) {
-		if ((sgn) && (number == (unsigned long) (LONG_MAX) + 1)) {
-			/* FIXME: set 0 to errno */
-			return number;		
-		}
-		/* FIXME: set ERANGE to errno */
-		return (sgn ? LONG_MIN : LONG_MAX);	
-	}
-	
-	return (sgn ? -number : number);
-}
-
-char *str_dup(const char *src)
-{
-	size_t size = str_size(src);
-	void *dest = malloc(size + 1);
-	
-	if (dest == NULL)
-		return (char *) NULL;
-	
-	return (char *) memcpy(dest, src, size + 1);
-}
-
-char *str_ndup(const char *src, size_t max_size)
-{
-	size_t size = str_size(src);
-	if (size > max_size)
-		size = max_size;
-	
-	char *dest = (char *) malloc(size + 1);
-	
-	if (dest == NULL)
-		return (char *) NULL;
-	
-	memcpy(dest, src, size);
-	dest[size] = 0;
-	return dest;
-}
-
-
-/** Convert initial part of string to unsigned long according to given base.
- * The number may begin with an arbitrary number of whitespaces followed by
- * optional sign (`+' or `-'). If the base is 0 or 16, the prefix `0x' may be
- * inserted and the number will be taken as hexadecimal one. If the base is 0
- * and the number begin with a zero, number will be taken as octal one (as with
- * base 8). Otherwise the base 0 is taken as decimal.
- *
- * @param nptr		Pointer to string.
- * @param endptr	If not NULL, function stores here pointer to the first
- * 			invalid character
- * @param base		Zero or number between 2 and 36 inclusive.
- * @return		Result of conversion.
- */
-unsigned long strtoul(const char *nptr, char **endptr, int base)
-{
-	char sgn = 0;
-	unsigned long number = 0;
-	
-	number = _strtoul(nptr, endptr, base, &sgn);
-
-	return (sgn ? -number : number);
-}
-
-char *strtok(char *s, const char *delim)
-{
-	static char *next;
-
-	return strtok_r(s, delim, &next);
-}
-
-char *strtok_r(char *s, const char *delim, char **next)
-{
-	char *start, *end;
-
-	if (s == NULL)
-		s = *next;
-
-	/* Skip over leading delimiters. */
-	while (*s && (str_chr(delim, *s) != NULL)) ++s;
-	start = s;
-
-	/* Skip over token characters. */
-	while (*s && (str_chr(delim, *s) == NULL)) ++s;
-	end = s;
-	*next = (*s ? s + 1 : s);
-
-	if (start == end) {
-		return NULL;	/* No more tokens. */
-	}
-
-	/* Overwrite delimiter with NULL terminator. */
-	*end = '\0';
-	return start;
-}
-
-/** @}
- */
Index: pace/lib/libc/generic/sysinfo.c
===================================================================
--- uspace/lib/libc/generic/sysinfo.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,46 +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 libc
- * @{
- */
-/** @file
- */ 
-
-#include <libc.h>
-#include <sysinfo.h>
-#include <string.h>
-
-sysarg_t sysinfo_value(const char *name)
-{
-	return __SYSCALL2(SYS_SYSINFO_VALUE, (sysarg_t) name,
-	    (sysarg_t) str_size(name));
-}
-
-/** @}
- */
Index: pace/lib/libc/generic/task.c
===================================================================
--- uspace/lib/libc/generic/task.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,174 +1,0 @@
-/*
- * Copyright (c) 2006 Jakub Jermar
- * 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.
- */
-
-/** @addtogroup libc
- * @{
- */
-/** @file
- */
-
-#include <task.h>
-#include <libc.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <loader/loader.h>
-#include <string.h>
-#include <ipc/ns.h>
-#include <macros.h>
-#include <async.h>
-
-task_id_t task_get_id(void)
-{
-	task_id_t task_id;
-	(void) __SYSCALL1(SYS_TASK_GET_ID, (sysarg_t) &task_id);
-	
-	return task_id;
-}
-
-/** Set the task name.
- *
- * @param name The new name, typically the command used to execute the
- *             program.
- *
- * @return Zero on success or negative error code.
- *
- */
-int task_set_name(const char *name)
-{
-	return __SYSCALL2(SYS_TASK_SET_NAME, (sysarg_t) name, str_size(name));
-}
-
-/** Create a new task by running an executable from the filesystem.
- *
- * This is really just a convenience wrapper over the more complicated
- * loader API.
- *
- * @param path pathname of the binary to execute
- * @param argv command-line arguments
- *
- * @return ID of the newly created task or zero on error.
- *
- */
-task_id_t task_spawn(const char *path, const char *const args[])
-{
-	/* Connect to a program loader. */
-	loader_t *ldr = loader_connect();
-	if (ldr == NULL)
-		return 0;
-	
-	/* Get task ID. */
-	task_id_t task_id;
-	int rc = loader_get_task_id(ldr, &task_id);
-	if (rc != EOK)
-		goto error;
-	
-	/* Send spawner's current working directory. */
-	rc = loader_set_cwd(ldr);
-	if (rc != EOK)
-		goto error;
-	
-	/* Send program pathname. */
-	rc = loader_set_pathname(ldr, path);
-	if (rc != EOK)
-		goto error;
-	
-	/* Send arguments. */
-	rc = loader_set_args(ldr, args);
-	if (rc != EOK)
-		goto error;
-	
-	/* Send default files */
-	fdi_node_t *files[4];
-	fdi_node_t stdin_node;
-	fdi_node_t stdout_node;
-	fdi_node_t stderr_node;
-	
-	if ((stdin != NULL) && (fnode(stdin, &stdin_node) == EOK))
-		files[0] = &stdin_node;
-	else
-		files[0] = NULL;
-	
-	if ((stdout != NULL) && (fnode(stdout, &stdout_node) == EOK))
-		files[1] = &stdout_node;
-	else
-		files[1] = NULL;
-	
-	if ((stderr != NULL) && (fnode(stderr, &stderr_node) == EOK))
-		files[2] = &stderr_node;
-	else
-		files[2] = NULL;
-	
-	files[3] = NULL;
-	
-	rc = loader_set_files(ldr, files);
-	if (rc != EOK)
-		goto error;
-	
-	/* Load the program. */
-	rc = loader_load_program(ldr);
-	if (rc != EOK)
-		goto error;
-	
-	/* Run it. */
-	rc = loader_run(ldr);
-	if (rc != EOK)
-		goto error;
-	
-	/* Success */
-	free(ldr);
-	return task_id;
-	
-error:
-	/* Error exit */
-	loader_abort(ldr);
-	free(ldr);
-	
-	return 0;
-}
-
-int task_wait(task_id_t id, task_exit_t *texit, int *retval)
-{
-	ipcarg_t te, rv;
-	int rc;
-
-	rc = (int) async_req_2_2(PHONE_NS, NS_TASK_WAIT, LOWER32(id),
-	    UPPER32(id), &te, &rv);
-	*texit = te;
-	*retval = rv;
-
-	return rc;
-}
-
-int task_retval(int val)
-{
-	return (int) async_req_1_0(PHONE_NS, NS_RETVAL, val);
-}
-
-/** @}
- */
Index: pace/lib/libc/generic/thread.c
===================================================================
--- uspace/lib/libc/generic/thread.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,174 +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 libc
- * @{
- */
-/** @file
- */ 
-
-#include <thread.h>
-#include <libc.h>
-#include <stdlib.h>
-#include <libarch/faddr.h>
-#include <kernel/proc/uarg.h>
-#include <fibril.h>
-#include <string.h>
-#include <async.h>
-
-#ifndef THREAD_INITIAL_STACK_PAGES_NO
-#define THREAD_INITIAL_STACK_PAGES_NO 1
-#endif
-
-/** Main thread function.
- *
- * This function is called from __thread_entry() and is used
- * to call the thread's implementing function and perform cleanup
- * and exit when thread returns back. Do not call this function
- * directly.
- *
- * @param uarg Pointer to userspace argument structure.
- */
-void __thread_main(uspace_arg_t *uarg)
-{
-	fibril_t *f;
-
-	f = fibril_setup();
-	__tcb_set(f->tcb);
-
-	uarg->uspace_thread_function(uarg->uspace_thread_arg);
-	/* XXX: we cannot free the userspace stack while running on it */
-//	free(uarg->uspace_stack);
-//	free(uarg);
-
-	/* If there is a manager, destroy it */
-	async_destroy_manager();
-	fibril_teardown(f);
-
-	thread_exit(0);
-}
-
-/** Create userspace thread.
- *
- * This function creates new userspace thread and allocates userspace
- * stack and userspace argument structure for it.
- *
- * @param function Function implementing the thread.
- * @param arg Argument to be passed to thread.
- * @param name Symbolic name of the thread.
- * @param tid Thread ID of the newly created thread.
- *
- * @return Zero on success or a code from @ref errno.h on failure.
- */
-int thread_create(void (* function)(void *), void *arg, const char *name,
-    thread_id_t *tid)
-{
-	char *stack;
-	uspace_arg_t *uarg;
-	int rc;
-
-	stack = (char *) malloc(getpagesize() * THREAD_INITIAL_STACK_PAGES_NO);
-	if (!stack)
-		return -1;
-		
-	uarg = (uspace_arg_t *) malloc(sizeof(uspace_arg_t));
-	if (!uarg) {
-		free(stack);
-		return -1;
-	}
-	
-	uarg->uspace_entry = (void *) FADDR(__thread_entry);
-	uarg->uspace_stack = (void *) stack;
-	uarg->uspace_thread_function = function;
-	uarg->uspace_thread_arg = arg;
-	uarg->uspace_uarg = uarg;
-	
-	rc = __SYSCALL4(SYS_THREAD_CREATE, (sysarg_t) uarg, (sysarg_t) name,
-	    (sysarg_t) str_size(name), (sysarg_t) tid);
-	
-	if (rc) {
-		/*
-		 * Failed to create a new thread.
-		 * Free up the allocated structures.
-		 */
-		free(uarg);
-		free(stack);
-	}
-
-	return rc;
-}
-
-/** Terminate current thread.
- *
- * @param status Exit status. Currently not used.
- */
-void thread_exit(int status)
-{
-	__SYSCALL1(SYS_THREAD_EXIT, (sysarg_t) status);
-	for (;;)
-		;
-}
-
-/** Detach thread.
- *
- * Currently not implemented.
- *
- * @param thread TID.
- */
-void thread_detach(thread_id_t thread)
-{
-}
-
-/** Join thread.
- *
- * Currently not implemented.
- *
- * @param thread TID.
- *
- * @return Thread exit status.
- */
-int thread_join(thread_id_t thread)
-{
-	return 0;
-}
-
-/** Get current thread ID.
- *
- * @return Current thread ID.
- */
-thread_id_t thread_get_id(void)
-{
-	thread_id_t thread_id;
-
-	(void) __SYSCALL1(SYS_THREAD_GET_ID, (sysarg_t) &thread_id);
-
-	return thread_id;
-}
-
-/** @}
- */
Index: pace/lib/libc/generic/time.c
===================================================================
--- uspace/lib/libc/generic/time.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,212 +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 libc
- * @{
- */
-/** @file
- */
-
-#include <sys/time.h>
-#include <unistd.h>
-#include <ipc/ipc.h>
-#include <stdio.h>
-#include <arch/barrier.h>
-#include <unistd.h>
-#include <atomic.h>
-#include <sysinfo.h>
-#include <ipc/services.h>
-#include <libc.h>
-
-#include <sysinfo.h>
-#include <as.h>
-#include <ddi.h>
-
-#include <time.h>
-
-/* Pointers to public variables with time */
-struct {
-	volatile sysarg_t seconds1;
-	volatile sysarg_t useconds;
-	volatile sysarg_t seconds2;
-} *ktime = NULL;
-
-/** Add microseconds to given timeval.
- *
- * @param tv		Destination timeval.
- * @param usecs		Number of microseconds to add.
- */
-void tv_add(struct timeval *tv, suseconds_t usecs)
-{
-	tv->tv_sec += usecs / 1000000;
-	tv->tv_usec += usecs % 1000000;
-	if (tv->tv_usec > 1000000) {
-		tv->tv_sec++;
-		tv->tv_usec -= 1000000;
-	}
-}
-
-/** Subtract two timevals.
- *
- * @param tv1		First timeval.
- * @param tv2		Second timeval.
- *
- * @return		Return difference between tv1 and tv2 (tv1 - tv2) in
- * 			microseconds.
- */
-suseconds_t tv_sub(struct timeval *tv1, struct timeval *tv2)
-{
-	suseconds_t result;
-
-	result = tv1->tv_usec - tv2->tv_usec;
-	result += (tv1->tv_sec - tv2->tv_sec) * 1000000;
-
-	return result;
-}
-
-/** Decide if one timeval is greater than the other.
- *
- * @param t1		First timeval.
- * @param t2		Second timeval.
- *
- * @return		Return true tv1 is greater than tv2. Otherwise return
- * 			false.
- */
-int tv_gt(struct timeval *tv1, struct timeval *tv2)
-{
-	if (tv1->tv_sec > tv2->tv_sec)
-		return 1;
-	if (tv1->tv_sec == tv2->tv_sec && tv1->tv_usec > tv2->tv_usec)
-		return 1;
-	return 0;
-}
-
-/** Decide if one timeval is greater than or equal to the other.
- *
- * @param tv1		First timeval.
- * @param tv2		Second timeval.
- *
- * @return		Return true if tv1 is greater than or equal to tv2.
- * 			Otherwise return false.
- */
-int tv_gteq(struct timeval *tv1, struct timeval *tv2)
-{
-	if (tv1->tv_sec > tv2->tv_sec)
-		return 1;
-	if (tv1->tv_sec == tv2->tv_sec && tv1->tv_usec >= tv2->tv_usec)
-		return 1;
-	return 0;
-}
-
-
-/** POSIX gettimeofday
- *
- * The time variables are memory mapped(RO) from kernel, which updates
- * them periodically. As it is impossible to read 2 values atomically, we
- * use a trick: First read a seconds, then read microseconds, then
- * read seconds again. If a second elapsed in the meantime, set it to zero. 
- * This provides assurance, that at least the
- * sequence of subsequent gettimeofday calls is ordered.
- */
-int gettimeofday(struct timeval *tv, struct timezone *tz)
-{
-	void *mapping;
-	sysarg_t s1, s2;
-	int rights;
-	int res;
-
-	if (!ktime) {
-		mapping = as_get_mappable_page(PAGE_SIZE);
-		/* Get the mapping of kernel clock */
-		res = ipc_share_in_start_1_1(PHONE_NS, mapping, PAGE_SIZE,
-		    SERVICE_MEM_REALTIME, &rights);
-		if (res) {
-			printf("Failed to initialize timeofday memarea\n");
-			_exit(1);
-		}
-		if (!(rights & AS_AREA_READ)) {
-			printf("Received bad rights on time area: %X\n",
-			    rights);
-			as_area_destroy(mapping);
-			_exit(1);
-		}
-		ktime = mapping;
-	}
-	if (tz) {
-		tz->tz_minuteswest = 0;
-		tz->tz_dsttime = DST_NONE;
-	}
-
-	s2 = ktime->seconds2;
-	read_barrier();
-	tv->tv_usec = ktime->useconds;
-	read_barrier();
-	s1 = ktime->seconds1;
-	if (s1 != s2) {
-		tv->tv_usec = 0;
-		tv->tv_sec = s1 > s2 ? s1 : s2;
-	} else
-		tv->tv_sec = s1;
-
-	return 0;
-}
-
-time_t time(time_t *tloc)
-{
-	struct timeval tv;
-
-	if (gettimeofday(&tv, NULL))
-		return (time_t) -1;
-	if (tloc)
-		*tloc = tv.tv_sec;
-	return tv.tv_sec;
-}
-
-/** Wait unconditionally for specified number of microseconds */
-int usleep(useconds_t usec)
-{
-	(void) __SYSCALL1(SYS_THREAD_USLEEP, usec);
-	return 0;
-}
-
-/** Wait unconditionally for specified number of seconds */
-unsigned int sleep(unsigned int sec)
-{
-	/* Sleep in 1000 second steps to support
-	   full argument range */
-	while (sec > 0) {
-		unsigned int period = (sec > 1000) ? 1000 : sec;
-	
-		usleep(period * 1000000);
-		sec -= period;
-	}
-	return 0;
-}
-
-/** @}
- */
Index: pace/lib/libc/generic/tls.c
===================================================================
--- uspace/lib/libc/generic/tls.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,141 +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 libc
- * @{
- */
-/** @file
- *
- * Support for thread-local storage, as described in:
- * 	Drepper U.: ELF Handling For Thread-Local Storage, 2005
- *
- * Only static model is supported.
- */ 
-
-#include <tls.h>
-#include <malloc.h>
-#include <string.h>
-#include <align.h>
-
-/** Create TLS (Thread Local Storage) data structures.
- *
- * The code requires, that sections .tdata and .tbss are adjacent. It may be
- * changed in the future.
- *
- * @return Pointer to TCB.
- */
-tcb_t *__make_tls(void)
-{
-	void *data;
-	tcb_t *tcb;
-	size_t tls_size = &_tbss_end - &_tdata_start;
-	
-	tcb = __alloc_tls(&data, tls_size);
-	
-	/*
-	 * Copy thread local data from the initialization image.
-	 */
-	memcpy(data, &_tdata_start, &_tdata_end - &_tdata_start);
-	/*
-	 * Zero out the thread local uninitialized data.
-	 */
-	memset(data + (&_tbss_start - &_tdata_start), 0,
-	    &_tbss_end - &_tbss_start);
-
-	return tcb;
-}
-
-void __free_tls(tcb_t *tcb)
-{
-	size_t tls_size = &_tbss_end - &_tdata_start;
-	__free_tls_arch(tcb, tls_size);
-}
-
-#ifdef CONFIG_TLS_VARIANT_1
-/** Allocate TLS variant 1 data structures.
- *
- * @param data 		Start of TLS section. This is an output argument.
- * @param size		Size of tdata + tbss section.
- * @return 		Pointer to tcb_t structure.
- */
-tcb_t *tls_alloc_variant_1(void **data, size_t size)
-{
-	tcb_t *result;
-
-	result = malloc(sizeof(tcb_t) + size);
-	*data = ((void *)result) + sizeof(tcb_t);
-	return result;
-}
-
-/** Free TLS variant I data structures.
- *
- * @param tcb		Pointer to TCB structure.
- * @param size		This argument is ignored.
- */
-void tls_free_variant_1(tcb_t *tcb, size_t size)
-{
-	free(tcb);
-}
-#endif
-
-#ifdef CONFIG_TLS_VARIANT_2
-/** Allocate TLS variant II data structures.
- *
- * @param data		Pointer to pointer to thread local data. This is
- * 			actually an output argument.
- * @param size		Size of thread local data.
- * @return		Pointer to TCB structure.
- */
-tcb_t * tls_alloc_variant_2(void **data, size_t size)
-{
-	tcb_t *tcb;
-	
-	size = ALIGN_UP(size, &_tls_alignment);
-	*data = memalign((uintptr_t) &_tls_alignment, sizeof(tcb_t) + size);
-
-	tcb = (tcb_t *) (*data + size);
-	tcb->self = tcb;
-
-	return tcb;
-}
-
-/** Free TLS variant II data structures.
- *
- * @param tcb		Pointer to TCB structure.
- * @param size		Size of thread local data.
- */
-void tls_free_variant_2(tcb_t *tcb, size_t size)
-{
-	size = ALIGN_UP(size, &_tls_alignment);
-	void *start = ((void *) tcb) - size;
-	free(start);
-}
-#endif
-
-/** @}
- */
Index: pace/lib/libc/generic/udebug.c
===================================================================
--- uspace/lib/libc/generic/udebug.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,139 +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.
- */
-
-/** @addtogroup libc
- * @{
- */
-/** @file
- */ 
-
-#include <udebug.h>
-#include <sys/types.h>
-#include <ipc/ipc.h>
-#include <async.h>
-
-int udebug_begin(int phoneid)
-{
-	return async_req_1_0(phoneid, IPC_M_DEBUG_ALL, UDEBUG_M_BEGIN);
-}
-
-int udebug_end(int phoneid)
-{
-	return async_req_1_0(phoneid, IPC_M_DEBUG_ALL, UDEBUG_M_END);
-}
-
-int udebug_set_evmask(int phoneid, udebug_evmask_t mask)
-{
-	return async_req_2_0(phoneid, IPC_M_DEBUG_ALL, UDEBUG_M_SET_EVMASK,
-		mask);
-}
-
-int udebug_thread_read(int phoneid, void *buffer, size_t n,
-	size_t *copied, size_t *needed)
-{
-	ipcarg_t a_copied, a_needed;
-	int rc;
-
-	rc = async_req_3_3(phoneid, IPC_M_DEBUG_ALL, UDEBUG_M_THREAD_READ,
-		(sysarg_t)buffer, n, NULL, &a_copied, &a_needed);
-
-	*copied = (size_t)a_copied;
-	*needed = (size_t)a_needed;
-
-	return rc;
-}
-
-int udebug_name_read(int phoneid, void *buffer, size_t n,
-	size_t *copied, size_t *needed)
-{
-	ipcarg_t a_copied, a_needed;
-	int rc;
-
-	rc = async_req_3_3(phoneid, IPC_M_DEBUG_ALL, UDEBUG_M_NAME_READ,
-		(sysarg_t)buffer, n, NULL, &a_copied, &a_needed);
-
-	*copied = (size_t)a_copied;
-	*needed = (size_t)a_needed;
-
-	return rc;
-}
-
-int udebug_areas_read(int phoneid, void *buffer, size_t n,
-	size_t *copied, size_t *needed)
-{
-	ipcarg_t a_copied, a_needed;
-	int rc;
-
-	rc = async_req_3_3(phoneid, IPC_M_DEBUG_ALL, UDEBUG_M_AREAS_READ,
-		(sysarg_t)buffer, n, NULL, &a_copied, &a_needed);
-
-	*copied = (size_t)a_copied;
-	*needed = (size_t)a_needed;
-
-	return rc;
-}
-
-int udebug_mem_read(int phoneid, void *buffer, uintptr_t addr, size_t n)
-{
-	return async_req_4_0(phoneid, IPC_M_DEBUG_ALL, UDEBUG_M_MEM_READ,
-	    (sysarg_t)buffer, addr, n);
-}
-
-int udebug_args_read(int phoneid, thash_t tid, sysarg_t *buffer)
-{
-	return async_req_3_0(phoneid, IPC_M_DEBUG_ALL, UDEBUG_M_ARGS_READ,
-	    tid, (sysarg_t)buffer);
-}
-
-int udebug_regs_read(int phoneid, thash_t tid, void *buffer)
-{
-	return async_req_3_0(phoneid, IPC_M_DEBUG_ALL, UDEBUG_M_REGS_READ,
-	    tid, (sysarg_t)buffer);
-}
-
-int udebug_go(int phoneid, thash_t tid, udebug_event_t *ev_type,
-    sysarg_t *val0, sysarg_t *val1)
-{
-	ipcarg_t a_ev_type;
-	int rc;
-
-	rc =  async_req_2_3(phoneid, IPC_M_DEBUG_ALL, UDEBUG_M_GO,
-	    tid, &a_ev_type, val0, val1);
-
-	*ev_type = a_ev_type;
-	return rc;
-}
-
-int udebug_stop(int phoneid, thash_t tid)
-{
-	return async_req_2_0(phoneid, IPC_M_DEBUG_ALL, UDEBUG_M_STOP,
-	    tid);
-}
-
-/** @}
- */
Index: pace/lib/libc/generic/vfs/canonify.c
===================================================================
--- uspace/lib/libc/generic/vfs/canonify.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,347 +1,0 @@
-/*
- * Copyright (c) 2008 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 libc 
- * @{
- */ 
-
-/**
- * @file
- * @brief
- */
-
-#include <stdlib.h>
-#include <vfs/canonify.h>
-
-/** Token types used for tokenization of path. */
-typedef enum {
-	TK_INVALID,
-	TK_SLASH,
-	TK_DOT,
-	TK_DOTDOT,
-	TK_COMP,
-	TK_NUL
-} tokval_t;
-
-typedef struct {
-	tokval_t kind;
-	char *start;
-	char *stop;
-} token_t;
-
-/** Fake up the TK_SLASH token. */
-static token_t slash_token(char *start)
-{
-	token_t ret;
-	ret.kind = TK_SLASH;
-	ret.start = start;
-	ret.stop = start;
-	return ret;
-}
-
-/** Given a token, return the next token. */
-static token_t next_token(token_t *cur)
-{
-	token_t ret;
-
-	if (cur->stop[1] == '\0') {
-		ret.kind = TK_NUL;
-		ret.start = cur->stop + 1;
-		ret.stop = ret.start;
-		return ret;
-	}
-	if (cur->stop[1] == '/') {
-		ret.kind = TK_SLASH;
-		ret.start = cur->stop + 1;
-		ret.stop = ret.start;
-		return ret;
-	}
-	if (cur->stop[1] == '.' && (!cur->stop[2] || cur->stop[2] == '/')) {
-		ret.kind = TK_DOT;
-		ret.start = cur->stop + 1;
-		ret.stop = ret.start;
-		return ret;
-	}
-	if (cur->stop[1] == '.' && cur->stop[2] == '.' &&
-	    (!cur->stop[3] || cur->stop[3] == '/')) {
-		ret.kind = TK_DOTDOT;
-		ret.start = cur->stop + 1;
-		ret.stop = cur->stop + 2;
-		return ret;
-	}
-	unsigned i;
-	for (i = 1; cur->stop[i] && cur->stop[i] != '/'; i++)
-		;
-	ret.kind = TK_COMP;
-	ret.start = &cur->stop[1];
-	ret.stop = &cur->stop[i - 1];
-	return ret;
-}
-
-/** States used by canonify(). */
-typedef enum {
-	S_INI,
-	S_A,
-	S_B,
-	S_C,
-	S_ACCEPT,
-	S_RESTART,
-	S_REJECT
-} state_t;
-
-typedef struct {
-	state_t s;
-	void (* f)(token_t *, token_t *, token_t *);
-} change_state_t;
-
-/*
- * Actions that can be performed when transitioning from one
- * state of canonify() to another.
- */
-static void set_first_slash(token_t *t, token_t *tfsl, token_t *tlcomp)
-{
-	*tfsl = *t;
-	*tlcomp = *t;
-}
-static void save_component(token_t *t, token_t *tfsl, token_t *tlcomp)
-{
-	*tlcomp = *t;
-}
-static void terminate_slash(token_t *t, token_t *tfsl, token_t *tlcomp)
-{
-	if (tfsl->stop[1])	/* avoid writing to a well-formatted path */
-		tfsl->stop[1] = '\0';
-}
-static void remove_trailing_slash(token_t *t, token_t *tfsl, token_t *tlcomp)
-{
-	t->start[-1] = '\0';
-}
-/** Eat the extra '/'.
- *
- * @param t		The current TK_SLASH token.
- */
-static void shift_slash(token_t *t, token_t *tfsl, token_t *tlcomp)
-{
-	char *p = t->start;
-	char *q = t->stop + 1;
-	while ((*p++ = *q++))
-		;
-}
-/** Eat the extra '.'.
- *
- * @param t		The current TK_DOT token.
- */
-static void shift_dot(token_t *t, token_t *tfsl, token_t *tlcomp)
-{
-	char *p = t->start;
-	char *q = t->stop + 1;
-	while ((*p++ = *q++))
-		;
-}
-/** Collapse the TK_COMP TK_SLASH TK_DOTDOT pattern.
- *
- * @param t		The current TK_DOTDOT token.
- * @param tlcomp	The last TK_COMP token.
- */
-static void shift_dotdot(token_t *t, token_t *tfsl, token_t *tlcomp)
-{
-	char *p = tlcomp->start;
-	char *q = t->stop + 1;
-	while ((*p++ = *q++))
-		;
-}
-
-/** Transition function for canonify(). */
-static change_state_t trans[4][6] = {
-	[S_INI] = {
-		[TK_SLASH] = {
-			.s = S_A,
-			.f = set_first_slash,
-		},
-		[TK_DOT] = {
-			.s = S_REJECT,
-			.f = NULL,
-		},
-		[TK_DOTDOT] = {
-			.s = S_REJECT,
-			.f = NULL,
-		},
-		[TK_COMP] = {
-			.s = S_REJECT,
-			.f = NULL,
-		},
-		[TK_NUL] = {
-			.s = S_REJECT,
-			.f = NULL,
-		},
-		[TK_INVALID] = {
-			.s = S_REJECT,
-			.f = NULL,
-		},
-	},
-	[S_A] = {
-		[TK_SLASH] = {
-			.s = S_A,
-			.f = set_first_slash,
-		},
-		[TK_DOT] = {
-			.s = S_A,
-			.f = NULL,
-		},
-		[TK_DOTDOT] = {
-			.s = S_A,
-			.f = NULL,
-		},
-		[TK_COMP] = {
-			.s = S_B,
-			.f = save_component,
-		},
-		[TK_NUL] = {
-			.s = S_ACCEPT,
-			.f = terminate_slash,
-		},
-		[TK_INVALID] = {
-			.s = S_REJECT,
-			.f = NULL,
-		},
-	},
-	[S_B] = {
-		[TK_SLASH] = {
-			.s = S_C,
-			.f = NULL,
-		},
-		[TK_DOT] = {
-			.s = S_REJECT,
-			.f = NULL,
-		},
-		[TK_DOTDOT] = {
-			.s = S_REJECT,
-			.f = NULL,
-		},
-		[TK_COMP] = {
-			.s = S_REJECT,
-			.f = NULL,
-		},
-		[TK_NUL] = {
-			.s = S_ACCEPT,
-			.f = NULL,
-		},
-		[TK_INVALID] = {
-			.s = S_REJECT,
-			.f = NULL,
-		},
-	},
-	[S_C] = {
-		[TK_SLASH] = {
-			.s = S_RESTART,
-			.f = shift_slash,
-		},
-		[TK_DOT] = {
-			.s = S_RESTART,
-			.f = shift_dot,
-		},
-		[TK_DOTDOT] = {
-			.s = S_RESTART,
-			.f = shift_dotdot,
-		},
-		[TK_COMP] = {
-			.s = S_B,
-			.f = save_component,
-		},
-		[TK_NUL] = {
-			.s = S_ACCEPT,
-			.f = remove_trailing_slash,
-		},
-		[TK_INVALID] = {
-			.s = S_REJECT,
-			.f = NULL,
-		},
-	}
-};
-
-/** Canonify a file system path.
- *
- * A file system path is canonical, if the following holds:
- *
- * 1) the path is absolute
- *    (i.e. a/b/c is not canonical)
- * 2) there is no trailing slash in the path if it has components
- *    (i.e. /a/b/c/ is not canonical)
- * 3) there is no extra slash in the path
- *    (i.e. /a//b/c is not canonical)
- * 4) there is no '.' component in the path
- *    (i.e. /a/./b/c is not canonical)
- * 5) there is no '..' component in the path
- *    (i.e. /a/b/../c is not canonical)
- *
- * This function makes a potentially non-canonical file system path canonical.
- * It works in-place and requires a NULL-terminated input string.
- *
- * @param path		Path to be canonified.
- * @param lenp		Pointer where the length of the final path will be
- *			stored. Can be NULL.
- *
- * @return		Canonified path or NULL on failure.
- */
-char *canonify(char *path, size_t *lenp)
-{
-	state_t state;
-	token_t t;
-	token_t tfsl;		/* first slash */
-	token_t tlcomp;		/* last component */
-	if (*path != '/')
-		return NULL;
-	tfsl = slash_token(path);
-restart:
-	state = S_INI;
-	t = tfsl;
-	tlcomp = tfsl;
-	while (state != S_ACCEPT && state != S_RESTART && state != S_REJECT) {
-		if (trans[state][t.kind].f)
-			trans[state][t.kind].f(&t, &tfsl, &tlcomp);
-		state = trans[state][t.kind].s;
-		t = next_token(&t);
-	}
-	
-	switch (state) {
-	case S_RESTART:
-		goto restart;
-	case S_REJECT:
-		return NULL;
-	case S_ACCEPT:
-		if (lenp)
-			*lenp = (size_t)((tlcomp.stop - tfsl.start) + 1);
-		return tfsl.start; 
-	default:
-		abort();
-	}
-}
-
-/**
- * @}
- */
Index: pace/lib/libc/generic/vfs/vfs.c
===================================================================
--- uspace/lib/libc/generic/vfs/vfs.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,825 +1,0 @@
-/*
- * Copyright (c) 2008 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 libc
- * @{
- */
-/** @file
- */
-
-#include <vfs/vfs.h>
-#include <vfs/canonify.h>
-#include <macros.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <dirent.h>
-#include <fcntl.h>
-#include <stdio.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-#include <ipc/ipc.h>
-#include <ipc/services.h>
-#include <async.h>
-#include <atomic.h>
-#include <futex.h>
-#include <errno.h>
-#include <string.h>
-#include <devmap.h>
-#include <ipc/vfs.h>
-#include <ipc/devmap.h>
-
-static int vfs_phone = -1;
-static futex_t vfs_phone_futex = FUTEX_INITIALIZER;
-static futex_t cwd_futex = FUTEX_INITIALIZER;
-
-static int cwd_fd = -1;
-static char *cwd_path = NULL;
-static size_t cwd_size = 0;
-
-char *absolutize(const char *path, size_t *retlen)
-{
-	char *ncwd_path;
-	char *ncwd_path_nc;
-
-	futex_down(&cwd_futex);
-	size_t size = str_size(path);
-	if (*path != '/') {
-		if (!cwd_path) {
-			futex_up(&cwd_futex);
-			return NULL;
-		}
-		ncwd_path_nc = malloc(cwd_size + 1 + size + 1);
-		if (!ncwd_path_nc) {
-			futex_up(&cwd_futex);
-			return NULL;
-		}
-		str_cpy(ncwd_path_nc, cwd_size + 1 + size + 1, cwd_path);
-		ncwd_path_nc[cwd_size] = '/';
-		ncwd_path_nc[cwd_size + 1] = '\0';
-	} else {
-		ncwd_path_nc = malloc(size + 1);
-		if (!ncwd_path_nc) {
-			futex_up(&cwd_futex);
-			return NULL;
-		}
-		ncwd_path_nc[0] = '\0';
-	}
-	str_append(ncwd_path_nc, cwd_size + 1 + size + 1, path);
-	ncwd_path = canonify(ncwd_path_nc, retlen);
-	if (!ncwd_path) {
-		futex_up(&cwd_futex);
-		free(ncwd_path_nc);
-		return NULL;
-	}
-	/*
-	 * We need to clone ncwd_path because canonify() works in-place and thus
-	 * the address in ncwd_path need not be the same as ncwd_path_nc, even
-	 * though they both point into the same dynamically allocated buffer.
-	 */
-	ncwd_path = str_dup(ncwd_path);
-	free(ncwd_path_nc);
-	if (!ncwd_path) {
-		futex_up(&cwd_futex);
-		return NULL;
-	}
-	futex_up(&cwd_futex);
-	return ncwd_path;
-}
-
-static void vfs_connect(void)
-{
-	while (vfs_phone < 0)
-		vfs_phone = ipc_connect_me_to_blocking(PHONE_NS, SERVICE_VFS, 0, 0);
-}
-
-int mount(const char *fs_name, const char *mp, const char *fqdn,
-    const char *opts, unsigned int flags)
-{
-	int null_id = -1;
-	char null[DEVMAP_NAME_MAXLEN];
-	
-	if (str_cmp(fqdn, "") == 0) {
-		/* No device specified, create a fresh
-		   null/%d device instead */
-		null_id = devmap_null_create();
-		
-		if (null_id == -1)
-			return ENOMEM;
-		
-		snprintf(null, DEVMAP_NAME_MAXLEN, "null/%d", null_id);
-		fqdn = null;
-	}
-	
-	dev_handle_t dev_handle;
-	int res = devmap_device_get_handle(fqdn, &dev_handle, flags);
-	if (res != EOK) {
-		if (null_id != -1)
-			devmap_null_destroy(null_id);
-		
-		return res;
-	}
-	
-	size_t mpa_size;
-	char *mpa = absolutize(mp, &mpa_size);
-	if (!mpa) {
-		if (null_id != -1)
-			devmap_null_destroy(null_id);
-		
-		return ENOMEM;
-	}
-	
-	futex_down(&vfs_phone_futex);
-	async_serialize_start();
-	vfs_connect();
-	
-	ipcarg_t rc_orig;
-	aid_t req = async_send_2(vfs_phone, VFS_IN_MOUNT, dev_handle, flags, NULL);
-	ipcarg_t rc = async_data_write_start(vfs_phone, (void *) mpa, mpa_size);
-	if (rc != EOK) {
-		async_wait_for(req, &rc_orig);
-		async_serialize_end();
-		futex_up(&vfs_phone_futex);
-		free(mpa);
-		
-		if (null_id != -1)
-			devmap_null_destroy(null_id);
-		
-		if (rc_orig == EOK)
-			return (int) rc;
-		else
-			return (int) rc_orig;
-	}
-	
-	rc = async_data_write_start(vfs_phone, (void *) opts, str_size(opts));
-	if (rc != EOK) {
-		async_wait_for(req, &rc_orig);
-		async_serialize_end();
-		futex_up(&vfs_phone_futex);
-		free(mpa);
-		
-		if (null_id != -1)
-			devmap_null_destroy(null_id);
-		
-		if (rc_orig == EOK)
-			return (int) rc;
-		else
-			return (int) rc_orig;
-	}
-	
-	rc = async_data_write_start(vfs_phone, (void *) fs_name, str_size(fs_name));
-	if (rc != EOK) {
-		async_wait_for(req, &rc_orig);
-		async_serialize_end();
-		futex_up(&vfs_phone_futex);
-		free(mpa);
-		
-		if (null_id != -1)
-			devmap_null_destroy(null_id);
-		
-		if (rc_orig == EOK)
-			return (int) rc;
-		else
-			return (int) rc_orig;
-	}
-	
-	/* Ask VFS whether it likes fs_name. */
-	rc = async_req_0_0(vfs_phone, IPC_M_PING);
-	if (rc != EOK) {
-		async_wait_for(req, &rc_orig);
-		async_serialize_end();
-		futex_up(&vfs_phone_futex);
-		free(mpa);
-		
-		if (null_id != -1)
-			devmap_null_destroy(null_id);
-		
-		if (rc_orig == EOK)
-			return (int) rc;
-		else
-			return (int) rc_orig;
-	}
-	
-	async_wait_for(req, &rc);
-	async_serialize_end();
-	futex_up(&vfs_phone_futex);
-	free(mpa);
-	
-	if ((rc != EOK) && (null_id != -1))
-		devmap_null_destroy(null_id);
-	
-	return (int) rc;
-}
-
-int unmount(const char *mp)
-{
-	ipcarg_t rc;
-	ipcarg_t rc_orig;
-	aid_t req;
-	size_t mpa_size;
-	char *mpa;
-	
-	mpa = absolutize(mp, &mpa_size);
-	if (!mpa)
-		return ENOMEM;
-	
-	futex_down(&vfs_phone_futex);
-	async_serialize_start();
-	vfs_connect();
-	
-	req = async_send_0(vfs_phone, VFS_IN_UNMOUNT, NULL);
-	rc = async_data_write_start(vfs_phone, (void *) mpa, mpa_size);
-	if (rc != EOK) {
-		async_wait_for(req, &rc_orig);
-		async_serialize_end();
-		futex_up(&vfs_phone_futex);
-		free(mpa);
-		if (rc_orig == EOK)
-			return (int) rc;
-		else
-			return (int) rc_orig;
-	}
-	
-
-	async_wait_for(req, &rc);
-	async_serialize_end();
-	futex_up(&vfs_phone_futex);
-	free(mpa);
-	
-	return (int) rc;
-}
-
-static int open_internal(const char *abs, size_t abs_size, int lflag, int oflag)
-{
-	futex_down(&vfs_phone_futex);
-	async_serialize_start();
-	vfs_connect();
-	
-	ipc_call_t answer;
-	aid_t req = async_send_3(vfs_phone, VFS_IN_OPEN, lflag, oflag, 0, &answer);
-	ipcarg_t rc = async_data_write_start(vfs_phone, abs, abs_size);
-	
-	if (rc != EOK) {
-		ipcarg_t rc_orig;
-		async_wait_for(req, &rc_orig);
-		
-		async_serialize_end();
-		futex_up(&vfs_phone_futex);
-		
-		if (rc_orig == EOK)
-			return (int) rc;
-		else
-			return (int) rc_orig;
-	}
-	
-	async_wait_for(req, &rc);
-	async_serialize_end();
-	futex_up(&vfs_phone_futex);
-	
-	if (rc != EOK)
-	    return (int) rc;
-	
-	return (int) IPC_GET_ARG1(answer);
-}
-
-int open(const char *path, int oflag, ...)
-{
-	size_t abs_size;
-	char *abs = absolutize(path, &abs_size);
-	if (!abs)
-		return ENOMEM;
-	
-	int ret = open_internal(abs, abs_size, L_FILE, oflag);
-	free(abs);
-	
-	return ret;
-}
-
-int open_node(fdi_node_t *node, int oflag)
-{
-	futex_down(&vfs_phone_futex);
-	async_serialize_start();
-	vfs_connect();
-	
-	ipc_call_t answer;
-	aid_t req = async_send_4(vfs_phone, VFS_IN_OPEN_NODE, node->fs_handle,
-	    node->dev_handle, node->index, oflag, &answer);
-	
-	ipcarg_t rc;
-	async_wait_for(req, &rc);
-	async_serialize_end();
-	futex_up(&vfs_phone_futex);
-	
-	if (rc != EOK)
-		return (int) rc;
-	
-	return (int) IPC_GET_ARG1(answer);
-}
-
-int close(int fildes)
-{
-	ipcarg_t rc;
-	
-	futex_down(&vfs_phone_futex);
-	async_serialize_start();
-	vfs_connect();
-	
-	rc = async_req_1_0(vfs_phone, VFS_IN_CLOSE, fildes);
-	
-	async_serialize_end();
-	futex_up(&vfs_phone_futex);
-	
-	return (int)rc;
-}
-
-ssize_t read(int fildes, void *buf, size_t nbyte) 
-{
-	ipcarg_t rc;
-	ipc_call_t answer;
-	aid_t req;
-
-	futex_down(&vfs_phone_futex);
-	async_serialize_start();
-	vfs_connect();
-	
-	req = async_send_1(vfs_phone, VFS_IN_READ, fildes, &answer);
-	rc = async_data_read_start(vfs_phone, (void *)buf, nbyte);
-	if (rc != EOK) {
-		ipcarg_t rc_orig;
-	
-		async_wait_for(req, &rc_orig);
-		async_serialize_end();
-		futex_up(&vfs_phone_futex);
-		if (rc_orig == EOK)
-			return (ssize_t) rc;
-		else
-			return (ssize_t) rc_orig;
-	}
-	async_wait_for(req, &rc);
-	async_serialize_end();
-	futex_up(&vfs_phone_futex);
-	if (rc == EOK)
-		return (ssize_t) IPC_GET_ARG1(answer);
-	else
-		return rc;
-}
-
-ssize_t write(int fildes, const void *buf, size_t nbyte) 
-{
-	ipcarg_t rc;
-	ipc_call_t answer;
-	aid_t req;
-
-	futex_down(&vfs_phone_futex);
-	async_serialize_start();
-	vfs_connect();
-	
-	req = async_send_1(vfs_phone, VFS_IN_WRITE, fildes, &answer);
-	rc = async_data_write_start(vfs_phone, (void *)buf, nbyte);
-	if (rc != EOK) {
-		ipcarg_t rc_orig;
-	
-		async_wait_for(req, &rc_orig);
-		async_serialize_end();
-		futex_up(&vfs_phone_futex);
-		if (rc_orig == EOK)
-			return (ssize_t) rc;
-		else
-			return (ssize_t) rc_orig;
-	}
-	async_wait_for(req, &rc);
-	async_serialize_end();
-	futex_up(&vfs_phone_futex);
-	if (rc == EOK)
-		return (ssize_t) IPC_GET_ARG1(answer);
-	else
-		return -1;
-}
-
-int fsync(int fildes)
-{
-	futex_down(&vfs_phone_futex);
-	async_serialize_start();
-	vfs_connect();
-	
-	ipcarg_t rc = async_req_1_0(vfs_phone, VFS_IN_SYNC, fildes);
-	
-	async_serialize_end();
-	futex_up(&vfs_phone_futex);
-	
-	return (int) rc;
-}
-
-off64_t lseek(int fildes, off64_t offset, int whence)
-{
-	futex_down(&vfs_phone_futex);
-	async_serialize_start();
-	vfs_connect();
-	
-	ipcarg_t newoff_lo;
-	ipcarg_t newoff_hi;
-	ipcarg_t rc = async_req_4_2(vfs_phone, VFS_IN_SEEK, fildes,
-	    LOWER32(offset), UPPER32(offset), whence,
-	    &newoff_lo, &newoff_hi);
-	
-	async_serialize_end();
-	futex_up(&vfs_phone_futex);
-	
-	if (rc != EOK)
-		return (off64_t) -1;
-	
-	return (off64_t) MERGE_LOUP32(newoff_lo, newoff_hi);
-}
-
-int ftruncate(int fildes, aoff64_t length)
-{
-	ipcarg_t rc;
-	
-	futex_down(&vfs_phone_futex);
-	async_serialize_start();
-	vfs_connect();
-	
-	rc = async_req_3_0(vfs_phone, VFS_IN_TRUNCATE, fildes,
-	    LOWER32(length), UPPER32(length));
-	async_serialize_end();
-	futex_up(&vfs_phone_futex);
-	
-	return (int) rc;
-}
-
-int fstat(int fildes, struct stat *stat)
-{
-	ipcarg_t rc;
-	aid_t req;
-
-	futex_down(&vfs_phone_futex);
-	async_serialize_start();
-	vfs_connect();
-	
-	req = async_send_1(vfs_phone, VFS_IN_FSTAT, fildes, NULL);
-	rc = async_data_read_start(vfs_phone, (void *) stat, sizeof(struct stat));
-	if (rc != EOK) {
-		ipcarg_t rc_orig;
-		
-		async_wait_for(req, &rc_orig);
-		async_serialize_end();
-		futex_up(&vfs_phone_futex);
-		if (rc_orig == EOK)
-			return (ssize_t) rc;
-		else
-			return (ssize_t) rc_orig;
-	}
-	async_wait_for(req, &rc);
-	async_serialize_end();
-	futex_up(&vfs_phone_futex);
-
-	return rc;
-}
-
-int stat(const char *path, struct stat *stat)
-{
-	ipcarg_t rc;
-	ipcarg_t rc_orig;
-	aid_t req;
-	
-	size_t pa_size;
-	char *pa = absolutize(path, &pa_size);
-	if (!pa)
-		return ENOMEM;
-	
-	futex_down(&vfs_phone_futex);
-	async_serialize_start();
-	vfs_connect();
-	
-	req = async_send_0(vfs_phone, VFS_IN_STAT, NULL);
-	rc = async_data_write_start(vfs_phone, pa, pa_size);
-	if (rc != EOK) {
-		async_wait_for(req, &rc_orig);
-		async_serialize_end();
-		futex_up(&vfs_phone_futex);
-		free(pa);
-		if (rc_orig == EOK)
-			return (int) rc;
-		else
-			return (int) rc_orig;
-	}
-	rc = async_data_read_start(vfs_phone, stat, sizeof(struct stat));
-	if (rc != EOK) {
-		async_wait_for(req, &rc_orig);
-		async_serialize_end();
-		futex_up(&vfs_phone_futex);
-		free(pa);
-		if (rc_orig == EOK)
-			return (int) rc;
-		else
-			return (int) rc_orig;
-	}
-	async_wait_for(req, &rc);
-	async_serialize_end();
-	futex_up(&vfs_phone_futex);
-	free(pa);
-	return rc;
-}
-
-DIR *opendir(const char *dirname)
-{
-	DIR *dirp = malloc(sizeof(DIR));
-	if (!dirp)
-		return NULL;
-	
-	size_t abs_size;
-	char *abs = absolutize(dirname, &abs_size);
-	if (!abs) {
-		free(dirp);
-		return NULL;
-	}
-	
-	int ret = open_internal(abs, abs_size, L_DIRECTORY, 0);
-	free(abs);
-	
-	if (ret < 0) {
-		free(dirp);
-		return NULL;
-	}
-	
-	dirp->fd = ret;
-	return dirp;
-}
-
-struct dirent *readdir(DIR *dirp)
-{
-	ssize_t len = read(dirp->fd, &dirp->res.d_name[0], NAME_MAX + 1);
-	if (len <= 0)
-		return NULL;
-	return &dirp->res;
-}
-
-void rewinddir(DIR *dirp)
-{
-	(void) lseek(dirp->fd, 0, SEEK_SET);
-}
-
-int closedir(DIR *dirp)
-{
-	(void) close(dirp->fd);
-	free(dirp);
-	return 0;
-}
-
-int mkdir(const char *path, mode_t mode)
-{
-	ipcarg_t rc;
-	aid_t req;
-	
-	size_t pa_size;
-	char *pa = absolutize(path, &pa_size);
-	if (!pa)
-		return ENOMEM;
-	
-	futex_down(&vfs_phone_futex);
-	async_serialize_start();
-	vfs_connect();
-	
-	req = async_send_1(vfs_phone, VFS_IN_MKDIR, mode, NULL);
-	rc = async_data_write_start(vfs_phone, pa, pa_size);
-	if (rc != EOK) {
-		ipcarg_t rc_orig;
-	
-		async_wait_for(req, &rc_orig);
-		async_serialize_end();
-		futex_up(&vfs_phone_futex);
-		free(pa);
-		if (rc_orig == EOK)
-			return (int) rc;
-		else
-			return (int) rc_orig;
-	}
-	async_wait_for(req, &rc);
-	async_serialize_end();
-	futex_up(&vfs_phone_futex);
-	free(pa);
-	return rc;
-}
-
-static int _unlink(const char *path, int lflag)
-{
-	ipcarg_t rc;
-	aid_t req;
-	
-	size_t pa_size;
-	char *pa = absolutize(path, &pa_size);
-	if (!pa)
-		return ENOMEM;
-
-	futex_down(&vfs_phone_futex);
-	async_serialize_start();
-	vfs_connect();
-	
-	req = async_send_0(vfs_phone, VFS_IN_UNLINK, NULL);
-	rc = async_data_write_start(vfs_phone, pa, pa_size);
-	if (rc != EOK) {
-		ipcarg_t rc_orig;
-
-		async_wait_for(req, &rc_orig);
-		async_serialize_end();
-		futex_up(&vfs_phone_futex);
-		free(pa);
-		if (rc_orig == EOK)
-			return (int) rc;
-		else
-			return (int) rc_orig;
-	}
-	async_wait_for(req, &rc);
-	async_serialize_end();
-	futex_up(&vfs_phone_futex);
-	free(pa);
-	return rc;
-}
-
-int unlink(const char *path)
-{
-	return _unlink(path, L_NONE);
-}
-
-int rmdir(const char *path)
-{
-	return _unlink(path, L_DIRECTORY);
-}
-
-int rename(const char *old, const char *new)
-{
-	ipcarg_t rc;
-	ipcarg_t rc_orig;
-	aid_t req;
-	
-	size_t olda_size;
-	char *olda = absolutize(old, &olda_size);
-	if (!olda)
-		return ENOMEM;
-
-	size_t newa_size;
-	char *newa = absolutize(new, &newa_size);
-	if (!newa) {
-		free(olda);
-		return ENOMEM;
-	}
-
-	futex_down(&vfs_phone_futex);
-	async_serialize_start();
-	vfs_connect();
-	
-	req = async_send_0(vfs_phone, VFS_IN_RENAME, NULL);
-	rc = async_data_write_start(vfs_phone, olda, olda_size);
-	if (rc != EOK) {
-		async_wait_for(req, &rc_orig);
-		async_serialize_end();
-		futex_up(&vfs_phone_futex);
-		free(olda);
-		free(newa);
-		if (rc_orig == EOK)
-			return (int) rc;
-		else
-			return (int) rc_orig;
-	}
-	rc = async_data_write_start(vfs_phone, newa, newa_size);
-	if (rc != EOK) {
-		async_wait_for(req, &rc_orig);
-		async_serialize_end();
-		futex_up(&vfs_phone_futex);
-		free(olda);
-		free(newa);
-		if (rc_orig == EOK)
-			return (int) rc;
-		else
-			return (int) rc_orig;
-	}
-	async_wait_for(req, &rc);
-	async_serialize_end();
-	futex_up(&vfs_phone_futex);
-	free(olda);
-	free(newa);
-	return rc;
-}
-
-int chdir(const char *path)
-{
-	size_t abs_size;
-	char *abs = absolutize(path, &abs_size);
-	if (!abs)
-		return ENOMEM;
-	
-	int fd = open_internal(abs, abs_size, L_DIRECTORY, O_DESC);
-	
-	if (fd < 0) {
-		free(abs);
-		return ENOENT;
-	}
-	
-	futex_down(&cwd_futex);
-	
-	if (cwd_fd >= 0)
-		close(cwd_fd);
-	
-	
-	if (cwd_path)
-		free(cwd_path);
-	
-	cwd_fd = fd;
-	cwd_path = abs;
-	cwd_size = abs_size;
-	
-	futex_up(&cwd_futex);
-	return EOK;
-}
-
-char *getcwd(char *buf, size_t size)
-{
-	if (size == 0)
-		return NULL;
-	
-	futex_down(&cwd_futex);
-	
-	if ((cwd_size == 0) || (size < cwd_size + 1)) {
-		futex_up(&cwd_futex);
-		return NULL;
-	}
-	
-	str_cpy(buf, size, cwd_path);
-	futex_up(&cwd_futex);
-	
-	return buf;
-}
-
-int fd_phone(int fildes)
-{
-	struct stat stat;
-	int rc;
-
-	rc = fstat(fildes, &stat);
-
-	if (!stat.device)
-		return -1;
-	
-	return devmap_device_connect(stat.device, 0);
-}
-
-int fd_node(int fildes, fdi_node_t *node)
-{
-	struct stat stat;
-	int rc;
-
-	rc = fstat(fildes, &stat);
-	
-	if (rc == EOK) {
-		node->fs_handle = stat.fs_handle;
-		node->dev_handle = stat.dev_handle;
-		node->index = stat.index;
-	}
-	
-	return rc;
-}
-
-int dup2(int oldfd, int newfd)
-{
-	futex_down(&vfs_phone_futex);
-	async_serialize_start();
-	vfs_connect();
-	
-	ipcarg_t ret;
-	ipcarg_t rc = async_req_2_1(vfs_phone, VFS_IN_DUP, oldfd, newfd, &ret);
-	
-	async_serialize_end();
-	futex_up(&vfs_phone_futex);
-	
-	if (rc == EOK)
-		return (int) ret;
-	
-	return (int) rc;
-}
-
-/** @}
- */
Index: pace/lib/libc/include/adt/fifo.h
===================================================================
--- uspace/lib/libc/include/adt/fifo.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,127 +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 libc
- * @{
- */
-/** @file
- */
-
-/*
- * This implementation of FIFO stores values in an array
- * (static or dynamic). As such, these FIFOs have upper bound
- * on number of values they can store. Push and pop operations
- * are done via accessing the array through head and tail indices.
- * Because of better operation ordering in fifo_pop(), the access
- * policy for these two indices is to 'increment (mod size of FIFO)
- * and use'.
- */
-
-#ifndef LIBC_FIFO_H_
-#define LIBC_FIFO_H_
-
-#include <malloc.h>
-
-typedef unsigned long fifo_count_t;
-typedef unsigned long fifo_index_t;
-
-#define FIFO_CREATE_STATIC(name, t, itms)		\
-	struct {					\
-		t fifo[(itms)];				\
-		fifo_count_t items;			\
-		fifo_index_t head;			\
-		fifo_index_t tail;			\
-	} name
-
-/** Create and initialize static FIFO.
- *
- * FIFO is allocated statically.
- * This macro is suitable for creating smaller FIFOs.
- *
- * @param name Name of FIFO.
- * @param t Type of values stored in FIFO.
- * @param itms Number of items that can be stored in FIFO.
- */
-#define FIFO_INITIALIZE_STATIC(name, t, itms)		\
-	FIFO_CREATE_STATIC(name, t, itms) = {		\
-		.items = (itms),			\
-		.head = 0,				\
-		.tail = 0				\
-	}
-
-/** Create and prepare dynamic FIFO.
- *
- * FIFO is allocated dynamically.
- * This macro is suitable for creating larger FIFOs. 
- *
- * @param name Name of FIFO.
- * @param t Type of values stored in FIFO.
- * @param itms Number of items that can be stored in FIFO.
- */
-#define FIFO_INITIALIZE_DYNAMIC(name, t, itms)		\
-	struct {					\
-		t *fifo;				\
-		fifo_count_t items;			\
-		fifo_index_t head;			\
-		fifo_index_t tail;			\
-	} name = {					\
-		.fifo = NULL,				\
-		.items = (itms),			\
-		.head = 0,				\
-		.tail = 0				\
-	}
-
-/** Pop value from head of FIFO.
- *
- * @param name FIFO name.
- *
- * @return Leading value in FIFO.
- */
-#define fifo_pop(name) \
-	name.fifo[name.head = (name.head + 1) < name.items ? (name.head + 1) : 0]
-
-/** Push value to tail of FIFO.
- *
- * @param name FIFO name.
- * @param value Value to be appended to FIFO.
- *
- */
-#define fifo_push(name, value) \
-	name.fifo[name.tail = (name.tail + 1) < name.items ? (name.tail + 1) : 0] = (value) 
-
-/** Allocate memory for dynamic FIFO.
- *
- * @param name FIFO name.
- */
-#define fifo_create(name) \
-	name.fifo = malloc(sizeof(*name.fifo) * name.items)
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/include/adt/gcdlcm.h
===================================================================
--- uspace/lib/libc/include/adt/gcdlcm.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,73 +1,0 @@
-/*
- * Copyright (c) 2009 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 libc
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_GCDLCM_H_
-#define LIBC_GCDLCM_H_
-
-#include <sys/types.h>
-
-#define DECLARE_GCD(type, name) \
-	static inline type name(type a, type b) \
-	{ \
-		if (a == 0) \
-			return b; \
-		 \
-		while (b != 0) { \
-			if (a > b) \
-				a -= b; \
-			else \
-				b -= a; \
-		} \
-		 \
-		return a; \
-	}
-
-#define DECLARE_LCM(type, name, gcd) \
-	static inline type name(type a, type b) \
-	{ \
-		return (a * b) / gcd(a, b); \
-	}
-
-DECLARE_GCD(uint32_t, gcd32);
-DECLARE_GCD(uint64_t, gcd64);
-DECLARE_GCD(size_t, gcd);
-
-DECLARE_LCM(uint32_t, lcm32, gcd32);
-DECLARE_LCM(uint64_t, lcm64, gcd64);
-DECLARE_LCM(size_t, lcm, gcd);
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/include/adt/hash_table.h
===================================================================
--- uspace/lib/libc/include/adt/hash_table.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,96 +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 libc
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_HASH_TABLE_H_
-#define LIBC_HASH_TABLE_H_
-
-#include <adt/list.h>
-#include <unistd.h>
-
-typedef unsigned long hash_count_t;
-typedef unsigned long hash_index_t;
-typedef struct hash_table hash_table_t;
-typedef struct hash_table_operations hash_table_operations_t;
-
-/** Hash table structure. */
-struct hash_table {
-	link_t *entry;
-	hash_count_t entries;
-	hash_count_t max_keys;
-	hash_table_operations_t *op;
-};
-
-/** Set of operations for hash table. */
-struct hash_table_operations {
-	/** Hash function.
-	 *
-	 * @param key 	Array of keys needed to compute hash index. All keys
-	 *		must be passed.
-	 *
-	 * @return	Index into hash table.
-	 */
-	hash_index_t (* hash)(unsigned long key[]);
-	
-	/** Hash table item comparison function.
-	 *
-	 * @param key 	Array of keys that will be compared with item. It is
-	 *		not necessary to pass all keys.
-	 *
-	 * @return 	true if the keys match, false otherwise.
-	 */
-	int (*compare)(unsigned long key[], hash_count_t keys, link_t *item);
-
-	/** Hash table item removal callback.
-	 *
-	 * @param item 	Item that was removed from the hash table.
-	 */
-	void (*remove_callback)(link_t *item);
-};
-
-#define hash_table_get_instance(item, type, member) \
-    list_get_instance((item), type, member)
-
-extern int hash_table_create(hash_table_t *, hash_count_t, hash_count_t,
-    hash_table_operations_t *);
-extern void hash_table_insert(hash_table_t *, unsigned long [], link_t *);
-extern link_t *hash_table_find(hash_table_t *, unsigned long []);
-extern void hash_table_remove(hash_table_t *, unsigned long [], hash_count_t);
-extern void hash_table_destroy(hash_table_t *);
-extern void hash_table_apply(hash_table_t *, void (*)(link_t *, void *),
-    void *);
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/include/adt/list.h
===================================================================
--- uspace/lib/libc/include/adt/list.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,201 +1,0 @@
-/*
- * Copyright (c) 2001-2004 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 libc
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_LIST_H_
-#define LIBC_LIST_H_
-
-#include <unistd.h>
-
-/** Doubly linked list head and link type. */
-typedef struct link {
-	struct link *prev;  /**< Pointer to the previous item in the list. */
-	struct link *next;  /**< Pointer to the next item in the list. */
-} link_t;
-
-/** Declare and initialize statically allocated list.
- *
- * @param name Name of the new statically allocated list.
- */
-#define LIST_INITIALIZE(name)  link_t name = { \
-	.prev = &name, \
-	.next = &name \
-}
-
-/** Initialize doubly-linked circular list link
- *
- * Initialize doubly-linked list link.
- *
- * @param link Pointer to link_t structure to be initialized.
- */
-static inline void link_initialize(link_t *link)
-{
-	link->prev = NULL;
-	link->next = NULL;
-}
-
-/** Initialize doubly-linked circular list
- *
- * Initialize doubly-linked circular list.
- *
- * @param head Pointer to link_t structure representing head of the list.
- */
-static inline void list_initialize(link_t *head)
-{
-	head->prev = head;
-	head->next = head;
-}
-
-/** Add item to the beginning of doubly-linked circular list
- *
- * Add item to the beginning of doubly-linked circular list.
- *
- * @param link Pointer to link_t structure to be added.
- * @param head Pointer to link_t structure representing head of the list.
- */
-static inline void list_prepend(link_t *link, link_t *head)
-{
-	link->next = head->next;
-	link->prev = head;
-	head->next->prev = link;
-	head->next = link;
-}
-
-/** Add item to the end of doubly-linked circular list
- *
- * Add item to the end of doubly-linked circular list.
- *
- * @param link Pointer to link_t structure to be added.
- * @param head Pointer to link_t structure representing head of the list.
- */
-static inline void list_append(link_t *link, link_t *head)
-{
-	link->prev = head->prev;
-	link->next = head;
-	head->prev->next = link;
-	head->prev = link;
-}
-
-/** Insert item before another item in doubly-linked circular list. */
-static inline void list_insert_before(link_t *l, link_t *r)
-{
-	list_append(l, r);
-}
-
-/** Insert item after another item in doubly-linked circular list. */
-static inline void list_insert_after(link_t *r, link_t *l)
-{
-	list_prepend(l, r);
-}
-
-/** Remove item from doubly-linked circular list
- *
- * Remove item from doubly-linked circular list.
- *
- * @param link Pointer to link_t structure to be removed from the list it is contained in.
- */
-static inline void list_remove(link_t *link)
-{
-	link->next->prev = link->prev;
-	link->prev->next = link->next;
-	link_initialize(link);
-}
-
-/** Query emptiness of doubly-linked circular list
- *
- * Query emptiness of doubly-linked circular list.
- *
- * @param head Pointer to link_t structure representing head of the list.
- */
-static inline int list_empty(link_t *head)
-{
-	return ((head->next == head) ? 1 : 0);
-}
-
-
-/** Split or concatenate headless doubly-linked circular list
- *
- * Split or concatenate headless doubly-linked circular list.
- *
- * Note that the algorithm works both directions:
- * concatenates splitted lists and splits concatenated lists.
- *
- * @param part1 Pointer to link_t structure leading the first (half of the headless) list.
- * @param part2 Pointer to link_t structure leading the second (half of the headless) list. 
- */
-static inline void headless_list_split_or_concat(link_t *part1, link_t *part2)
-{
-	part1->prev->next = part2;
-	part2->prev->next = part1;
-	
-	link_t *hlp = part1->prev;
-	
-	part1->prev = part2->prev;
-	part2->prev = hlp;
-}
-
-
-/** Split headless doubly-linked circular list
- *
- * Split headless doubly-linked circular list.
- *
- * @param part1 Pointer to link_t structure leading the first half of the headless list.
- * @param part2 Pointer to link_t structure leading the second half of the headless list. 
- */
-static inline void headless_list_split(link_t *part1, link_t *part2)
-{
-	headless_list_split_or_concat(part1, part2);
-}
-
-/** Concatenate two headless doubly-linked circular lists
- *
- * Concatenate two headless doubly-linked circular lists.
- *
- * @param part1 Pointer to link_t structure leading the first headless list.
- * @param part2 Pointer to link_t structure leading the second headless list. 
- */
-static inline void headless_list_concat(link_t *part1, link_t *part2)
-{
-	headless_list_split_or_concat(part1, part2);
-}
-
-#define list_get_instance(link, type, member)  ((type *) (((void *)(link)) - ((void *) &(((type *) NULL)->member))))
-
-extern int list_member(const link_t *link, const link_t *head);
-extern void list_concat(link_t *head1, link_t *head2);
-extern unsigned int list_count(const link_t *link);
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/include/align.h
===================================================================
--- uspace/lib/libc/include/align.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,63 +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 libc
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_ALIGN_H_
-#define LIBC_ALIGN_H_
-
-/** Align to the nearest lower address which is a power of two.
- *
- * @param s		Address or size to be aligned.
- * @param a		Size of alignment, must be power of 2.
- */
-#define ALIGN_DOWN(s, a)	((s) & ~((a) - 1))
-
-
-/** Align to the nearest higher address which is a power of two.
- *
- * @param s		Address or size to be aligned.
- * @param a		Size of alignment, must be power of 2.
- */
-#define ALIGN_UP(s, a)		((long)((s) + ((a) - 1)) & ~((long) (a) - 1))
-
-/** Round up to the nearest higher boundary.
- *
- * @param n		Number to be aligned.
- * @param b		Boundary, arbitrary unsigned number.
- */
-#define ROUND_UP(n, b)		(((n) / (b) + ((n) % (b) != 0)) * (b))
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/include/as.h
===================================================================
--- uspace/lib/libc/include/as.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,53 +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 libc
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_AS_H_
-#define LIBC_AS_H_
-
-#include <sys/types.h>
-#include <task.h>
-#include <kernel/mm/as.h>
-#include <libarch/config.h>
-
-extern void *as_area_create(void *address, size_t size, int flags);
-extern int as_area_resize(void *address, size_t size, int flags);
-extern int as_area_change_flags(void *address, int flags);
-extern int as_area_destroy(void *address);
-extern void *set_maxheapsize(size_t mhs);
-extern void * as_get_mappable_page(size_t sz);
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/include/assert.h
===================================================================
--- uspace/lib/libc/include/assert.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,68 +1,0 @@
-/*
- * Copyright (c) 2005 Martin Decky
- * 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 libc
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_ASSERT_H_
-#define LIBC_ASSERT_H_
-
-/** Debugging assert macro
- *
- * If NDEBUG is not set, the assert() macro
- * evaluates expr and if it is false prints 
- * error message and terminate program.
- *
- * @param expr Expression which is expected to be true.
- *
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-
-#ifndef NDEBUG
-#	define assert(expr) \
-		do { \
-			if (!(expr)) { \
-				printf("Assertion failed (%s) at file '%s', " \
-				    "line %d.\n", #expr, __FILE__, __LINE__); \
-				abort(); \
-			} \
-		} while (0)
-#else
-#	define assert(expr)
-#endif
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/include/async.h
===================================================================
--- uspace/lib/libc/include/async.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,364 +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 libc
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_ASYNC_H_
-#define LIBC_ASYNC_H_
-
-#include <ipc/ipc.h>
-#include <fibril.h>
-#include <sys/time.h>
-#include <atomic.h>
-#include <bool.h>
-
-typedef ipc_callid_t aid_t;
-typedef void (*async_client_conn_t)(ipc_callid_t callid, ipc_call_t *call);
-
-extern atomic_t async_futex;
-
-extern atomic_t threads_in_ipc_wait;
-
-extern int __async_init(void);
-extern ipc_callid_t async_get_call_timeout(ipc_call_t *call, suseconds_t usecs);
-
-static inline ipc_callid_t async_get_call(ipc_call_t *data)
-{
-	return async_get_call_timeout(data, 0);
-}
-
-static inline void async_manager(void)
-{
-	fibril_switch(FIBRIL_TO_MANAGER);
-}
-
-/*
- * User-friendly wrappers for async_send_fast() and async_send_slow(). The
- * macros are in the form async_send_m(), where m denotes the number of payload
- * arguments.  Each macros chooses between the fast and the slow version based
- * on m.
- */
-
-#define async_send_0(phoneid, method, dataptr) \
-	async_send_fast((phoneid), (method), 0, 0, 0, 0, (dataptr))
-#define async_send_1(phoneid, method, arg1, dataptr) \
-	async_send_fast((phoneid), (method), (arg1), 0, 0, 0, (dataptr))
-#define async_send_2(phoneid, method, arg1, arg2, dataptr) \
-	async_send_fast((phoneid), (method), (arg1), (arg2), 0, 0, (dataptr))
-#define async_send_3(phoneid, method, arg1, arg2, arg3, dataptr) \
-	async_send_fast((phoneid), (method), (arg1), (arg2), (arg3), 0, (dataptr))
-#define async_send_4(phoneid, method, arg1, arg2, arg3, arg4, dataptr) \
-	async_send_fast((phoneid), (method), (arg1), (arg2), (arg3), (arg4), \
-	    (dataptr))
-#define async_send_5(phoneid, method, arg1, arg2, arg3, arg4, arg5, dataptr) \
-	async_send_slow((phoneid), (method), (arg1), (arg2), (arg3), (arg4), \
-	    (arg5), (dataptr))
-
-extern aid_t async_send_fast(int phoneid, ipcarg_t method, ipcarg_t arg1,
-    ipcarg_t arg2, ipcarg_t arg3, ipcarg_t arg4, ipc_call_t *dataptr);
-extern aid_t async_send_slow(int phoneid, ipcarg_t method, ipcarg_t arg1,
-    ipcarg_t arg2, ipcarg_t arg3, ipcarg_t arg4, ipcarg_t arg5,
-    ipc_call_t *dataptr);
-extern void async_wait_for(aid_t amsgid, ipcarg_t *result);
-extern int async_wait_timeout(aid_t amsgid, ipcarg_t *retval,
-    suseconds_t timeout);
-
-extern fid_t async_new_connection(ipcarg_t in_phone_hash, ipc_callid_t callid,
-    ipc_call_t *call, void (*cthread)(ipc_callid_t, ipc_call_t *));
-extern void async_usleep(suseconds_t timeout);
-extern void async_create_manager(void);
-extern void async_destroy_manager(void);
-
-extern void async_set_client_connection(async_client_conn_t conn);
-extern void async_set_interrupt_received(async_client_conn_t conn);
-
-/* Wrappers for simple communication */
-#define async_msg_0(phone, method) \
-	ipc_call_async_0((phone), (method), NULL, NULL, true)
-#define async_msg_1(phone, method, arg1) \
-	ipc_call_async_1((phone), (method), (arg1), NULL, NULL, \
-	    true)
-#define async_msg_2(phone, method, arg1, arg2) \
-	ipc_call_async_2((phone), (method), (arg1), (arg2), NULL, NULL, \
-	    true)
-#define async_msg_3(phone, method, arg1, arg2, arg3) \
-	ipc_call_async_3((phone), (method), (arg1), (arg2), (arg3), NULL, NULL, \
-	    true)
-#define async_msg_4(phone, method, arg1, arg2, arg3, arg4) \
-	ipc_call_async_4((phone), (method), (arg1), (arg2), (arg3), (arg4), NULL, \
-	    NULL, true)
-#define async_msg_5(phone, method, arg1, arg2, arg3, arg4, arg5) \
-	ipc_call_async_5((phone), (method), (arg1), (arg2), (arg3), (arg4), \
-	    (arg5), NULL, NULL, true)
-
-/*
- * User-friendly wrappers for async_req_fast() and async_req_slow(). The macros
- * are in the form async_req_m_n(), where m is the number of payload arguments
- * and n is the number of return arguments. The macros decide between the fast
- * and slow verion based on m.
- */
-#define async_req_0_0(phoneid, method) \
-	async_req_fast((phoneid), (method), 0, 0, 0, 0, NULL, NULL, NULL, NULL, \
-	    NULL)
-#define async_req_0_1(phoneid, method, r1) \
-	async_req_fast((phoneid), (method), 0, 0, 0, 0, (r1), NULL, NULL, NULL, \
-	    NULL)
-#define async_req_0_2(phoneid, method, r1, r2) \
-	async_req_fast((phoneid), (method), 0, 0, 0, 0, (r1), (r2), NULL, NULL, \
-	    NULL)
-#define async_req_0_3(phoneid, method, r1, r2, r3) \
-	async_req_fast((phoneid), (method), 0, 0, 0, 0, (r1), (r2), (r3), NULL, \
-	    NULL)
-#define async_req_0_4(phoneid, method, r1, r2, r3, r4) \
-	async_req_fast((phoneid), (method), 0, 0, 0, 0, (r1), (r2), (r3), (r4), \
-	    NULL)
-#define async_req_0_5(phoneid, method, r1, r2, r3, r4, r5) \
-	async_req_fast((phoneid), (method), 0, 0, 0, 0, (r1), (r2), (r3), (r4), \
-	    (r5))
-#define async_req_1_0(phoneid, method, arg1) \
-	async_req_fast((phoneid), (method), (arg1), 0, 0, 0, NULL, NULL, NULL, \
-	    NULL, NULL)
-#define async_req_1_1(phoneid, method, arg1, rc1) \
-	async_req_fast((phoneid), (method), (arg1), 0, 0, 0, (rc1), NULL, NULL, \
-	    NULL, NULL)
-#define async_req_1_2(phoneid, method, arg1, rc1, rc2) \
-	async_req_fast((phoneid), (method), (arg1), 0, 0, 0, (rc1), (rc2), NULL, \
-	    NULL, NULL)
-#define async_req_1_3(phoneid, method, arg1, rc1, rc2, rc3) \
-	async_req_fast((phoneid), (method), (arg1), 0, 0, 0, (rc1), (rc2), (rc3), \
-	    NULL, NULL)
-#define async_req_1_4(phoneid, method, arg1, rc1, rc2, rc3, rc4) \
-	async_req_fast((phoneid), (method), (arg1), 0, 0, 0, (rc1), (rc2), (rc3), \
-	    (rc4), NULL)
-#define async_req_1_5(phoneid, method, arg1, rc1, rc2, rc3, rc4, rc5) \
-	async_req_fast((phoneid), (method), (arg1), 0, 0, 0, (rc1), (rc2), (rc3), \
-	    (rc4), (rc5))
-#define async_req_2_0(phoneid, method, arg1, arg2) \
-	async_req_fast((phoneid), (method), (arg1), (arg2), 0, 0, NULL, NULL, \
-	    NULL, NULL, NULL)
-#define async_req_2_1(phoneid, method, arg1, arg2, rc1) \
-	async_req_fast((phoneid), (method), (arg1), (arg2), 0, 0, (rc1), NULL, \
-	    NULL, NULL, NULL)
-#define async_req_2_2(phoneid, method, arg1, arg2, rc1, rc2) \
-	async_req_fast((phoneid), (method), (arg1), (arg2), 0, 0, (rc1), (rc2), \
-	    NULL, NULL, NULL)
-#define async_req_2_3(phoneid, method, arg1, arg2, rc1, rc2, rc3) \
-	async_req_fast((phoneid), (method), (arg1), (arg2), 0, 0, (rc1), (rc2), \
-	    (rc3), NULL, NULL)
-#define async_req_2_4(phoneid, method, arg1, arg2, rc1, rc2, rc3, rc4) \
-	async_req_fast((phoneid), (method), (arg1), (arg2), 0, 0, (rc1), (rc2), \
-	    (rc3), (rc4), NULL)
-#define async_req_2_5(phoneid, method, arg1, arg2, rc1, rc2, rc3, rc4, rc5) \
-	async_req_fast((phoneid), (method), (arg1), (arg2), 0, 0, (rc1), (rc2), \
-	    (rc3), (rc4), (rc5))
-#define async_req_3_0(phoneid, method, arg1, arg2, arg3) \
-	async_req_fast((phoneid), (method), (arg1), (arg2), (arg3), 0, NULL, NULL, \
-	    NULL, NULL, NULL)
-#define async_req_3_1(phoneid, method, arg1, arg2, arg3, rc1) \
-	async_req_fast((phoneid), (method), (arg1), (arg2), (arg3), 0, (rc1), \
-	    NULL, NULL, NULL, NULL)
-#define async_req_3_2(phoneid, method, arg1, arg2, arg3, rc1, rc2) \
-	async_req_fast((phoneid), (method), (arg1), (arg2), (arg3), 0, (rc1), \
-	    (rc2), NULL, NULL, NULL)
-#define async_req_3_3(phoneid, method, arg1, arg2, arg3, rc1, rc2, rc3) \
-	async_req_fast((phoneid), (method), (arg1), (arg2), (arg3), 0, (rc1), \
-	    (rc2), (rc3), NULL, NULL)
-#define async_req_3_4(phoneid, method, arg1, arg2, arg3, rc1, rc2, rc3, rc4) \
-	async_req_fast((phoneid), (method), (arg1), (arg2), (arg3), 0, (rc1), \
-	    (rc2), (rc3), (rc4), NULL)
-#define async_req_3_5(phoneid, method, arg1, arg2, arg3, rc1, rc2, rc3, rc4, \
-    rc5) \
-	async_req_fast((phoneid), (method), (arg1), (arg2), (arg3), 0, (rc1), \
-	    (rc2), (rc3), (rc4), (rc5))
-#define async_req_4_0(phoneid, method, arg1, arg2, arg3, arg4) \
-	async_req_fast((phoneid), (method), (arg1), (arg2), (arg3), (arg4), NULL, \
-	    NULL, NULL, NULL, NULL)
-#define async_req_4_1(phoneid, method, arg1, arg2, arg3, arg4, rc1) \
-	async_req_fast((phoneid), (method), (arg1), (arg2), (arg3), (arg4), (rc1), \
-	    NULL, NULL, NULL, NULL)
-#define async_req_4_2(phoneid, method, arg1, arg2, arg3, arg4, rc1, rc2) \
-	async_req_fast((phoneid), (method), (arg1), (arg2), (arg3), (arg4), (rc1), \
-	    (rc2), NULL, NULL, NULL)
-#define async_req_4_3(phoneid, method, arg1, arg2, arg3, arg4, rc1, rc2, rc3) \
-	async_req_fast((phoneid), (method), (arg1), (arg2), (arg3), (arg4), (rc1), \
-	    (rc2), (rc3), NULL, NULL)
-#define async_req_4_4(phoneid, method, arg1, arg2, arg3, arg4, rc1, rc2, rc3, \
-    rc4) \
-	async_req_fast((phoneid), (method), (arg1), (arg2), (arg3), (arg4), \
-	    (rc1), (rc2), (rc3), (rc4), NULL)
-#define async_req_4_5(phoneid, method, arg1, arg2, arg3, arg4, rc1, rc2, rc3, \
-    rc4, rc5) \
-	async_req_fast((phoneid), (method), (arg1), (arg2), (arg3), (arg4), \
-	    (rc1), (rc2), (rc3), (rc4), (rc5))
-#define async_req_5_0(phoneid, method, arg1, arg2, arg3, arg4, arg5) \
-	async_req_slow((phoneid), (method), (arg1), (arg2), (arg3), (arg4), \
-	    (arg5), NULL, NULL, NULL, NULL, NULL)
-#define async_req_5_1(phoneid, method, arg1, arg2, arg3, arg4, arg5, rc1) \
-	async_req_slow((phoneid), (method), (arg1), (arg2), (arg3), (arg4), \
-	    (arg5), (rc1), NULL, NULL, NULL, NULL)
-#define async_req_5_2(phoneid, method, arg1, arg2, arg3, arg4, arg5, rc1, rc2) \
-	async_req_slow((phoneid), (method), (arg1), (arg2), (arg3), (arg4), \
-	    (arg5), (rc1), (rc2), NULL, NULL, NULL)
-#define async_req_5_3(phoneid, method, arg1, arg2, arg3, arg4, arg5, rc1, rc2, \
-    rc3) \
-	async_req_slow((phoneid), (method), (arg1), (arg2), (arg3), (arg4), \
-	    (arg5), (rc1), (rc2), (rc3), NULL, NULL)
-#define async_req_5_4(phoneid, method, arg1, arg2, arg3, arg4, arg5, rc1, rc2, \
-    rc3, rc4) \
-	async_req_slow((phoneid), (method), (arg1), (arg2), (arg3), (arg4), \
-	    (arg5), (rc1), (rc2), (rc3), (rc4), NULL)
-#define async_req_5_5(phoneid, method, arg1, arg2, arg3, arg4, arg5, rc1, rc2, \
-    rc3, rc4, rc5) \
-	async_req_slow((phoneid), (method), (arg1), (arg2), (arg3), (arg4), \
-	    (arg5), (rc1), (rc2), (rc3), (rc4), (rc5))
-
-extern ipcarg_t async_req_fast(int phoneid, ipcarg_t method, ipcarg_t arg1,
-    ipcarg_t arg2, ipcarg_t arg3, ipcarg_t arg4, ipcarg_t *r1, ipcarg_t *r2,
-    ipcarg_t *r3, ipcarg_t *r4, ipcarg_t *r5);
-extern ipcarg_t async_req_slow(int phoneid, ipcarg_t method, ipcarg_t arg1,
-    ipcarg_t arg2, ipcarg_t arg3, ipcarg_t arg4, ipcarg_t arg5, ipcarg_t *r1,
-    ipcarg_t *r2, ipcarg_t *r3, ipcarg_t *r4, ipcarg_t *r5);
-
-static inline void async_serialize_start(void)
-{
-	fibril_inc_sercount();
-}
-
-static inline void async_serialize_end(void)
-{
-	fibril_dec_sercount();
-}
-
-extern int async_connect_me_to(int, ipcarg_t, ipcarg_t, ipcarg_t);
-extern int async_connect_me_to_blocking(int, ipcarg_t, ipcarg_t, ipcarg_t);
-
-/*
- * User-friendly wrappers for async_share_in_start().
- */
-#define async_share_in_start_0_0(phoneid, dst, size) \
-	async_share_in_start((phoneid), (dst), (size), 0, NULL)
-#define async_share_in_start_0_1(phoneid, dst, size, flags) \
-	async_share_in_start((phoneid), (dst), (size), 0, (flags))
-#define async_share_in_start_1_0(phoneid, dst, size, arg) \
-	async_share_in_start((phoneid), (dst), (size), (arg), NULL)
-#define async_share_in_start_1_1(phoneid, dst, size, arg, flags) \
-	async_share_in_start((phoneid), (dst), (size), (arg), (flags))
-
-extern int async_share_in_start(int, void *, size_t, ipcarg_t, int *);
-extern int async_share_in_receive(ipc_callid_t *, size_t *);
-extern int async_share_in_finalize(ipc_callid_t, void *, int );
-extern int async_share_out_start(int, void *, int);
-extern int async_share_out_receive(ipc_callid_t *, size_t *, int *);
-extern int async_share_out_finalize(ipc_callid_t, void *);
-
-/*
- * User-friendly wrappers for async_data_read_forward_fast().
- */
-#define async_data_read_forward_0_0(phoneid, method, answer) \
-	async_data_read_forward_fast((phoneid), (method), 0, 0, 0, 0, NULL)
-#define async_data_read_forward_0_1(phoneid, method, answer) \
-	async_data_read_forward_fast((phoneid), (method), 0, 0, 0, 0, (answer))
-#define async_data_read_forward_1_0(phoneid, method, arg1, answer) \
-	async_data_read_forward_fast((phoneid), (method), (arg1), 0, 0, 0, NULL)
-#define async_data_read_forward_1_1(phoneid, method, arg1, answer) \
-	async_data_read_forward_fast((phoneid), (method), (arg1), 0, 0, 0, (answer))
-#define async_data_read_forward_2_0(phoneid, method, arg1, arg2, answer) \
-	async_data_read_forward_fast((phoneid), (method), (arg1), (arg2), 0, 0, NULL)
-#define async_data_read_forward_2_1(phoneid, method, arg1, arg2, answer) \
-	async_data_read_forward_fast((phoneid), (method), (arg1), (arg2), 0, 0, \
-	    (answer))
-#define async_data_read_forward_3_0(phoneid, method, arg1, arg2, arg3, answer) \
-	async_data_read_forward_fast((phoneid), (method), (arg1), (arg2), (arg3), 0, \
-	    NULL)
-#define async_data_read_forward_3_1(phoneid, method, arg1, arg2, arg3, answer) \
-	async_data_read_forward_fast((phoneid), (method), (arg1), (arg2), (arg3), 0, \
-	    (answer))
-#define async_data_read_forward_4_0(phoneid, method, arg1, arg2, arg3, arg4, answer) \
-	async_data_read_forward_fast((phoneid), (method), (arg1), (arg2), (arg3), \
-	    (arg4), NULL)
-#define async_data_read_forward_4_1(phoneid, method, arg1, arg2, arg3, arg4, answer) \
-	async_data_read_forward_fast((phoneid), (method), (arg1), (arg2), (arg3), \
-	    (arg4), (answer))
-
-extern int async_data_read_start(int, void *, size_t);
-extern int async_data_read_receive(ipc_callid_t *, size_t *);
-extern int async_data_read_finalize(ipc_callid_t, const void *, size_t);
-
-extern int async_data_read_forward_fast(int, ipcarg_t, ipcarg_t, ipcarg_t,
-    ipcarg_t, ipcarg_t, ipc_call_t *);
-
-/*
- * User-friendly wrappers for async_data_write_forward_fast().
- */
-#define async_data_write_forward_0_0(phoneid, method, answer) \
-	async_data_write_forward_fast((phoneid), (method), 0, 0, 0, 0, NULL)
-#define async_data_write_forward_0_1(phoneid, method, answer) \
-	async_data_write_forward_fast((phoneid), (method), 0, 0, 0, 0, (answer))
-#define async_data_write_forward_1_0(phoneid, method, arg1, answer) \
-	async_data_write_forward_fast((phoneid), (method), (arg1), 0, 0, 0, NULL)
-#define async_data_write_forward_1_1(phoneid, method, arg1, answer) \
-	async_data_write_forward_fast((phoneid), (method), (arg1), 0, 0, 0, \
-	    (answer))
-#define async_data_write_forward_2_0(phoneid, method, arg1, arg2, answer) \
-	async_data_write_forward_fast((phoneid), (method), (arg1), (arg2), 0, 0, \
-	    NULL)
-#define async_data_write_forward_2_1(phoneid, method, arg1, arg2, answer) \
-	async_data_write_forward_fast((phoneid), (method), (arg1), (arg2), 0, 0, \
-	    (answer))
-#define async_data_write_forward_3_0(phoneid, method, arg1, arg2, arg3, answer) \
-	async_data_write_forward_fast((phoneid), (method), (arg1), (arg2), (arg3), \
-	    0, NULL)
-#define async_data_write_forward_3_1(phoneid, method, arg1, arg2, arg3, answer) \
-	async_data_write_forward_fast((phoneid), (method), (arg1), (arg2), (arg3), \
-	    0, (answer))
-#define async_data_write_forward_4_0(phoneid, method, arg1, arg2, arg3, arg4, answer) \
-	async_data_write_forward_fast((phoneid), (method), (arg1), (arg2), (arg3), \
-	    (arg4), NULL)
-#define async_data_write_forward_4_1(phoneid, method, arg1, arg2, arg3, arg4, answer) \
-	async_data_write_forward_fast((phoneid), (method), (arg1), (arg2), (arg3), \
-	    (arg4), (answer))
-
-extern int async_data_write_start(int, const void *, size_t);
-extern int async_data_write_receive(ipc_callid_t *, size_t *);
-extern int async_data_write_finalize(ipc_callid_t, void *, size_t);
-
-extern int async_data_write_accept(void **, const bool, const size_t,
-    const size_t, const size_t, size_t *);
-extern void async_data_write_void(const int);
-
-extern int async_data_write_forward_fast(int, ipcarg_t, ipcarg_t, ipcarg_t,
-    ipcarg_t, ipcarg_t, ipc_call_t *);
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/include/async_priv.h
===================================================================
--- uspace/lib/libc/include/async_priv.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,87 +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 libc
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_ASYNC_PRIV_H_
-#define LIBC_ASYNC_PRIV_H_
-
-#include <adt/list.h>
-#include <fibril.h>
-#include <sys/time.h>
-#include <bool.h>
-
-/** Structures of this type are used to track the timeout events. */
-typedef struct {
-	/** If true, this struct is in the timeout list. */
-	bool inlist;
-	
-	/** Timeout list link. */
-	link_t link;
-	
-	/** If true, we have timed out. */
-	bool occurred;
-
-	/** Expiration time. */
-	struct timeval expires;
-} to_event_t;
-
-/** Structures of this type are used to track the wakeup events. */
-typedef struct {
-	/** If true, this struct is in a synchronization object wait queue. */
-	bool inlist;
-	
-	/** Wait queue linkage. */
-	link_t link;
-} wu_event_t;
-
-
-/** Structures of this type represent a waiting fibril. */
-typedef struct {
-	/** Identification of and link to the waiting fibril. */
-	fid_t fid;
-	
-	/** If true, this fibril is currently active. */
-	bool active;
-
-	/** Timeout wait data. */
-	to_event_t to_event;
-	/** Wakeup wait data. */
-	wu_event_t wu_event;
-} awaiter_t;
-
-extern void async_insert_timeout(awaiter_t *wd);
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/include/atomic.h
===================================================================
--- uspace/lib/libc/include/atomic.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,43 +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.
- */
-
-/** @addtogroup libc
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_ATOMIC_H_
-#define LIBC_ATOMIC_H_
-
-#include <libarch/atomic.h>
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/include/atomicdflt.h
===================================================================
--- uspace/lib/libc/include/atomicdflt.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,69 +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 libc
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_ATOMICDFLT_H_
-#define LIBC_ATOMICDFLT_H_
-
-#ifndef LIBC_ARCH_ATOMIC_H_
-	#error This file cannot be included directly, include atomic.h instead.
-#endif
-
-#include <stdint.h>
-#include <bool.h>
-
-typedef struct atomic {
-	volatile atomic_count_t count;
-} atomic_t;
-
-static inline void atomic_set(atomic_t *val, atomic_count_t i)
-{
-	val->count = i;
-}
-
-static inline atomic_count_t atomic_get(atomic_t *val)
-{
-	return val->count;
-}
-
-#ifndef CAS
-static inline bool cas(atomic_t *val, atomic_count_t ov, atomic_count_t nv)
-{
-	return __sync_bool_compare_and_swap(&val->count, ov, nv);
-}
-#endif
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/include/bitops.h
===================================================================
--- uspace/lib/libc/include/bitops.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,97 +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 generic
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_BITOPS_H_
-#define LIBC_BITOPS_H_
-
-#include <sys/types.h>
-
-
-/** Return position of first non-zero bit from left (i.e. [log_2(arg)]).
- *
- * If number is zero, it returns 0
- */
-static inline unsigned int fnzb32(uint32_t arg)
-{
-	unsigned int n = 0;
-	
-	if (arg >> 16) {
-		arg >>= 16;
-		n += 16;
-	}
-	
-	if (arg >> 8) {
-		arg >>= 8;
-		n += 8;
-	}
-	
-	if (arg >> 4) {
-		arg >>= 4;
-		n += 4;
-	}
-	
-	if (arg >> 2) {
-		arg >>= 2;
-		n += 2;
-	}
-	
-	if (arg >> 1) {
-		arg >>= 1;
-		n += 1;
-	}
-	
-	return n;
-}
-
-static inline unsigned int fnzb64(uint64_t arg)
-{
-	unsigned int n = 0;
-	
-	if (arg >> 32) {
-		arg >>= 32;
-		n += 32;
-	}
-	
-	return (n + fnzb32((uint32_t) arg));
-}
-
-static inline unsigned int fnzb(size_t arg)
-{
-	return fnzb64(arg);
-}
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/include/bool.h
===================================================================
--- uspace/lib/libc/include/bool.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,46 +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.
- */
-
-/** @addtogroup libc
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_BOOL_H_
-#define LIBC_BOOL_H_
-
-#define false 0
-#define true 1
-
-typedef short bool;
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/include/byteorder.h
===================================================================
--- uspace/lib/libc/include/byteorder.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,111 +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 libc
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_BYTEORDER_H_
-#define LIBC_BYTEORDER_H_
-
-#include <stdint.h>
-
-#if !(defined(__BE__) ^ defined(__LE__))
-	#error The architecture must be either big-endian or little-endian.
-#endif
-
-#ifdef __BE__
-
-#define uint16_t_le2host(n)  (uint16_t_byteorder_swap(n))
-#define uint32_t_le2host(n)  (uint32_t_byteorder_swap(n))
-#define uint64_t_le2host(n)  (uint64_t_byteorder_swap(n))
-
-#define uint16_t_be2host(n)  (n)
-#define uint32_t_be2host(n)  (n)
-#define uint64_t_be2host(n)  (n)
-
-#define host2uint16_t_le(n)  (uint16_t_byteorder_swap(n))
-#define host2uint32_t_le(n)  (uint32_t_byteorder_swap(n))
-#define host2uint64_t_le(n)  (uint64_t_byteorder_swap(n))
-
-#define host2uint16_t_be(n)  (n)
-#define host2uint32_t_be(n)  (n)
-#define host2uint64_t_be(n)  (n)
-
-#else
-
-#define uint16_t_le2host(n)  (n)
-#define uint32_t_le2host(n)  (n)
-#define uint64_t_le2host(n)  (n)
-
-#define uint16_t_be2host(n)  (uint16_t_byteorder_swap(n))
-#define uint32_t_be2host(n)  (uint32_t_byteorder_swap(n))
-#define uint64_t_be2host(n)  (uint64_t_byteorder_swap(n))
-
-#define host2uint16_t_le(n)  (n)
-#define host2uint32_t_le(n)  (n)
-#define host2uint64_t_le(n)  (n)
-
-#define host2uint16_t_be(n)  (uint16_t_byteorder_swap(n))
-#define host2uint32_t_be(n)  (uint32_t_byteorder_swap(n))
-#define host2uint64_t_be(n)  (uint64_t_byteorder_swap(n))
-
-#endif
-
-static inline uint64_t uint64_t_byteorder_swap(uint64_t n)
-{
-	return ((n & 0xff) << 56) |
-	    ((n & 0xff00) << 40) |
-	    ((n & 0xff0000) << 24) |
-	    ((n & 0xff000000LL) << 8) |
-	    ((n & 0xff00000000LL) >> 8) |
-	    ((n & 0xff0000000000LL) >> 24) |
-	    ((n & 0xff000000000000LL) >> 40) |
-	    ((n & 0xff00000000000000LL) >> 56);
-}
-
-static inline uint32_t uint32_t_byteorder_swap(uint32_t n)
-{
-	return ((n & 0xff) << 24) |
-	    ((n & 0xff00) << 8) |
-	    ((n & 0xff0000) >> 8) |
-	    ((n & 0xff000000) >> 24);
-}
-
-static inline uint16_t uint16_t_byteorder_swap(uint16_t n)
-{
-	return ((n & 0xff) << 8) |
-	    ((n & 0xff00) >> 8);
-}
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/include/cap.h
===================================================================
--- uspace/lib/libc/include/cap.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,46 +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 libc
- * @{
- */
-/** @file
- */
-
-#ifndef LIB_CAP_H_
-#define LIB_CAP_H_
-
-#include <task.h>
-
-extern int cap_grant(task_id_t id, unsigned int caps);
-extern int cap_revoke(task_id_t id, unsigned int caps);
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/include/clipboard.h
===================================================================
--- uspace/lib/libc/include/clipboard.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,44 +1,0 @@
-/*
- * Copyright (c) 2009 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 libc
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_CLIPBOARD_H_
-#define LIBC_CLIPBOARD_H_
-
-extern int clipboard_put_str(const char *);
-extern int clipboard_get_str(char **);
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/include/ctype.h
===================================================================
--- uspace/lib/libc/include/ctype.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,98 +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 libc
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_CTYPE_H_
-#define LIBC_CTYPE_H_
-
-static inline int islower(int c)
-{
-	return ((c >= 'a') && (c <= 'z'));
-}
-
-static inline int isupper(int c)
-{
-	return ((c >= 'A') && (c <= 'Z'));
-}
-
-static inline int isalpha(int c)
-{
-	return (islower(c) || isupper(c));
-}
-
-static inline int isdigit(int c)
-{
-	return ((c >= '0') && (c <= '9'));
-}
-
-static inline int isalnum(int c)
-{
-	return (isalpha(c) || isdigit(c));
-}
-
-static inline int isspace(int c)
-{
-	switch (c) {
-	case ' ':
-	case '\n':
-	case '\t':
-	case '\f':
-	case '\r':
-	case '\v':
-		return 1;
-		break;
-	default:
-		return 0;
-	}
-}
-
-static inline int tolower(int c)
-{
-	if (isupper(c))
-		return (c + ('a' - 'A'));
-	else
-		return c;
-}
-
-static inline int toupper(int c)
-{
-	if (islower(c))
-		return (c + ('A' - 'a'));
-	else
-		return c;
-}
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/include/ddi.h
===================================================================
--- uspace/lib/libc/include/ddi.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,49 +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 libc
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_DDI_H_
-#define LIBC_DDI_H_
-
-#include <task.h>
-
-extern int device_assign_devno(void);
-extern int physmem_map(void *, void *, unsigned long, int);
-extern int iospace_enable(task_id_t, void *, unsigned long);
-extern int preemption_control(int);
-extern int pio_enable(void *, size_t, void **);
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/include/devmap.h
===================================================================
--- uspace/lib/libc/include/devmap.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,66 +1,0 @@
-/*
- * Copyright (c) 2009 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 libc
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_DEVMAP_H_
-#define LIBC_DEVMAP_H_
-
-#include <ipc/devmap.h>
-#include <async.h>
-#include <bool.h>
-
-extern int devmap_get_phone(devmap_interface_t, unsigned int);
-extern void devmap_hangup_phone(devmap_interface_t iface);
-
-extern int devmap_driver_register(const char *, async_client_conn_t);
-extern int devmap_device_register(const char *, dev_handle_t *);
-
-extern int devmap_device_get_handle(const char *, dev_handle_t *, unsigned int);
-extern int devmap_namespace_get_handle(const char *, dev_handle_t *, unsigned int);
-extern devmap_handle_type_t devmap_handle_probe(dev_handle_t);
-
-extern int devmap_device_connect(dev_handle_t, unsigned int);
-
-extern int devmap_null_create(void);
-extern void devmap_null_destroy(int);
-
-extern size_t devmap_count_namespaces(void);
-extern size_t devmap_count_devices(dev_handle_t);
-
-extern size_t devmap_get_namespaces(dev_desc_t **);
-extern size_t devmap_get_devices(dev_handle_t, dev_desc_t **);
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/include/dirent.h
===================================================================
--- uspace/lib/libc/include/dirent.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,57 +1,0 @@
-/*
- * Copyright (c) 2008 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 libc
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_DIRENT_H_
-#define LIBC_DIRENT_H_
-
-#define NAME_MAX  256
-
-struct dirent {
-	char d_name[NAME_MAX + 1];
-};
-
-typedef struct {
-	int fd;
-	struct dirent res;
-} DIR;
-
-extern DIR *opendir(const char *);
-extern struct dirent *readdir(DIR *);
-extern void rewinddir(DIR *);
-extern int closedir(DIR *);
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/include/err.h
===================================================================
--- uspace/lib/libc/include/err.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(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 libc
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_ERR_H_
-#define LIBC_ERR_H_
-
-#define errx(status, fmt, ...) { \
-	printf((fmt), ##__VA_ARGS__); \
-	_exit(status); \
-}
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/include/errno.h
===================================================================
--- uspace/lib/libc/include/errno.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,61 +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 libc
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_ERRNO_H_
-#define LIBC_ERRNO_H_
-
-#include <kernel/errno.h>
-#include <fibril.h>
-
-extern int _errno;
-
-#define errno _errno
-
-#define EMFILE        (-17)
-#define ENAMETOOLONG  (-256)
-#define EISDIR        (-257)
-#define ENOTDIR       (-258)
-#define ENOSPC        (-259)
-#define EEXIST        (-260)
-#define ENOTEMPTY     (-261)
-#define EBADF         (-262)
-#define ERANGE        (-263)
-#define EXDEV         (-264)
-#define EIO           (-265)
-#define EMLINK        (-266)
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/include/event.h
===================================================================
--- uspace/lib/libc/include/event.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,46 +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.
- */
-
-/** @addtogroup libc
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_EVENT_H_
-#define LIBC_EVENT_H_
-
-#include <kernel/ipc/event_types.h>
-#include <ipc/ipc.h>
-
-extern int event_subscribe(event_type_t, ipcarg_t);
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/include/fcntl.h
===================================================================
--- uspace/lib/libc/include/fcntl.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,52 +1,0 @@
-/*
- * Copyright (c) 2007 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 libc
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_FCNTL_H_
-#define LIBC_FCNTL_H_
-
-#define O_CREAT   1
-#define O_EXCL    2
-#define O_TRUNC   4
-#define O_APPEND  8
-#define O_RDONLY  16
-#define O_RDWR    32
-#define O_WRONLY  64
-#define O_DESC    128
-
-extern int open(const char *, int, ...);
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/include/fibril.h
===================================================================
--- uspace/lib/libc/include/fibril.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,97 +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 libc
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_FIBRIL_H_
-#define LIBC_FIBRIL_H_
-
-#include <libarch/fibril.h>
-#include <adt/list.h>
-#include <libarch/tls.h>
-
-#define context_set_generic(c, _pc, stack, size, ptls) \
-	(c)->pc = (sysarg_t) (_pc); \
-	(c)->sp = ((sysarg_t) (stack)) + (size) - SP_DELTA; \
-	(c)->tls = (sysarg_t) (ptls);
-
-#define FIBRIL_SERIALIZED  1
-#define FIBRIL_WRITER      2
-
-typedef enum {
-	FIBRIL_PREEMPT,
-	FIBRIL_TO_MANAGER,
-	FIBRIL_FROM_MANAGER,
-	FIBRIL_FROM_DEAD
-} fibril_switch_type_t;
-
-typedef sysarg_t fid_t;
-
-typedef struct fibril {
-	link_t link;
-	context_t ctx;
-	void *stack;
-	void *arg;
-	int (*func)(void *);
-	tcb_t *tcb;
-
-	struct fibril *clean_after_me;
-	int retval;
-	int flags;
-} fibril_t;
-
-/** Fibril-local variable specifier */
-#define fibril_local __thread
-
-extern int context_save(context_t *ctx) __attribute__((returns_twice));
-extern void context_restore(context_t *ctx) __attribute__((noreturn));
-
-extern fid_t fibril_create(int (*func)(void *), void *arg);
-extern fibril_t *fibril_setup(void);
-extern void fibril_teardown(fibril_t *f);
-extern int fibril_switch(fibril_switch_type_t stype);
-extern void fibril_add_ready(fid_t fid);
-extern void fibril_add_manager(fid_t fid);
-extern void fibril_remove_manager(void);
-extern fid_t fibril_get_id(void);
-extern void fibril_inc_sercount(void);
-extern void fibril_dec_sercount(void);
-
-static inline int fibril_yield(void)
-{
-	return fibril_switch(FIBRIL_PREEMPT);
-}
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/include/fibril_synch.h
===================================================================
--- uspace/lib/libc/include/fibril_synch.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,107 +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.
- */
-
-/** @addtogroup libc
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_FIBRIL_SYNCH_H_
-#define LIBC_FIBRIL_SYNCH_H_
-
-#include <async.h>
-#include <fibril.h>
-#include <adt/list.h>
-#include <libarch/tls.h>
-#include <sys/time.h>
-
-typedef struct {
-	int counter;
-	link_t waiters;
-} fibril_mutex_t;
-
-#define FIBRIL_MUTEX_INITIALIZE(name) \
-	fibril_mutex_t name = {	\
-		.counter = 1, \
-		.waiters = { \
-			.prev = &name.waiters, \
-			.next = &name.waiters, \
-		} \
-	}
-
-typedef struct {
-	unsigned writers;
-	unsigned readers;
-	link_t waiters;
-} fibril_rwlock_t;
-
-#define FIBRIL_RWLOCK_INITIALIZE(name) \
-	fibril_rwlock_t name = { \
-		.readers = 0, \
-		.writers = 0, \
-		.waiters = { \
-			.prev = &name.waiters, \
-			.next = &name.waiters, \
-		} \
-	}
-
-typedef struct {
-	link_t waiters;
-} fibril_condvar_t;
-
-#define FIBRIL_CONDVAR_INITIALIZE(name) \
-	fibril_condvar_t name = { \
-		.waiters = { \
-			.next = &name.waiters, \
-			.prev = &name.waiters, \
-		} \
-	}
-
-extern void fibril_mutex_initialize(fibril_mutex_t *);
-extern void fibril_mutex_lock(fibril_mutex_t *);
-extern bool fibril_mutex_trylock(fibril_mutex_t *);
-extern void fibril_mutex_unlock(fibril_mutex_t *);
-
-extern void fibril_rwlock_initialize(fibril_rwlock_t *);
-extern void fibril_rwlock_read_lock(fibril_rwlock_t *);
-extern void fibril_rwlock_write_lock(fibril_rwlock_t *);
-extern void fibril_rwlock_read_unlock(fibril_rwlock_t *);
-extern void fibril_rwlock_write_unlock(fibril_rwlock_t *);
-
-extern void fibril_condvar_initialize(fibril_condvar_t *);
-extern int fibril_condvar_wait_timeout(fibril_condvar_t *, fibril_mutex_t *,
-    suseconds_t);
-extern void fibril_condvar_wait(fibril_condvar_t *, fibril_mutex_t *);
-extern void fibril_condvar_signal(fibril_condvar_t *);
-extern void fibril_condvar_broadcast(fibril_condvar_t *);
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/include/futex.h
===================================================================
--- uspace/lib/libc/include/futex.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,53 +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 libc
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_FUTEX_H_
-#define LIBC_FUTEX_H_
-
-#include <atomic.h>
-#include <sys/types.h>
-
-#define FUTEX_INITIALIZER     {1}
-
-typedef atomic_t futex_t;
-
-extern void futex_initialize(futex_t *futex, int value);
-extern int futex_down(futex_t *futex);
-extern int futex_trydown(futex_t *futex);
-extern int futex_up(futex_t *futex);
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/include/getopt.h
===================================================================
--- uspace/lib/libc/include/getopt.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,71 +1,0 @@
-/*	$NetBSD: getopt.h,v 1.10.6.1 2008/05/18 12:30:09 yamt Exp $	*/
-
-/*-
- * Copyright (c) 2000 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Dieter Baron and Thomas Klausner.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. 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.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``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 FOUNDATION OR CONTRIBUTORS
- * 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.
- */
-
-/* Ported to HelenOS August 2008 by Tim Post <echo@echoreply.us> */
-
-#ifndef _GETOPT_H_
-#define _GETOPT_H_
-
-#include <unistd.h>
-
-/*
- * Gnu like getopt_long() and BSD4.4 getsubopt()/optreset extensions
- */
-#define no_argument        0
-#define required_argument  1
-#define optional_argument  2
-
-struct option {
-	/* name of long option */
-	const char *name;
-	/*
-	 * one of no_argument, required_argument, and optional_argument:
-	 * whether option takes an argument
-	 */
-	int has_arg;
-	/* if not NULL, set *flag to val when option found */
-	int *flag;
-	/* if flag not NULL, value to set *flag to; else return value */
-	int val;
-};
-
-/* HelenOS Port - These need to be exposed for legacy getopt() */
-extern const char *optarg;
-extern int optind, opterr, optopt;
-extern int optreset;
-
-int getopt_long(int, char * const *, const char *,
-    const struct option *, int *);
-
-/* HelenOS Port : Expose legacy getopt() */
-int	 getopt(int, char * const [], const char *);
-
-#endif /* !_GETOPT_H_ */
Index: pace/lib/libc/include/inttypes.h
===================================================================
--- uspace/lib/libc/include/inttypes.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,43 +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 libc
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_INTTYPES_H_
-#define LIBC_INTTYPES_H_
-
-#include <libarch/inttypes.h>
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/include/io/color.h
===================================================================
--- uspace/lib/libc/include/io/color.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,55 +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.
- */
-
-/** @addtogroup libc
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_IO_COLOR_H_
-#define LIBC_IO_COLOR_H_
-
-enum console_color {
-	COLOR_BLACK   = 0,
-	COLOR_BLUE    = 1,
-	COLOR_GREEN   = 2,
-	COLOR_CYAN    = 3,
-	COLOR_RED     = 4,
-	COLOR_MAGENTA = 5,
-	COLOR_YELLOW  = 6,
-	COLOR_WHITE   = 7,
-	
-	CATTR_BRIGHT  = 8,
-	CATTR_BLINK   = 8
-};
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/include/io/console.h
===================================================================
--- uspace/lib/libc/include/io/console.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,87 +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.
- */
-
-/** @addtogroup libc
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_IO_CONSOLE_H_
-#define LIBC_IO_CONSOLE_H_
-
-#include <ipc/ipc.h>
-#include <bool.h>
-
-typedef enum {
-	KEY_PRESS,
-	KEY_RELEASE
-} console_ev_type_t;
-
-enum {
-	CONSOLE_CCAP_NONE = 0,
-	CONSOLE_CCAP_STYLE,
-	CONSOLE_CCAP_INDEXED,
-	CONSOLE_CCAP_RGB
-};
-
-/** Console event structure. */
-typedef struct {
-	/** Press or release event. */
-	console_ev_type_t type;
-	
-	/** Keycode of the key that was pressed or released. */
-	unsigned int key;
-	
-	/** Bitmask of modifiers held. */
-	unsigned int mods;
-	
-	/** The character that was generated or '\0' for none. */
-	wchar_t c;
-} console_event_t;
-
-extern void console_clear(int phone);
-
-extern int console_get_size(int phone, int *cols, int *rows);
-extern int console_get_pos(int phone, int *col, int *row);
-extern void console_goto(int phone, int col, int row);
-
-extern void console_set_style(int phone, int style);
-extern void console_set_color(int phone, int fg_color, int bg_color, int flags);
-extern void console_set_rgb_color(int phone, int fg_color, int bg_color);
-
-extern void console_cursor_visibility(int phone, bool show);
-extern int console_get_color_cap(int phone, int *ccap);
-extern void console_kcon_enable(int phone);
-
-extern bool console_get_event(int phone, console_event_t *event);
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/include/io/keycode.h
===================================================================
--- uspace/lib/libc/include/io/keycode.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,220 +1,0 @@
-/*
- * Copyright (c) 2009 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 libc
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_IO_KEYCODE_H_
-#define LIBC_IO_KEYCODE_H_
-
-/** Keycode definitions.
- *
- * A keycode identifies a key by its position on the keyboard, rather
- * than by its label. For human readability, key positions are noted
- * with the key label on a keyboard with US layout. This label has
- * nothing to do with the character, that the key produces
- * -- this is determined by the keymap.
- *
- * The keyboard model reflects a standard PC keyboard layout.
- * Non-standard keyboards need to be mapped to this model in some
- * logical way. Scancodes are mapped to keycodes with a scanmap.
- *
- * For easier mapping to the model and to emphasize the nature of keycodes,
- * they really are organized here by position, rather than by label.
- */
-enum keycode {
-
-	/* Main block row 1 */
-
-	KC_BACKTICK = 1,
-
-	KC_1,
-	KC_2,
-	KC_3,
-	KC_4,
-	KC_5,
-	KC_6,
-	KC_7,
-	KC_8,
-	KC_9,
-	KC_0,
-
-	KC_MINUS,
-	KC_EQUALS,
-	KC_BACKSPACE,
-
-	/* Main block row 2 */
-
-	KC_TAB,
-
-	KC_Q,
-	KC_W,
-	KC_E,
-	KC_R,
-	KC_T,
-	KC_Y,
-	KC_U,
-	KC_I,
-	KC_O,
-	KC_P,
-
-	KC_LBRACKET,
-	KC_RBRACKET,
-
-	/* Main block row 3 */
-
-	KC_CAPS_LOCK,
-	
-	KC_A,
-	KC_S,
-	KC_D,
-	KC_F,
-	KC_G,
-	KC_H,
-	KC_J,
-	KC_K,
-	KC_L,
-
-	KC_SEMICOLON,
-	KC_QUOTE,
-	KC_BACKSLASH,
-
-	KC_ENTER,
-
-	/* Main block row 4 */
-
-	KC_LSHIFT,
-
-	KC_Z,
-	KC_X,
-	KC_C,
-	KC_V,
-	KC_B,
-	KC_N,
-	KC_M,
-
-	KC_COMMA,
-	KC_PERIOD,
-	KC_SLASH,
-
-	KC_RSHIFT,
-
-	/* Main block row 5 */
-
-	KC_LCTRL,
-	KC_LALT,
-	KC_SPACE,
-	KC_RALT,
-	KC_RCTRL,
-
-	/* Function keys block */
-
-	KC_ESCAPE,
-
-	KC_F1,
-	KC_F2,
-	KC_F3,
-	KC_F4,
-	KC_F5,
-	KC_F6,
-	KC_F7,
-	KC_F8,
-	KC_F9,
-	KC_F10,
-	KC_F11,
-	KC_F12,
-
-	KC_PRTSCR,
-	KC_SCROLL_LOCK,
-	KC_PAUSE,
-
-	/* Cursor keys block */
-
-	KC_INSERT,
-	KC_HOME,
-	KC_PAGE_UP,
-
-	KC_DELETE,
-	KC_END,
-	KC_PAGE_DOWN,
-
-	KC_UP,
-	KC_LEFT,
-	KC_DOWN,
-	KC_RIGHT,
-
-	/* Numeric block */
-
-	KC_NUM_LOCK,
-	KC_NSLASH,
-	KC_NTIMES,
-	KC_NMINUS,
-
-	KC_NPLUS,
-	KC_NENTER,
-
-	KC_N7,
-	KC_N8,
-	KC_N9,
-
-	KC_N4,
-	KC_N5,
-	KC_N6,
-
-	KC_N1,
-	KC_N2,
-	KC_N3,
-
-	KC_N0,
-	KC_NPERIOD
-	
-} keycode_t;
-
-enum keymod {
-	KM_LSHIFT      = 0x001,
-	KM_RSHIFT      = 0x002,
-	KM_LCTRL       = 0x004,
-	KM_RCTRL       = 0x008,
-	KM_LALT        = 0x010,
-	KM_RALT        = 0x020,
-	KM_CAPS_LOCK   = 0x040,
-	KM_NUM_LOCK    = 0x080,
-	KM_SCROLL_LOCK = 0x100,
-	
-	KM_SHIFT       = KM_LSHIFT | KM_RSHIFT,
-	KM_CTRL        = KM_LCTRL | KM_RCTRL,
-	KM_ALT         = KM_LALT | KM_RALT
-} keymod_t;
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/include/io/klog.h
===================================================================
--- uspace/lib/libc/include/io/klog.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,46 +1,0 @@
-/*
- * Copyright (c) 2006 Jakub Vana
- * 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 libc
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_STREAM_H_
-#define LIBC_STREAM_H_
-
-#include <sys/types.h>
-
-extern size_t klog_write(const void *buf, size_t size);
-extern void klog_update(void);
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/include/io/printf_core.h
===================================================================
--- uspace/lib/libc/include/io/printf_core.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,58 +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 libc
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_PRINTF_CORE_H_
-#define LIBC_PRINTF_CORE_H_
-
-#include <sys/types.h>
-#include <stdarg.h>
-
-/** Structure for specifying output methods for different printf clones. */
-typedef struct printf_spec {
-	/* String output function, returns number of printed characters or EOF */
-	int (*str_write)(const char *, size_t, void *);
-	
-	/* Wide string output function, returns number of printed characters or EOF */
-	int (*wstr_write)(const wchar_t *, size_t, void *);
-	
-	/* User data - output stream specification, state, locks, etc. */
-	void *data;
-} printf_spec_t;
-
-int printf_core(const char *fmt, printf_spec_t *ps, va_list ap);
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/include/io/style.h
===================================================================
--- uspace/lib/libc/include/io/style.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,46 +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.
- */
-
-/** @addtogroup libc
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_IO_STYLE_H_
-#define LIBC_IO_STYLE_H_
-
-enum console_style {
-	STYLE_NORMAL   = 0,
-	STYLE_EMPHASIS = 1
-};
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/include/ipc/adb.h
===================================================================
--- uspace/lib/libc/include/ipc/adb.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,53 +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 libcipc
- * @{
- */
-/** @file
- * @brief ADB device interface.
- */ 
-
-#ifndef LIBC_IPC_ADB_H_
-#define LIBC_IPC_ADB_H_
-
-#include <ipc/ipc.h>
-
-typedef enum {
-	ADB_REG_WRITE = IPC_FIRST_USER_METHOD
-} adb_request_t;
-
-
-typedef enum {
-	ADB_REG_NOTIF = IPC_FIRST_USER_METHOD
-} adb_notif_t;
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/include/ipc/bd.h
===================================================================
--- uspace/lib/libc/include/ipc/bd.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,50 +1,0 @@
-/*
- * Copyright (c) 2009 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 libcipc
- * @{
- */
-/** @file
- */ 
-
-#ifndef LIBC_IPC_BD_H_
-#define LIBC_IPC_BD_H_
-
-#include <ipc/ipc.h>
-
-typedef enum {
-	BD_GET_BLOCK_SIZE = IPC_FIRST_USER_METHOD,
-	BD_GET_NUM_BLOCKS,
-	BD_READ_BLOCKS,
-	BD_WRITE_BLOCKS
-} bd_request_t;
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/include/ipc/bus.h
===================================================================
--- uspace/lib/libc/include/ipc/bus.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,47 +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.
- */
-
-/** @addtogroup libcipc
- * @{
- */
-/** @file
- */ 
-
-#ifndef LIBC_BUS_H_
-#define LIBC_BUS_H_
-
-#include <ipc/ipc.h>
-
-typedef enum {
-	BUS_CLEAR_INTERRUPT = IPC_FIRST_USER_METHOD
-} bus_request_t;
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/include/ipc/char.h
===================================================================
--- uspace/lib/libc/include/ipc/char.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,53 +1,0 @@
-/*
- * Copyright (c) 2009 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 libcipc
- * @{
- */
-/** @file
- * @brief Character device interface.
- */ 
-
-#ifndef LIBC_IPC_CHAR_H_
-#define LIBC_IPC_CHAR_H_
-
-#include <ipc/ipc.h>
-
-typedef enum {
-	CHAR_WRITE_BYTE = IPC_FIRST_USER_METHOD
-} char_request_t;
-
-
-typedef enum {
-	CHAR_NOTIF_BYTE = IPC_FIRST_USER_METHOD
-} char_notif_t;
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/include/ipc/clipboard.h
===================================================================
--- uspace/lib/libc/include/ipc/clipboard.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,54 +1,0 @@
-/*
- * Copyright (c) 2009 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 libcipc
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_IPC_CLIPBOARD_H_
-#define LIBC_IPC_CLIPBOARD_H_
-
-#include <ipc/ipc.h>
-
-typedef enum {
-	CLIPBOARD_PUT_DATA = IPC_FIRST_USER_METHOD,
-	CLIPBOARD_GET_DATA,
-	CLIPBOARD_CONTENT
-} clipboard_request_t;
-
-typedef enum {
-	CLIPBOARD_TAG_NONE,
-	CLIPBOARD_TAG_DATA
-} clipboard_tag_t;
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/include/ipc/console.h
===================================================================
--- uspace/lib/libc/include/ipc/console.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,58 +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 libcipc
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_IPC_CONSOLE_H_
-#define LIBC_IPC_CONSOLE_H_
-
-#include <ipc/ipc.h>
-#include <ipc/vfs.h>
-
-typedef enum {
-	CONSOLE_GET_SIZE = VFS_OUT_LAST,
-	CONSOLE_GET_COLOR_CAP,
-	CONSOLE_GET_EVENT,
-	CONSOLE_GET_POS,
-	CONSOLE_GOTO,
-	CONSOLE_CLEAR,
-	CONSOLE_SET_STYLE,
-	CONSOLE_SET_COLOR,
-	CONSOLE_SET_RGB_COLOR,
-	CONSOLE_CURSOR_VISIBILITY,
-	CONSOLE_KCON_ENABLE
-} console_request_t;
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/include/ipc/devmap.h
===================================================================
--- uspace/lib/libc/include/ipc/devmap.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,87 +1,0 @@
-/*
- * Copyright (c) 2007 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 devmap
- * @{
- */
-
-#ifndef DEVMAP_DEVMAP_H_
-#define DEVMAP_DEVMAP_H_
-
-#include <atomic.h>
-#include <ipc/ipc.h>
-#include <adt/list.h>
-
-#define DEVMAP_NAME_MAXLEN  255
-
-typedef ipcarg_t dev_handle_t;
-
-typedef enum {
-	DEV_HANDLE_NONE,
-	DEV_HANDLE_NAMESPACE,
-	DEV_HANDLE_DEVICE
-} devmap_handle_type_t;
-
-typedef enum {
-	DEVMAP_DRIVER_REGISTER = IPC_FIRST_USER_METHOD,
-	DEVMAP_DRIVER_UNREGISTER,
-	DEVMAP_DEVICE_REGISTER,
-	DEVMAP_DEVICE_UNREGISTER,
-	DEVMAP_DEVICE_GET_HANDLE,
-	DEVMAP_NAMESPACE_GET_HANDLE,
-	DEVMAP_HANDLE_PROBE,
-	DEVMAP_NULL_CREATE,
-	DEVMAP_NULL_DESTROY,
-	DEVMAP_GET_NAMESPACE_COUNT,
-	DEVMAP_GET_DEVICE_COUNT,
-	DEVMAP_GET_NAMESPACES,
-	DEVMAP_GET_DEVICES
-} devmap_request_t;
-
-/** Interface provided by devmap.
- *
- * Every process that connects to devmap must ask one of following
- * interfaces otherwise connection will be refused.
- *
- */
-typedef enum {
-	/** Connect as device driver */
-	DEVMAP_DRIVER = 1,
-	/** Connect as client */
-	DEVMAP_CLIENT,
-	/** Create new connection to instance of device that
-	    is specified by second argument of call. */
-	DEVMAP_CONNECT_TO_DEVICE
-} devmap_interface_t;
-
-typedef struct {
-	dev_handle_t handle;
-	char name[DEVMAP_NAME_MAXLEN + 1];
-} dev_desc_t;
-
-#endif
Index: pace/lib/libc/include/ipc/fb.h
===================================================================
--- uspace/lib/libc/include/ipc/fb.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,85 +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 libcipc
- * @{
- */
-/** @file
- */ 
-
-#ifndef LIBC_FB_H_
-#define LIBC_FB_H_
-
-#include <ipc/ipc.h>
-
-typedef enum {
-	FB_PUTCHAR = IPC_FIRST_USER_METHOD,
-	FB_CLEAR,
-	FB_GET_CSIZE,
-	FB_GET_COLOR_CAP,
-	FB_CURSOR_VISIBILITY,
-	FB_CURSOR_GOTO,
-	FB_SCROLL,
-	FB_VIEWPORT_SWITCH,
-	FB_VIEWPORT_CREATE,
-	FB_VIEWPORT_DELETE,
-	FB_SET_STYLE,
-	FB_SET_COLOR,
-	FB_SET_RGB_COLOR,
-	FB_GET_RESOLUTION,
-	FB_DRAW_TEXT_DATA,
-	FB_FLUSH,
-	FB_DRAW_PPM,
-	FB_PREPARE_SHM,
-	FB_DROP_SHM,
-	FB_SHM2PIXMAP,
-	FB_VP_DRAW_PIXMAP,
-	FB_VP2PIXMAP,
-	FB_DROP_PIXMAP,
-	FB_ANIM_CREATE,
-	FB_ANIM_DROP,
-	FB_ANIM_ADDPIXMAP,
-	FB_ANIM_CHGVP,
-	FB_ANIM_START,
-	FB_ANIM_STOP,
-	FB_POINTER_MOVE,
-	FB_SCREEN_YIELD,
-	FB_SCREEN_RECLAIM
-} fb_request_t;
-
-enum {
-	FB_CCAP_NONE = 0,
-	FB_CCAP_STYLE,
-	FB_CCAP_INDEXED,
-	FB_CCAP_RGB
-};
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/include/ipc/ipc.h
===================================================================
--- uspace/lib/libc/include/ipc/ipc.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,298 +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 libcipc
- * @{
- */
-/** @file
- */
-
-#ifndef LIBIPC_IPC_H_
-#define LIBIPC_IPC_H_
-
-#include <task.h>
-#include <kernel/ipc/ipc.h>
-#include <kernel/ddi/irq.h>
-#include <sys/types.h>
-#include <kernel/synch/synch.h>
-
-#define IPC_FLAG_BLOCKING  0x01
-
-typedef sysarg_t ipcarg_t;
-
-typedef struct {
-	ipcarg_t args[IPC_CALL_LEN];
-	ipcarg_t in_phone_hash;
-} ipc_call_t;
-
-typedef sysarg_t ipc_callid_t;
-
-typedef void (* ipc_async_callback_t)(void *, int, ipc_call_t *);
-
-/*
- * User-friendly wrappers for ipc_call_sync_fast() and ipc_call_sync_slow().
- * They are in the form ipc_call_sync_m_n(), where m denotes the number of
- * arguments of payload and n denotes number of return values. Whenever
- * possible, the fast version is used.
- */
-#define ipc_call_sync_0_0(phoneid, method) \
-	ipc_call_sync_fast((phoneid), (method), 0, 0, 0, 0, 0, 0, 0, 0)
-#define ipc_call_sync_0_1(phoneid, method, res1) \
-	ipc_call_sync_fast((phoneid), (method), 0, 0, 0, (res1), 0, 0, 0, 0)
-#define ipc_call_sync_0_2(phoneid, method, res1, res2) \
-	ipc_call_sync_fast((phoneid), (method), 0, 0, 0, (res1), (res2), 0, 0, 0)
-#define ipc_call_sync_0_3(phoneid, method, res1, res2, res3) \
-	ipc_call_sync_fast((phoneid), (method), 0, 0, 0, (res1), (res2), (res3), \
-	    0, 0)
-#define ipc_call_sync_0_4(phoneid, method, res1, res2, res3, res4) \
-	ipc_call_sync_fast((phoneid), (method), 0, 0, 0, (res1), (res2), (res3), \
-	    (res4), 0)
-#define ipc_call_sync_0_5(phoneid, method, res1, res2, res3, res4, res5) \
-	ipc_call_sync_fast((phoneid), (method), 0, 0, 0, (res1), (res2), (res3), \
-	    (res4), (res5))
-
-#define ipc_call_sync_1_0(phoneid, method, arg1) \
-	ipc_call_sync_fast((phoneid), (method), (arg1), 0, 0, 0, 0, 0, 0, 0)
-#define ipc_call_sync_1_1(phoneid, method, arg1, res1) \
-	ipc_call_sync_fast((phoneid), (method), (arg1), 0, 0, (res1), 0, 0, 0, 0)
-#define ipc_call_sync_1_2(phoneid, method, arg1, res1, res2) \
-	ipc_call_sync_fast((phoneid), (method), (arg1), 0, 0, (res1), (res2), 0, \
-	    0, 0)
-#define ipc_call_sync_1_3(phoneid, method, arg1, res1, res2, res3) \
-	ipc_call_sync_fast((phoneid), (method), (arg1), 0, 0, (res1), (res2), \
-	    (res3), 0, 0)
-#define ipc_call_sync_1_4(phoneid, method, arg1, res1, res2, res3, res4) \
-	ipc_call_sync_fast((phoneid), (method), (arg1), 0, 0, (res1), (res2), \
-	    (res3), (res4), 0)
-#define ipc_call_sync_1_5(phoneid, method, arg1, res1, res2, res3, res4, \
-    res5) \
-	ipc_call_sync_fast((phoneid), (method), (arg1), 0, 0, (res1), (res2), \
-	    (res3), (res4), (res5))
-
-#define ipc_call_sync_2_0(phoneid, method, arg1, arg2) \
-	ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), 0, 0, 0, 0, \
-	    0, 0)
-#define ipc_call_sync_2_1(phoneid, method, arg1, arg2, res1) \
-	ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), 0, (res1), 0, 0, \
-	    0, 0)
-#define ipc_call_sync_2_2(phoneid, method, arg1, arg2, res1, res2) \
-	ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), 0, (res1), \
-	    (res2), 0, 0, 0)
-#define ipc_call_sync_2_3(phoneid, method, arg1, arg2, res1, res2, res3) \
-	ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), 0, (res1), \
-	    (res2), (res3), 0, 0)
-#define ipc_call_sync_2_4(phoneid, method, arg1, arg2, res1, res2, res3, \
-    res4) \
-	ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), 0, (res1), \
-	    (res2), (res3), (res4), 0)
-#define ipc_call_sync_2_5(phoneid, method, arg1, arg2, res1, res2, res3, \
-    res4, res5)\
-	ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), 0, (res1), \
-	    (res2), (res3), (res4), (res5))
-
-#define ipc_call_sync_3_0(phoneid, method, arg1, arg2, arg3) \
-	ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), (arg3), 0, 0, 0, \
-	    0, 0)
-#define ipc_call_sync_3_1(phoneid, method, arg1, arg2, arg3, res1) \
-	ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), (arg3), (res1), \
-	    0, 0, 0, 0)
-#define ipc_call_sync_3_2(phoneid, method, arg1, arg2, arg3, res1, res2) \
-	ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), (arg3), (res1), \
-	    (res2), 0, 0, 0)
-#define ipc_call_sync_3_3(phoneid, method, arg1, arg2, arg3, res1, res2, \
-    res3) \
-	ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), (arg3), \
-	    (res1), (res2), (res3), 0, 0)
-#define ipc_call_sync_3_4(phoneid, method, arg1, arg2, arg3, res1, res2, \
-    res3, res4) \
-	ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), (arg3), \
-	    (res1), (res2), (res3), (res4), 0)
-#define ipc_call_sync_3_5(phoneid, method, arg1, arg2, arg3, res1, res2, \
-    res3, res4, res5) \
-	ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), (arg3), \
-	    (res1), (res2), (res3), (res4), (res5))
-
-#define ipc_call_sync_4_0(phoneid, method, arg1, arg2, arg3, arg4) \
-	ipc_call_sync_slow((phoneid), (method), (arg1), (arg2), (arg3), (arg4), 0, \
-	    0, 0, 0, 0, 0)
-#define ipc_call_sync_4_1(phoneid, method, arg1, arg2, arg3, arg4, res1) \
-	ipc_call_sync_slow((phoneid), (method), (arg1), (arg2), (arg3), (arg4), 0, \
-	    (res1), 0, 0, 0, 0)
-#define ipc_call_sync_4_2(phoneid, method, arg1, arg2, arg3, arg4, res1, res2) \
-	ipc_call_sync_slow((phoneid), (method), (arg1), (arg2), (arg3), (arg4), 0, \
-	    (res1), (res2), 0, 0, 0)
-#define ipc_call_sync_4_3(phoneid, method, arg1, arg2, arg3, arg4, res1, res2, \
-    res3) \
-	ipc_call_sync_slow((phoneid), (method), (arg1), (arg2), (arg3), \
-	    (arg4), 0, (res1), (res2), (res3), 0, 0)
-#define ipc_call_sync_4_4(phoneid, method, arg1, arg2, arg3, arg4, res1, res2, \
-    res3, res4) \
-	ipc_call_sync_slow((phoneid), (method), (arg1), (arg2), (arg3), \
-	    (arg4), 0, (res1), (res2), (res3), (res4), 0)
-#define ipc_call_sync_4_5(phoneid, method, arg1, arg2, arg3, arg4, res1, res2, \
-    res3, res4, res5) \
-	ipc_call_sync_slow((phoneid), (method), (arg1), (arg2), (arg3), \
-	    (arg4), 0, (res1), (res2), (res3), (res4), (res5))
-
-#define ipc_call_sync_5_0(phoneid, method, arg1, arg2, arg3, arg4, arg5) \
-	ipc_call_sync_slow((phoneid), (method), (arg1), (arg2), (arg3), (arg4), \
-	    (arg5), 0, 0, 0, 0, 0)
-#define ipc_call_sync_5_1(phoneid, method, arg1, arg2, arg3, arg4, arg5, res1) \
-	ipc_call_sync_slow((phoneid), (method), (arg1), (arg2), (arg3), (arg4), \
-	    (arg5), (res1), 0, 0, 0, 0)
-#define ipc_call_sync_5_2(phoneid, method, arg1, arg2, arg3, arg4, arg5, res1, \
-    res2) \
-	ipc_call_sync_slow((phoneid), (method), (arg1), (arg2), (arg3), \
-	    (arg4), (arg5), (res1), (res2), 0, 0, 0)
-#define ipc_call_sync_5_3(phoneid, method, arg1, arg2, arg3, arg4, arg5, res1, \
-    res2, res3) \
-	ipc_call_sync_slow((phoneid), (method), (arg1), (arg2), (arg3), \
-	    (arg4), (arg5), (res1), (res2), (res3), 0, 0)
-#define ipc_call_sync_5_4(phoneid, method, arg1, arg2, arg3, arg4, arg5, res1, \
-    res2, res3, res4) \
-	ipc_call_sync_slow((phoneid), (method), (arg1), (arg2), (arg3), \
-	    (arg4), (arg5), (res1), (res2), (res3), (res4), 0)
-#define ipc_call_sync_5_5(phoneid, method, arg1, arg2, arg3, arg4, arg5, res1, \
-    res2, res3, res4, res5) \
-	ipc_call_sync_slow((phoneid), (method), (arg1), (arg2), (arg3), \
-	    (arg4), (arg5), (res1), (res2), (res3), (res4), (res5))
-
-extern int ipc_call_sync_fast(int, ipcarg_t, ipcarg_t, ipcarg_t, ipcarg_t,
-    ipcarg_t *, ipcarg_t *, ipcarg_t *, ipcarg_t *, ipcarg_t *);
-
-extern int ipc_call_sync_slow(int, ipcarg_t, ipcarg_t, ipcarg_t, ipcarg_t,
-    ipcarg_t, ipcarg_t, ipcarg_t *, ipcarg_t *, ipcarg_t *, ipcarg_t *,
-    ipcarg_t *);
-
-extern ipc_callid_t ipc_wait_cycle(ipc_call_t *, uint32_t, int);
-extern ipc_callid_t ipc_wait_for_call_timeout(ipc_call_t *, uint32_t);
-extern void ipc_poke(void);
-
-static inline ipc_callid_t ipc_wait_for_call(ipc_call_t *data)
-{
-	return ipc_wait_for_call_timeout(data, SYNCH_NO_TIMEOUT);
-}
-
-extern ipc_callid_t ipc_trywait_for_call(ipc_call_t *);
-
-/*
- * User-friendly wrappers for ipc_answer_fast() and ipc_answer_slow().
- * They are in the form of ipc_answer_m(), where m is the number of return
- * arguments. The macros decide between the fast and the slow version according
- * to m.
- */
-#define ipc_answer_0(callid, retval) \
-	ipc_answer_fast((callid), (retval), 0, 0, 0, 0)
-#define ipc_answer_1(callid, retval, arg1) \
-	ipc_answer_fast((callid), (retval), (arg1), 0, 0, 0)
-#define ipc_answer_2(callid, retval, arg1, arg2) \
-	ipc_answer_fast((callid), (retval), (arg1), (arg2), 0, 0)
-#define ipc_answer_3(callid, retval, arg1, arg2, arg3) \
-	ipc_answer_fast((callid), (retval), (arg1), (arg2), (arg3), 0)
-#define ipc_answer_4(callid, retval, arg1, arg2, arg3, arg4) \
-	ipc_answer_fast((callid), (retval), (arg1), (arg2), (arg3), (arg4))
-#define ipc_answer_5(callid, retval, arg1, arg2, arg3, arg4, arg5) \
-	ipc_answer_slow((callid), (retval), (arg1), (arg2), (arg3), (arg4), (arg5))
-
-extern ipcarg_t ipc_answer_fast(ipc_callid_t, ipcarg_t, ipcarg_t, ipcarg_t,
-    ipcarg_t, ipcarg_t);
-extern ipcarg_t ipc_answer_slow(ipc_callid_t, ipcarg_t, ipcarg_t, ipcarg_t,
-    ipcarg_t, ipcarg_t, ipcarg_t);
-
-/*
- * User-friendly wrappers for ipc_call_async_fast() and ipc_call_async_slow().
- * They are in the form of ipc_call_async_m(), where m is the number of payload
- * arguments. The macros decide between the fast and the slow version according
- * to m.
- */
-#define ipc_call_async_0(phoneid, method, private, callback, can_preempt) \
-	ipc_call_async_fast((phoneid), (method), 0, 0, 0, 0, (private), \
-	    (callback), (can_preempt))
-#define ipc_call_async_1(phoneid, method, arg1, private, callback, \
-    can_preempt) \
-	ipc_call_async_fast((phoneid), (method), (arg1), 0, 0, 0, (private), \
-	    (callback), (can_preempt))
-#define ipc_call_async_2(phoneid, method, arg1, arg2, private, callback, \
-    can_preempt) \
-	ipc_call_async_fast((phoneid), (method), (arg1), (arg2), 0, 0, \
-	    (private), (callback), (can_preempt))
-#define ipc_call_async_3(phoneid, method, arg1, arg2, arg3, private, callback, \
-    can_preempt) \
-	ipc_call_async_fast((phoneid), (method), (arg1), (arg2), (arg3), 0, \
-	    (private), (callback), (can_preempt))
-#define ipc_call_async_4(phoneid, method, arg1, arg2, arg3, arg4, private, \
-    callback, can_preempt) \
-	ipc_call_async_fast((phoneid), (method), (arg1), (arg2), (arg3), \
-	    (arg4), (private), (callback), (can_preempt))
-#define ipc_call_async_5(phoneid, method, arg1, arg2, arg3, arg4, arg5, \
-    private, callback, can_preempt) \
-	ipc_call_async_slow((phoneid), (method), (arg1), (arg2), (arg3), \
-	    (arg4), (arg5), (private), (callback), (can_preempt))
-
-extern void ipc_call_async_fast(int, ipcarg_t, ipcarg_t, ipcarg_t, ipcarg_t,
-    ipcarg_t, void *, ipc_async_callback_t, int);
-extern void ipc_call_async_slow(int, ipcarg_t, ipcarg_t, ipcarg_t, ipcarg_t,
-    ipcarg_t, ipcarg_t, void *, ipc_async_callback_t, int);
-
-extern int ipc_connect_to_me(int, int, int, int, ipcarg_t *);
-extern int ipc_connect_me_to(int, int, int, int);
-extern int ipc_connect_me_to_blocking(int, int, int, int);
-extern int ipc_hangup(int);
-extern int ipc_register_irq(int, int, int, irq_code_t *);
-extern int ipc_unregister_irq(int, int);
-extern int ipc_forward_fast(ipc_callid_t, int, int, ipcarg_t, ipcarg_t, int);
-extern int ipc_forward_slow(ipc_callid_t, int, int, ipcarg_t, ipcarg_t,
-    ipcarg_t, ipcarg_t, ipcarg_t, int);
-
-/*
- * User-friendly wrappers for ipc_share_in_start().
- */
-#define ipc_share_in_start_0_0(phoneid, dst, size) \
-	ipc_share_in_start((phoneid), (dst), (size), 0, NULL)
-#define ipc_share_in_start_0_1(phoneid, dst, size, flags) \
-	ipc_share_in_start((phoneid), (dst), (size), 0, (flags))
-#define ipc_share_in_start_1_0(phoneid, dst, size, arg) \
-	ipc_share_in_start((phoneid), (dst), (size), (arg), NULL)
-#define ipc_share_in_start_1_1(phoneid, dst, size, arg, flags) \
-	ipc_share_in_start((phoneid), (dst), (size), (arg), (flags))
-
-extern int ipc_share_in_start(int, void *, size_t, ipcarg_t, int *);
-extern int ipc_share_in_finalize(ipc_callid_t, void *, int );
-extern int ipc_share_out_start(int, void *, int);
-extern int ipc_share_out_finalize(ipc_callid_t, void *);
-extern int ipc_data_read_start(int, void *, size_t);
-extern int ipc_data_read_finalize(ipc_callid_t, const void *, size_t);
-extern int ipc_data_write_start(int, const void *, size_t);
-extern int ipc_data_write_finalize(ipc_callid_t, void *, size_t);
-
-extern int ipc_connect_kbox(task_id_t);
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/include/ipc/kbd.h
===================================================================
--- uspace/lib/libc/include/ipc/kbd.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,55 +1,0 @@
-/*
- * Copyright (c) 2009 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 kbdgen generic
- * @brief HelenOS generic uspace keyboard handler.
- * @ingroup kbd
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_IPC_KBD_H_
-#define LIBC_IPC_KBD_H_
-
-#include <ipc/ipc.h>
-
-typedef enum {
-	KBD_YIELD = IPC_FIRST_USER_METHOD,
-	KBD_RECLAIM
-} kbd_request_t;
-
-typedef enum {
-	KBD_EVENT = IPC_FIRST_USER_METHOD
-} kbd_notif_t;
-
-#endif
-
-/**
- * @}
- */
Index: pace/lib/libc/include/ipc/loader.h
===================================================================
--- uspace/lib/libc/include/ipc/loader.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,54 +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.
- */
-
-/** @addtogroup libcipc
- * @{
- */
-/** @file
- */ 
-
-#ifndef LIBC_IPC_LOADER_H_
-#define LIBC_IPC_LOADER_H_
-
-#include <ipc/ipc.h>
-
-typedef enum {
-	LOADER_HELLO = IPC_FIRST_USER_METHOD,
-	LOADER_GET_TASKID,
-	LOADER_SET_CWD,
-	LOADER_SET_PATHNAME,
-	LOADER_SET_ARGS,
-	LOADER_SET_FILES,
-	LOADER_LOAD,
-	LOADER_RUN
-} loader_request_t;
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/include/ipc/mouse.h
===================================================================
--- uspace/lib/libc/include/ipc/mouse.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,50 +1,0 @@
-/*
- * Copyright (c) 2009 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 mouse
- * @brief
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_IPC_MOUSE_H_
-#define LIBC_IPC_MOUSE_H_
-
-#include <ipc/ipc.h>
-
-typedef enum {
-	MEVENT_BUTTON = IPC_FIRST_USER_METHOD,
-	MEVENT_MOVE
-} mouse_notif_t;
-
-#endif
-
-/**
- * @}
- */
Index: pace/lib/libc/include/ipc/ns.h
===================================================================
--- uspace/lib/libc/include/ipc/ns.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,50 +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 libcipc
- * @{
- */
-/** @file
- */
-
-#ifndef LIBIPC_NS_H_
-#define LIBIPC_NS_H_
-
-#include <ipc/ipc.h>
-
-typedef enum {
-	NS_PING = IPC_FIRST_USER_METHOD,
-	NS_TASK_WAIT,
-	NS_ID_INTRO,
-	NS_RETVAL
-} ns_request_t;
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/include/ipc/services.h
===================================================================
--- uspace/lib/libc/include/ipc/services.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,71 +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 libcipc
- * @{
- */
-/**
- * @file  services.h
- * @brief List of all known services and their codes.
- */
-
-#ifndef LIBIPC_SERVICES_H_
-#define LIBIPC_SERVICES_H_
-
-typedef enum {
-	SERVICE_LOAD = 1,
-	SERVICE_PCI,
-	SERVICE_VIDEO,
-	SERVICE_CONSOLE,
-	SERVICE_VFS,
-	SERVICE_DEVMAP,
-	SERVICE_FHC,
-	SERVICE_OBIO,
-	SERVICE_CLIPBOARD,
-	SERVICE_NETWORKING,
-	SERVICE_LO,
-	SERVICE_DP8390,
-	SERVICE_ETHERNET,
-	SERVICE_NILDUMMY,
-	SERVICE_IP,
-	SERVICE_ARP,
-	SERVICE_RARP,
-	SERVICE_ICMP,
-	SERVICE_UDP,
-	SERVICE_TCP,
-	SERVICE_SOCKET
-} services_t;
-
-/* Memory area to be received from NS */
-#define SERVICE_MEM_REALTIME    1
-#define SERVICE_MEM_KLOG        2
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/include/ipc/vfs.h
===================================================================
--- uspace/lib/libc/include/ipc/vfs.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,166 +1,0 @@
-/*
- * Copyright (c) 2009 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 libcipc
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_IPC_VFS_H_
-#define LIBC_IPC_VFS_H_
-
-#include <sys/types.h>
-#include <ipc/ipc.h>
-
-#define FS_NAME_MAXLEN  20
-#define MAX_PATH_LEN    (64 * 1024)
-#define PLB_SIZE        (2 * MAX_PATH_LEN)
-
-/* Basic types. */
-typedef int16_t fs_handle_t;
-typedef uint32_t fs_index_t;
-
-/**
- * A structure like this is passed to VFS by each individual FS upon its
- * registration. It assosiates a human-readable identifier with each
- * registered FS.
- */
-typedef struct {
-	/** Unique identifier of the fs. */
-	char name[FS_NAME_MAXLEN + 1];
-} vfs_info_t;
-
-typedef enum {
-	VFS_IN_OPEN = IPC_FIRST_USER_METHOD,
-	VFS_IN_OPEN_NODE,
-	VFS_IN_READ,
-	VFS_IN_WRITE,
-	VFS_IN_SEEK,
-	VFS_IN_TRUNCATE,
-	VFS_IN_FSTAT,
-	VFS_IN_CLOSE,
-	VFS_IN_MOUNT,
-	VFS_IN_UNMOUNT,
-	VFS_IN_SYNC,
-	VFS_IN_REGISTER,
-	VFS_IN_MKDIR,
-	VFS_IN_UNLINK,
-	VFS_IN_RENAME,
-	VFS_IN_STAT,
-	VFS_IN_DUP
-} vfs_in_request_t;
-
-typedef enum {
-	VFS_OUT_OPEN_NODE = IPC_FIRST_USER_METHOD,
-	VFS_OUT_READ,
-	VFS_OUT_WRITE,
-	VFS_OUT_TRUNCATE,
-	VFS_OUT_CLOSE,
-	VFS_OUT_MOUNT,
-	VFS_OUT_MOUNTED,
-	VFS_OUT_UNMOUNT,
-	VFS_OUT_UNMOUNTED,
-	VFS_OUT_SYNC,
-	VFS_OUT_STAT,
-	VFS_OUT_LOOKUP,
-	VFS_OUT_DESTROY,
-	VFS_OUT_LAST
-} vfs_out_request_t;
-
-/*
- * Lookup flags.
- */
-
-/**
- * No lookup flags used.
- */
-#define L_NONE			0
-
-/**
- * Lookup will succeed only if the object is a regular file.  If L_CREATE is
- * specified, an empty file will be created. This flag is mutually exclusive
- * with L_DIRECTORY.
- */
-#define L_FILE			1
-
-/**
- * Lookup will succeed only if the object is a directory. If L_CREATE is
- * specified, an empty directory will be created. This flag is mutually
- * exclusive with L_FILE.
- */
-#define L_DIRECTORY		2
-
-/**
- * Lookup will succeed only if the object is a root directory. The flag is
- * mutually exclusive with L_FILE and L_MP.
- */
-#define L_ROOT			4
-
-/**
- * Lookup will succeed only if the object is a mount point. The flag is mutually
- * exclusive with L_FILE and L_ROOT.
- */
-#define L_MP			8
-
-
-/**
- * When used with L_CREATE, L_EXCLUSIVE will cause the lookup to fail if the
- * object already exists. L_EXCLUSIVE is implied when L_DIRECTORY is used.
- */
-#define L_EXCLUSIVE 		16
-
-/**
- * L_CREATE is used for creating both regular files and directories.
- */
-#define L_CREATE		32
-
-/**
- * L_LINK is used for linking to an already existing nodes.
- */
-#define L_LINK			64
-
-/**
- * L_UNLINK is used to remove leaves from the file system namespace. This flag
- * cannot be passed directly by the client, but will be set by VFS during
- * VFS_UNLINK.
- */
-#define L_UNLINK		128
-
-/**
- * L_OPEN is used to indicate that the lookup operation is a part of VFS_IN_OPEN
- * call from the client. This means that the server might allocate some
- * resources for the opened file. This flag cannot be passed directly by the
- * client.
- */
-#define L_OPEN			256
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/include/libc.h
===================================================================
--- uspace/lib/libc/include/libc.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,63 +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 libc
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_LIBC_H_
-#define LIBC_LIBC_H_
-
-#include <sys/types.h>
-#include <kernel/syscall/syscall.h>
-#include <libarch/syscall.h>
-
-#define __SYSCALL0(id) \
-	__syscall0(0, 0, 0, 0, 0, 0, id)
-#define __SYSCALL1(id, p1) \
-	__syscall1(p1, 0, 0, 0, 0, 0, id)
-#define __SYSCALL2(id, p1, p2) \
-	__syscall2(p1, p2, 0, 0, 0, 0, id)
-#define __SYSCALL3(id, p1, p2, p3) \
-	__syscall3(p1, p2, p3, 0, 0, 0, id)
-#define __SYSCALL4(id, p1, p2, p3, p4) \
-	__syscall4(p1, p2, p3, p4, 0, 0, id)
-#define __SYSCALL5(id, p1, p2, p3, p4, p5) \
-	__syscall5(p1, p2, p3, p4, p5, 0, id)
-#define __SYSCALL6(id, p1, p2, p3, p4, p5, p6) \
-    __syscall6(p1, p2, p3, p4, p5, p6, id)
-
-extern void __main(void *pcb_ptr);
-extern void __exit(void);
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/include/limits.h
===================================================================
--- uspace/lib/libc/include/limits.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,84 +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 libc
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_LIMITS_H_
-#define LIBC_LIMITS_H_
-
-#include <stdint.h>
-#include <libarch/limits.h>
-
-/* char */
-#define SCHAR_MIN MIN_INT8
-#define SCHAR_MAX MAX_INT8
-#define UCHAR_MIN MIN_UINT8
-#define UCHAR_MAX MAX_UINT8
-
-#ifdef __CHAR_UNSIGNED__
-	#define CHAR_MIN UCHAR_MIN
-	#define CHAR_MAX UCHAR_MAX
-#else
-	#define CHAR_MIN SCHAR_MIN
-	#define CHAR_MAX SCHAR_MAX
-#endif
-
-/* short int */
-#define SHRT_MIN MIN_INT16
-#define SHRT_MAX MAX_INT16
-#define USHRT_MIN MIN_UINT16
-#define USHRT_MAX MAX_UINT16
-
-/* int */
-#define INT_MIN MIN_INT32
-#define INT_MAX MAX_INT32
-#define UINT_MIN MIN_UINT32
-#define UINT_MAX MAX_UINT32
-
-/* long long int */
-#define LLONG_MIN MIN_INT64
-#define LLONG_MAX MAX_INT64
-#define ULLONG_MIN MIN_UINT64
-#define ULLONG_MAX MAX_UINT64
-
-/* off64_t */
-#define OFF64_MIN MIN_INT64
-#define OFF64_MAX MAX_INT64
-
-/* aoff64_t */
-#define AOFF64_MIN MIN_UINT64
-#define AOFF64_MAX MAX_UINT64
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/include/loader/loader.h
===================================================================
--- uspace/lib/libc/include/loader/loader.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,63 +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.
- */
-
-/** @addtogroup fs
- * @{
- */
-/** @file
- * @brief Program loader interface.
- */
-
-#ifndef LIBC_LOADER_H_
-#define LIBC_LOADER_H_
-
-#include <task.h>
-#include <vfs/vfs.h>
-
-/** Abstraction of a loader connection */
-typedef struct {
-	/** ID of the phone connected to the loader. */
-	int phone_id;
-} loader_t;
-
-extern int loader_spawn(const char *);
-extern loader_t *loader_connect(void);
-extern int loader_get_task_id(loader_t *, task_id_t *);
-extern int loader_set_cwd(loader_t *);
-extern int loader_set_pathname(loader_t *, const char *);
-extern int loader_set_args(loader_t *, const char *const[]);
-extern int loader_set_files(loader_t *, fdi_node_t *const[]);
-extern int loader_load_program(loader_t *);
-extern int loader_run(loader_t *);
-extern void loader_abort(loader_t *);
-
-#endif
-
-/**
- * @}
- */
Index: pace/lib/libc/include/loader/pcb.h
===================================================================
--- uspace/lib/libc/include/loader/pcb.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,86 +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.
- */
-
-/** @addtogroup fs
- * @{
- */
-/** @file
- * @brief Program Control Block interface.
- */
-
-#ifndef LIBC_PCB_H_
-#define LIBC_PCB_H_
-
-#include <sys/types.h>
-#include <vfs/vfs.h>
-
-typedef void (*entry_point_t)(void);
-
-/** Program Control Block.
- *
- * Holds pointers to data passed from the program loader to the program
- * and/or to the dynamic linker. This includes the program entry point,
- * arguments, environment variables etc.
- *
- */
-typedef struct {
-	/** Program entry point. */
-	entry_point_t entry;
-
-	/** Current working directory. */
-	char *cwd;
-	
-	/** Number of command-line arguments. */
-	int argc;
-	/** Command-line arguments. */
-	char **argv;
-	
-	/** Number of preset files. */
-	int filc;
-	/** Preset files. */
-	fdi_node_t **filv;
-	
-	/*
-	 * ELF-specific data.
-	 */
-	
-	/** Pointer to ELF dynamic section of the program. */
-	void *dynamic;
-} pcb_t;
-
-/**
- * A pointer to the program control block. Having received the PCB pointer,
- * the C library startup code stores it here for later use.
- */
-extern pcb_t *__pcb;
-
-#endif
-
-/**
- * @}
- */
Index: pace/lib/libc/include/macros.h
===================================================================
--- uspace/lib/libc/include/macros.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,60 +1,0 @@
-/*
- * Copyright (c) 2009 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 libc
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_MACROS_H_
-#define LIBC_MACROS_H_
-
-#define min(a, b)  ((a) < (b) ? (a) : (b))
-#define max(a, b)  ((a) > (b) ? (a) : (b))
-
-#define SIZE2KB(size)  ((size) >> 10)
-#define SIZE2MB(size)  ((size) >> 20)
-
-#define KB2SIZE(kb)  ((kb) << 10)
-#define MB2SIZE(mb)  ((mb) << 20)
-
-#define STRING(arg)      STRING_ARG(arg)
-#define STRING_ARG(arg)  #arg
-
-#define LOWER32(arg)  (((uint64_t) (arg)) & 0xffffffff)
-#define UPPER32(arg)  (((((uint64_t) arg)) >> 32) & 0xffffffff)
-
-#define MERGE_LOUP32(lo, up) \
-	((((uint64_t) (lo)) & 0xffffffff) \
-	    | ((((uint64_t) (up)) & 0xffffffff) << 32))
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/include/malloc.h
===================================================================
--- uspace/lib/libc/include/malloc.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,52 +1,0 @@
-/*
- * Copyright (c) 2009 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 libc
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_MALLOC_H_
-#define LIBC_MALLOC_H_
-
-#include <sys/types.h>
-
-extern void __heap_init(void);
-extern uintptr_t get_max_heap_addr(void);
-
-extern void *malloc(const size_t size);
-extern void *calloc(const size_t nmemb, const size_t size);
-extern void *memalign(const size_t align, const size_t size);
-extern void *realloc(const void *addr, const size_t size);
-extern void free(const void *addr);
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/include/mem.h
===================================================================
--- uspace/lib/libc/include/mem.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,51 +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 libc
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_MEM_H_
-#define LIBC_MEM_H_
-
-#include <sys/types.h>
-
-#define bzero(ptr, len)  memset((ptr), 0, (len))
-
-extern void *memset(void *, int, size_t);
-extern void *memcpy(void *, const void *, size_t);
-extern void *memmove(void *, const void *, size_t);
-
-extern int bcmp(const char *, const char *, size_t);
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/include/rwlock.h
===================================================================
--- uspace/lib/libc/include/rwlock.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,59 +1,0 @@
-/*
- * Copyright (c) 2008 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 libc
- * @{
- */
-/**
- * @file
- * @brief	This file contains rwlock API and provides its fake
- *		implementation based on futexes.
- */
-
-#ifndef LIBC_RWLOCK_H_
-#define LIBC_RWLOCK_H_
-
-#include <atomic.h>
-#include <sys/types.h>
-#include <futex.h>
-
-typedef atomic_t rwlock_t;
-
-#define RWLOCK_INITIALIZE(rwlock)	\
-    rwlock_t rwlock = FUTEX_INITIALIZER
-
-#define rwlock_initialize(rwlock)	futex_initialize((rwlock), 1)
-#define rwlock_read_lock(rwlock)	futex_down((rwlock))
-#define rwlock_write_lock(rwlock)	futex_down((rwlock))
-#define rwlock_read_unlock(rwlock)	futex_up((rwlock))
-#define rwlock_write_unlock(rwlock)	futex_up((rwlock))
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/include/setjmp.h
===================================================================
--- uspace/lib/libc/include/setjmp.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,49 +1,0 @@
-/*
- * Copyright (c) 2008 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 libc
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_SETJMP_H_
-#define LIBC_SETJMP_H_
-
-#include <libarch/fibril.h>
-
-typedef context_t jmp_buf;
-
-extern int setjmp(jmp_buf env);
-extern void longjmp(jmp_buf env,int val) __attribute__((__noreturn__));
-
-#endif
-
-/** @}
- */
-
Index: pace/lib/libc/include/smc.h
===================================================================
--- uspace/lib/libc/include/smc.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,45 +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.
- */
-
-/** @addtogroup libc
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_SMC_H_
-#define LIBC_SMC_H_
-
-#include <sys/types.h>
-
-extern int smc_coherence(void *address, size_t size);
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/include/stacktrace.h
===================================================================
--- uspace/lib/libc/include/stacktrace.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,64 +1,0 @@
-/*
- * Copyright (c) 2009 Jakub Jermar
- * 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 libc
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_STACKTRACE_H_
-#define LIBC_STACKTRACE_H_
-
-#include <sys/types.h>
-#include <bool.h>
-
-typedef struct {
-	void *op_arg;
-	int (*read_uintptr)(void *, uintptr_t, uintptr_t *);
-} stacktrace_t;
-
-extern void stacktrace_print(void);
-extern void stacktrace_print_fp_pc(uintptr_t, uintptr_t);
-
-/*
- * The following interface is to be implemented by each architecture.
- */
-extern bool stacktrace_fp_valid(stacktrace_t *, uintptr_t);
-extern int stacktrace_fp_prev(stacktrace_t *, uintptr_t, uintptr_t *);
-extern int stacktrace_ra_get(stacktrace_t *, uintptr_t, uintptr_t *);
-
-extern void stacktrace_prepare(void);
-extern uintptr_t stacktrace_fp_get(void);
-extern uintptr_t stacktrace_pc_get(void);
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/include/stdarg.h
===================================================================
--- uspace/lib/libc/include/stdarg.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,49 +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 libc
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_STDARG_H_
-#define LIBC_STDARG_H_
-
-#include <sys/types.h>
-
-typedef __builtin_va_list va_list;
-
-#define va_start(ap, last)  __builtin_va_start(ap, last)
-#define va_arg(ap, type)    __builtin_va_arg(ap, type)
-#define va_end(ap)          __builtin_va_end(ap)
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/include/stddef.h
===================================================================
--- uspace/lib/libc/include/stddef.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,43 +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 libc
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_STDDEF_H_
-#define LIBC_STDDEF_H_
-
-#include <sys/types.h>
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/include/stdint.h
===================================================================
--- uspace/lib/libc/include/stdint.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,64 +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 libc
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_STDINT_H_
-#define LIBC_STDINT_H_
-
-/* Definitions of types with fixed size */
-#include <libarch/types.h>
-
-#define MAX_INT8 (0x7F)
-#define MIN_INT8 (0x80)
-#define MAX_UINT8 (0xFFu)
-#define MIN_UINT8 (0u)
-
-#define MAX_INT16 (0x7FFF)
-#define MIN_INT16 (0x8000)
-#define MAX_UINT16 (0xFFFFu)
-#define MIN_UINT16 (0u)
-
-#define MAX_INT32 (0x7FFFFFFF)
-#define MIN_INT32 (0x80000000)
-#define MAX_UINT32 (0xFFFFFFFFu)
-#define MIN_UINT32 (0u)
-
-#define MAX_INT64 (0x7FFFFFFFFFFFFFFFll)
-#define MIN_INT64 (0x8000000000000000ll)
-#define MAX_UINT64 (0xFFFFFFFFFFFFFFFFull)
-#define MIN_UINT64 (0ull)
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/include/stdio.h
===================================================================
--- uspace/lib/libc/include/stdio.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,186 +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 libc
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_STDIO_H_
-#define LIBC_STDIO_H_
-
-#include <sys/types.h>
-#include <stdarg.h>
-#include <string.h>
-#include <adt/list.h>
-
-#define EOF  (-1)
-
-/** Default size for stream I/O buffers */
-#define BUFSIZ  4096
-
-#define DEBUG(fmt, ...)se\
-	{ \
-		char _buf[256]; \
-		int _n = snprintf(_buf, sizeof(_buf), fmt, ##__VA_ARGS__); \
-		if (_n > 0) \
-			(void) __SYSCALL3(SYS_KLOG, 1, (sysarg_t) _buf, str_size(_buf)); \
-	}
-
-#ifndef SEEK_SET
-	#define SEEK_SET  0
-#endif
-
-#ifndef SEEK_CUR
-	#define SEEK_CUR  1
-#endif
-
-#ifndef SEEK_END
-	#define SEEK_END  2
-#endif
-
-enum _buffer_type {
-	/** No buffering */
-	_IONBF,
-	/** Line buffering */
-	_IOLBF,
-	/** Full buffering */
-	_IOFBF
-};
-
-enum _buffer_state {
-	/** Buffer is empty */
-	_bs_empty,
-
-	/** Buffer contains data to be written */
-	_bs_write,
-
-	/** Buffer contains prefetched data for reading */
-	_bs_read
-};
-
-typedef struct {
-	/** Linked list pointer. */
-	link_t link;
-	
-	/** Underlying file descriptor. */
-	int fd;
-	
-	/** Error indicator. */
-	int error;
-	
-	/** End-of-file indicator. */
-	int eof;
-	
-	/** Klog indicator */
-	int klog;
-	
-	/** Phone to the file provider */
-	int phone;
-
-	/**
-	 * Non-zero if the stream needs sync on fflush(). XXX change
-	 * console semantics so that sync is not needed.
-	 */
-	int need_sync;
-
-	/** Buffering type */
-	enum _buffer_type btype;
-
-	/** Buffer */
-	uint8_t *buf;
-
-	/** Buffer size */
-	size_t buf_size;
-
-	/** Buffer state */
-	enum _buffer_state buf_state;
-
-	/** Buffer I/O pointer */
-	uint8_t *buf_head;
-
-	/** Points to end of occupied space when in read mode. */
-	uint8_t *buf_tail;
-} FILE;
-
-extern FILE *stdin;
-extern FILE *stdout;
-extern FILE *stderr;
-
-/* Character and string input functions */
-extern int fgetc(FILE *);
-extern char *fgets(char *, int, FILE *);
-
-extern int getchar(void);
-extern char *gets(char *, size_t);
-
-/* Character and string output functions */
-extern int fputc(wchar_t, FILE *);
-extern int fputs(const char *, FILE *);
-
-extern int putchar(wchar_t);
-extern int puts(const char *);
-
-/* Formatted string output functions */
-extern int fprintf(FILE *, const char*, ...);
-extern int vfprintf(FILE *, const char *, va_list);
-
-extern int printf(const char *, ...);
-extern int vprintf(const char *, va_list);
-
-extern int snprintf(char *, size_t , const char *, ...);
-extern int asprintf(char **, const char *, ...);
-extern int vsnprintf(char *, size_t, const char *, va_list);
-
-/* File stream functions */
-extern FILE *fopen(const char *, const char *);
-extern FILE *fdopen(int, const char *);
-extern int fclose(FILE *);
-
-extern size_t fread(void *, size_t, size_t, FILE *);
-extern size_t fwrite(const void *, size_t, size_t, FILE *);
-
-extern int fseek(FILE *, off64_t, int);
-extern void rewind(FILE *);
-extern off64_t ftell(FILE *);
-extern int feof(FILE *);
-
-extern int fflush(FILE *);
-extern int ferror(FILE *);
-extern void clearerr(FILE *);
-
-extern void setvbuf(FILE *, void *, int, size_t);
-
-/* Misc file functions */
-extern int rename(const char *, const char *);
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/include/stdlib.h
===================================================================
--- uspace/lib/libc/include/stdlib.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,68 +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 libc
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_STDLIB_H_
-#define LIBC_STDLIB_H_
-
-#include <unistd.h>
-#include <malloc.h>
-#include <stacktrace.h>
-
-#define abort() \
-	do { \
-		stacktrace_print(); \
-		_exit(1); \
-	} while (0)
-
-#define exit(status)  _exit((status))
-
-#define RAND_MAX  714025
-
-extern long int random(void);
-extern void srandom(unsigned int seed);
-
-static inline int rand(void)
-{
-	return random();
-}
-
-static inline void srand(unsigned int seed)
-{
-	srandom(seed);
-}
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/include/string.h
===================================================================
--- uspace/lib/libc/include/string.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,103 +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 libc
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_STRING_H_
-#define LIBC_STRING_H_
-
-#include <mem.h>
-#include <sys/types.h>
-#include <bool.h>
-
-#define U_SPECIAL  '?'
-
-/** No size limit constant */
-#define STR_NO_LIMIT  ((size_t) -1)
-
-/** Maximum size of a string containing @c length characters */
-#define STR_BOUNDS(length)  ((length) << 2)
-
-extern wchar_t str_decode(const char *str, size_t *offset, size_t sz);
-extern int chr_encode(const wchar_t ch, char *str, size_t *offset, size_t sz);
-
-extern size_t str_size(const char *str);
-extern size_t wstr_size(const wchar_t *str);
-
-extern size_t str_lsize(const char *str, size_t max_len);
-extern size_t wstr_lsize(const wchar_t *str, size_t max_len);
-
-extern size_t str_length(const char *str);
-extern size_t wstr_length(const wchar_t *wstr);
-
-extern size_t str_nlength(const char *str, size_t size);
-extern size_t wstr_nlength(const wchar_t *str, size_t size);
-
-extern bool ascii_check(wchar_t ch);
-extern bool chr_check(wchar_t ch);
-
-extern int str_cmp(const char *s1, const char *s2);
-extern int str_lcmp(const char *s1, const char *s2, size_t max_len);
-
-extern void str_cpy(char *dest, size_t size, const char *src);
-extern void str_ncpy(char *dest, size_t size, const char *src, size_t n);
-extern void str_append(char *dest, size_t size, const char *src);
-
-extern void wstr_to_str(char *dest, size_t size, const wchar_t *src);
-extern char *wstr_to_astr(const wchar_t *src);
-extern void str_to_wstr(wchar_t *dest, size_t dlen, const char *src);
-
-extern char *str_chr(const char *str, wchar_t ch);
-extern char *str_rchr(const char *str, wchar_t ch);
-
-extern bool wstr_linsert(wchar_t *str, wchar_t ch, size_t pos, size_t max_pos);
-extern bool wstr_remove(wchar_t *str, size_t pos);
-
-extern char *str_dup(const char *);
-extern char *str_ndup(const char *, size_t max_size);
-
-/*
- * TODO: Get rid of this.
- */
-
-extern int stricmp(const char *, const char *);
-
-extern long int strtol(const char *, char **, int);
-extern unsigned long strtoul(const char *, char **, int);
-
-extern char * strtok_r(char *, const char *, char **);
-extern char * strtok(char *, const char *);
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/include/sys/mman.h
===================================================================
--- uspace/lib/libc/include/sys/mman.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(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 libc
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_MMAN_H_
-#define LIBC_MMAN_H_
-
-#include <as.h>
-#include <sys/types.h>
-
-#define MAP_FAILED  ((void *) -1)
-
-#define MAP_SHARED     (1 << 0)
-#define MAP_PRIVATE    (1 << 1)
-#define MAP_FIXED      (1 << 2)
-#define MAP_ANONYMOUS  (1 << 3)
-
-#define PROTO_READ   AS_AREA_READ
-#define PROTO_WRITE  AS_AREA_WRITE
-#define PROTO_EXEC   AS_AREA_EXEC
-
-extern void *mmap(void *start, size_t length, int prot, int flags, int fd,
-    aoff64_t offset);
-extern int munmap(void *start, size_t length);
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/include/sys/stat.h
===================================================================
--- uspace/lib/libc/include/sys/stat.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,61 +1,0 @@
-/*
- * Copyright (c) 2008 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 libc
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_SYS_STAT_H_
-#define LIBC_SYS_STAT_H_
-
-#include <sys/types.h>
-#include <bool.h>
-#include <ipc/vfs.h>
-#include <ipc/devmap.h>
-
-struct stat {
-	fs_handle_t fs_handle;
-	dev_handle_t dev_handle;
-	fs_index_t index;
-	unsigned int lnkcnt;
-	bool is_file;
-	bool is_directory;
-	aoff64_t size;
-	dev_handle_t device;
-};
-
-extern int fstat(int, struct stat *);
-extern int stat(const char *, struct stat *);
-extern int mkdir(const char *, mode_t);
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/include/sys/time.h
===================================================================
--- uspace/lib/libc/include/sys/time.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,64 +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 libc
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_SYS_TIME_H_
-#define LIBC_SYS_TIME_H_
-
-#include <sys/types.h>
-
-#define DST_NONE 0
-
-typedef long time_t;
-typedef long suseconds_t;
-
-struct timeval {
-	time_t tv_sec;        /* seconds */
-	suseconds_t tv_usec;  /* microseconds */
-};
-
-struct timezone {
-	int tz_minuteswest;  /* minutes W of Greenwich */
-	int tz_dsttime;      /* type of dst correction */
-};
-
-extern void tv_add(struct timeval *tv, suseconds_t usecs);
-extern suseconds_t tv_sub(struct timeval *tv1, struct timeval *tv2);
-extern int tv_gt(struct timeval *tv1, struct timeval *tv2);
-extern int tv_gteq(struct timeval *tv1, struct timeval *tv2);
-extern int gettimeofday(struct timeval *tv, struct timezone *tz);
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/include/sys/typefmt.h
===================================================================
--- uspace/lib/libc/include/sys/typefmt.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,74 +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 libc
- * @{
- */
-/** @file Formatting macros for types from sys/types.h and some other
- * system types.
- */
-
-#ifndef LIBC_SYS_TYPEFMT_H_
-#define LIBC_SYS_TYPEFMT_H_
-
-#include <inttypes.h>
-
-/* off64_t */
-#define PRIdOFF64 PRId64
-#define PRIuOFF64 PRIu64
-#define PRIxOFF64 PRIx64
-#define PRIXOFF64 PRIX64
-
-/* (s)size_t */
-#define PRIdSIZE PRIdPTR
-#define PRIuSIZE PRIuPTR
-#define PRIxSIZE PRIxPTR
-#define PRIXSIZE PRIXPTR
-
-/* sysarg_t */
-#define PRIdSYSARG PRIdPTR
-#define PRIuSYSARG PRIuPTR
-#define PRIxSYSARG PRIxPTR
-#define PRIXSYSARG PRIxPTR
-
-/* ipcarg_t */
-#define PRIdIPCARG PRIdPTR
-#define PRIuIPCARG PRIuPTR
-#define PRIxIPCARG PRIxPTR
-#define PRIXIPCARG PRIXPTR
-
-/* taskid_t */
-#define PRIdTASKID PRId64
-#define PRIuTASKID PRIu64
-#define PRIxTASKID PRIx64
-#define PRIXTASKID PRIx64
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/include/sys/types.h
===================================================================
--- uspace/lib/libc/include/sys/types.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,58 +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 libc
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_SYS_TYPES_H_
-#define LIBC_SYS_TYPES_H_
-
-#include <libarch/types.h>
-
-typedef unsigned int mode_t;
-
-/** Relative offset */
-typedef int64_t off64_t;
-
-/** Absolute offset */
-typedef uint64_t aoff64_t;
-
-/** Unicode code point */
-typedef int32_t wchar_t;
-
-typedef volatile uint8_t ioport8_t;
-typedef volatile uint16_t ioport16_t;
-typedef volatile uint32_t ioport32_t;
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/include/syscall.h
===================================================================
--- uspace/lib/libc/include/syscall.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,64 +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 libc
- * @{
- */
-/**
- * @file
- * @brief	Syscall function declaration for architectures that don't
- *		inline syscalls or architectures that handle syscalls
- *		according to the number of arguments.
- */
-
-#ifndef LIBC_SYSCALL_H_
-#define LIBC_SYSCALL_H_
-
-#ifndef	LIBARCH_SYSCALL_GENERIC
-#error "You can't include this file directly."
-#endif
-
-#include <sys/types.h>
-#include <kernel/syscall/syscall.h>
-
-#define __syscall0	__syscall
-#define __syscall1	__syscall
-#define __syscall2	__syscall
-#define __syscall3	__syscall
-#define __syscall4	__syscall
-#define __syscall5	__syscall
-#define __syscall6	__syscall
-
-extern 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);
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/include/sysinfo.h
===================================================================
--- uspace/lib/libc/include/sysinfo.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,47 +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 libc
- * @{
- */
-/** @file
- */ 
-
-#ifndef LIBC_SYSINFO_H_
-#define LIBC_SYSINFO_H_
-
-#include <libc.h>
-#include <sysinfo.h>
-#include <string.h>
-
-sysarg_t sysinfo_value(const char *name);
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/include/task.h
===================================================================
--- uspace/lib/libc/include/task.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,57 +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 libc
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_TASK_H_
-#define LIBC_TASK_H_
-
-#include <sys/types.h>
-
-typedef uint64_t task_id_t;
-
-typedef enum {
-	TASK_EXIT_NORMAL,
-	TASK_EXIT_UNEXPECTED
-} task_exit_t;
-
-extern task_id_t task_get_id(void);
-extern int task_set_name(const char *name);
-extern task_id_t task_spawn(const char *path, const char *const argv[]);
-extern int task_wait(task_id_t id, task_exit_t *texit, int *retval);
-extern int task_retval(int val);
-
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/include/thread.h
===================================================================
--- uspace/lib/libc/include/thread.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,56 +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 libc
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_THREAD_H_
-#define LIBC_THREAD_H_
-
-#include <kernel/proc/uarg.h>
-#include <libarch/thread.h>
-#include <sys/types.h>
-
-typedef uint64_t thread_id_t;
-
-extern void __thread_entry(void);
-extern void __thread_main(uspace_arg_t *);
-
-extern int thread_create(void (*)(void *), void *, const char *, thread_id_t *);
-extern void thread_exit(int) __attribute__ ((noreturn));
-extern void thread_detach(thread_id_t);
-extern int thread_join(thread_id_t);
-extern thread_id_t thread_get_id(void);
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/include/time.h
===================================================================
--- uspace/lib/libc/include/time.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,45 +1,0 @@
-/*
- * Copyright (c) 2007 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 libc
- * @{
- */
-/** @file
- */ 
-
-#ifndef LIBC_TIME_H_
-#define LIBC_TIME_H_
-
-#include <sys/time.h>
-
-extern time_t time(time_t *);
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/include/tls.h
===================================================================
--- uspace/lib/libc/include/tls.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,67 +1,0 @@
-/*
- * Copyright (c) 2007 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 libc
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_TLS_H_
-#define LIBC_TLS_H_
-
-#include <libarch/tls.h>
-#include <sys/types.h>
-
-/*
- * Symbols defined in the respective linker script.
- */
-extern char _tls_alignment;
-extern char _tdata_start;
-extern char _tdata_end;
-extern char _tbss_start;
-extern char _tbss_end;
-
-extern tcb_t *__make_tls(void);
-extern tcb_t *__alloc_tls(void **, size_t);
-extern void __free_tls(tcb_t *);
-extern void __free_tls_arch(tcb_t *, size_t);
-
-#ifdef CONFIG_TLS_VARIANT_1
-extern tcb_t *tls_alloc_variant_1(void **, size_t);
-extern void tls_free_variant_1(tcb_t *, size_t);
-#endif
-#ifdef CONFIG_TLS_VARIANT_2
-extern tcb_t *tls_alloc_variant_2(void **, size_t);
-extern void tls_free_variant_2(tcb_t *, size_t);
-#endif
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/include/udebug.h
===================================================================
--- uspace/lib/libc/include/udebug.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,63 +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.
- */
-
-/** @addtogroup libc
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_UDEBUG_H_
-#define LIBC_UDEBUG_H_
-
-#include <kernel/udebug/udebug.h>
-#include <sys/types.h>
-#include <libarch/types.h>
-
-typedef sysarg_t thash_t;
-
-int udebug_begin(int phoneid);
-int udebug_end(int phoneid);
-int udebug_set_evmask(int phoneid, udebug_evmask_t mask);
-int udebug_thread_read(int phoneid, void *buffer, size_t n,
-	size_t *copied, size_t *needed);
-int udebug_name_read(int phoneid, void *buffer, size_t n,
-	size_t *copied, size_t *needed);
-int udebug_areas_read(int phoneid, void *buffer, size_t n,
-	size_t *copied, size_t *needed);
-int udebug_mem_read(int phoneid, void *buffer, uintptr_t addr, size_t n);
-int udebug_args_read(int phoneid, thash_t tid, sysarg_t *buffer);
-int udebug_regs_read(int phoneid, thash_t tid, void *buffer);
-int udebug_go(int phoneid, thash_t tid, udebug_event_t *ev_type,
-	sysarg_t *val0, sysarg_t *val1);
-int udebug_stop(int phoneid, thash_t tid);
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/include/unistd.h
===================================================================
--- uspace/lib/libc/include/unistd.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,84 +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 libc
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_UNISTD_H_
-#define LIBC_UNISTD_H_
-
-#include <sys/types.h>
-#include <libarch/config.h>
-
-#ifndef NULL
-	#define NULL  0
-#endif
-
-#define getpagesize()  (PAGE_SIZE)
-
-#ifndef SEEK_SET
-	#define SEEK_SET  0
-#endif
-
-#ifndef SEEK_CUR
-	#define SEEK_CUR  1
-#endif
-
-#ifndef SEEK_END
-	#define SEEK_END  2
-#endif
-
-typedef uint32_t useconds_t;
-
-extern int dup2(int oldfd, int newfd);
-
-extern ssize_t write(int, const void *, size_t);
-extern ssize_t read(int, void *, size_t);
-
-extern off64_t lseek(int, off64_t, int);
-extern int ftruncate(int, aoff64_t);
-
-extern int close(int);
-extern int fsync(int);
-extern int unlink(const char *);
-
-extern char *getcwd(char *buf, size_t);
-extern int rmdir(const char *);
-extern int chdir(const char *);
-
-extern void _exit(int) __attribute__((noreturn));
-extern int usleep(useconds_t);
-extern unsigned int sleep(unsigned int);
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/include/vfs/canonify.h
===================================================================
--- uspace/lib/libc/include/vfs/canonify.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,45 +1,0 @@
-/*
- * Copyright (c) 2008 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 libc
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_VFS_CANONIFY_H_
-#define LIBC_VFS_CANONIFY_H_
-
-#include <sys/types.h>
-
-extern char *canonify(char *, size_t *);
-
-#endif
-
-/** @}
- */
Index: pace/lib/libc/include/vfs/vfs.h
===================================================================
--- uspace/lib/libc/include/vfs/vfs.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,73 +1,0 @@
-/*
- * Copyright (c) 2007 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 libc
- * @{
- */
-/** @file
- */
-
-#ifndef LIBC_VFS_H_
-#define LIBC_VFS_H_
-
-#include <sys/types.h>
-#include <ipc/vfs.h>
-#include <ipc/devmap.h>
-#include <stdio.h>
-
-/**
- * This type is a libc version of the VFS triplet.
- * It uniquelly identifies a file system node within a file system instance.
- */
-typedef struct {
-	fs_handle_t fs_handle;
-	dev_handle_t dev_handle;
-	fs_index_t index;
-} fdi_node_t;
-
-extern char *absolutize(const char *, size_t *);
-
-extern int mount(const char *, const char *, const char *, const char *,
-    unsigned int);
-extern int unmount(const char *);
-
-extern void __stdio_init(int filc, fdi_node_t *filv[]);
-extern void __stdio_done(void);
-
-extern int open_node(fdi_node_t *, int);
-extern int fd_phone(int);
-extern int fd_node(int, fdi_node_t *);
-
-extern FILE *fopen_node(fdi_node_t *, const char *);
-extern int fphone(FILE *);
-extern int fnode(FILE *, fdi_node_t *);
-
-#endif
-
-/** @}
- */
Index: pace/lib/libfs/Makefile
===================================================================
--- uspace/lib/libfs/Makefile	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,38 +1,0 @@
-#
-# Copyright (c) 2005 Martin Decky
-# Copyright (c) 2007 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.
-#
-
-USPACE_PREFIX = ../..
-LIBS = $(LIBC_PREFIX)/libc.a
-
-OUTPUT = libfs.a
-
-SOURCES = \
-	libfs.c
-
-include ../Makefile.common
Index: pace/lib/libfs/libfs.c
===================================================================
--- uspace/lib/libfs/libfs.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,640 +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.
- */
-
-/** @addtogroup libfs
- * @{
- */
-/**
- * @file
- * Glue code which is common to all FS implementations.
- */
-
-#include "libfs.h"
-#include "../../srv/vfs/vfs.h"
-#include <macros.h>
-#include <errno.h>
-#include <async.h>
-#include <ipc/ipc.h>
-#include <as.h>
-#include <assert.h>
-#include <dirent.h>
-#include <mem.h>
-#include <sys/stat.h>
-
-#define on_error(rc, action) \
-	do { \
-		if ((rc) != EOK) \
-			action; \
-	} while (0)
-
-#define combine_rc(rc1, rc2) \
-	((rc1) == EOK ? (rc2) : (rc1))
-
-#define answer_and_return(rid, rc) \
-	do { \
-		ipc_answer_0((rid), (rc)); \
-		return; \
-	} while (0)
-
-/** Register file system server.
- *
- * This function abstracts away the tedious registration protocol from
- * file system implementations and lets them to reuse this registration glue
- * code.
- *
- * @param vfs_phone Open phone for communication with VFS.
- * @param reg       File system registration structure. It will be
- *                  initialized by this function.
- * @param info      VFS info structure supplied by the file system
- *                  implementation.
- * @param conn      Connection fibril for handling all calls originating in
- *                  VFS.
- *
- * @return EOK on success or a non-zero error code on errror.
- *
- */
-int fs_register(int vfs_phone, fs_reg_t *reg, vfs_info_t *info,
-    async_client_conn_t conn)
-{
-	/*
-	 * Tell VFS that we are here and want to get registered.
-	 * We use the async framework because VFS will answer the request
-	 * out-of-order, when it knows that the operation succeeded or failed.
-	 */
-	ipc_call_t answer;
-	aid_t req = async_send_0(vfs_phone, VFS_IN_REGISTER, &answer);
-	
-	/*
-	 * Send our VFS info structure to VFS.
-	 */
-	int rc = async_data_write_start(vfs_phone, info, sizeof(*info)); 
-	if (rc != EOK) {
-		async_wait_for(req, NULL);
-		return rc;
-	}
-	
-	/*
-	 * Ask VFS for callback connection.
-	 */
-	ipc_connect_to_me(vfs_phone, 0, 0, 0, &reg->vfs_phonehash);
-	
-	/*
-	 * Allocate piece of address space for PLB.
-	 */
-	reg->plb_ro = as_get_mappable_page(PLB_SIZE);
-	if (!reg->plb_ro) {
-		async_wait_for(req, NULL);
-		return ENOMEM;
-	}
-	
-	/*
-	 * Request sharing the Path Lookup Buffer with VFS.
-	 */
-	rc = async_share_in_start_0_0(vfs_phone, reg->plb_ro, PLB_SIZE);
-	if (rc) {
-		async_wait_for(req, NULL);
-		return rc;
-	}
-	 
-	/*
-	 * Pick up the answer for the request to the VFS_IN_REQUEST call.
-	 */
-	async_wait_for(req, NULL);
-	reg->fs_handle = (int) IPC_GET_ARG1(answer);
-	
-	/*
-	 * Create a connection fibril to handle the callback connection.
-	 */
-	async_new_connection(reg->vfs_phonehash, 0, NULL, conn);
-	
-	/*
-	 * Tell the async framework that other connections are to be handled by
-	 * the same connection fibril as well.
-	 */
-	async_set_client_connection(conn);
-	
-	return IPC_GET_RETVAL(answer);
-}
-
-void fs_node_initialize(fs_node_t *fn)
-{
-	memset(fn, 0, sizeof(fs_node_t));
-}
-
-void libfs_mount(libfs_ops_t *ops, fs_handle_t fs_handle, ipc_callid_t rid,
-    ipc_call_t *request)
-{
-	dev_handle_t mp_dev_handle = (dev_handle_t) IPC_GET_ARG1(*request);
-	fs_index_t mp_fs_index = (fs_index_t) IPC_GET_ARG2(*request);
-	fs_handle_t mr_fs_handle = (fs_handle_t) IPC_GET_ARG3(*request);
-	dev_handle_t mr_dev_handle = (dev_handle_t) IPC_GET_ARG4(*request);
-	int res;
-	ipcarg_t rc;
-	
-	ipc_call_t call;
-	ipc_callid_t callid;
-	
-	/* Accept the phone */
-	callid = async_get_call(&call);
-	int mountee_phone = (int) IPC_GET_ARG1(call);
-	if ((IPC_GET_METHOD(call) != IPC_M_CONNECTION_CLONE) ||
-	    (mountee_phone < 0)) {
-		ipc_answer_0(callid, EINVAL);
-		ipc_answer_0(rid, EINVAL);
-		return;
-	}
-	
-	/* Acknowledge the mountee_phone */
-	ipc_answer_0(callid, EOK);
-	
-	fs_node_t *fn;
-	res = ops->node_get(&fn, mp_dev_handle, mp_fs_index);
-	if ((res != EOK) || (!fn)) {
-		ipc_hangup(mountee_phone);
-		async_data_write_void(combine_rc(res, ENOENT));
-		ipc_answer_0(rid, combine_rc(res, ENOENT));
-		return;
-	}
-	
-	if (fn->mp_data.mp_active) {
-		ipc_hangup(mountee_phone);
-		(void) ops->node_put(fn);
-		async_data_write_void(EBUSY);
-		ipc_answer_0(rid, EBUSY);
-		return;
-	}
-	
-	rc = async_req_0_0(mountee_phone, IPC_M_CONNECT_ME);
-	if (rc != EOK) {
-		ipc_hangup(mountee_phone);
-		(void) ops->node_put(fn);
-		async_data_write_void(rc);
-		ipc_answer_0(rid, rc);
-		return;
-	}
-	
-	ipc_call_t answer;
-	rc = async_data_write_forward_1_1(mountee_phone, VFS_OUT_MOUNTED,
-	    mr_dev_handle, &answer);
-	
-	if (rc == EOK) {
-		fn->mp_data.mp_active = true;
-		fn->mp_data.fs_handle = mr_fs_handle;
-		fn->mp_data.dev_handle = mr_dev_handle;
-		fn->mp_data.phone = mountee_phone;
-	}
-	
-	/*
-	 * Do not release the FS node so that it stays in memory.
-	 */
-	ipc_answer_3(rid, rc, IPC_GET_ARG1(answer), IPC_GET_ARG2(answer),
-	    IPC_GET_ARG3(answer));
-}
-
-void libfs_unmount(libfs_ops_t *ops, ipc_callid_t rid, ipc_call_t *request)
-{
-	dev_handle_t mp_dev_handle = (dev_handle_t) IPC_GET_ARG1(*request);
-	fs_index_t mp_fs_index = (fs_index_t) IPC_GET_ARG2(*request);
-	fs_node_t *fn;
-	int res;
-
-	res = ops->node_get(&fn, mp_dev_handle, mp_fs_index);
-	if ((res != EOK) || (!fn)) {
-		ipc_answer_0(rid, combine_rc(res, ENOENT));
-		return;
-	}
-
-	/*
-	 * We are clearly expecting to find the mount point active.
-	 */
-	if (!fn->mp_data.mp_active) {
-		(void) ops->node_put(fn);
-		ipc_answer_0(rid, EINVAL);
-		return;
-	}
-
-	/*
-	 * Tell the mounted file system to unmount.
-	 */
-	res = async_req_1_0(fn->mp_data.phone, VFS_OUT_UNMOUNTED,
-	    fn->mp_data.dev_handle);
-
-	/*
-	 * If everything went well, perform the clean-up on our side.
-	 */
-	if (res == EOK) {
-		ipc_hangup(fn->mp_data.phone);
-		fn->mp_data.mp_active = false;
-		fn->mp_data.fs_handle = 0;
-		fn->mp_data.dev_handle = 0;
-		fn->mp_data.phone = 0;
-		/* Drop the reference created in libfs_mount(). */
-		(void) ops->node_put(fn);
-	}
-
-	(void) ops->node_put(fn);
-	ipc_answer_0(rid, res);
-}
-
-/** Lookup VFS triplet by name in the file system name space.
- *
- * The path passed in the PLB must be in the canonical file system path format
- * as returned by the canonify() function.
- *
- * @param ops       libfs operations structure with function pointers to
- *                  file system implementation
- * @param fs_handle File system handle of the file system where to perform
- *                  the lookup.
- * @param rid       Request ID of the VFS_OUT_LOOKUP request.
- * @param request   VFS_OUT_LOOKUP request data itself.
- *
- */
-void libfs_lookup(libfs_ops_t *ops, fs_handle_t fs_handle, ipc_callid_t rid,
-    ipc_call_t *request)
-{
-	unsigned int first = IPC_GET_ARG1(*request);
-	unsigned int last = IPC_GET_ARG2(*request);
-	unsigned int next = first;
-	dev_handle_t dev_handle = IPC_GET_ARG3(*request);
-	int lflag = IPC_GET_ARG4(*request);
-	fs_index_t index = IPC_GET_ARG5(*request);
-	char component[NAME_MAX + 1];
-	int len;
-	int rc;
-	
-	if (last < next)
-		last += PLB_SIZE;
-	
-	fs_node_t *par = NULL;
-	fs_node_t *cur = NULL;
-	fs_node_t *tmp = NULL;
-	
-	rc = ops->root_get(&cur, dev_handle);
-	on_error(rc, goto out_with_answer);
-	
-	if (cur->mp_data.mp_active) {
-		ipc_forward_slow(rid, cur->mp_data.phone, VFS_OUT_LOOKUP,
-		    next, last, cur->mp_data.dev_handle, lflag, index,
-		    IPC_FF_ROUTE_FROM_ME);
-		(void) ops->node_put(cur);
-		return;
-	}
-	
-	/* Eat slash */
-	if (ops->plb_get_char(next) == '/')
-		next++;
-	
-	while (next <= last) {
-		bool has_children;
-		
-		rc = ops->has_children(&has_children, cur);
-		on_error(rc, goto out_with_answer);
-		if (!has_children)
-			break;
-		
-		/* Collect the component */
-		len = 0;
-		while ((next <= last) && (ops->plb_get_char(next) != '/')) {
-			if (len + 1 == NAME_MAX) {
-				/* Component length overflow */
-				ipc_answer_0(rid, ENAMETOOLONG);
-				goto out;
-			}
-			component[len++] = ops->plb_get_char(next);
-			/* Process next character */
-			next++;
-		}
-		
-		assert(len);
-		component[len] = '\0';
-		/* Eat slash */
-		next++;
-		
-		/* Match the component */
-		rc = ops->match(&tmp, cur, component);
-		on_error(rc, goto out_with_answer);
-		
-		/*
-		 * If the matching component is a mount point, there are two
-		 * legitimate semantics of the lookup operation. The first is
-		 * the commonly used one in which the lookup crosses each mount
-		 * point into the mounted file system. The second semantics is
-		 * used mostly during unmount() and differs from the first one
-		 * only in that the last mount point in the looked up path,
-		 * which is also its last component, is not crossed.
-		 */
-
-		if ((tmp) && (tmp->mp_data.mp_active) &&
-		    (!(lflag & L_MP) || (next <= last))) {
-			if (next > last)
-				next = last = first;
-			else
-				next--;
-			
-			ipc_forward_slow(rid, tmp->mp_data.phone,
-			    VFS_OUT_LOOKUP, next, last, tmp->mp_data.dev_handle,
-			    lflag, index, IPC_FF_ROUTE_FROM_ME);
-			(void) ops->node_put(cur);
-			(void) ops->node_put(tmp);
-			if (par)
-				(void) ops->node_put(par);
-			return;
-		}
-		
-		/* Handle miss: match amongst siblings */
-		if (!tmp) {
-			if (next <= last) {
-				/* There are unprocessed components */
-				ipc_answer_0(rid, ENOENT);
-				goto out;
-			}
-			
-			/* Miss in the last component */
-			if (lflag & (L_CREATE | L_LINK)) {
-				/* Request to create a new link */
-				if (!ops->is_directory(cur)) {
-					ipc_answer_0(rid, ENOTDIR);
-					goto out;
-				}
-				
-				fs_node_t *fn;
-				if (lflag & L_CREATE)
-					rc = ops->create(&fn, dev_handle,
-					    lflag);
-				else
-					rc = ops->node_get(&fn, dev_handle,
-					    index);
-				on_error(rc, goto out_with_answer);
-				
-				if (fn) {
-					rc = ops->link(cur, fn, component);
-					if (rc != EOK) {
-						if (lflag & L_CREATE)
-							(void) ops->destroy(fn);
-						ipc_answer_0(rid, rc);
-					} else {
-						aoff64_t size = ops->size_get(fn);
-						ipc_answer_5(rid, fs_handle,
-						    dev_handle,
-						    ops->index_get(fn),
-						    LOWER32(size),
-						    UPPER32(size),
-						    ops->lnkcnt_get(fn));
-						(void) ops->node_put(fn);
-					}
-				} else
-					ipc_answer_0(rid, ENOSPC);
-				
-				goto out;
-			}
-			
-			ipc_answer_0(rid, ENOENT);
-			goto out;
-		}
-		
-		if (par) {
-			rc = ops->node_put(par);
-			on_error(rc, goto out_with_answer);
-		}
-		
-		/* Descend one level */
-		par = cur;
-		cur = tmp;
-		tmp = NULL;
-	}
-	
-	/* Handle miss: excessive components */
-	if (next <= last) {
-		bool has_children;
-		rc = ops->has_children(&has_children, cur);
-		on_error(rc, goto out_with_answer);
-		
-		if (has_children)
-			goto skip_miss;
-		
-		if (lflag & (L_CREATE | L_LINK)) {
-			if (!ops->is_directory(cur)) {
-				ipc_answer_0(rid, ENOTDIR);
-				goto out;
-			}
-			
-			/* Collect next component */
-			len = 0;
-			while (next <= last) {
-				if (ops->plb_get_char(next) == '/') {
-					/* More than one component */
-					ipc_answer_0(rid, ENOENT);
-					goto out;
-				}
-				
-				if (len + 1 == NAME_MAX) {
-					/* Component length overflow */
-					ipc_answer_0(rid, ENAMETOOLONG);
-					goto out;
-				}
-				
-				component[len++] = ops->plb_get_char(next);
-				/* Process next character */
-				next++;
-			}
-			
-			assert(len);
-			component[len] = '\0';
-			
-			fs_node_t *fn;
-			if (lflag & L_CREATE)
-				rc = ops->create(&fn, dev_handle, lflag);
-			else
-				rc = ops->node_get(&fn, dev_handle, index);
-			on_error(rc, goto out_with_answer);
-			
-			if (fn) {
-				rc = ops->link(cur, fn, component);
-				if (rc != EOK) {
-					if (lflag & L_CREATE)
-						(void) ops->destroy(fn);
-					ipc_answer_0(rid, rc);
-				} else {
-					aoff64_t size = ops->size_get(fn);
-					ipc_answer_5(rid, fs_handle,
-					    dev_handle,
-					    ops->index_get(fn),
-					    LOWER32(size),
-					    UPPER32(size),
-					    ops->lnkcnt_get(fn));
-					(void) ops->node_put(fn);
-				}
-			} else
-				ipc_answer_0(rid, ENOSPC);
-			
-			goto out;
-		}
-		
-		ipc_answer_0(rid, ENOENT);
-		goto out;
-	}
-	
-skip_miss:
-	
-	/* Handle hit */
-	if (lflag & L_UNLINK) {
-		unsigned int old_lnkcnt = ops->lnkcnt_get(cur);
-		rc = ops->unlink(par, cur, component);
-		
-		if (rc == EOK) {
-			aoff64_t size = ops->size_get(cur);
-			ipc_answer_5(rid, fs_handle, dev_handle,
-			    ops->index_get(cur), LOWER32(size), UPPER32(size),
-			    old_lnkcnt);
-		} else
-			ipc_answer_0(rid, rc);
-		
-		goto out;
-	}
-	
-	if (((lflag & (L_CREATE | L_EXCLUSIVE)) == (L_CREATE | L_EXCLUSIVE)) ||
-	    (lflag & L_LINK)) {
-		ipc_answer_0(rid, EEXIST);
-		goto out;
-	}
-	
-	if ((lflag & L_FILE) && (ops->is_directory(cur))) {
-		ipc_answer_0(rid, EISDIR);
-		goto out;
-	}
-	
-	if ((lflag & L_DIRECTORY) && (ops->is_file(cur))) {
-		ipc_answer_0(rid, ENOTDIR);
-		goto out;
-	}
-
-	if ((lflag & L_ROOT) && par) {
-		ipc_answer_0(rid, EINVAL);
-		goto out;
-	}
-	
-out_with_answer:
-	
-	if (rc == EOK) {
-		if (lflag & L_OPEN)
-			rc = ops->node_open(cur);
-		
-		if (rc == EOK) {
-			aoff64_t size = ops->size_get(cur);
-			ipc_answer_5(rid, fs_handle, dev_handle,
-			    ops->index_get(cur), LOWER32(size), UPPER32(size),
-			    ops->lnkcnt_get(cur));
-		} else
-			ipc_answer_0(rid, rc);
-		
-	} else
-		ipc_answer_0(rid, rc);
-	
-out:
-	
-	if (par)
-		(void) ops->node_put(par);
-	
-	if (cur)
-		(void) ops->node_put(cur);
-	
-	if (tmp)
-		(void) ops->node_put(tmp);
-}
-
-void libfs_stat(libfs_ops_t *ops, fs_handle_t fs_handle, ipc_callid_t rid,
-    ipc_call_t *request)
-{
-	dev_handle_t dev_handle = (dev_handle_t) IPC_GET_ARG1(*request);
-	fs_index_t index = (fs_index_t) IPC_GET_ARG2(*request);
-	
-	fs_node_t *fn;
-	int rc = ops->node_get(&fn, dev_handle, index);
-	on_error(rc, answer_and_return(rid, rc));
-	
-	ipc_callid_t callid;
-	size_t size;
-	if ((!async_data_read_receive(&callid, &size)) ||
-	    (size != sizeof(struct stat))) {
-		ops->node_put(fn);
-		ipc_answer_0(callid, EINVAL);
-		ipc_answer_0(rid, EINVAL);
-		return;
-	}
-	
-	struct stat stat;
-	memset(&stat, 0, sizeof(struct stat));
-	
-	stat.fs_handle = fs_handle;
-	stat.dev_handle = dev_handle;
-	stat.index = index;
-	stat.lnkcnt = ops->lnkcnt_get(fn);
-	stat.is_file = ops->is_file(fn);
-	stat.is_directory = ops->is_directory(fn);
-	stat.size = ops->size_get(fn);
-	stat.device = ops->device_get(fn);
-	
-	ops->node_put(fn);
-	
-	async_data_read_finalize(callid, &stat, sizeof(struct stat));
-	ipc_answer_0(rid, EOK);
-}
-
-/** Open VFS triplet.
- *
- * @param ops     libfs operations structure with function pointers to
- *                file system implementation
- * @param rid     Request ID of the VFS_OUT_OPEN_NODE request.
- * @param request VFS_OUT_OPEN_NODE request data itself.
- *
- */
-void libfs_open_node(libfs_ops_t *ops, fs_handle_t fs_handle, ipc_callid_t rid,
-    ipc_call_t *request)
-{
-	dev_handle_t dev_handle = IPC_GET_ARG1(*request);
-	fs_index_t index = IPC_GET_ARG2(*request);
-	
-	fs_node_t *fn;
-	int rc = ops->node_get(&fn, dev_handle, index);
-	on_error(rc, answer_and_return(rid, rc));
-	
-	if (fn == NULL) {
-		ipc_answer_0(rid, ENOENT);
-		return;
-	}
-	
-	rc = ops->node_open(fn);
-	aoff64_t size = ops->size_get(fn);
-	ipc_answer_4(rid, rc, LOWER32(size), UPPER32(size), ops->lnkcnt_get(fn),
-	    (ops->is_file(fn) ? L_FILE : 0) | (ops->is_directory(fn) ? L_DIRECTORY : 0));
-	
-	(void) ops->node_put(fn);
-}
-
-/** @}
- */
Index: pace/lib/libfs/libfs.h
===================================================================
--- uspace/lib/libfs/libfs.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,106 +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.
- */
-
-/** @addtogroup libfs
- * @{
- */
-/**
- * @file
- */
-
-#ifndef LIBFS_LIBFS_H_
-#define LIBFS_LIBFS_H_
-
-#include <ipc/vfs.h>
-#include <stdint.h>
-#include <ipc/ipc.h>
-#include <async.h>
-#include <devmap.h>
-
-typedef struct {
-	bool mp_active;
-	int phone;
-	fs_handle_t fs_handle;
-	dev_handle_t dev_handle;
-} mp_data_t;
-
-typedef struct {
-	mp_data_t mp_data;  /**< Mount point info. */
-	void *data;         /**< Data of the file system implementation. */
-} fs_node_t;
-
-typedef struct {
-	/*
-	 * The first set of methods are functions that return an integer error
-	 * code. If some additional return value is to be returned, the first
-	 * argument holds the output argument.
-	 */
-	int (* root_get)(fs_node_t **, dev_handle_t);
-	int (* match)(fs_node_t **, fs_node_t *, const char *);
-	int (* node_get)(fs_node_t **, dev_handle_t, fs_index_t);
-	int (* node_open)(fs_node_t *);
-	int (* node_put)(fs_node_t *);
-	int (* create)(fs_node_t **, dev_handle_t, int);
-	int (* destroy)(fs_node_t *);
-	int (* link)(fs_node_t *, fs_node_t *, const char *);
-	int (* unlink)(fs_node_t *, fs_node_t *, const char *);
-	int (* has_children)(bool *, fs_node_t *);
-	/*
-	 * The second set of methods are usually mere getters that do not return
-	 * an integer error code.
-	 */
-	fs_index_t (* index_get)(fs_node_t *);
-	aoff64_t (* size_get)(fs_node_t *);
-	unsigned int (* lnkcnt_get)(fs_node_t *);
-	char (* plb_get_char)(unsigned pos);
-	bool (* is_directory)(fs_node_t *);
-	bool (* is_file)(fs_node_t *);
-	dev_handle_t (* device_get)(fs_node_t *);
-} libfs_ops_t;
-
-typedef struct {
-	int fs_handle;           /**< File system handle. */
-	ipcarg_t vfs_phonehash;  /**< Initial VFS phonehash. */
-	uint8_t *plb_ro;         /**< Read-only PLB view. */
-} fs_reg_t;
-
-extern int fs_register(int, fs_reg_t *, vfs_info_t *, async_client_conn_t);
-
-extern void fs_node_initialize(fs_node_t *);
-
-extern void libfs_mount(libfs_ops_t *, fs_handle_t, ipc_callid_t, ipc_call_t *);
-extern void libfs_unmount(libfs_ops_t *, ipc_callid_t, ipc_call_t *);
-extern void libfs_lookup(libfs_ops_t *, fs_handle_t, ipc_callid_t, ipc_call_t *);
-extern void libfs_stat(libfs_ops_t *, fs_handle_t, ipc_callid_t, ipc_call_t *);
-extern void libfs_open_node(libfs_ops_t *, fs_handle_t, ipc_callid_t,
-    ipc_call_t *);
-
-#endif
-
-/** @}
- */
Index: pace/lib/libpci/COPYING
===================================================================
--- uspace/lib/libpci/COPYING	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,345 +1,0 @@
-		    GNU GENERAL PUBLIC LICENSE
-		       Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
-     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-			    Preamble
-
-  The licenses for most software are designed to take away your
-freedom to share and change it.  By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users.  This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it.  (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.)  You can apply it to
-your programs, too.
-
-  When we speak of free software, we are referring to freedom, not
-price.  Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
-  To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
-  For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have.  You must make sure that they, too, receive or can get the
-source code.  And you must show them these terms so they know their
-rights.
-
-  We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
-  Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software.  If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
-  Finally, any free program is threatened constantly by software
-patents.  We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary.  To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
-  The precise terms and conditions for copying, distribution and
-modification follow.
-
-
-		    GNU GENERAL PUBLIC LICENSE
-   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-  0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License.  The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language.  (Hereinafter, translation is included without limitation in
-the term "modification".)  Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope.  The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
-  1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
-  2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
-    a) You must cause the modified files to carry prominent notices
-    stating that you changed the files and the date of any change.
-
-    b) You must cause any work that you distribute or publish, that in
-    whole or in part contains or is derived from the Program or any
-    part thereof, to be licensed as a whole at no charge to all third
-    parties under the terms of this License.
-
-    c) If the modified program normally reads commands interactively
-    when run, you must cause it, when started running for such
-    interactive use in the most ordinary way, to print or display an
-    announcement including an appropriate copyright notice and a
-    notice that there is no warranty (or else, saying that you provide
-    a warranty) and that users may redistribute the program under
-    these conditions, and telling the user how to view a copy of this
-    License.  (Exception: if the Program itself is interactive but
-    does not normally print such an announcement, your work based on
-    the Program is not required to print an announcement.)
-
-
-These requirements apply to the modified work as a whole.  If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works.  But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
-  3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
-    a) Accompany it with the complete corresponding machine-readable
-    source code, which must be distributed under the terms of Sections
-    1 and 2 above on a medium customarily used for software interchange; or,
-
-    b) Accompany it with a written offer, valid for at least three
-    years, to give any third party, for a charge no more than your
-    cost of physically performing source distribution, a complete
-    machine-readable copy of the corresponding source code, to be
-    distributed under the terms of Sections 1 and 2 above on a medium
-    customarily used for software interchange; or,
-
-    c) Accompany it with the information you received as to the offer
-    to distribute corresponding source code.  (This alternative is
-    allowed only for noncommercial distribution and only if you
-    received the program in object code or executable form with such
-    an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it.  For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable.  However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
-
-  4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License.  Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
-  5. You are not required to accept this License, since you have not
-signed it.  However, nothing else grants you permission to modify or
-distribute the Program or its derivative works.  These actions are
-prohibited by law if you do not accept this License.  Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
-  6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions.  You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
-  7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License.  If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all.  For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices.  Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
-
-  8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded.  In such case, this License incorporates
-the limitation as if written in the body of this License.
-
-  9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time.  Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number.  If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation.  If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
-  10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission.  For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this.  Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
-			    NO WARRANTY
-
-  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
-  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
-		     END OF TERMS AND CONDITIONS
-
-
-	    How to Apply These Terms to Your New Programs
-
-  If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
-  To do so, attach the following notices to the program.  It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
-    <one line to give the program's name and a brief idea of what it does.>
-    Copyright (C) <year>  <name of author>
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
-    Gnomovision version 69, Copyright (C) year  name of author
-    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
-    This is free software, and you are welcome to redistribute it
-    under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License.  Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary.  Here is a sample; alter the names:
-
-  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
-  `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
-  <signature of Ty Coon>, 1 April 1989
-  Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs.  If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library.  If this is what you want to do, use the GNU Library General
-Public License instead of this License.
Index: pace/lib/libpci/Makefile
===================================================================
--- uspace/lib/libpci/Makefile	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,41 +1,0 @@
-#
-# Copyright (c) 2005 Martin Decky
-# Copyright (c) 2007 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.
-#
-
-USPACE_PREFIX = ../..
-LIBS = $(LIBC_PREFIX)/libc.a
-
-OUTPUT = libpci.a
-
-SOURCES = \
-	access.c \
-	generic.c \
-	names.c \
-	i386-ports.c
-
-include ../Makefile.common
Index: pace/lib/libpci/VERSION
===================================================================
--- uspace/lib/libpci/VERSION	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,2 +1,0 @@
-This libpci has been ported from pciutils-2.2.3
-on May 8, 2006 by Jakub Jermar.
Index: pace/lib/libpci/access.c
===================================================================
--- uspace/lib/libpci/access.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,270 +1,0 @@
-/*
- *	The PCI Library -- User Access
- *
- *	Copyright (c) 1997--2003 Martin Mares <mj@ucw.cz>
- *
- *	May 8, 2006 - Modified and ported to HelenOS by Jakub Jermar.
- *
- *	Can be freely distributed and used under the terms of the GNU GPL.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-
-#include "internal.h"
-
-static struct pci_methods *pci_methods[PCI_ACCESS_MAX] = {
-	&pm_intel_conf1,
-	&pm_intel_conf2,
-};
-
-struct pci_access *pci_alloc(void)
-{
-	struct pci_access *a = malloc(sizeof(struct pci_access));
-	int i;
-
-	if (!a)
-		return NULL;
-		
-	bzero(a, sizeof(*a));
-	for (i = 0; i < PCI_ACCESS_MAX; i++)
-		if (pci_methods[i] && pci_methods[i]->config)
-			pci_methods[i]->config(a);
-	return a;
-}
-
-void *pci_malloc(struct pci_access *a, int size)
-{
-	void *x = malloc(size);
-
-	if (!x)
-		a->error("Out of memory (allocation of %d bytes failed)", size);
-	return x;
-}
-
-void pci_mfree(void *x)
-{
-	if (x)
-		free(x);
-}
-
-static void pci_generic_error(const char *msg, ...)
-{
-	va_list args;
-
-	va_start(args, msg);
-	puts("pcilib: ");
-	vprintf(msg, args);
-	putchar('\n');
-	exit(1);
-}
-
-static void pci_generic_warn(const char *msg, ...)
-{
-	va_list args;
-
-	va_start(args, msg);
-	puts("pcilib: ");
-	vprintf(msg, args);
-	putchar('\n');
-}
-
-static void pci_generic_debug(const char *msg, ...)
-{
-	va_list args;
-
-	va_start(args, msg);
-	vprintf(msg, args);
-	va_end(args);
-}
-
-static void pci_null_debug(const char *msg UNUSED, ...)
-{
-}
-
-void pci_init(struct pci_access *a)
-{
-	if (!a->error)
-		a->error = pci_generic_error;
-	if (!a->warning)
-		a->warning = pci_generic_warn;
-	if (!a->debug)
-		a->debug = pci_generic_debug;
-	if (!a->debugging)
-		a->debug = pci_null_debug;
-
-	if (a->method) {
-		if (a->method >= PCI_ACCESS_MAX || !pci_methods[a->method])
-			a->error("This access method is not supported.");
-		a->methods = pci_methods[a->method];
-	} else {
-		unsigned int i;
-		for (i = 0; i < PCI_ACCESS_MAX; i++)
-			if (pci_methods[i]) {
-				a->debug("Trying method %d...", i);
-				if (pci_methods[i]->detect(a)) {
-					a->debug("...OK\n");
-					a->methods = pci_methods[i];
-					a->method = i;
-					break;
-				}
-				a->debug("...No.\n");
-			}
-		if (!a->methods)
-			a->error("Cannot find any working access method.");
-	}
-	a->debug("Decided to use %s\n", a->methods->name);
-	a->methods->init(a);
-}
-
-void pci_cleanup(struct pci_access *a)
-{
-	struct pci_dev *d, *e;
-
-	for (d = a->devices; d; d = e) {
-		e = d->next;
-		pci_free_dev(d);
-	}
-	if (a->methods)
-		a->methods->cleanup(a);
-	pci_free_name_list(a);
-	pci_mfree(a);
-}
-
-void pci_scan_bus(struct pci_access *a)
-{
-	a->methods->scan(a);
-}
-
-struct pci_dev *pci_alloc_dev(struct pci_access *a)
-{
-	struct pci_dev *d = pci_malloc(a, sizeof(struct pci_dev));
-
-	bzero(d, sizeof(*d));
-	d->access = a;
-	d->methods = a->methods;
-	d->hdrtype = -1;
-	if (d->methods->init_dev)
-		d->methods->init_dev(d);
-	return d;
-}
-
-int pci_link_dev(struct pci_access *a, struct pci_dev *d)
-{
-	d->next = a->devices;
-	a->devices = d;
-
-	return 1;
-}
-
-struct pci_dev *pci_get_dev(struct pci_access *a, int domain, int bus,
-			    int dev, int func)
-{
-	struct pci_dev *d = pci_alloc_dev(a);
-
-	d->domain = domain;
-	d->bus = bus;
-	d->dev = dev;
-	d->func = func;
-	return d;
-}
-
-void pci_free_dev(struct pci_dev *d)
-{
-	if (d->methods->cleanup_dev)
-		d->methods->cleanup_dev(d);
-	pci_mfree(d);
-}
-
-static inline void
-pci_read_data(struct pci_dev *d, void *buf, int pos, int len)
-{
-	if (pos & (len - 1))
-		d->access->error("Unaligned read: pos=%02x, len=%d", pos,
-				 len);
-	if (pos + len <= d->cache_len)
-		memcpy(buf, d->cache + pos, len);
-	else if (!d->methods->read(d, pos, buf, len))
-		memset(buf, 0xff, len);
-}
-
-byte pci_read_byte(struct pci_dev *d, int pos)
-{
-	byte buf;
-	pci_read_data(d, &buf, pos, 1);
-	return buf;
-}
-
-word pci_read_word(struct pci_dev * d, int pos)
-{
-	word buf;
-	pci_read_data(d, &buf, pos, 2);
-	return le16_to_cpu(buf);
-}
-
-u32 pci_read_long(struct pci_dev * d, int pos)
-{
-	u32 buf;
-	pci_read_data(d, &buf, pos, 4);
-	return le32_to_cpu(buf);
-}
-
-int pci_read_block(struct pci_dev *d, int pos, byte * buf, int len)
-{
-	return d->methods->read(d, pos, buf, len);
-}
-
-static inline int
-pci_write_data(struct pci_dev *d, void *buf, int pos, int len)
-{
-	if (pos & (len - 1))
-		d->access->error("Unaligned write: pos=%02x,len=%d", pos, len);
-	if (pos + len <= d->cache_len)
-		memcpy(d->cache + pos, buf, len);
-	return d->methods->write(d, pos, buf, len);
-}
-
-int pci_write_byte(struct pci_dev *d, int pos, byte data)
-{
-	return pci_write_data(d, &data, pos, 1);
-}
-
-int pci_write_word(struct pci_dev *d, int pos, word data)
-{
-	word buf = cpu_to_le16(data);
-	return pci_write_data(d, &buf, pos, 2);
-}
-
-int pci_write_long(struct pci_dev *d, int pos, u32 data)
-{
-	u32 buf = cpu_to_le32(data);
-	return pci_write_data(d, &buf, pos, 4);
-}
-
-int pci_write_block(struct pci_dev *d, int pos, byte * buf, int len)
-{
-	if (pos < d->cache_len) {
-		int l = (pos + len >= d->cache_len) ? (d->cache_len - pos) : len;
-		memcpy(d->cache + pos, buf, l);
-	}
-	return d->methods->write(d, pos, buf, len);
-}
-
-int pci_fill_info(struct pci_dev *d, int flags)
-{
-	if (flags & PCI_FILL_RESCAN) {
-		flags &= ~PCI_FILL_RESCAN;
-		d->known_fields = 0;
-	}
-	if (flags & ~d->known_fields)
-		d->known_fields |= d->methods->fill_info(d, flags & ~d->known_fields);
-	return d->known_fields;
-}
-
-void pci_setup_cache(struct pci_dev *d, byte * cache, int len)
-{
-	d->cache = cache;
-	d->cache_len = len;
-}
Index: pace/lib/libpci/generic.c
===================================================================
--- uspace/lib/libpci/generic.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,206 +1,0 @@
-/*
- *	The PCI Library -- Generic Direct Access Functions
- *
- *	Copyright (c) 1997--2000 Martin Mares <mj@ucw.cz>
- *
- *	May 8, 2006 - Modified and ported to HelenOS by Jakub Jermar.
- *
- *	Can be freely distributed and used under the terms of the GNU GPL.
- */
-
-#include <string.h>
-
-#include "internal.h"
-
-void pci_generic_scan_bus(struct pci_access *a, byte * busmap, int bus)
-{
-	int dev, multi, ht;
-	struct pci_dev *t;
-
-	a->debug("Scanning bus %02x for devices...\n", bus);
-	if (busmap[bus]) {
-		a->warning("Bus %02x seen twice (firmware bug). Ignored.",
-			   bus);
-		return;
-	}
-	busmap[bus] = 1;
-	t = pci_alloc_dev(a);
-	t->bus = bus;
-	for (dev = 0; dev < 32; dev++) {
-		t->dev = dev;
-		multi = 0;
-		for (t->func = 0; !t->func || (multi && t->func < 8);
-		     t->func++) {
-			u32 vd = pci_read_long(t, PCI_VENDOR_ID);
-			struct pci_dev *d;
-
-			if (!vd || vd == 0xffffffff)
-				continue;
-			ht = pci_read_byte(t, PCI_HEADER_TYPE);
-			if (!t->func)
-				multi = ht & 0x80;
-			ht &= 0x7f;
-			d = pci_alloc_dev(a);
-			d->bus = t->bus;
-			d->dev = t->dev;
-			d->func = t->func;
-			d->vendor_id = vd & 0xffff;
-			d->device_id = vd >> 16U;
-			d->known_fields = PCI_FILL_IDENT;
-			d->hdrtype = ht;
-			pci_link_dev(a, d);
-			switch (ht) {
-			case PCI_HEADER_TYPE_NORMAL:
-				break;
-			case PCI_HEADER_TYPE_BRIDGE:
-			case PCI_HEADER_TYPE_CARDBUS:
-				pci_generic_scan_bus(a, busmap,
-						     pci_read_byte(t,
-								   PCI_SECONDARY_BUS));
-				break;
-			default:
-				a->debug
-				    ("Device %04x:%02x:%02x.%d has unknown header type %02x.\n",
-				     d->domain, d->bus, d->dev, d->func,
-				     ht);
-			}
-		}
-	}
-	pci_free_dev(t);
-}
-
-void pci_generic_scan(struct pci_access *a)
-{
-	byte busmap[256];
-
-	bzero(busmap, sizeof(busmap));
-	pci_generic_scan_bus(a, busmap, 0);
-}
-
-int pci_generic_fill_info(struct pci_dev *d, int flags)
-{
-	struct pci_access *a = d->access;
-
-	if ((flags & (PCI_FILL_BASES | PCI_FILL_ROM_BASE))
-	    && d->hdrtype < 0)
-		d->hdrtype = pci_read_byte(d, PCI_HEADER_TYPE) & 0x7f;
-	if (flags & PCI_FILL_IDENT) {
-		d->vendor_id = pci_read_word(d, PCI_VENDOR_ID);
-		d->device_id = pci_read_word(d, PCI_DEVICE_ID);
-	}
-	if (flags & PCI_FILL_IRQ)
-		d->irq = pci_read_byte(d, PCI_INTERRUPT_LINE);
-	if (flags & PCI_FILL_BASES) {
-		int cnt = 0, i;
-		bzero(d->base_addr, sizeof(d->base_addr));
-		switch (d->hdrtype) {
-		case PCI_HEADER_TYPE_NORMAL:
-			cnt = 6;
-			break;
-		case PCI_HEADER_TYPE_BRIDGE:
-			cnt = 2;
-			break;
-		case PCI_HEADER_TYPE_CARDBUS:
-			cnt = 1;
-			break;
-		}
-		if (cnt) {
-			for (i = 0; i < cnt; i++) {
-				u32 x = pci_read_long(d, PCI_BASE_ADDRESS_0 + i * 4);
-				if (!x || x == (u32) ~ 0)
-					continue;
-				if ((x & PCI_BASE_ADDRESS_SPACE) == PCI_BASE_ADDRESS_SPACE_IO)
-					d->base_addr[i] = x;
-				else {
-					if ((x & PCI_BASE_ADDRESS_MEM_TYPE_MASK) != PCI_BASE_ADDRESS_MEM_TYPE_64)
-						d->base_addr[i] = x;
-					else if (i >= cnt - 1)
-						a->warning("%04x:%02x:%02x.%d: Invalid 64-bit address seen for BAR %d.",
-						     d->domain, d->bus,
-						     d->dev, d->func, i);
-					else {
-						u32 y = pci_read_long(d, PCI_BASE_ADDRESS_0 + (++i) * 4);
-#ifdef PCI_HAVE_64BIT_ADDRESS
-						d->base_addr[i - 1] = x | (((pciaddr_t) y) << 32);
-#else
-						if (y)
-							a->warning("%04x:%02x:%02x.%d 64-bit device address ignored.",
-							     d->domain,
-							     d->bus,
-							     d->dev,
-							     d->func);
-						else
-							d->base_addr[i - 1] = x;
-#endif
-					}
-				}
-			}
-		}
-	}
-	if (flags & PCI_FILL_ROM_BASE) {
-		int reg = 0;
-		d->rom_base_addr = 0;
-		switch (d->hdrtype) {
-		case PCI_HEADER_TYPE_NORMAL:
-			reg = PCI_ROM_ADDRESS;
-			break;
-		case PCI_HEADER_TYPE_BRIDGE:
-			reg = PCI_ROM_ADDRESS1;
-			break;
-		}
-		if (reg) {
-			u32 u = pci_read_long(d, reg);
-			if (u != 0xffffffff)
-				d->rom_base_addr = u;
-		}
-	}
-	return flags & ~PCI_FILL_SIZES;
-}
-
-static int
-pci_generic_block_op(struct pci_dev *d, int pos, byte * buf, int len,
-		     int (*r) (struct pci_dev * d, int pos, byte * buf,
-			       int len))
-{
-	if ((pos & 1) && len >= 1) {
-		if (!r(d, pos, buf, 1))
-			return 0;
-		pos++;
-		buf++;
-		len--;
-	}
-	if ((pos & 3) && len >= 2) {
-		if (!r(d, pos, buf, 2))
-			return 0;
-		pos += 2;
-		buf += 2;
-		len -= 2;
-	}
-	while (len >= 4) {
-		if (!r(d, pos, buf, 4))
-			return 0;
-		pos += 4;
-		buf += 4;
-		len -= 4;
-	}
-	if (len >= 2) {
-		if (!r(d, pos, buf, 2))
-			return 0;
-		pos += 2;
-		buf += 2;
-		len -= 2;
-	}
-	if (len && !r(d, pos, buf, 1))
-		return 0;
-	return 1;
-}
-
-int pci_generic_block_read(struct pci_dev *d, int pos, byte * buf, int len)
-{
-	return pci_generic_block_op(d, pos, buf, len, d->access->methods->read);
-}
-
-int pci_generic_block_write(struct pci_dev *d, int pos, byte * buf, int len)
-{
-	return pci_generic_block_op(d, pos, buf, len, d->access->methods->write);
-}
Index: pace/lib/libpci/header.h
===================================================================
--- uspace/lib/libpci/header.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,937 +1,0 @@
-/*
- *	The PCI Library -- PCI Header Structure (based on <linux/pci.h>)
- *
- *	Copyright (c) 1997--2005 Martin Mares <mj@ucw.cz>
- *
- *	May 8, 2006 - Modified and ported to HelenOS by Jakub Jermar.
- *
- *	Can be freely distributed and used under the terms of the GNU GPL.
- */
-
-/*
- * Under PCI, each device has 256 bytes of configuration address space,
- * of which the first 64 bytes are standardized as follows:
- */
-#define PCI_VENDOR_ID		0x00	/* 16 bits */
-#define PCI_DEVICE_ID		0x02	/* 16 bits */
-#define PCI_COMMAND		0x04	/* 16 bits */
-#define  PCI_COMMAND_IO		0x1	/* Enable response in I/O space */
-#define  PCI_COMMAND_MEMORY	0x2	/* Enable response in Memory space */
-#define  PCI_COMMAND_MASTER	0x4	/* Enable bus mastering */
-#define  PCI_COMMAND_SPECIAL	0x8	/* Enable response to special cycles */
-#define  PCI_COMMAND_INVALIDATE	0x10	/* Use memory write and invalidate */
-#define  PCI_COMMAND_VGA_PALETTE 0x20	/* Enable palette snooping */
-#define  PCI_COMMAND_PARITY	0x40	/* Enable parity checking */
-#define  PCI_COMMAND_WAIT 	0x80	/* Enable address/data stepping */
-#define  PCI_COMMAND_SERR	0x100	/* Enable SERR */
-#define  PCI_COMMAND_FAST_BACK	0x200	/* Enable back-to-back writes */
-
-#define PCI_STATUS		0x06	/* 16 bits */
-#define  PCI_STATUS_CAP_LIST	0x10	/* Support Capability List */
-#define  PCI_STATUS_66MHZ	0x20	/* Support 66 Mhz PCI 2.1 bus */
-#define  PCI_STATUS_UDF		0x40	/* Support User Definable Features [obsolete] */
-#define  PCI_STATUS_FAST_BACK	0x80	/* Accept fast-back to back */
-#define  PCI_STATUS_PARITY	0x100	/* Detected parity error */
-#define  PCI_STATUS_DEVSEL_MASK	0x600	/* DEVSEL timing */
-#define  PCI_STATUS_DEVSEL_FAST	0x000
-#define  PCI_STATUS_DEVSEL_MEDIUM 0x200
-#define  PCI_STATUS_DEVSEL_SLOW 0x400
-#define  PCI_STATUS_SIG_TARGET_ABORT 0x800	/* Set on target abort */
-#define  PCI_STATUS_REC_TARGET_ABORT 0x1000	/* Master ack of " */
-#define  PCI_STATUS_REC_MASTER_ABORT 0x2000	/* Set on master abort */
-#define  PCI_STATUS_SIG_SYSTEM_ERROR 0x4000	/* Set when we drive SERR */
-#define  PCI_STATUS_DETECTED_PARITY 0x8000	/* Set on parity error */
-
-#define PCI_CLASS_REVISION	0x08	/* High 24 bits are class, low 8
-					   revision */
-#define PCI_REVISION_ID         0x08	/* Revision ID */
-#define PCI_CLASS_PROG          0x09	/* Reg. Level Programming Interface */
-#define PCI_CLASS_DEVICE        0x0a	/* Device class */
-
-#define PCI_CACHE_LINE_SIZE	0x0c	/* 8 bits */
-#define PCI_LATENCY_TIMER	0x0d	/* 8 bits */
-#define PCI_HEADER_TYPE		0x0e	/* 8 bits */
-#define  PCI_HEADER_TYPE_NORMAL	0
-#define  PCI_HEADER_TYPE_BRIDGE 1
-#define  PCI_HEADER_TYPE_CARDBUS 2
-
-#define PCI_BIST		0x0f	/* 8 bits */
-#define PCI_BIST_CODE_MASK	0x0f	/* Return result */
-#define PCI_BIST_START		0x40	/* 1 to start BIST, 2 secs or less */
-#define PCI_BIST_CAPABLE	0x80	/* 1 if BIST capable */
-
-/*
- * Base addresses specify locations in memory or I/O space.
- * Decoded size can be determined by writing a value of 
- * 0xffffffff to the register, and reading it back.  Only 
- * 1 bits are decoded.
- */
-#define PCI_BASE_ADDRESS_0	0x10	/* 32 bits */
-#define PCI_BASE_ADDRESS_1	0x14	/* 32 bits [htype 0,1 only] */
-#define PCI_BASE_ADDRESS_2	0x18	/* 32 bits [htype 0 only] */
-#define PCI_BASE_ADDRESS_3	0x1c	/* 32 bits */
-#define PCI_BASE_ADDRESS_4	0x20	/* 32 bits */
-#define PCI_BASE_ADDRESS_5	0x24	/* 32 bits */
-#define  PCI_BASE_ADDRESS_SPACE	0x01	/* 0 = memory, 1 = I/O */
-#define  PCI_BASE_ADDRESS_SPACE_IO 0x01
-#define  PCI_BASE_ADDRESS_SPACE_MEMORY 0x00
-#define  PCI_BASE_ADDRESS_MEM_TYPE_MASK 0x06
-#define  PCI_BASE_ADDRESS_MEM_TYPE_32	0x00	/* 32 bit address */
-#define  PCI_BASE_ADDRESS_MEM_TYPE_1M	0x02	/* Below 1M [obsolete] */
-#define  PCI_BASE_ADDRESS_MEM_TYPE_64	0x04	/* 64 bit address */
-#define  PCI_BASE_ADDRESS_MEM_PREFETCH	0x08	/* prefetchable? */
-#define  PCI_BASE_ADDRESS_MEM_MASK	(~(pciaddr_t)0x0f)
-#define  PCI_BASE_ADDRESS_IO_MASK	(~(pciaddr_t)0x03)
-/* bit 1 is reserved if address_space = 1 */
-
-/* Header type 0 (normal devices) */
-#define PCI_CARDBUS_CIS		0x28
-#define PCI_SUBSYSTEM_VENDOR_ID	0x2c
-#define PCI_SUBSYSTEM_ID	0x2e
-#define PCI_ROM_ADDRESS		0x30	/* Bits 31..11 are address, 10..1 reserved */
-#define  PCI_ROM_ADDRESS_ENABLE	0x01
-#define PCI_ROM_ADDRESS_MASK	(~(pciaddr_t)0x7ff)
-
-#define PCI_CAPABILITY_LIST	0x34	/* Offset of first capability list entry */
-
-/* 0x35-0x3b are reserved */
-#define PCI_INTERRUPT_LINE	0x3c	/* 8 bits */
-#define PCI_INTERRUPT_PIN	0x3d	/* 8 bits */
-#define PCI_MIN_GNT		0x3e	/* 8 bits */
-#define PCI_MAX_LAT		0x3f	/* 8 bits */
-
-/* Header type 1 (PCI-to-PCI bridges) */
-#define PCI_PRIMARY_BUS		0x18	/* Primary bus number */
-#define PCI_SECONDARY_BUS	0x19	/* Secondary bus number */
-#define PCI_SUBORDINATE_BUS	0x1a	/* Highest bus number behind the bridge */
-#define PCI_SEC_LATENCY_TIMER	0x1b	/* Latency timer for secondary interface */
-#define PCI_IO_BASE		0x1c	/* I/O range behind the bridge */
-#define PCI_IO_LIMIT		0x1d
-#define  PCI_IO_RANGE_TYPE_MASK	0x0f	/* I/O bridging type */
-#define  PCI_IO_RANGE_TYPE_16	0x00
-#define  PCI_IO_RANGE_TYPE_32	0x01
-#define  PCI_IO_RANGE_MASK	~0x0f
-#define PCI_SEC_STATUS		0x1e	/* Secondary status register */
-#define PCI_MEMORY_BASE		0x20	/* Memory range behind */
-#define PCI_MEMORY_LIMIT	0x22
-#define  PCI_MEMORY_RANGE_TYPE_MASK 0x0f
-#define  PCI_MEMORY_RANGE_MASK	~0x0f
-#define PCI_PREF_MEMORY_BASE	0x24	/* Prefetchable memory range behind */
-#define PCI_PREF_MEMORY_LIMIT	0x26
-#define  PCI_PREF_RANGE_TYPE_MASK 0x0f
-#define  PCI_PREF_RANGE_TYPE_32	0x00
-#define  PCI_PREF_RANGE_TYPE_64	0x01
-#define  PCI_PREF_RANGE_MASK	~0x0f
-#define PCI_PREF_BASE_UPPER32	0x28	/* Upper half of prefetchable memory range */
-#define PCI_PREF_LIMIT_UPPER32	0x2c
-#define PCI_IO_BASE_UPPER16	0x30	/* Upper half of I/O addresses */
-#define PCI_IO_LIMIT_UPPER16	0x32
-/* 0x34 same as for htype 0 */
-/* 0x35-0x3b is reserved */
-#define PCI_ROM_ADDRESS1	0x38	/* Same as PCI_ROM_ADDRESS, but for htype 1 */
-/* 0x3c-0x3d are same as for htype 0 */
-#define PCI_BRIDGE_CONTROL	0x3e
-#define  PCI_BRIDGE_CTL_PARITY	0x01	/* Enable parity detection on secondary interface */
-#define  PCI_BRIDGE_CTL_SERR	0x02	/* The same for SERR forwarding */
-#define  PCI_BRIDGE_CTL_NO_ISA	0x04	/* Disable bridging of ISA ports */
-#define  PCI_BRIDGE_CTL_VGA	0x08	/* Forward VGA addresses */
-#define  PCI_BRIDGE_CTL_MASTER_ABORT 0x20	/* Report master aborts */
-#define  PCI_BRIDGE_CTL_BUS_RESET 0x40	/* Secondary bus reset */
-#define  PCI_BRIDGE_CTL_FAST_BACK 0x80	/* Fast Back2Back enabled on secondary interface */
-
-/* Header type 2 (CardBus bridges) */
-/* 0x14-0x15 reserved */
-#define PCI_CB_SEC_STATUS	0x16	/* Secondary status */
-#define PCI_CB_PRIMARY_BUS	0x18	/* PCI bus number */
-#define PCI_CB_CARD_BUS		0x19	/* CardBus bus number */
-#define PCI_CB_SUBORDINATE_BUS	0x1a	/* Subordinate bus number */
-#define PCI_CB_LATENCY_TIMER	0x1b	/* CardBus latency timer */
-#define PCI_CB_MEMORY_BASE_0	0x1c
-#define PCI_CB_MEMORY_LIMIT_0	0x20
-#define PCI_CB_MEMORY_BASE_1	0x24
-#define PCI_CB_MEMORY_LIMIT_1	0x28
-#define PCI_CB_IO_BASE_0	0x2c
-#define PCI_CB_IO_BASE_0_HI	0x2e
-#define PCI_CB_IO_LIMIT_0	0x30
-#define PCI_CB_IO_LIMIT_0_HI	0x32
-#define PCI_CB_IO_BASE_1	0x34
-#define PCI_CB_IO_BASE_1_HI	0x36
-#define PCI_CB_IO_LIMIT_1	0x38
-#define PCI_CB_IO_LIMIT_1_HI	0x3a
-#define  PCI_CB_IO_RANGE_MASK	~0x03
-/* 0x3c-0x3d are same as for htype 0 */
-#define PCI_CB_BRIDGE_CONTROL	0x3e
-#define  PCI_CB_BRIDGE_CTL_PARITY	0x01	/* Similar to standard bridge control register */
-#define  PCI_CB_BRIDGE_CTL_SERR		0x02
-#define  PCI_CB_BRIDGE_CTL_ISA		0x04
-#define  PCI_CB_BRIDGE_CTL_VGA		0x08
-#define  PCI_CB_BRIDGE_CTL_MASTER_ABORT	0x20
-#define  PCI_CB_BRIDGE_CTL_CB_RESET	0x40	/* CardBus reset */
-#define  PCI_CB_BRIDGE_CTL_16BIT_INT	0x80	/* Enable interrupt for 16-bit cards */
-#define  PCI_CB_BRIDGE_CTL_PREFETCH_MEM0 0x100	/* Prefetch enable for both memory regions */
-#define  PCI_CB_BRIDGE_CTL_PREFETCH_MEM1 0x200
-#define  PCI_CB_BRIDGE_CTL_POST_WRITES	0x400
-#define PCI_CB_SUBSYSTEM_VENDOR_ID 0x40
-#define PCI_CB_SUBSYSTEM_ID	0x42
-#define PCI_CB_LEGACY_MODE_BASE	0x44	/* 16-bit PC Card legacy mode base address (ExCa) */
-/* 0x48-0x7f reserved */
-
-/* Capability lists */
-
-#define PCI_CAP_LIST_ID		0	/* Capability ID */
-#define  PCI_CAP_ID_PM		0x01	/* Power Management */
-#define  PCI_CAP_ID_AGP		0x02	/* Accelerated Graphics Port */
-#define  PCI_CAP_ID_VPD		0x03	/* Vital Product Data */
-#define  PCI_CAP_ID_SLOTID	0x04	/* Slot Identification */
-#define  PCI_CAP_ID_MSI		0x05	/* Message Signalled Interrupts */
-#define  PCI_CAP_ID_CHSWP	0x06	/* CompactPCI HotSwap */
-#define  PCI_CAP_ID_PCIX        0x07	/* PCI-X */
-#define  PCI_CAP_ID_HT          0x08	/* HyperTransport */
-#define  PCI_CAP_ID_VNDR	0x09	/* Vendor specific */
-#define  PCI_CAP_ID_DBG		0x0A	/* Debug port */
-#define  PCI_CAP_ID_CCRC	0x0B	/* CompactPCI Central Resource Control */
-#define  PCI_CAP_ID_AGP3	0x0E	/* AGP 8x */
-#define  PCI_CAP_ID_EXP		0x10	/* PCI Express */
-#define  PCI_CAP_ID_MSIX	0x11	/* MSI-X */
-#define PCI_CAP_LIST_NEXT	1	/* Next capability in the list */
-#define PCI_CAP_FLAGS		2	/* Capability defined flags (16 bits) */
-#define PCI_CAP_SIZEOF		4
-
-/* Capabilities residing in the PCI Express extended configuration space */
-
-#define PCI_EXT_CAP_ID_AER	0x01	/* Advanced Error Reporting */
-#define PCI_EXT_CAP_ID_VC	0x02	/* Virtual Channel */
-#define PCI_EXT_CAP_ID_DSN	0x03	/* Device Serial Number */
-#define PCI_EXT_CAP_ID_PB	0x04	/* Power Budgeting */
-
-/* Power Management Registers */
-
-#define  PCI_PM_CAP_VER_MASK	0x0007	/* Version (2=PM1.1) */
-#define  PCI_PM_CAP_PME_CLOCK	0x0008	/* Clock required for PME generation */
-#define  PCI_PM_CAP_DSI		0x0020	/* Device specific initialization required */
-#define  PCI_PM_CAP_AUX_C_MASK	0x01c0	/* Maximum aux current required in D3cold */
-#define  PCI_PM_CAP_D1		0x0200	/* D1 power state support */
-#define  PCI_PM_CAP_D2		0x0400	/* D2 power state support */
-#define  PCI_PM_CAP_PME_D0	0x0800	/* PME can be asserted from D0 */
-#define  PCI_PM_CAP_PME_D1	0x1000	/* PME can be asserted from D1 */
-#define  PCI_PM_CAP_PME_D2	0x2000	/* PME can be asserted from D2 */
-#define  PCI_PM_CAP_PME_D3_HOT	0x4000	/* PME can be asserted from D3hot */
-#define  PCI_PM_CAP_PME_D3_COLD	0x8000	/* PME can be asserted from D3cold */
-#define PCI_PM_CTRL		4	/* PM control and status register */
-#define  PCI_PM_CTRL_STATE_MASK	0x0003	/* Current power state (D0 to D3) */
-#define  PCI_PM_CTRL_PME_ENABLE	0x0100	/* PME pin enable */
-#define  PCI_PM_CTRL_DATA_SEL_MASK	0x1e00	/* PM table data index */
-#define  PCI_PM_CTRL_DATA_SCALE_MASK	0x6000	/* PM table data scaling factor */
-#define  PCI_PM_CTRL_PME_STATUS	0x8000	/* PME pin status */
-#define PCI_PM_PPB_EXTENSIONS	6	/* PPB support extensions */
-#define  PCI_PM_PPB_B2_B3	0x40	/* If bridge enters D3hot, bus enters: 0=B3, 1=B2 */
-#define  PCI_PM_BPCC_ENABLE	0x80	/* Secondary bus is power managed */
-#define PCI_PM_DATA_REGISTER	7	/* PM table contents read here */
-#define PCI_PM_SIZEOF		8
-
-/* AGP registers */
-
-#define PCI_AGP_VERSION		2	/* BCD version number */
-#define PCI_AGP_RFU		3	/* Rest of capability flags */
-#define PCI_AGP_STATUS		4	/* Status register */
-#define  PCI_AGP_STATUS_RQ_MASK	0xff000000	/* Maximum number of requests - 1 */
-#define  PCI_AGP_STATUS_ISOCH	0x10000	/* Isochronous transactions supported */
-#define  PCI_AGP_STATUS_ARQSZ_MASK	0xe000	/* log2(optimum async req size in bytes) - 4 */
-#define  PCI_AGP_STATUS_CAL_MASK	0x1c00	/* Calibration cycle timing */
-#define  PCI_AGP_STATUS_SBA	0x0200	/* Sideband addressing supported */
-#define  PCI_AGP_STATUS_ITA_COH	0x0100	/* In-aperture accesses always coherent */
-#define  PCI_AGP_STATUS_GART64	0x0080	/* 64-bit GART entries supported */
-#define  PCI_AGP_STATUS_HTRANS	0x0040	/* If 0, core logic can xlate host CPU accesses thru aperture */
-#define  PCI_AGP_STATUS_64BIT	0x0020	/* 64-bit addressing cycles supported */
-#define  PCI_AGP_STATUS_FW	0x0010	/* Fast write transfers supported */
-#define  PCI_AGP_STATUS_AGP3	0x0008	/* AGP3 mode supported */
-#define  PCI_AGP_STATUS_RATE4	0x0004	/* 4x transfer rate supported (RFU in AGP3 mode) */
-#define  PCI_AGP_STATUS_RATE2	0x0002	/* 2x transfer rate supported (8x in AGP3 mode) */
-#define  PCI_AGP_STATUS_RATE1	0x0001	/* 1x transfer rate supported (4x in AGP3 mode) */
-#define PCI_AGP_COMMAND		8	/* Control register */
-#define  PCI_AGP_COMMAND_RQ_MASK 0xff000000	/* Master: Maximum number of requests */
-#define  PCI_AGP_COMMAND_ARQSZ_MASK	0xe000	/* log2(optimum async req size in bytes) - 4 */
-#define  PCI_AGP_COMMAND_CAL_MASK	0x1c00	/* Calibration cycle timing */
-#define  PCI_AGP_COMMAND_SBA	0x0200	/* Sideband addressing enabled */
-#define  PCI_AGP_COMMAND_AGP	0x0100	/* Allow processing of AGP transactions */
-#define  PCI_AGP_COMMAND_GART64	0x0080	/* 64-bit GART entries enabled */
-#define  PCI_AGP_COMMAND_64BIT	0x0020	/* Allow generation of 64-bit addr cycles */
-#define  PCI_AGP_COMMAND_FW	0x0010	/* Enable FW transfers */
-#define  PCI_AGP_COMMAND_RATE4	0x0004	/* Use 4x rate (RFU in AGP3 mode) */
-#define  PCI_AGP_COMMAND_RATE2	0x0002	/* Use 2x rate (8x in AGP3 mode) */
-#define  PCI_AGP_COMMAND_RATE1	0x0001	/* Use 1x rate (4x in AGP3 mode) */
-#define PCI_AGP_SIZEOF		12
-
-/* Slot Identification */
-
-#define PCI_SID_ESR		2	/* Expansion Slot Register */
-#define  PCI_SID_ESR_NSLOTS	0x1f	/* Number of expansion slots available */
-#define  PCI_SID_ESR_FIC	0x20	/* First In Chassis Flag */
-#define PCI_SID_CHASSIS_NR	3	/* Chassis Number */
-
-/* Message Signalled Interrupts registers */
-
-#define PCI_MSI_FLAGS		2	/* Various flags */
-#define  PCI_MSI_FLAGS_64BIT	0x80	/* 64-bit addresses allowed */
-#define  PCI_MSI_FLAGS_QSIZE	0x70	/* Message queue size configured */
-#define  PCI_MSI_FLAGS_QMASK	0x0e	/* Maximum queue size available */
-#define  PCI_MSI_FLAGS_ENABLE	0x01	/* MSI feature enabled */
-#define PCI_MSI_RFU		3	/* Rest of capability flags */
-#define PCI_MSI_ADDRESS_LO	4	/* Lower 32 bits */
-#define PCI_MSI_ADDRESS_HI	8	/* Upper 32 bits (if PCI_MSI_FLAGS_64BIT set) */
-#define PCI_MSI_DATA_32		8	/* 16 bits of data for 32-bit devices */
-#define PCI_MSI_DATA_64		12	/* 16 bits of data for 64-bit devices */
-
-/* PCI-X */
-#define PCI_PCIX_COMMAND                                                2	/* Command register offset */
-#define PCI_PCIX_COMMAND_DPERE                                     0x0001	/* Data Parity Error Recover Enable */
-#define PCI_PCIX_COMMAND_ERO                                       0x0002	/* Enable Relaxed Ordering */
-#define PCI_PCIX_COMMAND_MAX_MEM_READ_BYTE_COUNT                   0x000c	/* Maximum Memory Read Byte Count */
-#define PCI_PCIX_COMMAND_MAX_OUTSTANDING_SPLIT_TRANS               0x0070
-#define PCI_PCIX_COMMAND_RESERVED                                   0xf80
-#define PCI_PCIX_STATUS                                                 4	/* Status register offset */
-#define PCI_PCIX_STATUS_FUNCTION                               0x00000007
-#define PCI_PCIX_STATUS_DEVICE                                 0x000000f8
-#define PCI_PCIX_STATUS_BUS                                    0x0000ff00
-#define PCI_PCIX_STATUS_64BIT                                  0x00010000
-#define PCI_PCIX_STATUS_133MHZ                                 0x00020000
-#define PCI_PCIX_STATUS_SC_DISCARDED                           0x00040000	/* Split Completion Discarded */
-#define PCI_PCIX_STATUS_UNEXPECTED_SC                          0x00080000	/* Unexpected Split Completion */
-#define PCI_PCIX_STATUS_DEVICE_COMPLEXITY                      0x00100000	/* 0 = simple device, 1 = bridge device */
-#define PCI_PCIX_STATUS_DESIGNED_MAX_MEM_READ_BYTE_COUNT       0x00600000	/* 0 = 512 bytes, 1 = 1024, 2 = 2048, 3 = 4096 */
-#define PCI_PCIX_STATUS_DESIGNED_MAX_OUTSTANDING_SPLIT_TRANS   0x03800000
-#define PCI_PCIX_STATUS_DESIGNED_MAX_CUMULATIVE_READ_SIZE      0x1c000000
-#define PCI_PCIX_STATUS_RCVD_SC_ERR_MESS                       0x20000000	/* Received Split Completion Error Message */
-#define PCI_PCIX_STATUS_266MHZ				       0x40000000	/* 266 MHz capable */
-#define PCI_PCIX_STATUS_533MHZ				       0x80000000	/* 533 MHz capable */
-#define PCI_PCIX_SIZEOF		4
-
-/* PCI-X Bridges */
-#define PCI_PCIX_BRIDGE_SEC_STATUS                                      2	/* Secondary bus status register offset */
-#define PCI_PCIX_BRIDGE_SEC_STATUS_64BIT                           0x0001
-#define PCI_PCIX_BRIDGE_SEC_STATUS_133MHZ                          0x0002
-#define PCI_PCIX_BRIDGE_SEC_STATUS_SC_DISCARDED                    0x0004	/* Split Completion Discarded on secondary bus */
-#define PCI_PCIX_BRIDGE_SEC_STATUS_UNEXPECTED_SC                   0x0008	/* Unexpected Split Completion on secondary bus */
-#define PCI_PCIX_BRIDGE_SEC_STATUS_SC_OVERRUN                      0x0010	/* Split Completion Overrun on secondary bus */
-#define PCI_PCIX_BRIDGE_SEC_STATUS_SPLIT_REQUEST_DELAYED           0x0020
-#define PCI_PCIX_BRIDGE_SEC_STATUS_CLOCK_FREQ                      0x01c0
-#define PCI_PCIX_BRIDGE_SEC_STATUS_RESERVED                        0xfe00
-#define PCI_PCIX_BRIDGE_STATUS                                          4	/* Primary bus status register offset */
-#define PCI_PCIX_BRIDGE_STATUS_FUNCTION                        0x00000007
-#define PCI_PCIX_BRIDGE_STATUS_DEVICE                          0x000000f8
-#define PCI_PCIX_BRIDGE_STATUS_BUS                             0x0000ff00
-#define PCI_PCIX_BRIDGE_STATUS_64BIT                           0x00010000
-#define PCI_PCIX_BRIDGE_STATUS_133MHZ                          0x00020000
-#define PCI_PCIX_BRIDGE_STATUS_SC_DISCARDED                    0x00040000	/* Split Completion Discarded */
-#define PCI_PCIX_BRIDGE_STATUS_UNEXPECTED_SC                   0x00080000	/* Unexpected Split Completion */
-#define PCI_PCIX_BRIDGE_STATUS_SC_OVERRUN                      0x00100000	/* Split Completion Overrun */
-#define PCI_PCIX_BRIDGE_STATUS_SPLIT_REQUEST_DELAYED           0x00200000
-#define PCI_PCIX_BRIDGE_STATUS_RESERVED                        0xffc00000
-#define PCI_PCIX_BRIDGE_UPSTREAM_SPLIT_TRANS_CTRL                       8	/* Upstream Split Transaction Register offset */
-#define PCI_PCIX_BRIDGE_DOWNSTREAM_SPLIT_TRANS_CTRL                    12	/* Downstream Split Transaction Register offset */
-#define PCI_PCIX_BRIDGE_STR_CAPACITY                           0x0000ffff
-#define PCI_PCIX_BRIDGE_STR_COMMITMENT_LIMIT                   0xffff0000
-#define PCI_PCIX_BRIDGE_SIZEOF 12
-
-/* HyperTransport (as of spec rev. 2.00) */
-#define PCI_HT_CMD		2	/* Command Register */
-#define  PCI_HT_CMD_TYP_HI	0xe000	/* Capability Type high part */
-#define  PCI_HT_CMD_TYP_HI_PRI	0x0000	/* Slave or Primary Interface */
-#define  PCI_HT_CMD_TYP_HI_SEC	0x2000	/* Host or Secondary Interface */
-#define  PCI_HT_CMD_TYP		0xf800	/* Capability Type */
-#define  PCI_HT_CMD_TYP_SW	0x4000	/* Switch */
-#define  PCI_HT_CMD_TYP_IDC	0x8000	/* Interrupt Discovery and Configuration */
-#define  PCI_HT_CMD_TYP_RID	0x8800	/* Revision ID */
-#define  PCI_HT_CMD_TYP_UIDC	0x9000	/* UnitID Clumping */
-#define  PCI_HT_CMD_TYP_ECSA	0x9800	/* Extended Configuration Space Access */
-#define  PCI_HT_CMD_TYP_AM	0xa000	/* Address Mapping */
-#define  PCI_HT_CMD_TYP_MSIM	0xa800	/* MSI Mapping */
-#define  PCI_HT_CMD_TYP_DR	0xb000	/* DirectRoute */
-#define  PCI_HT_CMD_TYP_VCS	0xb800	/* VCSet */
-#define  PCI_HT_CMD_TYP_RM	0xc000	/* Retry Mode */
-#define  PCI_HT_CMD_TYP_X86	0xc800	/* X86 (reserved) */
-
-					/* Link Control Register */
-#define  PCI_HT_LCTR_CFLE	0x0002	/* CRC Flood Enable */
-#define  PCI_HT_LCTR_CST	0x0004	/* CRC Start Test */
-#define  PCI_HT_LCTR_CFE	0x0008	/* CRC Force Error */
-#define  PCI_HT_LCTR_LKFAIL	0x0010	/* Link Failure */
-#define  PCI_HT_LCTR_INIT	0x0020	/* Initialization Complete */
-#define  PCI_HT_LCTR_EOC	0x0040	/* End of Chain */
-#define  PCI_HT_LCTR_TXO	0x0080	/* Transmitter Off */
-#define  PCI_HT_LCTR_CRCERR	0x0f00	/* CRC Error */
-#define  PCI_HT_LCTR_ISOCEN	0x1000	/* Isochronous Flow Control Enable */
-#define  PCI_HT_LCTR_LSEN	0x2000	/* LDTSTOP# Tristate Enable */
-#define  PCI_HT_LCTR_EXTCTL	0x4000	/* Extended CTL Time */
-#define  PCI_HT_LCTR_64B	0x8000	/* 64-bit Addressing Enable */
-
-					/* Link Configuration Register */
-#define  PCI_HT_LCNF_MLWI	0x0007	/* Max Link Width In */
-#define  PCI_HT_LCNF_LW_8B	0x0	/* Link Width 8 bits */
-#define  PCI_HT_LCNF_LW_16B	0x1	/* Link Width 16 bits */
-#define  PCI_HT_LCNF_LW_32B	0x3	/* Link Width 32 bits */
-#define  PCI_HT_LCNF_LW_2B	0x4	/* Link Width 2 bits */
-#define  PCI_HT_LCNF_LW_4B	0x5	/* Link Width 4 bits */
-#define  PCI_HT_LCNF_LW_NC	0x7	/* Link physically not connected */
-#define  PCI_HT_LCNF_DFI	0x0008	/* Doubleword Flow Control In */
-#define  PCI_HT_LCNF_MLWO	0x0070	/* Max Link Width Out */
-#define  PCI_HT_LCNF_DFO	0x0080	/* Doubleword Flow Control Out */
-#define  PCI_HT_LCNF_LWI	0x0700	/* Link Width In */
-#define  PCI_HT_LCNF_DFIE	0x0800	/* Doubleword Flow Control In Enable */
-#define  PCI_HT_LCNF_LWO	0x7000	/* Link Width Out */
-#define  PCI_HT_LCNF_DFOE	0x8000	/* Doubleword Flow Control Out Enable */
-
-					/* Revision ID Register */
-#define  PCI_HT_RID_MIN		0x1f	/* Minor Revision */
-#define  PCI_HT_RID_MAJ		0xe0	/* Major Revision */
-
-					/* Link Frequency/Error Register */
-#define  PCI_HT_LFRER_FREQ	0x0f	/* Transmitter Clock Frequency */
-#define  PCI_HT_LFRER_200	0x00	/* 200MHz */
-#define  PCI_HT_LFRER_300	0x01	/* 300MHz */
-#define  PCI_HT_LFRER_400	0x02	/* 400MHz */
-#define  PCI_HT_LFRER_500	0x03	/* 500MHz */
-#define  PCI_HT_LFRER_600	0x04	/* 600MHz */
-#define  PCI_HT_LFRER_800	0x05	/* 800MHz */
-#define  PCI_HT_LFRER_1000	0x06	/* 1.0GHz */
-#define  PCI_HT_LFRER_1200	0x07	/* 1.2GHz */
-#define  PCI_HT_LFRER_1400	0x08	/* 1.4GHz */
-#define  PCI_HT_LFRER_1600	0x09	/* 1.6GHz */
-#define  PCI_HT_LFRER_VEND	0x0f	/* Vendor-Specific */
-#define  PCI_HT_LFRER_ERR	0xf0	/* Link Error */
-#define  PCI_HT_LFRER_PROT	0x10	/* Protocol Error */
-#define  PCI_HT_LFRER_OV	0x20	/* Overflow Error */
-#define  PCI_HT_LFRER_EOC	0x40	/* End of Chain Error */
-#define  PCI_HT_LFRER_CTLT	0x80	/* CTL Timeout */
-
-					/* Link Frequency Capability Register */
-#define  PCI_HT_LFCAP_200	0x0001	/* 200MHz */
-#define  PCI_HT_LFCAP_300	0x0002	/* 300MHz */
-#define  PCI_HT_LFCAP_400	0x0004	/* 400MHz */
-#define  PCI_HT_LFCAP_500	0x0008	/* 500MHz */
-#define  PCI_HT_LFCAP_600	0x0010	/* 600MHz */
-#define  PCI_HT_LFCAP_800	0x0020	/* 800MHz */
-#define  PCI_HT_LFCAP_1000	0x0040	/* 1.0GHz */
-#define  PCI_HT_LFCAP_1200	0x0080	/* 1.2GHz */
-#define  PCI_HT_LFCAP_1400	0x0100	/* 1.4GHz */
-#define  PCI_HT_LFCAP_1600	0x0200	/* 1.6GHz */
-#define  PCI_HT_LFCAP_VEND	0x8000	/* Vendor-Specific */
-
-					/* Feature Register */
-#define  PCI_HT_FTR_ISOCFC	0x0001	/* Isochronous Flow Control Mode */
-#define  PCI_HT_FTR_LDTSTOP	0x0002	/* LDTSTOP# Supported */
-#define  PCI_HT_FTR_CRCTM	0x0004	/* CRC Test Mode */
-#define  PCI_HT_FTR_ECTLT	0x0008	/* Extended CTL Time Required */
-#define  PCI_HT_FTR_64BA	0x0010	/* 64-bit Addressing */
-#define  PCI_HT_FTR_UIDRD	0x0020	/* UnitID Reorder Disable */
-
-					/* Error Handling Register */
-#define  PCI_HT_EH_PFLE		0x0001	/* Protocol Error Flood Enable */
-#define  PCI_HT_EH_OFLE		0x0002	/* Overflow Error Flood Enable */
-#define  PCI_HT_EH_PFE		0x0004	/* Protocol Error Fatal Enable */
-#define  PCI_HT_EH_OFE		0x0008	/* Overflow Error Fatal Enable */
-#define  PCI_HT_EH_EOCFE	0x0010	/* End of Chain Error Fatal Enable */
-#define  PCI_HT_EH_RFE		0x0020	/* Response Error Fatal Enable */
-#define  PCI_HT_EH_CRCFE	0x0040	/* CRC Error Fatal Enable */
-#define  PCI_HT_EH_SERRFE	0x0080	/* System Error Fatal Enable (B */
-#define  PCI_HT_EH_CF		0x0100	/* Chain Fail */
-#define  PCI_HT_EH_RE		0x0200	/* Response Error */
-#define  PCI_HT_EH_PNFE		0x0400	/* Protocol Error Nonfatal Enable */
-#define  PCI_HT_EH_ONFE		0x0800	/* Overflow Error Nonfatal Enable */
-#define  PCI_HT_EH_EOCNFE	0x1000	/* End of Chain Error Nonfatal Enable */
-#define  PCI_HT_EH_RNFE		0x2000	/* Response Error Nonfatal Enable */
-#define  PCI_HT_EH_CRCNFE	0x4000	/* CRC Error Nonfatal Enable */
-#define  PCI_HT_EH_SERRNFE	0x8000	/* System Error Nonfatal Enable */
-
-/* HyperTransport: Slave or Primary Interface */
-#define PCI_HT_PRI_CMD		2	/* Command Register */
-#define  PCI_HT_PRI_CMD_BUID	0x001f	/* Base UnitID */
-#define  PCI_HT_PRI_CMD_UC	0x03e0	/* Unit Count */
-#define  PCI_HT_PRI_CMD_MH	0x0400	/* Master Host */
-#define  PCI_HT_PRI_CMD_DD	0x0800	/* Default Direction */
-#define  PCI_HT_PRI_CMD_DUL	0x1000	/* Drop on Uninitialized Link */
-
-#define PCI_HT_PRI_LCTR0	4	/* Link Control 0 Register */
-#define PCI_HT_PRI_LCNF0	6	/* Link Config 0 Register */
-#define PCI_HT_PRI_LCTR1	8	/* Link Control 1 Register */
-#define PCI_HT_PRI_LCNF1	10	/* Link Config 1 Register */
-#define PCI_HT_PRI_RID		12	/* Revision ID Register */
-#define PCI_HT_PRI_LFRER0	13	/* Link Frequency/Error 0 Register */
-#define PCI_HT_PRI_LFCAP0	14	/* Link Frequency Capability 0 Register */
-#define PCI_HT_PRI_FTR		16	/* Feature Register */
-#define PCI_HT_PRI_LFRER1	17	/* Link Frequency/Error 1 Register */
-#define PCI_HT_PRI_LFCAP1	18	/* Link Frequency Capability 1 Register */
-#define PCI_HT_PRI_ES		20	/* Enumeration Scratchpad Register */
-#define PCI_HT_PRI_EH		22	/* Error Handling Register */
-#define PCI_HT_PRI_MBU		24	/* Memory Base Upper Register */
-#define PCI_HT_PRI_MLU		25	/* Memory Limit Upper Register */
-#define PCI_HT_PRI_BN		26	/* Bus Number Register */
-#define PCI_HT_PRI_SIZEOF	28
-
-/* HyperTransport: Host or Secondary Interface */
-#define PCI_HT_SEC_CMD		2	/* Command Register */
-#define  PCI_HT_SEC_CMD_WR	0x0001	/* Warm Reset */
-#define  PCI_HT_SEC_CMD_DE	0x0002	/* Double-Ended */
-#define  PCI_HT_SEC_CMD_DN	0x0076	/* Device Number */
-#define  PCI_HT_SEC_CMD_CS	0x0080	/* Chain Side */
-#define  PCI_HT_SEC_CMD_HH	0x0100	/* Host Hide */
-#define  PCI_HT_SEC_CMD_AS	0x0400	/* Act as Slave */
-#define  PCI_HT_SEC_CMD_HIECE	0x0800	/* Host Inbound End of Chain Error */
-#define  PCI_HT_SEC_CMD_DUL	0x1000	/* Drop on Uninitialized Link */
-
-#define PCI_HT_SEC_LCTR		4	/* Link Control Register */
-#define PCI_HT_SEC_LCNF		6	/* Link Config Register */
-#define PCI_HT_SEC_RID		8	/* Revision ID Register */
-#define PCI_HT_SEC_LFRER	9	/* Link Frequency/Error Register */
-#define PCI_HT_SEC_LFCAP	10	/* Link Frequency Capability Register */
-#define PCI_HT_SEC_FTR		12	/* Feature Register */
-#define  PCI_HT_SEC_FTR_EXTRS	0x0100	/* Extended Register Set */
-#define  PCI_HT_SEC_FTR_UCNFE	0x0200	/* Upstream Configuration Enable */
-#define PCI_HT_SEC_ES		16	/* Enumeration Scratchpad Register */
-#define PCI_HT_SEC_EH		18	/* Error Handling Register */
-#define PCI_HT_SEC_MBU		20	/* Memory Base Upper Register */
-#define PCI_HT_SEC_MLU		21	/* Memory Limit Upper Register */
-#define PCI_HT_SEC_SIZEOF	24
-
-/* HyperTransport: Switch */
-#define PCI_HT_SW_CMD		2	/* Switch Command Register */
-#define  PCI_HT_SW_CMD_VIBERR	0x0080	/* VIB Error */
-#define  PCI_HT_SW_CMD_VIBFL	0x0100	/* VIB Flood */
-#define  PCI_HT_SW_CMD_VIBFT	0x0200	/* VIB Fatal */
-#define  PCI_HT_SW_CMD_VIBNFT	0x0400	/* VIB Nonfatal */
-#define PCI_HT_SW_PMASK		4	/* Partition Mask Register */
-#define PCI_HT_SW_SWINF		8	/* Switch Info Register */
-#define  PCI_HT_SW_SWINF_DP	0x0000001f	/* Default Port */
-#define  PCI_HT_SW_SWINF_EN	0x00000020	/* Enable Decode */
-#define  PCI_HT_SW_SWINF_CR	0x00000040	/* Cold Reset */
-#define  PCI_HT_SW_SWINF_PCIDX	0x00000f00	/* Performance Counter Index */
-#define  PCI_HT_SW_SWINF_BLRIDX	0x0003f000	/* Base/Limit Range Index */
-#define  PCI_HT_SW_SWINF_SBIDX	0x00002000	/* Secondary Base Range Index */
-#define  PCI_HT_SW_SWINF_HP	0x00040000	/* Hot Plug */
-#define  PCI_HT_SW_SWINF_HIDE	0x00080000	/* Hide Port */
-#define PCI_HT_SW_PCD		12	/* Performance Counter Data Register */
-#define PCI_HT_SW_BLRD		16	/* Base/Limit Range Data Register */
-#define PCI_HT_SW_SBD		20	/* Secondary Base Data Register */
-#define PCI_HT_SW_SIZEOF	24
-
-					/* Counter indices */
-#define  PCI_HT_SW_PC_PCR	0x0	/* Posted Command Receive */
-#define  PCI_HT_SW_PC_NPCR	0x1	/* Nonposted Command Receive */
-#define  PCI_HT_SW_PC_RCR	0x2	/* Response Command Receive */
-#define  PCI_HT_SW_PC_PDWR	0x3	/* Posted DW Receive */
-#define  PCI_HT_SW_PC_NPDWR	0x4	/* Nonposted DW Receive */
-#define  PCI_HT_SW_PC_RDWR	0x5	/* Response DW Receive */
-#define  PCI_HT_SW_PC_PCT	0x6	/* Posted Command Transmit */
-#define  PCI_HT_SW_PC_NPCT	0x7	/* Nonposted Command Transmit */
-#define  PCI_HT_SW_PC_RCT	0x8	/* Response Command Transmit */
-#define  PCI_HT_SW_PC_PDWT	0x9	/* Posted DW Transmit */
-#define  PCI_HT_SW_PC_NPDWT	0xa	/* Nonposted DW Transmit */
-#define  PCI_HT_SW_PC_RDWT	0xb	/* Response DW Transmit */
-
-					/* Base/Limit Range indices */
-#define  PCI_HT_SW_BLR_BASE0_LO	0x0	/* Base 0[31:1], Enable */
-#define  PCI_HT_SW_BLR_BASE0_HI	0x1	/* Base 0 Upper */
-#define  PCI_HT_SW_BLR_LIM0_LO	0x2	/* Limit 0 Lower */
-#define  PCI_HT_SW_BLR_LIM0_HI	0x3	/* Limit 0 Upper */
-
-					/* Secondary Base indices */
-#define  PCI_HT_SW_SB_LO	0x0	/* Secondary Base[31:1], Enable */
-#define  PCI_HT_SW_S0_HI	0x1	/* Secondary Base Upper */
-
-/* HyperTransport: Interrupt Discovery and Configuration */
-#define PCI_HT_IDC_IDX		2	/* Index Register */
-#define PCI_HT_IDC_DATA		4	/* Data Register */
-#define PCI_HT_IDC_SIZEOF	8
-
-					/* Register indices */
-#define  PCI_HT_IDC_IDX_LINT	0x01	/* Last Interrupt Register */
-#define   PCI_HT_IDC_LINT	0x00ff0000	/* Last interrupt definition */
-#define  PCI_HT_IDC_IDX_IDR	0x10	/* Interrupt Definition Registers */
-					/* Low part (at index) */
-#define   PCI_HT_IDC_IDR_MASK	0x10000001	/* Mask */
-#define   PCI_HT_IDC_IDR_POL	0x10000002	/* Polarity */
-#define   PCI_HT_IDC_IDR_II_2	0x1000001c	/* IntrInfo[4:2]: Message Type */
-#define   PCI_HT_IDC_IDR_II_5	0x10000020	/* IntrInfo[5]: Request EOI */
-#define   PCI_HT_IDC_IDR_II_6	0x00ffffc0	/* IntrInfo[23:6] */
-#define   PCI_HT_IDC_IDR_II_24	0xff000000	/* IntrInfo[31:24] */
-					/* High part (at index + 1) */
-#define   PCI_HT_IDC_IDR_II_32	0x00ffffff	/* IntrInfo[55:32] */
-#define   PCI_HT_IDC_IDR_PASSPW	0x40000000	/* PassPW setting for messages */
-#define   PCI_HT_IDC_IDR_WEOI	0x80000000	/* Waiting for EOI */
-
-/* HyperTransport: Revision ID */
-#define PCI_HT_RID_RID		2	/* Revision Register */
-#define PCI_HT_RID_SIZEOF	4
-
-/* HyperTransport: UnitID Clumping */
-#define PCI_HT_UIDC_CS		4	/* Clumping Support Register */
-#define PCI_HT_UIDC_CE		8	/* Clumping Enable Register */
-#define PCI_HT_UIDC_SIZEOF	12
-
-/* HyperTransport: Extended Configuration Space Access */
-#define PCI_HT_ECSA_ADDR	4	/* Configuration Address Register */
-#define  PCI_HT_ECSA_ADDR_REG	0x00000ffc	/* Register */
-#define  PCI_HT_ECSA_ADDR_FUN	0x00007000	/* Function */
-#define  PCI_HT_ECSA_ADDR_DEV	0x000f1000	/* Device */
-#define  PCI_HT_ECSA_ADDR_BUS	0x0ff00000	/* Bus Number */
-#define  PCI_HT_ECSA_ADDR_TYPE	0x10000000	/* Access Type */
-#define PCI_HT_ECSA_DATA	8	/* Configuration Data Register */
-#define PCI_HT_ECSA_SIZEOF	12
-
-/* HyperTransport: Address Mapping */
-#define PCI_HT_AM_CMD		2	/* Command Register */
-#define  PCI_HT_AM_CMD_NDMA	0x000f	/* Number of DMA Mappings */
-#define  PCI_HT_AM_CMD_IOSIZ	0x01f0	/* I/O Size */
-#define  PCI_HT_AM_CMD_MT	0x0600	/* Map Type */
-#define  PCI_HT_AM_CMD_MT_40B	0x0000	/* 40-bit */
-#define  PCI_HT_AM_CMD_MT_64B	0x0200	/* 64-bit */
-
-					/* Window Control Register bits */
-#define  PCI_HT_AM_SBW_CTR_COMP	0x1	/* Compat */
-#define  PCI_HT_AM_SBW_CTR_NCOH	0x2	/* NonCoherent */
-#define  PCI_HT_AM_SBW_CTR_ISOC	0x4	/* Isochronous */
-#define  PCI_HT_AM_SBW_CTR_EN	0x8	/* Enable */
-
-/* HyperTransport: 40-bit Address Mapping */
-#define PCI_HT_AM40_SBNPW	4	/* Secondary Bus Non-Prefetchable Window Register */
-#define  PCI_HT_AM40_SBW_BASE	0x000fffff	/* Window Base */
-#define  PCI_HT_AM40_SBW_CTR	0xf0000000	/* Window Control */
-#define PCI_HT_AM40_SBPW	8	/* Secondary Bus Prefetchable Window Register */
-#define PCI_HT_AM40_DMA_PBASE0	12	/* DMA Window Primary Base 0 Register */
-#define PCI_HT_AM40_DMA_CTR0	15	/* DMA Window Control 0 Register */
-#define  PCI_HT_AM40_DMA_CTR_CTR 0xf0	/* Window Control */
-#define PCI_HT_AM40_DMA_SLIM0	16	/* DMA Window Secondary Limit 0 Register */
-#define PCI_HT_AM40_DMA_SBASE0	18	/* DMA Window Secondary Base 0 Register */
-#define PCI_HT_AM40_SIZEOF	12	/* size is variable: 12 + 8 * NDMA */
-
-/* HyperTransport: 64-bit Address Mapping */
-#define PCI_HT_AM64_IDX		4	/* Index Register */
-#define PCI_HT_AM64_DATA_LO	8	/* Data Lower Register */
-#define PCI_HT_AM64_DATA_HI	12	/* Data Upper Register */
-#define PCI_HT_AM64_SIZEOF	16
-
-					/* Register indices */
-#define  PCI_HT_AM64_IDX_SBNPW	0x00	/* Secondary Bus Non-Prefetchable Window Register */
-#define   PCI_HT_AM64_W_BASE_LO	0xfff00000	/* Window Base Lower */
-#define   PCI_HT_AM64_W_CTR	0x0000000f	/* Window Control */
-#define  PCI_HT_AM64_IDX_SBPW	0x01	/* Secondary Bus Prefetchable Window Register */
-#define   PCI_HT_AM64_IDX_PBNPW	0x02	/* Primary Bus Non-Prefetchable Window Register */
-#define   PCI_HT_AM64_IDX_DMAPB0 0x04	/* DMA Window Primary Base 0 Register */
-#define   PCI_HT_AM64_IDX_DMASB0 0x05	/* DMA Window Secondary Base 0 Register */
-#define   PCI_HT_AM64_IDX_DMASL0 0x06	/* DMA Window Secondary Limit 0 Register */
-
-/* HyperTransport: MSI Mapping */
-#define PCI_HT_MSIM_CMD		2	/* Command Register */
-#define  PCI_HT_MSIM_CMD_EN	0x0001	/* Mapping Active */
-#define  PCI_HT_MSIM_CMD_FIXD	0x0002	/* MSI Mapping Address Fixed */
-#define PCI_HT_MSIM_ADDR_LO	4	/* MSI Mapping Address Lower Register */
-#define PCI_HT_MSIM_ADDR_HI	8	/* MSI Mapping Address Upper Register */
-#define PCI_HT_MSIM_SIZEOF	12
-
-/* HyperTransport: DirectRoute */
-#define PCI_HT_DR_CMD		2	/* Command Register */
-#define  PCI_HT_DR_CMD_NDRS	0x000f	/* Number of DirectRoute Spaces */
-#define  PCI_HT_DR_CMD_IDX	0x01f0	/* Index */
-#define PCI_HT_DR_EN		4	/* Enable Vector Register */
-#define PCI_HT_DR_DATA		8	/* Data Register */
-#define PCI_HT_DR_SIZEOF	12
-
-					/* Register indices */
-#define  PCI_HT_DR_IDX_BASE_LO	0x00	/* DirectRoute Base Lower Register */
-#define   PCI_HT_DR_OTNRD	0x00000001	/* Opposite to Normal Request Direction */
-#define   PCI_HT_DR_BL_LO	0xffffff00	/* Base/Limit Lower */
-#define  PCI_HT_DR_IDX_BASE_HI	0x01	/* DirectRoute Base Upper Register */
-#define  PCI_HT_DR_IDX_LIMIT_LO	0x02	/* DirectRoute Limit Lower Register */
-#define  PCI_HT_DR_IDX_LIMIT_HI	0x03	/* DirectRoute Limit Upper Register */
-
-/* HyperTransport: VCSet */
-#define PCI_HT_VCS_SUP		4	/* VCSets Supported Register */
-#define PCI_HT_VCS_L1EN		5	/* Link 1 VCSets Enabled Register */
-#define PCI_HT_VCS_L0EN		6	/* Link 0 VCSets Enabled Register */
-#define PCI_HT_VCS_SBD		8	/* Stream Bucket Depth Register */
-#define PCI_HT_VCS_SINT		9	/* Stream Interval Register */
-#define PCI_HT_VCS_SSUP		10	/* Number of Streaming VCs Supported Register */
-#define  PCI_HT_VCS_SSUP_0	0x00	/* Streaming VC 0 */
-#define  PCI_HT_VCS_SSUP_3	0x01	/* Streaming VCs 0-3 */
-#define  PCI_HT_VCS_SSUP_15	0x02	/* Streaming VCs 0-15 */
-#define PCI_HT_VCS_NFCBD	12	/* Non-FC Bucket Depth Register */
-#define PCI_HT_VCS_NFCINT	13	/* Non-FC Bucket Interval Register */
-#define PCI_HT_VCS_SIZEOF	16
-
-/* HyperTransport: Retry Mode */
-#define PCI_HT_RM_CTR0		4	/* Control 0 Register */
-#define  PCI_HT_RM_CTR_LRETEN	0x01	/* Link Retry Enable */
-#define  PCI_HT_RM_CTR_FSER	0x02	/* Force Single Error */
-#define  PCI_HT_RM_CTR_ROLNEN	0x04	/* Rollover Nonfatal Enable */
-#define  PCI_HT_RM_CTR_FSS	0x08	/* Force Single Stomp */
-#define  PCI_HT_RM_CTR_RETNEN	0x10	/* Retry Nonfatal Enable */
-#define  PCI_HT_RM_CTR_RETFEN	0x20	/* Retry Fatal Enable */
-#define  PCI_HT_RM_CTR_AA	0xc0	/* Allowed Attempts */
-#define PCI_HT_RM_STS0		5	/* Status 0 Register */
-#define  PCI_HT_RM_STS_RETSNT	0x01	/* Retry Sent */
-#define  PCI_HT_RM_STS_CNTROL	0x02	/* Count Rollover */
-#define  PCI_HT_RM_STS_SRCV	0x04	/* Stomp Received */
-#define PCI_HT_RM_CTR1		6	/* Control 1 Register */
-#define PCI_HT_RM_STS1		7	/* Status 1 Register */
-#define PCI_HT_RM_CNT0		8	/* Retry Count 0 Register */
-#define PCI_HT_RM_CNT1		10	/* Retry Count 1 Register */
-#define PCI_HT_RM_SIZEOF	12
-
-/* PCI Express */
-#define PCI_EXP_FLAGS		0x2	/* Capabilities register */
-#define PCI_EXP_FLAGS_VERS	0x000f	/* Capability version */
-#define PCI_EXP_FLAGS_TYPE	0x00f0	/* Device/Port type */
-#define  PCI_EXP_TYPE_ENDPOINT	0x0	/* Express Endpoint */
-#define  PCI_EXP_TYPE_LEG_END	0x1	/* Legacy Endpoint */
-#define  PCI_EXP_TYPE_ROOT_PORT 0x4	/* Root Port */
-#define  PCI_EXP_TYPE_UPSTREAM	0x5	/* Upstream Port */
-#define  PCI_EXP_TYPE_DOWNSTREAM 0x6	/* Downstream Port */
-#define  PCI_EXP_TYPE_PCI_BRIDGE 0x7	/* PCI/PCI-X Bridge */
-#define PCI_EXP_FLAGS_SLOT	0x0100	/* Slot implemented */
-#define PCI_EXP_FLAGS_IRQ	0x3e00	/* Interrupt message number */
-#define PCI_EXP_DEVCAP		0x4	/* Device capabilities */
-#define  PCI_EXP_DEVCAP_PAYLOAD	0x07	/* Max_Payload_Size */
-#define  PCI_EXP_DEVCAP_PHANTOM	0x18	/* Phantom functions */
-#define  PCI_EXP_DEVCAP_EXT_TAG	0x20	/* Extended tags */
-#define  PCI_EXP_DEVCAP_L0S	0x1c0	/* L0s Acceptable Latency */
-#define  PCI_EXP_DEVCAP_L1	0xe00	/* L1 Acceptable Latency */
-#define  PCI_EXP_DEVCAP_ATN_BUT	0x1000	/* Attention Button Present */
-#define  PCI_EXP_DEVCAP_ATN_IND	0x2000	/* Attention Indicator Present */
-#define  PCI_EXP_DEVCAP_PWR_IND	0x4000	/* Power Indicator Present */
-#define  PCI_EXP_DEVCAP_PWR_VAL	0x3fc0000	/* Slot Power Limit Value */
-#define  PCI_EXP_DEVCAP_PWR_SCL	0xc000000	/* Slot Power Limit Scale */
-#define PCI_EXP_DEVCTL		0x8	/* Device Control */
-#define  PCI_EXP_DEVCTL_CERE	0x0001	/* Correctable Error Reporting En. */
-#define  PCI_EXP_DEVCTL_NFERE	0x0002	/* Non-Fatal Error Reporting Enable */
-#define  PCI_EXP_DEVCTL_FERE	0x0004	/* Fatal Error Reporting Enable */
-#define  PCI_EXP_DEVCTL_URRE	0x0008	/* Unsupported Request Reporting En. */
-#define  PCI_EXP_DEVCTL_RELAXED	0x0010	/* Enable Relaxed Ordering */
-#define  PCI_EXP_DEVCTL_PAYLOAD	0x00e0	/* Max_Payload_Size */
-#define  PCI_EXP_DEVCTL_EXT_TAG	0x0100	/* Extended Tag Field Enable */
-#define  PCI_EXP_DEVCTL_PHANTOM	0x0200	/* Phantom Functions Enable */
-#define  PCI_EXP_DEVCTL_AUX_PME	0x0400	/* Auxiliary Power PM Enable */
-#define  PCI_EXP_DEVCTL_NOSNOOP	0x0800	/* Enable No Snoop */
-#define  PCI_EXP_DEVCTL_READRQ	0x7000	/* Max_Read_Request_Size */
-#define PCI_EXP_DEVSTA		0xa	/* Device Status */
-#define  PCI_EXP_DEVSTA_CED	0x01	/* Correctable Error Detected */
-#define  PCI_EXP_DEVSTA_NFED	0x02	/* Non-Fatal Error Detected */
-#define  PCI_EXP_DEVSTA_FED	0x04	/* Fatal Error Detected */
-#define  PCI_EXP_DEVSTA_URD	0x08	/* Unsupported Request Detected */
-#define  PCI_EXP_DEVSTA_AUXPD	0x10	/* AUX Power Detected */
-#define  PCI_EXP_DEVSTA_TRPND	0x20	/* Transactions Pending */
-#define PCI_EXP_LNKCAP		0xc	/* Link Capabilities */
-#define  PCI_EXP_LNKCAP_SPEED	0x0000f	/* Maximum Link Speed */
-#define  PCI_EXP_LNKCAP_WIDTH	0x003f0	/* Maximum Link Width */
-#define  PCI_EXP_LNKCAP_ASPM	0x00c00	/* Active State Power Management */
-#define  PCI_EXP_LNKCAP_L0S	0x07000	/* L0s Acceptable Latency */
-#define  PCI_EXP_LNKCAP_L1	0x38000	/* L1 Acceptable Latency */
-#define  PCI_EXP_LNKCAP_PORT	0xff000000	/* Port Number */
-#define PCI_EXP_LNKCTL		0x10	/* Link Control */
-#define  PCI_EXP_LNKCTL_ASPM	0x0003	/* ASPM Control */
-#define  PCI_EXP_LNKCTL_RCB	0x0008	/* Read Completion Boundary */
-#define  PCI_EXP_LNKCTL_DISABLE	0x0010	/* Link Disable */
-#define  PCI_EXP_LNKCTL_RETRAIN	0x0020	/* Retrain Link */
-#define  PCI_EXP_LNKCTL_CLOCK	0x0040	/* Common Clock Configuration */
-#define  PCI_EXP_LNKCTL_XSYNCH	0x0080	/* Extended Synch */
-#define PCI_EXP_LNKSTA		0x12	/* Link Status */
-#define  PCI_EXP_LNKSTA_SPEED	0x000f	/* Negotiated Link Speed */
-#define  PCI_EXP_LNKSTA_WIDTH	0x03f0	/* Negotiated Link Width */
-#define  PCI_EXP_LNKSTA_TR_ERR	0x0400	/* Training Error */
-#define  PCI_EXP_LNKSTA_TRAIN	0x0800	/* Link Training */
-#define  PCI_EXP_LNKSTA_SL_CLK	0x1000	/* Slot Clock Configuration */
-#define PCI_EXP_SLTCAP		0x14	/* Slot Capabilities */
-#define  PCI_EXP_SLTCAP_ATNB	0x0001	/* Attention Button Present */
-#define  PCI_EXP_SLTCAP_PWRC	0x0002	/* Power Controller Present */
-#define  PCI_EXP_SLTCAP_MRL	0x0004	/* MRL Sensor Present */
-#define  PCI_EXP_SLTCAP_ATNI	0x0008	/* Attention Indicator Present */
-#define  PCI_EXP_SLTCAP_PWRI	0x0010	/* Power Indicator Present */
-#define  PCI_EXP_SLTCAP_HPS	0x0020	/* Hot-Plug Surprise */
-#define  PCI_EXP_SLTCAP_HPC	0x0040	/* Hot-Plug Capable */
-#define  PCI_EXP_SLTCAP_PWR_VAL	0x00007f80	/* Slot Power Limit Value */
-#define  PCI_EXP_SLTCAP_PWR_SCL	0x00018000	/* Slot Power Limit Scale */
-#define  PCI_EXP_SLTCAP_PSN	0xfff80000	/* Physical Slot Number */
-#define PCI_EXP_SLTCTL		0x18	/* Slot Control */
-#define  PCI_EXP_SLTCTL_ATNB	0x0001	/* Attention Button Pressed Enable */
-#define  PCI_EXP_SLTCTL_PWRF	0x0002	/* Power Fault Detected Enable */
-#define  PCI_EXP_SLTCTL_MRLS	0x0004	/* MRL Sensor Changed Enable */
-#define  PCI_EXP_SLTCTL_PRSD	0x0008	/* Presence Detect Changed Enable */
-#define  PCI_EXP_SLTCTL_CMDC	0x0010	/* Command Completed Interrupt Enable */
-#define  PCI_EXP_SLTCTL_HPIE	0x0020	/* Hot-Plug Interrupt Enable */
-#define  PCI_EXP_SLTCTL_ATNI	0x00C0	/* Attention Indicator Control */
-#define  PCI_EXP_SLTCTL_PWRI	0x0300	/* Power Indicator Control */
-#define  PCI_EXP_SLTCTL_PWRC	0x0400	/* Power Controller Control */
-#define PCI_EXP_SLTSTA		0x1a	/* Slot Status */
-#define PCI_EXP_RTCTL		0x1c	/* Root Control */
-#define  PCI_EXP_RTCTL_SECEE	0x1	/* System Error on Correctable Error */
-#define  PCI_EXP_RTCTL_SENFEE	0x1	/* System Error on Non-Fatal Error */
-#define  PCI_EXP_RTCTL_SEFEE	0x1	/* System Error on Fatal Error */
-#define  PCI_EXP_RTCTL_PMEIE	0x1	/* PME Interrupt Enable */
-#define PCI_EXP_RTSTA		0x20	/* Root Status */
-
-/* MSI-X */
-#define  PCI_MSIX_ENABLE	0x8000
-#define  PCI_MSIX_MASK		0x4000
-#define  PCI_MSIX_TABSIZE	0x03ff
-#define PCI_MSIX_TABLE		4
-#define PCI_MSIX_PBA		8
-#define  PCI_MSIX_BIR		0x7
-
-/* Advanced Error Reporting */
-#define PCI_ERR_UNCOR_STATUS	4	/* Uncorrectable Error Status */
-#define  PCI_ERR_UNC_TRAIN	0x00000001	/* Training */
-#define  PCI_ERR_UNC_DLP	0x00000010	/* Data Link Protocol */
-#define  PCI_ERR_UNC_POISON_TLP	0x00001000	/* Poisoned TLP */
-#define  PCI_ERR_UNC_FCP	0x00002000	/* Flow Control Protocol */
-#define  PCI_ERR_UNC_COMP_TIME	0x00004000	/* Completion Timeout */
-#define  PCI_ERR_UNC_COMP_ABORT	0x00008000	/* Completer Abort */
-#define  PCI_ERR_UNC_UNX_COMP	0x00010000	/* Unexpected Completion */
-#define  PCI_ERR_UNC_RX_OVER	0x00020000	/* Receiver Overflow */
-#define  PCI_ERR_UNC_MALF_TLP	0x00040000	/* Malformed TLP */
-#define  PCI_ERR_UNC_ECRC	0x00080000	/* ECRC Error Status */
-#define  PCI_ERR_UNC_UNSUP	0x00100000	/* Unsupported Request */
-#define PCI_ERR_UNCOR_MASK	8	/* Uncorrectable Error Mask */
-	/* Same bits as above */
-#define PCI_ERR_UNCOR_SEVER	12	/* Uncorrectable Error Severity */
-	/* Same bits as above */
-#define PCI_ERR_COR_STATUS	16	/* Correctable Error Status */
-#define  PCI_ERR_COR_RCVR	0x00000001	/* Receiver Error Status */
-#define  PCI_ERR_COR_BAD_TLP	0x00000040	/* Bad TLP Status */
-#define  PCI_ERR_COR_BAD_DLLP	0x00000080	/* Bad DLLP Status */
-#define  PCI_ERR_COR_REP_ROLL	0x00000100	/* REPLAY_NUM Rollover */
-#define  PCI_ERR_COR_REP_TIMER	0x00001000	/* Replay Timer Timeout */
-#define PCI_ERR_COR_MASK	20	/* Correctable Error Mask */
-	/* Same bits as above */
-#define PCI_ERR_CAP		24	/* Advanced Error Capabilities */
-#define  PCI_ERR_CAP_FEP(x)	((x) & 31)	/* First Error Pointer */
-#define  PCI_ERR_CAP_ECRC_GENC	0x00000020	/* ECRC Generation Capable */
-#define  PCI_ERR_CAP_ECRC_GENE	0x00000040	/* ECRC Generation Enable */
-#define  PCI_ERR_CAP_ECRC_CHKC	0x00000080	/* ECRC Check Capable */
-#define  PCI_ERR_CAP_ECRC_CHKE	0x00000100	/* ECRC Check Enable */
-#define PCI_ERR_HEADER_LOG	28	/* Header Log Register (16 bytes) */
-#define PCI_ERR_ROOT_COMMAND	44	/* Root Error Command */
-#define PCI_ERR_ROOT_STATUS	48
-#define PCI_ERR_ROOT_COR_SRC	52
-#define PCI_ERR_ROOT_SRC	54
-
-/* Virtual Channel */
-#define PCI_VC_PORT_REG1	4
-#define PCI_VC_PORT_REG2	8
-#define PCI_VC_PORT_CTRL	12
-#define PCI_VC_PORT_STATUS	14
-#define PCI_VC_RES_CAP		16
-#define PCI_VC_RES_CTRL		20
-#define PCI_VC_RES_STATUS	26
-
-/* Power Budgeting */
-#define PCI_PWR_DSR		4	/* Data Select Register */
-#define PCI_PWR_DATA		8	/* Data Register */
-#define  PCI_PWR_DATA_BASE(x)	((x) & 0xff)	/* Base Power */
-#define  PCI_PWR_DATA_SCALE(x)	(((x) >> 8) & 3)	/* Data Scale */
-#define  PCI_PWR_DATA_PM_SUB(x)	(((x) >> 10) & 7)	/* PM Sub State */
-#define  PCI_PWR_DATA_PM_STATE(x) (((x) >> 13) & 3)	/* PM State */
-#define  PCI_PWR_DATA_TYPE(x)	(((x) >> 15) & 7)	/* Type */
-#define  PCI_PWR_DATA_RAIL(x)	(((x) >> 18) & 7)	/* Power Rail */
-#define PCI_PWR_CAP		12	/* Capability */
-#define  PCI_PWR_CAP_BUDGET(x)	((x) & 1)	/* Included in system budget */
-
-/*
- * The PCI interface treats multi-function devices as independent
- * devices.  The slot/function address of each device is encoded
- * in a single byte as follows:
- *
- *	7:3 = slot
- *	2:0 = function
- */
-#define PCI_DEVFN(slot,func)	((((slot) & 0x1f) << 3) | ((func) & 0x07))
-#define PCI_SLOT(devfn)		(((devfn) >> 3) & 0x1f)
-#define PCI_FUNC(devfn)		((devfn) & 0x07)
-
-/* Device classes and subclasses */
-
-#define PCI_CLASS_NOT_DEFINED		0x0000
-#define PCI_CLASS_NOT_DEFINED_VGA	0x0001
-
-#define PCI_BASE_CLASS_STORAGE		0x01
-#define PCI_CLASS_STORAGE_SCSI		0x0100
-#define PCI_CLASS_STORAGE_IDE		0x0101
-#define PCI_CLASS_STORAGE_FLOPPY	0x0102
-#define PCI_CLASS_STORAGE_IPI		0x0103
-#define PCI_CLASS_STORAGE_RAID		0x0104
-#define PCI_CLASS_STORAGE_OTHER		0x0180
-
-#define PCI_BASE_CLASS_NETWORK		0x02
-#define PCI_CLASS_NETWORK_ETHERNET	0x0200
-#define PCI_CLASS_NETWORK_TOKEN_RING	0x0201
-#define PCI_CLASS_NETWORK_FDDI		0x0202
-#define PCI_CLASS_NETWORK_ATM		0x0203
-#define PCI_CLASS_NETWORK_OTHER		0x0280
-
-#define PCI_BASE_CLASS_DISPLAY		0x03
-#define PCI_CLASS_DISPLAY_VGA		0x0300
-#define PCI_CLASS_DISPLAY_XGA		0x0301
-#define PCI_CLASS_DISPLAY_OTHER		0x0380
-
-#define PCI_BASE_CLASS_MULTIMEDIA	0x04
-#define PCI_CLASS_MULTIMEDIA_VIDEO	0x0400
-#define PCI_CLASS_MULTIMEDIA_AUDIO	0x0401
-#define PCI_CLASS_MULTIMEDIA_OTHER	0x0480
-
-#define PCI_BASE_CLASS_MEMORY		0x05
-#define  PCI_CLASS_MEMORY_RAM		0x0500
-#define  PCI_CLASS_MEMORY_FLASH		0x0501
-#define  PCI_CLASS_MEMORY_OTHER		0x0580
-
-#define PCI_BASE_CLASS_BRIDGE		0x06
-#define  PCI_CLASS_BRIDGE_HOST		0x0600
-#define  PCI_CLASS_BRIDGE_ISA		0x0601
-#define  PCI_CLASS_BRIDGE_EISA		0x0602
-#define  PCI_CLASS_BRIDGE_MC		0x0603
-#define  PCI_CLASS_BRIDGE_PCI		0x0604
-#define  PCI_CLASS_BRIDGE_PCMCIA	0x0605
-#define  PCI_CLASS_BRIDGE_NUBUS		0x0606
-#define  PCI_CLASS_BRIDGE_CARDBUS	0x0607
-#define  PCI_CLASS_BRIDGE_OTHER		0x0680
-
-#define PCI_BASE_CLASS_COMMUNICATION	0x07
-#define PCI_CLASS_COMMUNICATION_SERIAL	0x0700
-#define PCI_CLASS_COMMUNICATION_PARALLEL 0x0701
-#define PCI_CLASS_COMMUNICATION_OTHER	0x0780
-
-#define PCI_BASE_CLASS_SYSTEM		0x08
-#define PCI_CLASS_SYSTEM_PIC		0x0800
-#define PCI_CLASS_SYSTEM_DMA		0x0801
-#define PCI_CLASS_SYSTEM_TIMER		0x0802
-#define PCI_CLASS_SYSTEM_RTC		0x0803
-#define PCI_CLASS_SYSTEM_OTHER		0x0880
-
-#define PCI_BASE_CLASS_INPUT		0x09
-#define PCI_CLASS_INPUT_KEYBOARD	0x0900
-#define PCI_CLASS_INPUT_PEN		0x0901
-#define PCI_CLASS_INPUT_MOUSE		0x0902
-#define PCI_CLASS_INPUT_OTHER		0x0980
-
-#define PCI_BASE_CLASS_DOCKING		0x0a
-#define PCI_CLASS_DOCKING_GENERIC	0x0a00
-#define PCI_CLASS_DOCKING_OTHER		0x0a01
-
-#define PCI_BASE_CLASS_PROCESSOR	0x0b
-#define PCI_CLASS_PROCESSOR_386		0x0b00
-#define PCI_CLASS_PROCESSOR_486		0x0b01
-#define PCI_CLASS_PROCESSOR_PENTIUM	0x0b02
-#define PCI_CLASS_PROCESSOR_ALPHA	0x0b10
-#define PCI_CLASS_PROCESSOR_POWERPC	0x0b20
-#define PCI_CLASS_PROCESSOR_CO		0x0b40
-
-#define PCI_BASE_CLASS_SERIAL		0x0c
-#define PCI_CLASS_SERIAL_FIREWIRE	0x0c00
-#define PCI_CLASS_SERIAL_ACCESS		0x0c01
-#define PCI_CLASS_SERIAL_SSA		0x0c02
-#define PCI_CLASS_SERIAL_USB		0x0c03
-#define PCI_CLASS_SERIAL_FIBER		0x0c04
-
-#define PCI_CLASS_OTHERS		0xff
-
-/* Several ID's we need in the library */
-
-#define PCI_VENDOR_ID_INTEL		0x8086
-#define PCI_VENDOR_ID_COMPAQ		0x0e11
Index: pace/lib/libpci/i386-ports.c
===================================================================
--- uspace/lib/libpci/i386-ports.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,274 +1,0 @@
-/*
- *	The PCI Library -- Direct Configuration access via i386 Ports
- *
- *	Copyright (c) 1997--2004 Martin Mares <mj@ucw.cz>
- *
- *	May 8, 2006 - Modified and ported to HelenOS by Jakub Jermar.
- *
- *	Can be freely distributed and used under the terms of the GNU GPL.
- */
-
-#include <unistd.h>
-
-#include "internal.h"
-
-static inline void outb(u8 b, u16 port)
-{
-	asm volatile ("outb %0, %1\n" :: "a" (b), "d" (port));
-}
-
-static inline void outw(u16 w, u16 port)
-{
-	asm volatile ("outw %0, %1\n" :: "a" (w), "d" (port));
-}
-
-static inline void outl(u32 l, u16 port)
-{
-	asm volatile ("outl %0, %1\n" :: "a" (l), "d" (port));
-}
-
-static inline u8 inb(u16 port)
-{
-	u8 val;
-
-	asm volatile ("inb %1, %0 \n" : "=a" (val) : "d"(port));
-	return val;
-}
-
-static inline u16 inw(u16 port)
-{
-	u16 val;
-
-	asm volatile ("inw %1, %0 \n" : "=a" (val) : "d"(port));
-	return val;
-}
-
-static inline u32 inl(u16 port)
-{
-	u32 val;
-
-	asm volatile ("inl %1, %0 \n" : "=a" (val) : "d"(port));
-	return val;
-}
-
-static void conf12_init(struct pci_access *a)
-{
-}
-
-static void conf12_cleanup(struct pci_access *a UNUSED)
-{
-}
-
-/*
- * Before we decide to use direct hardware access mechanisms, we try to do some
- * trivial checks to ensure it at least _seems_ to be working -- we just test
- * whether bus 00 contains a host bridge (this is similar to checking
- * techniques used in XFree86, but ours should be more reliable since we
- * attempt to make use of direct access hints provided by the PCI BIOS).
- *
- * This should be close to trivial, but it isn't, because there are buggy
- * chipsets (yes, you guessed it, by Intel and Compaq) that have no class ID.
- */
-
-static int intel_sanity_check(struct pci_access *a, struct pci_methods *m)
-{
-	struct pci_dev d;
-
-	a->debug("...sanity check");
-	d.bus = 0;
-	d.func = 0;
-	for (d.dev = 0; d.dev < 32; d.dev++) {
-		u16 class, vendor;
-		if ((m->read(&d, PCI_CLASS_DEVICE, (byte *) & class,
-			 sizeof(class))
-		    && (class == cpu_to_le16(PCI_CLASS_BRIDGE_HOST)
-			|| class == cpu_to_le16(PCI_CLASS_DISPLAY_VGA)))
-		    || (m->read(&d, PCI_VENDOR_ID, (byte *) & vendor,
-			       sizeof(vendor))
-		    && (vendor == cpu_to_le16(PCI_VENDOR_ID_INTEL)
-			|| vendor == cpu_to_le16(PCI_VENDOR_ID_COMPAQ)))) {
-			a->debug("...outside the Asylum at 0/%02x/0",
-				 d.dev);
-			return 1;
-		}
-	}
-	a->debug("...insane");
-	return 0;
-}
-
-/*
- *	Configuration type 1
- */
-
-#define CONFIG_CMD(bus, device_fn, where)   (0x80000000 | (bus << 16) | (device_fn << 8) | (where & ~3))
-
-static int conf1_detect(struct pci_access *a)
-{
-	unsigned int tmp;
-	int res = 0;
-
-	outb(0x01, 0xCFB);
-	tmp = inl(0xCF8);
-	outl(0x80000000, 0xCF8);
-	if (inl(0xCF8) == 0x80000000)
-		res = 1;
-	outl(tmp, 0xCF8);
-	if (res)
-		res = intel_sanity_check(a, &pm_intel_conf1);
-	return res;
-}
-
-static int conf1_read(struct pci_dev *d, int pos, byte * buf, int len)
-{
-	int addr = 0xcfc + (pos & 3);
-
-	if (pos >= 256)
-		return 0;
-
-	outl(0x80000000 | ((d->bus & 0xff) << 16) |
-	     (PCI_DEVFN(d->dev, d->func) << 8) | (pos & ~3), 0xcf8);
-
-	switch (len) {
-	case 1:
-		buf[0] = inb(addr);
-		break;
-	case 2:
-		((u16 *) buf)[0] = cpu_to_le16(inw(addr));
-		break;
-	case 4:
-		((u32 *) buf)[0] = cpu_to_le32(inl(addr));
-		break;
-	default:
-		return pci_generic_block_read(d, pos, buf, len);
-	}
-	return 1;
-}
-
-static int conf1_write(struct pci_dev *d, int pos, byte * buf, int len)
-{
-	int addr = 0xcfc + (pos & 3);
-
-	if (pos >= 256)
-		return 0;
-
-	outl(0x80000000 | ((d->bus & 0xff) << 16) |
-	     (PCI_DEVFN(d->dev, d->func) << 8) | (pos & ~3), 0xcf8);
-
-	switch (len) {
-	case 1:
-		outb(buf[0], addr);
-		break;
-	case 2:
-		outw(le16_to_cpu(((u16 *) buf)[0]), addr);
-		break;
-	case 4:
-		outl(le32_to_cpu(((u32 *) buf)[0]), addr);
-		break;
-	default:
-		return pci_generic_block_write(d, pos, buf, len);
-	}
-	return 1;
-}
-
-/*
- *	Configuration type 2. Obsolete and brain-damaged, but existing.
- */
-
-static int conf2_detect(struct pci_access *a)
-{
-	/* This is ugly and tends to produce false positives. Beware. */
-	outb(0x00, 0xCFB);
-	outb(0x00, 0xCF8);
-	outb(0x00, 0xCFA);
-	if (inb(0xCF8) == 0x00 && inb(0xCFA) == 0x00)
-		return intel_sanity_check(a, &pm_intel_conf2);
-	else
-		return 0;
-}
-
-static int conf2_read(struct pci_dev *d, int pos, byte * buf, int len)
-{
-	int addr = 0xc000 | (d->dev << 8) | pos;
-
-	if (pos >= 256)
-		return 0;
-
-	if (d->dev >= 16)
-		/* conf2 supports only 16 devices per bus */
-		return 0;
-	outb((d->func << 1) | 0xf0, 0xcf8);
-	outb(d->bus, 0xcfa);
-	switch (len) {
-	case 1:
-		buf[0] = inb(addr);
-		break;
-	case 2:
-		((u16 *) buf)[0] = cpu_to_le16(inw(addr));
-		break;
-	case 4:
-		((u32 *) buf)[0] = cpu_to_le32(inl(addr));
-		break;
-	default:
-		outb(0, 0xcf8);
-		return pci_generic_block_read(d, pos, buf, len);
-	}
-	outb(0, 0xcf8);
-	return 1;
-}
-
-static int conf2_write(struct pci_dev *d, int pos, byte * buf, int len)
-{
-	int addr = 0xc000 | (d->dev << 8) | pos;
-
-	if (pos >= 256)
-		return 0;
-
-	if (d->dev >= 16)
-		d->access->error("conf2_write: only first 16 devices exist.");
-	outb((d->func << 1) | 0xf0, 0xcf8);
-	outb(d->bus, 0xcfa);
-	switch (len) {
-	case 1:
-		outb(buf[0], addr);
-		break;
-	case 2:
-		outw(le16_to_cpu(*(u16 *) buf), addr);
-		break;
-	case 4:
-		outl(le32_to_cpu(*(u32 *) buf), addr);
-		break;
-	default:
-		outb(0, 0xcf8);
-		return pci_generic_block_write(d, pos, buf, len);
-	}
-	outb(0, 0xcf8);
-	return 1;
-}
-
-struct pci_methods pm_intel_conf1 = {
-	"Intel-conf1",
-	NULL,			/* config */
-	conf1_detect,
-	conf12_init,
-	conf12_cleanup,
-	pci_generic_scan,
-	pci_generic_fill_info,
-	conf1_read,
-	conf1_write,
-	NULL,			/* init_dev */
-	NULL			/* cleanup_dev */
-};
-
-struct pci_methods pm_intel_conf2 = {
-	"Intel-conf2",
-	NULL,			/* config */
-	conf2_detect,
-	conf12_init,
-	conf12_cleanup,
-	pci_generic_scan,
-	pci_generic_fill_info,
-	conf2_read,
-	conf2_write,
-	NULL,			/* init_dev */
-	NULL			/* cleanup_dev */
-};
Index: pace/lib/libpci/internal.h
===================================================================
--- uspace/lib/libpci/internal.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,43 +1,0 @@
-/*
- *	The PCI Library -- Internal Stuff
- *
- *	Copyright (c) 1997--2004 Martin Mares <mj@ucw.cz>
- *
- *	May 8, 2006 - Modified and ported to HelenOS by Jakub Jermar.
- *
- *	Can be freely distributed and used under the terms of the GNU GPL.
- */
-
-#include "pci.h"
-#include "sysdep.h"
-
-struct pci_methods {
-	const char *name;
-	void (*config) (struct pci_access *);
-	int (*detect) (struct pci_access *);
-	void (*init) (struct pci_access *);
-	void (*cleanup) (struct pci_access *);
-	void (*scan) (struct pci_access *);
-	int (*fill_info) (struct pci_dev *, int flags);
-	int (*read) (struct pci_dev *, int pos, byte * buf, int len);
-	int (*write) (struct pci_dev *, int pos, byte * buf, int len);
-	void (*init_dev) (struct pci_dev *);
-	void (*cleanup_dev) (struct pci_dev *);
-};
-
-void pci_generic_scan_bus(struct pci_access *, byte * busmap, int bus);
-void pci_generic_scan(struct pci_access *);
-int pci_generic_fill_info(struct pci_dev *, int flags);
-int pci_generic_block_read(struct pci_dev *, int pos, byte * buf, int len);
-int pci_generic_block_write(struct pci_dev *, int pos, byte * buf,
-			    int len);
-
-void *pci_malloc(struct pci_access *, int);
-void pci_mfree(void *);
-
-struct pci_dev *pci_alloc_dev(struct pci_access *);
-int pci_link_dev(struct pci_access *, struct pci_dev *);
-
-extern struct pci_methods pm_intel_conf1, pm_intel_conf2, pm_linux_proc,
-    pm_fbsd_device, pm_aix_device, pm_nbsd_libpci, pm_obsd_device,
-    pm_dump, pm_linux_sysfs;
Index: pace/lib/libpci/names.c
===================================================================
--- uspace/lib/libpci/names.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,456 +1,0 @@
-/*
- *	The PCI Library -- ID to Name Translation
- *
- *	Copyright (c) 1997--2005 Martin Mares <mj@ucw.cz>
- *
- *	May 8, 2006 - Modified and ported to HelenOS by Jakub Jermar.
- *
- *	Can be freely distributed and used under the terms of the GNU GPL.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <errno.h>
-
-#include "internal.h"
-#include "pci_ids.h"
-
-struct id_entry {
-	struct id_entry *next;
-	u32 id12, id34;
-	byte cat;
-	byte name[1];
-};
-
-enum id_entry_type {
-	ID_UNKNOWN,
-	ID_VENDOR,
-	ID_DEVICE,
-	ID_SUBSYSTEM,
-	ID_GEN_SUBSYSTEM,
-	ID_CLASS,
-	ID_SUBCLASS,
-	ID_PROGIF
-};
-
-struct id_bucket {
-	struct id_bucket *next;
-	unsigned int full;
-};
-
-#define MAX_LINE 1024
-#define BUCKET_SIZE 8192
-#define HASH_SIZE 4099
-
-#ifdef __GNUC__
-#define BUCKET_ALIGNMENT __alignof__(struct id_bucket)
-#else
-union id_align {
-	struct id_bucket *next;
-	unsigned int full;
-};
-#define BUCKET_ALIGNMENT sizeof(union id_align)
-#endif
-#define BUCKET_ALIGN(n) ((n)+BUCKET_ALIGNMENT-(n)%BUCKET_ALIGNMENT)
-
-static void *id_alloc(struct pci_access *a, unsigned int size)
-{
-	struct id_bucket *buck = a->current_id_bucket;
-	unsigned int pos;
-	if (!buck || buck->full + size > BUCKET_SIZE) {
-		buck = pci_malloc(a, BUCKET_SIZE);
-		buck->next = a->current_id_bucket;
-		a->current_id_bucket = buck;
-		buck->full = BUCKET_ALIGN(sizeof(struct id_bucket));
-	}
-	pos = buck->full;
-	buck->full = BUCKET_ALIGN(buck->full + size);
-	return (byte *) buck + pos;
-}
-
-static inline u32 id_pair(unsigned int x, unsigned int y)
-{
-	return ((x << 16) | y);
-}
-
-static inline unsigned int id_hash(int cat, u32 id12, u32 id34)
-{
-	unsigned int h;
-
-	h = id12 ^ (id34 << 3) ^ (cat << 5);
-	return h % HASH_SIZE;
-}
-
-static struct id_entry *id_lookup(struct pci_access *a, int cat, int id1,
-				  int id2, int id3, int id4)
-{
-	struct id_entry *n;
-	u32 id12 = id_pair(id1, id2);
-	u32 id34 = id_pair(id3, id4);
-
-	n = a->id_hash[id_hash(cat, id12, id34)];
-	while (n && (n->id12 != id12 || n->id34 != id34 || n->cat != cat))
-		n = n->next;
-	return n;
-}
-
-static int id_insert(struct pci_access *a, int cat, int id1, int id2,
-		     int id3, int id4, byte * text)
-{
-	u32 id12 = id_pair(id1, id2);
-	u32 id34 = id_pair(id3, id4);
-	unsigned int h = id_hash(cat, id12, id34);
-	struct id_entry *n = a->id_hash[h];
-	int len = str_size((char *) text);
-
-	while (n && (n->id12 != id12 || n->id34 != id34 || n->cat != cat))
-		n = n->next;
-	if (n)
-		return 1;
-	n = id_alloc(a, sizeof(struct id_entry) + len);
-	n->id12 = id12;
-	n->id34 = id34;
-	n->cat = cat;
-	memcpy(n->name, text, len + 1);
-	n->next = a->id_hash[h];
-	a->id_hash[h] = n;
-	return 0;
-}
-
-static int id_hex(byte * p, int cnt)
-{
-	int x = 0;
-	while (cnt--) {
-		x <<= 4;
-		if (*p >= '0' && *p <= '9')
-			x += (*p - '0');
-		else if (*p >= 'a' && *p <= 'f')
-			x += (*p - 'a' + 10);
-		else if (*p >= 'A' && *p <= 'F')
-			x += (*p - 'A' + 10);
-		else
-			return -1;
-		p++;
-	}
-	return x;
-}
-
-static inline int id_white_p(int c)
-{
-	return (c == ' ') || (c == '\t');
-}
-
-static const char *id_parse_list(struct pci_access *a, int *lino)
-{
-	byte *line;
-	byte *p;
-	int id1 = 0, id2 = 0, id3 = 0, id4 = 0;
-	int cat = -1;
-	int nest;
-	static const char parse_error[] = "Parse error";
-	size_t i;
-
-	*lino = 0;
-	for (i = 0; i < sizeof(pci_ids) / sizeof(char *); i++) {
-		line = (byte *) pci_ids[i];
-		(*lino)++;
-		p = line;
-		while (*p)
-			p++;
-		if (p > line && (p[-1] == ' ' || p[-1] == '\t'))
-			*--p = 0;
-
-		p = line;
-		while (id_white_p(*p))
-			p++;
-		if (!*p || *p == '#')
-			continue;
-
-		p = line;
-		while (*p == '\t')
-			p++;
-		nest = p - line;
-
-		if (!nest) {	/* Top-level entries */
-			if (p[0] == 'C' && p[1] == ' ') {	/* Class block */
-				if ((id1 = id_hex(p + 2, 2)) < 0 || !id_white_p(p[4]))
-					return parse_error;
-				cat = ID_CLASS;
-				p += 5;
-			} else if (p[0] == 'S' && p[1] == ' ') {	/* Generic subsystem block */
-				if ((id1 = id_hex(p + 2, 4)) < 0 || p[6])
-					return parse_error;
-				if (!id_lookup(a, ID_VENDOR, id1, 0, 0, 0))
-					return "Vendor does not exist";
-				cat = ID_GEN_SUBSYSTEM;
-				continue;
-			} else if (p[0] >= 'A' && p[0] <= 'Z' && p[1] == ' ') {	/* Unrecognized block (RFU) */
-				cat = ID_UNKNOWN;
-				continue;
-			} else {	/* Vendor ID */
-
-				if ((id1 = id_hex(p, 4)) < 0 || !id_white_p(p[4]))
-					return parse_error;
-				cat = ID_VENDOR;
-				p += 5;
-			}
-			id2 = id3 = id4 = 0;
-		} else if (cat == ID_UNKNOWN)	/* Nested entries in RFU blocks are skipped */
-			continue;
-		else if (nest == 1)	/* Nesting level 1 */
-			switch (cat) {
-			case ID_VENDOR:
-			case ID_DEVICE:
-			case ID_SUBSYSTEM:
-				if ((id2 = id_hex(p, 4)) < 0 || !id_white_p(p[4]))
-					return parse_error;
-				p += 5;
-				cat = ID_DEVICE;
-				id3 = id4 = 0;
-				break;
-			case ID_GEN_SUBSYSTEM:
-				if ((id2 = id_hex(p, 4)) < 0 || !id_white_p(p[4]))
-					return parse_error;
-				p += 5;
-				id3 = id4 = 0;
-				break;
-			case ID_CLASS:
-			case ID_SUBCLASS:
-			case ID_PROGIF:
-				if ((id2 = id_hex(p, 2)) < 0 || !id_white_p(p[2]))
-					return parse_error;
-				p += 3;
-				cat = ID_SUBCLASS;
-				id3 = id4 = 0;
-				break;
-			default:
-				return parse_error;
-		} else if (nest == 2)	/* Nesting level 2 */
-			switch (cat) {
-			case ID_DEVICE:
-			case ID_SUBSYSTEM:
-				if ((id3 = id_hex(p, 4)) < 0 || !id_white_p(p[4])
-				    || (id4 = id_hex(p + 5, 4)) < 0 || !id_white_p(p[9]))
-					return parse_error;
-				p += 10;
-				cat = ID_SUBSYSTEM;
-				break;
-			case ID_CLASS:
-			case ID_SUBCLASS:
-			case ID_PROGIF:
-				if ((id3 = id_hex(p, 2)) < 0 || !id_white_p(p[2]))
-					return parse_error;
-				p += 3;
-				cat = ID_PROGIF;
-				id4 = 0;
-				break;
-			default:
-				return parse_error;
-		} else		/* Nesting level 3 or more */
-			return parse_error;
-		while (id_white_p(*p))
-			p++;
-		if (!*p)
-			return parse_error;
-		if (id_insert(a, cat, id1, id2, id3, id4, p))
-			return "Duplicate entry";
-	}
-	return NULL;
-}
-
-int pci_load_name_list(struct pci_access *a)
-{
-	int lino;
-	const char *err;
-
-	pci_free_name_list(a);
-	a->id_hash = pci_malloc(a, sizeof(struct id_entry *) * HASH_SIZE);
-	bzero(a->id_hash, sizeof(struct id_entry *) * HASH_SIZE);
-	err = id_parse_list(a, &lino);
-	if (err)
-		a->error("%s at %s, element %d\n", err, "pci_ids.h", lino);
-	return 1;
-}
-
-void pci_free_name_list(struct pci_access *a)
-{
-	pci_mfree(a->id_hash);
-	a->id_hash = NULL;
-	while (a->current_id_bucket) {
-		struct id_bucket *buck = a->current_id_bucket;
-		a->current_id_bucket = buck->next;
-		pci_mfree(buck);
-	}
-}
-
-static struct id_entry *id_lookup_subsys(struct pci_access *a, int iv,
-					 int id, int isv, int isd)
-{
-	struct id_entry *d = NULL;
-	if (iv > 0 && id > 0)	/* Per-device lookup */
-		d = id_lookup(a, ID_SUBSYSTEM, iv, id, isv, isd);
-	if (!d)			/* Generic lookup */
-		d = id_lookup(a, ID_GEN_SUBSYSTEM, isv, isd, 0, 0);
-	if (!d && iv == isv && id == isd)	/* Check for subsystem == device */
-		d = id_lookup(a, ID_DEVICE, iv, id, 0, 0);
-	return d;
-}
-
-const char *pci_lookup_name(struct pci_access *a, char *buf, int size, int flags,
-		      ...)
-{
-	va_list args;
-	int num, res, synth;
-	struct id_entry *v, *d, *cls, *pif;
-	int iv, id, isv, isd, icls, ipif;
-
-	va_start(args, flags);
-
-	num = 0;
-	if ((flags & PCI_LOOKUP_NUMERIC) || a->numeric_ids) {
-		flags &= ~PCI_LOOKUP_NUMERIC;
-		num = 1;
-	} else if (!a->id_hash) {
-		if (!pci_load_name_list(a))
-			num = a->numeric_ids = 1;
-	}
-
-	if (flags & PCI_LOOKUP_NO_NUMBERS) {
-		flags &= ~PCI_LOOKUP_NO_NUMBERS;
-		synth = 0;
-		if (num)
-			return NULL;
-	} else
-		synth = 1;
-
-	switch (flags) {
-	case PCI_LOOKUP_VENDOR:
-		iv = va_arg(args, int);
-		if (num)
-			res = snprintf(buf, size, "%04x", iv);
-		else if ((v = id_lookup(a, ID_VENDOR, iv, 0, 0, 0)) != 0)
-			return (char *) v->name;
-		else
-			res = snprintf(buf, size, "Unknown vendor %04x", iv);
-		break;
-	case PCI_LOOKUP_DEVICE:
-		iv = va_arg(args, int);
-		id = va_arg(args, int);
-		if (num)
-			res = snprintf(buf, size, "%04x", id);
-		else if ((d = id_lookup(a, ID_DEVICE, iv, id, 0, 0)) != 0)
-			return (char *) d->name;
-		else if (synth)
-			res = snprintf(buf, size, "Unknown device %04x", id);
-		else
-			return NULL;
-		break;
-	case PCI_LOOKUP_VENDOR | PCI_LOOKUP_DEVICE:
-		iv = va_arg(args, int);
-		id = va_arg(args, int);
-		if (num)
-			res = snprintf(buf, size, "%04x:%04x", iv, id);
-		else {
-			v = id_lookup(a, ID_VENDOR, iv, 0, 0, 0);
-			d = id_lookup(a, ID_DEVICE, iv, id, 0, 0);
-			if (v && d)
-				res = snprintf(buf, size, "%s %s", v->name,
-					     d->name);
-			else if (!synth)
-				return NULL;
-			else if (!v)
-				res = snprintf(buf, size, "Unknown device %04x:%04x", iv, id);
-			else	/* !d */
-				res = snprintf(buf, size, "%s Unknown device %04x", v->name, id);
-		}
-		break;
-	case PCI_LOOKUP_SUBSYSTEM | PCI_LOOKUP_VENDOR:
-		isv = va_arg(args, int);
-		if (num)
-			res = snprintf(buf, size, "%04x", isv);
-		else if ((v = id_lookup(a, ID_VENDOR, isv, 0, 0, 0)) != 0)
-			return (char *) v->name;
-		else if (synth)
-			res = snprintf(buf, size, "Unknown vendor %04x", isv);
-		else
-			return NULL;
-		break;
-	case PCI_LOOKUP_SUBSYSTEM | PCI_LOOKUP_DEVICE:
-		iv = va_arg(args, int);
-		id = va_arg(args, int);
-		isv = va_arg(args, int);
-		isd = va_arg(args, int);
-		if (num)
-			res = snprintf(buf, size, "%04x", isd);
-		else if ((d = id_lookup_subsys(a, iv, id, isv, isd)) != 0)
-			return (char *) d->name;
-		else if (synth)
-			res = snprintf(buf, size, "Unknown device %04x", isd);
-		else
-			return NULL;
-		break;
-	case PCI_LOOKUP_VENDOR | PCI_LOOKUP_DEVICE | PCI_LOOKUP_SUBSYSTEM:
-		iv = va_arg(args, int);
-		id = va_arg(args, int);
-		isv = va_arg(args, int);
-		isd = va_arg(args, int);
-		if (num)
-			res = snprintf(buf, size, "%04x:%04x", isv, isd);
-		else {
-			v = id_lookup(a, ID_VENDOR, isv, 0, 0, 0);
-			d = id_lookup_subsys(a, iv, id, isv, isd);
-			if (v && d)
-				res = snprintf(buf, size, "%s %s", v->name, d->name);
-			else if (!synth)
-				return NULL;
-			else if (!v)
-				res = snprintf(buf, size, "Unknown device %04x:%04x", isv, isd);
-			else	/* !d */
-				res = snprintf(buf, size, "%s Unknown device %04x", v->name, isd);
-		}
-		break;
-	case PCI_LOOKUP_CLASS:
-		icls = va_arg(args, int);
-		if (num)
-			res = snprintf(buf, size, "%04x", icls);
-		else if ((cls = id_lookup(a, ID_SUBCLASS, icls >> 8, icls & 0xff, 0, 0)) != 0)
-			return (char *) cls->name;
-		else if ((cls = id_lookup(a, ID_CLASS, icls, 0, 0, 0)) != 0)
-			res = snprintf(buf, size, "%s [%04x]", cls->name, icls);
-		else if (synth)
-			res = snprintf(buf, size, "Class %04x", icls);
-		else
-			return NULL;
-		break;
-	case PCI_LOOKUP_PROGIF:
-		icls = va_arg(args, int);
-		ipif = va_arg(args, int);
-		if (num)
-			res = snprintf(buf, size, "%02x", ipif);
-		else if ((pif = id_lookup(a, ID_PROGIF, icls >> 8, icls & 0xff, ipif, 0)) != 0)
-			return (char *) pif->name;
-		else if (icls == 0x0101 && !(ipif & 0x70)) {
-			/* IDE controllers have complex prog-if semantics */
-			res = snprintf(buf, size, "%s%s%s%s%s",
-				       (ipif & 0x80) ? "Master " : "",
-				       (ipif & 0x08) ? "SecP " : "",
-				       (ipif & 0x04) ? "SecO " : "",
-				       (ipif & 0x02) ? "PriP " : "",
-				       (ipif & 0x01) ? "PriO " : "");
-			if (res > 0 && res < size)
-				buf[--res] = 0;
-		} else if (synth)
-			res = snprintf(buf, size, "ProgIf %02x", ipif);
-		else
-			return NULL;
-		break;
-	default:
-		return "<pci_lookup_name: invalid request>";
-	}
-	if (res < 0 || res >= size)
-		return "<pci_lookup_name: buffer too small>";
-	else
-		return buf;
-}
Index: pace/lib/libpci/pci.h
===================================================================
--- uspace/lib/libpci/pci.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,146 +1,0 @@
-/*
- *	The PCI Library
- *
- *	Copyright (c) 1997--2005 Martin Mares <mj@ucw.cz>
- *
- *	May 8, 2006 - Modified and ported to HelenOS by Jakub Jermar.
- *
- *	Can be freely distributed and used under the terms of the GNU GPL.
- */
-
-#ifndef _PCI_LIB_H
-#define _PCI_LIB_H
-
-#include "header.h"
-#include "types.h"
-
-#define PCI_LIB_VERSION 0x020200
-
-/*
- *	PCI Access Structure
- */
-
-struct pci_methods;
-
-enum pci_access_type {
-	/* Known access methods, remember to update access.c as well */
-	PCI_ACCESS_I386_TYPE1,	/* i386 ports, type 1 (params: none) */
-	PCI_ACCESS_I386_TYPE2,	/* i386 ports, type 2 (params: none) */
-	PCI_ACCESS_MAX
-};
-
-struct pci_access {
-	/* Options you can change: */
-	unsigned int method;	/* Access method */
-	char *method_params[PCI_ACCESS_MAX];	/* Parameters for the methods */
-	int writeable;		/* Open in read/write mode */
-	int buscentric;		/* Bus-centric view of the world */
-	int numeric_ids;	/* Don't resolve device IDs to names */
-	int debugging;		/* Turn on debugging messages */
-
-	/* Functions you can override: */
-	void (*error) (const char *msg, ...);	/* Write error message and quit */
-	void (*warning) (const char *msg, ...);	/* Write a warning message */
-	void (*debug) (const char *msg, ...);	/* Write a debugging message */
-
-	struct pci_dev *devices;	/* Devices found on this bus */
-
-	/* Fields used internally: */
-	struct pci_methods *methods;
-	struct id_entry **id_hash;	/* names.c */
-	struct id_bucket *current_id_bucket;
-};
-
-/* Initialize PCI access */
-struct pci_access *pci_alloc(void);
-void pci_init(struct pci_access *);
-void pci_cleanup(struct pci_access *);
-
-/* Scanning of devices */
-void pci_scan_bus(struct pci_access *acc);
-struct pci_dev *pci_get_dev(struct pci_access *acc, int domain, int bus, int dev, int func);	/* Raw access to specified device */
-void pci_free_dev(struct pci_dev *);
-
-/*
- *	Devices
- */
-
-struct pci_dev {
-	struct pci_dev *next;	/* Next device in the chain */
-	u16 domain;		/* PCI domain (host bridge) */
-	u8 bus, dev, func;	/* Bus inside domain, device and function */
-
-	/* These fields are set by pci_fill_info() */
-	int known_fields;	/* Set of info fields already known */
-	u16 vendor_id, device_id;	/* Identity of the device */
-	int irq;		/* IRQ number */
-	pciaddr_t base_addr[6];	/* Base addresses */
-	pciaddr_t size[6];	/* Region sizes */
-	pciaddr_t rom_base_addr;	/* Expansion ROM base address */
-	pciaddr_t rom_size;	/* Expansion ROM size */
-
-	/* Fields used internally: */
-	struct pci_access *access;
-	struct pci_methods *methods;
-	u8 *cache;		/* Cached config registers */
-	int cache_len;
-	int hdrtype;		/* Cached low 7 bits of header type, -1 if unknown */
-	void *aux;		/* Auxillary data */
-};
-
-#define PCI_ADDR_IO_MASK (~(pciaddr_t) 0x3)
-#define PCI_ADDR_MEM_MASK (~(pciaddr_t) 0xf)
-
-u8 pci_read_byte(struct pci_dev *, int pos);	/* Access to configuration space */
-u16 pci_read_word(struct pci_dev *, int pos);
-u32 pci_read_long(struct pci_dev *, int pos);
-int pci_read_block(struct pci_dev *, int pos, u8 * buf, int len);
-int pci_write_byte(struct pci_dev *, int pos, u8 data);
-int pci_write_word(struct pci_dev *, int pos, u16 data);
-int pci_write_long(struct pci_dev *, int pos, u32 data);
-int pci_write_block(struct pci_dev *, int pos, u8 * buf, int len);
-
-int pci_fill_info(struct pci_dev *, int flags);	/* Fill in device information */
-
-#define PCI_FILL_IDENT		1
-#define PCI_FILL_IRQ		2
-#define PCI_FILL_BASES		4
-#define PCI_FILL_ROM_BASE	8
-#define PCI_FILL_SIZES		16
-#define PCI_FILL_RESCAN		0x10000
-
-void pci_setup_cache(struct pci_dev *, u8 * cache, int len);
-
-/*
- *	Conversion of PCI ID's to names (according to the pci.ids file)
- *
- *	Call pci_lookup_name() to identify different types of ID's:
- *
- *	VENDOR				(vendorID) -> vendor
- *	DEVICE				(vendorID, deviceID) -> device
- *	VENDOR | DEVICE			(vendorID, deviceID) -> combined vendor and device
- *	SUBSYSTEM | VENDOR		(subvendorID) -> subsystem vendor
- *	SUBSYSTEM | DEVICE		(vendorID, deviceID, subvendorID, subdevID) -> subsystem device
- *	SUBSYSTEM | VENDOR | DEVICE	(vendorID, deviceID, subvendorID, subdevID) -> combined subsystem v+d
- *	SUBSYSTEM | ...			(-1, -1, subvendorID, subdevID) -> generic subsystem
- *	CLASS				(classID) -> class
- *	PROGIF				(classID, progif) -> programming interface
- */
-
-const char *pci_lookup_name(struct pci_access *a, char *buf, int size,
-    int flags, ...);
-
-int pci_load_name_list(struct pci_access *a);	/* Called automatically by pci_lookup_*() when needed; returns success */
-void pci_free_name_list(struct pci_access *a);	/* Called automatically by pci_cleanup() */
-
-enum pci_lookup_mode {
-	PCI_LOOKUP_VENDOR = 1,	/* Vendor name (args: vendorID) */
-	PCI_LOOKUP_DEVICE = 2,	/* Device name (args: vendorID, deviceID) */
-	PCI_LOOKUP_CLASS = 4,	/* Device class (args: classID) */
-	PCI_LOOKUP_SUBSYSTEM = 8,
-	PCI_LOOKUP_PROGIF = 16,	/* Programming interface (args: classID, prog_if) */
-	PCI_LOOKUP_NUMERIC = 0x10000,	/* Want only formatted numbers; default if access->numeric_ids is set */
-	PCI_LOOKUP_NO_NUMBERS = 0x20000	/* Return NULL if not found in the database; default is to print numerically */
-};
-
-#endif
Index: pace/lib/libpci/pci_ids.h
===================================================================
--- uspace/lib/libpci/pci_ids.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,11934 +1,0 @@
-/* DO NOT EDIT, THIS FILE IS AUTOMATICALLY GENERATED */
-const char *pci_ids[] = {
-"0000  Gammagraphx, Inc.",
-"001a  Ascend Communications, Inc.",
-"0033  Paradyne corp.",
-"003d  Lockheed Martin-Marietta Corp",
-"0059  Tiger Jet Network Inc. (Wrong ID)",
-"0070  Hauppauge computer works Inc.",
-"0071  Nebula Electronics Ltd.",
-"0095  Silicon Image, Inc. (Wrong ID)",
-"	0680  Ultra ATA/133 IDE RAID CONTROLLER CARD",
-"00a7  Teles AG (Wrong ID)",
-"00f5  BFG Technologies, Inc.",
-"0100  Ncipher Corp Ltd",
-"0123  General Dynamics",
-"018a  LevelOne",
-"	0106  FPC-0106TX misprogrammed [RTL81xx]",
-"021b  Compaq Computer Corporation",
-"	8139  HNE-300 (RealTek RTL8139c) [iPaq Networking]",
-"0270  Hauppauge computer works Inc. (Wrong ID)",
-"0291  Davicom Semiconductor, Inc.",
-"	8212  DM9102A(DM9102AE, SM9102AF) Ethernet 100/10 MBit(Rev 40)",
-"02ac  SpeedStream",
-"	1012  1012 PCMCIA 10/100 Ethernet Card [RTL81xx]",
-"0315  SK-Electronics Co., Ltd.",
-"0357  TTTech AG",
-"	000a  TTP-Monitoring Card V2.0",
-"0432  SCM Microsystems, Inc.",
-"	0001  Pluto2 DVB-T Receiver for PCMCIA [EasyWatch MobilSet]",
-"045e  Microsoft",
-"	006e  MN-510 802.11b wireless USB paddle",
-"	00c2  MN-710 wireless USB paddle",
-"04cf  Myson Century, Inc",
-"	8818  CS8818 USB2.0-to-ATAPI Bridge Controller with Embedded PHY",
-"050d  Belkin",
-"	0109  F5U409-CU USB/Serial Portable Adapter",
-"	7050  F5D7050 802.11g Wireless USB Adapter",
-"05e3  CyberDoor",
-"	0701  CBD516",
-"066f  Sigmatel Inc.",
-"	3410  SMTP3410",
-"	3500  SMTP3500",
-"0675  Dynalink",
-"	1700  IS64PH ISDN Adapter",
-"	1702  IS64PH ISDN Adapter",
-"	1703  ISDN Adapter (PCI Bus, DV, W)",
-"	1704  ISDN Adapter (PCI Bus, D, C)",
-"067b  Prolific Technology, Inc.",
-"	3507  PL-3507 Hi-Speed USB & IEEE 1394 Combo to IDE Bridge Controller",
-"0721  Sapphire, Inc.",
-"07e2  ELMEG Communication Systems GmbH",
-"0925  VIA Technologies, Inc. (Wrong ID)",
-"09c1  Arris",
-"	0704  CM 200E Cable Modem",
-"0a89  BREA Technologies Inc",
-"0b0b  Rhino Equiment Corp.",
-"	0105  Rhino R1T1",
-"	0205  Rhino R4FXO",
-"	0305  Rhino R4T1",
-"	0405  Rhino R8FXX",
-"	0505  Rhino R24FXX",
-"	0506  Rhino R2T1",
-"0b49  ASCII Corporation",
-"	064f  Trance Vibrator",
-"0e11  Compaq Computer Corporation",
-"	0001  PCI to EISA Bridge",
-"	0002  PCI to ISA Bridge",
-"	0046  Smart Array 64xx",
-"		0e11 409a  Smart Array 641",
-"		0e11 409b  Smart Array 642",
-"		0e11 409c  Smart Array 6400",
-"		0e11 409d  Smart Array 6400 EM",
-"	0049  NC7132 Gigabit Upgrade Module",
-"	004a  NC6136 Gigabit Server Adapter",
-"	005a  Remote Insight II board - Lights-Out",
-"	007c  NC7770 1000BaseTX",
-"	007d  NC6770 1000BaseTX",
-"	0085  NC7780 1000BaseTX",
-"	00b1  Remote Insight II board - PCI device",
-"	00bb  NC7760",
-"	00ca  NC7771",
-"	00cb  NC7781",
-"	00cf  NC7772",
-"	00d0  NC7782",
-"	00d1  NC7783",
-"	00e3  NC7761",
-"	0508  Netelligent 4/16 Token Ring",
-"	1000  Triflex/Pentium Bridge, Model 1000",
-"	2000  Triflex/Pentium Bridge, Model 2000",
-"	3032  QVision 1280/p",
-"	3033  QVision 1280/p",
-"	3034  QVision 1280/p",
-"	4000  4000 [Triflex]",
-"	4030  SMART-2/P",
-"	4031  SMART-2SL",
-"	4032  Smart Array 3200",
-"	4033  Smart Array 3100ES",
-"	4034  Smart Array 221",
-"	4040  Integrated Array",
-"	4048  Compaq Raid LC2",
-"	4050  Smart Array 4200",
-"	4051  Smart Array 4250ES",
-"	4058  Smart Array 431",
-"	4070  Smart Array 5300",
-"	4080  Smart Array 5i",
-"	4082  Smart Array 532",
-"	4083  Smart Array 5312",
-"	4091  Smart Array 6i",
-"	409a  Smart Array 641",
-"	409b  Smart Array 642",
-"	409c  Smart Array 6400",
-"	409d  Smart Array 6400 EM",
-"	6010  HotPlug PCI Bridge 6010",
-"	7020  USB Controller",
-"	a0ec  Fibre Channel Host Controller",
-"	a0f0  Advanced System Management Controller",
-"	a0f3  Triflex PCI to ISA Bridge",
-"	a0f7  PCI Hotplug Controller",
-"		8086 002a  PCI Hotplug Controller A",
-"		8086 002b  PCI Hotplug Controller B",
-"	a0f8  ZFMicro Chipset USB",
-"	a0fc  FibreChannel HBA Tachyon",
-"	ae10  Smart-2/P RAID Controller",
-"		0e11 4030  Smart-2/P Array Controller",
-"		0e11 4031  Smart-2SL Array Controller",
-"		0e11 4032  Smart Array Controller",
-"		0e11 4033  Smart 3100ES Array Controller",
-"	ae29  MIS-L",
-"	ae2a  MPC",
-"	ae2b  MIS-E",
-"	ae31  System Management Controller",
-"	ae32  Netelligent 10/100 TX PCI UTP",
-"	ae33  Triflex Dual EIDE Controller",
-"	ae34  Netelligent 10 T PCI UTP",
-"	ae35  Integrated NetFlex-3/P",
-"	ae40  Netelligent Dual 10/100 TX PCI UTP",
-"	ae43  Netelligent Integrated 10/100 TX UTP",
-"	ae69  CETUS-L",
-"	ae6c  Northstar",
-"	ae6d  NorthStar CPU to PCI Bridge",
-"	b011  Netelligent 10/100 TX Embedded UTP",
-"	b012  Netelligent 10 T/2 PCI UTP/Coax",
-"	b01e  NC3120 Fast Ethernet NIC",
-"	b01f  NC3122 Fast Ethernet NIC",
-"	b02f  NC1120 Ethernet NIC",
-"	b030  Netelligent 10/100 TX UTP",
-"	b04a  10/100 TX PCI Intel WOL UTP Controller",
-"	b060  Smart Array 5300 Controller",
-"	b0c6  NC3161 Fast Ethernet NIC",
-"	b0c7  NC3160 Fast Ethernet NIC",
-"	b0d7  NC3121 Fast Ethernet NIC",
-"	b0dd  NC3131 Fast Ethernet NIC",
-"	b0de  NC3132 Fast Ethernet Module",
-"	b0df  NC6132 Gigabit Module",
-"	b0e0  NC6133 Gigabit Module",
-"	b0e1  NC3133 Fast Ethernet Module",
-"	b123  NC6134 Gigabit NIC",
-"	b134  NC3163 Fast Ethernet NIC",
-"	b13c  NC3162 Fast Ethernet NIC",
-"	b144  NC3123 Fast Ethernet NIC",
-"	b163  NC3134 Fast Ethernet NIC",
-"	b164  NC3165 Fast Ethernet Upgrade Module",
-"	b178  Smart Array 5i/532",
-"		0e11 4080  Smart Array 5i",
-"		0e11 4082  Smart Array 532",
-"		0e11 4083  Smart Array 5312",
-"	b1a4  NC7131 Gigabit Server Adapter",
-"	b200  Memory Hot-Plug Controller",
-"	b203  Integrated Lights Out Controller",
-"	b204  Integrated Lights Out  Processor",
-"	f130  NetFlex-3/P ThunderLAN 1.0",
-"	f150  NetFlex-3/P ThunderLAN 2.3",
-"0e21  Cowon Systems, Inc.",
-"0e55  HaSoTec GmbH",
-"1000  LSI Logic / Symbios Logic",
-"	0001  53c810",
-"		1000 1000  LSI53C810AE PCI to SCSI I/O Processor",
-"	0002  53c820",
-"	0003  53c825",
-"		1000 1000  LSI53C825AE PCI to SCSI I/O Processor (Ultra Wide)",
-"	0004  53c815",
-"	0005  53c810AP",
-"	0006  53c860",
-"		1000 1000  LSI53C860E PCI to Ultra SCSI I/O Processor",
-"	000a  53c1510",
-"		1000 1000  LSI53C1510 PCI to Dual Channel Wide Ultra2 SCSI Controller (Nonintelligent mode)",
-"	000b  53C896/897",
-"		0e11 6004  EOB003 Series SCSI host adapter",
-"		1000 1000  LSI53C896/7 PCI to Dual Channel Ultra2 SCSI Multifunction Controller",
-"		1000 1010  LSI22910 PCI to Dual Channel Ultra2 SCSI host adapter",
-"		1000 1020  LSI21002 PCI to Dual Channel Ultra2 SCSI host adapter",
-"		13e9 1000  6221L-4U",
-"	000c  53c895",
-"		1000 1010  LSI8951U PCI to Ultra2 SCSI host adapter",
-"		1000 1020  LSI8952U PCI to Ultra2 SCSI host adapter",
-"		1de1 3906  DC-390U2B SCSI adapter",
-"		1de1 3907  DC-390U2W",
-"	000d  53c885",
-"	000f  53c875",
-"		0e11 7004  Embedded Ultra Wide SCSI Controller",
-"		1000 1000  LSI53C876/E PCI to Dual Channel SCSI Controller",
-"		1000 1010  LSI22801 PCI to Dual Channel Ultra SCSI host adapter",
-"		1000 1020  LSI22802 PCI to Dual Channel Ultra SCSI host adapter",
-"		1092 8760  FirePort 40 Dual SCSI Controller",
-"		1de1 3904  DC390F/U Ultra Wide SCSI Adapter",
-"		4c53 1000  CC7/CR7/CP7/VC7/VP7/VR7 mainboard",
-"		4c53 1050  CT7 mainboard",
-"	0010  53C1510",
-"		0e11 4040  Integrated Array Controller",
-"		0e11 4048  RAID LC2 Controller",
-"		1000 1000  53C1510 PCI to Dual Channel Wide Ultra2 SCSI Controller (Intelligent mode)",
-"	0012  53c895a",
-"		1000 1000  LSI53C895A PCI to Ultra2 SCSI Controller",
-"	0013  53c875a",
-"		1000 1000  LSI53C875A PCI to Ultra SCSI Controller",
-"	0020  53c1010 Ultra3 SCSI Adapter",
-"		1000 1000  LSI53C1010-33 PCI to Dual Channel Ultra160 SCSI Controller",
-"		1de1 1020  DC-390U3W",
-"	0021  53c1010 66MHz  Ultra3 SCSI Adapter",
-"		1000 1000  LSI53C1000/1000R/1010R/1010-66 PCI to Ultra160 SCSI Controller",
-"		1000 1010  Asus TR-DLS onboard 53C1010-66",
-"		124b 1070  PMC-USCSI3",
-"		4c53 1080  CT8 mainboard",
-"		4c53 1300  P017 mezzanine (32-bit PMC)",
-"		4c53 1310  P017 mezzanine (64-bit PMC)",
-"	0030  53c1030 PCI-X Fusion-MPT Dual Ultra320 SCSI",
-"		0e11 00da  ProLiant ML 350",
-"		1028 0123  PowerEdge 2600",
-"		1028 014a  PowerEdge 1750",
-"		1028 016c  PowerEdge 1850 MPT Fusion SCSI/RAID (Perc 4)",
-"		1028 0183  PowerEdge 1800",
-"		1028 1010  LSI U320 SCSI Controller",
-"		124b 1170  PMC-USCSI320",
-"		1734 1052  Primergy RX300 S2",
-"	0031  53c1030ZC PCI-X Fusion-MPT Dual Ultra320 SCSI",
-"	0032  53c1035 PCI-X Fusion-MPT Dual Ultra320 SCSI",
-"		1000 1000  LSI53C1020/1030 PCI-X to Ultra320 SCSI Controller",
-"	0033  1030ZC_53c1035 PCI-X Fusion-MPT Dual Ultra320 SCSI",
-"	0040  53c1035 PCI-X Fusion-MPT Dual Ultra320 SCSI",
-"		1000 0033  MegaRAID SCSI 320-2XR",
-"		1000 0066  MegaRAID SCSI 320-2XRWS",
-"	0041  53C1035ZC PCI-X Fusion-MPT Dual Ultra320 SCSI",
-"	0050  SAS1064 PCI-X Fusion-MPT SAS",
-"	0054  SAS1068 PCI-X Fusion-MPT SAS",
-"	0056  SAS1064E PCI-Express Fusion-MPT SAS",
-"	0058  SAS1068E PCI-Express Fusion-MPT SAS",
-"	005a  SAS1066E PCI-Express Fusion-MPT SAS",
-"	005c  SAS1064A PCI-X Fusion-MPT SAS",
-"	005e  SAS1066 PCI-X Fusion-MPT SAS",
-"	0060  SAS1078 PCI-X Fusion-MPT SAS",
-"	0062  SAS1078 PCI-Express Fusion-MPT SAS",
-"		1000 0062  SAS1078 PCI-Express Fusion-MPT SAS",
-"	008f  53c875J",
-"		1092 8000  FirePort 40 SCSI Controller",
-"		1092 8760  FirePort 40 Dual SCSI Host Adapter",
-"	0407  MegaRAID",
-"		1000 0530  MegaRAID 530 SCSI 320-0X RAID Controller",
-"		1000 0531  MegaRAID 531 SCSI 320-4X RAID Controller",
-"		1000 0532  MegaRAID 532 SCSI 320-2X RAID Controller",
-"		1028 0531  PowerEdge Expandable RAID Controller 4/QC",
-"		1028 0533  PowerEdge Expandable RAID Controller 4/QC",
-"		8086 0530  MegaRAID Intel RAID Controller SRCZCRX",
-"		8086 0532  MegaRAID Intel RAID Controller SRCU42X",
-"	0408  MegaRAID",
-"		1000 0001  MegaRAID SCSI 320-1E RAID Controller",
-"		1000 0002  MegaRAID SCSI 320-2E RAID Controller",
-"		1025 004d  MegaRAID ACER ROMB-2E RAID Controller",
-"		1028 0001  PowerEdge RAID Controller PERC4e/SC",
-"		1028 0002  PowerEdge RAID Controller PERC4e/DC",
-"		1734 1065  FSC MegaRAID PCI Express ROMB",
-"		8086 0002  MegaRAID Intel RAID Controller SRCU42E",
-"	0409  MegaRAID",
-"		1000 3004  MegaRAID SATA 300-4X RAID Controller",
-"		1000 3008  MegaRAID SATA 300-8X RAID Controller",
-"		8086 3008  MegaRAID RAID Controller SRCS28X",
-"		8086 3431  MegaRAID RAID Controller Alief SROMBU42E",
-"		8086 3499  MegaRAID RAID Controller Harwich SROMBU42E",
-"	0621  FC909 Fibre Channel Adapter",
-"	0622  FC929 Fibre Channel Adapter",
-"		1000 1020  44929 O Dual Fibre Channel card",
-"	0623  FC929 LAN",
-"	0624  FC919 Fibre Channel Adapter",
-"	0625  FC919 LAN",
-"	0626  FC929X Fibre Channel Adapter",
-"		1000 1010  7202-XP-LC Dual Fibre Channel card",
-"	0627  FC929X LAN",
-"	0628  FC919X Fibre Channel Adapter",
-"	0629  FC919X LAN",
-"	0640  FC949X Fibre Channel Adapter",
-"	0642  FC939X Fibre Channel Adapter",
-"	0646  FC949ES Fibre Channel Adapter",
-"	0701  83C885 NT50 DigitalScape Fast Ethernet",
-"	0702  Yellowfin G-NIC gigabit ethernet",
-"		1318 0000  PEI100X",
-"	0804  SA2010",
-"	0805  SA2010ZC",
-"	0806  SA2020",
-"	0807  SA2020ZC",
-"	0901  61C102",
-"	1000  63C815",
-"	1960  MegaRAID",
-"		1000 0518  MegaRAID 518 SCSI 320-2 Controller",
-"		1000 0520  MegaRAID 520 SCSI 320-1 Controller",
-"		1000 0522  MegaRAID 522 i4 133 RAID Controller",
-"		1000 0523  MegaRAID SATA 150-6 RAID Controller",
-"		1000 4523  MegaRAID SATA 150-4 RAID Controller",
-"		1000 a520  MegaRAID ZCR SCSI 320-0 Controller",
-"		1028 0518  MegaRAID 518 DELL PERC 4/DC RAID Controller",
-"		1028 0520  MegaRAID 520 DELL PERC 4/SC RAID Controller",
-"		1028 0531  PowerEdge Expandable RAID Controller 4/QC",
-"		1028 0533  PowerEdge Expandable RAID Controller 4/QC",
-"		8086 0520  MegaRAIDRAID Controller SRCU41L",
-"		8086 0523  MegaRAID RAID Controller SRCS16",
-"1001  Kolter Electronic",
-"	0010  PCI 1616 Measurement card with 32 digital I/O lines",
-"	0011  OPTO-PCI Opto-Isolated digital I/O board",
-"	0012  PCI-AD/DA Analogue I/O board",
-"	0013  PCI-OPTO-RELAIS Digital I/O board with relay outputs",
-"	0014  PCI-Counter/Timer Counter Timer board",
-"	0015  PCI-DAC416 Analogue output board",
-"	0016  PCI-MFB Analogue I/O board",
-"	0017  PROTO-3 PCI Prototyping board",
-"	9100  INI-9100/9100W SCSI Host",
-"1002  ATI Technologies Inc",
-"	3150  M24 1P [Radeon Mobility X600]",
-"	3152  M22 [Radeon Mobility X300]",
-"	3154  M24 1T [FireGL M24 GL]",
-"	3e50  RV380 0x3e50 [Radeon X600]",
-"	3e54  RV380 0x3e54 [FireGL V3200]",
-"	3e70  RV380 [Radeon X600] Secondary",
-"	4136  Radeon IGP 320 M",
-"	4137  Radeon IGP330/340/350",
-"	4144  R300 AD [Radeon 9500 Pro]",
-"	4145  R300 AE [Radeon 9700 Pro]",
-"	4146  R300 AF [Radeon 9700 Pro]",
-"	4147  R300 AG [FireGL Z1/X1]",
-"	4148  R350 AH [Radeon 9800]",
-"	4149  R350 AI [Radeon 9800]",
-"	414a  R350 AJ [Radeon 9800]",
-"	414b  R350 AK [Fire GL X2]",
-"	4150  RV350 AP [Radeon 9600]",
-"		1002 0002  R9600 Pro primary (Asus OEM for HP)",
-"		1002 0003  R9600 Pro secondary (Asus OEM for HP)",
-"		1002 4722  All-in-Wonder 2006 AGP Edition",
-"		1458 4024  Giga-Byte GV-R96128D Primary",
-"		148c 2064  PowerColor R96A-C3N",
-"		148c 2066  PowerColor R96A-C3N",
-"		174b 7c19  Sapphire Atlantis Radeon 9600 Pro",
-"		174b 7c29  GC-R9600PRO Primary [Sapphire]",
-"		17ee 2002  Radeon 9600 256Mb Primary",
-"		18bc 0101  GC-R9600PRO Primary",
-"	4151  RV350 AQ [Radeon 9600]",
-"		1043 c004  A9600SE",
-"	4152  RV350 AR [Radeon 9600]",
-"		1002 0002  Radeon 9600XT",
-"		1002 4772  All-in-Wonder 9600 XT",
-"		1043 c002  Radeon 9600 XT TVD",
-"		1043 c01a  A9600XT/TD",
-"		174b 7c29  Sapphire Radeon 9600XT",
-"		1787 4002  Radeon 9600 XT",
-"	4153  RV350 AS [Radeon 9550]",
-"		1462 932c  865PE Neo2-V (MS-6788) mainboard",
-"	4154  RV350 AT [Fire GL T2]",
-"	4155  RV350 AU [Fire GL T2]",
-"	4156  RV350 AV [Fire GL T2]",
-"	4157  RV350 AW [Fire GL T2]",
-"	4158  68800AX [Mach32]",
-"	4164  R300 AD [Radeon 9500 Pro] (Secondary)",
-"	4165  R300 AE [Radeon 9700 Pro] (Secondary)",
-"	4166  R300 AF [Radeon 9700 Pro] (Secondary)",
-"	4168  Radeon R350 [Radeon 9800] (Secondary)",
-"	4170  RV350 AP [Radeon 9600] (Secondary)",
-"		1002 0003  R9600 Pro secondary (Asus OEM for HP)",
-"		1002 4723  All-in-Wonder 2006 AGP Edition (Secondary)",
-"		1458 4025  Giga-Byte GV-R96128D Secondary",
-"		148c 2067  PowerColor R96A-C3N (Secondary)",
-"		174b 7c28  GC-R9600PRO Secondary [Sapphire]",
-"		17ee 2003  Radeon 9600 256Mb Secondary",
-"		18bc 0100  GC-R9600PRO Secondary",
-"	4171  RV350 AQ [Radeon 9600] (Secondary)",
-"		1043 c005  A9600SE (Secondary)",
-"	4172  RV350 AR [Radeon 9600] (Secondary)",
-"		1002 0003  Radeon 9600XT (Secondary)",
-"		1002 4773  All-in-Wonder 9600 XT (Secondary)",
-"		1043 c003  A9600XT (Secondary)",
-"		1043 c01b  A9600XT/TD (Secondary)",
-"		174b 7c28  Sapphire Radeon 9600XT (Secondary)",
-"		1787 4003  Radeon 9600 XT (Secondary)",
-"	4173  RV350 \?\? [Radeon 9550] (Secondary)",
-"	4237  Radeon 7000 IGP",
-"	4242  R200 BB [Radeon All in Wonder 8500DV]",
-"		1002 02aa  Radeon 8500 AIW DV Edition",
-"	4243  R200 BC [Radeon All in Wonder 8500]",
-"	4336  Radeon Mobility U1",
-"		1002 4336  Pavilion ze4300 ATI Radeon Mobility U1 (IGP 320 M)",
-"		103c 0024  Pavilion ze4400 builtin Video",
-"		161f 2029  eMachines M5312 builtin Video",
-"	4337  Radeon IGP 330M/340M/350M",
-"		1014 053a  ThinkPad R40e (2684-HVG) builtin VGA controller",
-"		103c 0850  Radeon IGP 345M",
-"	4341  IXP150 AC'97 Audio Controller",
-"	4345  EHCI USB Controller",
-"	4347  OHCI USB Controller #1",
-"	4348  OHCI USB Controller #2",
-"	4349  ATI Dual Channel Bus Master PCI IDE Controller",
-"	434d  IXP AC'97 Modem",
-"	4353  ATI SMBus",
-"	4354  215CT [Mach64 CT]",
-"	4358  210888CX [Mach64 CX]",
-"	4363  ATI SMBus",
-"	436e  ATI 436E Serial ATA Controller",
-"	4370  IXP SB400 AC'97 Audio Controller",
-"		1025 0079  Aspire 5024WLMMi",
-"		103c 308b  MX6125",
-"		107b 0300  MX6421",
-"	4371  IXP SB400 PCI-PCI Bridge",
-"		103c 308b  MX6125",
-"	4372  IXP SB400 SMBus Controller",
-"		1025 0080  Aspire 5024WLMMi",
-"		103c 308b  MX6125",
-"	4373  IXP SB400 USB2 Host Controller",
-"		1025 0080  Aspire 5024WLMMi",
-"		103c 308b  MX6125",
-"	4374  IXP SB400 USB Host Controller",
-"		103c 308b  MX6125",
-"	4375  IXP SB400 USB Host Controller",
-"		1025 0080  Aspire 5024WLMMi",
-"		103c 308b  MX6125",
-"	4376  Standard Dual Channel PCI IDE Controller ATI",
-"		1025 0080  Aspire 5024WLMMi",
-"		103c 308b  MX6125",
-"	4377  IXP SB400 PCI-ISA Bridge",
-"		1025 0080  Aspire 5024WLMi",
-"		103c 308b  MX6125",
-"	4378  ATI SB400 - AC'97 Modem Controller",
-"		1025 0080  Aspire 5024WLMMi",
-"		103c 308b  MX6125",
-"	4379  ATI 4379 Serial ATA Controller",
-"	437a  ATI 437A Serial ATA Controller",
-"	437b  SB450 HDA Audio",
-"	4380  SB600 Non-Raid-5 SATA",
-"	4381  SB600 Raid-5 SATA",
-"	4382  SB600 AC97 Audio",
-"	4383  SB600 Azalia",
-"	4384  SB600 PCI to PCI Bridge",
-"	4385  SB600 SMBus",
-"	4386  SB600 USB Controller (EHCI)",
-"	4387  SB600 USB (OHCI0)",
-"	4388  SB600 USB (OHCI1)",
-"	4389  SB600 USB (OHCI2)",
-"	438a  SB600 USB (OHCI3)",
-"	438b  SB600 USB (OHCI4)",
-"	438c  SB600 IDE",
-"	438d  SB600 PCI to LPC Bridge",
-"	438e  SB600 AC97 Modem",
-"	4437  Radeon Mobility 7000 IGP",
-"	4554  210888ET [Mach64 ET]",
-"	4654  Mach64 VT",
-"	4742  3D Rage Pro AGP 1X/2X",
-"		1002 0040  Rage Pro Turbo AGP 2X",
-"		1002 0044  Rage Pro Turbo AGP 2X",
-"		1002 0061  Rage Pro AIW AGP 2X",
-"		1002 0062  Rage Pro AIW AGP 2X",
-"		1002 0063  Rage Pro AIW AGP 2X",
-"		1002 0080  Rage Pro Turbo AGP 2X",
-"		1002 0084  Rage Pro Turbo AGP 2X",
-"		1002 4742  Rage Pro Turbo AGP 2X",
-"		1002 8001  Rage Pro Turbo AGP 2X",
-"		1028 0082  Rage Pro Turbo AGP 2X",
-"		1028 4082  Optiplex GX1 Onboard Display Adapter",
-"		1028 8082  Rage Pro Turbo AGP 2X",
-"		1028 c082  Rage Pro Turbo AGP 2X",
-"		8086 4152  Xpert 98D AGP 2X",
-"		8086 464a  Rage Pro Turbo AGP 2X",
-"	4744  3D Rage Pro AGP 1X",
-"		1002 4744  Rage Pro Turbo AGP",
-"	4747  3D Rage Pro",
-"	4749  3D Rage Pro",
-"		1002 0061  Rage Pro AIW",
-"		1002 0062  Rage Pro AIW",
-"	474c  Rage XC",
-"	474d  Rage XL AGP 2X",
-"		1002 0004  Xpert 98 RXL AGP 2X",
-"		1002 0008  Xpert 98 RXL AGP 2X",
-"		1002 0080  Rage XL AGP 2X",
-"		1002 0084  Xpert 98 AGP 2X",
-"		1002 474d  Rage XL AGP",
-"		1033 806a  Rage XL AGP",
-"	474e  Rage XC AGP",
-"		1002 474e  Rage XC AGP",
-"	474f  Rage XL",
-"		1002 0008  Rage XL",
-"		1002 474f  Rage XL",
-"	4750  3D Rage Pro 215GP",
-"		1002 0040  Rage Pro Turbo",
-"		1002 0044  Rage Pro Turbo",
-"		1002 0080  Rage Pro Turbo",
-"		1002 0084  Rage Pro Turbo",
-"		1002 4750  Rage Pro Turbo",
-"	4751  3D Rage Pro 215GQ",
-"	4752  Rage XL",
-"		0e11 001e  Proliant Rage XL",
-"		1002 0008  Rage XL",
-"		1002 4752  Proliant Rage XL",
-"		1002 8008  Rage XL",
-"		1028 00ce  PowerEdge 1400",
-"		1028 00d1  PowerEdge 2550",
-"		1028 00d9  PowerEdge 2500",
-"		1028 0134  Poweredge SC600",
-"		103c 10e1  NetServer Rage XL",
-"		1734 007a  Primergy RX300",
-"		8086 3411  SDS2 Mainboard",
-"		8086 3427  S875WP1-E mainboard",
-"	4753  Rage XC",
-"		1002 4753  Rage XC",
-"	4754  3D Rage I/II 215GT [Mach64 GT]",
-"	4755  3D Rage II+ 215GTB [Mach64 GTB]",
-"	4756  3D Rage IIC 215IIC [Mach64 GT IIC]",
-"		1002 4756  Rage IIC",
-"	4757  3D Rage IIC AGP",
-"		1002 4757  Rage IIC AGP",
-"		1028 0089  Rage 3D IIC",
-"		1028 008e  PowerEdge 1300 onboard video",
-"		1028 4082  Rage 3D IIC",
-"		1028 8082  Rage 3D IIC",
-"		1028 c082  Rage 3D IIC",
-"	4758  210888GX [Mach64 GX]",
-"	4759  3D Rage IIC",
-"	475a  3D Rage IIC AGP",
-"		1002 0084  Rage 3D Pro AGP 2x XPERT 98",
-"		1002 0087  Rage 3D IIC",
-"		1002 475a  Rage IIC AGP",
-"	4964  Radeon RV250 Id [Radeon 9000]",
-"	4965  Radeon RV250 Ie [Radeon 9000]",
-"	4966  Radeon RV250 If [Radeon 9000]",
-"		10f1 0002  RV250 If [Tachyon G9000 PRO]",
-"		148c 2039  RV250 If [Radeon 9000 Pro 'Evil Commando']",
-"		1509 9a00  RV250 If [Radeon 9000 'AT009']",
-"		1681 0040  RV250 If [3D prophet 9000]",
-"		174b 7176  RV250 If [Sapphire Radeon 9000 Pro]",
-"		174b 7192  RV250 If [Radeon 9000 'Atlantis']",
-"		17af 2005  RV250 If [Excalibur Radeon 9000 Pro]",
-"		17af 2006  RV250 If [Excalibur Radeon 9000]",
-"	4967  Radeon RV250 Ig [Radeon 9000]",
-"	496e  Radeon RV250 [Radeon 9000] (Secondary)",
-"	4a48  R420 JH [Radeon X800]",
-"	4a49  R420 JI [Radeon X800PRO]",
-"	4a4a  R420 JJ [Radeon X800SE]",
-"	4a4b  R420 JK [Radeon X800]",
-"	4a4c  R420 JL [Radeon X800]",
-"	4a4d  R420 JM [FireGL X3]",
-"	4a4e  M18 JN [Radeon Mobility 9800]",
-"	4a50  R420 JP [Radeon X800XT]",
-"	4a70  R420 [X800XT-PE] (Secondary)",
-"	4b49  R480 [Radeon X850XT]",
-"	4b4b  R480 [Radeon X850Pro]",
-"	4b4c  R481 [Radeon X850XT-PE]",
-"	4b69  R480 [Radeon X850XT] (Secondary)",
-"	4b6b  R480 [Radeon X850Pro] (Secondary)",
-"	4b6c  R481 [Radeon X850XT-PE] (Secondary)",
-"	4c42  3D Rage LT Pro AGP-133",
-"		0e11 b0e7  Rage LT Pro (Compaq Presario 5240)",
-"		0e11 b0e8  Rage 3D LT Pro",
-"		0e11 b10e  3D Rage LT Pro (Compaq Armada 1750)",
-"		1002 0040  Rage LT Pro AGP 2X",
-"		1002 0044  Rage LT Pro AGP 2X",
-"		1002 4c42  Rage LT Pro AGP 2X",
-"		1002 8001  Rage LT Pro AGP 2X",
-"		1028 0085  Rage 3D LT Pro",
-"	4c44  3D Rage LT Pro AGP-66",
-"	4c45  Rage Mobility M3 AGP",
-"	4c46  Rage Mobility M3 AGP 2x",
-"		1028 00b1  Latitude C600",
-"	4c47  3D Rage LT-G 215LG",
-"	4c49  3D Rage LT Pro",
-"		1002 0004  Rage LT Pro",
-"		1002 0040  Rage LT Pro",
-"		1002 0044  Rage LT Pro",
-"		1002 4c49  Rage LT Pro",
-"	4c4d  Rage Mobility P/M AGP 2x",
-"		0e11 b111  Armada M700",
-"		0e11 b160  Armada E500",
-"		1002 0084  Xpert 98 AGP 2X (Mobility)",
-"		1014 0154  ThinkPad A20m/A21m",
-"		1028 00aa  Latitude CPt",
-"		1028 00bb  Latitude CPx",
-"		10e1 10cf  Fujitsu Siemens LifeBook C Series",
-"		1179 ff00  Satellite 1715XCDS laptop",
-"		13bd 1019  PC-AR10",
-"	4c4e  Rage Mobility L AGP 2x",
-"	4c50  3D Rage LT Pro",
-"		1002 4c50  Rage LT Pro",
-"	4c51  3D Rage LT Pro",
-"	4c52  Rage Mobility P/M",
-"		1033 8112  Versa Note VXi",
-"	4c53  Rage Mobility L",
-"	4c54  264LT [Mach64 LT]",
-"	4c57  Radeon Mobility M7 LW [Radeon Mobility 7500]",
-"		1014 0517  ThinkPad T30",
-"		1028 00e6  Radeon Mobility M7 LW (Dell Inspiron 8100)",
-"		1028 012a  Latitude C640",
-"		144d c006  Radeon Mobility M7 LW in vpr Matrix 170B4",
-"	4c58  Radeon RV200 LX [Mobility FireGL 7800 M7]",
-"	4c59  Radeon Mobility M6 LY",
-"		0e11 b111  Evo N600c",
-"		1014 0235  ThinkPad A30/A30p (2652/2653)",
-"		1014 0239  ThinkPad X22/X23/X24",
-"		104d 80e7  VAIO PCG-GR214EP/GR214MP/GR215MP/GR314MP/GR315MP",
-"		104d 8140  PCG-Z1SP laptop",
-"		1509 1930  Medion MD9703",
-"	4c5a  Radeon Mobility M6 LZ",
-"	4c64  Radeon R250 Ld [Radeon Mobility 9000 M9]",
-"	4c65  Radeon R250 Le [Radeon Mobility 9000 M9]",
-"	4c66  Radeon R250 [Radeon Mobility 9200]",
-"	4c67  Radeon R250 Lg [Radeon Mobility 9000 M9]",
-"	4c6e  Radeon R250 Ln [Radeon Mobility 9000 M9] [Secondary]",
-"	4d46  Rage Mobility M4 AGP",
-"	4d4c  Rage Mobility M4 AGP",
-"	4e44  Radeon R300 ND [Radeon 9700 Pro]",
-"		1002 515e  Radeon ES1000",
-"		1002 5965  Radeon ES1000",
-"	4e45  Radeon R300 NE [Radeon 9500 Pro]",
-"		1002 0002  Radeon R300 NE [Radeon 9500 Pro]",
-"		1681 0002  Hercules 3D Prophet 9500 PRO [Radeon 9500 Pro]",
-"	4e46  RV350 NF [Radeon 9600]",
-"	4e47  Radeon R300 NG [FireGL X1]",
-"	4e48  Radeon R350 [Radeon 9800 Pro]",
-"	4e49  Radeon R350 [Radeon 9800]",
-"	4e4a  RV350 NJ [Radeon 9800 XT]",
-"	4e4b  R350 NK [Fire GL X2]",
-"	4e50  RV350 [Mobility Radeon 9600 M10]",
-"		1025 005a  TravelMate 290",
-"		103c 088c  NC8000 laptop",
-"		103c 0890  NC6000 laptop",
-"		1462 0311  MSI M510A",
-"		1734 1055  Amilo M1420W",
-"	4e51  M10 NQ [Radeon Mobility 9600]",
-"	4e52  RV350 [Mobility Radeon 9600 M10]",
-"	4e53  M10 NS [Radeon Mobility 9600]",
-"	4e54  M10 NT [FireGL Mobility T2]",
-"	4e56  M11 NV [FireGL Mobility T2e]",
-"	4e64  Radeon R300 [Radeon 9700 Pro] (Secondary)",
-"	4e65  Radeon R300 [Radeon 9500 Pro] (Secondary)",
-"		1002 0003  Radeon R300 NE [Radeon 9500 Pro]",
-"		1681 0003  Hercules 3D Prophet 9500 PRO [Radeon 9500 Pro] (Secondary)",
-"	4e66  RV350 NF [Radeon 9600] (Secondary)",
-"	4e67  Radeon R300 [FireGL X1] (Secondary)",
-"	4e68  Radeon R350 [Radeon 9800 Pro] (Secondary)",
-"	4e69  Radeon R350 [Radeon 9800] (Secondary)",
-"	4e6a  RV350 NJ [Radeon 9800 XT] (Secondary)",
-"		1002 4e71  ATI Technologies Inc M10 NQ [Radeon Mobility 9600]",
-"	4e71  M10 NQ [Radeon Mobility 9600] (Secondary)",
-"	4f72  RV250 [Radeon 9000 Series]",
-"	4f73  Radeon RV250 [Radeon 9000 Series] (Secondary)",
-"	5041  Rage 128 PA/PRO",
-"	5042  Rage 128 PB/PRO AGP 2x",
-"	5043  Rage 128 PC/PRO AGP 4x",
-"	5044  Rage 128 PD/PRO TMDS",
-"		1002 0028  Rage 128 AIW",
-"		1002 0029  Rage 128 AIW",
-"	5045  Rage 128 PE/PRO AGP 2x TMDS",
-"	5046  Rage 128 PF/PRO AGP 4x TMDS",
-"		1002 0004  Rage Fury Pro",
-"		1002 0008  Rage Fury Pro/Xpert 2000 Pro",
-"		1002 0014  Rage Fury Pro",
-"		1002 0018  Rage Fury Pro/Xpert 2000 Pro",
-"		1002 0028  Rage 128 Pro AIW AGP",
-"		1002 002a  Rage 128 Pro AIW AGP",
-"		1002 0048  Rage Fury Pro",
-"		1002 2000  Rage Fury MAXX AGP 4x (TMDS) (VGA device)",
-"		1002 2001  Rage Fury MAXX AGP 4x (TMDS) (Extra device\?!)",
-"	5047  Rage 128 PG/PRO",
-"	5048  Rage 128 PH/PRO AGP 2x",
-"	5049  Rage 128 PI/PRO AGP 4x",
-"	504a  Rage 128 PJ/PRO TMDS",
-"	504b  Rage 128 PK/PRO AGP 2x TMDS",
-"	504c  Rage 128 PL/PRO AGP 4x TMDS",
-"	504d  Rage 128 PM/PRO",
-"	504e  Rage 128 PN/PRO AGP 2x",
-"	504f  Rage 128 PO/PRO AGP 4x",
-"	5050  Rage 128 PP/PRO TMDS [Xpert 128]",
-"		1002 0008  Xpert 128",
-"	5051  Rage 128 PQ/PRO AGP 2x TMDS",
-"	5052  Rage 128 PR/PRO AGP 4x TMDS",
-"	5053  Rage 128 PS/PRO",
-"	5054  Rage 128 PT/PRO AGP 2x",
-"	5055  Rage 128 PU/PRO AGP 4x",
-"	5056  Rage 128 PV/PRO TMDS",
-"	5057  Rage 128 PW/PRO AGP 2x TMDS",
-"	5058  Rage 128 PX/PRO AGP 4x TMDS",
-"	5144  Radeon R100 QD [Radeon 7200]",
-"		1002 0008  Radeon 7000/Radeon VE",
-"		1002 0009  Radeon 7000/Radeon",
-"		1002 000a  Radeon 7000/Radeon",
-"		1002 001a  Radeon 7000/Radeon",
-"		1002 0029  Radeon AIW",
-"		1002 0038  Radeon 7000/Radeon",
-"		1002 0039  Radeon 7000/Radeon",
-"		1002 008a  Radeon 7000/Radeon",
-"		1002 00ba  Radeon 7000/Radeon",
-"		1002 0139  Radeon 7000/Radeon",
-"		1002 028a  Radeon 7000/Radeon",
-"		1002 02aa  Radeon AIW",
-"		1002 053a  Radeon 7000/Radeon",
-"	5145  Radeon R100 QE",
-"	5146  Radeon R100 QF",
-"	5147  Radeon R100 QG",
-"	5148  Radeon R200 QH [Radeon 8500]",
-"		1002 010a  FireGL 8800 64Mb",
-"		1002 0152  FireGL 8800 128Mb",
-"		1002 0162  FireGL 8700 32Mb",
-"		1002 0172  FireGL 8700 64Mb",
-"	5149  Radeon R200 QI",
-"	514a  Radeon R200 QJ",
-"	514b  Radeon R200 QK",
-"	514c  Radeon R200 QL [Radeon 8500 LE]",
-"		1002 003a  Radeon R200 QL [Radeon 8500 LE]",
-"		1002 013a  Radeon 8500",
-"		148c 2026  R200 QL [Radeon 8500 Evil Master II Multi Display Edition]",
-"		1681 0010  Radeon 8500 [3D Prophet 8500 128Mb]",
-"		174b 7149  Radeon R200 QL [Sapphire Radeon 8500 LE]",
-"	514d  Radeon R200 QM [Radeon 9100]",
-"	514e  Radeon R200 QN [Radeon 8500LE]",
-"	514f  Radeon R200 QO [Radeon 8500LE]",
-"	5154  R200 QT [Radeon 8500]",
-"	5155  R200 QU [Radeon 9100]",
-"	5157  Radeon RV200 QW [Radeon 7500]",
-"		1002 013a  Radeon 7500",
-"		1002 103a  Dell Optiplex GX260",
-"		1458 4000  RV200 QW [RADEON 7500 PRO MAYA AR]",
-"		148c 2024  RV200 QW [Radeon 7500LE Dual Display]",
-"		148c 2025  RV200 QW [Radeon 7500 Evil Master Multi Display Edition]",
-"		148c 2036  RV200 QW [Radeon 7500 PCI Dual Display]",
-"		174b 7146  RV200 QW [Radeon 7500 LE]",
-"		174b 7147  RV200 QW [Sapphire Radeon 7500LE]",
-"		174b 7161  Radeon RV200 QW [Radeon 7500 LE]",
-"		17af 0202  RV200 QW [Excalibur Radeon 7500LE]",
-"	5158  Radeon RV200 QX [Radeon 7500]",
-"	5159  Radeon RV100 QY [Radeon 7000/VE]",
-"		1002 000a  Radeon 7000/Radeon VE",
-"		1002 000b  Radeon 7000",
-"		1002 0038  Radeon 7000/Radeon VE",
-"		1002 003a  Radeon 7000/Radeon VE",
-"		1002 00ba  Radeon 7000/Radeon VE",
-"		1002 013a  Radeon 7000/Radeon VE",
-"		1002 0908  XVR-100 (supplied by Sun)",
-"		1014 029a  Remote Supervisor Adapter II (RSA2)",
-"		1014 02c8  IBM eServer xSeries server mainboard",
-"		1028 019a  PowerEdge SC1425",
-"		1458 4002  RV100 QY [RADEON 7000 PRO MAYA AV Series]",
-"		148c 2003  RV100 QY [Radeon 7000 Multi-Display Edition]",
-"		148c 2023  RV100 QY [Radeon 7000 Evil Master Multi-Display]",
-"		174b 7112  RV100 QY [Sapphire Radeon VE 7000]",
-"		174b 7c28  Sapphire Radeon VE 7000 DDR",
-"		1787 0202  RV100 QY [Excalibur Radeon 7000]",
-"	515a  Radeon RV100 QZ [Radeon 7000/VE]",
-"	515e  ES1000",
-"	515f  ES1000",
-"	5168  Radeon R200 Qh",
-"	5169  Radeon R200 Qi",
-"	516a  Radeon R200 Qj",
-"	516b  Radeon R200 Qk",
-"	516c  Radeon R200 Ql",
-"	5245  Rage 128 RE/SG",
-"		1002 0008  Xpert 128",
-"		1002 0028  Rage 128 AIW",
-"		1002 0029  Rage 128 AIW",
-"		1002 0068  Rage 128 AIW",
-"	5246  Rage 128 RF/SG AGP",
-"		1002 0004  Magnum/Xpert 128/Xpert 99",
-"		1002 0008  Magnum/Xpert128/X99/Xpert2000",
-"		1002 0028  Rage 128 AIW AGP",
-"		1002 0044  Rage Fury/Xpert 128/Xpert 2000",
-"		1002 0068  Rage 128 AIW AGP",
-"		1002 0448  Rage Fury",
-"	5247  Rage 128 RG",
-"	524b  Rage 128 RK/VR",
-"	524c  Rage 128 RL/VR AGP",
-"		1002 0008  Xpert 99/Xpert 2000",
-"		1002 0088  Xpert 99",
-"	5345  Rage 128 SE/4x",
-"	5346  Rage 128 SF/4x AGP 2x",
-"		1002 0048  RAGE 128 16MB VGA TVOUT AMC PAL",
-"	5347  Rage 128 SG/4x AGP 4x",
-"	5348  Rage 128 SH",
-"	534b  Rage 128 SK/4x",
-"	534c  Rage 128 SL/4x AGP 2x",
-"	534d  Rage 128 SM/4x AGP 4x",
-"		1002 0008  Xpert 99/Xpert 2000",
-"		1002 0018  Xpert 2000",
-"	534e  Rage 128 4x",
-"	5354  Mach 64 VT",
-"		1002 5654  Mach 64 reference",
-"	5446  Rage 128 Pro Ultra TF",
-"		1002 0004  Rage Fury Pro",
-"		1002 0008  Rage Fury Pro/Xpert 2000 Pro",
-"		1002 0018  Rage Fury Pro/Xpert 2000 Pro",
-"		1002 0028  Rage 128 AIW Pro AGP",
-"		1002 0029  Rage 128 AIW",
-"		1002 002a  Rage 128 AIW Pro AGP",
-"		1002 002b  Rage 128 AIW",
-"		1002 0048  Xpert 2000 Pro",
-"	544c  Rage 128 Pro Ultra TL",
-"	5452  Rage 128 Pro Ultra TR",
-"		1002 001c  Rage 128 Pro 4XL",
-"		103c 1279  Rage 128 Pro 4XL",
-"	5453  Rage 128 Pro Ultra TS",
-"	5454  Rage 128 Pro Ultra TT",
-"	5455  Rage 128 Pro Ultra TU",
-"	5460  M22 [Radeon Mobility M300]",
-"	5462  M24 [Radeon Mobility X600]",
-"	5464  M22 [FireGL GL]",
-"	5548  R423 UH [Radeon X800 (PCIE)]",
-"	5549  R423 UI [Radeon X800PRO (PCIE)]",
-"	554a  R423 UJ [Radeon X800LE (PCIE)]",
-"	554b  R423 UK [Radeon X800SE (PCIE)]",
-"	554d  R430 [Radeon X800 XL] (PCIe)",
-"	554f  R430 [Radeon X800 (PCIE)]",
-"	5550  R423 [Fire GL V7100]",
-"	5551  R423 UQ [FireGL V7200 (PCIE)]",
-"	5552  R423 UR [FireGL V5100 (PCIE)]",
-"	5554  R423 UT [FireGL V7100 (PCIE)]",
-"	556b  Radeon R423 UK (PCIE) [X800 SE] (Secondary)",
-"	556d  R430 [Radeon X800 XL] (PCIe) Secondary",
-"	556f  R430 [Radeon X800 (PCIE) Secondary]",
-"	564a  M26 [Mobility FireGL V5000]",
-"	564b  M26 [Mobility FireGL V5000]",
-"	564f  M26 [Radeon Mobility X700 XL] (PCIE)",
-"	5652  M26 [Radeon Mobility X700]",
-"	5653  Radeon Mobility X700 (PCIE)",
-"		1025 0080  Aspire 5024WLMi",
-"	5654  264VT [Mach64 VT]",
-"		1002 5654  Mach64VT Reference",
-"	5655  264VT3 [Mach64 VT3]",
-"	5656  264VT4 [Mach64 VT4]",
-"	5830  RS300 Host Bridge",
-"	5831  RS300 Host Bridge",
-"	5832  RS300 Host Bridge",
-"	5833  Radeon 9100 IGP Host Bridge",
-"	5834  Radeon 9100 IGP",
-"	5835  RS300M AGP [Radeon Mobility 9100IGP]",
-"	5838  Radeon 9100 IGP AGP Bridge",
-"	5940  RV280 [Radeon 9200 PRO] (Secondary)",
-"	5941  RV280 [Radeon 9200] (Secondary)",
-"		1458 4019  Gigabyte Radeon 9200",
-"		174b 7c12  Sapphire Radeon 9200",
-"		17af 200d  Excalibur Radeon 9200",
-"		18bc 0050  GeXcube GC-R9200-C3 (Secondary)",
-"	5944  RV280 [Radeon 9200 SE (PCI)]",
-"	5950  RS480 Host Bridge",
-"		1025 0080  Aspire 5024WLMMi",
-"		103c 308b  MX6125",
-"	5951  ATI Radeon Xpress 200 (RS480/RS482/RX480/RX482) Chipset - Host bridge",
-"	5954  RS480 [Radeon Xpress 200G Series]",
-"		1002 5954  RV370 [Radeon Xpress 200G Series]",
-"	5955  ATI Radeon XPRESS 200M 5955 (PCIE)",
-"		1002 5955  RS480 0x5955 [ATI Radeon XPRESS 200M 5955 (PCIE)]",
-"		103c 308b  MX6125",
-"	5960  RV280 [Radeon 9200 PRO]",
-"	5961  RV280 [Radeon 9200]",
-"		1002 2f72  All-in-Wonder 9200 Series",
-"		1019 4c30  Radeon 9200 VIVO",
-"		12ab 5961  YUAN SMARTVGA Radeon 9200",
-"		1458 4018  Gigabyte Radeon 9200",
-"		174b 7c13  Sapphire Radeon 9200",
-"		17af 200c  Excalibur Radeon 9200",
-"		18bc 0050  Radeon 9200 Game Buster",
-"		18bc 0051  GeXcube GC-R9200-C3",
-"		18bc 0053  Radeon 9200 Game Buster VIVO",
-"	5962  RV280 [Radeon 9200]",
-"	5964  RV280 [Radeon 9200 SE]",
-"		1043 c006  ASUS Radeon 9200 SE / TD / 128M",
-"		1458 4018  Radeon 9200 SE",
-"		1458 4032  Radeon 9200 SE 128MB",
-"		147b 6191  R9200SE-DT",
-"		148c 2073  CN-AG92E",
-"		174b 7c13  Sapphire Radeon 9200 SE",
-"		1787 5964  Excalibur 9200SE VIVO 128M",
-"		17af 2012  Radeon 9200 SE Excalibur",
-"		18bc 0170  Sapphire Radeon 9200 SE 128MB Game Buster",
-"		18bc 0173  GC-R9200L(SE)-C3H [Radeon 9200 Game Buster]",
-"	5969  ES1000",
-"	5974  RS482 [Radeon Xpress 200]",
-"	5975  RS482 [Radeon Xpress 200M]",
-"	5a34  RS480 PCI-X Root Port",
-"	5a36  RS480 PCI Bridge",
-"	5a38  RS480 PCI Bridge",
-"	5a39  RS480 PCI Bridge",
-"	5a3f  RS480 PCI Bridge",
-"	5a41  RS400 [Radeon Xpress 200]",
-"	5a42  RS400 [Radeon Xpress 200M]",
-"	5a61  RC410 [Radeon Xpress 200]",
-"	5a62  RC410 [Radeon Xpress 200M]",
-"	5b60  RV370 5B60 [Radeon X300 (PCIE)]",
-"		1043 002a  Extreme AX300SE-X",
-"		1043 032e  Extreme AX300/TD",
-"		1462 0400  RX300SE-TD128E (MS-8940 REV:200)",
-"		1462 0402  RX300SE-TD128E (MS-8940)",
-"	5b62  RV370 5B62 [Radeon X600 (PCIE)]",
-"	5b63  RV370 [Sapphire X550 Silent]",
-"	5b64  RV370 5B64 [FireGL V3100 (PCIE)]",
-"	5b65  RV370 5B65 [FireGL D1100 (PCIE)]",
-"	5b70  RV370 [Radeon X300SE]",
-"		1462 0403  RX300SE-TD128E (MS-8940) (secondary display)",
-"	5b72  Radeon X600(RV380)",
-"	5b73  RV370 secondary [Sapphire X550 Silent]",
-"	5b74  RV370 5B64 [FireGL V3100 (PCIE)] (Secondary)",
-"	5c61  M9+ 5C61 [Radeon Mobility 9200 (AGP)]",
-"	5c63  M9+ 5C63 [Radeon Mobility 9200 (AGP)]",
-"		1002 5c63  Apple iBook G4 2004",
-"	5d44  RV280 [Radeon 9200 SE] (Secondary)",
-"		1458 4019  Radeon 9200 SE (Secondary)",
-"		1458 4032  Radeon 9200 SE 128MB",
-"		174b 7c12  Sapphire Radeon 9200 SE (Secondary)",
-"		1787 5965  Excalibur 9200SE VIVO 128M (Secondary)",
-"		17af 2013  Radeon 9200 SE Excalibur (Secondary)",
-"		18bc 0171  Radeon 9200 SE 128MB Game Buster (Secondary)",
-"		18bc 0172  GC-R9200L(SE)-C3H [Radeon 9200 Game Buster]",
-"	5d48  M28 [Radeon Mobility X800XT]",
-"	5d49  M28 [Mobility FireGL V5100]",
-"	5d4a  Mobility Radeon X800",
-"	5d4d  R480 [Radeon X850XT Platinum (PCIE)]",
-"	5d4f  R480 [Radeon X800 GTO (PCIE)]",
-"	5d52  R480 [Radeon X850XT (PCIE)] (Primary)",
-"		1002 0b12  PowerColor X850XT PCIe Primary",
-"		1002 0b13  PowerColor X850XT PCIe Secondary",
-"	5d57  R423 5F57 [Radeon X800XT (PCIE)]",
-"	5d6d  R480 [Radeon X850XT Platinum (PCIE)] (Secondary)",
-"	5d6f  R480 [Radeon X800 GTO (PCIE)] (Secondary)",
-"	5d72  R480 [Radeon X850XT (PCIE)] (Secondary)",
-"	5d77  R423 5F57 [Radeon X800XT (PCIE)] (Secondary)",
-"	5e48  RV410 [FireGL V5000]",
-"	5e49  RV410 [FireGL V3300]",
-"	5e4a  RV410 [Radeon X700XT]",
-"	5e4b  RV410 [Radeon X700 Pro (PCIE)]",
-"	5e4c  RV410 [Radeon X700SE]",
-"	5e4d  RV410 [Radeon X700 (PCIE)]",
-"		148c 2116  PowerColor Bravo X700",
-"	5e4f  RV410 [Radeon X700]",
-"	5e6b  RV410 [Radeon X700 Pro (PCIE)] Secondary",
-"	5e6d  RV410 [Radeon X700 (PCIE)] (Secondary)",
-"		148c 2117  PowerColor Bravo X700",
-"	5f57  R423 [Radeon X800XT (PCIE)]",
-"	700f  PCI Bridge [IGP 320M]",
-"	7010  PCI Bridge [IGP 340M]",
-"	7100  R520 [Radeon X1800]",
-"	7105  R520 [FireGL]",
-"	7109  R520 [Radeon X1800]",
-"		1002 0322  All-in-Wonder X1800XL",
-"		1002 0d02  Radeon X1800 CrossFire Edition",
-"	7120  R520 [Radeon X1800] (Secondary)",
-"	7129  R520 [Radeon X1800] (Secondary)",
-"		1002 0323  All-in-Wonder X1800XL (Secondary)",
-"		1002 0d03  Radeon X1800 CrossFire Edition (Secondary)",
-"	7142  RV515 [Radeon X1300]",
-"		1002 0322  All-in-Wonder 2006 PCI-E Edition",
-"	7145  Radeon Mobility X1400",
-"	7146  RV515 [Radeon X1300]",
-"		1002 0322  All-in-Wonder 2006 PCI-E Edition",
-"	7149  M52 [ATI Mobility Radeon X1300]",
-"	714a  M52 [ATI Mobility Radeon X1300]",
-"	714b  M52 [ATI Mobility Radeon X1300]",
-"	714c  M52 [ATI Mobility Radeon X1300]",
-"	7162  RV515 [Radeon X1300] (Secondary)",
-"		1002 0323  All-in-Wonder 2006 PCI-E Edition (Secondary)",
-"	7166  RV515 [Radeon X1300] (Secondary)",
-"		1002 0323  All-in-Wonder 2006 PCI-E Edition (Secondary)",
-"	71c0  RV530 [Radeon X1600]",
-"	71c2  RV530 [Radeon X1600]",
-"	71c4  M56GL [ATI Mobility FireGL V5200]",
-"	71c5  M56P [Radeon Mobility X1600]",
-"	71e0  RV530 [Radeon X1600] (Secondary)",
-"	71e2  RV530 [Radeon X1600] (Secondary)",
-"	7833  Radeon 9100 IGP Host Bridge",
-"	7834  Radeon 9100 PRO IGP",
-"	7835  Radeon Mobility 9200 IGP",
-"	7838  Radeon 9100 IGP PCI/AGP Bridge",
-"	7c37  RV350 AQ [Radeon 9600 SE]",
-"	cab0  AGP Bridge [IGP 320M]",
-"	cab2  RS200/RS200M AGP Bridge [IGP 340M]",
-"	cab3  R200 AGP Bridge [Mobility Radeon 7000 IGP]",
-"	cbb2  RS200/RS200M AGP Bridge [IGP 340M]",
-"1003  ULSI Systems",
-"	0201  US201",
-"1004  VLSI Technology Inc",
-"	0005  82C592-FC1",
-"	0006  82C593-FC1",
-"	0007  82C594-AFC2",
-"	0008  82C596/7 [Wildcat]",
-"	0009  82C597-AFC2",
-"	000c  82C541 [Lynx]",
-"	000d  82C543 [Lynx]",
-"	0101  82C532",
-"	0102  82C534 [Eagle]",
-"	0103  82C538",
-"	0104  82C535",
-"	0105  82C147",
-"	0200  82C975",
-"	0280  82C925",
-"	0304  QSound ThunderBird PCI Audio",
-"		1004 0304  QSound ThunderBird PCI Audio",
-"		122d 1206  DSP368 Audio",
-"		1483 5020  XWave Thunder 3D Audio",
-"	0305  QSound ThunderBird PCI Audio Gameport",
-"		1004 0305  QSound ThunderBird PCI Audio Gameport",
-"		122d 1207  DSP368 Audio Gameport",
-"		1483 5021  XWave Thunder 3D Audio Gameport",
-"	0306  QSound ThunderBird PCI Audio Support Registers",
-"		1004 0306  QSound ThunderBird PCI Audio Support Registers",
-"		122d 1208  DSP368 Audio Support Registers",
-"		1483 5022  XWave Thunder 3D Audio Support Registers",
-"	0307  Thunderbird",
-"	0308  Thunderbird",
-"	0702  VAS96011 [Golden Gate II]",
-"	0703  Tollgate",
-"1005  Avance Logic Inc. [ALI]",
-"	2064  ALG2032/2064",
-"	2128  ALG2364A",
-"	2301  ALG2301",
-"	2302  ALG2302",
-"	2364  ALG2364",
-"	2464  ALG2364A",
-"	2501  ALG2564A/25128A",
-"1006  Reply Group",
-"1007  NetFrame Systems Inc",
-"1008  Epson",
-"100a  Phoenix Technologies",
-"100b  National Semiconductor Corporation",
-"	0001  DP83810",
-"	0002  87415/87560 IDE",
-"	000e  87560 Legacy I/O",
-"	000f  FireWire Controller",
-"	0011  NS87560 National PCI System I/O",
-"	0012  USB Controller",
-"	0020  DP83815 (MacPhyter) Ethernet Controller",
-"		103c 0024  Pavilion ze4400 builtin Network",
-"		12d9 000c  Aculab E1/T1 PMXc cPCI carrier card",
-"		1385 f311  FA311 / FA312 (FA311 with WoL HW)",
-"	0021  PC87200 PCI to ISA Bridge",
-"	0022  DP83820 10/100/1000 Ethernet Controller",
-"	0028  Geode GX2 Host Bridge",
-"	002a  CS5535 South Bridge",
-"	002b  CS5535 ISA bridge",
-"	002d  CS5535 IDE",
-"	002e  CS5535 Audio",
-"	002f  CS5535 USB",
-"	0030  Geode GX2 Graphics Processor",
-"	0035  DP83065 [Saturn] 10/100/1000 Ethernet Controller",
-"	0500  SCx200 Bridge",
-"	0501  SCx200 SMI",
-"	0502  SCx200 IDE",
-"	0503  SCx200 Audio",
-"	0504  SCx200 Video",
-"	0505  SCx200 XBus",
-"	0510  SC1100 Bridge",
-"	0511  SC1100 SMI",
-"	0515  SC1100 XBus",
-"	d001  87410 IDE",
-"100c  Tseng Labs Inc",
-"	3202  ET4000/W32p rev A",
-"	3205  ET4000/W32p rev B",
-"	3206  ET4000/W32p rev C",
-"	3207  ET4000/W32p rev D",
-"	3208  ET6000",
-"	4702  ET6300",
-"100d  AST Research Inc",
-"100e  Weitek",
-"	9000  P9000 Viper",
-"	9001  P9000 Viper",
-"	9002  P9000 Viper",
-"	9100  P9100 Viper Pro/SE",
-"1010  Video Logic, Ltd.",
-"1011  Digital Equipment Corporation",
-"	0001  DECchip 21050",
-"	0002  DECchip 21040 [Tulip]",
-"	0004  DECchip 21030 [TGA]",
-"	0007  NVRAM [Zephyr NVRAM]",
-"	0008  KZPSA [KZPSA]",
-"	0009  DECchip 21140 [FasterNet]",
-"		1025 0310  21140 Fast Ethernet",
-"		10b8 2001  SMC9332BDT EtherPower 10/100",
-"		10b8 2002  SMC9332BVT EtherPower T4 10/100",
-"		10b8 2003  SMC9334BDT EtherPower 10/100 (1-port)",
-"		1109 2400  ANA-6944A/TX Fast Ethernet",
-"		1112 2300  RNS2300 Fast Ethernet",
-"		1112 2320  RNS2320 Fast Ethernet",
-"		1112 2340  RNS2340 Fast Ethernet",
-"		1113 1207  EN-1207-TX Fast Ethernet",
-"		1186 1100  DFE-500TX Fast Ethernet",
-"		1186 1112  DFE-570TX Fast Ethernet",
-"		1186 1140  DFE-660 Cardbus Ethernet 10/100",
-"		1186 1142  DFE-660 Cardbus Ethernet 10/100",
-"		11f6 0503  Freedomline Fast Ethernet",
-"		1282 9100  AEF-380TXD Fast Ethernet",
-"		1385 1100  FA310TX Fast Ethernet",
-"		2646 0001  KNE100TX Fast Ethernet",
-"	000a  21230 Video Codec",
-"	000d  PBXGB [TGA2]",
-"	000f  PCI-to-PDQ Interface Chip [PFI]",
-"		1011 def1  FDDI controller (DEFPA)",
-"		103c def1  FDDI controller (3X-DEFPA)",
-"	0014  DECchip 21041 [Tulip Pass 3]",
-"		1186 0100  DE-530+",
-"	0016  DGLPB [OPPO]",
-"	0017  PV-PCI Graphics Controller (ZLXp-L)",
-"	0019  DECchip 21142/43",
-"		1011 500a  DE500A Fast Ethernet",
-"		1011 500b  DE500B Fast Ethernet",
-"		1014 0001  10/100 EtherJet Cardbus",
-"		1025 0315  ALN315 Fast Ethernet",
-"		1033 800c  PC-9821-CS01 100BASE-TX Interface Card",
-"		1033 800d  PC-9821NR-B06 100BASE-TX Interface Card",
-"		108d 0016  Rapidfire 2327 10/100 Ethernet",
-"		108d 0017  GoCard 2250 Ethernet 10/100 Cardbus",
-"		10b8 2005  SMC8032DT Extreme Ethernet 10/100",
-"		10b8 8034  SMC8034 Extreme Ethernet 10/100",
-"		10ef 8169  Cardbus Fast Ethernet",
-"		1109 2a00  ANA-6911A/TX Fast Ethernet",
-"		1109 2b00  ANA-6911A/TXC Fast Ethernet",
-"		1109 3000  ANA-6922/TX Fast Ethernet",
-"		1113 1207  Cheetah Fast Ethernet",
-"		1113 2220  Cardbus Fast Ethernet",
-"		115d 0002  Cardbus Ethernet 10/100",
-"		1179 0203  Fast Ethernet",
-"		1179 0204  Cardbus Fast Ethernet",
-"		1186 1100  DFE-500TX Fast Ethernet",
-"		1186 1101  DFE-500TX Fast Ethernet",
-"		1186 1102  DFE-500TX Fast Ethernet",
-"		1186 1112  DFE-570TX Quad Fast Ethernet",
-"		1259 2800  AT-2800Tx Fast Ethernet",
-"		1266 0004  Eagle Fast EtherMAX",
-"		12af 0019  NetFlyer Cardbus Fast Ethernet",
-"		1374 0001  Cardbus Ethernet Card 10/100",
-"		1374 0002  Cardbus Ethernet Card 10/100",
-"		1374 0007  Cardbus Ethernet Card 10/100",
-"		1374 0008  Cardbus Ethernet Card 10/100",
-"		1385 2100  FA510",
-"		1395 0001  10/100 Ethernet CardBus PC Card",
-"		13d1 ab01  EtherFast 10/100 Cardbus (PCMPC200)",
-"		14cb 0100  LNDL-100N 100Base-TX Ethernet PC Card",
-"		8086 0001  EtherExpress PRO/100 Mobile CardBus 32",
-"	001a  Farallon PN9000SX Gigabit Ethernet",
-"	0021  DECchip 21052",
-"	0022  DECchip 21150",
-"	0023  DECchip 21150",
-"	0024  DECchip 21152",
-"	0025  DECchip 21153",
-"	0026  DECchip 21154",
-"	0034  56k Modem Cardbus",
-"		1374 0003  56k Modem Cardbus",
-"	0045  DECchip 21553",
-"	0046  DECchip 21554",
-"		0e11 4050  Integrated Smart Array",
-"		0e11 4051  Integrated Smart Array",
-"		0e11 4058  Integrated Smart Array",
-"		103c 10c2  Hewlett-Packard NetRAID-4M",
-"		12d9 000a  IP Telephony card",
-"		4c53 1050  CT7 mainboard",
-"		4c53 1051  CE7 mainboard",
-"		9005 0364  5400S (Mustang)",
-"		9005 0365  5400S (Mustang)",
-"		9005 1364  Dell PowerEdge RAID Controller 2",
-"		9005 1365  Dell PowerEdge RAID Controller 2",
-"		e4bf 1000  CC8-1-BLUES",
-"	1065  StrongARM DC21285",
-"		1069 0020  DAC960P / DAC1164P",
-"1012  Micronics Computers Inc",
-"1013  Cirrus Logic",
-"	0038  GD 7548",
-"	0040  GD 7555 Flat Panel GUI Accelerator",
-"	004c  GD 7556 Video/Graphics LCD/CRT Ctrlr",
-"	00a0  GD 5430/40 [Alpine]",
-"	00a2  GD 5432 [Alpine]",
-"	00a4  GD 5434-4 [Alpine]",
-"	00a8  GD 5434-8 [Alpine]",
-"	00ac  GD 5436 [Alpine]",
-"	00b0  GD 5440",
-"	00b8  GD 5446",
-"	00bc  GD 5480",
-"		1013 00bc  CL-GD5480",
-"	00d0  GD 5462",
-"	00d2  GD 5462 [Laguna I]",
-"	00d4  GD 5464 [Laguna]",
-"	00d5  GD 5464 BD [Laguna]",
-"	00d6  GD 5465 [Laguna]",
-"		13ce 8031  Barco Metheus 2 Megapixel, Dual Head",
-"		13cf 8031  Barco Metheus 2 Megapixel, Dual Head",
-"	00e8  GD 5436U",
-"	1100  CL 6729",
-"	1110  PD 6832 PCMCIA/CardBus Ctrlr",
-"	1112  PD 6834 PCMCIA/CardBus Ctrlr",
-"	1113  PD 6833 PCMCIA/CardBus Ctrlr",
-"	1200  GD 7542 [Nordic]",
-"	1202  GD 7543 [Viking]",
-"	1204  GD 7541 [Nordic Light]",
-"	4000  MD 5620 [CLM Data Fax Voice]",
-"	4400  CD 4400",
-"	6001  CS 4610/11 [CrystalClear SoundFusion Audio Accelerator]",
-"		1014 1010  CS4610 SoundFusion Audio Accelerator",
-"	6003  CS 4614/22/24 [CrystalClear SoundFusion Audio Accelerator]",
-"		1013 4280  Crystal SoundFusion PCI Audio Accelerator",
-"		1014 0153  ThinkPad A20m",
-"		153b 1136  SiXPack 5.1+",
-"		1681 0050  Game Theater XP",
-"		1681 a011  Fortissimo III 7.1",
-"	6004  CS 4614/22/24 [CrystalClear SoundFusion Audio Accelerator]",
-"	6005  Crystal CS4281 PCI Audio",
-"		1013 4281  Crystal CS4281 PCI Audio",
-"		10cf 10a8  Crystal CS4281 PCI Audio",
-"		10cf 10a9  Crystal CS4281 PCI Audio",
-"		10cf 10aa  Crystal CS4281 PCI Audio",
-"		10cf 10ab  Crystal CS4281 PCI Audio",
-"		10cf 10ac  Crystal CS4281 PCI Audio",
-"		10cf 10ad  Crystal CS4281 PCI Audio",
-"		10cf 10b4  Crystal CS4281 PCI Audio",
-"		1179 0001  Crystal CS4281 PCI Audio",
-"		14c0 000c  Crystal CS4281 PCI Audio",
-"1014  IBM",
-"	0002  PCI to MCA Bridge",
-"	0005  Alta Lite",
-"	0007  Alta MP",
-"	000a  Fire Coral",
-"	0017  CPU to PCI Bridge",
-"	0018  TR Auto LANstreamer",
-"	001b  GXT-150P",
-"	001c  Carrera",
-"	001d  82G2675",
-"	0020  GXT1000 Graphics Adapter",
-"	0022  IBM27-82351",
-"	002d  Python",
-"	002e  SCSI RAID Adapter [ServeRAID]",
-"		1014 002e  ServeRAID-3x",
-"		1014 022e  ServeRAID-4H",
-"	0031  2 Port Serial Adapter",
-"		1014 0031  2721 WAN IOA - 2 Port Sync Serial Adapter",
-"	0036  Miami",
-"	0037  82660 CPU to PCI Bridge",
-"	003a  CPU to PCI Bridge",
-"	003c  GXT250P/GXT255P Graphics Adapter",
-"	003e  16/4 Token ring UTP/STP controller",
-"		1014 003e  Token-Ring Adapter",
-"		1014 00cd  Token-Ring Adapter + Wake-On-LAN",
-"		1014 00ce  16/4 Token-Ring Adapter 2",
-"		1014 00cf  16/4 Token-Ring Adapter Special",
-"		1014 00e4  High-Speed 100/16/4 Token-Ring Adapter",
-"		1014 00e5  16/4 Token-Ring Adapter 2 + Wake-On-LAN",
-"		1014 016d  iSeries 2744 Card",
-"	0045  SSA Adapter",
-"	0046  MPIC interrupt controller",
-"	0047  PCI to PCI Bridge",
-"	0048  PCI to PCI Bridge",
-"	0049  Warhead SCSI Controller",
-"	004e  ATM Controller (14104e00)",
-"	004f  ATM Controller (14104f00)",
-"	0050  ATM Controller (14105000)",
-"	0053  25 MBit ATM Controller",
-"	0054  GXT500P/GXT550P Graphics Adapter",
-"	0057  MPEG PCI Bridge",
-"	005c  i82557B 10/100",
-"	005e  GXT800P Graphics Adapter",
-"	007c  ATM Controller (14107c00)",
-"	007d  3780IDSP [MWave]",
-"	008b  EADS PCI to PCI Bridge",
-"	008e  GXT3000P Graphics Adapter",
-"	0090  GXT 3000P",
-"		1014 008e  GXT-3000P",
-"	0091  SSA Adapter",
-"	0095  20H2999 PCI Docking Bridge",
-"	0096  Chukar chipset SCSI controller",
-"		1014 0097  iSeries 2778 DASD IOA",
-"		1014 0098  iSeries 2763 DASD IOA",
-"		1014 0099  iSeries 2748 DASD IOA",
-"	009f  PCI 4758 Cryptographic Accelerator",
-"	00a5  ATM Controller (1410a500)",
-"	00a6  ATM 155MBPS MM Controller (1410a600)",
-"	00b7  256-bit Graphics Rasterizer [Fire GL1]",
-"		1092 00b8  FireGL1 AGP 32Mb",
-"	00b8  GXT2000P Graphics Adapter",
-"	00be  ATM 622MBPS Controller (1410be00)",
-"	00dc  Advanced Systems Management Adapter (ASMA)",
-"	00fc  CPC710 Dual Bridge and Memory Controller (PCI-64)",
-"	0104  Gigabit Ethernet-SX Adapter",
-"	0105  CPC710 Dual Bridge and Memory Controller (PCI-32)",
-"	010f  Remote Supervisor Adapter (RSA)",
-"	0142  Yotta Video Compositor Input",
-"		1014 0143  Yotta Input Controller (ytin)",
-"	0144  Yotta Video Compositor Output",
-"		1014 0145  Yotta Output Controller (ytout)",
-"	0156  405GP PLB to PCI Bridge",
-"	015e  622Mbps ATM PCI Adapter",
-"	0160  64bit/66MHz PCI ATM 155 MMF",
-"	016e  GXT4000P Graphics Adapter",
-"	0170  GXT6000P Graphics Adapter",
-"	017d  GXT300P Graphics Adapter",
-"	0180  Snipe chipset SCSI controller",
-"		1014 0241  iSeries 2757 DASD IOA",
-"		1014 0264  Quad Channel PCI-X U320 SCSI RAID Adapter (2780)",
-"	0188  EADS-X PCI-X to PCI-X Bridge",
-"	01a7  PCI-X to PCI-X Bridge",
-"	01bd  ServeRAID Controller",
-"		1014 01be  ServeRAID-4M",
-"		1014 01bf  ServeRAID-4L",
-"		1014 0208  ServeRAID-4Mx",
-"		1014 020e  ServeRAID-4Lx",
-"		1014 022e  ServeRAID-4H",
-"		1014 0258  ServeRAID-5i",
-"		1014 0259  ServeRAID-5i",
-"	01c1  64bit/66MHz PCI ATM 155 UTP",
-"	01e6  Cryptographic Accelerator",
-"	01ff  10/100 Mbps Ethernet",
-"	0219  Multiport Serial Adapter",
-"		1014 021a  Dual RVX",
-"		1014 0251  Internal Modem/RVX",
-"		1014 0252  Quad Internal Modem",
-"	021b  GXT6500P Graphics Adapter",
-"	021c  GXT4500P Graphics Adapter",
-"	0233  GXT135P Graphics Adapter",
-"	0266  PCI-X Dual Channel SCSI",
-"	0268  Gigabit Ethernet-SX Adapter (PCI-X)",
-"	0269  10/100/1000 Base-TX Ethernet Adapter (PCI-X)",
-"	028c  Citrine chipset SCSI controller",
-"		1014 028d  Dual Channel PCI-X DDR SAS RAID Adapter (572E)",
-"		1014 02be  Dual Channel PCI-X DDR U320 SCSI RAID Adapter (571B)",
-"		1014 02c0  Dual Channel PCI-X DDR U320 SCSI Adapter (571A)",
-"		1014 030d  PCI-X DDR Auxiliary Cache Adapter (575B)",
-"	02a1  Calgary PCI-X Host Bridge",
-"	02bd  Obsidian chipset SCSI controller",
-"		1014 02c1  PCI-X DDR 3Gb SAS Adapter (572A/572C)",
-"		1014 02c2  PCI-X DDR 3Gb SAS RAID Adapter (572B/571D)",
-"	0302  Winnipeg PCI-X Host Bridge",
-"	0314  ZISC 036 Neural accelerator card",
-"	3022  QLA3022 Network Adapter",
-"	4022  QLA3022 Network Adapter",
-"	ffff  MPIC-2 interrupt controller",
-"1015  LSI Logic Corp of Canada",
-"1016  ICL Personal Systems",
-"1017  SPEA Software AG",
-"	5343  SPEA 3D Accelerator",
-"1018  Unisys Systems",
-"1019  Elitegroup Computer Systems",
-"101a  AT&T GIS (NCR)",
-"	0005  100VG ethernet",
-"101b  Vitesse Semiconductor",
-"101c  Western Digital",
-"	0193  33C193A",
-"	0196  33C196A",
-"	0197  33C197A",
-"	0296  33C296A",
-"	3193  7193",
-"	3197  7197",
-"	3296  33C296A",
-"	4296  34C296",
-"	9710  Pipeline 9710",
-"	9712  Pipeline 9712",
-"	c24a  90C",
-"101e  American Megatrends Inc.",
-"	0009  MegaRAID 428 Ultra RAID Controller (rev 03)",
-"	1960  MegaRAID",
-"		101e 0471  MegaRAID 471 Enterprise 1600 RAID Controller",
-"		101e 0475  MegaRAID 475 Express 500/500LC RAID Controller",
-"		101e 0477  MegaRAID 477 Elite 3100 RAID Controller",
-"		101e 0493  MegaRAID 493 Elite 1600 RAID Controller",
-"		101e 0494  MegaRAID 494 Elite 1650 RAID Controller",
-"		101e 0503  MegaRAID 503 Enterprise 1650 RAID Controller",
-"		101e 0511  MegaRAID 511 i4 IDE RAID Controller",
-"		101e 0522  MegaRAID 522 i4133 RAID Controller",
-"		1028 0471  PowerEdge RAID Controller 3/QC",
-"		1028 0475  PowerEdge RAID Controller 3/SC",
-"		1028 0493  PowerEdge RAID Controller 3/DC",
-"		1028 0511  PowerEdge Cost Effective RAID Controller ATA100/4Ch",
-"		103c 60e7  NetRAID-1M",
-"	9010  MegaRAID 428 Ultra RAID Controller",
-"	9030  EIDE Controller",
-"	9031  EIDE Controller",
-"	9032  EIDE & SCSI Controller",
-"	9033  SCSI Controller",
-"	9040  Multimedia card",
-"	9060  MegaRAID 434 Ultra GT RAID Controller",
-"	9063  MegaRAC",
-"		101e 0767  Dell Remote Assistant Card 2",
-"101f  PictureTel",
-"1020  Hitachi Computer Products",
-"1021  OKI Electric Industry Co. Ltd.",
-"1022  Advanced Micro Devices [AMD]",
-"	1100  K8 [Athlon64/Opteron] HyperTransport Technology Configuration",
-"	1101  K8 [Athlon64/Opteron] Address Map",
-"	1102  K8 [Athlon64/Opteron] DRAM Controller",
-"	1103  K8 [Athlon64/Opteron] Miscellaneous Control",
-"	2000  79c970 [PCnet32 LANCE]",
-"		1014 2000  NetFinity 10/100 Fast Ethernet",
-"		1022 2000  PCnet - Fast 79C971",
-"		103c 104c  Ethernet with LAN remote power Adapter",
-"		103c 1064  Ethernet with LAN remote power Adapter",
-"		103c 1065  Ethernet with LAN remote power Adapter",
-"		103c 106c  Ethernet with LAN remote power Adapter",
-"		103c 106e  Ethernet with LAN remote power Adapter",
-"		103c 10ea  Ethernet with LAN remote power Adapter",
-"		1113 1220  EN1220 10/100 Fast Ethernet",
-"		1259 2450  AT-2450 10/100 Fast Ethernet",
-"		1259 2454  AT-2450v4 10Mb Ethernet Adapter",
-"		1259 2700  AT-2700TX 10/100 Fast Ethernet",
-"		1259 2701  AT-2700FX 100Mb Ethernet",
-"		1259 2702  AT-2700FTX 10/100 Mb Fiber/Copper Fast Ethernet",
-"		1259 2703  AT-2701FX",
-"		4c53 1000  CC7/CR7/CP7/VC7/VP7/VR7 mainboard",
-"		4c53 1010  CP5/CR6 mainboard",
-"		4c53 1020  VR6 mainboard",
-"		4c53 1030  PC5 mainboard",
-"		4c53 1040  CL7 mainboard",
-"		4c53 1060  PC7 mainboard",
-"	2001  79c978 [HomePNA]",
-"		1092 0a78  Multimedia Home Network Adapter",
-"		1668 0299  ActionLink Home Network Adapter",
-"	2003  Am 1771 MBW [Alchemy]",
-"	2020  53c974 [PCscsi]",
-"	2040  79c974",
-"	2081  Geode LX Video",
-"	2082  Geode LX AES Security Block",
-"	208f  CS5536 GeodeLink PCI South Bridge",
-"	2090  CS5536 [Geode companion] ISA",
-"	2091  CS5536 [Geode companion] FLASH",
-"	2093  CS5536 [Geode companion] Audio",
-"	2094  CS5536 [Geode companion] OHC",
-"	2095  CS5536 [Geode companion] EHC",
-"	2096  CS5536 [Geode companion] UDC",
-"	2097  CS5536 [Geode companion] UOC",
-"	209a  CS5536 [Geode companion] IDE",
-"	3000  ELanSC520 Microcontroller",
-"	7006  AMD-751 [Irongate] System Controller",
-"	7007  AMD-751 [Irongate] AGP Bridge",
-"	700a  AMD-IGR4 AGP Host to PCI Bridge",
-"	700b  AMD-IGR4 PCI to PCI Bridge",
-"	700c  AMD-760 MP [IGD4-2P] System Controller",
-"	700d  AMD-760 MP [IGD4-2P] AGP Bridge",
-"	700e  AMD-760 [IGD4-1P] System Controller",
-"	700f  AMD-760 [IGD4-1P] AGP Bridge",
-"	7400  AMD-755 [Cobra] ISA",
-"	7401  AMD-755 [Cobra] IDE",
-"	7403  AMD-755 [Cobra] ACPI",
-"	7404  AMD-755 [Cobra] USB",
-"	7408  AMD-756 [Viper] ISA",
-"	7409  AMD-756 [Viper] IDE",
-"	740b  AMD-756 [Viper] ACPI",
-"	740c  AMD-756 [Viper] USB",
-"	7410  AMD-766 [ViperPlus] ISA",
-"	7411  AMD-766 [ViperPlus] IDE",
-"	7413  AMD-766 [ViperPlus] ACPI",
-"	7414  AMD-766 [ViperPlus] USB",
-"	7440  AMD-768 [Opus] ISA",
-"		1043 8044  A7M-D Mainboard",
-"	7441  AMD-768 [Opus] IDE",
-"	7443  AMD-768 [Opus] ACPI",
-"		1043 8044  A7M-D Mainboard",
-"	7445  AMD-768 [Opus] Audio",
-"	7446  AMD-768 [Opus] MC97 Modem (Smart Link HAMR5600 compatible)",
-"	7448  AMD-768 [Opus] PCI",
-"	7449  AMD-768 [Opus] USB",
-"	7450  AMD-8131 PCI-X Bridge",
-"	7451  AMD-8131 PCI-X IOAPIC",
-"	7454  AMD-8151 System Controller",
-"	7455  AMD-8151 AGP Bridge",
-"	7458  AMD-8132 PCI-X Bridge",
-"	7459  AMD-8132 PCI-X IOAPIC",
-"	7460  AMD-8111 PCI",
-"		161f 3017  HDAMB",
-"	7461  AMD-8111 USB",
-"	7462  AMD-8111 Ethernet",
-"	7464  AMD-8111 USB",
-"		161f 3017  HDAMB",
-"	7468  AMD-8111 LPC",
-"		161f 3017  HDAMB",
-"	7469  AMD-8111 IDE",
-"		1022 2b80  AMD-8111 IDE [Quartet]",
-"		161f 3017  HDAMB",
-"	746a  AMD-8111 SMBus 2.0",
-"	746b  AMD-8111 ACPI",
-"		161f 3017  HDAMB",
-"	746d  AMD-8111 AC97 Audio",
-"		161f 3017  HDAMB",
-"	746e  AMD-8111 MC97 Modem",
-"	756b  AMD-8111 ACPI",
-"1023  Trident Microsystems",
-"	0194  82C194",
-"	2000  4DWave DX",
-"	2001  4DWave NX",
-"		122d 1400  Trident PCI288-Q3DII (NX)",
-"	2100  CyberBlade XP4m32",
-"	2200  XGI Volari XP5",
-"	8400  CyberBlade/i7",
-"		1023 8400  CyberBlade i7 AGP",
-"	8420  CyberBlade/i7d",
-"		0e11 b15a  CyberBlade i7 AGP",
-"	8500  CyberBlade/i1",
-"	8520  CyberBlade i1",
-"		0e11 b16e  CyberBlade i1 AGP",
-"		1023 8520  CyberBlade i1 AGP",
-"	8620  CyberBlade/i1",
-"		1014 0502  ThinkPad R30/T30",
-"		1014 1025  Travelmate 352TE",
-"	8820  CyberBlade XPAi1",
-"	9320  TGUI 9320",
-"	9350  GUI Accelerator",
-"	9360  Flat panel GUI Accelerator",
-"	9382  Cyber 9382 [Reference design]",
-"	9383  Cyber 9383 [Reference design]",
-"	9385  Cyber 9385 [Reference design]",
-"	9386  Cyber 9386",
-"	9388  Cyber 9388",
-"	9397  Cyber 9397",
-"	939a  Cyber 9397DVD",
-"	9420  TGUI 9420",
-"	9430  TGUI 9430",
-"	9440  TGUI 9440",
-"	9460  TGUI 9460",
-"	9470  TGUI 9470",
-"	9520  Cyber 9520",
-"	9525  Cyber 9525",
-"		10cf 1094  Lifebook C6155",
-"	9540  Cyber 9540",
-"	9660  TGUI 9660/938x/968x",
-"	9680  TGUI 9680",
-"	9682  TGUI 9682",
-"	9683  TGUI 9683",
-"	9685  ProVIDIA 9685",
-"	9750  3DImage 9750",
-"		1014 9750  3DImage 9750",
-"		1023 9750  3DImage 9750",
-"	9753  TGUI 9753",
-"	9754  TGUI 9754",
-"	9759  TGUI 975",
-"	9783  TGUI 9783",
-"	9785  TGUI 9785",
-"	9850  3DImage 9850",
-"	9880  Blade 3D PCI/AGP",
-"		1023 9880  Blade 3D",
-"	9910  CyberBlade/XP",
-"	9930  CyberBlade/XPm",
-"1024  Zenith Data Systems",
-"1025  Acer Incorporated [ALI]",
-"	1435  M1435",
-"	1445  M1445",
-"	1449  M1449",
-"	1451  M1451",
-"	1461  M1461",
-"	1489  M1489",
-"	1511  M1511",
-"	1512  ALI M1512 Aladdin",
-"	1513  M1513",
-"	1521  ALI M1521 Aladdin III CPU Bridge",
-"		10b9 1521  ALI M1521 Aladdin III CPU Bridge",
-"	1523  ALI M1523 ISA Bridge",
-"		10b9 1523  ALI M1523 ISA Bridge",
-"	1531  M1531 Northbridge [Aladdin IV/IV+]",
-"	1533  M1533 PCI-to-ISA Bridge",
-"		10b9 1533  ALI M1533 Aladdin IV/V ISA South Bridge",
-"	1535  M1535 PCI Bridge + Super I/O + FIR",
-"	1541  M1541 Northbridge [Aladdin V]",
-"		10b9 1541  ALI M1541 Aladdin V/V+ AGP+PCI North Bridge",
-"	1542  M1542 Northbridge [Aladdin V]",
-"	1543  M1543 PCI-to-ISA Bridge + Super I/O + FIR",
-"	1561  M1561 Northbridge [Aladdin 7]",
-"	1621  M1621 Northbridge [Aladdin-Pro II]",
-"	1631  M1631 Northbridge+3D Graphics [Aladdin TNT2]",
-"	1641  M1641 Northbridge [Aladdin-Pro IV]",
-"	1647  M1647 [MaGiK1] PCI North Bridge",
-"	1671  M1671 Northbridge [ALADDiN-P4]",
-"	1672  Northbridge [CyberALADDiN-P4]",
-"	3141  M3141",
-"	3143  M3143",
-"	3145  M3145",
-"	3147  M3147",
-"	3149  M3149",
-"	3151  M3151",
-"	3307  M3307 MPEG-I Video Controller",
-"	3309  M3309 MPEG-II Video w/ Software Audio Decoder",
-"	3321  M3321 MPEG-II Audio/Video Decoder",
-"	5212  M4803",
-"	5215  ALI PCI EIDE Controller",
-"	5217  M5217H",
-"	5219  M5219",
-"	5225  M5225",
-"	5229  M5229",
-"	5235  M5235",
-"	5237  M5237 PCI USB Host Controller",
-"	5240  EIDE Controller",
-"	5241  PCMCIA Bridge",
-"	5242  General Purpose Controller",
-"	5243  PCI to PCI Bridge Controller",
-"	5244  Floppy Disk Controller",
-"	5247  M1541 PCI to PCI Bridge",
-"	5251  M5251 P1394 Controller",
-"	5427  PCI to AGP Bridge",
-"	5451  M5451 PCI AC-Link Controller Audio Device",
-"	5453  M5453 PCI AC-Link Controller Modem Device",
-"	7101  M7101 PCI PMU Power Management Controller",
-"		10b9 7101  M7101 PCI PMU Power Management Controller",
-"1028  Dell",
-"	0001  PowerEdge Expandable RAID Controller 2/Si",
-"		1028 0001  PowerEdge 2400",
-"	0002  PowerEdge Expandable RAID Controller 3/Di",
-"		1028 0002  PowerEdge 4400",
-"	0003  PowerEdge Expandable RAID Controller 3/Si",
-"		1028 0003  PowerEdge 2450",
-"	0006  PowerEdge Expandable RAID Controller 3/Di",
-"	0007  Remote Access Card III",
-"	0008  Remote Access Card III",
-"	0009  Remote Access Card III: BMC/SMIC device not present",
-"	000a  PowerEdge Expandable RAID Controller 3/Di",
-"	000c  Embedded Remote Access or ERA/O",
-"	000d  Embedded Remote Access: BMC/SMIC device",
-"	000e  PowerEdge Expandable RAID controller 4/Di",
-"	000f  PowerEdge Expandable RAID controller 4/Di",
-"	0010  Remote Access Card 4",
-"	0011  Remote Access Card 4 Daughter Card",
-"	0012  Remote Access Card 4 Daughter Card Virtual UART",
-"	0013  PowerEdge Expandable RAID controller 4",
-"		1028 016c  PowerEdge Expandable RAID Controller 4e/Si",
-"		1028 016d  PowerEdge Expandable RAID Controller 4e/Di",
-"		1028 016e  PowerEdge Expandable RAID Controller 4e/Di",
-"		1028 016f  PowerEdge Expandable RAID Controller 4e/Di",
-"		1028 0170  PowerEdge Expandable RAID Controller 4e/Di",
-"	0014  Remote Access Card 4 Daughter Card SMIC interface",
-"	0015  PowerEdge Expandable RAID controller 5",
-"1029  Siemens Nixdorf IS",
-"102a  LSI Logic",
-"	0000  HYDRA",
-"	0010  ASPEN",
-"	001f  AHA-2940U2/U2W /7890/7891 SCSI Controllers",
-"		9005 000f  2940U2W SCSI Controller",
-"		9005 0106  2940U2W SCSI Controller",
-"		9005 a180  2940U2W SCSI Controller",
-"	00c5  AIC-7899 U160/m SCSI Controller",
-"		1028 00c5  PowerEdge 2550/2650/4600",
-"	00cf  AIC-7899P U160/m",
-"		1028 0106  PowerEdge 4600",
-"		1028 0121  PowerEdge 2650",
-"102b  Matrox Graphics, Inc.",
-"	0010  MGA-I [Impression\?]",
-"	0100  MGA 1064SG [Mystique]",
-"	0518  MGA-II [Athena]",
-"	0519  MGA 2064W [Millennium]",
-"	051a  MGA 1064SG [Mystique]",
-"		102b 0100  MGA-1064SG Mystique",
-"		102b 1100  MGA-1084SG Mystique",
-"		102b 1200  MGA-1084SG Mystique",
-"		1100 102b  MGA-1084SG Mystique",
-"		110a 0018  Scenic Pro C5 (D1025)",
-"	051b  MGA 2164W [Millennium II]",
-"		102b 051b  MGA-2164W Millennium II",
-"		102b 1100  MGA-2164W Millennium II",
-"		102b 1200  MGA-2164W Millennium II",
-"	051e  MGA 1064SG [Mystique] AGP",
-"	051f  MGA 2164W [Millennium II] AGP",
-"	0520  MGA G200",
-"		102b dbc2  G200 Multi-Monitor",
-"		102b dbc8  G200 Multi-Monitor",
-"		102b dbe2  G200 Multi-Monitor",
-"		102b dbe8  G200 Multi-Monitor",
-"		102b ff03  Millennium G200 SD",
-"		102b ff04  Marvel G200",
-"	0521  MGA G200 AGP",
-"		1014 ff03  Millennium G200 AGP",
-"		102b 48e9  Mystique G200 AGP",
-"		102b 48f8  Millennium G200 SD AGP",
-"		102b 4a60  Millennium G200 LE AGP",
-"		102b 4a64  Millennium G200 AGP",
-"		102b c93c  Millennium G200 AGP",
-"		102b c9b0  Millennium G200 AGP",
-"		102b c9bc  Millennium G200 AGP",
-"		102b ca60  Millennium G250 LE AGP",
-"		102b ca6c  Millennium G250 AGP",
-"		102b dbbc  Millennium G200 AGP",
-"		102b dbc2  Millennium G200 MMS (Dual G200)",
-"		102b dbc3  G200 Multi-Monitor",
-"		102b dbc8  Millennium G200 MMS (Dual G200)",
-"		102b dbd2  G200 Multi-Monitor",
-"		102b dbd3  G200 Multi-Monitor",
-"		102b dbd4  G200 Multi-Monitor",
-"		102b dbd5  G200 Multi-Monitor",
-"		102b dbd8  G200 Multi-Monitor",
-"		102b dbd9  G200 Multi-Monitor",
-"		102b dbe2  Millennium G200 MMS (Quad G200)",
-"		102b dbe3  G200 Multi-Monitor",
-"		102b dbe8  Millennium G200 MMS (Quad G200)",
-"		102b dbf2  G200 Multi-Monitor",
-"		102b dbf3  G200 Multi-Monitor",
-"		102b dbf4  G200 Multi-Monitor",
-"		102b dbf5  G200 Multi-Monitor",
-"		102b dbf8  G200 Multi-Monitor",
-"		102b dbf9  G200 Multi-Monitor",
-"		102b f806  Mystique G200 Video AGP",
-"		102b ff00  MGA-G200 AGP",
-"		102b ff02  Mystique G200 AGP",
-"		102b ff03  Millennium G200 AGP",
-"		102b ff04  Marvel G200 AGP",
-"		110a 0032  MGA-G200 AGP",
-"	0522  MGA G200e [Pilot] ServerEngines (SEP1)",
-"	0525  MGA G400/G450",
-"		0e11 b16f  MGA-G400 AGP",
-"		102b 0328  Millennium G400 16Mb SDRAM",
-"		102b 0338  Millennium G400 16Mb SDRAM",
-"		102b 0378  Millennium G400 32Mb SDRAM",
-"		102b 0541  Millennium G450 Dual Head",
-"		102b 0542  Millennium G450 Dual Head LX",
-"		102b 0543  Millennium G450 Single Head LX",
-"		102b 0641  Millennium G450 32Mb SDRAM Dual Head",
-"		102b 0642  Millennium G450 32Mb SDRAM Dual Head LX",
-"		102b 0643  Millennium G450 32Mb SDRAM Single Head LX",
-"		102b 07c0  Millennium G450 Dual Head LE",
-"		102b 07c1  Millennium G450 SDR Dual Head LE",
-"		102b 0d41  Millennium G450 Dual Head PCI",
-"		102b 0d42  Millennium G450 Dual Head LX PCI",
-"		102b 0d43  Millennium G450 32Mb Dual Head PCI",
-"		102b 0e00  Marvel G450 eTV",
-"		102b 0e01  Marvel G450 eTV",
-"		102b 0e02  Marvel G450 eTV",
-"		102b 0e03  Marvel G450 eTV",
-"		102b 0f80  Millennium G450 Low Profile",
-"		102b 0f81  Millennium G450 Low Profile",
-"		102b 0f82  Millennium G450 Low Profile DVI",
-"		102b 0f83  Millennium G450 Low Profile DVI",
-"		102b 19d8  Millennium G400 16Mb SGRAM",
-"		102b 19f8  Millennium G400 32Mb SGRAM",
-"		102b 2159  Millennium G400 Dual Head 16Mb",
-"		102b 2179  Millennium G400 MAX/Dual Head 32Mb",
-"		102b 217d  Millennium G400 Dual Head Max",
-"		102b 23c0  Millennium G450",
-"		102b 23c1  Millennium G450",
-"		102b 23c2  Millennium G450 DVI",
-"		102b 23c3  Millennium G450 DVI",
-"		102b 2f58  Millennium G400",
-"		102b 2f78  Millennium G400",
-"		102b 3693  Marvel G400 AGP",
-"		102b 5dd0  4Sight II",
-"		102b 5f50  4Sight II",
-"		102b 5f51  4Sight II",
-"		102b 5f52  4Sight II",
-"		102b 9010  Millennium G400 Dual Head",
-"		1458 0400  GA-G400",
-"		1705 0001  Millennium G450 32MB SGRAM",
-"		1705 0002  Millennium G450 16MB SGRAM",
-"		1705 0003  Millennium G450 32MB",
-"		1705 0004  Millennium G450 16MB",
-"	0527  MGA Parhelia AGP",
-"		102b 0840  Parhelia 128Mb",
-"		102b 0850  Parhelia 256MB AGP 4X",
-"	0528  Parhelia 8X",
-"		102b 1020  Parhelia 128MB",
-"		102b 1030  Parhelia 256 MB Dual DVI",
-"		102b 14e1  Parhelia PCI 256MB",
-"		102b 2021  QID Pro",
-"	0d10  MGA Ultima/Impression",
-"	1000  MGA G100 [Productiva]",
-"		102b ff01  Productiva G100",
-"		102b ff05  Productiva G100 Multi-Monitor",
-"	1001  MGA G100 [Productiva] AGP",
-"		102b 1001  MGA-G100 AGP",
-"		102b ff00  MGA-G100 AGP",
-"		102b ff01  MGA-G100 Productiva AGP",
-"		102b ff03  Millennium G100 AGP",
-"		102b ff04  MGA-G100 AGP",
-"		102b ff05  MGA-G100 Productiva AGP Multi-Monitor",
-"		110a 001e  MGA-G100 AGP",
-"	2007  MGA Mistral",
-"	2527  MGA G550 AGP",
-"		102b 0f83  Millennium G550",
-"		102b 0f84  Millennium G550 Dual Head DDR 32Mb",
-"		102b 1e41  Millennium G550",
-"	2537  Millenium P650/P750",
-"		102b 1820  Millennium P750 64MB",
-"		102b 1830  Millennium P650 64MB",
-"		102b 1c10  QID 128MB",
-"		102b 2811  Millennium P650 Low-profile PCI 64MB",
-"		102b 2c11  QID Low-profile PCI",
-"	2538  Millenium P650 PCIe",
-"		102b 08c7  Millennium P650 PCIe 128MB",
-"		102b 0907  Millennium P650 PCIe 64MB",
-"		102b 1047  Millennium P650 LP PCIe 128MB",
-"		102b 1087  Millennium P650 LP PCIe 64MB",
-"		102b 2538  Parhelia APVe",
-"		102b 3007  QID Low-profile PCIe",
-"	4536  VIA Framegrabber",
-"	6573  Shark 10/100 Multiport SwitchNIC",
-"102c  Chips and Technologies",
-"	00b8  F64310",
-"	00c0  F69000 HiQVideo",
-"		102c 00c0  F69000 HiQVideo",
-"		4c53 1000  CC7/CR7/CP7/VC7/VP7/VR7 mainboard",
-"		4c53 1010  CP5/CR6 mainboard",
-"		4c53 1020  VR6 mainboard",
-"		4c53 1030  PC5 mainboard",
-"		4c53 1050  CT7 mainboard",
-"		4c53 1051  CE7 mainboard",
-"	00d0  F65545",
-"	00d8  F65545",
-"	00dc  F65548",
-"	00e0  F65550",
-"	00e4  F65554",
-"	00e5  F65555 HiQVPro",
-"		0e11 b049  Armada 1700 Laptop Display Controller",
-"		1179 0001  Satellite Pro",
-"	00f0  F68554",
-"	00f4  F68554 HiQVision",
-"	00f5  F68555",
-"	0c30  F69030",
-"		4c53 1000  CC7/CR7/CP7/VC7/VP7/VR7 mainboard",
-"		4c53 1050  CT7 mainboard",
-"		4c53 1051  CE7 mainboard",
-"		4c53 1080  CT8 mainboard",
-"102d  Wyse Technology Inc.",
-"	50dc  3328 Audio",
-"102e  Olivetti Advanced Technology",
-"102f  Toshiba America",
-"	0009  r4x00",
-"	000a  TX3927 MIPS RISC PCI Controller",
-"	0020  ATM Meteor 155",
-"		102f 00f8  ATM Meteor 155",
-"	0030  TC35815CF PCI 10/100 Mbit Ethernet Controller",
-"	0031  TC35815CF PCI 10/100 Mbit Ethernet Controller with WOL",
-"	0105  TC86C001 [goku-s] IDE",
-"	0106  TC86C001 [goku-s] USB 1.1 Host",
-"	0107  TC86C001 [goku-s] USB Device Controller",
-"	0108  TC86C001 [goku-s] I2C/SIO/GPIO Controller",
-"	0180  TX4927/38 MIPS RISC PCI Controller",
-"	0181  TX4925 MIPS RISC PCI Controller",
-"	0182  TX4937 MIPS RISC PCI Controller",
-"1030  TMC Research",
-"1031  Miro Computer Products AG",
-"	5601  DC20 ASIC",
-"	5607  Video I/O & motion JPEG compressor",
-"	5631  Media 3D",
-"	6057  MiroVideo DC10/DC30+",
-"1032  Compaq",
-"1033  NEC Corporation",
-"	0000  Vr4181A USB Host or Function Control Unit",
-"	0001  PCI to 486-like bus Bridge",
-"	0002  PCI to VL98 Bridge",
-"	0003  ATM Controller",
-"	0004  R4000 PCI Bridge",
-"	0005  PCI to 486-like bus Bridge",
-"	0006  PC-9800 Graphic Accelerator",
-"	0007  PCI to UX-Bus Bridge",
-"	0008  PC-9800 Graphic Accelerator",
-"	0009  PCI to PC9800 Core-Graph Bridge",
-"	0016  PCI to VL Bridge",
-"	001a  [Nile II]",
-"	0021  Vrc4373 [Nile I]",
-"	0029  PowerVR PCX1",
-"	002a  PowerVR 3D",
-"	002c  Star Alpha 2",
-"	002d  PCI to C-bus Bridge",
-"	0035  USB",
-"		1033 0035  Hama USB 2.0 CardBus",
-"		1179 0001  USB",
-"		12ee 7000  Root Hub",
-"		14c2 0105  PTI-205N USB 2.0 Host Controller",
-"		1799 0001  Root Hub",
-"		1931 000a  GlobeTrotter Fusion Quad Lite (PPP data)",
-"		1931 000b  GlobeTrotter Fusion Quad Lite (GSM data)",
-"		807d 0035  PCI-USB2 (OHCI subsystem)",
-"	003b  PCI to C-bus Bridge",
-"	003e  NAPCCARD Cardbus Controller",
-"	0046  PowerVR PCX2 [midas]",
-"	005a  Vrc5074 [Nile 4]",
-"	0063  Firewarden",
-"	0067  PowerVR Neon 250 Chipset",
-"		1010 0020  PowerVR Neon 250 AGP 32Mb",
-"		1010 0080  PowerVR Neon 250 AGP 16Mb",
-"		1010 0088  PowerVR Neon 250 16Mb",
-"		1010 0090  PowerVR Neon 250 AGP 16Mb",
-"		1010 0098  PowerVR Neon 250 16Mb",
-"		1010 00a0  PowerVR Neon 250 AGP 32Mb",
-"		1010 00a8  PowerVR Neon 250 32Mb",
-"		1010 0120  PowerVR Neon 250 AGP 32Mb",
-"	0072  uPD72874 IEEE1394 OHCI 1.1 3-port PHY-Link Ctrlr",
-"	0074  56k Voice Modem",
-"		1033 8014  RCV56ACF 56k Voice Modem",
-"	009b  Vrc5476",
-"	00a5  VRC4173",
-"	00a6  VRC5477 AC97",
-"	00cd  IEEE 1394 [OrangeLink] Host Controller",
-"		12ee 8011  Root hub",
-"	00ce  IEEE 1394 Host Controller",
-"	00df  Vr4131",
-"	00e0  USB 2.0",
-"		12ee 7001  Root hub",
-"		14c2 0205  PTI-205N USB 2.0 Host Controller",
-"		1799 0002  Root Hub",
-"		807d 1043  PCI-USB2 (EHCI subsystem)",
-"	00e7  IEEE 1394 Host Controller",
-"	00f2  uPD72874 IEEE1394 OHCI 1.1 3-port PHY-Link Ctrlr",
-"	00f3  uPD6113x Multimedia Decoder/Processor [EMMA2]",
-"	010c  VR7701",
-"	0125  uPD720400 PCI Express - PCI/PCI-X Bridge",
-"1034  Framatome Connectors USA Inc.",
-"1035  Comp. & Comm. Research Lab",
-"1036  Future Domain Corp.",
-"	0000  TMC-18C30 [36C70]",
-"1037  Hitachi Micro Systems",
-"1038  AMP, Inc",
-"1039  Silicon Integrated Systems [SiS]",
-"	0001  Virtual PCI-to-PCI bridge (AGP)",
-"	0002  SG86C202",
-"	0003  SiS AGP Port (virtual PCI-to-PCI bridge)",
-"	0004  PCI-to-PCI bridge",
-"	0006  85C501/2/3",
-"	0008  SiS85C503/5513 (LPC Bridge)",
-"	0009  ACPI",
-"	000a  PCI-to-PCI bridge",
-"	0016  SiS961/2 SMBus Controller",
-"	0018  SiS85C503/5513 (LPC Bridge)",
-"	0180  RAID bus controller 180 SATA/PATA  [SiS]",
-"	0181  SATA",
-"	0182  182 SATA/RAID Controller",
-"	0190  190 Gigabit Ethernet Adapter",
-"	0191  191 Gigabit Ethernet Adapter",
-"	0200  5597/5598/6326 VGA",
-"		1039 0000  SiS5597 SVGA (Shared RAM)",
-"	0204  82C204",
-"	0205  SG86C205",
-"	0300  300/305 PCI/AGP VGA Display Adapter",
-"		107d 2720  Leadtek WinFast VR300",
-"	0310  315H PCI/AGP VGA Display Adapter",
-"	0315  315 PCI/AGP VGA Display Adapter",
-"	0325  315PRO PCI/AGP VGA Display Adapter",
-"	0330  330 [Xabre] PCI/AGP VGA Display Adapter",
-"	0406  85C501/2",
-"	0496  85C496",
-"	0530  530 Host",
-"	0540  540 Host",
-"	0550  550 Host",
-"	0597  5513C",
-"	0601  85C601",
-"	0620  620 Host",
-"	0630  630 Host",
-"	0633  633 Host",
-"	0635  635 Host",
-"	0645  SiS645 Host & Memory & AGP Controller",
-"	0646  SiS645DX Host & Memory & AGP Controller",
-"	0648  645xx",
-"	0650  650/M650 Host",
-"	0651  651 Host",
-"	0655  655 Host",
-"	0660  660 Host",
-"	0661  661FX/M661FX/M661MX Host",
-"	0730  730 Host",
-"	0733  733 Host",
-"	0735  735 Host",
-"	0740  740 Host",
-"	0741  741/741GX/M741 Host",
-"	0745  745 Host",
-"	0746  746 Host",
-"	0755  755 Host",
-"	0760  760/M760 Host",
-"	0761  761/M761 Host",
-"	0900  SiS900 PCI Fast Ethernet",
-"		1019 0a14  K7S5A motherboard",
-"		1039 0900  SiS900 10/100 Ethernet Adapter",
-"		1043 8035  CUSI-FX motherboard",
-"	0961  SiS961 [MuTIOL Media IO]",
-"	0962  SiS962 [MuTIOL Media IO]",
-"	0963  SiS963 [MuTIOL Media IO]",
-"	0964  SiS964 [MuTIOL Media IO]",
-"	0965  SiS965 [MuTIOL Media IO]",
-"	3602  83C602",
-"	5107  5107",
-"	5300  SiS540 PCI Display Adapter",
-"	5315  550 PCI/AGP VGA Display Adapter",
-"	5401  486 PCI Chipset",
-"	5511  5511/5512",
-"	5513  5513 [IDE]",
-"		1019 0970  P6STP-FL motherboard",
-"		1039 5513  SiS5513 EIDE Controller (A,B step)",
-"		1043 8035  CUSI-FX motherboard",
-"	5517  5517",
-"	5571  5571",
-"	5581  5581 Pentium Chipset",
-"	5582  5582",
-"	5591  5591/5592 Host",
-"	5596  5596 Pentium Chipset",
-"	5597  5597 [SiS5582]",
-"	5600  5600 Host",
-"	6204  Video decoder & MPEG interface",
-"	6205  VGA Controller",
-"	6236  6236 3D-AGP",
-"	6300  630/730 PCI/AGP VGA Display Adapter",
-"		1019 0970  P6STP-FL motherboard",
-"		1043 8035  CUSI-FX motherboard",
-"	6306  530/620 PCI/AGP VGA Display Adapter",
-"		1039 6306  SiS530,620 GUI Accelerator+3D",
-"	6325  65x/M650/740 PCI/AGP VGA Display Adapter",
-"	6326  86C326 5598/6326",
-"		1039 6326  SiS6326 GUI Accelerator",
-"		1092 0a50  SpeedStar A50",
-"		1092 0a70  SpeedStar A70",
-"		1092 4910  SpeedStar A70",
-"		1092 4920  SpeedStar A70",
-"		1569 6326  SiS6326 GUI Accelerator",
-"	6330  661/741/760/761 PCI/AGP VGA Display Adapter",
-"		1039 6330  [M]661xX/[M]741[GX]/[M]760 PCI/AGP VGA Adapter",
-"	7001  USB 1.0 Controller",
-"		1019 0a14  K7S5A motherboard",
-"		1039 7000  Onboard USB Controller",
-"		1462 5470  K7SOM+ 5.2C Motherboard",
-"	7002  USB 2.0 Controller",
-"		1509 7002  Onboard USB Controller",
-"	7007  FireWire Controller",
-"	7012  AC'97 Sound Controller",
-"		15bd 1001  DFI 661FX motherboard",
-"	7013  AC'97 Modem Controller",
-"	7016  SiS7016 PCI Fast Ethernet Adapter",
-"		1039 7016  SiS7016 10/100 Ethernet Adapter",
-"	7018  SiS PCI Audio Accelerator",
-"		1014 01b6  SiS PCI Audio Accelerator",
-"		1014 01b7  SiS PCI Audio Accelerator",
-"		1019 7018  SiS PCI Audio Accelerator",
-"		1025 000e  SiS PCI Audio Accelerator",
-"		1025 0018  SiS PCI Audio Accelerator",
-"		1039 7018  SiS PCI Audio Accelerator",
-"		1043 800b  SiS PCI Audio Accelerator",
-"		1054 7018  SiS PCI Audio Accelerator",
-"		107d 5330  SiS PCI Audio Accelerator",
-"		107d 5350  SiS PCI Audio Accelerator",
-"		1170 3209  SiS PCI Audio Accelerator",
-"		1462 400a  SiS PCI Audio Accelerator",
-"		14a4 2089  SiS PCI Audio Accelerator",
-"		14cd 2194  SiS PCI Audio Accelerator",
-"		14ff 1100  SiS PCI Audio Accelerator",
-"		152d 8808  SiS PCI Audio Accelerator",
-"		1558 1103  SiS PCI Audio Accelerator",
-"		1558 2200  SiS PCI Audio Accelerator",
-"		1563 7018  SiS PCI Audio Accelerator",
-"		15c5 0111  SiS PCI Audio Accelerator",
-"		270f a171  SiS PCI Audio Accelerator",
-"		a0a0 0022  SiS PCI Audio Accelerator",
-"	7019  SiS7019 Audio Accelerator",
-"103a  Seiko Epson Corporation",
-"103b  Tatung Co. of America",
-"103c  Hewlett-Packard Company",
-"	002a  NX9000 Notebook",
-"	1005  A4977A Visualize EG",
-"	1008  Visualize FX",
-"	1028  Tach TL Fibre Channel Host Adapter",
-"	1029  Tach XL2 Fibre Channel Host Adapter",
-"		107e 000f  Interphase 5560 Fibre Channel Adapter",
-"		9004 9210  1Gb/2Gb Family Fibre Channel Controller",
-"		9004 9211  1Gb/2Gb Family Fibre Channel Controller",
-"	102a  Tach TS Fibre Channel Host Adapter",
-"		107e 000e  Interphase 5540/5541 Fibre Channel Adapter",
-"		9004 9110  1Gb/2Gb Family Fibre Channel Controller",
-"		9004 9111  1Gb/2Gb Family Fibre Channel Controller",
-"	1030  J2585A DeskDirect 10/100VG NIC",
-"	1031  J2585B HP 10/100VG PCI LAN Adapter",
-"		103c 1040  J2973A DeskDirect 10BaseT NIC",
-"		103c 1041  J2585B DeskDirect 10/100VG NIC",
-"		103c 1042  J2970A DeskDirect 10BaseT/2 NIC",
-"	1040  J2973A DeskDirect 10BaseT NIC",
-"	1041  J2585B DeskDirect 10/100 NIC",
-"	1042  J2970A DeskDirect 10BaseT/2 NIC",
-"	1048  Diva Serial [GSP] Multiport UART",
-"		103c 1049  Tosca Console",
-"		103c 104a  Tosca Secondary",
-"		103c 104b  Maestro SP2",
-"		103c 1223  Superdome Console",
-"		103c 1226  Keystone SP2",
-"		103c 1227  Powerbar SP2",
-"		103c 1282  Everest SP2",
-"		103c 1301  Diva RMP3",
-"	1054  PCI Local Bus Adapter",
-"	1064  79C970 PCnet Ethernet Controller",
-"	108b  Visualize FXe",
-"	10c1  NetServer Smart IRQ Router",
-"	10ed  TopTools Remote Control",
-"	10f0  rio System Bus Adapter",
-"	10f1  rio I/O Controller",
-"	1200  82557B 10/100 NIC",
-"	1219  NetServer PCI Hot-Plug Controller",
-"	121a  NetServer SMIC Controller",
-"	121b  NetServer Legacy COM Port Decoder",
-"	121c  NetServer PCI COM Port Decoder",
-"	1229  zx1 System Bus Adapter",
-"	122a  zx1 I/O Controller",
-"	122e  zx1 Local Bus Adapter",
-"	127c  sx1000 I/O Controller",
-"	1290  Auxiliary Diva Serial Port",
-"	1291  Auxiliary Diva Serial Port",
-"	12b4  zx1 QuickSilver AGP8x Local Bus Adapter",
-"	12f8  Broadcom BCM4306 802.11b/g Wireless LAN",
-"	12fa  BCM4306 802.11b/g Wireless LAN Controller",
-"	2910  E2910A PCIBus Exerciser",
-"	2925  E2925A 32 Bit, 33 MHzPCI Exerciser & Analyzer",
-"	3080  Pavilion ze2028ea",
-"	3085  Realtek RTL8139/8139C/8139C+",
-"	3220  Hewlett-Packard Smart Array P600",
-"	3230  Hewlett-Packard Smart Array Controller",
-"103e  Solliday Engineering",
-"103f  Synopsys/Logic Modeling Group",
-"1040  Accelgraphics Inc.",
-"1041  Computrend",
-"1042  Micron",
-"	1000  PC Tech RZ1000",
-"	1001  PC Tech RZ1001",
-"	3000  Samurai_0",
-"	3010  Samurai_1",
-"	3020  Samurai_IDE",
-"1043  ASUSTeK Computer Inc.",
-"	0675  ISDNLink P-IN100-ST-D",
-"		0675 1704  ISDN Adapter (PCI Bus, D, C)",
-"		0675 1707  ISDN Adapter (PCI Bus, DV, W)",
-"		10cf 105e  ISDN Adapter (PCI Bus, DV, W)",
-"	0c11  A7N8X Motherboard nForce2 IDE/USB/SMBus",
-"	4015  v7100 SDRAM [GeForce2 MX]",
-"	4021  v7100 Combo Deluxe [GeForce2 MX + TV tuner]",
-"	4057  v8200 GeForce 3",
-"	8043  v8240 PAL 128M [P4T] Motherboard",
-"	807b  v9280/TD [Geforce4 TI4200 8X With TV-Out and DVI]",
-"	8095  A7N8X Motherboard nForce2 AC97 Audio",
-"	80ac  A7N8X Motherboard nForce2 AGP/Memory",
-"	80bb  v9180 Magic/T [GeForce4 MX440 AGP 8x 64MB TV-out]",
-"	80c5  nForce3 chipset motherboard [SK8N]",
-"	80df  v9520 Magic/T",
-"	8187  802.11a/b/g Wireless LAN Card",
-"	8188  Tiger Hybrid TV Capture Device",
-"1044  Adaptec (formerly DPT)",
-"	1012  Domino RAID Engine",
-"	a400  SmartCache/Raid I-IV Controller",
-"	a500  PCI Bridge",
-"	a501  SmartRAID V Controller",
-"		1044 c001  PM1554U2 Ultra2 Single Channel",
-"		1044 c002  PM1654U2 Ultra2 Single Channel",
-"		1044 c003  PM1564U3 Ultra3 Single Channel",
-"		1044 c004  PM1564U3 Ultra3 Dual Channel",
-"		1044 c005  PM1554U2 Ultra2 Single Channel (NON ACPI)",
-"		1044 c00a  PM2554U2 Ultra2 Single Channel",
-"		1044 c00b  PM2654U2 Ultra2 Single Channel",
-"		1044 c00c  PM2664U3 Ultra3 Single Channel",
-"		1044 c00d  PM2664U3 Ultra3 Dual Channel",
-"		1044 c00e  PM2554U2 Ultra2 Single Channel (NON ACPI)",
-"		1044 c00f  PM2654U2 Ultra2 Single Channel (NON ACPI)",
-"		1044 c014  PM3754U2 Ultra2 Single Channel (NON ACPI)",
-"		1044 c015  PM3755U2B Ultra2 Single Channel (NON ACPI)",
-"		1044 c016  PM3755F Fibre Channel (NON ACPI)",
-"		1044 c01e  PM3757U2 Ultra2 Single Channel",
-"		1044 c01f  PM3757U2 Ultra2 Dual Channel",
-"		1044 c020  PM3767U3 Ultra3 Dual Channel",
-"		1044 c021  PM3767U3 Ultra3 Quad Channel",
-"		1044 c028  PM2865U3 Ultra3 Single Channel",
-"		1044 c029  PM2865U3 Ultra3 Dual Channel",
-"		1044 c02a  PM2865F Fibre Channel",
-"		1044 c03c  2000S Ultra3 Single Channel",
-"		1044 c03d  2000S Ultra3 Dual Channel",
-"		1044 c03e  2000F Fibre Channel",
-"		1044 c046  3000S Ultra3 Single Channel",
-"		1044 c047  3000S Ultra3 Dual Channel",
-"		1044 c048  3000F Fibre Channel",
-"		1044 c050  5000S Ultra3 Single Channel",
-"		1044 c051  5000S Ultra3 Dual Channel",
-"		1044 c052  5000F Fibre Channel",
-"		1044 c05a  2400A UDMA Four Channel",
-"		1044 c05b  2400A UDMA Four Channel DAC",
-"		1044 c064  3010S Ultra3 Dual Channel",
-"		1044 c065  3410S Ultra160 Four Channel",
-"		1044 c066  3010S Fibre Channel",
-"	a511  SmartRAID V Controller",
-"		1044 c032  ASR-2005S I2O Zero Channel",
-"		1044 c035  ASR-2010S I2O Zero Channel",
-"1045  OPTi Inc.",
-"	a0f8  82C750 [Vendetta] USB Controller",
-"	c101  92C264",
-"	c178  92C178",
-"	c556  82X556 [Viper]",
-"	c557  82C557 [Viper-M]",
-"	c558  82C558 [Viper-M ISA+IDE]",
-"	c567  82C750 [Vendetta], device 0",
-"	c568  82C750 [Vendetta], device 1",
-"	c569  82C579 [Viper XPress+ Chipset]",
-"	c621  82C621 [Viper-M/N+]",
-"	c700  82C700 [FireStar]",
-"	c701  82C701 [FireStar Plus]",
-"	c814  82C814 [Firebridge 1]",
-"	c822  82C822",
-"	c824  82C824",
-"	c825  82C825 [Firebridge 2]",
-"	c832  82C832",
-"	c861  82C861",
-"	c895  82C895",
-"	c935  EV1935 ECTIVA MachOne PCIAudio",
-"	d568  82C825 [Firebridge 2]",
-"	d721  IDE [FireStar]",
-"1046  IPC Corporation, Ltd.",
-"1047  Genoa Systems Corp",
-"1048  Elsa AG",
-"	0c60  Gladiac MX",
-"	0d22  Quadro4 900XGL [ELSA GLoria4 900XGL]",
-"	1000  QuickStep 1000",
-"	3000  QuickStep 3000",
-"	8901  Gloria XL",
-"		1048 0935  GLoria XL (Virge)",
-"1049  Fountain Technologies, Inc.",
-"104a  STMicroelectronics",
-"	0008  STG 2000X",
-"	0009  STG 1764X",
-"	0010  STG4000 [3D Prophet Kyro Series]",
-"	0209  STPC Consumer/Industrial North- and Southbridge",
-"	020a  STPC Atlas/ConsumerS/Consumer IIA Northbridge",
-"	0210  STPC Atlas ISA Bridge",
-"	021a  STPC Consumer S Southbridge",
-"	021b  STPC Consumer IIA Southbridge",
-"	0500  ST70137 [Unicorn] ADSL DMT Transceiver",
-"	0564  STPC Client Northbridge",
-"	0981  21x4x DEC-Tulip compatible 10/100 Ethernet",
-"	1746  STG 1764X",
-"	2774  21x4x DEC-Tulip compatible 10/100 Ethernet",
-"	3520  MPEG-II decoder card",
-"	55cc  STPC Client Southbridge",
-"104b  BusLogic",
-"	0140  BT-946C (old) [multimaster  01]",
-"	1040  BT-946C (BA80C30) [MultiMaster 10]",
-"	8130  Flashpoint LT",
-"104c  Texas Instruments",
-"	0500  100 MBit LAN Controller",
-"	0508  TMS380C2X Compressor Interface",
-"	1000  Eagle i/f AS",
-"	104c  PCI1510 PC card Cardbus Controller",
-"	3d04  TVP4010 [Permedia]",
-"	3d07  TVP4020 [Permedia 2]",
-"		1011 4d10  Comet",
-"		1040 000f  AccelStar II",
-"		1040 0011  AccelStar II",
-"		1048 0a31  WINNER 2000",
-"		1048 0a32  GLoria Synergy",
-"		1048 0a34  GLoria Synergy",
-"		1048 0a35  GLoria Synergy",
-"		1048 0a36  GLoria Synergy",
-"		1048 0a43  GLoria Synergy",
-"		1048 0a44  GLoria Synergy",
-"		107d 2633  WinFast 3D L2300",
-"		1092 0127  FIRE GL 1000 PRO",
-"		1092 0136  FIRE GL 1000 PRO",
-"		1092 0141  FIRE GL 1000 PRO",
-"		1092 0146  FIRE GL 1000 PRO",
-"		1092 0148  FIRE GL 1000 PRO",
-"		1092 0149  FIRE GL 1000 PRO",
-"		1092 0152  FIRE GL 1000 PRO",
-"		1092 0154  FIRE GL 1000 PRO",
-"		1092 0155  FIRE GL 1000 PRO",
-"		1092 0156  FIRE GL 1000 PRO",
-"		1092 0157  FIRE GL 1000 PRO",
-"		1097 3d01  Jeronimo Pro",
-"		1102 100f  Graphics Blaster Extreme",
-"		3d3d 0100  Reference Permedia 2 3D",
-"	8000  PCILynx/PCILynx2 IEEE 1394 Link Layer Controller",
-"		e4bf 1010  CF1-1-SNARE",
-"		e4bf 1020  CF1-2-SNARE",
-"	8009  FireWire Controller",
-"		104d 8032  8032 OHCI i.LINK (IEEE 1394) Controller",
-"	8017  PCI4410 FireWire Controller",
-"	8019  TSB12LV23 IEEE-1394 Controller",
-"		11bd 000a  Studio DV500-1394",
-"		11bd 000e  Studio DV",
-"		e4bf 1010  CF2-1-CYMBAL",
-"	8020  TSB12LV26 IEEE-1394 Controller (Link)",
-"		11bd 000f  Studio DV500-1394",
-"	8021  TSB43AA22 IEEE-1394 Controller (PHY/Link Integrated)",
-"		104d 80df  Vaio PCG-FX403",
-"		104d 80e7  VAIO PCG-GR214EP/GR214MP/GR215MP/GR314MP/GR315MP",
-"	8022  TSB43AB22 IEEE-1394a-2000 Controller (PHY/Link)",
-"	8023  TSB43AB22/A IEEE-1394a-2000 Controller (PHY/Link)",
-"		103c 088c  NC8000 laptop",
-"		1043 808b  K8N4-E Mainboard",
-"	8024  TSB43AB23 IEEE-1394a-2000 Controller (PHY/Link)",
-"	8025  TSB82AA2 IEEE-1394b Link Layer Controller",
-"		1458 1000  GA-K8N Ultra-9 Mainboard",
-"	8026  TSB43AB21 IEEE-1394a-2000 Controller (PHY/Link)",
-"		1025 003c  Aspire 2001WLCi (Compaq CL50 motherboard)",
-"		103c 006a  NX9500",
-"		1043 808d  A7V333 mainboard.",
-"	8027  PCI4451 IEEE-1394 Controller",
-"		1028 00e6  PCI4451 IEEE-1394 Controller (Dell Inspiron 8100)",
-"	8029  PCI4510 IEEE-1394 Controller",
-"		1028 0163  Latitude D505",
-"		1028 0196  Inspiron 5160",
-"		1071 8160  MIM2900",
-"	802b  PCI7410,7510,7610 OHCI-Lynx Controller",
-"		1028 0139  Latitude D400",
-"		1028 014e  PCI7410,7510,7610 OHCI-Lynx Controller (Dell Latitude D800)",
-"	802e  PCI7x20 1394a-2000 OHCI Two-Port PHY/Link-Layer Controller",
-"	8031  PCIxx21/x515 Cardbus Controller",
-"		1025 0080  Aspire 5024WLMi",
-"		103c 099c  NX6110/NC6120",
-"		103c 308b  MX6125",
-"	8032  OHCI Compliant IEEE 1394 Host Controller",
-"		1025 0080  Aspire 5024WLMi",
-"		103c 099c  NX6110/NC6120",
-"		103c 308b  MX6125",
-"	8033  PCIxx21 Integrated FlashMedia Controller",
-"		1025 0080  Aspire 5024WLMi",
-"		103c 099c  NX6110/NC6120",
-"		103c 308b  MX6125",
-"	8034  PCI6411, PCI6421, PCI6611, PCI6621, PCI7411, PCI7421, PCI7611, PCI7621 Secure Digital (SD) Controller",
-"		1025 0080  Aspire 5024WLMi",
-"		103c 099c  NX6110/NC6120",
-"		103c 308b  MX6125",
-"	8035  PCI6411, PCI6421, PCI6611, PCI6621, PCI7411, PCI7421, PCI7611, PCI7621 Smart Card Controller (SMC)",
-"		103c 099c  NX6110/NC6120",
-"	8036  PCI6515 Cardbus Controller",
-"	8038  PCI6515 SmartCard Controller",
-"	803b  5-in-1 Multimedia Card Reader (SD/MMC/MS/MS PRO/xD)",
-"	8201  PCI1620 Firmware Loading Function",
-"	8204  PCI7410,7510,7610 PCI Firmware Loading Function",
-"		1028 0139  Latitude D400",
-"		1028 014e  Latitude D800",
-"	8231  XIO2000(A)/XIO2200 PCI Express-to-PCI Bridge",
-"	8235  XIO2200 IEEE-1394a-2000 Controller (PHY/Link)",
-"	8400  ACX 100 22Mbps Wireless Interface",
-"		1186 3b00  DWL-650+ PC Card cardbus 22Mbs Wireless Adapter [AirPlus]",
-"		1186 3b01  DWL-520+ 22Mbps PCI Wireless Adapter",
-"		16ab 8501  WL-8305 IEEE802.11b+ Wireless LAN PCI Adapter",
-"	8401  ACX 100 22Mbps Wireless Interface",
-"	9000  Wireless Interface (of unknown type)",
-"	9065  TMS320DM642",
-"	9066  ACX 111 54Mbps Wireless Interface",
-"		104c 9066  Trendnet TEW-421PC Wireless PCI Adapter",
-"		1186 3b04  DWL-G520+ Wireless PCI Adapter",
-"		1186 3b05  DWL-G650+ AirPlusG+ CardBus Wireless LAN",
-"		13d1 aba0  SWLMP-54108 108Mbps Wireless mini PCI card 802.11g+",
-"		1737 0033  WPC54G Ver.2 802.11G PC Card",
-"	a001  TDC1570",
-"	a100  TDC1561",
-"	a102  TNETA1575 HyperSAR Plus w/PCI Host i/f & UTOPIA i/f",
-"	a106  TMS320C6414 TMS320C6415 TMS320C6416",
-"		175c 5000  ASI50xx Audio Adapter",
-"		175c 6400  ASI6400 Cobranet series",
-"		175c 8700  ASI87xx Radio Tuner card",
-"	ac10  PCI1050",
-"	ac11  PCI1053",
-"	ac12  PCI1130",
-"	ac13  PCI1031",
-"	ac15  PCI1131",
-"	ac16  PCI1250",
-"		1014 0092  ThinkPad 600",
-"	ac17  PCI1220",
-"	ac18  PCI1260",
-"	ac19  PCI1221",
-"	ac1a  PCI1210",
-"	ac1b  PCI1450",
-"		0e11 b113  Armada M700",
-"		1014 0130  Thinkpad T20/T22/A21m",
-"	ac1c  PCI1225",
-"		0e11 b121  Armada E500",
-"		1028 0088  Latitude CPi A400XT",
-"	ac1d  PCI1251A",
-"	ac1e  PCI1211",
-"	ac1f  PCI1251B",
-"	ac20  TI 2030",
-"	ac21  PCI2031",
-"	ac22  PCI2032 PCI Docking Bridge",
-"	ac23  PCI2250 PCI-to-PCI Bridge",
-"	ac28  PCI2050 PCI-to-PCI Bridge",
-"	ac30  PCI1260 PC card Cardbus Controller",
-"	ac40  PCI4450 PC card Cardbus Controller",
-"	ac41  PCI4410 PC card Cardbus Controller",
-"	ac42  PCI4451 PC card Cardbus Controller",
-"		1028 00e6  PCI4451 PC card CardBus Controller (Dell Inspiron 8100)",
-"	ac44  PCI4510 PC card Cardbus Controller",
-"		1028 0163  Latitude D505",
-"		1028 0196  Inspiron 5160",
-"		1071 8160  MIM2000",
-"	ac46  PCI4520 PC card Cardbus Controller",
-"	ac47  PCI7510 PC card Cardbus Controller",
-"		1028 0139  Latitude D400",
-"		1028 013f  Precision M60",
-"		1028 014e  Latitude D800",
-"	ac4a  PCI7510,7610 PC card Cardbus Controller",
-"		1028 0139  Latitude D400",
-"		1028 014e  Latitude D800",
-"	ac50  PCI1410 PC card Cardbus Controller",
-"	ac51  PCI1420",
-"		0e11 004e  Evo N600c",
-"		1014 0148  ThinkPad A20m",
-"		1014 023b  ThinkPad T23 (2647-4MG)",
-"		1028 00b1  Latitude C600",
-"		1028 012a  Latitude C640",
-"		1033 80cd  Versa Note VXi",
-"		1095 10cf  Fujitsu-Siemens LifeBook C Series",
-"		10cf 1095  Lifebook S-4510/C6155",
-"		e4bf 1000  CP2-2-HIPHOP",
-"	ac52  PCI1451 PC card Cardbus Controller",
-"	ac53  PCI1421 PC card Cardbus Controller",
-"	ac54  PCI1620 PC Card Controller",
-"	ac55  PCI1520 PC card Cardbus Controller",
-"		1014 0512  ThinkPad T30/T40",
-"	ac56  PCI1510 PC card Cardbus Controller",
-"		1014 0528  ThinkPad R40e (2684-HVG) Cardbus Controller",
-"	ac60  PCI2040 PCI to DSP Bridge Controller",
-"		175c 5100  ASI51xx Audio Adapter",
-"		175c 6100  ASI61xx Audio Adapter",
-"		175c 6200  ASI62xx Audio Adapter",
-"		175c 8800  ASI88xx Audio Adapter",
-"	ac8d  PCI 7620",
-"	ac8e  PCI7420 CardBus Controller",
-"	ac8f  PCI7420/PCI7620 Dual Socket CardBus and Smart Card Cont. w/ 1394a-2000 OHCI Two-Port  PHY/Link-Layer Cont. and SD/MS-Pro Sockets",
-"	fe00  FireWire Host Controller",
-"	fe03  12C01A FireWire Host Controller",
-"104d  Sony Corporation",
-"	8004  DTL-H2500 [Playstation development board]",
-"	8009  CXD1947Q i.LINK Controller",
-"	8039  CXD3222 i.LINK Controller",
-"	8056  Rockwell HCF 56K modem",
-"	808a  Memory Stick Controller",
-"104e  Oak Technology, Inc",
-"	0017  OTI-64017",
-"	0107  OTI-107 [Spitfire]",
-"	0109  Video Adapter",
-"	0111  OTI-64111 [Spitfire]",
-"	0217  OTI-64217",
-"	0317  OTI-64317",
-"104f  Co-time Computer Ltd",
-"1050  Winbond Electronics Corp",
-"	0000  NE2000",
-"	0001  W83769F",
-"	0033  W89C33D 802.11 a/b/g BB/MAC",
-"	0105  W82C105",
-"	0840  W89C840",
-"		1050 0001  W89C840 Ethernet Adapter",
-"		1050 0840  W89C840 Ethernet Adapter",
-"	0940  W89C940",
-"	5a5a  W89C940F",
-"	6692  W6692",
-"		1043 1702  ISDN Adapter (PCI Bus, D, W)",
-"		1043 1703  ISDN Adapter (PCI Bus, DV, W)",
-"		1043 1707  ISDN Adapter (PCI Bus, DV, W)",
-"		144f 1702  ISDN Adapter (PCI Bus, D, W)",
-"		144f 1703  ISDN Adapter (PCI Bus, DV, W)",
-"		144f 1707  ISDN Adapter (PCI Bus, DV, W)",
-"	9921  W99200F MPEG-1 Video Encoder",
-"	9922  W99200F/W9922PF MPEG-1/2 Video Encoder",
-"	9970  W9970CF",
-"1051  Anigma, Inc.",
-"1052  \?Young Micro Systems",
-"1053  Young Micro Systems",
-"1054  Hitachi, Ltd",
-"1055  Efar Microsystems",
-"	9130  SLC90E66 [Victory66] IDE",
-"	9460  SLC90E66 [Victory66] ISA",
-"	9462  SLC90E66 [Victory66] USB",
-"	9463  SLC90E66 [Victory66] ACPI",
-"1056  ICL",
-"1057  Motorola",
-"	0001  MPC105 [Eagle]",
-"	0002  MPC106 [Grackle]",
-"	0003  MPC8240 [Kahlua]",
-"	0004  MPC107",
-"	0006  MPC8245 [Unity]",
-"	0008  MPC8540",
-"	0009  MPC8560",
-"	0100  MC145575 [HFC-PCI]",
-"	0431  KTI829c 100VG",
-"	1801  DSP56301 Digital Signal Processor",
-"		14fb 0101  Transas Radar Imitator Board [RIM]",
-"		14fb 0102  Transas Radar Imitator Board [RIM-2]",
-"		14fb 0202  Transas Radar Integrator Board [RIB-2]",
-"		14fb 0611  1 channel CAN bus Controller [CanPci-1]",
-"		14fb 0612  2 channels CAN bus Controller [CanPci-2]",
-"		14fb 0613  3 channels CAN bus Controller [CanPci-3]",
-"		14fb 0614  4 channels CAN bus Controller [CanPci-4]",
-"		14fb 0621  1 channel CAN bus Controller [CanPci2-1]",
-"		14fb 0622  2 channels CAN bus Controller [CanPci2-2]",
-"		14fb 0810  Transas VTS Radar Integrator Board [RIB-4]",
-"		175c 4200  ASI4215 Audio Adapter",
-"		175c 4300  ASI43xx Audio Adapter",
-"		175c 4400  ASI4401 Audio Adapter",
-"		ecc0 0010  Darla",
-"		ecc0 0020  Gina",
-"		ecc0 0030  Layla rev.0",
-"		ecc0 0031  Layla rev.1",
-"		ecc0 0040  Darla24 rev.0",
-"		ecc0 0041  Darla24 rev.1",
-"		ecc0 0050  Gina24 rev.0",
-"		ecc0 0051  Gina24 rev.1",
-"		ecc0 0070  Mona rev.0",
-"		ecc0 0071  Mona rev.1",
-"		ecc0 0072  Mona rev.2",
-"	18c0  MPC8265A/8266/8272",
-"	18c1  MPC8271/MPC8272",
-"	3410  DSP56361 Digital Signal Processor",
-"		ecc0 0050  Gina24 rev.0",
-"		ecc0 0051  Gina24 rev.1",
-"		ecc0 0060  Layla24",
-"		ecc0 0070  Mona rev.0",
-"		ecc0 0071  Mona rev.1",
-"		ecc0 0072  Mona rev.2",
-"		ecc0 0080  Mia rev.0",
-"		ecc0 0081  Mia rev.1",
-"		ecc0 0090  Indigo",
-"		ecc0 00a0  Indigo IO",
-"		ecc0 00b0  Indigo DJ",
-"		ecc0 0100  3G",
-"	4801  Raven",
-"	4802  Falcon",
-"	4803  Hawk",
-"	4806  CPX8216",
-"	4d68  20268",
-"	5600  SM56 PCI Modem",
-"		1057 0300  SM56 PCI Speakerphone Modem",
-"		1057 0301  SM56 PCI Voice Modem",
-"		1057 0302  SM56 PCI Fax Modem",
-"		1057 5600  SM56 PCI Voice modem",
-"		13d2 0300  SM56 PCI Speakerphone Modem",
-"		13d2 0301  SM56 PCI Voice modem",
-"		13d2 0302  SM56 PCI Fax Modem",
-"		1436 0300  SM56 PCI Speakerphone Modem",
-"		1436 0301  SM56 PCI Voice modem",
-"		1436 0302  SM56 PCI Fax Modem",
-"		144f 100c  SM56 PCI Fax Modem",
-"		1494 0300  SM56 PCI Speakerphone Modem",
-"		1494 0301  SM56 PCI Voice modem",
-"		14c8 0300  SM56 PCI Speakerphone Modem",
-"		14c8 0302  SM56 PCI Fax Modem",
-"		1668 0300  SM56 PCI Speakerphone Modem",
-"		1668 0302  SM56 PCI Fax Modem",
-"	5608  Wildcard X100P",
-"	5803  MPC5200",
-"	5806  MCF54 Coldfire",
-"	5808  MPC8220",
-"	5809  MPC5200B",
-"	6400  MPC190 Security Processor (S1 family, encryption)",
-"	6405  MPC184 Security Processor (S1 family)",
-"1058  Electronics & Telecommunications RSH",
-"1059  Teknor Industrial Computers Inc",
-"105a  Promise Technology, Inc.",
-"	0d30  PDC20265 (FastTrak100 Lite/Ultra100)",
-"		105a 4d33  Ultra100",
-"	0d38  20263",
-"		105a 4d39  Fasttrak66",
-"	1275  20275",
-"	3318  PDC20318 (SATA150 TX4)",
-"	3319  PDC20319 (FastTrak S150 TX4)",
-"		8086 3427  S875WP1-E mainboard",
-"	3371  PDC20371 (FastTrak S150 TX2plus)",
-"	3373  PDC20378 (FastTrak 378/SATA 378)",
-"		1043 80f5  K8V Deluxe/PC-DL Deluxe motherboard",
-"		1462 702e  K8T NEO FIS2R motherboard",
-"	3375  PDC20375 (SATA150 TX2plus)",
-"	3376  PDC20376 (FastTrak 376)",
-"		1043 809e  A7V8X motherboard",
-"	3515  PDC40719 [FastTrak TX4300/TX4310]",
-"	3519  PDC40519 (FastTrak TX4200)",
-"	3570  20771 (FastTrak TX2300)",
-"	3571  PDC20571 (FastTrak TX2200)",
-"	3574  PDC20579 SATAII 150 IDE Controller",
-"	3577  PDC40779 (SATA 300 779)",
-"	3d17  PDC40718 (SATA 300 TX4)",
-"	3d18  PDC20518/PDC40518 (SATAII 150 TX4)",
-"	3d73  PDC40775 (SATA 300 TX2plus)",
-"	3d75  PDC20575 (SATAII150 TX2plus)",
-"	4d30  PDC20267 (FastTrak100/Ultra100)",
-"		105a 4d33  Ultra100",
-"		105a 4d39  FastTrak100",
-"	4d33  20246",
-"		105a 4d33  20246 IDE Controller",
-"	4d38  PDC20262 (FastTrak66/Ultra66)",
-"		105a 4d30  Ultra Device on SuperTrak",
-"		105a 4d33  Ultra66",
-"		105a 4d39  FastTrak66",
-"	4d68  PDC20268 (Ultra100 TX2)",
-"		105a 4d68  Ultra100TX2",
-"	4d69  20269",
-"		105a 4d68  Ultra133TX2",
-"	5275  PDC20276 (MBFastTrak133 Lite)",
-"		1043 807e  A7V333 motherboard.",
-"		105a 0275  SuperTrak SX6000 IDE",
-"		105a 1275  MBFastTrak133 Lite (tm) Controller (RAID mode)",
-"		1458 b001  MBUltra 133",
-"	5300  DC5300",
-"	6268  PDC20270 (FastTrak100 LP/TX2/TX4)",
-"		105a 4d68  FastTrak100 TX2",
-"	6269  PDC20271 (FastTrak TX2000)",
-"		105a 6269  FastTrak TX2/TX2000",
-"	6621  PDC20621 (FastTrak S150 SX4/FastTrak SX4000 lite)",
-"	6622  PDC20621 [SATA150 SX4] 4 Channel IDE RAID Controller",
-"	6624  PDC20621 [FastTrak SX4100]",
-"	6626  PDC20618 (Ultra 618)",
-"	6629  PDC20619 (FastTrak TX4000)",
-"	7275  PDC20277 (SBFastTrak133 Lite)",
-"	8002  SATAII150 SX8",
-"105b  Foxconn International, Inc.",
-"105c  Wipro Infotech Limited",
-"105d  Number 9 Computer Company",
-"	2309  Imagine 128",
-"	2339  Imagine 128-II",
-"		105d 0000  Imagine 128 series 2 4Mb VRAM",
-"		105d 0001  Imagine 128 series 2 4Mb VRAM",
-"		105d 0002  Imagine 128 series 2 4Mb VRAM",
-"		105d 0003  Imagine 128 series 2 4Mb VRAM",
-"		105d 0004  Imagine 128 series 2 4Mb VRAM",
-"		105d 0005  Imagine 128 series 2 4Mb VRAM",
-"		105d 0006  Imagine 128 series 2 4Mb VRAM",
-"		105d 0007  Imagine 128 series 2 4Mb VRAM",
-"		105d 0008  Imagine 128 series 2e 4Mb DRAM",
-"		105d 0009  Imagine 128 series 2e 4Mb DRAM",
-"		105d 000a  Imagine 128 series 2 8Mb VRAM",
-"		105d 000b  Imagine 128 series 2 8Mb H-VRAM",
-"		11a4 000a  Barco Metheus 5 Megapixel",
-"		13cc 0000  Barco Metheus 5 Megapixel",
-"		13cc 0004  Barco Metheus 5 Megapixel",
-"		13cc 0005  Barco Metheus 5 Megapixel",
-"		13cc 0006  Barco Metheus 5 Megapixel",
-"		13cc 0008  Barco Metheus 5 Megapixel",
-"		13cc 0009  Barco Metheus 5 Megapixel",
-"		13cc 000a  Barco Metheus 5 Megapixel",
-"		13cc 000c  Barco Metheus 5 Megapixel",
-"	493d  Imagine 128 T2R [Ticket to Ride]",
-"		11a4 000a  Barco Metheus 5 Megapixel, Dual Head",
-"		11a4 000b  Barco Metheus 5 Megapixel, Dual Head",
-"		13cc 0002  Barco Metheus 4 Megapixel, Dual Head",
-"		13cc 0003  Barco Metheus 5 Megapixel, Dual Head",
-"		13cc 0007  Barco Metheus 5 Megapixel, Dual Head",
-"		13cc 0008  Barco Metheus 5 Megapixel, Dual Head",
-"		13cc 0009  Barco Metheus 5 Megapixel, Dual Head",
-"		13cc 000a  Barco Metheus 5 Megapixel, Dual Head",
-"	5348  Revolution 4",
-"		105d 0037  Revolution IV-FP AGP (For SGI 1600SW)",
-"		11a4 0028  PVS5600M",
-"		11a4 0038  PVS5600D",
-"105e  Vtech Computers Ltd",
-"105f  Infotronic America Inc",
-"1060  United Microelectronics [UMC]",
-"	0001  UM82C881",
-"	0002  UM82C886",
-"	0101  UM8673F",
-"	0881  UM8881",
-"	0886  UM8886F",
-"	0891  UM8891A",
-"	1001  UM886A",
-"	673a  UM8886BF",
-"	673b  EIDE Master/DMA",
-"	8710  UM8710",
-"	886a  UM8886A",
-"	8881  UM8881F",
-"	8886  UM8886F",
-"	888a  UM8886A",
-"	8891  UM8891A",
-"	9017  UM9017F",
-"	9018  UM9018",
-"	9026  UM9026",
-"	e881  UM8881N",
-"	e886  UM8886N",
-"	e88a  UM8886N",
-"	e891  UM8891N",
-"1061  I.I.T.",
-"	0001  AGX016",
-"	0002  IIT3204/3501",
-"1062  Maspar Computer Corp",
-"1063  Ocean Office Automation",
-"1064  Alcatel",
-"1065  Texas Microsystems",
-"1066  PicoPower Technology",
-"	0000  PT80C826",
-"	0001  PT86C521 [Vesuvius v1] Host Bridge",
-"	0002  PT86C523 [Vesuvius v3] PCI-ISA Bridge Master",
-"	0003  PT86C524 [Nile] PCI-to-PCI Bridge",
-"	0004  PT86C525 [Nile-II] PCI-to-PCI Bridge",
-"	0005  National PC87550 System Controller",
-"	8002  PT86C523 [Vesuvius v3] PCI-ISA Bridge Slave",
-"1067  Mitsubishi Electric",
-"	0301  AccelGraphics AccelECLIPSE",
-"	0304  AccelGALAXY A2100 [OEM Evans & Sutherland]",
-"	0308  Tornado 3000 [OEM Evans & Sutherland]",
-"	1002  VG500 [VolumePro Volume Rendering Accelerator]",
-"1068  Diversified Technology",
-"1069  Mylex Corporation",
-"	0001  DAC960P",
-"	0002  DAC960PD",
-"	0010  DAC960PG",
-"	0020  DAC960LA",
-"	0050  AcceleRAID 352/170/160 support Device",
-"		1069 0050  AcceleRAID 352 support Device",
-"		1069 0052  AcceleRAID 170 support Device",
-"		1069 0054  AcceleRAID 160 support Device",
-"	b166  AcceleRAID 600/500/400/Sapphire support Device",
-"		1014 0242  iSeries 2872 DASD IOA",
-"		1014 0266  Dual Channel PCI-X U320 SCSI Adapter",
-"		1014 0278  Dual Channel PCI-X U320 SCSI RAID Adapter",
-"		1014 02d3  Dual Channel PCI-X U320 SCSI Adapter",
-"		1014 02d4  Dual Channel PCI-X U320 SCSI RAID Adapter",
-"		1069 0200  AcceleRAID 400, Single Channel, PCI-X, U320, SCSI RAID",
-"		1069 0202  AcceleRAID Sapphire, Dual Channel, PCI-X, U320, SCSI RAID",
-"		1069 0204  AcceleRAID 500, Dual Channel, Low-Profile, PCI-X, U320, SCSI RAID",
-"		1069 0206  AcceleRAID 600, Dual Channel, PCI-X, U320, SCSI RAID",
-"	ba55  eXtremeRAID 1100 support Device",
-"	ba56  eXtremeRAID 2000/3000 support Device",
-"		1069 0030  eXtremeRAID 3000 support Device",
-"		1069 0040  eXtremeRAID 2000 support Device",
-"	ba57  eXtremeRAID 4000/5000 support Device",
-"		1069 0072  eXtremeRAID 5000 support Device",
-"106a  Aten Research Inc",
-"106b  Apple Computer Inc.",
-"	0001  Bandit PowerPC host bridge",
-"	0002  Grand Central I/O",
-"	0003  Control Video",
-"	0004  PlanB Video-In",
-"	0007  O'Hare I/O",
-"	000c  DOS on Mac",
-"	000e  Hydra Mac I/O",
-"	0010  Heathrow Mac I/O",
-"	0017  Paddington Mac I/O",
-"	0018  UniNorth FireWire",
-"	0019  KeyLargo USB",
-"	001e  UniNorth Internal PCI",
-"	001f  UniNorth PCI",
-"	0020  UniNorth AGP",
-"	0021  UniNorth GMAC (Sun GEM)",
-"	0022  KeyLargo Mac I/O",
-"	0024  UniNorth/Pangea GMAC (Sun GEM)",
-"	0025  KeyLargo/Pangea Mac I/O",
-"	0026  KeyLargo/Pangea USB",
-"	0027  UniNorth/Pangea AGP",
-"	0028  UniNorth/Pangea PCI",
-"	0029  UniNorth/Pangea Internal PCI",
-"	002d  UniNorth 1.5 AGP",
-"	002e  UniNorth 1.5 PCI",
-"	002f  UniNorth 1.5 Internal PCI",
-"	0030  UniNorth/Pangea FireWire",
-"	0031  UniNorth 2 FireWire",
-"		106b 5811  iBook G4 2004",
-"	0032  UniNorth 2 GMAC (Sun GEM)",
-"	0033  UniNorth 2 ATA/100",
-"	0034  UniNorth 2 AGP",
-"	0035  UniNorth 2 PCI",
-"	0036  UniNorth 2 Internal PCI",
-"	003b  UniNorth/Intrepid ATA/100",
-"	003e  KeyLargo/Intrepid Mac I/O",
-"	003f  KeyLargo/Intrepid USB",
-"	0040  K2 KeyLargo USB",
-"	0041  K2 KeyLargo Mac/IO",
-"	0042  K2 FireWire",
-"	0043  K2 ATA/100",
-"	0045  K2 HT-PCI Bridge",
-"	0046  K2 HT-PCI Bridge",
-"	0047  K2 HT-PCI Bridge",
-"	0048  K2 HT-PCI Bridge",
-"	0049  K2 HT-PCI Bridge",
-"	004b  U3 AGP",
-"	004c  K2 GMAC (Sun GEM)",
-"	004f  Shasta Mac I/O",
-"	0050  Shasta IDE",
-"	0051  Shasta (Sun GEM)",
-"	0052  Shasta Firewire",
-"	0053  Shasta PCI Bridge",
-"	0054  Shasta PCI Bridge",
-"	0055  Shasta PCI Bridge",
-"	0058  U3L AGP Bridge",
-"	0059  U3H AGP Bridge",
-"	0066  Intrepid2 AGP Bridge",
-"	0067  Intrepid2 PCI Bridge",
-"	0068  Intrepid2 PCI Bridge",
-"	0069  Intrepid2 ATA/100",
-"	006a  Intrepid2 Firewire",
-"	006b  Intrepid2 GMAC (Sun GEM)",
-"	1645  Tigon3 Gigabit Ethernet NIC (BCM5701)",
-"106c  Hynix Semiconductor",
-"	8801  Dual Pentium ISA/PCI Motherboard",
-"	8802  PowerPC ISA/PCI Motherboard",
-"	8803  Dual Window Graphics Accelerator",
-"	8804  LAN Controller",
-"	8805  100-BaseT LAN",
-"106d  Sequent Computer Systems",
-"106e  DFI, Inc",
-"106f  City Gate Development Ltd",
-"1070  Daewoo Telecom Ltd",
-"1071  Mitac",
-"	8160  Mitac 8060B Mobile Platform",
-"1072  GIT Co Ltd",
-"1073  Yamaha Corporation",
-"	0001  3D GUI Accelerator",
-"	0002  YGV615 [RPA3 3D-Graphics Controller]",
-"	0003  YMF-740",
-"	0004  YMF-724",
-"		1073 0004  YMF724-Based PCI Audio Adapter",
-"	0005  DS1 Audio",
-"		1073 0005  DS-XG PCI Audio CODEC",
-"	0006  DS1 Audio",
-"	0008  DS1 Audio",
-"		1073 0008  DS-XG PCI Audio CODEC",
-"	000a  DS1L Audio",
-"		1073 0004  DS-XG PCI Audio CODEC",
-"		1073 000a  DS-XG PCI Audio CODEC",
-"	000c  YMF-740C [DS-1L Audio Controller]",
-"		107a 000c  DS-XG PCI Audio CODEC",
-"	000d  YMF-724F [DS-1 Audio Controller]",
-"		1073 000d  DS-XG PCI Audio CODEC",
-"	0010  YMF-744B [DS-1S Audio Controller]",
-"		1073 0006  DS-XG PCI Audio CODEC",
-"		1073 0010  DS-XG PCI Audio CODEC",
-"	0012  YMF-754 [DS-1E Audio Controller]",
-"		1073 0012  DS-XG PCI Audio Codec",
-"	0020  DS-1 Audio",
-"	2000  DS2416 Digital Mixing Card",
-"		1073 2000  DS2416 Digital Mixing Card",
-"1074  NexGen Microsystems",
-"	4e78  82c500/1",
-"1075  Advanced Integrations Research",
-"1076  Chaintech Computer Co. Ltd",
-"1077  QLogic Corp.",
-"	1016  ISP10160 Single Channel Ultra3 SCSI Processor",
-"	1020  ISP1020 Fast-wide SCSI",
-"	1022  ISP1022 Fast-wide SCSI",
-"	1080  ISP1080 SCSI Host Adapter",
-"	1216  ISP12160 Dual Channel Ultra3 SCSI Processor",
-"		101e 8471  QLA12160 on AMI MegaRAID",
-"		101e 8493  QLA12160 on AMI MegaRAID",
-"	1240  ISP1240 SCSI Host Adapter",
-"	1280  ISP1280 SCSI Host Adapter",
-"	2020  ISP2020A Fast!SCSI Basic Adapter",
-"	2100  QLA2100 64-bit Fibre Channel Adapter",
-"		1077 0001  QLA2100 64-bit Fibre Channel Adapter",
-"	2200  QLA2200 64-bit Fibre Channel Adapter",
-"		1077 0002  QLA2200",
-"	2300  QLA2300 64-bit Fibre Channel Adapter",
-"	2312  QLA2312 Fibre Channel Adapter",
-"	2322  QLA2322 Fibre Channel Adapter",
-"	2422  QLA2422 Fibre Channel Adapter",
-"	2432  QLA2432 Fibre Channel Adapter",
-"	3010  QLA3010 Network Adapter",
-"	3022  QLA3022 Network Adapter",
-"	4010  QLA4010 iSCSI TOE Adapter",
-"	4022  QLA4022 iSCSI TOE Adapter",
-"	6312  QLA6312 Fibre Channel Adapter",
-"	6322  QLA6322 Fibre Channel Adapter",
-"1078  Cyrix Corporation",
-"	0000  5510 [Grappa]",
-"	0001  PCI Master",
-"	0002  5520 [Cognac]",
-"	0100  5530 Legacy [Kahlua]",
-"	0101  5530 SMI [Kahlua]",
-"	0102  5530 IDE [Kahlua]",
-"	0103  5530 Audio [Kahlua]",
-"	0104  5530 Video [Kahlua]",
-"	0400  ZFMicro PCI Bridge",
-"	0401  ZFMicro Chipset SMI",
-"	0402  ZFMicro Chipset IDE",
-"	0403  ZFMicro Expansion Bus",
-"1079  I-Bus",
-"107a  NetWorth",
-"107b  Gateway 2000",
-"107c  LG Electronics [Lucky Goldstar Co. Ltd]",
-"107d  LeadTek Research Inc.",
-"	0000  P86C850",
-"	204d  [GeForce 7800 GTX] Winfast PX7800 GTX TDH",
-"	2134  WinFast 3D S320 II",
-"	2971  [GeForce FX 5900] WinFast A350 TDH MyViVo",
-"107e  Interphase Corporation",
-"	0001  5515 ATM Adapter [Flipper]",
-"	0002  100 VG AnyLan Controller",
-"	0004  5526 Fibre Channel Host Adapter",
-"	0005  x526 Fibre Channel Host Adapter",
-"	0008  5525/5575 ATM Adapter (155 Mbit) [Atlantic]",
-"	9003  5535-4P-BRI-ST",
-"	9007  5535-4P-BRI-U",
-"	9008  5535-1P-SR",
-"	900c  5535-1P-SR-ST",
-"	900e  5535-1P-SR-U",
-"	9011  5535-1P-PRI",
-"	9013  5535-2P-PRI",
-"	9023  5536-4P-BRI-ST",
-"	9027  5536-4P-BRI-U",
-"	9031  5536-1P-PRI",
-"	9033  5536-2P-PRI",
-"107f  Data Technology Corporation",
-"	0802  SL82C105",
-"1080  Contaq Microsystems",
-"	0600  82C599",
-"	c691  Cypress CY82C691",
-"	c693  82c693",
-"1081  Supermac Technology",
-"	0d47  Radius PCI to NuBUS Bridge",
-"1082  EFA Corporation of America",
-"1083  Forex Computer Corporation",
-"	0001  FR710",
-"1084  Parador",
-"1085  Tulip Computers Int.B.V.",
-"1086  J. Bond Computer Systems",
-"1087  Cache Computer",
-"1088  Microcomputer Systems (M) Son",
-"1089  Data General Corporation",
-"108a  SBS Technologies",
-"	0001  VME Bridge Model 617",
-"	0010  VME Bridge Model 618",
-"	0040  dataBLIZZARD",
-"	3000  VME Bridge Model 2706",
-"108c  Oakleigh Systems Inc.",
-"108d  Olicom",
-"	0001  Token-Ring 16/4 PCI Adapter (3136/3137)",
-"	0002  16/4 Token Ring",
-"	0004  RapidFire 3139 Token-Ring 16/4 PCI Adapter",
-"		108d 0004  OC-3139/3140 RapidFire Token-Ring 16/4 Adapter",
-"	0005  GoCard 3250 Token-Ring 16/4 CardBus PC Card",
-"	0006  OC-3530 RapidFire Token-Ring 100",
-"	0007  RapidFire 3141 Token-Ring 16/4 PCI Fiber Adapter",
-"		108d 0007  OC-3141 RapidFire Token-Ring 16/4 Adapter",
-"	0008  RapidFire 3540 HSTR 100/16/4 PCI Adapter",
-"		108d 0008  OC-3540 RapidFire HSTR 100/16/4 Adapter",
-"	0011  OC-2315",
-"	0012  OC-2325",
-"	0013  OC-2183/2185",
-"	0014  OC-2326",
-"	0019  OC-2327/2250 10/100 Ethernet Adapter",
-"		108d 0016  OC-2327 Rapidfire 10/100 Ethernet Adapter",
-"		108d 0017  OC-2250 GoCard 10/100 Ethernet Adapter",
-"	0021  OC-6151/6152 [RapidFire ATM 155]",
-"	0022  ATM Adapter",
-"108e  Sun Microsystems Computer Corp.",
-"	0001  EBUS",
-"	1000  EBUS",
-"	1001  Happy Meal",
-"	1100  RIO EBUS",
-"	1101  RIO GEM",
-"	1102  RIO 1394",
-"	1103  RIO USB",
-"	1648  [bge] Gigabit Ethernet",
-"	2bad  GEM",
-"	5000  Simba Advanced PCI Bridge",
-"	5043  SunPCI Co-processor",
-"	8000  Psycho PCI Bus Module",
-"	8001  Schizo PCI Bus Module",
-"	8002  Schizo+ PCI Bus Module",
-"	a000  Ultra IIi",
-"	a001  Ultra IIe",
-"	a801  Tomatillo PCI Bus Module",
-"	abba  Cassini 10/100/1000",
-"108f  Systemsoft",
-"1090  Compro Computer Services, Inc.",
-"1091  Intergraph Corporation",
-"	0020  3D graphics processor",
-"	0021  3D graphics processor w/Texturing",
-"	0040  3D graphics frame buffer",
-"	0041  3D graphics frame buffer",
-"	0060  Proprietary bus bridge",
-"	00e4  Powerstorm 4D50T",
-"	0720  Motion JPEG codec",
-"	07a0  Sun Expert3D-Lite Graphics Accelerator",
-"	1091  Sun Expert3D Graphics Accelerator",
-"1092  Diamond Multimedia Systems",
-"	00a0  Speedstar Pro SE",
-"	00a8  Speedstar 64",
-"	0550  Viper V550",
-"	08d4  Supra 2260 Modem",
-"	094c  SupraExpress 56i Pro",
-"	1092  Viper V330",
-"	6120  Maximum DVD",
-"	8810  Stealth SE",
-"	8811  Stealth 64/SE",
-"	8880  Stealth",
-"	8881  Stealth",
-"	88b0  Stealth 64",
-"	88b1  Stealth 64",
-"	88c0  Stealth 64",
-"	88c1  Stealth 64",
-"	88d0  Stealth 64",
-"	88d1  Stealth 64",
-"	88f0  Stealth 64",
-"	88f1  Stealth 64",
-"	9999  DMD-I0928-1 'Monster sound' sound chip",
-"1093  National Instruments",
-"	0160  PCI-DIO-96",
-"	0162  PCI-MIO-16XE-50",
-"	1150  PCI-DIO-32HS High Speed Digital I/O Board",
-"	1170  PCI-MIO-16XE-10",
-"	1180  PCI-MIO-16E-1",
-"	1190  PCI-MIO-16E-4",
-"	1310  PCI-6602",
-"	1330  PCI-6031E",
-"	1350  PCI-6071E",
-"	14e0  PCI-6110",
-"	14f0  PCI-6111",
-"	17d0  PCI-6503",
-"	1870  PCI-6713",
-"	1880  PCI-6711",
-"	18b0  PCI-6052E",
-"	2410  PCI-6733",
-"	2890  PCI-6036E",
-"	2a60  PCI-6023E",
-"	2a70  PCI-6024E",
-"	2a80  PCI-6025E",
-"	2c80  PCI-6035E",
-"	2ca0  PCI-6034E",
-"	70a9  PCI-6528 (Digital I/O at 60V)",
-"	70b8  PCI-6251 [M Series - High Speed Multifunction DAQ]",
-"	b001  IMAQ-PCI-1408",
-"	b011  IMAQ-PXI-1408",
-"	b021  IMAQ-PCI-1424",
-"	b031  IMAQ-PCI-1413",
-"	b041  IMAQ-PCI-1407",
-"	b051  IMAQ-PXI-1407",
-"	b061  IMAQ-PCI-1411",
-"	b071  IMAQ-PCI-1422",
-"	b081  IMAQ-PXI-1422",
-"	b091  IMAQ-PXI-1411",
-"	c801  PCI-GPIB",
-"	c831  PCI-GPIB bridge",
-"1094  First International Computers [FIC]",
-"1095  Silicon Image, Inc.",
-"	0240  Adaptec AAR-1210SA SATA HostRAID Controller",
-"	0640  PCI0640",
-"	0643  PCI0643",
-"	0646  PCI0646",
-"	0647  PCI0647",
-"	0648  PCI0648",
-"		1043 8025  CUBX motherboard",
-"	0649  SiI 0649 Ultra ATA/100 PCI to ATA Host Controller",
-"		0e11 005d  Integrated Ultra ATA-100 Dual Channel Controller",
-"		0e11 007e  Integrated Ultra ATA-100 IDE RAID Controller",
-"		101e 0649  AMI MegaRAID IDE 100 Controller",
-"	0650  PBC0650A",
-"	0670  USB0670",
-"		1095 0670  USB0670",
-"	0673  USB0673",
-"	0680  PCI0680 Ultra ATA-133 Host Controller",
-"		1095 3680  Winic W-680 (Silicon Image 680 based)",
-"	3112  SiI 3112 [SATALink/SATARaid] Serial ATA Controller",
-"		1095 3112  SiI 3112 SATALink Controller",
-"		1095 6112  SiI 3112 SATARaid Controller",
-"		9005 0250  SATAConnect 1205SA Host Controller",
-"	3114  SiI 3114 [SATALink/SATARaid] Serial ATA Controller",
-"		1095 3114  SiI 3114 SATALink Controller",
-"		1095 6114  SiI 3114 SATARaid Controller",
-"	3124  SiI 3124 PCI-X Serial ATA Controller",
-"		1095 3124  SiI 3124 PCI-X Serial ATA Controller",
-"	3132  SiI 3132 Serial ATA Raid II Controller",
-"	3512  SiI 3512 [SATALink/SATARaid] Serial ATA Controller",
-"		1095 3512  SiI 3512 SATALink Controller",
-"		1095 6512  SiI 3512 SATARaid Controller",
-"1096  Alacron",
-"1097  Appian Technology",
-"1098  Quantum Designs (H.K.) Ltd",
-"	0001  QD-8500",
-"	0002  QD-8580",
-"1099  Samsung Electronics Co., Ltd",
-"109a  Packard Bell",
-"109b  Gemlight Computer Ltd.",
-"109c  Megachips Corporation",
-"109d  Zida Technologies Ltd.",
-"109e  Brooktree Corporation",
-"	032e  Bt878 Video Capture",
-"	0350  Bt848 Video Capture",
-"	0351  Bt849A Video capture",
-"	0369  Bt878 Video Capture",
-"		1002 0001  TV-Wonder",
-"		1002 0003  TV-Wonder/VE",
-"	036c  Bt879(\?\?) Video Capture",
-"		13e9 0070  Win/TV (Video Section)",
-"	036e  Bt878 Video Capture",
-"		0070 13eb  WinTV Series",
-"		0070 ff01  Viewcast Osprey 200",
-"		0071 0101  DigiTV PCI",
-"		107d 6606  WinFast TV 2000",
-"		11bd 0012  PCTV pro (TV + FM stereo receiver)",
-"		11bd 001c  PCTV Sat (DBC receiver)",
-"		127a 0001  Bt878 Mediastream Controller NTSC",
-"		127a 0002  Bt878 Mediastream Controller PAL BG",
-"		127a 0003  Bt878a Mediastream Controller PAL BG",
-"		127a 0048  Bt878/832 Mediastream Controller",
-"		144f 3000  MagicTView CPH060 - Video",
-"		1461 0002  TV98 Series (TV/No FM/Remote)",
-"		1461 0003  AverMedia UltraTV PCI 350",
-"		1461 0004  AVerTV WDM Video Capture",
-"		1461 0761  AverTV DVB-T",
-"		14f1 0001  Bt878 Mediastream Controller NTSC",
-"		14f1 0002  Bt878 Mediastream Controller PAL BG",
-"		14f1 0003  Bt878a Mediastream Controller PAL BG",
-"		14f1 0048  Bt878/832 Mediastream Controller",
-"		1822 0001  VisionPlus DVB card",
-"		1851 1850  FlyVideo'98 - Video",
-"		1851 1851  FlyVideo II",
-"		1852 1852  FlyVideo'98 - Video (with FM Tuner)",
-"		18ac d500  DViCO FusionHDTV5 Lite",
-"		270f fc00  Digitop DTT-1000",
-"		bd11 1200  PCTV pro (TV + FM stereo receiver)",
-"	036f  Bt879 Video Capture",
-"		127a 0044  Bt879 Video Capture NTSC",
-"		127a 0122  Bt879 Video Capture PAL I",
-"		127a 0144  Bt879 Video Capture NTSC",
-"		127a 0222  Bt879 Video Capture PAL BG",
-"		127a 0244  Bt879a Video Capture NTSC",
-"		127a 0322  Bt879 Video Capture NTSC",
-"		127a 0422  Bt879 Video Capture NTSC",
-"		127a 1122  Bt879 Video Capture PAL I",
-"		127a 1222  Bt879 Video Capture PAL BG",
-"		127a 1322  Bt879 Video Capture NTSC",
-"		127a 1522  Bt879a Video Capture PAL I",
-"		127a 1622  Bt879a Video Capture PAL BG",
-"		127a 1722  Bt879a Video Capture NTSC",
-"		14f1 0044  Bt879 Video Capture NTSC",
-"		14f1 0122  Bt879 Video Capture PAL I",
-"		14f1 0144  Bt879 Video Capture NTSC",
-"		14f1 0222  Bt879 Video Capture PAL BG",
-"		14f1 0244  Bt879a Video Capture NTSC",
-"		14f1 0322  Bt879 Video Capture NTSC",
-"		14f1 0422  Bt879 Video Capture NTSC",
-"		14f1 1122  Bt879 Video Capture PAL I",
-"		14f1 1222  Bt879 Video Capture PAL BG",
-"		14f1 1322  Bt879 Video Capture NTSC",
-"		14f1 1522  Bt879a Video Capture PAL I",
-"		14f1 1622  Bt879a Video Capture PAL BG",
-"		14f1 1722  Bt879a Video Capture NTSC",
-"		1851 1850  FlyVideo'98 - Video",
-"		1851 1851  FlyVideo II",
-"		1852 1852  FlyVideo'98 - Video (with FM Tuner)",
-"	0370  Bt880 Video Capture",
-"		1851 1850  FlyVideo'98",
-"		1851 1851  FlyVideo'98 EZ - video",
-"		1852 1852  FlyVideo'98 (with FM Tuner)",
-"	0878  Bt878 Audio Capture",
-"		0070 13eb  WinTV Series",
-"		0070 ff01  Viewcast Osprey 200",
-"		0071 0101  DigiTV PCI",
-"		1002 0001  TV-Wonder",
-"		1002 0003  TV-Wonder/VE",
-"		11bd 0012  PCTV pro (TV + FM stereo receiver, audio section)",
-"		11bd 001c  PCTV Sat (DBC receiver)",
-"		127a 0001  Bt878 Video Capture (Audio Section)",
-"		127a 0002  Bt878 Video Capture (Audio Section)",
-"		127a 0003  Bt878 Video Capture (Audio Section)",
-"		127a 0048  Bt878 Video Capture (Audio Section)",
-"		13e9 0070  Win/TV (Audio Section)",
-"		144f 3000  MagicTView CPH060 - Audio",
-"		1461 0002  Avermedia PCTV98 Audio Capture",
-"		1461 0004  AVerTV WDM Audio Capture",
-"		1461 0761  AVerTV DVB-T",
-"		14f1 0001  Bt878 Video Capture (Audio Section)",
-"		14f1 0002  Bt878 Video Capture (Audio Section)",
-"		14f1 0003  Bt878 Video Capture (Audio Section)",
-"		14f1 0048  Bt878 Video Capture (Audio Section)",
-"		1822 0001  VisionPlus DVB Card",
-"		18ac d500  DViCO FusionHDTV5 Lite",
-"		270f fc00  Digitop DTT-1000",
-"		bd11 1200  PCTV pro (TV + FM stereo receiver, audio section)",
-"	0879  Bt879 Audio Capture",
-"		127a 0044  Bt879 Video Capture (Audio Section)",
-"		127a 0122  Bt879 Video Capture (Audio Section)",
-"		127a 0144  Bt879 Video Capture (Audio Section)",
-"		127a 0222  Bt879 Video Capture (Audio Section)",
-"		127a 0244  Bt879 Video Capture (Audio Section)",
-"		127a 0322  Bt879 Video Capture (Audio Section)",
-"		127a 0422  Bt879 Video Capture (Audio Section)",
-"		127a 1122  Bt879 Video Capture (Audio Section)",
-"		127a 1222  Bt879 Video Capture (Audio Section)",
-"		127a 1322  Bt879 Video Capture (Audio Section)",
-"		127a 1522  Bt879 Video Capture (Audio Section)",
-"		127a 1622  Bt879 Video Capture (Audio Section)",
-"		127a 1722  Bt879 Video Capture (Audio Section)",
-"		14f1 0044  Bt879 Video Capture (Audio Section)",
-"		14f1 0122  Bt879 Video Capture (Audio Section)",
-"		14f1 0144  Bt879 Video Capture (Audio Section)",
-"		14f1 0222  Bt879 Video Capture (Audio Section)",
-"		14f1 0244  Bt879 Video Capture (Audio Section)",
-"		14f1 0322  Bt879 Video Capture (Audio Section)",
-"		14f1 0422  Bt879 Video Capture (Audio Section)",
-"		14f1 1122  Bt879 Video Capture (Audio Section)",
-"		14f1 1222  Bt879 Video Capture (Audio Section)",
-"		14f1 1322  Bt879 Video Capture (Audio Section)",
-"		14f1 1522  Bt879 Video Capture (Audio Section)",
-"		14f1 1622  Bt879 Video Capture (Audio Section)",
-"		14f1 1722  Bt879 Video Capture (Audio Section)",
-"	0880  Bt880 Audio Capture",
-"	2115  BtV 2115 Mediastream controller",
-"	2125  BtV 2125 Mediastream controller",
-"	2164  BtV 2164",
-"	2165  BtV 2165",
-"	8230  Bt8230 ATM Segment/Reassembly Ctrlr (SRC)",
-"	8472  Bt8472",
-"	8474  Bt8474",
-"109f  Trigem Computer Inc.",
-"10a0  Meidensha Corporation",
-"10a1  Juko Electronics Ind. Co. Ltd",
-"10a2  Quantum Corporation",
-"10a3  Everex Systems Inc",
-"10a4  Globe Manufacturing Sales",
-"10a5  Smart Link Ltd.",
-"	3052  SmartPCI562 56K Modem",
-"	5449  SmartPCI561 modem",
-"10a6  Informtech Industrial Ltd.",
-"10a7  Benchmarq Microelectronics",
-"10a8  Sierra Semiconductor",
-"	0000  STB Horizon 64",
-"10a9  Silicon Graphics, Inc.",
-"	0001  Crosstalk to PCI Bridge",
-"	0002  Linc I/O controller",
-"	0003  IOC3 I/O controller",
-"	0004  O2 MACE",
-"	0005  RAD Audio",
-"	0006  HPCEX",
-"	0007  RPCEX",
-"	0008  DiVO VIP",
-"	0009  AceNIC Gigabit Ethernet",
-"		10a9 8002  AceNIC Gigabit Ethernet",
-"	0010  AMP Video I/O",
-"	0011  GRIP",
-"	0012  SGH PSHAC GSN",
-"	1001  Magic Carpet",
-"	1002  Lithium",
-"	1003  Dual JPEG 1",
-"	1004  Dual JPEG 2",
-"	1005  Dual JPEG 3",
-"	1006  Dual JPEG 4",
-"	1007  Dual JPEG 5",
-"	1008  Cesium",
-"	100a  IOC4 I/O controller",
-"	2001  Fibre Channel",
-"	2002  ASDE",
-"	4001  TIO-CE PCI Express Bridge",
-"	4002  TIO-CE PCI Express Port",
-"	8001  O2 1394",
-"	8002  G-net NT",
-"	8010  Broadcom e-net [SGI IO9/IO10 BaseIO]",
-"	8018  Broadcom e-net [SGI A330 Server BaseIO]",
-"10aa  ACC Microelectronics",
-"	0000  ACCM 2188",
-"10ab  Digicom",
-"10ac  Honeywell IAC",
-"10ad  Symphony Labs",
-"	0001  W83769F",
-"	0003  SL82C103",
-"	0005  SL82C105",
-"	0103  SL82c103",
-"	0105  SL82c105",
-"	0565  W83C553",
-"10ae  Cornerstone Technology",
-"10af  Micro Computer Systems Inc",
-"10b0  CardExpert Technology",
-"10b1  Cabletron Systems Inc",
-"10b2  Raytheon Company",
-"10b3  Databook Inc",
-"	3106  DB87144",
-"	b106  DB87144",
-"10b4  STB Systems Inc",
-"	1b1d  Velocity 128 3D",
-"		10b4 237e  Velocity 4400",
-"10b5  PLX Technology, Inc.",
-"	0001  i960 PCI bus interface",
-"	1042  Brandywine / jxi2, Inc. - PMC-SyncClock32, IRIG A & B, Nasa 36",
-"	1076  VScom 800 8 port serial adaptor",
-"	1077  VScom 400 4 port serial adaptor",
-"	1078  VScom 210 2 port serial and 1 port parallel adaptor",
-"	1103  VScom 200 2 port serial adaptor",
-"	1146  VScom 010 1 port parallel adaptor",
-"	1147  VScom 020 2 port parallel adaptor",
-"	2540  IXXAT CAN-Interface PC-I 04/PCI",
-"	2724  Thales PCSM Security Card",
-"	6540  PCI6540/6466 PCI-PCI bridge (transparent mode)",
-"		4c53 10e0  PSL09 PrPMC",
-"	6541  PCI6540/6466 PCI-PCI bridge (non-transparent mode, primary side)",
-"		4c53 10e0  PSL09 PrPMC",
-"	6542  PCI6540/6466 PCI-PCI bridge (non-transparent mode, secondary side)",
-"		4c53 10e0  PSL09 PrPMC",
-"	8111  PEX 8111 PCI Express-to-PCI Bridge",
-"	8114  PEX 8114 PCI Express-to-PCI/PCI-X Bridge",
-"	8516  PEX 8516  Versatile PCI Express Switch",
-"	8532  PEX 8532  Versatile PCI Express Switch",
-"	9030  PCI <-> IOBus Bridge Hot Swap",
-"		10b5 2862  Alpermann+Velte PCL PCI LV (3V/5V): Timecode Reader Board",
-"		10b5 2906  Alpermann+Velte PCI TS (3V/5V): Time Synchronisation Board",
-"		10b5 2940  Alpermann+Velte PCL PCI D (3V/5V): Timecode Reader Board",
-"		10b5 2977  IXXAT iPC-I XC16/PCI CAN Board",
-"		10b5 2978  SH ARC-PCIu SOHARD ARCNET card",
-"		10b5 3025  Alpermann+Velte PCL PCI L (3V/5V): Timecode Reader Board",
-"		10b5 3068  Alpermann+Velte PCL PCI HD (3V/5V): Timecode Reader Board",
-"		1397 3136  4xS0-ISDN PCI Adapter",
-"		1397 3137  S2M-E1-ISDN PCI Adapter",
-"		1518 0200  Kontron ThinkIO-C",
-"		15ed 1002  MCCS 8-port Serial Hot Swap",
-"		15ed 1003  MCCS 16-port Serial Hot Swap",
-"	9036  9036",
-"	9050  PCI <-> IOBus Bridge",
-"		10b5 1067  IXXAT CAN i165",
-"		10b5 1172  IK220 (Heidenhain)",
-"		10b5 2036  SatPak GPS",
-"		10b5 2221  Alpermann+Velte PCL PCI LV: Timecode Reader Board",
-"		10b5 2273  SH ARC-PCI SOHARD ARCNET card",
-"		10b5 2431  Alpermann+Velte PCL PCI D: Timecode Reader Board",
-"		10b5 2905  Alpermann+Velte PCI TS: Time Synchronisation Board",
-"		10b5 9050  MP9050",
-"		1498 0362  TPMC866 8 Channel Serial Card",
-"		1522 0001  RockForce 4 Port V.90 Data/Fax/Voice Modem",
-"		1522 0002  RockForce 2 Port V.90 Data/Fax/Voice Modem",
-"		1522 0003  RockForce 6 Port V.90 Data/Fax/Voice Modem",
-"		1522 0004  RockForce 8 Port V.90 Data/Fax/Voice Modem",
-"		1522 0010  RockForce2000 4 Port V.90 Data/Fax/Voice Modem",
-"		1522 0020  RockForce2000 2 Port V.90 Data/Fax/Voice Modem",
-"		15ed 1000  Macrolink MCCS 8-port Serial",
-"		15ed 1001  Macrolink MCCS 16-port Serial",
-"		15ed 1002  Macrolink MCCS 8-port Serial Hot Swap",
-"		15ed 1003  Macrolink MCCS 16-port Serial Hot Swap",
-"		5654 2036  OpenSwitch 6 Telephony card",
-"		5654 3132  OpenSwitch 12 Telephony card",
-"		5654 5634  OpenLine4 Telephony Card",
-"		d531 c002  PCIntelliCAN 2xSJA1000 CAN bus",
-"		d84d 4006  EX-4006 1P",
-"		d84d 4008  EX-4008 1P EPP/ECP",
-"		d84d 4014  EX-4014 2P",
-"		d84d 4018  EX-4018 3P EPP/ECP",
-"		d84d 4025  EX-4025 1S(16C550) RS-232",
-"		d84d 4027  EX-4027 1S(16C650) RS-232",
-"		d84d 4028  EX-4028 1S(16C850) RS-232",
-"		d84d 4036  EX-4036 2S(16C650) RS-232",
-"		d84d 4037  EX-4037 2S(16C650) RS-232",
-"		d84d 4038  EX-4038 2S(16C850) RS-232",
-"		d84d 4052  EX-4052 1S(16C550) RS-422/485",
-"		d84d 4053  EX-4053 2S(16C550) RS-422/485",
-"		d84d 4055  EX-4055 4S(16C550) RS-232",
-"		d84d 4058  EX-4055 4S(16C650) RS-232",
-"		d84d 4065  EX-4065 8S(16C550) RS-232",
-"		d84d 4068  EX-4068 8S(16C650) RS-232",
-"		d84d 4078  EX-4078 2S(16C552) RS-232+1P",
-"	9054  PCI <-> IOBus Bridge",
-"		10b5 2455  Wessex Techology PHIL-PCI",
-"		10b5 2696  Innes Corp AM Radcap card",
-"		10b5 2717  Innes Corp Auricon card",
-"		10b5 2844  Innes Corp TVS Encoder card",
-"		12c7 4001  Intel Dialogic DM/V960-4T1 PCI",
-"		12d9 0002  PCI Prosody Card rev 1.5",
-"		16df 0011  PIKA PrimeNet MM PCI",
-"		16df 0012  PIKA PrimeNet MM cPCI 8",
-"		16df 0013  PIKA PrimeNet MM cPCI 8 (without CAS Signaling)",
-"		16df 0014  PIKA PrimeNet MM cPCI 4",
-"		16df 0015  PIKA Daytona MM",
-"		16df 0016  PIKA InLine MM",
-"	9056  Francois",
-"		10b5 2979  CellinkBlade 11 - CPCI board VoATM AAL1",
-"	9060  9060",
-"	906d  9060SD",
-"		125c 0640  Aries 16000P",
-"	906e  9060ES",
-"	9080  9080",
-"		103c 10eb  (Agilent) E2777B 83K Series Optical Communication Interface",
-"		103c 10ec  (Agilent) E6978-66442 PCI CIC",
-"		10b5 9080  9080 [real subsystem ID not set]",
-"		129d 0002  Aculab PCI Prosidy card",
-"		12d9 0002  PCI Prosody Card",
-"		12df 4422  4422PCI ['Do-All' Telemetry Data Aquisition System]",
-"	bb04  B&B 3PCIOSD1A Isolated PCI Serial",
-"10b6  Madge Networks",
-"	0001  Smart 16/4 PCI Ringnode",
-"	0002  Smart 16/4 PCI Ringnode Mk2",
-"		10b6 0002  Smart 16/4 PCI Ringnode Mk2",
-"		10b6 0006  16/4 CardBus Adapter",
-"	0003  Smart 16/4 PCI Ringnode Mk3",
-"		0e11 b0fd  Compaq NC4621 PCI, 4/16, WOL",
-"		10b6 0003  Smart 16/4 PCI Ringnode Mk3",
-"		10b6 0007  Presto PCI Plus Adapter",
-"	0004  Smart 16/4 PCI Ringnode Mk1",
-"	0006  16/4 Cardbus Adapter",
-"		10b6 0006  16/4 CardBus Adapter",
-"	0007  Presto PCI Adapter",
-"		10b6 0007  Presto PCI",
-"	0009  Smart 100/16/4 PCI-HS Ringnode",
-"		10b6 0009  Smart 100/16/4 PCI-HS Ringnode",
-"	000a  Smart 100/16/4 PCI Ringnode",
-"		10b6 000a  Smart 100/16/4 PCI Ringnode",
-"	000b  16/4 CardBus Adapter Mk2",
-"		10b6 0008  16/4 CardBus Adapter Mk2",
-"		10b6 000b  16/4 Cardbus Adapter Mk2",
-"	000c  RapidFire 3140V2 16/4 TR Adapter",
-"		10b6 000c  RapidFire 3140V2 16/4 TR Adapter",
-"	1000  Collage 25/155 ATM Client Adapter",
-"	1001  Collage 155 ATM Server Adapter",
-"10b7  3Com Corporation",
-"	0001  3c985 1000BaseSX (SX/TX)",
-"	0013  AR5212 802.11abg NIC (3CRDAG675)",
-"		10b7 2031  3CRDAG675 11a/b/g Wireless PCI Adapter",
-"	0910  3C910-A01",
-"	1006  MINI PCI type 3B Data Fax Modem",
-"	1007  Mini PCI 56k Winmodem",
-"		10b7 615c  Mini PCI 56K Modem",
-"	1201  3c982-TXM 10/100baseTX Dual Port A [Hydra]",
-"	1202  3c982-TXM 10/100baseTX Dual Port B [Hydra]",
-"	1700  3c940 10/100/1000Base-T [Marvell]",
-"		1043 80eb  A7V600/P4P800/K8V motherboard",
-"		10b7 0010  3C940 Gigabit LOM Ethernet Adapter",
-"		10b7 0020  3C941 Gigabit LOM Ethernet Adapter",
-"		147b 1407  KV8-MAX3 motherboard",
-"	3390  3c339 TokenLink Velocity",
-"	3590  3c359 TokenLink Velocity XL",
-"		10b7 3590  TokenLink Velocity XL Adapter (3C359/359B)",
-"	4500  3c450 HomePNA [Tornado]",
-"	5055  3c555 Laptop Hurricane",
-"	5057  3c575 Megahertz 10/100 LAN CardBus [Boomerang]",
-"		10b7 5a57  3C575 Megahertz 10/100 LAN Cardbus PC Card",
-"	5157  3cCFE575BT Megahertz 10/100 LAN CardBus [Cyclone]",
-"		10b7 5b57  3C575 Megahertz 10/100 LAN Cardbus PC Card",
-"	5257  3cCFE575CT CardBus [Cyclone]",
-"		10b7 5c57  FE575C-3Com 10/100 LAN CardBus-Fast Ethernet",
-"	5900  3c590 10BaseT [Vortex]",
-"	5920  3c592 EISA 10mbps Demon/Vortex",
-"	5950  3c595 100BaseTX [Vortex]",
-"	5951  3c595 100BaseT4 [Vortex]",
-"	5952  3c595 100Base-MII [Vortex]",
-"	5970  3c597 EISA Fast Demon/Vortex",
-"	5b57  3c595 Megahertz 10/100 LAN CardBus [Boomerang]",
-"		10b7 5b57  3C575 Megahertz 10/100 LAN Cardbus PC Card",
-"	6000  3CRSHPW796 [OfficeConnect Wireless CardBus]",
-"	6001  3com 3CRWE154G72 [Office Connect Wireless LAN Adapter]",
-"	6055  3c556 Hurricane CardBus [Cyclone]",
-"	6056  3c556B CardBus [Tornado]",
-"		10b7 6556  10/100 Mini PCI Ethernet Adapter",
-"	6560  3cCFE656 CardBus [Cyclone]",
-"		10b7 656a  3CCFEM656 10/100 LAN+56K Modem CardBus",
-"	6561  3cCFEM656 10/100 LAN+56K Modem CardBus",
-"		10b7 656b  3CCFEM656 10/100 LAN+56K Modem CardBus",
-"	6562  3cCFEM656B 10/100 LAN+Winmodem CardBus [Cyclone]",
-"		10b7 656b  3CCFEM656B 10/100 LAN+56K Modem CardBus",
-"	6563  3cCFEM656B 10/100 LAN+56K Modem CardBus",
-"		10b7 656b  3CCFEM656 10/100 LAN+56K Modem CardBus",
-"	6564  3cXFEM656C 10/100 LAN+Winmodem CardBus [Tornado]",
-"	7646  3cSOHO100-TX Hurricane",
-"	7770  3CRWE777 PCI(PLX) Wireless Adaptor [Airconnect]",
-"	7940  3c803 FDDILink UTP Controller",
-"	7980  3c804 FDDILink SAS Controller",
-"	7990  3c805 FDDILink DAS Controller",
-"	80eb  3c940B 10/100/1000Base-T",
-"	8811  Token ring",
-"	9000  3c900 10BaseT [Boomerang]",
-"	9001  3c900 10Mbps Combo [Boomerang]",
-"	9004  3c900B-TPO Etherlink XL [Cyclone]",
-"		10b7 9004  3C900B-TPO Etherlink XL TPO 10Mb",
-"	9005  3c900B-Combo Etherlink XL [Cyclone]",
-"		10b7 9005  3C900B-Combo Etherlink XL Combo",
-"	9006  3c900B-TPC Etherlink XL [Cyclone]",
-"	900a  3c900B-FL 10base-FL [Cyclone]",
-"	9050  3c905 100BaseTX [Boomerang]",
-"	9051  3c905 100BaseT4 [Boomerang]",
-"	9055  3c905B 100BaseTX [Cyclone]",
-"		1028 0080  3C905B Fast Etherlink XL 10/100",
-"		1028 0081  3C905B Fast Etherlink XL 10/100",
-"		1028 0082  3C905B Fast Etherlink XL 10/100",
-"		1028 0083  3C905B Fast Etherlink XL 10/100",
-"		1028 0084  3C905B Fast Etherlink XL 10/100",
-"		1028 0085  3C905B Fast Etherlink XL 10/100",
-"		1028 0086  3C905B Fast Etherlink XL 10/100",
-"		1028 0087  3C905B Fast Etherlink XL 10/100",
-"		1028 0088  3C905B Fast Etherlink XL 10/100",
-"		1028 0089  3C905B Fast Etherlink XL 10/100",
-"		1028 0090  3C905B Fast Etherlink XL 10/100",
-"		1028 0091  3C905B Fast Etherlink XL 10/100",
-"		1028 0092  3C905B Fast Etherlink XL 10/100",
-"		1028 0093  3C905B Fast Etherlink XL 10/100",
-"		1028 0094  3C905B Fast Etherlink XL 10/100",
-"		1028 0095  3C905B Fast Etherlink XL 10/100",
-"		1028 0096  3C905B Fast Etherlink XL 10/100",
-"		1028 0097  3C905B Fast Etherlink XL 10/100",
-"		1028 0098  3C905B Fast Etherlink XL 10/100",
-"		1028 0099  3C905B Fast Etherlink XL 10/100",
-"		10b7 9055  3C905B Fast Etherlink XL 10/100",
-"	9056  3c905B-T4 Fast EtherLink XL [Cyclone]",
-"	9058  3c905B Deluxe Etherlink 10/100/BNC [Cyclone]",
-"	905a  3c905B-FX Fast Etherlink XL FX 100baseFx [Cyclone]",
-"	9200  3c905C-TX/TX-M [Tornado]",
-"		1028 0095  3C920 Integrated Fast Ethernet Controller",
-"		1028 0097  3C920 Integrated Fast Ethernet Controller",
-"		1028 00fe  Optiplex GX240",
-"		1028 012a  3C920 Integrated Fast Ethernet Controller [Latitude C640]",
-"		10b7 1000  3C905C-TX Fast Etherlink for PC Management NIC",
-"		10b7 7000  10/100 Mini PCI Ethernet Adapter",
-"		10f1 2466  Tiger MPX S2466 (3C920 Integrated Fast Ethernet Controller)",
-"	9201  3C920B-EMB Integrated Fast Ethernet Controller [Tornado]",
-"		1043 80ab  A7N8X Deluxe onboard 3C920B-EMB Integrated Fast Ethernet Controller",
-"	9202  3Com 3C920B-EMB-WNM Integrated Fast Ethernet Controller",
-"	9210  3C920B-EMB-WNM Integrated Fast Ethernet Controller",
-"	9300  3CSOHO100B-TX 910-A01 [tulip]",
-"	9800  3c980-TX Fast Etherlink XL Server Adapter [Cyclone]",
-"		10b7 9800  3c980-TX Fast Etherlink XL Server Adapter",
-"	9805  3c980-C 10/100baseTX NIC [Python-T]",
-"		10b7 1201  EtherLink Server 10/100 Dual Port A",
-"		10b7 1202  EtherLink Server 10/100 Dual Port B",
-"		10b7 9805  3c980 10/100baseTX NIC [Python-T]",
-"		10f1 2462  Thunder K7 S2462",
-"	9900  3C990-TX [Typhoon]",
-"	9902  3CR990-TX-95 [Typhoon 56-bit]",
-"	9903  3CR990-TX-97 [Typhoon 168-bit]",
-"	9904  3C990B-TX-M/3C990BSVR [Typhoon2]",
-"		10b7 1000  3CR990B-TX-M [Typhoon2]",
-"		10b7 2000  3CR990BSVR [Typhoon2 Server]",
-"	9905  3CR990-FX-95/97/95 [Typhon Fiber]",
-"		10b7 1101  3CR990-FX-95 [Typhoon Fiber 56-bit]",
-"		10b7 1102  3CR990-FX-97 [Typhoon Fiber 168-bit]",
-"		10b7 2101  3CR990-FX-95 Server [Typhoon Fiber 56-bit]",
-"		10b7 2102  3CR990-FX-97 Server [Typhoon Fiber 168-bit]",
-"	9908  3CR990SVR95 [Typhoon Server 56-bit]",
-"	9909  3CR990SVR97 [Typhoon Server 168-bit]",
-"	990a  3C990SVR [Typhoon Server]",
-"	990b  3C990SVR [Typhoon Server]",
-"10b8  Standard Microsystems Corp [SMC]",
-"	0005  83c170 EPIC/100 Fast Ethernet Adapter",
-"		1055 e000  LANEPIC 10/100 [EVB171Q-PCI]",
-"		1055 e002  LANEPIC 10/100 [EVB171G-PCI]",
-"		10b8 a011  EtherPower II 10/100",
-"		10b8 a014  EtherPower II 10/100",
-"		10b8 a015  EtherPower II 10/100",
-"		10b8 a016  EtherPower II 10/100",
-"		10b8 a017  EtherPower II 10/100",
-"	0006  83c175 EPIC/100 Fast Ethernet Adapter",
-"		1055 e100  LANEPIC Cardbus Fast Ethernet Adapter",
-"		1055 e102  LANEPIC Cardbus Fast Ethernet Adapter",
-"		1055 e300  LANEPIC Cardbus Fast Ethernet Adapter",
-"		1055 e302  LANEPIC Cardbus Fast Ethernet Adapter",
-"		10b8 a012  LANEPIC Cardbus Fast Ethernet Adapter",
-"		13a2 8002  LANEPIC Cardbus Fast Ethernet Adapter",
-"		13a2 8006  LANEPIC Cardbus Fast Ethernet Adapter",
-"	1000  FDC 37c665",
-"	1001  FDC 37C922",
-"	2802  SMC2802W [EZ Connect g]",
-"	a011  83C170QF",
-"	b106  SMC34C90",
-"10b9  ALi Corporation",
-"	0101  CMI8338/C3DX PCI Audio Device",
-"	0111  C-Media CMI8738/C3DX Audio Device (OEM)",
-"		10b9 0111  C-Media CMI8738/C3DX Audio Device (OEM)",
-"	0780  Multi-IO Card",
-"	0782  Multi-IO Card",
-"	1435  M1435",
-"	1445  M1445",
-"	1449  M1449",
-"	1451  M1451",
-"	1461  M1461",
-"	1489  M1489",
-"	1511  M1511 [Aladdin]",
-"	1512  M1512 [Aladdin]",
-"	1513  M1513 [Aladdin]",
-"	1521  M1521 [Aladdin III]",
-"		10b9 1521  ALI M1521 Aladdin III CPU Bridge",
-"	1523  M1523",
-"		10b9 1523  ALI M1523 ISA Bridge",
-"	1531  M1531 [Aladdin IV]",
-"	1533  M1533/M1535 PCI to ISA Bridge [Aladdin IV/V/V+]",
-"		1014 053b  ThinkPad R40e (2684-HVG) PCI to ISA Bridge",
-"		10b9 1533  ALi M1533 Aladdin IV/V ISA Bridge",
-"	1541  M1541",
-"		10b9 1541  ALI M1541 Aladdin V/V+ AGP System Controller",
-"	1543  M1543",
-"	1563  M1563 HyperTransport South Bridge",
-"	1573  PCI to LPC Controller",
-"	1621  M1621",
-"	1631  ALI M1631 PCI North Bridge Aladdin Pro III",
-"	1632  M1632M Northbridge+Trident",
-"	1641  ALI M1641 PCI North Bridge Aladdin Pro IV",
-"	1644  M1644/M1644T Northbridge+Trident",
-"	1646  M1646 Northbridge+Trident",
-"	1647  M1647 Northbridge [MAGiK 1 / MobileMAGiK 1]",
-"	1651  M1651/M1651T Northbridge [Aladdin-Pro 5/5M,Aladdin-Pro 5T/5TM]",
-"	1671  M1671 Super P4 Northbridge [AGP4X,PCI and SDR/DDR]",
-"	1672  M1672 Northbridge [CyberALADDiN-P4]",
-"	1681  M1681 P4 Northbridge [AGP8X,HyperTransport and SDR/DDR]",
-"	1687  M1687 K8 Northbridge [AGP8X and HyperTransport]",
-"	1689  M1689 K8 Northbridge [Super K8 Single Chip]",
-"	1695  M1695 K8 Northbridge [PCI Express and HyperTransport]",
-"	1697  M1697 HTT Host Bridge",
-"	3141  M3141",
-"	3143  M3143",
-"	3145  M3145",
-"	3147  M3147",
-"	3149  M3149",
-"	3151  M3151",
-"	3307  M3307",
-"	3309  M3309",
-"	3323  M3325 Video/Audio Decoder",
-"	5212  M4803",
-"	5215  MS4803",
-"	5217  M5217H",
-"	5219  M5219",
-"	5225  M5225",
-"	5228  M5228 ALi ATA/RAID Controller",
-"	5229  M5229 IDE",
-"		1014 050f  ThinkPad R30",
-"		1014 053d  ThinkPad R40e (2684-HVG) builtin IDE",
-"		103c 0024  Pavilion ze4400 builtin IDE",
-"		1043 8053  A7A266 Motherboard IDE",
-"	5235  M5225",
-"	5237  USB 1.1 Controller",
-"		1014 0540  ThinkPad R40e (2684-HVG) builtin USB",
-"		103c 0024  Pavilion ze4400 builtin USB",
-"		104d 810f  VAIO PCG-U1 USB/OHCI Revision 1.0",
-"	5239  USB 2.0 Controller",
-"	5243  M1541 PCI to AGP Controller",
-"	5246  AGP8X Controller",
-"	5247  PCI to AGP Controller",
-"	5249  M5249 HTT to PCI Bridge",
-"	524b  PCI Express Root Port",
-"	524c  PCI Express Root Port",
-"	524d  PCI Express Root Port",
-"	524e  PCI Express Root Port",
-"	5251  M5251 P1394 OHCI 1.0 Controller",
-"	5253  M5253 P1394 OHCI 1.1 Controller",
-"	5261  M5261 Ethernet Controller",
-"	5263  M5263 Ethernet Controller",
-"	5281  ALi M5281 Serial ATA / RAID Host Controller",
-"	5287  ULi 5287 SATA",
-"	5288  ULi M5288 SATA",
-"	5289  ULi 5289 SATA",
-"	5450  Lucent Technologies Soft Modem AMR",
-"	5451  M5451 PCI AC-Link Controller Audio Device",
-"		1014 0506  ThinkPad R30",
-"		1014 053e  ThinkPad R40e (2684-HVG) builtin Audio",
-"		103c 0024  Pavilion ze4400 builtin Audio",
-"		10b9 5451  HP Compaq nc4010 (DY885AA#ABN)",
-"	5453  M5453 PCI AC-Link Controller Modem Device",
-"	5455  M5455 PCI AC-Link Controller Audio Device",
-"	5457  M5457 AC'97 Modem Controller",
-"		1014 0535  ThinkPad R40e (2684-HVG) builtin modem",
-"		103c 0024  Pavilion ze4400 builtin Modem Device",
-"	5459  SmartLink SmartPCI561 56K Modem",
-"	545a  SmartLink SmartPCI563 56K Modem",
-"	5461  High Definition Audio/AC'97 Host Controller",
-"	5471  M5471 Memory Stick Controller",
-"	5473  M5473 SD-MMC Controller",
-"	7101  M7101 Power Management Controller [PMU]",
-"		1014 0510  ThinkPad R30",
-"		1014 053c  ThinkPad R40e (2684-HVG) Power Management Controller",
-"		103c 0024  Pavilion ze4400",
-"10ba  Mitsubishi Electric Corp.",
-"	0301  AccelGraphics AccelECLIPSE",
-"	0304  AccelGALAXY A2100 [OEM Evans & Sutherland]",
-"	0308  Tornado 3000 [OEM Evans & Sutherland]",
-"	1002  VG500 [VolumePro Volume Rendering Accelerator]",
-"10bb  Dapha Electronics Corporation",
-"10bc  Advanced Logic Research",
-"10bd  Surecom Technology",
-"	0e34  NE-34",
-"10be  Tseng Labs International Co.",
-"10bf  Most Inc",
-"10c0  Boca Research Inc.",
-"10c1  ICM Co., Ltd.",
-"10c2  Auspex Systems Inc.",
-"10c3  Samsung Semiconductors, Inc.",
-"	1100  Smartether100 SC1100 LAN Adapter (i82557B)",
-"10c4  Award Software International Inc.",
-"10c5  Xerox Corporation",
-"10c6  Rambus Inc.",
-"10c7  Media Vision",
-"10c8  Neomagic Corporation",
-"	0001  NM2070 [MagicGraph 128]",
-"	0002  NM2090 [MagicGraph 128V]",
-"	0003  NM2093 [MagicGraph 128ZV]",
-"	0004  NM2160 [MagicGraph 128XD]",
-"		1014 00ba  MagicGraph 128XD",
-"		1025 1007  MagicGraph 128XD",
-"		1028 0074  MagicGraph 128XD",
-"		1028 0075  MagicGraph 128XD",
-"		1028 007d  MagicGraph 128XD",
-"		1028 007e  MagicGraph 128XD",
-"		1033 802f  MagicGraph 128XD",
-"		104d 801b  MagicGraph 128XD",
-"		104d 802f  MagicGraph 128XD",
-"		104d 830b  MagicGraph 128XD",
-"		10ba 0e00  MagicGraph 128XD",
-"		10c8 0004  MagicGraph 128XD",
-"		10cf 1029  MagicGraph 128XD",
-"		10f7 8308  MagicGraph 128XD",
-"		10f7 8309  MagicGraph 128XD",
-"		10f7 830b  MagicGraph 128XD",
-"		10f7 830d  MagicGraph 128XD",
-"		10f7 8312  MagicGraph 128XD",
-"	0005  NM2200 [MagicGraph 256AV]",
-"		1014 00dd  ThinkPad 570",
-"		1028 0088  Latitude CPi A",
-"	0006  NM2360 [MagicMedia 256ZX]",
-"	0016  NM2380 [MagicMedia 256XL+]",
-"		10c8 0016  MagicMedia 256XL+",
-"	0025  NM2230 [MagicGraph 256AV+]",
-"	0083  NM2093 [MagicGraph 128ZV+]",
-"	8005  NM2200 [MagicMedia 256AV Audio]",
-"		0e11 b0d1  MagicMedia 256AV Audio Device on Discovery",
-"		0e11 b126  MagicMedia 256AV Audio Device on Durango",
-"		1014 00dd  MagicMedia 256AV Audio Device on BlackTip Thinkpad",
-"		1025 1003  MagicMedia 256AV Audio Device on TravelMate 720",
-"		1028 0088  Latitude CPi A",
-"		1028 008f  MagicMedia 256AV Audio Device on Colorado Inspiron",
-"		103c 0007  MagicMedia 256AV Audio Device on Voyager II",
-"		103c 0008  MagicMedia 256AV Audio Device on Voyager III",
-"		103c 000d  MagicMedia 256AV Audio Device on Omnibook 900",
-"		10c8 8005  MagicMedia 256AV Audio Device on FireAnt",
-"		110a 8005  MagicMedia 256AV Audio Device",
-"		14c0 0004  MagicMedia 256AV Audio Device",
-"	8006  NM2360 [MagicMedia 256ZX Audio]",
-"	8016  NM2380 [MagicMedia 256XL+ Audio]",
-"10c9  Dataexpert Corporation",
-"10ca  Fujitsu Microelectr., Inc.",
-"10cb  Omron Corporation",
-"10cc  Mai Logic Incorporated",
-"	0660  Articia S Host Bridge",
-"	0661  Articia S PCI Bridge",
-"10cd  Advanced System Products, Inc",
-"	1100  ASC1100",
-"	1200  ASC1200 [(abp940) Fast SCSI-II]",
-"	1300  ABP940-U / ABP960-U",
-"		10cd 1310  ASC1300 SCSI Adapter",
-"	2300  ABP940-UW",
-"	2500  ABP940-U2W",
-"10ce  Radius",
-"10cf  Fujitsu Limited.",
-"	2001  mb86605",
-"10d1  FuturePlus Systems Corp.",
-"10d2  Molex Incorporated",
-"10d3  Jabil Circuit Inc",
-"10d4  Hualon Microelectronics",
-"10d5  Autologic Inc.",
-"10d6  Cetia",
-"10d7  BCM Advanced Research",
-"10d8  Advanced Peripherals Labs",
-"10d9  Macronix, Inc. [MXIC]",
-"	0431  MX98715",
-"	0512  MX98713",
-"	0531  MX987x5",
-"		1186 1200  DFE-540TX ProFAST 10/100 Adapter",
-"	8625  MX86250",
-"	8626  Macronix MX86251 + 3Dfx Voodoo Rush",
-"	8888  MX86200",
-"10da  Compaq IPG-Austin",
-"	0508  TC4048 Token Ring 4/16",
-"	3390  Tl3c3x9",
-"10db  Rohm LSI Systems, Inc.",
-"10dc  CERN/ECP/EDU",
-"	0001  STAR/RD24 SCI-PCI (PMC)",
-"	0002  TAR/RD24 SCI-PCI (PMC)",
-"	0021  HIPPI destination",
-"	0022  HIPPI source",
-"	10dc  ATT2C15-3 FPGA",
-"10dd  Evans & Sutherland",
-"	0100  Lightning 1200",
-"10de  nVidia Corporation",
-"	0008  NV1 [EDGE 3D]",
-"	0009  NV1 [EDGE 3D]",
-"	0010  NV2 [Mutara V08]",
-"	0020  NV4 [RIVA TNT]",
-"		1043 0200  V3400 TNT",
-"		1048 0c18  Erazor II SGRAM",
-"		1048 0c19  Erazor II",
-"		1048 0c1b  Erazor II",
-"		1048 0c1c  Erazor II",
-"		1092 0550  Viper V550",
-"		1092 0552  Viper V550",
-"		1092 4804  Viper V550",
-"		1092 4808  Viper V550",
-"		1092 4810  Viper V550",
-"		1092 4812  Viper V550",
-"		1092 4815  Viper V550",
-"		1092 4820  Viper V550 with TV out",
-"		1092 4822  Viper V550",
-"		1092 4904  Viper V550",
-"		1092 4914  Viper V550",
-"		1092 8225  Viper V550",
-"		10b4 273d  Velocity 4400",
-"		10b4 273e  Velocity 4400",
-"		10b4 2740  Velocity 4400",
-"		10de 0020  Riva TNT",
-"		1102 1015  Graphics Blaster CT6710",
-"		1102 1016  Graphics Blaster RIVA TNT",
-"	0028  NV5 [RIVA TNT2/TNT2 Pro]",
-"		1043 0200  AGP-V3800 SGRAM",
-"		1043 0201  AGP-V3800 SDRAM",
-"		1043 0205  PCI-V3800",
-"		1043 4000  AGP-V3800PRO",
-"		1048 0c21  Synergy II",
-"		1048 0c28  Erazor III",
-"		1048 0c29  Erazor III",
-"		1048 0c2a  Erazor III",
-"		1048 0c2b  Erazor III",
-"		1048 0c31  Erazor III Pro",
-"		1048 0c32  Erazor III Pro",
-"		1048 0c33  Erazor III Pro",
-"		1048 0c34  Erazor III Pro",
-"		107d 2134  WinFast 3D S320 II + TV-Out",
-"		1092 4804  Viper V770",
-"		1092 4a00  Viper V770",
-"		1092 4a02  Viper V770 Ultra",
-"		1092 5a00  RIVA TNT2/TNT2 Pro",
-"		1092 6a02  Viper V770 Ultra",
-"		1092 7a02  Viper V770 Ultra",
-"		10de 0005  RIVA TNT2 Pro",
-"		10de 000f  Compaq NVIDIA TNT2 Pro",
-"		1102 1020  3D Blaster RIVA TNT2",
-"		1102 1026  3D Blaster RIVA TNT2 Digital",
-"		14af 5810  Maxi Gamer Xentor",
-"	0029  NV5 [RIVA TNT2 Ultra]",
-"		1043 0200  AGP-V3800 Deluxe",
-"		1043 0201  AGP-V3800 Ultra SDRAM",
-"		1043 0205  PCI-V3800 Ultra",
-"		1048 0c2e  Erazor III Ultra",
-"		1048 0c2f  Erazor III Ultra",
-"		1048 0c30  Erazor III Ultra",
-"		1102 1021  3D Blaster RIVA TNT2 Ultra",
-"		1102 1029  3D Blaster RIVA TNT2 Ultra",
-"		1102 102f  3D Blaster RIVA TNT2 Ultra",
-"		14af 5820  Maxi Gamer Xentor 32",
-"	002a  NV5 [Riva TnT2]",
-"	002b  NV5 [Riva TnT2]",
-"	002c  NV6 [Vanta/Vanta LT]",
-"		1043 0200  AGP-V3800 Combat SDRAM",
-"		1043 0201  AGP-V3800 Combat",
-"		1048 0c20  TNT2 Vanta",
-"		1048 0c21  TNT2 Vanta",
-"		1092 6820  Viper V730",
-"		1102 1031  CT6938 VANTA 8MB",
-"		1102 1034  CT6894 VANTA 16MB",
-"		14af 5008  Maxi Gamer Phoenix 2",
-"	002d  NV5M64 [RIVA TNT2 Model 64/Model 64 Pro]",
-"		1043 0200  AGP-V3800M",
-"		1043 0201  AGP-V3800M",
-"		1048 0c3a  Erazor III LT",
-"		1048 0c3b  Erazor III LT",
-"		10de 001e  M64 AGP4x",
-"		1102 1023  CT6892 RIVA TNT2 Value",
-"		1102 1024  CT6932 RIVA TNT2 Value 32Mb",
-"		1102 102c  CT6931 RIVA TNT2 Value [Jumper]",
-"		1462 8808  MSI-8808",
-"		1554 1041  Pixelview RIVA TNT2 M64",
-"		1569 002d  Palit Microsystems Daytona TNT2 M64",
-"	002e  NV6 [Vanta]",
-"	002f  NV6 [Vanta]",
-"	0034  MCP04 SMBus",
-"	0035  MCP04 IDE",
-"	0036  MCP04 Serial ATA Controller",
-"	0037  MCP04 Ethernet Controller",
-"	0038  MCP04 Ethernet Controller",
-"	003a  MCP04 AC'97 Audio Controller",
-"	003b  MCP04 USB Controller",
-"	003c  MCP04 USB Controller",
-"	003d  MCP04 PCI Bridge",
-"	003e  MCP04 Serial ATA Controller",
-"	0040  NV40 [GeForce 6800 Ultra]",
-"	0041  NV40 [GeForce 6800]",
-"		1043 817b  V9999 Gamer Edition",
-"	0042  NV40.2 [GeForce 6800 LE]",
-"	0043  NV40.3",
-"	0044  NV40 [GeForce 6800 XT]",
-"	0045  NV40 [GeForce 6800 GT]",
-"	0047  NV40 [GeForce 6800 GS]",
-"		1682 2109  GeForce 6800 GS",
-"	0049  NV40GL",
-"	004e  NV40GL [Quadro FX 4000]",
-"	0050  CK804 ISA Bridge",
-"		1043 815a  K8N4-E Mainboard",
-"		1458 0c11  GA-K8N Ultra-9 Mainboard",
-"		1462 7100  MSI K8N Diamond",
-"	0051  CK804 ISA Bridge",
-"	0052  CK804 SMBus",
-"		1043 815a  K8N4-E Mainboard",
-"		1458 0c11  GA-K8N Ultra-9 Mainboard",
-"		1462 7100  MSI K8N Diamond",
-"	0053  CK804 IDE",
-"		1043 815a  K8N4-E Mainboard",
-"		1458 5002  GA-K8N Ultra-9 Mainboard",
-"		1462 7100  MSI K8N Diamond",
-"	0054  CK804 Serial ATA Controller",
-"		1458 b003  GA-K8N Ultra-9 Mainboard",
-"		1462 7100  MSI K8N Diamond",
-"	0055  CK804 Serial ATA Controller",
-"		1043 815a  K8N4-E Mainboard",
-"		1458 b003  GA-K8N Ultra-9 Mainboard",
-"	0056  CK804 Ethernet Controller",
-"	0057  CK804 Ethernet Controller",
-"		1043 8141  K8N4-E Mainboard",
-"		1458 e000  GA-K8N Ultra-9 Mainboard",
-"		1462 7100  MSI K8N Diamond",
-"	0058  CK804 AC'97 Modem",
-"	0059  CK804 AC'97 Audio Controller",
-"		1043 812a  K8N4-E Mainboard",
-"	005a  CK804 USB Controller",
-"		1043 815a  K8N4-E Mainboard",
-"		1458 5004  GA-K8N Ultra-9 Mainboard",
-"		1462 7100  MSI K8N Diamond",
-"	005b  CK804 USB Controller",
-"		1043 815a  K8N4-E Mainboard",
-"		1458 5004  GA-K8N Ultra-9 Mainboard",
-"		1462 7100  MSI K8N Diamond",
-"	005c  CK804 PCI Bridge",
-"	005d  CK804 PCIE Bridge",
-"	005e  CK804 Memory Controller",
-"		10f1 2891  Thunder K8SRE Mainboard",
-"		1458 5000  GA-K8N Ultra-9 Mainboard",
-"		1462 7100  MSI K8N Diamond",
-"	005f  CK804 Memory Controller",
-"	0060  nForce2 ISA Bridge",
-"		1043 80ad  A7N8X Mainboard",
-"		a0a0 03ba  UK79G-1394 motherboard",
-"	0064  nForce2 SMBus (MCP)",
-"		a0a0 03bb  UK79G-1394 motherboard",
-"	0065  nForce2 IDE",
-"		a0a0 03b2  UK79G-1394 motherboard",
-"	0066  nForce2 Ethernet Controller",
-"		1043 80a7  A7N8X Mainboard onboard nForce2 Ethernet",
-"	0067  nForce2 USB Controller",
-"		1043 0c11  A7N8X Mainboard",
-"	0068  nForce2 USB Controller",
-"		1043 0c11  A7N8X Mainboard",
-"		a0a0 03b4  UK79G-1394 motherboard",
-"	006a  nForce2 AC97 Audio Controler (MCP)",
-"		a0a0 0304  UK79G-1394 motherboard",
-"	006b  nForce Audio Processing Unit",
-"		10de 006b  nForce2 MCP Audio Processing Unit",
-"	006c  nForce2 External PCI Bridge",
-"	006d  nForce2 PCI Bridge",
-"	006e  nForce2 FireWire (IEEE 1394) Controller",
-"		a0a0 0306  UK79G-1394 motherboard",
-"	0080  MCP2A ISA bridge",
-"		147b 1c09  NV7 Motherboard",
-"	0084  MCP2A SMBus",
-"		147b 1c09  NV7 Motherboard",
-"	0085  MCP2A IDE",
-"		147b 1c09  NV7 Motherboard",
-"	0086  MCP2A Ethernet Controller",
-"	0087  MCP2A USB Controller",
-"		147b 1c09  NV7 Motherboard",
-"	0088  MCP2A USB Controller",
-"		147b 1c09  NV7 Motherboard",
-"	008a  MCP2S AC'97 Audio Controller",
-"		147b 1c09  NV7 Motherboard",
-"	008b  MCP2A PCI Bridge",
-"	008c  MCP2A Ethernet Controller",
-"	008e  nForce2 Serial ATA Controller",
-"	0090  G70 [GeForce 7800 GTX]",
-"	0091  G70 [GeForce 7800 GTX]",
-"	0092  G70 [GeForce 7800 GT]",
-"	0093  G70 [GeForce 7800 GS]",
-"	0098  GeForce Go 7800",
-"	0099  GE Force Go 7800 GTX",
-"	009d  G70GL [Quadro FX4500]",
-"	00a0  NV5 [Aladdin TNT2]",
-"		14af 5810  Maxi Gamer Xentor",
-"	00c0  NV41 [GeForce 6800 GS]",
-"	00c1  NV41.1 [GeForce 6800]",
-"	00c2  NV41.2 [GeForce 6800 LE]",
-"	00c3  NV42 [Geforce 6800 XT]",
-"	00c8  NV41.8 [GeForce Go 6800]",
-"	00c9  NV41.9 [GeForce Go 6800 Ultra]",
-"	00cc  NV41 [Quadro FX Go1400]",
-"	00cd  NV41 [Quadro FX 3450/4000 SDI]",
-"	00ce  NV41GL [Quadro FX 1400]",
-"	00d0  nForce3 LPC Bridge",
-"	00d1  nForce3 Host Bridge",
-"	00d2  nForce3 AGP Bridge",
-"	00d3  CK804 Memory Controller",
-"	00d4  nForce3 SMBus",
-"	00d5  nForce3 IDE",
-"	00d6  nForce3 Ethernet",
-"	00d7  nForce3 USB 1.1",
-"	00d8  nForce3 USB 2.0",
-"	00d9  nForce3 Audio",
-"	00da  nForce3 Audio",
-"	00dd  nForce3 PCI Bridge",
-"	00df  CK8S Ethernet Controller",
-"		147b 1c0b  NF8 Mainboard",
-"	00e0  nForce3 250Gb LPC Bridge",
-"		147b 1c0b  NF8 Mainboard",
-"	00e1  nForce3 250Gb Host Bridge",
-"		147b 1c0b  NF8 Mainboard",
-"	00e2  nForce3 250Gb AGP Host to PCI Bridge",
-"	00e3  CK8S Serial ATA Controller (v2.5)",
-"		147b 1c0b  NF8 Mainboard",
-"	00e4  nForce 250Gb PCI System Management",
-"		147b 1c0b  NF8 Mainboard",
-"	00e5  CK8S Parallel ATA Controller (v2.5)",
-"		147b 1c0b  NF8 Mainboard",
-"	00e6  CK8S Ethernet Controller",
-"	00e7  CK8S USB Controller",
-"		147b 1c0b  NF8 Mainboard",
-"	00e8  nForce3 EHCI USB 2.0 Controller",
-"		147b 1c0b  NF8 Mainboard",
-"	00ea  nForce3 250Gb AC'97 Audio Controller",
-"		147b 1c0b  NF8 Mainboard",
-"	00ed  nForce3 250Gb PCI-to-PCI Bridge",
-"	00ee  CK8S Serial ATA Controller (v2.5)",
-"	00f0  NV40 [GeForce 6800/GeForce 6800 Ultra]",
-"	00f1  NV43 [GeForce 6600/GeForce 6600 GT]",
-"		1043 81a6  N6600GT TD 128M AGP",
-"		1682 2119  GeForce 6600 GT AGP 128MB DDR3 DUAL DVI TV",
-"	00f2  NV43 [GeForce 6600/GeForce 6600 GT]",
-"		1682 211c  GeForce 6600 256MB DDR DUAL DVI TV",
-"	00f3  NV43 [GeForce 6200]",
-"	00f4  NV43 [GeForce 6600 LE]",
-"	00f5  G70 [GeForce 7800 GS]",
-"	00f6  NV43 [GeForce 6600 GS]",
-"	00f8  NV45GL [Quadro FX 3400/4400]",
-"	00f9  NV40 [GeForce 6800 Ultra/GeForce 6800 GT]",
-"		1682 2120  GEFORCE 6800 GT PCI-E",
-"	00fa  NV36 [GeForce PCX 5750]",
-"	00fb  NV35 [GeForce PCX 5900]",
-"	00fc  NV37GL [Quadro FX 330/GeForce PCX 5300]",
-"	00fd  NV37GL [Quadro FX 330/Quadro NVS280]",
-"	00fe  NV38GL [Quadro FX 1300]",
-"	00ff  NV18 [GeForce PCX 4300]",
-"	0100  NV10 [GeForce 256 SDR]",
-"		1043 0200  AGP-V6600 SGRAM",
-"		1043 0201  AGP-V6600 SDRAM",
-"		1043 4008  AGP-V6600 SGRAM",
-"		1043 4009  AGP-V6600 SDRAM",
-"		1048 0c41  Erazor X",
-"		1048 0c43  ERAZOR X PCI",
-"		1048 0c48  Synergy Force",
-"		1102 102d  CT6941 GeForce 256",
-"		14af 5022  3D Prophet SE",
-"	0101  NV10DDR [GeForce 256 DDR]",
-"		1043 0202  AGP-V6800 DDR",
-"		1043 400a  AGP-V6800 DDR SGRAM",
-"		1043 400b  AGP-V6800 DDR SDRAM",
-"		1048 0c42  Erazor X",
-"		107d 2822  WinFast GeForce 256",
-"		1102 102e  CT6971 GeForce 256 DDR",
-"		14af 5021  3D Prophet DDR-DVI",
-"	0103  NV10GL [Quadro]",
-"		1048 0c40  GLoria II-64",
-"		1048 0c44  GLoria II",
-"		1048 0c45  GLoria II",
-"		1048 0c4a  GLoria II-64 Pro",
-"		1048 0c4b  GLoria II-64 Pro DVII",
-"	0110  NV11 [GeForce2 MX/MX 400]",
-"		1043 4015  AGP-V7100 Pro",
-"		1043 4031  V7100 Pro with TV output",
-"		1048 0c60  Gladiac MX",
-"		1048 0c61  Gladiac 511PCI",
-"		1048 0c63  Gladiac 511TV-OUT 32MB",
-"		1048 0c64  Gladiac 511TV-OUT 64MB",
-"		1048 0c65  Gladiac 511TWIN",
-"		1048 0c66  Gladiac 311",
-"		10de 0091  Dell OEM GeForce 2 MX 400",
-"		10de 00a1  Apple OEM GeForce2 MX",
-"		1462 8817  MSI GeForce2 MX400 Pro32S [MS-8817]",
-"		14af 7102  3D Prophet II MX",
-"		14af 7103  3D Prophet II MX Dual-Display",
-"	0111  NV11DDR [GeForce2 MX 100 DDR/200 DDR]",
-"	0112  NV11 [GeForce2 Go]",
-"	0113  NV11GL [Quadro2 MXR/EX/Go]",
-"	0140  NV43 [GeForce 6600 GT]",
-"	0141  NV43 [GeForce 6600]",
-"		1458 3124  GV-NX66128DP Turbo Force Edition",
-"	0142  NV43 [GeForce 6600 PCIe]",
-"	0144  NV43 [GeForce Go 6600]",
-"	0145  NV43 [GeForce 6610 XL]",
-"	0146  NV43 [Geforce Go 6600TE/6200TE]",
-"	0148  NV43 [GeForce Go 6600]",
-"	0149  NV43 [GeForce Go 6600 GT]",
-"	014a  Quadro NVS 440",
-"	014c  Quadro FX 550",
-"	014e  NV43GL [Quadro FX 540]",
-"	014f  NV43 [GeForce 6200]",
-"	0150  NV15 [GeForce2 GTS/Pro]",
-"		1043 4016  V7700 AGP Video Card",
-"		1048 0c50  Gladiac",
-"		1048 0c52  Gladiac-64",
-"		107d 2840  WinFast GeForce2 GTS with TV output",
-"		107d 2842  WinFast GeForce 2 Pro",
-"		1462 8831  Creative GeForce2 Pro",
-"	0151  NV15DDR [GeForce2 Ti]",
-"		1043 405f  V7700Ti",
-"		1462 5506  Creative 3D Blaster Geforce2 Titanium",
-"	0152  NV15BR [GeForce2 Ultra, Bladerunner]",
-"		1048 0c56  GLADIAC Ultra",
-"	0153  NV15GL [Quadro2 Pro]",
-"	0161  GeForce 6200 TurboCache(TM)",
-"	0162  NV43 [GeForce 6200 SE]",
-"	0164  NV44 [GeForce Go 6200]",
-"	0165  NV44 [Quadro NVS 285]",
-"	0166  NV43 [GeForce Go 6400]",
-"	0167  GeForce Go 6200 TurboCache",
-"	0168  NV43 [GeForce Go 6200 TurboCache]",
-"	0170  NV17 [GeForce4 MX 460]",
-"	0171  NV17 [GeForce4 MX 440]",
-"		10b0 0002  Gainward Pro/600 TV",
-"		10de 0008  Apple OEM GeForce4 MX 440",
-"		1462 8661  G4MX440-VTP",
-"		1462 8730  MX440SES-T (MS-8873)",
-"		1462 8852  GeForce4 MX440 PCI",
-"		147b 8f00  Abit Siluro GeForce4MX440",
-"	0172  NV17 [GeForce4 MX 420]",
-"	0173  NV17 [GeForce4 MX 440-SE]",
-"	0174  NV17 [GeForce4 440 Go]",
-"	0175  NV17 [GeForce4 420 Go]",
-"	0176  NV17 [GeForce4 420 Go 32M]",
-"		4c53 1090  Cx9 / Vx9 mainboard",
-"	0177  NV17 [GeForce4 460 Go]",
-"	0178  NV17GL [Quadro4 550 XGL]",
-"	0179  NV17 [GeForce4 420 Go 32M]",
-"		10de 0179  GeForce4 MX (Mac)",
-"	017a  NV17GL [Quadro4 200/400 NVS]",
-"	017b  NV17GL [Quadro4 550 XGL]",
-"	017c  NV17GL [Quadro4 500 GoGL]",
-"	017d  NV17 [GeForce4 410 Go 16M]",
-"	0181  NV18 [GeForce4 MX 440 AGP 8x]",
-"		1043 806f  V9180 Magic",
-"		1462 8880  MS-StarForce GeForce4 MX 440 with AGP8X",
-"		1462 8900  MS-8890 GeForce 4 MX440 AGP8X",
-"		1462 9350  MSI Geforce4 MX T8X with AGP8X",
-"		147b 8f0d  Siluro GF4 MX-8X",
-"	0182  NV18 [GeForce4 MX 440SE AGP 8x]",
-"	0183  NV18 [GeForce4 MX 420 AGP 8x]",
-"	0185  NV18 [GeForce4 MX 4000 AGP 8x]",
-"	0186  NV18M [GeForce4 448 Go]",
-"	0187  NV18M [GeForce4 488 Go]",
-"	0188  NV18GL [Quadro4 580 XGL]",
-"	018a  NV18GL [Quadro4 NVS AGP 8x]",
-"	018b  NV18GL [Quadro4 380 XGL]",
-"	018c  Quadro NVS 50 PCI",
-"	018d  NV18M [GeForce4 448 Go]",
-"	01a0  NVCrush11 [GeForce2 MX Integrated Graphics]",
-"	01a4  nForce CPU bridge",
-"	01ab  nForce 420 Memory Controller (DDR)",
-"	01ac  nForce 220/420 Memory Controller",
-"	01ad  nForce 220/420 Memory Controller",
-"	01b0  nForce Audio",
-"	01b1  nForce Audio",
-"	01b2  nForce ISA Bridge",
-"	01b4  nForce PCI System Management",
-"	01b7  nForce AGP to PCI Bridge",
-"	01b8  nForce PCI-to-PCI bridge",
-"	01bc  nForce IDE",
-"	01c1  nForce AC'97 Modem Controller",
-"	01c2  nForce USB Controller",
-"	01c3  nForce Ethernet Controller",
-"	01d1  GeForce 7300 LE",
-"	01d7  Quadro NVS 110M / GeForce Go 7300",
-"	01d8  GeForce Go 7400",
-"	01da  Quadro NVS 110M",
-"	01de  Quadro FX 350",
-"		10de 01dc  Quadro  FX Go350M",
-"	01df  GeForce 7300 GS",
-"	01e0  nForce2 AGP (different version\?)",
-"		147b 1c09  NV7 Motherboard",
-"	01e8  nForce2 AGP",
-"	01ea  nForce2 Memory Controller 0",
-"		a0a0 03b9  UK79G-1394 motherboard",
-"	01eb  nForce2 Memory Controller 1",
-"		a0a0 03b9  UK79G-1394 motherboard",
-"	01ec  nForce2 Memory Controller 2",
-"		a0a0 03b9  UK79G-1394 motherboard",
-"	01ed  nForce2 Memory Controller 3",
-"		a0a0 03b9  UK79G-1394 motherboard",
-"	01ee  nForce2 Memory Controller 4",
-"		a0a0 03b9  UK79G-1394 motherboard",
-"	01ef  nForce2 Memory Controller 5",
-"		a0a0 03b9  UK79G-1394 motherboard",
-"	01f0  NV18 [GeForce4 MX - nForce GPU]",
-"		a0a0 03b5  UK79G-1394 motherboard",
-"	0200  NV20 [GeForce3]",
-"		1043 402f  AGP-V8200 DDR",
-"		1048 0c70  GLADIAC 920",
-"	0201  NV20 [GeForce3 Ti 200]",
-"	0202  NV20 [GeForce3 Ti 500]",
-"		1043 405b  V8200 T5",
-"		1545 002f  Xtasy 6964",
-"	0203  NV20DCC [Quadro DCC]",
-"	0211  NV40 [GeForce 6800]",
-"	0212  NV40 [GeForce 6800 LE]",
-"	0215  NV40 [GeForce 6800 GT]",
-"	0218  NV40 [GeForce 6800 XT]",
-"	0221  NV43 [GeForce 6200]",
-"	0240  C51PV [GeForce 6150]",
-"		1462 7207  K8NGM2 series",
-"	0241  C51 PCI Express Bridge",
-"	0242  C51G [GeForce 6100]",
-"	0243  C51 PCI Express Bridge",
-"	0244  C51 PCI Express Bridge",
-"	0245  C51 PCI Express Bridge",
-"	0246  C51 PCI Express Bridge",
-"	0247  C51 PCI Express Bridge",
-"	0248  C51 PCI Express Bridge",
-"	0249  C51 PCI Express Bridge",
-"	024a  C51 PCI Express Bridge",
-"	024b  C51 PCI Express Bridge",
-"	024c  C51 PCI Express Bridge",
-"	024d  C51 PCI Express Bridge",
-"	024e  C51 PCI Express Bridge",
-"	024f  C51 PCI Express Bridge",
-"	0250  NV25 [GeForce4 Ti 4600]",
-"	0251  NV25 [GeForce4 Ti 4400]",
-"		1043 8023  v8440 GeForce 4 Ti4400",
-"	0252  NV25 [GeForce4 Ti]",
-"	0253  NV25 [GeForce4 Ti 4200]",
-"		107d 2896  WinFast A250 LE TD (Dual VGA/TV-out/DVI)",
-"		147b 8f09  Siluro (Dual VGA/TV-out/DVI)",
-"	0258  NV25GL [Quadro4 900 XGL]",
-"	0259  NV25GL [Quadro4 750 XGL]",
-"	025b  NV25GL [Quadro4 700 XGL]",
-"	0260  MCP51 LPC Bridge",
-"		1462 7207  K8NGM2 series",
-"	0261  MCP51 LPC Bridge",
-"	0262  MCP51 LPC Bridge",
-"	0263  MCP51 LPC Bridge",
-"	0264  MCP51 SMBus",
-"		1462 7207  K8NGM2 series",
-"	0265  MCP51 IDE",
-"		1462 7207  K8NGM2 series",
-"	0266  MCP51 Serial ATA Controller",
-"		1462 7207  K8NGM2 series",
-"	0267  MCP51 Serial ATA Controller",
-"		1462 7207  K8NGM2 series",
-"	0268  MCP51 Ethernet Controller",
-"	0269  MCP51 Ethernet Controller",
-"		1462 7207  K8NGM2 series",
-"	026a  MCP51 MCI",
-"	026b  MCP51 AC97 Audio Controller",
-"	026c  MCP51 High Definition Audio",
-"		1462 7207  K8NGM2 series",
-"	026d  MCP51 USB Controller",
-"		1462 7207  K8NGM2 series",
-"	026e  MCP51 USB Controller",
-"		1462 7207  K8NGM2 series",
-"	026f  MCP51 PCI Bridge",
-"	0270  MCP51 Host Bridge",
-"		1462 7207  K8NGM2 series",
-"	0271  MCP51 PMU",
-"	0272  MCP51 Memory Controller 0",
-"	027e  C51 Memory Controller 2",
-"		1462 7207  K8NGM2 series",
-"	027f  C51 Memory Controller 3",
-"		1462 7207  K8NGM2 series",
-"	0280  NV28 [GeForce4 Ti 4800]",
-"	0281  NV28 [GeForce4 Ti 4200 AGP 8x]",
-"	0282  NV28 [GeForce4 Ti 4800 SE]",
-"	0286  NV28 [GeForce4 Ti 4200 Go AGP 8x]",
-"	0288  NV28GL [Quadro4 980 XGL]",
-"	0289  NV28GL [Quadro4 780 XGL]",
-"	028c  NV28GLM [Quadro4 700 GoGL]",
-"	0290  GeForce 7900 GTX",
-"	0291  GeForce 7900 GT",
-"	029a  G71 [Quadro FX 2500M]",
-"	029b  G71 [Quadro FX 1500M]",
-"	029c  Quadro FX 5500",
-"	029d  Quadro FX 3500",
-"	029e  Quadro FX 1500",
-"	02a0  NV2A [XGPU]",
-"	02e1  GeForce 7600 GS",
-"	02f0  C51 Host Bridge",
-"		1462 7207  K8NGM2 series",
-"	02f1  C51 Host Bridge",
-"	02f2  C51 Host Bridge",
-"	02f3  C51 Host Bridge",
-"	02f4  C51 Host Bridge",
-"	02f5  C51 Host Bridge",
-"	02f6  C51 Host Bridge",
-"	02f7  C51 Host Bridge",
-"	02f8  C51 Memory Controller 5",
-"		1462 7207  K8NGM2 series",
-"	02f9  C51 Memory Controller 4",
-"		1462 7207  K8NGM2 series",
-"	02fa  C51 Memory Controller 0",
-"		1462 7207  K8NGM2 series",
-"	02fb  C51 PCI Express Bridge",
-"	02fc  C51 PCI Express Bridge",
-"	02fd  C51 PCI Express Bridge",
-"	02fe  C51 Memory Controller 1",
-"		1462 7207  K8NGM2 series",
-"	02ff  C51 Host Bridge",
-"		1462 7207  K8NGM2 series",
-"	0300  NV30 [GeForce FX]",
-"	0301  NV30 [GeForce FX 5800 Ultra]",
-"	0302  NV30 [GeForce FX 5800]",
-"	0308  NV30GL [Quadro FX 2000]",
-"	0309  NV30GL [Quadro FX 1000]",
-"	0311  NV31 [GeForce FX 5600 Ultra]",
-"	0312  NV31 [GeForce FX 5600]",
-"	0313  NV31",
-"	0314  NV31 [GeForce FX 5600XT]",
-"		1043 814a  V9560XT/TD",
-"	0316  NV31M",
-"	0317  NV31M Pro",
-"	031a  NV31M [GeForce FX Go5600]",
-"	031b  NV31M [GeForce FX Go5650]",
-"	031c  NVIDIA Quadro FX Go700",
-"	031d  NV31GLM",
-"	031e  NV31GLM Pro",
-"	031f  NV31GLM Pro",
-"	0320  NV34 [GeForce FX 5200]",
-"	0321  NV34 [GeForce FX 5200 Ultra]",
-"	0322  NV34 [GeForce FX 5200]",
-"		1462 9171  MS-8917 (FX5200-T128)",
-"		1462 9360  MS-8936 (FX5200-T128)",
-"	0323  NV34 [GeForce FX 5200LE]",
-"	0324  NV34M [GeForce FX Go5200]",
-"		1028 0196  Inspiron 5160",
-"		1071 8160  MIM2000",
-"	0325  NV34M [GeForce FX Go5250]",
-"	0326  NV34 [GeForce FX 5500]",
-"	0327  NV34 [GeForce FX 5100]",
-"	0328  NV34M [GeForce FX Go5200 32M/64M]",
-"	0329  NV34M [GeForce FX Go5200]",
-"	032a  NV34GL [Quadro NVS 280 PCI]",
-"	032b  NV34GL [Quadro FX 500/600 PCI]",
-"	032c  NV34GLM [GeForce FX Go 5300]",
-"	032d  NV34 [GeForce FX Go5100]",
-"	032f  NV34GL",
-"	0330  NV35 [GeForce FX 5900 Ultra]",
-"	0331  NV35 [GeForce FX 5900]",
-"		1043 8145  V9950GE",
-"	0332  NV35 [GeForce FX 5900XT]",
-"	0333  NV38 [GeForce FX 5950 Ultra]",
-"	0334  NV35 [GeForce FX 5900ZT]",
-"	0338  NV35GL [Quadro FX 3000]",
-"	033f  NV35GL [Quadro FX 700]",
-"	0341  NV36.1 [GeForce FX 5700 Ultra]",
-"	0342  NV36.2 [GeForce FX 5700]",
-"	0343  NV36 [GeForce FX 5700LE]",
-"	0344  NV36.4 [GeForce FX 5700VE]",
-"	0345  NV36.5",
-"	0347  NV36 [GeForce FX Go5700]",
-"		103c 006a  NX9500",
-"	0348  NV36 [GeForce FX Go5700]",
-"	0349  NV36M Pro",
-"	034b  NV36MAP",
-"	034c  NV36 [Quadro FX Go1000]",
-"	034e  NV36GL [Quadro FX 1100]",
-"	034f  NV36GL",
-"	0360  MCP55 LPC Bridge",
-"	0361  MCP55 LPC Bridge",
-"	0362  MCP55 LPC Bridge",
-"	0363  MCP55 LPC Bridge",
-"	0364  MCP55 LPC Bridge",
-"	0365  MCP55 LPC Bridge",
-"	0366  MCP55 LPC Bridge",
-"	0367  MCP55 LPC Bridge",
-"	0368  MCP55 SMBus",
-"	0369  MCP55 Memory Controller",
-"	036a  MCP55 Memory Controller",
-"	036c  MCP55 USB Controller",
-"	036d  MCP55 USB Controller",
-"	036e  MCP55 IDE",
-"	0371  MCP55 High Definition Audio",
-"	0372  MCP55 Ethernet",
-"	0373  MCP55 Ethernet",
-"	037a  MCP55 Memory Controller",
-"	037e  MCP55 SATA Controller",
-"	037f  MCP55 SATA Controller",
-"	0391  G70 [GeForce 7600 GT]",
-"	0392  G70 [GeForce 7600 GS]",
-"	0398  G70 [GeForce Go 7600]",
-"	039e  Quadro FX 560",
-"	03e0  MCP61 LPC Bridge",
-"	03e1  MCP61 LPC Bridge",
-"	03e2  MCP61 LPC Bridge",
-"	03e3  MCP61 LPC Bridge",
-"	03e4  MCP61 High Definition Audio",
-"	03e5  MCP61 Ethernet",
-"	03e6  MCP61 Ethernet",
-"	03e7  MCP61 SATA Controller",
-"	03ea  MCP61 Memory Controller",
-"	03eb  MCP61 SMBus",
-"	03ec  MCP61 IDE",
-"	03ee  MCP61 Ethernet",
-"	03ef  MCP61 Ethernet",
-"	03f0  MCP61 High Definition Audio",
-"	03f1  MCP61 USB Controller",
-"	03f2  MCP61 USB Controller",
-"	03f5  MCP61 Memory Controller",
-"	03f6  MCP61 SATA Controller",
-"	03f7  MCP61 SATA Controller",
-"10df  Emulex Corporation",
-"	1ae5  LP6000 Fibre Channel Host Adapter",
-"	f085  LP850 Fibre Channel Host Adapter",
-"	f095  LP952 Fibre Channel Host Adapter",
-"	f098  LP982 Fibre Channel Host Adapter",
-"	f0a1  Thor LightPulse Fibre Channel Host Adapter",
-"	f0a5  Thor LightPulse Fibre Channel Host Adapter",
-"	f0b5  Viper LightPulse Fibre Channel Host Adapter",
-"	f0d1  Helios LightPulse Fibre Channel Host Adapter",
-"	f0d5  Helios LightPulse Fibre Channel Host Adapter",
-"	f0e1  Zephyr LightPulse Fibre Channel Host Adapter",
-"	f0e5  Zephyr LightPulse Fibre Channel Host Adapter",
-"	f0f5  Neptune LightPulse Fibre Channel Host Adapter",
-"	f700  LP7000 Fibre Channel Host Adapter",
-"	f701  LP7000 Fibre Channel Host Adapter Alternate ID (JX1:2-3, JX2:1-2)",
-"	f800  LP8000 Fibre Channel Host Adapter",
-"	f801  LP8000 Fibre Channel Host Adapter Alternate ID (JX1:2-3, JX2:1-2)",
-"	f900  LP9000 Fibre Channel Host Adapter",
-"	f901  LP9000 Fibre Channel Host Adapter Alternate ID (JX1:2-3, JX2:1-2)",
-"	f980  LP9802 Fibre Channel Host Adapter",
-"	f981  LP9802 Fibre Channel Host Adapter Alternate ID",
-"	f982  LP9802 Fibre Channel Host Adapter Alternate ID",
-"	fa00  Thor-X LightPulse Fibre Channel Host Adapter",
-"	fb00  Viper LightPulse Fibre Channel Host Adapter",
-"	fc00  Thor-X LightPulse Fibre Channel Host Adapter",
-"	fc10  Helios-X LightPulse Fibre Channel Host Adapter",
-"	fc20  Zephyr-X LightPulse Fibre Channel Host Adapter",
-"	fd00  Helios-X LightPulse Fibre Channel Host Adapter",
-"	fe00  Zephyr-X LightPulse Fibre Channel Host Adapter",
-"	ff00  Neptune LightPulse Fibre Channel Host Adapter",
-"10e0  Integrated Micro Solutions Inc.",
-"	5026  IMS5026/27/28",
-"	5027  IMS5027",
-"	5028  IMS5028",
-"	8849  IMS8849",
-"	8853  IMS8853",
-"	9128  IMS9128 [Twin turbo 128]",
-"10e1  Tekram Technology Co.,Ltd.",
-"	0391  TRM-S1040",
-"		10e1 0391  DC-315U SCSI-3 Host Adapter",
-"	690c  DC-690c",
-"	dc29  DC-290",
-"10e2  Aptix Corporation",
-"10e3  Tundra Semiconductor Corp.",
-"	0000  CA91C042 [Universe]",
-"	0148  Tsi148 [Tempe]",
-"	0860  CA91C860 [QSpan]",
-"	0862  CA91C862A [QSpan-II]",
-"	8260  CA91L8200B [Dual PCI PowerSpan II]",
-"	8261  CA91L8260B [Single PCI PowerSpan II]",
-"10e4  Tandem Computers",
-"	8029  Realtek 8029 Network Card",
-"10e5  Micro Industries Corporation",
-"10e6  Gainbery Computer Products Inc.",
-"10e7  Vadem",
-"10e8  Applied Micro Circuits Corp.",
-"	1072  INES GPIB-PCI (AMCC5920 based)",
-"	2011  Q-Motion Video Capture/Edit board",
-"	4750  S5930 [Matchmaker]",
-"	5920  S5920",
-"	8043  LANai4.x [Myrinet LANai interface chip]",
-"	8062  S5933_PARASTATION",
-"	807d  S5933 [Matchmaker]",
-"	8088  Kongsberg Spacetec Format Synchronizer",
-"	8089  Kongsberg Spacetec Serial Output Board",
-"	809c  S5933_HEPC3",
-"	80d7  PCI-9112",
-"	80d9  PCI-9118",
-"	80da  PCI-9812",
-"	811a  PCI-IEEE1355-DS-DE Interface",
-"	814c  Fastcom ESCC-PCI (Commtech, Inc.)",
-"	8170  S5933 [Matchmaker] (Chipset Development Tool)",
-"	81e6  Multimedia video controller",
-"	8291  Fastcom 232/8-PCI (Commtech, Inc.)",
-"	82c4  Fastcom 422/4-PCI (Commtech, Inc.)",
-"	82c5  Fastcom 422/2-PCI (Commtech, Inc.)",
-"	82c6  Fastcom IG422/1-PCI (Commtech, Inc.)",
-"	82c7  Fastcom IG232/2-PCI (Commtech, Inc.)",
-"	82ca  Fastcom 232/4-PCI (Commtech, Inc.)",
-"	82db  AJA HDNTV HD SDI Framestore",
-"	82e2  Fastcom DIO24H-PCI (Commtech, Inc.)",
-"	8851  S5933 on Innes Corp FM Radio Capture card",
-"10e9  Alps Electric Co., Ltd.",
-"10ea  Intergraphics Systems",
-"	1680  IGA-1680",
-"	1682  IGA-1682",
-"	1683  IGA-1683",
-"	2000  CyberPro 2000",
-"	2010  CyberPro 2000A",
-"	5000  CyberPro 5000",
-"	5050  CyberPro 5050",
-"	5202  CyberPro 5202",
-"	5252  CyberPro5252",
-"10eb  Artists Graphics",
-"	0101  3GA",
-"	8111  Twist3 Frame Grabber",
-"10ec  Realtek Semiconductor Co., Ltd.",
-"	0139  Zonet Zen3200",
-"	8029  RTL-8029(AS)",
-"		10b8 2011  EZ-Card (SMC1208)",
-"		10ec 8029  RTL-8029(AS)",
-"		1113 1208  EN1208",
-"		1186 0300  DE-528",
-"		1259 2400  AT-2400",
-"	8129  RTL-8129",
-"		10ec 8129  RT8129 Fast Ethernet Adapter",
-"	8138  RT8139 (B/C) Cardbus Fast Ethernet Adapter",
-"		10ec 8138  RT8139 (B/C) Fast Ethernet Adapter",
-"	8139  RTL-8139/8139C/8139C+",
-"		0357 000a  TTP-Monitoring Card V2.0",
-"		1025 005a  TravelMate 290",
-"		1025 8920  ALN-325",
-"		1025 8921  ALN-325",
-"		103c 006a  NX9500",
-"		1043 8109  P5P800-MX Mainboard",
-"		1071 8160  MIM2000",
-"		10bd 0320  EP-320X-R",
-"		10ec 8139  RT8139",
-"		1113 ec01  FNC-0107TX",
-"		1186 1300  DFE-538TX",
-"		1186 1320  SN5200",
-"		1186 8139  DRN-32TX",
-"		11f6 8139  FN22-3(A) LinxPRO Ethernet Adapter",
-"		1259 2500  AT-2500TX",
-"		1259 2503  AT-2500TX/ACPI",
-"		1429 d010  ND010",
-"		1432 9130  EN-9130TX",
-"		1436 8139  RT8139",
-"		1458 e000  GA-7VM400M/7VT600 Motherboard",
-"		1462 788c  865PE Neo2-V Mainboard",
-"		146c 1439  FE-1439TX",
-"		1489 6001  GF100TXRII",
-"		1489 6002  GF100TXRA",
-"		149c 139a  LFE-8139ATX",
-"		149c 8139  LFE-8139TX",
-"		14cb 0200  LNR-100 Family 10/100 Base-TX Ethernet",
-"		1695 9001  Onboard RTL8101L 10/100 MBit",
-"		1799 5000  F5D5000 PCI Card/Desktop Network PCI Card",
-"		1904 8139  RTL8139D Fast Ethernet Adapter",
-"		2646 0001  EtheRx",
-"		8e2e 7000  KF-230TX",
-"		8e2e 7100  KF-230TX/2",
-"		a0a0 0007  ALN-325C",
-"	8169  RTL-8169 Gigabit Ethernet",
-"		1025 0079  Aspire 5024WLMi",
-"		1259 c107  CG-LAPCIGT",
-"		1371 434e  ProG-2000L",
-"		1458 e000  GA-8I915ME-G Mainboard",
-"		1462 702c  K8T NEO 2 motherboard",
-"	8180  RTL8180L 802.11b MAC",
-"	8185  RTL-8185 IEEE 802.11a/b/g Wireless LAN Controller",
-"	8197  SmartLAN56 56K Modem",
-"10ed  Ascii Corporation",
-"	7310  V7310",
-"10ee  Xilinx Corporation",
-"	0205  Wildcard TE205P",
-"	0210  Wildcard TE210P",
-"	0314  Wildcard TE405P/TE410P (1st Gen)",
-"	0405  Wildcard TE405P (2nd Gen)",
-"	0410  Wildcard TE410P (2nd Gen)",
-"	3fc0  RME Digi96",
-"	3fc1  RME Digi96/8",
-"	3fc2  RME Digi96/8 Pro",
-"	3fc3  RME Digi96/8 Pad",
-"	3fc4  RME Digi9652 (Hammerfall)",
-"	3fc5  RME Hammerfall DSP",
-"	3fc6  RME Hammerfall DSP MADI",
-"	8381  Ellips Santos Frame Grabber",
-"	d154  Copley Controls CAN card (PCI-CAN-02)",
-"10ef  Racore Computer Products, Inc.",
-"	8154  M815x Token Ring Adapter",
-"10f0  Peritek Corporation",
-"10f1  Tyan Computer",
-"	2865  Tyan Thunder K8E S2865",
-"10f2  Achme Computer, Inc.",
-"10f3  Alaris, Inc.",
-"10f4  S-MOS Systems, Inc.",
-"10f5  NKK Corporation",
-"	a001  NDR4000 [NR4600 Bridge]",
-"10f6  Creative Electronic Systems SA",
-"10f7  Matsushita Electric Industrial Co., Ltd.",
-"10f8  Altos India Ltd",
-"10f9  PC Direct",
-"10fa  Truevision",
-"	000c  TARGA 1000",
-"10fb  Thesys Gesellschaft fuer Mikroelektronik mbH",
-"	186f  TH 6255",
-"10fc  I-O Data Device, Inc.",
-"	0003  Cardbus IDE Controller",
-"	0005  Cardbus SCSI CBSC II",
-"10fd  Soyo Computer, Inc",
-"10fe  Fast Multimedia AG",
-"10ff  NCube",
-"1100  Jazz Multimedia",
-"1101  Initio Corporation",
-"	1060  INI-A100U2W",
-"	9100  INI-9100/9100W",
-"	9400  INI-940",
-"	9401  INI-950",
-"	9500  360P",
-"	9502  Initio INI-9100UW Ultra Wide SCSI Controller INIC-950P chip",
-"1102  Creative Labs",
-"	0002  SB Live! EMU10k1",
-"		1102 0020  CT4850 SBLive! Value",
-"		1102 0021  CT4620 SBLive!",
-"		1102 002f  SBLive! mainboard implementation",
-"		1102 100a  SB Live! 5.1 Digital OEM [SB0220]",
-"		1102 4001  E-mu APS",
-"		1102 8022  CT4780 SBLive! Value",
-"		1102 8023  CT4790 SoundBlaster PCI512",
-"		1102 8024  CT4760 SBLive!",
-"		1102 8025  SBLive! Mainboard Implementation",
-"		1102 8026  CT4830 SBLive! Value",
-"		1102 8027  CT4832 SBLive! Value",
-"		1102 8028  CT4760 SBLive! OEM version",
-"		1102 8031  CT4831 SBLive! Value",
-"		1102 8040  CT4760 SBLive!",
-"		1102 8051  CT4850 SBLive! Value",
-"		1102 8061  SBLive! Player 5.1",
-"		1102 8064  SBLive! 5.1 Model SB0100",
-"		1102 8065  SBLive! 5.1 Digital Model SB0220",
-"		1102 8067  SBLive! 5.1 eMicro 28028",
-"	0004  SB Audigy",
-"		1102 0051  SB0090 Audigy Player",
-"		1102 0053  SB0090 Audigy Player/OEM",
-"		1102 0058  SB0090 Audigy Player/OEM",
-"		1102 1007  SB0240 Audigy 2 Platinum 6.1",
-"		1102 2002  SB Audigy 2 ZS (SB0350)",
-"	0006  [SB Live! Value] EMU10k1X",
-"	0007  SB Audigy LS",
-"		1102 0007  SBLive! 24bit",
-"		1102 1001  SB0310 Audigy LS",
-"		1102 1002  SB0312 Audigy LS",
-"		1102 1006  SB0410 SBLive! 24-bit",
-"		1462 1009  K8N Diamond",
-"	0008  SB0400 Audigy2 Value",
-"		1102 0008  EMU0404 Digital Audio System",
-"	4001  SB Audigy FireWire Port",
-"		1102 0010  SB Audigy FireWire Port",
-"	7002  SB Live! Game Port",
-"		1102 0020  Gameport Joystick",
-"	7003  SB Audigy Game Port",
-"		1102 0040  SB Audigy MIDI/Game Port",
-"	7004  [SB Live! Value] Input device controller",
-"	7005  SB Audigy LS Game Port",
-"		1102 1001  SB0310 Audigy LS MIDI/Game port",
-"		1102 1002  SB0312 Audigy LS MIDI/Game port",
-"	8064  SB0100 [SBLive! 5.1 OEM]",
-"	8938  Ectiva EV1938",
-"		1033 80e5  SlimTower-Jim (NEC)",
-"		1071 7150  Mitac 7150",
-"		110a 5938  Siemens Scenic Mobile 510PIII",
-"		13bd 100c  Ceres-C (Sharp, Intel BX)",
-"		13bd 100d  Sharp, Intel Banister",
-"		13bd 100e  TwinHead P09S/P09S3 (Sharp)",
-"		13bd f6f1  Marlin (Sharp)",
-"		14ff 0e70  P88TE (TWINHEAD INTERNATIONAL Corp)",
-"		14ff c401  Notebook 9100/9200/2000 (TWINHEAD INTERNATIONAL Corp)",
-"		156d b400  G400 - Geo (AlphaTop (Taiwan))",
-"		156d b550  G560  (AlphaTop (Taiwan))",
-"		156d b560  G560  (AlphaTop (Taiwan))",
-"		156d b700  G700/U700  (AlphaTop (Taiwan))",
-"		156d b795  G795  (AlphaTop (Taiwan))",
-"		156d b797  G797  (AlphaTop (Taiwan))",
-"1103  Triones Technologies, Inc.",
-"	0003  HPT343/345/346/363",
-"	0004  HPT366/368/370/370A/372/372N",
-"		1103 0001  HPT370A",
-"		1103 0004  HPT366 UDMA66 (r1) / HPT368 UDMA66 (r2) / HPT370 UDMA100 (r3) / HPT370 UDMA100 RAID (r4)",
-"		1103 0005  HPT370 UDMA100",
-"	0005  HPT372A/372N",
-"	0006  HPT302/302N",
-"	0007  HPT371/371N",
-"	0008  HPT374",
-"	0009  HPT372N",
-"1104  RasterOps Corp.",
-"1105  Sigma Designs, Inc.",
-"	1105  REALmagic Xcard MPEG 1/2/3/4 DVD Decoder",
-"	8300  REALmagic Hollywood Plus DVD Decoder",
-"	8400  EM840x REALmagic DVD/MPEG-2 Audio/Video Decoder",
-"	8401  EM8401 REALmagic DVD/MPEG-2 A/V Decoder",
-"	8470  EM8470 REALmagic DVD/MPEG-4 A/V Decoder",
-"	8471  EM8471 REALmagic DVD/MPEG-4 A/V Decoder",
-"	8475  EM8475 REALmagic DVD/MPEG-4 A/V Decoder",
-"		1105 0001  REALmagic X-Card",
-"	8476  EM8476 REALmagic DVD/MPEG-4 A/V Decoder",
-"		127d 0000  CineView II",
-"	8485  EM8485 REALmagic DVD/MPEG-4 A/V Decoder",
-"	8486  EM8486 REALmagic DVD/MPEG-4 A/V Decoder",
-"1106  VIA Technologies, Inc.",
-"	0102  Embedded VIA Ethernet Controller",
-"	0130  VT6305 1394.A Controller",
-"	0204  K8M800 Host Bridge",
-"	0208  PT890 Host Bridge",
-"	0238  K8T890 Host Bridge",
-"	0258  PT880 Host Bridge",
-"	0259  CN400/PM880 Host Bridge",
-"	0269  KT880 Host Bridge",
-"	0282  K8T800Pro Host Bridge",
-"		1043 80a3  A8V Deluxe",
-"	0290  K8M890 Host Bridge",
-"	0293  PM896 Host Bridge",
-"	0296  P4M800 Host Bridge",
-"	0305  VT8363/8365 [KT133/KM133]",
-"		1019 0987  K7VZA Mainboard",
-"		1043 8033  A7V Mainboard",
-"		1043 803e  A7V-E Mainboard",
-"		1043 8042  A7V133/A7V133-C Mainboard",
-"		147b a401  KT7/KT7-RAID/KT7A/KT7A-RAID Mainboard",
-"	0308  PT894 Host Bridge",
-"	0314  CN700/VN800/P4M800CE/Pro Host Bridge",
-"	0324  CX700 Host Bridge",
-"	0327  P4M890 Host Bridge",
-"	0336  K8M890CE Host Bridge",
-"	0340  PT900 Host Bridge",
-"	0351  VT3351 Host Bridge",
-"	0364  P4M900 Host Bridge",
-"	0391  VT8371 [KX133]",
-"	0501  VT8501 [Apollo MVP4]",
-"	0505  VT82C505",
-"	0561  VT82C576MV",
-"	0571  VT82C586A/B/VT82C686/A/B/VT823x/A/C PIPC Bus Master IDE",
-"		1019 0985  P6VXA Motherboard",
-"		1019 0a81  L7VTA v1.0 Motherboard (KT400-8235)",
-"		1043 8052  VT8233A Bus Master ATA100/66/33 IDE",
-"		1043 808c  A7V8X / A7V333 motherboard",
-"		1043 80a1  A7V8X-X motherboard rev. 1.01",
-"		1043 80ed  A7V600/K8V-X/A8V Deluxe motherboard",
-"		1106 0571  VT82C586/B/VT82C686/A/B/VT8233/A/C/VT8235 PIPC Bus Master IDE",
-"		1179 0001  Magnia Z310",
-"		1297 f641  FX41 motherboard",
-"		1458 5002  GA-7VAX Mainboard",
-"		1462 7020  K8T NEO 2 motherboard",
-"		147b 1407  KV8-MAX3 motherboard",
-"		1849 0571  K7VT2/K7VT6 motherboard",
-"	0576  VT82C576 3V [Apollo Master]",
-"	0585  VT82C585VP [Apollo VP1/VPX]",
-"	0586  VT82C586/A/B PCI-to-ISA [Apollo VP]",
-"		1106 0000  MVP3 ISA Bridge",
-"	0591  VT8237A SATA 2-Port Controller",
-"	0595  VT82C595 [Apollo VP2]",
-"	0596  VT82C596 ISA [Mobile South]",
-"		1106 0000  VT82C596/A/B PCI to ISA Bridge",
-"		1458 0596  VT82C596/A/B PCI to ISA Bridge",
-"	0597  VT82C597 [Apollo VP3]",
-"	0598  VT82C598 [Apollo MVP3]",
-"	0601  VT8601 [Apollo ProMedia]",
-"	0605  VT8605 [ProSavage PM133]",
-"		1043 802c  CUV4X mainboard",
-"	0680  VT82C680 [Apollo P6]",
-"	0686  VT82C686 [Apollo Super South]",
-"		1019 0985  P6VXA Motherboard",
-"		1043 802c  CUV4X mainboard",
-"		1043 8033  A7V Mainboard",
-"		1043 803e  A7V-E Mainboard",
-"		1043 8040  A7M266 Mainboard",
-"		1043 8042  A7V133/A7V133-C Mainboard",
-"		1106 0000  VT82C686/A PCI to ISA Bridge",
-"		1106 0686  VT82C686/A PCI to ISA Bridge",
-"		1179 0001  Magnia Z310",
-"		147b a702  KG7-Lite Mainboard",
-"	0691  VT82C693A/694x [Apollo PRO133x]",
-"		1019 0985  P6VXA Motherboard",
-"		1179 0001  Magnia Z310",
-"		1458 0691  VT82C691 Apollo Pro System Controller",
-"	0693  VT82C693 [Apollo Pro Plus]",
-"	0698  VT82C693A [Apollo Pro133 AGP]",
-"	0926  VT82C926 [Amazon]",
-"	1000  VT82C570MV",
-"	1106  VT82C570MV",
-"	1204  K8M800 Host Bridge",
-"	1208  PT890 Host Bridge",
-"	1238  K8T890 Host Bridge",
-"	1258  PT880 Host Bridge",
-"	1259  CN400/PM880 Host Bridge",
-"	1269  KT880 Host Bridge",
-"	1282  K8T800Pro Host Bridge",
-"	1290  K8M890 Host Bridge",
-"	1293  PM896 Host Bridge",
-"	1296  P4M800 Host Bridge",
-"	1308  PT894 Host Bridge",
-"	1314  CN700/VN800/P4M800CE/Pro Host Bridge",
-"	1324  CX700 Host Bridge",
-"	1327  P4M890 Host Bridge",
-"	1336  K8M890CE Host Bridge",
-"	1340  PT900 Host Bridge",
-"	1351  VT3351 Host Bridge",
-"	1364  P4M900 Host Bridge",
-"	1571  VT82C576M/VT82C586",
-"	1595  VT82C595/97 [Apollo VP2/97]",
-"	2204  K8M800 Host Bridge",
-"	2208  PT890 Host Bridge",
-"	2238  K8T890 Host Bridge",
-"	2258  PT880 Host Bridge",
-"	2259  CN400/PM880 Host Bridge",
-"	2269  KT880 Host Bridge",
-"	2282  K8T800Pro Host Bridge",
-"	2290  K8M890 Host Bridge",
-"	2293  PM896 Host Bridge",
-"	2296  P4M800 Host Bridge",
-"	2308  PT894 Host Bridge",
-"	2314  CN700/VN800/P4M800CE/Pro Host Bridge",
-"	2324  CX700 Host Bridge",
-"	2327  P4M890 Host Bridge",
-"	2336  K8M890CE Host Bridge",
-"	2340  PT900 Host Bridge",
-"	2351  VT3351 Host Bridge",
-"	2364  P4M900 Host Bridge",
-"	287a  VT8251 PCI to PCI Bridge",
-"	287b  VT8251 Host Bridge",
-"	287c  VT8251 PCIE Root Port",
-"	287d  VT8251 PCIE Root Port",
-"	287e  VT8251 Ultra VLINK Controller",
-"	3022  CLE266",
-"	3038  VT82xxxxx UHCI USB 1.1 Controller",
-"		0925 1234  USB Controller",
-"		1019 0985  P6VXA Motherboard",
-"		1019 0a81  L7VTA v1.0 Motherboard (KT400-8235)",
-"		1043 8080  A7V333 motherboard",
-"		1043 808c  VT6202 USB2.0 4 port controller",
-"		1043 80a1  A7V8X-X motherboard",
-"		1043 80ed  A7V600/K8V-X/A8V Deluxe motherboard",
-"		1179 0001  Magnia Z310",
-"		1458 5004  GA-7VAX Mainboard",
-"		1462 7020  K8T NEO 2 motherboard",
-"		147b 1407  KV8-MAX3 motherboard",
-"		182d 201d  CN-029 USB2.0 4 port PCI Card",
-"		1849 3038  K7VT6",
-"	3040  VT82C586B ACPI",
-"	3043  VT86C100A [Rhine]",
-"		10bd 0000  VT86C100A Fast Ethernet Adapter",
-"		1106 0100  VT86C100A Fast Ethernet Adapter",
-"		1186 1400  DFE-530TX rev A",
-"	3044  IEEE 1394 Host Controller",
-"		1025 005a  TravelMate 290",
-"		1043 808a  A8V Deluxe",
-"		1458 1000  GA-7VT600-1394 Motherboard",
-"		1462 207d  K8NGM2 series motherboard",
-"		1462 702d  K8T NEO 2 motherboard",
-"		1462 971d  MS-6917",
-"	3050  VT82C596 Power Management",
-"	3051  VT82C596 Power Management",
-"	3053  VT6105M [Rhine-III]",
-"	3057  VT82C686 [Apollo Super ACPI]",
-"		1019 0985  P6VXA Motherboard",
-"		1019 0987  K7VZA Motherboard",
-"		1043 8033  A7V Mainboard",
-"		1043 803e  A7V-E Mainboard",
-"		1043 8040  A7M266 Mainboard",
-"		1043 8042  A7V133/A7V133-C Mainboard",
-"		1179 0001  Magnia Z310",
-"	3058  VT82C686 AC97 Audio Controller",
-"		0e11 0097  SoundMax Digital Integrated Audio",
-"		0e11 b194  Soundmax integrated digital audio",
-"		1019 0985  P6VXA Motherboard",
-"		1019 0987  K7VZA Motherboard",
-"		1043 1106  A7V133/A7V133-C Mainboard",
-"		1106 4511  Onboard Audio on EP7KXA",
-"		1458 7600  Onboard Audio",
-"		1462 3091  MS-6309 Onboard Audio",
-"		1462 3300  MS-6330 Onboard Audio",
-"		15dd 7609  Onboard Audio",
-"	3059  VT8233/A/8235/8237 AC97 Audio Controller",
-"		1019 0a81  L7VTA v1.0 Motherboard (KT400-8235)",
-"		1043 8095  A7V8X Motherboard (Realtek ALC650 codec)",
-"		1043 80a1  A7V8X-X Motherboard",
-"		1043 80b0  A7V600/K8V Deluxe motherboard (ADI AD1980 codec [SoundMAX])",
-"		1043 812a  A8V Deluxe motherboard (Realtek ALC850 codec)",
-"		1106 3059  L7VMM2 Motherboard",
-"		1106 4161  K7VT2 motherboard",
-"		1106 4170  PCPartner P4M800-8237R Motherboard",
-"		1106 4552  Soyo KT-600 Dragon Plus (Realtek ALC 650)",
-"		1297 c160  FX41 motherboard (Realtek ALC650 codec)",
-"		1458 a002  GA-7VAX Onboard Audio (Realtek ALC650)",
-"		1462 0080  K8T NEO 2 motherboard",
-"		1462 3800  KT266 onboard audio",
-"		147b 1407  KV8-MAX3 motherboard",
-"		1849 9761  K7VT6 motherboard",
-"		4005 4710  MSI K7T266 Pro2-RU (MSI-6380 v2) onboard audio (Realtek/ALC 200/200P)",
-"		a0a0 01b6  AK77-8XN onboard audio",
-"	3065  VT6102 [Rhine-II]",
-"		1043 80a1  A7V8X-X Motherboard",
-"		1106 0102  VT6102 [Rhine II] Embeded Ethernet Controller on VT8235",
-"		1186 1400  DFE-530TX rev A",
-"		1186 1401  DFE-530TX rev B",
-"		13b9 1421  LD-10/100AL PCI Fast Ethernet Adapter (rev.B)",
-"		147b 1c09  NV7 Motherboard",
-"		1695 3005  VT6103",
-"		1695 300c  Realtek ALC655 sound chip",
-"		1849 3065  K7VT6 motherboard",
-"	3068  AC'97 Modem Controller",
-"		1462 309e  MS-6309 Saturn Motherboard",
-"	3074  VT8233 PCI to ISA Bridge",
-"		1043 8052  VT8233A",
-"	3091  VT8633 [Apollo Pro266]",
-"	3099  VT8366/A/7 [Apollo KT266/A/333]",
-"		1043 8064  A7V266-E Mainboard",
-"		1043 807f  A7V333 Mainboard",
-"		1849 3099  K7VT2 motherboard",
-"	3101  VT8653 Host Bridge",
-"	3102  VT8662 Host Bridge",
-"	3103  VT8615 Host Bridge",
-"	3104  USB 2.0",
-"		1019 0a81  L7VTA v1.0 Motherboard (KT400-8235)",
-"		1043 808c  A7V8X motherboard",
-"		1043 80a1  A7V8X-X motherboard rev 1.01",
-"		1043 80ed  A7V600/K8V-X/A8V Deluxe motherboard",
-"		1297 f641  FX41 motherboard",
-"		1458 5004  GA-7VAX Mainboard",
-"		1462 7020  K8T NEO 2 motherboard",
-"		147b 1407  KV8-MAX3 motherboard",
-"		182d 201d  CN-029 USB 2.0 4 port PCI Card",
-"		1849 3104  K7VT6 motherboard",
-"	3106  VT6105 [Rhine-III]",
-"		1186 1403  DFE-530TX rev C",
-"	3108  S3 Unichrome Pro VGA Adapter",
-"	3109  VT8233C PCI to ISA Bridge",
-"	3112  VT8361 [KLE133] Host Bridge",
-"	3113  VPX/VPX2 PCI to PCI Bridge Controller",
-"	3116  VT8375 [KM266/KL266] Host Bridge",
-"		1297 f641  FX41 motherboard",
-"	3118  S3 Unichrome Pro VGA Adapter",
-"	3119  VT6120/VT6121/VT6122 Gigabit Ethernet Adapter",
-"	3122  VT8623 [Apollo CLE266] integrated CastleRock graphics",
-"	3123  VT8623 [Apollo CLE266]",
-"	3128  VT8753 [P4X266 AGP]",
-"	3133  VT3133 Host Bridge",
-"	3147  VT8233A ISA Bridge",
-"		1043 808c  A7V333 motherboard",
-"	3148  P4M266 Host Bridge",
-"	3149  VIA VT6420 SATA RAID Controller",
-"		1043 80ed  A7V600/K8V Deluxe/K8V-X/A8V Deluxe motherboard",
-"		1458 b003  GA-7VM400AM(F) Motherboard",
-"		1462 7020  K8T Neo 2 Motherboard",
-"		147b 1407  KV8-MAX3 motherboard",
-"		147b 1408  KV7",
-"		1849 3149  K7VT6 motherboard",
-"	3156  P/KN266 Host Bridge",
-"	3164  VT6410 ATA133 RAID controller",
-"		1043 80f4  P4P800 Mainboard Deluxe ATX",
-"		1462 7028  915P/G Neo2",
-"	3168  VT8374 P4X400 Host Controller/AGP Bridge",
-"	3177  VT8235 ISA Bridge",
-"		1019 0a81  L7VTA v1.0 Motherboard (KT400-8235)",
-"		1043 808c  A7V8X motherboard",
-"		1043 80a1  A7V8X-X motherboard",
-"		1297 f641  FX41 motherboard",
-"		1458 5001  GA-7VAX Mainboard",
-"		1849 3177  K7VT2 motherboard",
-"	3178  ProSavageDDR P4N333 Host Bridge",
-"	3188  VT8385 [K8T800 AGP] Host Bridge",
-"		1043 80a3  K8V Deluxe/K8V-X motherboard",
-"		147b 1407  KV8-MAX3 motherboard",
-"	3189  VT8377 [KT400/KT600 AGP] Host Bridge",
-"		1043 807f  A7V8X motherboard",
-"		1458 5000  GA-7VAX Mainboard",
-"		1849 3189  K7VT6 motherboard",
-"	3204  K8M800 Host Bridge",
-"	3205  VT8378 [KM400/A] Chipset Host Bridge",
-"		1458 5000  GA-7VM400M Motherboard",
-"	3208  PT890 Host Bridge",
-"	3213  VPX/VPX2 PCI to PCI Bridge Controller",
-"	3218  K8T800M Host Bridge",
-"	3227  VT8237 ISA bridge [KT600/K8T800/K8T890 South]",
-"		1043 80ed  A7V600/K8V-X/A8V Deluxe motherboard",
-"		1106 3227  DFI KT600-AL Motherboard",
-"		1458 5001  GA-7VT600 Motherboard",
-"		147b 1407  KV8-MAX3 motherboard",
-"		1849 3227  K7VT4 motherboard",
-"	3238  K8T890 Host Bridge",
-"	3249  VT6421 IDE RAID Controller",
-"	324a  CX700 PCI to PCI Bridge",
-"	324b  CX700 Host Bridge",
-"	324e  CX700 Internal Module Bus",
-"	3258  PT880 Host Bridge",
-"	3259  CN400/PM880 Host Bridge",
-"	3269  KT880 Host Bridge",
-"	3282  K8T800Pro Host Bridge",
-"	3287  VT8251 PCI to ISA Bridge",
-"	3288  VIA High Definition Audio Controller",
-"	3290  K8M890 Host Bridge",
-"	3296  P4M800 Host Bridge",
-"	3324  CX700 Host Bridge",
-"	3327  P4M890 Host Bridge",
-"	3336  K8M890CE Host Bridge",
-"	3337  VT8237A PCI to ISA Bridge",
-"	3340  PT900 Host Bridge",
-"	3344  UniChrome Pro IGP",
-"	3349  VT8251 AHCI/SATA 4-Port Controller",
-"	3351  VT3351 Host Bridge",
-"	3364  P4M900 Host Bridge",
-"	337a  VT8237A PCI to PCI Bridge",
-"	337b  VT8237A Host Bridge",
-"	4149  VIA VT6420 (ATA133) Controller",
-"	4204  K8M800 Host Bridge",
-"	4208  PT890 Host Bridge",
-"	4238  K8T890 Host Bridge",
-"	4258  PT880 Host Bridge",
-"	4259  CN400/PM880 Host Bridge",
-"	4269  KT880 Host Bridge",
-"	4282  K8T800Pro Host Bridge",
-"	4290  K8M890 Host Bridge",
-"	4293  PM896 Host Bridge",
-"	4296  P4M800 Host Bridge",
-"	4308  PT894 Host Bridge",
-"	4314  CN700/VN800/P4M800CE/Pro Host Bridge",
-"	4324  CX700 Host Bridge",
-"	4327  P4M890 Host Bridge",
-"	4336  K8M890CE Host Bridge",
-"	4340  PT900 Host Bridge",
-"	4351  VT3351 Host Bridge",
-"	4364  P4M900 Host Bridge",
-"	5030  VT82C596 ACPI [Apollo PRO]",
-"	5208  PT890 I/O APIC Interrupt Controller",
-"	5238  K8T890 I/O APIC Interrupt Controller",
-"	5290  K8M890 I/O APIC Interrupt Controller",
-"	5308  PT894 I/O APIC Interrupt Controller",
-"	5327  P4M890 I/O APIC Interrupt Controller",
-"	5336  K8M890CE I/O APIC Interrupt Controller",
-"	5340  PT900 I/O APIC Interrupt Controller",
-"	5351  VT3351 I/O APIC Interrupt Controller",
-"	5364  P4M900 I/O APIC Interrupt Controller",
-"	6100  VT85C100A [Rhine II]",
-"	6327  P4M890 Security Device",
-"	7204  K8M800 Host Bridge",
-"	7205  VT8378 [S3 UniChrome] Integrated Video",
-"		1458 d000  Gigabyte GA-7VM400(A)M(F) Motherboard",
-"	7208  PT890 Host Bridge",
-"	7238  K8T890 Host Bridge",
-"	7258  PT880 Host Bridge",
-"	7259  CN400/PM880 Host Bridge",
-"	7269  KT880 Host Bridge",
-"	7282  K8T800Pro Host Bridge",
-"	7290  K8M890 Host Bridge",
-"	7293  PM896 Host Bridge",
-"	7296  P4M800 Host Bridge",
-"	7308  PT894 Host Bridge",
-"	7314  CN700/VN800/P4M800CE/Pro Host Bridge",
-"	7324  CX700 Host Bridge",
-"	7327  P4M890 Host Bridge",
-"	7336  K8M890CE Host Bridge",
-"	7340  PT900 Host Bridge",
-"	7351  VT3351 Host Bridge",
-"	7364  P4M900 Host Bridge",
-"	8231  VT8231 [PCI-to-ISA Bridge]",
-"	8235  VT8235 ACPI",
-"	8305  VT8363/8365 [KT133/KM133 AGP]",
-"	8324  CX700 PCI to ISA Bridge",
-"	8391  VT8371 [KX133 AGP]",
-"	8501  VT8501 [Apollo MVP4 AGP]",
-"	8596  VT82C596 [Apollo PRO AGP]",
-"	8597  VT82C597 [Apollo VP3 AGP]",
-"	8598  VT82C598/694x [Apollo MVP3/Pro133x AGP]",
-"		1019 0985  P6VXA Motherboard",
-"	8601  VT8601 [Apollo ProMedia AGP]",
-"	8605  VT8605 [PM133 AGP]",
-"	8691  VT82C691 [Apollo Pro]",
-"	8693  VT82C693 [Apollo Pro Plus] PCI Bridge",
-"	a208  PT890 PCI to PCI Bridge Controller",
-"	a238  K8T890 PCI to PCI Bridge Controller",
-"	a327  P4M890 PCI to PCI Bridge Controller",
-"	a364  P4M900 PCI to PCI Bridge Controller",
-"	b091  VT8633 [Apollo Pro266 AGP]",
-"	b099  VT8366/A/7 [Apollo KT266/A/333 AGP]",
-"	b101  VT8653 AGP Bridge",
-"	b102  VT8362 AGP Bridge",
-"	b103  VT8615 AGP Bridge",
-"	b112  VT8361 [KLE133] AGP Bridge",
-"	b113  VPX/VPX2 I/O APIC Interrupt Controller",
-"	b115  VT8363/8365 [KT133/KM133] PCI Bridge",
-"	b168  VT8235 PCI Bridge",
-"	b188  VT8237 PCI bridge [K8T800/K8T890 South]",
-"		147b 1407  KV8-MAX3 motherboard",
-"	b198  VT8237 PCI Bridge",
-"	b213  VPX/VPX2 I/O APIC Interrupt Controller",
-"	b999  [K8T890 North / VT8237 South] PCI Bridge",
-"	c208  PT890 PCI to PCI Bridge Controller",
-"	c238  K8T890 PCI to PCI Bridge Controller",
-"	c327  P4M890 PCI to PCI Bridge Controller",
-"	c340  PT900 PCI to PCI Bridge Controller",
-"	c364  P4M900 PCI to PCI Bridge Controller",
-"	d104  VT8237 Integrated Fast Ethernet Controller",
-"	d208  PT890 PCI to PCI Bridge Controller",
-"	d213  VPX/VPX2 PCI to PCI Bridge Controller",
-"	d238  K8T890 PCI to PCI Bridge Controller",
-"	d340  PT900 PCI to PCI Bridge Controller",
-"	e208  PT890 PCI to PCI Bridge Controller",
-"	e238  K8T890 PCI to PCI Bridge Controller",
-"	e340  PT900 PCI to PCI Bridge Controller",
-"	f208  PT890 PCI to PCI Bridge Controller",
-"	f238  K8T890 PCI to PCI Bridge Controller",
-"	f340  PT900 PCI to PCI Bridge Controller",
-"1107  Stratus Computers",
-"	0576  VIA VT82C570MV [Apollo] (Wrong vendor ID!)",
-"1108  Proteon, Inc.",
-"	0100  p1690plus_AA",
-"	0101  p1690plus_AB",
-"	0105  P1690Plus",
-"	0108  P1690Plus",
-"	0138  P1690Plus",
-"	0139  P1690Plus",
-"	013c  P1690Plus",
-"	013d  P1690Plus",
-"1109  Cogent Data Technologies, Inc.",
-"	1400  EM110TX [EX110TX]",
-"110a  Siemens Nixdorf AG",
-"	0002  Pirahna 2-port",
-"	0005  Tulip controller, power management, switch extender",
-"	0006  FSC PINC (I/O-APIC)",
-"	0015  FSC Multiprocessor Interrupt Controller",
-"	001d  FSC Copernicus Management Controller",
-"	007b  FSC Remote Service Controller, mailbox device",
-"	007c  FSC Remote Service Controller, shared memory device",
-"	007d  FSC Remote Service Controller, SMIC device",
-"	2101  HST SAPHIR V Primary PCI (ISDN/PMx)",
-"	2102  DSCC4 PEB/PEF 20534 DMA Supported Serial Communication Controller with 4 Channels",
-"	2104  Eicon Diva 2.02 compatible passive ISDN card",
-"	3142  SIMATIC NET CP 5613A1 (Profibus Adapter)",
-"	4021  SIMATIC NET CP 5512 (Profibus and MPI Cardbus Adapter)",
-"	4029  SIMATIC NET CP 5613A2 (Profibus Adapter)",
-"	4942  FPGA I-Bus Tracer for MBD",
-"	6120  SZB6120",
-"110b  Chromatic Research Inc.",
-"	0001  Mpact Media Processor",
-"	0004  Mpact 2",
-"110c  Mini-Max Technology, Inc.",
-"110d  Znyx Advanced Systems",
-"110e  CPU Technology",
-"110f  Ross Technology",
-"1110  Powerhouse Systems",
-"	6037  Firepower Powerized SMP I/O ASIC",
-"	6073  Firepower Powerized SMP I/O ASIC",
-"1111  Santa Cruz Operation",
-"1112  Osicom Technologies Inc",
-"	2200  FDDI Adapter",
-"	2300  Fast Ethernet Adapter",
-"	2340  4 Port Fast Ethernet Adapter",
-"	2400  ATM Adapter",
-"1113  Accton Technology Corporation",
-"	1211  SMC2-1211TX",
-"		103c 1207  EN-1207D Fast Ethernet Adapter",
-"		1113 1211  EN-1207D Fast Ethernet Adapter",
-"	1216  EN-1216 Ethernet Adapter",
-"		1113 2242  EN2242 10/100 Ethernet Mini-PCI Card",
-"		111a 1020  SpeedStream 1020 PCI 10/100 Ethernet Adaptor [EN-1207F-TX \?]",
-"	1217  EN-1217 Ethernet Adapter",
-"	5105  10Mbps Network card",
-"	9211  EN-1207D Fast Ethernet Adapter",
-"		1113 9211  EN-1207D Fast Ethernet Adapter",
-"	9511  21x4x DEC-Tulip compatible Fast Ethernet",
-"	d301  CPWNA100 (Philips wireless PCMCIA)",
-"	ec02  SMC 1244TX v3",
-"1114  Atmel Corporation",
-"	0506  at76c506 802.11b Wireless Network Adaptor",
-"1115  3D Labs",
-"1116  Data Translation",
-"	0022  DT3001",
-"	0023  DT3002",
-"	0024  DT3003",
-"	0025  DT3004",
-"	0026  DT3005",
-"	0027  DT3001-PGL",
-"	0028  DT3003-PGL",
-"1117  Datacube, Inc",
-"	9500  Max-1C SVGA card",
-"	9501  Max-1C image processing",
-"1118  Berg Electronics",
-"1119  ICP Vortex Computersysteme GmbH",
-"	0000  GDT 6000/6020/6050",
-"	0001  GDT 6000B/6010",
-"	0002  GDT 6110/6510",
-"	0003  GDT 6120/6520",
-"	0004  GDT 6530",
-"	0005  GDT 6550",
-"	0006  GDT 6117/6517",
-"	0007  GDT 6127/6527",
-"	0008  GDT 6537",
-"	0009  GDT 6557/6557-ECC",
-"	000a  GDT 6115/6515",
-"	000b  GDT 6125/6525",
-"	000c  GDT 6535",
-"	000d  GDT 6555",
-"	0010  GDT 6115/6515",
-"	0011  GDT 6125/6525",
-"	0012  GDT 6535",
-"	0013  GDT 6555/6555-ECC",
-"	0100  GDT 6117RP/6517RP",
-"	0101  GDT 6127RP/6527RP",
-"	0102  GDT 6537RP",
-"	0103  GDT 6557RP",
-"	0104  GDT 6111RP/6511RP",
-"	0105  GDT 6121RP/6521RP",
-"	0110  GDT 6117RD/6517RD",
-"	0111  GDT 6127RD/6527RD",
-"	0112  GDT 6537RD",
-"	0113  GDT 6557RD",
-"	0114  GDT 6111RD/6511RD",
-"	0115  GDT 6121RD/6521RD",
-"	0118  GDT 6118RD/6518RD/6618RD",
-"	0119  GDT 6128RD/6528RD/6628RD",
-"	011a  GDT 6538RD/6638RD",
-"	011b  GDT 6558RD/6658RD",
-"	0120  GDT 6117RP2/6517RP2",
-"	0121  GDT 6127RP2/6527RP2",
-"	0122  GDT 6537RP2",
-"	0123  GDT 6557RP2",
-"	0124  GDT 6111RP2/6511RP2",
-"	0125  GDT 6121RP2/6521RP2",
-"	0136  GDT 6113RS/6513RS",
-"	0137  GDT 6123RS/6523RS",
-"	0138  GDT 6118RS/6518RS/6618RS",
-"	0139  GDT 6128RS/6528RS/6628RS",
-"	013a  GDT 6538RS/6638RS",
-"	013b  GDT 6558RS/6658RS",
-"	013c  GDT 6533RS/6633RS",
-"	013d  GDT 6543RS/6643RS",
-"	013e  GDT 6553RS/6653RS",
-"	013f  GDT 6563RS/6663RS",
-"	0166  GDT 7113RN/7513RN/7613RN",
-"	0167  GDT 7123RN/7523RN/7623RN",
-"	0168  GDT 7118RN/7518RN/7518RN",
-"	0169  GDT 7128RN/7528RN/7628RN",
-"	016a  GDT 7538RN/7638RN",
-"	016b  GDT 7558RN/7658RN",
-"	016c  GDT 7533RN/7633RN",
-"	016d  GDT 7543RN/7643RN",
-"	016e  GDT 7553RN/7653RN",
-"	016f  GDT 7563RN/7663RN",
-"	01d6  GDT 4x13RZ",
-"	01d7  GDT 4x23RZ",
-"	01f6  GDT 8x13RZ",
-"	01f7  GDT 8x23RZ",
-"	01fc  GDT 8x33RZ",
-"	01fd  GDT 8x43RZ",
-"	01fe  GDT 8x53RZ",
-"	01ff  GDT 8x63RZ",
-"	0210  GDT 6519RD/6619RD",
-"	0211  GDT 6529RD/6629RD",
-"	0260  GDT 7519RN/7619RN",
-"	0261  GDT 7529RN/7629RN",
-"	02ff  GDT MAXRP",
-"	0300  GDT NEWRX",
-"111a  Efficient Networks, Inc",
-"	0000  155P-MF1 (FPGA)",
-"	0002  155P-MF1 (ASIC)",
-"	0003  ENI-25P ATM",
-"		111a 0000  ENI-25p Miniport ATM Adapter",
-"	0005  SpeedStream (LANAI)",
-"		111a 0001  ENI-3010 ATM",
-"		111a 0009  ENI-3060 ADSL (VPI=0)",
-"		111a 0101  ENI-3010 ATM",
-"		111a 0109  ENI-3060CO ADSL (VPI=0)",
-"		111a 0809  ENI-3060 ADSL (VPI=0 or 8)",
-"		111a 0909  ENI-3060CO ADSL (VPI=0 or 8)",
-"		111a 0a09  ENI-3060 ADSL (VPI=<0..15>)",
-"	0007  SpeedStream ADSL",
-"		111a 1001  ENI-3061 ADSL [ASIC]",
-"	1203  SpeedStream 1023 Wireless PCI Adapter",
-"111b  Teledyne Electronic Systems",
-"111c  Tricord Systems Inc.",
-"	0001  Powerbis Bridge",
-"111d  Integrated Device Technology, Inc.",
-"	0001  IDT77201/77211 155Mbps ATM SAR Controller [NICStAR]",
-"	0003  IDT77222/77252 155Mbps ATM MICRO ABR SAR Controller",
-"	0004  IDT77V252 155Mbps ATM MICRO ABR SAR Controller",
-"	0005  IDT77V222 155Mbps ATM MICRO ABR SAR Controller",
-"111e  Eldec",
-"111f  Precision Digital Images",
-"	4a47  Precision MX Video engine interface",
-"	5243  Frame capture bus interface",
-"1120  EMC Corporation",
-"1121  Zilog",
-"1122  Multi-tech Systems, Inc.",
-"1123  Excellent Design, Inc.",
-"1124  Leutron Vision AG",
-"	2581  Picport Monochrome",
-"1125  Eurocore",
-"1126  Vigra",
-"1127  FORE Systems Inc",
-"	0200  ForeRunner PCA-200 ATM",
-"	0210  PCA-200PC",
-"	0250  ATM",
-"	0300  ForeRunner PCA-200EPC ATM",
-"	0310  ATM",
-"	0400  ForeRunnerHE ATM Adapter",
-"		1127 0400  ForeRunnerHE ATM",
-"1129  Firmworks",
-"112a  Hermes Electronics Company, Ltd.",
-"112b  Linotype - Hell AG",
-"112c  Zenith Data Systems",
-"112d  Ravicad",
-"112e  Infomedia Microelectronics Inc.",
-"112f  Imaging Technology Inc",
-"	0000  MVC IC-PCI",
-"	0001  MVC IM-PCI Video frame grabber/processor",
-"	0008  PC-CamLink PCI framegrabber",
-"1130  Computervision",
-"1131  Philips Semiconductors",
-"	1561  USB 1.1 Host Controller",
-"	1562  USB 2.0 Host Controller",
-"	3400  SmartPCI56(UCB1500) 56K Modem",
-"	5400  TriMedia TM1000/1100",
-"	5402  TriMedia TM-1300",
-"		1244 0f00  Fritz!Card DSL",
-"	5405  TriMedia TM1500",
-"	5406  TriMedia TM1700",
-"	7130  SAA7130 Video Broadcast Decoder",
-"		102b 48d0  Matrox CronosPlus",
-"		1048 226b  ELSA EX-VISION 300TV",
-"		1131 2001  10MOONS PCI TV CAPTURE CARD",
-"		1131 2005  Techcom (India) TV Tuner Card (SSD-TV-670)",
-"		1461 050c  Nagase Sangyo TransGear 3000TV",
-"		1461 10ff  AVerMedia DVD EZMaker",
-"		1461 2108  AverMedia AverTV/305",
-"		1461 2115  AverMedia AverTV Studio 305",
-"		153b 1152  Terratec Cinergy 200 TV",
-"		185b c100  Compro VideoMate TV PVR/FM",
-"		185b c901  Videomate DVB-T200",
-"		5168 0138  LifeView FlyVIDEO2000",
-"	7133  SAA7133/SAA7135 Video Broadcast Decoder",
-"		0000 4091  Beholder BeholdTV 409 FM",
-"		1019 4cb5  Elitegroup ECS TVP3XP FM1236 Tuner Card (NTSC,FM)",
-"		1043 0210  FlyTV mini Asus Digimatrix",
-"		1043 4843  ASUS TV-FM 7133",
-"		1043 4845  TV-FM 7135",
-"		1043 4862  P7131 Dual",
-"		1131 2001  Proteus Pro [philips reference design]",
-"		1131 2018  Tiger reference design",
-"		1131 4ee9  MonsterTV Mobile",
-"		11bd 002b  PCTV Stereo",
-"		11bd 002e  PCTV 110i (saa7133)",
-"		12ab 0800  PURPLE TV",
-"		1421 0335  Instant TV DVB-T Cardbus",
-"		1421 1370  Instant TV (saa7135)",
-"		1435 7330  VFG7330",
-"		1435 7350  VFG7350",
-"		1461 1044  AVerTVHD MCE A180",
-"		1461 f31f  Avermedia AVerTV GO 007 FM",
-"		1462 6231  TV@Anywhere plus",
-"		1489 0214  LifeView FlyTV Platinum FM",
-"		14c0 1212  LifeView FlyTV Platinum Mini2",
-"		153b 1160  Cinergy 250 PCI TV",
-"		153b 1162  Terratec Cinergy 400 mobile",
-"		185b c100  VideoMate TV",
-"		5168 0306  LifeView FlyDVB-T DUO",
-"		5168 0319  LifeView FlyDVB Trio",
-"	7134  SAA7134/SAA7135HL Video Broadcast Decoder",
-"		1019 4cb4  Elitegroup ECS TVP3XP FM1216 Tuner Card(PAL-BG,FM)",
-"		1043 0210  Digimatrix TV",
-"		1043 4840  ASUS TV-FM 7134",
-"		1131 2004  EUROPA V3 reference design",
-"		1131 4e85  SKNet Monster TV",
-"		1131 6752  EMPRESS",
-"		11bd 002b  PCTV Stereo",
-"		11bd 002d  PCTV 300i DVB-T + PAL",
-"		1461 2c00  AverTV Hybrid+FM PCI",
-"		1461 9715  AVerTV Studio 307",
-"		1461 a70a  Avermedia AVerTV 307",
-"		1461 a70b  AverMedia M156 / Medion 2819",
-"		1461 d6ee  Cardbus TV/Radio (E500)",
-"		1471 b7e9  AVerTV Cardbus plus",
-"		153b 1142  Terratec Cinergy 400 TV",
-"		153b 1143  Terratec Cinergy 600 TV",
-"		153b 1158  Terratec Cinergy 600 TV MK3",
-"		1540 9524  ProVideo PV952",
-"		16be 0003  Medion 7134",
-"		185b c200  Compro VideoMate Gold+ Pal",
-"		185b c900  Videomate DVB-T300",
-"		1894 a006  KNC One TV-Station DVR",
-"		1894 fe01  KNC One TV-Station RDS / Typhoon TV Tuner RDS",
-"	7145  SAA7145",
-"	7146  SAA7146",
-"		110a 0000  Fujitsu/Siemens DVB-C card rev1.5",
-"		110a ffff  Fujitsu/Siemens DVB-C card rev1.5",
-"		1131 4f56  KNC1 DVB-S Budget",
-"		1131 4f60  Fujitsu-Siemens Activy DVB-S Budget Rev AL",
-"		1131 4f61  Activy DVB-S Budget Rev GR",
-"		1131 5f61  Activy DVB-T Budget",
-"		114b 2003  DVRaptor Video Edit/Capture Card",
-"		11bd 0006  DV500 Overlay",
-"		11bd 000a  DV500 Overlay",
-"		11bd 000f  DV500 Overlay",
-"		13c2 0000  Siemens/Technotrend/Hauppauge DVB card rev1.3 or rev1.5",
-"		13c2 0001  Technotrend/Hauppauge DVB card rev1.3 or rev1.6",
-"		13c2 0002  Technotrend/Hauppauge DVB card rev2.1",
-"		13c2 0003  Technotrend/Hauppauge DVB card rev2.1",
-"		13c2 0004  Technotrend/Hauppauge DVB card rev2.1",
-"		13c2 0006  Technotrend/Hauppauge DVB card rev1.3 or rev1.6",
-"		13c2 0008  Technotrend/Hauppauge DVB-T",
-"		13c2 000a  Octal/Technotrend DVB-C for iTV",
-"		13c2 1003  Technotrend-Budget/Hauppauge WinTV-NOVA-S DVB card",
-"		13c2 1004  Technotrend-Budget/Hauppauge WinTV-NOVA-C DVB card",
-"		13c2 1005  Technotrend-Budget/Hauppauge WinTV-NOVA-T DVB card",
-"		13c2 100c  Technotrend-Budget/Hauppauge WinTV-NOVA-CI DVB card",
-"		13c2 100f  Technotrend-Budget/Hauppauge WinTV-NOVA-CI DVB card",
-"		13c2 1011  Technotrend-Budget/Hauppauge WinTV-NOVA-T DVB card",
-"		13c2 1013  SATELCO Multimedia DVB",
-"		13c2 1016  WinTV-NOVA-SE DVB card",
-"		13c2 1102  Technotrend/Hauppauge DVB card rev2.1",
-"		153b 1156  Terratec Cynergy 1200C",
-"	9730  SAA9730 Integrated Multimedia and Peripheral Controller",
-"1132  Mitel Corp.",
-"1133  Eicon Networks Corporation",
-"	7901  EiconCard S90",
-"	7902  EiconCard S90",
-"	7911  EiconCard S91",
-"	7912  EiconCard S91",
-"	7941  EiconCard S94",
-"	7942  EiconCard S94",
-"	7943  EiconCard S94",
-"	7944  EiconCard S94",
-"	b921  EiconCard P92",
-"	b922  EiconCard P92",
-"	b923  EiconCard P92",
-"	e001  Diva Pro 2.0 S/T",
-"	e002  Diva 2.0 S/T PCI",
-"	e003  Diva Pro 2.0 U",
-"	e004  Diva 2.0 U PCI",
-"	e005  Diva 2.01 S/T PCI",
-"	e006  Diva CT S/T PCI",
-"	e007  Diva CT U PCI",
-"	e008  Diva CT Lite S/T PCI",
-"	e009  Diva CT Lite U PCI",
-"	e00a  Diva ISDN+V.90 PCI",
-"	e00b  Diva 2.02 PCI S/T",
-"	e00c  Diva 2.02 PCI U",
-"	e00d  Diva ISDN Pro 3.0 PCI",
-"	e00e  Diva ISDN+CT S/T PCI Rev 2",
-"	e010  Diva Server BRI-2M PCI",
-"		110a 0021  Fujitsu Siemens ISDN S0",
-"	e011  Diva Server BRI S/T Rev 2",
-"	e012  Diva Server 4BRI-8M PCI",
-"	e013  Diva Server 4BRI Rev 2",
-"		1133 1300  Diva Server V-4BRI-8",
-"		1133 e013  Diva Server 4BRI-8M 2.0 PCI",
-"	e014  Diva Server PRI-30M PCI",
-"	e015  DIVA Server PRI Rev 2",
-"		1133 e015  Diva Server PRI 2.0 PCI",
-"	e016  Diva Server Voice 4BRI PCI",
-"	e017  Diva Server Voice 4BRI Rev 2",
-"		1133 e017  Diva Server Voice 4BRI-8M 2.0 PCI",
-"	e018  Diva Server BRI-2M 2.0 PCI",
-"		1133 1800  Diva Server V-BRI-2",
-"		1133 e018  Diva Server BRI-2M 2.0 PCI",
-"	e019  Diva Server Voice PRI Rev 2",
-"		1133 e019  Diva Server Voice PRI 2.0 PCI",
-"	e01a  Diva Server 2FX",
-"	e01b  Diva Server Voice BRI-2M 2.0 PCI",
-"		1133 e01b  Diva Server Voice BRI-2M 2.0 PCI",
-"	e01c  Diva Server PRI Rev 3",
-"		1133 1c01  Diva Server PRI/E1/T1-8",
-"		1133 1c02  Diva Server PRI/T1-24",
-"		1133 1c03  Diva Server PRI/E1-30",
-"		1133 1c04  Diva Server PRI/E1/T1",
-"		1133 1c05  Diva Server V-PRI/T1-24",
-"		1133 1c06  Diva Server V-PRI/E1-30",
-"		1133 1c07  Diva Server PRI/E1/T1-8 Cornet NQ",
-"		1133 1c08  Diva Server PRI/T1-24 Cornet NQ",
-"		1133 1c09  Diva Server PRI/E1-30 Cornet NQ",
-"		1133 1c0a  Diva Server PRI/E1/T1 Cornet NQ",
-"		1133 1c0b  Diva Server V-PRI/T1-24 Cornet NQ",
-"		1133 1c0c  Diva Server V-PRI/E1-30 Cornet NQ",
-"	e01e  Diva Server 2PRI",
-"	e020  Diva Server 4PRI",
-"	e022  Diva Server Analog-2P",
-"	e024  Diva Server Analog-4P",
-"		1133 2400  Diva Server V-Analog-4P",
-"		1133 e024  Diva Server Analog-4P",
-"	e028  Diva Server Analog-8P",
-"		1133 2800  Diva Server V-Analog-8P",
-"		1133 e028  Diva Server Analog-8P",
-"	e02a  Diva Server IPM-300",
-"	e02c  Diva Server IPM-600",
-"1134  Mercury Computer Systems",
-"	0001  Raceway Bridge",
-"	0002  Dual PCI to RapidIO Bridge",
-"1135  Fuji Xerox Co Ltd",
-"	0001  Printer controller",
-"1136  Momentum Data Systems",
-"1137  Cisco Systems Inc",
-"1138  Ziatech Corporation",
-"	8905  8905 [STD 32 Bridge]",
-"1139  Dynamic Pictures, Inc",
-"	0001  VGA Compatable 3D Graphics",
-"113a  FWB Inc",
-"113b  Network Computing Devices",
-"113c  Cyclone Microsystems, Inc.",
-"	0000  PCI-9060 i960 Bridge",
-"	0001  PCI-SDK [PCI i960 Evaluation Platform]",
-"	0911  PCI-911 [i960Jx-based Intelligent I/O Controller]",
-"	0912  PCI-912 [i960CF-based Intelligent I/O Controller]",
-"	0913  PCI-913",
-"	0914  PCI-914 [I/O Controller w/ secondary PCI bus]",
-"113d  Leading Edge Products Inc",
-"113e  Sanyo Electric Co - Computer Engineering Dept",
-"113f  Equinox Systems, Inc.",
-"	0808  SST-64P Adapter",
-"	1010  SST-128P Adapter",
-"	80c0  SST-16P DB Adapter",
-"	80c4  SST-16P RJ Adapter",
-"	80c8  SST-16P Adapter",
-"	8888  SST-4P Adapter",
-"	9090  SST-8P Adapter",
-"1140  Intervoice Inc",
-"1141  Crest Microsystem Inc",
-"1142  Alliance Semiconductor Corporation",
-"	3210  AP6410",
-"	6422  ProVideo 6422",
-"	6424  ProVideo 6424",
-"	6425  ProMotion AT25",
-"	643d  ProMotion AT3D",
-"1143  NetPower, Inc",
-"1144  Cincinnati Milacron",
-"	0001  Noservo controller",
-"1145  Workbit Corporation",
-"	8007  NinjaSCSI-32 Workbit",
-"	f007  NinjaSCSI-32 KME",
-"	f010  NinjaSCSI-32 Workbit",
-"	f012  NinjaSCSI-32 Logitec",
-"	f013  NinjaSCSI-32 Logitec",
-"	f015  NinjaSCSI-32 Melco",
-"	f020  NinjaSCSI-32 Sony PCGA-DVD51",
-"1146  Force Computers",
-"1147  Interface Corp",
-"1148  SysKonnect",
-"	4000  FDDI Adapter",
-"		0e11 b03b  Netelligent 100 FDDI DAS Fibre SC",
-"		0e11 b03c  Netelligent 100 FDDI SAS Fibre SC",
-"		0e11 b03d  Netelligent 100 FDDI DAS UTP",
-"		0e11 b03e  Netelligent 100 FDDI SAS UTP",
-"		0e11 b03f  Netelligent 100 FDDI SAS Fibre MIC",
-"		1148 5521  FDDI SK-5521 (SK-NET FDDI-UP)",
-"		1148 5522  FDDI SK-5522 (SK-NET FDDI-UP DAS)",
-"		1148 5541  FDDI SK-5541 (SK-NET FDDI-FP)",
-"		1148 5543  FDDI SK-5543 (SK-NET FDDI-LP)",
-"		1148 5544  FDDI SK-5544 (SK-NET FDDI-LP DAS)",
-"		1148 5821  FDDI SK-5821 (SK-NET FDDI-UP64)",
-"		1148 5822  FDDI SK-5822 (SK-NET FDDI-UP64 DAS)",
-"		1148 5841  FDDI SK-5841 (SK-NET FDDI-FP64)",
-"		1148 5843  FDDI SK-5843 (SK-NET FDDI-LP64)",
-"		1148 5844  FDDI SK-5844 (SK-NET FDDI-LP64 DAS)",
-"	4200  Token Ring adapter",
-"	4300  SK-9872 Gigabit Ethernet Server Adapter (SK-NET GE-ZX dual link)",
-"		1148 9821  SK-9821 Gigabit Ethernet Server Adapter (SK-NET GE-T)",
-"		1148 9822  SK-9822 Gigabit Ethernet Server Adapter (SK-NET GE-T dual link)",
-"		1148 9841  SK-9841 Gigabit Ethernet Server Adapter (SK-NET GE-LX)",
-"		1148 9842  SK-9842 Gigabit Ethernet Server Adapter (SK-NET GE-LX dual link)",
-"		1148 9843  SK-9843 Gigabit Ethernet Server Adapter (SK-NET GE-SX)",
-"		1148 9844  SK-9844 Gigabit Ethernet Server Adapter (SK-NET GE-SX dual link)",
-"		1148 9861  SK-9861 Gigabit Ethernet Server Adapter (SK-NET GE-SX Volition)",
-"		1148 9862  SK-9862 Gigabit Ethernet Server Adapter (SK-NET GE-SX Volition dual link)",
-"		1148 9871  SK-9871 Gigabit Ethernet Server Adapter (SK-NET GE-ZX)",
-"		1148 9872  SK-9872 Gigabit Ethernet Server Adapter (SK-NET GE-ZX dual link)",
-"		1259 2970  AT-2970SX Gigabit Ethernet Adapter",
-"		1259 2971  AT-2970LX Gigabit Ethernet Adapter",
-"		1259 2972  AT-2970TX Gigabit Ethernet Adapter",
-"		1259 2973  AT-2971SX Gigabit Ethernet Adapter",
-"		1259 2974  AT-2971T Gigabit Ethernet Adapter",
-"		1259 2975  AT-2970SX/2SC Gigabit Ethernet Adapter",
-"		1259 2976  AT-2970LX/2SC Gigabit Ethernet Adapter",
-"		1259 2977  AT-2970TX/2TX Gigabit Ethernet Adapter",
-"	4320  SK-9871 V2.0 Gigabit Ethernet 1000Base-ZX Adapter, PCI64, Fiber ZX/SC",
-"		1148 0121  Marvell RDK-8001 Adapter",
-"		1148 0221  Marvell RDK-8002 Adapter",
-"		1148 0321  Marvell RDK-8003 Adapter",
-"		1148 0421  Marvell RDK-8004 Adapter",
-"		1148 0621  Marvell RDK-8006 Adapter",
-"		1148 0721  Marvell RDK-8007 Adapter",
-"		1148 0821  Marvell RDK-8008 Adapter",
-"		1148 0921  Marvell RDK-8009 Adapter",
-"		1148 1121  Marvell RDK-8011 Adapter",
-"		1148 1221  Marvell RDK-8012 Adapter",
-"		1148 3221  SK-9521 V2.0 10/100/1000Base-T Adapter",
-"		1148 5021  SK-9821 V2.0 Gigabit Ethernet 10/100/1000Base-T Adapter",
-"		1148 5041  SK-9841 V2.0 Gigabit Ethernet 1000Base-LX Adapter",
-"		1148 5043  SK-9843 V2.0 Gigabit Ethernet 1000Base-SX Adapter",
-"		1148 5051  SK-9851 V2.0 Gigabit Ethernet 1000Base-SX Adapter",
-"		1148 5061  SK-9861 V2.0 Gigabit Ethernet 1000Base-SX Adapter",
-"		1148 5071  SK-9871 V2.0 Gigabit Ethernet 1000Base-ZX Adapter",
-"		1148 9521  SK-9521 10/100/1000Base-T Adapter",
-"	4400  SK-9Dxx Gigabit Ethernet Adapter",
-"	4500  SK-9Mxx Gigabit Ethernet Adapter",
-"	9000  SK-9S21 10/100/1000Base-T Server Adapter, PCI-X, Copper RJ-45",
-"	9843  [Fujitsu] Gigabit Ethernet",
-"	9e00  SK-9E21D 10/100/1000Base-T Adapter, Copper RJ-45",
-"		1148 2100  SK-9E21 Server Adapter",
-"		1148 21d0  SK-9E21D 10/100/1000Base-T Adapter",
-"		1148 2200  SK-9E22 Server Adapter",
-"		1148 8100  SK-9E81 Server Adapter",
-"		1148 8200  SK-9E82 Server Adapter",
-"		1148 9100  SK-9E91 Server Adapter",
-"		1148 9200  SK-9E92 Server Adapter",
-"1149  Win System Corporation",
-"114a  VMIC",
-"	5579  VMIPCI-5579 (Reflective Memory Card)",
-"	5587  VMIPCI-5587 (Reflective Memory Card)",
-"	6504  VMIC PCI 7755 FPGA",
-"	7587  VMIVME-7587",
-"114b  Canopus Co., Ltd",
-"114c  Annabooks",
-"114d  IC Corporation",
-"114e  Nikon Systems Inc",
-"114f  Digi International",
-"	0002  AccelePort EPC",
-"	0003  RightSwitch SE-6",
-"	0004  AccelePort Xem",
-"	0005  AccelePort Xr",
-"	0006  AccelePort Xr,C/X",
-"	0009  AccelePort Xr/J",
-"	000a  AccelePort EPC/J",
-"	000c  DataFirePRIme T1 (1-port)",
-"	000d  SyncPort 2-Port (x.25/FR)",
-"	0011  AccelePort 8r EIA-232 (IBM)",
-"	0012  AccelePort 8r EIA-422",
-"	0014  AccelePort 8r EIA-422",
-"	0015  AccelePort Xem",
-"	0016  AccelePort EPC/X",
-"	0017  AccelePort C/X",
-"	001a  DataFirePRIme E1 (1-port)",
-"	001b  AccelePort C/X (IBM)",
-"	001d  DataFire RAS T1/E1/PRI",
-"		114f 0050  DataFire RAS E1 Adapter",
-"		114f 0051  DataFire RAS Dual E1 Adapter",
-"		114f 0052  DataFire RAS T1 Adapter",
-"		114f 0053  DataFire RAS Dual T1 Adapter",
-"	0023  AccelePort RAS",
-"	0024  DataFire RAS B4 ST/U",
-"		114f 0030  DataFire RAS BRI U Adapter",
-"		114f 0031  DataFire RAS BRI S/T Adapter",
-"	0026  AccelePort 4r 920",
-"	0027  AccelePort Xr 920",
-"	0028  ClassicBoard 4",
-"	0029  ClassicBoard 8",
-"	0034  AccelePort 2r 920",
-"	0035  DataFire DSP T1/E1/PRI cPCI",
-"	0040  AccelePort Xp",
-"	0042  AccelePort 2p",
-"	0043  AccelePort 4p",
-"	0044  AccelePort 8p",
-"	0045  AccelePort 16p",
-"	004e  AccelePort 32p",
-"	0070  Datafire Micro V IOM2 (Europe)",
-"	0071  Datafire Micro V (Europe)",
-"	0072  Datafire Micro V IOM2 (North America)",
-"	0073  Datafire Micro V (North America)",
-"	00b0  Digi Neo 4",
-"	00b1  Digi Neo 8",
-"	00c8  Digi Neo 2 DB9",
-"	00c9  Digi Neo 2 DB9 PRI",
-"	00ca  Digi Neo 2 RJ45",
-"	00cb  Digi Neo 2 RJ45 PRI",
-"	00d0  ClassicBoard 4 422",
-"	00d1  ClassicBoard 8 422",
-"	6001  Avanstar",
-"1150  Thinking Machines Corp",
-"1151  JAE Electronics Inc.",
-"1152  Megatek",
-"1153  Land Win Electronic Corp",
-"1154  Melco Inc",
-"1155  Pine Technology Ltd",
-"1156  Periscope Engineering",
-"1157  Avsys Corporation",
-"1158  Voarx R & D Inc",
-"	3011  Tokenet/vg 1001/10m anylan",
-"	9050  Lanfleet/Truevalue",
-"	9051  Lanfleet/Truevalue",
-"1159  Mutech Corp",
-"	0001  MV-1000",
-"115a  Harlequin Ltd",
-"115b  Parallax Graphics",
-"115c  Photron Ltd.",
-"115d  Xircom",
-"	0003  Cardbus Ethernet 10/100",
-"		1014 0181  10/100 EtherJet Cardbus Adapter",
-"		1014 1181  10/100 EtherJet Cardbus Adapter",
-"		1014 8181  10/100 EtherJet Cardbus Adapter",
-"		1014 9181  10/100 EtherJet Cardbus Adapter",
-"		115d 0181  Cardbus Ethernet 10/100",
-"		115d 0182  RealPort2 CardBus Ethernet 10/100 (R2BE-100)",
-"		115d 1181  Cardbus Ethernet 10/100",
-"		1179 0181  Cardbus Ethernet 10/100",
-"		8086 8181  EtherExpress PRO/100 Mobile CardBus 32 Adapter",
-"		8086 9181  EtherExpress PRO/100 Mobile CardBus 32 Adapter",
-"	0005  Cardbus Ethernet 10/100",
-"		1014 0182  10/100 EtherJet Cardbus Adapter",
-"		1014 1182  10/100 EtherJet Cardbus Adapter",
-"		115d 0182  Cardbus Ethernet 10/100",
-"		115d 1182  Cardbus Ethernet 10/100",
-"	0007  Cardbus Ethernet 10/100",
-"		1014 0182  10/100 EtherJet Cardbus Adapter",
-"		1014 1182  10/100 EtherJet Cardbus Adapter",
-"		115d 0182  Cardbus Ethernet 10/100",
-"		115d 1182  Cardbus Ethernet 10/100",
-"	000b  Cardbus Ethernet 10/100",
-"		1014 0183  10/100 EtherJet Cardbus Adapter",
-"		115d 0183  Cardbus Ethernet 10/100",
-"	000c  Mini-PCI V.90 56k Modem",
-"	000f  Cardbus Ethernet 10/100",
-"		1014 0183  10/100 EtherJet Cardbus Adapter",
-"		115d 0183  Cardbus Ethernet 10/100",
-"	00d4  Mini-PCI K56Flex Modem",
-"	0101  Cardbus 56k modem",
-"		115d 1081  Cardbus 56k Modem",
-"	0103  Cardbus Ethernet + 56k Modem",
-"		1014 9181  Cardbus 56k Modem",
-"		1115 1181  Cardbus Ethernet 100 + 56k Modem",
-"		115d 1181  CBEM56G-100 Ethernet + 56k Modem",
-"		8086 9181  PRO/100 LAN + Modem56 CardBus",
-"115e  Peer Protocols Inc",
-"115f  Maxtor Corporation",
-"1160  Megasoft Inc",
-"1161  PFU Limited",
-"1162  OA Laboratory Co Ltd",
-"1163  Rendition",
-"	0001  Verite 1000",
-"	2000  Verite V2000/V2100/V2200",
-"		1092 2000  Stealth II S220",
-"1164  Advanced Peripherals Technologies",
-"1165  Imagraph Corporation",
-"	0001  Motion TPEG Recorder/Player with audio",
-"1166  Broadcom",
-"	0000  CMIC-LE",
-"	0005  CNB20-LE Host Bridge",
-"	0006  CNB20HE Host Bridge",
-"	0007  CNB20-LE Host Bridge",
-"	0008  CNB20HE Host Bridge",
-"	0009  CNB20LE Host Bridge",
-"	0010  CIOB30",
-"	0011  CMIC-HE",
-"	0012  CMIC-WS Host Bridge (GC-LE chipset)",
-"	0013  CNB20-HE Host Bridge",
-"	0014  CMIC-LE Host Bridge (GC-LE chipset)",
-"	0015  CMIC-GC Host Bridge",
-"	0016  CMIC-GC Host Bridge",
-"	0017  GCNB-LE Host Bridge",
-"	0036  HT1000 PCI/PCI-X bridge",
-"	0101  CIOB-X2 PCI-X I/O Bridge",
-"	0104  HT1000 PCI/PCI-X bridge",
-"	0110  CIOB-E I/O Bridge with Gigabit Ethernet",
-"	0130  HT1000 PCI-X bridge",
-"	0132  HT1000 PCI-Express bridge",
-"	0200  OSB4 South Bridge",
-"	0201  CSB5 South Bridge",
-"		4c53 1080  CT8 mainboard",
-"	0203  CSB6 South Bridge",
-"		1734 1012  Primergy RX300",
-"	0205  HT1000 Legacy South Bridge",
-"	0211  OSB4 IDE Controller",
-"	0212  CSB5 IDE Controller",
-"		4c53 1080  CT8 mainboard",
-"	0213  CSB6 RAID/IDE Controller",
-"		1028 c134  Poweredge SC600",
-"		1734 1012  Primergy RX300",
-"	0214  HT1000 Legacy IDE controller",
-"	0217  CSB6 IDE Controller",
-"		1028 4134  Poweredge SC600",
-"	0220  OSB4/CSB5 OHCI USB Controller",
-"		4c53 1080  CT8 mainboard",
-"	0221  CSB6 OHCI USB Controller",
-"		1734 1012  Primergy RX300",
-"	0223  HT1000 USB Controller",
-"	0225  CSB5 LPC bridge",
-"	0227  GCLE-2 Host Bridge",
-"		1734 1012  Primergy RX300",
-"	0230  CSB5 LPC bridge",
-"		4c53 1080  CT8 mainboard",
-"	0234  HT1000 LPC Bridge",
-"	0240  K2 SATA",
-"	0241  RAIDCore RC4000",
-"	0242  RAIDCore BC4000",
-"	024a  BCM5785 (HT1000) SATA Native SATA Mode",
-"	024b  BCM5785 (HT1000) PATA/IDE Mode",
-"1167  Mutoh Industries Inc",
-"1168  Thine Electronics Inc",
-"1169  Centre for Development of Advanced Computing",
-"116a  Polaris Communications",
-"	6100  Bus/Tag Channel",
-"	6800  Escon Channel",
-"	7100  Bus/Tag Channel",
-"	7800  Escon Channel",
-"116b  Connectware Inc",
-"116c  Intelligent Resources Integrated Systems",
-"116d  Martin-Marietta",
-"116e  Electronics for Imaging",
-"116f  Workstation Technology",
-"1170  Inventec Corporation",
-"1171  Loughborough Sound Images Plc",
-"1172  Altera Corporation",
-"1173  Adobe Systems, Inc",
-"1174  Bridgeport Machines",
-"1175  Mitron Computer Inc.",
-"1176  SBE Incorporated",
-"1177  Silicon Engineering",
-"1178  Alfa, Inc.",
-"	afa1  Fast Ethernet Adapter",
-"1179  Toshiba America Info Systems",
-"	0102  Extended IDE Controller",
-"	0103  EX-IDE Type-B",
-"	0404  DVD Decoder card",
-"	0406  Tecra Video Capture device",
-"	0407  DVD Decoder card (Version 2)",
-"	0601  CPU to PCI bridge",
-"		1179 0001  Satellite Pro",
-"	0603  ToPIC95 PCI to CardBus Bridge for Notebooks",
-"	060a  ToPIC95",
-"		1179 0001  Satellite Pro",
-"	060f  ToPIC97",
-"	0617  ToPIC100 PCI to Cardbus Bridge with ZV Support",
-"	0618  CPU to PCI and PCI to ISA bridge",
-"	0701  FIR Port",
-"	0804  TC6371AF SmartMedia Controller",
-"	0805  SD TypA Controller",
-"	0d01  FIR Port Type-DO",
-"		1179 0001  FIR Port Type-DO",
-"117a  A-Trend Technology",
-"117b  L G Electronics, Inc.",
-"117c  Atto Technology",
-"	0030  Ultra320 SCSI Host Adapter",
-"		117c 8013  ExpressPCI UL4D",
-"		117c 8014  ExpressPCI UL4S",
-"117d  Becton & Dickinson",
-"117e  T/R Systems",
-"117f  Integrated Circuit Systems",
-"1180  Ricoh Co Ltd",
-"	0465  RL5c465",
-"	0466  RL5c466",
-"	0475  RL5c475",
-"		144d c006  vpr Matrix 170B4 CardBus bridge",
-"	0476  RL5c476 II",
-"		1014 0185  ThinkPad A/T/X Series",
-"		1028 0188  Inspiron 6000 laptop",
-"		1043 1967  V6800V",
-"		1043 1987  Asus A4K and Z81K notebooks, possibly others ( mid-2005 machines )",
-"		104d 80df  Vaio PCG-FX403",
-"		104d 80e7  VAIO PCG-GR214EP/GR214MP/GR215MP/GR314MP/GR315MP",
-"		144d c00c  P35 notebook",
-"		14ef 0220  PCD-RP-220S",
-"		17aa 201c  Thinkpad X60s",
-"	0477  RL5c477",
-"	0478  RL5c478",
-"		1014 0184  ThinkPad A30p (2653-64G)",
-"	0511  R5C511",
-"	0522  R5C522 IEEE 1394 Controller",
-"		1014 01cf  ThinkPad A30p (2653-64G)",
-"		1043 1967  V6800V",
-"	0551  R5C551 IEEE 1394 Controller",
-"		144d c006  vpr Matrix 170B4",
-"	0552  R5C552 IEEE 1394 Controller",
-"		1014 0511  ThinkPad A/T/X Series",
-"		1028 0188  Inspiron 6000 laptop",
-"		144d c00c  P35 notebook",
-"		17aa 201e  Thinkpad X60s",
-"	0554  R5C554",
-"	0575  R5C575 SD Bus Host Adapter",
-"	0576  R5C576 SD Bus Host Adapter",
-"	0592  R5C592 Memory Stick Bus Host Adapter",
-"		1043 1967  V6800V",
-"		144d c018  X20 IV",
-"	0811  R5C811",
-"	0822  R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter",
-"		1014 0556  Thinkpad X40",
-"		1014 0598  Thinkpad Z60m",
-"		1028 0188  Inspiron 6000 laptop",
-"		1028 01a2  Inspiron 9200",
-"		1043 1967  ASUS V6800V",
-"		144d c018  X20 IV",
-"		17aa 201d  Thinkpad X60s",
-"	0841  R5C841 CardBus/SD/SDIO/MMC/MS/MSPro/xD/IEEE1394",
-"	0852  xD-Picture Card Controller",
-"		1043 1967  V6800V",
-"1181  Telmatics International",
-"1183  Fujikura Ltd",
-"1184  Forks Inc",
-"1185  Dataworld International Ltd",
-"1186  D-Link System Inc",
-"	0100  DC21041",
-"	1002  DL10050 Sundance Ethernet",
-"		1186 1002  DFE-550TX",
-"		1186 1012  DFE-580TX",
-"	1025  AirPlus Xtreme G DWL-G650 Adapter",
-"	1026  AirXpert DWL-AG650 Wireless Cardbus Adapter",
-"	1043  AirXpert DWL-AG650 Wireless Cardbus Adapter",
-"	1300  RTL8139 Ethernet",
-"		1186 1300  DFE-538TX 10/100 Ethernet Adapter",
-"		1186 1301  DFE-530TX+ 10/100 Ethernet Adapter",
-"		1186 1303  DFE-528TX 10/100 Fast Ethernet PCI Adapter",
-"	1340  DFE-690TXD CardBus PC Card",
-"	1541  DFE-680TXD CardBus PC Card",
-"	1561  DRP-32TXD Cardbus PC Card",
-"	2027  AirPlus Xtreme G DWL-G520 Adapter",
-"	3203  AirPlus Xtreme G DWL-G520 Adapter",
-"	3300  DWL-510 2.4GHz Wireless PCI Adapter",
-"	3a03  AirPro DWL-A650 Wireless Cardbus Adapter(rev.B)",
-"	3a04  AirPro DWL-AB650 Multimode Wireless Cardbus Adapter",
-"	3a05  AirPro DWL-AB520 Multimode Wireless PCI Adapter",
-"	3a07  AirXpert DWL-AG650 Wireless Cardbus Adapter",
-"	3a08  AirXpert DWL-AG520 Wireless PCI Adapter",
-"	3a10  AirXpert DWL-AG650 Wireless Cardbus Adapter(rev.B)",
-"	3a11  AirXpert DWL-AG520 Wireless PCI Adapter(rev.B)",
-"	3a12  AirPlus DWL-G650 Wireless Cardbus Adapter(rev.C)",
-"	3a13  AirPlus DWL-G520 Wireless PCI Adapter(rev.B)",
-"	3a14  AirPremier DWL-AG530 Wireless PCI Adapter",
-"	3a63  AirXpert DWL-AG660 Wireless Cardbus Adapter",
-"	4000  DL2000-based Gigabit Ethernet",
-"	4300  DGE-528T Gigabit Ethernet Adapter",
-"	4b01  DGE-530T Gigabit Ethernet Adapter (rev 11)",
-"	4c00  Gigabit Ethernet Adapter",
-"		1186 4c00  DGE-530T Gigabit Ethernet Adapter",
-"	8400  D-Link DWL-650+ CardBus PC Card",
-"1187  Advanced Technology Laboratories, Inc.",
-"1188  Shima Seiki Manufacturing Ltd.",
-"1189  Matsushita Electronics Co Ltd",
-"118a  Hilevel Technology",
-"118b  Hypertec Pty Limited",
-"118c  Corollary, Inc",
-"	0014  PCIB [C-bus II to PCI bus host bridge chip]",
-"	1117  Intel 8-way XEON Profusion Chipset [Cache Coherency Filter]",
-"118d  BitFlow Inc",
-"	0001  Raptor-PCI framegrabber",
-"	0012  Model 12 Road Runner Frame Grabber",
-"	0014  Model 14 Road Runner Frame Grabber",
-"	0024  Model 24 Road Runner Frame Grabber",
-"	0044  Model 44 Road Runner Frame Grabber",
-"	0112  Model 12 Road Runner Frame Grabber",
-"	0114  Model 14 Road Runner Frame Grabber",
-"	0124  Model 24 Road Runner Frame Grabber",
-"	0144  Model 44 Road Runner Frame Grabber",
-"	0212  Model 12 Road Runner Frame Grabber",
-"	0214  Model 14 Road Runner Frame Grabber",
-"	0224  Model 24 Road Runner Frame Grabber",
-"	0244  Model 44 Road Runner Frame Grabber",
-"	0312  Model 12 Road Runner Frame Grabber",
-"	0314  Model 14 Road Runner Frame Grabber",
-"	0324  Model 24 Road Runner Frame Grabber",
-"	0344  Model 44 Road Runner Frame Grabber",
-"118e  Hermstedt GmbH",
-"118f  Green Logic",
-"1190  Tripace",
-"	c731  TP-910/920/940 PCI Ultra(Wide) SCSI Adapter",
-"1191  Artop Electronic Corp",
-"	0003  SCSI Cache Host Adapter",
-"	0004  ATP8400",
-"	0005  ATP850UF",
-"	0006  ATP860 NO-BIOS",
-"	0007  ATP860",
-"	0008  ATP865 NO-ROM",
-"	0009  ATP865",
-"	8002  AEC6710 SCSI-2 Host Adapter",
-"	8010  AEC6712UW SCSI",
-"	8020  AEC6712U SCSI",
-"	8030  AEC6712S SCSI",
-"	8040  AEC6712D SCSI",
-"	8050  AEC6712SUW SCSI",
-"	8060  AEC6712 SCSI",
-"	8080  AEC67160 SCSI",
-"	8081  AEC67160S SCSI",
-"	808a  AEC67162 2-ch. LVD SCSI",
-"1192  Densan Company Ltd",
-"1193  Zeitnet Inc.",
-"	0001  1221",
-"	0002  1225",
-"1194  Toucan Technology",
-"1195  Ratoc System Inc",
-"1196  Hytec Electronics Ltd",
-"1197  Gage Applied Sciences, Inc.",
-"	010c  CompuScope 82G 8bit 2GS/s Analog Input Card",
-"1198  Lambda Systems Inc",
-"1199  Attachmate Corporation",
-"119a  Mind Share, Inc.",
-"119b  Omega Micro Inc.",
-"	1221  82C092G",
-"119c  Information Technology Inst.",
-"119d  Bug, Inc. Sapporo Japan",
-"119e  Fujitsu Microelectronics Ltd.",
-"	0001  FireStream 155",
-"	0003  FireStream 50",
-"119f  Bull HN Information Systems",
-"11a0  Convex Computer Corporation",
-"11a1  Hamamatsu Photonics K.K.",
-"11a2  Sierra Research and Technology",
-"11a3  Deuretzbacher GmbH & Co. Eng. KG",
-"11a4  Barco Graphics NV",
-"11a5  Microunity Systems Eng. Inc",
-"11a6  Pure Data Ltd.",
-"11a7  Power Computing Corp.",
-"11a8  Systech Corp.",
-"11a9  InnoSys Inc.",
-"	4240  AMCC S933Q Intelligent Serial Card",
-"11aa  Actel",
-"11ab  Marvell Technology Group Ltd.",
-"	0146  GT-64010/64010A System Controller",
-"	138f  W8300 802.11 Adapter (rev 07)",
-"	1fa6  Marvell W8300 802.11 Adapter",
-"	1fa7  88W8310 and 88W8000G [Libertas] 802.11g client chipset",
-"	1faa  88w8335 [Libertas] 802.11b/g Wireless",
-"		1385 4e00  WG511 v2 54MBit/ Wireless PC-Card",
-"	4320  88E8001 Gigabit Ethernet Controller",
-"		1019 0f38  Marvell 88E8001 Gigabit Ethernet Controller (ECS)",
-"		1019 8001  Marvell 88E8001 Gigabit Ethernet Controller (ECS)",
-"		1043 173c  Marvell 88E8001 Gigabit Ethernet Controller (Asus)",
-"		1043 811a  Marvell 88E8001 Gigabit Ethernet Controller (Asus)",
-"		105b 0c19  Marvell 88E8001 Gigabit Ethernet Controller (Foxconn)",
-"		10b8 b452  EZ Card 1000 (SMC9452TXV.2)",
-"		11ab 0121  Marvell RDK-8001",
-"		11ab 0321  Marvell RDK-8003",
-"		11ab 1021  Marvell RDK-8010",
-"		11ab 4320  Marvell Yukon Gigabit Ethernet 10/100/1000Baset-T Constroller (Asus)",
-"		11ab 5021  Marvell Yukon Gigabit Ethernet 10/100/1000Base-T Controller (64 bit)",
-"		11ab 9521  Marvell Yukon Gigabit Ethernet 10/100/1000Base-T Controller (32 bit)",
-"		1458 e000  Marvell 88E8001 Gigabit Ethernet Controller (Gigabyte)",
-"		147b 1406  Marvell 88E8001 Gigabit Ethernet Controller (Abit)",
-"		15d4 0047  Marvell 88E8001 Gigabit Ethernet Controller (Iwill)",
-"		1695 9025  Marvell 88E8001 Gigabit Ethernet Controller (Epox)",
-"		17f2 1c03  Marvell 88E8001 Gigabit Ethernet Controller (Albatron)",
-"		270f 2803  Marvell 88E8001 Gigabit Ethernet Controller (Chaintech)",
-"	4340  88E8021 PCI-X IPMI Gigabit Ethernet Controller",
-"	4341  88E8022 PCI-X IPMI Gigabit Ethernet Controller",
-"	4342  88E8061 PCI-E IPMI Gigabit Ethernet Controller",
-"	4343  88E8062 PCI-E IPMI Gigabit Ethernet Controller",
-"	4344  88E8021 PCI-X IPMI Gigabit Ethernet Controller",
-"	4345  88E8022 PCI-X IPMI Gigabit Ethernet Controller",
-"	4346  88E8061 PCI-E IPMI Gigabit Ethernet Controller",
-"	4347  88E8062 PCI-E IPMI Gigabit Ethernet Controller",
-"	4350  88E8035 PCI-E Fast Ethernet Controller",
-"		1179 0001  Marvell 88E8035 Fast Ethernet Controller (Toshiba)",
-"		11ab 3521  Marvell RDK-8035",
-"		1854 000d  Marvell 88E8035 Fast Ethernet Controller (LGE)",
-"		1854 000e  Marvell 88E8035 Fast Ethernet Controller (LGE)",
-"		1854 000f  Marvell 88E8035 Fast Ethernet Controller (LGE)",
-"		1854 0011  Marvell 88E8035 Fast Ethernet Controller (LGE)",
-"		1854 0012  Marvell 88E8035 Fast Ethernet Controller (LGE)",
-"		1854 0016  Marvell 88E8035 Fast Ethernet Controller (LGE)",
-"		1854 0017  Marvell 88E8035 Fast Ethernet Controller (LGE)",
-"		1854 0018  Marvell 88E8035 Fast Ethernet Controller (LGE)",
-"		1854 0019  Marvell 88E8035 Fast Ethernet Controller (LGE)",
-"		1854 001c  Marvell 88E8035 Fast Ethernet Controller (LGE)",
-"		1854 001e  Marvell 88E8035 Fast Ethernet Controller (LGE)",
-"		1854 0020  Marvell 88E8035 Fast Ethernet Controller (LGE)",
-"	4351  88E8036 PCI-E Fast Ethernet Controller",
-"		107b 4009  Marvell 88E8036 Fast Ethernet Controller (Wistron)",
-"		10f7 8338  Marvell 88E8036 Fast Ethernet Controller (Panasonic)",
-"		1179 0001  Marvell 88E8036 Fast Ethernet Controller (Toshiba)",
-"		1179 ff00  Marvell 88E8036 Fast Ethernet Controller (Compal)",
-"		1179 ff10  Marvell 88E8036 Fast Ethernet Controller (Inventec)",
-"		11ab 3621  Marvell RDK-8036",
-"		13d1 ac12  Abocom EFE3K - 10/100 Ethernet Expresscard",
-"		161f 203d  Marvell 88E8036 Fast Ethernet Controller (Arima)",
-"		1854 000d  Marvell 88E8036 Fast Ethernet Controller (LGE)",
-"		1854 000e  Marvell 88E8036 Fast Ethernet Controller (LGE)",
-"		1854 000f  Marvell 88E8036 Fast Ethernet Controller (LGE)",
-"		1854 0011  Marvell 88E8036 Fast Ethernet Controller (LGE)",
-"		1854 0012  Marvell 88E8036 Fast Ethernet Controller (LGE)",
-"		1854 0016  Marvell 88E8036 Fast Ethernet Controller (LGE)",
-"		1854 0017  Marvell 88E8036 Fast Ethernet Controller (LGE)",
-"		1854 0018  Marvell 88E8036 Fast Ethernet Controller (LGE)",
-"		1854 0019  Marvell 88E8036 Fast Ethernet Controller (LGE)",
-"		1854 001c  Marvell 88E8036 Fast Ethernet Controller (LGE)",
-"		1854 001e  Marvell 88E8036 Fast Ethernet Controller (LGE)",
-"		1854 0020  Marvell 88E8036 Fast Ethernet Controller (LGE)",
-"	4352  88E8038 PCI-E Fast Ethernet Controller",
-"	4360  88E8052 PCI-E ASF Gigabit Ethernet Controller",
-"		1043 8134  Marvell 88E8052 Gigabit Ethernet Controller (Asus)",
-"		107b 4009  Marvell 88E8052 Gigabit Ethernet Controller (Wistron)",
-"		11ab 5221  Marvell RDK-8052",
-"		1458 e000  Marvell 88E8052 Gigabit Ethernet Controller (Gigabyte)",
-"		1462 052c  Marvell 88E8052 Gigabit Ethernet Controller (MSI)",
-"		1849 8052  Marvell 88E8052 Gigabit Ethernet Controller (ASRock)",
-"		a0a0 0509  Marvell 88E8052 Gigabit Ethernet Controller (Aopen)",
-"	4361  88E8050 PCI-E ASF Gigabit Ethernet Controller",
-"		107b 3015  Marvell 88E8050 Gigabit Ethernet Controller (Gateway)",
-"		11ab 5021  Marvell 88E8050 Gigabit Ethernet Controller (Intel)",
-"		8086 3063  D925XCVLK mainboard",
-"		8086 3439  Marvell 88E8050 Gigabit Ethernet Controller (Intel)",
-"	4362  88E8053 PCI-E Gigabit Ethernet Controller",
-"		103c 2a0d  Marvell 88E8053 Gigabit Ethernet Controller (Asus)",
-"		1043 8142  Marvell 88E8053 Gigabit Ethernet controller PCIe (Asus)",
-"		109f 3197  Marvell 88E8053 Gigabit Ethernet Controller (Trigem)",
-"		10f7 8338  Marvell 88E8053 Gigabit Ethernet Controller (Panasonic)",
-"		10fd a430  Marvell 88E8053 Gigabit Ethernet Controller (SOYO)",
-"		1179 0001  Marvell 88E8053 Gigabit Ethernet Controller (Toshiba)",
-"		1179 ff00  Marvell 88E8053 Gigabit Ethernet Controller (Compal)",
-"		1179 ff10  Marvell 88E8053 Gigabit Ethernet Controller (Inventec)",
-"		11ab 5321  Marvell RDK-8053",
-"		1297 c240  Marvell 88E8053 Gigabit Ethernet Controller (Shuttle)",
-"		1297 c241  Marvell 88E8053 Gigabit Ethernet Controller (Shuttle)",
-"		1297 c242  Marvell 88E8053 Gigabit Ethernet Controller (Shuttle)",
-"		1297 c243  Marvell 88E8053 Gigabit Ethernet Controller (Shuttle)",
-"		1297 c244  Marvell 88E8053 Gigabit Ethernet Controller (Shuttle)",
-"		13d1 ac11  EGE5K - Giga Ethernet Expresscard",
-"		1458 e000  Marvell 88E8053 Gigabit Ethernet Controller (Gigabyte)",
-"		1462 058c  Marvell 88E8053 Gigabit Ethernet Controller (MSI)",
-"		14c0 0012  Marvell 88E8053 Gigabit Ethernet Controller (Compal)",
-"		1558 04a0  Marvell 88E8053 Gigabit Ethernet Controller (Clevo)",
-"		15bd 1003  Marvell 88E8053 Gigabit Ethernet Controller (DFI)",
-"		161f 203c  Marvell 88E8053 Gigabit Ethernet Controller (Arima)",
-"		161f 203d  Marvell 88E8053 Gigabit Ethernet Controller (Arima)",
-"		1695 9029  Marvell 88E8053 Gigabit Ethernet Controller (Epox)",
-"		17f2 2c08  Marvell 88E8053 Gigabit Ethernet Controller (Albatron)",
-"		17ff 0585  Marvell 88E8053 Gigabit Ethernet Controller (Quanta)",
-"		1849 8053  Marvell 88E8053 Gigabit Ethernet Controller (ASRock)",
-"		1854 000b  Marvell 88E8053 Gigabit Ethernet Controller (LGE)",
-"		1854 000c  Marvell 88E8053 Gigabit Ethernet Controller (LGE)",
-"		1854 0010  Marvell 88E8053 Gigabit Ethernet Controller (LGE)",
-"		1854 0013  Marvell 88E8053 Gigabit Ethernet Controller (LGE)",
-"		1854 0014  Marvell 88E8053 Gigabit Ethernet Controller (LGE)",
-"		1854 0015  Marvell 88E8053 Gigabit Ethernet Controller (LGE)",
-"		1854 001a  Marvell 88E8053 Gigabit Ethernet Controller (LGE)",
-"		1854 001b  Marvell 88E8053 Gigabit Ethernet Controller (LGE)",
-"		1854 001d  Marvell 88E8053 Gigabit Ethernet Controller (LGE)",
-"		1854 001f  Marvell 88E8053 Gigabit Ethernet Controller (LGE)",
-"		1854 0021  Marvell 88E8053 Gigabit Ethernet Controller (LGE)",
-"		1854 0022  Marvell 88E8053 Gigabit Ethernet Controller (LGE)",
-"		270f 2801  Marvell 88E8053 Gigabit Ethernet Controller (Chaintech)",
-"		a0a0 0506  Marvell 88E8053 Gigabit Ethernet Controller (Aopen)",
-"	4363  88E8055 PCI-E Gigabit Ethernet Controller",
-"	4611  GT-64115 System Controller",
-"	4620  GT-64120/64120A/64121A System Controller",
-"	4801  GT-48001",
-"	5005  Belkin F5D5005 Gigabit Desktop Network PCI Card",
-"	5040  MV88SX5040 4-port SATA I PCI-X Controller",
-"	5041  MV88SX5041 4-port SATA I PCI-X Controller",
-"	5080  MV88SX5080 8-port SATA I PCI-X Controller",
-"	5081  MV88SX5081 8-port SATA I PCI-X Controller",
-"	6041  MV88SX6041 4-port SATA II PCI-X Controller",
-"	6081  MV88SX6081 8-port SATA II PCI-X Controller",
-"	6460  MV64360/64361/64362 System Controller",
-"	6480  MV64460/64461/64462 System Controller",
-"	f003  GT-64010 Primary Image Piranha Image Generator",
-"11ac  Canon Information Systems Research Aust.",
-"11ad  Lite-On Communications Inc",
-"	0002  LNE100TX",
-"		11ad 0002  LNE100TX",
-"		11ad 0003  LNE100TX",
-"		11ad f003  LNE100TX",
-"		11ad ffff  LNE100TX",
-"		1385 f004  FA310TX",
-"	c115  LNE100TX [Linksys EtherFast 10/100]",
-"		11ad c001  LNE100TX [ver 2.0]",
-"11ae  Aztech System Ltd",
-"11af  Avid Technology Inc.",
-"	0001  Cinema",
-"	ee40  Digidesign Audiomedia III",
-"11b0  V3 Semiconductor Inc.",
-"	0002  V300PSC",
-"	0292  V292PBC [Am29030/40 Bridge]",
-"	0960  V96xPBC",
-"	c960  V96DPC",
-"11b1  Apricot Computers",
-"11b2  Eastman Kodak",
-"11b3  Barr Systems Inc.",
-"11b4  Leitch Technology International",
-"11b5  Radstone Technology Plc",
-"11b6  United Video Corp",
-"11b7  Motorola",
-"11b8  XPoint Technologies, Inc",
-"	0001  Quad PeerMaster",
-"11b9  Pathlight Technology Inc.",
-"	c0ed  SSA Controller",
-"11ba  Videotron Corp",
-"11bb  Pyramid Technology",
-"11bc  Network Peripherals Inc",
-"	0001  NP-PCI",
-"11bd  Pinnacle Systems Inc.",
-"	002e  PCTV 40i",
-"	bede  AV/DV Studio Capture Card",
-"11be  International Microcircuits Inc",
-"11bf  Astrodesign, Inc.",
-"11c0  Hewlett Packard",
-"11c1  Agere Systems",
-"	0440  56k WinModem",
-"		1033 8015  LT WinModem 56k Data+Fax+Voice+Dsvd",
-"		1033 8047  LT WinModem 56k Data+Fax+Voice+Dsvd",
-"		1033 804f  LT WinModem 56k Data+Fax+Voice+Dsvd",
-"		10cf 102c  LB LT Modem V.90 56k",
-"		10cf 104a  BIBLO LT Modem 56k",
-"		10cf 105f  LB2 LT Modem V.90 56k",
-"		1179 0001  Internal V.90 Modem",
-"		11c1 0440  LT WinModem 56k Data+Fax+Voice+Dsvd",
-"		122d 4101  MDP7800-U Modem",
-"		122d 4102  MDP7800SP-U Modem",
-"		13e0 0040  LT WinModem 56k Data+Fax+Voice+Dsvd",
-"		13e0 0440  LT WinModem 56k Data+Fax+Voice+Dsvd",
-"		13e0 0441  LT WinModem 56k Data+Fax+Voice+Dsvd",
-"		13e0 0450  LT WinModem 56k Data+Fax+Voice+Dsvd",
-"		13e0 f100  LT WinModem 56k Data+Fax+Voice+Dsvd",
-"		13e0 f101  LT WinModem 56k Data+Fax+Voice+Dsvd",
-"		144d 2101  LT56PV Modem",
-"		149f 0440  LT WinModem 56k Data+Fax+Voice+Dsvd",
-"	0441  56k WinModem",
-"		1033 804d  LT WinModem 56k Data+Fax",
-"		1033 8065  LT WinModem 56k Data+Fax",
-"		1092 0440  Supra 56i",
-"		1179 0001  Internal V.90 Modem",
-"		11c1 0440  LT WinModem 56k Data+Fax",
-"		11c1 0441  LT WinModem 56k Data+Fax",
-"		122d 4100  MDP7800-U Modem",
-"		13e0 0040  LT WinModem 56k Data+Fax",
-"		13e0 0100  LT WinModem 56k Data+Fax",
-"		13e0 0410  LT WinModem 56k Data+Fax",
-"		13e0 0420  TelePath Internet 56k WinModem",
-"		13e0 0440  LT WinModem 56k Data+Fax",
-"		13e0 0443  LT WinModem 56k Data+Fax",
-"		13e0 f102  LT WinModem 56k Data+Fax",
-"		1416 9804  CommWave 56k Modem",
-"		141d 0440  LT WinModem 56k Data+Fax",
-"		144f 0441  Lucent 56k V.90 DF Modem",
-"		144f 0449  Lucent 56k V.90 DF Modem",
-"		144f 110d  Lucent Win Modem",
-"		1468 0441  Presario 56k V.90 DF Modem",
-"		1668 0440  Lucent Win Modem",
-"	0442  56k WinModem",
-"		11c1 0440  LT WinModem 56k Data+Fax+Voice+VoiceView+Dsvd",
-"		11c1 0442  LT WinModem 56k Data+Fax+Voice+VoiceView+Dsvd",
-"		13e0 0412  LT WinModem 56k Data+Fax+Voice+VoiceView+Dsvd",
-"		13e0 0442  LT WinModem 56k Data+Fax+Voice+VoiceView+Dsvd",
-"		13fc 2471  LT WinModem 56k Data+Fax+Voice+VoiceView+Dsvd",
-"		144d 2104  LT56PT Modem",
-"		144f 1104  LT WinModem 56k Data+Fax+Voice+VoiceView+Dsvd",
-"		149f 0440  LT WinModem 56k Data+Fax+Voice+VoiceView+Dsvd",
-"		1668 0440  LT WinModem 56k Data+Fax+Voice+VoiceView+Dsvd",
-"	0443  LT WinModem",
-"	0444  LT WinModem",
-"	0445  LT WinModem",
-"		8086 2203  PRO/100+ MiniPCI (probably an Ambit U98.003.C.00 combo card)",
-"		8086 2204  PRO/100+ MiniPCI on Armada E500",
-"	0446  LT WinModem",
-"	0447  LT WinModem",
-"	0448  WinModem 56k",
-"		1014 0131  Lucent Win Modem",
-"		1033 8066  LT WinModem 56k Data+Fax+Voice+Dsvd",
-"		13e0 0030  56k Voice Modem",
-"		13e0 0040  LT WinModem 56k Data+Fax+Voice+Dsvd",
-"		1668 2400  LT WinModem 56k (MiniPCI Ethernet+Modem)",
-"	0449  WinModem 56k",
-"		0e11 b14d  56k V.90 Modem",
-"		13e0 0020  LT WinModem 56k Data+Fax",
-"		13e0 0041  TelePath Internet 56k WinModem",
-"		1436 0440  Lucent Win Modem",
-"		144f 0449  Lucent 56k V.90 DFi Modem",
-"		1468 0410  IBM ThinkPad T23 (2647-4MG)",
-"		1468 0440  Lucent Win Modem",
-"		1468 0449  Presario 56k V.90 DFi Modem",
-"	044a  F-1156IV WinModem (V90, 56KFlex)",
-"		10cf 1072  LB Global LT Modem",
-"		13e0 0012  LT WinModem 56k Data+Fax+Voice+VoiceView+Dsvd",
-"		13e0 0042  LT WinModem 56k Data+Fax+Voice+VoiceView+Dsvd",
-"		144f 1005  LT WinModem 56k Data+Fax+Voice+VoiceView+Dsvd",
-"	044b  LT WinModem",
-"	044c  LT WinModem",
-"	044d  LT WinModem",
-"	044e  LT WinModem",
-"	044f  V90 WildWire Modem",
-"	0450  LT WinModem",
-"		1033 80a8  Versa Note Vxi",
-"		144f 4005  Magnia SG20",
-"		1468 0450  Evo N600c",
-"		4005 144f  LifeBook C Series",
-"	0451  LT WinModem",
-"	0452  LT WinModem",
-"	0453  LT WinModem",
-"	0454  LT WinModem",
-"	0455  LT WinModem",
-"	0456  LT WinModem",
-"	0457  LT WinModem",
-"	0458  LT WinModem",
-"	0459  LT WinModem",
-"	045a  LT WinModem",
-"	045c  LT WinModem",
-"	0461  V90 WildWire Modem",
-"	0462  V90 WildWire Modem",
-"	0480  Venus Modem (V90, 56KFlex)",
-"	048c  V.92 56K WinModem",
-"	048f  V.92 56k WinModem",
-"	5801  USB",
-"	5802  USS-312 USB Controller",
-"	5803  USS-344S USB Controller",
-"	5811  FW323",
-"		8086 524c  D865PERL mainboard",
-"		dead 0800  FireWire Host Bus Adapter",
-"	8110  T8110 H.100/H.110 TDM switch",
-"		12d9 000c  E1/T1 PMXc cPCI carrier card",
-"	ab10  WL60010 Wireless LAN MAC",
-"	ab11  WL60040 Multimode Wireles LAN MAC",
-"		11c1 ab12  WaveLAN 11abg Cardbus card (Model 1102)",
-"		11c1 ab13  WaveLAN 11abg MiniPCI card (Model 0512)",
-"		11c1 ab15  WaveLAN 11abg Cardbus card (Model 1106)",
-"		11c1 ab16  WaveLAN 11abg MiniPCI card (Model 0516)",
-"	ab20  ORiNOCO PCI Adapter",
-"	ab21  Agere Wireless PCI Adapter",
-"	ab30  Hermes2 Mini-PCI WaveLAN a/b/g",
-"		14cd 2012  Hermes2 Mini-PCI WaveLAN a/b/g",
-"	ed00  ET-131x PCI-E Ethernet Controller",
-"11c2  Sand Microelectronics",
-"11c3  NEC Corporation",
-"11c4  Document Technologies, Inc",
-"11c5  Shiva Corporation",
-"11c6  Dainippon Screen Mfg. Co. Ltd",
-"11c7  D.C.M. Data Systems",
-"11c8  Dolphin Interconnect Solutions AS",
-"	0658  PSB32 SCI-Adapter D31x",
-"	d665  PSB64 SCI-Adapter D32x",
-"	d667  PSB66 SCI-Adapter D33x",
-"11c9  Magma",
-"	0010  16-line serial port w/- DMA",
-"	0011  4-line serial port w/- DMA",
-"11ca  LSI Systems, Inc",
-"11cb  Specialix Research Ltd.",
-"	2000  PCI_9050",
-"		11cb 0200  SX",
-"		11cb b008  I/O8+",
-"	4000  SUPI_1",
-"	8000  T225",
-"11cc  Michels & Kleberhoff Computer GmbH",
-"11cd  HAL Computer Systems, Inc.",
-"11ce  Netaccess",
-"11cf  Pioneer Electronic Corporation",
-"11d0  Lockheed Martin Federal Systems-Manassas",
-"11d1  Auravision",
-"	01f7  VxP524",
-"11d2  Intercom Inc.",
-"11d3  Trancell Systems Inc",
-"11d4  Analog Devices",
-"	1535  Blackfin BF535 processor",
-"	1805  SM56 PCI modem",
-"	1889  AD1889 sound chip",
-"	1986  AD1986A sound chip",
-"	5340  AD1881 sound chip",
-"11d5  Ikon Corporation",
-"	0115  10115",
-"	0117  10117",
-"11d6  Tekelec Telecom",
-"11d7  Trenton Technology, Inc.",
-"11d8  Image Technologies Development",
-"11d9  TEC Corporation",
-"11da  Novell",
-"11db  Sega Enterprises Ltd",
-"11dc  Questra Corporation",
-"11dd  Crosfield Electronics Limited",
-"11de  Zoran Corporation",
-"	6057  ZR36057PQC Video cutting chipset",
-"		1031 7efe  DC10 Plus",
-"		1031 fc00  MiroVIDEO DC50, Motion JPEG Capture/CODEC Board",
-"		12f8 8a02  Tekram Video Kit",
-"		13ca 4231  JPEG/TV Card",
-"	6120  ZR36120",
-"		1328 f001  Cinemaster C DVD Decoder",
-"		13c2 0000  MediaFocus Satellite TV Card",
-"		1de1 9fff  Video Kit C210",
-"11df  New Wave PDG",
-"11e0  Cray Communications A/S",
-"11e1  GEC Plessey Semi Inc.",
-"11e2  Samsung Information Systems America",
-"11e3  Quicklogic Corporation",
-"	0001  COM-ON-AIR Dosch&Amand DECT",
-"	5030  PC Watchdog",
-"11e4  Second Wave Inc",
-"11e5  IIX Consulting",
-"11e6  Mitsui-Zosen System Research",
-"11e7  Toshiba America, Elec. Company",
-"11e8  Digital Processing Systems Inc.",
-"11e9  Highwater Designs Ltd.",
-"11ea  Elsag Bailey",
-"11eb  Formation Inc.",
-"11ec  Coreco Inc",
-"11ed  Mediamatics",
-"11ee  Dome Imaging Systems Inc",
-"11ef  Nicolet Technologies B.V.",
-"11f0  Compu-Shack",
-"	4231  FDDI",
-"	4232  FASTline UTP Quattro",
-"	4233  FASTline FO",
-"	4234  FASTline UTP",
-"	4235  FASTline-II UTP",
-"	4236  FASTline-II FO",
-"	4731  GIGAline",
-"11f1  Symbios Logic Inc",
-"11f2  Picture Tel Japan K.K.",
-"11f3  Keithley Metrabyte",
-"11f4  Kinetic Systems Corporation",
-"	2915  CAMAC controller",
-"11f5  Computing Devices International",
-"11f6  Compex",
-"	0112  ENet100VG4",
-"	0113  FreedomLine 100",
-"	1401  ReadyLink 2000",
-"	2011  RL100-ATX 10/100",
-"		11f6 2011  RL100-ATX",
-"	2201  ReadyLink 100TX (Winbond W89C840)",
-"		11f6 2011  ReadyLink 100TX",
-"	9881  RL100TX Fast Ethernet",
-"11f7  Scientific Atlanta",
-"11f8  PMC-Sierra Inc.",
-"	7375  PM7375 [LASAR-155 ATM SAR]",
-"11f9  I-Cube Inc",
-"11fa  Kasan Electronics Company, Ltd.",
-"11fb  Datel Inc",
-"11fc  Silicon Magic",
-"11fd  High Street Consultants",
-"11fe  Comtrol Corporation",
-"	0001  RocketPort 32 port w/external I/F",
-"	0002  RocketPort 8 port w/external I/F",
-"	0003  RocketPort 16 port w/external I/F",
-"	0004  RocketPort 4 port w/quad cable",
-"	0005  RocketPort 8 port w/octa cable",
-"	0006  RocketPort 8 port w/RJ11 connectors",
-"	0007  RocketPort 4 port w/RJ11 connectors",
-"	0008  RocketPort 8 port w/ DB78 SNI (Siemens) connector",
-"	0009  RocketPort 16 port w/ DB78 SNI (Siemens) connector",
-"	000a  RocketPort Plus 4 port",
-"	000b  RocketPort Plus 8 port",
-"	000c  RocketModem 6 port",
-"	000d  RocketModem 4-port",
-"	000e  RocketPort Plus 2 port RS232",
-"	000f  RocketPort Plus 2 port RS422",
-"	0801  RocketPort UPCI 32 port w/external I/F",
-"	0802  RocketPort UPCI 8 port w/external I/F",
-"	0803  RocketPort UPCI 16 port w/external I/F",
-"	0805  RocketPort UPCI 8 port w/octa cable",
-"	080c  RocketModem III 8 port",
-"	080d  RocketModem III 4 port",
-"	0812  RocketPort UPCI Plus 8 port RS422",
-"	0903  RocketPort Compact PCI 16 port w/external I/F",
-"	8015  RocketPort 4-port UART 16954",
-"11ff  Scion Corporation",
-"	0003  AG-5",
-"1200  CSS Corporation",
-"1201  Vista Controls Corp",
-"1202  Network General Corp.",
-"	4300  Gigabit Ethernet Adapter",
-"		1202 9841  SK-9841 LX",
-"		1202 9842  SK-9841 LX dual link",
-"		1202 9843  SK-9843 SX",
-"		1202 9844  SK-9843 SX dual link",
-"1203  Bayer Corporation, Agfa Division",
-"1204  Lattice Semiconductor Corporation",
-"1205  Array Corporation",
-"1206  Amdahl Corporation",
-"1208  Parsytec GmbH",
-"	4853  HS-Link Device",
-"1209  SCI Systems Inc",
-"120a  Synaptel",
-"120b  Adaptive Solutions",
-"120c  Technical Corp.",
-"120d  Compression Labs, Inc.",
-"120e  Cyclades Corporation",
-"	0100  Cyclom-Y below first megabyte",
-"	0101  Cyclom-Y above first megabyte",
-"	0102  Cyclom-4Y below first megabyte",
-"	0103  Cyclom-4Y above first megabyte",
-"	0104  Cyclom-8Y below first megabyte",
-"	0105  Cyclom-8Y above first megabyte",
-"	0200  Cyclades-Z below first megabyte",
-"	0201  Cyclades-Z above first megabyte",
-"	0300  PC300/RSV or /X21 (2 ports)",
-"	0301  PC300/RSV or /X21 (1 port)",
-"	0310  PC300/TE (2 ports)",
-"	0311  PC300/TE (1 port)",
-"	0320  PC300/TE-M (2 ports)",
-"	0321  PC300/TE-M (1 port)",
-"	0400  PC400",
-"120f  Essential Communications",
-"	0001  Roadrunner serial HIPPI",
-"1210  Hyperparallel Technologies",
-"1211  Braintech Inc",
-"1212  Kingston Technology Corp.",
-"1213  Applied Intelligent Systems, Inc.",
-"1214  Performance Technologies, Inc.",
-"1215  Interware Co., Ltd",
-"1216  Purup Prepress A/S",
-"1217  O2 Micro, Inc.",
-"	6729  OZ6729",
-"	673a  OZ6730",
-"	6832  OZ6832/6833 CardBus Controller",
-"	6836  OZ6836/6860 CardBus Controller",
-"	6872  OZ6812 CardBus Controller",
-"	6925  OZ6922 CardBus Controller",
-"	6933  OZ6933/711E1 CardBus/SmartCardBus Controller",
-"		1025 1016  Travelmate 612 TX",
-"	6972  OZ601/6912/711E0 CardBus/SmartCardBus Controller",
-"		1014 020c  ThinkPad R30",
-"		1179 0001  Magnia Z310",
-"	7110  OZ711Mx 4-in-1 MemoryCardBus Accelerator",
-"		103c 088c  NC8000 laptop",
-"		103c 0890  NC6000 laptop",
-"		1734 106c  Amilo A1645",
-"	7112  OZ711EC1/M1 SmartCardBus/MemoryCardBus Controller",
-"	7113  OZ711EC1 SmartCardBus Controller",
-"	7114  OZ711M1/MC1 4-in-1 MemoryCardBus Controller",
-"	7134  OZ711MP1/MS1 MemoryCardBus Controller",
-"	71e2  OZ711E2 SmartCardBus Controller",
-"	7212  OZ711M2 4-in-1 MemoryCardBus Controller",
-"	7213  OZ6933E CardBus Controller",
-"	7223  OZ711M3/MC3 4-in-1 MemoryCardBus Controller",
-"		103c 088c  NC8000 laptop",
-"		103c 0890  NC6000 laptop",
-"	7233  OZ711MP3/MS3 4-in-1 MemoryCardBus Controller",
-"1218  Hybricon Corp.",
-"1219  First Virtual Corporation",
-"121a  3Dfx Interactive, Inc.",
-"	0001  Voodoo",
-"	0002  Voodoo 2",
-"	0003  Voodoo Banshee",
-"		1092 0003  Monster Fusion",
-"		1092 4000  Monster Fusion",
-"		1092 4002  Monster Fusion",
-"		1092 4801  Monster Fusion AGP",
-"		1092 4803  Monster Fusion AGP",
-"		1092 8030  Monster Fusion",
-"		1092 8035  Monster Fusion AGP",
-"		10b0 0001  Dragon 4000",
-"		1102 1018  3D Blaster Banshee VE",
-"		121a 0001  Voodoo Banshee AGP",
-"		121a 0003  Voodoo Banshee AGP SGRAM",
-"		121a 0004  Voodoo Banshee",
-"		139c 0016  Raven",
-"		139c 0017  Raven",
-"		14af 0002  Maxi Gamer Phoenix",
-"	0004  Voodoo Banshee [Velocity 100]",
-"	0005  Voodoo 3",
-"		121a 0004  Voodoo3 AGP",
-"		121a 0030  Voodoo3 AGP",
-"		121a 0031  Voodoo3 AGP",
-"		121a 0034  Voodoo3 AGP",
-"		121a 0036  Voodoo3 2000 PCI",
-"		121a 0037  Voodoo3 AGP",
-"		121a 0038  Voodoo3 AGP",
-"		121a 003a  Voodoo3 AGP",
-"		121a 0044  Voodoo3",
-"		121a 004b  Velocity 100",
-"		121a 004c  Velocity 200",
-"		121a 004d  Voodoo3 AGP",
-"		121a 004e  Voodoo3 AGP",
-"		121a 0051  Voodoo3 AGP",
-"		121a 0052  Voodoo3 AGP",
-"		121a 0057  Voodoo3 3000 PCI",
-"		121a 0060  Voodoo3 3500 TV (NTSC)",
-"		121a 0061  Voodoo3 3500 TV (PAL)",
-"		121a 0062  Voodoo3 3500 TV (SECAM)",
-"	0009  Voodoo 4 / Voodoo 5",
-"		121a 0003  Voodoo5 PCI 5500",
-"		121a 0009  Voodoo5 AGP 5500/6000",
-"	0057  Voodoo 3/3000 [Avenger]",
-"121b  Advanced Telecommunications Modules",
-"121c  Nippon Texaco., Ltd",
-"121d  Lippert Automationstechnik GmbH",
-"121e  CSPI",
-"	0201  Myrinet 2000 Scalable Cluster Interconnect",
-"121f  Arcus Technology, Inc.",
-"1220  Ariel Corporation",
-"	1220  AMCC 5933 TMS320C80 DSP/Imaging board",
-"1221  Contec Co., Ltd",
-"1222  Ancor Communications, Inc.",
-"1223  Artesyn Communication Products",
-"	0003  PM/Link",
-"	0004  PM/T1",
-"	0005  PM/E1",
-"	0008  PM/SLS",
-"	0009  BajaSpan Resource Target",
-"	000a  BajaSpan Section 0",
-"	000b  BajaSpan Section 1",
-"	000c  BajaSpan Section 2",
-"	000d  BajaSpan Section 3",
-"	000e  PM/PPC",
-"1224  Interactive Images",
-"1225  Power I/O, Inc.",
-"1227  Tech-Source",
-"	0006  Raptor GFX 8P",
-"	0023  Raptor GFX [1100T]",
-"1228  Norsk Elektro Optikk A/S",
-"1229  Data Kinesis Inc.",
-"122a  Integrated Telecom",
-"122b  LG Industrial Systems Co., Ltd",
-"122c  Sican GmbH",
-"122d  Aztech System Ltd",
-"	1206  368DSP",
-"	1400  Trident PCI288-Q3DII (NX)",
-"	50dc  3328 Audio",
-"		122d 0001  3328 Audio",
-"	80da  3328 Audio",
-"		122d 0001  3328 Audio",
-"122e  Xyratex",
-"122f  Andrew Corporation",
-"1230  Fishcamp Engineering",
-"1231  Woodward McCoach, Inc.",
-"1232  GPT Limited",
-"1233  Bus-Tech, Inc.",
-"1234  Technical Corp.",
-"1235  Risq Modular Systems, Inc.",
-"1236  Sigma Designs Corporation",
-"	0000  RealMagic64/GX",
-"	6401  REALmagic 64/GX (SD 6425)",
-"1237  Alta Technology Corporation",
-"1238  Adtran",
-"1239  3DO Company",
-"123a  Visicom Laboratories, Inc.",
-"123b  Seeq Technology, Inc.",
-"123c  Century Systems, Inc.",
-"123d  Engineering Design Team, Inc.",
-"	0000  EasyConnect 8/32",
-"	0002  EasyConnect 8/64",
-"	0003  EasyIO",
-"123e  Simutech, Inc.",
-"123f  C-Cube Microsystems",
-"	00e4  MPEG",
-"	8120  E4\?",
-"		11bd 0006  DV500 E4",
-"		11bd 000a  DV500 E4",
-"		11bd 000f  DV500 E4",
-"		1809 0016  Emuzed MAUI-III PCI PVR FM TV",
-"	8888  Cinemaster C 3.0 DVD Decoder",
-"		1002 0001  Cinemaster C 3.0 DVD Decoder",
-"		1002 0002  Cinemaster C 3.0 DVD Decoder",
-"		1328 0001  Cinemaster C 3.0 DVD Decoder",
-"1240  Marathon Technologies Corp.",
-"1241  DSC Communications",
-"1242  JNI Corporation",
-"	1560  JNIC-1560 PCI-X Fibre Channel Controller",
-"		1242 6562  FCX2-6562 Dual Channel PCI-X Fibre Channel Adapter",
-"		1242 656a  FCX-6562 PCI-X Fibre Channel Adapter",
-"	4643  FCI-1063 Fibre Channel Adapter",
-"	6562  FCX2-6562 Dual Channel PCI-X Fibre Channel Adapter",
-"	656a  FCX-6562 PCI-X Fibre Channel Adapter",
-"1243  Delphax",
-"1244  AVM Audiovisuelles MKTG & Computer System GmbH",
-"	0700  B1 ISDN",
-"	0800  C4 ISDN",
-"	0a00  A1 ISDN [Fritz]",
-"		1244 0a00  FRITZ!Card ISDN Controller",
-"	0e00  Fritz!PCI v2.0 ISDN",
-"	1100  C2 ISDN",
-"	1200  T1 ISDN",
-"	2700  Fritz!Card DSL SL",
-"	2900  Fritz!Card DSL v2.0",
-"1245  A.P.D., S.A.",
-"1246  Dipix Technologies, Inc.",
-"1247  Xylon Research, Inc.",
-"1248  Central Data Corporation",
-"1249  Samsung Electronics Co., Ltd.",
-"124a  AEG Electrocom GmbH",
-"124b  SBS/Greenspring Modular I/O",
-"	0040  PCI-40A or cPCI-200 Quad IndustryPack carrier",
-"		124b 9080  PCI9080 Bridge",
-"124c  Solitron Technologies, Inc.",
-"124d  Stallion Technologies, Inc.",
-"	0000  EasyConnection 8/32",
-"	0002  EasyConnection 8/64",
-"	0003  EasyIO",
-"	0004  EasyConnection/RA",
-"124e  Cylink",
-"124f  Infortrend Technology, Inc.",
-"	0041  IFT-2000 Series RAID Controller",
-"1250  Hitachi Microcomputer System Ltd",
-"1251  VLSI Solutions Oy",
-"1253  Guzik Technical Enterprises",
-"1254  Linear Systems Ltd.",
-"1255  Optibase Ltd",
-"	1110  MPEG Forge",
-"	1210  MPEG Fusion",
-"	2110  VideoPlex",
-"	2120  VideoPlex CC",
-"	2130  VideoQuest",
-"1256  Perceptive Solutions, Inc.",
-"	4201  PCI-2220I",
-"	4401  PCI-2240I",
-"	5201  PCI-2000",
-"1257  Vertex Networks, Inc.",
-"1258  Gilbarco, Inc.",
-"1259  Allied Telesyn International",
-"	2560  AT-2560 Fast Ethernet Adapter (i82557B)",
-"	a117  RTL81xx Fast Ethernet",
-"	a120  21x4x DEC-Tulip compatible 10/100 Ethernet",
-"125a  ABB Power Systems",
-"125b  Asix Electronics Corporation",
-"	1400  ALFA GFC2204 Fast Ethernet",
-"		1186 1100  AX8814X Based PCI Fast Ethernet Adapter",
-"125c  Aurora Technologies, Inc.",
-"	0101  Saturn 4520P",
-"	0640  Aries 16000P",
-"125d  ESS Technology",
-"	0000  ES336H Fax Modem (Early Model)",
-"	1948  Solo\?",
-"	1968  ES1968 Maestro 2",
-"		1028 0085  ES1968 Maestro-2 PCI",
-"		1033 8051  ES1968 Maestro-2 Audiodrive",
-"	1969  ES1969 Solo-1 Audiodrive",
-"		1014 0166  ES1969 SOLO-1 AudioDrive on IBM Aptiva Mainboard",
-"		125d 8888  Solo-1 Audio Adapter",
-"		153b 111b  Terratec 128i PCI",
-"	1978  ES1978 Maestro 2E",
-"		0e11 b112  Armada M700/E500",
-"		1033 803c  ES1978 Maestro-2E Audiodrive",
-"		1033 8058  ES1978 Maestro-2E Audiodrive",
-"		1092 4000  Monster Sound MX400",
-"		1179 0001  ES1978 Maestro-2E Audiodrive",
-"	1988  ES1988 Allegro-1",
-"		0e11 0098  Evo N600c",
-"		1092 4100  Sonic Impact S100",
-"		125d 1988  ESS Allegro-1 Audiodrive",
-"	1989  ESS Modem",
-"		125d 1989  ESS Modem",
-"	1998  ES1983S Maestro-3i PCI Audio Accelerator",
-"		1028 00b1  Latitude C600",
-"		1028 00e6  ES1983S Maestro-3i (Dell Inspiron 8100)",
-"	1999  ES1983S Maestro-3i PCI Modem Accelerator",
-"	199a  ES1983S Maestro-3i PCI Audio Accelerator",
-"	199b  ES1983S Maestro-3i PCI Modem Accelerator",
-"	2808  ES336H Fax Modem (Later Model)",
-"	2838  ES2838/2839 SuperLink Modem",
-"	2898  ES2898 Modem",
-"		125d 0424  ES56-PI Data Fax Modem",
-"		125d 0425  ES56T-PI Data Fax Modem",
-"		125d 0426  ES56V-PI Data Fax Modem",
-"		125d 0427  VW-PI Data Fax Modem",
-"		125d 0428  ES56ST-PI Data Fax Modem",
-"		125d 0429  ES56SV-PI Data Fax Modem",
-"		147a c001  ES56-PI Data Fax Modem",
-"		14fe 0428  ES56-PI Data Fax Modem",
-"		14fe 0429  ES56-PI Data Fax Modem",
-"125e  Specialvideo Engineering SRL",
-"125f  Concurrent Technologies, Inc.",
-"1260  Intersil Corporation",
-"	3872  Prism 2.5 Wavelan chipset",
-"		1468 0202  LAN-Express IEEE 802.11b Wireless LAN",
-"	3873  Prism 2.5 Wavelan chipset",
-"		1186 3501  DWL-520 Wireless PCI Adapter",
-"		1186 3700  DWL-520 Wireless PCI Adapter, Rev E1",
-"		1385 4105  MA311 802.11b wireless adapter",
-"		1668 0414  HWP01170-01 802.11b PCI Wireless Adapter",
-"		16a5 1601  AIR.mate PC-400 PCI Wireless LAN Adapter",
-"		1737 3874  WMP11 Wireless 802.11b PCI Adapter",
-"		8086 2513  Wireless 802.11b MiniPCI Adapter",
-"	3886  ISL3886 [Prism Javelin/Prism Xbow]",
-"		17cf 0037  XG-901 and clones Wireless Adapter",
-"	3890  ISL3890 [Prism GT/Prism Duette]/ISL3886 [Prism Javelin/Prism Xbow]",
-"		10b8 2802  SMC2802W Wireless PCI Adapter",
-"		10b8 2835  SMC2835W Wireless Cardbus Adapter",
-"		10b8 a835  SMC2835W V2 Wireless Cardbus Adapter",
-"		1113 4203  WN4201B",
-"		1113 ee03  SMC2802W V2 Wireless PCI Adapter [ISL3886]",
-"		1113 ee08  SMC2835W V3 EU Wireless Cardbus Adapter",
-"		1186 3202  DWL-G650 A1 Wireless Adapter",
-"		1259 c104  CG-WLCB54GT Wireless Adapter",
-"		1385 4800  WG511 Wireless Adapter",
-"		16a5 1605  ALLNET ALL0271 Wireless PCI Adapter",
-"		17cf 0014  XG-600 and clones Wireless Adapter",
-"		17cf 0020  XG-900 and clones Wireless Adapter",
-"	8130  HMP8130 NTSC/PAL Video Decoder",
-"	8131  HMP8131 NTSC/PAL Video Decoder",
-"	ffff  ISL3886IK",
-"		1260 0000  Senao 3054MP+ (J) mini-PCI WLAN 802.11g adapter",
-"1261  Matsushita-Kotobuki Electronics Industries, Ltd.",
-"1262  ES Computer Company, Ltd.",
-"1263  Sonic Solutions",
-"1264  Aval Nagasaki Corporation",
-"1265  Casio Computer Co., Ltd.",
-"1266  Microdyne Corporation",
-"	0001  NE10/100 Adapter (i82557B)",
-"	1910  NE2000Plus (RT8029) Ethernet Adapter",
-"		1266 1910  NE2000Plus Ethernet Adapter",
-"1267  S. A. Telecommunications",
-"	5352  PCR2101",
-"	5a4b  Telsat Turbo",
-"1268  Tektronix",
-"1269  Thomson-CSF/TTM",
-"126a  Lexmark International, Inc.",
-"126b  Adax, Inc.",
-"126c  Northern Telecom",
-"	1211  10/100BaseTX [RTL81xx]",
-"	126c  802.11b Wireless Ethernet Adapter",
-"126d  Splash Technology, Inc.",
-"126e  Sumitomo Metal Industries, Ltd.",
-"126f  Silicon Motion, Inc.",
-"	0501  SM501 VoyagerGX Rev. AA",
-"	0510  SM501 VoyagerGX Rev. B",
-"	0710  SM710 LynxEM",
-"	0712  SM712 LynxEM+",
-"	0720  SM720 Lynx3DM",
-"	0730  SM731 Cougar3DR",
-"	0810  SM810 LynxE",
-"	0811  SM811 LynxE",
-"	0820  SM820 Lynx3D",
-"	0910  SM910",
-"1270  Olympus Optical Co., Ltd.",
-"1271  GW Instruments",
-"1272  Telematics International",
-"1273  Hughes Network Systems",
-"	0002  DirecPC",
-"1274  Ensoniq",
-"	1171  ES1373 [AudioPCI] (also Creative Labs CT5803)",
-"	1371  ES1371 [AudioPCI-97]",
-"		0e11 0024  AudioPCI on Motherboard Compaq Deskpro",
-"		0e11 b1a7  ES1371, ES1373 AudioPCI",
-"		1033 80ac  ES1371, ES1373 AudioPCI",
-"		1042 1854  Tazer",
-"		107b 8054  Tabor2",
-"		1274 1371  Creative Sound Blaster AudioPCI64V, AudioPCI128",
-"		1274 8001  CT4751 board",
-"		1462 6470  ES1371, ES1373 AudioPCI On Motherboard MS-6147 1.1A",
-"		1462 6560  ES1371, ES1373 AudioPCI On Motherboard MS-6156 1.10",
-"		1462 6630  ES1371, ES1373 AudioPCI On Motherboard MS-6163BX 1.0A",
-"		1462 6631  ES1371, ES1373 AudioPCI On Motherboard MS-6163VIA 1.0A",
-"		1462 6632  ES1371, ES1373 AudioPCI On Motherboard MS-6163BX 2.0A",
-"		1462 6633  ES1371, ES1373 AudioPCI On Motherboard MS-6163VIA 2.0A",
-"		1462 6820  ES1371, ES1373 AudioPCI On Motherboard MS-6182 1.00",
-"		1462 6822  ES1371, ES1373 AudioPCI On Motherboard MS-6182 1.00A",
-"		1462 6830  ES1371, ES1373 AudioPCI On Motherboard MS-6183 1.00",
-"		1462 6880  ES1371, ES1373 AudioPCI On Motherboard MS-6188 1.00",
-"		1462 6900  ES1371, ES1373 AudioPCI On Motherboard MS-6190 1.00",
-"		1462 6910  ES1371, ES1373 AudioPCI On Motherboard MS-6191",
-"		1462 6930  ES1371, ES1373 AudioPCI On Motherboard MS-6193",
-"		1462 6990  ES1371, ES1373 AudioPCI On Motherboard MS-6199BX 2.0A",
-"		1462 6991  ES1371, ES1373 AudioPCI On Motherboard MS-6199VIA 2.0A",
-"		14a4 2077  ES1371, ES1373 AudioPCI On Motherboard KR639",
-"		14a4 2105  ES1371, ES1373 AudioPCI On Motherboard MR800",
-"		14a4 2107  ES1371, ES1373 AudioPCI On Motherboard MR801",
-"		14a4 2172  ES1371, ES1373 AudioPCI On Motherboard DR739",
-"		1509 9902  ES1371, ES1373 AudioPCI On Motherboard KW11",
-"		1509 9903  ES1371, ES1373 AudioPCI On Motherboard KW31",
-"		1509 9904  ES1371, ES1373 AudioPCI On Motherboard KA11",
-"		1509 9905  ES1371, ES1373 AudioPCI On Motherboard KC13",
-"		152d 8801  ES1371, ES1373 AudioPCI On Motherboard CP810E",
-"		152d 8802  ES1371, ES1373 AudioPCI On Motherboard CP810",
-"		152d 8803  ES1371, ES1373 AudioPCI On Motherboard P3810E",
-"		152d 8804  ES1371, ES1373 AudioPCI On Motherboard P3810-S",
-"		152d 8805  ES1371, ES1373 AudioPCI On Motherboard P3820-S",
-"		270f 2001  ES1371, ES1373 AudioPCI On Motherboard 6CTR",
-"		270f 2200  ES1371, ES1373 AudioPCI On Motherboard 6WTX",
-"		270f 3000  ES1371, ES1373 AudioPCI On Motherboard 6WSV",
-"		270f 3100  ES1371, ES1373 AudioPCI On Motherboard 6WIV2",
-"		270f 3102  ES1371, ES1373 AudioPCI On Motherboard 6WIV",
-"		270f 7060  ES1371, ES1373 AudioPCI On Motherboard 6ASA2",
-"		8086 4249  ES1371, ES1373 AudioPCI On Motherboard BI440ZX",
-"		8086 424c  ES1371, ES1373 AudioPCI On Motherboard BL440ZX",
-"		8086 425a  ES1371, ES1373 AudioPCI On Motherboard BZ440ZX",
-"		8086 4341  ES1371, ES1373 AudioPCI On Motherboard Cayman",
-"		8086 4343  ES1371, ES1373 AudioPCI On Motherboard Cape Cod",
-"		8086 4541  D815EEA Motherboard",
-"		8086 4649  ES1371, ES1373 AudioPCI On Motherboard Fire Island",
-"		8086 464a  ES1371, ES1373 AudioPCI On Motherboard FJ440ZX",
-"		8086 4d4f  ES1371, ES1373 AudioPCI On Motherboard Montreal",
-"		8086 4f43  ES1371, ES1373 AudioPCI On Motherboard OC440LX",
-"		8086 5243  ES1371, ES1373 AudioPCI On Motherboard RC440BX",
-"		8086 5352  ES1371, ES1373 AudioPCI On Motherboard SunRiver",
-"		8086 5643  ES1371, ES1373 AudioPCI On Motherboard Vancouver",
-"		8086 5753  ES1371, ES1373 AudioPCI On Motherboard WS440BX",
-"	5000  ES1370 [AudioPCI]",
-"	5880  5880 AudioPCI",
-"		1274 2000  Creative Sound Blaster AudioPCI128",
-"		1274 2003  Creative SoundBlaster AudioPCI 128",
-"		1274 5880  Creative Sound Blaster AudioPCI128",
-"		1274 8001  Sound Blaster 16PCI 4.1ch",
-"		1458 a000  5880 AudioPCI On Motherboard 6OXET",
-"		1462 6880  5880 AudioPCI On Motherboard MS-6188 1.00",
-"		270f 2001  5880 AudioPCI On Motherboard 6CTR",
-"		270f 2200  5880 AudioPCI On Motherboard 6WTX",
-"		270f 7040  5880 AudioPCI On Motherboard 6ATA4",
-"1275  Network Appliance Corporation",
-"1276  Switched Network Technologies, Inc.",
-"1277  Comstream",
-"1278  Transtech Parallel Systems Ltd.",
-"	0701  TPE3/TM3 PowerPC Node",
-"	0710  TPE5 PowerPC PCI board",
-"1279  Transmeta Corporation",
-"	0060  TM8000 Northbridge",
-"	0061  TM8000 AGP bridge",
-"	0295  Northbridge",
-"	0395  LongRun Northbridge",
-"	0396  SDRAM controller",
-"	0397  BIOS scratchpad",
-"127a  Rockwell International",
-"	1002  HCF 56k Data/Fax Modem",
-"		1092 094c  SupraExpress 56i PRO [Diamond SUP2380]",
-"		122d 4002  HPG / MDP3858-U",
-"		122d 4005  MDP3858-E",
-"		122d 4007  MDP3858-A/-NZ",
-"		122d 4012  MDP3858-SA",
-"		122d 4017  MDP3858-W",
-"		122d 4018  MDP3858-W",
-"		127a 1002  Rockwell 56K D/F HCF Modem",
-"	1003  HCF 56k Data/Fax Modem",
-"		0e11 b0bc  229-DF Zephyr",
-"		0e11 b114  229-DF Cheetah",
-"		1033 802b  229-DF",
-"		13df 1003  PCI56RX Modem",
-"		13e0 0117  IBM",
-"		13e0 0147  IBM F-1156IV+/R3 Spain V.90 Modem",
-"		13e0 0197  IBM",
-"		13e0 01c7  IBM F-1156IV+/R3 WW V.90 Modem",
-"		13e0 01f7  IBM",
-"		1436 1003  IBM",
-"		1436 1103  IBM 5614PM3G V.90 Modem",
-"		1436 1602  Compaq 229-DF Ducati",
-"	1004  HCF 56k Data/Fax/Voice Modem",
-"		1048 1500  MicroLink 56k Modem",
-"		10cf 1059  Fujitsu 229-DFRT",
-"	1005  HCF 56k Data/Fax/Voice/Spkp (w/Handset) Modem",
-"		1005 127a  AOpen FM56-P",
-"		1033 8029  229-DFSV",
-"		1033 8054  Modem",
-"		10cf 103c  Fujitsu",
-"		10cf 1055  Fujitsu 229-DFSV",
-"		10cf 1056  Fujitsu 229-DFSV",
-"		122d 4003  MDP3858SP-U",
-"		122d 4006  Packard Bell MDP3858V-E",
-"		122d 4008  MDP3858SP-A/SP-NZ",
-"		122d 4009  MDP3858SP-E",
-"		122d 4010  MDP3858V-U",
-"		122d 4011  MDP3858SP-SA",
-"		122d 4013  MDP3858V-A/V-NZ",
-"		122d 4015  MDP3858SP-W",
-"		122d 4016  MDP3858V-W",
-"		122d 4019  MDP3858V-SA",
-"		13df 1005  PCI56RVP Modem",
-"		13e0 0187  IBM",
-"		13e0 01a7  IBM",
-"		13e0 01b7  IBM DF-1156IV+/R3 Spain V.90 Modem",
-"		13e0 01d7  IBM DF-1156IV+/R3 WW V.90 Modem",
-"		1436 1005  IBM",
-"		1436 1105  IBM",
-"		1437 1105  IBM 5614PS3G V.90 Modem",
-"	1022  HCF 56k Modem",
-"		1436 1303  M3-5614PM3G V.90 Modem",
-"	1023  HCF 56k Data/Fax Modem",
-"		122d 4020  Packard Bell MDP3858-WE",
-"		122d 4023  MDP3858-UE",
-"		13e0 0247  IBM F-1156IV+/R6 Spain V.90 Modem",
-"		13e0 0297  IBM",
-"		13e0 02c7  IBM F-1156IV+/R6 WW V.90 Modem",
-"		1436 1203  IBM",
-"		1436 1303  IBM",
-"	1024  HCF 56k Data/Fax/Voice Modem",
-"	1025  HCF 56k Data/Fax/Voice/Spkp (w/Handset) Modem",
-"		10cf 106a  Fujitsu 235-DFSV",
-"		122d 4021  Packard Bell MDP3858V-WE",
-"		122d 4022  MDP3858SP-WE",
-"		122d 4024  MDP3858V-UE",
-"		122d 4025  MDP3858SP-UE",
-"	1026  HCF 56k PCI Speakerphone Modem",
-"	1032  HCF 56k Modem",
-"	1033  HCF 56k Modem",
-"	1034  HCF 56k Modem",
-"	1035  HCF 56k PCI Speakerphone Modem",
-"	1036  HCF 56k Modem",
-"	1085  HCF 56k Volcano PCI Modem",
-"	2005  HCF 56k Data/Fax Modem",
-"		104d 8044  229-DFSV",
-"		104d 8045  229-DFSV",
-"		104d 8055  PBE/Aztech 235W-DFSV",
-"		104d 8056  235-DFSV",
-"		104d 805a  Modem",
-"		104d 805f  Modem",
-"		104d 8074  Modem",
-"	2013  HSF 56k Data/Fax Modem",
-"		1179 0001  Modem",
-"		1179 ff00  Modem",
-"	2014  HSF 56k Data/Fax/Voice Modem",
-"		10cf 1057  Fujitsu Citicorp III",
-"		122d 4050  MSP3880-U",
-"		122d 4055  MSP3880-W",
-"	2015  HSF 56k Data/Fax/Voice/Spkp (w/Handset) Modem",
-"		10cf 1063  Fujitsu",
-"		10cf 1064  Fujitsu",
-"		1468 2015  Fujitsu",
-"	2016  HSF 56k Data/Fax/Voice/Spkp Modem",
-"		122d 4051  MSP3880V-W",
-"		122d 4052  MSP3880SP-W",
-"		122d 4054  MSP3880V-U",
-"		122d 4056  MSP3880SP-U",
-"		122d 4057  MSP3880SP-A",
-"	4311  Riptide HSF 56k PCI Modem",
-"		127a 4311  Ring Modular\? Riptide HSF RT HP Dom",
-"		13e0 0210  HP-GVC",
-"	4320  Riptide PCI Audio Controller",
-"		1235 4320  Riptide PCI Audio Controller",
-"	4321  Riptide HCF 56k PCI Modem",
-"		1235 4321  Hewlett Packard DF",
-"		1235 4324  Hewlett Packard DF",
-"		13e0 0210  Hewlett Packard DF",
-"		144d 2321  Riptide",
-"	4322  Riptide PCI Game Controller",
-"		1235 4322  Riptide PCI Game Controller",
-"	8234  RapidFire 616X ATM155 Adapter",
-"		108d 0022  RapidFire 616X ATM155 Adapter",
-"		108d 0027  RapidFire 616X ATM155 Adapter",
-"127b  Pixera Corporation",
-"127c  Crosspoint Solutions, Inc.",
-"127d  Vela Research",
-"127e  Winnov, L.P.",
-"127f  Fujifilm",
-"1280  Photoscript Group Ltd.",
-"1281  Yokogawa Electric Corporation",
-"1282  Davicom Semiconductor, Inc.",
-"	9009  Ethernet 100/10 MBit",
-"	9100  21x4x DEC-Tulip compatible 10/100 Ethernet",
-"	9102  21x4x DEC-Tulip compatible 10/100 Ethernet",
-"	9132  Ethernet 100/10 MBit",
-"1283  Integrated Technology Express, Inc.",
-"	673a  IT8330G",
-"	8211  ITE 8211F Single Channel UDMA 133 (ASUS 8211 (ITE IT8212 ATA RAID Controller))",
-"		1043 8138  P5GD1-VW Mainboard",
-"	8212  IT/ITE8212 Dual channel ATA RAID controller (PCI version seems to be IT8212, embedded seems to be ITE8212)",
-"		1283 0001  IT/ITE8212 Dual channel ATA RAID controller",
-"	8330  IT8330G",
-"	8872  IT8874F PCI Dual Serial Port Controller",
-"	8888  IT8888F PCI to ISA Bridge with SMB",
-"	8889  IT8889F PCI to ISA Bridge",
-"	e886  IT8330G",
-"1284  Sahara Networks, Inc.",
-"1285  Platform Technologies, Inc.",
-"	0100  AGOGO sound chip (aka ESS Maestro 1)",
-"1286  Mazet GmbH",
-"1287  M-Pact, Inc.",
-"	001e  LS220D DVD Decoder",
-"	001f  LS220C DVD Decoder",
-"1288  Timestep Corporation",
-"1289  AVC Technology, Inc.",
-"128a  Asante Technologies, Inc.",
-"128b  Transwitch Corporation",
-"128c  Retix Corporation",
-"128d  G2 Networks, Inc.",
-"	0021  ATM155 Adapter",
-"128e  Hoontech Corporation/Samho Multi Tech Ltd.",
-"	0008  ST128 WSS/SB",
-"	0009  ST128 SAM9407",
-"	000a  ST128 Game Port",
-"	000b  ST128 MPU Port",
-"	000c  ST128 Ctrl Port",
-"128f  Tateno Dennou, Inc.",
-"1290  Sord Computer Corporation",
-"1291  NCS Computer Italia",
-"1292  Tritech Microelectronics Inc",
-"1293  Media Reality Technology",
-"1294  Rhetorex, Inc.",
-"1295  Imagenation Corporation",
-"1296  Kofax Image Products",
-"1297  Holco Enterprise Co, Ltd/Shuttle Computer",
-"1298  Spellcaster Telecommunications Inc.",
-"1299  Knowledge Technology Lab.",
-"129a  VMetro, inc.",
-"	0615  PBT-615 PCI-X Bus Analyzer",
-"129b  Image Access",
-"129c  Jaycor",
-"129d  Compcore Multimedia, Inc.",
-"129e  Victor Company of Japan, Ltd.",
-"129f  OEC Medical Systems, Inc.",
-"12a0  Allen-Bradley Company",
-"12a1  Simpact Associates, Inc.",
-"12a2  Newgen Systems Corporation",
-"12a3  Lucent Technologies",
-"	8105  T8105 H100 Digital Switch",
-"12a4  NTT Electronics Technology Company",
-"12a5  Vision Dynamics Ltd.",
-"12a6  Scalable Networks, Inc.",
-"12a7  AMO GmbH",
-"12a8  News Datacom",
-"12a9  Xiotech Corporation",
-"12aa  SDL Communications, Inc.",
-"12ab  Yuan Yuan Enterprise Co., Ltd.",
-"	0002  AU8830 [Vortex2] Based Sound Card With A3D Support",
-"	3000  MPG-200C PCI DVD Decoder Card",
-"12ac  Measurex Corporation",
-"12ad  Multidata GmbH",
-"12ae  Alteon Networks Inc.",
-"	0001  AceNIC Gigabit Ethernet",
-"		1014 0104  Gigabit Ethernet-SX PCI Adapter",
-"		12ae 0001  Gigabit Ethernet-SX (Universal)",
-"		1410 0104  Gigabit Ethernet-SX PCI Adapter",
-"	0002  AceNIC Gigabit Ethernet (Copper)",
-"		10a9 8002  Acenic Gigabit Ethernet",
-"		12ae 0002  Gigabit Ethernet-T (3C986-T)",
-"	00fa  Farallon PN9100-T Gigabit Ethernet",
-"12af  TDK USA Corp",
-"12b0  Jorge Scientific Corp",
-"12b1  GammaLink",
-"12b2  General Signal Networks",
-"12b3  Inter-Face Co Ltd",
-"12b4  FutureTel Inc",
-"12b5  Granite Systems Inc.",
-"12b6  Natural Microsystems",
-"12b7  Cognex Modular Vision Systems Div. - Acumen Inc.",
-"12b8  Korg",
-"12b9  3Com Corp, Modem Division",
-"	1006  WinModem",
-"		12b9 005c  USR 56k Internal Voice WinModem (Model 3472)",
-"		12b9 005e  USR 56k Internal WinModem (Models 662975)",
-"		12b9 0062  USR 56k Internal Voice WinModem (Model 662978)",
-"		12b9 0068  USR 56k Internal Voice WinModem (Model 5690)",
-"		12b9 007a  USR 56k Internal Voice WinModem (Model 662974)",
-"		12b9 007f  USR 56k Internal WinModem (Models 5698, 5699)",
-"		12b9 0080  USR 56k Internal WinModem (Models 2975, 3528)",
-"		12b9 0081  USR 56k Internal Voice WinModem (Models 2974, 3529)",
-"		12b9 0091  USR 56k Internal Voice WinModem (Model 2978)",
-"	1007  USR 56k Internal WinModem",
-"		12b9 00a3  USR 56k Internal WinModem (Model 3595)",
-"	1008  56K FaxModem Model 5610",
-"		12b9 00a2  USR 56k Internal FAX Modem (Model 2977)",
-"		12b9 00aa  USR 56k Internal Voice Modem (Model 2976)",
-"		12b9 00ab  USR 56k Internal Voice Modem (Model 5609)",
-"		12b9 00ac  USR 56k Internal Voice Modem (Model 3298)",
-"		12b9 00ad  USR 56k Internal FAX Modem (Model 5610)",
-"12ba  BittWare, Inc.",
-"12bb  Nippon Unisoft Corporation",
-"12bc  Array Microsystems",
-"12bd  Computerm Corp.",
-"12be  Anchor Chips Inc.",
-"	3041  AN3041Q CO-MEM",
-"	3042  AN3042Q CO-MEM Lite",
-"		12be 3042  Anchor Chips Lite Evaluation Board",
-"12bf  Fujifilm Microdevices",
-"12c0  Infimed",
-"12c1  GMM Research Corp",
-"12c2  Mentec Limited",
-"12c3  Holtek Microelectronics Inc",
-"	0058  PCI NE2K Ethernet",
-"	5598  PCI NE2K Ethernet",
-"12c4  Connect Tech Inc",
-"	0001  Blue HEAT/PCI 8 (RS232/CL/RJ11)",
-"	0002  Blue HEAT/PCI 4 (RS232)",
-"	0003  Blue HEAT/PCI 2 (RS232)",
-"	0004  Blue HEAT/PCI 8 (UNIV, RS485)",
-"	0005  Blue HEAT/PCI 4+4/6+2 (UNIV, RS232/485)",
-"	0006  Blue HEAT/PCI 4 (OPTO, RS485)",
-"	0007  Blue HEAT/PCI 2+2 (RS232/485)",
-"	0008  Blue HEAT/PCI 2 (OPTO, Tx, RS485)",
-"	0009  Blue HEAT/PCI 2+6 (RS232/485)",
-"	000a  Blue HEAT/PCI 8 (Tx, RS485)",
-"	000b  Blue HEAT/PCI 4 (Tx, RS485)",
-"	000c  Blue HEAT/PCI 2 (20 MHz, RS485)",
-"	000d  Blue HEAT/PCI 2 PTM",
-"	0100  NT960/PCI",
-"	0201  cPCI Titan - 2 Port",
-"	0202  cPCI Titan - 4 Port",
-"	0300  CTI PCI UART 2 (RS232)",
-"	0301  CTI PCI UART 4 (RS232)",
-"	0302  CTI PCI UART 8 (RS232)",
-"	0310  CTI PCI UART 1+1 (RS232/485)",
-"	0311  CTI PCI UART 2+2 (RS232/485)",
-"	0312  CTI PCI UART 4+4 (RS232/485)",
-"	0320  CTI PCI UART 2",
-"	0321  CTI PCI UART 4",
-"	0322  CTI PCI UART 8",
-"	0330  CTI PCI UART 2 (RS485)",
-"	0331  CTI PCI UART 4 (RS485)",
-"	0332  CTI PCI UART 8 (RS485)",
-"12c5  Picture Elements Incorporated",
-"	007e  Imaging/Scanning Subsystem Engine",
-"	007f  Imaging/Scanning Subsystem Engine",
-"	0081  PCIVST [Grayscale Thresholding Engine]",
-"	0085  Video Simulator/Sender",
-"	0086  THR2 Multi-scale Thresholder",
-"12c6  Mitani Corporation",
-"12c7  Dialogic Corp",
-"12c8  G Force Co, Ltd",
-"12c9  Gigi Operations",
-"12ca  Integrated Computing Engines",
-"12cb  Antex Electronics Corporation",
-"12cc  Pluto Technologies International",
-"12cd  Aims Lab",
-"12ce  Netspeed Inc.",
-"12cf  Prophet Systems, Inc.",
-"12d0  GDE Systems, Inc.",
-"12d1  PSITech",
-"12d2  NVidia / SGS Thomson (Joint Venture)",
-"	0008  NV1",
-"	0009  DAC64",
-"	0018  Riva128",
-"		1048 0c10  VICTORY Erazor",
-"		107b 8030  STB Velocity 128",
-"		1092 0350  Viper V330",
-"		1092 1092  Viper V330",
-"		10b4 1b1b  STB Velocity 128",
-"		10b4 1b1d  STB Velocity 128",
-"		10b4 1b1e  STB Velocity 128, PAL TV-Out",
-"		10b4 1b20  STB Velocity 128 Sapphire",
-"		10b4 1b21  STB Velocity 128",
-"		10b4 1b22  STB Velocity 128 AGP, NTSC TV-Out",
-"		10b4 1b23  STB Velocity 128 AGP, PAL TV-Out",
-"		10b4 1b27  STB Velocity 128 DVD",
-"		10b4 1b88  MVP Pro 128",
-"		10b4 222a  STB Velocity 128 AGP",
-"		10b4 2230  STB Velocity 128",
-"		10b4 2232  STB Velocity 128",
-"		10b4 2235  STB Velocity 128 AGP",
-"		2a15 54a3  3DVision-SAGP / 3DexPlorer 3000",
-"	0019  Riva128ZX",
-"	0020  TNT",
-"	0028  TNT2",
-"	0029  UTNT2",
-"	002c  VTNT2",
-"	00a0  ITNT2",
-"12d3  Vingmed Sound A/S",
-"12d4  Ulticom (Formerly DGM&S)",
-"	0200  T1 Card",
-"12d5  Equator Technologies Inc",
-"	0003  BSP16",
-"	1000  BSP15",
-"12d6  Analogic Corp",
-"12d7  Biotronic SRL",
-"12d8  Pericom Semiconductor",
-"	8150  PCI to PCI Bridge",
-"12d9  Aculab PLC",
-"	0002  PCI Prosody",
-"	0004  cPCI Prosody",
-"	0005  Aculab E1/T1 PCI card",
-"	1078  Prosody X class e1000 device",
-"		12d9 000d  Prosody X PCI",
-"12da  True Time Inc.",
-"12db  Annapolis Micro Systems, Inc",
-"12dc  Symicron Computer Communication Ltd.",
-"12dd  Management Graphics",
-"12de  Rainbow Technologies",
-"	0200  CryptoSwift CS200",
-"12df  SBS Technologies Inc",
-"12e0  Chase Research",
-"	0010  ST16C654 Quad UART",
-"	0020  ST16C654 Quad UART",
-"	0030  ST16C654 Quad UART",
-"12e1  Nintendo Co, Ltd",
-"12e2  Datum Inc. Bancomm-Timing Division",
-"12e3  Imation Corp - Medical Imaging Systems",
-"12e4  Brooktrout Technology Inc",
-"12e5  Apex Semiconductor Inc",
-"12e6  Cirel Systems",
-"12e7  Sunsgroup Corporation",
-"12e8  Crisc Corp",
-"12e9  GE Spacenet",
-"12ea  Zuken",
-"12eb  Aureal Semiconductor",
-"	0001  Vortex 1",
-"		104d 8036  AU8820 Vortex Digital Audio Processor",
-"		1092 2000  Sonic Impact A3D",
-"		1092 2100  Sonic Impact A3D",
-"		1092 2110  Sonic Impact A3D",
-"		1092 2200  Sonic Impact A3D",
-"		122d 1002  AU8820 Vortex Digital Audio Processor",
-"		12eb 0001  AU8820 Vortex Digital Audio Processor",
-"		5053 3355  Montego",
-"	0002  Vortex 2",
-"		104d 8049  AU8830 Vortex 3D Digital Audio Processor",
-"		104d 807b  AU8830 Vortex 3D Digital Audio Processor",
-"		1092 3000  Monster Sound II",
-"		1092 3001  Monster Sound II",
-"		1092 3002  Monster Sound II",
-"		1092 3003  Monster Sound II",
-"		1092 3004  Monster Sound II",
-"		12eb 0002  AU8830 Vortex 3D Digital Audio Processor",
-"		12eb 0088  AU8830 Vortex 3D Digital Audio Processor",
-"		144d 3510  AU8830 Vortex 3D Digital Audio Processor",
-"		5053 3356  Montego II",
-"	0003  AU8810 Vortex Digital Audio Processor",
-"		104d 8049  AU8810 Vortex Digital Audio Processor",
-"		104d 8077  AU8810 Vortex Digital Audio Processor",
-"		109f 1000  AU8810 Vortex Digital Audio Processor",
-"		12eb 0003  AU8810 Vortex Digital Audio Processor",
-"		1462 6780  AU8810 Vortex Digital Audio Processor",
-"		14a4 2073  AU8810 Vortex Digital Audio Processor",
-"		14a4 2091  AU8810 Vortex Digital Audio Processor",
-"		14a4 2104  AU8810 Vortex Digital Audio Processor",
-"		14a4 2106  AU8810 Vortex Digital Audio Processor",
-"	8803  Vortex 56k Software Modem",
-"		12eb 8803  Vortex 56k Software Modem",
-"12ec  3A International, Inc.",
-"12ed  Optivision Inc.",
-"12ee  Orange Micro",
-"12ef  Vienna Systems",
-"12f0  Pentek",
-"12f1  Sorenson Vision Inc",
-"12f2  Gammagraphx, Inc.",
-"12f3  Radstone Technology",
-"12f4  Megatel",
-"12f5  Forks",
-"12f6  Dawson France",
-"12f7  Cognex",
-"12f8  Electronic Design GmbH",
-"	0002  VideoMaker",
-"12f9  Four Fold Ltd",
-"12fb  Spectrum Signal Processing",
-"	0001  PMC-MAI",
-"	00f5  F5 Dakar",
-"	02ad  PMC-2MAI",
-"	2adc  ePMC-2ADC",
-"	3100  PRO-3100",
-"	3500  PRO-3500",
-"	4d4f  Modena",
-"	8120  ePMC-8120",
-"	da62  Daytona C6201 PCI (Hurricane)",
-"	db62  Ingliston XBIF",
-"	dc62  Ingliston PLX9054",
-"	dd62  Ingliston JTAG/ISP",
-"	eddc  ePMC-MSDDC",
-"	fa01  ePMC-FPGA",
-"12fc  Capital Equipment Corp",
-"12fd  I2S",
-"12fe  ESD Electronic System Design GmbH",
-"12ff  Lexicon",
-"1300  Harman International Industries Inc",
-"1302  Computer Sciences Corp",
-"1303  Innovative Integration",
-"1304  Juniper Networks",
-"1305  Netphone, Inc",
-"1306  Duet Technologies",
-"1307  Measurement Computing",
-"	0001  PCI-DAS1602/16",
-"	000b  PCI-DIO48H",
-"	000c  PCI-PDISO8",
-"	000d  PCI-PDISO16",
-"	000f  PCI-DAS1200",
-"	0010  PCI-DAS1602/12",
-"	0014  PCI-DIO24H",
-"	0015  PCI-DIO24H/CTR3",
-"	0016  PCI-DIO48H/CTR15",
-"	0017  PCI-DIO96H",
-"	0018  PCI-CTR05",
-"	0019  PCI-DAS1200/JR",
-"	001a  PCI-DAS1001",
-"	001b  PCI-DAS1002",
-"	001c  PCI-DAS1602JR/16",
-"	001d  PCI-DAS6402/16",
-"	001e  PCI-DAS6402/12",
-"	001f  PCI-DAS16/M1",
-"	0020  PCI-DDA02/12",
-"	0021  PCI-DDA04/12",
-"	0022  PCI-DDA08/12",
-"	0023  PCI-DDA02/16",
-"	0024  PCI-DDA04/16",
-"	0025  PCI-DDA08/16",
-"	0026  PCI-DAC04/12-HS",
-"	0027  PCI-DAC04/16-HS",
-"	0028  PCI-DIO24",
-"	0029  PCI-DAS08",
-"	002c  PCI-INT32",
-"	0033  PCI-DUAL-AC5",
-"	0034  PCI-DAS-TC",
-"	0035  PCI-DAS64/M1/16",
-"	0036  PCI-DAS64/M2/16",
-"	0037  PCI-DAS64/M3/16",
-"	004c  PCI-DAS1000",
-"	004d  PCI-QUAD04",
-"	0052  PCI-DAS4020/12",
-"	0054  PCI-DIO96",
-"	005e  PCI-DAS6025",
-"1308  Jato Technologies Inc.",
-"	0001  NetCelerator Adapter",
-"		1308 0001  NetCelerator Adapter",
-"1309  AB Semiconductor Ltd",
-"130a  Mitsubishi Electric Microcomputer",
-"130b  Colorgraphic Communications Corp",
-"130c  Ambex Technologies, Inc",
-"130d  Accelerix Inc",
-"130e  Yamatake-Honeywell Co. Ltd",
-"130f  Advanet Inc",
-"1310  Gespac",
-"1311  Videoserver, Inc",
-"1312  Acuity Imaging, Inc",
-"1313  Yaskawa Electric Co.",
-"1316  Teradyne Inc",
-"1317  Linksys",
-"	0981  21x4x DEC-Tulip compatible 10/100 Ethernet",
-"	0985  NC100 Network Everywhere Fast Ethernet 10/100",
-"		1734 100c  Scenic N300 ADMtek AN983 10/100 Mbps PCI Adapter",
-"	1985  21x4x DEC-Tulip compatible 10/100 Ethernet",
-"	2850  HSP MicroModem 56",
-"	5120  ADMtek ADM5120 OpenGate System-on-Chip",
-"	8201  ADMtek ADM8211 802.11b Wireless Interface",
-"		10b8 2635  SMC2635W 802.11b (11Mbps) wireless lan pcmcia (cardbus) card",
-"		1317 8201  SMC2635W 802.11b (11mbps) wireless lan pcmcia (cardbus) card",
-"	8211  ADMtek ADM8211 802.11b Wireless Interface",
-"	9511  21x4x DEC-Tulip compatible 10/100 Ethernet",
-"1318  Packet Engines Inc.",
-"	0911  GNIC-II PCI Gigabit Ethernet [Hamachi]",
-"1319  Fortemedia, Inc",
-"	0801  Xwave QS3000A [FM801]",
-"		1319 1319  FM801 PCI Audio",
-"	0802  Xwave QS3000A [FM801 game port]",
-"		1319 1319  FM801 PCI Joystick",
-"	1000  FM801 PCI Audio",
-"	1001  FM801 PCI Joystick",
-"131a  Finisar Corp.",
-"131c  Nippon Electro-Sensory Devices Corp",
-"131d  Sysmic, Inc.",
-"131e  Xinex Networks Inc",
-"131f  Siig Inc",
-"	1000  CyberSerial (1-port) 16550",
-"	1001  CyberSerial (1-port) 16650",
-"	1002  CyberSerial (1-port) 16850",
-"	1010  Duet 1S(16550)+1P",
-"	1011  Duet 1S(16650)+1P",
-"	1012  Duet 1S(16850)+1P",
-"	1020  CyberParallel (1-port)",
-"	1021  CyberParallel (2-port)",
-"	1030  CyberSerial (2-port) 16550",
-"	1031  CyberSerial (2-port) 16650",
-"	1032  CyberSerial (2-port) 16850",
-"	1034  Trio 2S(16550)+1P",
-"	1035  Trio 2S(16650)+1P",
-"	1036  Trio 2S(16850)+1P",
-"	1050  CyberSerial (4-port) 16550",
-"	1051  CyberSerial (4-port) 16650",
-"	1052  CyberSerial (4-port) 16850",
-"	2000  CyberSerial (1-port) 16550",
-"	2001  CyberSerial (1-port) 16650",
-"	2002  CyberSerial (1-port) 16850",
-"	2010  Duet 1S(16550)+1P",
-"	2011  Duet 1S(16650)+1P",
-"	2012  Duet 1S(16850)+1P",
-"	2020  CyberParallel (1-port)",
-"	2021  CyberParallel (2-port)",
-"	2030  CyberSerial (2-port) 16550",
-"		131f 2030  PCI Serial Card",
-"	2031  CyberSerial (2-port) 16650",
-"	2032  CyberSerial (2-port) 16850",
-"	2040  Trio 1S(16550)+2P",
-"	2041  Trio 1S(16650)+2P",
-"	2042  Trio 1S(16850)+2P",
-"	2050  CyberSerial (4-port) 16550",
-"	2051  CyberSerial (4-port) 16650",
-"	2052  CyberSerial (4-port) 16850",
-"	2060  Trio 2S(16550)+1P",
-"	2061  Trio 2S(16650)+1P",
-"	2062  Trio 2S(16850)+1P",
-"	2081  CyberSerial (8-port) ST16654",
-"1320  Crypto AG",
-"1321  Arcobel Graphics BV",
-"1322  MTT Co., Ltd",
-"1323  Dome Inc",
-"1324  Sphere Communications",
-"1325  Salix Technologies, Inc",
-"1326  Seachange international",
-"1327  Voss scientific",
-"1328  quadrant international",
-"1329  Productivity Enhancement",
-"132a  Microcom Inc.",
-"132b  Broadband Technologies",
-"132c  Micrel Inc",
-"132d  Integrated Silicon Solution, Inc.",
-"1330  MMC Networks",
-"1331  Radisys Corp.",
-"	0030  ENP-2611",
-"	8200  82600 Host Bridge",
-"	8201  82600 IDE",
-"	8202  82600 USB",
-"	8210  82600 PCI Bridge",
-"1332  Micro Memory",
-"	5415  MM-5415CN PCI Memory Module with Battery Backup",
-"	5425  MM-5425CN PCI 64/66 Memory Module with Battery Backup",
-"	6140  MM-6140D",
-"1334  Redcreek Communications, Inc",
-"1335  Videomail, Inc",
-"1337  Third Planet Publishing",
-"1338  BT Electronics",
-"133a  Vtel Corp",
-"133b  Softcom Microsystems",
-"133c  Holontech Corp",
-"133d  SS Technologies",
-"133e  Virtual Computer Corp",
-"133f  SCM Microsystems",
-"1340  Atalla Corp",
-"1341  Kyoto Microcomputer Co",
-"1342  Promax Systems Inc",
-"1343  Phylon Communications Inc",
-"1344  Crucial Technology",
-"1345  Arescom Inc",
-"1347  Odetics",
-"1349  Sumitomo Electric Industries, Ltd.",
-"134a  DTC Technology Corp.",
-"	0001  Domex 536",
-"	0002  Domex DMX3194UP SCSI Adapter",
-"134b  ARK Research Corp.",
-"134c  Chori Joho System Co. Ltd",
-"134d  PCTel Inc",
-"	2189  HSP56 MicroModem",
-"	2486  2304WT V.92 MDC Modem",
-"	7890  HSP MicroModem 56",
-"		134d 0001  PCT789 adapter",
-"	7891  HSP MicroModem 56",
-"		134d 0001  HSP MicroModem 56",
-"	7892  HSP MicroModem 56",
-"	7893  HSP MicroModem 56",
-"	7894  HSP MicroModem 56",
-"	7895  HSP MicroModem 56",
-"	7896  HSP MicroModem 56",
-"	7897  HSP MicroModem 56",
-"134e  CSTI",
-"134f  Algo System Co Ltd",
-"1350  Systec Co. Ltd",
-"1351  Sonix Inc",
-"1353  Thales Idatys",
-"	0002  Proserver",
-"	0003  PCI-FUT",
-"	0004  PCI-S0",
-"	0005  PCI-FUT-S0",
-"1354  Dwave System Inc",
-"1355  Kratos Analytical Ltd",
-"1356  The Logical Co",
-"1359  Prisa Networks",
-"135a  Brain Boxes",
-"135b  Giganet Inc",
-"135c  Quatech Inc",
-"	0010  QSC-100",
-"	0020  DSC-100",
-"	0030  DSC-200/300",
-"	0040  QSC-200/300",
-"	0050  ESC-100D",
-"	0060  ESC-100M",
-"	00f0  MPAC-100 Syncronous Serial Card (Zilog 85230)",
-"	0170  QSCLP-100",
-"	0180  DSCLP-100",
-"	0190  SSCLP-100",
-"	01a0  QSCLP-200/300",
-"	01b0  DSCLP-200/300",
-"	01c0  SSCLP-200/300",
-"135d  ABB Network Partner AB",
-"135e  Sealevel Systems Inc",
-"	5101  Route 56.PCI - Multi-Protocol Serial Interface (Zilog Z16C32)",
-"	7101  Single Port RS-232/422/485/530",
-"	7201  Dual Port RS-232/422/485 Interface",
-"	7202  Dual Port RS-232 Interface",
-"	7401  Four Port RS-232 Interface",
-"	7402  Four Port RS-422/485 Interface",
-"	7801  Eight Port RS-232 Interface",
-"	7804  Eight Port RS-232/422/485 Interface",
-"	8001  8001 Digital I/O Adapter",
-"135f  I-Data International A-S",
-"1360  Meinberg Funkuhren",
-"	0101  PCI32 DCF77 Radio Clock",
-"	0102  PCI509 DCF77 Radio Clock",
-"	0103  PCI510 DCF77 Radio Clock",
-"	0104  PCI511 DCF77 Radio Clock",
-"	0201  GPS167PCI GPS Receiver",
-"	0202  GPS168PCI GPS Receiver",
-"	0203  GPS169PCI GPS Receiver",
-"	0204  GPS170PCI GPS Receiver",
-"	0301  TCR510PCI IRIG Timecode Reader",
-"	0302  TCR167PCI IRIG Timecode Reader",
-"1361  Soliton Systems K.K.",
-"1362  Fujifacom Corporation",
-"1363  Phoenix Technology Ltd",
-"1364  ATM Communications Inc",
-"1365  Hypercope GmbH",
-"1366  Teijin Seiki Co. Ltd",
-"1367  Hitachi Zosen Corporation",
-"1368  Skyware Corporation",
-"1369  Digigram",
-"136a  High Soft Tech",
-"136b  Kawasaki Steel Corporation",
-"	ff01  KL5A72002 Motion JPEG",
-"136c  Adtek System Science Co Ltd",
-"136d  Gigalabs Inc",
-"136f  Applied Magic Inc",
-"1370  ATL Products",
-"1371  CNet Technology Inc",
-"	434e  GigaCard Network Adapter",
-"		1371 434e  N-Way PCI-Bus Giga-Card 1000/100/10Mbps(L)",
-"1373  Silicon Vision Inc",
-"1374  Silicom Ltd.",
-"	0024  Silicom Dual port Giga Ethernet BGE Bypass Server Adapter",
-"	0025  Silicom Quad port Giga Ethernet BGE Bypass Server Adapter",
-"	0026  Silicom Dual port Fiber Giga Ethernet 546 Bypass Server Adapter",
-"	0027  Silicom Dual port Fiber LX Giga Ethernet 546 Bypass Server Adapter",
-"	0029  Silicom Dual port Copper Giga Ethernet 546GB Bypass Server Adapter",
-"	002a  Silicom Dual port Fiber Giga Ethernet 546 TAP/Bypass Server Adapter",
-"	002b  Silicom Dual port Copper Fast Ethernet 546 TAP/Bypass Server Adapter (PXE2TBI)",
-"	002c  Silicom Quad port Copper Giga Ethernet 546GB Bypass Server Adapter (PXG4BPI)",
-"	002d  Silicom Quad port Fiber-SX Giga Ethernet 546GB Bypass Server Adapter (PXG4BPFI)",
-"	002e  Silicom Quad port Fiber-LX Giga Ethernet 546GB Bypass Server Adapter (PXG4BPFI-LX)",
-"	002f  Silicom Dual port Fiber-SX Giga Ethernet 546GB Low profile Bypass Server Adapter (PXG2BPFIL)",
-"	0030  Silicom Dual port Fiber-LX Giga Ethernet 546GB Low profile Bypass Server Adapter",
-"	0031  Silicom Quad port Copper Giga Ethernet PCI-E Bypass Server Adapter",
-"	0032  Silicom Dual port Copper Fast Ethernet 546 TAP/Bypass Server Adapter",
-"	0034  Silicom Dual port Copper Giga Ethernet PCI-E BGE Bypass Server Adapter",
-"	0035  Silicom Quad port Copper Giga Ethernet PCI-E BGE Bypass Server Adapter",
-"	0036  Silicom Dual port Fiber Giga Ethernet PCI-E BGE Bypass Server Adapter",
-"	0037  Silicom Quad port Copper Ethernet PCI-E Intel based Bypass Server Adapter",
-"	0038  Silicom Quad port Copper Ethernet PCI-E Intel based Bypass Server Adapter",
-"	0039  Silicom Dual port Fiber-SX Ethernet PCI-E Intel based Bypass Server Adapter",
-"	003a  Silicom Dual port Fiber-LX Ethernet PCI-E Intel based Bypass Server Adapter",
-"1375  Argosystems Inc",
-"1376  LMC",
-"1377  Electronic Equipment Production & Distribution GmbH",
-"1378  Telemann Co. Ltd",
-"1379  Asahi Kasei Microsystems Co Ltd",
-"137a  Mark of the Unicorn Inc",
-"	0001  PCI-324 Audiowire Interface",
-"137b  PPT Vision",
-"137c  Iwatsu Electric Co Ltd",
-"137d  Dynachip Corporation",
-"137e  Patriot Scientific Corporation",
-"137f  Japan Satellite Systems Inc",
-"1380  Sanritz Automation Co Ltd",
-"1381  Brains Co. Ltd",
-"1382  Marian - Electronic & Software",
-"	0001  ARC88 audio recording card",
-"	2008  Prodif 96 Pro sound system",
-"	2048  Prodif Plus sound system",
-"	2088  Marc 8 Midi sound system",
-"	20c8  Marc A sound system",
-"	4008  Marc 2 sound system",
-"	4010  Marc 2 Pro sound system",
-"	4048  Marc 4 MIDI sound system",
-"	4088  Marc 4 Digi sound system",
-"	4248  Marc X sound system",
-"	4424  TRACE D4 Sound System",
-"1383  Controlnet Inc",
-"1384  Reality Simulation Systems Inc",
-"1385  Netgear",
-"	0013  WG311T 108 Mbps Wireless PCI Adapter",
-"	311a  GA511 Gigabit Ethernet",
-"	4100  802.11b Wireless Adapter (MA301)",
-"	4105  MA311 802.11b wireless adapter",
-"	4251  WG111T 108 Mbps Wireless USB 2.0 Adapter",
-"	4400  WAG511 802.11a/b/g Dual Band Wireless PC Card",
-"	4600  WAG511 802.11a/b/g Dual Band Wireless PC Card",
-"	4601  WAG511 802.11a/b/g Dual Band Wireless PC Card",
-"	4610  WAG511 802.11a/b/g Dual Band Wireless PC Card",
-"	4800  WG511(v1) 54 Mbps Wireless PC Card",
-"	4900  WG311v1 54 Mbps Wireless PCI Adapter",
-"	4a00  WAG311 802.11a/g Wireless PCI Adapter",
-"	4b00  WG511T 108 Mbps Wireless PC Card",
-"	4c00  WG311v2 54 Mbps Wireless PCI Adapter",
-"	4d00  WG311T 108 Mbps Wireless PCI Adapter",
-"	4e00  WG511v2 54 Mbps Wireless PC Card",
-"	4f00  WG511U Double 108 Mbps  Wireless PC Card",
-"	5200  GA511 Gigabit PC Card",
-"	620a  GA620 Gigabit Ethernet",
-"	622a  GA622",
-"	630a  GA630 Gigabit Ethernet",
-"	6b00  WG311v3 54 Mbps Wireless PCI Adapter",
-"	6d00  WPNT511 RangeMax 240 Mbps Wireless PC Card",
-"	f004  FA310TX",
-"1386  Video Domain Technologies",
-"1387  Systran Corp",
-"1388  Hitachi Information Technology Co Ltd",
-"1389  Applicom International",
-"	0001  PCI1500PFB [Intelligent fieldbus adaptor]",
-"138a  Fusion Micromedia Corp",
-"138b  Tokimec Inc",
-"138c  Silicon Reality",
-"138d  Future Techno Designs pte Ltd",
-"138e  Basler GmbH",
-"138f  Patapsco Designs Inc",
-"1390  Concept Development Inc",
-"1391  Development Concepts Inc",
-"1392  Medialight Inc",
-"1393  Moxa Technologies Co Ltd",
-"	1040  Smartio C104H/PCI",
-"	1141  Industrio CP-114",
-"	1680  Smartio C168H/PCI",
-"	2040  Intellio CP-204J",
-"	2180  Intellio C218 Turbo PCI",
-"	3200  Intellio C320 Turbo PCI",
-"1394  Level One Communications",
-"	0001  LXT1001 Gigabit Ethernet",
-"		1394 0001  NetCelerator Adapter",
-"1395  Ambicom Inc",
-"1396  Cipher Systems Inc",
-"1397  Cologne Chip Designs GmbH",
-"	08b4  ISDN network Controller [HFC-4S]",
-"		1397 b520  HFC-4S [IOB4ST]",
-"		1397 b540  HFC-4S [Swyx 4xS0 SX2 QuadBri]",
-"	16b8  ISDN network Controller [HFC-8S]",
-"	2bd0  ISDN network controller [HFC-PCI]",
-"		0675 1704  ISDN Adapter (PCI Bus, D, C)",
-"		0675 1708  ISDN Adapter (PCI Bus, D, C, ACPI)",
-"		1397 2bd0  ISDN Board",
-"		e4bf 1000  CI1-1-Harp",
-"1398  Clarion co. Ltd",
-"1399  Rios systems Co Ltd",
-"139a  Alacritech Inc",
-"	0001  Quad Port 10/100 Server Accelerator",
-"	0003  Single Port 10/100 Server Accelerator",
-"	0005  Single Port Gigabit Server Accelerator",
-"139b  Mediasonic Multimedia Systems Ltd",
-"139c  Quantum 3d Inc",
-"139d  EPL limited",
-"139e  Media4",
-"139f  Aethra s.r.l.",
-"13a0  Crystal Group Inc",
-"13a1  Kawasaki Heavy Industries Ltd",
-"13a2  Ositech Communications Inc",
-"13a3  Hifn Inc.",
-"	0005  7751 Security Processor",
-"	0006  6500 Public Key Processor",
-"	0007  7811 Security Processor",
-"	0012  7951 Security Processor",
-"	0014  78XX Security Processor",
-"	0016  8065 Security Processor",
-"	0017  8165 Security Processor",
-"	0018  8154 Security Processor",
-"	001d  7956 Security Processor",
-"	0020  7955 Security Processor",
-"	0026  8155 Security Processor",
-"13a4  Rascom Inc",
-"13a5  Audio Digital Imaging Inc",
-"13a6  Videonics Inc",
-"13a7  Teles AG",
-"13a8  Exar Corp.",
-"	0152  XR17C/D152 Dual PCI UART",
-"	0154  XR17C154 Quad UART",
-"	0158  XR17C158 Octal UART",
-"13a9  Siemens Medical Systems, Ultrasound Group",
-"13aa  Broadband Networks Inc",
-"13ab  Arcom Control Systems Ltd",
-"13ac  Motion Media Technology Ltd",
-"13ad  Nexus Inc",
-"13ae  ALD Technology Ltd",
-"13af  T.Sqware",
-"13b0  Maxspeed Corp",
-"13b1  Tamura corporation",
-"13b2  Techno Chips Co. Ltd",
-"13b3  Lanart Corporation",
-"13b4  Wellbean Co Inc",
-"13b5  ARM",
-"13b6  Dlog GmbH",
-"13b7  Logic Devices Inc",
-"13b8  Nokia Telecommunications oy",
-"13b9  Elecom Co Ltd",
-"13ba  Oxford Instruments",
-"13bb  Sanyo Technosound Co Ltd",
-"13bc  Bitran Corporation",
-"13bd  Sharp corporation",
-"13be  Miroku Jyoho Service Co. Ltd",
-"13bf  Sharewave Inc",
-"13c0  Microgate Corporation",
-"	0010  SyncLink Adapter v1",
-"	0020  SyncLink SCC Adapter",
-"	0030  SyncLink Multiport Adapter",
-"	0210  SyncLink Adapter v2",
-"13c1  3ware Inc",
-"	1000  5xxx/6xxx-series PATA-RAID",
-"	1001  7xxx/8xxx-series PATA/SATA-RAID",
-"		13c1 1001  7xxx/8xxx-series PATA/SATA-RAID",
-"	1002  9xxx-series SATA-RAID",
-"	1003  9550SX SATA-RAID",
-"13c2  Technotrend Systemtechnik GmbH",
-"	000e  Technotrend/Hauppauge DVB card rev2.3",
-"13c3  Janz Computer AG",
-"13c4  Phase Metrics",
-"13c5  Alphi Technology Corp",
-"13c6  Condor Engineering Inc",
-"	0520  CEI-520 A429 Card",
-"	0620  CEI-620 A429 Card",
-"	0820  CEI-820 A429 Card",
-"13c7  Blue Chip Technology Ltd",
-"13c8  Apptech Inc",
-"13c9  Eaton Corporation",
-"13ca  Iomega Corporation",
-"13cb  Yano Electric Co Ltd",
-"13cc  Metheus Corporation",
-"13cd  Compatible Systems Corporation",
-"13ce  Cocom A/S",
-"13cf  Studio Audio & Video Ltd",
-"13d0  Techsan Electronics Co Ltd",
-"	2103  B2C2 FlexCopII DVB chip / Technisat SkyStar2 DVB card",
-"	2200  B2C2 FlexCopIII DVB chip / Technisat SkyStar2 DVB card",
-"13d1  Abocom Systems Inc",
-"	ab02  ADMtek Centaur-C rev 17 [D-Link DFE-680TX] CardBus Fast Ethernet Adapter",
-"	ab03  21x4x DEC-Tulip compatible 10/100 Ethernet",
-"	ab06  RTL8139 [FE2000VX] CardBus Fast Ethernet Attached Port Adapter",
-"	ab08  21x4x DEC-Tulip compatible 10/100 Ethernet",
-"13d2  Shark Multimedia Inc",
-"13d3  IMC Networks",
-"13d4  Graphics Microsystems Inc",
-"13d5  Media 100 Inc",
-"13d6  K.I. Technology Co Ltd",
-"13d7  Toshiba Engineering Corporation",
-"13d8  Phobos corporation",
-"13d9  Apex PC Solutions Inc",
-"13da  Intresource Systems pte Ltd",
-"13db  Janich & Klass Computertechnik GmbH",
-"13dc  Netboost Corporation",
-"13dd  Multimedia Bundle Inc",
-"13de  ABB Robotics Products AB",
-"13df  E-Tech Inc",
-"	0001  PCI56RVP Modem",
-"		13df 0001  PCI56RVP Modem",
-"13e0  GVC Corporation",
-"13e1  Silicom Multimedia Systems Inc",
-"13e2  Dynamics Research Corporation",
-"13e3  Nest Inc",
-"13e4  Calculex Inc",
-"13e5  Telesoft Design Ltd",
-"13e6  Argosy research Inc",
-"13e7  NAC Incorporated",
-"13e8  Chip Express Corporation",
-"13e9  Intraserver Technology Inc",
-"13ea  Dallas Semiconductor",
-"13eb  Hauppauge Computer Works Inc",
-"13ec  Zydacron Inc",
-"	000a  NPC-RC01 Remote control receiver",
-"13ed  Raytheion E-Systems",
-"13ee  Hayes Microcomputer Products Inc",
-"13ef  Coppercom Inc",
-"13f0  Sundance Technology Inc / IC Plus Corp",
-"	0200  IC Plus IP100A Integrated 10/100 Ethernet MAC + PHY",
-"	0201  ST201 Sundance Ethernet",
-"	1023  IC Plus IP1000 Family Gigabit Ethernet",
-"13f1  Oce' - Technologies B.V.",
-"13f2  Ford Microelectronics Inc",
-"13f3  Mcdata Corporation",
-"13f4  Troika Networks, Inc.",
-"	1401  Zentai Fibre Channel Adapter",
-"13f5  Kansai Electric Co. Ltd",
-"13f6  C-Media Electronics Inc",
-"	0011  CMI8738",
-"	0100  CM8338A",
-"		13f6 ffff  CMI8338/C3DX PCI Audio Device",
-"	0101  CM8338B",
-"		13f6 0101  CMI8338-031 PCI Audio Device",
-"	0111  CM8738",
-"		1019 0970  P6STP-FL motherboard",
-"		1043 8035  CUSI-FX motherboard",
-"		1043 8077  CMI8738 6-channel audio controller",
-"		1043 80e2  CMI8738 6ch-MX",
-"		13f6 0111  CMI8738/C3DX PCI Audio Device",
-"		1681 a000  Gamesurround MUSE XL",
-"	0211  CM8738",
-"13f7  Wildfire Communications",
-"13f8  Ad Lib Multimedia Inc",
-"13f9  NTT Advanced Technology Corp.",
-"13fa  Pentland Systems Ltd",
-"13fb  Aydin Corp",
-"13fc  Computer Peripherals International",
-"13fd  Micro Science Inc",
-"13fe  Advantech Co. Ltd",
-"	1240  PCI-1240 4-channel stepper motor controller card",
-"	1600  PCI-1612 4-port RS-232/422/485 PCI communication card",
-"	1733  PCI-1733 32-channel isolated digital input card",
-"	1752  PCI-1752",
-"	1754  PCI-1754",
-"	1756  PCI-1756",
-"13ff  Silicon Spice Inc",
-"1400  Artx Inc",
-"	1401  9432 TX",
-"1401  CR-Systems A/S",
-"1402  Meilhaus Electronic GmbH",
-"1403  Ascor Inc",
-"1404  Fundamental Software Inc",
-"1405  Excalibur Systems Inc",
-"1406  Oce' Printing Systems GmbH",
-"1407  Lava Computer mfg Inc",
-"	0100  Lava Dual Serial",
-"	0101  Lava Quatro A",
-"	0102  Lava Quatro B",
-"	0110  Lava DSerial-PCI Port A",
-"	0111  Lava DSerial-PCI Port B",
-"	0120  Quattro-PCI A",
-"	0121  Quattro-PCI B",
-"	0180  Lava Octo A",
-"	0181  Lava Octo B",
-"	0200  Lava Port Plus",
-"	0201  Lava Quad A",
-"	0202  Lava Quad B",
-"	0220  Lava Quattro PCI Ports A/B",
-"	0221  Lava Quattro PCI Ports C/D",
-"	0500  Lava Single Serial",
-"	0600  Lava Port 650",
-"	8000  Lava Parallel",
-"	8001  Dual parallel port controller A",
-"	8002  Lava Dual Parallel port A",
-"	8003  Lava Dual Parallel port B",
-"	8800  BOCA Research IOPPAR",
-"1408  Aloka Co. Ltd",
-"1409  Timedia Technology Co Ltd",
-"	7168  PCI2S550 (Dual 16550 UART)",
-"140a  DSP Research Inc",
-"140b  Ramix Inc",
-"140c  Elmic Systems Inc",
-"140d  Matsushita Electric Works Ltd",
-"140e  Goepel Electronic GmbH",
-"140f  Salient Systems Corp",
-"1410  Midas lab Inc",
-"1411  Ikos Systems Inc",
-"1412  VIA Technologies Inc.",
-"	1712  ICE1712 [Envy24] PCI Multi-Channel I/O Controller",
-"		1412 1712  Hoontech ST Audio DSP 24",
-"		1412 d630  M-Audio Delta 1010",
-"		1412 d631  M-Audio Delta DiO",
-"		1412 d632  M-Audio Delta 66",
-"		1412 d633  M-Audio Delta 44",
-"		1412 d634  M-Audio Delta Audiophile",
-"		1412 d635  M-Audio Delta TDIF",
-"		1412 d637  M-Audio Delta RBUS",
-"		1412 d638  M-Audio Delta 410",
-"		1412 d63b  M-Audio Delta 1010LT",
-"		1412 d63c  Digigram VX442",
-"		1416 1712  Hoontech ST Audio DSP 24 Media 7.1",
-"		153b 1115  EWS88 MT",
-"		153b 1125  EWS88 MT (Master)",
-"		153b 112b  EWS88 D",
-"		153b 112c  EWS88 D (Master)",
-"		153b 1130  EWX 24/96",
-"		153b 1138  DMX 6fire 24/96",
-"		153b 1151  PHASE88",
-"		16ce 1040  Edirol DA-2496",
-"	1724  VT1720/24 [Envy24PT/HT] PCI Multi-Channel Audio Controller",
-"		1412 1724  Albatron PX865PE 7.1",
-"		1412 3630  M-Audio Revolution 7.1",
-"		1412 3631  M-Audio Revolution 5.1",
-"		153b 1145  Aureon 7.1 Space",
-"		153b 1147  Aureon 5.1 Sky",
-"		153b 1153  Aureon 7.1 Universe",
-"		270f f641  ZNF3-150",
-"		270f f645  ZNF3-250",
-"1413  Addonics",
-"1414  Microsoft Corporation",
-"1415  Oxford Semiconductor Ltd",
-"	8403  VScom 011H-EP1 1 port parallel adaptor",
-"	9501  OX16PCI954 (Quad 16950 UART) function 0",
-"		131f 2050  CyberPro (4-port)",
-"		131f 2051  CyberSerial 4S Plus",
-"		15ed 2000  MCCR Serial p0-3 of 8",
-"		15ed 2001  MCCR Serial p0-3 of 16",
-"	950a  EXSYS EX-41092 Dual 16950 Serial adapter",
-"	950b  OXCB950 Cardbus 16950 UART",
-"	9510  OX16PCI954 (Quad 16950 UART) function 1 (Disabled)",
-"	9511  OX16PCI954 (Quad 16950 UART) function 1",
-"		15ed 2000  MCCR Serial p4-7 of 8",
-"		15ed 2001  MCCR Serial p4-15 of 16",
-"	9521  OX16PCI952 (Dual 16950 UART)",
-"	9523  OX16PCI952 Integrated Parallel Port",
-"1416  Multiwave Innovation pte Ltd",
-"1417  Convergenet Technologies Inc",
-"1418  Kyushu electronics systems Inc",
-"1419  Excel Switching Corp",
-"141a  Apache Micro Peripherals Inc",
-"141b  Zoom Telephonics Inc",
-"141d  Digitan Systems Inc",
-"141e  Fanuc Ltd",
-"141f  Visiontech Ltd",
-"1420  Psion Dacom plc",
-"	8002  Gold Card NetGlobal 56k+10/100Mb CardBus (Ethernet part)",
-"	8003  Gold Card NetGlobal 56k+10/100Mb CardBus (Modem part)",
-"1421  Ads Technologies Inc",
-"1422  Ygrec Systems Co Ltd",
-"1423  Custom Technology Corp.",
-"1424  Videoserver Connections",
-"1425  Chelsio Communications Inc",
-"	000b  T210 Protocol Engine",
-"1426  Storage Technology Corp.",
-"1427  Better On-Line Solutions",
-"1428  Edec Co Ltd",
-"1429  Unex Technology Corp.",
-"142a  Kingmax Technology Inc",
-"142b  Radiolan",
-"142c  Minton Optic Industry Co Ltd",
-"142d  Pix stream Inc",
-"142e  Vitec Multimedia",
-"	4020  VM2-2 [Video Maker 2] MPEG1/2 Encoder",
-"	4337  VM2-2-C7 [Video Maker 2 rev. C7] MPEG1/2 Encoder",
-"142f  Radicom Research Inc",
-"1430  ITT Aerospace/Communications Division",
-"1431  Gilat Satellite Networks",
-"1432  Edimax Computer Co.",
-"	9130  RTL81xx Fast Ethernet",
-"1433  Eltec Elektronik GmbH",
-"1435  RTD Embedded Technologies, Inc.",
-"1436  CIS Technology Inc",
-"1437  Nissin Inc Co",
-"1438  Atmel-dream",
-"1439  Outsource Engineering & Mfg. Inc",
-"143a  Stargate Solutions Inc",
-"143b  Canon Research Center, America",
-"143c  Amlogic Inc",
-"143d  Tamarack Microelectronics Inc",
-"143e  Jones Futurex Inc",
-"143f  Lightwell Co Ltd - Zax Division",
-"1440  ALGOL Corp.",
-"1441  AGIE Ltd",
-"1442  Phoenix Contact GmbH & Co.",
-"1443  Unibrain S.A.",
-"1444  TRW",
-"1445  Logical DO Ltd",
-"1446  Graphin Co Ltd",
-"1447  AIM GmBH",
-"1448  Alesis Studio Electronics",
-"1449  TUT Systems Inc",
-"144a  Adlink Technology",
-"	7296  PCI-7296",
-"	7432  PCI-7432",
-"	7433  PCI-7433",
-"	7434  PCI-7434",
-"	7841  PCI-7841",
-"	8133  PCI-8133",
-"	8164  PCI-8164",
-"	8554  PCI-8554",
-"	9111  PCI-9111",
-"	9113  PCI-9113",
-"	9114  PCI-9114",
-"144b  Loronix Information Systems Inc",
-"144c  Catalina Research Inc",
-"144d  Samsung Electronics Co Ltd",
-"	c00c  P35 laptop",
-"144e  OLITEC",
-"144f  Askey Computer Corp.",
-"1450  Octave Communications Ind.",
-"1451  SP3D Chip Design GmBH",
-"1453  MYCOM Inc",
-"1454  Altiga Networks",
-"1455  Logic Plus Plus Inc",
-"1456  Advanced Hardware Architectures",
-"1457  Nuera Communications Inc",
-"1458  Giga-byte Technology",
-"	0c11  K8NS Pro Mainboard",
-"	e911  GN-WIAG02",
-"1459  DOOIN Electronics",
-"145a  Escalate Networks Inc",
-"145b  PRAIM SRL",
-"145c  Cryptek",
-"145d  Gallant Computer Inc",
-"145e  Aashima Technology B.V.",
-"145f  Baldor Electric Company",
-"	0001  NextMove PCI",
-"1460  DYNARC INC",
-"1461  Avermedia Technologies Inc",
-"	f436  AVerTV Hybrid+FM",
-"1462  Micro-Star International Co., Ltd.",
-"	5501  nVidia NV15DDR [GeForce2 Ti]",
-"	6819  Broadcom Corporation BCM4306 802.11b/g Wireless LAN Controller [MSI CB54G]",
-"	6825  PCI Card wireless 11g [PC54G]",
-"	6834  RaLink RT2500 802.11g [PC54G2]",
-"	7125  K8N motherboard",
-"	8725  NVIDIA NV25 [GeForce4 Ti 4600] VGA Adapter",
-"	9000  NVIDIA NV28 [GeForce4 Ti 4800] VGA Adapter",
-"	9110  GeFORCE FX5200",
-"	9119  NVIDIA NV31 [GeForce FX 5600XT] VGA Adapter",
-"	9123  NVIDIA NV31 [GeForce FX 5600] FX5600-VTDR128 [MS-8912]",
-"	9591  nVidia Corporation NV36 [GeForce FX 5700LE]",
-"1463  Fast Corporation",
-"1464  Interactive Circuits & Systems Ltd",
-"1465  GN NETTEST Telecom DIV.",
-"1466  Designpro Inc.",
-"1467  DIGICOM SPA",
-"1468  AMBIT Microsystem Corp.",
-"1469  Cleveland Motion Controls",
-"146a  IFR",
-"146b  Parascan Technologies Ltd",
-"146c  Ruby Tech Corp.",
-"	1430  FE-1430TX Fast Ethernet PCI Adapter",
-"146d  Tachyon, INC.",
-"146e  Williams Electronics Games, Inc.",
-"146f  Multi Dimensional Consulting Inc",
-"1470  Bay Networks",
-"1471  Integrated Telecom Express Inc",
-"1472  DAIKIN Industries, Ltd",
-"1473  ZAPEX Technologies Inc",
-"1474  Doug Carson & Associates",
-"1475  PICAZO Communications",
-"1476  MORTARA Instrument Inc",
-"1477  Net Insight",
-"1478  DIATREND Corporation",
-"1479  TORAY Industries Inc",
-"147a  FORMOSA Industrial Computing",
-"147b  ABIT Computer Corp.",
-"147c  AWARE, Inc.",
-"147d  Interworks Computer Products",
-"147e  Matsushita Graphic Communication Systems, Inc.",
-"147f  NIHON UNISYS, Ltd.",
-"1480  SCII Telecom",
-"1481  BIOPAC Systems Inc",
-"1482  ISYTEC - Integrierte Systemtechnik GmBH",
-"1483  LABWAY Corporation",
-"1484  Logic Corporation",
-"1485  ERMA - Electronic GmBH",
-"1486  L3 Communications Telemetry & Instrumentation",
-"1487  MARQUETTE Medical Systems",
-"1488  KONTRON Electronik GmBH",
-"1489  KYE Systems Corporation",
-"148a  OPTO",
-"148b  INNOMEDIALOGIC Inc.",
-"148c  C.P. Technology Co. Ltd",
-"148d  DIGICOM Systems, Inc.",
-"	1003  HCF 56k Data/Fax Modem",
-"148e  OSI Plus Corporation",
-"148f  Plant Equipment, Inc.",
-"1490  Stone Microsystems PTY Ltd.",
-"1491  ZEAL Corporation",
-"1492  Time Logic Corporation",
-"1493  MAKER Communications",
-"1494  WINTOP Technology, Inc.",
-"1495  TOKAI Communications Industry Co. Ltd",
-"1496  JOYTECH Computer Co., Ltd.",
-"1497  SMA Regelsysteme GmBH",
-"	1497  SMA Technologie AG",
-"1498  TEWS Datentechnik GmBH",
-"	0330  TPMC816 2 Channel CAN bus controller.",
-"	0385  TPMC901 Extended CAN bus with 2/4/6 CAN controller",
-"	21cd  TCP461 CompactPCI 8 Channel Serial Interface RS232/RS422",
-"	30c8  TPCI200",
-"1499  EMTEC CO., Ltd",
-"149a  ANDOR Technology Ltd",
-"149b  SEIKO Instruments Inc",
-"149c  OVISLINK Corp.",
-"149d  NEWTEK Inc",
-"	0001  Video Toaster for PC",
-"149e  Mapletree Networks Inc.",
-"149f  LECTRON Co Ltd",
-"14a0  SOFTING GmBH",
-"14a1  Systembase Co Ltd",
-"14a2  Millennium Engineering Inc",
-"14a3  Maverick Networks",
-"14a4  GVC/BCM Advanced Research",
-"14a5  XIONICS Document Technologies Inc",
-"14a6  INOVA Computers GmBH & Co KG",
-"14a7  MYTHOS Systems Inc",
-"14a8  FEATRON Technologies Corporation",
-"14a9  HIVERTEC Inc",
-"14aa  Advanced MOS Technology Inc",
-"14ab  Mentor Graphics Corp.",
-"14ac  Novaweb Technologies Inc",
-"14ad  Time Space Radio AB",
-"14ae  CTI, Inc",
-"14af  Guillemot Corporation",
-"	7102  3D Prophet II MX",
-"14b0  BST Communication Technology Ltd",
-"14b1  Nextcom K.K.",
-"14b2  ENNOVATE Networks Inc",
-"14b3  XPEED Inc",
-"	0000  DSL NIC",
-"14b4  PHILIPS Business Electronics B.V.",
-"14b5  Creamware GmBH",
-"	0200  Scope",
-"	0300  Pulsar",
-"	0400  PulsarSRB",
-"	0600  Pulsar2",
-"	0800  DSP-Board",
-"	0900  DSP-Board",
-"	0a00  DSP-Board",
-"	0b00  DSP-Board",
-"14b6  Quantum Data Corp.",
-"14b7  PROXIM Inc",
-"	0001  Symphony 4110",
-"14b8  Techsoft Technology Co Ltd",
-"14b9  AIRONET Wireless Communications",
-"	0001  PC4800",
-"	0340  PC4800",
-"	0350  PC4800",
-"	4500  PC4500",
-"	4800  Cisco Aironet 340 802.11b Wireless LAN Adapter/Aironet PC4800",
-"	a504  Cisco Aironet Wireless 802.11b",
-"	a505  Cisco Aironet CB20a 802.11a Wireless LAN Adapter",
-"	a506  Cisco Aironet Mini PCI b/g",
-"14ba  INTERNIX Inc.",
-"14bb  SEMTECH Corporation",
-"14bc  Globespan Semiconductor Inc.",
-"14bd  CARDIO Control N.V.",
-"14be  L3 Communications",
-"14bf  SPIDER Communications Inc.",
-"14c0  COMPAL Electronics Inc",
-"14c1  MYRICOM Inc.",
-"	0008  Myri-10G Dual-Protocol Interconnect",
-"	8043  Myrinet 2000 Scalable Cluster Interconnect",
-"14c2  DTK Computer",
-"14c3  MEDIATEK Corp.",
-"14c4  IWASAKI Information Systems Co Ltd",
-"14c5  Automation Products AB",
-"14c6  Data Race Inc",
-"14c7  Modular Technology Holdings Ltd",
-"14c8  Turbocomm Tech. Inc.",
-"14c9  ODIN Telesystems Inc",
-"14ca  PE Logic Corp.",
-"14cb  Billionton Systems Inc",
-"14cc  NAKAYO Telecommunications Inc",
-"14cd  Universal Scientific Ind.",
-"14ce  Whistle Communications",
-"14cf  TEK Microsystems Inc.",
-"14d0  Ericsson Axe R & D",
-"14d1  Computer Hi-Tech Co Ltd",
-"14d2  Titan Electronics Inc",
-"	8001  VScom 010L 1 port parallel adaptor",
-"	8002  VScom 020L 2 port parallel adaptor",
-"	8010  VScom 100L 1 port serial adaptor",
-"	8011  VScom 110L 1 port serial and 1 port parallel adaptor",
-"	8020  VScom 200L 1 port serial adaptor",
-"	8021  VScom 210L 2 port serial and 1 port parallel adaptor",
-"	8040  VScom 400L 4 port serial adaptor",
-"	8080  VScom 800L 8 port serial adaptor",
-"	a000  VScom 010H 1 port parallel adaptor",
-"	a001  VScom 100H 1 port serial adaptor",
-"	a003  VScom 400H 4 port serial adaptor",
-"	a004  VScom 400HF1 4 port serial adaptor",
-"	a005  VScom 200H 2 port serial adaptor",
-"	e001  VScom 010HV2 1 port parallel adaptor",
-"	e010  VScom 100HV2 1 port serial adaptor",
-"	e020  VScom 200HV2 2 port serial adaptor",
-"14d3  CIRTECH (UK) Ltd",
-"14d4  Panacom Technology Corp",
-"14d5  Nitsuko Corporation",
-"14d6  Accusys Inc",
-"14d7  Hirakawa Hewtech Corp",
-"14d8  HOPF Elektronik GmBH",
-"14d9  Alliance Semiconductor Corporation",
-"	0010  AP1011/SP1011 HyperTransport-PCI Bridge [Sturgeon]",
-"	9000  AS90L10204/10208 HyperTransport to PCI-X Bridge",
-"14da  National Aerospace Laboratories",
-"14db  AFAVLAB Technology Inc",
-"	2120  TK9902",
-"	2182  AFAVLAB Technology Inc. 8-port serial card",
-"14dc  Amplicon Liveline Ltd",
-"	0000  PCI230",
-"	0001  PCI242",
-"	0002  PCI244",
-"	0003  PCI247",
-"	0004  PCI248",
-"	0005  PCI249",
-"	0006  PCI260",
-"	0007  PCI224",
-"	0008  PCI234",
-"	0009  PCI236",
-"	000a  PCI272",
-"	000b  PCI215",
-"14dd  Boulder Design Labs Inc",
-"14de  Applied Integration Corporation",
-"14df  ASIC Communications Corp",
-"14e1  INVERTEX",
-"14e2  INFOLIBRIA",
-"14e3  AMTELCO",
-"14e4  Broadcom Corporation",
-"	0800  Sentry5 Chipcommon I/O Controller",
-"	0804  Sentry5 PCI Bridge",
-"	0805  Sentry5 MIPS32 CPU",
-"	0806  Sentry5 Ethernet Controller",
-"	080b  Sentry5 Crypto Accelerator",
-"	080f  Sentry5 DDR/SDR RAM Controller",
-"	0811  Sentry5 External Interface Core",
-"	0816  BCM3302 Sentry5 MIPS32 CPU",
-"	1600  NetXtreme BCM5752 Gigabit Ethernet PCI Express",
-"	1601  NetXtreme BCM5752M Gigabit Ethernet PCI Express",
-"	1644  NetXtreme BCM5700 Gigabit Ethernet",
-"		1014 0277  Broadcom Vigil B5700 1000Base-T",
-"		1028 00d1  Broadcom BCM5700",
-"		1028 0106  Broadcom BCM5700",
-"		1028 0109  Broadcom BCM5700 1000Base-T",
-"		1028 010a  Broadcom BCM5700 1000BaseTX",
-"		10b7 1000  3C996-T 1000Base-T",
-"		10b7 1001  3C996B-T 1000Base-T",
-"		10b7 1002  3C996C-T 1000Base-T",
-"		10b7 1003  3C997-T 1000Base-T Dual Port",
-"		10b7 1004  3C996-SX 1000Base-SX",
-"		10b7 1005  3C997-SX 1000Base-SX Dual Port",
-"		10b7 1008  3C942 Gigabit LOM (31X31)",
-"		14e4 0002  NetXtreme 1000Base-SX",
-"		14e4 0003  NetXtreme 1000Base-SX",
-"		14e4 0004  NetXtreme 1000Base-T",
-"		14e4 1028  NetXtreme 1000BaseTX",
-"		14e4 1644  BCM5700 1000Base-T",
-"	1645  NetXtreme BCM5701 Gigabit Ethernet",
-"		0e11 007c  NC7770 Gigabit Server Adapter (PCI-X, 10/100/1000-T)",
-"		0e11 007d  NC6770 Gigabit Server Adapter (PCI-X, 1000-SX)",
-"		0e11 0085  NC7780 Gigabit Server Adapter (embedded, WOL)",
-"		0e11 0099  NC7780 Gigabit Server Adapter (embedded, WOL)",
-"		0e11 009a  NC7770 Gigabit Server Adapter (PCI-X, 10/100/1000-T)",
-"		0e11 00c1  NC6770 Gigabit Server Adapter (PCI-X, 1000-SX)",
-"		1028 0121  Broadcom BCM5701 1000Base-T",
-"		103c 128a  1000Base-T (PCI) [A7061A]",
-"		103c 128b  1000Base-SX (PCI) [A7073A]",
-"		103c 12a4  Core Lan 1000Base-T",
-"		103c 12c1  IOX Core Lan 1000Base-T [A7109AX]",
-"		103c 1300  Core LAN/SCSI Combo [A6794A]",
-"		10a9 8010  IO9/IO10 Gigabit Ethernet (Copper)",
-"		10a9 8011  Gigabit Ethernet (Copper)",
-"		10a9 8012  Gigabit Ethernet (Fiber)",
-"		10b7 1004  3C996-SX 1000Base-SX",
-"		10b7 1006  3C996B-T 1000Base-T",
-"		10b7 1007  3C1000-T 1000Base-T",
-"		10b7 1008  3C940-BR01 1000Base-T",
-"		14e4 0001  BCM5701 1000Base-T",
-"		14e4 0005  BCM5701 1000Base-T",
-"		14e4 0006  BCM5701 1000Base-T",
-"		14e4 0007  BCM5701 1000Base-SX",
-"		14e4 0008  BCM5701 1000Base-T",
-"		14e4 8008  BCM5701 1000Base-T",
-"	1646  NetXtreme BCM5702 Gigabit Ethernet",
-"		0e11 00bb  NC7760 1000BaseTX",
-"		1028 0126  Broadcom BCM5702 1000BaseTX",
-"		14e4 8009  BCM5702 1000BaseTX",
-"	1647  NetXtreme BCM5703 Gigabit Ethernet",
-"		0e11 0099  NC7780 1000BaseTX",
-"		0e11 009a  NC7770 1000BaseTX",
-"		10a9 8010  SGI IO9 Gigabit Ethernet (Copper)",
-"		14e4 0009  BCM5703 1000BaseTX",
-"		14e4 000a  BCM5703 1000BaseSX",
-"		14e4 000b  BCM5703 1000BaseTX",
-"		14e4 8009  BCM5703 1000BaseTX",
-"		14e4 800a  BCM5703 1000BaseTX",
-"	1648  NetXtreme BCM5704 Gigabit Ethernet",
-"		0e11 00cf  NC7772 Gigabit Server Adapter (PCI-X, 10,100,1000-T)",
-"		0e11 00d0  NC7782 Gigabit Server Adapter (PCI-X, 10,100,1000-T)",
-"		0e11 00d1  NC7783 Gigabit Server Adapter (PCI-X, 10,100,1000-T)",
-"		10b7 2000  3C998-T Dual Port 10/100/1000 PCI-X",
-"		10b7 3000  3C999-T Quad Port 10/100/1000 PCI-X",
-"		1166 1648  NetXtreme CIOB-E 1000Base-T",
-"		1734 100b  Primergy RX300",
-"	164a  NetXtreme II BCM5706 Gigabit Ethernet",
-"		103c 3101  NC370T MultifuNCtion Gigabit Server Adapter",
-"	164c  NetXtreme II BCM5708 Gigabit Ethernet",
-"	164d  NetXtreme BCM5702FE Gigabit Ethernet",
-"	1653  NetXtreme BCM5705 Gigabit Ethernet",
-"		0e11 00e3  NC7761 Gigabit Server Adapter",
-"	1654  NetXtreme BCM5705_2 Gigabit Ethernet",
-"		0e11 00e3  NC7761 Gigabit Server Adapter",
-"		103c 3100  NC1020 HP ProLiant Gigabit Server Adapter 32 PCI",
-"		103c 3226  NC150T 4-port Gigabit Combo Switch & Adapter",
-"	1659  NetXtreme BCM5721 Gigabit Ethernet PCI Express",
-"		1014 02c6  eServer xSeries server mainboard",
-"		103c 7031  NC320T PCIe Gigabit Server Adapter",
-"		103c 7032  NC320i PCIe Gigabit Server Adapter",
-"		1734 1061  Primergy RX300 S2",
-"	165d  NetXtreme BCM5705M Gigabit Ethernet",
-"		1028 865d  Latitude D400",
-"	165e  NetXtreme BCM5705M_2 Gigabit Ethernet",
-"		103c 088c  NC8000 laptop",
-"		103c 0890  NC6000 laptop",
-"		103c 099c  NX6110/NC6120",
-"	1668  NetXtreme BCM5714 Gigabit Ethernet",
-"		103c 7039  NC324i PCIe Dual Port Gigabit Server Adapter",
-"	1669  NetXtreme 5714S Gigabit Ethernet",
-"	166a  NetXtreme BCM5780 Gigabit Ethernet",
-"	166b  NetXtreme BCM5780S Gigabit Ethernet",
-"	166e  570x 10/100 Integrated Controller",
-"	1672  NetXtreme BCM5754M Gigabit Ethernet PCI Express",
-"	1673  NetXtreme BCM5755M Gigabit Ethernet PCI Express",
-"	1677  NetXtreme BCM5751 Gigabit Ethernet PCI Express",
-"		1028 0179  Optiplex GX280",
-"		1028 0182  Latitude D610",
-"		1028 0187  Precision M70",
-"		1028 01ad  Optiplex GX620",
-"		103c 3006  DC7100 SFF(DX878AV)",
-"		1734 105d  Scenic W620",
-"	1678  NetXtreme BCM5715 Gigabit Ethernet",
-"	1679  NetXtreme 5715S Gigabit Ethernet",
-"		103c 703c  NC326i PCIe Dual Port Gigabit Server Adapter",
-"	167a  NetXtreme BCM5754 Gigabit Ethernet PCI Express",
-"	167b  NetXtreme BCM5755 Gigabit Ethernet PCI Express",
-"	167d  NetXtreme BCM5751M Gigabit Ethernet PCI Express",
-"	167e  NetXtreme BCM5751F Fast Ethernet PCI Express",
-"	1693  NetLink BCM5787M Gigabit Ethernet PCI Express",
-"	1696  NetXtreme BCM5782 Gigabit Ethernet",
-"		103c 12bc  HP d530 CMT (DG746A)",
-"		14e4 000d  NetXtreme BCM5782 1000Base-T",
-"	169b  NetLink BCM5787 Gigabit Ethernet PCI Express",
-"	169c  NetXtreme BCM5788 Gigabit Ethernet",
-"		103c 308b  MX6125",
-"	169d  NetLink BCM5789 Gigabit Ethernet PCI Express",
-"	16a6  NetXtreme BCM5702X Gigabit Ethernet",
-"		0e11 00bb  NC7760 Gigabit Server Adapter (PCI-X, 10/100/1000-T)",
-"		1028 0126  BCM5702 1000Base-T",
-"		14e4 000c  BCM5702 1000Base-T",
-"		14e4 8009  BCM5702 1000Base-T",
-"	16a7  NetXtreme BCM5703X Gigabit Ethernet",
-"		0e11 00ca  NC7771 Gigabit Server Adapter (PCI-X, 10,100,1000-T)",
-"		0e11 00cb  NC7781 Gigabit Server Adapter (PCI-X, 10,100,1000-T)",
-"		14e4 0009  NetXtreme BCM5703 1000Base-T",
-"		14e4 000a  NetXtreme BCM5703 1000Base-SX",
-"		14e4 000b  NetXtreme BCM5703 1000Base-T",
-"		14e4 800a  NetXtreme BCM5703 1000Base-T",
-"	16a8  NetXtreme BCM5704S Gigabit Ethernet",
-"		10b7 2001  3C998-SX Dual Port 1000-SX PCI-X",
-"	16aa  NetXtreme II BCM5706S Gigabit Ethernet",
-"		103c 3102  NC370F MultifuNCtion Gigabit Server Adapter",
-"	16ac  NetXtreme II BCM5708S Gigabit Ethernet",
-"	16c6  NetXtreme BCM5702A3 Gigabit Ethernet",
-"		10b7 1100  3C1000B-T 10/100/1000 PCI",
-"		14e4 000c  BCM5702 1000Base-T",
-"		14e4 8009  BCM5702 1000Base-T",
-"	16c7  NetXtreme BCM5703 Gigabit Ethernet",
-"		0e11 00ca  NC7771 Gigabit Server Adapter (PCI-X, 10,100,1000-T)",
-"		0e11 00cb  NC7781 Gigabit Server Adapter (PCI-X, 10,100,1000-T)",
-"		103c 12c3  Combo FC/GigE-SX [A9782A]",
-"		103c 12ca  Combo FC/GigE-T [A9784A]",
-"		14e4 0009  NetXtreme BCM5703 1000Base-T",
-"		14e4 000a  NetXtreme BCM5703 1000Base-SX",
-"	16dd  NetLink BCM5781 Gigabit Ethernet PCI Express",
-"	16f7  NetXtreme BCM5753 Gigabit Ethernet PCI Express",
-"	16fd  NetXtreme BCM5753M Gigabit Ethernet PCI Express",
-"	16fe  NetXtreme BCM5753F Fast Ethernet PCI Express",
-"	170c  BCM4401-B0 100Base-TX",
-"		1028 0188  Inspiron 6000 laptop",
-"		1028 0196  Inspiron 5160",
-"		103c 099c  NX6110/NC6120",
-"	170d  NetXtreme BCM5901 100Base-TX",
-"		1014 0545  ThinkPad R40e (2684-HVG) builtin ethernet controller",
-"	170e  NetXtreme BCM5901 100Base-TX",
-"	3352  BCM3352",
-"	3360  BCM3360",
-"	4210  BCM4210 iLine10 HomePNA 2.0",
-"	4211  BCM4211 iLine10 HomePNA 2.0 + V.90 56k modem",
-"	4212  BCM4212 v.90 56k modem",
-"	4301  BCM4303 802.11b Wireless LAN Controller",
-"		1028 0407  TrueMobile 1180 Onboard WLAN",
-"		1043 0120  WL-103b Wireless LAN PC Card",
-"	4305  BCM4307 V.90 56k Modem",
-"	4306  BCM4307 Ethernet Controller",
-"	4307  BCM4307 802.11b Wireless LAN Controller",
-"	4310  BCM4310 Chipcommon I/OController",
-"	4312  BCM4310 UART",
-"	4313  BCM4310 Ethernet Controller",
-"	4315  BCM4310 USB Controller",
-"	4318  BCM4318 [AirForce One 54g] 802.11g Wireless LAN Controller",
-"		103c 1356  MX6125",
-"		1043 120f  A6U notebook embedded card",
-"		1468 0311  Aspire 3022WLMi, 5024WLMi",
-"		1468 0312  TravelMate 2410",
-"		14e4 0449  Gateway 7510GX",
-"		14e4 4318  WPC54G version 3 [Wireless-G Notebook Adapter] 802.11g Wireless Lan Controller",
-"		16ec 0119  U.S.Robotics Wireless MAXg PC Card",
-"		1737 0048  WPC54G-EU version 3 [Wireless-G Notebook Adapter]",
-"	4319  Dell Wireless 1470 DualBand WLAN",
-"	4320  BCM4306 802.11b/g Wireless LAN Controller",
-"		1028 0001  TrueMobile 1300 WLAN Mini-PCI Card",
-"		1028 0003  Wireless 1350 WLAN Mini-PCI Card",
-"		103c 12f4  NX9500 Built-in Wireless",
-"		103c 12fa  Presario R3000 802.11b/g",
-"		1043 100f  WL-100G",
-"		1057 7025  WN825G",
-"		106b 004e  AirPort Extreme",
-"		1154 0330  Buffalo WLI2-PCI-G54S High Speed Mode Wireless Desktop Adapter",
-"		144f 7050  eMachines M6805 802.11g Built-in Wireless",
-"		14e4 4320  Linksys WMP54G PCI",
-"		1737 4320  WPC54G",
-"		1799 7001  Belkin F5D7001 High-Speed Mode Wireless G Network Card",
-"		1799 7010  Belkin F5D7010 54g Wireless Network card",
-"		185f 1220  TravelMate 290E WLAN Mini-PCI Card",
-"	4321  BCM4306 802.11a Wireless LAN Controller",
-"	4322  BCM4306 UART",
-"	4324  BCM4309 802.11a/b/g",
-"		1028 0001  Truemobile 1400",
-"		1028 0003  Truemobile 1450 MiniPCI",
-"	4325  BCM43xG 802.11b/g",
-"		1414 0003  Wireless Notebook Adapter MN-720",
-"		1414 0004  Wireless PCI Adapter MN-730",
-"	4326  BCM4307 Chipcommon I/O Controller\?",
-"	4401  BCM4401 100Base-T",
-"		1043 80a8  A7V8X motherboard",
-"	4402  BCM4402 Integrated 10/100BaseT",
-"	4403  BCM4402 V.90 56k Modem",
-"	4410  BCM4413 iLine32 HomePNA 2.0",
-"	4411  BCM4413 V.90 56k modem",
-"	4412  BCM4412 10/100BaseT",
-"	4430  BCM44xx CardBus iLine32 HomePNA 2.0",
-"	4432  BCM4432 CardBus 10/100BaseT",
-"	4610  BCM4610 Sentry5 PCI to SB Bridge",
-"	4611  BCM4610 Sentry5 iLine32 HomePNA 1.0",
-"	4612  BCM4610 Sentry5 V.90 56k Modem",
-"	4613  BCM4610 Sentry5 Ethernet Controller",
-"	4614  BCM4610 Sentry5 External Interface",
-"	4615  BCM4610 Sentry5 USB Controller",
-"	4704  BCM4704 PCI to SB Bridge",
-"	4705  BCM4704 Sentry5 802.11b Wireless LAN Controller",
-"	4706  BCM4704 Sentry5 Ethernet Controller",
-"	4707  BCM4704 Sentry5 USB Controller",
-"	4708  BCM4704 Crypto Accelerator",
-"	4710  BCM4710 Sentry5 PCI to SB Bridge",
-"	4711  BCM47xx Sentry5 iLine32 HomePNA 2.0",
-"	4712  BCM47xx V.92 56k modem",
-"	4713  Sentry5 Ethernet Controller",
-"	4714  BCM47xx Sentry5 External Interface",
-"	4715  Sentry5 USB Controller",
-"	4716  BCM47xx Sentry5 USB Host Controller",
-"	4717  BCM47xx Sentry5 USB Device Controller",
-"	4718  Sentry5 Crypto Accelerator",
-"	4719  BCM47xx/53xx RoboSwitch Core",
-"	4720  BCM4712 MIPS CPU",
-"	5365  BCM5365P Sentry5 Host Bridge",
-"	5600  BCM5600 StrataSwitch 24+2 Ethernet Switch Controller",
-"	5605  BCM5605 StrataSwitch 24+2 Ethernet Switch Controller",
-"	5615  BCM5615 StrataSwitch 24+2 Ethernet Switch Controller",
-"	5625  BCM5625 StrataSwitch 24+2 Ethernet Switch Controller",
-"	5645  BCM5645 StrataSwitch 24+2 Ethernet Switch Controller",
-"	5670  BCM5670 8-Port 10GE Ethernet Switch Fabric",
-"	5680  BCM5680 G-Switch 8 Port Gigabit Ethernet Switch Controller",
-"	5690  BCM5690 12-port Multi-Layer Gigabit Ethernet Switch",
-"	5691  BCM5691 GE/10GE 8+2 Gigabit Ethernet Switch Controller",
-"	5692  BCM5692 12-port Multi-Layer Gigabit Ethernet Switch",
-"	5820  BCM5820 Crypto Accelerator",
-"	5821  BCM5821 Crypto Accelerator",
-"	5822  BCM5822 Crypto Accelerator",
-"	5823  BCM5823 Crypto Accelerator",
-"	5824  BCM5824 Crypto Accelerator",
-"	5840  BCM5840 Crypto Accelerator",
-"	5841  BCM5841 Crypto Accelerator",
-"	5850  BCM5850 Crypto Accelerator",
-"14e5  Pixelfusion Ltd",
-"14e6  SHINING Technology Inc",
-"14e7  3CX",
-"14e8  RAYCER Inc",
-"14e9  GARNETS System CO Ltd",
-"14ea  Planex Communications, Inc",
-"	ab06  FNW-3603-TX CardBus Fast Ethernet",
-"	ab07  RTL81xx RealTek Ethernet",
-"	ab08  FNW-3602-TX CardBus Fast Ethernet",
-"14eb  SEIKO EPSON Corp",
-"14ec  ACQIRIS",
-"14ed  DATAKINETICS Ltd",
-"14ee  MASPRO KENKOH Corp",
-"14ef  CARRY Computer ENG. CO Ltd",
-"14f0  CANON RESEACH CENTRE FRANCE",
-"14f1  Conexant",
-"	1002  HCF 56k Modem",
-"	1003  HCF 56k Modem",
-"	1004  HCF 56k Modem",
-"	1005  HCF 56k Modem",
-"	1006  HCF 56k Modem",
-"	1022  HCF 56k Modem",
-"	1023  HCF 56k Modem",
-"	1024  HCF 56k Modem",
-"	1025  HCF 56k Modem",
-"	1026  HCF 56k Modem",
-"	1032  HCF 56k Modem",
-"	1033  HCF 56k Data/Fax Modem",
-"		1033 8077  NEC",
-"		122d 4027  Dell Zeus - MDP3880-W(B) Data Fax Modem",
-"		122d 4030  Dell Mercury - MDP3880-U(B) Data Fax Modem",
-"		122d 4034  Dell Thor - MDP3880-W(U) Data Fax Modem",
-"		13e0 020d  Dell Copper",
-"		13e0 020e  Dell Silver",
-"		13e0 0261  IBM",
-"		13e0 0290  Compaq Goldwing",
-"		13e0 02a0  IBM",
-"		13e0 02b0  IBM",
-"		13e0 02c0  Compaq Scooter",
-"		13e0 02d0  IBM",
-"		144f 1500  IBM P85-DF (1)",
-"		144f 1501  IBM P85-DF (2)",
-"		144f 150a  IBM P85-DF (3)",
-"		144f 150b  IBM P85-DF Low Profile (1)",
-"		144f 1510  IBM P85-DF Low Profile (2)",
-"	1034  HCF 56k Data/Fax/Voice Modem",
-"	1035  HCF 56k Data/Fax/Voice/Spkp (w/Handset) Modem",
-"		10cf 1098  Fujitsu P85-DFSV",
-"	1036  HCF 56k Data/Fax/Voice/Spkp Modem",
-"		104d 8067  HCF 56k Modem",
-"		122d 4029  MDP3880SP-W",
-"		122d 4031  MDP3880SP-U",
-"		13e0 0209  Dell Titanium",
-"		13e0 020a  Dell Graphite",
-"		13e0 0260  Gateway Red Owl",
-"		13e0 0270  Gateway White Horse",
-"	1052  HCF 56k Data/Fax Modem (Worldwide)",
-"	1053  HCF 56k Data/Fax Modem (Worldwide)",
-"	1054  HCF 56k Data/Fax/Voice Modem (Worldwide)",
-"	1055  HCF 56k Data/Fax/Voice/Spkp (w/Handset) Modem (Worldwide)",
-"	1056  HCF 56k Data/Fax/Voice/Spkp Modem (Worldwide)",
-"	1057  HCF 56k Data/Fax/Voice/Spkp Modem (Worldwide)",
-"	1059  HCF 56k Data/Fax/Voice Modem (Worldwide)",
-"	1063  HCF 56k Data/Fax Modem",
-"	1064  HCF 56k Data/Fax/Voice Modem",
-"	1065  HCF 56k Data/Fax/Voice/Spkp (w/Handset) Modem",
-"	1066  HCF 56k Data/Fax/Voice/Spkp Modem",
-"		122d 4033  Dell Athena - MDP3900V-U",
-"	1085  HCF V90 56k Data/Fax/Voice/Spkp PCI Modem",
-"	1433  HCF 56k Data/Fax Modem",
-"	1434  HCF 56k Data/Fax/Voice Modem",
-"	1435  HCF 56k Data/Fax/Voice/Spkp (w/Handset) Modem",
-"	1436  HCF 56k Data/Fax Modem",
-"	1453  HCF 56k Data/Fax Modem",
-"		13e0 0240  IBM",
-"		13e0 0250  IBM",
-"		144f 1502  IBM P95-DF (1)",
-"		144f 1503  IBM P95-DF (2)",
-"	1454  HCF 56k Data/Fax/Voice Modem",
-"	1455  HCF 56k Data/Fax/Voice/Spkp (w/Handset) Modem",
-"	1456  HCF 56k Data/Fax/Voice/Spkp Modem",
-"		122d 4035  Dell Europa - MDP3900V-W",
-"		122d 4302  Dell MP3930V-W(C) MiniPCI",
-"	1610  ADSL AccessRunner PCI Arbitration Device",
-"	1611  AccessRunner PCI ADSL Interface Device",
-"	1620  AccessRunner V2 PCI ADSL Arbitration Device",
-"	1621  AccessRunner V2 PCI ADSL Interface Device",
-"	1622  AccessRunner V2 PCI ADSL Yukon WAN Adapter",
-"	1803  HCF 56k Modem",
-"		0e11 0023  623-LAN Grizzly",
-"		0e11 0043  623-LAN Yogi",
-"	1811  Conextant MiniPCI Network Adapter",
-"	1815  HCF 56k Modem",
-"		0e11 0022  Grizzly",
-"		0e11 0042  Yogi",
-"	2003  HSF 56k Data/Fax Modem",
-"	2004  HSF 56k Data/Fax/Voice Modem",
-"	2005  HSF 56k Data/Fax/Voice/Spkp (w/Handset) Modem",
-"	2006  HSF 56k Data/Fax/Voice/Spkp Modem",
-"	2013  HSF 56k Data/Fax Modem",
-"		0e11 b195  Bear",
-"		0e11 b196  Seminole 1",
-"		0e11 b1be  Seminole 2",
-"		1025 8013  Acer",
-"		1033 809d  NEC",
-"		1033 80bc  NEC",
-"		155d 6793  HP",
-"		155d 8850  E Machines",
-"	2014  HSF 56k Data/Fax/Voice Modem",
-"	2015  HSF 56k Data/Fax/Voice/Spkp (w/Handset) Modem",
-"	2016  HSF 56k Data/Fax/Voice/Spkp Modem",
-"	2043  HSF 56k Data/Fax Modem (WorldW SmartDAA)",
-"	2044  HSF 56k Data/Fax/Voice Modem (WorldW SmartDAA)",
-"	2045  HSF 56k Data/Fax/Voice/Spkp (w/Handset) Modem (WorldW SmartDAA)",
-"		14f1 2045  Generic SoftK56",
-"	2046  HSF 56k Data/Fax/Voice/Spkp Modem (WorldW SmartDAA)",
-"	2063  HSF 56k Data/Fax Modem (SmartDAA)",
-"	2064  HSF 56k Data/Fax/Voice Modem (SmartDAA)",
-"	2065  HSF 56k Data/Fax/Voice/Spkp (w/Handset) Modem (SmartDAA)",
-"	2066  HSF 56k Data/Fax/Voice/Spkp Modem (SmartDAA)",
-"	2093  HSF 56k Modem",
-"		155d 2f07  Legend",
-"	2143  HSF 56k Data/Fax/Cell Modem (Mob WorldW SmartDAA)",
-"	2144  HSF 56k Data/Fax/Voice/Cell Modem (Mob WorldW SmartDAA)",
-"	2145  HSF 56k Data/Fax/Voice/Spkp (w/HS)/Cell Modem (Mob WorldW SmartDAA)",
-"	2146  HSF 56k Data/Fax/Voice/Spkp/Cell Modem (Mob WorldW SmartDAA)",
-"	2163  HSF 56k Data/Fax/Cell Modem (Mob SmartDAA)",
-"	2164  HSF 56k Data/Fax/Voice/Cell Modem (Mob SmartDAA)",
-"	2165  HSF 56k Data/Fax/Voice/Spkp (w/HS)/Cell Modem (Mob SmartDAA)",
-"	2166  HSF 56k Data/Fax/Voice/Spkp/Cell Modem (Mob SmartDAA)",
-"	2343  HSF 56k Data/Fax CardBus Modem (Mob WorldW SmartDAA)",
-"	2344  HSF 56k Data/Fax/Voice CardBus Modem (Mob WorldW SmartDAA)",
-"	2345  HSF 56k Data/Fax/Voice/Spkp (w/HS) CardBus Modem (Mob WorldW SmartDAA)",
-"	2346  HSF 56k Data/Fax/Voice/Spkp CardBus Modem (Mob WorldW SmartDAA)",
-"	2363  HSF 56k Data/Fax CardBus Modem (Mob SmartDAA)",
-"	2364  HSF 56k Data/Fax/Voice CardBus Modem (Mob SmartDAA)",
-"	2365  HSF 56k Data/Fax/Voice/Spkp (w/HS) CardBus Modem (Mob SmartDAA)",
-"	2366  HSF 56k Data/Fax/Voice/Spkp CardBus Modem (Mob SmartDAA)",
-"	2443  HSF 56k Data/Fax Modem (Mob WorldW SmartDAA)",
-"		104d 8075  Modem",
-"		104d 8083  Modem",
-"		104d 8097  Modem",
-"	2444  HSF 56k Data/Fax/Voice Modem (Mob WorldW SmartDAA)",
-"	2445  HSF 56k Data/Fax/Voice/Spkp (w/HS) Modem (Mob WorldW SmartDAA)",
-"	2446  HSF 56k Data/Fax/Voice/Spkp Modem (Mob WorldW SmartDAA)",
-"	2463  HSF 56k Data/Fax Modem (Mob SmartDAA)",
-"	2464  HSF 56k Data/Fax/Voice Modem (Mob SmartDAA)",
-"	2465  HSF 56k Data/Fax/Voice/Spkp (w/HS) Modem (Mob SmartDAA)",
-"	2466  HSF 56k Data/Fax/Voice/Spkp Modem (Mob SmartDAA)",
-"	2bfa  HDAudio Soft Data Fax Modem with SmartCP",
-"	2f00  HSF 56k HSFi Modem",
-"		13e0 8d84  IBM HSFi V.90",
-"		13e0 8d85  Compaq Stinger",
-"		14f1 2004  Dynalink 56PMi",
-"	2f02  HSF 56k HSFi Data/Fax",
-"	2f11  HSF 56k HSFi Modem",
-"	2f20  HSF 56k Data/Fax Modem",
-"	8234  RS8234 ATM SAR Controller [ServiceSAR Plus]",
-"	8800  CX23880/1/2/3 PCI Video and Audio Decoder",
-"		0070 2801  Hauppauge WinTV 28xxx (Roslyn) models",
-"		0070 3401  Hauppauge WinTV 34xxx models",
-"		0070 9001  Nova-T DVB-T",
-"		0070 9200  Nova-SE2 DVB-S",
-"		0070 9202  Nova-S-Plus DVB-S",
-"		0070 9402  WinTV-HVR1100 DVB-T/Hybrid",
-"		0070 9802  WinTV-HVR1100 DVB-T/Hybrid (Low Profile)",
-"		1002 00f8  ATI TV Wonder Pro",
-"		1002 a101  HDTV Wonder",
-"		1043 4823  ASUS PVR-416",
-"		107d 6613  Leadtek Winfast 2000XP Expert",
-"		107d 6620  Leadtek Winfast DV2000",
-"		107d 663c  Leadtek PVR 2000",
-"		107d 665f  WinFast DTV1000-T",
-"		10fc d003  IODATA GV-VCP3/PCI",
-"		10fc d035  IODATA GV/BCTV7E",
-"		1421 0334  Instant TV DVB-T PCI",
-"		1461 000a  AVerTV 303 (M126)",
-"		1461 000b  AverTV Studio 303 (M126)",
-"		1461 8011  UltraTV Media Center PCI 550",
-"		1462 8606  MSI TV-@nywhere Master",
-"		14c7 0107  GDI Black Gold",
-"		14f1 0187  Conexant DVB-T reference design",
-"		14f1 0342  Digital-Logic MICROSPACE Entertainment Center (MEC)",
-"		153b 1166  Cinergy 1400 DVB-T",
-"		1540 2580  Provideo PV259",
-"		1554 4811  PixelView",
-"		1554 4813  Club 3D  ZAP1000 MCE Edition",
-"		17de 08a1  KWorld/VStream XPert DVB-T with cx22702",
-"		17de 08a6  KWorld/VStream XPert DVB-T",
-"		17de 08b2  KWorld DVB-S 100",
-"		17de a8a6  digitalnow DNTV Live! DVB-T",
-"		1822 0025  digitalnow DNTV Live! DVB-T Pro",
-"		18ac d500  FusionHDTV 5 Gold",
-"		18ac d810  FusionHDTV 3 Gold-Q",
-"		18ac d820  FusionHDTV 3 Gold-T",
-"		18ac db00  FusionHDTV DVB-T1",
-"		18ac db11  FusionHDTV DVB-T Plus",
-"		18ac db50  FusionHDTV DVB-T Dual Digital",
-"		7063 3000  pcHDTV HD3000 HDTV",
-"	8801  CX23880/1/2/3 PCI Video and Audio Decoder [Audio Port]",
-"		0070 2801  Hauppauge WinTV 28xxx (Roslyn) models",
-"	8802  CX23880/1/2/3 PCI Video and Audio Decoder [MPEG Port]",
-"		0070 2801  Hauppauge WinTV 28xxx (Roslyn) models",
-"		0070 9002  Nova-T DVB-T Model 909",
-"		1043 4823  ASUS PVR-416",
-"		107d 663c  Leadtek PVR 2000",
-"		14f1 0187  Conexant DVB-T reference design",
-"		17de 08a1  XPert DVB-T PCI BDA DVBT 23880 Transport Stream Capture",
-"		17de 08a6  KWorld/VStream XPert DVB-T",
-"		18ac d500  DViCO FusionHDTV5 Gold",
-"		18ac d810  DViCO FusionHDTV3 Gold-Q",
-"		18ac d820  DViCO FusionHDTV3 Gold-T",
-"		18ac db00  DVICO FusionHDTV DVB-T1",
-"		18ac db10  DVICO FusionHDTV DVB-T Plus",
-"		7063 3000  pcHDTV HD3000 HDTV",
-"	8804  CX23880/1/2/3 PCI Video and Audio Decoder [IR Port]",
-"		0070 9002  Nova-T DVB-T Model 909",
-"	8811  CX23880/1/2/3 PCI Video and Audio Decoder [Audio Port]",
-"		0070 3401  Hauppauge WinTV 34xxx models",
-"		1462 8606  MSI TV-@nywhere Master",
-"		18ac d500  DViCO FusionHDTV5 Gold",
-"		18ac d810  DViCO FusionHDTV3 Gold-Q",
-"		18ac d820  DViCO FusionHDTV3 Gold-T",
-"		18ac db00  DVICO FusionHDTV DVB-T1",
-"14f2  MOBILITY Electronics",
-"	0120  EV1000 bridge",
-"	0121  EV1000 Parallel port",
-"	0122  EV1000 Serial port",
-"	0123  EV1000 Keyboard controller",
-"	0124  EV1000 Mouse controller",
-"14f3  BroadLogic",
-"	2030  2030 DVB-S Satellite Reciever",
-"	2050  2050 DVB-T Terrestrial (Cable) Reciever",
-"	2060  2060 ATSC Terrestrial (Cable) Reciever",
-"14f4  TOKYO Electronic Industry CO Ltd",
-"14f5  SOPAC Ltd",
-"14f6  COYOTE Technologies LLC",
-"14f7  WOLF Technology Inc",
-"14f8  AUDIOCODES Inc",
-"	2077  TP-240 dual span E1 VoIP PCI card",
-"14f9  AG COMMUNICATIONS",
-"14fa  WANDEL & GOLTERMANN",
-"14fb  TRANSAS MARINE (UK) Ltd",
-"14fc  Quadrics Ltd",
-"	0000  QsNet Elan3 Network Adapter",
-"	0001  QsNetII Elan4 Network Adapter",
-"	0002  QsNetIII Elan5 Network Adapter",
-"14fd  JAPAN Computer Industry Inc",
-"14fe  ARCHTEK TELECOM Corp",
-"14ff  TWINHEAD INTERNATIONAL Corp",
-"1500  DELTA Electronics, Inc",
-"	1360  RTL81xx RealTek Ethernet",
-"1501  BANKSOFT CANADA Ltd",
-"1502  MITSUBISHI ELECTRIC LOGISTICS SUPPORT Co Ltd",
-"1503  KAWASAKI LSI USA Inc",
-"1504  KAISER Electronics",
-"1505  ITA INGENIEURBURO FUR TESTAUFGABEN GmbH",
-"1506  CHAMELEON Systems Inc",
-"1507  Motorola \?\? / HTEC",
-"	0001  MPC105 [Eagle]",
-"	0002  MPC106 [Grackle]",
-"	0003  MPC8240 [Kahlua]",
-"	0100  MC145575 [HFC-PCI]",
-"	0431  KTI829c 100VG",
-"	4801  Raven",
-"	4802  Falcon",
-"	4803  Hawk",
-"	4806  CPX8216",
-"1508  HONDA CONNECTORS/MHOTRONICS Inc",
-"1509  FIRST INTERNATIONAL Computer Inc",
-"150a  FORVUS RESEARCH Inc",
-"150b  YAMASHITA Systems Corp",
-"150c  KYOPAL CO Ltd",
-"150d  WARPSPPED Inc",
-"150e  C-PORT Corp",
-"150f  INTEC GmbH",
-"1510  BEHAVIOR TECH Computer Corp",
-"1511  CENTILLIUM Technology Corp",
-"1512  ROSUN Technologies Inc",
-"1513  Raychem",
-"1514  TFL LAN Inc",
-"1515  Advent design",
-"1516  MYSON Technology Inc",
-"	0800  MTD-8xx 100/10M Ethernet PCI Adapter",
-"	0803  SURECOM EP-320X-S 100/10M Ethernet PCI Adapter",
-"		1320 10bd  SURECOM EP-320X-S 100/10M Ethernet PCI Adapter",
-"	0891  MTD-8xx 100/10M Ethernet PCI Adapter",
-"1517  ECHOTEK Corp",
-"1518  PEP MODULAR Computers GmbH",
-"1519  TELEFON AKTIEBOLAGET LM Ericsson",
-"151a  Globetek",
-"	1002  PCI-1002",
-"	1004  PCI-1004",
-"	1008  PCI-1008",
-"151b  COMBOX Ltd",
-"151c  DIGITAL AUDIO LABS Inc",
-"	0003  Prodif T 2496",
-"	4000  Prodif 88",
-"151d  Fujitsu Computer Products Of America",
-"151e  MATRIX Corp",
-"151f  TOPIC SEMICONDUCTOR Corp",
-"	0000  TP560 Data/Fax/Voice 56k modem",
-"1520  CHAPLET System Inc",
-"1521  BELL Corp",
-"1522  MainPine Ltd",
-"	0100  PCI <-> IOBus Bridge",
-"		1522 0200  RockForceDUO 2 Port V.92/V.44 Data/Fax/Voice Modem",
-"		1522 0300  RockForceQUATRO 4 Port V.92/V.44 Data/Fax/Voice Modem",
-"		1522 0400  RockForceDUO+ 2 Port V.92/V.44 Data/Fax/Voice Modem",
-"		1522 0500  RockForceQUATRO+ 4 Port V.92/V.44 Data/Fax/Voice Modem",
-"		1522 0600  RockForce+ 2 Port V.90 Data/Fax/Voice Modem",
-"		1522 0700  RockForce+ 4 Port V.90 Data/Fax/Voice Modem",
-"		1522 0800  RockForceOCTO+ 8 Port V.92/V.44 Data/Fax/Voice Modem",
-"		1522 0c00  RockForceDUO+ 2 Port V.92/V.44 Data, V.34 Super-G3 Fax, Voice Modem",
-"		1522 0d00  RockForceQUATRO+ 4 Port V.92/V.44 Data, V.34 Super-G3 Fax, Voice Modem",
-"		1522 1d00  RockForceOCTO+ 8 Port V.92/V.44 Data, V.34 Super-G3 Fax, Voice Modem",
-"		1522 2000  RockForceD1 1 Port V.90 Data Modem",
-"		1522 2100  RockForceF1 1 Port V.34 Super-G3 Fax Modem",
-"		1522 2200  RockForceD2 2 Port V.90 Data Modem",
-"		1522 2300  RockForceF2 2 Port V.34 Super-G3 Fax Modem",
-"		1522 2400  RockForceD4 4 Port V.90 Data Modem",
-"		1522 2500  RockForceF4 4 Port V.34 Super-G3 Fax Modem",
-"		1522 2600  RockForceD8 8 Port V.90 Data Modem",
-"		1522 2700  RockForceF8 8 Port V.34 Super-G3 Fax Modem",
-"1523  MUSIC Semiconductors",
-"1524  ENE Technology Inc",
-"	0510  CB710 Memory Card Reader Controller",
-"		103c 006a  NX9500",
-"	0520  FLASH memory: ENE Technology Inc:",
-"	0530  ENE PCI Memory Stick Card Reader Controller",
-"	0550  ENE PCI Secure Digital Card Reader Controller",
-"	0610  PCI Smart Card Reader Controller",
-"	1211  CB1211 Cardbus Controller",
-"	1225  CB1225 Cardbus Controller",
-"	1410  CB1410 Cardbus Controller",
-"		1025 003c  CL50 motherboard",
-"		1025 005a  TravelMate 290",
-"	1411  CB-710/2/4 Cardbus Controller",
-"		103c 006a  NX9500",
-"	1412  CB-712/4 Cardbus Controller",
-"	1420  CB1420 Cardbus Controller",
-"	1421  CB-720/2/4 Cardbus Controller",
-"	1422  CB-722/4 Cardbus Controller",
-"1525  IMPACT Technologies",
-"1526  ISS, Inc",
-"1527  SOLECTRON",
-"1528  ACKSYS",
-"1529  AMERICAN MICROSystems Inc",
-"152a  QUICKTURN DESIGN Systems",
-"152b  FLYTECH Technology CO Ltd",
-"152c  MACRAIGOR Systems LLC",
-"152d  QUANTA Computer Inc",
-"152e  MELEC Inc",
-"152f  PHILIPS - CRYPTO",
-"1530  ACQIS Technology Inc",
-"1531  CHRYON Corp",
-"1532  ECHELON Corp",
-"	0020  LonWorks PCLTA-20 PCI LonTalk Adapter",
-"1533  BALTIMORE",
-"1534  ROAD Corp",
-"1535  EVERGREEN Technologies Inc",
-"1537  DATALEX COMMUNCATIONS",
-"1538  ARALION Inc",
-"	0303  ARS106S Ultra ATA 133/100/66 Host Controller",
-"1539  ATELIER INFORMATIQUES et ELECTRONIQUE ETUDES S.A.",
-"153a  ONO SOKKI",
-"153b  TERRATEC Electronic GmbH",
-"	1144  Aureon 5.1",
-"	1147  Aureon 5.1 Sky",
-"	1158  Philips Semiconductors SAA7134 (rev 01) [Terratec Cinergy 600 TV]",
-"153c  ANTAL Electronic",
-"153d  FILANET Corp",
-"153e  TECHWELL Inc",
-"153f  MIPS Technologies, Inc.",
-"	0001  SOC-it 101 System Controller",
-"1540  PROVIDEO MULTIMEDIA Co Ltd",
-"1541  MACHONE Communications",
-"1542  Concurrent Computer Corporation",
-"1543  SILICON Laboratories",
-"	3052  Intel 537 [Winmodem]",
-"	4c22  Si3036 MC'97 DAA",
-"1544  DCM DATA Systems",
-"1545  VISIONTEK",
-"1546  IOI Technology Corp",
-"1547  MITUTOYO Corp",
-"1548  JET PROPULSION Laboratory",
-"1549  INTERCONNECT Systems Solutions",
-"154a  MAX Technologies Inc",
-"154b  COMPUTEX Co Ltd",
-"154c  VISUAL Technology Inc",
-"154d  PAN INTERNATIONAL Industrial Corp",
-"154e  SERVOTEST Ltd",
-"154f  STRATABEAM Technology",
-"1550  OPEN NETWORK Co Ltd",
-"1551  SMART Electronic DEVELOPMENT GmBH",
-"1552  RACAL AIRTECH Ltd",
-"1553  CHICONY Electronics Co Ltd",
-"1554  PROLINK Microsystems Corp",
-"1555  GESYTEC GmBH",
-"1556  PLD APPLICATIONS",
-"1557  MEDIASTAR Co Ltd",
-"1558  CLEVO/KAPOK Computer",
-"1559  SI LOGIC Ltd",
-"155a  INNOMEDIA Inc",
-"155b  PROTAC INTERNATIONAL Corp",
-"155c  Cemax-Icon Inc",
-"155d  Mac System Co Ltd",
-"155e  LP Elektronik GmbH",
-"155f  Perle Systems Ltd",
-"1560  Terayon Communications Systems",
-"1561  Viewgraphics Inc",
-"1562  Symbol Technologies",
-"1563  A-Trend Technology Co Ltd",
-"1564  Yamakatsu Electronics Industry Co Ltd",
-"1565  Biostar Microtech Int'l Corp",
-"1566  Ardent Technologies Inc",
-"1567  Jungsoft",
-"1568  DDK Electronics Inc",
-"1569  Palit Microsystems Inc.",
-"156a  Avtec Systems",
-"156b  2wire Inc",
-"156c  Vidac Electronics GmbH",
-"156d  Alpha-Top Corp",
-"156e  Alfa Inc",
-"156f  M-Systems Flash Disk Pioneers Ltd",
-"1570  Lecroy Corp",
-"1571  Contemporary Controls",
-"	a001  CCSI PCI20-485 ARCnet",
-"	a002  CCSI PCI20-485D ARCnet",
-"	a003  CCSI PCI20-485X ARCnet",
-"	a004  CCSI PCI20-CXB ARCnet",
-"	a005  CCSI PCI20-CXS ARCnet",
-"	a006  CCSI PCI20-FOG-SMA ARCnet",
-"	a007  CCSI PCI20-FOG-ST ARCnet",
-"	a008  CCSI PCI20-TB5 ARCnet",
-"	a009  CCSI PCI20-5-485 5Mbit ARCnet",
-"	a00a  CCSI PCI20-5-485D 5Mbit ARCnet",
-"	a00b  CCSI PCI20-5-485X 5Mbit ARCnet",
-"	a00c  CCSI PCI20-5-FOG-ST 5Mbit ARCnet",
-"	a00d  CCSI PCI20-5-FOG-SMA 5Mbit ARCnet",
-"	a201  CCSI PCI22-485 10Mbit ARCnet",
-"	a202  CCSI PCI22-485D 10Mbit ARCnet",
-"	a203  CCSI PCI22-485X 10Mbit ARCnet",
-"	a204  CCSI PCI22-CHB 10Mbit ARCnet",
-"	a205  CCSI PCI22-FOG_ST 10Mbit ARCnet",
-"	a206  CCSI PCI22-THB 10Mbit ARCnet",
-"1572  Otis Elevator Company",
-"1573  Lattice - Vantis",
-"1574  Fairchild Semiconductor",
-"1575  Voltaire Advanced Data Security Ltd",
-"1576  Viewcast COM",
-"1578  HITT",
-"	5615  VPMK3 [Video Processor Mk III]",
-"1579  Dual Technology Corp",
-"157a  Japan Elecronics Ind Inc",
-"157b  Star Multimedia Corp",
-"157c  Eurosoft (UK)",
-"	8001  Fix2000 PCI Y2K Compliance Card",
-"157d  Gemflex Networks",
-"157e  Transition Networks",
-"157f  PX Instruments Technology Ltd",
-"1580  Primex Aerospace Co",
-"1581  SEH Computertechnik GmbH",
-"1582  Cytec Corp",
-"1583  Inet Technologies Inc",
-"1584  Uniwill Computer Corp",
-"1585  Logitron",
-"1586  Lancast Inc",
-"1587  Konica Corp",
-"1588  Solidum Systems Corp",
-"1589  Atlantek Microsystems Pty Ltd",
-"158a  Digalog Systems Inc",
-"158b  Allied Data Technologies",
-"158c  Hitachi Semiconductor & Devices Sales Co Ltd",
-"158d  Point Multimedia Systems",
-"158e  Lara Technology Inc",
-"158f  Ditect Coop",
-"1590  3pardata Inc",
-"1591  ARN",
-"1592  Syba Tech Ltd",
-"	0781  Multi-IO Card",
-"	0782  Parallel Port Card 2xEPP",
-"	0783  Multi-IO Card",
-"	0785  Multi-IO Card",
-"	0786  Multi-IO Card",
-"	0787  Multi-IO Card",
-"	0788  Multi-IO Card",
-"	078a  Multi-IO Card",
-"1593  Bops Inc",
-"1594  Netgame Ltd",
-"1595  Diva Systems Corp",
-"1596  Folsom Research Inc",
-"1597  Memec Design Services",
-"1598  Granite Microsystems",
-"1599  Delta Electronics Inc",
-"159a  General Instrument",
-"159b  Faraday Technology Corp",
-"159c  Stratus Computer Systems",
-"159d  Ningbo Harrison Electronics Co Ltd",
-"159e  A-Max Technology Co Ltd",
-"159f  Galea Network Security",
-"15a0  Compumaster SRL",
-"15a1  Geocast Network Systems",
-"15a2  Catalyst Enterprises Inc",
-"	0001  TA700 PCI Bus Analyzer/Exerciser",
-"15a3  Italtel",
-"15a4  X-Net OY",
-"15a5  Toyota Macs Inc",
-"15a6  Sunlight Ultrasound Technologies Ltd",
-"15a7  SSE Telecom Inc",
-"15a8  Shanghai Communications Technologies Center",
-"15aa  Moreton Bay",
-"15ab  Bluesteel Networks Inc",
-"15ac  North Atlantic Instruments",
-"15ad  VMware Inc",
-"	0405  [VMware SVGA II] PCI Display Adapter",
-"	0710  Virtual SVGA",
-"	0720  VMware High-Speed Virtual NIC [vmxnet]",
-"15ae  Amersham Pharmacia Biotech",
-"15b0  Zoltrix International Ltd",
-"15b1  Source Technology Inc",
-"15b2  Mosaid Technologies Inc",
-"15b3  Mellanox Technologies",
-"	5274  MT21108 InfiniBridge",
-"	5a44  MT23108 InfiniHost",
-"	5a45  MT23108 [Infinihost HCA Flash Recovery]",
-"	5a46  MT23108 PCI Bridge",
-"	5e8d  MT25204 [InfiniHost III Lx HCA Flash Recovery]",
-"	6274  MT25204 [InfiniHost III Lx HCA]",
-"	6278  MT25208 InfiniHost III Ex (Tavor compatibility mode)",
-"	6279  MT25208 [InfiniHost III Ex HCA Flash Recovery]",
-"	6282  MT25208 InfiniHost III Ex",
-"15b4  CCI/TRIAD",
-"15b5  Cimetrics Inc",
-"15b6  Texas Memory Systems Inc",
-"15b7  Sandisk Corp",
-"15b8  ADDI-DATA GmbH",
-"15b9  Maestro Digital Communications",
-"15ba  Impacct Technology Corp",
-"15bb  Portwell Inc",
-"15bc  Agilent Technologies",
-"	1100  E8001-66442 PCI Express CIC",
-"	2922  64 Bit, 133MHz PCI-X Exerciser & Protocol Checker",
-"	2928  64 Bit, 66MHz PCI Exerciser & Analyzer",
-"	2929  64 Bit, 133MHz PCI-X Analyzer & Exerciser",
-"15bd  DFI Inc",
-"15be  Sola Electronics",
-"15bf  High Tech Computer Corp (HTC)",
-"15c0  BVM Ltd",
-"15c1  Quantel",
-"15c2  Newer Technology Inc",
-"15c3  Taiwan Mycomp Co Ltd",
-"15c4  EVSX Inc",
-"15c5  Procomp Informatics Ltd",
-"	8010  1394b - 1394 Firewire 3-Port Host Adapter Card",
-"15c6  Technical University of Budapest",
-"15c7  Tateyama System Laboratory Co Ltd",
-"	0349  Tateyama C-PCI PLC/NC card Rev.01A",
-"15c8  Penta Media Co Ltd",
-"15c9  Serome Technology Inc",
-"15ca  Bitboys OY",
-"15cb  AG Electronics Ltd",
-"15cc  Hotrail Inc",
-"15cd  Dreamtech Co Ltd",
-"15ce  Genrad Inc",
-"15cf  Hilscher GmbH",
-"15d1  Infineon Technologies AG",
-"15d2  FIC (First International Computer Inc)",
-"15d3  NDS Technologies Israel Ltd",
-"15d4  Iwill Corp",
-"15d5  Tatung Co",
-"15d6  Entridia Corp",
-"15d7  Rockwell-Collins Inc",
-"15d8  Cybernetics Technology Co Ltd",
-"15d9  Super Micro Computer Inc",
-"15da  Cyberfirm Inc",
-"15db  Applied Computing Systems Inc",
-"15dc  Litronic Inc",
-"	0001  Argus 300 PCI Cryptography Module",
-"15dd  Sigmatel Inc",
-"15de  Malleable Technologies Inc",
-"15df  Infinilink Corp",
-"15e0  Cacheflow Inc",
-"15e1  Voice Technologies Group Inc",
-"15e2  Quicknet Technologies Inc",
-"15e3  Networth Technologies Inc",
-"15e4  VSN Systemen BV",
-"15e5  Valley technologies Inc",
-"15e6  Agere Inc",
-"15e7  Get Engineering Corp",
-"15e8  National Datacomm Corp",
-"	0130  Wireless PCI Card",
-"15e9  Pacific Digital Corp",
-"	1841  ADMA-100 DiscStaQ ATA Controller",
-"15ea  Tokyo Denshi Sekei K.K.",
-"15eb  Drsearch GmbH",
-"15ec  Beckhoff GmbH",
-"	3101  FC3101 Profibus DP 1 Channel PCI",
-"	5102  FC5102",
-"15ed  Macrolink Inc",
-"15ee  In Win Development Inc",
-"15ef  Intelligent Paradigm Inc",
-"15f0  B-Tree Systems Inc",
-"15f1  Times N Systems Inc",
-"15f2  Diagnostic Instruments Inc",
-"15f3  Digitmedia Corp",
-"15f4  Valuesoft",
-"15f5  Power Micro Research",
-"15f6  Extreme Packet Device Inc",
-"15f7  Banctec",
-"15f8  Koga Electronics Co",
-"15f9  Zenith Electronics Corp",
-"15fa  J.P. Axzam Corp",
-"15fb  Zilog Inc",
-"15fc  Techsan Electronics Co Ltd",
-"15fd  N-CUBED.NET",
-"15fe  Kinpo Electronics Inc",
-"15ff  Fastpoint Technologies Inc",
-"1600  Northrop Grumman - Canada Ltd",
-"1601  Tenta Technology",
-"1602  Prosys-tec Inc",
-"1603  Nokia Wireless Communications",
-"1604  Central System Research Co Ltd",
-"1605  Pairgain Technologies",
-"1606  Europop AG",
-"1607  Lava Semiconductor Manufacturing Inc",
-"1608  Automated Wagering International",
-"1609  Scimetric Instruments Inc",
-"1612  Telesynergy Research Inc.",
-"1619  FarSite Communications Ltd",
-"	0400  FarSync T2P (2 port X.21/V.35/V.24)",
-"	0440  FarSync T4P (4 port X.21/V.35/V.24)",
-"	0610  FarSync T1U (1 port X.21/V.35/V.24)",
-"	0620  FarSync T2U (2 port X.21/V.35/V.24)",
-"	0640  FarSync T4U (4 port X.21/V.35/V.24)",
-"	1610  FarSync TE1 (T1,E1)",
-"	2610  FarSync DSL-S1 (SHDSL)",
-"161f  Rioworks",
-"1626  TDK Semiconductor Corp.",
-"	8410  RTL81xx Fast Ethernet",
-"1629  Kongsberg Spacetec AS",
-"	1003  Format synchronizer v3.0",
-"	2002  Fast Universal Data Output",
-"1637  Linksys",
-"	3874  Linksys 802.11b WMP11 PCI Wireless card",
-"1638  Standard Microsystems Corp [SMC]",
-"	1100  SMC2602W EZConnect / Addtron AWA-100 / Eumitcom PCI WL11000",
-"163c  Smart Link Ltd.",
-"	3052  SmartLink SmartPCI562 56K Modem",
-"	5449  SmartPCI561 Modem",
-"1657  Brocade Communications Systems, Inc.",
-"165a  Epix Inc",
-"	c100  PIXCI(R) CL1 Camera Link Video Capture Board [custom QL5232]",
-"	d200  PIXCI(R) D2X Digital Video Capture Board [custom QL5232]",
-"	d300  PIXCI(R) D3X Digital Video Capture Board [custom QL5232]",
-"165d  Hsing Tech. Enterprise Co., Ltd.",
-"165f  Linux Media Labs, LLC",
-"	1020  LMLM4 MPEG-4 encoder",
-"1661  Worldspace Corp.",
-"1668  Actiontec Electronics Inc",
-"	0100  Mini-PCI bridge",
-"166d  Broadcom Corporation",
-"	0001  SiByte BCM1125/1125H/1250 System-on-a-Chip PCI",
-"	0002  SiByte BCM1125H/1250 System-on-a-Chip HyperTransport",
-"1677  Bernecker + Rainer",
-"	104e  5LS172.6 B&R Dual CAN Interface Card",
-"	12d7  5LS172.61 B&R Dual CAN Interface Card",
-"167b  ZyDAS Technology Corp.",
-"	2102  ZyDAS ZD1202",
-"		187e 3406  ZyAIR B-122 CardBus 11Mbs Wireless LAN Card",
-"1681  Hercules",
-"	0010  Hercules 3d Prophet II Ultra 64MB (350 MHz NV15BR core)",
-"1682  XFX Pine Group Inc.",
-"1688  CastleNet Technology Inc.",
-"	1170  WLAN 802.11b card",
-"168c  Atheros Communications, Inc.",
-"	0007  AR5000 802.11a Wireless Adapter",
-"	0011  AR5210 802.11a NIC",
-"	0012  AR5211 802.11ab NIC",
-"	0013  AR5212 802.11abg NIC",
-"		1113 d301  Philips CPWNA100 Wireless CardBus adapter",
-"		1186 3202  D-link DWL-G650 (Rev B3,B5) Wireless cardbus adapter",
-"		1186 3203  DWL-G520 Wireless PCI Adapter",
-"		1186 3a12  D-Link AirPlus DWL-G650 Wireless Cardbus Adapter(rev.C)",
-"		1186 3a13  D-Link AirPlus DWL-G520 Wireless PCI Adapter(rev.B)",
-"		1186 3a14  D-Link AirPremier DWL-AG530 Wireless PCI Adapter",
-"		1186 3a17  D-Link AirPremier DWL-G680 Wireless Cardbus Adapter",
-"		1186 3a18  D-Link AirPremier DWL-G550 Wireless PCI Adapter",
-"		1186 3a63  D-Link AirPremier DWL-AG660 Wireless Cardbus Adapter",
-"		1186 3a94  C54C Wireless 801.11g cardbus",
-"		1186 3ab0  Allnet ALL0281 Wireless PCI Card",
-"		1385 4d00  Netgear WG311T Wireless PCI Adapter",
-"		1458 e911  Gigabyte GN-WIAG02",
-"		14b7 0a60  8482-WD ORiNOCO 11a/b/g Wireless PCI Adapter",
-"		168c 0013  AirPlus XtremeG DWL-G650 Wireless PCMCIA Adapter",
-"		168c 1025  DWL-G650B2 Wireless CardBus Adapter",
-"		168c 1027  Netgate NL-3054CB ARIES b/g CardBus Adapter",
-"		168c 2026  Netgate 5354MP ARIES a(108Mb turbo)/b/g MiniPCI Adapter",
-"		168c 2041  Netgate 5354MP Plus ARIES2 b/g MiniPCI Adapter",
-"		168c 2042  Netgate 5354MP Plus ARIES2 a/b/g MiniPCI Adapter",
-"		16ab 7302  Trust Speedshare Turbo Pro Wireless PCI Adapter",
-"		185f 2012  Wistron NeWeb WLAN a+b+g model CB9",
-"	001a  AR5005G 802.11abg NIC",
-"		1113 ee20  SMC Wireless CardBus Adapter 802.11g (SMCWCB-G EU)",
-"		1113 ee24  SMC Wireless PCI Card WPCI-G",
-"		1186 3a15  D-Link AirPlus G DWL-G630 Wireless Cardbus Adapter(rev.D)",
-"		1186 3a16  D-Link AirPlus G DWL-G510 Wireless PCI Adapter(rev.B)",
-"		1186 3a23  D-Link AirPlus G DWL-G520+A Wireless PCI Adapter",
-"		1186 3a24  D-Link AirPlus G DWL-G650+A Wireless Cardbus Adapter",
-"		168c 1052  TP-Link TL-WN510G Wireless CardBus Adapter",
-"	001b  AR5006X 802.11abg NIC",
-"		1186 3a19  D-Link AirPremier AG DWL-AG660 Wireless Cardbus Adapter",
-"		1186 3a22  D-Link AirPremier AG DWL-AG530 Wireless PCI Adapter",
-"		168c 2062  EnGenius EMP-8602 (400mw)",
-"		168c 2063  EnGenius EMP-8602 (400mw)",
-"	0020  AR5005VL 802.11bg Wireless NIC",
-"	1014  AR5212 802.11abg NIC",
-"1695  EPoX Computer Co., Ltd.",
-"169c  Netcell Corporation",
-"	0044  Revolution Storage Processing Card",
-"16a5  Tekram Technology Co.,Ltd.",
-"16ab  Global Sun Technology Inc",
-"	1100  GL24110P",
-"	1101  PLX9052 PCMCIA-to-PCI Wireless LAN",
-"	1102  PCMCIA-to-PCI Wireless Network Bridge",
-"	8501  WL-8305 Wireless LAN PCI Adapter",
-"16ae  Safenet Inc",
-"	1141  SafeXcel-1141",
-"16af  SparkLAN Communications, Inc.",
-"16b4  Aspex Semiconductor Ltd",
-"16b8  Sonnet Technologies, Inc.",
-"16be  Creatix Polymedia GmbH",
-"16c6  Micrel-Kendin",
-"	8695  Centaur KS8695 ARM processor",
-"16c8  Octasic Inc.",
-"16c9  EONIC B.V. The Netherlands",
-"16ca  CENATEK Inc",
-"	0001  Rocket Drive DL",
-"16cd  Densitron Technologies",
-"16ce  Roland Corp.",
-"16d5  Acromag, Inc.",
-"	4d4e  PMC482, APC482, AcPC482 Counter Timer Board",
-"16df  PIKA Technologies Inc.",
-"16e3  European Space Agency",
-"	1e0f  LEON2FT Processor",
-"16ec  U.S. Robotics",
-"	00ff  USR997900 10/100 Mbps PCI Network Card",
-"	0116  USR997902 10/100/1000 Mbps PCI Network Card",
-"	3685  Wireless Access PCI Adapter Model 022415",
-"16ed  Sycron N. V.",
-"	1001  UMIO communication card",
-"16f3  Jetway Information Co., Ltd.",
-"16f4  Vweb Corp",
-"	8000  VW2010",
-"16f6  VideoTele.com, Inc.",
-"1702  Internet Machines Corporation (IMC)",
-"1705  Digital First, Inc.",
-"170b  NetOctave",
-"	0100  NSP2000-SSL crypto accelerator",
-"170c  YottaYotta Inc.",
-"1725  Vitesse Semiconductor",
-"	7174  VSC7174 PCI/PCI-X Serial ATA Host Bus Controller",
-"172a  Accelerated Encryption",
-"	13c8  AEP SureWare Runner 1000V3",
-"1734  Fujitsu Siemens Computer GmbH",
-"	1078  Amilo Pro v2010",
-"1737  Linksys",
-"	0013  WMP54G Wireless Pci Card",
-"	0015  WMP54GS Wireless Pci Card",
-"	1032  Gigabit Network Adapter",
-"		1737 0015  EG1032 v2 Instant Gigabit Network Adapter",
-"		1737 0024  EG1032 v3 Instant Gigabit Network Adapter",
-"	1064  Gigabit Network Adapter",
-"		1737 0016  EG1064 v2 Instant Gigabit Network Adapter",
-"	ab08  21x4x DEC-Tulip compatible 10/100 Ethernet",
-"	ab09  21x4x DEC-Tulip compatible 10/100 Ethernet",
-"173b  Altima (nee Broadcom)",
-"	03e8  AC1000 Gigabit Ethernet",
-"	03e9  AC1001 Gigabit Ethernet",
-"	03ea  AC9100 Gigabit Ethernet",
-"		173b 0001  AC1002",
-"	03eb  AC1003 Gigabit Ethernet",
-"1743  Peppercon AG",
-"	8139  ROL/F-100 Fast Ethernet Adapter with ROL",
-"1749  RLX Technologies",
-"174b  PC Partner Limited",
-"174d  WellX Telecom SA",
-"175c  AudioScience Inc",
-"175e  Sanera Systems, Inc.",
-"1775  SBS Technologies",
-"1787  Hightech Information System Ltd.",
-"1796  Research Centre Juelich",
-"	0001  SIS1100 [Gigabit link]",
-"	0002  HOTlink",
-"	0003  Counter Timer",
-"	0004  CAMAC Controller",
-"	0005  PROFIBUS",
-"	0006  AMCC HOTlink",
-"1797  JumpTec h, GMBH",
-"1799  Belkin",
-"	6001  Wireless PCI Card - F5D6001",
-"	6020  Wireless PCMCIA Card - F5D6020",
-"	6060  Wireless PDA Card - F5D6060",
-"	7000  Wireless PCI Card - F5D7000",
-"	7010  BCM4306 802.11b/g Wireless Lan Controller F5D7010",
-"179c  Data Patterns",
-"	0557  DP-PCI-557 [PCI 1553B]",
-"	0566  DP-PCI-566 [Intelligent PCI 1553B]",
-"	5031  DP-CPCI-5031-Synchro Module",
-"	5121  DP-CPCI-5121-IP Carrier",
-"	5211  DP-CPCI-5211-IP Carrier",
-"	5679  AGE Display Module",
-"17a0  Genesys Logic, Inc",
-"	8033  GL880S USB 1.1 controller",
-"	8034  GL880S USB 2.0 controller",
-"17aa  Lenovo",
-"17af  Hightech Information System Ltd.",
-"17b3  Hawking Technologies",
-"	ab08  PN672TX 10/100 Ethernet",
-"17b4  Indra Networks, Inc.",
-"	0011  WebEnhance 100 GZIP Compression Card",
-"17c0  Wistron Corp.",
-"17c2  Newisys, Inc.",
-"17cb  Airgo Networks Inc",
-"17cc  NetChip Technology, Inc",
-"	2280  USB 2.0",
-"17cf  Z-Com, Inc.",
-"17d3  Areca Technology Corp.",
-"	1110  ARC-1110 4-Port PCI-X to SATA RAID Controller",
-"	1120  ARC-1120 8-Port PCI-X to SATA RAID Controller",
-"	1130  ARC-1130 12-Port PCI-X to SATA RAID Controller",
-"	1160  ARC-1160 16-Port PCI-X to SATA RAID Controller",
-"	1210  ARC-1210 4-Port PCI-Express to SATA RAID Controller",
-"	1220  ARC-1220 8-Port PCI-Express to SATA RAID Controller",
-"	1230  ARC-1230 12-Port PCI-Express to SATA RAID Controller",
-"	1260  ARC-1260 16-Port PCI-Express to SATA RAID Controller",
-"17d5  S2io Inc.",
-"	5831  Xframe 10 Gigabit Ethernet PCI-X",
-"		103c 12d5  HP PCI-X 133MHz 10GbE SR Fiber",
-"	5832  Xframe II 10Gbps Ethernet",
-"17de  KWorld Computer Co. Ltd.",
-"17ee  Connect Components Ltd",
-"17f2  Albatron Corp.",
-"17fe  Linksys, A Division of Cisco Systems",
-"	2120  WMP11v4 802.11b PCI card",
-"	2220  [AirConn] INPROCOMM IPN 2220 Wireless LAN Adapter (rev 01)",
-"		17fe 2220  WPC54G ver. 4",
-"17ff  Benq Corporation",
-"1809  Lumanate, Inc.",
-"1813  Ambient Technologies Inc",
-"	4000  HaM controllerless modem",
-"		16be 0001  V9x HAM Data Fax Modem",
-"	4100  HaM plus Data Fax Modem",
-"		16be 0002  V9x HAM 1394",
-"1814  RaLink",
-"	0101  Wireless PCI Adapter RT2400 / RT2460",
-"		1043 0127  WiFi-b add-on Card",
-"		1462 6828  PC11B2 (MS-6828) Wireless 11b PCI Card",
-"	0200  RT2500 802.11g PCI [PC54G2]",
-"	0201  RT2500 802.11g Cardbus/mini-PCI",
-"		1043 130f  WL-130g",
-"		1371 001e  CWC-854 Wireless-G CardBus Adapter",
-"		1371 001f  CWM-854 Wireless-G Mini PCI Adapter",
-"		1371 0020  CWP-854 Wireless-G PCI Adapter",
-"		1458 e381  GN-WMKG 802.11b/g Wireless CardBus Adapter",
-"		1458 e931  GN-WIKG 802.11b/g mini-PCI Adapter",
-"		1462 6835  Wireless 11G CardBus CB54G2",
-"		1737 0032  WMP54G 2.0 PCI Adapter",
-"		1799 700a  F5D7000 Wireless G Desktop Network Card",
-"		1799 701a  F5D7010 Wireless G Notebook Network Card",
-"		185f 22a0  CN-WF513 Wireless Cardbus Adapter",
-"	0301  RT2561/RT61 802.11g PCI",
-"		1186 3c08  DWL-G630 Rev E",
-"		1186 3c09  DWL-G510 Rev C",
-"	0302  RT2561/RT61 rev B 802.11g",
-"		1186 3c08  DWL-G630 Rev E",
-"		1186 3c09  DWL-G510 Rev C",
-"	0401  Ralink RT2600 802.11 MIMO",
-"1820  InfiniCon Systems Inc.",
-"1822  Twinhan Technology Co. Ltd",
-"	4e35  Mantis DTV PCI Bridge Controller [Ver 1.0]",
-"182d  SiteCom Europe BV",
-"	3069  ISDN PCI DC-105V2",
-"	9790  WL-121 Wireless Network Adapter 100g+ [Ver.3]",
-"1830  Credence Systems Corporation",
-"183b  MikroM GmbH",
-"	08a7  MVC100 DVI",
-"	08a8  MVC101 SDI",
-"	08a9  MVC102 DVI+Audio",
-"1849  ASRock Incorporation",
-"1851  Microtune, Inc.",
-"1852  Anritsu Corp.",
-"1853  SMSC Automotive Infotainment System Group",
-"1854  LG Electronics, Inc.",
-"185b  Compro Technology, Inc.",
-"185f  Wistron NeWeb Corp.",
-"1864  SilverBack",
-"	2110  ISNAP 2110",
-"1867  Topspin Communications",
-"	5a44  MT23108 InfiniHost HCA",
-"	5a45  MT23108 InfiniHost HCA flash recovery",
-"	5a46  MT23108 InfiniHost HCA bridge",
-"	6278  MT25208 InfiniHost III Ex (Tavor compatibility mode)",
-"	6282  MT25208 InfiniHost III Ex",
-"187e  ZyXEL Communication Corporation",
-"	3403  ZyAir G-110 802.11g",
-"	340e  M-302 802.11g XtremeMIMO",
-"1888  Varisys Ltd",
-"	0301  VMFX1 FPGA PMC module",
-"	0601  VSM2 dual PMC carrier",
-"	0710  VS14x series PowerPC PCI board",
-"	0720  VS24x series PowerPC PCI board",
-"188a  Ample Communications, Inc",
-"1890  Egenera, Inc.",
-"1894  KNC One",
-"1896  B&B Electronics Manufacturing Company, Inc.",
-"18a1  Astute Networks Inc.",
-"18ac  DViCO Corporation",
-"	d500  FusionHDTV 5",
-"	d810  FusionHDTV 3 Gold",
-"	d820  FusionHDTV 3 Gold-T",
-"18b8  Ammasso",
-"	b001  AMSO 1100 iWARP/RDMA Gigabit Ethernet Coprocessor",
-"18bc  Info-Tek Corp.",
-"18c3  Micronas Semiconductor Holding AG",
-"18c8  Cray Inc",
-"18c9  ARVOO Engineering BV",
-"18ca  XGI - Xabre Graphics Inc",
-"	0020  Volari Z7",
-"	0040  Volari V3XT/V5/V8",
-"18d2  Sitecom",
-"	3069  DC-105v2 ISDN controller",
-"18dd  Artimi Inc",
-"	4c6f  Artimi RTMI-100 UWB adapter",
-"18e6  MPL AG",
-"	0001  OSCI [Octal Serial Communication Interface]",
-"18ec  Cesnet, z.s.p.o.",
-"	c006  COMBO6",
-"		18ec d001  COMBO-4MTX",
-"		18ec d002  COMBO-4SFP",
-"		18ec d003  COMBO-4SFPRO",
-"		18ec d004  COMBO-2XFP",
-"	c045  COMBO6E",
-"	c050  COMBO-PTM",
-"	c058  COMBO6X",
-"		18ec d001  COMBO-4MTX",
-"		18ec d002  COMBO-4SFP",
-"		18ec d003  COMBO-4SFPRO",
-"		18ec d004  COMBO-2XFP",
-"18f7  Commtech, Inc.",
-"	0001  Fastcom ESCC-PCI-335",
-"	0002  Fastcom 422/4-PCI-335",
-"	0004  Fastcom 422/2-PCI-335",
-"	0005  Fastcom IGESCC-PCI-ISO/1",
-"	000a  Fastcom 232/4-PCI-335",
-"18fb  Resilience Corporation",
-"1904  Hangzhou Silan Microelectronics Co., Ltd.",
-"1923  Sangoma Technologies Corp.",
-"	0100  A104d QUAD T1/E1 AFT card",
-"	0400  A104u Quad T1/E1 AFT",
-"1924  Level 5 Networks Inc.",
-"192e  TransDimension",
-"1931  Option N.V.",
-"	000c  Qualcomm MSM6275 UMTS chip",
-"1942  ClearSpeed Technology plc",
-"	e511  CSX600 Advance Accelerator Board",
-"1957  Freescale Semiconductor Inc",
-"	0080  MPC8349E",
-"	0081  MPC8349",
-"	0082  MPC8347E TBGA",
-"	0083  MPC8347 TBGA",
-"	0084  MPC8347E PBGA",
-"	0085  MPC8347 PBGA",
-"	0086  MPC8343E",
-"	0087  MPC8343",
-"1958  Faster Technology, LLC.",
-"1966  Orad Hi-Tec Systems",
-"	1975  DVG64 family",
-"196a  Sensory Networks Inc.",
-"	0101  NodalCore C-1000 Content Classification Accelerator",
-"	0102  NodalCore C-2000 Content Classification Accelerator",
-"197b  JMicron Technologies, Inc.",
-"	2360  JMicron 20360/20363 AHCI Controller",
-"	2361  JMB361 AHCI/IDE",
-"	2363  JMicron 20360/20363 AHCI Controller",
-"	2365  JMB365 AHCI/IDE",
-"	2366  JMB366 AHCI/IDE",
-"1989  Montilio Inc.",
-"	0001  RapidFile Bridge",
-"	8001  RapidFile",
-"1993  Innominate Security Technologies AG",
-"199a  Pulse-LINK, Inc.",
-"19a8  DAQDATA GmbH",
-"19ac  Kasten Chase Applied Research",
-"	0001  ACA2400 Crypto Accelerator",
-"19ae  Progeny Systems Corporation",
-"	0520  4135 HFT Interface Controller",
-"19d4  Quixant Limited",
-"19e2  Vector Informatik GmbH",
-"1a03  ASPEED Technology, Inc.",
-"	2000  AST2000",
-"1a08  Sierra semiconductor",
-"	0000  SC15064",
-"1a1d  GFaI e.V.",
-"1a29  Fortinet, Inc.",
-"1b13  Jaton Corp",
-"1c1c  Symphony",
-"	0001  82C101",
-"1d44  DPT",
-"	a400  PM2x24/PM3224",
-"1de1  Tekram Technology Co.,Ltd.",
-"	0391  TRM-S1040",
-"	2020  DC-390",
-"	690c  690c",
-"	dc29  DC290",
-"1fc0  Tumsan Oy",
-"	0300  E2200 Dual E1/Rawpipe Card",
-"1fc1  PathScale, Inc",
-"	000d  InfiniPath HT-400",
-"	0010  InfiniPath PE-800",
-"1fce  Cognio Inc.",
-"	0001  Spectrum Analyzer PC Card (SAgE)",
-"2000  Smart Link Ltd.",
-"2001  Temporal Research Ltd",
-"2003  Smart Link Ltd.",
-"2004  Smart Link Ltd.",
-"21c3  21st Century Computer Corp.",
-"22b8  Motorola, Inc.",
-"2348  Racore",
-"	2010  8142 100VG/AnyLAN",
-"2646  Kingston Technologies",
-"270b  Xantel Corporation",
-"270f  Chaintech Computer Co. Ltd",
-"2711  AVID Technology Inc.",
-"2a15  3D Vision(\?\?\?)",
-"3000  Hansol Electronics Inc.",
-"3142  Post Impression Systems.",
-"3388  Hint Corp",
-"	0013  HiNT HC4 PCI to ISDN bridge, Multimedia audio controller",
-"	0014  HiNT HC4 PCI to ISDN bridge, Network controller",
-"	0020  HB6 Universal PCI-PCI bridge (transparent mode)",
-"	0021  HB6 Universal PCI-PCI bridge (non-transparent mode)",
-"		4c53 1050  CT7 mainboard",
-"		4c53 1080  CT8 mainboard",
-"		4c53 1090  Cx9 mainboard",
-"		4c53 10a0  CA3/CR3 mainboard",
-"		4c53 3010  PPCI mezzanine (32-bit PMC)",
-"		4c53 3011  PPCI mezzanine (64-bit PMC)",
-"		4c53 4000  PMCCARR1 carrier board",
-"	0022  HiNT HB4 PCI-PCI Bridge (PCI6150)",
-"	0026  HB2 PCI-PCI Bridge",
-"	101a  E.Band [AudioTrak Inca88]",
-"	101b  E.Band [AudioTrak Inca88]",
-"	8011  VXPro II Chipset",
-"		3388 8011  VXPro II Chipset CPU to PCI Bridge",
-"	8012  VXPro II Chipset",
-"		3388 8012  VXPro II Chipset PCI to ISA Bridge",
-"	8013  VXPro II IDE",
-"		3388 8013  VXPro II Chipset EIDE Controller",
-"3411  Quantum Designs (H.K.) Inc",
-"3513  ARCOM Control Systems Ltd",
-"3842  eVga.com. Corp.",
-"	c370  e-GeFORCE 6600 256 DDR PCI-e",
-"38ef  4Links",
-"3d3d  3DLabs",
-"	0001  GLINT 300SX",
-"	0002  GLINT 500TX",
-"		0000 0000  GLoria L",
-"	0003  GLINT Delta",
-"		0000 0000  GLoria XL",
-"	0004  Permedia",
-"	0005  Permedia",
-"	0006  GLINT MX",
-"		0000 0000  GLoria XL",
-"		1048 0a42  GLoria XXL",
-"	0007  3D Extreme",
-"	0008  GLINT Gamma G1",
-"		1048 0a42  GLoria XXL",
-"	0009  Permedia II 2D+3D",
-"		1040 0011  AccelStar II",
-"		1048 0a42  GLoria XXL",
-"		13e9 1000  6221L-4U",
-"		3d3d 0100  AccelStar II 3D Accelerator",
-"		3d3d 0111  Permedia 3:16",
-"		3d3d 0114  Santa Ana",
-"		3d3d 0116  Oxygen GVX1",
-"		3d3d 0119  Scirocco",
-"		3d3d 0120  Santa Ana PCL",
-"		3d3d 0125  Oxygen VX1",
-"		3d3d 0127  Permedia3 Create!",
-"	000a  GLINT R3",
-"		3d3d 0121  Oxygen VX1",
-"	000c  GLINT R3 [Oxygen VX1]",
-"		3d3d 0144  Oxygen VX1-4X AGP [Permedia 4]",
-"	000d  GLint R4 rev A",
-"	0011  GLint R4 rev B",
-"	0012  GLint R5 rev A",
-"	0013  GLint R5 rev B",
-"	0020  VP10 visual processor",
-"	0022  VP10 visual processor",
-"	0024  VP9 visual processor",
-"	0100  Permedia II 2D+3D",
-"	07a1  Wildcat III 6210",
-"	07a2  Sun XVR-500 Graphics Accelerator",
-"	07a3  Wildcat IV 7210",
-"	1004  Permedia",
-"	3d04  Permedia",
-"	ffff  Glint VGA",
-"4005  Avance Logic Inc.",
-"	0300  ALS300 PCI Audio Device",
-"	0308  ALS300+ PCI Audio Device",
-"	0309  PCI Input Controller",
-"	1064  ALG-2064",
-"	2064  ALG-2064i",
-"	2128  ALG-2364A GUI Accelerator",
-"	2301  ALG-2301",
-"	2302  ALG-2302",
-"	2303  AVG-2302 GUI Accelerator",
-"	2364  ALG-2364A",
-"	2464  ALG-2464",
-"	2501  ALG-2564A/25128A",
-"	4000  ALS4000 Audio Chipset",
-"		4005 4000  ALS4000 Audio Chipset",
-"	4710  ALC200/200P",
-"4033  Addtron Technology Co, Inc.",
-"	1360  RTL8139 Ethernet",
-"4143  Digital Equipment Corp",
-"4144  Alpha Data",
-"	0044  ADM-XRCIIPro",
-"416c  Aladdin Knowledge Systems",
-"	0100  AladdinCARD",
-"	0200  CPC",
-"4321  Tata Power Strategic Electronics Division",
-"4444  Internext Compression Inc",
-"	0016  iTVC16 (CX23416) MPEG-2 Encoder",
-"		0070 0003  WinTV PVR 250",
-"		0070 0009  WinTV PVR 150",
-"		0070 0801  WinTV PVR 150",
-"		0070 0807  WinTV PVR 150",
-"		0070 4001  WinTV PVR 250",
-"		0070 4009  WinTV PVR 250",
-"		0070 4801  WinTV PVR 250",
-"		0070 4803  WinTV PVR 250",
-"		0070 8003  WinTV PVR 150",
-"		0070 8801  WinTV PVR 150",
-"		0070 c801  WinTV PVR 150",
-"		0070 e807  WinTV PVR 500 (1st unit)",
-"		0070 e817  WinTV PVR 500 (2nd unit)",
-"		0070 ff92  WiNTV PVR-550",
-"		0270 0801  WinTV PVR 150",
-"		12ab fff3  MPG600",
-"		12ab ffff  MPG600",
-"		9005 0092  VideOh! AVC-2010",
-"		9005 0093  VideOh! AVC-2410",
-"	0803  iTVC15 MPEG-2 Encoder",
-"		0070 4000  WinTV PVR-350",
-"		0070 4001  WinTV PVR-250",
-"		0070 4800  WinTV PVR-350 (V1)",
-"		12ab 0000  MPG160",
-"		1461 a3ce  M179",
-"		1461 a3cf  M179",
-"4468  Bridgeport machines",
-"4594  Cogetec Informatique Inc",
-"45fb  Baldor Electric Company",
-"4680  Umax Computer Corp",
-"4843  Hercules Computer Technology Inc",
-"4916  RedCreek Communications Inc",
-"	1960  RedCreek PCI adapter",
-"4943  Growth Networks",
-"494f  ACCES I/O Products, Inc.",
-"	10e8  LPCI-COM-8SM",
-"4978  Axil Computer Inc",
-"4a14  NetVin",
-"	5000  NV5000SC",
-"		4a14 5000  RT8029-Based Ethernet Adapter",
-"4b10  Buslogic Inc.",
-"4c48  LUNG HWA Electronics",
-"4c53  SBS Technologies",
-"	0000  PLUSTEST device",
-"		4c53 3000  PLUSTEST card (PC104+)",
-"		4c53 3001  PLUSTEST card (PMC)",
-"	0001  PLUSTEST-MM device",
-"		4c53 3002  PLUSTEST-MM card (PMC)",
-"4ca1  Seanix Technology Inc",
-"4d51  MediaQ Inc.",
-"	0200  MQ-200",
-"4d54  Microtechnica Co Ltd",
-"4ddc  ILC Data Device Corp",
-"	0100  DD-42924I5-300 (ARINC 429 Data Bus)",
-"	0801  BU-65570I1 MIL-STD-1553 Test and Simulation",
-"	0802  BU-65570I2 MIL-STD-1553 Test and Simulation",
-"	0811  BU-65572I1 MIL-STD-1553 Test and Simulation",
-"	0812  BU-65572I2 MIL-STD-1553 Test and Simulation",
-"	0881  BU-65570T1 MIL-STD-1553 Test and Simulation",
-"	0882  BU-65570T2 MIL-STD-1553 Test and Simulation",
-"	0891  BU-65572T1 MIL-STD-1553 Test and Simulation",
-"	0892  BU-65572T2 MIL-STD-1553 Test and Simulation",
-"	0901  BU-65565C1 MIL-STD-1553 Data Bus",
-"	0902  BU-65565C2 MIL-STD-1553 Data Bus",
-"	0903  BU-65565C3 MIL-STD-1553 Data Bus",
-"	0904  BU-65565C4 MIL-STD-1553 Data Bus",
-"	0b01  BU-65569I1 MIL-STD-1553 Data Bus",
-"	0b02  BU-65569I2 MIL-STD-1553 Data Bus",
-"	0b03  BU-65569I3 MIL-STD-1553 Data Bus",
-"	0b04  BU-65569I4 MIL-STD-1553 Data Bus",
-"5046  GemTek Technology Corporation",
-"	1001  PCI Radio",
-"5053  Voyetra Technologies",
-"	2010  Daytona Audio Adapter",
-"5136  S S Technologies",
-"5143  Qualcomm Inc",
-"5145  Ensoniq (Old)",
-"	3031  Concert AudioPCI",
-"5168  Animation Technologies Inc.",
-"	0300  FlyDVB-S",
-"	0301  FlyDVB-T",
-"5301  Alliance Semiconductor Corp.",
-"	0001  ProMotion aT3D",
-"5333  S3 Inc.",
-"	0551  Plato/PX (system)",
-"	5631  86c325 [ViRGE]",
-"	8800  86c866 [Vision 866]",
-"	8801  86c964 [Vision 964]",
-"	8810  86c764_0 [Trio 32 vers 0]",
-"	8811  86c764/765 [Trio32/64/64V+]",
-"	8812  86cM65 [Aurora64V+]",
-"	8813  86c764_3 [Trio 32/64 vers 3]",
-"	8814  86c767 [Trio 64UV+]",
-"	8815  86cM65 [Aurora 128]",
-"	883d  86c988 [ViRGE/VX]",
-"	8870  FireGL",
-"	8880  86c868 [Vision 868 VRAM] vers 0",
-"	8881  86c868 [Vision 868 VRAM] vers 1",
-"	8882  86c868 [Vision 868 VRAM] vers 2",
-"	8883  86c868 [Vision 868 VRAM] vers 3",
-"	88b0  86c928 [Vision 928 VRAM] vers 0",
-"	88b1  86c928 [Vision 928 VRAM] vers 1",
-"	88b2  86c928 [Vision 928 VRAM] vers 2",
-"	88b3  86c928 [Vision 928 VRAM] vers 3",
-"	88c0  86c864 [Vision 864 DRAM] vers 0",
-"	88c1  86c864 [Vision 864 DRAM] vers 1",
-"	88c2  86c864 [Vision 864-P DRAM] vers 2",
-"	88c3  86c864 [Vision 864-P DRAM] vers 3",
-"	88d0  86c964 [Vision 964 VRAM] vers 0",
-"	88d1  86c964 [Vision 964 VRAM] vers 1",
-"	88d2  86c964 [Vision 964-P VRAM] vers 2",
-"	88d3  86c964 [Vision 964-P VRAM] vers 3",
-"	88f0  86c968 [Vision 968 VRAM] rev 0",
-"	88f1  86c968 [Vision 968 VRAM] rev 1",
-"	88f2  86c968 [Vision 968 VRAM] rev 2",
-"	88f3  86c968 [Vision 968 VRAM] rev 3",
-"	8900  86c755 [Trio 64V2/DX]",
-"		5333 8900  86C775 Trio64V2/DX",
-"	8901  86c775/86c785 [Trio 64V2/DX or /GX]",
-"		5333 8901  86C775 Trio64V2/DX, 86C785 Trio64V2/GX",
-"	8902  Plato/PX",
-"	8903  Trio 3D business multimedia",
-"	8904  Trio 64 3D",
-"		1014 00db  Integrated Trio3D",
-"		5333 8904  86C365 Trio3D AGP",
-"	8905  Trio 64V+ family",
-"	8906  Trio 64V+ family",
-"	8907  Trio 64V+ family",
-"	8908  Trio 64V+ family",
-"	8909  Trio 64V+ family",
-"	890a  Trio 64V+ family",
-"	890b  Trio 64V+ family",
-"	890c  Trio 64V+ family",
-"	890d  Trio 64V+ family",
-"	890e  Trio 64V+ family",
-"	890f  Trio 64V+ family",
-"	8a01  ViRGE/DX or /GX",
-"		0e11 b032  ViRGE/GX",
-"		10b4 1617  Nitro 3D",
-"		10b4 1717  Nitro 3D",
-"		5333 8a01  ViRGE/DX",
-"	8a10  ViRGE/GX2",
-"		1092 8a10  Stealth 3D 4000",
-"	8a13  86c368 [Trio 3D/2X]",
-"		5333 8a13  Trio3D/2X",
-"	8a20  86c794 [Savage 3D]",
-"		5333 8a20  86C391 Savage3D",
-"	8a21  86c390 [Savage 3D/MV]",
-"		5333 8a21  86C390 Savage3D/MV",
-"	8a22  Savage 4",
-"		1033 8068  Savage 4",
-"		1033 8069  Savage 4",
-"		1033 8110  Savage 4 LT",
-"		105d 0018  SR9 8Mb SDRAM",
-"		105d 002a  SR9 Pro 16Mb SDRAM",
-"		105d 003a  SR9 Pro 32Mb SDRAM",
-"		105d 092f  SR9 Pro+ 16Mb SGRAM",
-"		1092 4207  Stealth III S540",
-"		1092 4800  Stealth III S540",
-"		1092 4807  SpeedStar A90",
-"		1092 4808  Stealth III S540",
-"		1092 4809  Stealth III S540",
-"		1092 480e  Stealth III S540",
-"		1092 4904  Stealth III S520",
-"		1092 4905  SpeedStar A200",
-"		1092 4a09  Stealth III S540",
-"		1092 4a0b  Stealth III S540 Xtreme",
-"		1092 4a0f  Stealth III S540",
-"		1092 4e01  Stealth III S540",
-"		1102 101d  3d Blaster Savage 4",
-"		1102 101e  3d Blaster Savage 4",
-"		5333 8100  86C394-397 Savage4 SDRAM 100",
-"		5333 8110  86C394-397 Savage4 SDRAM 110",
-"		5333 8125  86C394-397 Savage4 SDRAM 125",
-"		5333 8143  86C394-397 Savage4 SDRAM 143",
-"		5333 8a22  86C394-397 Savage4",
-"		5333 8a2e  86C394-397 Savage4 32bit",
-"		5333 9125  86C394-397 Savage4 SGRAM 125",
-"		5333 9143  86C394-397 Savage4 SGRAM 143",
-"	8a23  Savage 4",
-"	8a25  ProSavage PM133",
-"	8a26  ProSavage KM133",
-"	8c00  ViRGE/M3",
-"	8c01  ViRGE/MX",
-"		1179 0001  ViRGE/MX",
-"	8c02  ViRGE/MX+",
-"	8c03  ViRGE/MX+MV",
-"	8c10  86C270-294 Savage/MX-MV",
-"	8c11  82C270-294 Savage/MX",
-"	8c12  86C270-294 Savage/IX-MV",
-"		1014 017f  Thinkpad T20/T22",
-"		1179 0001  86C584 SuperSavage/IXC Toshiba",
-"	8c13  86C270-294 Savage/IX",
-"		1179 0001  Magnia Z310",
-"	8c22  SuperSavage MX/128",
-"	8c24  SuperSavage MX/64",
-"	8c26  SuperSavage MX/64C",
-"	8c2a  SuperSavage IX/128 SDR",
-"	8c2b  SuperSavage IX/128 DDR",
-"	8c2c  SuperSavage IX/64 SDR",
-"	8c2d  SuperSavage IX/64 DDR",
-"	8c2e  SuperSavage IX/C SDR",
-"		1014 01fc  ThinkPad T23 (2647-4MG)",
-"	8c2f  SuperSavage IX/C DDR",
-"	8d01  86C380 [ProSavageDDR K4M266]",
-"	8d02  VT8636A [ProSavage KN133] AGP4X VGA Controller (TwisterK)",
-"	8d03  VT8751 [ProSavageDDR P4M266]",
-"	8d04  VT8375 [ProSavage8 KM266/KL266]",
-"	9102  86C410 Savage 2000",
-"		1092 5932  Viper II Z200",
-"		1092 5934  Viper II Z200",
-"		1092 5952  Viper II Z200",
-"		1092 5954  Viper II Z200",
-"		1092 5a35  Viper II Z200",
-"		1092 5a37  Viper II Z200",
-"		1092 5a55  Viper II Z200",
-"		1092 5a57  Viper II Z200",
-"	ca00  SonicVibes",
-"544c  Teralogic Inc",
-"	0350  TL880-based HDTV/ATSC tuner",
-"5455  Technische University Berlin",
-"	4458  S5933",
-"5519  Cnet Technologies, Inc.",
-"5544  Dunord Technologies",
-"	0001  I-30xx Scanner Interface",
-"5555  Genroco, Inc",
-"	0003  TURBOstor HFP-832 [HiPPI NIC]",
-"5654  VoiceTronix Pty Ltd",
-"	3132  OpenSwitch12",
-"5700  Netpower",
-"5851  Exacq Technologies",
-"6356  UltraStor",
-"6374  c't Magazin fuer Computertechnik",
-"	6773  GPPCI",
-"6409  Logitec Corp.",
-"6666  Decision Computer International Co.",
-"	0001  PCCOM4",
-"	0002  PCCOM8",
-"	0004  PCCOM2",
-"	0101  PCI 8255/8254 I/O Card",
-"7063  pcHDTV",
-"	2000  HD-2000",
-"	3000  HD-3000",
-"7604  O.N. Electronic Co Ltd.",
-"7bde  MIDAC Corporation",
-"7fed  PowerTV",
-"8008  Quancom Electronic GmbH",
-"	0010  WDOG1 [PCI-Watchdog 1]",
-"	0011  PWDOG2 [PCI-Watchdog 2]",
-"807d  Asustek Computer, Inc.",
-"8086  Intel Corporation",
-"	0007  82379AB",
-"	0008  Extended Express System Support Controller",
-"	0039  21145 Fast Ethernet",
-"	0122  82437FX",
-"	0309  80303 I/O Processor PCI-to-PCI Bridge",
-"	030d  80312 I/O Companion Chip PCI-to-PCI Bridge",
-"	0326  6700/6702PXH I/OxAPIC Interrupt Controller A",
-"	0327  6700PXH I/OxAPIC Interrupt Controller B",
-"	0329  6700PXH PCI Express-to-PCI Bridge A",
-"	032a  6700PXH PCI Express-to-PCI Bridge B",
-"	032c  6702PXH PCI Express-to-PCI Bridge A",
-"	0330  80332 [Dobson] I/O processor (A-Segment Bridge)",
-"	0331  80332 [Dobson] I/O processor (A-Segment IOAPIC)",
-"	0332  80332 [Dobson] I/O processor (B-Segment Bridge)",
-"	0333  80332 [Dobson] I/O processor (B-Segment IOAPIC)",
-"	0334  80332 [Dobson] I/O processor (ATU)",
-"	0335  80331 [Lindsay] I/O processor (PCI-X Bridge)",
-"	0336  80331 [Lindsay] I/O processor (ATU)",
-"	0340  41210 [Lanai] Serial to Parallel PCI Bridge (A-Segment Bridge)",
-"	0341  41210 [Lanai] Serial to Parallel PCI Bridge (B-Segment Bridge)",
-"	0370  80333 Segment-A PCI Express-to-PCI Express Bridge",
-"	0371  80333 A-Bus IOAPIC",
-"	0372  80333 Segment-B PCI Express-to-PCI Express Bridge",
-"	0373  80333 B-Bus IOAPIC",
-"	0374  80333 Address Translation Unit",
-"	0482  82375EB/SB PCI to EISA Bridge",
-"	0483  82424TX/ZX [Saturn] CPU to PCI bridge",
-"	0484  82378ZB/IB, 82379AB (SIO, SIO.A) PCI to ISA Bridge",
-"	0486  82425EX/ZX [Aries] PCIset with ISA bridge",
-"	04a3  82434LX/NX [Mercury/Neptune] Processor to PCI bridge",
-"	04d0  82437FX [Triton FX]",
-"	0500  E8870 Processor bus control",
-"	0501  E8870 Memory controller",
-"	0502  E8870 Scalability Port 0",
-"	0503  E8870 Scalability Port 1",
-"	0510  E8870IO Hub Interface Port 0 registers (8-bit compatibility port)",
-"	0511  E8870IO Hub Interface Port 1 registers",
-"	0512  E8870IO Hub Interface Port 2 registers",
-"	0513  E8870IO Hub Interface Port 3 registers",
-"	0514  E8870IO Hub Interface Port 4 registers",
-"	0515  E8870IO General SIOH registers",
-"	0516  E8870IO RAS registers",
-"	0530  E8870SP Scalability Port 0 registers",
-"	0531  E8870SP Scalability Port 1 registers",
-"	0532  E8870SP Scalability Port 2 registers",
-"	0533  E8870SP Scalability Port 3 registers",
-"	0534  E8870SP Scalability Port 4 registers",
-"	0535  E8870SP Scalability Port 5 registers",
-"	0536  E8870SP Interleave registers 0 and 1",
-"	0537  E8870SP Interleave registers 2 and 3",
-"	0600  RAID Controller",
-"		8086 01af  SRCZCR",
-"		8086 01c1  ICP Vortex GDT8546RZ",
-"		8086 01f7  SCRU32",
-"	061f  80303 I/O Processor",
-"	0960  80960RP [i960 RP Microprocessor/Bridge]",
-"	0962  80960RM [i960RM Bridge]",
-"	0964  80960RP [i960 RP Microprocessor/Bridge]",
-"	1000  82542 Gigabit Ethernet Controller",
-"		0e11 b0df  NC1632 Gigabit Ethernet Adapter (1000-SX)",
-"		0e11 b0e0  NC1633 Gigabit Ethernet Adapter (1000-LX)",
-"		0e11 b123  NC1634 Gigabit Ethernet Adapter (1000-SX)",
-"		1014 0119  Netfinity Gigabit Ethernet SX Adapter",
-"		8086 1000  PRO/1000 Gigabit Server Adapter",
-"	1001  82543GC Gigabit Ethernet Controller (Fiber)",
-"		0e11 004a  NC6136 Gigabit Server Adapter",
-"		1014 01ea  Netfinity Gigabit Ethernet SX Adapter",
-"		8086 1002  PRO/1000 F Server Adapter",
-"		8086 1003  PRO/1000 F Server Adapter",
-"	1002  Pro 100 LAN+Modem 56 Cardbus II",
-"		8086 200e  Pro 100 LAN+Modem 56 Cardbus II",
-"		8086 2013  Pro 100 SR Mobile Combo Adapter",
-"		8086 2017  Pro 100 S Combo Mobile Adapter",
-"	1004  82543GC Gigabit Ethernet Controller (Copper)",
-"		0e11 0049  NC7132 Gigabit Upgrade Module",
-"		0e11 b1a4  NC7131 Gigabit Server Adapter",
-"		1014 10f2  Gigabit Ethernet Server Adapter",
-"		8086 1004  PRO/1000 T Server Adapter",
-"		8086 2004  PRO/1000 T Server Adapter",
-"	1008  82544EI Gigabit Ethernet Controller (Copper)",
-"		1014 0269  iSeries 1000/100/10 Ethernet Adapter",
-"		1028 011c  PRO/1000 XT Network Connection",
-"		8086 1107  PRO/1000 XT Server Adapter",
-"		8086 2107  PRO/1000 XT Server Adapter",
-"		8086 2110  PRO/1000 XT Server Adapter",
-"		8086 3108  PRO/1000 XT Network Connection",
-"	1009  82544EI Gigabit Ethernet Controller (Fiber)",
-"		1014 0268  iSeries Gigabit Ethernet Adapter",
-"		8086 1109  PRO/1000 XF Server Adapter",
-"		8086 2109  PRO/1000 XF Server Adapter",
-"	100a  82540EM Gigabit Ethernet Controller",
-"	100c  82544GC Gigabit Ethernet Controller (Copper)",
-"		8086 1112  PRO/1000 T Desktop Adapter",
-"		8086 2112  PRO/1000 T Desktop Adapter",
-"	100d  82544GC Gigabit Ethernet Controller (LOM)",
-"		1028 0123  PRO/1000 XT Network Connection",
-"		1079 891f  82544GC Based Network Connection",
-"		4c53 1080  CT8 mainboard",
-"		8086 110d  82544GC Based Network Connection",
-"	100e  82540EM Gigabit Ethernet Controller",
-"		1014 0265  PRO/1000 MT Network Connection",
-"		1014 0267  PRO/1000 MT Network Connection",
-"		1014 026a  PRO/1000 MT Network Connection",
-"		1024 0134  Poweredge SC600",
-"		1028 002e  Optiplex GX260",
-"		1028 0151  PRO/1000 MT Network Connection",
-"		107b 8920  PRO/1000 MT Desktop Adapter",
-"		8086 001e  PRO/1000 MT Desktop Adapter",
-"		8086 002e  PRO/1000 MT Desktop Adapter",
-"		8086 1376  PRO/1000 GT Desktop Adapter",
-"		8086 1476  PRO/1000 GT Desktop Adapter",
-"	100f  82545EM Gigabit Ethernet Controller (Copper)",
-"		1014 0269  iSeries 1000/100/10 Ethernet Adapter",
-"		1014 028e  PRO/1000 MT Network Connection",
-"		8086 1000  PRO/1000 MT Network Connection",
-"		8086 1001  PRO/1000 MT Server Adapter",
-"	1010  82546EB Gigabit Ethernet Controller (Copper)",
-"		0e11 00db  NC7170 Gigabit Server Adapter",
-"		1014 027c  PRO/1000 MT Dual Port Network Adapter",
-"		18fb 7872  RESlink-X",
-"		1fc1 0026  Niagara 2260 Bypass Card",
-"		4c53 1080  CT8 mainboard",
-"		4c53 10a0  CA3/CR3 mainboard",
-"		8086 1011  PRO/1000 MT Dual Port Server Adapter",
-"		8086 1012  Primergy RX300",
-"		8086 101a  PRO/1000 MT Dual Port Network Adapter",
-"		8086 3424  SE7501HG2 Mainboard",
-"	1011  82545EM Gigabit Ethernet Controller (Fiber)",
-"		1014 0268  iSeries Gigabit Ethernet Adapter",
-"		8086 1002  PRO/1000 MF Server Adapter",
-"		8086 1003  PRO/1000 MF Server Adapter (LX)",
-"	1012  82546EB Gigabit Ethernet Controller (Fiber)",
-"		0e11 00dc  NC6170 Gigabit Server Adapter",
-"		8086 1012  PRO/1000 MF Dual Port Server Adapter",
-"	1013  82541EI Gigabit Ethernet Controller (Copper)",
-"		8086 0013  PRO/1000 MT Network Connection",
-"		8086 1013  IBM ThinkCentre Network Card",
-"		8086 1113  PRO/1000 MT Desktop Adapter",
-"	1014  82541ER Gigabit Ethernet Controller",
-"	1015  82540EM Gigabit Ethernet Controller (LOM)",
-"	1016  82540EP Gigabit Ethernet Controller (LOM)",
-"		1014 052c  PRO/1000 MT Mobile Connection",
-"		1179 0001  PRO/1000 MT Mobile Connection",
-"		8086 1016  PRO/1000 MT Mobile Connection",
-"	1017  82540EP Gigabit Ethernet Controller (LOM)",
-"		8086 1017  PR0/1000 MT Desktop Connection",
-"	1018  82541EI Gigabit Ethernet Controller",
-"		8086 1018  PRO/1000 MT Desktop Adapter",
-"	1019  82547EI Gigabit Ethernet Controller (LOM)",
-"		1458 1019  GA-8IPE1000 Pro2 motherboard (865PE)",
-"		1458 e000  Intel Gigabit Ethernet (Kenai II)",
-"		8086 1019  PRO/1000 CT Desktop Connection",
-"		8086 301f  D865PERL mainboard",
-"		8086 302c  Intel 82865G Mainboard (D865GBF)",
-"		8086 3427  S875WP1-E mainboard",
-"	101a  82547EI Gigabit Ethernet Controller (Mobile)",
-"	101d  82546EB Gigabit Ethernet Controller",
-"		8086 1000  PRO/1000 MT Quad Port Server Adapter",
-"	101e  82540EP Gigabit Ethernet Controller (Mobile)",
-"		1014 0549  PRO/1000 MT Mobile Connection",
-"		1179 0001  PRO/1000 MT Mobile Connection",
-"		8086 101e  PRO/1000 MT Mobile Connection",
-"	1026  82545GM Gigabit Ethernet Controller",
-"		1028 0169  Precision 470",
-"		8086 1000  PRO/1000 MT Server Connection",
-"		8086 1001  PRO/1000 MT Server Adapter",
-"		8086 1002  PRO/1000 MT Server Adapter",
-"		8086 1026  PRO/1000 MT Server Connection",
-"	1027  82545GM Gigabit Ethernet Controller",
-"		103c 3103  NC310F PCI-X Gigabit Server Adapter",
-"		8086 1001  PRO/1000 MF Server Adapter(LX)",
-"		8086 1002  PRO/1000 MF Server Adapter(LX)",
-"		8086 1003  PRO/1000 MF Server Adapter(LX)",
-"		8086 1027  PRO/1000 MF Server Adapter",
-"	1028  82545GM Gigabit Ethernet Controller",
-"		8086 1028  PRO/1000 MB Server Adapter",
-"	1029  82559 Ethernet Controller",
-"	1030  82559 InBusiness 10/100",
-"	1031  82801CAM (ICH3) PRO/100 VE (LOM) Ethernet Controller",
-"		1014 0209  ThinkPad A/T/X Series",
-"		104d 80e7  Vaio PCG-GR214EP/GR214MP/GR215MP/GR314MP/GR315MP",
-"		104d 813c  Vaio PCG-GRV616G",
-"		107b 5350  EtherExpress PRO/100 VE",
-"		1179 0001  EtherExpress PRO/100 VE",
-"		144d c000  EtherExpress PRO/100 VE",
-"		144d c001  EtherExpress PRO/100 VE",
-"		144d c003  EtherExpress PRO/100 VE",
-"		144d c006  vpr Matrix 170B4",
-"	1032  82801CAM (ICH3) PRO/100 VE Ethernet Controller",
-"	1033  82801CAM (ICH3) PRO/100 VM (LOM) Ethernet Controller",
-"	1034  82801CAM (ICH3) PRO/100 VM Ethernet Controller",
-"	1035  82801CAM (ICH3)/82562EH (LOM)  Ethernet Controller",
-"	1036  82801CAM (ICH3) 82562EH Ethernet Controller",
-"	1037  82801CAM (ICH3) Chipset Ethernet Controller",
-"	1038  82801CAM (ICH3) PRO/100 VM (KM) Ethernet Controller",
-"		0e11 0098  Evo N600c",
-"	1039  82801DB PRO/100 VE (LOM) Ethernet Controller",
-"		1014 0267  NetVista A30p",
-"	103a  82801DB PRO/100 VE (CNR) Ethernet Controller",
-"	103b  82801DB PRO/100 VM (LOM) Ethernet Controller",
-"	103c  82801DB PRO/100 VM (CNR) Ethernet Controller",
-"	103d  82801DB PRO/100 VE (MOB) Ethernet Controller",
-"	103e  82801DB PRO/100 VM (MOB) Ethernet Controller",
-"	1040  536EP Data Fax Modem",
-"		16be 1040  V.9X DSP Data Fax Modem",
-"	1043  PRO/Wireless LAN 2100 3B Mini PCI Adapter",
-"		8086 2527  MIM2000/Centrino",
-"	1048  PRO/10GbE LR Server Adapter",
-"		8086 a01f  PRO/10GbE LR Server Adapter",
-"		8086 a11f  PRO/10GbE LR Server Adapter",
-"	104b  Ethernet Controller",
-"	1050  82562EZ 10/100 Ethernet Controller",
-"		1462 728c  865PE Neo2 (MS-6728)",
-"		1462 758c  MS-6758 (875P Neo)",
-"		8086 3020  D865PERL mainboard",
-"		8086 302f  Desktop Board D865GBF",
-"		8086 3427  S875WP1-E mainboard",
-"	1051  82801EB/ER (ICH5/ICH5R) integrated LAN Controller",
-"	1052  PRO/100 VM Network Connection",
-"	1053  PRO/100 VM Network Connection",
-"	1059  82551QM Ethernet Controller",
-"	105e  82571EB Gigabit Ethernet Controller",
-"		1775 6003  Telum GE-QT",
-"	105f  82571EB Gigabit Ethernet Controller",
-"	1060  82571EB Gigabit Ethernet Controller",
-"	1064  82562ET/EZ/GT/GZ - PRO/100 VE (LOM) Ethernet Controller",
-"		1043 80f8  P5GD1-VW Mainboard",
-"	1065  82562ET/EZ/GT/GZ - PRO/100 VE Ethernet Controller",
-"	1066  82562 EM/EX/GX - PRO/100 VM (LOM) Ethernet Controller",
-"	1067  82562 EM/EX/GX - PRO/100 VM Ethernet Controller",
-"	1068  82562ET/EZ/GT/GZ - PRO/100 VE (LOM) Ethernet Controller Mobile",
-"	1069  82562EM/EX/GX - PRO/100 VM (LOM) Ethernet Controller Mobile",
-"	106a  82562G - PRO/100 VE (LOM) Ethernet Controller",
-"	106b  82562G - PRO/100 VE Ethernet Controller Mobile",
-"	1075  82547GI Gigabit Ethernet Controller",
-"		1028 0165  PowerEdge 750",
-"		8086 0075  PRO/1000 CT Network Connection",
-"		8086 1075  PRO/1000 CT Network Connection",
-"	1076  82541GI/PI Gigabit Ethernet Controller",
-"		1028 0165  PowerEdge 750",
-"		1028 019a  PowerEdge SC1425",
-"		8086 0076  PRO/1000 MT Network Connection",
-"		8086 1076  PRO/1000 MT Network Connection",
-"		8086 1176  PRO/1000 MT Desktop Adapter",
-"		8086 1276  PRO/1000 MT Desktop Adapter",
-"	1077  82541GI Gigabit Ethernet Controller",
-"		1179 0001  PRO/1000 MT Mobile Connection",
-"		8086 0077  PRO/1000 MT Mobile Connection",
-"		8086 1077  PRO/1000 MT Mobile Connection",
-"	1078  82541EI Gigabit Ethernet Controller",
-"		8086 1078  PRO/1000 MT Network Connection",
-"	1079  82546GB Gigabit Ethernet Controller",
-"		103c 12a6  HP Dual Port 1000Base-T [A9900A]",
-"		103c 12cf  HP Core Dual Port 1000Base-T [AB352A]",
-"		1fc1 0027  Niagara 2261 Failover NIC",
-"		4c53 1090  Cx9 / Vx9 mainboard",
-"		4c53 10b0  CL9 mainboard",
-"		8086 0079  PRO/1000 MT Dual Port Network Connection",
-"		8086 1079  PRO/1000 MT Dual Port Network Connection",
-"		8086 1179  PRO/1000 MT Dual Port Network Connection",
-"		8086 117a  PRO/1000 MT Dual Port Server Adapter",
-"	107a  82546GB Gigabit Ethernet Controller",
-"		103c 12a8  HP Dual Port 1000base-SX [A9899A]",
-"		8086 107a  PRO/1000 MF Dual Port Server Adapter",
-"		8086 127a  PRO/1000 MF Dual Port Server Adapter",
-"	107b  82546GB Gigabit Ethernet Controller",
-"		8086 007b  PRO/1000 MB Dual Port Server Connection",
-"		8086 107b  PRO/1000 MB Dual Port Server Connection",
-"	107c  82541PI Gigabit Ethernet Controller",
-"	107d  82572EI Gigabit Ethernet Controller",
-"	107e  82572EI Gigabit Ethernet Controller",
-"	107f  82572EI Gigabit Ethernet Controller",
-"	1080  FA82537EP 56K V.92 Data/Fax Modem PCI",
-"	1081  Enterprise Southbridge LAN Copper",
-"	1082  Enterprise Southbridge LAN fiber",
-"	1083  Enterprise Southbridge LAN SERDES",
-"	1084  Enterprise Southbridge IDE Redirection",
-"	1085  Enterprise Southbridge Serial Port Redirection",
-"	1086  Enterprise Southbridge IPMI/KCS0",
-"	1087  Enterprise Southbridge UHCI Redirection",
-"	1089  Enterprise Southbridge BT",
-"	108a  82546EB Gigabit Ethernet Controller",
-"	108b  82573V Gigabit Ethernet Controller (Copper)",
-"	108c  82573E Gigabit Ethernet Controller (Copper)",
-"	108e  82573E KCS (Active Management)",
-"	108f  Intel(R) Active Management Technology - SOL",
-"	1092  Intel(R) PRO/100 VE Network Connection",
-"	1096  PRO/1000 EB Network Connection with I/O Acceleration",
-"	1097  Enterprise Southbridge DPT LAN fiber",
-"	1098  PRO/1000 EB Backplane Connection with I/O Acceleration",
-"	1099  82546GB Quad Port Server Adapter",
-"	109a  82573L Gigabit Ethernet Controller",
-"		17aa 207e  Thinkpad X60s",
-"	109b  82546GB PRO/1000 GF Quad Port Server Adapter",
-"	10a0  82571EB PRO/1000 AT Quad Port Bypass Adapter",
-"	10a1  82571EB PRO/1000 AF Quad Port Bypass Adapter",
-"	10b0  82573L PRO/1000 PL Network Connection",
-"	10b2  82573V PRO/1000 PM Network Connection",
-"	10b3  82573E PRO/1000 PM Network Connection",
-"	10b4  82573L PRO/1000 PL Network Connection",
-"	10b5  82546GB PRO/1000 GT Quad Port Server Adapter",
-"		103c 3109  NC340T PCI-X Quad-port Gigabit Server Adapter",
-"	1107  PRO/1000 MF Server Adapter (LX)",
-"	1130  82815 815 Chipset Host Bridge and Memory Controller Hub",
-"		1025 1016  Travelmate 612 TX",
-"		1043 8027  TUSL2-C Mainboard",
-"		104d 80df  Vaio PCG-FX403",
-"		8086 4532  D815EEA2 mainboard",
-"		8086 4557  D815EGEW Mainboard",
-"	1131  82815 815 Chipset AGP Bridge",
-"	1132  82815 CGC [Chipset Graphics Controller]",
-"		1025 1016  Travelmate 612 TX",
-"		104d 80df  Vaio PCG-FX403",
-"		8086 4532  D815EEA2 Mainboard",
-"		8086 4541  D815EEA Motherboard",
-"		8086 4557  D815EGEW Mainboard",
-"	1161  82806AA PCI64 Hub Advanced Programmable Interrupt Controller",
-"		8086 1161  82806AA PCI64 Hub APIC",
-"	1162  Xscale 80200 Big Endian Companion Chip",
-"	1200  Intel IXP1200 Network Processor",
-"		172a 0000  AEP SSL Accelerator",
-"	1209  8255xER/82551IT Fast Ethernet Controller",
-"		4c53 1050  CT7 mainboard",
-"		4c53 1051  CE7 mainboard",
-"		4c53 1070  PC6 mainboard",
-"	1221  82092AA PCI to PCMCIA Bridge",
-"	1222  82092AA IDE Controller",
-"	1223  SAA7116",
-"	1225  82452KX/GX [Orion]",
-"	1226  82596 PRO/10 PCI",
-"	1227  82865 EtherExpress PRO/100A",
-"	1228  82556 EtherExpress PRO/100 Smart",
-"	1229  82557/8/9 [Ethernet Pro 100]",
-"		0e11 3001  82559 Fast Ethernet LOM with Alert on LAN*",
-"		0e11 3002  82559 Fast Ethernet LOM with Alert on LAN*",
-"		0e11 3003  82559 Fast Ethernet LOM with Alert on LAN*",
-"		0e11 3004  82559 Fast Ethernet LOM with Alert on LAN*",
-"		0e11 3005  82559 Fast Ethernet LOM with Alert on LAN*",
-"		0e11 3006  82559 Fast Ethernet LOM with Alert on LAN*",
-"		0e11 3007  82559 Fast Ethernet LOM with Alert on LAN*",
-"		0e11 b01e  NC3120 Fast Ethernet NIC",
-"		0e11 b01f  NC3122 Fast Ethernet NIC (dual port)",
-"		0e11 b02f  NC1120 Ethernet NIC",
-"		0e11 b04a  Netelligent 10/100TX NIC with Wake on LAN",
-"		0e11 b0c6  NC3161 Fast Ethernet NIC (embedded, WOL)",
-"		0e11 b0c7  NC3160 Fast Ethernet NIC (embedded)",
-"		0e11 b0d7  NC3121 Fast Ethernet NIC (WOL)",
-"		0e11 b0dd  NC3131 Fast Ethernet NIC (dual port)",
-"		0e11 b0de  NC3132 Fast Ethernet Module (dual port)",
-"		0e11 b0e1  NC3133 Fast Ethernet Module (100-FX)",
-"		0e11 b134  NC3163 Fast Ethernet NIC (embedded, WOL)",
-"		0e11 b13c  NC3162 Fast Ethernet NIC (embedded)",
-"		0e11 b144  NC3123 Fast Ethernet NIC (WOL)",
-"		0e11 b163  NC3134 Fast Ethernet NIC (dual port)",
-"		0e11 b164  NC3135 Fast Ethernet Upgrade Module (dual port)",
-"		0e11 b1a4  NC7131 Gigabit Server Adapter",
-"		1014 005c  82558B Ethernet Pro 10/100",
-"		1014 01bc  82559 Fast Ethernet LAN On Motherboard",
-"		1014 01f1  10/100 Ethernet Server Adapter",
-"		1014 01f2  10/100 Ethernet Server Adapter",
-"		1014 0207  Ethernet Pro/100 S",
-"		1014 0232  10/100 Dual Port Server Adapter",
-"		1014 023a  ThinkPad R30",
-"		1014 105c  Netfinity 10/100",
-"		1014 2205  ThinkPad A22p",
-"		1014 305c  10/100 EtherJet Management Adapter",
-"		1014 405c  10/100 EtherJet Adapter with Alert on LAN",
-"		1014 505c  10/100 EtherJet Secure Management Adapter",
-"		1014 605c  10/100 EtherJet Secure Management Adapter",
-"		1014 705c  10/100 Netfinity 10/100 Ethernet Security Adapter",
-"		1014 805c  10/100 Netfinity 10/100 Ethernet Security Adapter",
-"		1028 009b  PowerEdge 2500/2550",
-"		1028 00ce  PowerEdge 1400",
-"		1033 8000  PC-9821X-B06",
-"		1033 8016  PK-UG-X006",
-"		1033 801f  PK-UG-X006",
-"		1033 8026  PK-UG-X006",
-"		1033 8063  82559-based Fast Ethernet Adapter",
-"		1033 8064  82559-based Fast Ethernet Adapter",
-"		103c 10c0  NetServer 10/100TX",
-"		103c 10c3  NetServer 10/100TX",
-"		103c 10ca  NetServer 10/100TX",
-"		103c 10cb  NetServer 10/100TX",
-"		103c 10e3  NetServer 10/100TX",
-"		103c 10e4  NetServer 10/100TX",
-"		103c 1200  NetServer 10/100TX",
-"		108e 10cf  EtherExpress PRO/100(B)",
-"		10c3 1100  SmartEther100 SC1100",
-"		10cf 1115  8255x-based Ethernet Adapter (10/100)",
-"		10cf 1143  8255x-based Ethernet Adapter (10/100)",
-"		110a 008b  82551QM Fast Ethernet Multifuction PCI/CardBus Controller",
-"		1179 0001  8255x-based Ethernet Adapter (10/100)",
-"		1179 0002  PCI FastEther LAN on Docker",
-"		1179 0003  8255x-based Fast Ethernet",
-"		1259 2560  AT-2560 100",
-"		1259 2561  AT-2560 100 FX Ethernet Adapter",
-"		1266 0001  NE10/100 Adapter",
-"		13e9 1000  6221L-4U",
-"		144d 2501  SEM-2000 MiniPCI LAN Adapter",
-"		144d 2502  SEM-2100IL MiniPCI LAN Adapter",
-"		1668 1100  EtherExpress PRO/100B (TX) (MiniPCI Ethernet+Modem)",
-"		4c53 1080  CT8 mainboard",
-"		4c53 10e0  PSL09 PrPMC",
-"		8086 0001  EtherExpress PRO/100B (TX)",
-"		8086 0002  EtherExpress PRO/100B (T4)",
-"		8086 0003  EtherExpress PRO/10+",
-"		8086 0004  EtherExpress PRO/100 WfM",
-"		8086 0005  82557 10/100",
-"		8086 0006  82557 10/100 with Wake on LAN",
-"		8086 0007  82558 10/100 Adapter",
-"		8086 0008  82558 10/100 with Wake on LAN",
-"		8086 000a  EtherExpress PRO/100+ Management Adapter",
-"		8086 000b  EtherExpress PRO/100+",
-"		8086 000c  EtherExpress PRO/100+ Management Adapter",
-"		8086 000d  EtherExpress PRO/100+ Alert On LAN II* Adapter",
-"		8086 000e  EtherExpress PRO/100+ Management Adapter with Alert On LAN*",
-"		8086 000f  EtherExpress PRO/100 Desktop Adapter",
-"		8086 0010  EtherExpress PRO/100 S Management Adapter",
-"		8086 0011  EtherExpress PRO/100 S Management Adapter",
-"		8086 0012  EtherExpress PRO/100 S Advanced Management Adapter (D)",
-"		8086 0013  EtherExpress PRO/100 S Advanced Management Adapter (E)",
-"		8086 0030  EtherExpress PRO/100  Management Adapter with Alert On LAN* GC",
-"		8086 0031  EtherExpress PRO/100 Desktop Adapter",
-"		8086 0040  EtherExpress PRO/100 S Desktop Adapter",
-"		8086 0041  EtherExpress PRO/100 S Desktop Adapter",
-"		8086 0042  EtherExpress PRO/100 Desktop Adapter",
-"		8086 0050  EtherExpress PRO/100 S Desktop Adapter",
-"		8086 1009  EtherExpress PRO/100+ Server Adapter",
-"		8086 100c  EtherExpress PRO/100+ Server Adapter (PILA8470B)",
-"		8086 1012  EtherExpress PRO/100 S Server Adapter (D)",
-"		8086 1013  EtherExpress PRO/100 S Server Adapter (E)",
-"		8086 1015  EtherExpress PRO/100 S Dual Port Server Adapter",
-"		8086 1017  EtherExpress PRO/100+ Dual Port Server Adapter",
-"		8086 1030  EtherExpress PRO/100+ Management Adapter with Alert On LAN* G Server",
-"		8086 1040  EtherExpress PRO/100 S Server Adapter",
-"		8086 1041  EtherExpress PRO/100 S Server Adapter",
-"		8086 1042  EtherExpress PRO/100 Server Adapter",
-"		8086 1050  EtherExpress PRO/100 S Server Adapter",
-"		8086 1051  EtherExpress PRO/100 Server Adapter",
-"		8086 1052  EtherExpress PRO/100 Server Adapter",
-"		8086 10f0  EtherExpress PRO/100+ Dual Port Adapter",
-"		8086 2009  EtherExpress PRO/100 S Mobile Adapter",
-"		8086 200d  EtherExpress PRO/100 Cardbus",
-"		8086 200e  EtherExpress PRO/100 LAN+V90 Cardbus Modem",
-"		8086 200f  EtherExpress PRO/100 SR Mobile Adapter",
-"		8086 2010  EtherExpress PRO/100 S Mobile Combo Adapter",
-"		8086 2013  EtherExpress PRO/100 SR Mobile Combo Adapter",
-"		8086 2016  EtherExpress PRO/100 S Mobile Adapter",
-"		8086 2017  EtherExpress PRO/100 S Combo Mobile Adapter",
-"		8086 2018  EtherExpress PRO/100 SR Mobile Adapter",
-"		8086 2019  EtherExpress PRO/100 SR Combo Mobile Adapter",
-"		8086 2101  EtherExpress PRO/100 P Mobile Adapter",
-"		8086 2102  EtherExpress PRO/100 SP Mobile Adapter",
-"		8086 2103  EtherExpress PRO/100 SP Mobile Adapter",
-"		8086 2104  EtherExpress PRO/100 SP Mobile Adapter",
-"		8086 2105  EtherExpress PRO/100 SP Mobile Adapter",
-"		8086 2106  EtherExpress PRO/100 P Mobile Adapter",
-"		8086 2107  EtherExpress PRO/100 Network Connection",
-"		8086 2108  EtherExpress PRO/100 Network Connection",
-"		8086 2200  EtherExpress PRO/100 P Mobile Combo Adapter",
-"		8086 2201  EtherExpress PRO/100 P Mobile Combo Adapter",
-"		8086 2202  EtherExpress PRO/100 SP Mobile Combo Adapter",
-"		8086 2203  EtherExpress PRO/100+ MiniPCI",
-"		8086 2204  EtherExpress PRO/100+ MiniPCI",
-"		8086 2205  EtherExpress PRO/100 SP Mobile Combo Adapter",
-"		8086 2206  EtherExpress PRO/100 SP Mobile Combo Adapter",
-"		8086 2207  EtherExpress PRO/100 SP Mobile Combo Adapter",
-"		8086 2208  EtherExpress PRO/100 P Mobile Combo Adapter",
-"		8086 2402  EtherExpress PRO/100+ MiniPCI",
-"		8086 2407  EtherExpress PRO/100+ MiniPCI",
-"		8086 2408  EtherExpress PRO/100+ MiniPCI",
-"		8086 2409  EtherExpress PRO/100+ MiniPCI",
-"		8086 240f  EtherExpress PRO/100+ MiniPCI",
-"		8086 2410  EtherExpress PRO/100+ MiniPCI",
-"		8086 2411  EtherExpress PRO/100+ MiniPCI",
-"		8086 2412  EtherExpress PRO/100+ MiniPCI",
-"		8086 2413  EtherExpress PRO/100+ MiniPCI",
-"		8086 3000  82559 Fast Ethernet LAN on Motherboard",
-"		8086 3001  82559 Fast Ethernet LOM with Basic Alert on LAN*",
-"		8086 3002  82559 Fast Ethernet LOM with Alert on LAN II*",
-"		8086 3006  EtherExpress PRO/100 S Network Connection",
-"		8086 3007  EtherExpress PRO/100 S Network Connection",
-"		8086 3008  EtherExpress PRO/100 Network Connection",
-"		8086 3010  EtherExpress PRO/100 S Network Connection",
-"		8086 3011  EtherExpress PRO/100 S Network Connection",
-"		8086 3012  EtherExpress PRO/100 Network Connection",
-"		8086 3411  SDS2 Mainboard",
-"	122d  430FX - 82437FX TSC [Triton I]",
-"	122e  82371FB PIIX ISA [Triton I]",
-"	1230  82371FB PIIX IDE [Triton I]",
-"	1231  DSVD Modem",
-"	1234  430MX - 82371MX Mobile PCI I/O IDE Xcelerator (MPIIX)",
-"	1235  430MX - 82437MX Mob. System Ctrlr (MTSC) & 82438MX Data Path (MTDP)",
-"	1237  440FX - 82441FX PMC [Natoma]",
-"	1239  82371FB PIIX IDE Interface",
-"	123b  82380PB PCI to PCI Docking Bridge",
-"	123c  82380AB (MISA) Mobile PCI-to-ISA Bridge",
-"	123d  683053 Programmable Interrupt Device",
-"	123e  82466GX (IHPC) Integrated Hot-Plug Controller",
-"	123f  82466GX Integrated Hot-Plug Controller (IHPC)",
-"	1240  82752 (752) AGP Graphics Accelerator",
-"	124b  82380FB (MPCI2) Mobile Docking Controller",
-"	1250  430HX - 82439HX TXC [Triton II]",
-"	1360  82806AA PCI64 Hub PCI Bridge",
-"	1361  82806AA PCI64 Hub Controller (HRes)",
-"		8086 1361  82806AA PCI64 Hub Controller (HRes)",
-"		8086 8000  82806AA PCI64 Hub Controller (HRes)",
-"	1460  82870P2 P64H2 Hub PCI Bridge",
-"	1461  82870P2 P64H2 I/OxAPIC",
-"		15d9 3480  P4DP6",
-"		4c53 1090  Cx9/Vx9 mainboard",
-"	1462  82870P2 P64H2 Hot Plug Controller",
-"	1960  80960RP [i960RP Microprocessor]",
-"		101e 0431  MegaRAID 431 RAID Controller",
-"		101e 0438  MegaRAID 438 Ultra2 LVD RAID Controller",
-"		101e 0466  MegaRAID 466 Express Plus RAID Controller",
-"		101e 0467  MegaRAID 467 Enterprise 1500 RAID Controller",
-"		101e 0490  MegaRAID 490 Express 300 RAID Controller",
-"		101e 0762  MegaRAID 762 Express RAID Controller",
-"		101e 09a0  PowerEdge Expandable RAID Controller 2/SC",
-"		1028 0467  PowerEdge Expandable RAID Controller 2/DC",
-"		1028 1111  PowerEdge Expandable RAID Controller 2/SC",
-"		103c 03a2  MegaRAID",
-"		103c 10c6  MegaRAID 438, HP NetRAID-3Si",
-"		103c 10c7  MegaRAID T5, Integrated HP NetRAID",
-"		103c 10cc  MegaRAID, Integrated HP NetRAID",
-"		103c 10cd  HP NetRAID-1Si",
-"		105a 0000  SuperTrak",
-"		105a 2168  SuperTrak Pro",
-"		105a 5168  SuperTrak66/100",
-"		1111 1111  MegaRAID 466, PowerEdge Expandable RAID Controller 2/SC",
-"		1111 1112  PowerEdge Expandable RAID Controller 2/SC",
-"		113c 03a2  MegaRAID",
-"		e4bf 1010  CG1-RADIO",
-"		e4bf 1020  CU2-QUARTET",
-"		e4bf 1040  CU1-CHORUS",
-"		e4bf 3100  CX1-BAND",
-"	1962  80960RM [i960RM Microprocessor]",
-"		105a 0000  SuperTrak SX6000 I2O CPU",
-"	1a21  82840 840 (Carmel) Chipset Host Bridge (Hub A)",
-"	1a23  82840 840 (Carmel) Chipset AGP Bridge",
-"	1a24  82840 840 (Carmel) Chipset PCI Bridge (Hub B)",
-"	1a30  82845 845 (Brookdale) Chipset Host Bridge",
-"		1028 010e  Optiplex GX240",
-"	1a31  82845 845 (Brookdale) Chipset AGP Bridge",
-"	1a38  Server DMA Engine",
-"	1a48  PRO/10GbE SR Server Adapter",
-"	2410  82801AA ISA Bridge (LPC)",
-"	2411  82801AA IDE",
-"	2412  82801AA USB",
-"	2413  82801AA SMBus",
-"	2415  82801AA AC'97 Audio",
-"		1028 0095  Precision Workstation 220 Integrated Digital Audio",
-"		110a 0051  Activy 2xx",
-"		11d4 0040  SoundMAX Integrated Digital Audio",
-"		11d4 0048  SoundMAX Integrated Digital Audio",
-"		11d4 5340  SoundMAX Integrated Digital Audio",
-"		1734 1025  Activy 3xx",
-"	2416  82801AA AC'97 Modem",
-"	2418  82801AA PCI Bridge",
-"	2420  82801AB ISA Bridge (LPC)",
-"	2421  82801AB IDE",
-"	2422  82801AB USB",
-"	2423  82801AB SMBus",
-"	2425  82801AB AC'97 Audio",
-"		11d4 0040  SoundMAX Integrated Digital Audio",
-"		11d4 0048  SoundMAX Integrated Digital Audio",
-"	2426  82801AB AC'97 Modem",
-"	2428  82801AB PCI Bridge",
-"	2440  82801BA ISA Bridge (LPC)",
-"	2442  82801BA/BAM USB (Hub #1)",
-"		1014 01c6  Netvista A40/A40p",
-"		1025 1016  Travelmate 612 TX",
-"		1028 010e  Optiplex GX240",
-"		1043 8027  TUSL2-C Mainboard",
-"		104d 80df  Vaio PCG-FX403",
-"		147b 0507  TH7II-RAID",
-"		8086 4532  D815EEA2 mainboard",
-"		8086 4557  D815EGEW Mainboard",
-"	2443  82801BA/BAM SMBus",
-"		1014 01c6  Netvista A40/A40p",
-"		1025 1016  Travelmate 612 TX",
-"		1028 010e  Optiplex GX240",
-"		1043 8027  TUSL2-C Mainboard",
-"		104d 80df  Vaio PCG-FX403",
-"		147b 0507  TH7II-RAID",
-"		8086 4532  D815EEA2 mainboard",
-"		8086 4557  D815EGEW Mainboard",
-"	2444  82801BA/BAM USB (Hub #2)",
-"		1025 1016  Travelmate 612 TX",
-"		1028 010e  Optiplex GX240",
-"		1043 8027  TUSL2-C Mainboard",
-"		104d 80df  Vaio PCG-FX403",
-"		147b 0507  TH7II-RAID",
-"		8086 4532  D815EEA2 mainboard",
-"	2445  82801BA/BAM AC'97 Audio",
-"		0e11 0088  Evo D500",
-"		1014 01c6  Netvista A40/A40p",
-"		1025 1016  Travelmate 612 TX",
-"		104d 80df  Vaio PCG-FX403",
-"		1462 3370  STAC9721 AC",
-"		147b 0507  TH7II-RAID",
-"		8086 4557  D815EGEW Mainboard",
-"	2446  82801BA/BAM AC'97 Modem",
-"		1025 1016  Travelmate 612 TX",
-"		104d 80df  Vaio PCG-FX403",
-"	2448  82801 Mobile PCI Bridge",
-"		103c 099c  NX6110/NC6120",
-"		1734 1055  Amilo M1420",
-"	2449  82801BA/BAM/CA/CAM Ethernet Controller",
-"		0e11 0012  EtherExpress PRO/100 VM",
-"		0e11 0091  EtherExpress PRO/100 VE",
-"		1014 01ce  EtherExpress PRO/100 VE",
-"		1014 01dc  EtherExpress PRO/100 VE",
-"		1014 01eb  EtherExpress PRO/100 VE",
-"		1014 01ec  EtherExpress PRO/100 VE",
-"		1014 0202  EtherExpress PRO/100 VE",
-"		1014 0205  EtherExpress PRO/100 VE",
-"		1014 0217  EtherExpress PRO/100 VE",
-"		1014 0234  EtherExpress PRO/100 VE",
-"		1014 023d  EtherExpress PRO/100 VE",
-"		1014 0244  EtherExpress PRO/100 VE",
-"		1014 0245  EtherExpress PRO/100 VE",
-"		1014 0265  PRO/100 VE Desktop Connection",
-"		1014 0267  PRO/100 VE Desktop Connection",
-"		1014 026a  PRO/100 VE Desktop Connection",
-"		109f 315d  EtherExpress PRO/100 VE",
-"		109f 3181  EtherExpress PRO/100 VE",
-"		1179 ff01  PRO/100 VE Network Connection",
-"		1186 7801  EtherExpress PRO/100 VE",
-"		144d 2602  HomePNA 1M CNR",
-"		8086 3010  EtherExpress PRO/100 VE",
-"		8086 3011  EtherExpress PRO/100 VM",
-"		8086 3012  82562EH based Phoneline",
-"		8086 3013  EtherExpress PRO/100 VE",
-"		8086 3014  EtherExpress PRO/100 VM",
-"		8086 3015  82562EH based Phoneline",
-"		8086 3016  EtherExpress PRO/100 P Mobile Combo",
-"		8086 3017  EtherExpress PRO/100 P Mobile",
-"		8086 3018  EtherExpress PRO/100",
-"	244a  82801BAM IDE U100",
-"		1025 1016  Travelmate 612TX",
-"		104d 80df  Vaio PCG-FX403",
-"	244b  82801BA IDE U100",
-"		1014 01c6  Netvista A40/A40p",
-"		1028 010e  Optiplex GX240",
-"		1043 8027  TUSL2-C Mainboard",
-"		147b 0507  TH7II-RAID",
-"		8086 4532  D815EEA2 mainboard",
-"		8086 4557  D815EGEW Mainboard",
-"	244c  82801BAM ISA Bridge (LPC)",
-"	244e  82801 PCI Bridge",
-"		1014 0267  NetVista A30p",
-"	2450  82801E ISA Bridge (LPC)",
-"	2452  82801E USB",
-"	2453  82801E SMBus",
-"	2459  82801E Ethernet Controller 0",
-"	245b  82801E IDE U100",
-"	245d  82801E Ethernet Controller 1",
-"	245e  82801E PCI Bridge",
-"	2480  82801CA LPC Interface Controller",
-"	2482  82801CA/CAM USB (Hub #1)",
-"		0e11 0030  Evo N600c",
-"		1014 0220  ThinkPad A/T/X Series",
-"		104d 80e7  VAIO PCG-GR214EP/GR214MP/GR215MP/GR314MP/GR315MP",
-"		15d9 3480  P4DP6",
-"		8086 1958  vpr Matrix 170B4",
-"		8086 3424  SE7501HG2 Mainboard",
-"		8086 4541  Latitude C640",
-"	2483  82801CA/CAM SMBus Controller",
-"		1014 0220  ThinkPad A/T/X Series",
-"		104d 80e7  VAIO PCG-GR214EP/GR214MP/GR215MP/GR314MP/GR315MP",
-"		15d9 3480  P4DP6",
-"		8086 1958  vpr Matrix 170B4",
-"	2484  82801CA/CAM USB (Hub #2)",
-"		0e11 0030  Evo N600c",
-"		1014 0220  ThinkPad A/T/X Series",
-"		104d 80e7  VAIO PCG-GR214EP/GR214MP/GR215MP/GR314MP/GR315MP",
-"		15d9 3480  P4DP6",
-"		8086 1958  vpr Matrix 170B4",
-"	2485  82801CA/CAM AC'97 Audio Controller",
-"		1013 5959  Crystal WMD Audio Codec",
-"		1014 0222  ThinkPad T23 (2647-4MG) or A30/A30p (2652/2653)",
-"		1014 0508  ThinkPad T30",
-"		1014 051c  ThinkPad A/T/X Series",
-"		104d 80e7  VAIO PCG-GR214EP/GR214MP/GR215MP/GR314MP/GR315MP",
-"		144d c006  vpr Matrix 170B4",
-"	2486  82801CA/CAM AC'97 Modem Controller",
-"		1014 0223  ThinkPad A/T/X Series",
-"		1014 0503  ThinkPad R31 2656BBG",
-"		1014 051a  ThinkPad A/T/X Series",
-"		101f 1025  620 Series",
-"		104d 80e7  VAIO PCG-GR214EP/GR214MP/GR215MP/GR314MP/GR315MP",
-"		134d 4c21  Dell Inspiron 2100 internal modem",
-"		144d 2115  vpr Matrix 170B4 internal modem",
-"		14f1 5421  MD56ORD V.92 MDC Modem",
-"	2487  82801CA/CAM USB (Hub #3)",
-"		0e11 0030  Evo N600c",
-"		1014 0220  ThinkPad A/T/X Series",
-"		104d 80e7  VAIO PCG-GR214EP/GR214MP/GR215MP/GR314MP/GR315MP",
-"		15d9 3480  P4DP6",
-"		8086 1958  vpr Matrix 170B4",
-"	248a  82801CAM IDE U100",
-"		0e11 0030  Evo N600c",
-"		1014 0220  ThinkPad A/T/X Series",
-"		104d 80e7  VAIO PCG-GR214EP/GR214MP/GR215MP/GR314MP/GR315MP",
-"		8086 1958  vpr Matrix 170B4",
-"		8086 4541  Latitude C640",
-"	248b  82801CA Ultra ATA Storage Controller",
-"		15d9 3480  P4DP6",
-"	248c  82801CAM ISA Bridge (LPC)",
-"	24c0  82801DB/DBL (ICH4/ICH4-L) LPC Interface Bridge",
-"		1014 0267  NetVista A30p",
-"		1462 5800  845PE Max (MS-6580)",
-"	24c1  82801DBL (ICH4-L) IDE Controller",
-"	24c2  82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #1",
-"		1014 0267  NetVista A30p",
-"		1025 005a  TravelMate 290",
-"		1028 0126  Optiplex GX260",
-"		1028 0163  Latitude D505",
-"		1028 0196  Inspiron 5160",
-"		103c 088c  NC8000 laptop",
-"		103c 0890  NC6000 laptop",
-"		1071 8160  MIM2000",
-"		1462 5800  845PE Max (MS-6580)",
-"		1509 2990  Averatec 5110H laptop",
-"		1734 1004  D1451 Mainboard (SCENIC N300, i845GV)",
-"		1734 1055  Amilo M1420",
-"		4c53 1090  Cx9 / Vx9 mainboard",
-"		8086 4541  Latitude D400",
-"	24c3  82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) SMBus Controller",
-"		1014 0267  NetVista A30p",
-"		1025 005a  TravelMate 290",
-"		1028 0126  Optiplex GX260",
-"		103c 088c  NC8000 laptop",
-"		103c 0890  NC6000 laptop",
-"		1071 8160  MIM2000",
-"		1458 24c2  GA-8PE667 Ultra",
-"		1462 5800  845PE Max (MS-6580)",
-"		1734 1004  D1451 Mainboard (SCENIC N300, i845GV)",
-"		1734 1055  Amilo M1420",
-"		4c53 1090  Cx9 / Vx9 mainboard",
-"	24c4  82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #2",
-"		1014 0267  NetVista A30p",
-"		1025 005a  TravelMate 290",
-"		1028 0126  Optiplex GX260",
-"		1028 0163  Latitude D505",
-"		1028 0196  Inspiron 5160",
-"		103c 088c  NC8000 laptop",
-"		103c 0890  NC6000 laptop",
-"		1071 8160  MIM2000",
-"		1462 5800  845PE Max (MS-6580)",
-"		1509 2990  Averatec 5110H",
-"		1734 1004  D1451 Mainboard (SCENIC N300, i845GV)",
-"		4c53 1090  Cx9 / Vx9 mainboard",
-"		8086 4541  Latitude D400",
-"	24c5  82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Audio Controller",
-"		0e11 00b8  Analog Devices Inc. codec [SoundMAX]",
-"		1014 0267  NetVista A30p",
-"		1025 005a  TravelMate 290",
-"		1028 0139  Latitude D400",
-"		1028 0163  Latitude D505",
-"		1028 0196  Inspiron 5160",
-"		103c 088c  NC8000 laptop",
-"		103c 0890  NC6000 laptop",
-"		1071 8160  MIM2000",
-"		1458 a002  GA-8PE667 Ultra",
-"		1462 5800  845PE Max (MS-6580)",
-"		1734 1005  D1451 (SCENIC N300, i845GV) Sigmatel STAC9750T",
-"		1734 1055  Amilo M1420",
-"	24c6  82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Modem Controller",
-"		1025 003c  Aspire 2001WLCi (Compal CL50 motherboard) implementation",
-"		1025 005a  TravelMate 290",
-"		1028 0196  Inspiron 5160",
-"		103c 088c  NC8000 laptop",
-"		103c 0890  NC6000 laptop",
-"		1071 8160  MIM2000",
-"	24c7  82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #3",
-"		1014 0267  NetVista A30p",
-"		1025 005a  TravelMate 290",
-"		1028 0126  Optiplex GX260",
-"		1028 0163  Latitude D505",
-"		1028 0196  Inspiron 5160",
-"		103c 088c  NC8000 laptop",
-"		103c 0890  NC6000 laptop",
-"		1071 8160  MIM2000",
-"		1462 5800  845PE Max (MS-6580)",
-"		1509 2990  Averatec 5110H",
-"		1734 1004  D1451 Mainboard (SCENIC N300, i845GV)",
-"		4c53 1090  Cx9 / Vx9 mainboard",
-"		8086 4541  Latitude D400",
-"	24ca  82801DBM (ICH4-M) IDE Controller",
-"		1025 005a  TravelMate 290",
-"		1028 0163  Latitude D505",
-"		1028 0196  Inspiron 5160",
-"		103c 088c  NC8000 laptop",
-"		103c 0890  NC6000 laptop",
-"		1071 8160  MIM2000",
-"		1734 1055  Amilo M1420",
-"		8086 4541  Latitude D400",
-"	24cb  82801DB (ICH4) IDE Controller",
-"		1014 0267  NetVista A30p",
-"		1028 0126  Optiplex GX260",
-"		1458 24c2  GA-8PE667 Ultra",
-"		1462 5800  845PE Max (MS-6580)",
-"		1734 1004  D1451 Mainboard (SCENIC N300, i845GV)",
-"		4c53 1090  Cx9 / Vx9 mainboard",
-"	24cc  82801DBM (ICH4-M) LPC Interface Bridge",
-"		1734 1055  Amilo M1420",
-"	24cd  82801DB/DBM (ICH4/ICH4-M) USB2 EHCI Controller",
-"		1014 0267  NetVista A30p",
-"		1025 005a  TravelMate 290",
-"		1028 011d  Latitude D600",
-"		1028 0126  Optiplex GX260",
-"		1028 0139  Latitude D400",
-"		1028 0163  Latitude D505",
-"		1028 0196  Inspiron 5160",
-"		103c 088c  NC8000 laptop",
-"		103c 0890  NC6000 laptop",
-"		1071 8160  MIM2000",
-"		1462 3981  845PE Max (MS-6580)",
-"		1509 1968  Averatec 5110H",
-"		1734 1004  D1451 Mainboard (SCENIC N300, i845GV)",
-"		1734 1055  Amilo M1420",
-"		4c53 1090  Cx9 / Vx9 mainboard",
-"	24d0  82801EB/ER (ICH5/ICH5R) LPC Interface Bridge",
-"	24d1  82801EB (ICH5) SATA Controller",
-"		1028 0169  Precision 470",
-"		1028 019a  PowerEdge SC1425",
-"		103c 12bc  d530 CMT (DG746A)",
-"		1043 80a6  P4P800 SE Mainboard",
-"		1458 24d1  GA-8IPE1000 Pro2 motherboard (865PE)",
-"		1462 7280  865PE Neo2 (MS-6728)",
-"		15d9 4580  P4SCE Mainboard",
-"		8086 3427  S875WP1-E mainboard",
-"		8086 4246  Desktop Board D865GBF",
-"		8086 524c  D865PERL mainboard",
-"	24d2  82801EB/ER (ICH5/ICH5R) USB UHCI Controller #1",
-"		1014 02ed  xSeries server mainboard",
-"		1028 0169  Precision 470",
-"		1028 0183  PowerEdge 1800",
-"		1028 019a  PowerEdge SC1425",
-"		103c 006a  NX9500",
-"		103c 12bc  d530 CMT (DG746A)",
-"		1043 80a6  P5P800-MX Mainboard",
-"		1458 24d2  GA-8IPE1000/8KNXP motherboard",
-"		1462 7280  865PE Neo2 (MS-6728)",
-"		15d9 4580  P4SCE Mainboard",
-"		1734 101c  Primergy RX300 S2",
-"		8086 3427  S875WP1-E mainboard",
-"		8086 4246  Desktop Board D865GBF",
-"		8086 524c  D865PERL mainboard",
-"	24d3  82801EB/ER (ICH5/ICH5R) SMBus Controller",
-"		1014 02ed  xSeries server mainboard",
-"		1028 0156  Precision 360",
-"		1028 0169  Precision 470",
-"		1043 80a6  P4P800 Mainboard",
-"		1458 24d2  GA-8IPE1000 Pro2 motherboard (865PE)",
-"		1462 7280  865PE Neo2 (MS-6728)",
-"		15d9 4580  P4SCE Mainboard",
-"		1734 101c  Primergy RX300 S2",
-"		8086 3427  S875WP1-E mainboard",
-"		8086 4246  Desktop Board D865GBF",
-"		8086 524c  D865PERL mainboard",
-"	24d4  82801EB/ER (ICH5/ICH5R) USB UHCI Controller #2",
-"		1014 02ed  xSeries server mainboard",
-"		1028 0169  Precision 470",
-"		1028 0183  PowerEdge 1800",
-"		1028 019a  PowerEdge SC1425",
-"		103c 006a  NX9500",
-"		103c 12bc  d530 CMT (DG746A)",
-"		1043 80a6  P5P800-MX Mainboard",
-"		1458 24d2  GA-8IPE1000 Pro2 motherboard (865PE)",
-"		1462 7280  865PE Neo2 (MS-6728)",
-"		15d9 4580  P4SCE Mainboard",
-"		1734 101c  Primergy RX300 S2",
-"		8086 3427  S875WP1-E mainboard",
-"		8086 4246  Desktop Board D865GBF",
-"		8086 524c  D865PERL mainboard",
-"	24d5  82801EB/ER (ICH5/ICH5R) AC'97 Audio Controller",
-"		1028 0169  Precision 470",
-"		103c 006a  NX9500",
-"		103c 12bc  d330 uT",
-"		1043 80f3  P4P800 Mainboard",
-"		1043 810f  P5P800-MX Mainboard",
-"		1458 a002  GA-8IPE1000/8KNXP motherboard",
-"		1462 0080  65PE Neo2-V (MS-6788) mainboard",
-"		1462 7280  865PE Neo2 (MS-6728)",
-"		8086 a000  D865PERL mainboard",
-"		8086 e000  D865PERL mainboard",
-"		8086 e001  Desktop Board D865GBF",
-"	24d6  82801EB/ER (ICH5/ICH5R) AC'97 Modem Controller",
-"		103c 006a  NX9500",
-"	24d7  82801EB/ER (ICH5/ICH5R) USB UHCI Controller #3",
-"		1014 02ed  xSeries server mainboard",
-"		1028 0169  Precision 470",
-"		1028 0183  PowerEdge 1800",
-"		103c 006a  NX9500",
-"		103c 12bc  d530 CMT (DG746A)",
-"		1043 80a6  P5P800-MX Mainboard",
-"		1458 24d2  GA-8IPE1000 Pro2 motherboard (865PE)",
-"		1462 7280  865PE Neo2 (MS-6728)",
-"		15d9 4580  P4SCE Mainboard",
-"		1734 101c  Primergy RX300 S2",
-"		8086 3427  S875WP1-E mainboard",
-"		8086 4246  Desktop Board D865GBF",
-"		8086 524c  D865PERL mainboard",
-"	24db  82801EB/ER (ICH5/ICH5R) IDE Controller",
-"		1014 02ed  xSeries server mainboard",
-"		1028 0169  Precision 470",
-"		1028 019a  PowerEdge SC1425",
-"		103c 006a  NX9500",
-"		103c 12bc  d530 CMT (DG746A)",
-"		1043 80a6  P5P800-MX Mainboard",
-"		1458 24d2  GA-8IPE1000 Pro2 motherboard (865PE)",
-"		1462 7280  865PE Neo2 (MS-6728)",
-"		1462 7580  MSI 875P",
-"		15d9 4580  P4SCE Mainboard",
-"		1734 101c  Primergy RX300 S2",
-"		8086 24db  P4C800 Mainboard",
-"		8086 3427  S875WP1-E mainboard",
-"		8086 4246  Desktop Board D865GBF",
-"		8086 524c  D865PERL mainboard",
-"	24dc  82801EB (ICH5) LPC Interface Bridge",
-"	24dd  82801EB/ER (ICH5/ICH5R) USB2 EHCI Controller",
-"		1014 02ed  xSeries server mainboard",
-"		1028 0169  Precision 470",
-"		1028 0183  PowerEdge 1800",
-"		1028 019a  PowerEdge SC1425",
-"		103c 006a  NX9500",
-"		103c 12bc  d530 CMT (DG746A)",
-"		1043 80a6  P5P800-MX Mainboard",
-"		1458 5006  GA-8IPE1000 Pro2 motherboard (865PE)",
-"		1462 7280  865PE Neo2 (MS-6728)",
-"		8086 3427  S875WP1-E mainboard",
-"		8086 4246  Desktop Board D865GBF",
-"		8086 524c  D865PERL mainboard",
-"	24de  82801EB/ER (ICH5/ICH5R) USB UHCI Controller #4",
-"		1014 02ed  xSeries server mainboard",
-"		1028 0169  Precision 470",
-"		1043 80a6  P5P800-MX Mainboard",
-"		1458 24d2  GA-8IPE1000 Pro2 motherboard (865PE)",
-"		1462 7280  865PE Neo2 (MS-6728)",
-"		15d9 4580  P4SCE Mainboard",
-"		1734 101c  Primergy RX300 S2",
-"		8086 3427  S875WP1-E mainboard",
-"		8086 4246  Desktop Board D865GBF",
-"		8086 524c  D865PERL mainboard",
-"	24df  82801ER (ICH5R) SATA Controller",
-"	2500  82820 820 (Camino) Chipset Host Bridge (MCH)",
-"		1028 0095  Precision Workstation 220 Chipset",
-"		1043 801c  P3C-2000 system chipset",
-"	2501  82820 820 (Camino) Chipset Host Bridge (MCH)",
-"		1043 801c  P3C-2000 system chipset",
-"	250b  82820 820 (Camino) Chipset Host Bridge",
-"	250f  82820 820 (Camino) Chipset AGP Bridge",
-"	2520  82805AA MTH Memory Translator Hub",
-"	2521  82804AA MRH-S Memory Repeater Hub for SDRAM",
-"	2530  82850 850 (Tehama) Chipset Host Bridge (MCH)",
-"		147b 0507  TH7II-RAID",
-"	2531  82860 860 (Wombat) Chipset Host Bridge (MCH)",
-"	2532  82850 850 (Tehama) Chipset AGP Bridge",
-"	2533  82860 860 (Wombat) Chipset AGP Bridge",
-"	2534  82860 860 (Wombat) Chipset PCI Bridge",
-"	2540  E7500 Memory Controller Hub",
-"		15d9 3480  P4DP6",
-"	2541  E7500/E7501 Host RASUM Controller",
-"		15d9 3480  P4DP6",
-"		4c53 1090  Cx9 / Vx9 mainboard",
-"		8086 3424  SE7501HG2 Mainboard",
-"	2543  E7500/E7501 Hub Interface B PCI-to-PCI Bridge",
-"	2544  E7500/E7501 Hub Interface B RASUM Controller",
-"		4c53 1090  Cx9 / Vx9 mainboard",
-"	2545  E7500/E7501 Hub Interface C PCI-to-PCI Bridge",
-"	2546  E7500/E7501 Hub Interface C RASUM Controller",
-"	2547  E7500/E7501 Hub Interface D PCI-to-PCI Bridge",
-"	2548  E7500/E7501 Hub Interface D RASUM Controller",
-"	254c  E7501 Memory Controller Hub",
-"		4c53 1090  Cx9 / Vx9 mainboard",
-"		8086 3424  SE7501HG2 Mainboard",
-"	2550  E7505 Memory Controller Hub",
-"	2551  E7505/E7205 Series RAS Controller",
-"	2552  E7505/E7205 PCI-to-AGP Bridge",
-"	2553  E7505 Hub Interface B PCI-to-PCI Bridge",
-"	2554  E7505 Hub Interface B PCI-to-PCI Bridge RAS Controller",
-"	255d  E7205 Memory Controller Hub",
-"	2560  82845G/GL[Brookdale-G]/GE/PE DRAM Controller/Host-Hub Interface",
-"		1028 0126  Optiplex GX260",
-"		1458 2560  GA-8PE667 Ultra",
-"		1462 5800  845PE Max (MS-6580)",
-"	2561  82845G/GL[Brookdale-G]/GE/PE Host-to-AGP Bridge",
-"	2562  82845G/GL[Brookdale-G]/GE Chipset Integrated Graphics Device",
-"		0e11 00b9  Evo D510 SFF",
-"		1014 0267  NetVista A30p",
-"		1734 1004  D1451 Mainboard (SCENIC N300, i845GV)",
-"	2570  82865G/PE/P DRAM Controller/Host-Hub Interface",
-"		103c 006a  NX9500",
-"		1043 80f2  P5P800-MX Mainboard",
-"		1458 2570  GA-8IPE1000 Pro2 motherboard (865PE)",
-"	2571  82865G/PE/P PCI to AGP Controller",
-"	2572  82865G Integrated Graphics Controller",
-"		1028 019d  Dimension 3000",
-"		103c 12bc  D530 sff(dc578av)",
-"		1043 80a5  P5P800-MX Mainboard",
-"		8086 4246  Desktop Board D865GBF",
-"	2573  82865G/PE/P PCI to CSA Bridge",
-"	2576  82865G/PE/P Processor to I/O Memory Interface",
-"	2578  82875P/E7210 Memory Controller Hub",
-"		1458 2578  GA-8KNXP motherboard (875P)",
-"		1462 7580  MS-6758 (875P Neo)",
-"		15d9 4580  P4SCE Motherboard",
-"	2579  82875P Processor to AGP Controller",
-"	257b  82875P/E7210 Processor to PCI to CSA Bridge",
-"	257e  82875P/E7210 Processor to I/O Memory Interface",
-"	2580  915G/P/GV/GL/PL/910GL Express Memory Controller Hub",
-"		1458 2580  GA-8I915ME-G Mainboard",
-"		1462 7028  915P/G Neo2",
-"		1734 105b  Scenic W620",
-"	2581  915G/P/GV/GL/PL/910GL Express PCI Express Root Port",
-"	2582  82915G/GV/910GL Express Chipset Family Graphics Controller",
-"		1028 1079  Optiplex GX280",
-"		103c 3006  DC7100 SFF(DX878AV)",
-"		1043 2582  P5GD1-VW Mainboard",
-"		1458 2582  GA-8I915ME-G Mainboard",
-"		1734 105b  Scenic W620",
-"	2584  925X/XE Express Memory Controller Hub",
-"	2585  925X/XE Express PCI Express Root Port",
-"	2588  E7220/E7221 Memory Controller Hub",
-"	2589  E7220/E7221 PCI Express Root Port",
-"	258a  E7221 Integrated Graphics Controller",
-"	2590  Mobile 915GM/PM/GMS/910GML Express Processor to DRAM Controller",
-"		1028 0182  Dell Latidude C610",
-"		103c 099c  NX6110/NC6120",
-"		a304 81b7  Vaio VGN-S3XP",
-"	2591  Mobile 915GM/PM Express PCI Express Root Port",
-"	2592  Mobile 915GM/GMS/910GML Express Graphics Controller",
-"		103c 099c  NX6110/NC6120",
-"		103c 308a  NC6220",
-"		1043 1881  GMA 900 915GM Integrated Graphics",
-"	25a1  6300ESB LPC Interface Controller",
-"	25a2  6300ESB PATA Storage Controller",
-"		4c53 10b0  CL9 mainboard",
-"		4c53 10e0  PSL09 PrPMC",
-"	25a3  6300ESB SATA Storage Controller",
-"		4c53 10b0  CL9 mainboard",
-"		4c53 10d0  Telum ASLP10 Processor AMC",
-"		4c53 10e0  PSL09 PrPMC",
-"	25a4  6300ESB SMBus Controller",
-"		4c53 10b0  CL9 mainboard",
-"		4c53 10d0  Telum ASLP10 Processor AMC",
-"		4c53 10e0  PSL09 PrPMC",
-"	25a6  6300ESB AC'97 Audio Controller",
-"		4c53 10b0  CL9 mainboard",
-"	25a7  6300ESB AC'97 Modem Controller",
-"	25a9  6300ESB USB Universal Host Controller",
-"		4c53 10b0  CL9 mainboard",
-"		4c53 10d0  Telum ASLP10 Processor AMC",
-"		4c53 10e0  PSL09 PrPMC",
-"	25aa  6300ESB USB Universal Host Controller",
-"		4c53 10b0  CL9 mainboard",
-"		4c53 10e0  PSL09 PrPMC",
-"	25ab  6300ESB Watchdog Timer",
-"		4c53 10b0  CL9 mainboard",
-"		4c53 10d0  Telum ASLP10 Processor AMC",
-"		4c53 10e0  PSL09 PrPMC",
-"	25ac  6300ESB I/O Advanced Programmable Interrupt Controller",
-"		4c53 10b0  CL9 mainboard",
-"		4c53 10d0  Telum ASLP10 Processor AMC",
-"		4c53 10e0  PSL09 PrPMC",
-"	25ad  6300ESB USB2 Enhanced Host Controller",
-"		4c53 10b0  CL9 mainboard",
-"		4c53 10d0  Telum ASLP10 Processor AMC",
-"		4c53 10e0  PSL09 PrPMC",
-"	25ae  6300ESB 64-bit PCI-X Bridge",
-"	25b0  6300ESB SATA RAID Controller",
-"		4c53 10d0  Telum ASLP10 Processor AMC",
-"		4c53 10e0  PSL09 PrPMC",
-"	25c0  Workstation Memory Controller Hub",
-"	25d0  Server Memory Controller Hub",
-"	25d4  Server Memory Contoller Hub",
-"	25d8  Server Memory Controller Hub",
-"	25e2  Server PCI Express x4 Port 2",
-"	25e3  Server PCI Express x4 Port 3",
-"	25e4  Server PCI Express x4 Port 4",
-"	25e5  Server PCI Express x4 Port 5",
-"	25e6  Server PCI Express x4 Port 6",
-"	25e7  Server PCI Express x4 Port 7",
-"	25e8  Server AMB Memory Mapped Registers",
-"	25f0  Server Error Reporting Registers",
-"	25f1  Reserved Registers",
-"	25f3  Reserved Registers",
-"	25f5  Server FBD Registers",
-"	25f6  Server FBD Registers",
-"	25f7  Server PCI Express x8 Port 2-3",
-"	25f8  Server PCI Express x8 Port 4-5",
-"	25f9  Server PCI Express x8 Port 6-7",
-"	25fa  Server PCI Express x16 Port 4-7",
-"	2600  E8500/E8501 Hub Interface 1.5",
-"	2601  E8500/E8501 PCI Express x4 Port D",
-"	2602  E8500/E8501 PCI Express x4 Port C0",
-"	2603  E8500/E8501 PCI Express x4 Port C1",
-"	2604  E8500/E8501 PCI Express x4 Port B0",
-"	2605  E8500/E8501 PCI Express x4 Port B1",
-"	2606  E8500/E8501 PCI Express x4 Port A0",
-"	2607  E8500/E8501 PCI Express x4 Port A1",
-"	2608  E8500/E8501 PCI Express x8 Port C",
-"	2609  E8500/E8501 PCI Express x8 Port B",
-"	260a  E8500/E8501 PCI Express x8 Port A",
-"	260c  E8500/E8501 IMI Registers",
-"	2610  E8500/E8501 Front Side Bus, Boot, and Interrupt Registers",
-"	2611  E8500/E8501 Address Mapping Registers",
-"	2612  E8500/E8501 RAS Registers",
-"	2613  E8500/E8501 Reserved Registers",
-"	2614  E8500/E8501 Reserved Registers",
-"	2615  E8500/E8501 Miscellaneous Registers",
-"	2617  E8500/E8501 Reserved Registers",
-"	2618  E8500/E8501 Reserved Registers",
-"	2619  E8500/E8501 Reserved Registers",
-"	261a  E8500/E8501 Reserved Registers",
-"	261b  E8500/E8501 Reserved Registers",
-"	261c  E8500/E8501 Reserved Registers",
-"	261d  E8500/E8501 Reserved Registers",
-"	261e  E8500/E8501 Reserved Registers",
-"	2620  E8500/E8501 eXternal Memory Bridge",
-"	2621  E8500/E8501 XMB Miscellaneous Registers",
-"	2622  E8500/E8501 XMB Memory Interleaving Registers",
-"	2623  E8500/E8501 XMB DDR Initialization and Calibration",
-"	2624  E8500/E8501 XMB Reserved Registers",
-"	2625  E8500/E8501 XMB Reserved Registers",
-"	2626  E8500/E8501 XMB Reserved Registers",
-"	2627  E8500/E8501 XMB Reserved Registers",
-"	2640  82801FB/FR (ICH6/ICH6R) LPC Interface Bridge",
-"		1462 7028  915P/G Neo2",
-"		1734 105c  Scenic W620",
-"	2641  82801FBM (ICH6M) LPC Interface Bridge",
-"		103c 099c  NX6110/NC6120",
-"	2642  82801FW/FRW (ICH6W/ICH6RW) LPC Interface Bridge",
-"	2651  82801FB/FW (ICH6/ICH6W) SATA Controller",
-"		1028 0179  Optiplex GX280",
-"		1043 2601  P5GD1-VW Mainboard",
-"		1734 105c  Scenic W620",
-"		8086 4147  D915GAG Motherboard",
-"	2652  82801FR/FRW (ICH6R/ICH6RW) SATA Controller",
-"		1462 7028  915P/G Neo2",
-"	2653  82801FBM (ICH6M) SATA Controller",
-"	2658  82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #1",
-"		1028 0179  Optiplex GX280",
-"		103c 099c  NX6110/NC6120",
-"		1043 80a6  P5GD1-VW Mainboard",
-"		1458 2558  GA-8I915ME-G Mainboard",
-"		1462 7028  915P/G Neo2",
-"		1734 105c  Scenic W620",
-"	2659  82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #2",
-"		1028 0179  Optiplex GX280",
-"		103c 099c  NX6110/NC6120",
-"		1043 80a6  P5GD1-VW Mainboard",
-"		1458 2659  GA-8I915ME-G Mainboard",
-"		1462 7028  915P/G Neo2",
-"		1734 105c  Scenic W620",
-"	265a  82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #3",
-"		1028 0179  Optiplex GX280",
-"		103c 099c  NX6110/NC6120",
-"		1043 80a6  P5GD1-VW Mainboard",
-"		1458 265a  GA-8I915ME-G Mainboard",
-"		1462 7028  915P/G Neo2",
-"		1734 105c  Scenic W620",
-"	265b  82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #4",
-"		1028 0179  Optiplex GX280",
-"		103c 099c  NX6110/NC6120",
-"		1043 80a6  P5GD1-VW Mainboard",
-"		1458 265a  GA-8I915ME-G Mainboard",
-"		1462 7028  915P/G Neo2",
-"		1734 105c  Scenic W620",
-"	265c  82801FB/FBM/FR/FW/FRW (ICH6 Family) USB2 EHCI Controller",
-"		1028 0179  Optiplex GX280",
-"		103c 099c  NX6110/NC6120",
-"		1043 80a6  P5GD1-VW Mainboard",
-"		1458 5006  GA-8I915ME-G Mainboard",
-"		1462 7028  915P/G Neo2",
-"		1734 105c  Scenic W620",
-"	2660  82801FB/FBM/FR/FW/FRW (ICH6 Family) PCI Express Port 1",
-"		103c 099c  NX6110/NC6120",
-"	2662  82801FB/FBM/FR/FW/FRW (ICH6 Family) PCI Express Port 2",
-"	2664  82801FB/FBM/FR/FW/FRW (ICH6 Family) PCI Express Port 3",
-"	2666  82801FB/FBM/FR/FW/FRW (ICH6 Family) PCI Express Port 4",
-"	2668  82801FB/FBM/FR/FW/FRW (ICH6 Family) High Definition Audio Controller",
-"		1043 814e  P5GD1-VW Mainboard",
-"	266a  82801FB/FBM/FR/FW/FRW (ICH6 Family) SMBus Controller",
-"		1028 0179  Optiplex GX280",
-"		1043 80a6  P5GD1-VW Mainboard",
-"		1458 266a  GA-8I915ME-G Mainboard",
-"		1462 7028  915P/G Neo2",
-"		1734 105c  Scenic W620",
-"	266c  82801FB/FBM/FR/FW/FRW (ICH6 Family) LAN Controller",
-"	266d  82801FB/FBM/FR/FW/FRW (ICH6 Family) AC'97 Modem Controller",
-"		1025 006a  Conexant AC'97 CoDec (in Acer TravelMate 2410 serie laptop)",
-"		103c 099c  NX6110/NC6120",
-"	266e  82801FB/FBM/FR/FW/FRW (ICH6 Family) AC'97 Audio Controller",
-"		1025 006a  Realtek ALC 655 codec (in Acer TravelMate 2410 serie laptop)",
-"		1028 0179  Optiplex GX280",
-"		1028 0182  Latitude D610 Laptop",
-"		1028 0188  Inspiron 6000 laptop",
-"		103c 0944  Compaq NC6220",
-"		103c 099c  NX6110/NC6120",
-"		103c 3006  DC7100 SFF(DX878AV)",
-"		1458 a002  GA-8I915ME-G Mainboard",
-"		152d 0745  Packard Bell A8550 Laptop",
-"		1734 105a  Scenic W620",
-"	266f  82801FB/FBM/FR/FW/FRW (ICH6 Family) IDE Controller",
-"		103c 099c  NX6110/NC6120",
-"		1043 80a6  P5GD1-VW Mainboard",
-"		1458 266f  GA-8I915ME-G Mainboard",
-"		1462 7028  915P/G Neo2",
-"		1734 105c  Scenic W620",
-"	2670  Enterprise Southbridge LPC",
-"	2680  Enterprise Southbridge SATA IDE",
-"	2681  Enterprise Southbridge SATA AHCI",
-"	2682  Enterprise Southbridge SATA RAID",
-"	2683  Enterprise Southbridge SATA RAID",
-"	2688  Enterprise Southbridge UHCI USB #1",
-"	2689  Enterprise Southbridge UHCI USB #2",
-"	268a  Enterprise Southbridge UHCI USB #3",
-"	268b  Enterprise Southbridge UHCI USB #4",
-"	268c  Enterprise Southbridge EHCI USB",
-"	2690  Enterprise Southbridge PCI Express Root Port 1",
-"	2692  Enterprise Southbridge PCI Express Root Port 2",
-"	2694  Enterprise Southbridge PCI Express Root Port 3",
-"	2696  Enterprise Southbridge PCI Express Root Port 4",
-"	2698  Enterprise Southbridge AC '97 Audio",
-"	2699  Enterprise Southbridge AC '97 Modem",
-"	269a  Enterprise Southbridge High Definition Audio",
-"	269b  Enterprise Southbridge SMBus",
-"	269e  Enterprise Southbridge PATA",
-"	2770  945G/GZ/P/PL Express Memory Controller Hub",
-"		8086 544e  DeskTop Board D945GTP",
-"	2771  945G/GZ/P/PL Express PCI Express Root Port",
-"	2772  945G/GZ Express Integrated Graphics Controller",
-"		8086 544e  DeskTop Board D945GTP",
-"	2774  955X Express Memory Controller Hub",
-"	2775  955X Express PCI Express Root Port",
-"	2776  945G/GZ Express Integrated Graphics Controller",
-"	2778  E7230 Memory Controller Hub",
-"	2779  E7230 PCI Express Root Port",
-"	277a  975X Express PCI Express Root Port",
-"	277c  975X Express Memory Controller Hub",
-"	277d  975X Express PCI Express Root Port",
-"	2782  82915G Express Chipset Family Graphics Controller",
-"		1043 2582  P5GD1-VW Mainboard",
-"		1734 105b  Scenic W620",
-"	2792  Mobile 915GM/GMS/910GML Express Graphics Controller",
-"		103c 099c  NX6110/NC6120",
-"		1043 1881  GMA 900 915GM Integrated Graphics",
-"	27a0  Mobile 945GM/PM/GMS/940GML and 945GT Express Memory Controller Hub",
-"	27a1  Mobile 945GM/PM/GMS/940GML and 945GT Express PCI Express Root Port",
-"	27a2  Mobile 945GM/GMS/940GML Express Integrated Graphics Controller",
-"	27a6  Mobile 945GM/GMS/940GML Express Integrated Graphics Controller",
-"	27b0  82801GH (ICH7DH) LPC Interface Bridge",
-"	27b8  82801GB/GR (ICH7 Family) LPC Interface Bridge",
-"		8086 544e  DeskTop Board D945GTP",
-"	27b9  82801GBM (ICH7-M) LPC Interface Bridge",
-"	27bd  82801GHM (ICH7-M DH) LPC Interface Bridge",
-"	27c0  82801GB/GR/GH (ICH7 Family) Serial ATA Storage Controller IDE",
-"		8086 544e  DeskTop Board D945GTP",
-"	27c1  82801GR/GH (ICH7 Family) Serial ATA Storage Controller AHCI",
-"	27c3  82801GR/GH (ICH7 Family) Serial ATA Storage Controller RAID",
-"	27c4  82801GBM/GHM (ICH7 Family) Serial ATA Storage Controller IDE",
-"	27c5  82801GBM/GHM (ICH7 Family) Serial ATA Storage Controller AHCI",
-"	27c6  82801GHM (ICH7-M DH) Serial ATA Storage Controller RAID",
-"	27c8  82801G (ICH7 Family) USB UHCI #1",
-"		8086 544e  DeskTop Board D945GTP",
-"	27c9  82801G (ICH7 Family) USB UHCI #2",
-"		8086 544e  DeskTop Board D945GTP",
-"	27ca  82801G (ICH7 Family) USB UHCI #3",
-"		8086 544e  DeskTop Board D945GTP",
-"	27cb  82801G (ICH7 Family) USB UHCI #4",
-"		8086 544e  DeskTop Board D945GTP",
-"	27cc  82801G (ICH7 Family) USB2 EHCI Controller",
-"		8086 544e  DeskTop Board D945GTP",
-"	27d0  82801G (ICH7 Family) PCI Express Port 1",
-"	27d2  82801G (ICH7 Family) PCI Express Port 2",
-"	27d4  82801G (ICH7 Family) PCI Express Port 3",
-"	27d6  82801G (ICH7 Family) PCI Express Port 4",
-"	27d8  82801G (ICH7 Family) High Definition Audio Controller",
-"	27da  82801G (ICH7 Family) SMBus Controller",
-"		8086 544e  DeskTop Board D945GTP",
-"	27dc  82801G (ICH7 Family) LAN Controller",
-"		8086 308d  DeskTop Board D945GTP",
-"	27dd  82801G (ICH7 Family) AC'97 Modem Controller",
-"	27de  82801G (ICH7 Family) AC'97 Audio Controller",
-"	27df  82801G (ICH7 Family) IDE Controller",
-"		8086 544e  DeskTop Board D945GTP",
-"	27e0  82801GR/GH/GHM (ICH7 Family) PCI Express Port 5",
-"	27e2  82801GR/GH/GHM (ICH7 Family) PCI Express Port 6",
-"	2810  LPC Interface Controller",
-"	2811  Mobile LPC Interface Controller",
-"	2812  LPC Interface Controller",
-"	2814  LPC Interface Controller",
-"	2815  Mobile LPC Interface Controller",
-"	2820  SATA Controller 1 IDE",
-"	2821  SATA Controller AHCI",
-"	2822  SATA Controller RAID",
-"	2824  SATA Controller AHCI",
-"	2825  SATA Controller 2 IDE",
-"	2828  Mobile SATA Controller IDE",
-"	2829  Mobile SATA Controller AHCI",
-"	282a  Mobile SATA Controller RAID",
-"	2830  USB UHCI Controller #1",
-"	2831  USB UHCI Controller #2",
-"	2832  USB UHCI Controller #3",
-"	2834  USB UHCI Controller #4",
-"	2835  USB UHCI Controller #5",
-"	2836  USB2 EHCI Controller #1",
-"	283a  USB2 EHCI Controller #2",
-"	283e  SMBus Controller",
-"	283f  PCI Express Port 1",
-"	2841  PCI Express Port 2",
-"	2843  PCI Express Port 3",
-"	2845  PCI Express Port 4",
-"	2847  PCI Express Port 5",
-"	2849  PCI Express Port 6",
-"	284b  HD Audio Controller",
-"	284f  Thermal Subsystem",
-"	2850  Mobile IDE Controller",
-"	2970  Memory Controller Hub",
-"	2971  PCI Express Root Port",
-"	2972  Integrated Graphics Controller",
-"	2973  Integrated Graphics Controller",
-"	2974  HECI Controller",
-"	2976  PT IDER Controller",
-"	2977  KT Controller",
-"	2990  Memory Controller Hub",
-"	2991  PCI Express Root Port",
-"	2992  Integrated Graphics Controller",
-"	2993  Integrated Graphics Controller",
-"	2994  HECI Controller",
-"	2995  HECI Controller",
-"	2996  PT IDER Controller",
-"	2997  KT Controller",
-"	29a0  Memory Controller Hub",
-"	29a1  PCI Express Root Port",
-"	29a2  Integrated Graphics Controller",
-"	29a3  Integrated Graphics Controller",
-"	29a4  HECI Controller",
-"	29a5  HECI Controller",
-"	29a6  PT IDER Controller",
-"	29a7  KT Controller",
-"	2a00  Mobile Memory Controller Hub",
-"	2a01  Mobile PCI Express Root Port",
-"	2a02  Mobile Integrated Graphics Controller",
-"	2a03  Mobile Integrated Graphics Controller",
-"	3092  Integrated RAID",
-"	3200  GD31244 PCI-X SATA HBA",
-"	3340  82855PM Processor to I/O Controller",
-"		1025 005a  TravelMate 290",
-"		103c 088c  NC8000 laptop",
-"		103c 0890  NC6000 laptop",
-"	3341  82855PM Processor to AGP Controller",
-"	3500  Enterprise Southbridge PCI Express Upstream Port",
-"	3501  Enterprise Southbridge PCI Express Upstream Port",
-"	3504  Enterprise Southbridge IOxAPIC",
-"	3505  Enterprise Southbridge IOxAPIC",
-"	350c  Enterprise Southbridge PCI Express to PCI-X Bridge",
-"	350d  Enterprise Southbridge PCI Express to PCI-X Bridge",
-"	3510  Enterprise Southbridge PCI Express Downstream Port E1",
-"	3511  Enterprise Southbridge PCI Express Downstream Port E1",
-"	3514  Enterprise Southbridge PCI Express Downstream Port E2",
-"	3515  Enterprise Southbridge PCI Express Downstream Port E2",
-"	3518  Enterprise Southbridge PCI Express Downstream Port E3",
-"	3519  Enterprise Southbridge PCI Express Downstream Port E3",
-"	3575  82830 830 Chipset Host Bridge",
-"		0e11 0030  Evo N600c",
-"		1014 021d  ThinkPad A/T/X Series",
-"		104d 80e7  VAIO PCG-GR214EP/GR214MP/GR215MP/GR314MP/GR315MP",
-"	3576  82830 830 Chipset AGP Bridge",
-"	3577  82830 CGC [Chipset Graphics Controller]",
-"		1014 0513  ThinkPad A/T/X Series",
-"	3578  82830 830 Chipset Host Bridge",
-"	3580  82852/82855 GM/GME/PM/GMV Processor to I/O Controller",
-"		1028 0139  Latitude D400",
-"		1028 0163  Latitude D505",
-"		1028 0196  Inspiron 5160",
-"		1734 1055  Amilo M1420",
-"		4c53 10b0  CL9 mainboard",
-"		4c53 10e0  PSL09 PrPMC",
-"	3581  82852/82855 GM/GME/PM/GMV Processor to AGP Controller",
-"		1734 1055  Amilo M1420",
-"	3582  82852/855GM Integrated Graphics Device",
-"		1028 0139  Latitude D400",
-"		1028 0163  Latitude D505",
-"		4c53 10b0  CL9 mainboard",
-"		4c53 10e0  PSL09 PrPMC",
-"	3584  82852/82855 GM/GME/PM/GMV Processor to I/O Controller",
-"		1028 0139  Latitude D400",
-"		1028 0163  Latitude D505",
-"		1028 0196  Inspiron 5160",
-"		1734 1055  Amilo M1420",
-"		4c53 10b0  CL9 mainboard",
-"		4c53 10e0  PSL09 PrPMC",
-"	3585  82852/82855 GM/GME/PM/GMV Processor to I/O Controller",
-"		1028 0139  Latitude D400",
-"		1028 0163  Latitude D505",
-"		1028 0196  Inspiron 5160",
-"		1734 1055  Amilo M1420",
-"		4c53 10b0  CL9 mainboard",
-"		4c53 10e0  PSL09 PrPMC",
-"	3590  E7520 Memory Controller Hub",
-"		1028 019a  PowerEdge SC1425",
-"		1734 103e  Primergy RX300 S2",
-"		4c53 10d0  Telum ASLP10 Processor AMC",
-"	3591  E7525/E7520 Error Reporting Registers",
-"		1028 0169  Precision 470",
-"		4c53 10d0  Telum ASLP10 Processor AMC",
-"	3592  E7320 Memory Controller Hub",
-"	3593  E7320 Error Reporting Registers",
-"	3594  E7520 DMA Controller",
-"		4c53 10d0  Telum ASLP10 Processor AMC",
-"	3595  E7525/E7520/E7320 PCI Express Port A",
-"	3596  E7525/E7520/E7320 PCI Express Port A1",
-"	3597  E7525/E7520 PCI Express Port B",
-"	3598  E7520 PCI Express Port B1",
-"	3599  E7520 PCI Express Port C",
-"	359a  E7520 PCI Express Port C1",
-"	359b  E7525/E7520/E7320 Extended Configuration Registers",
-"	359e  E7525 Memory Controller Hub",
-"		1028 0169  Precision 470",
-"	4220  PRO/Wireless 2200BG Network Connection",
-"	4222  PRO/Wireless 3945ABG Network Connection",
-"		8086 1005  PRO/Wireless 3945BG Network Connection",
-"		8086 1034  PRO/Wireless 3945BG Network Connection",
-"		8086 1044  PRO/Wireless 3945BG Network Connection",
-"	4223  PRO/Wireless 2915ABG Network Connection",
-"		1351 103c  Compaq NC6220",
-"	4224  PRO/Wireless 2915ABG Network Connection",
-"	4227  PRO/Wireless 3945ABG Network Connection",
-"		8086 1011  Thinkpad X60s",
-"		8086 1014  PRO/Wireless 3945BG Network Connection",
-"	5200  EtherExpress PRO/100 Intelligent Server",
-"	5201  EtherExpress PRO/100 Intelligent Server",
-"		8086 0001  EtherExpress PRO/100 Server Ethernet Adapter",
-"	530d  80310 IOP [IO Processor]",
-"	7000  82371SB PIIX3 ISA [Natoma/Triton II]",
-"	7010  82371SB PIIX3 IDE [Natoma/Triton II]",
-"	7020  82371SB PIIX3 USB [Natoma/Triton II]",
-"	7030  430VX - 82437VX TVX [Triton VX]",
-"	7050  Intercast Video Capture Card",
-"	7051  PB 642365-003 (Business Video Conferencing Card)",
-"	7100  430TX - 82439TX MTXC",
-"	7110  82371AB/EB/MB PIIX4 ISA",
-"		15ad 1976  virtualHW v3",
-"	7111  82371AB/EB/MB PIIX4 IDE",
-"		15ad 1976  virtualHW v3",
-"	7112  82371AB/EB/MB PIIX4 USB",
-"		15ad 1976  virtualHW v3",
-"	7113  82371AB/EB/MB PIIX4 ACPI",
-"		15ad 1976  virtualHW v3",
-"	7120  82810 GMCH [Graphics Memory Controller Hub]",
-"		4c53 1040  CL7 mainboard",
-"		4c53 1060  PC7 mainboard",
-"	7121  82810 CGC [Chipset Graphics Controller]",
-"		4c53 1040  CL7 mainboard",
-"		4c53 1060  PC7 mainboard",
-"		8086 4341  Cayman (CA810) Mainboard",
-"	7122  82810 DC-100 GMCH [Graphics Memory Controller Hub]",
-"	7123  82810 DC-100 CGC [Chipset Graphics Controller]",
-"	7124  82810E DC-133 GMCH [Graphics Memory Controller Hub]",
-"	7125  82810E DC-133 CGC [Chipset Graphics Controller]",
-"	7126  82810 DC-133 System and Graphics Controller",
-"	7128  82810-M DC-100 System and Graphics Controller",
-"	712a  82810-M DC-133 System and Graphics Controller",
-"	7180  440LX/EX - 82443LX/EX Host bridge",
-"	7181  440LX/EX - 82443LX/EX AGP bridge",
-"	7190  440BX/ZX/DX - 82443BX/ZX/DX Host bridge",
-"		0e11 0500  Armada 1750 Laptop System Chipset",
-"		0e11 b110  Armada M700/E500",
-"		1028 008e  PowerEdge 1300 mainboard",
-"		1179 0001  Toshiba Tecra 8100 Laptop System Chipset",
-"		15ad 1976  virtualHW v3",
-"		4c53 1050  CT7 mainboard",
-"		4c53 1051  CE7 mainboard",
-"	7191  440BX/ZX/DX - 82443BX/ZX/DX AGP bridge",
-"		1028 008e  PowerEdge 1300 mainboard",
-"	7192  440BX/ZX/DX - 82443BX/ZX/DX Host bridge (AGP disabled)",
-"		0e11 0460  Armada 1700 Laptop System Chipset",
-"		4c53 1000  CC7/CR7/CP7/VC7/VP7/VR7 mainboard",
-"	7194  82440MX Host Bridge",
-"		1033 0000  Versa Note Vxi",
-"		4c53 10a0  CA3/CR3 mainboard",
-"	7195  82440MX AC'97 Audio Controller",
-"		1033 80cc  Versa Note VXi",
-"		10cf 1099  QSound_SigmaTel Stac97 PCI Audio",
-"		11d4 0040  SoundMAX Integrated Digital Audio",
-"		11d4 0048  SoundMAX Integrated Digital Audio",
-"	7196  82440MX AC'97 Modem Controller",
-"	7198  82440MX ISA Bridge",
-"	7199  82440MX EIDE Controller",
-"	719a  82440MX USB Universal Host Controller",
-"	719b  82440MX Power Management Controller",
-"	71a0  440GX - 82443GX Host bridge",
-"		4c53 1050  CT7 mainboard",
-"		4c53 1051  CE7 mainboard",
-"	71a1  440GX - 82443GX AGP bridge",
-"	71a2  440GX - 82443GX Host bridge (AGP disabled)",
-"		4c53 1000  CC7/CR7/CP7/VC7/VP7/VR7 mainboard",
-"	7600  82372FB PIIX5 ISA",
-"	7601  82372FB PIIX5 IDE",
-"	7602  82372FB PIIX5 USB",
-"	7603  82372FB PIIX5 SMBus",
-"	7800  82740 (i740) AGP Graphics Accelerator",
-"		003d 0008  Starfighter AGP",
-"		003d 000b  Starfighter AGP",
-"		1092 0100  Stealth II G460",
-"		10b4 201a  Lightspeed 740",
-"		10b4 202f  Lightspeed 740",
-"		8086 0000  Terminator 2x/i",
-"		8086 0100  Intel740 Graphics Accelerator",
-"	84c4  450KX/GX [Orion] - 82454KX/GX PCI bridge",
-"	84c5  450KX/GX [Orion] - 82453KX/GX Memory controller",
-"	84ca  450NX - 82451NX Memory & I/O Controller",
-"	84cb  450NX - 82454NX/84460GX PCI Expander Bridge",
-"	84e0  460GX - 84460GX System Address Controller (SAC)",
-"	84e1  460GX - 84460GX System Data Controller (SDC)",
-"	84e2  460GX - 84460GX AGP Bridge (GXB function 2)",
-"	84e3  460GX - 84460GX Memory Address Controller (MAC)",
-"	84e4  460GX - 84460GX Memory Data Controller (MDC)",
-"	84e6  460GX - 82466GX Wide and fast PCI eXpander Bridge (WXB)",
-"	84ea  460GX - 84460GX AGP Bridge (GXB function 1)",
-"	8500  IXP4XX Intel Network Processor (IXP420/421/422/425/IXC1100)",
-"		1993 0ded  mGuard-PCI AV#2",
-"		1993 0dee  mGuard-PCI AV#1",
-"		1993 0def  mGuard-PCI AV#0",
-"	9000  IXP2000 Family Network Processor",
-"	9001  IXP2400 Network Processor",
-"	9002  IXP2300 Network Processor",
-"	9004  IXP2800 Network Processor",
-"	9621  Integrated RAID",
-"	9622  Integrated RAID",
-"	9641  Integrated RAID",
-"	96a1  Integrated RAID",
-"	b152  21152 PCI-to-PCI Bridge",
-"	b154  21154 PCI-to-PCI Bridge",
-"	b555  21555 Non transparent PCI-to-PCI Bridge",
-"		12d9 000a  PCI VoIP Gateway",
-"		4c53 1050  CT7 mainboard",
-"		4c53 1051  CE7 mainboard",
-"		e4bf 1000  CC8-1-BLUES",
-"8401  TRENDware International Inc.",
-"8800  Trigem Computer Inc.",
-"	2008  Video assistent component",
-"8866  T-Square Design Inc.",
-"8888  Silicon Magic",
-"8912  TRX",
-"8c4a  Winbond",
-"	1980  W89C940 misprogrammed [ne2k]",
-"8e0e  Computone Corporation",
-"8e2e  KTI",
-"	3000  ET32P2",
-"9004  Adaptec",
-"	0078  AHA-2940U_CN",
-"	1078  AIC-7810",
-"	1160  AIC-1160 [Family Fibre Channel Adapter]",
-"	2178  AIC-7821",
-"	3860  AHA-2930CU",
-"	3b78  AHA-4844W/4844UW",
-"	5075  AIC-755x",
-"	5078  AHA-7850",
-"		9004 7850  AHA-2904/Integrated AIC-7850",
-"	5175  AIC-755x",
-"	5178  AIC-7851",
-"	5275  AIC-755x",
-"	5278  AIC-7852",
-"	5375  AIC-755x",
-"	5378  AIC-7850",
-"	5475  AIC-755x",
-"	5478  AIC-7850",
-"	5575  AVA-2930",
-"	5578  AIC-7855",
-"	5647  ANA-7711 TCP Offload Engine",
-"		9004 7710  ANA-7711F TCP Offload Engine - Optical",
-"		9004 7711  ANA-7711LP TCP Offload Engine - Copper",
-"	5675  AIC-755x",
-"	5678  AIC-7856",
-"	5775  AIC-755x",
-"	5778  AIC-7850",
-"	5800  AIC-5800",
-"	5900  ANA-5910/5930/5940 ATM155 & 25 LAN Adapter",
-"	5905  ANA-5910A/5930A/5940A ATM Adapter",
-"	6038  AIC-3860",
-"	6075  AIC-1480 / APA-1480",
-"		9004 7560  AIC-1480 / APA-1480 Cardbus",
-"	6078  AIC-7860",
-"	6178  AIC-7861",
-"		9004 7861  AHA-2940AU Single",
-"	6278  AIC-7860",
-"	6378  AIC-7860",
-"	6478  AIC-786x",
-"	6578  AIC-786x",
-"	6678  AIC-786x",
-"	6778  AIC-786x",
-"	6915  ANA620xx/ANA69011A",
-"		9004 0008  ANA69011A/TX 10/100",
-"		9004 0009  ANA69011A/TX 10/100",
-"		9004 0010  ANA62022 2-port 10/100",
-"		9004 0018  ANA62044 4-port 10/100",
-"		9004 0019  ANA62044 4-port 10/100",
-"		9004 0020  ANA62022 2-port 10/100",
-"		9004 0028  ANA69011A/TX 10/100",
-"		9004 8008  ANA69011A/TX 64 bit 10/100",
-"		9004 8009  ANA69011A/TX 64 bit 10/100",
-"		9004 8010  ANA62022 2-port 64 bit 10/100",
-"		9004 8018  ANA62044 4-port 64 bit 10/100",
-"		9004 8019  ANA62044 4-port 64 bit 10/100",
-"		9004 8020  ANA62022 2-port 64 bit 10/100",
-"		9004 8028  ANA69011A/TX 64 bit 10/100",
-"	7078  AHA-294x / AIC-7870",
-"	7178  AHA-2940/2940W / AIC-7871",
-"	7278  AHA-3940/3940W / AIC-7872",
-"	7378  AHA-3985 / AIC-7873",
-"	7478  AHA-2944/2944W / AIC-7874",
-"	7578  AHA-3944/3944W / AIC-7875",
-"	7678  AHA-4944W/UW / AIC-7876",
-"	7710  ANA-7711F Network Accelerator Card (NAC) - Optical",
-"	7711  ANA-7711C Network Accelerator Card (NAC) - Copper",
-"	7778  AIC-787x",
-"	7810  AIC-7810",
-"	7815  AIC-7815 RAID+Memory Controller IC",
-"		9004 7815  ARO-1130U2 RAID Controller",
-"		9004 7840  AIC-7815 RAID+Memory Controller IC",
-"	7850  AIC-7850",
-"	7855  AHA-2930",
-"	7860  AIC-7860",
-"	7870  AIC-7870",
-"	7871  AHA-2940",
-"	7872  AHA-3940",
-"	7873  AHA-3980",
-"	7874  AHA-2944",
-"	7880  AIC-7880P",
-"	7890  AIC-7890",
-"	7891  AIC-789x",
-"	7892  AIC-789x",
-"	7893  AIC-789x",
-"	7894  AIC-789x",
-"	7895  AHA-2940U/UW / AHA-39xx / AIC-7895",
-"		9004 7890  AHA-2940U/2940UW Dual AHA-394xAU/AUW/AUWD AIC-7895B",
-"		9004 7891  AHA-2940U/2940UW Dual",
-"		9004 7892  AHA-3940AU/AUW/AUWD/UWD",
-"		9004 7894  AHA-3944AUWD",
-"		9004 7895  AHA-2940U/2940UW Dual AHA-394xAU/AUW/AUWD AIC-7895B",
-"		9004 7896  AHA-2940U/2940UW Dual AHA-394xAU/AUW/AUWD AIC-7895B",
-"		9004 7897  AHA-2940U/2940UW Dual AHA-394xAU/AUW/AUWD AIC-7895B",
-"	7896  AIC-789x",
-"	7897  AIC-789x",
-"	8078  AIC-7880U",
-"		9004 7880  AIC-7880P Ultra/Ultra Wide SCSI Chipset",
-"	8178  AHA-2940U/UW/D / AIC-7881U",
-"		9004 7881  AHA-2940UW SCSI Host Adapter",
-"	8278  AHA-3940U/UW/UWD / AIC-7882U",
-"	8378  AHA-3940U/UW / AIC-7883U",
-"	8478  AHA-2944UW / AIC-7884U",
-"	8578  AHA-3944U/UWD / AIC-7885",
-"	8678  AHA-4944UW / AIC-7886",
-"	8778  AHA-2940UW Pro / AIC-788x",
-"		9004 7887  2940UW Pro Ultra-Wide SCSI Controller",
-"	8878  AHA-2930UW / AIC-7888",
-"		9004 7888  AHA-2930UW SCSI Controller",
-"	8b78  ABA-1030",
-"	ec78  AHA-4944W/UW",
-"9005  Adaptec",
-"	0010  AHA-2940U2/U2W",
-"		9005 2180  AHA-2940U2 SCSI Controller",
-"		9005 8100  AHA-2940U2B SCSI Controller",
-"		9005 a100  AHA-2940U2B SCSI Controller",
-"		9005 a180  AHA-2940U2W SCSI Controller",
-"		9005 e100  AHA-2950U2B SCSI Controller",
-"	0011  AHA-2930U2",
-"	0013  78902",
-"		9005 0003  AAA-131U2 Array1000 1 Channel RAID Controller",
-"		9005 000f  AIC7890_ARO",
-"	001f  AHA-2940U2/U2W / 7890/7891",
-"		9005 000f  2940U2W SCSI Controller",
-"		9005 a180  2940U2W SCSI Controller",
-"	0020  AIC-7890",
-"	002f  AIC-7890",
-"	0030  AIC-7890",
-"	003f  AIC-7890",
-"	0050  AHA-3940U2x/395U2x",
-"		9005 f500  AHA-3950U2B",
-"		9005 ffff  AHA-3950U2B",
-"	0051  AHA-3950U2D",
-"		9005 b500  AHA-3950U2D",
-"	0053  AIC-7896 SCSI Controller",
-"		9005 ffff  AIC-7896 SCSI Controller mainboard implementation",
-"	005f  AIC-7896U2/7897U2",
-"	0080  AIC-7892A U160/m",
-"		0e11 e2a0  Compaq 64-Bit/66MHz Wide Ultra3 SCSI Adapter",
-"		9005 6220  AHA-29160C",
-"		9005 62a0  29160N Ultra160 SCSI Controller",
-"		9005 e220  29160LP Low Profile Ultra160 SCSI Controller",
-"		9005 e2a0  29160 Ultra160 SCSI Controller",
-"	0081  AIC-7892B U160/m",
-"		9005 62a1  19160 Ultra160 SCSI Controller",
-"	0083  AIC-7892D U160/m",
-"	008f  AIC-7892P U160/m",
-"		1179 0001  Magnia Z310",
-"		15d9 9005  Onboard SCSI Host Adapter",
-"	00c0  AHA-3960D / AIC-7899A U160/m",
-"		0e11 f620  Compaq 64-Bit/66MHz Dual Channel Wide Ultra3 SCSI Adapter",
-"		9005 f620  AHA-3960D U160/m",
-"	00c1  AIC-7899B U160/m",
-"	00c3  AIC-7899D U160/m",
-"	00c5  RAID subsystem HBA",
-"		1028 00c5  PowerEdge 2400,2500,2550,4400",
-"	00cf  AIC-7899P U160/m",
-"		1028 00ce  PowerEdge 1400",
-"		1028 00d1  PowerEdge 2550",
-"		1028 00d9  PowerEdge 2500",
-"		10f1 2462  Thunder K7 S2462",
-"		15d9 9005  Onboard SCSI Host Adapter",
-"		8086 3411  SDS2 Mainboard",
-"	0241  Serial ATA II RAID 1420SA",
-"	0250  ServeRAID Controller",
-"		1014 0279  ServeRAID-xx",
-"		1014 028c  ServeRAID-xx",
-"	0279  ServeRAID 6M",
-"	0283  AAC-RAID",
-"		9005 0283  Catapult",
-"	0284  AAC-RAID",
-"		9005 0284  Tomcat",
-"	0285  AAC-RAID",
-"		0e11 0295  SATA 6Ch (Bearcat)",
-"		1014 02f2  ServeRAID 8i",
-"		1028 0287  PowerEdge Expandable RAID Controller 320/DC",
-"		1028 0291  CERC SATA RAID 2 PCI SATA 6ch (DellCorsair)",
-"		103c 3227  AAR-2610SA",
-"		17aa 0286  Legend S220 (Legend Crusader)",
-"		17aa 0287  Legend S230 (Legend Vulcan)",
-"		9005 0285  2200S (Vulcan)",
-"		9005 0286  2120S (Crusader)",
-"		9005 0287  2200S (Vulcan-2m)",
-"		9005 0288  3230S (Harrier)",
-"		9005 0289  3240S (Tornado)",
-"		9005 028a  ASR-2020ZCR",
-"		9005 028b  ASR-2025ZCR (Terminator)",
-"		9005 028e  ASR-2020SA (Skyhawk)",
-"		9005 028f  ASR-2025SA",
-"		9005 0290  AAR-2410SA PCI SATA 4ch (Jaguar II)",
-"		9005 0292  AAR-2810SA PCI SATA 8ch (Corsair-8)",
-"		9005 0293  AAR-21610SA PCI SATA 16ch (Corsair-16)",
-"		9005 0294  ESD SO-DIMM PCI-X SATA ZCR (Prowler)",
-"		9005 0296  ASR-2240S",
-"		9005 0297  ASR-4005SAS",
-"		9005 0298  ASR-4000SAS",
-"		9005 0299  ASR-4800SAS",
-"		9005 029a  4805SAS",
-"	0286  AAC-RAID (Rocket)",
-"		1014 9540  ServeRAID 8k/8k-l4",
-"		1014 9580  ServeRAID 8k/8k-l8",
-"		9005 028c  ASR-2230S + ASR-2230SLP PCI-X (Lancer)",
-"		9005 028d  ASR-2130S",
-"		9005 029b  ASR-2820SA",
-"		9005 029c  ASR-2620SA",
-"		9005 029d  ASR-2420SA",
-"		9005 029e  ICP ICP9024R0",
-"		9005 029f  ICP ICP9014R0",
-"		9005 02a0  ICP ICP9047MA",
-"		9005 02a1  ICP ICP9087MA",
-"		9005 02a2  3800SAS",
-"		9005 02a3  ICP ICP5445AU",
-"		9005 02a4  ICP ICP5085LI",
-"		9005 02a5  ICP ICP5085BR",
-"		9005 02a6  ICP9067MA",
-"		9005 02a7  AAR-2830SA",
-"		9005 02a8  AAR-2430SA",
-"		9005 02a9  ICP5087AU",
-"		9005 02aa  ICP5047AU",
-"		9005 0800  Callisto",
-"	0500  Obsidian chipset SCSI controller",
-"		1014 02c1  PCI-X DDR 3Gb SAS Adapter (572A/572C)",
-"		1014 02c2  PCI-X DDR 3Gb SAS RAID Adapter (572B/572D)",
-"	0503  Scamp chipset SCSI controller",
-"		1014 02bf  Quad Channel PCI-X DDR U320 SCSI RAID Adapter (571E)",
-"		1014 02d5  Quad Channel PCI-X DDR U320 SCSI RAID Adapter (571F)",
-"	0910  AUA-3100B",
-"	091e  AUA-3100B",
-"	8000  ASC-29320A U320",
-"	800f  AIC-7901 U320",
-"	8010  ASC-39320 U320",
-"	8011  ASC-39320D",
-"		0e11 00ac  ASC-39320D U320",
-"		9005 0041  ASC-39320D U320",
-"	8012  ASC-29320 U320",
-"	8013  ASC-29320B U320",
-"	8014  ASC-29320LP U320",
-"	8015  ASC-39320B U320",
-"	8016  ASC-39320A U320",
-"	8017  ASC-29320ALP U320",
-"	801c  ASC-39320D U320",
-"	801d  AIC-7902B U320",
-"	801e  AIC-7901A U320",
-"	801f  AIC-7902 U320",
-"		1734 1011  Primergy RX300",
-"	8080  ASC-29320A U320 w/HostRAID",
-"	808f  AIC-7901 U320 w/HostRAID",
-"	8090  ASC-39320 U320 w/HostRAID",
-"	8091  ASC-39320D U320 w/HostRAID",
-"	8092  ASC-29320 U320 w/HostRAID",
-"	8093  ASC-29320B U320 w/HostRAID",
-"	8094  ASC-29320LP U320 w/HostRAID",
-"	8095  ASC-39320(B) U320 w/HostRAID",
-"	8096  ASC-39320A U320 w/HostRAID",
-"	8097  ASC-29320ALP U320 w/HostRAID",
-"	809c  ASC-39320D(B) U320 w/HostRAID",
-"	809d  AIC-7902(B) U320 w/HostRAID",
-"	809e  AIC-7901A U320 w/HostRAID",
-"	809f  AIC-7902 U320 w/HostRAID",
-"907f  Atronics",
-"	2015  IDE-2015PL",
-"919a  Gigapixel Corp",
-"9412  Holtek",
-"	6565  6565",
-"9699  Omni Media Technology Inc",
-"	6565  6565",
-"9710  NetMos Technology",
-"	7780  USB IRDA-port",
-"	9805  PCI 1 port parallel adapter",
-"	9815  PCI 9815 Multi-I/O Controller",
-"		1000 0020  2P0S (2 port parallel adaptor)",
-"	9835  PCI 9835 Multi-I/O Controller",
-"		1000 0002  2S (16C550 UART)",
-"		1000 0012  1P2S",
-"	9845  PCI 9845 Multi-I/O Controller",
-"		1000 0004  0P4S (4 port 16550A serial card)",
-"		1000 0006  0P6S (6 port 16550a serial card)",
-"	9855  PCI 9855 Multi-I/O Controller",
-"		1000 0014  1P4S",
-"9902  Stargen Inc.",
-"	0001  SG2010 PCI over Starfabric Bridge",
-"	0002  SG2010 PCI to Starfabric Gateway",
-"	0003  SG1010 Starfabric Switch and PCI Bridge",
-"a0a0  AOPEN Inc.",
-"a0f1  UNISYS Corporation",
-"a200  NEC Corporation",
-"a259  Hewlett Packard",
-"a25b  Hewlett Packard GmbH PL24-MKT",
-"a304  Sony",
-"a727  3Com Corporation",
-"	0013  3CRPAG175 Wireless PC Card",
-"aa42  Scitex Digital Video",
-"ac1e  Digital Receiver Technology Inc",
-"ac3d  Actuality Systems",
-"aecb  Adrienne Electronics Corporation",
-"	6250  VITC/LTC Timecode Reader card [PCI-VLTC/RDR]",
-"affe  Sirrix AG security technologies",
-"	dead  Sirrix.PCI4S0 4-port ISDN S0 interface",
-"b1b3  Shiva Europe Limited",
-"bd11  Pinnacle Systems, Inc. (Wrong ID)",
-"c001  TSI Telsys",
-"c0a9  Micron/Crucial Technology",
-"c0de  Motorola",
-"c0fe  Motion Engineering, Inc.",
-"ca50  Varian Australia Pty Ltd",
-"cafe  Chrysalis-ITS",
-"	0003  Luna K3 Hardware Security Module",
-"cccc  Catapult Communications",
-"cddd  Tyzx, Inc.",
-"	0101  DeepSea 1 High Speed Stereo Vision Frame Grabber",
-"	0200  DeepSea 2 High Speed Stereo Vision Frame Grabber",
-"d161  Digium, Inc.",
-"	0205  Wildcard TE205P",
-"	0210  Wildcard TE210P",
-"	0405  Wildcard TE405P Quad-Span togglable E1/T1/J1 card 5.0v",
-"	0406  Wildcard TE406P Quad-Span togglable E1/T1/J1 echo cancellation card 5.0v",
-"	0410  Wildcard TE410P Quad-Span togglable E1/T1/J1 card 3.3v",
-"	0411  Wildcard TE411P Quad-Span togglable E1/T1/J1 echo cancellation card 3.3v",
-"	2400  Wildcard TDM2400P",
-"d4d4  Dy4 Systems Inc",
-"	0601  PCI Mezzanine Card",
-"d531  I+ME ACTIA GmbH",
-"d84d  Exsys",
-"dead  Indigita Corporation",
-"deaf  Middle Digital Inc.",
-"	9050  PC Weasel Virtual VGA",
-"	9051  PC Weasel Serial Port",
-"	9052  PC Weasel Watchdog Timer",
-"e000  Winbond",
-"	e000  W89C940",
-"e159  Tiger Jet Network Inc.",
-"	0001  Tiger3XX Modem/ISDN interface",
-"		0059 0001  128k ISDN-S/T Adapter",
-"		0059 0003  128k ISDN-U Adapter",
-"		00a7 0001  TELES.S0/PCI 2.x ISDN Adapter",
-"		8086 0003  Digium X100P/X101P analogue PSTN FXO interface",
-"	0002  Tiger100APC ISDN chipset",
-"e4bf  EKF Elektronik GmbH",
-"e55e  Essence Technology, Inc.",
-"ea01  Eagle Technology",
-"	000a  PCI-773 Temperature Card",
-"	0032  PCI-730 & PC104P-30 Card",
-"	003e  PCI-762 Opto-Isolator Card",
-"	0041  PCI-763 Reed Relay Card",
-"	0043  PCI-769 Opto-Isolator Reed Relay Combo Card",
-"	0046  PCI-766 Analog Output Card",
-"	0052  PCI-703 Analog I/O Card",
-"	0800  PCI-800 Digital I/O Card",
-"ea60  RME",
-"	9896  Digi32",
-"	9897  Digi32 Pro",
-"	9898  Digi32/8",
-"eabb  Aashima Technology B.V.",
-"eace  Endace Measurement Systems, Ltd",
-"	3100  DAG 3.10 OC-3/OC-12",
-"	3200  DAG 3.2x OC-3/OC-12",
-"	320e  DAG 3.2E Fast Ethernet",
-"	340e  DAG 3.4E Fast Ethernet",
-"	341e  DAG 3.41E Fast Ethernet",
-"	3500  DAG 3.5 OC-3/OC-12",
-"	351c  DAG 3.5ECM Fast Ethernet",
-"	4100  DAG 4.10 OC-48",
-"	4110  DAG 4.11 OC-48",
-"	4220  DAG 4.2 OC-48",
-"	422e  DAG 4.2E Dual Gigabit Ethernet",
-"ec80  Belkin Corporation",
-"	ec00  F5D6000",
-"ecc0  Echo Digital Audio Corporation",
-"edd8  ARK Logic Inc",
-"	a091  1000PV [Stingray]",
-"	a099  2000PV [Stingray]",
-"	a0a1  2000MT",
-"	a0a9  2000MI",
-"f1d0  AJA Video",
-"	c0fe  Xena HS/HD-R",
-"	c0ff  Kona/Xena 2",
-"	cafe  Kona SD",
-"	cfee  Xena LS/SD-22-DA/SD-DA",
-"	dcaf  Kona HD",
-"	dfee  Xena HD-DA",
-"	efac  Xena SD-MM/SD-22-MM",
-"	facd  Xena HD-MM",
-"fa57  Interagon AS",
-"	0001  PMC [Pattern Matching Chip]",
-"fab7  Fabric7 Systems, Inc.",
-"febd  Ultraview Corp.",
-"feda  Broadcom Inc",
-"	a0fa  BCM4210 iLine10 HomePNA 2.0",
-"	a10e  BCM4230 iLine10 HomePNA 2.0",
-"fede  Fedetec Inc.",
-"	0003  TABIC PCI v3",
-"fffd  XenSource, Inc.",
-"	0101  PCI Event Channel Controller",
-"fffe  VMWare Inc",
-"	0405  Virtual SVGA 4.0",
-"	0710  Virtual SVGA",
-"ffff  Illegal Vendor ID",
-"C 00  Unclassified device",
-"	00  Non-VGA unclassified device",
-"	01  VGA compatible unclassified device",
-"C 01  Mass storage controller",
-"	00  SCSI storage controller",
-"	01  IDE interface",
-"	02  Floppy disk controller",
-"	03  IPI bus controller",
-"	04  RAID bus controller",
-"	05  ATA controller",
-"		20  ADMA single stepping",
-"		40  ADMA continuous operation",
-"	06  SATA controller",
-"		00  Vendor specific",
-"		01  AHCI 1.0",
-"	07  Serial Attached SCSI controller",
-"	80  Mass storage controller",
-"C 02  Network controller",
-"	00  Ethernet controller",
-"	01  Token ring network controller",
-"	02  FDDI network controller",
-"	03  ATM network controller",
-"	04  ISDN controller",
-"	80  Network controller",
-"C 03  Display controller",
-"	00  VGA compatible controller",
-"		00  VGA",
-"		01  8514",
-"	01  XGA compatible controller",
-"	02  3D controller",
-"	80  Display controller",
-"C 04  Multimedia controller",
-"	00  Multimedia video controller",
-"	01  Multimedia audio controller",
-"	02  Computer telephony device",
-"	03  Audio device",
-"	80  Multimedia controller",
-"C 05  Memory controller",
-"	00  RAM memory",
-"	01  FLASH memory",
-"	80  Memory controller",
-"C 06  Bridge",
-"	00  Host bridge",
-"	01  ISA bridge",
-"	02  EISA bridge",
-"	03  MicroChannel bridge",
-"	04  PCI bridge",
-"		00  Normal decode",
-"		01  Subtractive decode",
-"	05  PCMCIA bridge",
-"	06  NuBus bridge",
-"	07  CardBus bridge",
-"	08  RACEway bridge",
-"		00  Transparent mode",
-"		01  Endpoint mode",
-"	09  Semi-transparent PCI-to-PCI bridge",
-"		40  Primary bus towards host CPU",
-"		80  Secondary bus towards host CPU",
-"	0a  InfiniBand to PCI host bridge",
-"	80  Bridge",
-"C 07  Communication controller",
-"	00  Serial controller",
-"		00  8250",
-"		01  16450",
-"		02  16550",
-"		03  16650",
-"		04  16750",
-"		05  16850",
-"		06  16950",
-"	01  Parallel controller",
-"		00  SPP",
-"		01  BiDir",
-"		02  ECP",
-"		03  IEEE1284",
-"		fe  IEEE1284 Target",
-"	02  Multiport serial controller",
-"	03  Modem",
-"		00  Generic",
-"		01  Hayes/16450",
-"		02  Hayes/16550",
-"		03  Hayes/16650",
-"		04  Hayes/16750",
-"	80  Communication controller",
-"C 08  Generic system peripheral",
-"	00  PIC",
-"		00  8259",
-"		01  ISA PIC",
-"		02  EISA PIC",
-"		10  IO-APIC",
-"		20  IO(X)-APIC",
-"	01  DMA controller",
-"		00  8237",
-"		01  ISA DMA",
-"		02  EISA DMA",
-"	02  Timer",
-"		00  8254",
-"		01  ISA Timer",
-"		02  EISA Timers",
-"	03  RTC",
-"		00  Generic",
-"		01  ISA RTC",
-"	04  PCI Hot-plug controller",
-"	80  System peripheral",
-"C 09  Input device controller",
-"	00  Keyboard controller",
-"	01  Digitizer Pen",
-"	02  Mouse controller",
-"	03  Scanner controller",
-"	04  Gameport controller",
-"		00  Generic",
-"		10  Extended",
-"	80  Input device controller",
-"C 0a  Docking station",
-"	00  Generic Docking Station",
-"	80  Docking Station",
-"C 0b  Processor",
-"	00  386",
-"	01  486",
-"	02  Pentium",
-"	10  Alpha",
-"	20  Power PC",
-"	30  MIPS",
-"	40  Co-processor",
-"C 0c  Serial bus controller",
-"	00  FireWire (IEEE 1394)",
-"		00  Generic",
-"		10  OHCI",
-"	01  ACCESS Bus",
-"	02  SSA",
-"	03  USB Controller",
-"		00  UHCI",
-"		10  OHCI",
-"		20  EHCI",
-"		80  Unspecified",
-"		fe  USB Device",
-"	04  Fibre Channel",
-"	05  SMBus",
-"	06  InfiniBand",
-"C 0d  Wireless controller",
-"	00  IRDA controller",
-"	01  Consumer IR controller",
-"	10  RF controller",
-"	80  Wireless controller",
-"C 0e  Intelligent controller",
-"	00  I2O",
-"C 0f  Satellite communications controller",
-"	00  Satellite TV controller",
-"	01  Satellite audio communication controller",
-"	03  Satellite voice communication controller",
-"	04  Satellite data communication controller",
-"C 10  Encryption controller",
-"	00  Network and computing encryption device",
-"	10  Entertainment encryption device",
-"	80  Encryption controller",
-"C 11  Signal processing controller",
-"	00  DPIO module",
-"	01  Performance counters",
-"	10  Communication synchronizer",
-"	80  Signal processing controller",
-""
-};
Index: pace/lib/libpci/sysdep.h
===================================================================
--- uspace/lib/libpci/sysdep.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,26 +1,0 @@
-/*
- *	The PCI Library -- System-Dependent Stuff
- *
- *	Copyright (c) 1997--2004 Martin Mares <mj@ucw.cz>
- *
- *	May 8, 2006 - Modified and ported to HelenOS by Jakub Jermar.
- *
- *	Can be freely distributed and used under the terms of the GNU GPL.
- */
-
-#ifdef __GNUC__
-#define UNUSED __attribute__((unused))
-#define NONRET __attribute__((noreturn))
-#else
-#define UNUSED
-#define NONRET
-#define inline
-#endif
-
-typedef u8 byte;
-typedef u16 word;
-
-#define cpu_to_le16(x) (x)
-#define cpu_to_le32(x) (x)
-#define le16_to_cpu(x) (x)
-#define le32_to_cpu(x) (x)
Index: pace/lib/libpci/types.h
===================================================================
--- uspace/lib/libpci/types.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,49 +1,0 @@
-/*
- *	The PCI Library -- Types and Format Strings
- *
- *	Copyright (c) 1997--2005 Martin Mares <mj@ucw.cz>
- *
- *	May 8, 2006 - Modified and ported to HelenOS by Jakub Jermar.
- *
- *	Can be freely distributed and used under the terms of the GNU GPL.
- */
-
-#include <sys/types.h>
-
-#ifndef PCI_HAVE_Uxx_TYPES
-
-typedef uint8_t u8;
-typedef uint16_t u16;
-typedef uint32_t u32;
-
-#ifdef PCI_HAVE_64BIT_ADDRESS
-#include <limits.h>
-#if ULONG_MAX > 0xffffffff
-typedef unsigned long u64;
-#define PCI_U64_FMT "l"
-#else
-typedef unsigned long long u64;
-#define PCI_U64_FMT "ll"
-#endif
-#endif
-
-#endif				/* PCI_HAVE_Uxx_TYPES */
-
-#ifdef PCI_HAVE_64BIT_ADDRESS
-typedef u64 pciaddr_t;
-#define PCIADDR_T_FMT "%08" PCI_U64_FMT "x"
-#define PCIADDR_PORT_FMT "%04" PCI_U64_FMT "x"
-#else
-typedef u32 pciaddr_t;
-#define PCIADDR_T_FMT "%08x"
-#define PCIADDR_PORT_FMT "%04x"
-#endif
-
-#ifdef PCI_ARCH_SPARC64
-/* On sparc64 Linux the kernel reports remapped port addresses and IRQ numbers */
-#undef PCIADDR_PORT_FMT
-#define PCIADDR_PORT_FMT PCIADDR_T_FMT
-#define PCIIRQ_FMT "%08x"
-#else
-#define PCIIRQ_FMT "%d"
-#endif
Index: uspace/lib/pci/COPYING
===================================================================
--- uspace/lib/pci/COPYING	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/pci/COPYING	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,345 @@
+		    GNU GENERAL PUBLIC LICENSE
+		       Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+			    Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+
+		    GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+
+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+
+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+			    NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+		     END OF TERMS AND CONDITIONS
+
+
+	    How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+    Gnomovision version 69, Copyright (C) year  name of author
+    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+  `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+  <signature of Ty Coon>, 1 April 1989
+  Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs.  If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library.  If this is what you want to do, use the GNU Library General
+Public License instead of this License.
Index: uspace/lib/pci/Makefile
===================================================================
--- uspace/lib/pci/Makefile	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/pci/Makefile	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,39 @@
+#
+# Copyright (c) 2005 Martin Decky
+# Copyright (c) 2007 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.
+#
+
+USPACE_PREFIX = ../..
+LIBRARY = libpci
+
+SOURCES = \
+	access.c \
+	generic.c \
+	names.c \
+	i386-ports.c
+
+include $(USPACE_PREFIX)/Makefile.common
Index: uspace/lib/pci/VERSION
===================================================================
--- uspace/lib/pci/VERSION	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/pci/VERSION	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,2 @@
+This libpci has been ported from pciutils-2.2.3
+on May 8, 2006 by Jakub Jermar.
Index: uspace/lib/pci/access.c
===================================================================
--- uspace/lib/pci/access.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/pci/access.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,270 @@
+/*
+ *	The PCI Library -- User Access
+ *
+ *	Copyright (c) 1997--2003 Martin Mares <mj@ucw.cz>
+ *
+ *	May 8, 2006 - Modified and ported to HelenOS by Jakub Jermar.
+ *
+ *	Can be freely distributed and used under the terms of the GNU GPL.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdarg.h>
+#include <str.h>
+
+#include "internal.h"
+
+static struct pci_methods *pci_methods[PCI_ACCESS_MAX] = {
+	&pm_intel_conf1,
+	&pm_intel_conf2,
+};
+
+struct pci_access *pci_alloc(void)
+{
+	struct pci_access *a = malloc(sizeof(struct pci_access));
+	int i;
+
+	if (!a)
+		return NULL;
+		
+	bzero(a, sizeof(*a));
+	for (i = 0; i < PCI_ACCESS_MAX; i++)
+		if (pci_methods[i] && pci_methods[i]->config)
+			pci_methods[i]->config(a);
+	return a;
+}
+
+void *pci_malloc(struct pci_access *a, int size)
+{
+	void *x = malloc(size);
+
+	if (!x)
+		a->error("Out of memory (allocation of %d bytes failed)", size);
+	return x;
+}
+
+void pci_mfree(void *x)
+{
+	if (x)
+		free(x);
+}
+
+static void pci_generic_error(const char *msg, ...)
+{
+	va_list args;
+
+	va_start(args, msg);
+	puts("pcilib: ");
+	vprintf(msg, args);
+	putchar('\n');
+	exit(1);
+}
+
+static void pci_generic_warn(const char *msg, ...)
+{
+	va_list args;
+
+	va_start(args, msg);
+	puts("pcilib: ");
+	vprintf(msg, args);
+	putchar('\n');
+}
+
+static void pci_generic_debug(const char *msg, ...)
+{
+	va_list args;
+
+	va_start(args, msg);
+	vprintf(msg, args);
+	va_end(args);
+}
+
+static void pci_null_debug(const char *msg UNUSED, ...)
+{
+}
+
+void pci_init(struct pci_access *a)
+{
+	if (!a->error)
+		a->error = pci_generic_error;
+	if (!a->warning)
+		a->warning = pci_generic_warn;
+	if (!a->debug)
+		a->debug = pci_generic_debug;
+	if (!a->debugging)
+		a->debug = pci_null_debug;
+
+	if (a->method) {
+		if (a->method >= PCI_ACCESS_MAX || !pci_methods[a->method])
+			a->error("This access method is not supported.");
+		a->methods = pci_methods[a->method];
+	} else {
+		unsigned int i;
+		for (i = 0; i < PCI_ACCESS_MAX; i++)
+			if (pci_methods[i]) {
+				a->debug("Trying method %d...", i);
+				if (pci_methods[i]->detect(a)) {
+					a->debug("...OK\n");
+					a->methods = pci_methods[i];
+					a->method = i;
+					break;
+				}
+				a->debug("...No.\n");
+			}
+		if (!a->methods)
+			a->error("Cannot find any working access method.");
+	}
+	a->debug("Decided to use %s\n", a->methods->name);
+	a->methods->init(a);
+}
+
+void pci_cleanup(struct pci_access *a)
+{
+	struct pci_dev *d, *e;
+
+	for (d = a->devices; d; d = e) {
+		e = d->next;
+		pci_free_dev(d);
+	}
+	if (a->methods)
+		a->methods->cleanup(a);
+	pci_free_name_list(a);
+	pci_mfree(a);
+}
+
+void pci_scan_bus(struct pci_access *a)
+{
+	a->methods->scan(a);
+}
+
+struct pci_dev *pci_alloc_dev(struct pci_access *a)
+{
+	struct pci_dev *d = pci_malloc(a, sizeof(struct pci_dev));
+
+	bzero(d, sizeof(*d));
+	d->access = a;
+	d->methods = a->methods;
+	d->hdrtype = -1;
+	if (d->methods->init_dev)
+		d->methods->init_dev(d);
+	return d;
+}
+
+int pci_link_dev(struct pci_access *a, struct pci_dev *d)
+{
+	d->next = a->devices;
+	a->devices = d;
+
+	return 1;
+}
+
+struct pci_dev *pci_get_dev(struct pci_access *a, int domain, int bus,
+			    int dev, int func)
+{
+	struct pci_dev *d = pci_alloc_dev(a);
+
+	d->domain = domain;
+	d->bus = bus;
+	d->dev = dev;
+	d->func = func;
+	return d;
+}
+
+void pci_free_dev(struct pci_dev *d)
+{
+	if (d->methods->cleanup_dev)
+		d->methods->cleanup_dev(d);
+	pci_mfree(d);
+}
+
+static inline void
+pci_read_data(struct pci_dev *d, void *buf, int pos, int len)
+{
+	if (pos & (len - 1))
+		d->access->error("Unaligned read: pos=%02x, len=%d", pos,
+				 len);
+	if (pos + len <= d->cache_len)
+		memcpy(buf, d->cache + pos, len);
+	else if (!d->methods->read(d, pos, buf, len))
+		memset(buf, 0xff, len);
+}
+
+byte pci_read_byte(struct pci_dev *d, int pos)
+{
+	byte buf;
+	pci_read_data(d, &buf, pos, 1);
+	return buf;
+}
+
+word pci_read_word(struct pci_dev * d, int pos)
+{
+	word buf;
+	pci_read_data(d, &buf, pos, 2);
+	return le16_to_cpu(buf);
+}
+
+u32 pci_read_long(struct pci_dev * d, int pos)
+{
+	u32 buf;
+	pci_read_data(d, &buf, pos, 4);
+	return le32_to_cpu(buf);
+}
+
+int pci_read_block(struct pci_dev *d, int pos, byte * buf, int len)
+{
+	return d->methods->read(d, pos, buf, len);
+}
+
+static inline int
+pci_write_data(struct pci_dev *d, void *buf, int pos, int len)
+{
+	if (pos & (len - 1))
+		d->access->error("Unaligned write: pos=%02x,len=%d", pos, len);
+	if (pos + len <= d->cache_len)
+		memcpy(d->cache + pos, buf, len);
+	return d->methods->write(d, pos, buf, len);
+}
+
+int pci_write_byte(struct pci_dev *d, int pos, byte data)
+{
+	return pci_write_data(d, &data, pos, 1);
+}
+
+int pci_write_word(struct pci_dev *d, int pos, word data)
+{
+	word buf = cpu_to_le16(data);
+	return pci_write_data(d, &buf, pos, 2);
+}
+
+int pci_write_long(struct pci_dev *d, int pos, u32 data)
+{
+	u32 buf = cpu_to_le32(data);
+	return pci_write_data(d, &buf, pos, 4);
+}
+
+int pci_write_block(struct pci_dev *d, int pos, byte * buf, int len)
+{
+	if (pos < d->cache_len) {
+		int l = (pos + len >= d->cache_len) ? (d->cache_len - pos) : len;
+		memcpy(d->cache + pos, buf, l);
+	}
+	return d->methods->write(d, pos, buf, len);
+}
+
+int pci_fill_info(struct pci_dev *d, int flags)
+{
+	if (flags & PCI_FILL_RESCAN) {
+		flags &= ~PCI_FILL_RESCAN;
+		d->known_fields = 0;
+	}
+	if (flags & ~d->known_fields)
+		d->known_fields |= d->methods->fill_info(d, flags & ~d->known_fields);
+	return d->known_fields;
+}
+
+void pci_setup_cache(struct pci_dev *d, byte * cache, int len)
+{
+	d->cache = cache;
+	d->cache_len = len;
+}
Index: uspace/lib/pci/generic.c
===================================================================
--- uspace/lib/pci/generic.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/pci/generic.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,206 @@
+/*
+ *	The PCI Library -- Generic Direct Access Functions
+ *
+ *	Copyright (c) 1997--2000 Martin Mares <mj@ucw.cz>
+ *
+ *	May 8, 2006 - Modified and ported to HelenOS by Jakub Jermar.
+ *
+ *	Can be freely distributed and used under the terms of the GNU GPL.
+ */
+
+#include <str.h>
+
+#include "internal.h"
+
+void pci_generic_scan_bus(struct pci_access *a, byte * busmap, int bus)
+{
+	int dev, multi, ht;
+	struct pci_dev *t;
+
+	a->debug("Scanning bus %02x for devices...\n", bus);
+	if (busmap[bus]) {
+		a->warning("Bus %02x seen twice (firmware bug). Ignored.",
+			   bus);
+		return;
+	}
+	busmap[bus] = 1;
+	t = pci_alloc_dev(a);
+	t->bus = bus;
+	for (dev = 0; dev < 32; dev++) {
+		t->dev = dev;
+		multi = 0;
+		for (t->func = 0; !t->func || (multi && t->func < 8);
+		     t->func++) {
+			u32 vd = pci_read_long(t, PCI_VENDOR_ID);
+			struct pci_dev *d;
+
+			if (!vd || vd == 0xffffffff)
+				continue;
+			ht = pci_read_byte(t, PCI_HEADER_TYPE);
+			if (!t->func)
+				multi = ht & 0x80;
+			ht &= 0x7f;
+			d = pci_alloc_dev(a);
+			d->bus = t->bus;
+			d->dev = t->dev;
+			d->func = t->func;
+			d->vendor_id = vd & 0xffff;
+			d->device_id = vd >> 16U;
+			d->known_fields = PCI_FILL_IDENT;
+			d->hdrtype = ht;
+			pci_link_dev(a, d);
+			switch (ht) {
+			case PCI_HEADER_TYPE_NORMAL:
+				break;
+			case PCI_HEADER_TYPE_BRIDGE:
+			case PCI_HEADER_TYPE_CARDBUS:
+				pci_generic_scan_bus(a, busmap,
+						     pci_read_byte(t,
+								   PCI_SECONDARY_BUS));
+				break;
+			default:
+				a->debug
+				    ("Device %04x:%02x:%02x.%d has unknown header type %02x.\n",
+				     d->domain, d->bus, d->dev, d->func,
+				     ht);
+			}
+		}
+	}
+	pci_free_dev(t);
+}
+
+void pci_generic_scan(struct pci_access *a)
+{
+	byte busmap[256];
+
+	bzero(busmap, sizeof(busmap));
+	pci_generic_scan_bus(a, busmap, 0);
+}
+
+int pci_generic_fill_info(struct pci_dev *d, int flags)
+{
+	struct pci_access *a = d->access;
+
+	if ((flags & (PCI_FILL_BASES | PCI_FILL_ROM_BASE))
+	    && d->hdrtype < 0)
+		d->hdrtype = pci_read_byte(d, PCI_HEADER_TYPE) & 0x7f;
+	if (flags & PCI_FILL_IDENT) {
+		d->vendor_id = pci_read_word(d, PCI_VENDOR_ID);
+		d->device_id = pci_read_word(d, PCI_DEVICE_ID);
+	}
+	if (flags & PCI_FILL_IRQ)
+		d->irq = pci_read_byte(d, PCI_INTERRUPT_LINE);
+	if (flags & PCI_FILL_BASES) {
+		int cnt = 0, i;
+		bzero(d->base_addr, sizeof(d->base_addr));
+		switch (d->hdrtype) {
+		case PCI_HEADER_TYPE_NORMAL:
+			cnt = 6;
+			break;
+		case PCI_HEADER_TYPE_BRIDGE:
+			cnt = 2;
+			break;
+		case PCI_HEADER_TYPE_CARDBUS:
+			cnt = 1;
+			break;
+		}
+		if (cnt) {
+			for (i = 0; i < cnt; i++) {
+				u32 x = pci_read_long(d, PCI_BASE_ADDRESS_0 + i * 4);
+				if (!x || x == (u32) ~ 0)
+					continue;
+				if ((x & PCI_BASE_ADDRESS_SPACE) == PCI_BASE_ADDRESS_SPACE_IO)
+					d->base_addr[i] = x;
+				else {
+					if ((x & PCI_BASE_ADDRESS_MEM_TYPE_MASK) != PCI_BASE_ADDRESS_MEM_TYPE_64)
+						d->base_addr[i] = x;
+					else if (i >= cnt - 1)
+						a->warning("%04x:%02x:%02x.%d: Invalid 64-bit address seen for BAR %d.",
+						     d->domain, d->bus,
+						     d->dev, d->func, i);
+					else {
+						u32 y = pci_read_long(d, PCI_BASE_ADDRESS_0 + (++i) * 4);
+#ifdef PCI_HAVE_64BIT_ADDRESS
+						d->base_addr[i - 1] = x | (((pciaddr_t) y) << 32);
+#else
+						if (y)
+							a->warning("%04x:%02x:%02x.%d 64-bit device address ignored.",
+							     d->domain,
+							     d->bus,
+							     d->dev,
+							     d->func);
+						else
+							d->base_addr[i - 1] = x;
+#endif
+					}
+				}
+			}
+		}
+	}
+	if (flags & PCI_FILL_ROM_BASE) {
+		int reg = 0;
+		d->rom_base_addr = 0;
+		switch (d->hdrtype) {
+		case PCI_HEADER_TYPE_NORMAL:
+			reg = PCI_ROM_ADDRESS;
+			break;
+		case PCI_HEADER_TYPE_BRIDGE:
+			reg = PCI_ROM_ADDRESS1;
+			break;
+		}
+		if (reg) {
+			u32 u = pci_read_long(d, reg);
+			if (u != 0xffffffff)
+				d->rom_base_addr = u;
+		}
+	}
+	return flags & ~PCI_FILL_SIZES;
+}
+
+static int
+pci_generic_block_op(struct pci_dev *d, int pos, byte * buf, int len,
+		     int (*r) (struct pci_dev * d, int pos, byte * buf,
+			       int len))
+{
+	if ((pos & 1) && len >= 1) {
+		if (!r(d, pos, buf, 1))
+			return 0;
+		pos++;
+		buf++;
+		len--;
+	}
+	if ((pos & 3) && len >= 2) {
+		if (!r(d, pos, buf, 2))
+			return 0;
+		pos += 2;
+		buf += 2;
+		len -= 2;
+	}
+	while (len >= 4) {
+		if (!r(d, pos, buf, 4))
+			return 0;
+		pos += 4;
+		buf += 4;
+		len -= 4;
+	}
+	if (len >= 2) {
+		if (!r(d, pos, buf, 2))
+			return 0;
+		pos += 2;
+		buf += 2;
+		len -= 2;
+	}
+	if (len && !r(d, pos, buf, 1))
+		return 0;
+	return 1;
+}
+
+int pci_generic_block_read(struct pci_dev *d, int pos, byte * buf, int len)
+{
+	return pci_generic_block_op(d, pos, buf, len, d->access->methods->read);
+}
+
+int pci_generic_block_write(struct pci_dev *d, int pos, byte * buf, int len)
+{
+	return pci_generic_block_op(d, pos, buf, len, d->access->methods->write);
+}
Index: uspace/lib/pci/header.h
===================================================================
--- uspace/lib/pci/header.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/pci/header.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,937 @@
+/*
+ *	The PCI Library -- PCI Header Structure (based on <linux/pci.h>)
+ *
+ *	Copyright (c) 1997--2005 Martin Mares <mj@ucw.cz>
+ *
+ *	May 8, 2006 - Modified and ported to HelenOS by Jakub Jermar.
+ *
+ *	Can be freely distributed and used under the terms of the GNU GPL.
+ */
+
+/*
+ * Under PCI, each device has 256 bytes of configuration address space,
+ * of which the first 64 bytes are standardized as follows:
+ */
+#define PCI_VENDOR_ID		0x00	/* 16 bits */
+#define PCI_DEVICE_ID		0x02	/* 16 bits */
+#define PCI_COMMAND		0x04	/* 16 bits */
+#define  PCI_COMMAND_IO		0x1	/* Enable response in I/O space */
+#define  PCI_COMMAND_MEMORY	0x2	/* Enable response in Memory space */
+#define  PCI_COMMAND_MASTER	0x4	/* Enable bus mastering */
+#define  PCI_COMMAND_SPECIAL	0x8	/* Enable response to special cycles */
+#define  PCI_COMMAND_INVALIDATE	0x10	/* Use memory write and invalidate */
+#define  PCI_COMMAND_VGA_PALETTE 0x20	/* Enable palette snooping */
+#define  PCI_COMMAND_PARITY	0x40	/* Enable parity checking */
+#define  PCI_COMMAND_WAIT 	0x80	/* Enable address/data stepping */
+#define  PCI_COMMAND_SERR	0x100	/* Enable SERR */
+#define  PCI_COMMAND_FAST_BACK	0x200	/* Enable back-to-back writes */
+
+#define PCI_STATUS		0x06	/* 16 bits */
+#define  PCI_STATUS_CAP_LIST	0x10	/* Support Capability List */
+#define  PCI_STATUS_66MHZ	0x20	/* Support 66 Mhz PCI 2.1 bus */
+#define  PCI_STATUS_UDF		0x40	/* Support User Definable Features [obsolete] */
+#define  PCI_STATUS_FAST_BACK	0x80	/* Accept fast-back to back */
+#define  PCI_STATUS_PARITY	0x100	/* Detected parity error */
+#define  PCI_STATUS_DEVSEL_MASK	0x600	/* DEVSEL timing */
+#define  PCI_STATUS_DEVSEL_FAST	0x000
+#define  PCI_STATUS_DEVSEL_MEDIUM 0x200
+#define  PCI_STATUS_DEVSEL_SLOW 0x400
+#define  PCI_STATUS_SIG_TARGET_ABORT 0x800	/* Set on target abort */
+#define  PCI_STATUS_REC_TARGET_ABORT 0x1000	/* Master ack of " */
+#define  PCI_STATUS_REC_MASTER_ABORT 0x2000	/* Set on master abort */
+#define  PCI_STATUS_SIG_SYSTEM_ERROR 0x4000	/* Set when we drive SERR */
+#define  PCI_STATUS_DETECTED_PARITY 0x8000	/* Set on parity error */
+
+#define PCI_CLASS_REVISION	0x08	/* High 24 bits are class, low 8
+					   revision */
+#define PCI_REVISION_ID         0x08	/* Revision ID */
+#define PCI_CLASS_PROG          0x09	/* Reg. Level Programming Interface */
+#define PCI_CLASS_DEVICE        0x0a	/* Device class */
+
+#define PCI_CACHE_LINE_SIZE	0x0c	/* 8 bits */
+#define PCI_LATENCY_TIMER	0x0d	/* 8 bits */
+#define PCI_HEADER_TYPE		0x0e	/* 8 bits */
+#define  PCI_HEADER_TYPE_NORMAL	0
+#define  PCI_HEADER_TYPE_BRIDGE 1
+#define  PCI_HEADER_TYPE_CARDBUS 2
+
+#define PCI_BIST		0x0f	/* 8 bits */
+#define PCI_BIST_CODE_MASK	0x0f	/* Return result */
+#define PCI_BIST_START		0x40	/* 1 to start BIST, 2 secs or less */
+#define PCI_BIST_CAPABLE	0x80	/* 1 if BIST capable */
+
+/*
+ * Base addresses specify locations in memory or I/O space.
+ * Decoded size can be determined by writing a value of 
+ * 0xffffffff to the register, and reading it back.  Only 
+ * 1 bits are decoded.
+ */
+#define PCI_BASE_ADDRESS_0	0x10	/* 32 bits */
+#define PCI_BASE_ADDRESS_1	0x14	/* 32 bits [htype 0,1 only] */
+#define PCI_BASE_ADDRESS_2	0x18	/* 32 bits [htype 0 only] */
+#define PCI_BASE_ADDRESS_3	0x1c	/* 32 bits */
+#define PCI_BASE_ADDRESS_4	0x20	/* 32 bits */
+#define PCI_BASE_ADDRESS_5	0x24	/* 32 bits */
+#define  PCI_BASE_ADDRESS_SPACE	0x01	/* 0 = memory, 1 = I/O */
+#define  PCI_BASE_ADDRESS_SPACE_IO 0x01
+#define  PCI_BASE_ADDRESS_SPACE_MEMORY 0x00
+#define  PCI_BASE_ADDRESS_MEM_TYPE_MASK 0x06
+#define  PCI_BASE_ADDRESS_MEM_TYPE_32	0x00	/* 32 bit address */
+#define  PCI_BASE_ADDRESS_MEM_TYPE_1M	0x02	/* Below 1M [obsolete] */
+#define  PCI_BASE_ADDRESS_MEM_TYPE_64	0x04	/* 64 bit address */
+#define  PCI_BASE_ADDRESS_MEM_PREFETCH	0x08	/* prefetchable? */
+#define  PCI_BASE_ADDRESS_MEM_MASK	(~(pciaddr_t)0x0f)
+#define  PCI_BASE_ADDRESS_IO_MASK	(~(pciaddr_t)0x03)
+/* bit 1 is reserved if address_space = 1 */
+
+/* Header type 0 (normal devices) */
+#define PCI_CARDBUS_CIS		0x28
+#define PCI_SUBSYSTEM_VENDOR_ID	0x2c
+#define PCI_SUBSYSTEM_ID	0x2e
+#define PCI_ROM_ADDRESS		0x30	/* Bits 31..11 are address, 10..1 reserved */
+#define  PCI_ROM_ADDRESS_ENABLE	0x01
+#define PCI_ROM_ADDRESS_MASK	(~(pciaddr_t)0x7ff)
+
+#define PCI_CAPABILITY_LIST	0x34	/* Offset of first capability list entry */
+
+/* 0x35-0x3b are reserved */
+#define PCI_INTERRUPT_LINE	0x3c	/* 8 bits */
+#define PCI_INTERRUPT_PIN	0x3d	/* 8 bits */
+#define PCI_MIN_GNT		0x3e	/* 8 bits */
+#define PCI_MAX_LAT		0x3f	/* 8 bits */
+
+/* Header type 1 (PCI-to-PCI bridges) */
+#define PCI_PRIMARY_BUS		0x18	/* Primary bus number */
+#define PCI_SECONDARY_BUS	0x19	/* Secondary bus number */
+#define PCI_SUBORDINATE_BUS	0x1a	/* Highest bus number behind the bridge */
+#define PCI_SEC_LATENCY_TIMER	0x1b	/* Latency timer for secondary interface */
+#define PCI_IO_BASE		0x1c	/* I/O range behind the bridge */
+#define PCI_IO_LIMIT		0x1d
+#define  PCI_IO_RANGE_TYPE_MASK	0x0f	/* I/O bridging type */
+#define  PCI_IO_RANGE_TYPE_16	0x00
+#define  PCI_IO_RANGE_TYPE_32	0x01
+#define  PCI_IO_RANGE_MASK	~0x0f
+#define PCI_SEC_STATUS		0x1e	/* Secondary status register */
+#define PCI_MEMORY_BASE		0x20	/* Memory range behind */
+#define PCI_MEMORY_LIMIT	0x22
+#define  PCI_MEMORY_RANGE_TYPE_MASK 0x0f
+#define  PCI_MEMORY_RANGE_MASK	~0x0f
+#define PCI_PREF_MEMORY_BASE	0x24	/* Prefetchable memory range behind */
+#define PCI_PREF_MEMORY_LIMIT	0x26
+#define  PCI_PREF_RANGE_TYPE_MASK 0x0f
+#define  PCI_PREF_RANGE_TYPE_32	0x00
+#define  PCI_PREF_RANGE_TYPE_64	0x01
+#define  PCI_PREF_RANGE_MASK	~0x0f
+#define PCI_PREF_BASE_UPPER32	0x28	/* Upper half of prefetchable memory range */
+#define PCI_PREF_LIMIT_UPPER32	0x2c
+#define PCI_IO_BASE_UPPER16	0x30	/* Upper half of I/O addresses */
+#define PCI_IO_LIMIT_UPPER16	0x32
+/* 0x34 same as for htype 0 */
+/* 0x35-0x3b is reserved */
+#define PCI_ROM_ADDRESS1	0x38	/* Same as PCI_ROM_ADDRESS, but for htype 1 */
+/* 0x3c-0x3d are same as for htype 0 */
+#define PCI_BRIDGE_CONTROL	0x3e
+#define  PCI_BRIDGE_CTL_PARITY	0x01	/* Enable parity detection on secondary interface */
+#define  PCI_BRIDGE_CTL_SERR	0x02	/* The same for SERR forwarding */
+#define  PCI_BRIDGE_CTL_NO_ISA	0x04	/* Disable bridging of ISA ports */
+#define  PCI_BRIDGE_CTL_VGA	0x08	/* Forward VGA addresses */
+#define  PCI_BRIDGE_CTL_MASTER_ABORT 0x20	/* Report master aborts */
+#define  PCI_BRIDGE_CTL_BUS_RESET 0x40	/* Secondary bus reset */
+#define  PCI_BRIDGE_CTL_FAST_BACK 0x80	/* Fast Back2Back enabled on secondary interface */
+
+/* Header type 2 (CardBus bridges) */
+/* 0x14-0x15 reserved */
+#define PCI_CB_SEC_STATUS	0x16	/* Secondary status */
+#define PCI_CB_PRIMARY_BUS	0x18	/* PCI bus number */
+#define PCI_CB_CARD_BUS		0x19	/* CardBus bus number */
+#define PCI_CB_SUBORDINATE_BUS	0x1a	/* Subordinate bus number */
+#define PCI_CB_LATENCY_TIMER	0x1b	/* CardBus latency timer */
+#define PCI_CB_MEMORY_BASE_0	0x1c
+#define PCI_CB_MEMORY_LIMIT_0	0x20
+#define PCI_CB_MEMORY_BASE_1	0x24
+#define PCI_CB_MEMORY_LIMIT_1	0x28
+#define PCI_CB_IO_BASE_0	0x2c
+#define PCI_CB_IO_BASE_0_HI	0x2e
+#define PCI_CB_IO_LIMIT_0	0x30
+#define PCI_CB_IO_LIMIT_0_HI	0x32
+#define PCI_CB_IO_BASE_1	0x34
+#define PCI_CB_IO_BASE_1_HI	0x36
+#define PCI_CB_IO_LIMIT_1	0x38
+#define PCI_CB_IO_LIMIT_1_HI	0x3a
+#define  PCI_CB_IO_RANGE_MASK	~0x03
+/* 0x3c-0x3d are same as for htype 0 */
+#define PCI_CB_BRIDGE_CONTROL	0x3e
+#define  PCI_CB_BRIDGE_CTL_PARITY	0x01	/* Similar to standard bridge control register */
+#define  PCI_CB_BRIDGE_CTL_SERR		0x02
+#define  PCI_CB_BRIDGE_CTL_ISA		0x04
+#define  PCI_CB_BRIDGE_CTL_VGA		0x08
+#define  PCI_CB_BRIDGE_CTL_MASTER_ABORT	0x20
+#define  PCI_CB_BRIDGE_CTL_CB_RESET	0x40	/* CardBus reset */
+#define  PCI_CB_BRIDGE_CTL_16BIT_INT	0x80	/* Enable interrupt for 16-bit cards */
+#define  PCI_CB_BRIDGE_CTL_PREFETCH_MEM0 0x100	/* Prefetch enable for both memory regions */
+#define  PCI_CB_BRIDGE_CTL_PREFETCH_MEM1 0x200
+#define  PCI_CB_BRIDGE_CTL_POST_WRITES	0x400
+#define PCI_CB_SUBSYSTEM_VENDOR_ID 0x40
+#define PCI_CB_SUBSYSTEM_ID	0x42
+#define PCI_CB_LEGACY_MODE_BASE	0x44	/* 16-bit PC Card legacy mode base address (ExCa) */
+/* 0x48-0x7f reserved */
+
+/* Capability lists */
+
+#define PCI_CAP_LIST_ID		0	/* Capability ID */
+#define  PCI_CAP_ID_PM		0x01	/* Power Management */
+#define  PCI_CAP_ID_AGP		0x02	/* Accelerated Graphics Port */
+#define  PCI_CAP_ID_VPD		0x03	/* Vital Product Data */
+#define  PCI_CAP_ID_SLOTID	0x04	/* Slot Identification */
+#define  PCI_CAP_ID_MSI		0x05	/* Message Signalled Interrupts */
+#define  PCI_CAP_ID_CHSWP	0x06	/* CompactPCI HotSwap */
+#define  PCI_CAP_ID_PCIX        0x07	/* PCI-X */
+#define  PCI_CAP_ID_HT          0x08	/* HyperTransport */
+#define  PCI_CAP_ID_VNDR	0x09	/* Vendor specific */
+#define  PCI_CAP_ID_DBG		0x0A	/* Debug port */
+#define  PCI_CAP_ID_CCRC	0x0B	/* CompactPCI Central Resource Control */
+#define  PCI_CAP_ID_AGP3	0x0E	/* AGP 8x */
+#define  PCI_CAP_ID_EXP		0x10	/* PCI Express */
+#define  PCI_CAP_ID_MSIX	0x11	/* MSI-X */
+#define PCI_CAP_LIST_NEXT	1	/* Next capability in the list */
+#define PCI_CAP_FLAGS		2	/* Capability defined flags (16 bits) */
+#define PCI_CAP_SIZEOF		4
+
+/* Capabilities residing in the PCI Express extended configuration space */
+
+#define PCI_EXT_CAP_ID_AER	0x01	/* Advanced Error Reporting */
+#define PCI_EXT_CAP_ID_VC	0x02	/* Virtual Channel */
+#define PCI_EXT_CAP_ID_DSN	0x03	/* Device Serial Number */
+#define PCI_EXT_CAP_ID_PB	0x04	/* Power Budgeting */
+
+/* Power Management Registers */
+
+#define  PCI_PM_CAP_VER_MASK	0x0007	/* Version (2=PM1.1) */
+#define  PCI_PM_CAP_PME_CLOCK	0x0008	/* Clock required for PME generation */
+#define  PCI_PM_CAP_DSI		0x0020	/* Device specific initialization required */
+#define  PCI_PM_CAP_AUX_C_MASK	0x01c0	/* Maximum aux current required in D3cold */
+#define  PCI_PM_CAP_D1		0x0200	/* D1 power state support */
+#define  PCI_PM_CAP_D2		0x0400	/* D2 power state support */
+#define  PCI_PM_CAP_PME_D0	0x0800	/* PME can be asserted from D0 */
+#define  PCI_PM_CAP_PME_D1	0x1000	/* PME can be asserted from D1 */
+#define  PCI_PM_CAP_PME_D2	0x2000	/* PME can be asserted from D2 */
+#define  PCI_PM_CAP_PME_D3_HOT	0x4000	/* PME can be asserted from D3hot */
+#define  PCI_PM_CAP_PME_D3_COLD	0x8000	/* PME can be asserted from D3cold */
+#define PCI_PM_CTRL		4	/* PM control and status register */
+#define  PCI_PM_CTRL_STATE_MASK	0x0003	/* Current power state (D0 to D3) */
+#define  PCI_PM_CTRL_PME_ENABLE	0x0100	/* PME pin enable */
+#define  PCI_PM_CTRL_DATA_SEL_MASK	0x1e00	/* PM table data index */
+#define  PCI_PM_CTRL_DATA_SCALE_MASK	0x6000	/* PM table data scaling factor */
+#define  PCI_PM_CTRL_PME_STATUS	0x8000	/* PME pin status */
+#define PCI_PM_PPB_EXTENSIONS	6	/* PPB support extensions */
+#define  PCI_PM_PPB_B2_B3	0x40	/* If bridge enters D3hot, bus enters: 0=B3, 1=B2 */
+#define  PCI_PM_BPCC_ENABLE	0x80	/* Secondary bus is power managed */
+#define PCI_PM_DATA_REGISTER	7	/* PM table contents read here */
+#define PCI_PM_SIZEOF		8
+
+/* AGP registers */
+
+#define PCI_AGP_VERSION		2	/* BCD version number */
+#define PCI_AGP_RFU		3	/* Rest of capability flags */
+#define PCI_AGP_STATUS		4	/* Status register */
+#define  PCI_AGP_STATUS_RQ_MASK	0xff000000	/* Maximum number of requests - 1 */
+#define  PCI_AGP_STATUS_ISOCH	0x10000	/* Isochronous transactions supported */
+#define  PCI_AGP_STATUS_ARQSZ_MASK	0xe000	/* log2(optimum async req size in bytes) - 4 */
+#define  PCI_AGP_STATUS_CAL_MASK	0x1c00	/* Calibration cycle timing */
+#define  PCI_AGP_STATUS_SBA	0x0200	/* Sideband addressing supported */
+#define  PCI_AGP_STATUS_ITA_COH	0x0100	/* In-aperture accesses always coherent */
+#define  PCI_AGP_STATUS_GART64	0x0080	/* 64-bit GART entries supported */
+#define  PCI_AGP_STATUS_HTRANS	0x0040	/* If 0, core logic can xlate host CPU accesses thru aperture */
+#define  PCI_AGP_STATUS_64BIT	0x0020	/* 64-bit addressing cycles supported */
+#define  PCI_AGP_STATUS_FW	0x0010	/* Fast write transfers supported */
+#define  PCI_AGP_STATUS_AGP3	0x0008	/* AGP3 mode supported */
+#define  PCI_AGP_STATUS_RATE4	0x0004	/* 4x transfer rate supported (RFU in AGP3 mode) */
+#define  PCI_AGP_STATUS_RATE2	0x0002	/* 2x transfer rate supported (8x in AGP3 mode) */
+#define  PCI_AGP_STATUS_RATE1	0x0001	/* 1x transfer rate supported (4x in AGP3 mode) */
+#define PCI_AGP_COMMAND		8	/* Control register */
+#define  PCI_AGP_COMMAND_RQ_MASK 0xff000000	/* Master: Maximum number of requests */
+#define  PCI_AGP_COMMAND_ARQSZ_MASK	0xe000	/* log2(optimum async req size in bytes) - 4 */
+#define  PCI_AGP_COMMAND_CAL_MASK	0x1c00	/* Calibration cycle timing */
+#define  PCI_AGP_COMMAND_SBA	0x0200	/* Sideband addressing enabled */
+#define  PCI_AGP_COMMAND_AGP	0x0100	/* Allow processing of AGP transactions */
+#define  PCI_AGP_COMMAND_GART64	0x0080	/* 64-bit GART entries enabled */
+#define  PCI_AGP_COMMAND_64BIT	0x0020	/* Allow generation of 64-bit addr cycles */
+#define  PCI_AGP_COMMAND_FW	0x0010	/* Enable FW transfers */
+#define  PCI_AGP_COMMAND_RATE4	0x0004	/* Use 4x rate (RFU in AGP3 mode) */
+#define  PCI_AGP_COMMAND_RATE2	0x0002	/* Use 2x rate (8x in AGP3 mode) */
+#define  PCI_AGP_COMMAND_RATE1	0x0001	/* Use 1x rate (4x in AGP3 mode) */
+#define PCI_AGP_SIZEOF		12
+
+/* Slot Identification */
+
+#define PCI_SID_ESR		2	/* Expansion Slot Register */
+#define  PCI_SID_ESR_NSLOTS	0x1f	/* Number of expansion slots available */
+#define  PCI_SID_ESR_FIC	0x20	/* First In Chassis Flag */
+#define PCI_SID_CHASSIS_NR	3	/* Chassis Number */
+
+/* Message Signalled Interrupts registers */
+
+#define PCI_MSI_FLAGS		2	/* Various flags */
+#define  PCI_MSI_FLAGS_64BIT	0x80	/* 64-bit addresses allowed */
+#define  PCI_MSI_FLAGS_QSIZE	0x70	/* Message queue size configured */
+#define  PCI_MSI_FLAGS_QMASK	0x0e	/* Maximum queue size available */
+#define  PCI_MSI_FLAGS_ENABLE	0x01	/* MSI feature enabled */
+#define PCI_MSI_RFU		3	/* Rest of capability flags */
+#define PCI_MSI_ADDRESS_LO	4	/* Lower 32 bits */
+#define PCI_MSI_ADDRESS_HI	8	/* Upper 32 bits (if PCI_MSI_FLAGS_64BIT set) */
+#define PCI_MSI_DATA_32		8	/* 16 bits of data for 32-bit devices */
+#define PCI_MSI_DATA_64		12	/* 16 bits of data for 64-bit devices */
+
+/* PCI-X */
+#define PCI_PCIX_COMMAND                                                2	/* Command register offset */
+#define PCI_PCIX_COMMAND_DPERE                                     0x0001	/* Data Parity Error Recover Enable */
+#define PCI_PCIX_COMMAND_ERO                                       0x0002	/* Enable Relaxed Ordering */
+#define PCI_PCIX_COMMAND_MAX_MEM_READ_BYTE_COUNT                   0x000c	/* Maximum Memory Read Byte Count */
+#define PCI_PCIX_COMMAND_MAX_OUTSTANDING_SPLIT_TRANS               0x0070
+#define PCI_PCIX_COMMAND_RESERVED                                   0xf80
+#define PCI_PCIX_STATUS                                                 4	/* Status register offset */
+#define PCI_PCIX_STATUS_FUNCTION                               0x00000007
+#define PCI_PCIX_STATUS_DEVICE                                 0x000000f8
+#define PCI_PCIX_STATUS_BUS                                    0x0000ff00
+#define PCI_PCIX_STATUS_64BIT                                  0x00010000
+#define PCI_PCIX_STATUS_133MHZ                                 0x00020000
+#define PCI_PCIX_STATUS_SC_DISCARDED                           0x00040000	/* Split Completion Discarded */
+#define PCI_PCIX_STATUS_UNEXPECTED_SC                          0x00080000	/* Unexpected Split Completion */
+#define PCI_PCIX_STATUS_DEVICE_COMPLEXITY                      0x00100000	/* 0 = simple device, 1 = bridge device */
+#define PCI_PCIX_STATUS_DESIGNED_MAX_MEM_READ_BYTE_COUNT       0x00600000	/* 0 = 512 bytes, 1 = 1024, 2 = 2048, 3 = 4096 */
+#define PCI_PCIX_STATUS_DESIGNED_MAX_OUTSTANDING_SPLIT_TRANS   0x03800000
+#define PCI_PCIX_STATUS_DESIGNED_MAX_CUMULATIVE_READ_SIZE      0x1c000000
+#define PCI_PCIX_STATUS_RCVD_SC_ERR_MESS                       0x20000000	/* Received Split Completion Error Message */
+#define PCI_PCIX_STATUS_266MHZ				       0x40000000	/* 266 MHz capable */
+#define PCI_PCIX_STATUS_533MHZ				       0x80000000	/* 533 MHz capable */
+#define PCI_PCIX_SIZEOF		4
+
+/* PCI-X Bridges */
+#define PCI_PCIX_BRIDGE_SEC_STATUS                                      2	/* Secondary bus status register offset */
+#define PCI_PCIX_BRIDGE_SEC_STATUS_64BIT                           0x0001
+#define PCI_PCIX_BRIDGE_SEC_STATUS_133MHZ                          0x0002
+#define PCI_PCIX_BRIDGE_SEC_STATUS_SC_DISCARDED                    0x0004	/* Split Completion Discarded on secondary bus */
+#define PCI_PCIX_BRIDGE_SEC_STATUS_UNEXPECTED_SC                   0x0008	/* Unexpected Split Completion on secondary bus */
+#define PCI_PCIX_BRIDGE_SEC_STATUS_SC_OVERRUN                      0x0010	/* Split Completion Overrun on secondary bus */
+#define PCI_PCIX_BRIDGE_SEC_STATUS_SPLIT_REQUEST_DELAYED           0x0020
+#define PCI_PCIX_BRIDGE_SEC_STATUS_CLOCK_FREQ                      0x01c0
+#define PCI_PCIX_BRIDGE_SEC_STATUS_RESERVED                        0xfe00
+#define PCI_PCIX_BRIDGE_STATUS                                          4	/* Primary bus status register offset */
+#define PCI_PCIX_BRIDGE_STATUS_FUNCTION                        0x00000007
+#define PCI_PCIX_BRIDGE_STATUS_DEVICE                          0x000000f8
+#define PCI_PCIX_BRIDGE_STATUS_BUS                             0x0000ff00
+#define PCI_PCIX_BRIDGE_STATUS_64BIT                           0x00010000
+#define PCI_PCIX_BRIDGE_STATUS_133MHZ                          0x00020000
+#define PCI_PCIX_BRIDGE_STATUS_SC_DISCARDED                    0x00040000	/* Split Completion Discarded */
+#define PCI_PCIX_BRIDGE_STATUS_UNEXPECTED_SC                   0x00080000	/* Unexpected Split Completion */
+#define PCI_PCIX_BRIDGE_STATUS_SC_OVERRUN                      0x00100000	/* Split Completion Overrun */
+#define PCI_PCIX_BRIDGE_STATUS_SPLIT_REQUEST_DELAYED           0x00200000
+#define PCI_PCIX_BRIDGE_STATUS_RESERVED                        0xffc00000
+#define PCI_PCIX_BRIDGE_UPSTREAM_SPLIT_TRANS_CTRL                       8	/* Upstream Split Transaction Register offset */
+#define PCI_PCIX_BRIDGE_DOWNSTREAM_SPLIT_TRANS_CTRL                    12	/* Downstream Split Transaction Register offset */
+#define PCI_PCIX_BRIDGE_STR_CAPACITY                           0x0000ffff
+#define PCI_PCIX_BRIDGE_STR_COMMITMENT_LIMIT                   0xffff0000
+#define PCI_PCIX_BRIDGE_SIZEOF 12
+
+/* HyperTransport (as of spec rev. 2.00) */
+#define PCI_HT_CMD		2	/* Command Register */
+#define  PCI_HT_CMD_TYP_HI	0xe000	/* Capability Type high part */
+#define  PCI_HT_CMD_TYP_HI_PRI	0x0000	/* Slave or Primary Interface */
+#define  PCI_HT_CMD_TYP_HI_SEC	0x2000	/* Host or Secondary Interface */
+#define  PCI_HT_CMD_TYP		0xf800	/* Capability Type */
+#define  PCI_HT_CMD_TYP_SW	0x4000	/* Switch */
+#define  PCI_HT_CMD_TYP_IDC	0x8000	/* Interrupt Discovery and Configuration */
+#define  PCI_HT_CMD_TYP_RID	0x8800	/* Revision ID */
+#define  PCI_HT_CMD_TYP_UIDC	0x9000	/* UnitID Clumping */
+#define  PCI_HT_CMD_TYP_ECSA	0x9800	/* Extended Configuration Space Access */
+#define  PCI_HT_CMD_TYP_AM	0xa000	/* Address Mapping */
+#define  PCI_HT_CMD_TYP_MSIM	0xa800	/* MSI Mapping */
+#define  PCI_HT_CMD_TYP_DR	0xb000	/* DirectRoute */
+#define  PCI_HT_CMD_TYP_VCS	0xb800	/* VCSet */
+#define  PCI_HT_CMD_TYP_RM	0xc000	/* Retry Mode */
+#define  PCI_HT_CMD_TYP_X86	0xc800	/* X86 (reserved) */
+
+					/* Link Control Register */
+#define  PCI_HT_LCTR_CFLE	0x0002	/* CRC Flood Enable */
+#define  PCI_HT_LCTR_CST	0x0004	/* CRC Start Test */
+#define  PCI_HT_LCTR_CFE	0x0008	/* CRC Force Error */
+#define  PCI_HT_LCTR_LKFAIL	0x0010	/* Link Failure */
+#define  PCI_HT_LCTR_INIT	0x0020	/* Initialization Complete */
+#define  PCI_HT_LCTR_EOC	0x0040	/* End of Chain */
+#define  PCI_HT_LCTR_TXO	0x0080	/* Transmitter Off */
+#define  PCI_HT_LCTR_CRCERR	0x0f00	/* CRC Error */
+#define  PCI_HT_LCTR_ISOCEN	0x1000	/* Isochronous Flow Control Enable */
+#define  PCI_HT_LCTR_LSEN	0x2000	/* LDTSTOP# Tristate Enable */
+#define  PCI_HT_LCTR_EXTCTL	0x4000	/* Extended CTL Time */
+#define  PCI_HT_LCTR_64B	0x8000	/* 64-bit Addressing Enable */
+
+					/* Link Configuration Register */
+#define  PCI_HT_LCNF_MLWI	0x0007	/* Max Link Width In */
+#define  PCI_HT_LCNF_LW_8B	0x0	/* Link Width 8 bits */
+#define  PCI_HT_LCNF_LW_16B	0x1	/* Link Width 16 bits */
+#define  PCI_HT_LCNF_LW_32B	0x3	/* Link Width 32 bits */
+#define  PCI_HT_LCNF_LW_2B	0x4	/* Link Width 2 bits */
+#define  PCI_HT_LCNF_LW_4B	0x5	/* Link Width 4 bits */
+#define  PCI_HT_LCNF_LW_NC	0x7	/* Link physically not connected */
+#define  PCI_HT_LCNF_DFI	0x0008	/* Doubleword Flow Control In */
+#define  PCI_HT_LCNF_MLWO	0x0070	/* Max Link Width Out */
+#define  PCI_HT_LCNF_DFO	0x0080	/* Doubleword Flow Control Out */
+#define  PCI_HT_LCNF_LWI	0x0700	/* Link Width In */
+#define  PCI_HT_LCNF_DFIE	0x0800	/* Doubleword Flow Control In Enable */
+#define  PCI_HT_LCNF_LWO	0x7000	/* Link Width Out */
+#define  PCI_HT_LCNF_DFOE	0x8000	/* Doubleword Flow Control Out Enable */
+
+					/* Revision ID Register */
+#define  PCI_HT_RID_MIN		0x1f	/* Minor Revision */
+#define  PCI_HT_RID_MAJ		0xe0	/* Major Revision */
+
+					/* Link Frequency/Error Register */
+#define  PCI_HT_LFRER_FREQ	0x0f	/* Transmitter Clock Frequency */
+#define  PCI_HT_LFRER_200	0x00	/* 200MHz */
+#define  PCI_HT_LFRER_300	0x01	/* 300MHz */
+#define  PCI_HT_LFRER_400	0x02	/* 400MHz */
+#define  PCI_HT_LFRER_500	0x03	/* 500MHz */
+#define  PCI_HT_LFRER_600	0x04	/* 600MHz */
+#define  PCI_HT_LFRER_800	0x05	/* 800MHz */
+#define  PCI_HT_LFRER_1000	0x06	/* 1.0GHz */
+#define  PCI_HT_LFRER_1200	0x07	/* 1.2GHz */
+#define  PCI_HT_LFRER_1400	0x08	/* 1.4GHz */
+#define  PCI_HT_LFRER_1600	0x09	/* 1.6GHz */
+#define  PCI_HT_LFRER_VEND	0x0f	/* Vendor-Specific */
+#define  PCI_HT_LFRER_ERR	0xf0	/* Link Error */
+#define  PCI_HT_LFRER_PROT	0x10	/* Protocol Error */
+#define  PCI_HT_LFRER_OV	0x20	/* Overflow Error */
+#define  PCI_HT_LFRER_EOC	0x40	/* End of Chain Error */
+#define  PCI_HT_LFRER_CTLT	0x80	/* CTL Timeout */
+
+					/* Link Frequency Capability Register */
+#define  PCI_HT_LFCAP_200	0x0001	/* 200MHz */
+#define  PCI_HT_LFCAP_300	0x0002	/* 300MHz */
+#define  PCI_HT_LFCAP_400	0x0004	/* 400MHz */
+#define  PCI_HT_LFCAP_500	0x0008	/* 500MHz */
+#define  PCI_HT_LFCAP_600	0x0010	/* 600MHz */
+#define  PCI_HT_LFCAP_800	0x0020	/* 800MHz */
+#define  PCI_HT_LFCAP_1000	0x0040	/* 1.0GHz */
+#define  PCI_HT_LFCAP_1200	0x0080	/* 1.2GHz */
+#define  PCI_HT_LFCAP_1400	0x0100	/* 1.4GHz */
+#define  PCI_HT_LFCAP_1600	0x0200	/* 1.6GHz */
+#define  PCI_HT_LFCAP_VEND	0x8000	/* Vendor-Specific */
+
+					/* Feature Register */
+#define  PCI_HT_FTR_ISOCFC	0x0001	/* Isochronous Flow Control Mode */
+#define  PCI_HT_FTR_LDTSTOP	0x0002	/* LDTSTOP# Supported */
+#define  PCI_HT_FTR_CRCTM	0x0004	/* CRC Test Mode */
+#define  PCI_HT_FTR_ECTLT	0x0008	/* Extended CTL Time Required */
+#define  PCI_HT_FTR_64BA	0x0010	/* 64-bit Addressing */
+#define  PCI_HT_FTR_UIDRD	0x0020	/* UnitID Reorder Disable */
+
+					/* Error Handling Register */
+#define  PCI_HT_EH_PFLE		0x0001	/* Protocol Error Flood Enable */
+#define  PCI_HT_EH_OFLE		0x0002	/* Overflow Error Flood Enable */
+#define  PCI_HT_EH_PFE		0x0004	/* Protocol Error Fatal Enable */
+#define  PCI_HT_EH_OFE		0x0008	/* Overflow Error Fatal Enable */
+#define  PCI_HT_EH_EOCFE	0x0010	/* End of Chain Error Fatal Enable */
+#define  PCI_HT_EH_RFE		0x0020	/* Response Error Fatal Enable */
+#define  PCI_HT_EH_CRCFE	0x0040	/* CRC Error Fatal Enable */
+#define  PCI_HT_EH_SERRFE	0x0080	/* System Error Fatal Enable (B */
+#define  PCI_HT_EH_CF		0x0100	/* Chain Fail */
+#define  PCI_HT_EH_RE		0x0200	/* Response Error */
+#define  PCI_HT_EH_PNFE		0x0400	/* Protocol Error Nonfatal Enable */
+#define  PCI_HT_EH_ONFE		0x0800	/* Overflow Error Nonfatal Enable */
+#define  PCI_HT_EH_EOCNFE	0x1000	/* End of Chain Error Nonfatal Enable */
+#define  PCI_HT_EH_RNFE		0x2000	/* Response Error Nonfatal Enable */
+#define  PCI_HT_EH_CRCNFE	0x4000	/* CRC Error Nonfatal Enable */
+#define  PCI_HT_EH_SERRNFE	0x8000	/* System Error Nonfatal Enable */
+
+/* HyperTransport: Slave or Primary Interface */
+#define PCI_HT_PRI_CMD		2	/* Command Register */
+#define  PCI_HT_PRI_CMD_BUID	0x001f	/* Base UnitID */
+#define  PCI_HT_PRI_CMD_UC	0x03e0	/* Unit Count */
+#define  PCI_HT_PRI_CMD_MH	0x0400	/* Master Host */
+#define  PCI_HT_PRI_CMD_DD	0x0800	/* Default Direction */
+#define  PCI_HT_PRI_CMD_DUL	0x1000	/* Drop on Uninitialized Link */
+
+#define PCI_HT_PRI_LCTR0	4	/* Link Control 0 Register */
+#define PCI_HT_PRI_LCNF0	6	/* Link Config 0 Register */
+#define PCI_HT_PRI_LCTR1	8	/* Link Control 1 Register */
+#define PCI_HT_PRI_LCNF1	10	/* Link Config 1 Register */
+#define PCI_HT_PRI_RID		12	/* Revision ID Register */
+#define PCI_HT_PRI_LFRER0	13	/* Link Frequency/Error 0 Register */
+#define PCI_HT_PRI_LFCAP0	14	/* Link Frequency Capability 0 Register */
+#define PCI_HT_PRI_FTR		16	/* Feature Register */
+#define PCI_HT_PRI_LFRER1	17	/* Link Frequency/Error 1 Register */
+#define PCI_HT_PRI_LFCAP1	18	/* Link Frequency Capability 1 Register */
+#define PCI_HT_PRI_ES		20	/* Enumeration Scratchpad Register */
+#define PCI_HT_PRI_EH		22	/* Error Handling Register */
+#define PCI_HT_PRI_MBU		24	/* Memory Base Upper Register */
+#define PCI_HT_PRI_MLU		25	/* Memory Limit Upper Register */
+#define PCI_HT_PRI_BN		26	/* Bus Number Register */
+#define PCI_HT_PRI_SIZEOF	28
+
+/* HyperTransport: Host or Secondary Interface */
+#define PCI_HT_SEC_CMD		2	/* Command Register */
+#define  PCI_HT_SEC_CMD_WR	0x0001	/* Warm Reset */
+#define  PCI_HT_SEC_CMD_DE	0x0002	/* Double-Ended */
+#define  PCI_HT_SEC_CMD_DN	0x0076	/* Device Number */
+#define  PCI_HT_SEC_CMD_CS	0x0080	/* Chain Side */
+#define  PCI_HT_SEC_CMD_HH	0x0100	/* Host Hide */
+#define  PCI_HT_SEC_CMD_AS	0x0400	/* Act as Slave */
+#define  PCI_HT_SEC_CMD_HIECE	0x0800	/* Host Inbound End of Chain Error */
+#define  PCI_HT_SEC_CMD_DUL	0x1000	/* Drop on Uninitialized Link */
+
+#define PCI_HT_SEC_LCTR		4	/* Link Control Register */
+#define PCI_HT_SEC_LCNF		6	/* Link Config Register */
+#define PCI_HT_SEC_RID		8	/* Revision ID Register */
+#define PCI_HT_SEC_LFRER	9	/* Link Frequency/Error Register */
+#define PCI_HT_SEC_LFCAP	10	/* Link Frequency Capability Register */
+#define PCI_HT_SEC_FTR		12	/* Feature Register */
+#define  PCI_HT_SEC_FTR_EXTRS	0x0100	/* Extended Register Set */
+#define  PCI_HT_SEC_FTR_UCNFE	0x0200	/* Upstream Configuration Enable */
+#define PCI_HT_SEC_ES		16	/* Enumeration Scratchpad Register */
+#define PCI_HT_SEC_EH		18	/* Error Handling Register */
+#define PCI_HT_SEC_MBU		20	/* Memory Base Upper Register */
+#define PCI_HT_SEC_MLU		21	/* Memory Limit Upper Register */
+#define PCI_HT_SEC_SIZEOF	24
+
+/* HyperTransport: Switch */
+#define PCI_HT_SW_CMD		2	/* Switch Command Register */
+#define  PCI_HT_SW_CMD_VIBERR	0x0080	/* VIB Error */
+#define  PCI_HT_SW_CMD_VIBFL	0x0100	/* VIB Flood */
+#define  PCI_HT_SW_CMD_VIBFT	0x0200	/* VIB Fatal */
+#define  PCI_HT_SW_CMD_VIBNFT	0x0400	/* VIB Nonfatal */
+#define PCI_HT_SW_PMASK		4	/* Partition Mask Register */
+#define PCI_HT_SW_SWINF		8	/* Switch Info Register */
+#define  PCI_HT_SW_SWINF_DP	0x0000001f	/* Default Port */
+#define  PCI_HT_SW_SWINF_EN	0x00000020	/* Enable Decode */
+#define  PCI_HT_SW_SWINF_CR	0x00000040	/* Cold Reset */
+#define  PCI_HT_SW_SWINF_PCIDX	0x00000f00	/* Performance Counter Index */
+#define  PCI_HT_SW_SWINF_BLRIDX	0x0003f000	/* Base/Limit Range Index */
+#define  PCI_HT_SW_SWINF_SBIDX	0x00002000	/* Secondary Base Range Index */
+#define  PCI_HT_SW_SWINF_HP	0x00040000	/* Hot Plug */
+#define  PCI_HT_SW_SWINF_HIDE	0x00080000	/* Hide Port */
+#define PCI_HT_SW_PCD		12	/* Performance Counter Data Register */
+#define PCI_HT_SW_BLRD		16	/* Base/Limit Range Data Register */
+#define PCI_HT_SW_SBD		20	/* Secondary Base Data Register */
+#define PCI_HT_SW_SIZEOF	24
+
+					/* Counter indices */
+#define  PCI_HT_SW_PC_PCR	0x0	/* Posted Command Receive */
+#define  PCI_HT_SW_PC_NPCR	0x1	/* Nonposted Command Receive */
+#define  PCI_HT_SW_PC_RCR	0x2	/* Response Command Receive */
+#define  PCI_HT_SW_PC_PDWR	0x3	/* Posted DW Receive */
+#define  PCI_HT_SW_PC_NPDWR	0x4	/* Nonposted DW Receive */
+#define  PCI_HT_SW_PC_RDWR	0x5	/* Response DW Receive */
+#define  PCI_HT_SW_PC_PCT	0x6	/* Posted Command Transmit */
+#define  PCI_HT_SW_PC_NPCT	0x7	/* Nonposted Command Transmit */
+#define  PCI_HT_SW_PC_RCT	0x8	/* Response Command Transmit */
+#define  PCI_HT_SW_PC_PDWT	0x9	/* Posted DW Transmit */
+#define  PCI_HT_SW_PC_NPDWT	0xa	/* Nonposted DW Transmit */
+#define  PCI_HT_SW_PC_RDWT	0xb	/* Response DW Transmit */
+
+					/* Base/Limit Range indices */
+#define  PCI_HT_SW_BLR_BASE0_LO	0x0	/* Base 0[31:1], Enable */
+#define  PCI_HT_SW_BLR_BASE0_HI	0x1	/* Base 0 Upper */
+#define  PCI_HT_SW_BLR_LIM0_LO	0x2	/* Limit 0 Lower */
+#define  PCI_HT_SW_BLR_LIM0_HI	0x3	/* Limit 0 Upper */
+
+					/* Secondary Base indices */
+#define  PCI_HT_SW_SB_LO	0x0	/* Secondary Base[31:1], Enable */
+#define  PCI_HT_SW_S0_HI	0x1	/* Secondary Base Upper */
+
+/* HyperTransport: Interrupt Discovery and Configuration */
+#define PCI_HT_IDC_IDX		2	/* Index Register */
+#define PCI_HT_IDC_DATA		4	/* Data Register */
+#define PCI_HT_IDC_SIZEOF	8
+
+					/* Register indices */
+#define  PCI_HT_IDC_IDX_LINT	0x01	/* Last Interrupt Register */
+#define   PCI_HT_IDC_LINT	0x00ff0000	/* Last interrupt definition */
+#define  PCI_HT_IDC_IDX_IDR	0x10	/* Interrupt Definition Registers */
+					/* Low part (at index) */
+#define   PCI_HT_IDC_IDR_MASK	0x10000001	/* Mask */
+#define   PCI_HT_IDC_IDR_POL	0x10000002	/* Polarity */
+#define   PCI_HT_IDC_IDR_II_2	0x1000001c	/* IntrInfo[4:2]: Message Type */
+#define   PCI_HT_IDC_IDR_II_5	0x10000020	/* IntrInfo[5]: Request EOI */
+#define   PCI_HT_IDC_IDR_II_6	0x00ffffc0	/* IntrInfo[23:6] */
+#define   PCI_HT_IDC_IDR_II_24	0xff000000	/* IntrInfo[31:24] */
+					/* High part (at index + 1) */
+#define   PCI_HT_IDC_IDR_II_32	0x00ffffff	/* IntrInfo[55:32] */
+#define   PCI_HT_IDC_IDR_PASSPW	0x40000000	/* PassPW setting for messages */
+#define   PCI_HT_IDC_IDR_WEOI	0x80000000	/* Waiting for EOI */
+
+/* HyperTransport: Revision ID */
+#define PCI_HT_RID_RID		2	/* Revision Register */
+#define PCI_HT_RID_SIZEOF	4
+
+/* HyperTransport: UnitID Clumping */
+#define PCI_HT_UIDC_CS		4	/* Clumping Support Register */
+#define PCI_HT_UIDC_CE		8	/* Clumping Enable Register */
+#define PCI_HT_UIDC_SIZEOF	12
+
+/* HyperTransport: Extended Configuration Space Access */
+#define PCI_HT_ECSA_ADDR	4	/* Configuration Address Register */
+#define  PCI_HT_ECSA_ADDR_REG	0x00000ffc	/* Register */
+#define  PCI_HT_ECSA_ADDR_FUN	0x00007000	/* Function */
+#define  PCI_HT_ECSA_ADDR_DEV	0x000f1000	/* Device */
+#define  PCI_HT_ECSA_ADDR_BUS	0x0ff00000	/* Bus Number */
+#define  PCI_HT_ECSA_ADDR_TYPE	0x10000000	/* Access Type */
+#define PCI_HT_ECSA_DATA	8	/* Configuration Data Register */
+#define PCI_HT_ECSA_SIZEOF	12
+
+/* HyperTransport: Address Mapping */
+#define PCI_HT_AM_CMD		2	/* Command Register */
+#define  PCI_HT_AM_CMD_NDMA	0x000f	/* Number of DMA Mappings */
+#define  PCI_HT_AM_CMD_IOSIZ	0x01f0	/* I/O Size */
+#define  PCI_HT_AM_CMD_MT	0x0600	/* Map Type */
+#define  PCI_HT_AM_CMD_MT_40B	0x0000	/* 40-bit */
+#define  PCI_HT_AM_CMD_MT_64B	0x0200	/* 64-bit */
+
+					/* Window Control Register bits */
+#define  PCI_HT_AM_SBW_CTR_COMP	0x1	/* Compat */
+#define  PCI_HT_AM_SBW_CTR_NCOH	0x2	/* NonCoherent */
+#define  PCI_HT_AM_SBW_CTR_ISOC	0x4	/* Isochronous */
+#define  PCI_HT_AM_SBW_CTR_EN	0x8	/* Enable */
+
+/* HyperTransport: 40-bit Address Mapping */
+#define PCI_HT_AM40_SBNPW	4	/* Secondary Bus Non-Prefetchable Window Register */
+#define  PCI_HT_AM40_SBW_BASE	0x000fffff	/* Window Base */
+#define  PCI_HT_AM40_SBW_CTR	0xf0000000	/* Window Control */
+#define PCI_HT_AM40_SBPW	8	/* Secondary Bus Prefetchable Window Register */
+#define PCI_HT_AM40_DMA_PBASE0	12	/* DMA Window Primary Base 0 Register */
+#define PCI_HT_AM40_DMA_CTR0	15	/* DMA Window Control 0 Register */
+#define  PCI_HT_AM40_DMA_CTR_CTR 0xf0	/* Window Control */
+#define PCI_HT_AM40_DMA_SLIM0	16	/* DMA Window Secondary Limit 0 Register */
+#define PCI_HT_AM40_DMA_SBASE0	18	/* DMA Window Secondary Base 0 Register */
+#define PCI_HT_AM40_SIZEOF	12	/* size is variable: 12 + 8 * NDMA */
+
+/* HyperTransport: 64-bit Address Mapping */
+#define PCI_HT_AM64_IDX		4	/* Index Register */
+#define PCI_HT_AM64_DATA_LO	8	/* Data Lower Register */
+#define PCI_HT_AM64_DATA_HI	12	/* Data Upper Register */
+#define PCI_HT_AM64_SIZEOF	16
+
+					/* Register indices */
+#define  PCI_HT_AM64_IDX_SBNPW	0x00	/* Secondary Bus Non-Prefetchable Window Register */
+#define   PCI_HT_AM64_W_BASE_LO	0xfff00000	/* Window Base Lower */
+#define   PCI_HT_AM64_W_CTR	0x0000000f	/* Window Control */
+#define  PCI_HT_AM64_IDX_SBPW	0x01	/* Secondary Bus Prefetchable Window Register */
+#define   PCI_HT_AM64_IDX_PBNPW	0x02	/* Primary Bus Non-Prefetchable Window Register */
+#define   PCI_HT_AM64_IDX_DMAPB0 0x04	/* DMA Window Primary Base 0 Register */
+#define   PCI_HT_AM64_IDX_DMASB0 0x05	/* DMA Window Secondary Base 0 Register */
+#define   PCI_HT_AM64_IDX_DMASL0 0x06	/* DMA Window Secondary Limit 0 Register */
+
+/* HyperTransport: MSI Mapping */
+#define PCI_HT_MSIM_CMD		2	/* Command Register */
+#define  PCI_HT_MSIM_CMD_EN	0x0001	/* Mapping Active */
+#define  PCI_HT_MSIM_CMD_FIXD	0x0002	/* MSI Mapping Address Fixed */
+#define PCI_HT_MSIM_ADDR_LO	4	/* MSI Mapping Address Lower Register */
+#define PCI_HT_MSIM_ADDR_HI	8	/* MSI Mapping Address Upper Register */
+#define PCI_HT_MSIM_SIZEOF	12
+
+/* HyperTransport: DirectRoute */
+#define PCI_HT_DR_CMD		2	/* Command Register */
+#define  PCI_HT_DR_CMD_NDRS	0x000f	/* Number of DirectRoute Spaces */
+#define  PCI_HT_DR_CMD_IDX	0x01f0	/* Index */
+#define PCI_HT_DR_EN		4	/* Enable Vector Register */
+#define PCI_HT_DR_DATA		8	/* Data Register */
+#define PCI_HT_DR_SIZEOF	12
+
+					/* Register indices */
+#define  PCI_HT_DR_IDX_BASE_LO	0x00	/* DirectRoute Base Lower Register */
+#define   PCI_HT_DR_OTNRD	0x00000001	/* Opposite to Normal Request Direction */
+#define   PCI_HT_DR_BL_LO	0xffffff00	/* Base/Limit Lower */
+#define  PCI_HT_DR_IDX_BASE_HI	0x01	/* DirectRoute Base Upper Register */
+#define  PCI_HT_DR_IDX_LIMIT_LO	0x02	/* DirectRoute Limit Lower Register */
+#define  PCI_HT_DR_IDX_LIMIT_HI	0x03	/* DirectRoute Limit Upper Register */
+
+/* HyperTransport: VCSet */
+#define PCI_HT_VCS_SUP		4	/* VCSets Supported Register */
+#define PCI_HT_VCS_L1EN		5	/* Link 1 VCSets Enabled Register */
+#define PCI_HT_VCS_L0EN		6	/* Link 0 VCSets Enabled Register */
+#define PCI_HT_VCS_SBD		8	/* Stream Bucket Depth Register */
+#define PCI_HT_VCS_SINT		9	/* Stream Interval Register */
+#define PCI_HT_VCS_SSUP		10	/* Number of Streaming VCs Supported Register */
+#define  PCI_HT_VCS_SSUP_0	0x00	/* Streaming VC 0 */
+#define  PCI_HT_VCS_SSUP_3	0x01	/* Streaming VCs 0-3 */
+#define  PCI_HT_VCS_SSUP_15	0x02	/* Streaming VCs 0-15 */
+#define PCI_HT_VCS_NFCBD	12	/* Non-FC Bucket Depth Register */
+#define PCI_HT_VCS_NFCINT	13	/* Non-FC Bucket Interval Register */
+#define PCI_HT_VCS_SIZEOF	16
+
+/* HyperTransport: Retry Mode */
+#define PCI_HT_RM_CTR0		4	/* Control 0 Register */
+#define  PCI_HT_RM_CTR_LRETEN	0x01	/* Link Retry Enable */
+#define  PCI_HT_RM_CTR_FSER	0x02	/* Force Single Error */
+#define  PCI_HT_RM_CTR_ROLNEN	0x04	/* Rollover Nonfatal Enable */
+#define  PCI_HT_RM_CTR_FSS	0x08	/* Force Single Stomp */
+#define  PCI_HT_RM_CTR_RETNEN	0x10	/* Retry Nonfatal Enable */
+#define  PCI_HT_RM_CTR_RETFEN	0x20	/* Retry Fatal Enable */
+#define  PCI_HT_RM_CTR_AA	0xc0	/* Allowed Attempts */
+#define PCI_HT_RM_STS0		5	/* Status 0 Register */
+#define  PCI_HT_RM_STS_RETSNT	0x01	/* Retry Sent */
+#define  PCI_HT_RM_STS_CNTROL	0x02	/* Count Rollover */
+#define  PCI_HT_RM_STS_SRCV	0x04	/* Stomp Received */
+#define PCI_HT_RM_CTR1		6	/* Control 1 Register */
+#define PCI_HT_RM_STS1		7	/* Status 1 Register */
+#define PCI_HT_RM_CNT0		8	/* Retry Count 0 Register */
+#define PCI_HT_RM_CNT1		10	/* Retry Count 1 Register */
+#define PCI_HT_RM_SIZEOF	12
+
+/* PCI Express */
+#define PCI_EXP_FLAGS		0x2	/* Capabilities register */
+#define PCI_EXP_FLAGS_VERS	0x000f	/* Capability version */
+#define PCI_EXP_FLAGS_TYPE	0x00f0	/* Device/Port type */
+#define  PCI_EXP_TYPE_ENDPOINT	0x0	/* Express Endpoint */
+#define  PCI_EXP_TYPE_LEG_END	0x1	/* Legacy Endpoint */
+#define  PCI_EXP_TYPE_ROOT_PORT 0x4	/* Root Port */
+#define  PCI_EXP_TYPE_UPSTREAM	0x5	/* Upstream Port */
+#define  PCI_EXP_TYPE_DOWNSTREAM 0x6	/* Downstream Port */
+#define  PCI_EXP_TYPE_PCI_BRIDGE 0x7	/* PCI/PCI-X Bridge */
+#define PCI_EXP_FLAGS_SLOT	0x0100	/* Slot implemented */
+#define PCI_EXP_FLAGS_IRQ	0x3e00	/* Interrupt message number */
+#define PCI_EXP_DEVCAP		0x4	/* Device capabilities */
+#define  PCI_EXP_DEVCAP_PAYLOAD	0x07	/* Max_Payload_Size */
+#define  PCI_EXP_DEVCAP_PHANTOM	0x18	/* Phantom functions */
+#define  PCI_EXP_DEVCAP_EXT_TAG	0x20	/* Extended tags */
+#define  PCI_EXP_DEVCAP_L0S	0x1c0	/* L0s Acceptable Latency */
+#define  PCI_EXP_DEVCAP_L1	0xe00	/* L1 Acceptable Latency */
+#define  PCI_EXP_DEVCAP_ATN_BUT	0x1000	/* Attention Button Present */
+#define  PCI_EXP_DEVCAP_ATN_IND	0x2000	/* Attention Indicator Present */
+#define  PCI_EXP_DEVCAP_PWR_IND	0x4000	/* Power Indicator Present */
+#define  PCI_EXP_DEVCAP_PWR_VAL	0x3fc0000	/* Slot Power Limit Value */
+#define  PCI_EXP_DEVCAP_PWR_SCL	0xc000000	/* Slot Power Limit Scale */
+#define PCI_EXP_DEVCTL		0x8	/* Device Control */
+#define  PCI_EXP_DEVCTL_CERE	0x0001	/* Correctable Error Reporting En. */
+#define  PCI_EXP_DEVCTL_NFERE	0x0002	/* Non-Fatal Error Reporting Enable */
+#define  PCI_EXP_DEVCTL_FERE	0x0004	/* Fatal Error Reporting Enable */
+#define  PCI_EXP_DEVCTL_URRE	0x0008	/* Unsupported Request Reporting En. */
+#define  PCI_EXP_DEVCTL_RELAXED	0x0010	/* Enable Relaxed Ordering */
+#define  PCI_EXP_DEVCTL_PAYLOAD	0x00e0	/* Max_Payload_Size */
+#define  PCI_EXP_DEVCTL_EXT_TAG	0x0100	/* Extended Tag Field Enable */
+#define  PCI_EXP_DEVCTL_PHANTOM	0x0200	/* Phantom Functions Enable */
+#define  PCI_EXP_DEVCTL_AUX_PME	0x0400	/* Auxiliary Power PM Enable */
+#define  PCI_EXP_DEVCTL_NOSNOOP	0x0800	/* Enable No Snoop */
+#define  PCI_EXP_DEVCTL_READRQ	0x7000	/* Max_Read_Request_Size */
+#define PCI_EXP_DEVSTA		0xa	/* Device Status */
+#define  PCI_EXP_DEVSTA_CED	0x01	/* Correctable Error Detected */
+#define  PCI_EXP_DEVSTA_NFED	0x02	/* Non-Fatal Error Detected */
+#define  PCI_EXP_DEVSTA_FED	0x04	/* Fatal Error Detected */
+#define  PCI_EXP_DEVSTA_URD	0x08	/* Unsupported Request Detected */
+#define  PCI_EXP_DEVSTA_AUXPD	0x10	/* AUX Power Detected */
+#define  PCI_EXP_DEVSTA_TRPND	0x20	/* Transactions Pending */
+#define PCI_EXP_LNKCAP		0xc	/* Link Capabilities */
+#define  PCI_EXP_LNKCAP_SPEED	0x0000f	/* Maximum Link Speed */
+#define  PCI_EXP_LNKCAP_WIDTH	0x003f0	/* Maximum Link Width */
+#define  PCI_EXP_LNKCAP_ASPM	0x00c00	/* Active State Power Management */
+#define  PCI_EXP_LNKCAP_L0S	0x07000	/* L0s Acceptable Latency */
+#define  PCI_EXP_LNKCAP_L1	0x38000	/* L1 Acceptable Latency */
+#define  PCI_EXP_LNKCAP_PORT	0xff000000	/* Port Number */
+#define PCI_EXP_LNKCTL		0x10	/* Link Control */
+#define  PCI_EXP_LNKCTL_ASPM	0x0003	/* ASPM Control */
+#define  PCI_EXP_LNKCTL_RCB	0x0008	/* Read Completion Boundary */
+#define  PCI_EXP_LNKCTL_DISABLE	0x0010	/* Link Disable */
+#define  PCI_EXP_LNKCTL_RETRAIN	0x0020	/* Retrain Link */
+#define  PCI_EXP_LNKCTL_CLOCK	0x0040	/* Common Clock Configuration */
+#define  PCI_EXP_LNKCTL_XSYNCH	0x0080	/* Extended Synch */
+#define PCI_EXP_LNKSTA		0x12	/* Link Status */
+#define  PCI_EXP_LNKSTA_SPEED	0x000f	/* Negotiated Link Speed */
+#define  PCI_EXP_LNKSTA_WIDTH	0x03f0	/* Negotiated Link Width */
+#define  PCI_EXP_LNKSTA_TR_ERR	0x0400	/* Training Error */
+#define  PCI_EXP_LNKSTA_TRAIN	0x0800	/* Link Training */
+#define  PCI_EXP_LNKSTA_SL_CLK	0x1000	/* Slot Clock Configuration */
+#define PCI_EXP_SLTCAP		0x14	/* Slot Capabilities */
+#define  PCI_EXP_SLTCAP_ATNB	0x0001	/* Attention Button Present */
+#define  PCI_EXP_SLTCAP_PWRC	0x0002	/* Power Controller Present */
+#define  PCI_EXP_SLTCAP_MRL	0x0004	/* MRL Sensor Present */
+#define  PCI_EXP_SLTCAP_ATNI	0x0008	/* Attention Indicator Present */
+#define  PCI_EXP_SLTCAP_PWRI	0x0010	/* Power Indicator Present */
+#define  PCI_EXP_SLTCAP_HPS	0x0020	/* Hot-Plug Surprise */
+#define  PCI_EXP_SLTCAP_HPC	0x0040	/* Hot-Plug Capable */
+#define  PCI_EXP_SLTCAP_PWR_VAL	0x00007f80	/* Slot Power Limit Value */
+#define  PCI_EXP_SLTCAP_PWR_SCL	0x00018000	/* Slot Power Limit Scale */
+#define  PCI_EXP_SLTCAP_PSN	0xfff80000	/* Physical Slot Number */
+#define PCI_EXP_SLTCTL		0x18	/* Slot Control */
+#define  PCI_EXP_SLTCTL_ATNB	0x0001	/* Attention Button Pressed Enable */
+#define  PCI_EXP_SLTCTL_PWRF	0x0002	/* Power Fault Detected Enable */
+#define  PCI_EXP_SLTCTL_MRLS	0x0004	/* MRL Sensor Changed Enable */
+#define  PCI_EXP_SLTCTL_PRSD	0x0008	/* Presence Detect Changed Enable */
+#define  PCI_EXP_SLTCTL_CMDC	0x0010	/* Command Completed Interrupt Enable */
+#define  PCI_EXP_SLTCTL_HPIE	0x0020	/* Hot-Plug Interrupt Enable */
+#define  PCI_EXP_SLTCTL_ATNI	0x00C0	/* Attention Indicator Control */
+#define  PCI_EXP_SLTCTL_PWRI	0x0300	/* Power Indicator Control */
+#define  PCI_EXP_SLTCTL_PWRC	0x0400	/* Power Controller Control */
+#define PCI_EXP_SLTSTA		0x1a	/* Slot Status */
+#define PCI_EXP_RTCTL		0x1c	/* Root Control */
+#define  PCI_EXP_RTCTL_SECEE	0x1	/* System Error on Correctable Error */
+#define  PCI_EXP_RTCTL_SENFEE	0x1	/* System Error on Non-Fatal Error */
+#define  PCI_EXP_RTCTL_SEFEE	0x1	/* System Error on Fatal Error */
+#define  PCI_EXP_RTCTL_PMEIE	0x1	/* PME Interrupt Enable */
+#define PCI_EXP_RTSTA		0x20	/* Root Status */
+
+/* MSI-X */
+#define  PCI_MSIX_ENABLE	0x8000
+#define  PCI_MSIX_MASK		0x4000
+#define  PCI_MSIX_TABSIZE	0x03ff
+#define PCI_MSIX_TABLE		4
+#define PCI_MSIX_PBA		8
+#define  PCI_MSIX_BIR		0x7
+
+/* Advanced Error Reporting */
+#define PCI_ERR_UNCOR_STATUS	4	/* Uncorrectable Error Status */
+#define  PCI_ERR_UNC_TRAIN	0x00000001	/* Training */
+#define  PCI_ERR_UNC_DLP	0x00000010	/* Data Link Protocol */
+#define  PCI_ERR_UNC_POISON_TLP	0x00001000	/* Poisoned TLP */
+#define  PCI_ERR_UNC_FCP	0x00002000	/* Flow Control Protocol */
+#define  PCI_ERR_UNC_COMP_TIME	0x00004000	/* Completion Timeout */
+#define  PCI_ERR_UNC_COMP_ABORT	0x00008000	/* Completer Abort */
+#define  PCI_ERR_UNC_UNX_COMP	0x00010000	/* Unexpected Completion */
+#define  PCI_ERR_UNC_RX_OVER	0x00020000	/* Receiver Overflow */
+#define  PCI_ERR_UNC_MALF_TLP	0x00040000	/* Malformed TLP */
+#define  PCI_ERR_UNC_ECRC	0x00080000	/* ECRC Error Status */
+#define  PCI_ERR_UNC_UNSUP	0x00100000	/* Unsupported Request */
+#define PCI_ERR_UNCOR_MASK	8	/* Uncorrectable Error Mask */
+	/* Same bits as above */
+#define PCI_ERR_UNCOR_SEVER	12	/* Uncorrectable Error Severity */
+	/* Same bits as above */
+#define PCI_ERR_COR_STATUS	16	/* Correctable Error Status */
+#define  PCI_ERR_COR_RCVR	0x00000001	/* Receiver Error Status */
+#define  PCI_ERR_COR_BAD_TLP	0x00000040	/* Bad TLP Status */
+#define  PCI_ERR_COR_BAD_DLLP	0x00000080	/* Bad DLLP Status */
+#define  PCI_ERR_COR_REP_ROLL	0x00000100	/* REPLAY_NUM Rollover */
+#define  PCI_ERR_COR_REP_TIMER	0x00001000	/* Replay Timer Timeout */
+#define PCI_ERR_COR_MASK	20	/* Correctable Error Mask */
+	/* Same bits as above */
+#define PCI_ERR_CAP		24	/* Advanced Error Capabilities */
+#define  PCI_ERR_CAP_FEP(x)	((x) & 31)	/* First Error Pointer */
+#define  PCI_ERR_CAP_ECRC_GENC	0x00000020	/* ECRC Generation Capable */
+#define  PCI_ERR_CAP_ECRC_GENE	0x00000040	/* ECRC Generation Enable */
+#define  PCI_ERR_CAP_ECRC_CHKC	0x00000080	/* ECRC Check Capable */
+#define  PCI_ERR_CAP_ECRC_CHKE	0x00000100	/* ECRC Check Enable */
+#define PCI_ERR_HEADER_LOG	28	/* Header Log Register (16 bytes) */
+#define PCI_ERR_ROOT_COMMAND	44	/* Root Error Command */
+#define PCI_ERR_ROOT_STATUS	48
+#define PCI_ERR_ROOT_COR_SRC	52
+#define PCI_ERR_ROOT_SRC	54
+
+/* Virtual Channel */
+#define PCI_VC_PORT_REG1	4
+#define PCI_VC_PORT_REG2	8
+#define PCI_VC_PORT_CTRL	12
+#define PCI_VC_PORT_STATUS	14
+#define PCI_VC_RES_CAP		16
+#define PCI_VC_RES_CTRL		20
+#define PCI_VC_RES_STATUS	26
+
+/* Power Budgeting */
+#define PCI_PWR_DSR		4	/* Data Select Register */
+#define PCI_PWR_DATA		8	/* Data Register */
+#define  PCI_PWR_DATA_BASE(x)	((x) & 0xff)	/* Base Power */
+#define  PCI_PWR_DATA_SCALE(x)	(((x) >> 8) & 3)	/* Data Scale */
+#define  PCI_PWR_DATA_PM_SUB(x)	(((x) >> 10) & 7)	/* PM Sub State */
+#define  PCI_PWR_DATA_PM_STATE(x) (((x) >> 13) & 3)	/* PM State */
+#define  PCI_PWR_DATA_TYPE(x)	(((x) >> 15) & 7)	/* Type */
+#define  PCI_PWR_DATA_RAIL(x)	(((x) >> 18) & 7)	/* Power Rail */
+#define PCI_PWR_CAP		12	/* Capability */
+#define  PCI_PWR_CAP_BUDGET(x)	((x) & 1)	/* Included in system budget */
+
+/*
+ * The PCI interface treats multi-function devices as independent
+ * devices.  The slot/function address of each device is encoded
+ * in a single byte as follows:
+ *
+ *	7:3 = slot
+ *	2:0 = function
+ */
+#define PCI_DEVFN(slot,func)	((((slot) & 0x1f) << 3) | ((func) & 0x07))
+#define PCI_SLOT(devfn)		(((devfn) >> 3) & 0x1f)
+#define PCI_FUNC(devfn)		((devfn) & 0x07)
+
+/* Device classes and subclasses */
+
+#define PCI_CLASS_NOT_DEFINED		0x0000
+#define PCI_CLASS_NOT_DEFINED_VGA	0x0001
+
+#define PCI_BASE_CLASS_STORAGE		0x01
+#define PCI_CLASS_STORAGE_SCSI		0x0100
+#define PCI_CLASS_STORAGE_IDE		0x0101
+#define PCI_CLASS_STORAGE_FLOPPY	0x0102
+#define PCI_CLASS_STORAGE_IPI		0x0103
+#define PCI_CLASS_STORAGE_RAID		0x0104
+#define PCI_CLASS_STORAGE_OTHER		0x0180
+
+#define PCI_BASE_CLASS_NETWORK		0x02
+#define PCI_CLASS_NETWORK_ETHERNET	0x0200
+#define PCI_CLASS_NETWORK_TOKEN_RING	0x0201
+#define PCI_CLASS_NETWORK_FDDI		0x0202
+#define PCI_CLASS_NETWORK_ATM		0x0203
+#define PCI_CLASS_NETWORK_OTHER		0x0280
+
+#define PCI_BASE_CLASS_DISPLAY		0x03
+#define PCI_CLASS_DISPLAY_VGA		0x0300
+#define PCI_CLASS_DISPLAY_XGA		0x0301
+#define PCI_CLASS_DISPLAY_OTHER		0x0380
+
+#define PCI_BASE_CLASS_MULTIMEDIA	0x04
+#define PCI_CLASS_MULTIMEDIA_VIDEO	0x0400
+#define PCI_CLASS_MULTIMEDIA_AUDIO	0x0401
+#define PCI_CLASS_MULTIMEDIA_OTHER	0x0480
+
+#define PCI_BASE_CLASS_MEMORY		0x05
+#define  PCI_CLASS_MEMORY_RAM		0x0500
+#define  PCI_CLASS_MEMORY_FLASH		0x0501
+#define  PCI_CLASS_MEMORY_OTHER		0x0580
+
+#define PCI_BASE_CLASS_BRIDGE		0x06
+#define  PCI_CLASS_BRIDGE_HOST		0x0600
+#define  PCI_CLASS_BRIDGE_ISA		0x0601
+#define  PCI_CLASS_BRIDGE_EISA		0x0602
+#define  PCI_CLASS_BRIDGE_MC		0x0603
+#define  PCI_CLASS_BRIDGE_PCI		0x0604
+#define  PCI_CLASS_BRIDGE_PCMCIA	0x0605
+#define  PCI_CLASS_BRIDGE_NUBUS		0x0606
+#define  PCI_CLASS_BRIDGE_CARDBUS	0x0607
+#define  PCI_CLASS_BRIDGE_OTHER		0x0680
+
+#define PCI_BASE_CLASS_COMMUNICATION	0x07
+#define PCI_CLASS_COMMUNICATION_SERIAL	0x0700
+#define PCI_CLASS_COMMUNICATION_PARALLEL 0x0701
+#define PCI_CLASS_COMMUNICATION_OTHER	0x0780
+
+#define PCI_BASE_CLASS_SYSTEM		0x08
+#define PCI_CLASS_SYSTEM_PIC		0x0800
+#define PCI_CLASS_SYSTEM_DMA		0x0801
+#define PCI_CLASS_SYSTEM_TIMER		0x0802
+#define PCI_CLASS_SYSTEM_RTC		0x0803
+#define PCI_CLASS_SYSTEM_OTHER		0x0880
+
+#define PCI_BASE_CLASS_INPUT		0x09
+#define PCI_CLASS_INPUT_KEYBOARD	0x0900
+#define PCI_CLASS_INPUT_PEN		0x0901
+#define PCI_CLASS_INPUT_MOUSE		0x0902
+#define PCI_CLASS_INPUT_OTHER		0x0980
+
+#define PCI_BASE_CLASS_DOCKING		0x0a
+#define PCI_CLASS_DOCKING_GENERIC	0x0a00
+#define PCI_CLASS_DOCKING_OTHER		0x0a01
+
+#define PCI_BASE_CLASS_PROCESSOR	0x0b
+#define PCI_CLASS_PROCESSOR_386		0x0b00
+#define PCI_CLASS_PROCESSOR_486		0x0b01
+#define PCI_CLASS_PROCESSOR_PENTIUM	0x0b02
+#define PCI_CLASS_PROCESSOR_ALPHA	0x0b10
+#define PCI_CLASS_PROCESSOR_POWERPC	0x0b20
+#define PCI_CLASS_PROCESSOR_CO		0x0b40
+
+#define PCI_BASE_CLASS_SERIAL		0x0c
+#define PCI_CLASS_SERIAL_FIREWIRE	0x0c00
+#define PCI_CLASS_SERIAL_ACCESS		0x0c01
+#define PCI_CLASS_SERIAL_SSA		0x0c02
+#define PCI_CLASS_SERIAL_USB		0x0c03
+#define PCI_CLASS_SERIAL_FIBER		0x0c04
+
+#define PCI_CLASS_OTHERS		0xff
+
+/* Several ID's we need in the library */
+
+#define PCI_VENDOR_ID_INTEL		0x8086
+#define PCI_VENDOR_ID_COMPAQ		0x0e11
Index: uspace/lib/pci/i386-ports.c
===================================================================
--- uspace/lib/pci/i386-ports.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/pci/i386-ports.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,274 @@
+/*
+ *	The PCI Library -- Direct Configuration access via i386 Ports
+ *
+ *	Copyright (c) 1997--2004 Martin Mares <mj@ucw.cz>
+ *
+ *	May 8, 2006 - Modified and ported to HelenOS by Jakub Jermar.
+ *
+ *	Can be freely distributed and used under the terms of the GNU GPL.
+ */
+
+#include <unistd.h>
+
+#include "internal.h"
+
+static inline void outb(u8 b, u16 port)
+{
+	asm volatile ("outb %0, %1\n" :: "a" (b), "d" (port));
+}
+
+static inline void outw(u16 w, u16 port)
+{
+	asm volatile ("outw %0, %1\n" :: "a" (w), "d" (port));
+}
+
+static inline void outl(u32 l, u16 port)
+{
+	asm volatile ("outl %0, %1\n" :: "a" (l), "d" (port));
+}
+
+static inline u8 inb(u16 port)
+{
+	u8 val;
+
+	asm volatile ("inb %1, %0 \n" : "=a" (val) : "d"(port));
+	return val;
+}
+
+static inline u16 inw(u16 port)
+{
+	u16 val;
+
+	asm volatile ("inw %1, %0 \n" : "=a" (val) : "d"(port));
+	return val;
+}
+
+static inline u32 inl(u16 port)
+{
+	u32 val;
+
+	asm volatile ("inl %1, %0 \n" : "=a" (val) : "d"(port));
+	return val;
+}
+
+static void conf12_init(struct pci_access *a)
+{
+}
+
+static void conf12_cleanup(struct pci_access *a UNUSED)
+{
+}
+
+/*
+ * Before we decide to use direct hardware access mechanisms, we try to do some
+ * trivial checks to ensure it at least _seems_ to be working -- we just test
+ * whether bus 00 contains a host bridge (this is similar to checking
+ * techniques used in XFree86, but ours should be more reliable since we
+ * attempt to make use of direct access hints provided by the PCI BIOS).
+ *
+ * This should be close to trivial, but it isn't, because there are buggy
+ * chipsets (yes, you guessed it, by Intel and Compaq) that have no class ID.
+ */
+
+static int intel_sanity_check(struct pci_access *a, struct pci_methods *m)
+{
+	struct pci_dev d;
+
+	a->debug("...sanity check");
+	d.bus = 0;
+	d.func = 0;
+	for (d.dev = 0; d.dev < 32; d.dev++) {
+		u16 class, vendor;
+		if ((m->read(&d, PCI_CLASS_DEVICE, (byte *) & class,
+			 sizeof(class))
+		    && (class == cpu_to_le16(PCI_CLASS_BRIDGE_HOST)
+			|| class == cpu_to_le16(PCI_CLASS_DISPLAY_VGA)))
+		    || (m->read(&d, PCI_VENDOR_ID, (byte *) & vendor,
+			       sizeof(vendor))
+		    && (vendor == cpu_to_le16(PCI_VENDOR_ID_INTEL)
+			|| vendor == cpu_to_le16(PCI_VENDOR_ID_COMPAQ)))) {
+			a->debug("...outside the Asylum at 0/%02x/0",
+				 d.dev);
+			return 1;
+		}
+	}
+	a->debug("...insane");
+	return 0;
+}
+
+/*
+ *	Configuration type 1
+ */
+
+#define CONFIG_CMD(bus, device_fn, where)   (0x80000000 | (bus << 16) | (device_fn << 8) | (where & ~3))
+
+static int conf1_detect(struct pci_access *a)
+{
+	unsigned int tmp;
+	int res = 0;
+
+	outb(0x01, 0xCFB);
+	tmp = inl(0xCF8);
+	outl(0x80000000, 0xCF8);
+	if (inl(0xCF8) == 0x80000000)
+		res = 1;
+	outl(tmp, 0xCF8);
+	if (res)
+		res = intel_sanity_check(a, &pm_intel_conf1);
+	return res;
+}
+
+static int conf1_read(struct pci_dev *d, int pos, byte * buf, int len)
+{
+	int addr = 0xcfc + (pos & 3);
+
+	if (pos >= 256)
+		return 0;
+
+	outl(0x80000000 | ((d->bus & 0xff) << 16) |
+	     (PCI_DEVFN(d->dev, d->func) << 8) | (pos & ~3), 0xcf8);
+
+	switch (len) {
+	case 1:
+		buf[0] = inb(addr);
+		break;
+	case 2:
+		((u16 *) buf)[0] = cpu_to_le16(inw(addr));
+		break;
+	case 4:
+		((u32 *) buf)[0] = cpu_to_le32(inl(addr));
+		break;
+	default:
+		return pci_generic_block_read(d, pos, buf, len);
+	}
+	return 1;
+}
+
+static int conf1_write(struct pci_dev *d, int pos, byte * buf, int len)
+{
+	int addr = 0xcfc + (pos & 3);
+
+	if (pos >= 256)
+		return 0;
+
+	outl(0x80000000 | ((d->bus & 0xff) << 16) |
+	     (PCI_DEVFN(d->dev, d->func) << 8) | (pos & ~3), 0xcf8);
+
+	switch (len) {
+	case 1:
+		outb(buf[0], addr);
+		break;
+	case 2:
+		outw(le16_to_cpu(((u16 *) buf)[0]), addr);
+		break;
+	case 4:
+		outl(le32_to_cpu(((u32 *) buf)[0]), addr);
+		break;
+	default:
+		return pci_generic_block_write(d, pos, buf, len);
+	}
+	return 1;
+}
+
+/*
+ *	Configuration type 2. Obsolete and brain-damaged, but existing.
+ */
+
+static int conf2_detect(struct pci_access *a)
+{
+	/* This is ugly and tends to produce false positives. Beware. */
+	outb(0x00, 0xCFB);
+	outb(0x00, 0xCF8);
+	outb(0x00, 0xCFA);
+	if (inb(0xCF8) == 0x00 && inb(0xCFA) == 0x00)
+		return intel_sanity_check(a, &pm_intel_conf2);
+	else
+		return 0;
+}
+
+static int conf2_read(struct pci_dev *d, int pos, byte * buf, int len)
+{
+	int addr = 0xc000 | (d->dev << 8) | pos;
+
+	if (pos >= 256)
+		return 0;
+
+	if (d->dev >= 16)
+		/* conf2 supports only 16 devices per bus */
+		return 0;
+	outb((d->func << 1) | 0xf0, 0xcf8);
+	outb(d->bus, 0xcfa);
+	switch (len) {
+	case 1:
+		buf[0] = inb(addr);
+		break;
+	case 2:
+		((u16 *) buf)[0] = cpu_to_le16(inw(addr));
+		break;
+	case 4:
+		((u32 *) buf)[0] = cpu_to_le32(inl(addr));
+		break;
+	default:
+		outb(0, 0xcf8);
+		return pci_generic_block_read(d, pos, buf, len);
+	}
+	outb(0, 0xcf8);
+	return 1;
+}
+
+static int conf2_write(struct pci_dev *d, int pos, byte * buf, int len)
+{
+	int addr = 0xc000 | (d->dev << 8) | pos;
+
+	if (pos >= 256)
+		return 0;
+
+	if (d->dev >= 16)
+		d->access->error("conf2_write: only first 16 devices exist.");
+	outb((d->func << 1) | 0xf0, 0xcf8);
+	outb(d->bus, 0xcfa);
+	switch (len) {
+	case 1:
+		outb(buf[0], addr);
+		break;
+	case 2:
+		outw(le16_to_cpu(*(u16 *) buf), addr);
+		break;
+	case 4:
+		outl(le32_to_cpu(*(u32 *) buf), addr);
+		break;
+	default:
+		outb(0, 0xcf8);
+		return pci_generic_block_write(d, pos, buf, len);
+	}
+	outb(0, 0xcf8);
+	return 1;
+}
+
+struct pci_methods pm_intel_conf1 = {
+	"Intel-conf1",
+	NULL,			/* config */
+	conf1_detect,
+	conf12_init,
+	conf12_cleanup,
+	pci_generic_scan,
+	pci_generic_fill_info,
+	conf1_read,
+	conf1_write,
+	NULL,			/* init_dev */
+	NULL			/* cleanup_dev */
+};
+
+struct pci_methods pm_intel_conf2 = {
+	"Intel-conf2",
+	NULL,			/* config */
+	conf2_detect,
+	conf12_init,
+	conf12_cleanup,
+	pci_generic_scan,
+	pci_generic_fill_info,
+	conf2_read,
+	conf2_write,
+	NULL,			/* init_dev */
+	NULL			/* cleanup_dev */
+};
Index: uspace/lib/pci/internal.h
===================================================================
--- uspace/lib/pci/internal.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/pci/internal.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,43 @@
+/*
+ *	The PCI Library -- Internal Stuff
+ *
+ *	Copyright (c) 1997--2004 Martin Mares <mj@ucw.cz>
+ *
+ *	May 8, 2006 - Modified and ported to HelenOS by Jakub Jermar.
+ *
+ *	Can be freely distributed and used under the terms of the GNU GPL.
+ */
+
+#include "pci.h"
+#include "sysdep.h"
+
+struct pci_methods {
+	const char *name;
+	void (*config) (struct pci_access *);
+	int (*detect) (struct pci_access *);
+	void (*init) (struct pci_access *);
+	void (*cleanup) (struct pci_access *);
+	void (*scan) (struct pci_access *);
+	int (*fill_info) (struct pci_dev *, int flags);
+	int (*read) (struct pci_dev *, int pos, byte * buf, int len);
+	int (*write) (struct pci_dev *, int pos, byte * buf, int len);
+	void (*init_dev) (struct pci_dev *);
+	void (*cleanup_dev) (struct pci_dev *);
+};
+
+void pci_generic_scan_bus(struct pci_access *, byte * busmap, int bus);
+void pci_generic_scan(struct pci_access *);
+int pci_generic_fill_info(struct pci_dev *, int flags);
+int pci_generic_block_read(struct pci_dev *, int pos, byte * buf, int len);
+int pci_generic_block_write(struct pci_dev *, int pos, byte * buf,
+			    int len);
+
+void *pci_malloc(struct pci_access *, int);
+void pci_mfree(void *);
+
+struct pci_dev *pci_alloc_dev(struct pci_access *);
+int pci_link_dev(struct pci_access *, struct pci_dev *);
+
+extern struct pci_methods pm_intel_conf1, pm_intel_conf2, pm_linux_proc,
+    pm_fbsd_device, pm_aix_device, pm_nbsd_libpci, pm_obsd_device,
+    pm_dump, pm_linux_sysfs;
Index: uspace/lib/pci/names.c
===================================================================
--- uspace/lib/pci/names.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/pci/names.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,456 @@
+/*
+ *	The PCI Library -- ID to Name Translation
+ *
+ *	Copyright (c) 1997--2005 Martin Mares <mj@ucw.cz>
+ *
+ *	May 8, 2006 - Modified and ported to HelenOS by Jakub Jermar.
+ *
+ *	Can be freely distributed and used under the terms of the GNU GPL.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdarg.h>
+#include <str.h>
+#include <errno.h>
+
+#include "internal.h"
+#include "pci_ids.h"
+
+struct id_entry {
+	struct id_entry *next;
+	u32 id12, id34;
+	byte cat;
+	byte name[1];
+};
+
+enum id_entry_type {
+	ID_UNKNOWN,
+	ID_VENDOR,
+	ID_DEVICE,
+	ID_SUBSYSTEM,
+	ID_GEN_SUBSYSTEM,
+	ID_CLASS,
+	ID_SUBCLASS,
+	ID_PROGIF
+};
+
+struct id_bucket {
+	struct id_bucket *next;
+	unsigned int full;
+};
+
+#define MAX_LINE 1024
+#define BUCKET_SIZE 8192
+#define HASH_SIZE 4099
+
+#ifdef __GNUC__
+#define BUCKET_ALIGNMENT __alignof__(struct id_bucket)
+#else
+union id_align {
+	struct id_bucket *next;
+	unsigned int full;
+};
+#define BUCKET_ALIGNMENT sizeof(union id_align)
+#endif
+#define BUCKET_ALIGN(n) ((n)+BUCKET_ALIGNMENT-(n)%BUCKET_ALIGNMENT)
+
+static void *id_alloc(struct pci_access *a, unsigned int size)
+{
+	struct id_bucket *buck = a->current_id_bucket;
+	unsigned int pos;
+	if (!buck || buck->full + size > BUCKET_SIZE) {
+		buck = pci_malloc(a, BUCKET_SIZE);
+		buck->next = a->current_id_bucket;
+		a->current_id_bucket = buck;
+		buck->full = BUCKET_ALIGN(sizeof(struct id_bucket));
+	}
+	pos = buck->full;
+	buck->full = BUCKET_ALIGN(buck->full + size);
+	return (byte *) buck + pos;
+}
+
+static inline u32 id_pair(unsigned int x, unsigned int y)
+{
+	return ((x << 16) | y);
+}
+
+static inline unsigned int id_hash(int cat, u32 id12, u32 id34)
+{
+	unsigned int h;
+
+	h = id12 ^ (id34 << 3) ^ (cat << 5);
+	return h % HASH_SIZE;
+}
+
+static struct id_entry *id_lookup(struct pci_access *a, int cat, int id1,
+				  int id2, int id3, int id4)
+{
+	struct id_entry *n;
+	u32 id12 = id_pair(id1, id2);
+	u32 id34 = id_pair(id3, id4);
+
+	n = a->id_hash[id_hash(cat, id12, id34)];
+	while (n && (n->id12 != id12 || n->id34 != id34 || n->cat != cat))
+		n = n->next;
+	return n;
+}
+
+static int id_insert(struct pci_access *a, int cat, int id1, int id2,
+		     int id3, int id4, byte * text)
+{
+	u32 id12 = id_pair(id1, id2);
+	u32 id34 = id_pair(id3, id4);
+	unsigned int h = id_hash(cat, id12, id34);
+	struct id_entry *n = a->id_hash[h];
+	int len = str_size((char *) text);
+
+	while (n && (n->id12 != id12 || n->id34 != id34 || n->cat != cat))
+		n = n->next;
+	if (n)
+		return 1;
+	n = id_alloc(a, sizeof(struct id_entry) + len);
+	n->id12 = id12;
+	n->id34 = id34;
+	n->cat = cat;
+	memcpy(n->name, text, len + 1);
+	n->next = a->id_hash[h];
+	a->id_hash[h] = n;
+	return 0;
+}
+
+static int id_hex(byte * p, int cnt)
+{
+	int x = 0;
+	while (cnt--) {
+		x <<= 4;
+		if (*p >= '0' && *p <= '9')
+			x += (*p - '0');
+		else if (*p >= 'a' && *p <= 'f')
+			x += (*p - 'a' + 10);
+		else if (*p >= 'A' && *p <= 'F')
+			x += (*p - 'A' + 10);
+		else
+			return -1;
+		p++;
+	}
+	return x;
+}
+
+static inline int id_white_p(int c)
+{
+	return (c == ' ') || (c == '\t');
+}
+
+static const char *id_parse_list(struct pci_access *a, int *lino)
+{
+	byte *line;
+	byte *p;
+	int id1 = 0, id2 = 0, id3 = 0, id4 = 0;
+	int cat = -1;
+	int nest;
+	static const char parse_error[] = "Parse error";
+	size_t i;
+
+	*lino = 0;
+	for (i = 0; i < sizeof(pci_ids) / sizeof(char *); i++) {
+		line = (byte *) pci_ids[i];
+		(*lino)++;
+		p = line;
+		while (*p)
+			p++;
+		if (p > line && (p[-1] == ' ' || p[-1] == '\t'))
+			*--p = 0;
+
+		p = line;
+		while (id_white_p(*p))
+			p++;
+		if (!*p || *p == '#')
+			continue;
+
+		p = line;
+		while (*p == '\t')
+			p++;
+		nest = p - line;
+
+		if (!nest) {	/* Top-level entries */
+			if (p[0] == 'C' && p[1] == ' ') {	/* Class block */
+				if ((id1 = id_hex(p + 2, 2)) < 0 || !id_white_p(p[4]))
+					return parse_error;
+				cat = ID_CLASS;
+				p += 5;
+			} else if (p[0] == 'S' && p[1] == ' ') {	/* Generic subsystem block */
+				if ((id1 = id_hex(p + 2, 4)) < 0 || p[6])
+					return parse_error;
+				if (!id_lookup(a, ID_VENDOR, id1, 0, 0, 0))
+					return "Vendor does not exist";
+				cat = ID_GEN_SUBSYSTEM;
+				continue;
+			} else if (p[0] >= 'A' && p[0] <= 'Z' && p[1] == ' ') {	/* Unrecognized block (RFU) */
+				cat = ID_UNKNOWN;
+				continue;
+			} else {	/* Vendor ID */
+
+				if ((id1 = id_hex(p, 4)) < 0 || !id_white_p(p[4]))
+					return parse_error;
+				cat = ID_VENDOR;
+				p += 5;
+			}
+			id2 = id3 = id4 = 0;
+		} else if (cat == ID_UNKNOWN)	/* Nested entries in RFU blocks are skipped */
+			continue;
+		else if (nest == 1)	/* Nesting level 1 */
+			switch (cat) {
+			case ID_VENDOR:
+			case ID_DEVICE:
+			case ID_SUBSYSTEM:
+				if ((id2 = id_hex(p, 4)) < 0 || !id_white_p(p[4]))
+					return parse_error;
+				p += 5;
+				cat = ID_DEVICE;
+				id3 = id4 = 0;
+				break;
+			case ID_GEN_SUBSYSTEM:
+				if ((id2 = id_hex(p, 4)) < 0 || !id_white_p(p[4]))
+					return parse_error;
+				p += 5;
+				id3 = id4 = 0;
+				break;
+			case ID_CLASS:
+			case ID_SUBCLASS:
+			case ID_PROGIF:
+				if ((id2 = id_hex(p, 2)) < 0 || !id_white_p(p[2]))
+					return parse_error;
+				p += 3;
+				cat = ID_SUBCLASS;
+				id3 = id4 = 0;
+				break;
+			default:
+				return parse_error;
+		} else if (nest == 2)	/* Nesting level 2 */
+			switch (cat) {
+			case ID_DEVICE:
+			case ID_SUBSYSTEM:
+				if ((id3 = id_hex(p, 4)) < 0 || !id_white_p(p[4])
+				    || (id4 = id_hex(p + 5, 4)) < 0 || !id_white_p(p[9]))
+					return parse_error;
+				p += 10;
+				cat = ID_SUBSYSTEM;
+				break;
+			case ID_CLASS:
+			case ID_SUBCLASS:
+			case ID_PROGIF:
+				if ((id3 = id_hex(p, 2)) < 0 || !id_white_p(p[2]))
+					return parse_error;
+				p += 3;
+				cat = ID_PROGIF;
+				id4 = 0;
+				break;
+			default:
+				return parse_error;
+		} else		/* Nesting level 3 or more */
+			return parse_error;
+		while (id_white_p(*p))
+			p++;
+		if (!*p)
+			return parse_error;
+		if (id_insert(a, cat, id1, id2, id3, id4, p))
+			return "Duplicate entry";
+	}
+	return NULL;
+}
+
+int pci_load_name_list(struct pci_access *a)
+{
+	int lino;
+	const char *err;
+
+	pci_free_name_list(a);
+	a->id_hash = pci_malloc(a, sizeof(struct id_entry *) * HASH_SIZE);
+	bzero(a->id_hash, sizeof(struct id_entry *) * HASH_SIZE);
+	err = id_parse_list(a, &lino);
+	if (err)
+		a->error("%s at %s, element %d\n", err, "pci_ids.h", lino);
+	return 1;
+}
+
+void pci_free_name_list(struct pci_access *a)
+{
+	pci_mfree(a->id_hash);
+	a->id_hash = NULL;
+	while (a->current_id_bucket) {
+		struct id_bucket *buck = a->current_id_bucket;
+		a->current_id_bucket = buck->next;
+		pci_mfree(buck);
+	}
+}
+
+static struct id_entry *id_lookup_subsys(struct pci_access *a, int iv,
+					 int id, int isv, int isd)
+{
+	struct id_entry *d = NULL;
+	if (iv > 0 && id > 0)	/* Per-device lookup */
+		d = id_lookup(a, ID_SUBSYSTEM, iv, id, isv, isd);
+	if (!d)			/* Generic lookup */
+		d = id_lookup(a, ID_GEN_SUBSYSTEM, isv, isd, 0, 0);
+	if (!d && iv == isv && id == isd)	/* Check for subsystem == device */
+		d = id_lookup(a, ID_DEVICE, iv, id, 0, 0);
+	return d;
+}
+
+const char *pci_lookup_name(struct pci_access *a, char *buf, int size, int flags,
+		      ...)
+{
+	va_list args;
+	int num, res, synth;
+	struct id_entry *v, *d, *cls, *pif;
+	int iv, id, isv, isd, icls, ipif;
+
+	va_start(args, flags);
+
+	num = 0;
+	if ((flags & PCI_LOOKUP_NUMERIC) || a->numeric_ids) {
+		flags &= ~PCI_LOOKUP_NUMERIC;
+		num = 1;
+	} else if (!a->id_hash) {
+		if (!pci_load_name_list(a))
+			num = a->numeric_ids = 1;
+	}
+
+	if (flags & PCI_LOOKUP_NO_NUMBERS) {
+		flags &= ~PCI_LOOKUP_NO_NUMBERS;
+		synth = 0;
+		if (num)
+			return NULL;
+	} else
+		synth = 1;
+
+	switch (flags) {
+	case PCI_LOOKUP_VENDOR:
+		iv = va_arg(args, int);
+		if (num)
+			res = snprintf(buf, size, "%04x", iv);
+		else if ((v = id_lookup(a, ID_VENDOR, iv, 0, 0, 0)) != 0)
+			return (char *) v->name;
+		else
+			res = snprintf(buf, size, "Unknown vendor %04x", iv);
+		break;
+	case PCI_LOOKUP_DEVICE:
+		iv = va_arg(args, int);
+		id = va_arg(args, int);
+		if (num)
+			res = snprintf(buf, size, "%04x", id);
+		else if ((d = id_lookup(a, ID_DEVICE, iv, id, 0, 0)) != 0)
+			return (char *) d->name;
+		else if (synth)
+			res = snprintf(buf, size, "Unknown device %04x", id);
+		else
+			return NULL;
+		break;
+	case PCI_LOOKUP_VENDOR | PCI_LOOKUP_DEVICE:
+		iv = va_arg(args, int);
+		id = va_arg(args, int);
+		if (num)
+			res = snprintf(buf, size, "%04x:%04x", iv, id);
+		else {
+			v = id_lookup(a, ID_VENDOR, iv, 0, 0, 0);
+			d = id_lookup(a, ID_DEVICE, iv, id, 0, 0);
+			if (v && d)
+				res = snprintf(buf, size, "%s %s", v->name,
+					     d->name);
+			else if (!synth)
+				return NULL;
+			else if (!v)
+				res = snprintf(buf, size, "Unknown device %04x:%04x", iv, id);
+			else	/* !d */
+				res = snprintf(buf, size, "%s Unknown device %04x", v->name, id);
+		}
+		break;
+	case PCI_LOOKUP_SUBSYSTEM | PCI_LOOKUP_VENDOR:
+		isv = va_arg(args, int);
+		if (num)
+			res = snprintf(buf, size, "%04x", isv);
+		else if ((v = id_lookup(a, ID_VENDOR, isv, 0, 0, 0)) != 0)
+			return (char *) v->name;
+		else if (synth)
+			res = snprintf(buf, size, "Unknown vendor %04x", isv);
+		else
+			return NULL;
+		break;
+	case PCI_LOOKUP_SUBSYSTEM | PCI_LOOKUP_DEVICE:
+		iv = va_arg(args, int);
+		id = va_arg(args, int);
+		isv = va_arg(args, int);
+		isd = va_arg(args, int);
+		if (num)
+			res = snprintf(buf, size, "%04x", isd);
+		else if ((d = id_lookup_subsys(a, iv, id, isv, isd)) != 0)
+			return (char *) d->name;
+		else if (synth)
+			res = snprintf(buf, size, "Unknown device %04x", isd);
+		else
+			return NULL;
+		break;
+	case PCI_LOOKUP_VENDOR | PCI_LOOKUP_DEVICE | PCI_LOOKUP_SUBSYSTEM:
+		iv = va_arg(args, int);
+		id = va_arg(args, int);
+		isv = va_arg(args, int);
+		isd = va_arg(args, int);
+		if (num)
+			res = snprintf(buf, size, "%04x:%04x", isv, isd);
+		else {
+			v = id_lookup(a, ID_VENDOR, isv, 0, 0, 0);
+			d = id_lookup_subsys(a, iv, id, isv, isd);
+			if (v && d)
+				res = snprintf(buf, size, "%s %s", v->name, d->name);
+			else if (!synth)
+				return NULL;
+			else if (!v)
+				res = snprintf(buf, size, "Unknown device %04x:%04x", isv, isd);
+			else	/* !d */
+				res = snprintf(buf, size, "%s Unknown device %04x", v->name, isd);
+		}
+		break;
+	case PCI_LOOKUP_CLASS:
+		icls = va_arg(args, int);
+		if (num)
+			res = snprintf(buf, size, "%04x", icls);
+		else if ((cls = id_lookup(a, ID_SUBCLASS, icls >> 8, icls & 0xff, 0, 0)) != 0)
+			return (char *) cls->name;
+		else if ((cls = id_lookup(a, ID_CLASS, icls, 0, 0, 0)) != 0)
+			res = snprintf(buf, size, "%s [%04x]", cls->name, icls);
+		else if (synth)
+			res = snprintf(buf, size, "Class %04x", icls);
+		else
+			return NULL;
+		break;
+	case PCI_LOOKUP_PROGIF:
+		icls = va_arg(args, int);
+		ipif = va_arg(args, int);
+		if (num)
+			res = snprintf(buf, size, "%02x", ipif);
+		else if ((pif = id_lookup(a, ID_PROGIF, icls >> 8, icls & 0xff, ipif, 0)) != 0)
+			return (char *) pif->name;
+		else if (icls == 0x0101 && !(ipif & 0x70)) {
+			/* IDE controllers have complex prog-if semantics */
+			res = snprintf(buf, size, "%s%s%s%s%s",
+				       (ipif & 0x80) ? "Master " : "",
+				       (ipif & 0x08) ? "SecP " : "",
+				       (ipif & 0x04) ? "SecO " : "",
+				       (ipif & 0x02) ? "PriP " : "",
+				       (ipif & 0x01) ? "PriO " : "");
+			if (res > 0 && res < size)
+				buf[--res] = 0;
+		} else if (synth)
+			res = snprintf(buf, size, "ProgIf %02x", ipif);
+		else
+			return NULL;
+		break;
+	default:
+		return "<pci_lookup_name: invalid request>";
+	}
+	if (res < 0 || res >= size)
+		return "<pci_lookup_name: buffer too small>";
+	else
+		return buf;
+}
Index: uspace/lib/pci/pci.h
===================================================================
--- uspace/lib/pci/pci.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/pci/pci.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,146 @@
+/*
+ *	The PCI Library
+ *
+ *	Copyright (c) 1997--2005 Martin Mares <mj@ucw.cz>
+ *
+ *	May 8, 2006 - Modified and ported to HelenOS by Jakub Jermar.
+ *
+ *	Can be freely distributed and used under the terms of the GNU GPL.
+ */
+
+#ifndef _PCI_LIB_H
+#define _PCI_LIB_H
+
+#include "header.h"
+#include "types.h"
+
+#define PCI_LIB_VERSION 0x020200
+
+/*
+ *	PCI Access Structure
+ */
+
+struct pci_methods;
+
+enum pci_access_type {
+	/* Known access methods, remember to update access.c as well */
+	PCI_ACCESS_I386_TYPE1,	/* i386 ports, type 1 (params: none) */
+	PCI_ACCESS_I386_TYPE2,	/* i386 ports, type 2 (params: none) */
+	PCI_ACCESS_MAX
+};
+
+struct pci_access {
+	/* Options you can change: */
+	unsigned int method;	/* Access method */
+	char *method_params[PCI_ACCESS_MAX];	/* Parameters for the methods */
+	int writeable;		/* Open in read/write mode */
+	int buscentric;		/* Bus-centric view of the world */
+	int numeric_ids;	/* Don't resolve device IDs to names */
+	int debugging;		/* Turn on debugging messages */
+
+	/* Functions you can override: */
+	void (*error) (const char *msg, ...);	/* Write error message and quit */
+	void (*warning) (const char *msg, ...);	/* Write a warning message */
+	void (*debug) (const char *msg, ...);	/* Write a debugging message */
+
+	struct pci_dev *devices;	/* Devices found on this bus */
+
+	/* Fields used internally: */
+	struct pci_methods *methods;
+	struct id_entry **id_hash;	/* names.c */
+	struct id_bucket *current_id_bucket;
+};
+
+/* Initialize PCI access */
+struct pci_access *pci_alloc(void);
+void pci_init(struct pci_access *);
+void pci_cleanup(struct pci_access *);
+
+/* Scanning of devices */
+void pci_scan_bus(struct pci_access *acc);
+struct pci_dev *pci_get_dev(struct pci_access *acc, int domain, int bus, int dev, int func);	/* Raw access to specified device */
+void pci_free_dev(struct pci_dev *);
+
+/*
+ *	Devices
+ */
+
+struct pci_dev {
+	struct pci_dev *next;	/* Next device in the chain */
+	u16 domain;		/* PCI domain (host bridge) */
+	u8 bus, dev, func;	/* Bus inside domain, device and function */
+
+	/* These fields are set by pci_fill_info() */
+	int known_fields;	/* Set of info fields already known */
+	u16 vendor_id, device_id;	/* Identity of the device */
+	int irq;		/* IRQ number */
+	pciaddr_t base_addr[6];	/* Base addresses */
+	pciaddr_t size[6];	/* Region sizes */
+	pciaddr_t rom_base_addr;	/* Expansion ROM base address */
+	pciaddr_t rom_size;	/* Expansion ROM size */
+
+	/* Fields used internally: */
+	struct pci_access *access;
+	struct pci_methods *methods;
+	u8 *cache;		/* Cached config registers */
+	int cache_len;
+	int hdrtype;		/* Cached low 7 bits of header type, -1 if unknown */
+	void *aux;		/* Auxillary data */
+};
+
+#define PCI_ADDR_IO_MASK (~(pciaddr_t) 0x3)
+#define PCI_ADDR_MEM_MASK (~(pciaddr_t) 0xf)
+
+u8 pci_read_byte(struct pci_dev *, int pos);	/* Access to configuration space */
+u16 pci_read_word(struct pci_dev *, int pos);
+u32 pci_read_long(struct pci_dev *, int pos);
+int pci_read_block(struct pci_dev *, int pos, u8 * buf, int len);
+int pci_write_byte(struct pci_dev *, int pos, u8 data);
+int pci_write_word(struct pci_dev *, int pos, u16 data);
+int pci_write_long(struct pci_dev *, int pos, u32 data);
+int pci_write_block(struct pci_dev *, int pos, u8 * buf, int len);
+
+int pci_fill_info(struct pci_dev *, int flags);	/* Fill in device information */
+
+#define PCI_FILL_IDENT		1
+#define PCI_FILL_IRQ		2
+#define PCI_FILL_BASES		4
+#define PCI_FILL_ROM_BASE	8
+#define PCI_FILL_SIZES		16
+#define PCI_FILL_RESCAN		0x10000
+
+void pci_setup_cache(struct pci_dev *, u8 * cache, int len);
+
+/*
+ *	Conversion of PCI ID's to names (according to the pci.ids file)
+ *
+ *	Call pci_lookup_name() to identify different types of ID's:
+ *
+ *	VENDOR				(vendorID) -> vendor
+ *	DEVICE				(vendorID, deviceID) -> device
+ *	VENDOR | DEVICE			(vendorID, deviceID) -> combined vendor and device
+ *	SUBSYSTEM | VENDOR		(subvendorID) -> subsystem vendor
+ *	SUBSYSTEM | DEVICE		(vendorID, deviceID, subvendorID, subdevID) -> subsystem device
+ *	SUBSYSTEM | VENDOR | DEVICE	(vendorID, deviceID, subvendorID, subdevID) -> combined subsystem v+d
+ *	SUBSYSTEM | ...			(-1, -1, subvendorID, subdevID) -> generic subsystem
+ *	CLASS				(classID) -> class
+ *	PROGIF				(classID, progif) -> programming interface
+ */
+
+const char *pci_lookup_name(struct pci_access *a, char *buf, int size,
+    int flags, ...);
+
+int pci_load_name_list(struct pci_access *a);	/* Called automatically by pci_lookup_*() when needed; returns success */
+void pci_free_name_list(struct pci_access *a);	/* Called automatically by pci_cleanup() */
+
+enum pci_lookup_mode {
+	PCI_LOOKUP_VENDOR = 1,	/* Vendor name (args: vendorID) */
+	PCI_LOOKUP_DEVICE = 2,	/* Device name (args: vendorID, deviceID) */
+	PCI_LOOKUP_CLASS = 4,	/* Device class (args: classID) */
+	PCI_LOOKUP_SUBSYSTEM = 8,
+	PCI_LOOKUP_PROGIF = 16,	/* Programming interface (args: classID, prog_if) */
+	PCI_LOOKUP_NUMERIC = 0x10000,	/* Want only formatted numbers; default if access->numeric_ids is set */
+	PCI_LOOKUP_NO_NUMBERS = 0x20000	/* Return NULL if not found in the database; default is to print numerically */
+};
+
+#endif
Index: uspace/lib/pci/pci_ids.h
===================================================================
--- uspace/lib/pci/pci_ids.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/pci/pci_ids.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,11934 @@
+/* DO NOT EDIT, THIS FILE IS AUTOMATICALLY GENERATED */
+const char *pci_ids[] = {
+"0000  Gammagraphx, Inc.",
+"001a  Ascend Communications, Inc.",
+"0033  Paradyne corp.",
+"003d  Lockheed Martin-Marietta Corp",
+"0059  Tiger Jet Network Inc. (Wrong ID)",
+"0070  Hauppauge computer works Inc.",
+"0071  Nebula Electronics Ltd.",
+"0095  Silicon Image, Inc. (Wrong ID)",
+"	0680  Ultra ATA/133 IDE RAID CONTROLLER CARD",
+"00a7  Teles AG (Wrong ID)",
+"00f5  BFG Technologies, Inc.",
+"0100  Ncipher Corp Ltd",
+"0123  General Dynamics",
+"018a  LevelOne",
+"	0106  FPC-0106TX misprogrammed [RTL81xx]",
+"021b  Compaq Computer Corporation",
+"	8139  HNE-300 (RealTek RTL8139c) [iPaq Networking]",
+"0270  Hauppauge computer works Inc. (Wrong ID)",
+"0291  Davicom Semiconductor, Inc.",
+"	8212  DM9102A(DM9102AE, SM9102AF) Ethernet 100/10 MBit(Rev 40)",
+"02ac  SpeedStream",
+"	1012  1012 PCMCIA 10/100 Ethernet Card [RTL81xx]",
+"0315  SK-Electronics Co., Ltd.",
+"0357  TTTech AG",
+"	000a  TTP-Monitoring Card V2.0",
+"0432  SCM Microsystems, Inc.",
+"	0001  Pluto2 DVB-T Receiver for PCMCIA [EasyWatch MobilSet]",
+"045e  Microsoft",
+"	006e  MN-510 802.11b wireless USB paddle",
+"	00c2  MN-710 wireless USB paddle",
+"04cf  Myson Century, Inc",
+"	8818  CS8818 USB2.0-to-ATAPI Bridge Controller with Embedded PHY",
+"050d  Belkin",
+"	0109  F5U409-CU USB/Serial Portable Adapter",
+"	7050  F5D7050 802.11g Wireless USB Adapter",
+"05e3  CyberDoor",
+"	0701  CBD516",
+"066f  Sigmatel Inc.",
+"	3410  SMTP3410",
+"	3500  SMTP3500",
+"0675  Dynalink",
+"	1700  IS64PH ISDN Adapter",
+"	1702  IS64PH ISDN Adapter",
+"	1703  ISDN Adapter (PCI Bus, DV, W)",
+"	1704  ISDN Adapter (PCI Bus, D, C)",
+"067b  Prolific Technology, Inc.",
+"	3507  PL-3507 Hi-Speed USB & IEEE 1394 Combo to IDE Bridge Controller",
+"0721  Sapphire, Inc.",
+"07e2  ELMEG Communication Systems GmbH",
+"0925  VIA Technologies, Inc. (Wrong ID)",
+"09c1  Arris",
+"	0704  CM 200E Cable Modem",
+"0a89  BREA Technologies Inc",
+"0b0b  Rhino Equiment Corp.",
+"	0105  Rhino R1T1",
+"	0205  Rhino R4FXO",
+"	0305  Rhino R4T1",
+"	0405  Rhino R8FXX",
+"	0505  Rhino R24FXX",
+"	0506  Rhino R2T1",
+"0b49  ASCII Corporation",
+"	064f  Trance Vibrator",
+"0e11  Compaq Computer Corporation",
+"	0001  PCI to EISA Bridge",
+"	0002  PCI to ISA Bridge",
+"	0046  Smart Array 64xx",
+"		0e11 409a  Smart Array 641",
+"		0e11 409b  Smart Array 642",
+"		0e11 409c  Smart Array 6400",
+"		0e11 409d  Smart Array 6400 EM",
+"	0049  NC7132 Gigabit Upgrade Module",
+"	004a  NC6136 Gigabit Server Adapter",
+"	005a  Remote Insight II board - Lights-Out",
+"	007c  NC7770 1000BaseTX",
+"	007d  NC6770 1000BaseTX",
+"	0085  NC7780 1000BaseTX",
+"	00b1  Remote Insight II board - PCI device",
+"	00bb  NC7760",
+"	00ca  NC7771",
+"	00cb  NC7781",
+"	00cf  NC7772",
+"	00d0  NC7782",
+"	00d1  NC7783",
+"	00e3  NC7761",
+"	0508  Netelligent 4/16 Token Ring",
+"	1000  Triflex/Pentium Bridge, Model 1000",
+"	2000  Triflex/Pentium Bridge, Model 2000",
+"	3032  QVision 1280/p",
+"	3033  QVision 1280/p",
+"	3034  QVision 1280/p",
+"	4000  4000 [Triflex]",
+"	4030  SMART-2/P",
+"	4031  SMART-2SL",
+"	4032  Smart Array 3200",
+"	4033  Smart Array 3100ES",
+"	4034  Smart Array 221",
+"	4040  Integrated Array",
+"	4048  Compaq Raid LC2",
+"	4050  Smart Array 4200",
+"	4051  Smart Array 4250ES",
+"	4058  Smart Array 431",
+"	4070  Smart Array 5300",
+"	4080  Smart Array 5i",
+"	4082  Smart Array 532",
+"	4083  Smart Array 5312",
+"	4091  Smart Array 6i",
+"	409a  Smart Array 641",
+"	409b  Smart Array 642",
+"	409c  Smart Array 6400",
+"	409d  Smart Array 6400 EM",
+"	6010  HotPlug PCI Bridge 6010",
+"	7020  USB Controller",
+"	a0ec  Fibre Channel Host Controller",
+"	a0f0  Advanced System Management Controller",
+"	a0f3  Triflex PCI to ISA Bridge",
+"	a0f7  PCI Hotplug Controller",
+"		8086 002a  PCI Hotplug Controller A",
+"		8086 002b  PCI Hotplug Controller B",
+"	a0f8  ZFMicro Chipset USB",
+"	a0fc  FibreChannel HBA Tachyon",
+"	ae10  Smart-2/P RAID Controller",
+"		0e11 4030  Smart-2/P Array Controller",
+"		0e11 4031  Smart-2SL Array Controller",
+"		0e11 4032  Smart Array Controller",
+"		0e11 4033  Smart 3100ES Array Controller",
+"	ae29  MIS-L",
+"	ae2a  MPC",
+"	ae2b  MIS-E",
+"	ae31  System Management Controller",
+"	ae32  Netelligent 10/100 TX PCI UTP",
+"	ae33  Triflex Dual EIDE Controller",
+"	ae34  Netelligent 10 T PCI UTP",
+"	ae35  Integrated NetFlex-3/P",
+"	ae40  Netelligent Dual 10/100 TX PCI UTP",
+"	ae43  Netelligent Integrated 10/100 TX UTP",
+"	ae69  CETUS-L",
+"	ae6c  Northstar",
+"	ae6d  NorthStar CPU to PCI Bridge",
+"	b011  Netelligent 10/100 TX Embedded UTP",
+"	b012  Netelligent 10 T/2 PCI UTP/Coax",
+"	b01e  NC3120 Fast Ethernet NIC",
+"	b01f  NC3122 Fast Ethernet NIC",
+"	b02f  NC1120 Ethernet NIC",
+"	b030  Netelligent 10/100 TX UTP",
+"	b04a  10/100 TX PCI Intel WOL UTP Controller",
+"	b060  Smart Array 5300 Controller",
+"	b0c6  NC3161 Fast Ethernet NIC",
+"	b0c7  NC3160 Fast Ethernet NIC",
+"	b0d7  NC3121 Fast Ethernet NIC",
+"	b0dd  NC3131 Fast Ethernet NIC",
+"	b0de  NC3132 Fast Ethernet Module",
+"	b0df  NC6132 Gigabit Module",
+"	b0e0  NC6133 Gigabit Module",
+"	b0e1  NC3133 Fast Ethernet Module",
+"	b123  NC6134 Gigabit NIC",
+"	b134  NC3163 Fast Ethernet NIC",
+"	b13c  NC3162 Fast Ethernet NIC",
+"	b144  NC3123 Fast Ethernet NIC",
+"	b163  NC3134 Fast Ethernet NIC",
+"	b164  NC3165 Fast Ethernet Upgrade Module",
+"	b178  Smart Array 5i/532",
+"		0e11 4080  Smart Array 5i",
+"		0e11 4082  Smart Array 532",
+"		0e11 4083  Smart Array 5312",
+"	b1a4  NC7131 Gigabit Server Adapter",
+"	b200  Memory Hot-Plug Controller",
+"	b203  Integrated Lights Out Controller",
+"	b204  Integrated Lights Out  Processor",
+"	f130  NetFlex-3/P ThunderLAN 1.0",
+"	f150  NetFlex-3/P ThunderLAN 2.3",
+"0e21  Cowon Systems, Inc.",
+"0e55  HaSoTec GmbH",
+"1000  LSI Logic / Symbios Logic",
+"	0001  53c810",
+"		1000 1000  LSI53C810AE PCI to SCSI I/O Processor",
+"	0002  53c820",
+"	0003  53c825",
+"		1000 1000  LSI53C825AE PCI to SCSI I/O Processor (Ultra Wide)",
+"	0004  53c815",
+"	0005  53c810AP",
+"	0006  53c860",
+"		1000 1000  LSI53C860E PCI to Ultra SCSI I/O Processor",
+"	000a  53c1510",
+"		1000 1000  LSI53C1510 PCI to Dual Channel Wide Ultra2 SCSI Controller (Nonintelligent mode)",
+"	000b  53C896/897",
+"		0e11 6004  EOB003 Series SCSI host adapter",
+"		1000 1000  LSI53C896/7 PCI to Dual Channel Ultra2 SCSI Multifunction Controller",
+"		1000 1010  LSI22910 PCI to Dual Channel Ultra2 SCSI host adapter",
+"		1000 1020  LSI21002 PCI to Dual Channel Ultra2 SCSI host adapter",
+"		13e9 1000  6221L-4U",
+"	000c  53c895",
+"		1000 1010  LSI8951U PCI to Ultra2 SCSI host adapter",
+"		1000 1020  LSI8952U PCI to Ultra2 SCSI host adapter",
+"		1de1 3906  DC-390U2B SCSI adapter",
+"		1de1 3907  DC-390U2W",
+"	000d  53c885",
+"	000f  53c875",
+"		0e11 7004  Embedded Ultra Wide SCSI Controller",
+"		1000 1000  LSI53C876/E PCI to Dual Channel SCSI Controller",
+"		1000 1010  LSI22801 PCI to Dual Channel Ultra SCSI host adapter",
+"		1000 1020  LSI22802 PCI to Dual Channel Ultra SCSI host adapter",
+"		1092 8760  FirePort 40 Dual SCSI Controller",
+"		1de1 3904  DC390F/U Ultra Wide SCSI Adapter",
+"		4c53 1000  CC7/CR7/CP7/VC7/VP7/VR7 mainboard",
+"		4c53 1050  CT7 mainboard",
+"	0010  53C1510",
+"		0e11 4040  Integrated Array Controller",
+"		0e11 4048  RAID LC2 Controller",
+"		1000 1000  53C1510 PCI to Dual Channel Wide Ultra2 SCSI Controller (Intelligent mode)",
+"	0012  53c895a",
+"		1000 1000  LSI53C895A PCI to Ultra2 SCSI Controller",
+"	0013  53c875a",
+"		1000 1000  LSI53C875A PCI to Ultra SCSI Controller",
+"	0020  53c1010 Ultra3 SCSI Adapter",
+"		1000 1000  LSI53C1010-33 PCI to Dual Channel Ultra160 SCSI Controller",
+"		1de1 1020  DC-390U3W",
+"	0021  53c1010 66MHz  Ultra3 SCSI Adapter",
+"		1000 1000  LSI53C1000/1000R/1010R/1010-66 PCI to Ultra160 SCSI Controller",
+"		1000 1010  Asus TR-DLS onboard 53C1010-66",
+"		124b 1070  PMC-USCSI3",
+"		4c53 1080  CT8 mainboard",
+"		4c53 1300  P017 mezzanine (32-bit PMC)",
+"		4c53 1310  P017 mezzanine (64-bit PMC)",
+"	0030  53c1030 PCI-X Fusion-MPT Dual Ultra320 SCSI",
+"		0e11 00da  ProLiant ML 350",
+"		1028 0123  PowerEdge 2600",
+"		1028 014a  PowerEdge 1750",
+"		1028 016c  PowerEdge 1850 MPT Fusion SCSI/RAID (Perc 4)",
+"		1028 0183  PowerEdge 1800",
+"		1028 1010  LSI U320 SCSI Controller",
+"		124b 1170  PMC-USCSI320",
+"		1734 1052  Primergy RX300 S2",
+"	0031  53c1030ZC PCI-X Fusion-MPT Dual Ultra320 SCSI",
+"	0032  53c1035 PCI-X Fusion-MPT Dual Ultra320 SCSI",
+"		1000 1000  LSI53C1020/1030 PCI-X to Ultra320 SCSI Controller",
+"	0033  1030ZC_53c1035 PCI-X Fusion-MPT Dual Ultra320 SCSI",
+"	0040  53c1035 PCI-X Fusion-MPT Dual Ultra320 SCSI",
+"		1000 0033  MegaRAID SCSI 320-2XR",
+"		1000 0066  MegaRAID SCSI 320-2XRWS",
+"	0041  53C1035ZC PCI-X Fusion-MPT Dual Ultra320 SCSI",
+"	0050  SAS1064 PCI-X Fusion-MPT SAS",
+"	0054  SAS1068 PCI-X Fusion-MPT SAS",
+"	0056  SAS1064E PCI-Express Fusion-MPT SAS",
+"	0058  SAS1068E PCI-Express Fusion-MPT SAS",
+"	005a  SAS1066E PCI-Express Fusion-MPT SAS",
+"	005c  SAS1064A PCI-X Fusion-MPT SAS",
+"	005e  SAS1066 PCI-X Fusion-MPT SAS",
+"	0060  SAS1078 PCI-X Fusion-MPT SAS",
+"	0062  SAS1078 PCI-Express Fusion-MPT SAS",
+"		1000 0062  SAS1078 PCI-Express Fusion-MPT SAS",
+"	008f  53c875J",
+"		1092 8000  FirePort 40 SCSI Controller",
+"		1092 8760  FirePort 40 Dual SCSI Host Adapter",
+"	0407  MegaRAID",
+"		1000 0530  MegaRAID 530 SCSI 320-0X RAID Controller",
+"		1000 0531  MegaRAID 531 SCSI 320-4X RAID Controller",
+"		1000 0532  MegaRAID 532 SCSI 320-2X RAID Controller",
+"		1028 0531  PowerEdge Expandable RAID Controller 4/QC",
+"		1028 0533  PowerEdge Expandable RAID Controller 4/QC",
+"		8086 0530  MegaRAID Intel RAID Controller SRCZCRX",
+"		8086 0532  MegaRAID Intel RAID Controller SRCU42X",
+"	0408  MegaRAID",
+"		1000 0001  MegaRAID SCSI 320-1E RAID Controller",
+"		1000 0002  MegaRAID SCSI 320-2E RAID Controller",
+"		1025 004d  MegaRAID ACER ROMB-2E RAID Controller",
+"		1028 0001  PowerEdge RAID Controller PERC4e/SC",
+"		1028 0002  PowerEdge RAID Controller PERC4e/DC",
+"		1734 1065  FSC MegaRAID PCI Express ROMB",
+"		8086 0002  MegaRAID Intel RAID Controller SRCU42E",
+"	0409  MegaRAID",
+"		1000 3004  MegaRAID SATA 300-4X RAID Controller",
+"		1000 3008  MegaRAID SATA 300-8X RAID Controller",
+"		8086 3008  MegaRAID RAID Controller SRCS28X",
+"		8086 3431  MegaRAID RAID Controller Alief SROMBU42E",
+"		8086 3499  MegaRAID RAID Controller Harwich SROMBU42E",
+"	0621  FC909 Fibre Channel Adapter",
+"	0622  FC929 Fibre Channel Adapter",
+"		1000 1020  44929 O Dual Fibre Channel card",
+"	0623  FC929 LAN",
+"	0624  FC919 Fibre Channel Adapter",
+"	0625  FC919 LAN",
+"	0626  FC929X Fibre Channel Adapter",
+"		1000 1010  7202-XP-LC Dual Fibre Channel card",
+"	0627  FC929X LAN",
+"	0628  FC919X Fibre Channel Adapter",
+"	0629  FC919X LAN",
+"	0640  FC949X Fibre Channel Adapter",
+"	0642  FC939X Fibre Channel Adapter",
+"	0646  FC949ES Fibre Channel Adapter",
+"	0701  83C885 NT50 DigitalScape Fast Ethernet",
+"	0702  Yellowfin G-NIC gigabit ethernet",
+"		1318 0000  PEI100X",
+"	0804  SA2010",
+"	0805  SA2010ZC",
+"	0806  SA2020",
+"	0807  SA2020ZC",
+"	0901  61C102",
+"	1000  63C815",
+"	1960  MegaRAID",
+"		1000 0518  MegaRAID 518 SCSI 320-2 Controller",
+"		1000 0520  MegaRAID 520 SCSI 320-1 Controller",
+"		1000 0522  MegaRAID 522 i4 133 RAID Controller",
+"		1000 0523  MegaRAID SATA 150-6 RAID Controller",
+"		1000 4523  MegaRAID SATA 150-4 RAID Controller",
+"		1000 a520  MegaRAID ZCR SCSI 320-0 Controller",
+"		1028 0518  MegaRAID 518 DELL PERC 4/DC RAID Controller",
+"		1028 0520  MegaRAID 520 DELL PERC 4/SC RAID Controller",
+"		1028 0531  PowerEdge Expandable RAID Controller 4/QC",
+"		1028 0533  PowerEdge Expandable RAID Controller 4/QC",
+"		8086 0520  MegaRAIDRAID Controller SRCU41L",
+"		8086 0523  MegaRAID RAID Controller SRCS16",
+"1001  Kolter Electronic",
+"	0010  PCI 1616 Measurement card with 32 digital I/O lines",
+"	0011  OPTO-PCI Opto-Isolated digital I/O board",
+"	0012  PCI-AD/DA Analogue I/O board",
+"	0013  PCI-OPTO-RELAIS Digital I/O board with relay outputs",
+"	0014  PCI-Counter/Timer Counter Timer board",
+"	0015  PCI-DAC416 Analogue output board",
+"	0016  PCI-MFB Analogue I/O board",
+"	0017  PROTO-3 PCI Prototyping board",
+"	9100  INI-9100/9100W SCSI Host",
+"1002  ATI Technologies Inc",
+"	3150  M24 1P [Radeon Mobility X600]",
+"	3152  M22 [Radeon Mobility X300]",
+"	3154  M24 1T [FireGL M24 GL]",
+"	3e50  RV380 0x3e50 [Radeon X600]",
+"	3e54  RV380 0x3e54 [FireGL V3200]",
+"	3e70  RV380 [Radeon X600] Secondary",
+"	4136  Radeon IGP 320 M",
+"	4137  Radeon IGP330/340/350",
+"	4144  R300 AD [Radeon 9500 Pro]",
+"	4145  R300 AE [Radeon 9700 Pro]",
+"	4146  R300 AF [Radeon 9700 Pro]",
+"	4147  R300 AG [FireGL Z1/X1]",
+"	4148  R350 AH [Radeon 9800]",
+"	4149  R350 AI [Radeon 9800]",
+"	414a  R350 AJ [Radeon 9800]",
+"	414b  R350 AK [Fire GL X2]",
+"	4150  RV350 AP [Radeon 9600]",
+"		1002 0002  R9600 Pro primary (Asus OEM for HP)",
+"		1002 0003  R9600 Pro secondary (Asus OEM for HP)",
+"		1002 4722  All-in-Wonder 2006 AGP Edition",
+"		1458 4024  Giga-Byte GV-R96128D Primary",
+"		148c 2064  PowerColor R96A-C3N",
+"		148c 2066  PowerColor R96A-C3N",
+"		174b 7c19  Sapphire Atlantis Radeon 9600 Pro",
+"		174b 7c29  GC-R9600PRO Primary [Sapphire]",
+"		17ee 2002  Radeon 9600 256Mb Primary",
+"		18bc 0101  GC-R9600PRO Primary",
+"	4151  RV350 AQ [Radeon 9600]",
+"		1043 c004  A9600SE",
+"	4152  RV350 AR [Radeon 9600]",
+"		1002 0002  Radeon 9600XT",
+"		1002 4772  All-in-Wonder 9600 XT",
+"		1043 c002  Radeon 9600 XT TVD",
+"		1043 c01a  A9600XT/TD",
+"		174b 7c29  Sapphire Radeon 9600XT",
+"		1787 4002  Radeon 9600 XT",
+"	4153  RV350 AS [Radeon 9550]",
+"		1462 932c  865PE Neo2-V (MS-6788) mainboard",
+"	4154  RV350 AT [Fire GL T2]",
+"	4155  RV350 AU [Fire GL T2]",
+"	4156  RV350 AV [Fire GL T2]",
+"	4157  RV350 AW [Fire GL T2]",
+"	4158  68800AX [Mach32]",
+"	4164  R300 AD [Radeon 9500 Pro] (Secondary)",
+"	4165  R300 AE [Radeon 9700 Pro] (Secondary)",
+"	4166  R300 AF [Radeon 9700 Pro] (Secondary)",
+"	4168  Radeon R350 [Radeon 9800] (Secondary)",
+"	4170  RV350 AP [Radeon 9600] (Secondary)",
+"		1002 0003  R9600 Pro secondary (Asus OEM for HP)",
+"		1002 4723  All-in-Wonder 2006 AGP Edition (Secondary)",
+"		1458 4025  Giga-Byte GV-R96128D Secondary",
+"		148c 2067  PowerColor R96A-C3N (Secondary)",
+"		174b 7c28  GC-R9600PRO Secondary [Sapphire]",
+"		17ee 2003  Radeon 9600 256Mb Secondary",
+"		18bc 0100  GC-R9600PRO Secondary",
+"	4171  RV350 AQ [Radeon 9600] (Secondary)",
+"		1043 c005  A9600SE (Secondary)",
+"	4172  RV350 AR [Radeon 9600] (Secondary)",
+"		1002 0003  Radeon 9600XT (Secondary)",
+"		1002 4773  All-in-Wonder 9600 XT (Secondary)",
+"		1043 c003  A9600XT (Secondary)",
+"		1043 c01b  A9600XT/TD (Secondary)",
+"		174b 7c28  Sapphire Radeon 9600XT (Secondary)",
+"		1787 4003  Radeon 9600 XT (Secondary)",
+"	4173  RV350 \?\? [Radeon 9550] (Secondary)",
+"	4237  Radeon 7000 IGP",
+"	4242  R200 BB [Radeon All in Wonder 8500DV]",
+"		1002 02aa  Radeon 8500 AIW DV Edition",
+"	4243  R200 BC [Radeon All in Wonder 8500]",
+"	4336  Radeon Mobility U1",
+"		1002 4336  Pavilion ze4300 ATI Radeon Mobility U1 (IGP 320 M)",
+"		103c 0024  Pavilion ze4400 builtin Video",
+"		161f 2029  eMachines M5312 builtin Video",
+"	4337  Radeon IGP 330M/340M/350M",
+"		1014 053a  ThinkPad R40e (2684-HVG) builtin VGA controller",
+"		103c 0850  Radeon IGP 345M",
+"	4341  IXP150 AC'97 Audio Controller",
+"	4345  EHCI USB Controller",
+"	4347  OHCI USB Controller #1",
+"	4348  OHCI USB Controller #2",
+"	4349  ATI Dual Channel Bus Master PCI IDE Controller",
+"	434d  IXP AC'97 Modem",
+"	4353  ATI SMBus",
+"	4354  215CT [Mach64 CT]",
+"	4358  210888CX [Mach64 CX]",
+"	4363  ATI SMBus",
+"	436e  ATI 436E Serial ATA Controller",
+"	4370  IXP SB400 AC'97 Audio Controller",
+"		1025 0079  Aspire 5024WLMMi",
+"		103c 308b  MX6125",
+"		107b 0300  MX6421",
+"	4371  IXP SB400 PCI-PCI Bridge",
+"		103c 308b  MX6125",
+"	4372  IXP SB400 SMBus Controller",
+"		1025 0080  Aspire 5024WLMMi",
+"		103c 308b  MX6125",
+"	4373  IXP SB400 USB2 Host Controller",
+"		1025 0080  Aspire 5024WLMMi",
+"		103c 308b  MX6125",
+"	4374  IXP SB400 USB Host Controller",
+"		103c 308b  MX6125",
+"	4375  IXP SB400 USB Host Controller",
+"		1025 0080  Aspire 5024WLMMi",
+"		103c 308b  MX6125",
+"	4376  Standard Dual Channel PCI IDE Controller ATI",
+"		1025 0080  Aspire 5024WLMMi",
+"		103c 308b  MX6125",
+"	4377  IXP SB400 PCI-ISA Bridge",
+"		1025 0080  Aspire 5024WLMi",
+"		103c 308b  MX6125",
+"	4378  ATI SB400 - AC'97 Modem Controller",
+"		1025 0080  Aspire 5024WLMMi",
+"		103c 308b  MX6125",
+"	4379  ATI 4379 Serial ATA Controller",
+"	437a  ATI 437A Serial ATA Controller",
+"	437b  SB450 HDA Audio",
+"	4380  SB600 Non-Raid-5 SATA",
+"	4381  SB600 Raid-5 SATA",
+"	4382  SB600 AC97 Audio",
+"	4383  SB600 Azalia",
+"	4384  SB600 PCI to PCI Bridge",
+"	4385  SB600 SMBus",
+"	4386  SB600 USB Controller (EHCI)",
+"	4387  SB600 USB (OHCI0)",
+"	4388  SB600 USB (OHCI1)",
+"	4389  SB600 USB (OHCI2)",
+"	438a  SB600 USB (OHCI3)",
+"	438b  SB600 USB (OHCI4)",
+"	438c  SB600 IDE",
+"	438d  SB600 PCI to LPC Bridge",
+"	438e  SB600 AC97 Modem",
+"	4437  Radeon Mobility 7000 IGP",
+"	4554  210888ET [Mach64 ET]",
+"	4654  Mach64 VT",
+"	4742  3D Rage Pro AGP 1X/2X",
+"		1002 0040  Rage Pro Turbo AGP 2X",
+"		1002 0044  Rage Pro Turbo AGP 2X",
+"		1002 0061  Rage Pro AIW AGP 2X",
+"		1002 0062  Rage Pro AIW AGP 2X",
+"		1002 0063  Rage Pro AIW AGP 2X",
+"		1002 0080  Rage Pro Turbo AGP 2X",
+"		1002 0084  Rage Pro Turbo AGP 2X",
+"		1002 4742  Rage Pro Turbo AGP 2X",
+"		1002 8001  Rage Pro Turbo AGP 2X",
+"		1028 0082  Rage Pro Turbo AGP 2X",
+"		1028 4082  Optiplex GX1 Onboard Display Adapter",
+"		1028 8082  Rage Pro Turbo AGP 2X",
+"		1028 c082  Rage Pro Turbo AGP 2X",
+"		8086 4152  Xpert 98D AGP 2X",
+"		8086 464a  Rage Pro Turbo AGP 2X",
+"	4744  3D Rage Pro AGP 1X",
+"		1002 4744  Rage Pro Turbo AGP",
+"	4747  3D Rage Pro",
+"	4749  3D Rage Pro",
+"		1002 0061  Rage Pro AIW",
+"		1002 0062  Rage Pro AIW",
+"	474c  Rage XC",
+"	474d  Rage XL AGP 2X",
+"		1002 0004  Xpert 98 RXL AGP 2X",
+"		1002 0008  Xpert 98 RXL AGP 2X",
+"		1002 0080  Rage XL AGP 2X",
+"		1002 0084  Xpert 98 AGP 2X",
+"		1002 474d  Rage XL AGP",
+"		1033 806a  Rage XL AGP",
+"	474e  Rage XC AGP",
+"		1002 474e  Rage XC AGP",
+"	474f  Rage XL",
+"		1002 0008  Rage XL",
+"		1002 474f  Rage XL",
+"	4750  3D Rage Pro 215GP",
+"		1002 0040  Rage Pro Turbo",
+"		1002 0044  Rage Pro Turbo",
+"		1002 0080  Rage Pro Turbo",
+"		1002 0084  Rage Pro Turbo",
+"		1002 4750  Rage Pro Turbo",
+"	4751  3D Rage Pro 215GQ",
+"	4752  Rage XL",
+"		0e11 001e  Proliant Rage XL",
+"		1002 0008  Rage XL",
+"		1002 4752  Proliant Rage XL",
+"		1002 8008  Rage XL",
+"		1028 00ce  PowerEdge 1400",
+"		1028 00d1  PowerEdge 2550",
+"		1028 00d9  PowerEdge 2500",
+"		1028 0134  Poweredge SC600",
+"		103c 10e1  NetServer Rage XL",
+"		1734 007a  Primergy RX300",
+"		8086 3411  SDS2 Mainboard",
+"		8086 3427  S875WP1-E mainboard",
+"	4753  Rage XC",
+"		1002 4753  Rage XC",
+"	4754  3D Rage I/II 215GT [Mach64 GT]",
+"	4755  3D Rage II+ 215GTB [Mach64 GTB]",
+"	4756  3D Rage IIC 215IIC [Mach64 GT IIC]",
+"		1002 4756  Rage IIC",
+"	4757  3D Rage IIC AGP",
+"		1002 4757  Rage IIC AGP",
+"		1028 0089  Rage 3D IIC",
+"		1028 008e  PowerEdge 1300 onboard video",
+"		1028 4082  Rage 3D IIC",
+"		1028 8082  Rage 3D IIC",
+"		1028 c082  Rage 3D IIC",
+"	4758  210888GX [Mach64 GX]",
+"	4759  3D Rage IIC",
+"	475a  3D Rage IIC AGP",
+"		1002 0084  Rage 3D Pro AGP 2x XPERT 98",
+"		1002 0087  Rage 3D IIC",
+"		1002 475a  Rage IIC AGP",
+"	4964  Radeon RV250 Id [Radeon 9000]",
+"	4965  Radeon RV250 Ie [Radeon 9000]",
+"	4966  Radeon RV250 If [Radeon 9000]",
+"		10f1 0002  RV250 If [Tachyon G9000 PRO]",
+"		148c 2039  RV250 If [Radeon 9000 Pro 'Evil Commando']",
+"		1509 9a00  RV250 If [Radeon 9000 'AT009']",
+"		1681 0040  RV250 If [3D prophet 9000]",
+"		174b 7176  RV250 If [Sapphire Radeon 9000 Pro]",
+"		174b 7192  RV250 If [Radeon 9000 'Atlantis']",
+"		17af 2005  RV250 If [Excalibur Radeon 9000 Pro]",
+"		17af 2006  RV250 If [Excalibur Radeon 9000]",
+"	4967  Radeon RV250 Ig [Radeon 9000]",
+"	496e  Radeon RV250 [Radeon 9000] (Secondary)",
+"	4a48  R420 JH [Radeon X800]",
+"	4a49  R420 JI [Radeon X800PRO]",
+"	4a4a  R420 JJ [Radeon X800SE]",
+"	4a4b  R420 JK [Radeon X800]",
+"	4a4c  R420 JL [Radeon X800]",
+"	4a4d  R420 JM [FireGL X3]",
+"	4a4e  M18 JN [Radeon Mobility 9800]",
+"	4a50  R420 JP [Radeon X800XT]",
+"	4a70  R420 [X800XT-PE] (Secondary)",
+"	4b49  R480 [Radeon X850XT]",
+"	4b4b  R480 [Radeon X850Pro]",
+"	4b4c  R481 [Radeon X850XT-PE]",
+"	4b69  R480 [Radeon X850XT] (Secondary)",
+"	4b6b  R480 [Radeon X850Pro] (Secondary)",
+"	4b6c  R481 [Radeon X850XT-PE] (Secondary)",
+"	4c42  3D Rage LT Pro AGP-133",
+"		0e11 b0e7  Rage LT Pro (Compaq Presario 5240)",
+"		0e11 b0e8  Rage 3D LT Pro",
+"		0e11 b10e  3D Rage LT Pro (Compaq Armada 1750)",
+"		1002 0040  Rage LT Pro AGP 2X",
+"		1002 0044  Rage LT Pro AGP 2X",
+"		1002 4c42  Rage LT Pro AGP 2X",
+"		1002 8001  Rage LT Pro AGP 2X",
+"		1028 0085  Rage 3D LT Pro",
+"	4c44  3D Rage LT Pro AGP-66",
+"	4c45  Rage Mobility M3 AGP",
+"	4c46  Rage Mobility M3 AGP 2x",
+"		1028 00b1  Latitude C600",
+"	4c47  3D Rage LT-G 215LG",
+"	4c49  3D Rage LT Pro",
+"		1002 0004  Rage LT Pro",
+"		1002 0040  Rage LT Pro",
+"		1002 0044  Rage LT Pro",
+"		1002 4c49  Rage LT Pro",
+"	4c4d  Rage Mobility P/M AGP 2x",
+"		0e11 b111  Armada M700",
+"		0e11 b160  Armada E500",
+"		1002 0084  Xpert 98 AGP 2X (Mobility)",
+"		1014 0154  ThinkPad A20m/A21m",
+"		1028 00aa  Latitude CPt",
+"		1028 00bb  Latitude CPx",
+"		10e1 10cf  Fujitsu Siemens LifeBook C Series",
+"		1179 ff00  Satellite 1715XCDS laptop",
+"		13bd 1019  PC-AR10",
+"	4c4e  Rage Mobility L AGP 2x",
+"	4c50  3D Rage LT Pro",
+"		1002 4c50  Rage LT Pro",
+"	4c51  3D Rage LT Pro",
+"	4c52  Rage Mobility P/M",
+"		1033 8112  Versa Note VXi",
+"	4c53  Rage Mobility L",
+"	4c54  264LT [Mach64 LT]",
+"	4c57  Radeon Mobility M7 LW [Radeon Mobility 7500]",
+"		1014 0517  ThinkPad T30",
+"		1028 00e6  Radeon Mobility M7 LW (Dell Inspiron 8100)",
+"		1028 012a  Latitude C640",
+"		144d c006  Radeon Mobility M7 LW in vpr Matrix 170B4",
+"	4c58  Radeon RV200 LX [Mobility FireGL 7800 M7]",
+"	4c59  Radeon Mobility M6 LY",
+"		0e11 b111  Evo N600c",
+"		1014 0235  ThinkPad A30/A30p (2652/2653)",
+"		1014 0239  ThinkPad X22/X23/X24",
+"		104d 80e7  VAIO PCG-GR214EP/GR214MP/GR215MP/GR314MP/GR315MP",
+"		104d 8140  PCG-Z1SP laptop",
+"		1509 1930  Medion MD9703",
+"	4c5a  Radeon Mobility M6 LZ",
+"	4c64  Radeon R250 Ld [Radeon Mobility 9000 M9]",
+"	4c65  Radeon R250 Le [Radeon Mobility 9000 M9]",
+"	4c66  Radeon R250 [Radeon Mobility 9200]",
+"	4c67  Radeon R250 Lg [Radeon Mobility 9000 M9]",
+"	4c6e  Radeon R250 Ln [Radeon Mobility 9000 M9] [Secondary]",
+"	4d46  Rage Mobility M4 AGP",
+"	4d4c  Rage Mobility M4 AGP",
+"	4e44  Radeon R300 ND [Radeon 9700 Pro]",
+"		1002 515e  Radeon ES1000",
+"		1002 5965  Radeon ES1000",
+"	4e45  Radeon R300 NE [Radeon 9500 Pro]",
+"		1002 0002  Radeon R300 NE [Radeon 9500 Pro]",
+"		1681 0002  Hercules 3D Prophet 9500 PRO [Radeon 9500 Pro]",
+"	4e46  RV350 NF [Radeon 9600]",
+"	4e47  Radeon R300 NG [FireGL X1]",
+"	4e48  Radeon R350 [Radeon 9800 Pro]",
+"	4e49  Radeon R350 [Radeon 9800]",
+"	4e4a  RV350 NJ [Radeon 9800 XT]",
+"	4e4b  R350 NK [Fire GL X2]",
+"	4e50  RV350 [Mobility Radeon 9600 M10]",
+"		1025 005a  TravelMate 290",
+"		103c 088c  NC8000 laptop",
+"		103c 0890  NC6000 laptop",
+"		1462 0311  MSI M510A",
+"		1734 1055  Amilo M1420W",
+"	4e51  M10 NQ [Radeon Mobility 9600]",
+"	4e52  RV350 [Mobility Radeon 9600 M10]",
+"	4e53  M10 NS [Radeon Mobility 9600]",
+"	4e54  M10 NT [FireGL Mobility T2]",
+"	4e56  M11 NV [FireGL Mobility T2e]",
+"	4e64  Radeon R300 [Radeon 9700 Pro] (Secondary)",
+"	4e65  Radeon R300 [Radeon 9500 Pro] (Secondary)",
+"		1002 0003  Radeon R300 NE [Radeon 9500 Pro]",
+"		1681 0003  Hercules 3D Prophet 9500 PRO [Radeon 9500 Pro] (Secondary)",
+"	4e66  RV350 NF [Radeon 9600] (Secondary)",
+"	4e67  Radeon R300 [FireGL X1] (Secondary)",
+"	4e68  Radeon R350 [Radeon 9800 Pro] (Secondary)",
+"	4e69  Radeon R350 [Radeon 9800] (Secondary)",
+"	4e6a  RV350 NJ [Radeon 9800 XT] (Secondary)",
+"		1002 4e71  ATI Technologies Inc M10 NQ [Radeon Mobility 9600]",
+"	4e71  M10 NQ [Radeon Mobility 9600] (Secondary)",
+"	4f72  RV250 [Radeon 9000 Series]",
+"	4f73  Radeon RV250 [Radeon 9000 Series] (Secondary)",
+"	5041  Rage 128 PA/PRO",
+"	5042  Rage 128 PB/PRO AGP 2x",
+"	5043  Rage 128 PC/PRO AGP 4x",
+"	5044  Rage 128 PD/PRO TMDS",
+"		1002 0028  Rage 128 AIW",
+"		1002 0029  Rage 128 AIW",
+"	5045  Rage 128 PE/PRO AGP 2x TMDS",
+"	5046  Rage 128 PF/PRO AGP 4x TMDS",
+"		1002 0004  Rage Fury Pro",
+"		1002 0008  Rage Fury Pro/Xpert 2000 Pro",
+"		1002 0014  Rage Fury Pro",
+"		1002 0018  Rage Fury Pro/Xpert 2000 Pro",
+"		1002 0028  Rage 128 Pro AIW AGP",
+"		1002 002a  Rage 128 Pro AIW AGP",
+"		1002 0048  Rage Fury Pro",
+"		1002 2000  Rage Fury MAXX AGP 4x (TMDS) (VGA device)",
+"		1002 2001  Rage Fury MAXX AGP 4x (TMDS) (Extra device\?!)",
+"	5047  Rage 128 PG/PRO",
+"	5048  Rage 128 PH/PRO AGP 2x",
+"	5049  Rage 128 PI/PRO AGP 4x",
+"	504a  Rage 128 PJ/PRO TMDS",
+"	504b  Rage 128 PK/PRO AGP 2x TMDS",
+"	504c  Rage 128 PL/PRO AGP 4x TMDS",
+"	504d  Rage 128 PM/PRO",
+"	504e  Rage 128 PN/PRO AGP 2x",
+"	504f  Rage 128 PO/PRO AGP 4x",
+"	5050  Rage 128 PP/PRO TMDS [Xpert 128]",
+"		1002 0008  Xpert 128",
+"	5051  Rage 128 PQ/PRO AGP 2x TMDS",
+"	5052  Rage 128 PR/PRO AGP 4x TMDS",
+"	5053  Rage 128 PS/PRO",
+"	5054  Rage 128 PT/PRO AGP 2x",
+"	5055  Rage 128 PU/PRO AGP 4x",
+"	5056  Rage 128 PV/PRO TMDS",
+"	5057  Rage 128 PW/PRO AGP 2x TMDS",
+"	5058  Rage 128 PX/PRO AGP 4x TMDS",
+"	5144  Radeon R100 QD [Radeon 7200]",
+"		1002 0008  Radeon 7000/Radeon VE",
+"		1002 0009  Radeon 7000/Radeon",
+"		1002 000a  Radeon 7000/Radeon",
+"		1002 001a  Radeon 7000/Radeon",
+"		1002 0029  Radeon AIW",
+"		1002 0038  Radeon 7000/Radeon",
+"		1002 0039  Radeon 7000/Radeon",
+"		1002 008a  Radeon 7000/Radeon",
+"		1002 00ba  Radeon 7000/Radeon",
+"		1002 0139  Radeon 7000/Radeon",
+"		1002 028a  Radeon 7000/Radeon",
+"		1002 02aa  Radeon AIW",
+"		1002 053a  Radeon 7000/Radeon",
+"	5145  Radeon R100 QE",
+"	5146  Radeon R100 QF",
+"	5147  Radeon R100 QG",
+"	5148  Radeon R200 QH [Radeon 8500]",
+"		1002 010a  FireGL 8800 64Mb",
+"		1002 0152  FireGL 8800 128Mb",
+"		1002 0162  FireGL 8700 32Mb",
+"		1002 0172  FireGL 8700 64Mb",
+"	5149  Radeon R200 QI",
+"	514a  Radeon R200 QJ",
+"	514b  Radeon R200 QK",
+"	514c  Radeon R200 QL [Radeon 8500 LE]",
+"		1002 003a  Radeon R200 QL [Radeon 8500 LE]",
+"		1002 013a  Radeon 8500",
+"		148c 2026  R200 QL [Radeon 8500 Evil Master II Multi Display Edition]",
+"		1681 0010  Radeon 8500 [3D Prophet 8500 128Mb]",
+"		174b 7149  Radeon R200 QL [Sapphire Radeon 8500 LE]",
+"	514d  Radeon R200 QM [Radeon 9100]",
+"	514e  Radeon R200 QN [Radeon 8500LE]",
+"	514f  Radeon R200 QO [Radeon 8500LE]",
+"	5154  R200 QT [Radeon 8500]",
+"	5155  R200 QU [Radeon 9100]",
+"	5157  Radeon RV200 QW [Radeon 7500]",
+"		1002 013a  Radeon 7500",
+"		1002 103a  Dell Optiplex GX260",
+"		1458 4000  RV200 QW [RADEON 7500 PRO MAYA AR]",
+"		148c 2024  RV200 QW [Radeon 7500LE Dual Display]",
+"		148c 2025  RV200 QW [Radeon 7500 Evil Master Multi Display Edition]",
+"		148c 2036  RV200 QW [Radeon 7500 PCI Dual Display]",
+"		174b 7146  RV200 QW [Radeon 7500 LE]",
+"		174b 7147  RV200 QW [Sapphire Radeon 7500LE]",
+"		174b 7161  Radeon RV200 QW [Radeon 7500 LE]",
+"		17af 0202  RV200 QW [Excalibur Radeon 7500LE]",
+"	5158  Radeon RV200 QX [Radeon 7500]",
+"	5159  Radeon RV100 QY [Radeon 7000/VE]",
+"		1002 000a  Radeon 7000/Radeon VE",
+"		1002 000b  Radeon 7000",
+"		1002 0038  Radeon 7000/Radeon VE",
+"		1002 003a  Radeon 7000/Radeon VE",
+"		1002 00ba  Radeon 7000/Radeon VE",
+"		1002 013a  Radeon 7000/Radeon VE",
+"		1002 0908  XVR-100 (supplied by Sun)",
+"		1014 029a  Remote Supervisor Adapter II (RSA2)",
+"		1014 02c8  IBM eServer xSeries server mainboard",
+"		1028 019a  PowerEdge SC1425",
+"		1458 4002  RV100 QY [RADEON 7000 PRO MAYA AV Series]",
+"		148c 2003  RV100 QY [Radeon 7000 Multi-Display Edition]",
+"		148c 2023  RV100 QY [Radeon 7000 Evil Master Multi-Display]",
+"		174b 7112  RV100 QY [Sapphire Radeon VE 7000]",
+"		174b 7c28  Sapphire Radeon VE 7000 DDR",
+"		1787 0202  RV100 QY [Excalibur Radeon 7000]",
+"	515a  Radeon RV100 QZ [Radeon 7000/VE]",
+"	515e  ES1000",
+"	515f  ES1000",
+"	5168  Radeon R200 Qh",
+"	5169  Radeon R200 Qi",
+"	516a  Radeon R200 Qj",
+"	516b  Radeon R200 Qk",
+"	516c  Radeon R200 Ql",
+"	5245  Rage 128 RE/SG",
+"		1002 0008  Xpert 128",
+"		1002 0028  Rage 128 AIW",
+"		1002 0029  Rage 128 AIW",
+"		1002 0068  Rage 128 AIW",
+"	5246  Rage 128 RF/SG AGP",
+"		1002 0004  Magnum/Xpert 128/Xpert 99",
+"		1002 0008  Magnum/Xpert128/X99/Xpert2000",
+"		1002 0028  Rage 128 AIW AGP",
+"		1002 0044  Rage Fury/Xpert 128/Xpert 2000",
+"		1002 0068  Rage 128 AIW AGP",
+"		1002 0448  Rage Fury",
+"	5247  Rage 128 RG",
+"	524b  Rage 128 RK/VR",
+"	524c  Rage 128 RL/VR AGP",
+"		1002 0008  Xpert 99/Xpert 2000",
+"		1002 0088  Xpert 99",
+"	5345  Rage 128 SE/4x",
+"	5346  Rage 128 SF/4x AGP 2x",
+"		1002 0048  RAGE 128 16MB VGA TVOUT AMC PAL",
+"	5347  Rage 128 SG/4x AGP 4x",
+"	5348  Rage 128 SH",
+"	534b  Rage 128 SK/4x",
+"	534c  Rage 128 SL/4x AGP 2x",
+"	534d  Rage 128 SM/4x AGP 4x",
+"		1002 0008  Xpert 99/Xpert 2000",
+"		1002 0018  Xpert 2000",
+"	534e  Rage 128 4x",
+"	5354  Mach 64 VT",
+"		1002 5654  Mach 64 reference",
+"	5446  Rage 128 Pro Ultra TF",
+"		1002 0004  Rage Fury Pro",
+"		1002 0008  Rage Fury Pro/Xpert 2000 Pro",
+"		1002 0018  Rage Fury Pro/Xpert 2000 Pro",
+"		1002 0028  Rage 128 AIW Pro AGP",
+"		1002 0029  Rage 128 AIW",
+"		1002 002a  Rage 128 AIW Pro AGP",
+"		1002 002b  Rage 128 AIW",
+"		1002 0048  Xpert 2000 Pro",
+"	544c  Rage 128 Pro Ultra TL",
+"	5452  Rage 128 Pro Ultra TR",
+"		1002 001c  Rage 128 Pro 4XL",
+"		103c 1279  Rage 128 Pro 4XL",
+"	5453  Rage 128 Pro Ultra TS",
+"	5454  Rage 128 Pro Ultra TT",
+"	5455  Rage 128 Pro Ultra TU",
+"	5460  M22 [Radeon Mobility M300]",
+"	5462  M24 [Radeon Mobility X600]",
+"	5464  M22 [FireGL GL]",
+"	5548  R423 UH [Radeon X800 (PCIE)]",
+"	5549  R423 UI [Radeon X800PRO (PCIE)]",
+"	554a  R423 UJ [Radeon X800LE (PCIE)]",
+"	554b  R423 UK [Radeon X800SE (PCIE)]",
+"	554d  R430 [Radeon X800 XL] (PCIe)",
+"	554f  R430 [Radeon X800 (PCIE)]",
+"	5550  R423 [Fire GL V7100]",
+"	5551  R423 UQ [FireGL V7200 (PCIE)]",
+"	5552  R423 UR [FireGL V5100 (PCIE)]",
+"	5554  R423 UT [FireGL V7100 (PCIE)]",
+"	556b  Radeon R423 UK (PCIE) [X800 SE] (Secondary)",
+"	556d  R430 [Radeon X800 XL] (PCIe) Secondary",
+"	556f  R430 [Radeon X800 (PCIE) Secondary]",
+"	564a  M26 [Mobility FireGL V5000]",
+"	564b  M26 [Mobility FireGL V5000]",
+"	564f  M26 [Radeon Mobility X700 XL] (PCIE)",
+"	5652  M26 [Radeon Mobility X700]",
+"	5653  Radeon Mobility X700 (PCIE)",
+"		1025 0080  Aspire 5024WLMi",
+"	5654  264VT [Mach64 VT]",
+"		1002 5654  Mach64VT Reference",
+"	5655  264VT3 [Mach64 VT3]",
+"	5656  264VT4 [Mach64 VT4]",
+"	5830  RS300 Host Bridge",
+"	5831  RS300 Host Bridge",
+"	5832  RS300 Host Bridge",
+"	5833  Radeon 9100 IGP Host Bridge",
+"	5834  Radeon 9100 IGP",
+"	5835  RS300M AGP [Radeon Mobility 9100IGP]",
+"	5838  Radeon 9100 IGP AGP Bridge",
+"	5940  RV280 [Radeon 9200 PRO] (Secondary)",
+"	5941  RV280 [Radeon 9200] (Secondary)",
+"		1458 4019  Gigabyte Radeon 9200",
+"		174b 7c12  Sapphire Radeon 9200",
+"		17af 200d  Excalibur Radeon 9200",
+"		18bc 0050  GeXcube GC-R9200-C3 (Secondary)",
+"	5944  RV280 [Radeon 9200 SE (PCI)]",
+"	5950  RS480 Host Bridge",
+"		1025 0080  Aspire 5024WLMMi",
+"		103c 308b  MX6125",
+"	5951  ATI Radeon Xpress 200 (RS480/RS482/RX480/RX482) Chipset - Host bridge",
+"	5954  RS480 [Radeon Xpress 200G Series]",
+"		1002 5954  RV370 [Radeon Xpress 200G Series]",
+"	5955  ATI Radeon XPRESS 200M 5955 (PCIE)",
+"		1002 5955  RS480 0x5955 [ATI Radeon XPRESS 200M 5955 (PCIE)]",
+"		103c 308b  MX6125",
+"	5960  RV280 [Radeon 9200 PRO]",
+"	5961  RV280 [Radeon 9200]",
+"		1002 2f72  All-in-Wonder 9200 Series",
+"		1019 4c30  Radeon 9200 VIVO",
+"		12ab 5961  YUAN SMARTVGA Radeon 9200",
+"		1458 4018  Gigabyte Radeon 9200",
+"		174b 7c13  Sapphire Radeon 9200",
+"		17af 200c  Excalibur Radeon 9200",
+"		18bc 0050  Radeon 9200 Game Buster",
+"		18bc 0051  GeXcube GC-R9200-C3",
+"		18bc 0053  Radeon 9200 Game Buster VIVO",
+"	5962  RV280 [Radeon 9200]",
+"	5964  RV280 [Radeon 9200 SE]",
+"		1043 c006  ASUS Radeon 9200 SE / TD / 128M",
+"		1458 4018  Radeon 9200 SE",
+"		1458 4032  Radeon 9200 SE 128MB",
+"		147b 6191  R9200SE-DT",
+"		148c 2073  CN-AG92E",
+"		174b 7c13  Sapphire Radeon 9200 SE",
+"		1787 5964  Excalibur 9200SE VIVO 128M",
+"		17af 2012  Radeon 9200 SE Excalibur",
+"		18bc 0170  Sapphire Radeon 9200 SE 128MB Game Buster",
+"		18bc 0173  GC-R9200L(SE)-C3H [Radeon 9200 Game Buster]",
+"	5969  ES1000",
+"	5974  RS482 [Radeon Xpress 200]",
+"	5975  RS482 [Radeon Xpress 200M]",
+"	5a34  RS480 PCI-X Root Port",
+"	5a36  RS480 PCI Bridge",
+"	5a38  RS480 PCI Bridge",
+"	5a39  RS480 PCI Bridge",
+"	5a3f  RS480 PCI Bridge",
+"	5a41  RS400 [Radeon Xpress 200]",
+"	5a42  RS400 [Radeon Xpress 200M]",
+"	5a61  RC410 [Radeon Xpress 200]",
+"	5a62  RC410 [Radeon Xpress 200M]",
+"	5b60  RV370 5B60 [Radeon X300 (PCIE)]",
+"		1043 002a  Extreme AX300SE-X",
+"		1043 032e  Extreme AX300/TD",
+"		1462 0400  RX300SE-TD128E (MS-8940 REV:200)",
+"		1462 0402  RX300SE-TD128E (MS-8940)",
+"	5b62  RV370 5B62 [Radeon X600 (PCIE)]",
+"	5b63  RV370 [Sapphire X550 Silent]",
+"	5b64  RV370 5B64 [FireGL V3100 (PCIE)]",
+"	5b65  RV370 5B65 [FireGL D1100 (PCIE)]",
+"	5b70  RV370 [Radeon X300SE]",
+"		1462 0403  RX300SE-TD128E (MS-8940) (secondary display)",
+"	5b72  Radeon X600(RV380)",
+"	5b73  RV370 secondary [Sapphire X550 Silent]",
+"	5b74  RV370 5B64 [FireGL V3100 (PCIE)] (Secondary)",
+"	5c61  M9+ 5C61 [Radeon Mobility 9200 (AGP)]",
+"	5c63  M9+ 5C63 [Radeon Mobility 9200 (AGP)]",
+"		1002 5c63  Apple iBook G4 2004",
+"	5d44  RV280 [Radeon 9200 SE] (Secondary)",
+"		1458 4019  Radeon 9200 SE (Secondary)",
+"		1458 4032  Radeon 9200 SE 128MB",
+"		174b 7c12  Sapphire Radeon 9200 SE (Secondary)",
+"		1787 5965  Excalibur 9200SE VIVO 128M (Secondary)",
+"		17af 2013  Radeon 9200 SE Excalibur (Secondary)",
+"		18bc 0171  Radeon 9200 SE 128MB Game Buster (Secondary)",
+"		18bc 0172  GC-R9200L(SE)-C3H [Radeon 9200 Game Buster]",
+"	5d48  M28 [Radeon Mobility X800XT]",
+"	5d49  M28 [Mobility FireGL V5100]",
+"	5d4a  Mobility Radeon X800",
+"	5d4d  R480 [Radeon X850XT Platinum (PCIE)]",
+"	5d4f  R480 [Radeon X800 GTO (PCIE)]",
+"	5d52  R480 [Radeon X850XT (PCIE)] (Primary)",
+"		1002 0b12  PowerColor X850XT PCIe Primary",
+"		1002 0b13  PowerColor X850XT PCIe Secondary",
+"	5d57  R423 5F57 [Radeon X800XT (PCIE)]",
+"	5d6d  R480 [Radeon X850XT Platinum (PCIE)] (Secondary)",
+"	5d6f  R480 [Radeon X800 GTO (PCIE)] (Secondary)",
+"	5d72  R480 [Radeon X850XT (PCIE)] (Secondary)",
+"	5d77  R423 5F57 [Radeon X800XT (PCIE)] (Secondary)",
+"	5e48  RV410 [FireGL V5000]",
+"	5e49  RV410 [FireGL V3300]",
+"	5e4a  RV410 [Radeon X700XT]",
+"	5e4b  RV410 [Radeon X700 Pro (PCIE)]",
+"	5e4c  RV410 [Radeon X700SE]",
+"	5e4d  RV410 [Radeon X700 (PCIE)]",
+"		148c 2116  PowerColor Bravo X700",
+"	5e4f  RV410 [Radeon X700]",
+"	5e6b  RV410 [Radeon X700 Pro (PCIE)] Secondary",
+"	5e6d  RV410 [Radeon X700 (PCIE)] (Secondary)",
+"		148c 2117  PowerColor Bravo X700",
+"	5f57  R423 [Radeon X800XT (PCIE)]",
+"	700f  PCI Bridge [IGP 320M]",
+"	7010  PCI Bridge [IGP 340M]",
+"	7100  R520 [Radeon X1800]",
+"	7105  R520 [FireGL]",
+"	7109  R520 [Radeon X1800]",
+"		1002 0322  All-in-Wonder X1800XL",
+"		1002 0d02  Radeon X1800 CrossFire Edition",
+"	7120  R520 [Radeon X1800] (Secondary)",
+"	7129  R520 [Radeon X1800] (Secondary)",
+"		1002 0323  All-in-Wonder X1800XL (Secondary)",
+"		1002 0d03  Radeon X1800 CrossFire Edition (Secondary)",
+"	7142  RV515 [Radeon X1300]",
+"		1002 0322  All-in-Wonder 2006 PCI-E Edition",
+"	7145  Radeon Mobility X1400",
+"	7146  RV515 [Radeon X1300]",
+"		1002 0322  All-in-Wonder 2006 PCI-E Edition",
+"	7149  M52 [ATI Mobility Radeon X1300]",
+"	714a  M52 [ATI Mobility Radeon X1300]",
+"	714b  M52 [ATI Mobility Radeon X1300]",
+"	714c  M52 [ATI Mobility Radeon X1300]",
+"	7162  RV515 [Radeon X1300] (Secondary)",
+"		1002 0323  All-in-Wonder 2006 PCI-E Edition (Secondary)",
+"	7166  RV515 [Radeon X1300] (Secondary)",
+"		1002 0323  All-in-Wonder 2006 PCI-E Edition (Secondary)",
+"	71c0  RV530 [Radeon X1600]",
+"	71c2  RV530 [Radeon X1600]",
+"	71c4  M56GL [ATI Mobility FireGL V5200]",
+"	71c5  M56P [Radeon Mobility X1600]",
+"	71e0  RV530 [Radeon X1600] (Secondary)",
+"	71e2  RV530 [Radeon X1600] (Secondary)",
+"	7833  Radeon 9100 IGP Host Bridge",
+"	7834  Radeon 9100 PRO IGP",
+"	7835  Radeon Mobility 9200 IGP",
+"	7838  Radeon 9100 IGP PCI/AGP Bridge",
+"	7c37  RV350 AQ [Radeon 9600 SE]",
+"	cab0  AGP Bridge [IGP 320M]",
+"	cab2  RS200/RS200M AGP Bridge [IGP 340M]",
+"	cab3  R200 AGP Bridge [Mobility Radeon 7000 IGP]",
+"	cbb2  RS200/RS200M AGP Bridge [IGP 340M]",
+"1003  ULSI Systems",
+"	0201  US201",
+"1004  VLSI Technology Inc",
+"	0005  82C592-FC1",
+"	0006  82C593-FC1",
+"	0007  82C594-AFC2",
+"	0008  82C596/7 [Wildcat]",
+"	0009  82C597-AFC2",
+"	000c  82C541 [Lynx]",
+"	000d  82C543 [Lynx]",
+"	0101  82C532",
+"	0102  82C534 [Eagle]",
+"	0103  82C538",
+"	0104  82C535",
+"	0105  82C147",
+"	0200  82C975",
+"	0280  82C925",
+"	0304  QSound ThunderBird PCI Audio",
+"		1004 0304  QSound ThunderBird PCI Audio",
+"		122d 1206  DSP368 Audio",
+"		1483 5020  XWave Thunder 3D Audio",
+"	0305  QSound ThunderBird PCI Audio Gameport",
+"		1004 0305  QSound ThunderBird PCI Audio Gameport",
+"		122d 1207  DSP368 Audio Gameport",
+"		1483 5021  XWave Thunder 3D Audio Gameport",
+"	0306  QSound ThunderBird PCI Audio Support Registers",
+"		1004 0306  QSound ThunderBird PCI Audio Support Registers",
+"		122d 1208  DSP368 Audio Support Registers",
+"		1483 5022  XWave Thunder 3D Audio Support Registers",
+"	0307  Thunderbird",
+"	0308  Thunderbird",
+"	0702  VAS96011 [Golden Gate II]",
+"	0703  Tollgate",
+"1005  Avance Logic Inc. [ALI]",
+"	2064  ALG2032/2064",
+"	2128  ALG2364A",
+"	2301  ALG2301",
+"	2302  ALG2302",
+"	2364  ALG2364",
+"	2464  ALG2364A",
+"	2501  ALG2564A/25128A",
+"1006  Reply Group",
+"1007  NetFrame Systems Inc",
+"1008  Epson",
+"100a  Phoenix Technologies",
+"100b  National Semiconductor Corporation",
+"	0001  DP83810",
+"	0002  87415/87560 IDE",
+"	000e  87560 Legacy I/O",
+"	000f  FireWire Controller",
+"	0011  NS87560 National PCI System I/O",
+"	0012  USB Controller",
+"	0020  DP83815 (MacPhyter) Ethernet Controller",
+"		103c 0024  Pavilion ze4400 builtin Network",
+"		12d9 000c  Aculab E1/T1 PMXc cPCI carrier card",
+"		1385 f311  FA311 / FA312 (FA311 with WoL HW)",
+"	0021  PC87200 PCI to ISA Bridge",
+"	0022  DP83820 10/100/1000 Ethernet Controller",
+"	0028  Geode GX2 Host Bridge",
+"	002a  CS5535 South Bridge",
+"	002b  CS5535 ISA bridge",
+"	002d  CS5535 IDE",
+"	002e  CS5535 Audio",
+"	002f  CS5535 USB",
+"	0030  Geode GX2 Graphics Processor",
+"	0035  DP83065 [Saturn] 10/100/1000 Ethernet Controller",
+"	0500  SCx200 Bridge",
+"	0501  SCx200 SMI",
+"	0502  SCx200 IDE",
+"	0503  SCx200 Audio",
+"	0504  SCx200 Video",
+"	0505  SCx200 XBus",
+"	0510  SC1100 Bridge",
+"	0511  SC1100 SMI",
+"	0515  SC1100 XBus",
+"	d001  87410 IDE",
+"100c  Tseng Labs Inc",
+"	3202  ET4000/W32p rev A",
+"	3205  ET4000/W32p rev B",
+"	3206  ET4000/W32p rev C",
+"	3207  ET4000/W32p rev D",
+"	3208  ET6000",
+"	4702  ET6300",
+"100d  AST Research Inc",
+"100e  Weitek",
+"	9000  P9000 Viper",
+"	9001  P9000 Viper",
+"	9002  P9000 Viper",
+"	9100  P9100 Viper Pro/SE",
+"1010  Video Logic, Ltd.",
+"1011  Digital Equipment Corporation",
+"	0001  DECchip 21050",
+"	0002  DECchip 21040 [Tulip]",
+"	0004  DECchip 21030 [TGA]",
+"	0007  NVRAM [Zephyr NVRAM]",
+"	0008  KZPSA [KZPSA]",
+"	0009  DECchip 21140 [FasterNet]",
+"		1025 0310  21140 Fast Ethernet",
+"		10b8 2001  SMC9332BDT EtherPower 10/100",
+"		10b8 2002  SMC9332BVT EtherPower T4 10/100",
+"		10b8 2003  SMC9334BDT EtherPower 10/100 (1-port)",
+"		1109 2400  ANA-6944A/TX Fast Ethernet",
+"		1112 2300  RNS2300 Fast Ethernet",
+"		1112 2320  RNS2320 Fast Ethernet",
+"		1112 2340  RNS2340 Fast Ethernet",
+"		1113 1207  EN-1207-TX Fast Ethernet",
+"		1186 1100  DFE-500TX Fast Ethernet",
+"		1186 1112  DFE-570TX Fast Ethernet",
+"		1186 1140  DFE-660 Cardbus Ethernet 10/100",
+"		1186 1142  DFE-660 Cardbus Ethernet 10/100",
+"		11f6 0503  Freedomline Fast Ethernet",
+"		1282 9100  AEF-380TXD Fast Ethernet",
+"		1385 1100  FA310TX Fast Ethernet",
+"		2646 0001  KNE100TX Fast Ethernet",
+"	000a  21230 Video Codec",
+"	000d  PBXGB [TGA2]",
+"	000f  PCI-to-PDQ Interface Chip [PFI]",
+"		1011 def1  FDDI controller (DEFPA)",
+"		103c def1  FDDI controller (3X-DEFPA)",
+"	0014  DECchip 21041 [Tulip Pass 3]",
+"		1186 0100  DE-530+",
+"	0016  DGLPB [OPPO]",
+"	0017  PV-PCI Graphics Controller (ZLXp-L)",
+"	0019  DECchip 21142/43",
+"		1011 500a  DE500A Fast Ethernet",
+"		1011 500b  DE500B Fast Ethernet",
+"		1014 0001  10/100 EtherJet Cardbus",
+"		1025 0315  ALN315 Fast Ethernet",
+"		1033 800c  PC-9821-CS01 100BASE-TX Interface Card",
+"		1033 800d  PC-9821NR-B06 100BASE-TX Interface Card",
+"		108d 0016  Rapidfire 2327 10/100 Ethernet",
+"		108d 0017  GoCard 2250 Ethernet 10/100 Cardbus",
+"		10b8 2005  SMC8032DT Extreme Ethernet 10/100",
+"		10b8 8034  SMC8034 Extreme Ethernet 10/100",
+"		10ef 8169  Cardbus Fast Ethernet",
+"		1109 2a00  ANA-6911A/TX Fast Ethernet",
+"		1109 2b00  ANA-6911A/TXC Fast Ethernet",
+"		1109 3000  ANA-6922/TX Fast Ethernet",
+"		1113 1207  Cheetah Fast Ethernet",
+"		1113 2220  Cardbus Fast Ethernet",
+"		115d 0002  Cardbus Ethernet 10/100",
+"		1179 0203  Fast Ethernet",
+"		1179 0204  Cardbus Fast Ethernet",
+"		1186 1100  DFE-500TX Fast Ethernet",
+"		1186 1101  DFE-500TX Fast Ethernet",
+"		1186 1102  DFE-500TX Fast Ethernet",
+"		1186 1112  DFE-570TX Quad Fast Ethernet",
+"		1259 2800  AT-2800Tx Fast Ethernet",
+"		1266 0004  Eagle Fast EtherMAX",
+"		12af 0019  NetFlyer Cardbus Fast Ethernet",
+"		1374 0001  Cardbus Ethernet Card 10/100",
+"		1374 0002  Cardbus Ethernet Card 10/100",
+"		1374 0007  Cardbus Ethernet Card 10/100",
+"		1374 0008  Cardbus Ethernet Card 10/100",
+"		1385 2100  FA510",
+"		1395 0001  10/100 Ethernet CardBus PC Card",
+"		13d1 ab01  EtherFast 10/100 Cardbus (PCMPC200)",
+"		14cb 0100  LNDL-100N 100Base-TX Ethernet PC Card",
+"		8086 0001  EtherExpress PRO/100 Mobile CardBus 32",
+"	001a  Farallon PN9000SX Gigabit Ethernet",
+"	0021  DECchip 21052",
+"	0022  DECchip 21150",
+"	0023  DECchip 21150",
+"	0024  DECchip 21152",
+"	0025  DECchip 21153",
+"	0026  DECchip 21154",
+"	0034  56k Modem Cardbus",
+"		1374 0003  56k Modem Cardbus",
+"	0045  DECchip 21553",
+"	0046  DECchip 21554",
+"		0e11 4050  Integrated Smart Array",
+"		0e11 4051  Integrated Smart Array",
+"		0e11 4058  Integrated Smart Array",
+"		103c 10c2  Hewlett-Packard NetRAID-4M",
+"		12d9 000a  IP Telephony card",
+"		4c53 1050  CT7 mainboard",
+"		4c53 1051  CE7 mainboard",
+"		9005 0364  5400S (Mustang)",
+"		9005 0365  5400S (Mustang)",
+"		9005 1364  Dell PowerEdge RAID Controller 2",
+"		9005 1365  Dell PowerEdge RAID Controller 2",
+"		e4bf 1000  CC8-1-BLUES",
+"	1065  StrongARM DC21285",
+"		1069 0020  DAC960P / DAC1164P",
+"1012  Micronics Computers Inc",
+"1013  Cirrus Logic",
+"	0038  GD 7548",
+"	0040  GD 7555 Flat Panel GUI Accelerator",
+"	004c  GD 7556 Video/Graphics LCD/CRT Ctrlr",
+"	00a0  GD 5430/40 [Alpine]",
+"	00a2  GD 5432 [Alpine]",
+"	00a4  GD 5434-4 [Alpine]",
+"	00a8  GD 5434-8 [Alpine]",
+"	00ac  GD 5436 [Alpine]",
+"	00b0  GD 5440",
+"	00b8  GD 5446",
+"	00bc  GD 5480",
+"		1013 00bc  CL-GD5480",
+"	00d0  GD 5462",
+"	00d2  GD 5462 [Laguna I]",
+"	00d4  GD 5464 [Laguna]",
+"	00d5  GD 5464 BD [Laguna]",
+"	00d6  GD 5465 [Laguna]",
+"		13ce 8031  Barco Metheus 2 Megapixel, Dual Head",
+"		13cf 8031  Barco Metheus 2 Megapixel, Dual Head",
+"	00e8  GD 5436U",
+"	1100  CL 6729",
+"	1110  PD 6832 PCMCIA/CardBus Ctrlr",
+"	1112  PD 6834 PCMCIA/CardBus Ctrlr",
+"	1113  PD 6833 PCMCIA/CardBus Ctrlr",
+"	1200  GD 7542 [Nordic]",
+"	1202  GD 7543 [Viking]",
+"	1204  GD 7541 [Nordic Light]",
+"	4000  MD 5620 [CLM Data Fax Voice]",
+"	4400  CD 4400",
+"	6001  CS 4610/11 [CrystalClear SoundFusion Audio Accelerator]",
+"		1014 1010  CS4610 SoundFusion Audio Accelerator",
+"	6003  CS 4614/22/24 [CrystalClear SoundFusion Audio Accelerator]",
+"		1013 4280  Crystal SoundFusion PCI Audio Accelerator",
+"		1014 0153  ThinkPad A20m",
+"		153b 1136  SiXPack 5.1+",
+"		1681 0050  Game Theater XP",
+"		1681 a011  Fortissimo III 7.1",
+"	6004  CS 4614/22/24 [CrystalClear SoundFusion Audio Accelerator]",
+"	6005  Crystal CS4281 PCI Audio",
+"		1013 4281  Crystal CS4281 PCI Audio",
+"		10cf 10a8  Crystal CS4281 PCI Audio",
+"		10cf 10a9  Crystal CS4281 PCI Audio",
+"		10cf 10aa  Crystal CS4281 PCI Audio",
+"		10cf 10ab  Crystal CS4281 PCI Audio",
+"		10cf 10ac  Crystal CS4281 PCI Audio",
+"		10cf 10ad  Crystal CS4281 PCI Audio",
+"		10cf 10b4  Crystal CS4281 PCI Audio",
+"		1179 0001  Crystal CS4281 PCI Audio",
+"		14c0 000c  Crystal CS4281 PCI Audio",
+"1014  IBM",
+"	0002  PCI to MCA Bridge",
+"	0005  Alta Lite",
+"	0007  Alta MP",
+"	000a  Fire Coral",
+"	0017  CPU to PCI Bridge",
+"	0018  TR Auto LANstreamer",
+"	001b  GXT-150P",
+"	001c  Carrera",
+"	001d  82G2675",
+"	0020  GXT1000 Graphics Adapter",
+"	0022  IBM27-82351",
+"	002d  Python",
+"	002e  SCSI RAID Adapter [ServeRAID]",
+"		1014 002e  ServeRAID-3x",
+"		1014 022e  ServeRAID-4H",
+"	0031  2 Port Serial Adapter",
+"		1014 0031  2721 WAN IOA - 2 Port Sync Serial Adapter",
+"	0036  Miami",
+"	0037  82660 CPU to PCI Bridge",
+"	003a  CPU to PCI Bridge",
+"	003c  GXT250P/GXT255P Graphics Adapter",
+"	003e  16/4 Token ring UTP/STP controller",
+"		1014 003e  Token-Ring Adapter",
+"		1014 00cd  Token-Ring Adapter + Wake-On-LAN",
+"		1014 00ce  16/4 Token-Ring Adapter 2",
+"		1014 00cf  16/4 Token-Ring Adapter Special",
+"		1014 00e4  High-Speed 100/16/4 Token-Ring Adapter",
+"		1014 00e5  16/4 Token-Ring Adapter 2 + Wake-On-LAN",
+"		1014 016d  iSeries 2744 Card",
+"	0045  SSA Adapter",
+"	0046  MPIC interrupt controller",
+"	0047  PCI to PCI Bridge",
+"	0048  PCI to PCI Bridge",
+"	0049  Warhead SCSI Controller",
+"	004e  ATM Controller (14104e00)",
+"	004f  ATM Controller (14104f00)",
+"	0050  ATM Controller (14105000)",
+"	0053  25 MBit ATM Controller",
+"	0054  GXT500P/GXT550P Graphics Adapter",
+"	0057  MPEG PCI Bridge",
+"	005c  i82557B 10/100",
+"	005e  GXT800P Graphics Adapter",
+"	007c  ATM Controller (14107c00)",
+"	007d  3780IDSP [MWave]",
+"	008b  EADS PCI to PCI Bridge",
+"	008e  GXT3000P Graphics Adapter",
+"	0090  GXT 3000P",
+"		1014 008e  GXT-3000P",
+"	0091  SSA Adapter",
+"	0095  20H2999 PCI Docking Bridge",
+"	0096  Chukar chipset SCSI controller",
+"		1014 0097  iSeries 2778 DASD IOA",
+"		1014 0098  iSeries 2763 DASD IOA",
+"		1014 0099  iSeries 2748 DASD IOA",
+"	009f  PCI 4758 Cryptographic Accelerator",
+"	00a5  ATM Controller (1410a500)",
+"	00a6  ATM 155MBPS MM Controller (1410a600)",
+"	00b7  256-bit Graphics Rasterizer [Fire GL1]",
+"		1092 00b8  FireGL1 AGP 32Mb",
+"	00b8  GXT2000P Graphics Adapter",
+"	00be  ATM 622MBPS Controller (1410be00)",
+"	00dc  Advanced Systems Management Adapter (ASMA)",
+"	00fc  CPC710 Dual Bridge and Memory Controller (PCI-64)",
+"	0104  Gigabit Ethernet-SX Adapter",
+"	0105  CPC710 Dual Bridge and Memory Controller (PCI-32)",
+"	010f  Remote Supervisor Adapter (RSA)",
+"	0142  Yotta Video Compositor Input",
+"		1014 0143  Yotta Input Controller (ytin)",
+"	0144  Yotta Video Compositor Output",
+"		1014 0145  Yotta Output Controller (ytout)",
+"	0156  405GP PLB to PCI Bridge",
+"	015e  622Mbps ATM PCI Adapter",
+"	0160  64bit/66MHz PCI ATM 155 MMF",
+"	016e  GXT4000P Graphics Adapter",
+"	0170  GXT6000P Graphics Adapter",
+"	017d  GXT300P Graphics Adapter",
+"	0180  Snipe chipset SCSI controller",
+"		1014 0241  iSeries 2757 DASD IOA",
+"		1014 0264  Quad Channel PCI-X U320 SCSI RAID Adapter (2780)",
+"	0188  EADS-X PCI-X to PCI-X Bridge",
+"	01a7  PCI-X to PCI-X Bridge",
+"	01bd  ServeRAID Controller",
+"		1014 01be  ServeRAID-4M",
+"		1014 01bf  ServeRAID-4L",
+"		1014 0208  ServeRAID-4Mx",
+"		1014 020e  ServeRAID-4Lx",
+"		1014 022e  ServeRAID-4H",
+"		1014 0258  ServeRAID-5i",
+"		1014 0259  ServeRAID-5i",
+"	01c1  64bit/66MHz PCI ATM 155 UTP",
+"	01e6  Cryptographic Accelerator",
+"	01ff  10/100 Mbps Ethernet",
+"	0219  Multiport Serial Adapter",
+"		1014 021a  Dual RVX",
+"		1014 0251  Internal Modem/RVX",
+"		1014 0252  Quad Internal Modem",
+"	021b  GXT6500P Graphics Adapter",
+"	021c  GXT4500P Graphics Adapter",
+"	0233  GXT135P Graphics Adapter",
+"	0266  PCI-X Dual Channel SCSI",
+"	0268  Gigabit Ethernet-SX Adapter (PCI-X)",
+"	0269  10/100/1000 Base-TX Ethernet Adapter (PCI-X)",
+"	028c  Citrine chipset SCSI controller",
+"		1014 028d  Dual Channel PCI-X DDR SAS RAID Adapter (572E)",
+"		1014 02be  Dual Channel PCI-X DDR U320 SCSI RAID Adapter (571B)",
+"		1014 02c0  Dual Channel PCI-X DDR U320 SCSI Adapter (571A)",
+"		1014 030d  PCI-X DDR Auxiliary Cache Adapter (575B)",
+"	02a1  Calgary PCI-X Host Bridge",
+"	02bd  Obsidian chipset SCSI controller",
+"		1014 02c1  PCI-X DDR 3Gb SAS Adapter (572A/572C)",
+"		1014 02c2  PCI-X DDR 3Gb SAS RAID Adapter (572B/571D)",
+"	0302  Winnipeg PCI-X Host Bridge",
+"	0314  ZISC 036 Neural accelerator card",
+"	3022  QLA3022 Network Adapter",
+"	4022  QLA3022 Network Adapter",
+"	ffff  MPIC-2 interrupt controller",
+"1015  LSI Logic Corp of Canada",
+"1016  ICL Personal Systems",
+"1017  SPEA Software AG",
+"	5343  SPEA 3D Accelerator",
+"1018  Unisys Systems",
+"1019  Elitegroup Computer Systems",
+"101a  AT&T GIS (NCR)",
+"	0005  100VG ethernet",
+"101b  Vitesse Semiconductor",
+"101c  Western Digital",
+"	0193  33C193A",
+"	0196  33C196A",
+"	0197  33C197A",
+"	0296  33C296A",
+"	3193  7193",
+"	3197  7197",
+"	3296  33C296A",
+"	4296  34C296",
+"	9710  Pipeline 9710",
+"	9712  Pipeline 9712",
+"	c24a  90C",
+"101e  American Megatrends Inc.",
+"	0009  MegaRAID 428 Ultra RAID Controller (rev 03)",
+"	1960  MegaRAID",
+"		101e 0471  MegaRAID 471 Enterprise 1600 RAID Controller",
+"		101e 0475  MegaRAID 475 Express 500/500LC RAID Controller",
+"		101e 0477  MegaRAID 477 Elite 3100 RAID Controller",
+"		101e 0493  MegaRAID 493 Elite 1600 RAID Controller",
+"		101e 0494  MegaRAID 494 Elite 1650 RAID Controller",
+"		101e 0503  MegaRAID 503 Enterprise 1650 RAID Controller",
+"		101e 0511  MegaRAID 511 i4 IDE RAID Controller",
+"		101e 0522  MegaRAID 522 i4133 RAID Controller",
+"		1028 0471  PowerEdge RAID Controller 3/QC",
+"		1028 0475  PowerEdge RAID Controller 3/SC",
+"		1028 0493  PowerEdge RAID Controller 3/DC",
+"		1028 0511  PowerEdge Cost Effective RAID Controller ATA100/4Ch",
+"		103c 60e7  NetRAID-1M",
+"	9010  MegaRAID 428 Ultra RAID Controller",
+"	9030  EIDE Controller",
+"	9031  EIDE Controller",
+"	9032  EIDE & SCSI Controller",
+"	9033  SCSI Controller",
+"	9040  Multimedia card",
+"	9060  MegaRAID 434 Ultra GT RAID Controller",
+"	9063  MegaRAC",
+"		101e 0767  Dell Remote Assistant Card 2",
+"101f  PictureTel",
+"1020  Hitachi Computer Products",
+"1021  OKI Electric Industry Co. Ltd.",
+"1022  Advanced Micro Devices [AMD]",
+"	1100  K8 [Athlon64/Opteron] HyperTransport Technology Configuration",
+"	1101  K8 [Athlon64/Opteron] Address Map",
+"	1102  K8 [Athlon64/Opteron] DRAM Controller",
+"	1103  K8 [Athlon64/Opteron] Miscellaneous Control",
+"	2000  79c970 [PCnet32 LANCE]",
+"		1014 2000  NetFinity 10/100 Fast Ethernet",
+"		1022 2000  PCnet - Fast 79C971",
+"		103c 104c  Ethernet with LAN remote power Adapter",
+"		103c 1064  Ethernet with LAN remote power Adapter",
+"		103c 1065  Ethernet with LAN remote power Adapter",
+"		103c 106c  Ethernet with LAN remote power Adapter",
+"		103c 106e  Ethernet with LAN remote power Adapter",
+"		103c 10ea  Ethernet with LAN remote power Adapter",
+"		1113 1220  EN1220 10/100 Fast Ethernet",
+"		1259 2450  AT-2450 10/100 Fast Ethernet",
+"		1259 2454  AT-2450v4 10Mb Ethernet Adapter",
+"		1259 2700  AT-2700TX 10/100 Fast Ethernet",
+"		1259 2701  AT-2700FX 100Mb Ethernet",
+"		1259 2702  AT-2700FTX 10/100 Mb Fiber/Copper Fast Ethernet",
+"		1259 2703  AT-2701FX",
+"		4c53 1000  CC7/CR7/CP7/VC7/VP7/VR7 mainboard",
+"		4c53 1010  CP5/CR6 mainboard",
+"		4c53 1020  VR6 mainboard",
+"		4c53 1030  PC5 mainboard",
+"		4c53 1040  CL7 mainboard",
+"		4c53 1060  PC7 mainboard",
+"	2001  79c978 [HomePNA]",
+"		1092 0a78  Multimedia Home Network Adapter",
+"		1668 0299  ActionLink Home Network Adapter",
+"	2003  Am 1771 MBW [Alchemy]",
+"	2020  53c974 [PCscsi]",
+"	2040  79c974",
+"	2081  Geode LX Video",
+"	2082  Geode LX AES Security Block",
+"	208f  CS5536 GeodeLink PCI South Bridge",
+"	2090  CS5536 [Geode companion] ISA",
+"	2091  CS5536 [Geode companion] FLASH",
+"	2093  CS5536 [Geode companion] Audio",
+"	2094  CS5536 [Geode companion] OHC",
+"	2095  CS5536 [Geode companion] EHC",
+"	2096  CS5536 [Geode companion] UDC",
+"	2097  CS5536 [Geode companion] UOC",
+"	209a  CS5536 [Geode companion] IDE",
+"	3000  ELanSC520 Microcontroller",
+"	7006  AMD-751 [Irongate] System Controller",
+"	7007  AMD-751 [Irongate] AGP Bridge",
+"	700a  AMD-IGR4 AGP Host to PCI Bridge",
+"	700b  AMD-IGR4 PCI to PCI Bridge",
+"	700c  AMD-760 MP [IGD4-2P] System Controller",
+"	700d  AMD-760 MP [IGD4-2P] AGP Bridge",
+"	700e  AMD-760 [IGD4-1P] System Controller",
+"	700f  AMD-760 [IGD4-1P] AGP Bridge",
+"	7400  AMD-755 [Cobra] ISA",
+"	7401  AMD-755 [Cobra] IDE",
+"	7403  AMD-755 [Cobra] ACPI",
+"	7404  AMD-755 [Cobra] USB",
+"	7408  AMD-756 [Viper] ISA",
+"	7409  AMD-756 [Viper] IDE",
+"	740b  AMD-756 [Viper] ACPI",
+"	740c  AMD-756 [Viper] USB",
+"	7410  AMD-766 [ViperPlus] ISA",
+"	7411  AMD-766 [ViperPlus] IDE",
+"	7413  AMD-766 [ViperPlus] ACPI",
+"	7414  AMD-766 [ViperPlus] USB",
+"	7440  AMD-768 [Opus] ISA",
+"		1043 8044  A7M-D Mainboard",
+"	7441  AMD-768 [Opus] IDE",
+"	7443  AMD-768 [Opus] ACPI",
+"		1043 8044  A7M-D Mainboard",
+"	7445  AMD-768 [Opus] Audio",
+"	7446  AMD-768 [Opus] MC97 Modem (Smart Link HAMR5600 compatible)",
+"	7448  AMD-768 [Opus] PCI",
+"	7449  AMD-768 [Opus] USB",
+"	7450  AMD-8131 PCI-X Bridge",
+"	7451  AMD-8131 PCI-X IOAPIC",
+"	7454  AMD-8151 System Controller",
+"	7455  AMD-8151 AGP Bridge",
+"	7458  AMD-8132 PCI-X Bridge",
+"	7459  AMD-8132 PCI-X IOAPIC",
+"	7460  AMD-8111 PCI",
+"		161f 3017  HDAMB",
+"	7461  AMD-8111 USB",
+"	7462  AMD-8111 Ethernet",
+"	7464  AMD-8111 USB",
+"		161f 3017  HDAMB",
+"	7468  AMD-8111 LPC",
+"		161f 3017  HDAMB",
+"	7469  AMD-8111 IDE",
+"		1022 2b80  AMD-8111 IDE [Quartet]",
+"		161f 3017  HDAMB",
+"	746a  AMD-8111 SMBus 2.0",
+"	746b  AMD-8111 ACPI",
+"		161f 3017  HDAMB",
+"	746d  AMD-8111 AC97 Audio",
+"		161f 3017  HDAMB",
+"	746e  AMD-8111 MC97 Modem",
+"	756b  AMD-8111 ACPI",
+"1023  Trident Microsystems",
+"	0194  82C194",
+"	2000  4DWave DX",
+"	2001  4DWave NX",
+"		122d 1400  Trident PCI288-Q3DII (NX)",
+"	2100  CyberBlade XP4m32",
+"	2200  XGI Volari XP5",
+"	8400  CyberBlade/i7",
+"		1023 8400  CyberBlade i7 AGP",
+"	8420  CyberBlade/i7d",
+"		0e11 b15a  CyberBlade i7 AGP",
+"	8500  CyberBlade/i1",
+"	8520  CyberBlade i1",
+"		0e11 b16e  CyberBlade i1 AGP",
+"		1023 8520  CyberBlade i1 AGP",
+"	8620  CyberBlade/i1",
+"		1014 0502  ThinkPad R30/T30",
+"		1014 1025  Travelmate 352TE",
+"	8820  CyberBlade XPAi1",
+"	9320  TGUI 9320",
+"	9350  GUI Accelerator",
+"	9360  Flat panel GUI Accelerator",
+"	9382  Cyber 9382 [Reference design]",
+"	9383  Cyber 9383 [Reference design]",
+"	9385  Cyber 9385 [Reference design]",
+"	9386  Cyber 9386",
+"	9388  Cyber 9388",
+"	9397  Cyber 9397",
+"	939a  Cyber 9397DVD",
+"	9420  TGUI 9420",
+"	9430  TGUI 9430",
+"	9440  TGUI 9440",
+"	9460  TGUI 9460",
+"	9470  TGUI 9470",
+"	9520  Cyber 9520",
+"	9525  Cyber 9525",
+"		10cf 1094  Lifebook C6155",
+"	9540  Cyber 9540",
+"	9660  TGUI 9660/938x/968x",
+"	9680  TGUI 9680",
+"	9682  TGUI 9682",
+"	9683  TGUI 9683",
+"	9685  ProVIDIA 9685",
+"	9750  3DImage 9750",
+"		1014 9750  3DImage 9750",
+"		1023 9750  3DImage 9750",
+"	9753  TGUI 9753",
+"	9754  TGUI 9754",
+"	9759  TGUI 975",
+"	9783  TGUI 9783",
+"	9785  TGUI 9785",
+"	9850  3DImage 9850",
+"	9880  Blade 3D PCI/AGP",
+"		1023 9880  Blade 3D",
+"	9910  CyberBlade/XP",
+"	9930  CyberBlade/XPm",
+"1024  Zenith Data Systems",
+"1025  Acer Incorporated [ALI]",
+"	1435  M1435",
+"	1445  M1445",
+"	1449  M1449",
+"	1451  M1451",
+"	1461  M1461",
+"	1489  M1489",
+"	1511  M1511",
+"	1512  ALI M1512 Aladdin",
+"	1513  M1513",
+"	1521  ALI M1521 Aladdin III CPU Bridge",
+"		10b9 1521  ALI M1521 Aladdin III CPU Bridge",
+"	1523  ALI M1523 ISA Bridge",
+"		10b9 1523  ALI M1523 ISA Bridge",
+"	1531  M1531 Northbridge [Aladdin IV/IV+]",
+"	1533  M1533 PCI-to-ISA Bridge",
+"		10b9 1533  ALI M1533 Aladdin IV/V ISA South Bridge",
+"	1535  M1535 PCI Bridge + Super I/O + FIR",
+"	1541  M1541 Northbridge [Aladdin V]",
+"		10b9 1541  ALI M1541 Aladdin V/V+ AGP+PCI North Bridge",
+"	1542  M1542 Northbridge [Aladdin V]",
+"	1543  M1543 PCI-to-ISA Bridge + Super I/O + FIR",
+"	1561  M1561 Northbridge [Aladdin 7]",
+"	1621  M1621 Northbridge [Aladdin-Pro II]",
+"	1631  M1631 Northbridge+3D Graphics [Aladdin TNT2]",
+"	1641  M1641 Northbridge [Aladdin-Pro IV]",
+"	1647  M1647 [MaGiK1] PCI North Bridge",
+"	1671  M1671 Northbridge [ALADDiN-P4]",
+"	1672  Northbridge [CyberALADDiN-P4]",
+"	3141  M3141",
+"	3143  M3143",
+"	3145  M3145",
+"	3147  M3147",
+"	3149  M3149",
+"	3151  M3151",
+"	3307  M3307 MPEG-I Video Controller",
+"	3309  M3309 MPEG-II Video w/ Software Audio Decoder",
+"	3321  M3321 MPEG-II Audio/Video Decoder",
+"	5212  M4803",
+"	5215  ALI PCI EIDE Controller",
+"	5217  M5217H",
+"	5219  M5219",
+"	5225  M5225",
+"	5229  M5229",
+"	5235  M5235",
+"	5237  M5237 PCI USB Host Controller",
+"	5240  EIDE Controller",
+"	5241  PCMCIA Bridge",
+"	5242  General Purpose Controller",
+"	5243  PCI to PCI Bridge Controller",
+"	5244  Floppy Disk Controller",
+"	5247  M1541 PCI to PCI Bridge",
+"	5251  M5251 P1394 Controller",
+"	5427  PCI to AGP Bridge",
+"	5451  M5451 PCI AC-Link Controller Audio Device",
+"	5453  M5453 PCI AC-Link Controller Modem Device",
+"	7101  M7101 PCI PMU Power Management Controller",
+"		10b9 7101  M7101 PCI PMU Power Management Controller",
+"1028  Dell",
+"	0001  PowerEdge Expandable RAID Controller 2/Si",
+"		1028 0001  PowerEdge 2400",
+"	0002  PowerEdge Expandable RAID Controller 3/Di",
+"		1028 0002  PowerEdge 4400",
+"	0003  PowerEdge Expandable RAID Controller 3/Si",
+"		1028 0003  PowerEdge 2450",
+"	0006  PowerEdge Expandable RAID Controller 3/Di",
+"	0007  Remote Access Card III",
+"	0008  Remote Access Card III",
+"	0009  Remote Access Card III: BMC/SMIC device not present",
+"	000a  PowerEdge Expandable RAID Controller 3/Di",
+"	000c  Embedded Remote Access or ERA/O",
+"	000d  Embedded Remote Access: BMC/SMIC device",
+"	000e  PowerEdge Expandable RAID controller 4/Di",
+"	000f  PowerEdge Expandable RAID controller 4/Di",
+"	0010  Remote Access Card 4",
+"	0011  Remote Access Card 4 Daughter Card",
+"	0012  Remote Access Card 4 Daughter Card Virtual UART",
+"	0013  PowerEdge Expandable RAID controller 4",
+"		1028 016c  PowerEdge Expandable RAID Controller 4e/Si",
+"		1028 016d  PowerEdge Expandable RAID Controller 4e/Di",
+"		1028 016e  PowerEdge Expandable RAID Controller 4e/Di",
+"		1028 016f  PowerEdge Expandable RAID Controller 4e/Di",
+"		1028 0170  PowerEdge Expandable RAID Controller 4e/Di",
+"	0014  Remote Access Card 4 Daughter Card SMIC interface",
+"	0015  PowerEdge Expandable RAID controller 5",
+"1029  Siemens Nixdorf IS",
+"102a  LSI Logic",
+"	0000  HYDRA",
+"	0010  ASPEN",
+"	001f  AHA-2940U2/U2W /7890/7891 SCSI Controllers",
+"		9005 000f  2940U2W SCSI Controller",
+"		9005 0106  2940U2W SCSI Controller",
+"		9005 a180  2940U2W SCSI Controller",
+"	00c5  AIC-7899 U160/m SCSI Controller",
+"		1028 00c5  PowerEdge 2550/2650/4600",
+"	00cf  AIC-7899P U160/m",
+"		1028 0106  PowerEdge 4600",
+"		1028 0121  PowerEdge 2650",
+"102b  Matrox Graphics, Inc.",
+"	0010  MGA-I [Impression\?]",
+"	0100  MGA 1064SG [Mystique]",
+"	0518  MGA-II [Athena]",
+"	0519  MGA 2064W [Millennium]",
+"	051a  MGA 1064SG [Mystique]",
+"		102b 0100  MGA-1064SG Mystique",
+"		102b 1100  MGA-1084SG Mystique",
+"		102b 1200  MGA-1084SG Mystique",
+"		1100 102b  MGA-1084SG Mystique",
+"		110a 0018  Scenic Pro C5 (D1025)",
+"	051b  MGA 2164W [Millennium II]",
+"		102b 051b  MGA-2164W Millennium II",
+"		102b 1100  MGA-2164W Millennium II",
+"		102b 1200  MGA-2164W Millennium II",
+"	051e  MGA 1064SG [Mystique] AGP",
+"	051f  MGA 2164W [Millennium II] AGP",
+"	0520  MGA G200",
+"		102b dbc2  G200 Multi-Monitor",
+"		102b dbc8  G200 Multi-Monitor",
+"		102b dbe2  G200 Multi-Monitor",
+"		102b dbe8  G200 Multi-Monitor",
+"		102b ff03  Millennium G200 SD",
+"		102b ff04  Marvel G200",
+"	0521  MGA G200 AGP",
+"		1014 ff03  Millennium G200 AGP",
+"		102b 48e9  Mystique G200 AGP",
+"		102b 48f8  Millennium G200 SD AGP",
+"		102b 4a60  Millennium G200 LE AGP",
+"		102b 4a64  Millennium G200 AGP",
+"		102b c93c  Millennium G200 AGP",
+"		102b c9b0  Millennium G200 AGP",
+"		102b c9bc  Millennium G200 AGP",
+"		102b ca60  Millennium G250 LE AGP",
+"		102b ca6c  Millennium G250 AGP",
+"		102b dbbc  Millennium G200 AGP",
+"		102b dbc2  Millennium G200 MMS (Dual G200)",
+"		102b dbc3  G200 Multi-Monitor",
+"		102b dbc8  Millennium G200 MMS (Dual G200)",
+"		102b dbd2  G200 Multi-Monitor",
+"		102b dbd3  G200 Multi-Monitor",
+"		102b dbd4  G200 Multi-Monitor",
+"		102b dbd5  G200 Multi-Monitor",
+"		102b dbd8  G200 Multi-Monitor",
+"		102b dbd9  G200 Multi-Monitor",
+"		102b dbe2  Millennium G200 MMS (Quad G200)",
+"		102b dbe3  G200 Multi-Monitor",
+"		102b dbe8  Millennium G200 MMS (Quad G200)",
+"		102b dbf2  G200 Multi-Monitor",
+"		102b dbf3  G200 Multi-Monitor",
+"		102b dbf4  G200 Multi-Monitor",
+"		102b dbf5  G200 Multi-Monitor",
+"		102b dbf8  G200 Multi-Monitor",
+"		102b dbf9  G200 Multi-Monitor",
+"		102b f806  Mystique G200 Video AGP",
+"		102b ff00  MGA-G200 AGP",
+"		102b ff02  Mystique G200 AGP",
+"		102b ff03  Millennium G200 AGP",
+"		102b ff04  Marvel G200 AGP",
+"		110a 0032  MGA-G200 AGP",
+"	0522  MGA G200e [Pilot] ServerEngines (SEP1)",
+"	0525  MGA G400/G450",
+"		0e11 b16f  MGA-G400 AGP",
+"		102b 0328  Millennium G400 16Mb SDRAM",
+"		102b 0338  Millennium G400 16Mb SDRAM",
+"		102b 0378  Millennium G400 32Mb SDRAM",
+"		102b 0541  Millennium G450 Dual Head",
+"		102b 0542  Millennium G450 Dual Head LX",
+"		102b 0543  Millennium G450 Single Head LX",
+"		102b 0641  Millennium G450 32Mb SDRAM Dual Head",
+"		102b 0642  Millennium G450 32Mb SDRAM Dual Head LX",
+"		102b 0643  Millennium G450 32Mb SDRAM Single Head LX",
+"		102b 07c0  Millennium G450 Dual Head LE",
+"		102b 07c1  Millennium G450 SDR Dual Head LE",
+"		102b 0d41  Millennium G450 Dual Head PCI",
+"		102b 0d42  Millennium G450 Dual Head LX PCI",
+"		102b 0d43  Millennium G450 32Mb Dual Head PCI",
+"		102b 0e00  Marvel G450 eTV",
+"		102b 0e01  Marvel G450 eTV",
+"		102b 0e02  Marvel G450 eTV",
+"		102b 0e03  Marvel G450 eTV",
+"		102b 0f80  Millennium G450 Low Profile",
+"		102b 0f81  Millennium G450 Low Profile",
+"		102b 0f82  Millennium G450 Low Profile DVI",
+"		102b 0f83  Millennium G450 Low Profile DVI",
+"		102b 19d8  Millennium G400 16Mb SGRAM",
+"		102b 19f8  Millennium G400 32Mb SGRAM",
+"		102b 2159  Millennium G400 Dual Head 16Mb",
+"		102b 2179  Millennium G400 MAX/Dual Head 32Mb",
+"		102b 217d  Millennium G400 Dual Head Max",
+"		102b 23c0  Millennium G450",
+"		102b 23c1  Millennium G450",
+"		102b 23c2  Millennium G450 DVI",
+"		102b 23c3  Millennium G450 DVI",
+"		102b 2f58  Millennium G400",
+"		102b 2f78  Millennium G400",
+"		102b 3693  Marvel G400 AGP",
+"		102b 5dd0  4Sight II",
+"		102b 5f50  4Sight II",
+"		102b 5f51  4Sight II",
+"		102b 5f52  4Sight II",
+"		102b 9010  Millennium G400 Dual Head",
+"		1458 0400  GA-G400",
+"		1705 0001  Millennium G450 32MB SGRAM",
+"		1705 0002  Millennium G450 16MB SGRAM",
+"		1705 0003  Millennium G450 32MB",
+"		1705 0004  Millennium G450 16MB",
+"	0527  MGA Parhelia AGP",
+"		102b 0840  Parhelia 128Mb",
+"		102b 0850  Parhelia 256MB AGP 4X",
+"	0528  Parhelia 8X",
+"		102b 1020  Parhelia 128MB",
+"		102b 1030  Parhelia 256 MB Dual DVI",
+"		102b 14e1  Parhelia PCI 256MB",
+"		102b 2021  QID Pro",
+"	0d10  MGA Ultima/Impression",
+"	1000  MGA G100 [Productiva]",
+"		102b ff01  Productiva G100",
+"		102b ff05  Productiva G100 Multi-Monitor",
+"	1001  MGA G100 [Productiva] AGP",
+"		102b 1001  MGA-G100 AGP",
+"		102b ff00  MGA-G100 AGP",
+"		102b ff01  MGA-G100 Productiva AGP",
+"		102b ff03  Millennium G100 AGP",
+"		102b ff04  MGA-G100 AGP",
+"		102b ff05  MGA-G100 Productiva AGP Multi-Monitor",
+"		110a 001e  MGA-G100 AGP",
+"	2007  MGA Mistral",
+"	2527  MGA G550 AGP",
+"		102b 0f83  Millennium G550",
+"		102b 0f84  Millennium G550 Dual Head DDR 32Mb",
+"		102b 1e41  Millennium G550",
+"	2537  Millenium P650/P750",
+"		102b 1820  Millennium P750 64MB",
+"		102b 1830  Millennium P650 64MB",
+"		102b 1c10  QID 128MB",
+"		102b 2811  Millennium P650 Low-profile PCI 64MB",
+"		102b 2c11  QID Low-profile PCI",
+"	2538  Millenium P650 PCIe",
+"		102b 08c7  Millennium P650 PCIe 128MB",
+"		102b 0907  Millennium P650 PCIe 64MB",
+"		102b 1047  Millennium P650 LP PCIe 128MB",
+"		102b 1087  Millennium P650 LP PCIe 64MB",
+"		102b 2538  Parhelia APVe",
+"		102b 3007  QID Low-profile PCIe",
+"	4536  VIA Framegrabber",
+"	6573  Shark 10/100 Multiport SwitchNIC",
+"102c  Chips and Technologies",
+"	00b8  F64310",
+"	00c0  F69000 HiQVideo",
+"		102c 00c0  F69000 HiQVideo",
+"		4c53 1000  CC7/CR7/CP7/VC7/VP7/VR7 mainboard",
+"		4c53 1010  CP5/CR6 mainboard",
+"		4c53 1020  VR6 mainboard",
+"		4c53 1030  PC5 mainboard",
+"		4c53 1050  CT7 mainboard",
+"		4c53 1051  CE7 mainboard",
+"	00d0  F65545",
+"	00d8  F65545",
+"	00dc  F65548",
+"	00e0  F65550",
+"	00e4  F65554",
+"	00e5  F65555 HiQVPro",
+"		0e11 b049  Armada 1700 Laptop Display Controller",
+"		1179 0001  Satellite Pro",
+"	00f0  F68554",
+"	00f4  F68554 HiQVision",
+"	00f5  F68555",
+"	0c30  F69030",
+"		4c53 1000  CC7/CR7/CP7/VC7/VP7/VR7 mainboard",
+"		4c53 1050  CT7 mainboard",
+"		4c53 1051  CE7 mainboard",
+"		4c53 1080  CT8 mainboard",
+"102d  Wyse Technology Inc.",
+"	50dc  3328 Audio",
+"102e  Olivetti Advanced Technology",
+"102f  Toshiba America",
+"	0009  r4x00",
+"	000a  TX3927 MIPS RISC PCI Controller",
+"	0020  ATM Meteor 155",
+"		102f 00f8  ATM Meteor 155",
+"	0030  TC35815CF PCI 10/100 Mbit Ethernet Controller",
+"	0031  TC35815CF PCI 10/100 Mbit Ethernet Controller with WOL",
+"	0105  TC86C001 [goku-s] IDE",
+"	0106  TC86C001 [goku-s] USB 1.1 Host",
+"	0107  TC86C001 [goku-s] USB Device Controller",
+"	0108  TC86C001 [goku-s] I2C/SIO/GPIO Controller",
+"	0180  TX4927/38 MIPS RISC PCI Controller",
+"	0181  TX4925 MIPS RISC PCI Controller",
+"	0182  TX4937 MIPS RISC PCI Controller",
+"1030  TMC Research",
+"1031  Miro Computer Products AG",
+"	5601  DC20 ASIC",
+"	5607  Video I/O & motion JPEG compressor",
+"	5631  Media 3D",
+"	6057  MiroVideo DC10/DC30+",
+"1032  Compaq",
+"1033  NEC Corporation",
+"	0000  Vr4181A USB Host or Function Control Unit",
+"	0001  PCI to 486-like bus Bridge",
+"	0002  PCI to VL98 Bridge",
+"	0003  ATM Controller",
+"	0004  R4000 PCI Bridge",
+"	0005  PCI to 486-like bus Bridge",
+"	0006  PC-9800 Graphic Accelerator",
+"	0007  PCI to UX-Bus Bridge",
+"	0008  PC-9800 Graphic Accelerator",
+"	0009  PCI to PC9800 Core-Graph Bridge",
+"	0016  PCI to VL Bridge",
+"	001a  [Nile II]",
+"	0021  Vrc4373 [Nile I]",
+"	0029  PowerVR PCX1",
+"	002a  PowerVR 3D",
+"	002c  Star Alpha 2",
+"	002d  PCI to C-bus Bridge",
+"	0035  USB",
+"		1033 0035  Hama USB 2.0 CardBus",
+"		1179 0001  USB",
+"		12ee 7000  Root Hub",
+"		14c2 0105  PTI-205N USB 2.0 Host Controller",
+"		1799 0001  Root Hub",
+"		1931 000a  GlobeTrotter Fusion Quad Lite (PPP data)",
+"		1931 000b  GlobeTrotter Fusion Quad Lite (GSM data)",
+"		807d 0035  PCI-USB2 (OHCI subsystem)",
+"	003b  PCI to C-bus Bridge",
+"	003e  NAPCCARD Cardbus Controller",
+"	0046  PowerVR PCX2 [midas]",
+"	005a  Vrc5074 [Nile 4]",
+"	0063  Firewarden",
+"	0067  PowerVR Neon 250 Chipset",
+"		1010 0020  PowerVR Neon 250 AGP 32Mb",
+"		1010 0080  PowerVR Neon 250 AGP 16Mb",
+"		1010 0088  PowerVR Neon 250 16Mb",
+"		1010 0090  PowerVR Neon 250 AGP 16Mb",
+"		1010 0098  PowerVR Neon 250 16Mb",
+"		1010 00a0  PowerVR Neon 250 AGP 32Mb",
+"		1010 00a8  PowerVR Neon 250 32Mb",
+"		1010 0120  PowerVR Neon 250 AGP 32Mb",
+"	0072  uPD72874 IEEE1394 OHCI 1.1 3-port PHY-Link Ctrlr",
+"	0074  56k Voice Modem",
+"		1033 8014  RCV56ACF 56k Voice Modem",
+"	009b  Vrc5476",
+"	00a5  VRC4173",
+"	00a6  VRC5477 AC97",
+"	00cd  IEEE 1394 [OrangeLink] Host Controller",
+"		12ee 8011  Root hub",
+"	00ce  IEEE 1394 Host Controller",
+"	00df  Vr4131",
+"	00e0  USB 2.0",
+"		12ee 7001  Root hub",
+"		14c2 0205  PTI-205N USB 2.0 Host Controller",
+"		1799 0002  Root Hub",
+"		807d 1043  PCI-USB2 (EHCI subsystem)",
+"	00e7  IEEE 1394 Host Controller",
+"	00f2  uPD72874 IEEE1394 OHCI 1.1 3-port PHY-Link Ctrlr",
+"	00f3  uPD6113x Multimedia Decoder/Processor [EMMA2]",
+"	010c  VR7701",
+"	0125  uPD720400 PCI Express - PCI/PCI-X Bridge",
+"1034  Framatome Connectors USA Inc.",
+"1035  Comp. & Comm. Research Lab",
+"1036  Future Domain Corp.",
+"	0000  TMC-18C30 [36C70]",
+"1037  Hitachi Micro Systems",
+"1038  AMP, Inc",
+"1039  Silicon Integrated Systems [SiS]",
+"	0001  Virtual PCI-to-PCI bridge (AGP)",
+"	0002  SG86C202",
+"	0003  SiS AGP Port (virtual PCI-to-PCI bridge)",
+"	0004  PCI-to-PCI bridge",
+"	0006  85C501/2/3",
+"	0008  SiS85C503/5513 (LPC Bridge)",
+"	0009  ACPI",
+"	000a  PCI-to-PCI bridge",
+"	0016  SiS961/2 SMBus Controller",
+"	0018  SiS85C503/5513 (LPC Bridge)",
+"	0180  RAID bus controller 180 SATA/PATA  [SiS]",
+"	0181  SATA",
+"	0182  182 SATA/RAID Controller",
+"	0190  190 Gigabit Ethernet Adapter",
+"	0191  191 Gigabit Ethernet Adapter",
+"	0200  5597/5598/6326 VGA",
+"		1039 0000  SiS5597 SVGA (Shared RAM)",
+"	0204  82C204",
+"	0205  SG86C205",
+"	0300  300/305 PCI/AGP VGA Display Adapter",
+"		107d 2720  Leadtek WinFast VR300",
+"	0310  315H PCI/AGP VGA Display Adapter",
+"	0315  315 PCI/AGP VGA Display Adapter",
+"	0325  315PRO PCI/AGP VGA Display Adapter",
+"	0330  330 [Xabre] PCI/AGP VGA Display Adapter",
+"	0406  85C501/2",
+"	0496  85C496",
+"	0530  530 Host",
+"	0540  540 Host",
+"	0550  550 Host",
+"	0597  5513C",
+"	0601  85C601",
+"	0620  620 Host",
+"	0630  630 Host",
+"	0633  633 Host",
+"	0635  635 Host",
+"	0645  SiS645 Host & Memory & AGP Controller",
+"	0646  SiS645DX Host & Memory & AGP Controller",
+"	0648  645xx",
+"	0650  650/M650 Host",
+"	0651  651 Host",
+"	0655  655 Host",
+"	0660  660 Host",
+"	0661  661FX/M661FX/M661MX Host",
+"	0730  730 Host",
+"	0733  733 Host",
+"	0735  735 Host",
+"	0740  740 Host",
+"	0741  741/741GX/M741 Host",
+"	0745  745 Host",
+"	0746  746 Host",
+"	0755  755 Host",
+"	0760  760/M760 Host",
+"	0761  761/M761 Host",
+"	0900  SiS900 PCI Fast Ethernet",
+"		1019 0a14  K7S5A motherboard",
+"		1039 0900  SiS900 10/100 Ethernet Adapter",
+"		1043 8035  CUSI-FX motherboard",
+"	0961  SiS961 [MuTIOL Media IO]",
+"	0962  SiS962 [MuTIOL Media IO]",
+"	0963  SiS963 [MuTIOL Media IO]",
+"	0964  SiS964 [MuTIOL Media IO]",
+"	0965  SiS965 [MuTIOL Media IO]",
+"	3602  83C602",
+"	5107  5107",
+"	5300  SiS540 PCI Display Adapter",
+"	5315  550 PCI/AGP VGA Display Adapter",
+"	5401  486 PCI Chipset",
+"	5511  5511/5512",
+"	5513  5513 [IDE]",
+"		1019 0970  P6STP-FL motherboard",
+"		1039 5513  SiS5513 EIDE Controller (A,B step)",
+"		1043 8035  CUSI-FX motherboard",
+"	5517  5517",
+"	5571  5571",
+"	5581  5581 Pentium Chipset",
+"	5582  5582",
+"	5591  5591/5592 Host",
+"	5596  5596 Pentium Chipset",
+"	5597  5597 [SiS5582]",
+"	5600  5600 Host",
+"	6204  Video decoder & MPEG interface",
+"	6205  VGA Controller",
+"	6236  6236 3D-AGP",
+"	6300  630/730 PCI/AGP VGA Display Adapter",
+"		1019 0970  P6STP-FL motherboard",
+"		1043 8035  CUSI-FX motherboard",
+"	6306  530/620 PCI/AGP VGA Display Adapter",
+"		1039 6306  SiS530,620 GUI Accelerator+3D",
+"	6325  65x/M650/740 PCI/AGP VGA Display Adapter",
+"	6326  86C326 5598/6326",
+"		1039 6326  SiS6326 GUI Accelerator",
+"		1092 0a50  SpeedStar A50",
+"		1092 0a70  SpeedStar A70",
+"		1092 4910  SpeedStar A70",
+"		1092 4920  SpeedStar A70",
+"		1569 6326  SiS6326 GUI Accelerator",
+"	6330  661/741/760/761 PCI/AGP VGA Display Adapter",
+"		1039 6330  [M]661xX/[M]741[GX]/[M]760 PCI/AGP VGA Adapter",
+"	7001  USB 1.0 Controller",
+"		1019 0a14  K7S5A motherboard",
+"		1039 7000  Onboard USB Controller",
+"		1462 5470  K7SOM+ 5.2C Motherboard",
+"	7002  USB 2.0 Controller",
+"		1509 7002  Onboard USB Controller",
+"	7007  FireWire Controller",
+"	7012  AC'97 Sound Controller",
+"		15bd 1001  DFI 661FX motherboard",
+"	7013  AC'97 Modem Controller",
+"	7016  SiS7016 PCI Fast Ethernet Adapter",
+"		1039 7016  SiS7016 10/100 Ethernet Adapter",
+"	7018  SiS PCI Audio Accelerator",
+"		1014 01b6  SiS PCI Audio Accelerator",
+"		1014 01b7  SiS PCI Audio Accelerator",
+"		1019 7018  SiS PCI Audio Accelerator",
+"		1025 000e  SiS PCI Audio Accelerator",
+"		1025 0018  SiS PCI Audio Accelerator",
+"		1039 7018  SiS PCI Audio Accelerator",
+"		1043 800b  SiS PCI Audio Accelerator",
+"		1054 7018  SiS PCI Audio Accelerator",
+"		107d 5330  SiS PCI Audio Accelerator",
+"		107d 5350  SiS PCI Audio Accelerator",
+"		1170 3209  SiS PCI Audio Accelerator",
+"		1462 400a  SiS PCI Audio Accelerator",
+"		14a4 2089  SiS PCI Audio Accelerator",
+"		14cd 2194  SiS PCI Audio Accelerator",
+"		14ff 1100  SiS PCI Audio Accelerator",
+"		152d 8808  SiS PCI Audio Accelerator",
+"		1558 1103  SiS PCI Audio Accelerator",
+"		1558 2200  SiS PCI Audio Accelerator",
+"		1563 7018  SiS PCI Audio Accelerator",
+"		15c5 0111  SiS PCI Audio Accelerator",
+"		270f a171  SiS PCI Audio Accelerator",
+"		a0a0 0022  SiS PCI Audio Accelerator",
+"	7019  SiS7019 Audio Accelerator",
+"103a  Seiko Epson Corporation",
+"103b  Tatung Co. of America",
+"103c  Hewlett-Packard Company",
+"	002a  NX9000 Notebook",
+"	1005  A4977A Visualize EG",
+"	1008  Visualize FX",
+"	1028  Tach TL Fibre Channel Host Adapter",
+"	1029  Tach XL2 Fibre Channel Host Adapter",
+"		107e 000f  Interphase 5560 Fibre Channel Adapter",
+"		9004 9210  1Gb/2Gb Family Fibre Channel Controller",
+"		9004 9211  1Gb/2Gb Family Fibre Channel Controller",
+"	102a  Tach TS Fibre Channel Host Adapter",
+"		107e 000e  Interphase 5540/5541 Fibre Channel Adapter",
+"		9004 9110  1Gb/2Gb Family Fibre Channel Controller",
+"		9004 9111  1Gb/2Gb Family Fibre Channel Controller",
+"	1030  J2585A DeskDirect 10/100VG NIC",
+"	1031  J2585B HP 10/100VG PCI LAN Adapter",
+"		103c 1040  J2973A DeskDirect 10BaseT NIC",
+"		103c 1041  J2585B DeskDirect 10/100VG NIC",
+"		103c 1042  J2970A DeskDirect 10BaseT/2 NIC",
+"	1040  J2973A DeskDirect 10BaseT NIC",
+"	1041  J2585B DeskDirect 10/100 NIC",
+"	1042  J2970A DeskDirect 10BaseT/2 NIC",
+"	1048  Diva Serial [GSP] Multiport UART",
+"		103c 1049  Tosca Console",
+"		103c 104a  Tosca Secondary",
+"		103c 104b  Maestro SP2",
+"		103c 1223  Superdome Console",
+"		103c 1226  Keystone SP2",
+"		103c 1227  Powerbar SP2",
+"		103c 1282  Everest SP2",
+"		103c 1301  Diva RMP3",
+"	1054  PCI Local Bus Adapter",
+"	1064  79C970 PCnet Ethernet Controller",
+"	108b  Visualize FXe",
+"	10c1  NetServer Smart IRQ Router",
+"	10ed  TopTools Remote Control",
+"	10f0  rio System Bus Adapter",
+"	10f1  rio I/O Controller",
+"	1200  82557B 10/100 NIC",
+"	1219  NetServer PCI Hot-Plug Controller",
+"	121a  NetServer SMIC Controller",
+"	121b  NetServer Legacy COM Port Decoder",
+"	121c  NetServer PCI COM Port Decoder",
+"	1229  zx1 System Bus Adapter",
+"	122a  zx1 I/O Controller",
+"	122e  zx1 Local Bus Adapter",
+"	127c  sx1000 I/O Controller",
+"	1290  Auxiliary Diva Serial Port",
+"	1291  Auxiliary Diva Serial Port",
+"	12b4  zx1 QuickSilver AGP8x Local Bus Adapter",
+"	12f8  Broadcom BCM4306 802.11b/g Wireless LAN",
+"	12fa  BCM4306 802.11b/g Wireless LAN Controller",
+"	2910  E2910A PCIBus Exerciser",
+"	2925  E2925A 32 Bit, 33 MHzPCI Exerciser & Analyzer",
+"	3080  Pavilion ze2028ea",
+"	3085  Realtek RTL8139/8139C/8139C+",
+"	3220  Hewlett-Packard Smart Array P600",
+"	3230  Hewlett-Packard Smart Array Controller",
+"103e  Solliday Engineering",
+"103f  Synopsys/Logic Modeling Group",
+"1040  Accelgraphics Inc.",
+"1041  Computrend",
+"1042  Micron",
+"	1000  PC Tech RZ1000",
+"	1001  PC Tech RZ1001",
+"	3000  Samurai_0",
+"	3010  Samurai_1",
+"	3020  Samurai_IDE",
+"1043  ASUSTeK Computer Inc.",
+"	0675  ISDNLink P-IN100-ST-D",
+"		0675 1704  ISDN Adapter (PCI Bus, D, C)",
+"		0675 1707  ISDN Adapter (PCI Bus, DV, W)",
+"		10cf 105e  ISDN Adapter (PCI Bus, DV, W)",
+"	0c11  A7N8X Motherboard nForce2 IDE/USB/SMBus",
+"	4015  v7100 SDRAM [GeForce2 MX]",
+"	4021  v7100 Combo Deluxe [GeForce2 MX + TV tuner]",
+"	4057  v8200 GeForce 3",
+"	8043  v8240 PAL 128M [P4T] Motherboard",
+"	807b  v9280/TD [Geforce4 TI4200 8X With TV-Out and DVI]",
+"	8095  A7N8X Motherboard nForce2 AC97 Audio",
+"	80ac  A7N8X Motherboard nForce2 AGP/Memory",
+"	80bb  v9180 Magic/T [GeForce4 MX440 AGP 8x 64MB TV-out]",
+"	80c5  nForce3 chipset motherboard [SK8N]",
+"	80df  v9520 Magic/T",
+"	8187  802.11a/b/g Wireless LAN Card",
+"	8188  Tiger Hybrid TV Capture Device",
+"1044  Adaptec (formerly DPT)",
+"	1012  Domino RAID Engine",
+"	a400  SmartCache/Raid I-IV Controller",
+"	a500  PCI Bridge",
+"	a501  SmartRAID V Controller",
+"		1044 c001  PM1554U2 Ultra2 Single Channel",
+"		1044 c002  PM1654U2 Ultra2 Single Channel",
+"		1044 c003  PM1564U3 Ultra3 Single Channel",
+"		1044 c004  PM1564U3 Ultra3 Dual Channel",
+"		1044 c005  PM1554U2 Ultra2 Single Channel (NON ACPI)",
+"		1044 c00a  PM2554U2 Ultra2 Single Channel",
+"		1044 c00b  PM2654U2 Ultra2 Single Channel",
+"		1044 c00c  PM2664U3 Ultra3 Single Channel",
+"		1044 c00d  PM2664U3 Ultra3 Dual Channel",
+"		1044 c00e  PM2554U2 Ultra2 Single Channel (NON ACPI)",
+"		1044 c00f  PM2654U2 Ultra2 Single Channel (NON ACPI)",
+"		1044 c014  PM3754U2 Ultra2 Single Channel (NON ACPI)",
+"		1044 c015  PM3755U2B Ultra2 Single Channel (NON ACPI)",
+"		1044 c016  PM3755F Fibre Channel (NON ACPI)",
+"		1044 c01e  PM3757U2 Ultra2 Single Channel",
+"		1044 c01f  PM3757U2 Ultra2 Dual Channel",
+"		1044 c020  PM3767U3 Ultra3 Dual Channel",
+"		1044 c021  PM3767U3 Ultra3 Quad Channel",
+"		1044 c028  PM2865U3 Ultra3 Single Channel",
+"		1044 c029  PM2865U3 Ultra3 Dual Channel",
+"		1044 c02a  PM2865F Fibre Channel",
+"		1044 c03c  2000S Ultra3 Single Channel",
+"		1044 c03d  2000S Ultra3 Dual Channel",
+"		1044 c03e  2000F Fibre Channel",
+"		1044 c046  3000S Ultra3 Single Channel",
+"		1044 c047  3000S Ultra3 Dual Channel",
+"		1044 c048  3000F Fibre Channel",
+"		1044 c050  5000S Ultra3 Single Channel",
+"		1044 c051  5000S Ultra3 Dual Channel",
+"		1044 c052  5000F Fibre Channel",
+"		1044 c05a  2400A UDMA Four Channel",
+"		1044 c05b  2400A UDMA Four Channel DAC",
+"		1044 c064  3010S Ultra3 Dual Channel",
+"		1044 c065  3410S Ultra160 Four Channel",
+"		1044 c066  3010S Fibre Channel",
+"	a511  SmartRAID V Controller",
+"		1044 c032  ASR-2005S I2O Zero Channel",
+"		1044 c035  ASR-2010S I2O Zero Channel",
+"1045  OPTi Inc.",
+"	a0f8  82C750 [Vendetta] USB Controller",
+"	c101  92C264",
+"	c178  92C178",
+"	c556  82X556 [Viper]",
+"	c557  82C557 [Viper-M]",
+"	c558  82C558 [Viper-M ISA+IDE]",
+"	c567  82C750 [Vendetta], device 0",
+"	c568  82C750 [Vendetta], device 1",
+"	c569  82C579 [Viper XPress+ Chipset]",
+"	c621  82C621 [Viper-M/N+]",
+"	c700  82C700 [FireStar]",
+"	c701  82C701 [FireStar Plus]",
+"	c814  82C814 [Firebridge 1]",
+"	c822  82C822",
+"	c824  82C824",
+"	c825  82C825 [Firebridge 2]",
+"	c832  82C832",
+"	c861  82C861",
+"	c895  82C895",
+"	c935  EV1935 ECTIVA MachOne PCIAudio",
+"	d568  82C825 [Firebridge 2]",
+"	d721  IDE [FireStar]",
+"1046  IPC Corporation, Ltd.",
+"1047  Genoa Systems Corp",
+"1048  Elsa AG",
+"	0c60  Gladiac MX",
+"	0d22  Quadro4 900XGL [ELSA GLoria4 900XGL]",
+"	1000  QuickStep 1000",
+"	3000  QuickStep 3000",
+"	8901  Gloria XL",
+"		1048 0935  GLoria XL (Virge)",
+"1049  Fountain Technologies, Inc.",
+"104a  STMicroelectronics",
+"	0008  STG 2000X",
+"	0009  STG 1764X",
+"	0010  STG4000 [3D Prophet Kyro Series]",
+"	0209  STPC Consumer/Industrial North- and Southbridge",
+"	020a  STPC Atlas/ConsumerS/Consumer IIA Northbridge",
+"	0210  STPC Atlas ISA Bridge",
+"	021a  STPC Consumer S Southbridge",
+"	021b  STPC Consumer IIA Southbridge",
+"	0500  ST70137 [Unicorn] ADSL DMT Transceiver",
+"	0564  STPC Client Northbridge",
+"	0981  21x4x DEC-Tulip compatible 10/100 Ethernet",
+"	1746  STG 1764X",
+"	2774  21x4x DEC-Tulip compatible 10/100 Ethernet",
+"	3520  MPEG-II decoder card",
+"	55cc  STPC Client Southbridge",
+"104b  BusLogic",
+"	0140  BT-946C (old) [multimaster  01]",
+"	1040  BT-946C (BA80C30) [MultiMaster 10]",
+"	8130  Flashpoint LT",
+"104c  Texas Instruments",
+"	0500  100 MBit LAN Controller",
+"	0508  TMS380C2X Compressor Interface",
+"	1000  Eagle i/f AS",
+"	104c  PCI1510 PC card Cardbus Controller",
+"	3d04  TVP4010 [Permedia]",
+"	3d07  TVP4020 [Permedia 2]",
+"		1011 4d10  Comet",
+"		1040 000f  AccelStar II",
+"		1040 0011  AccelStar II",
+"		1048 0a31  WINNER 2000",
+"		1048 0a32  GLoria Synergy",
+"		1048 0a34  GLoria Synergy",
+"		1048 0a35  GLoria Synergy",
+"		1048 0a36  GLoria Synergy",
+"		1048 0a43  GLoria Synergy",
+"		1048 0a44  GLoria Synergy",
+"		107d 2633  WinFast 3D L2300",
+"		1092 0127  FIRE GL 1000 PRO",
+"		1092 0136  FIRE GL 1000 PRO",
+"		1092 0141  FIRE GL 1000 PRO",
+"		1092 0146  FIRE GL 1000 PRO",
+"		1092 0148  FIRE GL 1000 PRO",
+"		1092 0149  FIRE GL 1000 PRO",
+"		1092 0152  FIRE GL 1000 PRO",
+"		1092 0154  FIRE GL 1000 PRO",
+"		1092 0155  FIRE GL 1000 PRO",
+"		1092 0156  FIRE GL 1000 PRO",
+"		1092 0157  FIRE GL 1000 PRO",
+"		1097 3d01  Jeronimo Pro",
+"		1102 100f  Graphics Blaster Extreme",
+"		3d3d 0100  Reference Permedia 2 3D",
+"	8000  PCILynx/PCILynx2 IEEE 1394 Link Layer Controller",
+"		e4bf 1010  CF1-1-SNARE",
+"		e4bf 1020  CF1-2-SNARE",
+"	8009  FireWire Controller",
+"		104d 8032  8032 OHCI i.LINK (IEEE 1394) Controller",
+"	8017  PCI4410 FireWire Controller",
+"	8019  TSB12LV23 IEEE-1394 Controller",
+"		11bd 000a  Studio DV500-1394",
+"		11bd 000e  Studio DV",
+"		e4bf 1010  CF2-1-CYMBAL",
+"	8020  TSB12LV26 IEEE-1394 Controller (Link)",
+"		11bd 000f  Studio DV500-1394",
+"	8021  TSB43AA22 IEEE-1394 Controller (PHY/Link Integrated)",
+"		104d 80df  Vaio PCG-FX403",
+"		104d 80e7  VAIO PCG-GR214EP/GR214MP/GR215MP/GR314MP/GR315MP",
+"	8022  TSB43AB22 IEEE-1394a-2000 Controller (PHY/Link)",
+"	8023  TSB43AB22/A IEEE-1394a-2000 Controller (PHY/Link)",
+"		103c 088c  NC8000 laptop",
+"		1043 808b  K8N4-E Mainboard",
+"	8024  TSB43AB23 IEEE-1394a-2000 Controller (PHY/Link)",
+"	8025  TSB82AA2 IEEE-1394b Link Layer Controller",
+"		1458 1000  GA-K8N Ultra-9 Mainboard",
+"	8026  TSB43AB21 IEEE-1394a-2000 Controller (PHY/Link)",
+"		1025 003c  Aspire 2001WLCi (Compaq CL50 motherboard)",
+"		103c 006a  NX9500",
+"		1043 808d  A7V333 mainboard.",
+"	8027  PCI4451 IEEE-1394 Controller",
+"		1028 00e6  PCI4451 IEEE-1394 Controller (Dell Inspiron 8100)",
+"	8029  PCI4510 IEEE-1394 Controller",
+"		1028 0163  Latitude D505",
+"		1028 0196  Inspiron 5160",
+"		1071 8160  MIM2900",
+"	802b  PCI7410,7510,7610 OHCI-Lynx Controller",
+"		1028 0139  Latitude D400",
+"		1028 014e  PCI7410,7510,7610 OHCI-Lynx Controller (Dell Latitude D800)",
+"	802e  PCI7x20 1394a-2000 OHCI Two-Port PHY/Link-Layer Controller",
+"	8031  PCIxx21/x515 Cardbus Controller",
+"		1025 0080  Aspire 5024WLMi",
+"		103c 099c  NX6110/NC6120",
+"		103c 308b  MX6125",
+"	8032  OHCI Compliant IEEE 1394 Host Controller",
+"		1025 0080  Aspire 5024WLMi",
+"		103c 099c  NX6110/NC6120",
+"		103c 308b  MX6125",
+"	8033  PCIxx21 Integrated FlashMedia Controller",
+"		1025 0080  Aspire 5024WLMi",
+"		103c 099c  NX6110/NC6120",
+"		103c 308b  MX6125",
+"	8034  PCI6411, PCI6421, PCI6611, PCI6621, PCI7411, PCI7421, PCI7611, PCI7621 Secure Digital (SD) Controller",
+"		1025 0080  Aspire 5024WLMi",
+"		103c 099c  NX6110/NC6120",
+"		103c 308b  MX6125",
+"	8035  PCI6411, PCI6421, PCI6611, PCI6621, PCI7411, PCI7421, PCI7611, PCI7621 Smart Card Controller (SMC)",
+"		103c 099c  NX6110/NC6120",
+"	8036  PCI6515 Cardbus Controller",
+"	8038  PCI6515 SmartCard Controller",
+"	803b  5-in-1 Multimedia Card Reader (SD/MMC/MS/MS PRO/xD)",
+"	8201  PCI1620 Firmware Loading Function",
+"	8204  PCI7410,7510,7610 PCI Firmware Loading Function",
+"		1028 0139  Latitude D400",
+"		1028 014e  Latitude D800",
+"	8231  XIO2000(A)/XIO2200 PCI Express-to-PCI Bridge",
+"	8235  XIO2200 IEEE-1394a-2000 Controller (PHY/Link)",
+"	8400  ACX 100 22Mbps Wireless Interface",
+"		1186 3b00  DWL-650+ PC Card cardbus 22Mbs Wireless Adapter [AirPlus]",
+"		1186 3b01  DWL-520+ 22Mbps PCI Wireless Adapter",
+"		16ab 8501  WL-8305 IEEE802.11b+ Wireless LAN PCI Adapter",
+"	8401  ACX 100 22Mbps Wireless Interface",
+"	9000  Wireless Interface (of unknown type)",
+"	9065  TMS320DM642",
+"	9066  ACX 111 54Mbps Wireless Interface",
+"		104c 9066  Trendnet TEW-421PC Wireless PCI Adapter",
+"		1186 3b04  DWL-G520+ Wireless PCI Adapter",
+"		1186 3b05  DWL-G650+ AirPlusG+ CardBus Wireless LAN",
+"		13d1 aba0  SWLMP-54108 108Mbps Wireless mini PCI card 802.11g+",
+"		1737 0033  WPC54G Ver.2 802.11G PC Card",
+"	a001  TDC1570",
+"	a100  TDC1561",
+"	a102  TNETA1575 HyperSAR Plus w/PCI Host i/f & UTOPIA i/f",
+"	a106  TMS320C6414 TMS320C6415 TMS320C6416",
+"		175c 5000  ASI50xx Audio Adapter",
+"		175c 6400  ASI6400 Cobranet series",
+"		175c 8700  ASI87xx Radio Tuner card",
+"	ac10  PCI1050",
+"	ac11  PCI1053",
+"	ac12  PCI1130",
+"	ac13  PCI1031",
+"	ac15  PCI1131",
+"	ac16  PCI1250",
+"		1014 0092  ThinkPad 600",
+"	ac17  PCI1220",
+"	ac18  PCI1260",
+"	ac19  PCI1221",
+"	ac1a  PCI1210",
+"	ac1b  PCI1450",
+"		0e11 b113  Armada M700",
+"		1014 0130  Thinkpad T20/T22/A21m",
+"	ac1c  PCI1225",
+"		0e11 b121  Armada E500",
+"		1028 0088  Latitude CPi A400XT",
+"	ac1d  PCI1251A",
+"	ac1e  PCI1211",
+"	ac1f  PCI1251B",
+"	ac20  TI 2030",
+"	ac21  PCI2031",
+"	ac22  PCI2032 PCI Docking Bridge",
+"	ac23  PCI2250 PCI-to-PCI Bridge",
+"	ac28  PCI2050 PCI-to-PCI Bridge",
+"	ac30  PCI1260 PC card Cardbus Controller",
+"	ac40  PCI4450 PC card Cardbus Controller",
+"	ac41  PCI4410 PC card Cardbus Controller",
+"	ac42  PCI4451 PC card Cardbus Controller",
+"		1028 00e6  PCI4451 PC card CardBus Controller (Dell Inspiron 8100)",
+"	ac44  PCI4510 PC card Cardbus Controller",
+"		1028 0163  Latitude D505",
+"		1028 0196  Inspiron 5160",
+"		1071 8160  MIM2000",
+"	ac46  PCI4520 PC card Cardbus Controller",
+"	ac47  PCI7510 PC card Cardbus Controller",
+"		1028 0139  Latitude D400",
+"		1028 013f  Precision M60",
+"		1028 014e  Latitude D800",
+"	ac4a  PCI7510,7610 PC card Cardbus Controller",
+"		1028 0139  Latitude D400",
+"		1028 014e  Latitude D800",
+"	ac50  PCI1410 PC card Cardbus Controller",
+"	ac51  PCI1420",
+"		0e11 004e  Evo N600c",
+"		1014 0148  ThinkPad A20m",
+"		1014 023b  ThinkPad T23 (2647-4MG)",
+"		1028 00b1  Latitude C600",
+"		1028 012a  Latitude C640",
+"		1033 80cd  Versa Note VXi",
+"		1095 10cf  Fujitsu-Siemens LifeBook C Series",
+"		10cf 1095  Lifebook S-4510/C6155",
+"		e4bf 1000  CP2-2-HIPHOP",
+"	ac52  PCI1451 PC card Cardbus Controller",
+"	ac53  PCI1421 PC card Cardbus Controller",
+"	ac54  PCI1620 PC Card Controller",
+"	ac55  PCI1520 PC card Cardbus Controller",
+"		1014 0512  ThinkPad T30/T40",
+"	ac56  PCI1510 PC card Cardbus Controller",
+"		1014 0528  ThinkPad R40e (2684-HVG) Cardbus Controller",
+"	ac60  PCI2040 PCI to DSP Bridge Controller",
+"		175c 5100  ASI51xx Audio Adapter",
+"		175c 6100  ASI61xx Audio Adapter",
+"		175c 6200  ASI62xx Audio Adapter",
+"		175c 8800  ASI88xx Audio Adapter",
+"	ac8d  PCI 7620",
+"	ac8e  PCI7420 CardBus Controller",
+"	ac8f  PCI7420/PCI7620 Dual Socket CardBus and Smart Card Cont. w/ 1394a-2000 OHCI Two-Port  PHY/Link-Layer Cont. and SD/MS-Pro Sockets",
+"	fe00  FireWire Host Controller",
+"	fe03  12C01A FireWire Host Controller",
+"104d  Sony Corporation",
+"	8004  DTL-H2500 [Playstation development board]",
+"	8009  CXD1947Q i.LINK Controller",
+"	8039  CXD3222 i.LINK Controller",
+"	8056  Rockwell HCF 56K modem",
+"	808a  Memory Stick Controller",
+"104e  Oak Technology, Inc",
+"	0017  OTI-64017",
+"	0107  OTI-107 [Spitfire]",
+"	0109  Video Adapter",
+"	0111  OTI-64111 [Spitfire]",
+"	0217  OTI-64217",
+"	0317  OTI-64317",
+"104f  Co-time Computer Ltd",
+"1050  Winbond Electronics Corp",
+"	0000  NE2000",
+"	0001  W83769F",
+"	0033  W89C33D 802.11 a/b/g BB/MAC",
+"	0105  W82C105",
+"	0840  W89C840",
+"		1050 0001  W89C840 Ethernet Adapter",
+"		1050 0840  W89C840 Ethernet Adapter",
+"	0940  W89C940",
+"	5a5a  W89C940F",
+"	6692  W6692",
+"		1043 1702  ISDN Adapter (PCI Bus, D, W)",
+"		1043 1703  ISDN Adapter (PCI Bus, DV, W)",
+"		1043 1707  ISDN Adapter (PCI Bus, DV, W)",
+"		144f 1702  ISDN Adapter (PCI Bus, D, W)",
+"		144f 1703  ISDN Adapter (PCI Bus, DV, W)",
+"		144f 1707  ISDN Adapter (PCI Bus, DV, W)",
+"	9921  W99200F MPEG-1 Video Encoder",
+"	9922  W99200F/W9922PF MPEG-1/2 Video Encoder",
+"	9970  W9970CF",
+"1051  Anigma, Inc.",
+"1052  \?Young Micro Systems",
+"1053  Young Micro Systems",
+"1054  Hitachi, Ltd",
+"1055  Efar Microsystems",
+"	9130  SLC90E66 [Victory66] IDE",
+"	9460  SLC90E66 [Victory66] ISA",
+"	9462  SLC90E66 [Victory66] USB",
+"	9463  SLC90E66 [Victory66] ACPI",
+"1056  ICL",
+"1057  Motorola",
+"	0001  MPC105 [Eagle]",
+"	0002  MPC106 [Grackle]",
+"	0003  MPC8240 [Kahlua]",
+"	0004  MPC107",
+"	0006  MPC8245 [Unity]",
+"	0008  MPC8540",
+"	0009  MPC8560",
+"	0100  MC145575 [HFC-PCI]",
+"	0431  KTI829c 100VG",
+"	1801  DSP56301 Digital Signal Processor",
+"		14fb 0101  Transas Radar Imitator Board [RIM]",
+"		14fb 0102  Transas Radar Imitator Board [RIM-2]",
+"		14fb 0202  Transas Radar Integrator Board [RIB-2]",
+"		14fb 0611  1 channel CAN bus Controller [CanPci-1]",
+"		14fb 0612  2 channels CAN bus Controller [CanPci-2]",
+"		14fb 0613  3 channels CAN bus Controller [CanPci-3]",
+"		14fb 0614  4 channels CAN bus Controller [CanPci-4]",
+"		14fb 0621  1 channel CAN bus Controller [CanPci2-1]",
+"		14fb 0622  2 channels CAN bus Controller [CanPci2-2]",
+"		14fb 0810  Transas VTS Radar Integrator Board [RIB-4]",
+"		175c 4200  ASI4215 Audio Adapter",
+"		175c 4300  ASI43xx Audio Adapter",
+"		175c 4400  ASI4401 Audio Adapter",
+"		ecc0 0010  Darla",
+"		ecc0 0020  Gina",
+"		ecc0 0030  Layla rev.0",
+"		ecc0 0031  Layla rev.1",
+"		ecc0 0040  Darla24 rev.0",
+"		ecc0 0041  Darla24 rev.1",
+"		ecc0 0050  Gina24 rev.0",
+"		ecc0 0051  Gina24 rev.1",
+"		ecc0 0070  Mona rev.0",
+"		ecc0 0071  Mona rev.1",
+"		ecc0 0072  Mona rev.2",
+"	18c0  MPC8265A/8266/8272",
+"	18c1  MPC8271/MPC8272",
+"	3410  DSP56361 Digital Signal Processor",
+"		ecc0 0050  Gina24 rev.0",
+"		ecc0 0051  Gina24 rev.1",
+"		ecc0 0060  Layla24",
+"		ecc0 0070  Mona rev.0",
+"		ecc0 0071  Mona rev.1",
+"		ecc0 0072  Mona rev.2",
+"		ecc0 0080  Mia rev.0",
+"		ecc0 0081  Mia rev.1",
+"		ecc0 0090  Indigo",
+"		ecc0 00a0  Indigo IO",
+"		ecc0 00b0  Indigo DJ",
+"		ecc0 0100  3G",
+"	4801  Raven",
+"	4802  Falcon",
+"	4803  Hawk",
+"	4806  CPX8216",
+"	4d68  20268",
+"	5600  SM56 PCI Modem",
+"		1057 0300  SM56 PCI Speakerphone Modem",
+"		1057 0301  SM56 PCI Voice Modem",
+"		1057 0302  SM56 PCI Fax Modem",
+"		1057 5600  SM56 PCI Voice modem",
+"		13d2 0300  SM56 PCI Speakerphone Modem",
+"		13d2 0301  SM56 PCI Voice modem",
+"		13d2 0302  SM56 PCI Fax Modem",
+"		1436 0300  SM56 PCI Speakerphone Modem",
+"		1436 0301  SM56 PCI Voice modem",
+"		1436 0302  SM56 PCI Fax Modem",
+"		144f 100c  SM56 PCI Fax Modem",
+"		1494 0300  SM56 PCI Speakerphone Modem",
+"		1494 0301  SM56 PCI Voice modem",
+"		14c8 0300  SM56 PCI Speakerphone Modem",
+"		14c8 0302  SM56 PCI Fax Modem",
+"		1668 0300  SM56 PCI Speakerphone Modem",
+"		1668 0302  SM56 PCI Fax Modem",
+"	5608  Wildcard X100P",
+"	5803  MPC5200",
+"	5806  MCF54 Coldfire",
+"	5808  MPC8220",
+"	5809  MPC5200B",
+"	6400  MPC190 Security Processor (S1 family, encryption)",
+"	6405  MPC184 Security Processor (S1 family)",
+"1058  Electronics & Telecommunications RSH",
+"1059  Teknor Industrial Computers Inc",
+"105a  Promise Technology, Inc.",
+"	0d30  PDC20265 (FastTrak100 Lite/Ultra100)",
+"		105a 4d33  Ultra100",
+"	0d38  20263",
+"		105a 4d39  Fasttrak66",
+"	1275  20275",
+"	3318  PDC20318 (SATA150 TX4)",
+"	3319  PDC20319 (FastTrak S150 TX4)",
+"		8086 3427  S875WP1-E mainboard",
+"	3371  PDC20371 (FastTrak S150 TX2plus)",
+"	3373  PDC20378 (FastTrak 378/SATA 378)",
+"		1043 80f5  K8V Deluxe/PC-DL Deluxe motherboard",
+"		1462 702e  K8T NEO FIS2R motherboard",
+"	3375  PDC20375 (SATA150 TX2plus)",
+"	3376  PDC20376 (FastTrak 376)",
+"		1043 809e  A7V8X motherboard",
+"	3515  PDC40719 [FastTrak TX4300/TX4310]",
+"	3519  PDC40519 (FastTrak TX4200)",
+"	3570  20771 (FastTrak TX2300)",
+"	3571  PDC20571 (FastTrak TX2200)",
+"	3574  PDC20579 SATAII 150 IDE Controller",
+"	3577  PDC40779 (SATA 300 779)",
+"	3d17  PDC40718 (SATA 300 TX4)",
+"	3d18  PDC20518/PDC40518 (SATAII 150 TX4)",
+"	3d73  PDC40775 (SATA 300 TX2plus)",
+"	3d75  PDC20575 (SATAII150 TX2plus)",
+"	4d30  PDC20267 (FastTrak100/Ultra100)",
+"		105a 4d33  Ultra100",
+"		105a 4d39  FastTrak100",
+"	4d33  20246",
+"		105a 4d33  20246 IDE Controller",
+"	4d38  PDC20262 (FastTrak66/Ultra66)",
+"		105a 4d30  Ultra Device on SuperTrak",
+"		105a 4d33  Ultra66",
+"		105a 4d39  FastTrak66",
+"	4d68  PDC20268 (Ultra100 TX2)",
+"		105a 4d68  Ultra100TX2",
+"	4d69  20269",
+"		105a 4d68  Ultra133TX2",
+"	5275  PDC20276 (MBFastTrak133 Lite)",
+"		1043 807e  A7V333 motherboard.",
+"		105a 0275  SuperTrak SX6000 IDE",
+"		105a 1275  MBFastTrak133 Lite (tm) Controller (RAID mode)",
+"		1458 b001  MBUltra 133",
+"	5300  DC5300",
+"	6268  PDC20270 (FastTrak100 LP/TX2/TX4)",
+"		105a 4d68  FastTrak100 TX2",
+"	6269  PDC20271 (FastTrak TX2000)",
+"		105a 6269  FastTrak TX2/TX2000",
+"	6621  PDC20621 (FastTrak S150 SX4/FastTrak SX4000 lite)",
+"	6622  PDC20621 [SATA150 SX4] 4 Channel IDE RAID Controller",
+"	6624  PDC20621 [FastTrak SX4100]",
+"	6626  PDC20618 (Ultra 618)",
+"	6629  PDC20619 (FastTrak TX4000)",
+"	7275  PDC20277 (SBFastTrak133 Lite)",
+"	8002  SATAII150 SX8",
+"105b  Foxconn International, Inc.",
+"105c  Wipro Infotech Limited",
+"105d  Number 9 Computer Company",
+"	2309  Imagine 128",
+"	2339  Imagine 128-II",
+"		105d 0000  Imagine 128 series 2 4Mb VRAM",
+"		105d 0001  Imagine 128 series 2 4Mb VRAM",
+"		105d 0002  Imagine 128 series 2 4Mb VRAM",
+"		105d 0003  Imagine 128 series 2 4Mb VRAM",
+"		105d 0004  Imagine 128 series 2 4Mb VRAM",
+"		105d 0005  Imagine 128 series 2 4Mb VRAM",
+"		105d 0006  Imagine 128 series 2 4Mb VRAM",
+"		105d 0007  Imagine 128 series 2 4Mb VRAM",
+"		105d 0008  Imagine 128 series 2e 4Mb DRAM",
+"		105d 0009  Imagine 128 series 2e 4Mb DRAM",
+"		105d 000a  Imagine 128 series 2 8Mb VRAM",
+"		105d 000b  Imagine 128 series 2 8Mb H-VRAM",
+"		11a4 000a  Barco Metheus 5 Megapixel",
+"		13cc 0000  Barco Metheus 5 Megapixel",
+"		13cc 0004  Barco Metheus 5 Megapixel",
+"		13cc 0005  Barco Metheus 5 Megapixel",
+"		13cc 0006  Barco Metheus 5 Megapixel",
+"		13cc 0008  Barco Metheus 5 Megapixel",
+"		13cc 0009  Barco Metheus 5 Megapixel",
+"		13cc 000a  Barco Metheus 5 Megapixel",
+"		13cc 000c  Barco Metheus 5 Megapixel",
+"	493d  Imagine 128 T2R [Ticket to Ride]",
+"		11a4 000a  Barco Metheus 5 Megapixel, Dual Head",
+"		11a4 000b  Barco Metheus 5 Megapixel, Dual Head",
+"		13cc 0002  Barco Metheus 4 Megapixel, Dual Head",
+"		13cc 0003  Barco Metheus 5 Megapixel, Dual Head",
+"		13cc 0007  Barco Metheus 5 Megapixel, Dual Head",
+"		13cc 0008  Barco Metheus 5 Megapixel, Dual Head",
+"		13cc 0009  Barco Metheus 5 Megapixel, Dual Head",
+"		13cc 000a  Barco Metheus 5 Megapixel, Dual Head",
+"	5348  Revolution 4",
+"		105d 0037  Revolution IV-FP AGP (For SGI 1600SW)",
+"		11a4 0028  PVS5600M",
+"		11a4 0038  PVS5600D",
+"105e  Vtech Computers Ltd",
+"105f  Infotronic America Inc",
+"1060  United Microelectronics [UMC]",
+"	0001  UM82C881",
+"	0002  UM82C886",
+"	0101  UM8673F",
+"	0881  UM8881",
+"	0886  UM8886F",
+"	0891  UM8891A",
+"	1001  UM886A",
+"	673a  UM8886BF",
+"	673b  EIDE Master/DMA",
+"	8710  UM8710",
+"	886a  UM8886A",
+"	8881  UM8881F",
+"	8886  UM8886F",
+"	888a  UM8886A",
+"	8891  UM8891A",
+"	9017  UM9017F",
+"	9018  UM9018",
+"	9026  UM9026",
+"	e881  UM8881N",
+"	e886  UM8886N",
+"	e88a  UM8886N",
+"	e891  UM8891N",
+"1061  I.I.T.",
+"	0001  AGX016",
+"	0002  IIT3204/3501",
+"1062  Maspar Computer Corp",
+"1063  Ocean Office Automation",
+"1064  Alcatel",
+"1065  Texas Microsystems",
+"1066  PicoPower Technology",
+"	0000  PT80C826",
+"	0001  PT86C521 [Vesuvius v1] Host Bridge",
+"	0002  PT86C523 [Vesuvius v3] PCI-ISA Bridge Master",
+"	0003  PT86C524 [Nile] PCI-to-PCI Bridge",
+"	0004  PT86C525 [Nile-II] PCI-to-PCI Bridge",
+"	0005  National PC87550 System Controller",
+"	8002  PT86C523 [Vesuvius v3] PCI-ISA Bridge Slave",
+"1067  Mitsubishi Electric",
+"	0301  AccelGraphics AccelECLIPSE",
+"	0304  AccelGALAXY A2100 [OEM Evans & Sutherland]",
+"	0308  Tornado 3000 [OEM Evans & Sutherland]",
+"	1002  VG500 [VolumePro Volume Rendering Accelerator]",
+"1068  Diversified Technology",
+"1069  Mylex Corporation",
+"	0001  DAC960P",
+"	0002  DAC960PD",
+"	0010  DAC960PG",
+"	0020  DAC960LA",
+"	0050  AcceleRAID 352/170/160 support Device",
+"		1069 0050  AcceleRAID 352 support Device",
+"		1069 0052  AcceleRAID 170 support Device",
+"		1069 0054  AcceleRAID 160 support Device",
+"	b166  AcceleRAID 600/500/400/Sapphire support Device",
+"		1014 0242  iSeries 2872 DASD IOA",
+"		1014 0266  Dual Channel PCI-X U320 SCSI Adapter",
+"		1014 0278  Dual Channel PCI-X U320 SCSI RAID Adapter",
+"		1014 02d3  Dual Channel PCI-X U320 SCSI Adapter",
+"		1014 02d4  Dual Channel PCI-X U320 SCSI RAID Adapter",
+"		1069 0200  AcceleRAID 400, Single Channel, PCI-X, U320, SCSI RAID",
+"		1069 0202  AcceleRAID Sapphire, Dual Channel, PCI-X, U320, SCSI RAID",
+"		1069 0204  AcceleRAID 500, Dual Channel, Low-Profile, PCI-X, U320, SCSI RAID",
+"		1069 0206  AcceleRAID 600, Dual Channel, PCI-X, U320, SCSI RAID",
+"	ba55  eXtremeRAID 1100 support Device",
+"	ba56  eXtremeRAID 2000/3000 support Device",
+"		1069 0030  eXtremeRAID 3000 support Device",
+"		1069 0040  eXtremeRAID 2000 support Device",
+"	ba57  eXtremeRAID 4000/5000 support Device",
+"		1069 0072  eXtremeRAID 5000 support Device",
+"106a  Aten Research Inc",
+"106b  Apple Computer Inc.",
+"	0001  Bandit PowerPC host bridge",
+"	0002  Grand Central I/O",
+"	0003  Control Video",
+"	0004  PlanB Video-In",
+"	0007  O'Hare I/O",
+"	000c  DOS on Mac",
+"	000e  Hydra Mac I/O",
+"	0010  Heathrow Mac I/O",
+"	0017  Paddington Mac I/O",
+"	0018  UniNorth FireWire",
+"	0019  KeyLargo USB",
+"	001e  UniNorth Internal PCI",
+"	001f  UniNorth PCI",
+"	0020  UniNorth AGP",
+"	0021  UniNorth GMAC (Sun GEM)",
+"	0022  KeyLargo Mac I/O",
+"	0024  UniNorth/Pangea GMAC (Sun GEM)",
+"	0025  KeyLargo/Pangea Mac I/O",
+"	0026  KeyLargo/Pangea USB",
+"	0027  UniNorth/Pangea AGP",
+"	0028  UniNorth/Pangea PCI",
+"	0029  UniNorth/Pangea Internal PCI",
+"	002d  UniNorth 1.5 AGP",
+"	002e  UniNorth 1.5 PCI",
+"	002f  UniNorth 1.5 Internal PCI",
+"	0030  UniNorth/Pangea FireWire",
+"	0031  UniNorth 2 FireWire",
+"		106b 5811  iBook G4 2004",
+"	0032  UniNorth 2 GMAC (Sun GEM)",
+"	0033  UniNorth 2 ATA/100",
+"	0034  UniNorth 2 AGP",
+"	0035  UniNorth 2 PCI",
+"	0036  UniNorth 2 Internal PCI",
+"	003b  UniNorth/Intrepid ATA/100",
+"	003e  KeyLargo/Intrepid Mac I/O",
+"	003f  KeyLargo/Intrepid USB",
+"	0040  K2 KeyLargo USB",
+"	0041  K2 KeyLargo Mac/IO",
+"	0042  K2 FireWire",
+"	0043  K2 ATA/100",
+"	0045  K2 HT-PCI Bridge",
+"	0046  K2 HT-PCI Bridge",
+"	0047  K2 HT-PCI Bridge",
+"	0048  K2 HT-PCI Bridge",
+"	0049  K2 HT-PCI Bridge",
+"	004b  U3 AGP",
+"	004c  K2 GMAC (Sun GEM)",
+"	004f  Shasta Mac I/O",
+"	0050  Shasta IDE",
+"	0051  Shasta (Sun GEM)",
+"	0052  Shasta Firewire",
+"	0053  Shasta PCI Bridge",
+"	0054  Shasta PCI Bridge",
+"	0055  Shasta PCI Bridge",
+"	0058  U3L AGP Bridge",
+"	0059  U3H AGP Bridge",
+"	0066  Intrepid2 AGP Bridge",
+"	0067  Intrepid2 PCI Bridge",
+"	0068  Intrepid2 PCI Bridge",
+"	0069  Intrepid2 ATA/100",
+"	006a  Intrepid2 Firewire",
+"	006b  Intrepid2 GMAC (Sun GEM)",
+"	1645  Tigon3 Gigabit Ethernet NIC (BCM5701)",
+"106c  Hynix Semiconductor",
+"	8801  Dual Pentium ISA/PCI Motherboard",
+"	8802  PowerPC ISA/PCI Motherboard",
+"	8803  Dual Window Graphics Accelerator",
+"	8804  LAN Controller",
+"	8805  100-BaseT LAN",
+"106d  Sequent Computer Systems",
+"106e  DFI, Inc",
+"106f  City Gate Development Ltd",
+"1070  Daewoo Telecom Ltd",
+"1071  Mitac",
+"	8160  Mitac 8060B Mobile Platform",
+"1072  GIT Co Ltd",
+"1073  Yamaha Corporation",
+"	0001  3D GUI Accelerator",
+"	0002  YGV615 [RPA3 3D-Graphics Controller]",
+"	0003  YMF-740",
+"	0004  YMF-724",
+"		1073 0004  YMF724-Based PCI Audio Adapter",
+"	0005  DS1 Audio",
+"		1073 0005  DS-XG PCI Audio CODEC",
+"	0006  DS1 Audio",
+"	0008  DS1 Audio",
+"		1073 0008  DS-XG PCI Audio CODEC",
+"	000a  DS1L Audio",
+"		1073 0004  DS-XG PCI Audio CODEC",
+"		1073 000a  DS-XG PCI Audio CODEC",
+"	000c  YMF-740C [DS-1L Audio Controller]",
+"		107a 000c  DS-XG PCI Audio CODEC",
+"	000d  YMF-724F [DS-1 Audio Controller]",
+"		1073 000d  DS-XG PCI Audio CODEC",
+"	0010  YMF-744B [DS-1S Audio Controller]",
+"		1073 0006  DS-XG PCI Audio CODEC",
+"		1073 0010  DS-XG PCI Audio CODEC",
+"	0012  YMF-754 [DS-1E Audio Controller]",
+"		1073 0012  DS-XG PCI Audio Codec",
+"	0020  DS-1 Audio",
+"	2000  DS2416 Digital Mixing Card",
+"		1073 2000  DS2416 Digital Mixing Card",
+"1074  NexGen Microsystems",
+"	4e78  82c500/1",
+"1075  Advanced Integrations Research",
+"1076  Chaintech Computer Co. Ltd",
+"1077  QLogic Corp.",
+"	1016  ISP10160 Single Channel Ultra3 SCSI Processor",
+"	1020  ISP1020 Fast-wide SCSI",
+"	1022  ISP1022 Fast-wide SCSI",
+"	1080  ISP1080 SCSI Host Adapter",
+"	1216  ISP12160 Dual Channel Ultra3 SCSI Processor",
+"		101e 8471  QLA12160 on AMI MegaRAID",
+"		101e 8493  QLA12160 on AMI MegaRAID",
+"	1240  ISP1240 SCSI Host Adapter",
+"	1280  ISP1280 SCSI Host Adapter",
+"	2020  ISP2020A Fast!SCSI Basic Adapter",
+"	2100  QLA2100 64-bit Fibre Channel Adapter",
+"		1077 0001  QLA2100 64-bit Fibre Channel Adapter",
+"	2200  QLA2200 64-bit Fibre Channel Adapter",
+"		1077 0002  QLA2200",
+"	2300  QLA2300 64-bit Fibre Channel Adapter",
+"	2312  QLA2312 Fibre Channel Adapter",
+"	2322  QLA2322 Fibre Channel Adapter",
+"	2422  QLA2422 Fibre Channel Adapter",
+"	2432  QLA2432 Fibre Channel Adapter",
+"	3010  QLA3010 Network Adapter",
+"	3022  QLA3022 Network Adapter",
+"	4010  QLA4010 iSCSI TOE Adapter",
+"	4022  QLA4022 iSCSI TOE Adapter",
+"	6312  QLA6312 Fibre Channel Adapter",
+"	6322  QLA6322 Fibre Channel Adapter",
+"1078  Cyrix Corporation",
+"	0000  5510 [Grappa]",
+"	0001  PCI Master",
+"	0002  5520 [Cognac]",
+"	0100  5530 Legacy [Kahlua]",
+"	0101  5530 SMI [Kahlua]",
+"	0102  5530 IDE [Kahlua]",
+"	0103  5530 Audio [Kahlua]",
+"	0104  5530 Video [Kahlua]",
+"	0400  ZFMicro PCI Bridge",
+"	0401  ZFMicro Chipset SMI",
+"	0402  ZFMicro Chipset IDE",
+"	0403  ZFMicro Expansion Bus",
+"1079  I-Bus",
+"107a  NetWorth",
+"107b  Gateway 2000",
+"107c  LG Electronics [Lucky Goldstar Co. Ltd]",
+"107d  LeadTek Research Inc.",
+"	0000  P86C850",
+"	204d  [GeForce 7800 GTX] Winfast PX7800 GTX TDH",
+"	2134  WinFast 3D S320 II",
+"	2971  [GeForce FX 5900] WinFast A350 TDH MyViVo",
+"107e  Interphase Corporation",
+"	0001  5515 ATM Adapter [Flipper]",
+"	0002  100 VG AnyLan Controller",
+"	0004  5526 Fibre Channel Host Adapter",
+"	0005  x526 Fibre Channel Host Adapter",
+"	0008  5525/5575 ATM Adapter (155 Mbit) [Atlantic]",
+"	9003  5535-4P-BRI-ST",
+"	9007  5535-4P-BRI-U",
+"	9008  5535-1P-SR",
+"	900c  5535-1P-SR-ST",
+"	900e  5535-1P-SR-U",
+"	9011  5535-1P-PRI",
+"	9013  5535-2P-PRI",
+"	9023  5536-4P-BRI-ST",
+"	9027  5536-4P-BRI-U",
+"	9031  5536-1P-PRI",
+"	9033  5536-2P-PRI",
+"107f  Data Technology Corporation",
+"	0802  SL82C105",
+"1080  Contaq Microsystems",
+"	0600  82C599",
+"	c691  Cypress CY82C691",
+"	c693  82c693",
+"1081  Supermac Technology",
+"	0d47  Radius PCI to NuBUS Bridge",
+"1082  EFA Corporation of America",
+"1083  Forex Computer Corporation",
+"	0001  FR710",
+"1084  Parador",
+"1085  Tulip Computers Int.B.V.",
+"1086  J. Bond Computer Systems",
+"1087  Cache Computer",
+"1088  Microcomputer Systems (M) Son",
+"1089  Data General Corporation",
+"108a  SBS Technologies",
+"	0001  VME Bridge Model 617",
+"	0010  VME Bridge Model 618",
+"	0040  dataBLIZZARD",
+"	3000  VME Bridge Model 2706",
+"108c  Oakleigh Systems Inc.",
+"108d  Olicom",
+"	0001  Token-Ring 16/4 PCI Adapter (3136/3137)",
+"	0002  16/4 Token Ring",
+"	0004  RapidFire 3139 Token-Ring 16/4 PCI Adapter",
+"		108d 0004  OC-3139/3140 RapidFire Token-Ring 16/4 Adapter",
+"	0005  GoCard 3250 Token-Ring 16/4 CardBus PC Card",
+"	0006  OC-3530 RapidFire Token-Ring 100",
+"	0007  RapidFire 3141 Token-Ring 16/4 PCI Fiber Adapter",
+"		108d 0007  OC-3141 RapidFire Token-Ring 16/4 Adapter",
+"	0008  RapidFire 3540 HSTR 100/16/4 PCI Adapter",
+"		108d 0008  OC-3540 RapidFire HSTR 100/16/4 Adapter",
+"	0011  OC-2315",
+"	0012  OC-2325",
+"	0013  OC-2183/2185",
+"	0014  OC-2326",
+"	0019  OC-2327/2250 10/100 Ethernet Adapter",
+"		108d 0016  OC-2327 Rapidfire 10/100 Ethernet Adapter",
+"		108d 0017  OC-2250 GoCard 10/100 Ethernet Adapter",
+"	0021  OC-6151/6152 [RapidFire ATM 155]",
+"	0022  ATM Adapter",
+"108e  Sun Microsystems Computer Corp.",
+"	0001  EBUS",
+"	1000  EBUS",
+"	1001  Happy Meal",
+"	1100  RIO EBUS",
+"	1101  RIO GEM",
+"	1102  RIO 1394",
+"	1103  RIO USB",
+"	1648  [bge] Gigabit Ethernet",
+"	2bad  GEM",
+"	5000  Simba Advanced PCI Bridge",
+"	5043  SunPCI Co-processor",
+"	8000  Psycho PCI Bus Module",
+"	8001  Schizo PCI Bus Module",
+"	8002  Schizo+ PCI Bus Module",
+"	a000  Ultra IIi",
+"	a001  Ultra IIe",
+"	a801  Tomatillo PCI Bus Module",
+"	abba  Cassini 10/100/1000",
+"108f  Systemsoft",
+"1090  Compro Computer Services, Inc.",
+"1091  Intergraph Corporation",
+"	0020  3D graphics processor",
+"	0021  3D graphics processor w/Texturing",
+"	0040  3D graphics frame buffer",
+"	0041  3D graphics frame buffer",
+"	0060  Proprietary bus bridge",
+"	00e4  Powerstorm 4D50T",
+"	0720  Motion JPEG codec",
+"	07a0  Sun Expert3D-Lite Graphics Accelerator",
+"	1091  Sun Expert3D Graphics Accelerator",
+"1092  Diamond Multimedia Systems",
+"	00a0  Speedstar Pro SE",
+"	00a8  Speedstar 64",
+"	0550  Viper V550",
+"	08d4  Supra 2260 Modem",
+"	094c  SupraExpress 56i Pro",
+"	1092  Viper V330",
+"	6120  Maximum DVD",
+"	8810  Stealth SE",
+"	8811  Stealth 64/SE",
+"	8880  Stealth",
+"	8881  Stealth",
+"	88b0  Stealth 64",
+"	88b1  Stealth 64",
+"	88c0  Stealth 64",
+"	88c1  Stealth 64",
+"	88d0  Stealth 64",
+"	88d1  Stealth 64",
+"	88f0  Stealth 64",
+"	88f1  Stealth 64",
+"	9999  DMD-I0928-1 'Monster sound' sound chip",
+"1093  National Instruments",
+"	0160  PCI-DIO-96",
+"	0162  PCI-MIO-16XE-50",
+"	1150  PCI-DIO-32HS High Speed Digital I/O Board",
+"	1170  PCI-MIO-16XE-10",
+"	1180  PCI-MIO-16E-1",
+"	1190  PCI-MIO-16E-4",
+"	1310  PCI-6602",
+"	1330  PCI-6031E",
+"	1350  PCI-6071E",
+"	14e0  PCI-6110",
+"	14f0  PCI-6111",
+"	17d0  PCI-6503",
+"	1870  PCI-6713",
+"	1880  PCI-6711",
+"	18b0  PCI-6052E",
+"	2410  PCI-6733",
+"	2890  PCI-6036E",
+"	2a60  PCI-6023E",
+"	2a70  PCI-6024E",
+"	2a80  PCI-6025E",
+"	2c80  PCI-6035E",
+"	2ca0  PCI-6034E",
+"	70a9  PCI-6528 (Digital I/O at 60V)",
+"	70b8  PCI-6251 [M Series - High Speed Multifunction DAQ]",
+"	b001  IMAQ-PCI-1408",
+"	b011  IMAQ-PXI-1408",
+"	b021  IMAQ-PCI-1424",
+"	b031  IMAQ-PCI-1413",
+"	b041  IMAQ-PCI-1407",
+"	b051  IMAQ-PXI-1407",
+"	b061  IMAQ-PCI-1411",
+"	b071  IMAQ-PCI-1422",
+"	b081  IMAQ-PXI-1422",
+"	b091  IMAQ-PXI-1411",
+"	c801  PCI-GPIB",
+"	c831  PCI-GPIB bridge",
+"1094  First International Computers [FIC]",
+"1095  Silicon Image, Inc.",
+"	0240  Adaptec AAR-1210SA SATA HostRAID Controller",
+"	0640  PCI0640",
+"	0643  PCI0643",
+"	0646  PCI0646",
+"	0647  PCI0647",
+"	0648  PCI0648",
+"		1043 8025  CUBX motherboard",
+"	0649  SiI 0649 Ultra ATA/100 PCI to ATA Host Controller",
+"		0e11 005d  Integrated Ultra ATA-100 Dual Channel Controller",
+"		0e11 007e  Integrated Ultra ATA-100 IDE RAID Controller",
+"		101e 0649  AMI MegaRAID IDE 100 Controller",
+"	0650  PBC0650A",
+"	0670  USB0670",
+"		1095 0670  USB0670",
+"	0673  USB0673",
+"	0680  PCI0680 Ultra ATA-133 Host Controller",
+"		1095 3680  Winic W-680 (Silicon Image 680 based)",
+"	3112  SiI 3112 [SATALink/SATARaid] Serial ATA Controller",
+"		1095 3112  SiI 3112 SATALink Controller",
+"		1095 6112  SiI 3112 SATARaid Controller",
+"		9005 0250  SATAConnect 1205SA Host Controller",
+"	3114  SiI 3114 [SATALink/SATARaid] Serial ATA Controller",
+"		1095 3114  SiI 3114 SATALink Controller",
+"		1095 6114  SiI 3114 SATARaid Controller",
+"	3124  SiI 3124 PCI-X Serial ATA Controller",
+"		1095 3124  SiI 3124 PCI-X Serial ATA Controller",
+"	3132  SiI 3132 Serial ATA Raid II Controller",
+"	3512  SiI 3512 [SATALink/SATARaid] Serial ATA Controller",
+"		1095 3512  SiI 3512 SATALink Controller",
+"		1095 6512  SiI 3512 SATARaid Controller",
+"1096  Alacron",
+"1097  Appian Technology",
+"1098  Quantum Designs (H.K.) Ltd",
+"	0001  QD-8500",
+"	0002  QD-8580",
+"1099  Samsung Electronics Co., Ltd",
+"109a  Packard Bell",
+"109b  Gemlight Computer Ltd.",
+"109c  Megachips Corporation",
+"109d  Zida Technologies Ltd.",
+"109e  Brooktree Corporation",
+"	032e  Bt878 Video Capture",
+"	0350  Bt848 Video Capture",
+"	0351  Bt849A Video capture",
+"	0369  Bt878 Video Capture",
+"		1002 0001  TV-Wonder",
+"		1002 0003  TV-Wonder/VE",
+"	036c  Bt879(\?\?) Video Capture",
+"		13e9 0070  Win/TV (Video Section)",
+"	036e  Bt878 Video Capture",
+"		0070 13eb  WinTV Series",
+"		0070 ff01  Viewcast Osprey 200",
+"		0071 0101  DigiTV PCI",
+"		107d 6606  WinFast TV 2000",
+"		11bd 0012  PCTV pro (TV + FM stereo receiver)",
+"		11bd 001c  PCTV Sat (DBC receiver)",
+"		127a 0001  Bt878 Mediastream Controller NTSC",
+"		127a 0002  Bt878 Mediastream Controller PAL BG",
+"		127a 0003  Bt878a Mediastream Controller PAL BG",
+"		127a 0048  Bt878/832 Mediastream Controller",
+"		144f 3000  MagicTView CPH060 - Video",
+"		1461 0002  TV98 Series (TV/No FM/Remote)",
+"		1461 0003  AverMedia UltraTV PCI 350",
+"		1461 0004  AVerTV WDM Video Capture",
+"		1461 0761  AverTV DVB-T",
+"		14f1 0001  Bt878 Mediastream Controller NTSC",
+"		14f1 0002  Bt878 Mediastream Controller PAL BG",
+"		14f1 0003  Bt878a Mediastream Controller PAL BG",
+"		14f1 0048  Bt878/832 Mediastream Controller",
+"		1822 0001  VisionPlus DVB card",
+"		1851 1850  FlyVideo'98 - Video",
+"		1851 1851  FlyVideo II",
+"		1852 1852  FlyVideo'98 - Video (with FM Tuner)",
+"		18ac d500  DViCO FusionHDTV5 Lite",
+"		270f fc00  Digitop DTT-1000",
+"		bd11 1200  PCTV pro (TV + FM stereo receiver)",
+"	036f  Bt879 Video Capture",
+"		127a 0044  Bt879 Video Capture NTSC",
+"		127a 0122  Bt879 Video Capture PAL I",
+"		127a 0144  Bt879 Video Capture NTSC",
+"		127a 0222  Bt879 Video Capture PAL BG",
+"		127a 0244  Bt879a Video Capture NTSC",
+"		127a 0322  Bt879 Video Capture NTSC",
+"		127a 0422  Bt879 Video Capture NTSC",
+"		127a 1122  Bt879 Video Capture PAL I",
+"		127a 1222  Bt879 Video Capture PAL BG",
+"		127a 1322  Bt879 Video Capture NTSC",
+"		127a 1522  Bt879a Video Capture PAL I",
+"		127a 1622  Bt879a Video Capture PAL BG",
+"		127a 1722  Bt879a Video Capture NTSC",
+"		14f1 0044  Bt879 Video Capture NTSC",
+"		14f1 0122  Bt879 Video Capture PAL I",
+"		14f1 0144  Bt879 Video Capture NTSC",
+"		14f1 0222  Bt879 Video Capture PAL BG",
+"		14f1 0244  Bt879a Video Capture NTSC",
+"		14f1 0322  Bt879 Video Capture NTSC",
+"		14f1 0422  Bt879 Video Capture NTSC",
+"		14f1 1122  Bt879 Video Capture PAL I",
+"		14f1 1222  Bt879 Video Capture PAL BG",
+"		14f1 1322  Bt879 Video Capture NTSC",
+"		14f1 1522  Bt879a Video Capture PAL I",
+"		14f1 1622  Bt879a Video Capture PAL BG",
+"		14f1 1722  Bt879a Video Capture NTSC",
+"		1851 1850  FlyVideo'98 - Video",
+"		1851 1851  FlyVideo II",
+"		1852 1852  FlyVideo'98 - Video (with FM Tuner)",
+"	0370  Bt880 Video Capture",
+"		1851 1850  FlyVideo'98",
+"		1851 1851  FlyVideo'98 EZ - video",
+"		1852 1852  FlyVideo'98 (with FM Tuner)",
+"	0878  Bt878 Audio Capture",
+"		0070 13eb  WinTV Series",
+"		0070 ff01  Viewcast Osprey 200",
+"		0071 0101  DigiTV PCI",
+"		1002 0001  TV-Wonder",
+"		1002 0003  TV-Wonder/VE",
+"		11bd 0012  PCTV pro (TV + FM stereo receiver, audio section)",
+"		11bd 001c  PCTV Sat (DBC receiver)",
+"		127a 0001  Bt878 Video Capture (Audio Section)",
+"		127a 0002  Bt878 Video Capture (Audio Section)",
+"		127a 0003  Bt878 Video Capture (Audio Section)",
+"		127a 0048  Bt878 Video Capture (Audio Section)",
+"		13e9 0070  Win/TV (Audio Section)",
+"		144f 3000  MagicTView CPH060 - Audio",
+"		1461 0002  Avermedia PCTV98 Audio Capture",
+"		1461 0004  AVerTV WDM Audio Capture",
+"		1461 0761  AVerTV DVB-T",
+"		14f1 0001  Bt878 Video Capture (Audio Section)",
+"		14f1 0002  Bt878 Video Capture (Audio Section)",
+"		14f1 0003  Bt878 Video Capture (Audio Section)",
+"		14f1 0048  Bt878 Video Capture (Audio Section)",
+"		1822 0001  VisionPlus DVB Card",
+"		18ac d500  DViCO FusionHDTV5 Lite",
+"		270f fc00  Digitop DTT-1000",
+"		bd11 1200  PCTV pro (TV + FM stereo receiver, audio section)",
+"	0879  Bt879 Audio Capture",
+"		127a 0044  Bt879 Video Capture (Audio Section)",
+"		127a 0122  Bt879 Video Capture (Audio Section)",
+"		127a 0144  Bt879 Video Capture (Audio Section)",
+"		127a 0222  Bt879 Video Capture (Audio Section)",
+"		127a 0244  Bt879 Video Capture (Audio Section)",
+"		127a 0322  Bt879 Video Capture (Audio Section)",
+"		127a 0422  Bt879 Video Capture (Audio Section)",
+"		127a 1122  Bt879 Video Capture (Audio Section)",
+"		127a 1222  Bt879 Video Capture (Audio Section)",
+"		127a 1322  Bt879 Video Capture (Audio Section)",
+"		127a 1522  Bt879 Video Capture (Audio Section)",
+"		127a 1622  Bt879 Video Capture (Audio Section)",
+"		127a 1722  Bt879 Video Capture (Audio Section)",
+"		14f1 0044  Bt879 Video Capture (Audio Section)",
+"		14f1 0122  Bt879 Video Capture (Audio Section)",
+"		14f1 0144  Bt879 Video Capture (Audio Section)",
+"		14f1 0222  Bt879 Video Capture (Audio Section)",
+"		14f1 0244  Bt879 Video Capture (Audio Section)",
+"		14f1 0322  Bt879 Video Capture (Audio Section)",
+"		14f1 0422  Bt879 Video Capture (Audio Section)",
+"		14f1 1122  Bt879 Video Capture (Audio Section)",
+"		14f1 1222  Bt879 Video Capture (Audio Section)",
+"		14f1 1322  Bt879 Video Capture (Audio Section)",
+"		14f1 1522  Bt879 Video Capture (Audio Section)",
+"		14f1 1622  Bt879 Video Capture (Audio Section)",
+"		14f1 1722  Bt879 Video Capture (Audio Section)",
+"	0880  Bt880 Audio Capture",
+"	2115  BtV 2115 Mediastream controller",
+"	2125  BtV 2125 Mediastream controller",
+"	2164  BtV 2164",
+"	2165  BtV 2165",
+"	8230  Bt8230 ATM Segment/Reassembly Ctrlr (SRC)",
+"	8472  Bt8472",
+"	8474  Bt8474",
+"109f  Trigem Computer Inc.",
+"10a0  Meidensha Corporation",
+"10a1  Juko Electronics Ind. Co. Ltd",
+"10a2  Quantum Corporation",
+"10a3  Everex Systems Inc",
+"10a4  Globe Manufacturing Sales",
+"10a5  Smart Link Ltd.",
+"	3052  SmartPCI562 56K Modem",
+"	5449  SmartPCI561 modem",
+"10a6  Informtech Industrial Ltd.",
+"10a7  Benchmarq Microelectronics",
+"10a8  Sierra Semiconductor",
+"	0000  STB Horizon 64",
+"10a9  Silicon Graphics, Inc.",
+"	0001  Crosstalk to PCI Bridge",
+"	0002  Linc I/O controller",
+"	0003  IOC3 I/O controller",
+"	0004  O2 MACE",
+"	0005  RAD Audio",
+"	0006  HPCEX",
+"	0007  RPCEX",
+"	0008  DiVO VIP",
+"	0009  AceNIC Gigabit Ethernet",
+"		10a9 8002  AceNIC Gigabit Ethernet",
+"	0010  AMP Video I/O",
+"	0011  GRIP",
+"	0012  SGH PSHAC GSN",
+"	1001  Magic Carpet",
+"	1002  Lithium",
+"	1003  Dual JPEG 1",
+"	1004  Dual JPEG 2",
+"	1005  Dual JPEG 3",
+"	1006  Dual JPEG 4",
+"	1007  Dual JPEG 5",
+"	1008  Cesium",
+"	100a  IOC4 I/O controller",
+"	2001  Fibre Channel",
+"	2002  ASDE",
+"	4001  TIO-CE PCI Express Bridge",
+"	4002  TIO-CE PCI Express Port",
+"	8001  O2 1394",
+"	8002  G-net NT",
+"	8010  Broadcom e-net [SGI IO9/IO10 BaseIO]",
+"	8018  Broadcom e-net [SGI A330 Server BaseIO]",
+"10aa  ACC Microelectronics",
+"	0000  ACCM 2188",
+"10ab  Digicom",
+"10ac  Honeywell IAC",
+"10ad  Symphony Labs",
+"	0001  W83769F",
+"	0003  SL82C103",
+"	0005  SL82C105",
+"	0103  SL82c103",
+"	0105  SL82c105",
+"	0565  W83C553",
+"10ae  Cornerstone Technology",
+"10af  Micro Computer Systems Inc",
+"10b0  CardExpert Technology",
+"10b1  Cabletron Systems Inc",
+"10b2  Raytheon Company",
+"10b3  Databook Inc",
+"	3106  DB87144",
+"	b106  DB87144",
+"10b4  STB Systems Inc",
+"	1b1d  Velocity 128 3D",
+"		10b4 237e  Velocity 4400",
+"10b5  PLX Technology, Inc.",
+"	0001  i960 PCI bus interface",
+"	1042  Brandywine / jxi2, Inc. - PMC-SyncClock32, IRIG A & B, Nasa 36",
+"	1076  VScom 800 8 port serial adaptor",
+"	1077  VScom 400 4 port serial adaptor",
+"	1078  VScom 210 2 port serial and 1 port parallel adaptor",
+"	1103  VScom 200 2 port serial adaptor",
+"	1146  VScom 010 1 port parallel adaptor",
+"	1147  VScom 020 2 port parallel adaptor",
+"	2540  IXXAT CAN-Interface PC-I 04/PCI",
+"	2724  Thales PCSM Security Card",
+"	6540  PCI6540/6466 PCI-PCI bridge (transparent mode)",
+"		4c53 10e0  PSL09 PrPMC",
+"	6541  PCI6540/6466 PCI-PCI bridge (non-transparent mode, primary side)",
+"		4c53 10e0  PSL09 PrPMC",
+"	6542  PCI6540/6466 PCI-PCI bridge (non-transparent mode, secondary side)",
+"		4c53 10e0  PSL09 PrPMC",
+"	8111  PEX 8111 PCI Express-to-PCI Bridge",
+"	8114  PEX 8114 PCI Express-to-PCI/PCI-X Bridge",
+"	8516  PEX 8516  Versatile PCI Express Switch",
+"	8532  PEX 8532  Versatile PCI Express Switch",
+"	9030  PCI <-> IOBus Bridge Hot Swap",
+"		10b5 2862  Alpermann+Velte PCL PCI LV (3V/5V): Timecode Reader Board",
+"		10b5 2906  Alpermann+Velte PCI TS (3V/5V): Time Synchronisation Board",
+"		10b5 2940  Alpermann+Velte PCL PCI D (3V/5V): Timecode Reader Board",
+"		10b5 2977  IXXAT iPC-I XC16/PCI CAN Board",
+"		10b5 2978  SH ARC-PCIu SOHARD ARCNET card",
+"		10b5 3025  Alpermann+Velte PCL PCI L (3V/5V): Timecode Reader Board",
+"		10b5 3068  Alpermann+Velte PCL PCI HD (3V/5V): Timecode Reader Board",
+"		1397 3136  4xS0-ISDN PCI Adapter",
+"		1397 3137  S2M-E1-ISDN PCI Adapter",
+"		1518 0200  Kontron ThinkIO-C",
+"		15ed 1002  MCCS 8-port Serial Hot Swap",
+"		15ed 1003  MCCS 16-port Serial Hot Swap",
+"	9036  9036",
+"	9050  PCI <-> IOBus Bridge",
+"		10b5 1067  IXXAT CAN i165",
+"		10b5 1172  IK220 (Heidenhain)",
+"		10b5 2036  SatPak GPS",
+"		10b5 2221  Alpermann+Velte PCL PCI LV: Timecode Reader Board",
+"		10b5 2273  SH ARC-PCI SOHARD ARCNET card",
+"		10b5 2431  Alpermann+Velte PCL PCI D: Timecode Reader Board",
+"		10b5 2905  Alpermann+Velte PCI TS: Time Synchronisation Board",
+"		10b5 9050  MP9050",
+"		1498 0362  TPMC866 8 Channel Serial Card",
+"		1522 0001  RockForce 4 Port V.90 Data/Fax/Voice Modem",
+"		1522 0002  RockForce 2 Port V.90 Data/Fax/Voice Modem",
+"		1522 0003  RockForce 6 Port V.90 Data/Fax/Voice Modem",
+"		1522 0004  RockForce 8 Port V.90 Data/Fax/Voice Modem",
+"		1522 0010  RockForce2000 4 Port V.90 Data/Fax/Voice Modem",
+"		1522 0020  RockForce2000 2 Port V.90 Data/Fax/Voice Modem",
+"		15ed 1000  Macrolink MCCS 8-port Serial",
+"		15ed 1001  Macrolink MCCS 16-port Serial",
+"		15ed 1002  Macrolink MCCS 8-port Serial Hot Swap",
+"		15ed 1003  Macrolink MCCS 16-port Serial Hot Swap",
+"		5654 2036  OpenSwitch 6 Telephony card",
+"		5654 3132  OpenSwitch 12 Telephony card",
+"		5654 5634  OpenLine4 Telephony Card",
+"		d531 c002  PCIntelliCAN 2xSJA1000 CAN bus",
+"		d84d 4006  EX-4006 1P",
+"		d84d 4008  EX-4008 1P EPP/ECP",
+"		d84d 4014  EX-4014 2P",
+"		d84d 4018  EX-4018 3P EPP/ECP",
+"		d84d 4025  EX-4025 1S(16C550) RS-232",
+"		d84d 4027  EX-4027 1S(16C650) RS-232",
+"		d84d 4028  EX-4028 1S(16C850) RS-232",
+"		d84d 4036  EX-4036 2S(16C650) RS-232",
+"		d84d 4037  EX-4037 2S(16C650) RS-232",
+"		d84d 4038  EX-4038 2S(16C850) RS-232",
+"		d84d 4052  EX-4052 1S(16C550) RS-422/485",
+"		d84d 4053  EX-4053 2S(16C550) RS-422/485",
+"		d84d 4055  EX-4055 4S(16C550) RS-232",
+"		d84d 4058  EX-4055 4S(16C650) RS-232",
+"		d84d 4065  EX-4065 8S(16C550) RS-232",
+"		d84d 4068  EX-4068 8S(16C650) RS-232",
+"		d84d 4078  EX-4078 2S(16C552) RS-232+1P",
+"	9054  PCI <-> IOBus Bridge",
+"		10b5 2455  Wessex Techology PHIL-PCI",
+"		10b5 2696  Innes Corp AM Radcap card",
+"		10b5 2717  Innes Corp Auricon card",
+"		10b5 2844  Innes Corp TVS Encoder card",
+"		12c7 4001  Intel Dialogic DM/V960-4T1 PCI",
+"		12d9 0002  PCI Prosody Card rev 1.5",
+"		16df 0011  PIKA PrimeNet MM PCI",
+"		16df 0012  PIKA PrimeNet MM cPCI 8",
+"		16df 0013  PIKA PrimeNet MM cPCI 8 (without CAS Signaling)",
+"		16df 0014  PIKA PrimeNet MM cPCI 4",
+"		16df 0015  PIKA Daytona MM",
+"		16df 0016  PIKA InLine MM",
+"	9056  Francois",
+"		10b5 2979  CellinkBlade 11 - CPCI board VoATM AAL1",
+"	9060  9060",
+"	906d  9060SD",
+"		125c 0640  Aries 16000P",
+"	906e  9060ES",
+"	9080  9080",
+"		103c 10eb  (Agilent) E2777B 83K Series Optical Communication Interface",
+"		103c 10ec  (Agilent) E6978-66442 PCI CIC",
+"		10b5 9080  9080 [real subsystem ID not set]",
+"		129d 0002  Aculab PCI Prosidy card",
+"		12d9 0002  PCI Prosody Card",
+"		12df 4422  4422PCI ['Do-All' Telemetry Data Aquisition System]",
+"	bb04  B&B 3PCIOSD1A Isolated PCI Serial",
+"10b6  Madge Networks",
+"	0001  Smart 16/4 PCI Ringnode",
+"	0002  Smart 16/4 PCI Ringnode Mk2",
+"		10b6 0002  Smart 16/4 PCI Ringnode Mk2",
+"		10b6 0006  16/4 CardBus Adapter",
+"	0003  Smart 16/4 PCI Ringnode Mk3",
+"		0e11 b0fd  Compaq NC4621 PCI, 4/16, WOL",
+"		10b6 0003  Smart 16/4 PCI Ringnode Mk3",
+"		10b6 0007  Presto PCI Plus Adapter",
+"	0004  Smart 16/4 PCI Ringnode Mk1",
+"	0006  16/4 Cardbus Adapter",
+"		10b6 0006  16/4 CardBus Adapter",
+"	0007  Presto PCI Adapter",
+"		10b6 0007  Presto PCI",
+"	0009  Smart 100/16/4 PCI-HS Ringnode",
+"		10b6 0009  Smart 100/16/4 PCI-HS Ringnode",
+"	000a  Smart 100/16/4 PCI Ringnode",
+"		10b6 000a  Smart 100/16/4 PCI Ringnode",
+"	000b  16/4 CardBus Adapter Mk2",
+"		10b6 0008  16/4 CardBus Adapter Mk2",
+"		10b6 000b  16/4 Cardbus Adapter Mk2",
+"	000c  RapidFire 3140V2 16/4 TR Adapter",
+"		10b6 000c  RapidFire 3140V2 16/4 TR Adapter",
+"	1000  Collage 25/155 ATM Client Adapter",
+"	1001  Collage 155 ATM Server Adapter",
+"10b7  3Com Corporation",
+"	0001  3c985 1000BaseSX (SX/TX)",
+"	0013  AR5212 802.11abg NIC (3CRDAG675)",
+"		10b7 2031  3CRDAG675 11a/b/g Wireless PCI Adapter",
+"	0910  3C910-A01",
+"	1006  MINI PCI type 3B Data Fax Modem",
+"	1007  Mini PCI 56k Winmodem",
+"		10b7 615c  Mini PCI 56K Modem",
+"	1201  3c982-TXM 10/100baseTX Dual Port A [Hydra]",
+"	1202  3c982-TXM 10/100baseTX Dual Port B [Hydra]",
+"	1700  3c940 10/100/1000Base-T [Marvell]",
+"		1043 80eb  A7V600/P4P800/K8V motherboard",
+"		10b7 0010  3C940 Gigabit LOM Ethernet Adapter",
+"		10b7 0020  3C941 Gigabit LOM Ethernet Adapter",
+"		147b 1407  KV8-MAX3 motherboard",
+"	3390  3c339 TokenLink Velocity",
+"	3590  3c359 TokenLink Velocity XL",
+"		10b7 3590  TokenLink Velocity XL Adapter (3C359/359B)",
+"	4500  3c450 HomePNA [Tornado]",
+"	5055  3c555 Laptop Hurricane",
+"	5057  3c575 Megahertz 10/100 LAN CardBus [Boomerang]",
+"		10b7 5a57  3C575 Megahertz 10/100 LAN Cardbus PC Card",
+"	5157  3cCFE575BT Megahertz 10/100 LAN CardBus [Cyclone]",
+"		10b7 5b57  3C575 Megahertz 10/100 LAN Cardbus PC Card",
+"	5257  3cCFE575CT CardBus [Cyclone]",
+"		10b7 5c57  FE575C-3Com 10/100 LAN CardBus-Fast Ethernet",
+"	5900  3c590 10BaseT [Vortex]",
+"	5920  3c592 EISA 10mbps Demon/Vortex",
+"	5950  3c595 100BaseTX [Vortex]",
+"	5951  3c595 100BaseT4 [Vortex]",
+"	5952  3c595 100Base-MII [Vortex]",
+"	5970  3c597 EISA Fast Demon/Vortex",
+"	5b57  3c595 Megahertz 10/100 LAN CardBus [Boomerang]",
+"		10b7 5b57  3C575 Megahertz 10/100 LAN Cardbus PC Card",
+"	6000  3CRSHPW796 [OfficeConnect Wireless CardBus]",
+"	6001  3com 3CRWE154G72 [Office Connect Wireless LAN Adapter]",
+"	6055  3c556 Hurricane CardBus [Cyclone]",
+"	6056  3c556B CardBus [Tornado]",
+"		10b7 6556  10/100 Mini PCI Ethernet Adapter",
+"	6560  3cCFE656 CardBus [Cyclone]",
+"		10b7 656a  3CCFEM656 10/100 LAN+56K Modem CardBus",
+"	6561  3cCFEM656 10/100 LAN+56K Modem CardBus",
+"		10b7 656b  3CCFEM656 10/100 LAN+56K Modem CardBus",
+"	6562  3cCFEM656B 10/100 LAN+Winmodem CardBus [Cyclone]",
+"		10b7 656b  3CCFEM656B 10/100 LAN+56K Modem CardBus",
+"	6563  3cCFEM656B 10/100 LAN+56K Modem CardBus",
+"		10b7 656b  3CCFEM656 10/100 LAN+56K Modem CardBus",
+"	6564  3cXFEM656C 10/100 LAN+Winmodem CardBus [Tornado]",
+"	7646  3cSOHO100-TX Hurricane",
+"	7770  3CRWE777 PCI(PLX) Wireless Adaptor [Airconnect]",
+"	7940  3c803 FDDILink UTP Controller",
+"	7980  3c804 FDDILink SAS Controller",
+"	7990  3c805 FDDILink DAS Controller",
+"	80eb  3c940B 10/100/1000Base-T",
+"	8811  Token ring",
+"	9000  3c900 10BaseT [Boomerang]",
+"	9001  3c900 10Mbps Combo [Boomerang]",
+"	9004  3c900B-TPO Etherlink XL [Cyclone]",
+"		10b7 9004  3C900B-TPO Etherlink XL TPO 10Mb",
+"	9005  3c900B-Combo Etherlink XL [Cyclone]",
+"		10b7 9005  3C900B-Combo Etherlink XL Combo",
+"	9006  3c900B-TPC Etherlink XL [Cyclone]",
+"	900a  3c900B-FL 10base-FL [Cyclone]",
+"	9050  3c905 100BaseTX [Boomerang]",
+"	9051  3c905 100BaseT4 [Boomerang]",
+"	9055  3c905B 100BaseTX [Cyclone]",
+"		1028 0080  3C905B Fast Etherlink XL 10/100",
+"		1028 0081  3C905B Fast Etherlink XL 10/100",
+"		1028 0082  3C905B Fast Etherlink XL 10/100",
+"		1028 0083  3C905B Fast Etherlink XL 10/100",
+"		1028 0084  3C905B Fast Etherlink XL 10/100",
+"		1028 0085  3C905B Fast Etherlink XL 10/100",
+"		1028 0086  3C905B Fast Etherlink XL 10/100",
+"		1028 0087  3C905B Fast Etherlink XL 10/100",
+"		1028 0088  3C905B Fast Etherlink XL 10/100",
+"		1028 0089  3C905B Fast Etherlink XL 10/100",
+"		1028 0090  3C905B Fast Etherlink XL 10/100",
+"		1028 0091  3C905B Fast Etherlink XL 10/100",
+"		1028 0092  3C905B Fast Etherlink XL 10/100",
+"		1028 0093  3C905B Fast Etherlink XL 10/100",
+"		1028 0094  3C905B Fast Etherlink XL 10/100",
+"		1028 0095  3C905B Fast Etherlink XL 10/100",
+"		1028 0096  3C905B Fast Etherlink XL 10/100",
+"		1028 0097  3C905B Fast Etherlink XL 10/100",
+"		1028 0098  3C905B Fast Etherlink XL 10/100",
+"		1028 0099  3C905B Fast Etherlink XL 10/100",
+"		10b7 9055  3C905B Fast Etherlink XL 10/100",
+"	9056  3c905B-T4 Fast EtherLink XL [Cyclone]",
+"	9058  3c905B Deluxe Etherlink 10/100/BNC [Cyclone]",
+"	905a  3c905B-FX Fast Etherlink XL FX 100baseFx [Cyclone]",
+"	9200  3c905C-TX/TX-M [Tornado]",
+"		1028 0095  3C920 Integrated Fast Ethernet Controller",
+"		1028 0097  3C920 Integrated Fast Ethernet Controller",
+"		1028 00fe  Optiplex GX240",
+"		1028 012a  3C920 Integrated Fast Ethernet Controller [Latitude C640]",
+"		10b7 1000  3C905C-TX Fast Etherlink for PC Management NIC",
+"		10b7 7000  10/100 Mini PCI Ethernet Adapter",
+"		10f1 2466  Tiger MPX S2466 (3C920 Integrated Fast Ethernet Controller)",
+"	9201  3C920B-EMB Integrated Fast Ethernet Controller [Tornado]",
+"		1043 80ab  A7N8X Deluxe onboard 3C920B-EMB Integrated Fast Ethernet Controller",
+"	9202  3Com 3C920B-EMB-WNM Integrated Fast Ethernet Controller",
+"	9210  3C920B-EMB-WNM Integrated Fast Ethernet Controller",
+"	9300  3CSOHO100B-TX 910-A01 [tulip]",
+"	9800  3c980-TX Fast Etherlink XL Server Adapter [Cyclone]",
+"		10b7 9800  3c980-TX Fast Etherlink XL Server Adapter",
+"	9805  3c980-C 10/100baseTX NIC [Python-T]",
+"		10b7 1201  EtherLink Server 10/100 Dual Port A",
+"		10b7 1202  EtherLink Server 10/100 Dual Port B",
+"		10b7 9805  3c980 10/100baseTX NIC [Python-T]",
+"		10f1 2462  Thunder K7 S2462",
+"	9900  3C990-TX [Typhoon]",
+"	9902  3CR990-TX-95 [Typhoon 56-bit]",
+"	9903  3CR990-TX-97 [Typhoon 168-bit]",
+"	9904  3C990B-TX-M/3C990BSVR [Typhoon2]",
+"		10b7 1000  3CR990B-TX-M [Typhoon2]",
+"		10b7 2000  3CR990BSVR [Typhoon2 Server]",
+"	9905  3CR990-FX-95/97/95 [Typhon Fiber]",
+"		10b7 1101  3CR990-FX-95 [Typhoon Fiber 56-bit]",
+"		10b7 1102  3CR990-FX-97 [Typhoon Fiber 168-bit]",
+"		10b7 2101  3CR990-FX-95 Server [Typhoon Fiber 56-bit]",
+"		10b7 2102  3CR990-FX-97 Server [Typhoon Fiber 168-bit]",
+"	9908  3CR990SVR95 [Typhoon Server 56-bit]",
+"	9909  3CR990SVR97 [Typhoon Server 168-bit]",
+"	990a  3C990SVR [Typhoon Server]",
+"	990b  3C990SVR [Typhoon Server]",
+"10b8  Standard Microsystems Corp [SMC]",
+"	0005  83c170 EPIC/100 Fast Ethernet Adapter",
+"		1055 e000  LANEPIC 10/100 [EVB171Q-PCI]",
+"		1055 e002  LANEPIC 10/100 [EVB171G-PCI]",
+"		10b8 a011  EtherPower II 10/100",
+"		10b8 a014  EtherPower II 10/100",
+"		10b8 a015  EtherPower II 10/100",
+"		10b8 a016  EtherPower II 10/100",
+"		10b8 a017  EtherPower II 10/100",
+"	0006  83c175 EPIC/100 Fast Ethernet Adapter",
+"		1055 e100  LANEPIC Cardbus Fast Ethernet Adapter",
+"		1055 e102  LANEPIC Cardbus Fast Ethernet Adapter",
+"		1055 e300  LANEPIC Cardbus Fast Ethernet Adapter",
+"		1055 e302  LANEPIC Cardbus Fast Ethernet Adapter",
+"		10b8 a012  LANEPIC Cardbus Fast Ethernet Adapter",
+"		13a2 8002  LANEPIC Cardbus Fast Ethernet Adapter",
+"		13a2 8006  LANEPIC Cardbus Fast Ethernet Adapter",
+"	1000  FDC 37c665",
+"	1001  FDC 37C922",
+"	2802  SMC2802W [EZ Connect g]",
+"	a011  83C170QF",
+"	b106  SMC34C90",
+"10b9  ALi Corporation",
+"	0101  CMI8338/C3DX PCI Audio Device",
+"	0111  C-Media CMI8738/C3DX Audio Device (OEM)",
+"		10b9 0111  C-Media CMI8738/C3DX Audio Device (OEM)",
+"	0780  Multi-IO Card",
+"	0782  Multi-IO Card",
+"	1435  M1435",
+"	1445  M1445",
+"	1449  M1449",
+"	1451  M1451",
+"	1461  M1461",
+"	1489  M1489",
+"	1511  M1511 [Aladdin]",
+"	1512  M1512 [Aladdin]",
+"	1513  M1513 [Aladdin]",
+"	1521  M1521 [Aladdin III]",
+"		10b9 1521  ALI M1521 Aladdin III CPU Bridge",
+"	1523  M1523",
+"		10b9 1523  ALI M1523 ISA Bridge",
+"	1531  M1531 [Aladdin IV]",
+"	1533  M1533/M1535 PCI to ISA Bridge [Aladdin IV/V/V+]",
+"		1014 053b  ThinkPad R40e (2684-HVG) PCI to ISA Bridge",
+"		10b9 1533  ALi M1533 Aladdin IV/V ISA Bridge",
+"	1541  M1541",
+"		10b9 1541  ALI M1541 Aladdin V/V+ AGP System Controller",
+"	1543  M1543",
+"	1563  M1563 HyperTransport South Bridge",
+"	1573  PCI to LPC Controller",
+"	1621  M1621",
+"	1631  ALI M1631 PCI North Bridge Aladdin Pro III",
+"	1632  M1632M Northbridge+Trident",
+"	1641  ALI M1641 PCI North Bridge Aladdin Pro IV",
+"	1644  M1644/M1644T Northbridge+Trident",
+"	1646  M1646 Northbridge+Trident",
+"	1647  M1647 Northbridge [MAGiK 1 / MobileMAGiK 1]",
+"	1651  M1651/M1651T Northbridge [Aladdin-Pro 5/5M,Aladdin-Pro 5T/5TM]",
+"	1671  M1671 Super P4 Northbridge [AGP4X,PCI and SDR/DDR]",
+"	1672  M1672 Northbridge [CyberALADDiN-P4]",
+"	1681  M1681 P4 Northbridge [AGP8X,HyperTransport and SDR/DDR]",
+"	1687  M1687 K8 Northbridge [AGP8X and HyperTransport]",
+"	1689  M1689 K8 Northbridge [Super K8 Single Chip]",
+"	1695  M1695 K8 Northbridge [PCI Express and HyperTransport]",
+"	1697  M1697 HTT Host Bridge",
+"	3141  M3141",
+"	3143  M3143",
+"	3145  M3145",
+"	3147  M3147",
+"	3149  M3149",
+"	3151  M3151",
+"	3307  M3307",
+"	3309  M3309",
+"	3323  M3325 Video/Audio Decoder",
+"	5212  M4803",
+"	5215  MS4803",
+"	5217  M5217H",
+"	5219  M5219",
+"	5225  M5225",
+"	5228  M5228 ALi ATA/RAID Controller",
+"	5229  M5229 IDE",
+"		1014 050f  ThinkPad R30",
+"		1014 053d  ThinkPad R40e (2684-HVG) builtin IDE",
+"		103c 0024  Pavilion ze4400 builtin IDE",
+"		1043 8053  A7A266 Motherboard IDE",
+"	5235  M5225",
+"	5237  USB 1.1 Controller",
+"		1014 0540  ThinkPad R40e (2684-HVG) builtin USB",
+"		103c 0024  Pavilion ze4400 builtin USB",
+"		104d 810f  VAIO PCG-U1 USB/OHCI Revision 1.0",
+"	5239  USB 2.0 Controller",
+"	5243  M1541 PCI to AGP Controller",
+"	5246  AGP8X Controller",
+"	5247  PCI to AGP Controller",
+"	5249  M5249 HTT to PCI Bridge",
+"	524b  PCI Express Root Port",
+"	524c  PCI Express Root Port",
+"	524d  PCI Express Root Port",
+"	524e  PCI Express Root Port",
+"	5251  M5251 P1394 OHCI 1.0 Controller",
+"	5253  M5253 P1394 OHCI 1.1 Controller",
+"	5261  M5261 Ethernet Controller",
+"	5263  M5263 Ethernet Controller",
+"	5281  ALi M5281 Serial ATA / RAID Host Controller",
+"	5287  ULi 5287 SATA",
+"	5288  ULi M5288 SATA",
+"	5289  ULi 5289 SATA",
+"	5450  Lucent Technologies Soft Modem AMR",
+"	5451  M5451 PCI AC-Link Controller Audio Device",
+"		1014 0506  ThinkPad R30",
+"		1014 053e  ThinkPad R40e (2684-HVG) builtin Audio",
+"		103c 0024  Pavilion ze4400 builtin Audio",
+"		10b9 5451  HP Compaq nc4010 (DY885AA#ABN)",
+"	5453  M5453 PCI AC-Link Controller Modem Device",
+"	5455  M5455 PCI AC-Link Controller Audio Device",
+"	5457  M5457 AC'97 Modem Controller",
+"		1014 0535  ThinkPad R40e (2684-HVG) builtin modem",
+"		103c 0024  Pavilion ze4400 builtin Modem Device",
+"	5459  SmartLink SmartPCI561 56K Modem",
+"	545a  SmartLink SmartPCI563 56K Modem",
+"	5461  High Definition Audio/AC'97 Host Controller",
+"	5471  M5471 Memory Stick Controller",
+"	5473  M5473 SD-MMC Controller",
+"	7101  M7101 Power Management Controller [PMU]",
+"		1014 0510  ThinkPad R30",
+"		1014 053c  ThinkPad R40e (2684-HVG) Power Management Controller",
+"		103c 0024  Pavilion ze4400",
+"10ba  Mitsubishi Electric Corp.",
+"	0301  AccelGraphics AccelECLIPSE",
+"	0304  AccelGALAXY A2100 [OEM Evans & Sutherland]",
+"	0308  Tornado 3000 [OEM Evans & Sutherland]",
+"	1002  VG500 [VolumePro Volume Rendering Accelerator]",
+"10bb  Dapha Electronics Corporation",
+"10bc  Advanced Logic Research",
+"10bd  Surecom Technology",
+"	0e34  NE-34",
+"10be  Tseng Labs International Co.",
+"10bf  Most Inc",
+"10c0  Boca Research Inc.",
+"10c1  ICM Co., Ltd.",
+"10c2  Auspex Systems Inc.",
+"10c3  Samsung Semiconductors, Inc.",
+"	1100  Smartether100 SC1100 LAN Adapter (i82557B)",
+"10c4  Award Software International Inc.",
+"10c5  Xerox Corporation",
+"10c6  Rambus Inc.",
+"10c7  Media Vision",
+"10c8  Neomagic Corporation",
+"	0001  NM2070 [MagicGraph 128]",
+"	0002  NM2090 [MagicGraph 128V]",
+"	0003  NM2093 [MagicGraph 128ZV]",
+"	0004  NM2160 [MagicGraph 128XD]",
+"		1014 00ba  MagicGraph 128XD",
+"		1025 1007  MagicGraph 128XD",
+"		1028 0074  MagicGraph 128XD",
+"		1028 0075  MagicGraph 128XD",
+"		1028 007d  MagicGraph 128XD",
+"		1028 007e  MagicGraph 128XD",
+"		1033 802f  MagicGraph 128XD",
+"		104d 801b  MagicGraph 128XD",
+"		104d 802f  MagicGraph 128XD",
+"		104d 830b  MagicGraph 128XD",
+"		10ba 0e00  MagicGraph 128XD",
+"		10c8 0004  MagicGraph 128XD",
+"		10cf 1029  MagicGraph 128XD",
+"		10f7 8308  MagicGraph 128XD",
+"		10f7 8309  MagicGraph 128XD",
+"		10f7 830b  MagicGraph 128XD",
+"		10f7 830d  MagicGraph 128XD",
+"		10f7 8312  MagicGraph 128XD",
+"	0005  NM2200 [MagicGraph 256AV]",
+"		1014 00dd  ThinkPad 570",
+"		1028 0088  Latitude CPi A",
+"	0006  NM2360 [MagicMedia 256ZX]",
+"	0016  NM2380 [MagicMedia 256XL+]",
+"		10c8 0016  MagicMedia 256XL+",
+"	0025  NM2230 [MagicGraph 256AV+]",
+"	0083  NM2093 [MagicGraph 128ZV+]",
+"	8005  NM2200 [MagicMedia 256AV Audio]",
+"		0e11 b0d1  MagicMedia 256AV Audio Device on Discovery",
+"		0e11 b126  MagicMedia 256AV Audio Device on Durango",
+"		1014 00dd  MagicMedia 256AV Audio Device on BlackTip Thinkpad",
+"		1025 1003  MagicMedia 256AV Audio Device on TravelMate 720",
+"		1028 0088  Latitude CPi A",
+"		1028 008f  MagicMedia 256AV Audio Device on Colorado Inspiron",
+"		103c 0007  MagicMedia 256AV Audio Device on Voyager II",
+"		103c 0008  MagicMedia 256AV Audio Device on Voyager III",
+"		103c 000d  MagicMedia 256AV Audio Device on Omnibook 900",
+"		10c8 8005  MagicMedia 256AV Audio Device on FireAnt",
+"		110a 8005  MagicMedia 256AV Audio Device",
+"		14c0 0004  MagicMedia 256AV Audio Device",
+"	8006  NM2360 [MagicMedia 256ZX Audio]",
+"	8016  NM2380 [MagicMedia 256XL+ Audio]",
+"10c9  Dataexpert Corporation",
+"10ca  Fujitsu Microelectr., Inc.",
+"10cb  Omron Corporation",
+"10cc  Mai Logic Incorporated",
+"	0660  Articia S Host Bridge",
+"	0661  Articia S PCI Bridge",
+"10cd  Advanced System Products, Inc",
+"	1100  ASC1100",
+"	1200  ASC1200 [(abp940) Fast SCSI-II]",
+"	1300  ABP940-U / ABP960-U",
+"		10cd 1310  ASC1300 SCSI Adapter",
+"	2300  ABP940-UW",
+"	2500  ABP940-U2W",
+"10ce  Radius",
+"10cf  Fujitsu Limited.",
+"	2001  mb86605",
+"10d1  FuturePlus Systems Corp.",
+"10d2  Molex Incorporated",
+"10d3  Jabil Circuit Inc",
+"10d4  Hualon Microelectronics",
+"10d5  Autologic Inc.",
+"10d6  Cetia",
+"10d7  BCM Advanced Research",
+"10d8  Advanced Peripherals Labs",
+"10d9  Macronix, Inc. [MXIC]",
+"	0431  MX98715",
+"	0512  MX98713",
+"	0531  MX987x5",
+"		1186 1200  DFE-540TX ProFAST 10/100 Adapter",
+"	8625  MX86250",
+"	8626  Macronix MX86251 + 3Dfx Voodoo Rush",
+"	8888  MX86200",
+"10da  Compaq IPG-Austin",
+"	0508  TC4048 Token Ring 4/16",
+"	3390  Tl3c3x9",
+"10db  Rohm LSI Systems, Inc.",
+"10dc  CERN/ECP/EDU",
+"	0001  STAR/RD24 SCI-PCI (PMC)",
+"	0002  TAR/RD24 SCI-PCI (PMC)",
+"	0021  HIPPI destination",
+"	0022  HIPPI source",
+"	10dc  ATT2C15-3 FPGA",
+"10dd  Evans & Sutherland",
+"	0100  Lightning 1200",
+"10de  nVidia Corporation",
+"	0008  NV1 [EDGE 3D]",
+"	0009  NV1 [EDGE 3D]",
+"	0010  NV2 [Mutara V08]",
+"	0020  NV4 [RIVA TNT]",
+"		1043 0200  V3400 TNT",
+"		1048 0c18  Erazor II SGRAM",
+"		1048 0c19  Erazor II",
+"		1048 0c1b  Erazor II",
+"		1048 0c1c  Erazor II",
+"		1092 0550  Viper V550",
+"		1092 0552  Viper V550",
+"		1092 4804  Viper V550",
+"		1092 4808  Viper V550",
+"		1092 4810  Viper V550",
+"		1092 4812  Viper V550",
+"		1092 4815  Viper V550",
+"		1092 4820  Viper V550 with TV out",
+"		1092 4822  Viper V550",
+"		1092 4904  Viper V550",
+"		1092 4914  Viper V550",
+"		1092 8225  Viper V550",
+"		10b4 273d  Velocity 4400",
+"		10b4 273e  Velocity 4400",
+"		10b4 2740  Velocity 4400",
+"		10de 0020  Riva TNT",
+"		1102 1015  Graphics Blaster CT6710",
+"		1102 1016  Graphics Blaster RIVA TNT",
+"	0028  NV5 [RIVA TNT2/TNT2 Pro]",
+"		1043 0200  AGP-V3800 SGRAM",
+"		1043 0201  AGP-V3800 SDRAM",
+"		1043 0205  PCI-V3800",
+"		1043 4000  AGP-V3800PRO",
+"		1048 0c21  Synergy II",
+"		1048 0c28  Erazor III",
+"		1048 0c29  Erazor III",
+"		1048 0c2a  Erazor III",
+"		1048 0c2b  Erazor III",
+"		1048 0c31  Erazor III Pro",
+"		1048 0c32  Erazor III Pro",
+"		1048 0c33  Erazor III Pro",
+"		1048 0c34  Erazor III Pro",
+"		107d 2134  WinFast 3D S320 II + TV-Out",
+"		1092 4804  Viper V770",
+"		1092 4a00  Viper V770",
+"		1092 4a02  Viper V770 Ultra",
+"		1092 5a00  RIVA TNT2/TNT2 Pro",
+"		1092 6a02  Viper V770 Ultra",
+"		1092 7a02  Viper V770 Ultra",
+"		10de 0005  RIVA TNT2 Pro",
+"		10de 000f  Compaq NVIDIA TNT2 Pro",
+"		1102 1020  3D Blaster RIVA TNT2",
+"		1102 1026  3D Blaster RIVA TNT2 Digital",
+"		14af 5810  Maxi Gamer Xentor",
+"	0029  NV5 [RIVA TNT2 Ultra]",
+"		1043 0200  AGP-V3800 Deluxe",
+"		1043 0201  AGP-V3800 Ultra SDRAM",
+"		1043 0205  PCI-V3800 Ultra",
+"		1048 0c2e  Erazor III Ultra",
+"		1048 0c2f  Erazor III Ultra",
+"		1048 0c30  Erazor III Ultra",
+"		1102 1021  3D Blaster RIVA TNT2 Ultra",
+"		1102 1029  3D Blaster RIVA TNT2 Ultra",
+"		1102 102f  3D Blaster RIVA TNT2 Ultra",
+"		14af 5820  Maxi Gamer Xentor 32",
+"	002a  NV5 [Riva TnT2]",
+"	002b  NV5 [Riva TnT2]",
+"	002c  NV6 [Vanta/Vanta LT]",
+"		1043 0200  AGP-V3800 Combat SDRAM",
+"		1043 0201  AGP-V3800 Combat",
+"		1048 0c20  TNT2 Vanta",
+"		1048 0c21  TNT2 Vanta",
+"		1092 6820  Viper V730",
+"		1102 1031  CT6938 VANTA 8MB",
+"		1102 1034  CT6894 VANTA 16MB",
+"		14af 5008  Maxi Gamer Phoenix 2",
+"	002d  NV5M64 [RIVA TNT2 Model 64/Model 64 Pro]",
+"		1043 0200  AGP-V3800M",
+"		1043 0201  AGP-V3800M",
+"		1048 0c3a  Erazor III LT",
+"		1048 0c3b  Erazor III LT",
+"		10de 001e  M64 AGP4x",
+"		1102 1023  CT6892 RIVA TNT2 Value",
+"		1102 1024  CT6932 RIVA TNT2 Value 32Mb",
+"		1102 102c  CT6931 RIVA TNT2 Value [Jumper]",
+"		1462 8808  MSI-8808",
+"		1554 1041  Pixelview RIVA TNT2 M64",
+"		1569 002d  Palit Microsystems Daytona TNT2 M64",
+"	002e  NV6 [Vanta]",
+"	002f  NV6 [Vanta]",
+"	0034  MCP04 SMBus",
+"	0035  MCP04 IDE",
+"	0036  MCP04 Serial ATA Controller",
+"	0037  MCP04 Ethernet Controller",
+"	0038  MCP04 Ethernet Controller",
+"	003a  MCP04 AC'97 Audio Controller",
+"	003b  MCP04 USB Controller",
+"	003c  MCP04 USB Controller",
+"	003d  MCP04 PCI Bridge",
+"	003e  MCP04 Serial ATA Controller",
+"	0040  NV40 [GeForce 6800 Ultra]",
+"	0041  NV40 [GeForce 6800]",
+"		1043 817b  V9999 Gamer Edition",
+"	0042  NV40.2 [GeForce 6800 LE]",
+"	0043  NV40.3",
+"	0044  NV40 [GeForce 6800 XT]",
+"	0045  NV40 [GeForce 6800 GT]",
+"	0047  NV40 [GeForce 6800 GS]",
+"		1682 2109  GeForce 6800 GS",
+"	0049  NV40GL",
+"	004e  NV40GL [Quadro FX 4000]",
+"	0050  CK804 ISA Bridge",
+"		1043 815a  K8N4-E Mainboard",
+"		1458 0c11  GA-K8N Ultra-9 Mainboard",
+"		1462 7100  MSI K8N Diamond",
+"	0051  CK804 ISA Bridge",
+"	0052  CK804 SMBus",
+"		1043 815a  K8N4-E Mainboard",
+"		1458 0c11  GA-K8N Ultra-9 Mainboard",
+"		1462 7100  MSI K8N Diamond",
+"	0053  CK804 IDE",
+"		1043 815a  K8N4-E Mainboard",
+"		1458 5002  GA-K8N Ultra-9 Mainboard",
+"		1462 7100  MSI K8N Diamond",
+"	0054  CK804 Serial ATA Controller",
+"		1458 b003  GA-K8N Ultra-9 Mainboard",
+"		1462 7100  MSI K8N Diamond",
+"	0055  CK804 Serial ATA Controller",
+"		1043 815a  K8N4-E Mainboard",
+"		1458 b003  GA-K8N Ultra-9 Mainboard",
+"	0056  CK804 Ethernet Controller",
+"	0057  CK804 Ethernet Controller",
+"		1043 8141  K8N4-E Mainboard",
+"		1458 e000  GA-K8N Ultra-9 Mainboard",
+"		1462 7100  MSI K8N Diamond",
+"	0058  CK804 AC'97 Modem",
+"	0059  CK804 AC'97 Audio Controller",
+"		1043 812a  K8N4-E Mainboard",
+"	005a  CK804 USB Controller",
+"		1043 815a  K8N4-E Mainboard",
+"		1458 5004  GA-K8N Ultra-9 Mainboard",
+"		1462 7100  MSI K8N Diamond",
+"	005b  CK804 USB Controller",
+"		1043 815a  K8N4-E Mainboard",
+"		1458 5004  GA-K8N Ultra-9 Mainboard",
+"		1462 7100  MSI K8N Diamond",
+"	005c  CK804 PCI Bridge",
+"	005d  CK804 PCIE Bridge",
+"	005e  CK804 Memory Controller",
+"		10f1 2891  Thunder K8SRE Mainboard",
+"		1458 5000  GA-K8N Ultra-9 Mainboard",
+"		1462 7100  MSI K8N Diamond",
+"	005f  CK804 Memory Controller",
+"	0060  nForce2 ISA Bridge",
+"		1043 80ad  A7N8X Mainboard",
+"		a0a0 03ba  UK79G-1394 motherboard",
+"	0064  nForce2 SMBus (MCP)",
+"		a0a0 03bb  UK79G-1394 motherboard",
+"	0065  nForce2 IDE",
+"		a0a0 03b2  UK79G-1394 motherboard",
+"	0066  nForce2 Ethernet Controller",
+"		1043 80a7  A7N8X Mainboard onboard nForce2 Ethernet",
+"	0067  nForce2 USB Controller",
+"		1043 0c11  A7N8X Mainboard",
+"	0068  nForce2 USB Controller",
+"		1043 0c11  A7N8X Mainboard",
+"		a0a0 03b4  UK79G-1394 motherboard",
+"	006a  nForce2 AC97 Audio Controler (MCP)",
+"		a0a0 0304  UK79G-1394 motherboard",
+"	006b  nForce Audio Processing Unit",
+"		10de 006b  nForce2 MCP Audio Processing Unit",
+"	006c  nForce2 External PCI Bridge",
+"	006d  nForce2 PCI Bridge",
+"	006e  nForce2 FireWire (IEEE 1394) Controller",
+"		a0a0 0306  UK79G-1394 motherboard",
+"	0080  MCP2A ISA bridge",
+"		147b 1c09  NV7 Motherboard",
+"	0084  MCP2A SMBus",
+"		147b 1c09  NV7 Motherboard",
+"	0085  MCP2A IDE",
+"		147b 1c09  NV7 Motherboard",
+"	0086  MCP2A Ethernet Controller",
+"	0087  MCP2A USB Controller",
+"		147b 1c09  NV7 Motherboard",
+"	0088  MCP2A USB Controller",
+"		147b 1c09  NV7 Motherboard",
+"	008a  MCP2S AC'97 Audio Controller",
+"		147b 1c09  NV7 Motherboard",
+"	008b  MCP2A PCI Bridge",
+"	008c  MCP2A Ethernet Controller",
+"	008e  nForce2 Serial ATA Controller",
+"	0090  G70 [GeForce 7800 GTX]",
+"	0091  G70 [GeForce 7800 GTX]",
+"	0092  G70 [GeForce 7800 GT]",
+"	0093  G70 [GeForce 7800 GS]",
+"	0098  GeForce Go 7800",
+"	0099  GE Force Go 7800 GTX",
+"	009d  G70GL [Quadro FX4500]",
+"	00a0  NV5 [Aladdin TNT2]",
+"		14af 5810  Maxi Gamer Xentor",
+"	00c0  NV41 [GeForce 6800 GS]",
+"	00c1  NV41.1 [GeForce 6800]",
+"	00c2  NV41.2 [GeForce 6800 LE]",
+"	00c3  NV42 [Geforce 6800 XT]",
+"	00c8  NV41.8 [GeForce Go 6800]",
+"	00c9  NV41.9 [GeForce Go 6800 Ultra]",
+"	00cc  NV41 [Quadro FX Go1400]",
+"	00cd  NV41 [Quadro FX 3450/4000 SDI]",
+"	00ce  NV41GL [Quadro FX 1400]",
+"	00d0  nForce3 LPC Bridge",
+"	00d1  nForce3 Host Bridge",
+"	00d2  nForce3 AGP Bridge",
+"	00d3  CK804 Memory Controller",
+"	00d4  nForce3 SMBus",
+"	00d5  nForce3 IDE",
+"	00d6  nForce3 Ethernet",
+"	00d7  nForce3 USB 1.1",
+"	00d8  nForce3 USB 2.0",
+"	00d9  nForce3 Audio",
+"	00da  nForce3 Audio",
+"	00dd  nForce3 PCI Bridge",
+"	00df  CK8S Ethernet Controller",
+"		147b 1c0b  NF8 Mainboard",
+"	00e0  nForce3 250Gb LPC Bridge",
+"		147b 1c0b  NF8 Mainboard",
+"	00e1  nForce3 250Gb Host Bridge",
+"		147b 1c0b  NF8 Mainboard",
+"	00e2  nForce3 250Gb AGP Host to PCI Bridge",
+"	00e3  CK8S Serial ATA Controller (v2.5)",
+"		147b 1c0b  NF8 Mainboard",
+"	00e4  nForce 250Gb PCI System Management",
+"		147b 1c0b  NF8 Mainboard",
+"	00e5  CK8S Parallel ATA Controller (v2.5)",
+"		147b 1c0b  NF8 Mainboard",
+"	00e6  CK8S Ethernet Controller",
+"	00e7  CK8S USB Controller",
+"		147b 1c0b  NF8 Mainboard",
+"	00e8  nForce3 EHCI USB 2.0 Controller",
+"		147b 1c0b  NF8 Mainboard",
+"	00ea  nForce3 250Gb AC'97 Audio Controller",
+"		147b 1c0b  NF8 Mainboard",
+"	00ed  nForce3 250Gb PCI-to-PCI Bridge",
+"	00ee  CK8S Serial ATA Controller (v2.5)",
+"	00f0  NV40 [GeForce 6800/GeForce 6800 Ultra]",
+"	00f1  NV43 [GeForce 6600/GeForce 6600 GT]",
+"		1043 81a6  N6600GT TD 128M AGP",
+"		1682 2119  GeForce 6600 GT AGP 128MB DDR3 DUAL DVI TV",
+"	00f2  NV43 [GeForce 6600/GeForce 6600 GT]",
+"		1682 211c  GeForce 6600 256MB DDR DUAL DVI TV",
+"	00f3  NV43 [GeForce 6200]",
+"	00f4  NV43 [GeForce 6600 LE]",
+"	00f5  G70 [GeForce 7800 GS]",
+"	00f6  NV43 [GeForce 6600 GS]",
+"	00f8  NV45GL [Quadro FX 3400/4400]",
+"	00f9  NV40 [GeForce 6800 Ultra/GeForce 6800 GT]",
+"		1682 2120  GEFORCE 6800 GT PCI-E",
+"	00fa  NV36 [GeForce PCX 5750]",
+"	00fb  NV35 [GeForce PCX 5900]",
+"	00fc  NV37GL [Quadro FX 330/GeForce PCX 5300]",
+"	00fd  NV37GL [Quadro FX 330/Quadro NVS280]",
+"	00fe  NV38GL [Quadro FX 1300]",
+"	00ff  NV18 [GeForce PCX 4300]",
+"	0100  NV10 [GeForce 256 SDR]",
+"		1043 0200  AGP-V6600 SGRAM",
+"		1043 0201  AGP-V6600 SDRAM",
+"		1043 4008  AGP-V6600 SGRAM",
+"		1043 4009  AGP-V6600 SDRAM",
+"		1048 0c41  Erazor X",
+"		1048 0c43  ERAZOR X PCI",
+"		1048 0c48  Synergy Force",
+"		1102 102d  CT6941 GeForce 256",
+"		14af 5022  3D Prophet SE",
+"	0101  NV10DDR [GeForce 256 DDR]",
+"		1043 0202  AGP-V6800 DDR",
+"		1043 400a  AGP-V6800 DDR SGRAM",
+"		1043 400b  AGP-V6800 DDR SDRAM",
+"		1048 0c42  Erazor X",
+"		107d 2822  WinFast GeForce 256",
+"		1102 102e  CT6971 GeForce 256 DDR",
+"		14af 5021  3D Prophet DDR-DVI",
+"	0103  NV10GL [Quadro]",
+"		1048 0c40  GLoria II-64",
+"		1048 0c44  GLoria II",
+"		1048 0c45  GLoria II",
+"		1048 0c4a  GLoria II-64 Pro",
+"		1048 0c4b  GLoria II-64 Pro DVII",
+"	0110  NV11 [GeForce2 MX/MX 400]",
+"		1043 4015  AGP-V7100 Pro",
+"		1043 4031  V7100 Pro with TV output",
+"		1048 0c60  Gladiac MX",
+"		1048 0c61  Gladiac 511PCI",
+"		1048 0c63  Gladiac 511TV-OUT 32MB",
+"		1048 0c64  Gladiac 511TV-OUT 64MB",
+"		1048 0c65  Gladiac 511TWIN",
+"		1048 0c66  Gladiac 311",
+"		10de 0091  Dell OEM GeForce 2 MX 400",
+"		10de 00a1  Apple OEM GeForce2 MX",
+"		1462 8817  MSI GeForce2 MX400 Pro32S [MS-8817]",
+"		14af 7102  3D Prophet II MX",
+"		14af 7103  3D Prophet II MX Dual-Display",
+"	0111  NV11DDR [GeForce2 MX 100 DDR/200 DDR]",
+"	0112  NV11 [GeForce2 Go]",
+"	0113  NV11GL [Quadro2 MXR/EX/Go]",
+"	0140  NV43 [GeForce 6600 GT]",
+"	0141  NV43 [GeForce 6600]",
+"		1458 3124  GV-NX66128DP Turbo Force Edition",
+"	0142  NV43 [GeForce 6600 PCIe]",
+"	0144  NV43 [GeForce Go 6600]",
+"	0145  NV43 [GeForce 6610 XL]",
+"	0146  NV43 [Geforce Go 6600TE/6200TE]",
+"	0148  NV43 [GeForce Go 6600]",
+"	0149  NV43 [GeForce Go 6600 GT]",
+"	014a  Quadro NVS 440",
+"	014c  Quadro FX 550",
+"	014e  NV43GL [Quadro FX 540]",
+"	014f  NV43 [GeForce 6200]",
+"	0150  NV15 [GeForce2 GTS/Pro]",
+"		1043 4016  V7700 AGP Video Card",
+"		1048 0c50  Gladiac",
+"		1048 0c52  Gladiac-64",
+"		107d 2840  WinFast GeForce2 GTS with TV output",
+"		107d 2842  WinFast GeForce 2 Pro",
+"		1462 8831  Creative GeForce2 Pro",
+"	0151  NV15DDR [GeForce2 Ti]",
+"		1043 405f  V7700Ti",
+"		1462 5506  Creative 3D Blaster Geforce2 Titanium",
+"	0152  NV15BR [GeForce2 Ultra, Bladerunner]",
+"		1048 0c56  GLADIAC Ultra",
+"	0153  NV15GL [Quadro2 Pro]",
+"	0161  GeForce 6200 TurboCache(TM)",
+"	0162  NV43 [GeForce 6200 SE]",
+"	0164  NV44 [GeForce Go 6200]",
+"	0165  NV44 [Quadro NVS 285]",
+"	0166  NV43 [GeForce Go 6400]",
+"	0167  GeForce Go 6200 TurboCache",
+"	0168  NV43 [GeForce Go 6200 TurboCache]",
+"	0170  NV17 [GeForce4 MX 460]",
+"	0171  NV17 [GeForce4 MX 440]",
+"		10b0 0002  Gainward Pro/600 TV",
+"		10de 0008  Apple OEM GeForce4 MX 440",
+"		1462 8661  G4MX440-VTP",
+"		1462 8730  MX440SES-T (MS-8873)",
+"		1462 8852  GeForce4 MX440 PCI",
+"		147b 8f00  Abit Siluro GeForce4MX440",
+"	0172  NV17 [GeForce4 MX 420]",
+"	0173  NV17 [GeForce4 MX 440-SE]",
+"	0174  NV17 [GeForce4 440 Go]",
+"	0175  NV17 [GeForce4 420 Go]",
+"	0176  NV17 [GeForce4 420 Go 32M]",
+"		4c53 1090  Cx9 / Vx9 mainboard",
+"	0177  NV17 [GeForce4 460 Go]",
+"	0178  NV17GL [Quadro4 550 XGL]",
+"	0179  NV17 [GeForce4 420 Go 32M]",
+"		10de 0179  GeForce4 MX (Mac)",
+"	017a  NV17GL [Quadro4 200/400 NVS]",
+"	017b  NV17GL [Quadro4 550 XGL]",
+"	017c  NV17GL [Quadro4 500 GoGL]",
+"	017d  NV17 [GeForce4 410 Go 16M]",
+"	0181  NV18 [GeForce4 MX 440 AGP 8x]",
+"		1043 806f  V9180 Magic",
+"		1462 8880  MS-StarForce GeForce4 MX 440 with AGP8X",
+"		1462 8900  MS-8890 GeForce 4 MX440 AGP8X",
+"		1462 9350  MSI Geforce4 MX T8X with AGP8X",
+"		147b 8f0d  Siluro GF4 MX-8X",
+"	0182  NV18 [GeForce4 MX 440SE AGP 8x]",
+"	0183  NV18 [GeForce4 MX 420 AGP 8x]",
+"	0185  NV18 [GeForce4 MX 4000 AGP 8x]",
+"	0186  NV18M [GeForce4 448 Go]",
+"	0187  NV18M [GeForce4 488 Go]",
+"	0188  NV18GL [Quadro4 580 XGL]",
+"	018a  NV18GL [Quadro4 NVS AGP 8x]",
+"	018b  NV18GL [Quadro4 380 XGL]",
+"	018c  Quadro NVS 50 PCI",
+"	018d  NV18M [GeForce4 448 Go]",
+"	01a0  NVCrush11 [GeForce2 MX Integrated Graphics]",
+"	01a4  nForce CPU bridge",
+"	01ab  nForce 420 Memory Controller (DDR)",
+"	01ac  nForce 220/420 Memory Controller",
+"	01ad  nForce 220/420 Memory Controller",
+"	01b0  nForce Audio",
+"	01b1  nForce Audio",
+"	01b2  nForce ISA Bridge",
+"	01b4  nForce PCI System Management",
+"	01b7  nForce AGP to PCI Bridge",
+"	01b8  nForce PCI-to-PCI bridge",
+"	01bc  nForce IDE",
+"	01c1  nForce AC'97 Modem Controller",
+"	01c2  nForce USB Controller",
+"	01c3  nForce Ethernet Controller",
+"	01d1  GeForce 7300 LE",
+"	01d7  Quadro NVS 110M / GeForce Go 7300",
+"	01d8  GeForce Go 7400",
+"	01da  Quadro NVS 110M",
+"	01de  Quadro FX 350",
+"		10de 01dc  Quadro  FX Go350M",
+"	01df  GeForce 7300 GS",
+"	01e0  nForce2 AGP (different version\?)",
+"		147b 1c09  NV7 Motherboard",
+"	01e8  nForce2 AGP",
+"	01ea  nForce2 Memory Controller 0",
+"		a0a0 03b9  UK79G-1394 motherboard",
+"	01eb  nForce2 Memory Controller 1",
+"		a0a0 03b9  UK79G-1394 motherboard",
+"	01ec  nForce2 Memory Controller 2",
+"		a0a0 03b9  UK79G-1394 motherboard",
+"	01ed  nForce2 Memory Controller 3",
+"		a0a0 03b9  UK79G-1394 motherboard",
+"	01ee  nForce2 Memory Controller 4",
+"		a0a0 03b9  UK79G-1394 motherboard",
+"	01ef  nForce2 Memory Controller 5",
+"		a0a0 03b9  UK79G-1394 motherboard",
+"	01f0  NV18 [GeForce4 MX - nForce GPU]",
+"		a0a0 03b5  UK79G-1394 motherboard",
+"	0200  NV20 [GeForce3]",
+"		1043 402f  AGP-V8200 DDR",
+"		1048 0c70  GLADIAC 920",
+"	0201  NV20 [GeForce3 Ti 200]",
+"	0202  NV20 [GeForce3 Ti 500]",
+"		1043 405b  V8200 T5",
+"		1545 002f  Xtasy 6964",
+"	0203  NV20DCC [Quadro DCC]",
+"	0211  NV40 [GeForce 6800]",
+"	0212  NV40 [GeForce 6800 LE]",
+"	0215  NV40 [GeForce 6800 GT]",
+"	0218  NV40 [GeForce 6800 XT]",
+"	0221  NV43 [GeForce 6200]",
+"	0240  C51PV [GeForce 6150]",
+"		1462 7207  K8NGM2 series",
+"	0241  C51 PCI Express Bridge",
+"	0242  C51G [GeForce 6100]",
+"	0243  C51 PCI Express Bridge",
+"	0244  C51 PCI Express Bridge",
+"	0245  C51 PCI Express Bridge",
+"	0246  C51 PCI Express Bridge",
+"	0247  C51 PCI Express Bridge",
+"	0248  C51 PCI Express Bridge",
+"	0249  C51 PCI Express Bridge",
+"	024a  C51 PCI Express Bridge",
+"	024b  C51 PCI Express Bridge",
+"	024c  C51 PCI Express Bridge",
+"	024d  C51 PCI Express Bridge",
+"	024e  C51 PCI Express Bridge",
+"	024f  C51 PCI Express Bridge",
+"	0250  NV25 [GeForce4 Ti 4600]",
+"	0251  NV25 [GeForce4 Ti 4400]",
+"		1043 8023  v8440 GeForce 4 Ti4400",
+"	0252  NV25 [GeForce4 Ti]",
+"	0253  NV25 [GeForce4 Ti 4200]",
+"		107d 2896  WinFast A250 LE TD (Dual VGA/TV-out/DVI)",
+"		147b 8f09  Siluro (Dual VGA/TV-out/DVI)",
+"	0258  NV25GL [Quadro4 900 XGL]",
+"	0259  NV25GL [Quadro4 750 XGL]",
+"	025b  NV25GL [Quadro4 700 XGL]",
+"	0260  MCP51 LPC Bridge",
+"		1462 7207  K8NGM2 series",
+"	0261  MCP51 LPC Bridge",
+"	0262  MCP51 LPC Bridge",
+"	0263  MCP51 LPC Bridge",
+"	0264  MCP51 SMBus",
+"		1462 7207  K8NGM2 series",
+"	0265  MCP51 IDE",
+"		1462 7207  K8NGM2 series",
+"	0266  MCP51 Serial ATA Controller",
+"		1462 7207  K8NGM2 series",
+"	0267  MCP51 Serial ATA Controller",
+"		1462 7207  K8NGM2 series",
+"	0268  MCP51 Ethernet Controller",
+"	0269  MCP51 Ethernet Controller",
+"		1462 7207  K8NGM2 series",
+"	026a  MCP51 MCI",
+"	026b  MCP51 AC97 Audio Controller",
+"	026c  MCP51 High Definition Audio",
+"		1462 7207  K8NGM2 series",
+"	026d  MCP51 USB Controller",
+"		1462 7207  K8NGM2 series",
+"	026e  MCP51 USB Controller",
+"		1462 7207  K8NGM2 series",
+"	026f  MCP51 PCI Bridge",
+"	0270  MCP51 Host Bridge",
+"		1462 7207  K8NGM2 series",
+"	0271  MCP51 PMU",
+"	0272  MCP51 Memory Controller 0",
+"	027e  C51 Memory Controller 2",
+"		1462 7207  K8NGM2 series",
+"	027f  C51 Memory Controller 3",
+"		1462 7207  K8NGM2 series",
+"	0280  NV28 [GeForce4 Ti 4800]",
+"	0281  NV28 [GeForce4 Ti 4200 AGP 8x]",
+"	0282  NV28 [GeForce4 Ti 4800 SE]",
+"	0286  NV28 [GeForce4 Ti 4200 Go AGP 8x]",
+"	0288  NV28GL [Quadro4 980 XGL]",
+"	0289  NV28GL [Quadro4 780 XGL]",
+"	028c  NV28GLM [Quadro4 700 GoGL]",
+"	0290  GeForce 7900 GTX",
+"	0291  GeForce 7900 GT",
+"	029a  G71 [Quadro FX 2500M]",
+"	029b  G71 [Quadro FX 1500M]",
+"	029c  Quadro FX 5500",
+"	029d  Quadro FX 3500",
+"	029e  Quadro FX 1500",
+"	02a0  NV2A [XGPU]",
+"	02e1  GeForce 7600 GS",
+"	02f0  C51 Host Bridge",
+"		1462 7207  K8NGM2 series",
+"	02f1  C51 Host Bridge",
+"	02f2  C51 Host Bridge",
+"	02f3  C51 Host Bridge",
+"	02f4  C51 Host Bridge",
+"	02f5  C51 Host Bridge",
+"	02f6  C51 Host Bridge",
+"	02f7  C51 Host Bridge",
+"	02f8  C51 Memory Controller 5",
+"		1462 7207  K8NGM2 series",
+"	02f9  C51 Memory Controller 4",
+"		1462 7207  K8NGM2 series",
+"	02fa  C51 Memory Controller 0",
+"		1462 7207  K8NGM2 series",
+"	02fb  C51 PCI Express Bridge",
+"	02fc  C51 PCI Express Bridge",
+"	02fd  C51 PCI Express Bridge",
+"	02fe  C51 Memory Controller 1",
+"		1462 7207  K8NGM2 series",
+"	02ff  C51 Host Bridge",
+"		1462 7207  K8NGM2 series",
+"	0300  NV30 [GeForce FX]",
+"	0301  NV30 [GeForce FX 5800 Ultra]",
+"	0302  NV30 [GeForce FX 5800]",
+"	0308  NV30GL [Quadro FX 2000]",
+"	0309  NV30GL [Quadro FX 1000]",
+"	0311  NV31 [GeForce FX 5600 Ultra]",
+"	0312  NV31 [GeForce FX 5600]",
+"	0313  NV31",
+"	0314  NV31 [GeForce FX 5600XT]",
+"		1043 814a  V9560XT/TD",
+"	0316  NV31M",
+"	0317  NV31M Pro",
+"	031a  NV31M [GeForce FX Go5600]",
+"	031b  NV31M [GeForce FX Go5650]",
+"	031c  NVIDIA Quadro FX Go700",
+"	031d  NV31GLM",
+"	031e  NV31GLM Pro",
+"	031f  NV31GLM Pro",
+"	0320  NV34 [GeForce FX 5200]",
+"	0321  NV34 [GeForce FX 5200 Ultra]",
+"	0322  NV34 [GeForce FX 5200]",
+"		1462 9171  MS-8917 (FX5200-T128)",
+"		1462 9360  MS-8936 (FX5200-T128)",
+"	0323  NV34 [GeForce FX 5200LE]",
+"	0324  NV34M [GeForce FX Go5200]",
+"		1028 0196  Inspiron 5160",
+"		1071 8160  MIM2000",
+"	0325  NV34M [GeForce FX Go5250]",
+"	0326  NV34 [GeForce FX 5500]",
+"	0327  NV34 [GeForce FX 5100]",
+"	0328  NV34M [GeForce FX Go5200 32M/64M]",
+"	0329  NV34M [GeForce FX Go5200]",
+"	032a  NV34GL [Quadro NVS 280 PCI]",
+"	032b  NV34GL [Quadro FX 500/600 PCI]",
+"	032c  NV34GLM [GeForce FX Go 5300]",
+"	032d  NV34 [GeForce FX Go5100]",
+"	032f  NV34GL",
+"	0330  NV35 [GeForce FX 5900 Ultra]",
+"	0331  NV35 [GeForce FX 5900]",
+"		1043 8145  V9950GE",
+"	0332  NV35 [GeForce FX 5900XT]",
+"	0333  NV38 [GeForce FX 5950 Ultra]",
+"	0334  NV35 [GeForce FX 5900ZT]",
+"	0338  NV35GL [Quadro FX 3000]",
+"	033f  NV35GL [Quadro FX 700]",
+"	0341  NV36.1 [GeForce FX 5700 Ultra]",
+"	0342  NV36.2 [GeForce FX 5700]",
+"	0343  NV36 [GeForce FX 5700LE]",
+"	0344  NV36.4 [GeForce FX 5700VE]",
+"	0345  NV36.5",
+"	0347  NV36 [GeForce FX Go5700]",
+"		103c 006a  NX9500",
+"	0348  NV36 [GeForce FX Go5700]",
+"	0349  NV36M Pro",
+"	034b  NV36MAP",
+"	034c  NV36 [Quadro FX Go1000]",
+"	034e  NV36GL [Quadro FX 1100]",
+"	034f  NV36GL",
+"	0360  MCP55 LPC Bridge",
+"	0361  MCP55 LPC Bridge",
+"	0362  MCP55 LPC Bridge",
+"	0363  MCP55 LPC Bridge",
+"	0364  MCP55 LPC Bridge",
+"	0365  MCP55 LPC Bridge",
+"	0366  MCP55 LPC Bridge",
+"	0367  MCP55 LPC Bridge",
+"	0368  MCP55 SMBus",
+"	0369  MCP55 Memory Controller",
+"	036a  MCP55 Memory Controller",
+"	036c  MCP55 USB Controller",
+"	036d  MCP55 USB Controller",
+"	036e  MCP55 IDE",
+"	0371  MCP55 High Definition Audio",
+"	0372  MCP55 Ethernet",
+"	0373  MCP55 Ethernet",
+"	037a  MCP55 Memory Controller",
+"	037e  MCP55 SATA Controller",
+"	037f  MCP55 SATA Controller",
+"	0391  G70 [GeForce 7600 GT]",
+"	0392  G70 [GeForce 7600 GS]",
+"	0398  G70 [GeForce Go 7600]",
+"	039e  Quadro FX 560",
+"	03e0  MCP61 LPC Bridge",
+"	03e1  MCP61 LPC Bridge",
+"	03e2  MCP61 LPC Bridge",
+"	03e3  MCP61 LPC Bridge",
+"	03e4  MCP61 High Definition Audio",
+"	03e5  MCP61 Ethernet",
+"	03e6  MCP61 Ethernet",
+"	03e7  MCP61 SATA Controller",
+"	03ea  MCP61 Memory Controller",
+"	03eb  MCP61 SMBus",
+"	03ec  MCP61 IDE",
+"	03ee  MCP61 Ethernet",
+"	03ef  MCP61 Ethernet",
+"	03f0  MCP61 High Definition Audio",
+"	03f1  MCP61 USB Controller",
+"	03f2  MCP61 USB Controller",
+"	03f5  MCP61 Memory Controller",
+"	03f6  MCP61 SATA Controller",
+"	03f7  MCP61 SATA Controller",
+"10df  Emulex Corporation",
+"	1ae5  LP6000 Fibre Channel Host Adapter",
+"	f085  LP850 Fibre Channel Host Adapter",
+"	f095  LP952 Fibre Channel Host Adapter",
+"	f098  LP982 Fibre Channel Host Adapter",
+"	f0a1  Thor LightPulse Fibre Channel Host Adapter",
+"	f0a5  Thor LightPulse Fibre Channel Host Adapter",
+"	f0b5  Viper LightPulse Fibre Channel Host Adapter",
+"	f0d1  Helios LightPulse Fibre Channel Host Adapter",
+"	f0d5  Helios LightPulse Fibre Channel Host Adapter",
+"	f0e1  Zephyr LightPulse Fibre Channel Host Adapter",
+"	f0e5  Zephyr LightPulse Fibre Channel Host Adapter",
+"	f0f5  Neptune LightPulse Fibre Channel Host Adapter",
+"	f700  LP7000 Fibre Channel Host Adapter",
+"	f701  LP7000 Fibre Channel Host Adapter Alternate ID (JX1:2-3, JX2:1-2)",
+"	f800  LP8000 Fibre Channel Host Adapter",
+"	f801  LP8000 Fibre Channel Host Adapter Alternate ID (JX1:2-3, JX2:1-2)",
+"	f900  LP9000 Fibre Channel Host Adapter",
+"	f901  LP9000 Fibre Channel Host Adapter Alternate ID (JX1:2-3, JX2:1-2)",
+"	f980  LP9802 Fibre Channel Host Adapter",
+"	f981  LP9802 Fibre Channel Host Adapter Alternate ID",
+"	f982  LP9802 Fibre Channel Host Adapter Alternate ID",
+"	fa00  Thor-X LightPulse Fibre Channel Host Adapter",
+"	fb00  Viper LightPulse Fibre Channel Host Adapter",
+"	fc00  Thor-X LightPulse Fibre Channel Host Adapter",
+"	fc10  Helios-X LightPulse Fibre Channel Host Adapter",
+"	fc20  Zephyr-X LightPulse Fibre Channel Host Adapter",
+"	fd00  Helios-X LightPulse Fibre Channel Host Adapter",
+"	fe00  Zephyr-X LightPulse Fibre Channel Host Adapter",
+"	ff00  Neptune LightPulse Fibre Channel Host Adapter",
+"10e0  Integrated Micro Solutions Inc.",
+"	5026  IMS5026/27/28",
+"	5027  IMS5027",
+"	5028  IMS5028",
+"	8849  IMS8849",
+"	8853  IMS8853",
+"	9128  IMS9128 [Twin turbo 128]",
+"10e1  Tekram Technology Co.,Ltd.",
+"	0391  TRM-S1040",
+"		10e1 0391  DC-315U SCSI-3 Host Adapter",
+"	690c  DC-690c",
+"	dc29  DC-290",
+"10e2  Aptix Corporation",
+"10e3  Tundra Semiconductor Corp.",
+"	0000  CA91C042 [Universe]",
+"	0148  Tsi148 [Tempe]",
+"	0860  CA91C860 [QSpan]",
+"	0862  CA91C862A [QSpan-II]",
+"	8260  CA91L8200B [Dual PCI PowerSpan II]",
+"	8261  CA91L8260B [Single PCI PowerSpan II]",
+"10e4  Tandem Computers",
+"	8029  Realtek 8029 Network Card",
+"10e5  Micro Industries Corporation",
+"10e6  Gainbery Computer Products Inc.",
+"10e7  Vadem",
+"10e8  Applied Micro Circuits Corp.",
+"	1072  INES GPIB-PCI (AMCC5920 based)",
+"	2011  Q-Motion Video Capture/Edit board",
+"	4750  S5930 [Matchmaker]",
+"	5920  S5920",
+"	8043  LANai4.x [Myrinet LANai interface chip]",
+"	8062  S5933_PARASTATION",
+"	807d  S5933 [Matchmaker]",
+"	8088  Kongsberg Spacetec Format Synchronizer",
+"	8089  Kongsberg Spacetec Serial Output Board",
+"	809c  S5933_HEPC3",
+"	80d7  PCI-9112",
+"	80d9  PCI-9118",
+"	80da  PCI-9812",
+"	811a  PCI-IEEE1355-DS-DE Interface",
+"	814c  Fastcom ESCC-PCI (Commtech, Inc.)",
+"	8170  S5933 [Matchmaker] (Chipset Development Tool)",
+"	81e6  Multimedia video controller",
+"	8291  Fastcom 232/8-PCI (Commtech, Inc.)",
+"	82c4  Fastcom 422/4-PCI (Commtech, Inc.)",
+"	82c5  Fastcom 422/2-PCI (Commtech, Inc.)",
+"	82c6  Fastcom IG422/1-PCI (Commtech, Inc.)",
+"	82c7  Fastcom IG232/2-PCI (Commtech, Inc.)",
+"	82ca  Fastcom 232/4-PCI (Commtech, Inc.)",
+"	82db  AJA HDNTV HD SDI Framestore",
+"	82e2  Fastcom DIO24H-PCI (Commtech, Inc.)",
+"	8851  S5933 on Innes Corp FM Radio Capture card",
+"10e9  Alps Electric Co., Ltd.",
+"10ea  Intergraphics Systems",
+"	1680  IGA-1680",
+"	1682  IGA-1682",
+"	1683  IGA-1683",
+"	2000  CyberPro 2000",
+"	2010  CyberPro 2000A",
+"	5000  CyberPro 5000",
+"	5050  CyberPro 5050",
+"	5202  CyberPro 5202",
+"	5252  CyberPro5252",
+"10eb  Artists Graphics",
+"	0101  3GA",
+"	8111  Twist3 Frame Grabber",
+"10ec  Realtek Semiconductor Co., Ltd.",
+"	0139  Zonet Zen3200",
+"	8029  RTL-8029(AS)",
+"		10b8 2011  EZ-Card (SMC1208)",
+"		10ec 8029  RTL-8029(AS)",
+"		1113 1208  EN1208",
+"		1186 0300  DE-528",
+"		1259 2400  AT-2400",
+"	8129  RTL-8129",
+"		10ec 8129  RT8129 Fast Ethernet Adapter",
+"	8138  RT8139 (B/C) Cardbus Fast Ethernet Adapter",
+"		10ec 8138  RT8139 (B/C) Fast Ethernet Adapter",
+"	8139  RTL-8139/8139C/8139C+",
+"		0357 000a  TTP-Monitoring Card V2.0",
+"		1025 005a  TravelMate 290",
+"		1025 8920  ALN-325",
+"		1025 8921  ALN-325",
+"		103c 006a  NX9500",
+"		1043 8109  P5P800-MX Mainboard",
+"		1071 8160  MIM2000",
+"		10bd 0320  EP-320X-R",
+"		10ec 8139  RT8139",
+"		1113 ec01  FNC-0107TX",
+"		1186 1300  DFE-538TX",
+"		1186 1320  SN5200",
+"		1186 8139  DRN-32TX",
+"		11f6 8139  FN22-3(A) LinxPRO Ethernet Adapter",
+"		1259 2500  AT-2500TX",
+"		1259 2503  AT-2500TX/ACPI",
+"		1429 d010  ND010",
+"		1432 9130  EN-9130TX",
+"		1436 8139  RT8139",
+"		1458 e000  GA-7VM400M/7VT600 Motherboard",
+"		1462 788c  865PE Neo2-V Mainboard",
+"		146c 1439  FE-1439TX",
+"		1489 6001  GF100TXRII",
+"		1489 6002  GF100TXRA",
+"		149c 139a  LFE-8139ATX",
+"		149c 8139  LFE-8139TX",
+"		14cb 0200  LNR-100 Family 10/100 Base-TX Ethernet",
+"		1695 9001  Onboard RTL8101L 10/100 MBit",
+"		1799 5000  F5D5000 PCI Card/Desktop Network PCI Card",
+"		1904 8139  RTL8139D Fast Ethernet Adapter",
+"		2646 0001  EtheRx",
+"		8e2e 7000  KF-230TX",
+"		8e2e 7100  KF-230TX/2",
+"		a0a0 0007  ALN-325C",
+"	8169  RTL-8169 Gigabit Ethernet",
+"		1025 0079  Aspire 5024WLMi",
+"		1259 c107  CG-LAPCIGT",
+"		1371 434e  ProG-2000L",
+"		1458 e000  GA-8I915ME-G Mainboard",
+"		1462 702c  K8T NEO 2 motherboard",
+"	8180  RTL8180L 802.11b MAC",
+"	8185  RTL-8185 IEEE 802.11a/b/g Wireless LAN Controller",
+"	8197  SmartLAN56 56K Modem",
+"10ed  Ascii Corporation",
+"	7310  V7310",
+"10ee  Xilinx Corporation",
+"	0205  Wildcard TE205P",
+"	0210  Wildcard TE210P",
+"	0314  Wildcard TE405P/TE410P (1st Gen)",
+"	0405  Wildcard TE405P (2nd Gen)",
+"	0410  Wildcard TE410P (2nd Gen)",
+"	3fc0  RME Digi96",
+"	3fc1  RME Digi96/8",
+"	3fc2  RME Digi96/8 Pro",
+"	3fc3  RME Digi96/8 Pad",
+"	3fc4  RME Digi9652 (Hammerfall)",
+"	3fc5  RME Hammerfall DSP",
+"	3fc6  RME Hammerfall DSP MADI",
+"	8381  Ellips Santos Frame Grabber",
+"	d154  Copley Controls CAN card (PCI-CAN-02)",
+"10ef  Racore Computer Products, Inc.",
+"	8154  M815x Token Ring Adapter",
+"10f0  Peritek Corporation",
+"10f1  Tyan Computer",
+"	2865  Tyan Thunder K8E S2865",
+"10f2  Achme Computer, Inc.",
+"10f3  Alaris, Inc.",
+"10f4  S-MOS Systems, Inc.",
+"10f5  NKK Corporation",
+"	a001  NDR4000 [NR4600 Bridge]",
+"10f6  Creative Electronic Systems SA",
+"10f7  Matsushita Electric Industrial Co., Ltd.",
+"10f8  Altos India Ltd",
+"10f9  PC Direct",
+"10fa  Truevision",
+"	000c  TARGA 1000",
+"10fb  Thesys Gesellschaft fuer Mikroelektronik mbH",
+"	186f  TH 6255",
+"10fc  I-O Data Device, Inc.",
+"	0003  Cardbus IDE Controller",
+"	0005  Cardbus SCSI CBSC II",
+"10fd  Soyo Computer, Inc",
+"10fe  Fast Multimedia AG",
+"10ff  NCube",
+"1100  Jazz Multimedia",
+"1101  Initio Corporation",
+"	1060  INI-A100U2W",
+"	9100  INI-9100/9100W",
+"	9400  INI-940",
+"	9401  INI-950",
+"	9500  360P",
+"	9502  Initio INI-9100UW Ultra Wide SCSI Controller INIC-950P chip",
+"1102  Creative Labs",
+"	0002  SB Live! EMU10k1",
+"		1102 0020  CT4850 SBLive! Value",
+"		1102 0021  CT4620 SBLive!",
+"		1102 002f  SBLive! mainboard implementation",
+"		1102 100a  SB Live! 5.1 Digital OEM [SB0220]",
+"		1102 4001  E-mu APS",
+"		1102 8022  CT4780 SBLive! Value",
+"		1102 8023  CT4790 SoundBlaster PCI512",
+"		1102 8024  CT4760 SBLive!",
+"		1102 8025  SBLive! Mainboard Implementation",
+"		1102 8026  CT4830 SBLive! Value",
+"		1102 8027  CT4832 SBLive! Value",
+"		1102 8028  CT4760 SBLive! OEM version",
+"		1102 8031  CT4831 SBLive! Value",
+"		1102 8040  CT4760 SBLive!",
+"		1102 8051  CT4850 SBLive! Value",
+"		1102 8061  SBLive! Player 5.1",
+"		1102 8064  SBLive! 5.1 Model SB0100",
+"		1102 8065  SBLive! 5.1 Digital Model SB0220",
+"		1102 8067  SBLive! 5.1 eMicro 28028",
+"	0004  SB Audigy",
+"		1102 0051  SB0090 Audigy Player",
+"		1102 0053  SB0090 Audigy Player/OEM",
+"		1102 0058  SB0090 Audigy Player/OEM",
+"		1102 1007  SB0240 Audigy 2 Platinum 6.1",
+"		1102 2002  SB Audigy 2 ZS (SB0350)",
+"	0006  [SB Live! Value] EMU10k1X",
+"	0007  SB Audigy LS",
+"		1102 0007  SBLive! 24bit",
+"		1102 1001  SB0310 Audigy LS",
+"		1102 1002  SB0312 Audigy LS",
+"		1102 1006  SB0410 SBLive! 24-bit",
+"		1462 1009  K8N Diamond",
+"	0008  SB0400 Audigy2 Value",
+"		1102 0008  EMU0404 Digital Audio System",
+"	4001  SB Audigy FireWire Port",
+"		1102 0010  SB Audigy FireWire Port",
+"	7002  SB Live! Game Port",
+"		1102 0020  Gameport Joystick",
+"	7003  SB Audigy Game Port",
+"		1102 0040  SB Audigy MIDI/Game Port",
+"	7004  [SB Live! Value] Input device controller",
+"	7005  SB Audigy LS Game Port",
+"		1102 1001  SB0310 Audigy LS MIDI/Game port",
+"		1102 1002  SB0312 Audigy LS MIDI/Game port",
+"	8064  SB0100 [SBLive! 5.1 OEM]",
+"	8938  Ectiva EV1938",
+"		1033 80e5  SlimTower-Jim (NEC)",
+"		1071 7150  Mitac 7150",
+"		110a 5938  Siemens Scenic Mobile 510PIII",
+"		13bd 100c  Ceres-C (Sharp, Intel BX)",
+"		13bd 100d  Sharp, Intel Banister",
+"		13bd 100e  TwinHead P09S/P09S3 (Sharp)",
+"		13bd f6f1  Marlin (Sharp)",
+"		14ff 0e70  P88TE (TWINHEAD INTERNATIONAL Corp)",
+"		14ff c401  Notebook 9100/9200/2000 (TWINHEAD INTERNATIONAL Corp)",
+"		156d b400  G400 - Geo (AlphaTop (Taiwan))",
+"		156d b550  G560  (AlphaTop (Taiwan))",
+"		156d b560  G560  (AlphaTop (Taiwan))",
+"		156d b700  G700/U700  (AlphaTop (Taiwan))",
+"		156d b795  G795  (AlphaTop (Taiwan))",
+"		156d b797  G797  (AlphaTop (Taiwan))",
+"1103  Triones Technologies, Inc.",
+"	0003  HPT343/345/346/363",
+"	0004  HPT366/368/370/370A/372/372N",
+"		1103 0001  HPT370A",
+"		1103 0004  HPT366 UDMA66 (r1) / HPT368 UDMA66 (r2) / HPT370 UDMA100 (r3) / HPT370 UDMA100 RAID (r4)",
+"		1103 0005  HPT370 UDMA100",
+"	0005  HPT372A/372N",
+"	0006  HPT302/302N",
+"	0007  HPT371/371N",
+"	0008  HPT374",
+"	0009  HPT372N",
+"1104  RasterOps Corp.",
+"1105  Sigma Designs, Inc.",
+"	1105  REALmagic Xcard MPEG 1/2/3/4 DVD Decoder",
+"	8300  REALmagic Hollywood Plus DVD Decoder",
+"	8400  EM840x REALmagic DVD/MPEG-2 Audio/Video Decoder",
+"	8401  EM8401 REALmagic DVD/MPEG-2 A/V Decoder",
+"	8470  EM8470 REALmagic DVD/MPEG-4 A/V Decoder",
+"	8471  EM8471 REALmagic DVD/MPEG-4 A/V Decoder",
+"	8475  EM8475 REALmagic DVD/MPEG-4 A/V Decoder",
+"		1105 0001  REALmagic X-Card",
+"	8476  EM8476 REALmagic DVD/MPEG-4 A/V Decoder",
+"		127d 0000  CineView II",
+"	8485  EM8485 REALmagic DVD/MPEG-4 A/V Decoder",
+"	8486  EM8486 REALmagic DVD/MPEG-4 A/V Decoder",
+"1106  VIA Technologies, Inc.",
+"	0102  Embedded VIA Ethernet Controller",
+"	0130  VT6305 1394.A Controller",
+"	0204  K8M800 Host Bridge",
+"	0208  PT890 Host Bridge",
+"	0238  K8T890 Host Bridge",
+"	0258  PT880 Host Bridge",
+"	0259  CN400/PM880 Host Bridge",
+"	0269  KT880 Host Bridge",
+"	0282  K8T800Pro Host Bridge",
+"		1043 80a3  A8V Deluxe",
+"	0290  K8M890 Host Bridge",
+"	0293  PM896 Host Bridge",
+"	0296  P4M800 Host Bridge",
+"	0305  VT8363/8365 [KT133/KM133]",
+"		1019 0987  K7VZA Mainboard",
+"		1043 8033  A7V Mainboard",
+"		1043 803e  A7V-E Mainboard",
+"		1043 8042  A7V133/A7V133-C Mainboard",
+"		147b a401  KT7/KT7-RAID/KT7A/KT7A-RAID Mainboard",
+"	0308  PT894 Host Bridge",
+"	0314  CN700/VN800/P4M800CE/Pro Host Bridge",
+"	0324  CX700 Host Bridge",
+"	0327  P4M890 Host Bridge",
+"	0336  K8M890CE Host Bridge",
+"	0340  PT900 Host Bridge",
+"	0351  VT3351 Host Bridge",
+"	0364  P4M900 Host Bridge",
+"	0391  VT8371 [KX133]",
+"	0501  VT8501 [Apollo MVP4]",
+"	0505  VT82C505",
+"	0561  VT82C576MV",
+"	0571  VT82C586A/B/VT82C686/A/B/VT823x/A/C PIPC Bus Master IDE",
+"		1019 0985  P6VXA Motherboard",
+"		1019 0a81  L7VTA v1.0 Motherboard (KT400-8235)",
+"		1043 8052  VT8233A Bus Master ATA100/66/33 IDE",
+"		1043 808c  A7V8X / A7V333 motherboard",
+"		1043 80a1  A7V8X-X motherboard rev. 1.01",
+"		1043 80ed  A7V600/K8V-X/A8V Deluxe motherboard",
+"		1106 0571  VT82C586/B/VT82C686/A/B/VT8233/A/C/VT8235 PIPC Bus Master IDE",
+"		1179 0001  Magnia Z310",
+"		1297 f641  FX41 motherboard",
+"		1458 5002  GA-7VAX Mainboard",
+"		1462 7020  K8T NEO 2 motherboard",
+"		147b 1407  KV8-MAX3 motherboard",
+"		1849 0571  K7VT2/K7VT6 motherboard",
+"	0576  VT82C576 3V [Apollo Master]",
+"	0585  VT82C585VP [Apollo VP1/VPX]",
+"	0586  VT82C586/A/B PCI-to-ISA [Apollo VP]",
+"		1106 0000  MVP3 ISA Bridge",
+"	0591  VT8237A SATA 2-Port Controller",
+"	0595  VT82C595 [Apollo VP2]",
+"	0596  VT82C596 ISA [Mobile South]",
+"		1106 0000  VT82C596/A/B PCI to ISA Bridge",
+"		1458 0596  VT82C596/A/B PCI to ISA Bridge",
+"	0597  VT82C597 [Apollo VP3]",
+"	0598  VT82C598 [Apollo MVP3]",
+"	0601  VT8601 [Apollo ProMedia]",
+"	0605  VT8605 [ProSavage PM133]",
+"		1043 802c  CUV4X mainboard",
+"	0680  VT82C680 [Apollo P6]",
+"	0686  VT82C686 [Apollo Super South]",
+"		1019 0985  P6VXA Motherboard",
+"		1043 802c  CUV4X mainboard",
+"		1043 8033  A7V Mainboard",
+"		1043 803e  A7V-E Mainboard",
+"		1043 8040  A7M266 Mainboard",
+"		1043 8042  A7V133/A7V133-C Mainboard",
+"		1106 0000  VT82C686/A PCI to ISA Bridge",
+"		1106 0686  VT82C686/A PCI to ISA Bridge",
+"		1179 0001  Magnia Z310",
+"		147b a702  KG7-Lite Mainboard",
+"	0691  VT82C693A/694x [Apollo PRO133x]",
+"		1019 0985  P6VXA Motherboard",
+"		1179 0001  Magnia Z310",
+"		1458 0691  VT82C691 Apollo Pro System Controller",
+"	0693  VT82C693 [Apollo Pro Plus]",
+"	0698  VT82C693A [Apollo Pro133 AGP]",
+"	0926  VT82C926 [Amazon]",
+"	1000  VT82C570MV",
+"	1106  VT82C570MV",
+"	1204  K8M800 Host Bridge",
+"	1208  PT890 Host Bridge",
+"	1238  K8T890 Host Bridge",
+"	1258  PT880 Host Bridge",
+"	1259  CN400/PM880 Host Bridge",
+"	1269  KT880 Host Bridge",
+"	1282  K8T800Pro Host Bridge",
+"	1290  K8M890 Host Bridge",
+"	1293  PM896 Host Bridge",
+"	1296  P4M800 Host Bridge",
+"	1308  PT894 Host Bridge",
+"	1314  CN700/VN800/P4M800CE/Pro Host Bridge",
+"	1324  CX700 Host Bridge",
+"	1327  P4M890 Host Bridge",
+"	1336  K8M890CE Host Bridge",
+"	1340  PT900 Host Bridge",
+"	1351  VT3351 Host Bridge",
+"	1364  P4M900 Host Bridge",
+"	1571  VT82C576M/VT82C586",
+"	1595  VT82C595/97 [Apollo VP2/97]",
+"	2204  K8M800 Host Bridge",
+"	2208  PT890 Host Bridge",
+"	2238  K8T890 Host Bridge",
+"	2258  PT880 Host Bridge",
+"	2259  CN400/PM880 Host Bridge",
+"	2269  KT880 Host Bridge",
+"	2282  K8T800Pro Host Bridge",
+"	2290  K8M890 Host Bridge",
+"	2293  PM896 Host Bridge",
+"	2296  P4M800 Host Bridge",
+"	2308  PT894 Host Bridge",
+"	2314  CN700/VN800/P4M800CE/Pro Host Bridge",
+"	2324  CX700 Host Bridge",
+"	2327  P4M890 Host Bridge",
+"	2336  K8M890CE Host Bridge",
+"	2340  PT900 Host Bridge",
+"	2351  VT3351 Host Bridge",
+"	2364  P4M900 Host Bridge",
+"	287a  VT8251 PCI to PCI Bridge",
+"	287b  VT8251 Host Bridge",
+"	287c  VT8251 PCIE Root Port",
+"	287d  VT8251 PCIE Root Port",
+"	287e  VT8251 Ultra VLINK Controller",
+"	3022  CLE266",
+"	3038  VT82xxxxx UHCI USB 1.1 Controller",
+"		0925 1234  USB Controller",
+"		1019 0985  P6VXA Motherboard",
+"		1019 0a81  L7VTA v1.0 Motherboard (KT400-8235)",
+"		1043 8080  A7V333 motherboard",
+"		1043 808c  VT6202 USB2.0 4 port controller",
+"		1043 80a1  A7V8X-X motherboard",
+"		1043 80ed  A7V600/K8V-X/A8V Deluxe motherboard",
+"		1179 0001  Magnia Z310",
+"		1458 5004  GA-7VAX Mainboard",
+"		1462 7020  K8T NEO 2 motherboard",
+"		147b 1407  KV8-MAX3 motherboard",
+"		182d 201d  CN-029 USB2.0 4 port PCI Card",
+"		1849 3038  K7VT6",
+"	3040  VT82C586B ACPI",
+"	3043  VT86C100A [Rhine]",
+"		10bd 0000  VT86C100A Fast Ethernet Adapter",
+"		1106 0100  VT86C100A Fast Ethernet Adapter",
+"		1186 1400  DFE-530TX rev A",
+"	3044  IEEE 1394 Host Controller",
+"		1025 005a  TravelMate 290",
+"		1043 808a  A8V Deluxe",
+"		1458 1000  GA-7VT600-1394 Motherboard",
+"		1462 207d  K8NGM2 series motherboard",
+"		1462 702d  K8T NEO 2 motherboard",
+"		1462 971d  MS-6917",
+"	3050  VT82C596 Power Management",
+"	3051  VT82C596 Power Management",
+"	3053  VT6105M [Rhine-III]",
+"	3057  VT82C686 [Apollo Super ACPI]",
+"		1019 0985  P6VXA Motherboard",
+"		1019 0987  K7VZA Motherboard",
+"		1043 8033  A7V Mainboard",
+"		1043 803e  A7V-E Mainboard",
+"		1043 8040  A7M266 Mainboard",
+"		1043 8042  A7V133/A7V133-C Mainboard",
+"		1179 0001  Magnia Z310",
+"	3058  VT82C686 AC97 Audio Controller",
+"		0e11 0097  SoundMax Digital Integrated Audio",
+"		0e11 b194  Soundmax integrated digital audio",
+"		1019 0985  P6VXA Motherboard",
+"		1019 0987  K7VZA Motherboard",
+"		1043 1106  A7V133/A7V133-C Mainboard",
+"		1106 4511  Onboard Audio on EP7KXA",
+"		1458 7600  Onboard Audio",
+"		1462 3091  MS-6309 Onboard Audio",
+"		1462 3300  MS-6330 Onboard Audio",
+"		15dd 7609  Onboard Audio",
+"	3059  VT8233/A/8235/8237 AC97 Audio Controller",
+"		1019 0a81  L7VTA v1.0 Motherboard (KT400-8235)",
+"		1043 8095  A7V8X Motherboard (Realtek ALC650 codec)",
+"		1043 80a1  A7V8X-X Motherboard",
+"		1043 80b0  A7V600/K8V Deluxe motherboard (ADI AD1980 codec [SoundMAX])",
+"		1043 812a  A8V Deluxe motherboard (Realtek ALC850 codec)",
+"		1106 3059  L7VMM2 Motherboard",
+"		1106 4161  K7VT2 motherboard",
+"		1106 4170  PCPartner P4M800-8237R Motherboard",
+"		1106 4552  Soyo KT-600 Dragon Plus (Realtek ALC 650)",
+"		1297 c160  FX41 motherboard (Realtek ALC650 codec)",
+"		1458 a002  GA-7VAX Onboard Audio (Realtek ALC650)",
+"		1462 0080  K8T NEO 2 motherboard",
+"		1462 3800  KT266 onboard audio",
+"		147b 1407  KV8-MAX3 motherboard",
+"		1849 9761  K7VT6 motherboard",
+"		4005 4710  MSI K7T266 Pro2-RU (MSI-6380 v2) onboard audio (Realtek/ALC 200/200P)",
+"		a0a0 01b6  AK77-8XN onboard audio",
+"	3065  VT6102 [Rhine-II]",
+"		1043 80a1  A7V8X-X Motherboard",
+"		1106 0102  VT6102 [Rhine II] Embeded Ethernet Controller on VT8235",
+"		1186 1400  DFE-530TX rev A",
+"		1186 1401  DFE-530TX rev B",
+"		13b9 1421  LD-10/100AL PCI Fast Ethernet Adapter (rev.B)",
+"		147b 1c09  NV7 Motherboard",
+"		1695 3005  VT6103",
+"		1695 300c  Realtek ALC655 sound chip",
+"		1849 3065  K7VT6 motherboard",
+"	3068  AC'97 Modem Controller",
+"		1462 309e  MS-6309 Saturn Motherboard",
+"	3074  VT8233 PCI to ISA Bridge",
+"		1043 8052  VT8233A",
+"	3091  VT8633 [Apollo Pro266]",
+"	3099  VT8366/A/7 [Apollo KT266/A/333]",
+"		1043 8064  A7V266-E Mainboard",
+"		1043 807f  A7V333 Mainboard",
+"		1849 3099  K7VT2 motherboard",
+"	3101  VT8653 Host Bridge",
+"	3102  VT8662 Host Bridge",
+"	3103  VT8615 Host Bridge",
+"	3104  USB 2.0",
+"		1019 0a81  L7VTA v1.0 Motherboard (KT400-8235)",
+"		1043 808c  A7V8X motherboard",
+"		1043 80a1  A7V8X-X motherboard rev 1.01",
+"		1043 80ed  A7V600/K8V-X/A8V Deluxe motherboard",
+"		1297 f641  FX41 motherboard",
+"		1458 5004  GA-7VAX Mainboard",
+"		1462 7020  K8T NEO 2 motherboard",
+"		147b 1407  KV8-MAX3 motherboard",
+"		182d 201d  CN-029 USB 2.0 4 port PCI Card",
+"		1849 3104  K7VT6 motherboard",
+"	3106  VT6105 [Rhine-III]",
+"		1186 1403  DFE-530TX rev C",
+"	3108  S3 Unichrome Pro VGA Adapter",
+"	3109  VT8233C PCI to ISA Bridge",
+"	3112  VT8361 [KLE133] Host Bridge",
+"	3113  VPX/VPX2 PCI to PCI Bridge Controller",
+"	3116  VT8375 [KM266/KL266] Host Bridge",
+"		1297 f641  FX41 motherboard",
+"	3118  S3 Unichrome Pro VGA Adapter",
+"	3119  VT6120/VT6121/VT6122 Gigabit Ethernet Adapter",
+"	3122  VT8623 [Apollo CLE266] integrated CastleRock graphics",
+"	3123  VT8623 [Apollo CLE266]",
+"	3128  VT8753 [P4X266 AGP]",
+"	3133  VT3133 Host Bridge",
+"	3147  VT8233A ISA Bridge",
+"		1043 808c  A7V333 motherboard",
+"	3148  P4M266 Host Bridge",
+"	3149  VIA VT6420 SATA RAID Controller",
+"		1043 80ed  A7V600/K8V Deluxe/K8V-X/A8V Deluxe motherboard",
+"		1458 b003  GA-7VM400AM(F) Motherboard",
+"		1462 7020  K8T Neo 2 Motherboard",
+"		147b 1407  KV8-MAX3 motherboard",
+"		147b 1408  KV7",
+"		1849 3149  K7VT6 motherboard",
+"	3156  P/KN266 Host Bridge",
+"	3164  VT6410 ATA133 RAID controller",
+"		1043 80f4  P4P800 Mainboard Deluxe ATX",
+"		1462 7028  915P/G Neo2",
+"	3168  VT8374 P4X400 Host Controller/AGP Bridge",
+"	3177  VT8235 ISA Bridge",
+"		1019 0a81  L7VTA v1.0 Motherboard (KT400-8235)",
+"		1043 808c  A7V8X motherboard",
+"		1043 80a1  A7V8X-X motherboard",
+"		1297 f641  FX41 motherboard",
+"		1458 5001  GA-7VAX Mainboard",
+"		1849 3177  K7VT2 motherboard",
+"	3178  ProSavageDDR P4N333 Host Bridge",
+"	3188  VT8385 [K8T800 AGP] Host Bridge",
+"		1043 80a3  K8V Deluxe/K8V-X motherboard",
+"		147b 1407  KV8-MAX3 motherboard",
+"	3189  VT8377 [KT400/KT600 AGP] Host Bridge",
+"		1043 807f  A7V8X motherboard",
+"		1458 5000  GA-7VAX Mainboard",
+"		1849 3189  K7VT6 motherboard",
+"	3204  K8M800 Host Bridge",
+"	3205  VT8378 [KM400/A] Chipset Host Bridge",
+"		1458 5000  GA-7VM400M Motherboard",
+"	3208  PT890 Host Bridge",
+"	3213  VPX/VPX2 PCI to PCI Bridge Controller",
+"	3218  K8T800M Host Bridge",
+"	3227  VT8237 ISA bridge [KT600/K8T800/K8T890 South]",
+"		1043 80ed  A7V600/K8V-X/A8V Deluxe motherboard",
+"		1106 3227  DFI KT600-AL Motherboard",
+"		1458 5001  GA-7VT600 Motherboard",
+"		147b 1407  KV8-MAX3 motherboard",
+"		1849 3227  K7VT4 motherboard",
+"	3238  K8T890 Host Bridge",
+"	3249  VT6421 IDE RAID Controller",
+"	324a  CX700 PCI to PCI Bridge",
+"	324b  CX700 Host Bridge",
+"	324e  CX700 Internal Module Bus",
+"	3258  PT880 Host Bridge",
+"	3259  CN400/PM880 Host Bridge",
+"	3269  KT880 Host Bridge",
+"	3282  K8T800Pro Host Bridge",
+"	3287  VT8251 PCI to ISA Bridge",
+"	3288  VIA High Definition Audio Controller",
+"	3290  K8M890 Host Bridge",
+"	3296  P4M800 Host Bridge",
+"	3324  CX700 Host Bridge",
+"	3327  P4M890 Host Bridge",
+"	3336  K8M890CE Host Bridge",
+"	3337  VT8237A PCI to ISA Bridge",
+"	3340  PT900 Host Bridge",
+"	3344  UniChrome Pro IGP",
+"	3349  VT8251 AHCI/SATA 4-Port Controller",
+"	3351  VT3351 Host Bridge",
+"	3364  P4M900 Host Bridge",
+"	337a  VT8237A PCI to PCI Bridge",
+"	337b  VT8237A Host Bridge",
+"	4149  VIA VT6420 (ATA133) Controller",
+"	4204  K8M800 Host Bridge",
+"	4208  PT890 Host Bridge",
+"	4238  K8T890 Host Bridge",
+"	4258  PT880 Host Bridge",
+"	4259  CN400/PM880 Host Bridge",
+"	4269  KT880 Host Bridge",
+"	4282  K8T800Pro Host Bridge",
+"	4290  K8M890 Host Bridge",
+"	4293  PM896 Host Bridge",
+"	4296  P4M800 Host Bridge",
+"	4308  PT894 Host Bridge",
+"	4314  CN700/VN800/P4M800CE/Pro Host Bridge",
+"	4324  CX700 Host Bridge",
+"	4327  P4M890 Host Bridge",
+"	4336  K8M890CE Host Bridge",
+"	4340  PT900 Host Bridge",
+"	4351  VT3351 Host Bridge",
+"	4364  P4M900 Host Bridge",
+"	5030  VT82C596 ACPI [Apollo PRO]",
+"	5208  PT890 I/O APIC Interrupt Controller",
+"	5238  K8T890 I/O APIC Interrupt Controller",
+"	5290  K8M890 I/O APIC Interrupt Controller",
+"	5308  PT894 I/O APIC Interrupt Controller",
+"	5327  P4M890 I/O APIC Interrupt Controller",
+"	5336  K8M890CE I/O APIC Interrupt Controller",
+"	5340  PT900 I/O APIC Interrupt Controller",
+"	5351  VT3351 I/O APIC Interrupt Controller",
+"	5364  P4M900 I/O APIC Interrupt Controller",
+"	6100  VT85C100A [Rhine II]",
+"	6327  P4M890 Security Device",
+"	7204  K8M800 Host Bridge",
+"	7205  VT8378 [S3 UniChrome] Integrated Video",
+"		1458 d000  Gigabyte GA-7VM400(A)M(F) Motherboard",
+"	7208  PT890 Host Bridge",
+"	7238  K8T890 Host Bridge",
+"	7258  PT880 Host Bridge",
+"	7259  CN400/PM880 Host Bridge",
+"	7269  KT880 Host Bridge",
+"	7282  K8T800Pro Host Bridge",
+"	7290  K8M890 Host Bridge",
+"	7293  PM896 Host Bridge",
+"	7296  P4M800 Host Bridge",
+"	7308  PT894 Host Bridge",
+"	7314  CN700/VN800/P4M800CE/Pro Host Bridge",
+"	7324  CX700 Host Bridge",
+"	7327  P4M890 Host Bridge",
+"	7336  K8M890CE Host Bridge",
+"	7340  PT900 Host Bridge",
+"	7351  VT3351 Host Bridge",
+"	7364  P4M900 Host Bridge",
+"	8231  VT8231 [PCI-to-ISA Bridge]",
+"	8235  VT8235 ACPI",
+"	8305  VT8363/8365 [KT133/KM133 AGP]",
+"	8324  CX700 PCI to ISA Bridge",
+"	8391  VT8371 [KX133 AGP]",
+"	8501  VT8501 [Apollo MVP4 AGP]",
+"	8596  VT82C596 [Apollo PRO AGP]",
+"	8597  VT82C597 [Apollo VP3 AGP]",
+"	8598  VT82C598/694x [Apollo MVP3/Pro133x AGP]",
+"		1019 0985  P6VXA Motherboard",
+"	8601  VT8601 [Apollo ProMedia AGP]",
+"	8605  VT8605 [PM133 AGP]",
+"	8691  VT82C691 [Apollo Pro]",
+"	8693  VT82C693 [Apollo Pro Plus] PCI Bridge",
+"	a208  PT890 PCI to PCI Bridge Controller",
+"	a238  K8T890 PCI to PCI Bridge Controller",
+"	a327  P4M890 PCI to PCI Bridge Controller",
+"	a364  P4M900 PCI to PCI Bridge Controller",
+"	b091  VT8633 [Apollo Pro266 AGP]",
+"	b099  VT8366/A/7 [Apollo KT266/A/333 AGP]",
+"	b101  VT8653 AGP Bridge",
+"	b102  VT8362 AGP Bridge",
+"	b103  VT8615 AGP Bridge",
+"	b112  VT8361 [KLE133] AGP Bridge",
+"	b113  VPX/VPX2 I/O APIC Interrupt Controller",
+"	b115  VT8363/8365 [KT133/KM133] PCI Bridge",
+"	b168  VT8235 PCI Bridge",
+"	b188  VT8237 PCI bridge [K8T800/K8T890 South]",
+"		147b 1407  KV8-MAX3 motherboard",
+"	b198  VT8237 PCI Bridge",
+"	b213  VPX/VPX2 I/O APIC Interrupt Controller",
+"	b999  [K8T890 North / VT8237 South] PCI Bridge",
+"	c208  PT890 PCI to PCI Bridge Controller",
+"	c238  K8T890 PCI to PCI Bridge Controller",
+"	c327  P4M890 PCI to PCI Bridge Controller",
+"	c340  PT900 PCI to PCI Bridge Controller",
+"	c364  P4M900 PCI to PCI Bridge Controller",
+"	d104  VT8237 Integrated Fast Ethernet Controller",
+"	d208  PT890 PCI to PCI Bridge Controller",
+"	d213  VPX/VPX2 PCI to PCI Bridge Controller",
+"	d238  K8T890 PCI to PCI Bridge Controller",
+"	d340  PT900 PCI to PCI Bridge Controller",
+"	e208  PT890 PCI to PCI Bridge Controller",
+"	e238  K8T890 PCI to PCI Bridge Controller",
+"	e340  PT900 PCI to PCI Bridge Controller",
+"	f208  PT890 PCI to PCI Bridge Controller",
+"	f238  K8T890 PCI to PCI Bridge Controller",
+"	f340  PT900 PCI to PCI Bridge Controller",
+"1107  Stratus Computers",
+"	0576  VIA VT82C570MV [Apollo] (Wrong vendor ID!)",
+"1108  Proteon, Inc.",
+"	0100  p1690plus_AA",
+"	0101  p1690plus_AB",
+"	0105  P1690Plus",
+"	0108  P1690Plus",
+"	0138  P1690Plus",
+"	0139  P1690Plus",
+"	013c  P1690Plus",
+"	013d  P1690Plus",
+"1109  Cogent Data Technologies, Inc.",
+"	1400  EM110TX [EX110TX]",
+"110a  Siemens Nixdorf AG",
+"	0002  Pirahna 2-port",
+"	0005  Tulip controller, power management, switch extender",
+"	0006  FSC PINC (I/O-APIC)",
+"	0015  FSC Multiprocessor Interrupt Controller",
+"	001d  FSC Copernicus Management Controller",
+"	007b  FSC Remote Service Controller, mailbox device",
+"	007c  FSC Remote Service Controller, shared memory device",
+"	007d  FSC Remote Service Controller, SMIC device",
+"	2101  HST SAPHIR V Primary PCI (ISDN/PMx)",
+"	2102  DSCC4 PEB/PEF 20534 DMA Supported Serial Communication Controller with 4 Channels",
+"	2104  Eicon Diva 2.02 compatible passive ISDN card",
+"	3142  SIMATIC NET CP 5613A1 (Profibus Adapter)",
+"	4021  SIMATIC NET CP 5512 (Profibus and MPI Cardbus Adapter)",
+"	4029  SIMATIC NET CP 5613A2 (Profibus Adapter)",
+"	4942  FPGA I-Bus Tracer for MBD",
+"	6120  SZB6120",
+"110b  Chromatic Research Inc.",
+"	0001  Mpact Media Processor",
+"	0004  Mpact 2",
+"110c  Mini-Max Technology, Inc.",
+"110d  Znyx Advanced Systems",
+"110e  CPU Technology",
+"110f  Ross Technology",
+"1110  Powerhouse Systems",
+"	6037  Firepower Powerized SMP I/O ASIC",
+"	6073  Firepower Powerized SMP I/O ASIC",
+"1111  Santa Cruz Operation",
+"1112  Osicom Technologies Inc",
+"	2200  FDDI Adapter",
+"	2300  Fast Ethernet Adapter",
+"	2340  4 Port Fast Ethernet Adapter",
+"	2400  ATM Adapter",
+"1113  Accton Technology Corporation",
+"	1211  SMC2-1211TX",
+"		103c 1207  EN-1207D Fast Ethernet Adapter",
+"		1113 1211  EN-1207D Fast Ethernet Adapter",
+"	1216  EN-1216 Ethernet Adapter",
+"		1113 2242  EN2242 10/100 Ethernet Mini-PCI Card",
+"		111a 1020  SpeedStream 1020 PCI 10/100 Ethernet Adaptor [EN-1207F-TX \?]",
+"	1217  EN-1217 Ethernet Adapter",
+"	5105  10Mbps Network card",
+"	9211  EN-1207D Fast Ethernet Adapter",
+"		1113 9211  EN-1207D Fast Ethernet Adapter",
+"	9511  21x4x DEC-Tulip compatible Fast Ethernet",
+"	d301  CPWNA100 (Philips wireless PCMCIA)",
+"	ec02  SMC 1244TX v3",
+"1114  Atmel Corporation",
+"	0506  at76c506 802.11b Wireless Network Adaptor",
+"1115  3D Labs",
+"1116  Data Translation",
+"	0022  DT3001",
+"	0023  DT3002",
+"	0024  DT3003",
+"	0025  DT3004",
+"	0026  DT3005",
+"	0027  DT3001-PGL",
+"	0028  DT3003-PGL",
+"1117  Datacube, Inc",
+"	9500  Max-1C SVGA card",
+"	9501  Max-1C image processing",
+"1118  Berg Electronics",
+"1119  ICP Vortex Computersysteme GmbH",
+"	0000  GDT 6000/6020/6050",
+"	0001  GDT 6000B/6010",
+"	0002  GDT 6110/6510",
+"	0003  GDT 6120/6520",
+"	0004  GDT 6530",
+"	0005  GDT 6550",
+"	0006  GDT 6117/6517",
+"	0007  GDT 6127/6527",
+"	0008  GDT 6537",
+"	0009  GDT 6557/6557-ECC",
+"	000a  GDT 6115/6515",
+"	000b  GDT 6125/6525",
+"	000c  GDT 6535",
+"	000d  GDT 6555",
+"	0010  GDT 6115/6515",
+"	0011  GDT 6125/6525",
+"	0012  GDT 6535",
+"	0013  GDT 6555/6555-ECC",
+"	0100  GDT 6117RP/6517RP",
+"	0101  GDT 6127RP/6527RP",
+"	0102  GDT 6537RP",
+"	0103  GDT 6557RP",
+"	0104  GDT 6111RP/6511RP",
+"	0105  GDT 6121RP/6521RP",
+"	0110  GDT 6117RD/6517RD",
+"	0111  GDT 6127RD/6527RD",
+"	0112  GDT 6537RD",
+"	0113  GDT 6557RD",
+"	0114  GDT 6111RD/6511RD",
+"	0115  GDT 6121RD/6521RD",
+"	0118  GDT 6118RD/6518RD/6618RD",
+"	0119  GDT 6128RD/6528RD/6628RD",
+"	011a  GDT 6538RD/6638RD",
+"	011b  GDT 6558RD/6658RD",
+"	0120  GDT 6117RP2/6517RP2",
+"	0121  GDT 6127RP2/6527RP2",
+"	0122  GDT 6537RP2",
+"	0123  GDT 6557RP2",
+"	0124  GDT 6111RP2/6511RP2",
+"	0125  GDT 6121RP2/6521RP2",
+"	0136  GDT 6113RS/6513RS",
+"	0137  GDT 6123RS/6523RS",
+"	0138  GDT 6118RS/6518RS/6618RS",
+"	0139  GDT 6128RS/6528RS/6628RS",
+"	013a  GDT 6538RS/6638RS",
+"	013b  GDT 6558RS/6658RS",
+"	013c  GDT 6533RS/6633RS",
+"	013d  GDT 6543RS/6643RS",
+"	013e  GDT 6553RS/6653RS",
+"	013f  GDT 6563RS/6663RS",
+"	0166  GDT 7113RN/7513RN/7613RN",
+"	0167  GDT 7123RN/7523RN/7623RN",
+"	0168  GDT 7118RN/7518RN/7518RN",
+"	0169  GDT 7128RN/7528RN/7628RN",
+"	016a  GDT 7538RN/7638RN",
+"	016b  GDT 7558RN/7658RN",
+"	016c  GDT 7533RN/7633RN",
+"	016d  GDT 7543RN/7643RN",
+"	016e  GDT 7553RN/7653RN",
+"	016f  GDT 7563RN/7663RN",
+"	01d6  GDT 4x13RZ",
+"	01d7  GDT 4x23RZ",
+"	01f6  GDT 8x13RZ",
+"	01f7  GDT 8x23RZ",
+"	01fc  GDT 8x33RZ",
+"	01fd  GDT 8x43RZ",
+"	01fe  GDT 8x53RZ",
+"	01ff  GDT 8x63RZ",
+"	0210  GDT 6519RD/6619RD",
+"	0211  GDT 6529RD/6629RD",
+"	0260  GDT 7519RN/7619RN",
+"	0261  GDT 7529RN/7629RN",
+"	02ff  GDT MAXRP",
+"	0300  GDT NEWRX",
+"111a  Efficient Networks, Inc",
+"	0000  155P-MF1 (FPGA)",
+"	0002  155P-MF1 (ASIC)",
+"	0003  ENI-25P ATM",
+"		111a 0000  ENI-25p Miniport ATM Adapter",
+"	0005  SpeedStream (LANAI)",
+"		111a 0001  ENI-3010 ATM",
+"		111a 0009  ENI-3060 ADSL (VPI=0)",
+"		111a 0101  ENI-3010 ATM",
+"		111a 0109  ENI-3060CO ADSL (VPI=0)",
+"		111a 0809  ENI-3060 ADSL (VPI=0 or 8)",
+"		111a 0909  ENI-3060CO ADSL (VPI=0 or 8)",
+"		111a 0a09  ENI-3060 ADSL (VPI=<0..15>)",
+"	0007  SpeedStream ADSL",
+"		111a 1001  ENI-3061 ADSL [ASIC]",
+"	1203  SpeedStream 1023 Wireless PCI Adapter",
+"111b  Teledyne Electronic Systems",
+"111c  Tricord Systems Inc.",
+"	0001  Powerbis Bridge",
+"111d  Integrated Device Technology, Inc.",
+"	0001  IDT77201/77211 155Mbps ATM SAR Controller [NICStAR]",
+"	0003  IDT77222/77252 155Mbps ATM MICRO ABR SAR Controller",
+"	0004  IDT77V252 155Mbps ATM MICRO ABR SAR Controller",
+"	0005  IDT77V222 155Mbps ATM MICRO ABR SAR Controller",
+"111e  Eldec",
+"111f  Precision Digital Images",
+"	4a47  Precision MX Video engine interface",
+"	5243  Frame capture bus interface",
+"1120  EMC Corporation",
+"1121  Zilog",
+"1122  Multi-tech Systems, Inc.",
+"1123  Excellent Design, Inc.",
+"1124  Leutron Vision AG",
+"	2581  Picport Monochrome",
+"1125  Eurocore",
+"1126  Vigra",
+"1127  FORE Systems Inc",
+"	0200  ForeRunner PCA-200 ATM",
+"	0210  PCA-200PC",
+"	0250  ATM",
+"	0300  ForeRunner PCA-200EPC ATM",
+"	0310  ATM",
+"	0400  ForeRunnerHE ATM Adapter",
+"		1127 0400  ForeRunnerHE ATM",
+"1129  Firmworks",
+"112a  Hermes Electronics Company, Ltd.",
+"112b  Linotype - Hell AG",
+"112c  Zenith Data Systems",
+"112d  Ravicad",
+"112e  Infomedia Microelectronics Inc.",
+"112f  Imaging Technology Inc",
+"	0000  MVC IC-PCI",
+"	0001  MVC IM-PCI Video frame grabber/processor",
+"	0008  PC-CamLink PCI framegrabber",
+"1130  Computervision",
+"1131  Philips Semiconductors",
+"	1561  USB 1.1 Host Controller",
+"	1562  USB 2.0 Host Controller",
+"	3400  SmartPCI56(UCB1500) 56K Modem",
+"	5400  TriMedia TM1000/1100",
+"	5402  TriMedia TM-1300",
+"		1244 0f00  Fritz!Card DSL",
+"	5405  TriMedia TM1500",
+"	5406  TriMedia TM1700",
+"	7130  SAA7130 Video Broadcast Decoder",
+"		102b 48d0  Matrox CronosPlus",
+"		1048 226b  ELSA EX-VISION 300TV",
+"		1131 2001  10MOONS PCI TV CAPTURE CARD",
+"		1131 2005  Techcom (India) TV Tuner Card (SSD-TV-670)",
+"		1461 050c  Nagase Sangyo TransGear 3000TV",
+"		1461 10ff  AVerMedia DVD EZMaker",
+"		1461 2108  AverMedia AverTV/305",
+"		1461 2115  AverMedia AverTV Studio 305",
+"		153b 1152  Terratec Cinergy 200 TV",
+"		185b c100  Compro VideoMate TV PVR/FM",
+"		185b c901  Videomate DVB-T200",
+"		5168 0138  LifeView FlyVIDEO2000",
+"	7133  SAA7133/SAA7135 Video Broadcast Decoder",
+"		0000 4091  Beholder BeholdTV 409 FM",
+"		1019 4cb5  Elitegroup ECS TVP3XP FM1236 Tuner Card (NTSC,FM)",
+"		1043 0210  FlyTV mini Asus Digimatrix",
+"		1043 4843  ASUS TV-FM 7133",
+"		1043 4845  TV-FM 7135",
+"		1043 4862  P7131 Dual",
+"		1131 2001  Proteus Pro [philips reference design]",
+"		1131 2018  Tiger reference design",
+"		1131 4ee9  MonsterTV Mobile",
+"		11bd 002b  PCTV Stereo",
+"		11bd 002e  PCTV 110i (saa7133)",
+"		12ab 0800  PURPLE TV",
+"		1421 0335  Instant TV DVB-T Cardbus",
+"		1421 1370  Instant TV (saa7135)",
+"		1435 7330  VFG7330",
+"		1435 7350  VFG7350",
+"		1461 1044  AVerTVHD MCE A180",
+"		1461 f31f  Avermedia AVerTV GO 007 FM",
+"		1462 6231  TV@Anywhere plus",
+"		1489 0214  LifeView FlyTV Platinum FM",
+"		14c0 1212  LifeView FlyTV Platinum Mini2",
+"		153b 1160  Cinergy 250 PCI TV",
+"		153b 1162  Terratec Cinergy 400 mobile",
+"		185b c100  VideoMate TV",
+"		5168 0306  LifeView FlyDVB-T DUO",
+"		5168 0319  LifeView FlyDVB Trio",
+"	7134  SAA7134/SAA7135HL Video Broadcast Decoder",
+"		1019 4cb4  Elitegroup ECS TVP3XP FM1216 Tuner Card(PAL-BG,FM)",
+"		1043 0210  Digimatrix TV",
+"		1043 4840  ASUS TV-FM 7134",
+"		1131 2004  EUROPA V3 reference design",
+"		1131 4e85  SKNet Monster TV",
+"		1131 6752  EMPRESS",
+"		11bd 002b  PCTV Stereo",
+"		11bd 002d  PCTV 300i DVB-T + PAL",
+"		1461 2c00  AverTV Hybrid+FM PCI",
+"		1461 9715  AVerTV Studio 307",
+"		1461 a70a  Avermedia AVerTV 307",
+"		1461 a70b  AverMedia M156 / Medion 2819",
+"		1461 d6ee  Cardbus TV/Radio (E500)",
+"		1471 b7e9  AVerTV Cardbus plus",
+"		153b 1142  Terratec Cinergy 400 TV",
+"		153b 1143  Terratec Cinergy 600 TV",
+"		153b 1158  Terratec Cinergy 600 TV MK3",
+"		1540 9524  ProVideo PV952",
+"		16be 0003  Medion 7134",
+"		185b c200  Compro VideoMate Gold+ Pal",
+"		185b c900  Videomate DVB-T300",
+"		1894 a006  KNC One TV-Station DVR",
+"		1894 fe01  KNC One TV-Station RDS / Typhoon TV Tuner RDS",
+"	7145  SAA7145",
+"	7146  SAA7146",
+"		110a 0000  Fujitsu/Siemens DVB-C card rev1.5",
+"		110a ffff  Fujitsu/Siemens DVB-C card rev1.5",
+"		1131 4f56  KNC1 DVB-S Budget",
+"		1131 4f60  Fujitsu-Siemens Activy DVB-S Budget Rev AL",
+"		1131 4f61  Activy DVB-S Budget Rev GR",
+"		1131 5f61  Activy DVB-T Budget",
+"		114b 2003  DVRaptor Video Edit/Capture Card",
+"		11bd 0006  DV500 Overlay",
+"		11bd 000a  DV500 Overlay",
+"		11bd 000f  DV500 Overlay",
+"		13c2 0000  Siemens/Technotrend/Hauppauge DVB card rev1.3 or rev1.5",
+"		13c2 0001  Technotrend/Hauppauge DVB card rev1.3 or rev1.6",
+"		13c2 0002  Technotrend/Hauppauge DVB card rev2.1",
+"		13c2 0003  Technotrend/Hauppauge DVB card rev2.1",
+"		13c2 0004  Technotrend/Hauppauge DVB card rev2.1",
+"		13c2 0006  Technotrend/Hauppauge DVB card rev1.3 or rev1.6",
+"		13c2 0008  Technotrend/Hauppauge DVB-T",
+"		13c2 000a  Octal/Technotrend DVB-C for iTV",
+"		13c2 1003  Technotrend-Budget/Hauppauge WinTV-NOVA-S DVB card",
+"		13c2 1004  Technotrend-Budget/Hauppauge WinTV-NOVA-C DVB card",
+"		13c2 1005  Technotrend-Budget/Hauppauge WinTV-NOVA-T DVB card",
+"		13c2 100c  Technotrend-Budget/Hauppauge WinTV-NOVA-CI DVB card",
+"		13c2 100f  Technotrend-Budget/Hauppauge WinTV-NOVA-CI DVB card",
+"		13c2 1011  Technotrend-Budget/Hauppauge WinTV-NOVA-T DVB card",
+"		13c2 1013  SATELCO Multimedia DVB",
+"		13c2 1016  WinTV-NOVA-SE DVB card",
+"		13c2 1102  Technotrend/Hauppauge DVB card rev2.1",
+"		153b 1156  Terratec Cynergy 1200C",
+"	9730  SAA9730 Integrated Multimedia and Peripheral Controller",
+"1132  Mitel Corp.",
+"1133  Eicon Networks Corporation",
+"	7901  EiconCard S90",
+"	7902  EiconCard S90",
+"	7911  EiconCard S91",
+"	7912  EiconCard S91",
+"	7941  EiconCard S94",
+"	7942  EiconCard S94",
+"	7943  EiconCard S94",
+"	7944  EiconCard S94",
+"	b921  EiconCard P92",
+"	b922  EiconCard P92",
+"	b923  EiconCard P92",
+"	e001  Diva Pro 2.0 S/T",
+"	e002  Diva 2.0 S/T PCI",
+"	e003  Diva Pro 2.0 U",
+"	e004  Diva 2.0 U PCI",
+"	e005  Diva 2.01 S/T PCI",
+"	e006  Diva CT S/T PCI",
+"	e007  Diva CT U PCI",
+"	e008  Diva CT Lite S/T PCI",
+"	e009  Diva CT Lite U PCI",
+"	e00a  Diva ISDN+V.90 PCI",
+"	e00b  Diva 2.02 PCI S/T",
+"	e00c  Diva 2.02 PCI U",
+"	e00d  Diva ISDN Pro 3.0 PCI",
+"	e00e  Diva ISDN+CT S/T PCI Rev 2",
+"	e010  Diva Server BRI-2M PCI",
+"		110a 0021  Fujitsu Siemens ISDN S0",
+"	e011  Diva Server BRI S/T Rev 2",
+"	e012  Diva Server 4BRI-8M PCI",
+"	e013  Diva Server 4BRI Rev 2",
+"		1133 1300  Diva Server V-4BRI-8",
+"		1133 e013  Diva Server 4BRI-8M 2.0 PCI",
+"	e014  Diva Server PRI-30M PCI",
+"	e015  DIVA Server PRI Rev 2",
+"		1133 e015  Diva Server PRI 2.0 PCI",
+"	e016  Diva Server Voice 4BRI PCI",
+"	e017  Diva Server Voice 4BRI Rev 2",
+"		1133 e017  Diva Server Voice 4BRI-8M 2.0 PCI",
+"	e018  Diva Server BRI-2M 2.0 PCI",
+"		1133 1800  Diva Server V-BRI-2",
+"		1133 e018  Diva Server BRI-2M 2.0 PCI",
+"	e019  Diva Server Voice PRI Rev 2",
+"		1133 e019  Diva Server Voice PRI 2.0 PCI",
+"	e01a  Diva Server 2FX",
+"	e01b  Diva Server Voice BRI-2M 2.0 PCI",
+"		1133 e01b  Diva Server Voice BRI-2M 2.0 PCI",
+"	e01c  Diva Server PRI Rev 3",
+"		1133 1c01  Diva Server PRI/E1/T1-8",
+"		1133 1c02  Diva Server PRI/T1-24",
+"		1133 1c03  Diva Server PRI/E1-30",
+"		1133 1c04  Diva Server PRI/E1/T1",
+"		1133 1c05  Diva Server V-PRI/T1-24",
+"		1133 1c06  Diva Server V-PRI/E1-30",
+"		1133 1c07  Diva Server PRI/E1/T1-8 Cornet NQ",
+"		1133 1c08  Diva Server PRI/T1-24 Cornet NQ",
+"		1133 1c09  Diva Server PRI/E1-30 Cornet NQ",
+"		1133 1c0a  Diva Server PRI/E1/T1 Cornet NQ",
+"		1133 1c0b  Diva Server V-PRI/T1-24 Cornet NQ",
+"		1133 1c0c  Diva Server V-PRI/E1-30 Cornet NQ",
+"	e01e  Diva Server 2PRI",
+"	e020  Diva Server 4PRI",
+"	e022  Diva Server Analog-2P",
+"	e024  Diva Server Analog-4P",
+"		1133 2400  Diva Server V-Analog-4P",
+"		1133 e024  Diva Server Analog-4P",
+"	e028  Diva Server Analog-8P",
+"		1133 2800  Diva Server V-Analog-8P",
+"		1133 e028  Diva Server Analog-8P",
+"	e02a  Diva Server IPM-300",
+"	e02c  Diva Server IPM-600",
+"1134  Mercury Computer Systems",
+"	0001  Raceway Bridge",
+"	0002  Dual PCI to RapidIO Bridge",
+"1135  Fuji Xerox Co Ltd",
+"	0001  Printer controller",
+"1136  Momentum Data Systems",
+"1137  Cisco Systems Inc",
+"1138  Ziatech Corporation",
+"	8905  8905 [STD 32 Bridge]",
+"1139  Dynamic Pictures, Inc",
+"	0001  VGA Compatable 3D Graphics",
+"113a  FWB Inc",
+"113b  Network Computing Devices",
+"113c  Cyclone Microsystems, Inc.",
+"	0000  PCI-9060 i960 Bridge",
+"	0001  PCI-SDK [PCI i960 Evaluation Platform]",
+"	0911  PCI-911 [i960Jx-based Intelligent I/O Controller]",
+"	0912  PCI-912 [i960CF-based Intelligent I/O Controller]",
+"	0913  PCI-913",
+"	0914  PCI-914 [I/O Controller w/ secondary PCI bus]",
+"113d  Leading Edge Products Inc",
+"113e  Sanyo Electric Co - Computer Engineering Dept",
+"113f  Equinox Systems, Inc.",
+"	0808  SST-64P Adapter",
+"	1010  SST-128P Adapter",
+"	80c0  SST-16P DB Adapter",
+"	80c4  SST-16P RJ Adapter",
+"	80c8  SST-16P Adapter",
+"	8888  SST-4P Adapter",
+"	9090  SST-8P Adapter",
+"1140  Intervoice Inc",
+"1141  Crest Microsystem Inc",
+"1142  Alliance Semiconductor Corporation",
+"	3210  AP6410",
+"	6422  ProVideo 6422",
+"	6424  ProVideo 6424",
+"	6425  ProMotion AT25",
+"	643d  ProMotion AT3D",
+"1143  NetPower, Inc",
+"1144  Cincinnati Milacron",
+"	0001  Noservo controller",
+"1145  Workbit Corporation",
+"	8007  NinjaSCSI-32 Workbit",
+"	f007  NinjaSCSI-32 KME",
+"	f010  NinjaSCSI-32 Workbit",
+"	f012  NinjaSCSI-32 Logitec",
+"	f013  NinjaSCSI-32 Logitec",
+"	f015  NinjaSCSI-32 Melco",
+"	f020  NinjaSCSI-32 Sony PCGA-DVD51",
+"1146  Force Computers",
+"1147  Interface Corp",
+"1148  SysKonnect",
+"	4000  FDDI Adapter",
+"		0e11 b03b  Netelligent 100 FDDI DAS Fibre SC",
+"		0e11 b03c  Netelligent 100 FDDI SAS Fibre SC",
+"		0e11 b03d  Netelligent 100 FDDI DAS UTP",
+"		0e11 b03e  Netelligent 100 FDDI SAS UTP",
+"		0e11 b03f  Netelligent 100 FDDI SAS Fibre MIC",
+"		1148 5521  FDDI SK-5521 (SK-NET FDDI-UP)",
+"		1148 5522  FDDI SK-5522 (SK-NET FDDI-UP DAS)",
+"		1148 5541  FDDI SK-5541 (SK-NET FDDI-FP)",
+"		1148 5543  FDDI SK-5543 (SK-NET FDDI-LP)",
+"		1148 5544  FDDI SK-5544 (SK-NET FDDI-LP DAS)",
+"		1148 5821  FDDI SK-5821 (SK-NET FDDI-UP64)",
+"		1148 5822  FDDI SK-5822 (SK-NET FDDI-UP64 DAS)",
+"		1148 5841  FDDI SK-5841 (SK-NET FDDI-FP64)",
+"		1148 5843  FDDI SK-5843 (SK-NET FDDI-LP64)",
+"		1148 5844  FDDI SK-5844 (SK-NET FDDI-LP64 DAS)",
+"	4200  Token Ring adapter",
+"	4300  SK-9872 Gigabit Ethernet Server Adapter (SK-NET GE-ZX dual link)",
+"		1148 9821  SK-9821 Gigabit Ethernet Server Adapter (SK-NET GE-T)",
+"		1148 9822  SK-9822 Gigabit Ethernet Server Adapter (SK-NET GE-T dual link)",
+"		1148 9841  SK-9841 Gigabit Ethernet Server Adapter (SK-NET GE-LX)",
+"		1148 9842  SK-9842 Gigabit Ethernet Server Adapter (SK-NET GE-LX dual link)",
+"		1148 9843  SK-9843 Gigabit Ethernet Server Adapter (SK-NET GE-SX)",
+"		1148 9844  SK-9844 Gigabit Ethernet Server Adapter (SK-NET GE-SX dual link)",
+"		1148 9861  SK-9861 Gigabit Ethernet Server Adapter (SK-NET GE-SX Volition)",
+"		1148 9862  SK-9862 Gigabit Ethernet Server Adapter (SK-NET GE-SX Volition dual link)",
+"		1148 9871  SK-9871 Gigabit Ethernet Server Adapter (SK-NET GE-ZX)",
+"		1148 9872  SK-9872 Gigabit Ethernet Server Adapter (SK-NET GE-ZX dual link)",
+"		1259 2970  AT-2970SX Gigabit Ethernet Adapter",
+"		1259 2971  AT-2970LX Gigabit Ethernet Adapter",
+"		1259 2972  AT-2970TX Gigabit Ethernet Adapter",
+"		1259 2973  AT-2971SX Gigabit Ethernet Adapter",
+"		1259 2974  AT-2971T Gigabit Ethernet Adapter",
+"		1259 2975  AT-2970SX/2SC Gigabit Ethernet Adapter",
+"		1259 2976  AT-2970LX/2SC Gigabit Ethernet Adapter",
+"		1259 2977  AT-2970TX/2TX Gigabit Ethernet Adapter",
+"	4320  SK-9871 V2.0 Gigabit Ethernet 1000Base-ZX Adapter, PCI64, Fiber ZX/SC",
+"		1148 0121  Marvell RDK-8001 Adapter",
+"		1148 0221  Marvell RDK-8002 Adapter",
+"		1148 0321  Marvell RDK-8003 Adapter",
+"		1148 0421  Marvell RDK-8004 Adapter",
+"		1148 0621  Marvell RDK-8006 Adapter",
+"		1148 0721  Marvell RDK-8007 Adapter",
+"		1148 0821  Marvell RDK-8008 Adapter",
+"		1148 0921  Marvell RDK-8009 Adapter",
+"		1148 1121  Marvell RDK-8011 Adapter",
+"		1148 1221  Marvell RDK-8012 Adapter",
+"		1148 3221  SK-9521 V2.0 10/100/1000Base-T Adapter",
+"		1148 5021  SK-9821 V2.0 Gigabit Ethernet 10/100/1000Base-T Adapter",
+"		1148 5041  SK-9841 V2.0 Gigabit Ethernet 1000Base-LX Adapter",
+"		1148 5043  SK-9843 V2.0 Gigabit Ethernet 1000Base-SX Adapter",
+"		1148 5051  SK-9851 V2.0 Gigabit Ethernet 1000Base-SX Adapter",
+"		1148 5061  SK-9861 V2.0 Gigabit Ethernet 1000Base-SX Adapter",
+"		1148 5071  SK-9871 V2.0 Gigabit Ethernet 1000Base-ZX Adapter",
+"		1148 9521  SK-9521 10/100/1000Base-T Adapter",
+"	4400  SK-9Dxx Gigabit Ethernet Adapter",
+"	4500  SK-9Mxx Gigabit Ethernet Adapter",
+"	9000  SK-9S21 10/100/1000Base-T Server Adapter, PCI-X, Copper RJ-45",
+"	9843  [Fujitsu] Gigabit Ethernet",
+"	9e00  SK-9E21D 10/100/1000Base-T Adapter, Copper RJ-45",
+"		1148 2100  SK-9E21 Server Adapter",
+"		1148 21d0  SK-9E21D 10/100/1000Base-T Adapter",
+"		1148 2200  SK-9E22 Server Adapter",
+"		1148 8100  SK-9E81 Server Adapter",
+"		1148 8200  SK-9E82 Server Adapter",
+"		1148 9100  SK-9E91 Server Adapter",
+"		1148 9200  SK-9E92 Server Adapter",
+"1149  Win System Corporation",
+"114a  VMIC",
+"	5579  VMIPCI-5579 (Reflective Memory Card)",
+"	5587  VMIPCI-5587 (Reflective Memory Card)",
+"	6504  VMIC PCI 7755 FPGA",
+"	7587  VMIVME-7587",
+"114b  Canopus Co., Ltd",
+"114c  Annabooks",
+"114d  IC Corporation",
+"114e  Nikon Systems Inc",
+"114f  Digi International",
+"	0002  AccelePort EPC",
+"	0003  RightSwitch SE-6",
+"	0004  AccelePort Xem",
+"	0005  AccelePort Xr",
+"	0006  AccelePort Xr,C/X",
+"	0009  AccelePort Xr/J",
+"	000a  AccelePort EPC/J",
+"	000c  DataFirePRIme T1 (1-port)",
+"	000d  SyncPort 2-Port (x.25/FR)",
+"	0011  AccelePort 8r EIA-232 (IBM)",
+"	0012  AccelePort 8r EIA-422",
+"	0014  AccelePort 8r EIA-422",
+"	0015  AccelePort Xem",
+"	0016  AccelePort EPC/X",
+"	0017  AccelePort C/X",
+"	001a  DataFirePRIme E1 (1-port)",
+"	001b  AccelePort C/X (IBM)",
+"	001d  DataFire RAS T1/E1/PRI",
+"		114f 0050  DataFire RAS E1 Adapter",
+"		114f 0051  DataFire RAS Dual E1 Adapter",
+"		114f 0052  DataFire RAS T1 Adapter",
+"		114f 0053  DataFire RAS Dual T1 Adapter",
+"	0023  AccelePort RAS",
+"	0024  DataFire RAS B4 ST/U",
+"		114f 0030  DataFire RAS BRI U Adapter",
+"		114f 0031  DataFire RAS BRI S/T Adapter",
+"	0026  AccelePort 4r 920",
+"	0027  AccelePort Xr 920",
+"	0028  ClassicBoard 4",
+"	0029  ClassicBoard 8",
+"	0034  AccelePort 2r 920",
+"	0035  DataFire DSP T1/E1/PRI cPCI",
+"	0040  AccelePort Xp",
+"	0042  AccelePort 2p",
+"	0043  AccelePort 4p",
+"	0044  AccelePort 8p",
+"	0045  AccelePort 16p",
+"	004e  AccelePort 32p",
+"	0070  Datafire Micro V IOM2 (Europe)",
+"	0071  Datafire Micro V (Europe)",
+"	0072  Datafire Micro V IOM2 (North America)",
+"	0073  Datafire Micro V (North America)",
+"	00b0  Digi Neo 4",
+"	00b1  Digi Neo 8",
+"	00c8  Digi Neo 2 DB9",
+"	00c9  Digi Neo 2 DB9 PRI",
+"	00ca  Digi Neo 2 RJ45",
+"	00cb  Digi Neo 2 RJ45 PRI",
+"	00d0  ClassicBoard 4 422",
+"	00d1  ClassicBoard 8 422",
+"	6001  Avanstar",
+"1150  Thinking Machines Corp",
+"1151  JAE Electronics Inc.",
+"1152  Megatek",
+"1153  Land Win Electronic Corp",
+"1154  Melco Inc",
+"1155  Pine Technology Ltd",
+"1156  Periscope Engineering",
+"1157  Avsys Corporation",
+"1158  Voarx R & D Inc",
+"	3011  Tokenet/vg 1001/10m anylan",
+"	9050  Lanfleet/Truevalue",
+"	9051  Lanfleet/Truevalue",
+"1159  Mutech Corp",
+"	0001  MV-1000",
+"115a  Harlequin Ltd",
+"115b  Parallax Graphics",
+"115c  Photron Ltd.",
+"115d  Xircom",
+"	0003  Cardbus Ethernet 10/100",
+"		1014 0181  10/100 EtherJet Cardbus Adapter",
+"		1014 1181  10/100 EtherJet Cardbus Adapter",
+"		1014 8181  10/100 EtherJet Cardbus Adapter",
+"		1014 9181  10/100 EtherJet Cardbus Adapter",
+"		115d 0181  Cardbus Ethernet 10/100",
+"		115d 0182  RealPort2 CardBus Ethernet 10/100 (R2BE-100)",
+"		115d 1181  Cardbus Ethernet 10/100",
+"		1179 0181  Cardbus Ethernet 10/100",
+"		8086 8181  EtherExpress PRO/100 Mobile CardBus 32 Adapter",
+"		8086 9181  EtherExpress PRO/100 Mobile CardBus 32 Adapter",
+"	0005  Cardbus Ethernet 10/100",
+"		1014 0182  10/100 EtherJet Cardbus Adapter",
+"		1014 1182  10/100 EtherJet Cardbus Adapter",
+"		115d 0182  Cardbus Ethernet 10/100",
+"		115d 1182  Cardbus Ethernet 10/100",
+"	0007  Cardbus Ethernet 10/100",
+"		1014 0182  10/100 EtherJet Cardbus Adapter",
+"		1014 1182  10/100 EtherJet Cardbus Adapter",
+"		115d 0182  Cardbus Ethernet 10/100",
+"		115d 1182  Cardbus Ethernet 10/100",
+"	000b  Cardbus Ethernet 10/100",
+"		1014 0183  10/100 EtherJet Cardbus Adapter",
+"		115d 0183  Cardbus Ethernet 10/100",
+"	000c  Mini-PCI V.90 56k Modem",
+"	000f  Cardbus Ethernet 10/100",
+"		1014 0183  10/100 EtherJet Cardbus Adapter",
+"		115d 0183  Cardbus Ethernet 10/100",
+"	00d4  Mini-PCI K56Flex Modem",
+"	0101  Cardbus 56k modem",
+"		115d 1081  Cardbus 56k Modem",
+"	0103  Cardbus Ethernet + 56k Modem",
+"		1014 9181  Cardbus 56k Modem",
+"		1115 1181  Cardbus Ethernet 100 + 56k Modem",
+"		115d 1181  CBEM56G-100 Ethernet + 56k Modem",
+"		8086 9181  PRO/100 LAN + Modem56 CardBus",
+"115e  Peer Protocols Inc",
+"115f  Maxtor Corporation",
+"1160  Megasoft Inc",
+"1161  PFU Limited",
+"1162  OA Laboratory Co Ltd",
+"1163  Rendition",
+"	0001  Verite 1000",
+"	2000  Verite V2000/V2100/V2200",
+"		1092 2000  Stealth II S220",
+"1164  Advanced Peripherals Technologies",
+"1165  Imagraph Corporation",
+"	0001  Motion TPEG Recorder/Player with audio",
+"1166  Broadcom",
+"	0000  CMIC-LE",
+"	0005  CNB20-LE Host Bridge",
+"	0006  CNB20HE Host Bridge",
+"	0007  CNB20-LE Host Bridge",
+"	0008  CNB20HE Host Bridge",
+"	0009  CNB20LE Host Bridge",
+"	0010  CIOB30",
+"	0011  CMIC-HE",
+"	0012  CMIC-WS Host Bridge (GC-LE chipset)",
+"	0013  CNB20-HE Host Bridge",
+"	0014  CMIC-LE Host Bridge (GC-LE chipset)",
+"	0015  CMIC-GC Host Bridge",
+"	0016  CMIC-GC Host Bridge",
+"	0017  GCNB-LE Host Bridge",
+"	0036  HT1000 PCI/PCI-X bridge",
+"	0101  CIOB-X2 PCI-X I/O Bridge",
+"	0104  HT1000 PCI/PCI-X bridge",
+"	0110  CIOB-E I/O Bridge with Gigabit Ethernet",
+"	0130  HT1000 PCI-X bridge",
+"	0132  HT1000 PCI-Express bridge",
+"	0200  OSB4 South Bridge",
+"	0201  CSB5 South Bridge",
+"		4c53 1080  CT8 mainboard",
+"	0203  CSB6 South Bridge",
+"		1734 1012  Primergy RX300",
+"	0205  HT1000 Legacy South Bridge",
+"	0211  OSB4 IDE Controller",
+"	0212  CSB5 IDE Controller",
+"		4c53 1080  CT8 mainboard",
+"	0213  CSB6 RAID/IDE Controller",
+"		1028 c134  Poweredge SC600",
+"		1734 1012  Primergy RX300",
+"	0214  HT1000 Legacy IDE controller",
+"	0217  CSB6 IDE Controller",
+"		1028 4134  Poweredge SC600",
+"	0220  OSB4/CSB5 OHCI USB Controller",
+"		4c53 1080  CT8 mainboard",
+"	0221  CSB6 OHCI USB Controller",
+"		1734 1012  Primergy RX300",
+"	0223  HT1000 USB Controller",
+"	0225  CSB5 LPC bridge",
+"	0227  GCLE-2 Host Bridge",
+"		1734 1012  Primergy RX300",
+"	0230  CSB5 LPC bridge",
+"		4c53 1080  CT8 mainboard",
+"	0234  HT1000 LPC Bridge",
+"	0240  K2 SATA",
+"	0241  RAIDCore RC4000",
+"	0242  RAIDCore BC4000",
+"	024a  BCM5785 (HT1000) SATA Native SATA Mode",
+"	024b  BCM5785 (HT1000) PATA/IDE Mode",
+"1167  Mutoh Industries Inc",
+"1168  Thine Electronics Inc",
+"1169  Centre for Development of Advanced Computing",
+"116a  Polaris Communications",
+"	6100  Bus/Tag Channel",
+"	6800  Escon Channel",
+"	7100  Bus/Tag Channel",
+"	7800  Escon Channel",
+"116b  Connectware Inc",
+"116c  Intelligent Resources Integrated Systems",
+"116d  Martin-Marietta",
+"116e  Electronics for Imaging",
+"116f  Workstation Technology",
+"1170  Inventec Corporation",
+"1171  Loughborough Sound Images Plc",
+"1172  Altera Corporation",
+"1173  Adobe Systems, Inc",
+"1174  Bridgeport Machines",
+"1175  Mitron Computer Inc.",
+"1176  SBE Incorporated",
+"1177  Silicon Engineering",
+"1178  Alfa, Inc.",
+"	afa1  Fast Ethernet Adapter",
+"1179  Toshiba America Info Systems",
+"	0102  Extended IDE Controller",
+"	0103  EX-IDE Type-B",
+"	0404  DVD Decoder card",
+"	0406  Tecra Video Capture device",
+"	0407  DVD Decoder card (Version 2)",
+"	0601  CPU to PCI bridge",
+"		1179 0001  Satellite Pro",
+"	0603  ToPIC95 PCI to CardBus Bridge for Notebooks",
+"	060a  ToPIC95",
+"		1179 0001  Satellite Pro",
+"	060f  ToPIC97",
+"	0617  ToPIC100 PCI to Cardbus Bridge with ZV Support",
+"	0618  CPU to PCI and PCI to ISA bridge",
+"	0701  FIR Port",
+"	0804  TC6371AF SmartMedia Controller",
+"	0805  SD TypA Controller",
+"	0d01  FIR Port Type-DO",
+"		1179 0001  FIR Port Type-DO",
+"117a  A-Trend Technology",
+"117b  L G Electronics, Inc.",
+"117c  Atto Technology",
+"	0030  Ultra320 SCSI Host Adapter",
+"		117c 8013  ExpressPCI UL4D",
+"		117c 8014  ExpressPCI UL4S",
+"117d  Becton & Dickinson",
+"117e  T/R Systems",
+"117f  Integrated Circuit Systems",
+"1180  Ricoh Co Ltd",
+"	0465  RL5c465",
+"	0466  RL5c466",
+"	0475  RL5c475",
+"		144d c006  vpr Matrix 170B4 CardBus bridge",
+"	0476  RL5c476 II",
+"		1014 0185  ThinkPad A/T/X Series",
+"		1028 0188  Inspiron 6000 laptop",
+"		1043 1967  V6800V",
+"		1043 1987  Asus A4K and Z81K notebooks, possibly others ( mid-2005 machines )",
+"		104d 80df  Vaio PCG-FX403",
+"		104d 80e7  VAIO PCG-GR214EP/GR214MP/GR215MP/GR314MP/GR315MP",
+"		144d c00c  P35 notebook",
+"		14ef 0220  PCD-RP-220S",
+"		17aa 201c  Thinkpad X60s",
+"	0477  RL5c477",
+"	0478  RL5c478",
+"		1014 0184  ThinkPad A30p (2653-64G)",
+"	0511  R5C511",
+"	0522  R5C522 IEEE 1394 Controller",
+"		1014 01cf  ThinkPad A30p (2653-64G)",
+"		1043 1967  V6800V",
+"	0551  R5C551 IEEE 1394 Controller",
+"		144d c006  vpr Matrix 170B4",
+"	0552  R5C552 IEEE 1394 Controller",
+"		1014 0511  ThinkPad A/T/X Series",
+"		1028 0188  Inspiron 6000 laptop",
+"		144d c00c  P35 notebook",
+"		17aa 201e  Thinkpad X60s",
+"	0554  R5C554",
+"	0575  R5C575 SD Bus Host Adapter",
+"	0576  R5C576 SD Bus Host Adapter",
+"	0592  R5C592 Memory Stick Bus Host Adapter",
+"		1043 1967  V6800V",
+"		144d c018  X20 IV",
+"	0811  R5C811",
+"	0822  R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter",
+"		1014 0556  Thinkpad X40",
+"		1014 0598  Thinkpad Z60m",
+"		1028 0188  Inspiron 6000 laptop",
+"		1028 01a2  Inspiron 9200",
+"		1043 1967  ASUS V6800V",
+"		144d c018  X20 IV",
+"		17aa 201d  Thinkpad X60s",
+"	0841  R5C841 CardBus/SD/SDIO/MMC/MS/MSPro/xD/IEEE1394",
+"	0852  xD-Picture Card Controller",
+"		1043 1967  V6800V",
+"1181  Telmatics International",
+"1183  Fujikura Ltd",
+"1184  Forks Inc",
+"1185  Dataworld International Ltd",
+"1186  D-Link System Inc",
+"	0100  DC21041",
+"	1002  DL10050 Sundance Ethernet",
+"		1186 1002  DFE-550TX",
+"		1186 1012  DFE-580TX",
+"	1025  AirPlus Xtreme G DWL-G650 Adapter",
+"	1026  AirXpert DWL-AG650 Wireless Cardbus Adapter",
+"	1043  AirXpert DWL-AG650 Wireless Cardbus Adapter",
+"	1300  RTL8139 Ethernet",
+"		1186 1300  DFE-538TX 10/100 Ethernet Adapter",
+"		1186 1301  DFE-530TX+ 10/100 Ethernet Adapter",
+"		1186 1303  DFE-528TX 10/100 Fast Ethernet PCI Adapter",
+"	1340  DFE-690TXD CardBus PC Card",
+"	1541  DFE-680TXD CardBus PC Card",
+"	1561  DRP-32TXD Cardbus PC Card",
+"	2027  AirPlus Xtreme G DWL-G520 Adapter",
+"	3203  AirPlus Xtreme G DWL-G520 Adapter",
+"	3300  DWL-510 2.4GHz Wireless PCI Adapter",
+"	3a03  AirPro DWL-A650 Wireless Cardbus Adapter(rev.B)",
+"	3a04  AirPro DWL-AB650 Multimode Wireless Cardbus Adapter",
+"	3a05  AirPro DWL-AB520 Multimode Wireless PCI Adapter",
+"	3a07  AirXpert DWL-AG650 Wireless Cardbus Adapter",
+"	3a08  AirXpert DWL-AG520 Wireless PCI Adapter",
+"	3a10  AirXpert DWL-AG650 Wireless Cardbus Adapter(rev.B)",
+"	3a11  AirXpert DWL-AG520 Wireless PCI Adapter(rev.B)",
+"	3a12  AirPlus DWL-G650 Wireless Cardbus Adapter(rev.C)",
+"	3a13  AirPlus DWL-G520 Wireless PCI Adapter(rev.B)",
+"	3a14  AirPremier DWL-AG530 Wireless PCI Adapter",
+"	3a63  AirXpert DWL-AG660 Wireless Cardbus Adapter",
+"	4000  DL2000-based Gigabit Ethernet",
+"	4300  DGE-528T Gigabit Ethernet Adapter",
+"	4b01  DGE-530T Gigabit Ethernet Adapter (rev 11)",
+"	4c00  Gigabit Ethernet Adapter",
+"		1186 4c00  DGE-530T Gigabit Ethernet Adapter",
+"	8400  D-Link DWL-650+ CardBus PC Card",
+"1187  Advanced Technology Laboratories, Inc.",
+"1188  Shima Seiki Manufacturing Ltd.",
+"1189  Matsushita Electronics Co Ltd",
+"118a  Hilevel Technology",
+"118b  Hypertec Pty Limited",
+"118c  Corollary, Inc",
+"	0014  PCIB [C-bus II to PCI bus host bridge chip]",
+"	1117  Intel 8-way XEON Profusion Chipset [Cache Coherency Filter]",
+"118d  BitFlow Inc",
+"	0001  Raptor-PCI framegrabber",
+"	0012  Model 12 Road Runner Frame Grabber",
+"	0014  Model 14 Road Runner Frame Grabber",
+"	0024  Model 24 Road Runner Frame Grabber",
+"	0044  Model 44 Road Runner Frame Grabber",
+"	0112  Model 12 Road Runner Frame Grabber",
+"	0114  Model 14 Road Runner Frame Grabber",
+"	0124  Model 24 Road Runner Frame Grabber",
+"	0144  Model 44 Road Runner Frame Grabber",
+"	0212  Model 12 Road Runner Frame Grabber",
+"	0214  Model 14 Road Runner Frame Grabber",
+"	0224  Model 24 Road Runner Frame Grabber",
+"	0244  Model 44 Road Runner Frame Grabber",
+"	0312  Model 12 Road Runner Frame Grabber",
+"	0314  Model 14 Road Runner Frame Grabber",
+"	0324  Model 24 Road Runner Frame Grabber",
+"	0344  Model 44 Road Runner Frame Grabber",
+"118e  Hermstedt GmbH",
+"118f  Green Logic",
+"1190  Tripace",
+"	c731  TP-910/920/940 PCI Ultra(Wide) SCSI Adapter",
+"1191  Artop Electronic Corp",
+"	0003  SCSI Cache Host Adapter",
+"	0004  ATP8400",
+"	0005  ATP850UF",
+"	0006  ATP860 NO-BIOS",
+"	0007  ATP860",
+"	0008  ATP865 NO-ROM",
+"	0009  ATP865",
+"	8002  AEC6710 SCSI-2 Host Adapter",
+"	8010  AEC6712UW SCSI",
+"	8020  AEC6712U SCSI",
+"	8030  AEC6712S SCSI",
+"	8040  AEC6712D SCSI",
+"	8050  AEC6712SUW SCSI",
+"	8060  AEC6712 SCSI",
+"	8080  AEC67160 SCSI",
+"	8081  AEC67160S SCSI",
+"	808a  AEC67162 2-ch. LVD SCSI",
+"1192  Densan Company Ltd",
+"1193  Zeitnet Inc.",
+"	0001  1221",
+"	0002  1225",
+"1194  Toucan Technology",
+"1195  Ratoc System Inc",
+"1196  Hytec Electronics Ltd",
+"1197  Gage Applied Sciences, Inc.",
+"	010c  CompuScope 82G 8bit 2GS/s Analog Input Card",
+"1198  Lambda Systems Inc",
+"1199  Attachmate Corporation",
+"119a  Mind Share, Inc.",
+"119b  Omega Micro Inc.",
+"	1221  82C092G",
+"119c  Information Technology Inst.",
+"119d  Bug, Inc. Sapporo Japan",
+"119e  Fujitsu Microelectronics Ltd.",
+"	0001  FireStream 155",
+"	0003  FireStream 50",
+"119f  Bull HN Information Systems",
+"11a0  Convex Computer Corporation",
+"11a1  Hamamatsu Photonics K.K.",
+"11a2  Sierra Research and Technology",
+"11a3  Deuretzbacher GmbH & Co. Eng. KG",
+"11a4  Barco Graphics NV",
+"11a5  Microunity Systems Eng. Inc",
+"11a6  Pure Data Ltd.",
+"11a7  Power Computing Corp.",
+"11a8  Systech Corp.",
+"11a9  InnoSys Inc.",
+"	4240  AMCC S933Q Intelligent Serial Card",
+"11aa  Actel",
+"11ab  Marvell Technology Group Ltd.",
+"	0146  GT-64010/64010A System Controller",
+"	138f  W8300 802.11 Adapter (rev 07)",
+"	1fa6  Marvell W8300 802.11 Adapter",
+"	1fa7  88W8310 and 88W8000G [Libertas] 802.11g client chipset",
+"	1faa  88w8335 [Libertas] 802.11b/g Wireless",
+"		1385 4e00  WG511 v2 54MBit/ Wireless PC-Card",
+"	4320  88E8001 Gigabit Ethernet Controller",
+"		1019 0f38  Marvell 88E8001 Gigabit Ethernet Controller (ECS)",
+"		1019 8001  Marvell 88E8001 Gigabit Ethernet Controller (ECS)",
+"		1043 173c  Marvell 88E8001 Gigabit Ethernet Controller (Asus)",
+"		1043 811a  Marvell 88E8001 Gigabit Ethernet Controller (Asus)",
+"		105b 0c19  Marvell 88E8001 Gigabit Ethernet Controller (Foxconn)",
+"		10b8 b452  EZ Card 1000 (SMC9452TXV.2)",
+"		11ab 0121  Marvell RDK-8001",
+"		11ab 0321  Marvell RDK-8003",
+"		11ab 1021  Marvell RDK-8010",
+"		11ab 4320  Marvell Yukon Gigabit Ethernet 10/100/1000Baset-T Constroller (Asus)",
+"		11ab 5021  Marvell Yukon Gigabit Ethernet 10/100/1000Base-T Controller (64 bit)",
+"		11ab 9521  Marvell Yukon Gigabit Ethernet 10/100/1000Base-T Controller (32 bit)",
+"		1458 e000  Marvell 88E8001 Gigabit Ethernet Controller (Gigabyte)",
+"		147b 1406  Marvell 88E8001 Gigabit Ethernet Controller (Abit)",
+"		15d4 0047  Marvell 88E8001 Gigabit Ethernet Controller (Iwill)",
+"		1695 9025  Marvell 88E8001 Gigabit Ethernet Controller (Epox)",
+"		17f2 1c03  Marvell 88E8001 Gigabit Ethernet Controller (Albatron)",
+"		270f 2803  Marvell 88E8001 Gigabit Ethernet Controller (Chaintech)",
+"	4340  88E8021 PCI-X IPMI Gigabit Ethernet Controller",
+"	4341  88E8022 PCI-X IPMI Gigabit Ethernet Controller",
+"	4342  88E8061 PCI-E IPMI Gigabit Ethernet Controller",
+"	4343  88E8062 PCI-E IPMI Gigabit Ethernet Controller",
+"	4344  88E8021 PCI-X IPMI Gigabit Ethernet Controller",
+"	4345  88E8022 PCI-X IPMI Gigabit Ethernet Controller",
+"	4346  88E8061 PCI-E IPMI Gigabit Ethernet Controller",
+"	4347  88E8062 PCI-E IPMI Gigabit Ethernet Controller",
+"	4350  88E8035 PCI-E Fast Ethernet Controller",
+"		1179 0001  Marvell 88E8035 Fast Ethernet Controller (Toshiba)",
+"		11ab 3521  Marvell RDK-8035",
+"		1854 000d  Marvell 88E8035 Fast Ethernet Controller (LGE)",
+"		1854 000e  Marvell 88E8035 Fast Ethernet Controller (LGE)",
+"		1854 000f  Marvell 88E8035 Fast Ethernet Controller (LGE)",
+"		1854 0011  Marvell 88E8035 Fast Ethernet Controller (LGE)",
+"		1854 0012  Marvell 88E8035 Fast Ethernet Controller (LGE)",
+"		1854 0016  Marvell 88E8035 Fast Ethernet Controller (LGE)",
+"		1854 0017  Marvell 88E8035 Fast Ethernet Controller (LGE)",
+"		1854 0018  Marvell 88E8035 Fast Ethernet Controller (LGE)",
+"		1854 0019  Marvell 88E8035 Fast Ethernet Controller (LGE)",
+"		1854 001c  Marvell 88E8035 Fast Ethernet Controller (LGE)",
+"		1854 001e  Marvell 88E8035 Fast Ethernet Controller (LGE)",
+"		1854 0020  Marvell 88E8035 Fast Ethernet Controller (LGE)",
+"	4351  88E8036 PCI-E Fast Ethernet Controller",
+"		107b 4009  Marvell 88E8036 Fast Ethernet Controller (Wistron)",
+"		10f7 8338  Marvell 88E8036 Fast Ethernet Controller (Panasonic)",
+"		1179 0001  Marvell 88E8036 Fast Ethernet Controller (Toshiba)",
+"		1179 ff00  Marvell 88E8036 Fast Ethernet Controller (Compal)",
+"		1179 ff10  Marvell 88E8036 Fast Ethernet Controller (Inventec)",
+"		11ab 3621  Marvell RDK-8036",
+"		13d1 ac12  Abocom EFE3K - 10/100 Ethernet Expresscard",
+"		161f 203d  Marvell 88E8036 Fast Ethernet Controller (Arima)",
+"		1854 000d  Marvell 88E8036 Fast Ethernet Controller (LGE)",
+"		1854 000e  Marvell 88E8036 Fast Ethernet Controller (LGE)",
+"		1854 000f  Marvell 88E8036 Fast Ethernet Controller (LGE)",
+"		1854 0011  Marvell 88E8036 Fast Ethernet Controller (LGE)",
+"		1854 0012  Marvell 88E8036 Fast Ethernet Controller (LGE)",
+"		1854 0016  Marvell 88E8036 Fast Ethernet Controller (LGE)",
+"		1854 0017  Marvell 88E8036 Fast Ethernet Controller (LGE)",
+"		1854 0018  Marvell 88E8036 Fast Ethernet Controller (LGE)",
+"		1854 0019  Marvell 88E8036 Fast Ethernet Controller (LGE)",
+"		1854 001c  Marvell 88E8036 Fast Ethernet Controller (LGE)",
+"		1854 001e  Marvell 88E8036 Fast Ethernet Controller (LGE)",
+"		1854 0020  Marvell 88E8036 Fast Ethernet Controller (LGE)",
+"	4352  88E8038 PCI-E Fast Ethernet Controller",
+"	4360  88E8052 PCI-E ASF Gigabit Ethernet Controller",
+"		1043 8134  Marvell 88E8052 Gigabit Ethernet Controller (Asus)",
+"		107b 4009  Marvell 88E8052 Gigabit Ethernet Controller (Wistron)",
+"		11ab 5221  Marvell RDK-8052",
+"		1458 e000  Marvell 88E8052 Gigabit Ethernet Controller (Gigabyte)",
+"		1462 052c  Marvell 88E8052 Gigabit Ethernet Controller (MSI)",
+"		1849 8052  Marvell 88E8052 Gigabit Ethernet Controller (ASRock)",
+"		a0a0 0509  Marvell 88E8052 Gigabit Ethernet Controller (Aopen)",
+"	4361  88E8050 PCI-E ASF Gigabit Ethernet Controller",
+"		107b 3015  Marvell 88E8050 Gigabit Ethernet Controller (Gateway)",
+"		11ab 5021  Marvell 88E8050 Gigabit Ethernet Controller (Intel)",
+"		8086 3063  D925XCVLK mainboard",
+"		8086 3439  Marvell 88E8050 Gigabit Ethernet Controller (Intel)",
+"	4362  88E8053 PCI-E Gigabit Ethernet Controller",
+"		103c 2a0d  Marvell 88E8053 Gigabit Ethernet Controller (Asus)",
+"		1043 8142  Marvell 88E8053 Gigabit Ethernet controller PCIe (Asus)",
+"		109f 3197  Marvell 88E8053 Gigabit Ethernet Controller (Trigem)",
+"		10f7 8338  Marvell 88E8053 Gigabit Ethernet Controller (Panasonic)",
+"		10fd a430  Marvell 88E8053 Gigabit Ethernet Controller (SOYO)",
+"		1179 0001  Marvell 88E8053 Gigabit Ethernet Controller (Toshiba)",
+"		1179 ff00  Marvell 88E8053 Gigabit Ethernet Controller (Compal)",
+"		1179 ff10  Marvell 88E8053 Gigabit Ethernet Controller (Inventec)",
+"		11ab 5321  Marvell RDK-8053",
+"		1297 c240  Marvell 88E8053 Gigabit Ethernet Controller (Shuttle)",
+"		1297 c241  Marvell 88E8053 Gigabit Ethernet Controller (Shuttle)",
+"		1297 c242  Marvell 88E8053 Gigabit Ethernet Controller (Shuttle)",
+"		1297 c243  Marvell 88E8053 Gigabit Ethernet Controller (Shuttle)",
+"		1297 c244  Marvell 88E8053 Gigabit Ethernet Controller (Shuttle)",
+"		13d1 ac11  EGE5K - Giga Ethernet Expresscard",
+"		1458 e000  Marvell 88E8053 Gigabit Ethernet Controller (Gigabyte)",
+"		1462 058c  Marvell 88E8053 Gigabit Ethernet Controller (MSI)",
+"		14c0 0012  Marvell 88E8053 Gigabit Ethernet Controller (Compal)",
+"		1558 04a0  Marvell 88E8053 Gigabit Ethernet Controller (Clevo)",
+"		15bd 1003  Marvell 88E8053 Gigabit Ethernet Controller (DFI)",
+"		161f 203c  Marvell 88E8053 Gigabit Ethernet Controller (Arima)",
+"		161f 203d  Marvell 88E8053 Gigabit Ethernet Controller (Arima)",
+"		1695 9029  Marvell 88E8053 Gigabit Ethernet Controller (Epox)",
+"		17f2 2c08  Marvell 88E8053 Gigabit Ethernet Controller (Albatron)",
+"		17ff 0585  Marvell 88E8053 Gigabit Ethernet Controller (Quanta)",
+"		1849 8053  Marvell 88E8053 Gigabit Ethernet Controller (ASRock)",
+"		1854 000b  Marvell 88E8053 Gigabit Ethernet Controller (LGE)",
+"		1854 000c  Marvell 88E8053 Gigabit Ethernet Controller (LGE)",
+"		1854 0010  Marvell 88E8053 Gigabit Ethernet Controller (LGE)",
+"		1854 0013  Marvell 88E8053 Gigabit Ethernet Controller (LGE)",
+"		1854 0014  Marvell 88E8053 Gigabit Ethernet Controller (LGE)",
+"		1854 0015  Marvell 88E8053 Gigabit Ethernet Controller (LGE)",
+"		1854 001a  Marvell 88E8053 Gigabit Ethernet Controller (LGE)",
+"		1854 001b  Marvell 88E8053 Gigabit Ethernet Controller (LGE)",
+"		1854 001d  Marvell 88E8053 Gigabit Ethernet Controller (LGE)",
+"		1854 001f  Marvell 88E8053 Gigabit Ethernet Controller (LGE)",
+"		1854 0021  Marvell 88E8053 Gigabit Ethernet Controller (LGE)",
+"		1854 0022  Marvell 88E8053 Gigabit Ethernet Controller (LGE)",
+"		270f 2801  Marvell 88E8053 Gigabit Ethernet Controller (Chaintech)",
+"		a0a0 0506  Marvell 88E8053 Gigabit Ethernet Controller (Aopen)",
+"	4363  88E8055 PCI-E Gigabit Ethernet Controller",
+"	4611  GT-64115 System Controller",
+"	4620  GT-64120/64120A/64121A System Controller",
+"	4801  GT-48001",
+"	5005  Belkin F5D5005 Gigabit Desktop Network PCI Card",
+"	5040  MV88SX5040 4-port SATA I PCI-X Controller",
+"	5041  MV88SX5041 4-port SATA I PCI-X Controller",
+"	5080  MV88SX5080 8-port SATA I PCI-X Controller",
+"	5081  MV88SX5081 8-port SATA I PCI-X Controller",
+"	6041  MV88SX6041 4-port SATA II PCI-X Controller",
+"	6081  MV88SX6081 8-port SATA II PCI-X Controller",
+"	6460  MV64360/64361/64362 System Controller",
+"	6480  MV64460/64461/64462 System Controller",
+"	f003  GT-64010 Primary Image Piranha Image Generator",
+"11ac  Canon Information Systems Research Aust.",
+"11ad  Lite-On Communications Inc",
+"	0002  LNE100TX",
+"		11ad 0002  LNE100TX",
+"		11ad 0003  LNE100TX",
+"		11ad f003  LNE100TX",
+"		11ad ffff  LNE100TX",
+"		1385 f004  FA310TX",
+"	c115  LNE100TX [Linksys EtherFast 10/100]",
+"		11ad c001  LNE100TX [ver 2.0]",
+"11ae  Aztech System Ltd",
+"11af  Avid Technology Inc.",
+"	0001  Cinema",
+"	ee40  Digidesign Audiomedia III",
+"11b0  V3 Semiconductor Inc.",
+"	0002  V300PSC",
+"	0292  V292PBC [Am29030/40 Bridge]",
+"	0960  V96xPBC",
+"	c960  V96DPC",
+"11b1  Apricot Computers",
+"11b2  Eastman Kodak",
+"11b3  Barr Systems Inc.",
+"11b4  Leitch Technology International",
+"11b5  Radstone Technology Plc",
+"11b6  United Video Corp",
+"11b7  Motorola",
+"11b8  XPoint Technologies, Inc",
+"	0001  Quad PeerMaster",
+"11b9  Pathlight Technology Inc.",
+"	c0ed  SSA Controller",
+"11ba  Videotron Corp",
+"11bb  Pyramid Technology",
+"11bc  Network Peripherals Inc",
+"	0001  NP-PCI",
+"11bd  Pinnacle Systems Inc.",
+"	002e  PCTV 40i",
+"	bede  AV/DV Studio Capture Card",
+"11be  International Microcircuits Inc",
+"11bf  Astrodesign, Inc.",
+"11c0  Hewlett Packard",
+"11c1  Agere Systems",
+"	0440  56k WinModem",
+"		1033 8015  LT WinModem 56k Data+Fax+Voice+Dsvd",
+"		1033 8047  LT WinModem 56k Data+Fax+Voice+Dsvd",
+"		1033 804f  LT WinModem 56k Data+Fax+Voice+Dsvd",
+"		10cf 102c  LB LT Modem V.90 56k",
+"		10cf 104a  BIBLO LT Modem 56k",
+"		10cf 105f  LB2 LT Modem V.90 56k",
+"		1179 0001  Internal V.90 Modem",
+"		11c1 0440  LT WinModem 56k Data+Fax+Voice+Dsvd",
+"		122d 4101  MDP7800-U Modem",
+"		122d 4102  MDP7800SP-U Modem",
+"		13e0 0040  LT WinModem 56k Data+Fax+Voice+Dsvd",
+"		13e0 0440  LT WinModem 56k Data+Fax+Voice+Dsvd",
+"		13e0 0441  LT WinModem 56k Data+Fax+Voice+Dsvd",
+"		13e0 0450  LT WinModem 56k Data+Fax+Voice+Dsvd",
+"		13e0 f100  LT WinModem 56k Data+Fax+Voice+Dsvd",
+"		13e0 f101  LT WinModem 56k Data+Fax+Voice+Dsvd",
+"		144d 2101  LT56PV Modem",
+"		149f 0440  LT WinModem 56k Data+Fax+Voice+Dsvd",
+"	0441  56k WinModem",
+"		1033 804d  LT WinModem 56k Data+Fax",
+"		1033 8065  LT WinModem 56k Data+Fax",
+"		1092 0440  Supra 56i",
+"		1179 0001  Internal V.90 Modem",
+"		11c1 0440  LT WinModem 56k Data+Fax",
+"		11c1 0441  LT WinModem 56k Data+Fax",
+"		122d 4100  MDP7800-U Modem",
+"		13e0 0040  LT WinModem 56k Data+Fax",
+"		13e0 0100  LT WinModem 56k Data+Fax",
+"		13e0 0410  LT WinModem 56k Data+Fax",
+"		13e0 0420  TelePath Internet 56k WinModem",
+"		13e0 0440  LT WinModem 56k Data+Fax",
+"		13e0 0443  LT WinModem 56k Data+Fax",
+"		13e0 f102  LT WinModem 56k Data+Fax",
+"		1416 9804  CommWave 56k Modem",
+"		141d 0440  LT WinModem 56k Data+Fax",
+"		144f 0441  Lucent 56k V.90 DF Modem",
+"		144f 0449  Lucent 56k V.90 DF Modem",
+"		144f 110d  Lucent Win Modem",
+"		1468 0441  Presario 56k V.90 DF Modem",
+"		1668 0440  Lucent Win Modem",
+"	0442  56k WinModem",
+"		11c1 0440  LT WinModem 56k Data+Fax+Voice+VoiceView+Dsvd",
+"		11c1 0442  LT WinModem 56k Data+Fax+Voice+VoiceView+Dsvd",
+"		13e0 0412  LT WinModem 56k Data+Fax+Voice+VoiceView+Dsvd",
+"		13e0 0442  LT WinModem 56k Data+Fax+Voice+VoiceView+Dsvd",
+"		13fc 2471  LT WinModem 56k Data+Fax+Voice+VoiceView+Dsvd",
+"		144d 2104  LT56PT Modem",
+"		144f 1104  LT WinModem 56k Data+Fax+Voice+VoiceView+Dsvd",
+"		149f 0440  LT WinModem 56k Data+Fax+Voice+VoiceView+Dsvd",
+"		1668 0440  LT WinModem 56k Data+Fax+Voice+VoiceView+Dsvd",
+"	0443  LT WinModem",
+"	0444  LT WinModem",
+"	0445  LT WinModem",
+"		8086 2203  PRO/100+ MiniPCI (probably an Ambit U98.003.C.00 combo card)",
+"		8086 2204  PRO/100+ MiniPCI on Armada E500",
+"	0446  LT WinModem",
+"	0447  LT WinModem",
+"	0448  WinModem 56k",
+"		1014 0131  Lucent Win Modem",
+"		1033 8066  LT WinModem 56k Data+Fax+Voice+Dsvd",
+"		13e0 0030  56k Voice Modem",
+"		13e0 0040  LT WinModem 56k Data+Fax+Voice+Dsvd",
+"		1668 2400  LT WinModem 56k (MiniPCI Ethernet+Modem)",
+"	0449  WinModem 56k",
+"		0e11 b14d  56k V.90 Modem",
+"		13e0 0020  LT WinModem 56k Data+Fax",
+"		13e0 0041  TelePath Internet 56k WinModem",
+"		1436 0440  Lucent Win Modem",
+"		144f 0449  Lucent 56k V.90 DFi Modem",
+"		1468 0410  IBM ThinkPad T23 (2647-4MG)",
+"		1468 0440  Lucent Win Modem",
+"		1468 0449  Presario 56k V.90 DFi Modem",
+"	044a  F-1156IV WinModem (V90, 56KFlex)",
+"		10cf 1072  LB Global LT Modem",
+"		13e0 0012  LT WinModem 56k Data+Fax+Voice+VoiceView+Dsvd",
+"		13e0 0042  LT WinModem 56k Data+Fax+Voice+VoiceView+Dsvd",
+"		144f 1005  LT WinModem 56k Data+Fax+Voice+VoiceView+Dsvd",
+"	044b  LT WinModem",
+"	044c  LT WinModem",
+"	044d  LT WinModem",
+"	044e  LT WinModem",
+"	044f  V90 WildWire Modem",
+"	0450  LT WinModem",
+"		1033 80a8  Versa Note Vxi",
+"		144f 4005  Magnia SG20",
+"		1468 0450  Evo N600c",
+"		4005 144f  LifeBook C Series",
+"	0451  LT WinModem",
+"	0452  LT WinModem",
+"	0453  LT WinModem",
+"	0454  LT WinModem",
+"	0455  LT WinModem",
+"	0456  LT WinModem",
+"	0457  LT WinModem",
+"	0458  LT WinModem",
+"	0459  LT WinModem",
+"	045a  LT WinModem",
+"	045c  LT WinModem",
+"	0461  V90 WildWire Modem",
+"	0462  V90 WildWire Modem",
+"	0480  Venus Modem (V90, 56KFlex)",
+"	048c  V.92 56K WinModem",
+"	048f  V.92 56k WinModem",
+"	5801  USB",
+"	5802  USS-312 USB Controller",
+"	5803  USS-344S USB Controller",
+"	5811  FW323",
+"		8086 524c  D865PERL mainboard",
+"		dead 0800  FireWire Host Bus Adapter",
+"	8110  T8110 H.100/H.110 TDM switch",
+"		12d9 000c  E1/T1 PMXc cPCI carrier card",
+"	ab10  WL60010 Wireless LAN MAC",
+"	ab11  WL60040 Multimode Wireles LAN MAC",
+"		11c1 ab12  WaveLAN 11abg Cardbus card (Model 1102)",
+"		11c1 ab13  WaveLAN 11abg MiniPCI card (Model 0512)",
+"		11c1 ab15  WaveLAN 11abg Cardbus card (Model 1106)",
+"		11c1 ab16  WaveLAN 11abg MiniPCI card (Model 0516)",
+"	ab20  ORiNOCO PCI Adapter",
+"	ab21  Agere Wireless PCI Adapter",
+"	ab30  Hermes2 Mini-PCI WaveLAN a/b/g",
+"		14cd 2012  Hermes2 Mini-PCI WaveLAN a/b/g",
+"	ed00  ET-131x PCI-E Ethernet Controller",
+"11c2  Sand Microelectronics",
+"11c3  NEC Corporation",
+"11c4  Document Technologies, Inc",
+"11c5  Shiva Corporation",
+"11c6  Dainippon Screen Mfg. Co. Ltd",
+"11c7  D.C.M. Data Systems",
+"11c8  Dolphin Interconnect Solutions AS",
+"	0658  PSB32 SCI-Adapter D31x",
+"	d665  PSB64 SCI-Adapter D32x",
+"	d667  PSB66 SCI-Adapter D33x",
+"11c9  Magma",
+"	0010  16-line serial port w/- DMA",
+"	0011  4-line serial port w/- DMA",
+"11ca  LSI Systems, Inc",
+"11cb  Specialix Research Ltd.",
+"	2000  PCI_9050",
+"		11cb 0200  SX",
+"		11cb b008  I/O8+",
+"	4000  SUPI_1",
+"	8000  T225",
+"11cc  Michels & Kleberhoff Computer GmbH",
+"11cd  HAL Computer Systems, Inc.",
+"11ce  Netaccess",
+"11cf  Pioneer Electronic Corporation",
+"11d0  Lockheed Martin Federal Systems-Manassas",
+"11d1  Auravision",
+"	01f7  VxP524",
+"11d2  Intercom Inc.",
+"11d3  Trancell Systems Inc",
+"11d4  Analog Devices",
+"	1535  Blackfin BF535 processor",
+"	1805  SM56 PCI modem",
+"	1889  AD1889 sound chip",
+"	1986  AD1986A sound chip",
+"	5340  AD1881 sound chip",
+"11d5  Ikon Corporation",
+"	0115  10115",
+"	0117  10117",
+"11d6  Tekelec Telecom",
+"11d7  Trenton Technology, Inc.",
+"11d8  Image Technologies Development",
+"11d9  TEC Corporation",
+"11da  Novell",
+"11db  Sega Enterprises Ltd",
+"11dc  Questra Corporation",
+"11dd  Crosfield Electronics Limited",
+"11de  Zoran Corporation",
+"	6057  ZR36057PQC Video cutting chipset",
+"		1031 7efe  DC10 Plus",
+"		1031 fc00  MiroVIDEO DC50, Motion JPEG Capture/CODEC Board",
+"		12f8 8a02  Tekram Video Kit",
+"		13ca 4231  JPEG/TV Card",
+"	6120  ZR36120",
+"		1328 f001  Cinemaster C DVD Decoder",
+"		13c2 0000  MediaFocus Satellite TV Card",
+"		1de1 9fff  Video Kit C210",
+"11df  New Wave PDG",
+"11e0  Cray Communications A/S",
+"11e1  GEC Plessey Semi Inc.",
+"11e2  Samsung Information Systems America",
+"11e3  Quicklogic Corporation",
+"	0001  COM-ON-AIR Dosch&Amand DECT",
+"	5030  PC Watchdog",
+"11e4  Second Wave Inc",
+"11e5  IIX Consulting",
+"11e6  Mitsui-Zosen System Research",
+"11e7  Toshiba America, Elec. Company",
+"11e8  Digital Processing Systems Inc.",
+"11e9  Highwater Designs Ltd.",
+"11ea  Elsag Bailey",
+"11eb  Formation Inc.",
+"11ec  Coreco Inc",
+"11ed  Mediamatics",
+"11ee  Dome Imaging Systems Inc",
+"11ef  Nicolet Technologies B.V.",
+"11f0  Compu-Shack",
+"	4231  FDDI",
+"	4232  FASTline UTP Quattro",
+"	4233  FASTline FO",
+"	4234  FASTline UTP",
+"	4235  FASTline-II UTP",
+"	4236  FASTline-II FO",
+"	4731  GIGAline",
+"11f1  Symbios Logic Inc",
+"11f2  Picture Tel Japan K.K.",
+"11f3  Keithley Metrabyte",
+"11f4  Kinetic Systems Corporation",
+"	2915  CAMAC controller",
+"11f5  Computing Devices International",
+"11f6  Compex",
+"	0112  ENet100VG4",
+"	0113  FreedomLine 100",
+"	1401  ReadyLink 2000",
+"	2011  RL100-ATX 10/100",
+"		11f6 2011  RL100-ATX",
+"	2201  ReadyLink 100TX (Winbond W89C840)",
+"		11f6 2011  ReadyLink 100TX",
+"	9881  RL100TX Fast Ethernet",
+"11f7  Scientific Atlanta",
+"11f8  PMC-Sierra Inc.",
+"	7375  PM7375 [LASAR-155 ATM SAR]",
+"11f9  I-Cube Inc",
+"11fa  Kasan Electronics Company, Ltd.",
+"11fb  Datel Inc",
+"11fc  Silicon Magic",
+"11fd  High Street Consultants",
+"11fe  Comtrol Corporation",
+"	0001  RocketPort 32 port w/external I/F",
+"	0002  RocketPort 8 port w/external I/F",
+"	0003  RocketPort 16 port w/external I/F",
+"	0004  RocketPort 4 port w/quad cable",
+"	0005  RocketPort 8 port w/octa cable",
+"	0006  RocketPort 8 port w/RJ11 connectors",
+"	0007  RocketPort 4 port w/RJ11 connectors",
+"	0008  RocketPort 8 port w/ DB78 SNI (Siemens) connector",
+"	0009  RocketPort 16 port w/ DB78 SNI (Siemens) connector",
+"	000a  RocketPort Plus 4 port",
+"	000b  RocketPort Plus 8 port",
+"	000c  RocketModem 6 port",
+"	000d  RocketModem 4-port",
+"	000e  RocketPort Plus 2 port RS232",
+"	000f  RocketPort Plus 2 port RS422",
+"	0801  RocketPort UPCI 32 port w/external I/F",
+"	0802  RocketPort UPCI 8 port w/external I/F",
+"	0803  RocketPort UPCI 16 port w/external I/F",
+"	0805  RocketPort UPCI 8 port w/octa cable",
+"	080c  RocketModem III 8 port",
+"	080d  RocketModem III 4 port",
+"	0812  RocketPort UPCI Plus 8 port RS422",
+"	0903  RocketPort Compact PCI 16 port w/external I/F",
+"	8015  RocketPort 4-port UART 16954",
+"11ff  Scion Corporation",
+"	0003  AG-5",
+"1200  CSS Corporation",
+"1201  Vista Controls Corp",
+"1202  Network General Corp.",
+"	4300  Gigabit Ethernet Adapter",
+"		1202 9841  SK-9841 LX",
+"		1202 9842  SK-9841 LX dual link",
+"		1202 9843  SK-9843 SX",
+"		1202 9844  SK-9843 SX dual link",
+"1203  Bayer Corporation, Agfa Division",
+"1204  Lattice Semiconductor Corporation",
+"1205  Array Corporation",
+"1206  Amdahl Corporation",
+"1208  Parsytec GmbH",
+"	4853  HS-Link Device",
+"1209  SCI Systems Inc",
+"120a  Synaptel",
+"120b  Adaptive Solutions",
+"120c  Technical Corp.",
+"120d  Compression Labs, Inc.",
+"120e  Cyclades Corporation",
+"	0100  Cyclom-Y below first megabyte",
+"	0101  Cyclom-Y above first megabyte",
+"	0102  Cyclom-4Y below first megabyte",
+"	0103  Cyclom-4Y above first megabyte",
+"	0104  Cyclom-8Y below first megabyte",
+"	0105  Cyclom-8Y above first megabyte",
+"	0200  Cyclades-Z below first megabyte",
+"	0201  Cyclades-Z above first megabyte",
+"	0300  PC300/RSV or /X21 (2 ports)",
+"	0301  PC300/RSV or /X21 (1 port)",
+"	0310  PC300/TE (2 ports)",
+"	0311  PC300/TE (1 port)",
+"	0320  PC300/TE-M (2 ports)",
+"	0321  PC300/TE-M (1 port)",
+"	0400  PC400",
+"120f  Essential Communications",
+"	0001  Roadrunner serial HIPPI",
+"1210  Hyperparallel Technologies",
+"1211  Braintech Inc",
+"1212  Kingston Technology Corp.",
+"1213  Applied Intelligent Systems, Inc.",
+"1214  Performance Technologies, Inc.",
+"1215  Interware Co., Ltd",
+"1216  Purup Prepress A/S",
+"1217  O2 Micro, Inc.",
+"	6729  OZ6729",
+"	673a  OZ6730",
+"	6832  OZ6832/6833 CardBus Controller",
+"	6836  OZ6836/6860 CardBus Controller",
+"	6872  OZ6812 CardBus Controller",
+"	6925  OZ6922 CardBus Controller",
+"	6933  OZ6933/711E1 CardBus/SmartCardBus Controller",
+"		1025 1016  Travelmate 612 TX",
+"	6972  OZ601/6912/711E0 CardBus/SmartCardBus Controller",
+"		1014 020c  ThinkPad R30",
+"		1179 0001  Magnia Z310",
+"	7110  OZ711Mx 4-in-1 MemoryCardBus Accelerator",
+"		103c 088c  NC8000 laptop",
+"		103c 0890  NC6000 laptop",
+"		1734 106c  Amilo A1645",
+"	7112  OZ711EC1/M1 SmartCardBus/MemoryCardBus Controller",
+"	7113  OZ711EC1 SmartCardBus Controller",
+"	7114  OZ711M1/MC1 4-in-1 MemoryCardBus Controller",
+"	7134  OZ711MP1/MS1 MemoryCardBus Controller",
+"	71e2  OZ711E2 SmartCardBus Controller",
+"	7212  OZ711M2 4-in-1 MemoryCardBus Controller",
+"	7213  OZ6933E CardBus Controller",
+"	7223  OZ711M3/MC3 4-in-1 MemoryCardBus Controller",
+"		103c 088c  NC8000 laptop",
+"		103c 0890  NC6000 laptop",
+"	7233  OZ711MP3/MS3 4-in-1 MemoryCardBus Controller",
+"1218  Hybricon Corp.",
+"1219  First Virtual Corporation",
+"121a  3Dfx Interactive, Inc.",
+"	0001  Voodoo",
+"	0002  Voodoo 2",
+"	0003  Voodoo Banshee",
+"		1092 0003  Monster Fusion",
+"		1092 4000  Monster Fusion",
+"		1092 4002  Monster Fusion",
+"		1092 4801  Monster Fusion AGP",
+"		1092 4803  Monster Fusion AGP",
+"		1092 8030  Monster Fusion",
+"		1092 8035  Monster Fusion AGP",
+"		10b0 0001  Dragon 4000",
+"		1102 1018  3D Blaster Banshee VE",
+"		121a 0001  Voodoo Banshee AGP",
+"		121a 0003  Voodoo Banshee AGP SGRAM",
+"		121a 0004  Voodoo Banshee",
+"		139c 0016  Raven",
+"		139c 0017  Raven",
+"		14af 0002  Maxi Gamer Phoenix",
+"	0004  Voodoo Banshee [Velocity 100]",
+"	0005  Voodoo 3",
+"		121a 0004  Voodoo3 AGP",
+"		121a 0030  Voodoo3 AGP",
+"		121a 0031  Voodoo3 AGP",
+"		121a 0034  Voodoo3 AGP",
+"		121a 0036  Voodoo3 2000 PCI",
+"		121a 0037  Voodoo3 AGP",
+"		121a 0038  Voodoo3 AGP",
+"		121a 003a  Voodoo3 AGP",
+"		121a 0044  Voodoo3",
+"		121a 004b  Velocity 100",
+"		121a 004c  Velocity 200",
+"		121a 004d  Voodoo3 AGP",
+"		121a 004e  Voodoo3 AGP",
+"		121a 0051  Voodoo3 AGP",
+"		121a 0052  Voodoo3 AGP",
+"		121a 0057  Voodoo3 3000 PCI",
+"		121a 0060  Voodoo3 3500 TV (NTSC)",
+"		121a 0061  Voodoo3 3500 TV (PAL)",
+"		121a 0062  Voodoo3 3500 TV (SECAM)",
+"	0009  Voodoo 4 / Voodoo 5",
+"		121a 0003  Voodoo5 PCI 5500",
+"		121a 0009  Voodoo5 AGP 5500/6000",
+"	0057  Voodoo 3/3000 [Avenger]",
+"121b  Advanced Telecommunications Modules",
+"121c  Nippon Texaco., Ltd",
+"121d  Lippert Automationstechnik GmbH",
+"121e  CSPI",
+"	0201  Myrinet 2000 Scalable Cluster Interconnect",
+"121f  Arcus Technology, Inc.",
+"1220  Ariel Corporation",
+"	1220  AMCC 5933 TMS320C80 DSP/Imaging board",
+"1221  Contec Co., Ltd",
+"1222  Ancor Communications, Inc.",
+"1223  Artesyn Communication Products",
+"	0003  PM/Link",
+"	0004  PM/T1",
+"	0005  PM/E1",
+"	0008  PM/SLS",
+"	0009  BajaSpan Resource Target",
+"	000a  BajaSpan Section 0",
+"	000b  BajaSpan Section 1",
+"	000c  BajaSpan Section 2",
+"	000d  BajaSpan Section 3",
+"	000e  PM/PPC",
+"1224  Interactive Images",
+"1225  Power I/O, Inc.",
+"1227  Tech-Source",
+"	0006  Raptor GFX 8P",
+"	0023  Raptor GFX [1100T]",
+"1228  Norsk Elektro Optikk A/S",
+"1229  Data Kinesis Inc.",
+"122a  Integrated Telecom",
+"122b  LG Industrial Systems Co., Ltd",
+"122c  Sican GmbH",
+"122d  Aztech System Ltd",
+"	1206  368DSP",
+"	1400  Trident PCI288-Q3DII (NX)",
+"	50dc  3328 Audio",
+"		122d 0001  3328 Audio",
+"	80da  3328 Audio",
+"		122d 0001  3328 Audio",
+"122e  Xyratex",
+"122f  Andrew Corporation",
+"1230  Fishcamp Engineering",
+"1231  Woodward McCoach, Inc.",
+"1232  GPT Limited",
+"1233  Bus-Tech, Inc.",
+"1234  Technical Corp.",
+"1235  Risq Modular Systems, Inc.",
+"1236  Sigma Designs Corporation",
+"	0000  RealMagic64/GX",
+"	6401  REALmagic 64/GX (SD 6425)",
+"1237  Alta Technology Corporation",
+"1238  Adtran",
+"1239  3DO Company",
+"123a  Visicom Laboratories, Inc.",
+"123b  Seeq Technology, Inc.",
+"123c  Century Systems, Inc.",
+"123d  Engineering Design Team, Inc.",
+"	0000  EasyConnect 8/32",
+"	0002  EasyConnect 8/64",
+"	0003  EasyIO",
+"123e  Simutech, Inc.",
+"123f  C-Cube Microsystems",
+"	00e4  MPEG",
+"	8120  E4\?",
+"		11bd 0006  DV500 E4",
+"		11bd 000a  DV500 E4",
+"		11bd 000f  DV500 E4",
+"		1809 0016  Emuzed MAUI-III PCI PVR FM TV",
+"	8888  Cinemaster C 3.0 DVD Decoder",
+"		1002 0001  Cinemaster C 3.0 DVD Decoder",
+"		1002 0002  Cinemaster C 3.0 DVD Decoder",
+"		1328 0001  Cinemaster C 3.0 DVD Decoder",
+"1240  Marathon Technologies Corp.",
+"1241  DSC Communications",
+"1242  JNI Corporation",
+"	1560  JNIC-1560 PCI-X Fibre Channel Controller",
+"		1242 6562  FCX2-6562 Dual Channel PCI-X Fibre Channel Adapter",
+"		1242 656a  FCX-6562 PCI-X Fibre Channel Adapter",
+"	4643  FCI-1063 Fibre Channel Adapter",
+"	6562  FCX2-6562 Dual Channel PCI-X Fibre Channel Adapter",
+"	656a  FCX-6562 PCI-X Fibre Channel Adapter",
+"1243  Delphax",
+"1244  AVM Audiovisuelles MKTG & Computer System GmbH",
+"	0700  B1 ISDN",
+"	0800  C4 ISDN",
+"	0a00  A1 ISDN [Fritz]",
+"		1244 0a00  FRITZ!Card ISDN Controller",
+"	0e00  Fritz!PCI v2.0 ISDN",
+"	1100  C2 ISDN",
+"	1200  T1 ISDN",
+"	2700  Fritz!Card DSL SL",
+"	2900  Fritz!Card DSL v2.0",
+"1245  A.P.D., S.A.",
+"1246  Dipix Technologies, Inc.",
+"1247  Xylon Research, Inc.",
+"1248  Central Data Corporation",
+"1249  Samsung Electronics Co., Ltd.",
+"124a  AEG Electrocom GmbH",
+"124b  SBS/Greenspring Modular I/O",
+"	0040  PCI-40A or cPCI-200 Quad IndustryPack carrier",
+"		124b 9080  PCI9080 Bridge",
+"124c  Solitron Technologies, Inc.",
+"124d  Stallion Technologies, Inc.",
+"	0000  EasyConnection 8/32",
+"	0002  EasyConnection 8/64",
+"	0003  EasyIO",
+"	0004  EasyConnection/RA",
+"124e  Cylink",
+"124f  Infortrend Technology, Inc.",
+"	0041  IFT-2000 Series RAID Controller",
+"1250  Hitachi Microcomputer System Ltd",
+"1251  VLSI Solutions Oy",
+"1253  Guzik Technical Enterprises",
+"1254  Linear Systems Ltd.",
+"1255  Optibase Ltd",
+"	1110  MPEG Forge",
+"	1210  MPEG Fusion",
+"	2110  VideoPlex",
+"	2120  VideoPlex CC",
+"	2130  VideoQuest",
+"1256  Perceptive Solutions, Inc.",
+"	4201  PCI-2220I",
+"	4401  PCI-2240I",
+"	5201  PCI-2000",
+"1257  Vertex Networks, Inc.",
+"1258  Gilbarco, Inc.",
+"1259  Allied Telesyn International",
+"	2560  AT-2560 Fast Ethernet Adapter (i82557B)",
+"	a117  RTL81xx Fast Ethernet",
+"	a120  21x4x DEC-Tulip compatible 10/100 Ethernet",
+"125a  ABB Power Systems",
+"125b  Asix Electronics Corporation",
+"	1400  ALFA GFC2204 Fast Ethernet",
+"		1186 1100  AX8814X Based PCI Fast Ethernet Adapter",
+"125c  Aurora Technologies, Inc.",
+"	0101  Saturn 4520P",
+"	0640  Aries 16000P",
+"125d  ESS Technology",
+"	0000  ES336H Fax Modem (Early Model)",
+"	1948  Solo\?",
+"	1968  ES1968 Maestro 2",
+"		1028 0085  ES1968 Maestro-2 PCI",
+"		1033 8051  ES1968 Maestro-2 Audiodrive",
+"	1969  ES1969 Solo-1 Audiodrive",
+"		1014 0166  ES1969 SOLO-1 AudioDrive on IBM Aptiva Mainboard",
+"		125d 8888  Solo-1 Audio Adapter",
+"		153b 111b  Terratec 128i PCI",
+"	1978  ES1978 Maestro 2E",
+"		0e11 b112  Armada M700/E500",
+"		1033 803c  ES1978 Maestro-2E Audiodrive",
+"		1033 8058  ES1978 Maestro-2E Audiodrive",
+"		1092 4000  Monster Sound MX400",
+"		1179 0001  ES1978 Maestro-2E Audiodrive",
+"	1988  ES1988 Allegro-1",
+"		0e11 0098  Evo N600c",
+"		1092 4100  Sonic Impact S100",
+"		125d 1988  ESS Allegro-1 Audiodrive",
+"	1989  ESS Modem",
+"		125d 1989  ESS Modem",
+"	1998  ES1983S Maestro-3i PCI Audio Accelerator",
+"		1028 00b1  Latitude C600",
+"		1028 00e6  ES1983S Maestro-3i (Dell Inspiron 8100)",
+"	1999  ES1983S Maestro-3i PCI Modem Accelerator",
+"	199a  ES1983S Maestro-3i PCI Audio Accelerator",
+"	199b  ES1983S Maestro-3i PCI Modem Accelerator",
+"	2808  ES336H Fax Modem (Later Model)",
+"	2838  ES2838/2839 SuperLink Modem",
+"	2898  ES2898 Modem",
+"		125d 0424  ES56-PI Data Fax Modem",
+"		125d 0425  ES56T-PI Data Fax Modem",
+"		125d 0426  ES56V-PI Data Fax Modem",
+"		125d 0427  VW-PI Data Fax Modem",
+"		125d 0428  ES56ST-PI Data Fax Modem",
+"		125d 0429  ES56SV-PI Data Fax Modem",
+"		147a c001  ES56-PI Data Fax Modem",
+"		14fe 0428  ES56-PI Data Fax Modem",
+"		14fe 0429  ES56-PI Data Fax Modem",
+"125e  Specialvideo Engineering SRL",
+"125f  Concurrent Technologies, Inc.",
+"1260  Intersil Corporation",
+"	3872  Prism 2.5 Wavelan chipset",
+"		1468 0202  LAN-Express IEEE 802.11b Wireless LAN",
+"	3873  Prism 2.5 Wavelan chipset",
+"		1186 3501  DWL-520 Wireless PCI Adapter",
+"		1186 3700  DWL-520 Wireless PCI Adapter, Rev E1",
+"		1385 4105  MA311 802.11b wireless adapter",
+"		1668 0414  HWP01170-01 802.11b PCI Wireless Adapter",
+"		16a5 1601  AIR.mate PC-400 PCI Wireless LAN Adapter",
+"		1737 3874  WMP11 Wireless 802.11b PCI Adapter",
+"		8086 2513  Wireless 802.11b MiniPCI Adapter",
+"	3886  ISL3886 [Prism Javelin/Prism Xbow]",
+"		17cf 0037  XG-901 and clones Wireless Adapter",
+"	3890  ISL3890 [Prism GT/Prism Duette]/ISL3886 [Prism Javelin/Prism Xbow]",
+"		10b8 2802  SMC2802W Wireless PCI Adapter",
+"		10b8 2835  SMC2835W Wireless Cardbus Adapter",
+"		10b8 a835  SMC2835W V2 Wireless Cardbus Adapter",
+"		1113 4203  WN4201B",
+"		1113 ee03  SMC2802W V2 Wireless PCI Adapter [ISL3886]",
+"		1113 ee08  SMC2835W V3 EU Wireless Cardbus Adapter",
+"		1186 3202  DWL-G650 A1 Wireless Adapter",
+"		1259 c104  CG-WLCB54GT Wireless Adapter",
+"		1385 4800  WG511 Wireless Adapter",
+"		16a5 1605  ALLNET ALL0271 Wireless PCI Adapter",
+"		17cf 0014  XG-600 and clones Wireless Adapter",
+"		17cf 0020  XG-900 and clones Wireless Adapter",
+"	8130  HMP8130 NTSC/PAL Video Decoder",
+"	8131  HMP8131 NTSC/PAL Video Decoder",
+"	ffff  ISL3886IK",
+"		1260 0000  Senao 3054MP+ (J) mini-PCI WLAN 802.11g adapter",
+"1261  Matsushita-Kotobuki Electronics Industries, Ltd.",
+"1262  ES Computer Company, Ltd.",
+"1263  Sonic Solutions",
+"1264  Aval Nagasaki Corporation",
+"1265  Casio Computer Co., Ltd.",
+"1266  Microdyne Corporation",
+"	0001  NE10/100 Adapter (i82557B)",
+"	1910  NE2000Plus (RT8029) Ethernet Adapter",
+"		1266 1910  NE2000Plus Ethernet Adapter",
+"1267  S. A. Telecommunications",
+"	5352  PCR2101",
+"	5a4b  Telsat Turbo",
+"1268  Tektronix",
+"1269  Thomson-CSF/TTM",
+"126a  Lexmark International, Inc.",
+"126b  Adax, Inc.",
+"126c  Northern Telecom",
+"	1211  10/100BaseTX [RTL81xx]",
+"	126c  802.11b Wireless Ethernet Adapter",
+"126d  Splash Technology, Inc.",
+"126e  Sumitomo Metal Industries, Ltd.",
+"126f  Silicon Motion, Inc.",
+"	0501  SM501 VoyagerGX Rev. AA",
+"	0510  SM501 VoyagerGX Rev. B",
+"	0710  SM710 LynxEM",
+"	0712  SM712 LynxEM+",
+"	0720  SM720 Lynx3DM",
+"	0730  SM731 Cougar3DR",
+"	0810  SM810 LynxE",
+"	0811  SM811 LynxE",
+"	0820  SM820 Lynx3D",
+"	0910  SM910",
+"1270  Olympus Optical Co., Ltd.",
+"1271  GW Instruments",
+"1272  Telematics International",
+"1273  Hughes Network Systems",
+"	0002  DirecPC",
+"1274  Ensoniq",
+"	1171  ES1373 [AudioPCI] (also Creative Labs CT5803)",
+"	1371  ES1371 [AudioPCI-97]",
+"		0e11 0024  AudioPCI on Motherboard Compaq Deskpro",
+"		0e11 b1a7  ES1371, ES1373 AudioPCI",
+"		1033 80ac  ES1371, ES1373 AudioPCI",
+"		1042 1854  Tazer",
+"		107b 8054  Tabor2",
+"		1274 1371  Creative Sound Blaster AudioPCI64V, AudioPCI128",
+"		1274 8001  CT4751 board",
+"		1462 6470  ES1371, ES1373 AudioPCI On Motherboard MS-6147 1.1A",
+"		1462 6560  ES1371, ES1373 AudioPCI On Motherboard MS-6156 1.10",
+"		1462 6630  ES1371, ES1373 AudioPCI On Motherboard MS-6163BX 1.0A",
+"		1462 6631  ES1371, ES1373 AudioPCI On Motherboard MS-6163VIA 1.0A",
+"		1462 6632  ES1371, ES1373 AudioPCI On Motherboard MS-6163BX 2.0A",
+"		1462 6633  ES1371, ES1373 AudioPCI On Motherboard MS-6163VIA 2.0A",
+"		1462 6820  ES1371, ES1373 AudioPCI On Motherboard MS-6182 1.00",
+"		1462 6822  ES1371, ES1373 AudioPCI On Motherboard MS-6182 1.00A",
+"		1462 6830  ES1371, ES1373 AudioPCI On Motherboard MS-6183 1.00",
+"		1462 6880  ES1371, ES1373 AudioPCI On Motherboard MS-6188 1.00",
+"		1462 6900  ES1371, ES1373 AudioPCI On Motherboard MS-6190 1.00",
+"		1462 6910  ES1371, ES1373 AudioPCI On Motherboard MS-6191",
+"		1462 6930  ES1371, ES1373 AudioPCI On Motherboard MS-6193",
+"		1462 6990  ES1371, ES1373 AudioPCI On Motherboard MS-6199BX 2.0A",
+"		1462 6991  ES1371, ES1373 AudioPCI On Motherboard MS-6199VIA 2.0A",
+"		14a4 2077  ES1371, ES1373 AudioPCI On Motherboard KR639",
+"		14a4 2105  ES1371, ES1373 AudioPCI On Motherboard MR800",
+"		14a4 2107  ES1371, ES1373 AudioPCI On Motherboard MR801",
+"		14a4 2172  ES1371, ES1373 AudioPCI On Motherboard DR739",
+"		1509 9902  ES1371, ES1373 AudioPCI On Motherboard KW11",
+"		1509 9903  ES1371, ES1373 AudioPCI On Motherboard KW31",
+"		1509 9904  ES1371, ES1373 AudioPCI On Motherboard KA11",
+"		1509 9905  ES1371, ES1373 AudioPCI On Motherboard KC13",
+"		152d 8801  ES1371, ES1373 AudioPCI On Motherboard CP810E",
+"		152d 8802  ES1371, ES1373 AudioPCI On Motherboard CP810",
+"		152d 8803  ES1371, ES1373 AudioPCI On Motherboard P3810E",
+"		152d 8804  ES1371, ES1373 AudioPCI On Motherboard P3810-S",
+"		152d 8805  ES1371, ES1373 AudioPCI On Motherboard P3820-S",
+"		270f 2001  ES1371, ES1373 AudioPCI On Motherboard 6CTR",
+"		270f 2200  ES1371, ES1373 AudioPCI On Motherboard 6WTX",
+"		270f 3000  ES1371, ES1373 AudioPCI On Motherboard 6WSV",
+"		270f 3100  ES1371, ES1373 AudioPCI On Motherboard 6WIV2",
+"		270f 3102  ES1371, ES1373 AudioPCI On Motherboard 6WIV",
+"		270f 7060  ES1371, ES1373 AudioPCI On Motherboard 6ASA2",
+"		8086 4249  ES1371, ES1373 AudioPCI On Motherboard BI440ZX",
+"		8086 424c  ES1371, ES1373 AudioPCI On Motherboard BL440ZX",
+"		8086 425a  ES1371, ES1373 AudioPCI On Motherboard BZ440ZX",
+"		8086 4341  ES1371, ES1373 AudioPCI On Motherboard Cayman",
+"		8086 4343  ES1371, ES1373 AudioPCI On Motherboard Cape Cod",
+"		8086 4541  D815EEA Motherboard",
+"		8086 4649  ES1371, ES1373 AudioPCI On Motherboard Fire Island",
+"		8086 464a  ES1371, ES1373 AudioPCI On Motherboard FJ440ZX",
+"		8086 4d4f  ES1371, ES1373 AudioPCI On Motherboard Montreal",
+"		8086 4f43  ES1371, ES1373 AudioPCI On Motherboard OC440LX",
+"		8086 5243  ES1371, ES1373 AudioPCI On Motherboard RC440BX",
+"		8086 5352  ES1371, ES1373 AudioPCI On Motherboard SunRiver",
+"		8086 5643  ES1371, ES1373 AudioPCI On Motherboard Vancouver",
+"		8086 5753  ES1371, ES1373 AudioPCI On Motherboard WS440BX",
+"	5000  ES1370 [AudioPCI]",
+"	5880  5880 AudioPCI",
+"		1274 2000  Creative Sound Blaster AudioPCI128",
+"		1274 2003  Creative SoundBlaster AudioPCI 128",
+"		1274 5880  Creative Sound Blaster AudioPCI128",
+"		1274 8001  Sound Blaster 16PCI 4.1ch",
+"		1458 a000  5880 AudioPCI On Motherboard 6OXET",
+"		1462 6880  5880 AudioPCI On Motherboard MS-6188 1.00",
+"		270f 2001  5880 AudioPCI On Motherboard 6CTR",
+"		270f 2200  5880 AudioPCI On Motherboard 6WTX",
+"		270f 7040  5880 AudioPCI On Motherboard 6ATA4",
+"1275  Network Appliance Corporation",
+"1276  Switched Network Technologies, Inc.",
+"1277  Comstream",
+"1278  Transtech Parallel Systems Ltd.",
+"	0701  TPE3/TM3 PowerPC Node",
+"	0710  TPE5 PowerPC PCI board",
+"1279  Transmeta Corporation",
+"	0060  TM8000 Northbridge",
+"	0061  TM8000 AGP bridge",
+"	0295  Northbridge",
+"	0395  LongRun Northbridge",
+"	0396  SDRAM controller",
+"	0397  BIOS scratchpad",
+"127a  Rockwell International",
+"	1002  HCF 56k Data/Fax Modem",
+"		1092 094c  SupraExpress 56i PRO [Diamond SUP2380]",
+"		122d 4002  HPG / MDP3858-U",
+"		122d 4005  MDP3858-E",
+"		122d 4007  MDP3858-A/-NZ",
+"		122d 4012  MDP3858-SA",
+"		122d 4017  MDP3858-W",
+"		122d 4018  MDP3858-W",
+"		127a 1002  Rockwell 56K D/F HCF Modem",
+"	1003  HCF 56k Data/Fax Modem",
+"		0e11 b0bc  229-DF Zephyr",
+"		0e11 b114  229-DF Cheetah",
+"		1033 802b  229-DF",
+"		13df 1003  PCI56RX Modem",
+"		13e0 0117  IBM",
+"		13e0 0147  IBM F-1156IV+/R3 Spain V.90 Modem",
+"		13e0 0197  IBM",
+"		13e0 01c7  IBM F-1156IV+/R3 WW V.90 Modem",
+"		13e0 01f7  IBM",
+"		1436 1003  IBM",
+"		1436 1103  IBM 5614PM3G V.90 Modem",
+"		1436 1602  Compaq 229-DF Ducati",
+"	1004  HCF 56k Data/Fax/Voice Modem",
+"		1048 1500  MicroLink 56k Modem",
+"		10cf 1059  Fujitsu 229-DFRT",
+"	1005  HCF 56k Data/Fax/Voice/Spkp (w/Handset) Modem",
+"		1005 127a  AOpen FM56-P",
+"		1033 8029  229-DFSV",
+"		1033 8054  Modem",
+"		10cf 103c  Fujitsu",
+"		10cf 1055  Fujitsu 229-DFSV",
+"		10cf 1056  Fujitsu 229-DFSV",
+"		122d 4003  MDP3858SP-U",
+"		122d 4006  Packard Bell MDP3858V-E",
+"		122d 4008  MDP3858SP-A/SP-NZ",
+"		122d 4009  MDP3858SP-E",
+"		122d 4010  MDP3858V-U",
+"		122d 4011  MDP3858SP-SA",
+"		122d 4013  MDP3858V-A/V-NZ",
+"		122d 4015  MDP3858SP-W",
+"		122d 4016  MDP3858V-W",
+"		122d 4019  MDP3858V-SA",
+"		13df 1005  PCI56RVP Modem",
+"		13e0 0187  IBM",
+"		13e0 01a7  IBM",
+"		13e0 01b7  IBM DF-1156IV+/R3 Spain V.90 Modem",
+"		13e0 01d7  IBM DF-1156IV+/R3 WW V.90 Modem",
+"		1436 1005  IBM",
+"		1436 1105  IBM",
+"		1437 1105  IBM 5614PS3G V.90 Modem",
+"	1022  HCF 56k Modem",
+"		1436 1303  M3-5614PM3G V.90 Modem",
+"	1023  HCF 56k Data/Fax Modem",
+"		122d 4020  Packard Bell MDP3858-WE",
+"		122d 4023  MDP3858-UE",
+"		13e0 0247  IBM F-1156IV+/R6 Spain V.90 Modem",
+"		13e0 0297  IBM",
+"		13e0 02c7  IBM F-1156IV+/R6 WW V.90 Modem",
+"		1436 1203  IBM",
+"		1436 1303  IBM",
+"	1024  HCF 56k Data/Fax/Voice Modem",
+"	1025  HCF 56k Data/Fax/Voice/Spkp (w/Handset) Modem",
+"		10cf 106a  Fujitsu 235-DFSV",
+"		122d 4021  Packard Bell MDP3858V-WE",
+"		122d 4022  MDP3858SP-WE",
+"		122d 4024  MDP3858V-UE",
+"		122d 4025  MDP3858SP-UE",
+"	1026  HCF 56k PCI Speakerphone Modem",
+"	1032  HCF 56k Modem",
+"	1033  HCF 56k Modem",
+"	1034  HCF 56k Modem",
+"	1035  HCF 56k PCI Speakerphone Modem",
+"	1036  HCF 56k Modem",
+"	1085  HCF 56k Volcano PCI Modem",
+"	2005  HCF 56k Data/Fax Modem",
+"		104d 8044  229-DFSV",
+"		104d 8045  229-DFSV",
+"		104d 8055  PBE/Aztech 235W-DFSV",
+"		104d 8056  235-DFSV",
+"		104d 805a  Modem",
+"		104d 805f  Modem",
+"		104d 8074  Modem",
+"	2013  HSF 56k Data/Fax Modem",
+"		1179 0001  Modem",
+"		1179 ff00  Modem",
+"	2014  HSF 56k Data/Fax/Voice Modem",
+"		10cf 1057  Fujitsu Citicorp III",
+"		122d 4050  MSP3880-U",
+"		122d 4055  MSP3880-W",
+"	2015  HSF 56k Data/Fax/Voice/Spkp (w/Handset) Modem",
+"		10cf 1063  Fujitsu",
+"		10cf 1064  Fujitsu",
+"		1468 2015  Fujitsu",
+"	2016  HSF 56k Data/Fax/Voice/Spkp Modem",
+"		122d 4051  MSP3880V-W",
+"		122d 4052  MSP3880SP-W",
+"		122d 4054  MSP3880V-U",
+"		122d 4056  MSP3880SP-U",
+"		122d 4057  MSP3880SP-A",
+"	4311  Riptide HSF 56k PCI Modem",
+"		127a 4311  Ring Modular\? Riptide HSF RT HP Dom",
+"		13e0 0210  HP-GVC",
+"	4320  Riptide PCI Audio Controller",
+"		1235 4320  Riptide PCI Audio Controller",
+"	4321  Riptide HCF 56k PCI Modem",
+"		1235 4321  Hewlett Packard DF",
+"		1235 4324  Hewlett Packard DF",
+"		13e0 0210  Hewlett Packard DF",
+"		144d 2321  Riptide",
+"	4322  Riptide PCI Game Controller",
+"		1235 4322  Riptide PCI Game Controller",
+"	8234  RapidFire 616X ATM155 Adapter",
+"		108d 0022  RapidFire 616X ATM155 Adapter",
+"		108d 0027  RapidFire 616X ATM155 Adapter",
+"127b  Pixera Corporation",
+"127c  Crosspoint Solutions, Inc.",
+"127d  Vela Research",
+"127e  Winnov, L.P.",
+"127f  Fujifilm",
+"1280  Photoscript Group Ltd.",
+"1281  Yokogawa Electric Corporation",
+"1282  Davicom Semiconductor, Inc.",
+"	9009  Ethernet 100/10 MBit",
+"	9100  21x4x DEC-Tulip compatible 10/100 Ethernet",
+"	9102  21x4x DEC-Tulip compatible 10/100 Ethernet",
+"	9132  Ethernet 100/10 MBit",
+"1283  Integrated Technology Express, Inc.",
+"	673a  IT8330G",
+"	8211  ITE 8211F Single Channel UDMA 133 (ASUS 8211 (ITE IT8212 ATA RAID Controller))",
+"		1043 8138  P5GD1-VW Mainboard",
+"	8212  IT/ITE8212 Dual channel ATA RAID controller (PCI version seems to be IT8212, embedded seems to be ITE8212)",
+"		1283 0001  IT/ITE8212 Dual channel ATA RAID controller",
+"	8330  IT8330G",
+"	8872  IT8874F PCI Dual Serial Port Controller",
+"	8888  IT8888F PCI to ISA Bridge with SMB",
+"	8889  IT8889F PCI to ISA Bridge",
+"	e886  IT8330G",
+"1284  Sahara Networks, Inc.",
+"1285  Platform Technologies, Inc.",
+"	0100  AGOGO sound chip (aka ESS Maestro 1)",
+"1286  Mazet GmbH",
+"1287  M-Pact, Inc.",
+"	001e  LS220D DVD Decoder",
+"	001f  LS220C DVD Decoder",
+"1288  Timestep Corporation",
+"1289  AVC Technology, Inc.",
+"128a  Asante Technologies, Inc.",
+"128b  Transwitch Corporation",
+"128c  Retix Corporation",
+"128d  G2 Networks, Inc.",
+"	0021  ATM155 Adapter",
+"128e  Hoontech Corporation/Samho Multi Tech Ltd.",
+"	0008  ST128 WSS/SB",
+"	0009  ST128 SAM9407",
+"	000a  ST128 Game Port",
+"	000b  ST128 MPU Port",
+"	000c  ST128 Ctrl Port",
+"128f  Tateno Dennou, Inc.",
+"1290  Sord Computer Corporation",
+"1291  NCS Computer Italia",
+"1292  Tritech Microelectronics Inc",
+"1293  Media Reality Technology",
+"1294  Rhetorex, Inc.",
+"1295  Imagenation Corporation",
+"1296  Kofax Image Products",
+"1297  Holco Enterprise Co, Ltd/Shuttle Computer",
+"1298  Spellcaster Telecommunications Inc.",
+"1299  Knowledge Technology Lab.",
+"129a  VMetro, inc.",
+"	0615  PBT-615 PCI-X Bus Analyzer",
+"129b  Image Access",
+"129c  Jaycor",
+"129d  Compcore Multimedia, Inc.",
+"129e  Victor Company of Japan, Ltd.",
+"129f  OEC Medical Systems, Inc.",
+"12a0  Allen-Bradley Company",
+"12a1  Simpact Associates, Inc.",
+"12a2  Newgen Systems Corporation",
+"12a3  Lucent Technologies",
+"	8105  T8105 H100 Digital Switch",
+"12a4  NTT Electronics Technology Company",
+"12a5  Vision Dynamics Ltd.",
+"12a6  Scalable Networks, Inc.",
+"12a7  AMO GmbH",
+"12a8  News Datacom",
+"12a9  Xiotech Corporation",
+"12aa  SDL Communications, Inc.",
+"12ab  Yuan Yuan Enterprise Co., Ltd.",
+"	0002  AU8830 [Vortex2] Based Sound Card With A3D Support",
+"	3000  MPG-200C PCI DVD Decoder Card",
+"12ac  Measurex Corporation",
+"12ad  Multidata GmbH",
+"12ae  Alteon Networks Inc.",
+"	0001  AceNIC Gigabit Ethernet",
+"		1014 0104  Gigabit Ethernet-SX PCI Adapter",
+"		12ae 0001  Gigabit Ethernet-SX (Universal)",
+"		1410 0104  Gigabit Ethernet-SX PCI Adapter",
+"	0002  AceNIC Gigabit Ethernet (Copper)",
+"		10a9 8002  Acenic Gigabit Ethernet",
+"		12ae 0002  Gigabit Ethernet-T (3C986-T)",
+"	00fa  Farallon PN9100-T Gigabit Ethernet",
+"12af  TDK USA Corp",
+"12b0  Jorge Scientific Corp",
+"12b1  GammaLink",
+"12b2  General Signal Networks",
+"12b3  Inter-Face Co Ltd",
+"12b4  FutureTel Inc",
+"12b5  Granite Systems Inc.",
+"12b6  Natural Microsystems",
+"12b7  Cognex Modular Vision Systems Div. - Acumen Inc.",
+"12b8  Korg",
+"12b9  3Com Corp, Modem Division",
+"	1006  WinModem",
+"		12b9 005c  USR 56k Internal Voice WinModem (Model 3472)",
+"		12b9 005e  USR 56k Internal WinModem (Models 662975)",
+"		12b9 0062  USR 56k Internal Voice WinModem (Model 662978)",
+"		12b9 0068  USR 56k Internal Voice WinModem (Model 5690)",
+"		12b9 007a  USR 56k Internal Voice WinModem (Model 662974)",
+"		12b9 007f  USR 56k Internal WinModem (Models 5698, 5699)",
+"		12b9 0080  USR 56k Internal WinModem (Models 2975, 3528)",
+"		12b9 0081  USR 56k Internal Voice WinModem (Models 2974, 3529)",
+"		12b9 0091  USR 56k Internal Voice WinModem (Model 2978)",
+"	1007  USR 56k Internal WinModem",
+"		12b9 00a3  USR 56k Internal WinModem (Model 3595)",
+"	1008  56K FaxModem Model 5610",
+"		12b9 00a2  USR 56k Internal FAX Modem (Model 2977)",
+"		12b9 00aa  USR 56k Internal Voice Modem (Model 2976)",
+"		12b9 00ab  USR 56k Internal Voice Modem (Model 5609)",
+"		12b9 00ac  USR 56k Internal Voice Modem (Model 3298)",
+"		12b9 00ad  USR 56k Internal FAX Modem (Model 5610)",
+"12ba  BittWare, Inc.",
+"12bb  Nippon Unisoft Corporation",
+"12bc  Array Microsystems",
+"12bd  Computerm Corp.",
+"12be  Anchor Chips Inc.",
+"	3041  AN3041Q CO-MEM",
+"	3042  AN3042Q CO-MEM Lite",
+"		12be 3042  Anchor Chips Lite Evaluation Board",
+"12bf  Fujifilm Microdevices",
+"12c0  Infimed",
+"12c1  GMM Research Corp",
+"12c2  Mentec Limited",
+"12c3  Holtek Microelectronics Inc",
+"	0058  PCI NE2K Ethernet",
+"	5598  PCI NE2K Ethernet",
+"12c4  Connect Tech Inc",
+"	0001  Blue HEAT/PCI 8 (RS232/CL/RJ11)",
+"	0002  Blue HEAT/PCI 4 (RS232)",
+"	0003  Blue HEAT/PCI 2 (RS232)",
+"	0004  Blue HEAT/PCI 8 (UNIV, RS485)",
+"	0005  Blue HEAT/PCI 4+4/6+2 (UNIV, RS232/485)",
+"	0006  Blue HEAT/PCI 4 (OPTO, RS485)",
+"	0007  Blue HEAT/PCI 2+2 (RS232/485)",
+"	0008  Blue HEAT/PCI 2 (OPTO, Tx, RS485)",
+"	0009  Blue HEAT/PCI 2+6 (RS232/485)",
+"	000a  Blue HEAT/PCI 8 (Tx, RS485)",
+"	000b  Blue HEAT/PCI 4 (Tx, RS485)",
+"	000c  Blue HEAT/PCI 2 (20 MHz, RS485)",
+"	000d  Blue HEAT/PCI 2 PTM",
+"	0100  NT960/PCI",
+"	0201  cPCI Titan - 2 Port",
+"	0202  cPCI Titan - 4 Port",
+"	0300  CTI PCI UART 2 (RS232)",
+"	0301  CTI PCI UART 4 (RS232)",
+"	0302  CTI PCI UART 8 (RS232)",
+"	0310  CTI PCI UART 1+1 (RS232/485)",
+"	0311  CTI PCI UART 2+2 (RS232/485)",
+"	0312  CTI PCI UART 4+4 (RS232/485)",
+"	0320  CTI PCI UART 2",
+"	0321  CTI PCI UART 4",
+"	0322  CTI PCI UART 8",
+"	0330  CTI PCI UART 2 (RS485)",
+"	0331  CTI PCI UART 4 (RS485)",
+"	0332  CTI PCI UART 8 (RS485)",
+"12c5  Picture Elements Incorporated",
+"	007e  Imaging/Scanning Subsystem Engine",
+"	007f  Imaging/Scanning Subsystem Engine",
+"	0081  PCIVST [Grayscale Thresholding Engine]",
+"	0085  Video Simulator/Sender",
+"	0086  THR2 Multi-scale Thresholder",
+"12c6  Mitani Corporation",
+"12c7  Dialogic Corp",
+"12c8  G Force Co, Ltd",
+"12c9  Gigi Operations",
+"12ca  Integrated Computing Engines",
+"12cb  Antex Electronics Corporation",
+"12cc  Pluto Technologies International",
+"12cd  Aims Lab",
+"12ce  Netspeed Inc.",
+"12cf  Prophet Systems, Inc.",
+"12d0  GDE Systems, Inc.",
+"12d1  PSITech",
+"12d2  NVidia / SGS Thomson (Joint Venture)",
+"	0008  NV1",
+"	0009  DAC64",
+"	0018  Riva128",
+"		1048 0c10  VICTORY Erazor",
+"		107b 8030  STB Velocity 128",
+"		1092 0350  Viper V330",
+"		1092 1092  Viper V330",
+"		10b4 1b1b  STB Velocity 128",
+"		10b4 1b1d  STB Velocity 128",
+"		10b4 1b1e  STB Velocity 128, PAL TV-Out",
+"		10b4 1b20  STB Velocity 128 Sapphire",
+"		10b4 1b21  STB Velocity 128",
+"		10b4 1b22  STB Velocity 128 AGP, NTSC TV-Out",
+"		10b4 1b23  STB Velocity 128 AGP, PAL TV-Out",
+"		10b4 1b27  STB Velocity 128 DVD",
+"		10b4 1b88  MVP Pro 128",
+"		10b4 222a  STB Velocity 128 AGP",
+"		10b4 2230  STB Velocity 128",
+"		10b4 2232  STB Velocity 128",
+"		10b4 2235  STB Velocity 128 AGP",
+"		2a15 54a3  3DVision-SAGP / 3DexPlorer 3000",
+"	0019  Riva128ZX",
+"	0020  TNT",
+"	0028  TNT2",
+"	0029  UTNT2",
+"	002c  VTNT2",
+"	00a0  ITNT2",
+"12d3  Vingmed Sound A/S",
+"12d4  Ulticom (Formerly DGM&S)",
+"	0200  T1 Card",
+"12d5  Equator Technologies Inc",
+"	0003  BSP16",
+"	1000  BSP15",
+"12d6  Analogic Corp",
+"12d7  Biotronic SRL",
+"12d8  Pericom Semiconductor",
+"	8150  PCI to PCI Bridge",
+"12d9  Aculab PLC",
+"	0002  PCI Prosody",
+"	0004  cPCI Prosody",
+"	0005  Aculab E1/T1 PCI card",
+"	1078  Prosody X class e1000 device",
+"		12d9 000d  Prosody X PCI",
+"12da  True Time Inc.",
+"12db  Annapolis Micro Systems, Inc",
+"12dc  Symicron Computer Communication Ltd.",
+"12dd  Management Graphics",
+"12de  Rainbow Technologies",
+"	0200  CryptoSwift CS200",
+"12df  SBS Technologies Inc",
+"12e0  Chase Research",
+"	0010  ST16C654 Quad UART",
+"	0020  ST16C654 Quad UART",
+"	0030  ST16C654 Quad UART",
+"12e1  Nintendo Co, Ltd",
+"12e2  Datum Inc. Bancomm-Timing Division",
+"12e3  Imation Corp - Medical Imaging Systems",
+"12e4  Brooktrout Technology Inc",
+"12e5  Apex Semiconductor Inc",
+"12e6  Cirel Systems",
+"12e7  Sunsgroup Corporation",
+"12e8  Crisc Corp",
+"12e9  GE Spacenet",
+"12ea  Zuken",
+"12eb  Aureal Semiconductor",
+"	0001  Vortex 1",
+"		104d 8036  AU8820 Vortex Digital Audio Processor",
+"		1092 2000  Sonic Impact A3D",
+"		1092 2100  Sonic Impact A3D",
+"		1092 2110  Sonic Impact A3D",
+"		1092 2200  Sonic Impact A3D",
+"		122d 1002  AU8820 Vortex Digital Audio Processor",
+"		12eb 0001  AU8820 Vortex Digital Audio Processor",
+"		5053 3355  Montego",
+"	0002  Vortex 2",
+"		104d 8049  AU8830 Vortex 3D Digital Audio Processor",
+"		104d 807b  AU8830 Vortex 3D Digital Audio Processor",
+"		1092 3000  Monster Sound II",
+"		1092 3001  Monster Sound II",
+"		1092 3002  Monster Sound II",
+"		1092 3003  Monster Sound II",
+"		1092 3004  Monster Sound II",
+"		12eb 0002  AU8830 Vortex 3D Digital Audio Processor",
+"		12eb 0088  AU8830 Vortex 3D Digital Audio Processor",
+"		144d 3510  AU8830 Vortex 3D Digital Audio Processor",
+"		5053 3356  Montego II",
+"	0003  AU8810 Vortex Digital Audio Processor",
+"		104d 8049  AU8810 Vortex Digital Audio Processor",
+"		104d 8077  AU8810 Vortex Digital Audio Processor",
+"		109f 1000  AU8810 Vortex Digital Audio Processor",
+"		12eb 0003  AU8810 Vortex Digital Audio Processor",
+"		1462 6780  AU8810 Vortex Digital Audio Processor",
+"		14a4 2073  AU8810 Vortex Digital Audio Processor",
+"		14a4 2091  AU8810 Vortex Digital Audio Processor",
+"		14a4 2104  AU8810 Vortex Digital Audio Processor",
+"		14a4 2106  AU8810 Vortex Digital Audio Processor",
+"	8803  Vortex 56k Software Modem",
+"		12eb 8803  Vortex 56k Software Modem",
+"12ec  3A International, Inc.",
+"12ed  Optivision Inc.",
+"12ee  Orange Micro",
+"12ef  Vienna Systems",
+"12f0  Pentek",
+"12f1  Sorenson Vision Inc",
+"12f2  Gammagraphx, Inc.",
+"12f3  Radstone Technology",
+"12f4  Megatel",
+"12f5  Forks",
+"12f6  Dawson France",
+"12f7  Cognex",
+"12f8  Electronic Design GmbH",
+"	0002  VideoMaker",
+"12f9  Four Fold Ltd",
+"12fb  Spectrum Signal Processing",
+"	0001  PMC-MAI",
+"	00f5  F5 Dakar",
+"	02ad  PMC-2MAI",
+"	2adc  ePMC-2ADC",
+"	3100  PRO-3100",
+"	3500  PRO-3500",
+"	4d4f  Modena",
+"	8120  ePMC-8120",
+"	da62  Daytona C6201 PCI (Hurricane)",
+"	db62  Ingliston XBIF",
+"	dc62  Ingliston PLX9054",
+"	dd62  Ingliston JTAG/ISP",
+"	eddc  ePMC-MSDDC",
+"	fa01  ePMC-FPGA",
+"12fc  Capital Equipment Corp",
+"12fd  I2S",
+"12fe  ESD Electronic System Design GmbH",
+"12ff  Lexicon",
+"1300  Harman International Industries Inc",
+"1302  Computer Sciences Corp",
+"1303  Innovative Integration",
+"1304  Juniper Networks",
+"1305  Netphone, Inc",
+"1306  Duet Technologies",
+"1307  Measurement Computing",
+"	0001  PCI-DAS1602/16",
+"	000b  PCI-DIO48H",
+"	000c  PCI-PDISO8",
+"	000d  PCI-PDISO16",
+"	000f  PCI-DAS1200",
+"	0010  PCI-DAS1602/12",
+"	0014  PCI-DIO24H",
+"	0015  PCI-DIO24H/CTR3",
+"	0016  PCI-DIO48H/CTR15",
+"	0017  PCI-DIO96H",
+"	0018  PCI-CTR05",
+"	0019  PCI-DAS1200/JR",
+"	001a  PCI-DAS1001",
+"	001b  PCI-DAS1002",
+"	001c  PCI-DAS1602JR/16",
+"	001d  PCI-DAS6402/16",
+"	001e  PCI-DAS6402/12",
+"	001f  PCI-DAS16/M1",
+"	0020  PCI-DDA02/12",
+"	0021  PCI-DDA04/12",
+"	0022  PCI-DDA08/12",
+"	0023  PCI-DDA02/16",
+"	0024  PCI-DDA04/16",
+"	0025  PCI-DDA08/16",
+"	0026  PCI-DAC04/12-HS",
+"	0027  PCI-DAC04/16-HS",
+"	0028  PCI-DIO24",
+"	0029  PCI-DAS08",
+"	002c  PCI-INT32",
+"	0033  PCI-DUAL-AC5",
+"	0034  PCI-DAS-TC",
+"	0035  PCI-DAS64/M1/16",
+"	0036  PCI-DAS64/M2/16",
+"	0037  PCI-DAS64/M3/16",
+"	004c  PCI-DAS1000",
+"	004d  PCI-QUAD04",
+"	0052  PCI-DAS4020/12",
+"	0054  PCI-DIO96",
+"	005e  PCI-DAS6025",
+"1308  Jato Technologies Inc.",
+"	0001  NetCelerator Adapter",
+"		1308 0001  NetCelerator Adapter",
+"1309  AB Semiconductor Ltd",
+"130a  Mitsubishi Electric Microcomputer",
+"130b  Colorgraphic Communications Corp",
+"130c  Ambex Technologies, Inc",
+"130d  Accelerix Inc",
+"130e  Yamatake-Honeywell Co. Ltd",
+"130f  Advanet Inc",
+"1310  Gespac",
+"1311  Videoserver, Inc",
+"1312  Acuity Imaging, Inc",
+"1313  Yaskawa Electric Co.",
+"1316  Teradyne Inc",
+"1317  Linksys",
+"	0981  21x4x DEC-Tulip compatible 10/100 Ethernet",
+"	0985  NC100 Network Everywhere Fast Ethernet 10/100",
+"		1734 100c  Scenic N300 ADMtek AN983 10/100 Mbps PCI Adapter",
+"	1985  21x4x DEC-Tulip compatible 10/100 Ethernet",
+"	2850  HSP MicroModem 56",
+"	5120  ADMtek ADM5120 OpenGate System-on-Chip",
+"	8201  ADMtek ADM8211 802.11b Wireless Interface",
+"		10b8 2635  SMC2635W 802.11b (11Mbps) wireless lan pcmcia (cardbus) card",
+"		1317 8201  SMC2635W 802.11b (11mbps) wireless lan pcmcia (cardbus) card",
+"	8211  ADMtek ADM8211 802.11b Wireless Interface",
+"	9511  21x4x DEC-Tulip compatible 10/100 Ethernet",
+"1318  Packet Engines Inc.",
+"	0911  GNIC-II PCI Gigabit Ethernet [Hamachi]",
+"1319  Fortemedia, Inc",
+"	0801  Xwave QS3000A [FM801]",
+"		1319 1319  FM801 PCI Audio",
+"	0802  Xwave QS3000A [FM801 game port]",
+"		1319 1319  FM801 PCI Joystick",
+"	1000  FM801 PCI Audio",
+"	1001  FM801 PCI Joystick",
+"131a  Finisar Corp.",
+"131c  Nippon Electro-Sensory Devices Corp",
+"131d  Sysmic, Inc.",
+"131e  Xinex Networks Inc",
+"131f  Siig Inc",
+"	1000  CyberSerial (1-port) 16550",
+"	1001  CyberSerial (1-port) 16650",
+"	1002  CyberSerial (1-port) 16850",
+"	1010  Duet 1S(16550)+1P",
+"	1011  Duet 1S(16650)+1P",
+"	1012  Duet 1S(16850)+1P",
+"	1020  CyberParallel (1-port)",
+"	1021  CyberParallel (2-port)",
+"	1030  CyberSerial (2-port) 16550",
+"	1031  CyberSerial (2-port) 16650",
+"	1032  CyberSerial (2-port) 16850",
+"	1034  Trio 2S(16550)+1P",
+"	1035  Trio 2S(16650)+1P",
+"	1036  Trio 2S(16850)+1P",
+"	1050  CyberSerial (4-port) 16550",
+"	1051  CyberSerial (4-port) 16650",
+"	1052  CyberSerial (4-port) 16850",
+"	2000  CyberSerial (1-port) 16550",
+"	2001  CyberSerial (1-port) 16650",
+"	2002  CyberSerial (1-port) 16850",
+"	2010  Duet 1S(16550)+1P",
+"	2011  Duet 1S(16650)+1P",
+"	2012  Duet 1S(16850)+1P",
+"	2020  CyberParallel (1-port)",
+"	2021  CyberParallel (2-port)",
+"	2030  CyberSerial (2-port) 16550",
+"		131f 2030  PCI Serial Card",
+"	2031  CyberSerial (2-port) 16650",
+"	2032  CyberSerial (2-port) 16850",
+"	2040  Trio 1S(16550)+2P",
+"	2041  Trio 1S(16650)+2P",
+"	2042  Trio 1S(16850)+2P",
+"	2050  CyberSerial (4-port) 16550",
+"	2051  CyberSerial (4-port) 16650",
+"	2052  CyberSerial (4-port) 16850",
+"	2060  Trio 2S(16550)+1P",
+"	2061  Trio 2S(16650)+1P",
+"	2062  Trio 2S(16850)+1P",
+"	2081  CyberSerial (8-port) ST16654",
+"1320  Crypto AG",
+"1321  Arcobel Graphics BV",
+"1322  MTT Co., Ltd",
+"1323  Dome Inc",
+"1324  Sphere Communications",
+"1325  Salix Technologies, Inc",
+"1326  Seachange international",
+"1327  Voss scientific",
+"1328  quadrant international",
+"1329  Productivity Enhancement",
+"132a  Microcom Inc.",
+"132b  Broadband Technologies",
+"132c  Micrel Inc",
+"132d  Integrated Silicon Solution, Inc.",
+"1330  MMC Networks",
+"1331  Radisys Corp.",
+"	0030  ENP-2611",
+"	8200  82600 Host Bridge",
+"	8201  82600 IDE",
+"	8202  82600 USB",
+"	8210  82600 PCI Bridge",
+"1332  Micro Memory",
+"	5415  MM-5415CN PCI Memory Module with Battery Backup",
+"	5425  MM-5425CN PCI 64/66 Memory Module with Battery Backup",
+"	6140  MM-6140D",
+"1334  Redcreek Communications, Inc",
+"1335  Videomail, Inc",
+"1337  Third Planet Publishing",
+"1338  BT Electronics",
+"133a  Vtel Corp",
+"133b  Softcom Microsystems",
+"133c  Holontech Corp",
+"133d  SS Technologies",
+"133e  Virtual Computer Corp",
+"133f  SCM Microsystems",
+"1340  Atalla Corp",
+"1341  Kyoto Microcomputer Co",
+"1342  Promax Systems Inc",
+"1343  Phylon Communications Inc",
+"1344  Crucial Technology",
+"1345  Arescom Inc",
+"1347  Odetics",
+"1349  Sumitomo Electric Industries, Ltd.",
+"134a  DTC Technology Corp.",
+"	0001  Domex 536",
+"	0002  Domex DMX3194UP SCSI Adapter",
+"134b  ARK Research Corp.",
+"134c  Chori Joho System Co. Ltd",
+"134d  PCTel Inc",
+"	2189  HSP56 MicroModem",
+"	2486  2304WT V.92 MDC Modem",
+"	7890  HSP MicroModem 56",
+"		134d 0001  PCT789 adapter",
+"	7891  HSP MicroModem 56",
+"		134d 0001  HSP MicroModem 56",
+"	7892  HSP MicroModem 56",
+"	7893  HSP MicroModem 56",
+"	7894  HSP MicroModem 56",
+"	7895  HSP MicroModem 56",
+"	7896  HSP MicroModem 56",
+"	7897  HSP MicroModem 56",
+"134e  CSTI",
+"134f  Algo System Co Ltd",
+"1350  Systec Co. Ltd",
+"1351  Sonix Inc",
+"1353  Thales Idatys",
+"	0002  Proserver",
+"	0003  PCI-FUT",
+"	0004  PCI-S0",
+"	0005  PCI-FUT-S0",
+"1354  Dwave System Inc",
+"1355  Kratos Analytical Ltd",
+"1356  The Logical Co",
+"1359  Prisa Networks",
+"135a  Brain Boxes",
+"135b  Giganet Inc",
+"135c  Quatech Inc",
+"	0010  QSC-100",
+"	0020  DSC-100",
+"	0030  DSC-200/300",
+"	0040  QSC-200/300",
+"	0050  ESC-100D",
+"	0060  ESC-100M",
+"	00f0  MPAC-100 Syncronous Serial Card (Zilog 85230)",
+"	0170  QSCLP-100",
+"	0180  DSCLP-100",
+"	0190  SSCLP-100",
+"	01a0  QSCLP-200/300",
+"	01b0  DSCLP-200/300",
+"	01c0  SSCLP-200/300",
+"135d  ABB Network Partner AB",
+"135e  Sealevel Systems Inc",
+"	5101  Route 56.PCI - Multi-Protocol Serial Interface (Zilog Z16C32)",
+"	7101  Single Port RS-232/422/485/530",
+"	7201  Dual Port RS-232/422/485 Interface",
+"	7202  Dual Port RS-232 Interface",
+"	7401  Four Port RS-232 Interface",
+"	7402  Four Port RS-422/485 Interface",
+"	7801  Eight Port RS-232 Interface",
+"	7804  Eight Port RS-232/422/485 Interface",
+"	8001  8001 Digital I/O Adapter",
+"135f  I-Data International A-S",
+"1360  Meinberg Funkuhren",
+"	0101  PCI32 DCF77 Radio Clock",
+"	0102  PCI509 DCF77 Radio Clock",
+"	0103  PCI510 DCF77 Radio Clock",
+"	0104  PCI511 DCF77 Radio Clock",
+"	0201  GPS167PCI GPS Receiver",
+"	0202  GPS168PCI GPS Receiver",
+"	0203  GPS169PCI GPS Receiver",
+"	0204  GPS170PCI GPS Receiver",
+"	0301  TCR510PCI IRIG Timecode Reader",
+"	0302  TCR167PCI IRIG Timecode Reader",
+"1361  Soliton Systems K.K.",
+"1362  Fujifacom Corporation",
+"1363  Phoenix Technology Ltd",
+"1364  ATM Communications Inc",
+"1365  Hypercope GmbH",
+"1366  Teijin Seiki Co. Ltd",
+"1367  Hitachi Zosen Corporation",
+"1368  Skyware Corporation",
+"1369  Digigram",
+"136a  High Soft Tech",
+"136b  Kawasaki Steel Corporation",
+"	ff01  KL5A72002 Motion JPEG",
+"136c  Adtek System Science Co Ltd",
+"136d  Gigalabs Inc",
+"136f  Applied Magic Inc",
+"1370  ATL Products",
+"1371  CNet Technology Inc",
+"	434e  GigaCard Network Adapter",
+"		1371 434e  N-Way PCI-Bus Giga-Card 1000/100/10Mbps(L)",
+"1373  Silicon Vision Inc",
+"1374  Silicom Ltd.",
+"	0024  Silicom Dual port Giga Ethernet BGE Bypass Server Adapter",
+"	0025  Silicom Quad port Giga Ethernet BGE Bypass Server Adapter",
+"	0026  Silicom Dual port Fiber Giga Ethernet 546 Bypass Server Adapter",
+"	0027  Silicom Dual port Fiber LX Giga Ethernet 546 Bypass Server Adapter",
+"	0029  Silicom Dual port Copper Giga Ethernet 546GB Bypass Server Adapter",
+"	002a  Silicom Dual port Fiber Giga Ethernet 546 TAP/Bypass Server Adapter",
+"	002b  Silicom Dual port Copper Fast Ethernet 546 TAP/Bypass Server Adapter (PXE2TBI)",
+"	002c  Silicom Quad port Copper Giga Ethernet 546GB Bypass Server Adapter (PXG4BPI)",
+"	002d  Silicom Quad port Fiber-SX Giga Ethernet 546GB Bypass Server Adapter (PXG4BPFI)",
+"	002e  Silicom Quad port Fiber-LX Giga Ethernet 546GB Bypass Server Adapter (PXG4BPFI-LX)",
+"	002f  Silicom Dual port Fiber-SX Giga Ethernet 546GB Low profile Bypass Server Adapter (PXG2BPFIL)",
+"	0030  Silicom Dual port Fiber-LX Giga Ethernet 546GB Low profile Bypass Server Adapter",
+"	0031  Silicom Quad port Copper Giga Ethernet PCI-E Bypass Server Adapter",
+"	0032  Silicom Dual port Copper Fast Ethernet 546 TAP/Bypass Server Adapter",
+"	0034  Silicom Dual port Copper Giga Ethernet PCI-E BGE Bypass Server Adapter",
+"	0035  Silicom Quad port Copper Giga Ethernet PCI-E BGE Bypass Server Adapter",
+"	0036  Silicom Dual port Fiber Giga Ethernet PCI-E BGE Bypass Server Adapter",
+"	0037  Silicom Quad port Copper Ethernet PCI-E Intel based Bypass Server Adapter",
+"	0038  Silicom Quad port Copper Ethernet PCI-E Intel based Bypass Server Adapter",
+"	0039  Silicom Dual port Fiber-SX Ethernet PCI-E Intel based Bypass Server Adapter",
+"	003a  Silicom Dual port Fiber-LX Ethernet PCI-E Intel based Bypass Server Adapter",
+"1375  Argosystems Inc",
+"1376  LMC",
+"1377  Electronic Equipment Production & Distribution GmbH",
+"1378  Telemann Co. Ltd",
+"1379  Asahi Kasei Microsystems Co Ltd",
+"137a  Mark of the Unicorn Inc",
+"	0001  PCI-324 Audiowire Interface",
+"137b  PPT Vision",
+"137c  Iwatsu Electric Co Ltd",
+"137d  Dynachip Corporation",
+"137e  Patriot Scientific Corporation",
+"137f  Japan Satellite Systems Inc",
+"1380  Sanritz Automation Co Ltd",
+"1381  Brains Co. Ltd",
+"1382  Marian - Electronic & Software",
+"	0001  ARC88 audio recording card",
+"	2008  Prodif 96 Pro sound system",
+"	2048  Prodif Plus sound system",
+"	2088  Marc 8 Midi sound system",
+"	20c8  Marc A sound system",
+"	4008  Marc 2 sound system",
+"	4010  Marc 2 Pro sound system",
+"	4048  Marc 4 MIDI sound system",
+"	4088  Marc 4 Digi sound system",
+"	4248  Marc X sound system",
+"	4424  TRACE D4 Sound System",
+"1383  Controlnet Inc",
+"1384  Reality Simulation Systems Inc",
+"1385  Netgear",
+"	0013  WG311T 108 Mbps Wireless PCI Adapter",
+"	311a  GA511 Gigabit Ethernet",
+"	4100  802.11b Wireless Adapter (MA301)",
+"	4105  MA311 802.11b wireless adapter",
+"	4251  WG111T 108 Mbps Wireless USB 2.0 Adapter",
+"	4400  WAG511 802.11a/b/g Dual Band Wireless PC Card",
+"	4600  WAG511 802.11a/b/g Dual Band Wireless PC Card",
+"	4601  WAG511 802.11a/b/g Dual Band Wireless PC Card",
+"	4610  WAG511 802.11a/b/g Dual Band Wireless PC Card",
+"	4800  WG511(v1) 54 Mbps Wireless PC Card",
+"	4900  WG311v1 54 Mbps Wireless PCI Adapter",
+"	4a00  WAG311 802.11a/g Wireless PCI Adapter",
+"	4b00  WG511T 108 Mbps Wireless PC Card",
+"	4c00  WG311v2 54 Mbps Wireless PCI Adapter",
+"	4d00  WG311T 108 Mbps Wireless PCI Adapter",
+"	4e00  WG511v2 54 Mbps Wireless PC Card",
+"	4f00  WG511U Double 108 Mbps  Wireless PC Card",
+"	5200  GA511 Gigabit PC Card",
+"	620a  GA620 Gigabit Ethernet",
+"	622a  GA622",
+"	630a  GA630 Gigabit Ethernet",
+"	6b00  WG311v3 54 Mbps Wireless PCI Adapter",
+"	6d00  WPNT511 RangeMax 240 Mbps Wireless PC Card",
+"	f004  FA310TX",
+"1386  Video Domain Technologies",
+"1387  Systran Corp",
+"1388  Hitachi Information Technology Co Ltd",
+"1389  Applicom International",
+"	0001  PCI1500PFB [Intelligent fieldbus adaptor]",
+"138a  Fusion Micromedia Corp",
+"138b  Tokimec Inc",
+"138c  Silicon Reality",
+"138d  Future Techno Designs pte Ltd",
+"138e  Basler GmbH",
+"138f  Patapsco Designs Inc",
+"1390  Concept Development Inc",
+"1391  Development Concepts Inc",
+"1392  Medialight Inc",
+"1393  Moxa Technologies Co Ltd",
+"	1040  Smartio C104H/PCI",
+"	1141  Industrio CP-114",
+"	1680  Smartio C168H/PCI",
+"	2040  Intellio CP-204J",
+"	2180  Intellio C218 Turbo PCI",
+"	3200  Intellio C320 Turbo PCI",
+"1394  Level One Communications",
+"	0001  LXT1001 Gigabit Ethernet",
+"		1394 0001  NetCelerator Adapter",
+"1395  Ambicom Inc",
+"1396  Cipher Systems Inc",
+"1397  Cologne Chip Designs GmbH",
+"	08b4  ISDN network Controller [HFC-4S]",
+"		1397 b520  HFC-4S [IOB4ST]",
+"		1397 b540  HFC-4S [Swyx 4xS0 SX2 QuadBri]",
+"	16b8  ISDN network Controller [HFC-8S]",
+"	2bd0  ISDN network controller [HFC-PCI]",
+"		0675 1704  ISDN Adapter (PCI Bus, D, C)",
+"		0675 1708  ISDN Adapter (PCI Bus, D, C, ACPI)",
+"		1397 2bd0  ISDN Board",
+"		e4bf 1000  CI1-1-Harp",
+"1398  Clarion co. Ltd",
+"1399  Rios systems Co Ltd",
+"139a  Alacritech Inc",
+"	0001  Quad Port 10/100 Server Accelerator",
+"	0003  Single Port 10/100 Server Accelerator",
+"	0005  Single Port Gigabit Server Accelerator",
+"139b  Mediasonic Multimedia Systems Ltd",
+"139c  Quantum 3d Inc",
+"139d  EPL limited",
+"139e  Media4",
+"139f  Aethra s.r.l.",
+"13a0  Crystal Group Inc",
+"13a1  Kawasaki Heavy Industries Ltd",
+"13a2  Ositech Communications Inc",
+"13a3  Hifn Inc.",
+"	0005  7751 Security Processor",
+"	0006  6500 Public Key Processor",
+"	0007  7811 Security Processor",
+"	0012  7951 Security Processor",
+"	0014  78XX Security Processor",
+"	0016  8065 Security Processor",
+"	0017  8165 Security Processor",
+"	0018  8154 Security Processor",
+"	001d  7956 Security Processor",
+"	0020  7955 Security Processor",
+"	0026  8155 Security Processor",
+"13a4  Rascom Inc",
+"13a5  Audio Digital Imaging Inc",
+"13a6  Videonics Inc",
+"13a7  Teles AG",
+"13a8  Exar Corp.",
+"	0152  XR17C/D152 Dual PCI UART",
+"	0154  XR17C154 Quad UART",
+"	0158  XR17C158 Octal UART",
+"13a9  Siemens Medical Systems, Ultrasound Group",
+"13aa  Broadband Networks Inc",
+"13ab  Arcom Control Systems Ltd",
+"13ac  Motion Media Technology Ltd",
+"13ad  Nexus Inc",
+"13ae  ALD Technology Ltd",
+"13af  T.Sqware",
+"13b0  Maxspeed Corp",
+"13b1  Tamura corporation",
+"13b2  Techno Chips Co. Ltd",
+"13b3  Lanart Corporation",
+"13b4  Wellbean Co Inc",
+"13b5  ARM",
+"13b6  Dlog GmbH",
+"13b7  Logic Devices Inc",
+"13b8  Nokia Telecommunications oy",
+"13b9  Elecom Co Ltd",
+"13ba  Oxford Instruments",
+"13bb  Sanyo Technosound Co Ltd",
+"13bc  Bitran Corporation",
+"13bd  Sharp corporation",
+"13be  Miroku Jyoho Service Co. Ltd",
+"13bf  Sharewave Inc",
+"13c0  Microgate Corporation",
+"	0010  SyncLink Adapter v1",
+"	0020  SyncLink SCC Adapter",
+"	0030  SyncLink Multiport Adapter",
+"	0210  SyncLink Adapter v2",
+"13c1  3ware Inc",
+"	1000  5xxx/6xxx-series PATA-RAID",
+"	1001  7xxx/8xxx-series PATA/SATA-RAID",
+"		13c1 1001  7xxx/8xxx-series PATA/SATA-RAID",
+"	1002  9xxx-series SATA-RAID",
+"	1003  9550SX SATA-RAID",
+"13c2  Technotrend Systemtechnik GmbH",
+"	000e  Technotrend/Hauppauge DVB card rev2.3",
+"13c3  Janz Computer AG",
+"13c4  Phase Metrics",
+"13c5  Alphi Technology Corp",
+"13c6  Condor Engineering Inc",
+"	0520  CEI-520 A429 Card",
+"	0620  CEI-620 A429 Card",
+"	0820  CEI-820 A429 Card",
+"13c7  Blue Chip Technology Ltd",
+"13c8  Apptech Inc",
+"13c9  Eaton Corporation",
+"13ca  Iomega Corporation",
+"13cb  Yano Electric Co Ltd",
+"13cc  Metheus Corporation",
+"13cd  Compatible Systems Corporation",
+"13ce  Cocom A/S",
+"13cf  Studio Audio & Video Ltd",
+"13d0  Techsan Electronics Co Ltd",
+"	2103  B2C2 FlexCopII DVB chip / Technisat SkyStar2 DVB card",
+"	2200  B2C2 FlexCopIII DVB chip / Technisat SkyStar2 DVB card",
+"13d1  Abocom Systems Inc",
+"	ab02  ADMtek Centaur-C rev 17 [D-Link DFE-680TX] CardBus Fast Ethernet Adapter",
+"	ab03  21x4x DEC-Tulip compatible 10/100 Ethernet",
+"	ab06  RTL8139 [FE2000VX] CardBus Fast Ethernet Attached Port Adapter",
+"	ab08  21x4x DEC-Tulip compatible 10/100 Ethernet",
+"13d2  Shark Multimedia Inc",
+"13d3  IMC Networks",
+"13d4  Graphics Microsystems Inc",
+"13d5  Media 100 Inc",
+"13d6  K.I. Technology Co Ltd",
+"13d7  Toshiba Engineering Corporation",
+"13d8  Phobos corporation",
+"13d9  Apex PC Solutions Inc",
+"13da  Intresource Systems pte Ltd",
+"13db  Janich & Klass Computertechnik GmbH",
+"13dc  Netboost Corporation",
+"13dd  Multimedia Bundle Inc",
+"13de  ABB Robotics Products AB",
+"13df  E-Tech Inc",
+"	0001  PCI56RVP Modem",
+"		13df 0001  PCI56RVP Modem",
+"13e0  GVC Corporation",
+"13e1  Silicom Multimedia Systems Inc",
+"13e2  Dynamics Research Corporation",
+"13e3  Nest Inc",
+"13e4  Calculex Inc",
+"13e5  Telesoft Design Ltd",
+"13e6  Argosy research Inc",
+"13e7  NAC Incorporated",
+"13e8  Chip Express Corporation",
+"13e9  Intraserver Technology Inc",
+"13ea  Dallas Semiconductor",
+"13eb  Hauppauge Computer Works Inc",
+"13ec  Zydacron Inc",
+"	000a  NPC-RC01 Remote control receiver",
+"13ed  Raytheion E-Systems",
+"13ee  Hayes Microcomputer Products Inc",
+"13ef  Coppercom Inc",
+"13f0  Sundance Technology Inc / IC Plus Corp",
+"	0200  IC Plus IP100A Integrated 10/100 Ethernet MAC + PHY",
+"	0201  ST201 Sundance Ethernet",
+"	1023  IC Plus IP1000 Family Gigabit Ethernet",
+"13f1  Oce' - Technologies B.V.",
+"13f2  Ford Microelectronics Inc",
+"13f3  Mcdata Corporation",
+"13f4  Troika Networks, Inc.",
+"	1401  Zentai Fibre Channel Adapter",
+"13f5  Kansai Electric Co. Ltd",
+"13f6  C-Media Electronics Inc",
+"	0011  CMI8738",
+"	0100  CM8338A",
+"		13f6 ffff  CMI8338/C3DX PCI Audio Device",
+"	0101  CM8338B",
+"		13f6 0101  CMI8338-031 PCI Audio Device",
+"	0111  CM8738",
+"		1019 0970  P6STP-FL motherboard",
+"		1043 8035  CUSI-FX motherboard",
+"		1043 8077  CMI8738 6-channel audio controller",
+"		1043 80e2  CMI8738 6ch-MX",
+"		13f6 0111  CMI8738/C3DX PCI Audio Device",
+"		1681 a000  Gamesurround MUSE XL",
+"	0211  CM8738",
+"13f7  Wildfire Communications",
+"13f8  Ad Lib Multimedia Inc",
+"13f9  NTT Advanced Technology Corp.",
+"13fa  Pentland Systems Ltd",
+"13fb  Aydin Corp",
+"13fc  Computer Peripherals International",
+"13fd  Micro Science Inc",
+"13fe  Advantech Co. Ltd",
+"	1240  PCI-1240 4-channel stepper motor controller card",
+"	1600  PCI-1612 4-port RS-232/422/485 PCI communication card",
+"	1733  PCI-1733 32-channel isolated digital input card",
+"	1752  PCI-1752",
+"	1754  PCI-1754",
+"	1756  PCI-1756",
+"13ff  Silicon Spice Inc",
+"1400  Artx Inc",
+"	1401  9432 TX",
+"1401  CR-Systems A/S",
+"1402  Meilhaus Electronic GmbH",
+"1403  Ascor Inc",
+"1404  Fundamental Software Inc",
+"1405  Excalibur Systems Inc",
+"1406  Oce' Printing Systems GmbH",
+"1407  Lava Computer mfg Inc",
+"	0100  Lava Dual Serial",
+"	0101  Lava Quatro A",
+"	0102  Lava Quatro B",
+"	0110  Lava DSerial-PCI Port A",
+"	0111  Lava DSerial-PCI Port B",
+"	0120  Quattro-PCI A",
+"	0121  Quattro-PCI B",
+"	0180  Lava Octo A",
+"	0181  Lava Octo B",
+"	0200  Lava Port Plus",
+"	0201  Lava Quad A",
+"	0202  Lava Quad B",
+"	0220  Lava Quattro PCI Ports A/B",
+"	0221  Lava Quattro PCI Ports C/D",
+"	0500  Lava Single Serial",
+"	0600  Lava Port 650",
+"	8000  Lava Parallel",
+"	8001  Dual parallel port controller A",
+"	8002  Lava Dual Parallel port A",
+"	8003  Lava Dual Parallel port B",
+"	8800  BOCA Research IOPPAR",
+"1408  Aloka Co. Ltd",
+"1409  Timedia Technology Co Ltd",
+"	7168  PCI2S550 (Dual 16550 UART)",
+"140a  DSP Research Inc",
+"140b  Ramix Inc",
+"140c  Elmic Systems Inc",
+"140d  Matsushita Electric Works Ltd",
+"140e  Goepel Electronic GmbH",
+"140f  Salient Systems Corp",
+"1410  Midas lab Inc",
+"1411  Ikos Systems Inc",
+"1412  VIA Technologies Inc.",
+"	1712  ICE1712 [Envy24] PCI Multi-Channel I/O Controller",
+"		1412 1712  Hoontech ST Audio DSP 24",
+"		1412 d630  M-Audio Delta 1010",
+"		1412 d631  M-Audio Delta DiO",
+"		1412 d632  M-Audio Delta 66",
+"		1412 d633  M-Audio Delta 44",
+"		1412 d634  M-Audio Delta Audiophile",
+"		1412 d635  M-Audio Delta TDIF",
+"		1412 d637  M-Audio Delta RBUS",
+"		1412 d638  M-Audio Delta 410",
+"		1412 d63b  M-Audio Delta 1010LT",
+"		1412 d63c  Digigram VX442",
+"		1416 1712  Hoontech ST Audio DSP 24 Media 7.1",
+"		153b 1115  EWS88 MT",
+"		153b 1125  EWS88 MT (Master)",
+"		153b 112b  EWS88 D",
+"		153b 112c  EWS88 D (Master)",
+"		153b 1130  EWX 24/96",
+"		153b 1138  DMX 6fire 24/96",
+"		153b 1151  PHASE88",
+"		16ce 1040  Edirol DA-2496",
+"	1724  VT1720/24 [Envy24PT/HT] PCI Multi-Channel Audio Controller",
+"		1412 1724  Albatron PX865PE 7.1",
+"		1412 3630  M-Audio Revolution 7.1",
+"		1412 3631  M-Audio Revolution 5.1",
+"		153b 1145  Aureon 7.1 Space",
+"		153b 1147  Aureon 5.1 Sky",
+"		153b 1153  Aureon 7.1 Universe",
+"		270f f641  ZNF3-150",
+"		270f f645  ZNF3-250",
+"1413  Addonics",
+"1414  Microsoft Corporation",
+"1415  Oxford Semiconductor Ltd",
+"	8403  VScom 011H-EP1 1 port parallel adaptor",
+"	9501  OX16PCI954 (Quad 16950 UART) function 0",
+"		131f 2050  CyberPro (4-port)",
+"		131f 2051  CyberSerial 4S Plus",
+"		15ed 2000  MCCR Serial p0-3 of 8",
+"		15ed 2001  MCCR Serial p0-3 of 16",
+"	950a  EXSYS EX-41092 Dual 16950 Serial adapter",
+"	950b  OXCB950 Cardbus 16950 UART",
+"	9510  OX16PCI954 (Quad 16950 UART) function 1 (Disabled)",
+"	9511  OX16PCI954 (Quad 16950 UART) function 1",
+"		15ed 2000  MCCR Serial p4-7 of 8",
+"		15ed 2001  MCCR Serial p4-15 of 16",
+"	9521  OX16PCI952 (Dual 16950 UART)",
+"	9523  OX16PCI952 Integrated Parallel Port",
+"1416  Multiwave Innovation pte Ltd",
+"1417  Convergenet Technologies Inc",
+"1418  Kyushu electronics systems Inc",
+"1419  Excel Switching Corp",
+"141a  Apache Micro Peripherals Inc",
+"141b  Zoom Telephonics Inc",
+"141d  Digitan Systems Inc",
+"141e  Fanuc Ltd",
+"141f  Visiontech Ltd",
+"1420  Psion Dacom plc",
+"	8002  Gold Card NetGlobal 56k+10/100Mb CardBus (Ethernet part)",
+"	8003  Gold Card NetGlobal 56k+10/100Mb CardBus (Modem part)",
+"1421  Ads Technologies Inc",
+"1422  Ygrec Systems Co Ltd",
+"1423  Custom Technology Corp.",
+"1424  Videoserver Connections",
+"1425  Chelsio Communications Inc",
+"	000b  T210 Protocol Engine",
+"1426  Storage Technology Corp.",
+"1427  Better On-Line Solutions",
+"1428  Edec Co Ltd",
+"1429  Unex Technology Corp.",
+"142a  Kingmax Technology Inc",
+"142b  Radiolan",
+"142c  Minton Optic Industry Co Ltd",
+"142d  Pix stream Inc",
+"142e  Vitec Multimedia",
+"	4020  VM2-2 [Video Maker 2] MPEG1/2 Encoder",
+"	4337  VM2-2-C7 [Video Maker 2 rev. C7] MPEG1/2 Encoder",
+"142f  Radicom Research Inc",
+"1430  ITT Aerospace/Communications Division",
+"1431  Gilat Satellite Networks",
+"1432  Edimax Computer Co.",
+"	9130  RTL81xx Fast Ethernet",
+"1433  Eltec Elektronik GmbH",
+"1435  RTD Embedded Technologies, Inc.",
+"1436  CIS Technology Inc",
+"1437  Nissin Inc Co",
+"1438  Atmel-dream",
+"1439  Outsource Engineering & Mfg. Inc",
+"143a  Stargate Solutions Inc",
+"143b  Canon Research Center, America",
+"143c  Amlogic Inc",
+"143d  Tamarack Microelectronics Inc",
+"143e  Jones Futurex Inc",
+"143f  Lightwell Co Ltd - Zax Division",
+"1440  ALGOL Corp.",
+"1441  AGIE Ltd",
+"1442  Phoenix Contact GmbH & Co.",
+"1443  Unibrain S.A.",
+"1444  TRW",
+"1445  Logical DO Ltd",
+"1446  Graphin Co Ltd",
+"1447  AIM GmBH",
+"1448  Alesis Studio Electronics",
+"1449  TUT Systems Inc",
+"144a  Adlink Technology",
+"	7296  PCI-7296",
+"	7432  PCI-7432",
+"	7433  PCI-7433",
+"	7434  PCI-7434",
+"	7841  PCI-7841",
+"	8133  PCI-8133",
+"	8164  PCI-8164",
+"	8554  PCI-8554",
+"	9111  PCI-9111",
+"	9113  PCI-9113",
+"	9114  PCI-9114",
+"144b  Loronix Information Systems Inc",
+"144c  Catalina Research Inc",
+"144d  Samsung Electronics Co Ltd",
+"	c00c  P35 laptop",
+"144e  OLITEC",
+"144f  Askey Computer Corp.",
+"1450  Octave Communications Ind.",
+"1451  SP3D Chip Design GmBH",
+"1453  MYCOM Inc",
+"1454  Altiga Networks",
+"1455  Logic Plus Plus Inc",
+"1456  Advanced Hardware Architectures",
+"1457  Nuera Communications Inc",
+"1458  Giga-byte Technology",
+"	0c11  K8NS Pro Mainboard",
+"	e911  GN-WIAG02",
+"1459  DOOIN Electronics",
+"145a  Escalate Networks Inc",
+"145b  PRAIM SRL",
+"145c  Cryptek",
+"145d  Gallant Computer Inc",
+"145e  Aashima Technology B.V.",
+"145f  Baldor Electric Company",
+"	0001  NextMove PCI",
+"1460  DYNARC INC",
+"1461  Avermedia Technologies Inc",
+"	f436  AVerTV Hybrid+FM",
+"1462  Micro-Star International Co., Ltd.",
+"	5501  nVidia NV15DDR [GeForce2 Ti]",
+"	6819  Broadcom Corporation BCM4306 802.11b/g Wireless LAN Controller [MSI CB54G]",
+"	6825  PCI Card wireless 11g [PC54G]",
+"	6834  RaLink RT2500 802.11g [PC54G2]",
+"	7125  K8N motherboard",
+"	8725  NVIDIA NV25 [GeForce4 Ti 4600] VGA Adapter",
+"	9000  NVIDIA NV28 [GeForce4 Ti 4800] VGA Adapter",
+"	9110  GeFORCE FX5200",
+"	9119  NVIDIA NV31 [GeForce FX 5600XT] VGA Adapter",
+"	9123  NVIDIA NV31 [GeForce FX 5600] FX5600-VTDR128 [MS-8912]",
+"	9591  nVidia Corporation NV36 [GeForce FX 5700LE]",
+"1463  Fast Corporation",
+"1464  Interactive Circuits & Systems Ltd",
+"1465  GN NETTEST Telecom DIV.",
+"1466  Designpro Inc.",
+"1467  DIGICOM SPA",
+"1468  AMBIT Microsystem Corp.",
+"1469  Cleveland Motion Controls",
+"146a  IFR",
+"146b  Parascan Technologies Ltd",
+"146c  Ruby Tech Corp.",
+"	1430  FE-1430TX Fast Ethernet PCI Adapter",
+"146d  Tachyon, INC.",
+"146e  Williams Electronics Games, Inc.",
+"146f  Multi Dimensional Consulting Inc",
+"1470  Bay Networks",
+"1471  Integrated Telecom Express Inc",
+"1472  DAIKIN Industries, Ltd",
+"1473  ZAPEX Technologies Inc",
+"1474  Doug Carson & Associates",
+"1475  PICAZO Communications",
+"1476  MORTARA Instrument Inc",
+"1477  Net Insight",
+"1478  DIATREND Corporation",
+"1479  TORAY Industries Inc",
+"147a  FORMOSA Industrial Computing",
+"147b  ABIT Computer Corp.",
+"147c  AWARE, Inc.",
+"147d  Interworks Computer Products",
+"147e  Matsushita Graphic Communication Systems, Inc.",
+"147f  NIHON UNISYS, Ltd.",
+"1480  SCII Telecom",
+"1481  BIOPAC Systems Inc",
+"1482  ISYTEC - Integrierte Systemtechnik GmBH",
+"1483  LABWAY Corporation",
+"1484  Logic Corporation",
+"1485  ERMA - Electronic GmBH",
+"1486  L3 Communications Telemetry & Instrumentation",
+"1487  MARQUETTE Medical Systems",
+"1488  KONTRON Electronik GmBH",
+"1489  KYE Systems Corporation",
+"148a  OPTO",
+"148b  INNOMEDIALOGIC Inc.",
+"148c  C.P. Technology Co. Ltd",
+"148d  DIGICOM Systems, Inc.",
+"	1003  HCF 56k Data/Fax Modem",
+"148e  OSI Plus Corporation",
+"148f  Plant Equipment, Inc.",
+"1490  Stone Microsystems PTY Ltd.",
+"1491  ZEAL Corporation",
+"1492  Time Logic Corporation",
+"1493  MAKER Communications",
+"1494  WINTOP Technology, Inc.",
+"1495  TOKAI Communications Industry Co. Ltd",
+"1496  JOYTECH Computer Co., Ltd.",
+"1497  SMA Regelsysteme GmBH",
+"	1497  SMA Technologie AG",
+"1498  TEWS Datentechnik GmBH",
+"	0330  TPMC816 2 Channel CAN bus controller.",
+"	0385  TPMC901 Extended CAN bus with 2/4/6 CAN controller",
+"	21cd  TCP461 CompactPCI 8 Channel Serial Interface RS232/RS422",
+"	30c8  TPCI200",
+"1499  EMTEC CO., Ltd",
+"149a  ANDOR Technology Ltd",
+"149b  SEIKO Instruments Inc",
+"149c  OVISLINK Corp.",
+"149d  NEWTEK Inc",
+"	0001  Video Toaster for PC",
+"149e  Mapletree Networks Inc.",
+"149f  LECTRON Co Ltd",
+"14a0  SOFTING GmBH",
+"14a1  Systembase Co Ltd",
+"14a2  Millennium Engineering Inc",
+"14a3  Maverick Networks",
+"14a4  GVC/BCM Advanced Research",
+"14a5  XIONICS Document Technologies Inc",
+"14a6  INOVA Computers GmBH & Co KG",
+"14a7  MYTHOS Systems Inc",
+"14a8  FEATRON Technologies Corporation",
+"14a9  HIVERTEC Inc",
+"14aa  Advanced MOS Technology Inc",
+"14ab  Mentor Graphics Corp.",
+"14ac  Novaweb Technologies Inc",
+"14ad  Time Space Radio AB",
+"14ae  CTI, Inc",
+"14af  Guillemot Corporation",
+"	7102  3D Prophet II MX",
+"14b0  BST Communication Technology Ltd",
+"14b1  Nextcom K.K.",
+"14b2  ENNOVATE Networks Inc",
+"14b3  XPEED Inc",
+"	0000  DSL NIC",
+"14b4  PHILIPS Business Electronics B.V.",
+"14b5  Creamware GmBH",
+"	0200  Scope",
+"	0300  Pulsar",
+"	0400  PulsarSRB",
+"	0600  Pulsar2",
+"	0800  DSP-Board",
+"	0900  DSP-Board",
+"	0a00  DSP-Board",
+"	0b00  DSP-Board",
+"14b6  Quantum Data Corp.",
+"14b7  PROXIM Inc",
+"	0001  Symphony 4110",
+"14b8  Techsoft Technology Co Ltd",
+"14b9  AIRONET Wireless Communications",
+"	0001  PC4800",
+"	0340  PC4800",
+"	0350  PC4800",
+"	4500  PC4500",
+"	4800  Cisco Aironet 340 802.11b Wireless LAN Adapter/Aironet PC4800",
+"	a504  Cisco Aironet Wireless 802.11b",
+"	a505  Cisco Aironet CB20a 802.11a Wireless LAN Adapter",
+"	a506  Cisco Aironet Mini PCI b/g",
+"14ba  INTERNIX Inc.",
+"14bb  SEMTECH Corporation",
+"14bc  Globespan Semiconductor Inc.",
+"14bd  CARDIO Control N.V.",
+"14be  L3 Communications",
+"14bf  SPIDER Communications Inc.",
+"14c0  COMPAL Electronics Inc",
+"14c1  MYRICOM Inc.",
+"	0008  Myri-10G Dual-Protocol Interconnect",
+"	8043  Myrinet 2000 Scalable Cluster Interconnect",
+"14c2  DTK Computer",
+"14c3  MEDIATEK Corp.",
+"14c4  IWASAKI Information Systems Co Ltd",
+"14c5  Automation Products AB",
+"14c6  Data Race Inc",
+"14c7  Modular Technology Holdings Ltd",
+"14c8  Turbocomm Tech. Inc.",
+"14c9  ODIN Telesystems Inc",
+"14ca  PE Logic Corp.",
+"14cb  Billionton Systems Inc",
+"14cc  NAKAYO Telecommunications Inc",
+"14cd  Universal Scientific Ind.",
+"14ce  Whistle Communications",
+"14cf  TEK Microsystems Inc.",
+"14d0  Ericsson Axe R & D",
+"14d1  Computer Hi-Tech Co Ltd",
+"14d2  Titan Electronics Inc",
+"	8001  VScom 010L 1 port parallel adaptor",
+"	8002  VScom 020L 2 port parallel adaptor",
+"	8010  VScom 100L 1 port serial adaptor",
+"	8011  VScom 110L 1 port serial and 1 port parallel adaptor",
+"	8020  VScom 200L 1 port serial adaptor",
+"	8021  VScom 210L 2 port serial and 1 port parallel adaptor",
+"	8040  VScom 400L 4 port serial adaptor",
+"	8080  VScom 800L 8 port serial adaptor",
+"	a000  VScom 010H 1 port parallel adaptor",
+"	a001  VScom 100H 1 port serial adaptor",
+"	a003  VScom 400H 4 port serial adaptor",
+"	a004  VScom 400HF1 4 port serial adaptor",
+"	a005  VScom 200H 2 port serial adaptor",
+"	e001  VScom 010HV2 1 port parallel adaptor",
+"	e010  VScom 100HV2 1 port serial adaptor",
+"	e020  VScom 200HV2 2 port serial adaptor",
+"14d3  CIRTECH (UK) Ltd",
+"14d4  Panacom Technology Corp",
+"14d5  Nitsuko Corporation",
+"14d6  Accusys Inc",
+"14d7  Hirakawa Hewtech Corp",
+"14d8  HOPF Elektronik GmBH",
+"14d9  Alliance Semiconductor Corporation",
+"	0010  AP1011/SP1011 HyperTransport-PCI Bridge [Sturgeon]",
+"	9000  AS90L10204/10208 HyperTransport to PCI-X Bridge",
+"14da  National Aerospace Laboratories",
+"14db  AFAVLAB Technology Inc",
+"	2120  TK9902",
+"	2182  AFAVLAB Technology Inc. 8-port serial card",
+"14dc  Amplicon Liveline Ltd",
+"	0000  PCI230",
+"	0001  PCI242",
+"	0002  PCI244",
+"	0003  PCI247",
+"	0004  PCI248",
+"	0005  PCI249",
+"	0006  PCI260",
+"	0007  PCI224",
+"	0008  PCI234",
+"	0009  PCI236",
+"	000a  PCI272",
+"	000b  PCI215",
+"14dd  Boulder Design Labs Inc",
+"14de  Applied Integration Corporation",
+"14df  ASIC Communications Corp",
+"14e1  INVERTEX",
+"14e2  INFOLIBRIA",
+"14e3  AMTELCO",
+"14e4  Broadcom Corporation",
+"	0800  Sentry5 Chipcommon I/O Controller",
+"	0804  Sentry5 PCI Bridge",
+"	0805  Sentry5 MIPS32 CPU",
+"	0806  Sentry5 Ethernet Controller",
+"	080b  Sentry5 Crypto Accelerator",
+"	080f  Sentry5 DDR/SDR RAM Controller",
+"	0811  Sentry5 External Interface Core",
+"	0816  BCM3302 Sentry5 MIPS32 CPU",
+"	1600  NetXtreme BCM5752 Gigabit Ethernet PCI Express",
+"	1601  NetXtreme BCM5752M Gigabit Ethernet PCI Express",
+"	1644  NetXtreme BCM5700 Gigabit Ethernet",
+"		1014 0277  Broadcom Vigil B5700 1000Base-T",
+"		1028 00d1  Broadcom BCM5700",
+"		1028 0106  Broadcom BCM5700",
+"		1028 0109  Broadcom BCM5700 1000Base-T",
+"		1028 010a  Broadcom BCM5700 1000BaseTX",
+"		10b7 1000  3C996-T 1000Base-T",
+"		10b7 1001  3C996B-T 1000Base-T",
+"		10b7 1002  3C996C-T 1000Base-T",
+"		10b7 1003  3C997-T 1000Base-T Dual Port",
+"		10b7 1004  3C996-SX 1000Base-SX",
+"		10b7 1005  3C997-SX 1000Base-SX Dual Port",
+"		10b7 1008  3C942 Gigabit LOM (31X31)",
+"		14e4 0002  NetXtreme 1000Base-SX",
+"		14e4 0003  NetXtreme 1000Base-SX",
+"		14e4 0004  NetXtreme 1000Base-T",
+"		14e4 1028  NetXtreme 1000BaseTX",
+"		14e4 1644  BCM5700 1000Base-T",
+"	1645  NetXtreme BCM5701 Gigabit Ethernet",
+"		0e11 007c  NC7770 Gigabit Server Adapter (PCI-X, 10/100/1000-T)",
+"		0e11 007d  NC6770 Gigabit Server Adapter (PCI-X, 1000-SX)",
+"		0e11 0085  NC7780 Gigabit Server Adapter (embedded, WOL)",
+"		0e11 0099  NC7780 Gigabit Server Adapter (embedded, WOL)",
+"		0e11 009a  NC7770 Gigabit Server Adapter (PCI-X, 10/100/1000-T)",
+"		0e11 00c1  NC6770 Gigabit Server Adapter (PCI-X, 1000-SX)",
+"		1028 0121  Broadcom BCM5701 1000Base-T",
+"		103c 128a  1000Base-T (PCI) [A7061A]",
+"		103c 128b  1000Base-SX (PCI) [A7073A]",
+"		103c 12a4  Core Lan 1000Base-T",
+"		103c 12c1  IOX Core Lan 1000Base-T [A7109AX]",
+"		103c 1300  Core LAN/SCSI Combo [A6794A]",
+"		10a9 8010  IO9/IO10 Gigabit Ethernet (Copper)",
+"		10a9 8011  Gigabit Ethernet (Copper)",
+"		10a9 8012  Gigabit Ethernet (Fiber)",
+"		10b7 1004  3C996-SX 1000Base-SX",
+"		10b7 1006  3C996B-T 1000Base-T",
+"		10b7 1007  3C1000-T 1000Base-T",
+"		10b7 1008  3C940-BR01 1000Base-T",
+"		14e4 0001  BCM5701 1000Base-T",
+"		14e4 0005  BCM5701 1000Base-T",
+"		14e4 0006  BCM5701 1000Base-T",
+"		14e4 0007  BCM5701 1000Base-SX",
+"		14e4 0008  BCM5701 1000Base-T",
+"		14e4 8008  BCM5701 1000Base-T",
+"	1646  NetXtreme BCM5702 Gigabit Ethernet",
+"		0e11 00bb  NC7760 1000BaseTX",
+"		1028 0126  Broadcom BCM5702 1000BaseTX",
+"		14e4 8009  BCM5702 1000BaseTX",
+"	1647  NetXtreme BCM5703 Gigabit Ethernet",
+"		0e11 0099  NC7780 1000BaseTX",
+"		0e11 009a  NC7770 1000BaseTX",
+"		10a9 8010  SGI IO9 Gigabit Ethernet (Copper)",
+"		14e4 0009  BCM5703 1000BaseTX",
+"		14e4 000a  BCM5703 1000BaseSX",
+"		14e4 000b  BCM5703 1000BaseTX",
+"		14e4 8009  BCM5703 1000BaseTX",
+"		14e4 800a  BCM5703 1000BaseTX",
+"	1648  NetXtreme BCM5704 Gigabit Ethernet",
+"		0e11 00cf  NC7772 Gigabit Server Adapter (PCI-X, 10,100,1000-T)",
+"		0e11 00d0  NC7782 Gigabit Server Adapter (PCI-X, 10,100,1000-T)",
+"		0e11 00d1  NC7783 Gigabit Server Adapter (PCI-X, 10,100,1000-T)",
+"		10b7 2000  3C998-T Dual Port 10/100/1000 PCI-X",
+"		10b7 3000  3C999-T Quad Port 10/100/1000 PCI-X",
+"		1166 1648  NetXtreme CIOB-E 1000Base-T",
+"		1734 100b  Primergy RX300",
+"	164a  NetXtreme II BCM5706 Gigabit Ethernet",
+"		103c 3101  NC370T MultifuNCtion Gigabit Server Adapter",
+"	164c  NetXtreme II BCM5708 Gigabit Ethernet",
+"	164d  NetXtreme BCM5702FE Gigabit Ethernet",
+"	1653  NetXtreme BCM5705 Gigabit Ethernet",
+"		0e11 00e3  NC7761 Gigabit Server Adapter",
+"	1654  NetXtreme BCM5705_2 Gigabit Ethernet",
+"		0e11 00e3  NC7761 Gigabit Server Adapter",
+"		103c 3100  NC1020 HP ProLiant Gigabit Server Adapter 32 PCI",
+"		103c 3226  NC150T 4-port Gigabit Combo Switch & Adapter",
+"	1659  NetXtreme BCM5721 Gigabit Ethernet PCI Express",
+"		1014 02c6  eServer xSeries server mainboard",
+"		103c 7031  NC320T PCIe Gigabit Server Adapter",
+"		103c 7032  NC320i PCIe Gigabit Server Adapter",
+"		1734 1061  Primergy RX300 S2",
+"	165d  NetXtreme BCM5705M Gigabit Ethernet",
+"		1028 865d  Latitude D400",
+"	165e  NetXtreme BCM5705M_2 Gigabit Ethernet",
+"		103c 088c  NC8000 laptop",
+"		103c 0890  NC6000 laptop",
+"		103c 099c  NX6110/NC6120",
+"	1668  NetXtreme BCM5714 Gigabit Ethernet",
+"		103c 7039  NC324i PCIe Dual Port Gigabit Server Adapter",
+"	1669  NetXtreme 5714S Gigabit Ethernet",
+"	166a  NetXtreme BCM5780 Gigabit Ethernet",
+"	166b  NetXtreme BCM5780S Gigabit Ethernet",
+"	166e  570x 10/100 Integrated Controller",
+"	1672  NetXtreme BCM5754M Gigabit Ethernet PCI Express",
+"	1673  NetXtreme BCM5755M Gigabit Ethernet PCI Express",
+"	1677  NetXtreme BCM5751 Gigabit Ethernet PCI Express",
+"		1028 0179  Optiplex GX280",
+"		1028 0182  Latitude D610",
+"		1028 0187  Precision M70",
+"		1028 01ad  Optiplex GX620",
+"		103c 3006  DC7100 SFF(DX878AV)",
+"		1734 105d  Scenic W620",
+"	1678  NetXtreme BCM5715 Gigabit Ethernet",
+"	1679  NetXtreme 5715S Gigabit Ethernet",
+"		103c 703c  NC326i PCIe Dual Port Gigabit Server Adapter",
+"	167a  NetXtreme BCM5754 Gigabit Ethernet PCI Express",
+"	167b  NetXtreme BCM5755 Gigabit Ethernet PCI Express",
+"	167d  NetXtreme BCM5751M Gigabit Ethernet PCI Express",
+"	167e  NetXtreme BCM5751F Fast Ethernet PCI Express",
+"	1693  NetLink BCM5787M Gigabit Ethernet PCI Express",
+"	1696  NetXtreme BCM5782 Gigabit Ethernet",
+"		103c 12bc  HP d530 CMT (DG746A)",
+"		14e4 000d  NetXtreme BCM5782 1000Base-T",
+"	169b  NetLink BCM5787 Gigabit Ethernet PCI Express",
+"	169c  NetXtreme BCM5788 Gigabit Ethernet",
+"		103c 308b  MX6125",
+"	169d  NetLink BCM5789 Gigabit Ethernet PCI Express",
+"	16a6  NetXtreme BCM5702X Gigabit Ethernet",
+"		0e11 00bb  NC7760 Gigabit Server Adapter (PCI-X, 10/100/1000-T)",
+"		1028 0126  BCM5702 1000Base-T",
+"		14e4 000c  BCM5702 1000Base-T",
+"		14e4 8009  BCM5702 1000Base-T",
+"	16a7  NetXtreme BCM5703X Gigabit Ethernet",
+"		0e11 00ca  NC7771 Gigabit Server Adapter (PCI-X, 10,100,1000-T)",
+"		0e11 00cb  NC7781 Gigabit Server Adapter (PCI-X, 10,100,1000-T)",
+"		14e4 0009  NetXtreme BCM5703 1000Base-T",
+"		14e4 000a  NetXtreme BCM5703 1000Base-SX",
+"		14e4 000b  NetXtreme BCM5703 1000Base-T",
+"		14e4 800a  NetXtreme BCM5703 1000Base-T",
+"	16a8  NetXtreme BCM5704S Gigabit Ethernet",
+"		10b7 2001  3C998-SX Dual Port 1000-SX PCI-X",
+"	16aa  NetXtreme II BCM5706S Gigabit Ethernet",
+"		103c 3102  NC370F MultifuNCtion Gigabit Server Adapter",
+"	16ac  NetXtreme II BCM5708S Gigabit Ethernet",
+"	16c6  NetXtreme BCM5702A3 Gigabit Ethernet",
+"		10b7 1100  3C1000B-T 10/100/1000 PCI",
+"		14e4 000c  BCM5702 1000Base-T",
+"		14e4 8009  BCM5702 1000Base-T",
+"	16c7  NetXtreme BCM5703 Gigabit Ethernet",
+"		0e11 00ca  NC7771 Gigabit Server Adapter (PCI-X, 10,100,1000-T)",
+"		0e11 00cb  NC7781 Gigabit Server Adapter (PCI-X, 10,100,1000-T)",
+"		103c 12c3  Combo FC/GigE-SX [A9782A]",
+"		103c 12ca  Combo FC/GigE-T [A9784A]",
+"		14e4 0009  NetXtreme BCM5703 1000Base-T",
+"		14e4 000a  NetXtreme BCM5703 1000Base-SX",
+"	16dd  NetLink BCM5781 Gigabit Ethernet PCI Express",
+"	16f7  NetXtreme BCM5753 Gigabit Ethernet PCI Express",
+"	16fd  NetXtreme BCM5753M Gigabit Ethernet PCI Express",
+"	16fe  NetXtreme BCM5753F Fast Ethernet PCI Express",
+"	170c  BCM4401-B0 100Base-TX",
+"		1028 0188  Inspiron 6000 laptop",
+"		1028 0196  Inspiron 5160",
+"		103c 099c  NX6110/NC6120",
+"	170d  NetXtreme BCM5901 100Base-TX",
+"		1014 0545  ThinkPad R40e (2684-HVG) builtin ethernet controller",
+"	170e  NetXtreme BCM5901 100Base-TX",
+"	3352  BCM3352",
+"	3360  BCM3360",
+"	4210  BCM4210 iLine10 HomePNA 2.0",
+"	4211  BCM4211 iLine10 HomePNA 2.0 + V.90 56k modem",
+"	4212  BCM4212 v.90 56k modem",
+"	4301  BCM4303 802.11b Wireless LAN Controller",
+"		1028 0407  TrueMobile 1180 Onboard WLAN",
+"		1043 0120  WL-103b Wireless LAN PC Card",
+"	4305  BCM4307 V.90 56k Modem",
+"	4306  BCM4307 Ethernet Controller",
+"	4307  BCM4307 802.11b Wireless LAN Controller",
+"	4310  BCM4310 Chipcommon I/OController",
+"	4312  BCM4310 UART",
+"	4313  BCM4310 Ethernet Controller",
+"	4315  BCM4310 USB Controller",
+"	4318  BCM4318 [AirForce One 54g] 802.11g Wireless LAN Controller",
+"		103c 1356  MX6125",
+"		1043 120f  A6U notebook embedded card",
+"		1468 0311  Aspire 3022WLMi, 5024WLMi",
+"		1468 0312  TravelMate 2410",
+"		14e4 0449  Gateway 7510GX",
+"		14e4 4318  WPC54G version 3 [Wireless-G Notebook Adapter] 802.11g Wireless Lan Controller",
+"		16ec 0119  U.S.Robotics Wireless MAXg PC Card",
+"		1737 0048  WPC54G-EU version 3 [Wireless-G Notebook Adapter]",
+"	4319  Dell Wireless 1470 DualBand WLAN",
+"	4320  BCM4306 802.11b/g Wireless LAN Controller",
+"		1028 0001  TrueMobile 1300 WLAN Mini-PCI Card",
+"		1028 0003  Wireless 1350 WLAN Mini-PCI Card",
+"		103c 12f4  NX9500 Built-in Wireless",
+"		103c 12fa  Presario R3000 802.11b/g",
+"		1043 100f  WL-100G",
+"		1057 7025  WN825G",
+"		106b 004e  AirPort Extreme",
+"		1154 0330  Buffalo WLI2-PCI-G54S High Speed Mode Wireless Desktop Adapter",
+"		144f 7050  eMachines M6805 802.11g Built-in Wireless",
+"		14e4 4320  Linksys WMP54G PCI",
+"		1737 4320  WPC54G",
+"		1799 7001  Belkin F5D7001 High-Speed Mode Wireless G Network Card",
+"		1799 7010  Belkin F5D7010 54g Wireless Network card",
+"		185f 1220  TravelMate 290E WLAN Mini-PCI Card",
+"	4321  BCM4306 802.11a Wireless LAN Controller",
+"	4322  BCM4306 UART",
+"	4324  BCM4309 802.11a/b/g",
+"		1028 0001  Truemobile 1400",
+"		1028 0003  Truemobile 1450 MiniPCI",
+"	4325  BCM43xG 802.11b/g",
+"		1414 0003  Wireless Notebook Adapter MN-720",
+"		1414 0004  Wireless PCI Adapter MN-730",
+"	4326  BCM4307 Chipcommon I/O Controller\?",
+"	4401  BCM4401 100Base-T",
+"		1043 80a8  A7V8X motherboard",
+"	4402  BCM4402 Integrated 10/100BaseT",
+"	4403  BCM4402 V.90 56k Modem",
+"	4410  BCM4413 iLine32 HomePNA 2.0",
+"	4411  BCM4413 V.90 56k modem",
+"	4412  BCM4412 10/100BaseT",
+"	4430  BCM44xx CardBus iLine32 HomePNA 2.0",
+"	4432  BCM4432 CardBus 10/100BaseT",
+"	4610  BCM4610 Sentry5 PCI to SB Bridge",
+"	4611  BCM4610 Sentry5 iLine32 HomePNA 1.0",
+"	4612  BCM4610 Sentry5 V.90 56k Modem",
+"	4613  BCM4610 Sentry5 Ethernet Controller",
+"	4614  BCM4610 Sentry5 External Interface",
+"	4615  BCM4610 Sentry5 USB Controller",
+"	4704  BCM4704 PCI to SB Bridge",
+"	4705  BCM4704 Sentry5 802.11b Wireless LAN Controller",
+"	4706  BCM4704 Sentry5 Ethernet Controller",
+"	4707  BCM4704 Sentry5 USB Controller",
+"	4708  BCM4704 Crypto Accelerator",
+"	4710  BCM4710 Sentry5 PCI to SB Bridge",
+"	4711  BCM47xx Sentry5 iLine32 HomePNA 2.0",
+"	4712  BCM47xx V.92 56k modem",
+"	4713  Sentry5 Ethernet Controller",
+"	4714  BCM47xx Sentry5 External Interface",
+"	4715  Sentry5 USB Controller",
+"	4716  BCM47xx Sentry5 USB Host Controller",
+"	4717  BCM47xx Sentry5 USB Device Controller",
+"	4718  Sentry5 Crypto Accelerator",
+"	4719  BCM47xx/53xx RoboSwitch Core",
+"	4720  BCM4712 MIPS CPU",
+"	5365  BCM5365P Sentry5 Host Bridge",
+"	5600  BCM5600 StrataSwitch 24+2 Ethernet Switch Controller",
+"	5605  BCM5605 StrataSwitch 24+2 Ethernet Switch Controller",
+"	5615  BCM5615 StrataSwitch 24+2 Ethernet Switch Controller",
+"	5625  BCM5625 StrataSwitch 24+2 Ethernet Switch Controller",
+"	5645  BCM5645 StrataSwitch 24+2 Ethernet Switch Controller",
+"	5670  BCM5670 8-Port 10GE Ethernet Switch Fabric",
+"	5680  BCM5680 G-Switch 8 Port Gigabit Ethernet Switch Controller",
+"	5690  BCM5690 12-port Multi-Layer Gigabit Ethernet Switch",
+"	5691  BCM5691 GE/10GE 8+2 Gigabit Ethernet Switch Controller",
+"	5692  BCM5692 12-port Multi-Layer Gigabit Ethernet Switch",
+"	5820  BCM5820 Crypto Accelerator",
+"	5821  BCM5821 Crypto Accelerator",
+"	5822  BCM5822 Crypto Accelerator",
+"	5823  BCM5823 Crypto Accelerator",
+"	5824  BCM5824 Crypto Accelerator",
+"	5840  BCM5840 Crypto Accelerator",
+"	5841  BCM5841 Crypto Accelerator",
+"	5850  BCM5850 Crypto Accelerator",
+"14e5  Pixelfusion Ltd",
+"14e6  SHINING Technology Inc",
+"14e7  3CX",
+"14e8  RAYCER Inc",
+"14e9  GARNETS System CO Ltd",
+"14ea  Planex Communications, Inc",
+"	ab06  FNW-3603-TX CardBus Fast Ethernet",
+"	ab07  RTL81xx RealTek Ethernet",
+"	ab08  FNW-3602-TX CardBus Fast Ethernet",
+"14eb  SEIKO EPSON Corp",
+"14ec  ACQIRIS",
+"14ed  DATAKINETICS Ltd",
+"14ee  MASPRO KENKOH Corp",
+"14ef  CARRY Computer ENG. CO Ltd",
+"14f0  CANON RESEACH CENTRE FRANCE",
+"14f1  Conexant",
+"	1002  HCF 56k Modem",
+"	1003  HCF 56k Modem",
+"	1004  HCF 56k Modem",
+"	1005  HCF 56k Modem",
+"	1006  HCF 56k Modem",
+"	1022  HCF 56k Modem",
+"	1023  HCF 56k Modem",
+"	1024  HCF 56k Modem",
+"	1025  HCF 56k Modem",
+"	1026  HCF 56k Modem",
+"	1032  HCF 56k Modem",
+"	1033  HCF 56k Data/Fax Modem",
+"		1033 8077  NEC",
+"		122d 4027  Dell Zeus - MDP3880-W(B) Data Fax Modem",
+"		122d 4030  Dell Mercury - MDP3880-U(B) Data Fax Modem",
+"		122d 4034  Dell Thor - MDP3880-W(U) Data Fax Modem",
+"		13e0 020d  Dell Copper",
+"		13e0 020e  Dell Silver",
+"		13e0 0261  IBM",
+"		13e0 0290  Compaq Goldwing",
+"		13e0 02a0  IBM",
+"		13e0 02b0  IBM",
+"		13e0 02c0  Compaq Scooter",
+"		13e0 02d0  IBM",
+"		144f 1500  IBM P85-DF (1)",
+"		144f 1501  IBM P85-DF (2)",
+"		144f 150a  IBM P85-DF (3)",
+"		144f 150b  IBM P85-DF Low Profile (1)",
+"		144f 1510  IBM P85-DF Low Profile (2)",
+"	1034  HCF 56k Data/Fax/Voice Modem",
+"	1035  HCF 56k Data/Fax/Voice/Spkp (w/Handset) Modem",
+"		10cf 1098  Fujitsu P85-DFSV",
+"	1036  HCF 56k Data/Fax/Voice/Spkp Modem",
+"		104d 8067  HCF 56k Modem",
+"		122d 4029  MDP3880SP-W",
+"		122d 4031  MDP3880SP-U",
+"		13e0 0209  Dell Titanium",
+"		13e0 020a  Dell Graphite",
+"		13e0 0260  Gateway Red Owl",
+"		13e0 0270  Gateway White Horse",
+"	1052  HCF 56k Data/Fax Modem (Worldwide)",
+"	1053  HCF 56k Data/Fax Modem (Worldwide)",
+"	1054  HCF 56k Data/Fax/Voice Modem (Worldwide)",
+"	1055  HCF 56k Data/Fax/Voice/Spkp (w/Handset) Modem (Worldwide)",
+"	1056  HCF 56k Data/Fax/Voice/Spkp Modem (Worldwide)",
+"	1057  HCF 56k Data/Fax/Voice/Spkp Modem (Worldwide)",
+"	1059  HCF 56k Data/Fax/Voice Modem (Worldwide)",
+"	1063  HCF 56k Data/Fax Modem",
+"	1064  HCF 56k Data/Fax/Voice Modem",
+"	1065  HCF 56k Data/Fax/Voice/Spkp (w/Handset) Modem",
+"	1066  HCF 56k Data/Fax/Voice/Spkp Modem",
+"		122d 4033  Dell Athena - MDP3900V-U",
+"	1085  HCF V90 56k Data/Fax/Voice/Spkp PCI Modem",
+"	1433  HCF 56k Data/Fax Modem",
+"	1434  HCF 56k Data/Fax/Voice Modem",
+"	1435  HCF 56k Data/Fax/Voice/Spkp (w/Handset) Modem",
+"	1436  HCF 56k Data/Fax Modem",
+"	1453  HCF 56k Data/Fax Modem",
+"		13e0 0240  IBM",
+"		13e0 0250  IBM",
+"		144f 1502  IBM P95-DF (1)",
+"		144f 1503  IBM P95-DF (2)",
+"	1454  HCF 56k Data/Fax/Voice Modem",
+"	1455  HCF 56k Data/Fax/Voice/Spkp (w/Handset) Modem",
+"	1456  HCF 56k Data/Fax/Voice/Spkp Modem",
+"		122d 4035  Dell Europa - MDP3900V-W",
+"		122d 4302  Dell MP3930V-W(C) MiniPCI",
+"	1610  ADSL AccessRunner PCI Arbitration Device",
+"	1611  AccessRunner PCI ADSL Interface Device",
+"	1620  AccessRunner V2 PCI ADSL Arbitration Device",
+"	1621  AccessRunner V2 PCI ADSL Interface Device",
+"	1622  AccessRunner V2 PCI ADSL Yukon WAN Adapter",
+"	1803  HCF 56k Modem",
+"		0e11 0023  623-LAN Grizzly",
+"		0e11 0043  623-LAN Yogi",
+"	1811  Conextant MiniPCI Network Adapter",
+"	1815  HCF 56k Modem",
+"		0e11 0022  Grizzly",
+"		0e11 0042  Yogi",
+"	2003  HSF 56k Data/Fax Modem",
+"	2004  HSF 56k Data/Fax/Voice Modem",
+"	2005  HSF 56k Data/Fax/Voice/Spkp (w/Handset) Modem",
+"	2006  HSF 56k Data/Fax/Voice/Spkp Modem",
+"	2013  HSF 56k Data/Fax Modem",
+"		0e11 b195  Bear",
+"		0e11 b196  Seminole 1",
+"		0e11 b1be  Seminole 2",
+"		1025 8013  Acer",
+"		1033 809d  NEC",
+"		1033 80bc  NEC",
+"		155d 6793  HP",
+"		155d 8850  E Machines",
+"	2014  HSF 56k Data/Fax/Voice Modem",
+"	2015  HSF 56k Data/Fax/Voice/Spkp (w/Handset) Modem",
+"	2016  HSF 56k Data/Fax/Voice/Spkp Modem",
+"	2043  HSF 56k Data/Fax Modem (WorldW SmartDAA)",
+"	2044  HSF 56k Data/Fax/Voice Modem (WorldW SmartDAA)",
+"	2045  HSF 56k Data/Fax/Voice/Spkp (w/Handset) Modem (WorldW SmartDAA)",
+"		14f1 2045  Generic SoftK56",
+"	2046  HSF 56k Data/Fax/Voice/Spkp Modem (WorldW SmartDAA)",
+"	2063  HSF 56k Data/Fax Modem (SmartDAA)",
+"	2064  HSF 56k Data/Fax/Voice Modem (SmartDAA)",
+"	2065  HSF 56k Data/Fax/Voice/Spkp (w/Handset) Modem (SmartDAA)",
+"	2066  HSF 56k Data/Fax/Voice/Spkp Modem (SmartDAA)",
+"	2093  HSF 56k Modem",
+"		155d 2f07  Legend",
+"	2143  HSF 56k Data/Fax/Cell Modem (Mob WorldW SmartDAA)",
+"	2144  HSF 56k Data/Fax/Voice/Cell Modem (Mob WorldW SmartDAA)",
+"	2145  HSF 56k Data/Fax/Voice/Spkp (w/HS)/Cell Modem (Mob WorldW SmartDAA)",
+"	2146  HSF 56k Data/Fax/Voice/Spkp/Cell Modem (Mob WorldW SmartDAA)",
+"	2163  HSF 56k Data/Fax/Cell Modem (Mob SmartDAA)",
+"	2164  HSF 56k Data/Fax/Voice/Cell Modem (Mob SmartDAA)",
+"	2165  HSF 56k Data/Fax/Voice/Spkp (w/HS)/Cell Modem (Mob SmartDAA)",
+"	2166  HSF 56k Data/Fax/Voice/Spkp/Cell Modem (Mob SmartDAA)",
+"	2343  HSF 56k Data/Fax CardBus Modem (Mob WorldW SmartDAA)",
+"	2344  HSF 56k Data/Fax/Voice CardBus Modem (Mob WorldW SmartDAA)",
+"	2345  HSF 56k Data/Fax/Voice/Spkp (w/HS) CardBus Modem (Mob WorldW SmartDAA)",
+"	2346  HSF 56k Data/Fax/Voice/Spkp CardBus Modem (Mob WorldW SmartDAA)",
+"	2363  HSF 56k Data/Fax CardBus Modem (Mob SmartDAA)",
+"	2364  HSF 56k Data/Fax/Voice CardBus Modem (Mob SmartDAA)",
+"	2365  HSF 56k Data/Fax/Voice/Spkp (w/HS) CardBus Modem (Mob SmartDAA)",
+"	2366  HSF 56k Data/Fax/Voice/Spkp CardBus Modem (Mob SmartDAA)",
+"	2443  HSF 56k Data/Fax Modem (Mob WorldW SmartDAA)",
+"		104d 8075  Modem",
+"		104d 8083  Modem",
+"		104d 8097  Modem",
+"	2444  HSF 56k Data/Fax/Voice Modem (Mob WorldW SmartDAA)",
+"	2445  HSF 56k Data/Fax/Voice/Spkp (w/HS) Modem (Mob WorldW SmartDAA)",
+"	2446  HSF 56k Data/Fax/Voice/Spkp Modem (Mob WorldW SmartDAA)",
+"	2463  HSF 56k Data/Fax Modem (Mob SmartDAA)",
+"	2464  HSF 56k Data/Fax/Voice Modem (Mob SmartDAA)",
+"	2465  HSF 56k Data/Fax/Voice/Spkp (w/HS) Modem (Mob SmartDAA)",
+"	2466  HSF 56k Data/Fax/Voice/Spkp Modem (Mob SmartDAA)",
+"	2bfa  HDAudio Soft Data Fax Modem with SmartCP",
+"	2f00  HSF 56k HSFi Modem",
+"		13e0 8d84  IBM HSFi V.90",
+"		13e0 8d85  Compaq Stinger",
+"		14f1 2004  Dynalink 56PMi",
+"	2f02  HSF 56k HSFi Data/Fax",
+"	2f11  HSF 56k HSFi Modem",
+"	2f20  HSF 56k Data/Fax Modem",
+"	8234  RS8234 ATM SAR Controller [ServiceSAR Plus]",
+"	8800  CX23880/1/2/3 PCI Video and Audio Decoder",
+"		0070 2801  Hauppauge WinTV 28xxx (Roslyn) models",
+"		0070 3401  Hauppauge WinTV 34xxx models",
+"		0070 9001  Nova-T DVB-T",
+"		0070 9200  Nova-SE2 DVB-S",
+"		0070 9202  Nova-S-Plus DVB-S",
+"		0070 9402  WinTV-HVR1100 DVB-T/Hybrid",
+"		0070 9802  WinTV-HVR1100 DVB-T/Hybrid (Low Profile)",
+"		1002 00f8  ATI TV Wonder Pro",
+"		1002 a101  HDTV Wonder",
+"		1043 4823  ASUS PVR-416",
+"		107d 6613  Leadtek Winfast 2000XP Expert",
+"		107d 6620  Leadtek Winfast DV2000",
+"		107d 663c  Leadtek PVR 2000",
+"		107d 665f  WinFast DTV1000-T",
+"		10fc d003  IODATA GV-VCP3/PCI",
+"		10fc d035  IODATA GV/BCTV7E",
+"		1421 0334  Instant TV DVB-T PCI",
+"		1461 000a  AVerTV 303 (M126)",
+"		1461 000b  AverTV Studio 303 (M126)",
+"		1461 8011  UltraTV Media Center PCI 550",
+"		1462 8606  MSI TV-@nywhere Master",
+"		14c7 0107  GDI Black Gold",
+"		14f1 0187  Conexant DVB-T reference design",
+"		14f1 0342  Digital-Logic MICROSPACE Entertainment Center (MEC)",
+"		153b 1166  Cinergy 1400 DVB-T",
+"		1540 2580  Provideo PV259",
+"		1554 4811  PixelView",
+"		1554 4813  Club 3D  ZAP1000 MCE Edition",
+"		17de 08a1  KWorld/VStream XPert DVB-T with cx22702",
+"		17de 08a6  KWorld/VStream XPert DVB-T",
+"		17de 08b2  KWorld DVB-S 100",
+"		17de a8a6  digitalnow DNTV Live! DVB-T",
+"		1822 0025  digitalnow DNTV Live! DVB-T Pro",
+"		18ac d500  FusionHDTV 5 Gold",
+"		18ac d810  FusionHDTV 3 Gold-Q",
+"		18ac d820  FusionHDTV 3 Gold-T",
+"		18ac db00  FusionHDTV DVB-T1",
+"		18ac db11  FusionHDTV DVB-T Plus",
+"		18ac db50  FusionHDTV DVB-T Dual Digital",
+"		7063 3000  pcHDTV HD3000 HDTV",
+"	8801  CX23880/1/2/3 PCI Video and Audio Decoder [Audio Port]",
+"		0070 2801  Hauppauge WinTV 28xxx (Roslyn) models",
+"	8802  CX23880/1/2/3 PCI Video and Audio Decoder [MPEG Port]",
+"		0070 2801  Hauppauge WinTV 28xxx (Roslyn) models",
+"		0070 9002  Nova-T DVB-T Model 909",
+"		1043 4823  ASUS PVR-416",
+"		107d 663c  Leadtek PVR 2000",
+"		14f1 0187  Conexant DVB-T reference design",
+"		17de 08a1  XPert DVB-T PCI BDA DVBT 23880 Transport Stream Capture",
+"		17de 08a6  KWorld/VStream XPert DVB-T",
+"		18ac d500  DViCO FusionHDTV5 Gold",
+"		18ac d810  DViCO FusionHDTV3 Gold-Q",
+"		18ac d820  DViCO FusionHDTV3 Gold-T",
+"		18ac db00  DVICO FusionHDTV DVB-T1",
+"		18ac db10  DVICO FusionHDTV DVB-T Plus",
+"		7063 3000  pcHDTV HD3000 HDTV",
+"	8804  CX23880/1/2/3 PCI Video and Audio Decoder [IR Port]",
+"		0070 9002  Nova-T DVB-T Model 909",
+"	8811  CX23880/1/2/3 PCI Video and Audio Decoder [Audio Port]",
+"		0070 3401  Hauppauge WinTV 34xxx models",
+"		1462 8606  MSI TV-@nywhere Master",
+"		18ac d500  DViCO FusionHDTV5 Gold",
+"		18ac d810  DViCO FusionHDTV3 Gold-Q",
+"		18ac d820  DViCO FusionHDTV3 Gold-T",
+"		18ac db00  DVICO FusionHDTV DVB-T1",
+"14f2  MOBILITY Electronics",
+"	0120  EV1000 bridge",
+"	0121  EV1000 Parallel port",
+"	0122  EV1000 Serial port",
+"	0123  EV1000 Keyboard controller",
+"	0124  EV1000 Mouse controller",
+"14f3  BroadLogic",
+"	2030  2030 DVB-S Satellite Reciever",
+"	2050  2050 DVB-T Terrestrial (Cable) Reciever",
+"	2060  2060 ATSC Terrestrial (Cable) Reciever",
+"14f4  TOKYO Electronic Industry CO Ltd",
+"14f5  SOPAC Ltd",
+"14f6  COYOTE Technologies LLC",
+"14f7  WOLF Technology Inc",
+"14f8  AUDIOCODES Inc",
+"	2077  TP-240 dual span E1 VoIP PCI card",
+"14f9  AG COMMUNICATIONS",
+"14fa  WANDEL & GOLTERMANN",
+"14fb  TRANSAS MARINE (UK) Ltd",
+"14fc  Quadrics Ltd",
+"	0000  QsNet Elan3 Network Adapter",
+"	0001  QsNetII Elan4 Network Adapter",
+"	0002  QsNetIII Elan5 Network Adapter",
+"14fd  JAPAN Computer Industry Inc",
+"14fe  ARCHTEK TELECOM Corp",
+"14ff  TWINHEAD INTERNATIONAL Corp",
+"1500  DELTA Electronics, Inc",
+"	1360  RTL81xx RealTek Ethernet",
+"1501  BANKSOFT CANADA Ltd",
+"1502  MITSUBISHI ELECTRIC LOGISTICS SUPPORT Co Ltd",
+"1503  KAWASAKI LSI USA Inc",
+"1504  KAISER Electronics",
+"1505  ITA INGENIEURBURO FUR TESTAUFGABEN GmbH",
+"1506  CHAMELEON Systems Inc",
+"1507  Motorola \?\? / HTEC",
+"	0001  MPC105 [Eagle]",
+"	0002  MPC106 [Grackle]",
+"	0003  MPC8240 [Kahlua]",
+"	0100  MC145575 [HFC-PCI]",
+"	0431  KTI829c 100VG",
+"	4801  Raven",
+"	4802  Falcon",
+"	4803  Hawk",
+"	4806  CPX8216",
+"1508  HONDA CONNECTORS/MHOTRONICS Inc",
+"1509  FIRST INTERNATIONAL Computer Inc",
+"150a  FORVUS RESEARCH Inc",
+"150b  YAMASHITA Systems Corp",
+"150c  KYOPAL CO Ltd",
+"150d  WARPSPPED Inc",
+"150e  C-PORT Corp",
+"150f  INTEC GmbH",
+"1510  BEHAVIOR TECH Computer Corp",
+"1511  CENTILLIUM Technology Corp",
+"1512  ROSUN Technologies Inc",
+"1513  Raychem",
+"1514  TFL LAN Inc",
+"1515  Advent design",
+"1516  MYSON Technology Inc",
+"	0800  MTD-8xx 100/10M Ethernet PCI Adapter",
+"	0803  SURECOM EP-320X-S 100/10M Ethernet PCI Adapter",
+"		1320 10bd  SURECOM EP-320X-S 100/10M Ethernet PCI Adapter",
+"	0891  MTD-8xx 100/10M Ethernet PCI Adapter",
+"1517  ECHOTEK Corp",
+"1518  PEP MODULAR Computers GmbH",
+"1519  TELEFON AKTIEBOLAGET LM Ericsson",
+"151a  Globetek",
+"	1002  PCI-1002",
+"	1004  PCI-1004",
+"	1008  PCI-1008",
+"151b  COMBOX Ltd",
+"151c  DIGITAL AUDIO LABS Inc",
+"	0003  Prodif T 2496",
+"	4000  Prodif 88",
+"151d  Fujitsu Computer Products Of America",
+"151e  MATRIX Corp",
+"151f  TOPIC SEMICONDUCTOR Corp",
+"	0000  TP560 Data/Fax/Voice 56k modem",
+"1520  CHAPLET System Inc",
+"1521  BELL Corp",
+"1522  MainPine Ltd",
+"	0100  PCI <-> IOBus Bridge",
+"		1522 0200  RockForceDUO 2 Port V.92/V.44 Data/Fax/Voice Modem",
+"		1522 0300  RockForceQUATRO 4 Port V.92/V.44 Data/Fax/Voice Modem",
+"		1522 0400  RockForceDUO+ 2 Port V.92/V.44 Data/Fax/Voice Modem",
+"		1522 0500  RockForceQUATRO+ 4 Port V.92/V.44 Data/Fax/Voice Modem",
+"		1522 0600  RockForce+ 2 Port V.90 Data/Fax/Voice Modem",
+"		1522 0700  RockForce+ 4 Port V.90 Data/Fax/Voice Modem",
+"		1522 0800  RockForceOCTO+ 8 Port V.92/V.44 Data/Fax/Voice Modem",
+"		1522 0c00  RockForceDUO+ 2 Port V.92/V.44 Data, V.34 Super-G3 Fax, Voice Modem",
+"		1522 0d00  RockForceQUATRO+ 4 Port V.92/V.44 Data, V.34 Super-G3 Fax, Voice Modem",
+"		1522 1d00  RockForceOCTO+ 8 Port V.92/V.44 Data, V.34 Super-G3 Fax, Voice Modem",
+"		1522 2000  RockForceD1 1 Port V.90 Data Modem",
+"		1522 2100  RockForceF1 1 Port V.34 Super-G3 Fax Modem",
+"		1522 2200  RockForceD2 2 Port V.90 Data Modem",
+"		1522 2300  RockForceF2 2 Port V.34 Super-G3 Fax Modem",
+"		1522 2400  RockForceD4 4 Port V.90 Data Modem",
+"		1522 2500  RockForceF4 4 Port V.34 Super-G3 Fax Modem",
+"		1522 2600  RockForceD8 8 Port V.90 Data Modem",
+"		1522 2700  RockForceF8 8 Port V.34 Super-G3 Fax Modem",
+"1523  MUSIC Semiconductors",
+"1524  ENE Technology Inc",
+"	0510  CB710 Memory Card Reader Controller",
+"		103c 006a  NX9500",
+"	0520  FLASH memory: ENE Technology Inc:",
+"	0530  ENE PCI Memory Stick Card Reader Controller",
+"	0550  ENE PCI Secure Digital Card Reader Controller",
+"	0610  PCI Smart Card Reader Controller",
+"	1211  CB1211 Cardbus Controller",
+"	1225  CB1225 Cardbus Controller",
+"	1410  CB1410 Cardbus Controller",
+"		1025 003c  CL50 motherboard",
+"		1025 005a  TravelMate 290",
+"	1411  CB-710/2/4 Cardbus Controller",
+"		103c 006a  NX9500",
+"	1412  CB-712/4 Cardbus Controller",
+"	1420  CB1420 Cardbus Controller",
+"	1421  CB-720/2/4 Cardbus Controller",
+"	1422  CB-722/4 Cardbus Controller",
+"1525  IMPACT Technologies",
+"1526  ISS, Inc",
+"1527  SOLECTRON",
+"1528  ACKSYS",
+"1529  AMERICAN MICROSystems Inc",
+"152a  QUICKTURN DESIGN Systems",
+"152b  FLYTECH Technology CO Ltd",
+"152c  MACRAIGOR Systems LLC",
+"152d  QUANTA Computer Inc",
+"152e  MELEC Inc",
+"152f  PHILIPS - CRYPTO",
+"1530  ACQIS Technology Inc",
+"1531  CHRYON Corp",
+"1532  ECHELON Corp",
+"	0020  LonWorks PCLTA-20 PCI LonTalk Adapter",
+"1533  BALTIMORE",
+"1534  ROAD Corp",
+"1535  EVERGREEN Technologies Inc",
+"1537  DATALEX COMMUNCATIONS",
+"1538  ARALION Inc",
+"	0303  ARS106S Ultra ATA 133/100/66 Host Controller",
+"1539  ATELIER INFORMATIQUES et ELECTRONIQUE ETUDES S.A.",
+"153a  ONO SOKKI",
+"153b  TERRATEC Electronic GmbH",
+"	1144  Aureon 5.1",
+"	1147  Aureon 5.1 Sky",
+"	1158  Philips Semiconductors SAA7134 (rev 01) [Terratec Cinergy 600 TV]",
+"153c  ANTAL Electronic",
+"153d  FILANET Corp",
+"153e  TECHWELL Inc",
+"153f  MIPS Technologies, Inc.",
+"	0001  SOC-it 101 System Controller",
+"1540  PROVIDEO MULTIMEDIA Co Ltd",
+"1541  MACHONE Communications",
+"1542  Concurrent Computer Corporation",
+"1543  SILICON Laboratories",
+"	3052  Intel 537 [Winmodem]",
+"	4c22  Si3036 MC'97 DAA",
+"1544  DCM DATA Systems",
+"1545  VISIONTEK",
+"1546  IOI Technology Corp",
+"1547  MITUTOYO Corp",
+"1548  JET PROPULSION Laboratory",
+"1549  INTERCONNECT Systems Solutions",
+"154a  MAX Technologies Inc",
+"154b  COMPUTEX Co Ltd",
+"154c  VISUAL Technology Inc",
+"154d  PAN INTERNATIONAL Industrial Corp",
+"154e  SERVOTEST Ltd",
+"154f  STRATABEAM Technology",
+"1550  OPEN NETWORK Co Ltd",
+"1551  SMART Electronic DEVELOPMENT GmBH",
+"1552  RACAL AIRTECH Ltd",
+"1553  CHICONY Electronics Co Ltd",
+"1554  PROLINK Microsystems Corp",
+"1555  GESYTEC GmBH",
+"1556  PLD APPLICATIONS",
+"1557  MEDIASTAR Co Ltd",
+"1558  CLEVO/KAPOK Computer",
+"1559  SI LOGIC Ltd",
+"155a  INNOMEDIA Inc",
+"155b  PROTAC INTERNATIONAL Corp",
+"155c  Cemax-Icon Inc",
+"155d  Mac System Co Ltd",
+"155e  LP Elektronik GmbH",
+"155f  Perle Systems Ltd",
+"1560  Terayon Communications Systems",
+"1561  Viewgraphics Inc",
+"1562  Symbol Technologies",
+"1563  A-Trend Technology Co Ltd",
+"1564  Yamakatsu Electronics Industry Co Ltd",
+"1565  Biostar Microtech Int'l Corp",
+"1566  Ardent Technologies Inc",
+"1567  Jungsoft",
+"1568  DDK Electronics Inc",
+"1569  Palit Microsystems Inc.",
+"156a  Avtec Systems",
+"156b  2wire Inc",
+"156c  Vidac Electronics GmbH",
+"156d  Alpha-Top Corp",
+"156e  Alfa Inc",
+"156f  M-Systems Flash Disk Pioneers Ltd",
+"1570  Lecroy Corp",
+"1571  Contemporary Controls",
+"	a001  CCSI PCI20-485 ARCnet",
+"	a002  CCSI PCI20-485D ARCnet",
+"	a003  CCSI PCI20-485X ARCnet",
+"	a004  CCSI PCI20-CXB ARCnet",
+"	a005  CCSI PCI20-CXS ARCnet",
+"	a006  CCSI PCI20-FOG-SMA ARCnet",
+"	a007  CCSI PCI20-FOG-ST ARCnet",
+"	a008  CCSI PCI20-TB5 ARCnet",
+"	a009  CCSI PCI20-5-485 5Mbit ARCnet",
+"	a00a  CCSI PCI20-5-485D 5Mbit ARCnet",
+"	a00b  CCSI PCI20-5-485X 5Mbit ARCnet",
+"	a00c  CCSI PCI20-5-FOG-ST 5Mbit ARCnet",
+"	a00d  CCSI PCI20-5-FOG-SMA 5Mbit ARCnet",
+"	a201  CCSI PCI22-485 10Mbit ARCnet",
+"	a202  CCSI PCI22-485D 10Mbit ARCnet",
+"	a203  CCSI PCI22-485X 10Mbit ARCnet",
+"	a204  CCSI PCI22-CHB 10Mbit ARCnet",
+"	a205  CCSI PCI22-FOG_ST 10Mbit ARCnet",
+"	a206  CCSI PCI22-THB 10Mbit ARCnet",
+"1572  Otis Elevator Company",
+"1573  Lattice - Vantis",
+"1574  Fairchild Semiconductor",
+"1575  Voltaire Advanced Data Security Ltd",
+"1576  Viewcast COM",
+"1578  HITT",
+"	5615  VPMK3 [Video Processor Mk III]",
+"1579  Dual Technology Corp",
+"157a  Japan Elecronics Ind Inc",
+"157b  Star Multimedia Corp",
+"157c  Eurosoft (UK)",
+"	8001  Fix2000 PCI Y2K Compliance Card",
+"157d  Gemflex Networks",
+"157e  Transition Networks",
+"157f  PX Instruments Technology Ltd",
+"1580  Primex Aerospace Co",
+"1581  SEH Computertechnik GmbH",
+"1582  Cytec Corp",
+"1583  Inet Technologies Inc",
+"1584  Uniwill Computer Corp",
+"1585  Logitron",
+"1586  Lancast Inc",
+"1587  Konica Corp",
+"1588  Solidum Systems Corp",
+"1589  Atlantek Microsystems Pty Ltd",
+"158a  Digalog Systems Inc",
+"158b  Allied Data Technologies",
+"158c  Hitachi Semiconductor & Devices Sales Co Ltd",
+"158d  Point Multimedia Systems",
+"158e  Lara Technology Inc",
+"158f  Ditect Coop",
+"1590  3pardata Inc",
+"1591  ARN",
+"1592  Syba Tech Ltd",
+"	0781  Multi-IO Card",
+"	0782  Parallel Port Card 2xEPP",
+"	0783  Multi-IO Card",
+"	0785  Multi-IO Card",
+"	0786  Multi-IO Card",
+"	0787  Multi-IO Card",
+"	0788  Multi-IO Card",
+"	078a  Multi-IO Card",
+"1593  Bops Inc",
+"1594  Netgame Ltd",
+"1595  Diva Systems Corp",
+"1596  Folsom Research Inc",
+"1597  Memec Design Services",
+"1598  Granite Microsystems",
+"1599  Delta Electronics Inc",
+"159a  General Instrument",
+"159b  Faraday Technology Corp",
+"159c  Stratus Computer Systems",
+"159d  Ningbo Harrison Electronics Co Ltd",
+"159e  A-Max Technology Co Ltd",
+"159f  Galea Network Security",
+"15a0  Compumaster SRL",
+"15a1  Geocast Network Systems",
+"15a2  Catalyst Enterprises Inc",
+"	0001  TA700 PCI Bus Analyzer/Exerciser",
+"15a3  Italtel",
+"15a4  X-Net OY",
+"15a5  Toyota Macs Inc",
+"15a6  Sunlight Ultrasound Technologies Ltd",
+"15a7  SSE Telecom Inc",
+"15a8  Shanghai Communications Technologies Center",
+"15aa  Moreton Bay",
+"15ab  Bluesteel Networks Inc",
+"15ac  North Atlantic Instruments",
+"15ad  VMware Inc",
+"	0405  [VMware SVGA II] PCI Display Adapter",
+"	0710  Virtual SVGA",
+"	0720  VMware High-Speed Virtual NIC [vmxnet]",
+"15ae  Amersham Pharmacia Biotech",
+"15b0  Zoltrix International Ltd",
+"15b1  Source Technology Inc",
+"15b2  Mosaid Technologies Inc",
+"15b3  Mellanox Technologies",
+"	5274  MT21108 InfiniBridge",
+"	5a44  MT23108 InfiniHost",
+"	5a45  MT23108 [Infinihost HCA Flash Recovery]",
+"	5a46  MT23108 PCI Bridge",
+"	5e8d  MT25204 [InfiniHost III Lx HCA Flash Recovery]",
+"	6274  MT25204 [InfiniHost III Lx HCA]",
+"	6278  MT25208 InfiniHost III Ex (Tavor compatibility mode)",
+"	6279  MT25208 [InfiniHost III Ex HCA Flash Recovery]",
+"	6282  MT25208 InfiniHost III Ex",
+"15b4  CCI/TRIAD",
+"15b5  Cimetrics Inc",
+"15b6  Texas Memory Systems Inc",
+"15b7  Sandisk Corp",
+"15b8  ADDI-DATA GmbH",
+"15b9  Maestro Digital Communications",
+"15ba  Impacct Technology Corp",
+"15bb  Portwell Inc",
+"15bc  Agilent Technologies",
+"	1100  E8001-66442 PCI Express CIC",
+"	2922  64 Bit, 133MHz PCI-X Exerciser & Protocol Checker",
+"	2928  64 Bit, 66MHz PCI Exerciser & Analyzer",
+"	2929  64 Bit, 133MHz PCI-X Analyzer & Exerciser",
+"15bd  DFI Inc",
+"15be  Sola Electronics",
+"15bf  High Tech Computer Corp (HTC)",
+"15c0  BVM Ltd",
+"15c1  Quantel",
+"15c2  Newer Technology Inc",
+"15c3  Taiwan Mycomp Co Ltd",
+"15c4  EVSX Inc",
+"15c5  Procomp Informatics Ltd",
+"	8010  1394b - 1394 Firewire 3-Port Host Adapter Card",
+"15c6  Technical University of Budapest",
+"15c7  Tateyama System Laboratory Co Ltd",
+"	0349  Tateyama C-PCI PLC/NC card Rev.01A",
+"15c8  Penta Media Co Ltd",
+"15c9  Serome Technology Inc",
+"15ca  Bitboys OY",
+"15cb  AG Electronics Ltd",
+"15cc  Hotrail Inc",
+"15cd  Dreamtech Co Ltd",
+"15ce  Genrad Inc",
+"15cf  Hilscher GmbH",
+"15d1  Infineon Technologies AG",
+"15d2  FIC (First International Computer Inc)",
+"15d3  NDS Technologies Israel Ltd",
+"15d4  Iwill Corp",
+"15d5  Tatung Co",
+"15d6  Entridia Corp",
+"15d7  Rockwell-Collins Inc",
+"15d8  Cybernetics Technology Co Ltd",
+"15d9  Super Micro Computer Inc",
+"15da  Cyberfirm Inc",
+"15db  Applied Computing Systems Inc",
+"15dc  Litronic Inc",
+"	0001  Argus 300 PCI Cryptography Module",
+"15dd  Sigmatel Inc",
+"15de  Malleable Technologies Inc",
+"15df  Infinilink Corp",
+"15e0  Cacheflow Inc",
+"15e1  Voice Technologies Group Inc",
+"15e2  Quicknet Technologies Inc",
+"15e3  Networth Technologies Inc",
+"15e4  VSN Systemen BV",
+"15e5  Valley technologies Inc",
+"15e6  Agere Inc",
+"15e7  Get Engineering Corp",
+"15e8  National Datacomm Corp",
+"	0130  Wireless PCI Card",
+"15e9  Pacific Digital Corp",
+"	1841  ADMA-100 DiscStaQ ATA Controller",
+"15ea  Tokyo Denshi Sekei K.K.",
+"15eb  Drsearch GmbH",
+"15ec  Beckhoff GmbH",
+"	3101  FC3101 Profibus DP 1 Channel PCI",
+"	5102  FC5102",
+"15ed  Macrolink Inc",
+"15ee  In Win Development Inc",
+"15ef  Intelligent Paradigm Inc",
+"15f0  B-Tree Systems Inc",
+"15f1  Times N Systems Inc",
+"15f2  Diagnostic Instruments Inc",
+"15f3  Digitmedia Corp",
+"15f4  Valuesoft",
+"15f5  Power Micro Research",
+"15f6  Extreme Packet Device Inc",
+"15f7  Banctec",
+"15f8  Koga Electronics Co",
+"15f9  Zenith Electronics Corp",
+"15fa  J.P. Axzam Corp",
+"15fb  Zilog Inc",
+"15fc  Techsan Electronics Co Ltd",
+"15fd  N-CUBED.NET",
+"15fe  Kinpo Electronics Inc",
+"15ff  Fastpoint Technologies Inc",
+"1600  Northrop Grumman - Canada Ltd",
+"1601  Tenta Technology",
+"1602  Prosys-tec Inc",
+"1603  Nokia Wireless Communications",
+"1604  Central System Research Co Ltd",
+"1605  Pairgain Technologies",
+"1606  Europop AG",
+"1607  Lava Semiconductor Manufacturing Inc",
+"1608  Automated Wagering International",
+"1609  Scimetric Instruments Inc",
+"1612  Telesynergy Research Inc.",
+"1619  FarSite Communications Ltd",
+"	0400  FarSync T2P (2 port X.21/V.35/V.24)",
+"	0440  FarSync T4P (4 port X.21/V.35/V.24)",
+"	0610  FarSync T1U (1 port X.21/V.35/V.24)",
+"	0620  FarSync T2U (2 port X.21/V.35/V.24)",
+"	0640  FarSync T4U (4 port X.21/V.35/V.24)",
+"	1610  FarSync TE1 (T1,E1)",
+"	2610  FarSync DSL-S1 (SHDSL)",
+"161f  Rioworks",
+"1626  TDK Semiconductor Corp.",
+"	8410  RTL81xx Fast Ethernet",
+"1629  Kongsberg Spacetec AS",
+"	1003  Format synchronizer v3.0",
+"	2002  Fast Universal Data Output",
+"1637  Linksys",
+"	3874  Linksys 802.11b WMP11 PCI Wireless card",
+"1638  Standard Microsystems Corp [SMC]",
+"	1100  SMC2602W EZConnect / Addtron AWA-100 / Eumitcom PCI WL11000",
+"163c  Smart Link Ltd.",
+"	3052  SmartLink SmartPCI562 56K Modem",
+"	5449  SmartPCI561 Modem",
+"1657  Brocade Communications Systems, Inc.",
+"165a  Epix Inc",
+"	c100  PIXCI(R) CL1 Camera Link Video Capture Board [custom QL5232]",
+"	d200  PIXCI(R) D2X Digital Video Capture Board [custom QL5232]",
+"	d300  PIXCI(R) D3X Digital Video Capture Board [custom QL5232]",
+"165d  Hsing Tech. Enterprise Co., Ltd.",
+"165f  Linux Media Labs, LLC",
+"	1020  LMLM4 MPEG-4 encoder",
+"1661  Worldspace Corp.",
+"1668  Actiontec Electronics Inc",
+"	0100  Mini-PCI bridge",
+"166d  Broadcom Corporation",
+"	0001  SiByte BCM1125/1125H/1250 System-on-a-Chip PCI",
+"	0002  SiByte BCM1125H/1250 System-on-a-Chip HyperTransport",
+"1677  Bernecker + Rainer",
+"	104e  5LS172.6 B&R Dual CAN Interface Card",
+"	12d7  5LS172.61 B&R Dual CAN Interface Card",
+"167b  ZyDAS Technology Corp.",
+"	2102  ZyDAS ZD1202",
+"		187e 3406  ZyAIR B-122 CardBus 11Mbs Wireless LAN Card",
+"1681  Hercules",
+"	0010  Hercules 3d Prophet II Ultra 64MB (350 MHz NV15BR core)",
+"1682  XFX Pine Group Inc.",
+"1688  CastleNet Technology Inc.",
+"	1170  WLAN 802.11b card",
+"168c  Atheros Communications, Inc.",
+"	0007  AR5000 802.11a Wireless Adapter",
+"	0011  AR5210 802.11a NIC",
+"	0012  AR5211 802.11ab NIC",
+"	0013  AR5212 802.11abg NIC",
+"		1113 d301  Philips CPWNA100 Wireless CardBus adapter",
+"		1186 3202  D-link DWL-G650 (Rev B3,B5) Wireless cardbus adapter",
+"		1186 3203  DWL-G520 Wireless PCI Adapter",
+"		1186 3a12  D-Link AirPlus DWL-G650 Wireless Cardbus Adapter(rev.C)",
+"		1186 3a13  D-Link AirPlus DWL-G520 Wireless PCI Adapter(rev.B)",
+"		1186 3a14  D-Link AirPremier DWL-AG530 Wireless PCI Adapter",
+"		1186 3a17  D-Link AirPremier DWL-G680 Wireless Cardbus Adapter",
+"		1186 3a18  D-Link AirPremier DWL-G550 Wireless PCI Adapter",
+"		1186 3a63  D-Link AirPremier DWL-AG660 Wireless Cardbus Adapter",
+"		1186 3a94  C54C Wireless 801.11g cardbus",
+"		1186 3ab0  Allnet ALL0281 Wireless PCI Card",
+"		1385 4d00  Netgear WG311T Wireless PCI Adapter",
+"		1458 e911  Gigabyte GN-WIAG02",
+"		14b7 0a60  8482-WD ORiNOCO 11a/b/g Wireless PCI Adapter",
+"		168c 0013  AirPlus XtremeG DWL-G650 Wireless PCMCIA Adapter",
+"		168c 1025  DWL-G650B2 Wireless CardBus Adapter",
+"		168c 1027  Netgate NL-3054CB ARIES b/g CardBus Adapter",
+"		168c 2026  Netgate 5354MP ARIES a(108Mb turbo)/b/g MiniPCI Adapter",
+"		168c 2041  Netgate 5354MP Plus ARIES2 b/g MiniPCI Adapter",
+"		168c 2042  Netgate 5354MP Plus ARIES2 a/b/g MiniPCI Adapter",
+"		16ab 7302  Trust Speedshare Turbo Pro Wireless PCI Adapter",
+"		185f 2012  Wistron NeWeb WLAN a+b+g model CB9",
+"	001a  AR5005G 802.11abg NIC",
+"		1113 ee20  SMC Wireless CardBus Adapter 802.11g (SMCWCB-G EU)",
+"		1113 ee24  SMC Wireless PCI Card WPCI-G",
+"		1186 3a15  D-Link AirPlus G DWL-G630 Wireless Cardbus Adapter(rev.D)",
+"		1186 3a16  D-Link AirPlus G DWL-G510 Wireless PCI Adapter(rev.B)",
+"		1186 3a23  D-Link AirPlus G DWL-G520+A Wireless PCI Adapter",
+"		1186 3a24  D-Link AirPlus G DWL-G650+A Wireless Cardbus Adapter",
+"		168c 1052  TP-Link TL-WN510G Wireless CardBus Adapter",
+"	001b  AR5006X 802.11abg NIC",
+"		1186 3a19  D-Link AirPremier AG DWL-AG660 Wireless Cardbus Adapter",
+"		1186 3a22  D-Link AirPremier AG DWL-AG530 Wireless PCI Adapter",
+"		168c 2062  EnGenius EMP-8602 (400mw)",
+"		168c 2063  EnGenius EMP-8602 (400mw)",
+"	0020  AR5005VL 802.11bg Wireless NIC",
+"	1014  AR5212 802.11abg NIC",
+"1695  EPoX Computer Co., Ltd.",
+"169c  Netcell Corporation",
+"	0044  Revolution Storage Processing Card",
+"16a5  Tekram Technology Co.,Ltd.",
+"16ab  Global Sun Technology Inc",
+"	1100  GL24110P",
+"	1101  PLX9052 PCMCIA-to-PCI Wireless LAN",
+"	1102  PCMCIA-to-PCI Wireless Network Bridge",
+"	8501  WL-8305 Wireless LAN PCI Adapter",
+"16ae  Safenet Inc",
+"	1141  SafeXcel-1141",
+"16af  SparkLAN Communications, Inc.",
+"16b4  Aspex Semiconductor Ltd",
+"16b8  Sonnet Technologies, Inc.",
+"16be  Creatix Polymedia GmbH",
+"16c6  Micrel-Kendin",
+"	8695  Centaur KS8695 ARM processor",
+"16c8  Octasic Inc.",
+"16c9  EONIC B.V. The Netherlands",
+"16ca  CENATEK Inc",
+"	0001  Rocket Drive DL",
+"16cd  Densitron Technologies",
+"16ce  Roland Corp.",
+"16d5  Acromag, Inc.",
+"	4d4e  PMC482, APC482, AcPC482 Counter Timer Board",
+"16df  PIKA Technologies Inc.",
+"16e3  European Space Agency",
+"	1e0f  LEON2FT Processor",
+"16ec  U.S. Robotics",
+"	00ff  USR997900 10/100 Mbps PCI Network Card",
+"	0116  USR997902 10/100/1000 Mbps PCI Network Card",
+"	3685  Wireless Access PCI Adapter Model 022415",
+"16ed  Sycron N. V.",
+"	1001  UMIO communication card",
+"16f3  Jetway Information Co., Ltd.",
+"16f4  Vweb Corp",
+"	8000  VW2010",
+"16f6  VideoTele.com, Inc.",
+"1702  Internet Machines Corporation (IMC)",
+"1705  Digital First, Inc.",
+"170b  NetOctave",
+"	0100  NSP2000-SSL crypto accelerator",
+"170c  YottaYotta Inc.",
+"1725  Vitesse Semiconductor",
+"	7174  VSC7174 PCI/PCI-X Serial ATA Host Bus Controller",
+"172a  Accelerated Encryption",
+"	13c8  AEP SureWare Runner 1000V3",
+"1734  Fujitsu Siemens Computer GmbH",
+"	1078  Amilo Pro v2010",
+"1737  Linksys",
+"	0013  WMP54G Wireless Pci Card",
+"	0015  WMP54GS Wireless Pci Card",
+"	1032  Gigabit Network Adapter",
+"		1737 0015  EG1032 v2 Instant Gigabit Network Adapter",
+"		1737 0024  EG1032 v3 Instant Gigabit Network Adapter",
+"	1064  Gigabit Network Adapter",
+"		1737 0016  EG1064 v2 Instant Gigabit Network Adapter",
+"	ab08  21x4x DEC-Tulip compatible 10/100 Ethernet",
+"	ab09  21x4x DEC-Tulip compatible 10/100 Ethernet",
+"173b  Altima (nee Broadcom)",
+"	03e8  AC1000 Gigabit Ethernet",
+"	03e9  AC1001 Gigabit Ethernet",
+"	03ea  AC9100 Gigabit Ethernet",
+"		173b 0001  AC1002",
+"	03eb  AC1003 Gigabit Ethernet",
+"1743  Peppercon AG",
+"	8139  ROL/F-100 Fast Ethernet Adapter with ROL",
+"1749  RLX Technologies",
+"174b  PC Partner Limited",
+"174d  WellX Telecom SA",
+"175c  AudioScience Inc",
+"175e  Sanera Systems, Inc.",
+"1775  SBS Technologies",
+"1787  Hightech Information System Ltd.",
+"1796  Research Centre Juelich",
+"	0001  SIS1100 [Gigabit link]",
+"	0002  HOTlink",
+"	0003  Counter Timer",
+"	0004  CAMAC Controller",
+"	0005  PROFIBUS",
+"	0006  AMCC HOTlink",
+"1797  JumpTec h, GMBH",
+"1799  Belkin",
+"	6001  Wireless PCI Card - F5D6001",
+"	6020  Wireless PCMCIA Card - F5D6020",
+"	6060  Wireless PDA Card - F5D6060",
+"	7000  Wireless PCI Card - F5D7000",
+"	7010  BCM4306 802.11b/g Wireless Lan Controller F5D7010",
+"179c  Data Patterns",
+"	0557  DP-PCI-557 [PCI 1553B]",
+"	0566  DP-PCI-566 [Intelligent PCI 1553B]",
+"	5031  DP-CPCI-5031-Synchro Module",
+"	5121  DP-CPCI-5121-IP Carrier",
+"	5211  DP-CPCI-5211-IP Carrier",
+"	5679  AGE Display Module",
+"17a0  Genesys Logic, Inc",
+"	8033  GL880S USB 1.1 controller",
+"	8034  GL880S USB 2.0 controller",
+"17aa  Lenovo",
+"17af  Hightech Information System Ltd.",
+"17b3  Hawking Technologies",
+"	ab08  PN672TX 10/100 Ethernet",
+"17b4  Indra Networks, Inc.",
+"	0011  WebEnhance 100 GZIP Compression Card",
+"17c0  Wistron Corp.",
+"17c2  Newisys, Inc.",
+"17cb  Airgo Networks Inc",
+"17cc  NetChip Technology, Inc",
+"	2280  USB 2.0",
+"17cf  Z-Com, Inc.",
+"17d3  Areca Technology Corp.",
+"	1110  ARC-1110 4-Port PCI-X to SATA RAID Controller",
+"	1120  ARC-1120 8-Port PCI-X to SATA RAID Controller",
+"	1130  ARC-1130 12-Port PCI-X to SATA RAID Controller",
+"	1160  ARC-1160 16-Port PCI-X to SATA RAID Controller",
+"	1210  ARC-1210 4-Port PCI-Express to SATA RAID Controller",
+"	1220  ARC-1220 8-Port PCI-Express to SATA RAID Controller",
+"	1230  ARC-1230 12-Port PCI-Express to SATA RAID Controller",
+"	1260  ARC-1260 16-Port PCI-Express to SATA RAID Controller",
+"17d5  S2io Inc.",
+"	5831  Xframe 10 Gigabit Ethernet PCI-X",
+"		103c 12d5  HP PCI-X 133MHz 10GbE SR Fiber",
+"	5832  Xframe II 10Gbps Ethernet",
+"17de  KWorld Computer Co. Ltd.",
+"17ee  Connect Components Ltd",
+"17f2  Albatron Corp.",
+"17fe  Linksys, A Division of Cisco Systems",
+"	2120  WMP11v4 802.11b PCI card",
+"	2220  [AirConn] INPROCOMM IPN 2220 Wireless LAN Adapter (rev 01)",
+"		17fe 2220  WPC54G ver. 4",
+"17ff  Benq Corporation",
+"1809  Lumanate, Inc.",
+"1813  Ambient Technologies Inc",
+"	4000  HaM controllerless modem",
+"		16be 0001  V9x HAM Data Fax Modem",
+"	4100  HaM plus Data Fax Modem",
+"		16be 0002  V9x HAM 1394",
+"1814  RaLink",
+"	0101  Wireless PCI Adapter RT2400 / RT2460",
+"		1043 0127  WiFi-b add-on Card",
+"		1462 6828  PC11B2 (MS-6828) Wireless 11b PCI Card",
+"	0200  RT2500 802.11g PCI [PC54G2]",
+"	0201  RT2500 802.11g Cardbus/mini-PCI",
+"		1043 130f  WL-130g",
+"		1371 001e  CWC-854 Wireless-G CardBus Adapter",
+"		1371 001f  CWM-854 Wireless-G Mini PCI Adapter",
+"		1371 0020  CWP-854 Wireless-G PCI Adapter",
+"		1458 e381  GN-WMKG 802.11b/g Wireless CardBus Adapter",
+"		1458 e931  GN-WIKG 802.11b/g mini-PCI Adapter",
+"		1462 6835  Wireless 11G CardBus CB54G2",
+"		1737 0032  WMP54G 2.0 PCI Adapter",
+"		1799 700a  F5D7000 Wireless G Desktop Network Card",
+"		1799 701a  F5D7010 Wireless G Notebook Network Card",
+"		185f 22a0  CN-WF513 Wireless Cardbus Adapter",
+"	0301  RT2561/RT61 802.11g PCI",
+"		1186 3c08  DWL-G630 Rev E",
+"		1186 3c09  DWL-G510 Rev C",
+"	0302  RT2561/RT61 rev B 802.11g",
+"		1186 3c08  DWL-G630 Rev E",
+"		1186 3c09  DWL-G510 Rev C",
+"	0401  Ralink RT2600 802.11 MIMO",
+"1820  InfiniCon Systems Inc.",
+"1822  Twinhan Technology Co. Ltd",
+"	4e35  Mantis DTV PCI Bridge Controller [Ver 1.0]",
+"182d  SiteCom Europe BV",
+"	3069  ISDN PCI DC-105V2",
+"	9790  WL-121 Wireless Network Adapter 100g+ [Ver.3]",
+"1830  Credence Systems Corporation",
+"183b  MikroM GmbH",
+"	08a7  MVC100 DVI",
+"	08a8  MVC101 SDI",
+"	08a9  MVC102 DVI+Audio",
+"1849  ASRock Incorporation",
+"1851  Microtune, Inc.",
+"1852  Anritsu Corp.",
+"1853  SMSC Automotive Infotainment System Group",
+"1854  LG Electronics, Inc.",
+"185b  Compro Technology, Inc.",
+"185f  Wistron NeWeb Corp.",
+"1864  SilverBack",
+"	2110  ISNAP 2110",
+"1867  Topspin Communications",
+"	5a44  MT23108 InfiniHost HCA",
+"	5a45  MT23108 InfiniHost HCA flash recovery",
+"	5a46  MT23108 InfiniHost HCA bridge",
+"	6278  MT25208 InfiniHost III Ex (Tavor compatibility mode)",
+"	6282  MT25208 InfiniHost III Ex",
+"187e  ZyXEL Communication Corporation",
+"	3403  ZyAir G-110 802.11g",
+"	340e  M-302 802.11g XtremeMIMO",
+"1888  Varisys Ltd",
+"	0301  VMFX1 FPGA PMC module",
+"	0601  VSM2 dual PMC carrier",
+"	0710  VS14x series PowerPC PCI board",
+"	0720  VS24x series PowerPC PCI board",
+"188a  Ample Communications, Inc",
+"1890  Egenera, Inc.",
+"1894  KNC One",
+"1896  B&B Electronics Manufacturing Company, Inc.",
+"18a1  Astute Networks Inc.",
+"18ac  DViCO Corporation",
+"	d500  FusionHDTV 5",
+"	d810  FusionHDTV 3 Gold",
+"	d820  FusionHDTV 3 Gold-T",
+"18b8  Ammasso",
+"	b001  AMSO 1100 iWARP/RDMA Gigabit Ethernet Coprocessor",
+"18bc  Info-Tek Corp.",
+"18c3  Micronas Semiconductor Holding AG",
+"18c8  Cray Inc",
+"18c9  ARVOO Engineering BV",
+"18ca  XGI - Xabre Graphics Inc",
+"	0020  Volari Z7",
+"	0040  Volari V3XT/V5/V8",
+"18d2  Sitecom",
+"	3069  DC-105v2 ISDN controller",
+"18dd  Artimi Inc",
+"	4c6f  Artimi RTMI-100 UWB adapter",
+"18e6  MPL AG",
+"	0001  OSCI [Octal Serial Communication Interface]",
+"18ec  Cesnet, z.s.p.o.",
+"	c006  COMBO6",
+"		18ec d001  COMBO-4MTX",
+"		18ec d002  COMBO-4SFP",
+"		18ec d003  COMBO-4SFPRO",
+"		18ec d004  COMBO-2XFP",
+"	c045  COMBO6E",
+"	c050  COMBO-PTM",
+"	c058  COMBO6X",
+"		18ec d001  COMBO-4MTX",
+"		18ec d002  COMBO-4SFP",
+"		18ec d003  COMBO-4SFPRO",
+"		18ec d004  COMBO-2XFP",
+"18f7  Commtech, Inc.",
+"	0001  Fastcom ESCC-PCI-335",
+"	0002  Fastcom 422/4-PCI-335",
+"	0004  Fastcom 422/2-PCI-335",
+"	0005  Fastcom IGESCC-PCI-ISO/1",
+"	000a  Fastcom 232/4-PCI-335",
+"18fb  Resilience Corporation",
+"1904  Hangzhou Silan Microelectronics Co., Ltd.",
+"1923  Sangoma Technologies Corp.",
+"	0100  A104d QUAD T1/E1 AFT card",
+"	0400  A104u Quad T1/E1 AFT",
+"1924  Level 5 Networks Inc.",
+"192e  TransDimension",
+"1931  Option N.V.",
+"	000c  Qualcomm MSM6275 UMTS chip",
+"1942  ClearSpeed Technology plc",
+"	e511  CSX600 Advance Accelerator Board",
+"1957  Freescale Semiconductor Inc",
+"	0080  MPC8349E",
+"	0081  MPC8349",
+"	0082  MPC8347E TBGA",
+"	0083  MPC8347 TBGA",
+"	0084  MPC8347E PBGA",
+"	0085  MPC8347 PBGA",
+"	0086  MPC8343E",
+"	0087  MPC8343",
+"1958  Faster Technology, LLC.",
+"1966  Orad Hi-Tec Systems",
+"	1975  DVG64 family",
+"196a  Sensory Networks Inc.",
+"	0101  NodalCore C-1000 Content Classification Accelerator",
+"	0102  NodalCore C-2000 Content Classification Accelerator",
+"197b  JMicron Technologies, Inc.",
+"	2360  JMicron 20360/20363 AHCI Controller",
+"	2361  JMB361 AHCI/IDE",
+"	2363  JMicron 20360/20363 AHCI Controller",
+"	2365  JMB365 AHCI/IDE",
+"	2366  JMB366 AHCI/IDE",
+"1989  Montilio Inc.",
+"	0001  RapidFile Bridge",
+"	8001  RapidFile",
+"1993  Innominate Security Technologies AG",
+"199a  Pulse-LINK, Inc.",
+"19a8  DAQDATA GmbH",
+"19ac  Kasten Chase Applied Research",
+"	0001  ACA2400 Crypto Accelerator",
+"19ae  Progeny Systems Corporation",
+"	0520  4135 HFT Interface Controller",
+"19d4  Quixant Limited",
+"19e2  Vector Informatik GmbH",
+"1a03  ASPEED Technology, Inc.",
+"	2000  AST2000",
+"1a08  Sierra semiconductor",
+"	0000  SC15064",
+"1a1d  GFaI e.V.",
+"1a29  Fortinet, Inc.",
+"1b13  Jaton Corp",
+"1c1c  Symphony",
+"	0001  82C101",
+"1d44  DPT",
+"	a400  PM2x24/PM3224",
+"1de1  Tekram Technology Co.,Ltd.",
+"	0391  TRM-S1040",
+"	2020  DC-390",
+"	690c  690c",
+"	dc29  DC290",
+"1fc0  Tumsan Oy",
+"	0300  E2200 Dual E1/Rawpipe Card",
+"1fc1  PathScale, Inc",
+"	000d  InfiniPath HT-400",
+"	0010  InfiniPath PE-800",
+"1fce  Cognio Inc.",
+"	0001  Spectrum Analyzer PC Card (SAgE)",
+"2000  Smart Link Ltd.",
+"2001  Temporal Research Ltd",
+"2003  Smart Link Ltd.",
+"2004  Smart Link Ltd.",
+"21c3  21st Century Computer Corp.",
+"22b8  Motorola, Inc.",
+"2348  Racore",
+"	2010  8142 100VG/AnyLAN",
+"2646  Kingston Technologies",
+"270b  Xantel Corporation",
+"270f  Chaintech Computer Co. Ltd",
+"2711  AVID Technology Inc.",
+"2a15  3D Vision(\?\?\?)",
+"3000  Hansol Electronics Inc.",
+"3142  Post Impression Systems.",
+"3388  Hint Corp",
+"	0013  HiNT HC4 PCI to ISDN bridge, Multimedia audio controller",
+"	0014  HiNT HC4 PCI to ISDN bridge, Network controller",
+"	0020  HB6 Universal PCI-PCI bridge (transparent mode)",
+"	0021  HB6 Universal PCI-PCI bridge (non-transparent mode)",
+"		4c53 1050  CT7 mainboard",
+"		4c53 1080  CT8 mainboard",
+"		4c53 1090  Cx9 mainboard",
+"		4c53 10a0  CA3/CR3 mainboard",
+"		4c53 3010  PPCI mezzanine (32-bit PMC)",
+"		4c53 3011  PPCI mezzanine (64-bit PMC)",
+"		4c53 4000  PMCCARR1 carrier board",
+"	0022  HiNT HB4 PCI-PCI Bridge (PCI6150)",
+"	0026  HB2 PCI-PCI Bridge",
+"	101a  E.Band [AudioTrak Inca88]",
+"	101b  E.Band [AudioTrak Inca88]",
+"	8011  VXPro II Chipset",
+"		3388 8011  VXPro II Chipset CPU to PCI Bridge",
+"	8012  VXPro II Chipset",
+"		3388 8012  VXPro II Chipset PCI to ISA Bridge",
+"	8013  VXPro II IDE",
+"		3388 8013  VXPro II Chipset EIDE Controller",
+"3411  Quantum Designs (H.K.) Inc",
+"3513  ARCOM Control Systems Ltd",
+"3842  eVga.com. Corp.",
+"	c370  e-GeFORCE 6600 256 DDR PCI-e",
+"38ef  4Links",
+"3d3d  3DLabs",
+"	0001  GLINT 300SX",
+"	0002  GLINT 500TX",
+"		0000 0000  GLoria L",
+"	0003  GLINT Delta",
+"		0000 0000  GLoria XL",
+"	0004  Permedia",
+"	0005  Permedia",
+"	0006  GLINT MX",
+"		0000 0000  GLoria XL",
+"		1048 0a42  GLoria XXL",
+"	0007  3D Extreme",
+"	0008  GLINT Gamma G1",
+"		1048 0a42  GLoria XXL",
+"	0009  Permedia II 2D+3D",
+"		1040 0011  AccelStar II",
+"		1048 0a42  GLoria XXL",
+"		13e9 1000  6221L-4U",
+"		3d3d 0100  AccelStar II 3D Accelerator",
+"		3d3d 0111  Permedia 3:16",
+"		3d3d 0114  Santa Ana",
+"		3d3d 0116  Oxygen GVX1",
+"		3d3d 0119  Scirocco",
+"		3d3d 0120  Santa Ana PCL",
+"		3d3d 0125  Oxygen VX1",
+"		3d3d 0127  Permedia3 Create!",
+"	000a  GLINT R3",
+"		3d3d 0121  Oxygen VX1",
+"	000c  GLINT R3 [Oxygen VX1]",
+"		3d3d 0144  Oxygen VX1-4X AGP [Permedia 4]",
+"	000d  GLint R4 rev A",
+"	0011  GLint R4 rev B",
+"	0012  GLint R5 rev A",
+"	0013  GLint R5 rev B",
+"	0020  VP10 visual processor",
+"	0022  VP10 visual processor",
+"	0024  VP9 visual processor",
+"	0100  Permedia II 2D+3D",
+"	07a1  Wildcat III 6210",
+"	07a2  Sun XVR-500 Graphics Accelerator",
+"	07a3  Wildcat IV 7210",
+"	1004  Permedia",
+"	3d04  Permedia",
+"	ffff  Glint VGA",
+"4005  Avance Logic Inc.",
+"	0300  ALS300 PCI Audio Device",
+"	0308  ALS300+ PCI Audio Device",
+"	0309  PCI Input Controller",
+"	1064  ALG-2064",
+"	2064  ALG-2064i",
+"	2128  ALG-2364A GUI Accelerator",
+"	2301  ALG-2301",
+"	2302  ALG-2302",
+"	2303  AVG-2302 GUI Accelerator",
+"	2364  ALG-2364A",
+"	2464  ALG-2464",
+"	2501  ALG-2564A/25128A",
+"	4000  ALS4000 Audio Chipset",
+"		4005 4000  ALS4000 Audio Chipset",
+"	4710  ALC200/200P",
+"4033  Addtron Technology Co, Inc.",
+"	1360  RTL8139 Ethernet",
+"4143  Digital Equipment Corp",
+"4144  Alpha Data",
+"	0044  ADM-XRCIIPro",
+"416c  Aladdin Knowledge Systems",
+"	0100  AladdinCARD",
+"	0200  CPC",
+"4321  Tata Power Strategic Electronics Division",
+"4444  Internext Compression Inc",
+"	0016  iTVC16 (CX23416) MPEG-2 Encoder",
+"		0070 0003  WinTV PVR 250",
+"		0070 0009  WinTV PVR 150",
+"		0070 0801  WinTV PVR 150",
+"		0070 0807  WinTV PVR 150",
+"		0070 4001  WinTV PVR 250",
+"		0070 4009  WinTV PVR 250",
+"		0070 4801  WinTV PVR 250",
+"		0070 4803  WinTV PVR 250",
+"		0070 8003  WinTV PVR 150",
+"		0070 8801  WinTV PVR 150",
+"		0070 c801  WinTV PVR 150",
+"		0070 e807  WinTV PVR 500 (1st unit)",
+"		0070 e817  WinTV PVR 500 (2nd unit)",
+"		0070 ff92  WiNTV PVR-550",
+"		0270 0801  WinTV PVR 150",
+"		12ab fff3  MPG600",
+"		12ab ffff  MPG600",
+"		9005 0092  VideOh! AVC-2010",
+"		9005 0093  VideOh! AVC-2410",
+"	0803  iTVC15 MPEG-2 Encoder",
+"		0070 4000  WinTV PVR-350",
+"		0070 4001  WinTV PVR-250",
+"		0070 4800  WinTV PVR-350 (V1)",
+"		12ab 0000  MPG160",
+"		1461 a3ce  M179",
+"		1461 a3cf  M179",
+"4468  Bridgeport machines",
+"4594  Cogetec Informatique Inc",
+"45fb  Baldor Electric Company",
+"4680  Umax Computer Corp",
+"4843  Hercules Computer Technology Inc",
+"4916  RedCreek Communications Inc",
+"	1960  RedCreek PCI adapter",
+"4943  Growth Networks",
+"494f  ACCES I/O Products, Inc.",
+"	10e8  LPCI-COM-8SM",
+"4978  Axil Computer Inc",
+"4a14  NetVin",
+"	5000  NV5000SC",
+"		4a14 5000  RT8029-Based Ethernet Adapter",
+"4b10  Buslogic Inc.",
+"4c48  LUNG HWA Electronics",
+"4c53  SBS Technologies",
+"	0000  PLUSTEST device",
+"		4c53 3000  PLUSTEST card (PC104+)",
+"		4c53 3001  PLUSTEST card (PMC)",
+"	0001  PLUSTEST-MM device",
+"		4c53 3002  PLUSTEST-MM card (PMC)",
+"4ca1  Seanix Technology Inc",
+"4d51  MediaQ Inc.",
+"	0200  MQ-200",
+"4d54  Microtechnica Co Ltd",
+"4ddc  ILC Data Device Corp",
+"	0100  DD-42924I5-300 (ARINC 429 Data Bus)",
+"	0801  BU-65570I1 MIL-STD-1553 Test and Simulation",
+"	0802  BU-65570I2 MIL-STD-1553 Test and Simulation",
+"	0811  BU-65572I1 MIL-STD-1553 Test and Simulation",
+"	0812  BU-65572I2 MIL-STD-1553 Test and Simulation",
+"	0881  BU-65570T1 MIL-STD-1553 Test and Simulation",
+"	0882  BU-65570T2 MIL-STD-1553 Test and Simulation",
+"	0891  BU-65572T1 MIL-STD-1553 Test and Simulation",
+"	0892  BU-65572T2 MIL-STD-1553 Test and Simulation",
+"	0901  BU-65565C1 MIL-STD-1553 Data Bus",
+"	0902  BU-65565C2 MIL-STD-1553 Data Bus",
+"	0903  BU-65565C3 MIL-STD-1553 Data Bus",
+"	0904  BU-65565C4 MIL-STD-1553 Data Bus",
+"	0b01  BU-65569I1 MIL-STD-1553 Data Bus",
+"	0b02  BU-65569I2 MIL-STD-1553 Data Bus",
+"	0b03  BU-65569I3 MIL-STD-1553 Data Bus",
+"	0b04  BU-65569I4 MIL-STD-1553 Data Bus",
+"5046  GemTek Technology Corporation",
+"	1001  PCI Radio",
+"5053  Voyetra Technologies",
+"	2010  Daytona Audio Adapter",
+"5136  S S Technologies",
+"5143  Qualcomm Inc",
+"5145  Ensoniq (Old)",
+"	3031  Concert AudioPCI",
+"5168  Animation Technologies Inc.",
+"	0300  FlyDVB-S",
+"	0301  FlyDVB-T",
+"5301  Alliance Semiconductor Corp.",
+"	0001  ProMotion aT3D",
+"5333  S3 Inc.",
+"	0551  Plato/PX (system)",
+"	5631  86c325 [ViRGE]",
+"	8800  86c866 [Vision 866]",
+"	8801  86c964 [Vision 964]",
+"	8810  86c764_0 [Trio 32 vers 0]",
+"	8811  86c764/765 [Trio32/64/64V+]",
+"	8812  86cM65 [Aurora64V+]",
+"	8813  86c764_3 [Trio 32/64 vers 3]",
+"	8814  86c767 [Trio 64UV+]",
+"	8815  86cM65 [Aurora 128]",
+"	883d  86c988 [ViRGE/VX]",
+"	8870  FireGL",
+"	8880  86c868 [Vision 868 VRAM] vers 0",
+"	8881  86c868 [Vision 868 VRAM] vers 1",
+"	8882  86c868 [Vision 868 VRAM] vers 2",
+"	8883  86c868 [Vision 868 VRAM] vers 3",
+"	88b0  86c928 [Vision 928 VRAM] vers 0",
+"	88b1  86c928 [Vision 928 VRAM] vers 1",
+"	88b2  86c928 [Vision 928 VRAM] vers 2",
+"	88b3  86c928 [Vision 928 VRAM] vers 3",
+"	88c0  86c864 [Vision 864 DRAM] vers 0",
+"	88c1  86c864 [Vision 864 DRAM] vers 1",
+"	88c2  86c864 [Vision 864-P DRAM] vers 2",
+"	88c3  86c864 [Vision 864-P DRAM] vers 3",
+"	88d0  86c964 [Vision 964 VRAM] vers 0",
+"	88d1  86c964 [Vision 964 VRAM] vers 1",
+"	88d2  86c964 [Vision 964-P VRAM] vers 2",
+"	88d3  86c964 [Vision 964-P VRAM] vers 3",
+"	88f0  86c968 [Vision 968 VRAM] rev 0",
+"	88f1  86c968 [Vision 968 VRAM] rev 1",
+"	88f2  86c968 [Vision 968 VRAM] rev 2",
+"	88f3  86c968 [Vision 968 VRAM] rev 3",
+"	8900  86c755 [Trio 64V2/DX]",
+"		5333 8900  86C775 Trio64V2/DX",
+"	8901  86c775/86c785 [Trio 64V2/DX or /GX]",
+"		5333 8901  86C775 Trio64V2/DX, 86C785 Trio64V2/GX",
+"	8902  Plato/PX",
+"	8903  Trio 3D business multimedia",
+"	8904  Trio 64 3D",
+"		1014 00db  Integrated Trio3D",
+"		5333 8904  86C365 Trio3D AGP",
+"	8905  Trio 64V+ family",
+"	8906  Trio 64V+ family",
+"	8907  Trio 64V+ family",
+"	8908  Trio 64V+ family",
+"	8909  Trio 64V+ family",
+"	890a  Trio 64V+ family",
+"	890b  Trio 64V+ family",
+"	890c  Trio 64V+ family",
+"	890d  Trio 64V+ family",
+"	890e  Trio 64V+ family",
+"	890f  Trio 64V+ family",
+"	8a01  ViRGE/DX or /GX",
+"		0e11 b032  ViRGE/GX",
+"		10b4 1617  Nitro 3D",
+"		10b4 1717  Nitro 3D",
+"		5333 8a01  ViRGE/DX",
+"	8a10  ViRGE/GX2",
+"		1092 8a10  Stealth 3D 4000",
+"	8a13  86c368 [Trio 3D/2X]",
+"		5333 8a13  Trio3D/2X",
+"	8a20  86c794 [Savage 3D]",
+"		5333 8a20  86C391 Savage3D",
+"	8a21  86c390 [Savage 3D/MV]",
+"		5333 8a21  86C390 Savage3D/MV",
+"	8a22  Savage 4",
+"		1033 8068  Savage 4",
+"		1033 8069  Savage 4",
+"		1033 8110  Savage 4 LT",
+"		105d 0018  SR9 8Mb SDRAM",
+"		105d 002a  SR9 Pro 16Mb SDRAM",
+"		105d 003a  SR9 Pro 32Mb SDRAM",
+"		105d 092f  SR9 Pro+ 16Mb SGRAM",
+"		1092 4207  Stealth III S540",
+"		1092 4800  Stealth III S540",
+"		1092 4807  SpeedStar A90",
+"		1092 4808  Stealth III S540",
+"		1092 4809  Stealth III S540",
+"		1092 480e  Stealth III S540",
+"		1092 4904  Stealth III S520",
+"		1092 4905  SpeedStar A200",
+"		1092 4a09  Stealth III S540",
+"		1092 4a0b  Stealth III S540 Xtreme",
+"		1092 4a0f  Stealth III S540",
+"		1092 4e01  Stealth III S540",
+"		1102 101d  3d Blaster Savage 4",
+"		1102 101e  3d Blaster Savage 4",
+"		5333 8100  86C394-397 Savage4 SDRAM 100",
+"		5333 8110  86C394-397 Savage4 SDRAM 110",
+"		5333 8125  86C394-397 Savage4 SDRAM 125",
+"		5333 8143  86C394-397 Savage4 SDRAM 143",
+"		5333 8a22  86C394-397 Savage4",
+"		5333 8a2e  86C394-397 Savage4 32bit",
+"		5333 9125  86C394-397 Savage4 SGRAM 125",
+"		5333 9143  86C394-397 Savage4 SGRAM 143",
+"	8a23  Savage 4",
+"	8a25  ProSavage PM133",
+"	8a26  ProSavage KM133",
+"	8c00  ViRGE/M3",
+"	8c01  ViRGE/MX",
+"		1179 0001  ViRGE/MX",
+"	8c02  ViRGE/MX+",
+"	8c03  ViRGE/MX+MV",
+"	8c10  86C270-294 Savage/MX-MV",
+"	8c11  82C270-294 Savage/MX",
+"	8c12  86C270-294 Savage/IX-MV",
+"		1014 017f  Thinkpad T20/T22",
+"		1179 0001  86C584 SuperSavage/IXC Toshiba",
+"	8c13  86C270-294 Savage/IX",
+"		1179 0001  Magnia Z310",
+"	8c22  SuperSavage MX/128",
+"	8c24  SuperSavage MX/64",
+"	8c26  SuperSavage MX/64C",
+"	8c2a  SuperSavage IX/128 SDR",
+"	8c2b  SuperSavage IX/128 DDR",
+"	8c2c  SuperSavage IX/64 SDR",
+"	8c2d  SuperSavage IX/64 DDR",
+"	8c2e  SuperSavage IX/C SDR",
+"		1014 01fc  ThinkPad T23 (2647-4MG)",
+"	8c2f  SuperSavage IX/C DDR",
+"	8d01  86C380 [ProSavageDDR K4M266]",
+"	8d02  VT8636A [ProSavage KN133] AGP4X VGA Controller (TwisterK)",
+"	8d03  VT8751 [ProSavageDDR P4M266]",
+"	8d04  VT8375 [ProSavage8 KM266/KL266]",
+"	9102  86C410 Savage 2000",
+"		1092 5932  Viper II Z200",
+"		1092 5934  Viper II Z200",
+"		1092 5952  Viper II Z200",
+"		1092 5954  Viper II Z200",
+"		1092 5a35  Viper II Z200",
+"		1092 5a37  Viper II Z200",
+"		1092 5a55  Viper II Z200",
+"		1092 5a57  Viper II Z200",
+"	ca00  SonicVibes",
+"544c  Teralogic Inc",
+"	0350  TL880-based HDTV/ATSC tuner",
+"5455  Technische University Berlin",
+"	4458  S5933",
+"5519  Cnet Technologies, Inc.",
+"5544  Dunord Technologies",
+"	0001  I-30xx Scanner Interface",
+"5555  Genroco, Inc",
+"	0003  TURBOstor HFP-832 [HiPPI NIC]",
+"5654  VoiceTronix Pty Ltd",
+"	3132  OpenSwitch12",
+"5700  Netpower",
+"5851  Exacq Technologies",
+"6356  UltraStor",
+"6374  c't Magazin fuer Computertechnik",
+"	6773  GPPCI",
+"6409  Logitec Corp.",
+"6666  Decision Computer International Co.",
+"	0001  PCCOM4",
+"	0002  PCCOM8",
+"	0004  PCCOM2",
+"	0101  PCI 8255/8254 I/O Card",
+"7063  pcHDTV",
+"	2000  HD-2000",
+"	3000  HD-3000",
+"7604  O.N. Electronic Co Ltd.",
+"7bde  MIDAC Corporation",
+"7fed  PowerTV",
+"8008  Quancom Electronic GmbH",
+"	0010  WDOG1 [PCI-Watchdog 1]",
+"	0011  PWDOG2 [PCI-Watchdog 2]",
+"807d  Asustek Computer, Inc.",
+"8086  Intel Corporation",
+"	0007  82379AB",
+"	0008  Extended Express System Support Controller",
+"	0039  21145 Fast Ethernet",
+"	0122  82437FX",
+"	0309  80303 I/O Processor PCI-to-PCI Bridge",
+"	030d  80312 I/O Companion Chip PCI-to-PCI Bridge",
+"	0326  6700/6702PXH I/OxAPIC Interrupt Controller A",
+"	0327  6700PXH I/OxAPIC Interrupt Controller B",
+"	0329  6700PXH PCI Express-to-PCI Bridge A",
+"	032a  6700PXH PCI Express-to-PCI Bridge B",
+"	032c  6702PXH PCI Express-to-PCI Bridge A",
+"	0330  80332 [Dobson] I/O processor (A-Segment Bridge)",
+"	0331  80332 [Dobson] I/O processor (A-Segment IOAPIC)",
+"	0332  80332 [Dobson] I/O processor (B-Segment Bridge)",
+"	0333  80332 [Dobson] I/O processor (B-Segment IOAPIC)",
+"	0334  80332 [Dobson] I/O processor (ATU)",
+"	0335  80331 [Lindsay] I/O processor (PCI-X Bridge)",
+"	0336  80331 [Lindsay] I/O processor (ATU)",
+"	0340  41210 [Lanai] Serial to Parallel PCI Bridge (A-Segment Bridge)",
+"	0341  41210 [Lanai] Serial to Parallel PCI Bridge (B-Segment Bridge)",
+"	0370  80333 Segment-A PCI Express-to-PCI Express Bridge",
+"	0371  80333 A-Bus IOAPIC",
+"	0372  80333 Segment-B PCI Express-to-PCI Express Bridge",
+"	0373  80333 B-Bus IOAPIC",
+"	0374  80333 Address Translation Unit",
+"	0482  82375EB/SB PCI to EISA Bridge",
+"	0483  82424TX/ZX [Saturn] CPU to PCI bridge",
+"	0484  82378ZB/IB, 82379AB (SIO, SIO.A) PCI to ISA Bridge",
+"	0486  82425EX/ZX [Aries] PCIset with ISA bridge",
+"	04a3  82434LX/NX [Mercury/Neptune] Processor to PCI bridge",
+"	04d0  82437FX [Triton FX]",
+"	0500  E8870 Processor bus control",
+"	0501  E8870 Memory controller",
+"	0502  E8870 Scalability Port 0",
+"	0503  E8870 Scalability Port 1",
+"	0510  E8870IO Hub Interface Port 0 registers (8-bit compatibility port)",
+"	0511  E8870IO Hub Interface Port 1 registers",
+"	0512  E8870IO Hub Interface Port 2 registers",
+"	0513  E8870IO Hub Interface Port 3 registers",
+"	0514  E8870IO Hub Interface Port 4 registers",
+"	0515  E8870IO General SIOH registers",
+"	0516  E8870IO RAS registers",
+"	0530  E8870SP Scalability Port 0 registers",
+"	0531  E8870SP Scalability Port 1 registers",
+"	0532  E8870SP Scalability Port 2 registers",
+"	0533  E8870SP Scalability Port 3 registers",
+"	0534  E8870SP Scalability Port 4 registers",
+"	0535  E8870SP Scalability Port 5 registers",
+"	0536  E8870SP Interleave registers 0 and 1",
+"	0537  E8870SP Interleave registers 2 and 3",
+"	0600  RAID Controller",
+"		8086 01af  SRCZCR",
+"		8086 01c1  ICP Vortex GDT8546RZ",
+"		8086 01f7  SCRU32",
+"	061f  80303 I/O Processor",
+"	0960  80960RP [i960 RP Microprocessor/Bridge]",
+"	0962  80960RM [i960RM Bridge]",
+"	0964  80960RP [i960 RP Microprocessor/Bridge]",
+"	1000  82542 Gigabit Ethernet Controller",
+"		0e11 b0df  NC1632 Gigabit Ethernet Adapter (1000-SX)",
+"		0e11 b0e0  NC1633 Gigabit Ethernet Adapter (1000-LX)",
+"		0e11 b123  NC1634 Gigabit Ethernet Adapter (1000-SX)",
+"		1014 0119  Netfinity Gigabit Ethernet SX Adapter",
+"		8086 1000  PRO/1000 Gigabit Server Adapter",
+"	1001  82543GC Gigabit Ethernet Controller (Fiber)",
+"		0e11 004a  NC6136 Gigabit Server Adapter",
+"		1014 01ea  Netfinity Gigabit Ethernet SX Adapter",
+"		8086 1002  PRO/1000 F Server Adapter",
+"		8086 1003  PRO/1000 F Server Adapter",
+"	1002  Pro 100 LAN+Modem 56 Cardbus II",
+"		8086 200e  Pro 100 LAN+Modem 56 Cardbus II",
+"		8086 2013  Pro 100 SR Mobile Combo Adapter",
+"		8086 2017  Pro 100 S Combo Mobile Adapter",
+"	1004  82543GC Gigabit Ethernet Controller (Copper)",
+"		0e11 0049  NC7132 Gigabit Upgrade Module",
+"		0e11 b1a4  NC7131 Gigabit Server Adapter",
+"		1014 10f2  Gigabit Ethernet Server Adapter",
+"		8086 1004  PRO/1000 T Server Adapter",
+"		8086 2004  PRO/1000 T Server Adapter",
+"	1008  82544EI Gigabit Ethernet Controller (Copper)",
+"		1014 0269  iSeries 1000/100/10 Ethernet Adapter",
+"		1028 011c  PRO/1000 XT Network Connection",
+"		8086 1107  PRO/1000 XT Server Adapter",
+"		8086 2107  PRO/1000 XT Server Adapter",
+"		8086 2110  PRO/1000 XT Server Adapter",
+"		8086 3108  PRO/1000 XT Network Connection",
+"	1009  82544EI Gigabit Ethernet Controller (Fiber)",
+"		1014 0268  iSeries Gigabit Ethernet Adapter",
+"		8086 1109  PRO/1000 XF Server Adapter",
+"		8086 2109  PRO/1000 XF Server Adapter",
+"	100a  82540EM Gigabit Ethernet Controller",
+"	100c  82544GC Gigabit Ethernet Controller (Copper)",
+"		8086 1112  PRO/1000 T Desktop Adapter",
+"		8086 2112  PRO/1000 T Desktop Adapter",
+"	100d  82544GC Gigabit Ethernet Controller (LOM)",
+"		1028 0123  PRO/1000 XT Network Connection",
+"		1079 891f  82544GC Based Network Connection",
+"		4c53 1080  CT8 mainboard",
+"		8086 110d  82544GC Based Network Connection",
+"	100e  82540EM Gigabit Ethernet Controller",
+"		1014 0265  PRO/1000 MT Network Connection",
+"		1014 0267  PRO/1000 MT Network Connection",
+"		1014 026a  PRO/1000 MT Network Connection",
+"		1024 0134  Poweredge SC600",
+"		1028 002e  Optiplex GX260",
+"		1028 0151  PRO/1000 MT Network Connection",
+"		107b 8920  PRO/1000 MT Desktop Adapter",
+"		8086 001e  PRO/1000 MT Desktop Adapter",
+"		8086 002e  PRO/1000 MT Desktop Adapter",
+"		8086 1376  PRO/1000 GT Desktop Adapter",
+"		8086 1476  PRO/1000 GT Desktop Adapter",
+"	100f  82545EM Gigabit Ethernet Controller (Copper)",
+"		1014 0269  iSeries 1000/100/10 Ethernet Adapter",
+"		1014 028e  PRO/1000 MT Network Connection",
+"		8086 1000  PRO/1000 MT Network Connection",
+"		8086 1001  PRO/1000 MT Server Adapter",
+"	1010  82546EB Gigabit Ethernet Controller (Copper)",
+"		0e11 00db  NC7170 Gigabit Server Adapter",
+"		1014 027c  PRO/1000 MT Dual Port Network Adapter",
+"		18fb 7872  RESlink-X",
+"		1fc1 0026  Niagara 2260 Bypass Card",
+"		4c53 1080  CT8 mainboard",
+"		4c53 10a0  CA3/CR3 mainboard",
+"		8086 1011  PRO/1000 MT Dual Port Server Adapter",
+"		8086 1012  Primergy RX300",
+"		8086 101a  PRO/1000 MT Dual Port Network Adapter",
+"		8086 3424  SE7501HG2 Mainboard",
+"	1011  82545EM Gigabit Ethernet Controller (Fiber)",
+"		1014 0268  iSeries Gigabit Ethernet Adapter",
+"		8086 1002  PRO/1000 MF Server Adapter",
+"		8086 1003  PRO/1000 MF Server Adapter (LX)",
+"	1012  82546EB Gigabit Ethernet Controller (Fiber)",
+"		0e11 00dc  NC6170 Gigabit Server Adapter",
+"		8086 1012  PRO/1000 MF Dual Port Server Adapter",
+"	1013  82541EI Gigabit Ethernet Controller (Copper)",
+"		8086 0013  PRO/1000 MT Network Connection",
+"		8086 1013  IBM ThinkCentre Network Card",
+"		8086 1113  PRO/1000 MT Desktop Adapter",
+"	1014  82541ER Gigabit Ethernet Controller",
+"	1015  82540EM Gigabit Ethernet Controller (LOM)",
+"	1016  82540EP Gigabit Ethernet Controller (LOM)",
+"		1014 052c  PRO/1000 MT Mobile Connection",
+"		1179 0001  PRO/1000 MT Mobile Connection",
+"		8086 1016  PRO/1000 MT Mobile Connection",
+"	1017  82540EP Gigabit Ethernet Controller (LOM)",
+"		8086 1017  PR0/1000 MT Desktop Connection",
+"	1018  82541EI Gigabit Ethernet Controller",
+"		8086 1018  PRO/1000 MT Desktop Adapter",
+"	1019  82547EI Gigabit Ethernet Controller (LOM)",
+"		1458 1019  GA-8IPE1000 Pro2 motherboard (865PE)",
+"		1458 e000  Intel Gigabit Ethernet (Kenai II)",
+"		8086 1019  PRO/1000 CT Desktop Connection",
+"		8086 301f  D865PERL mainboard",
+"		8086 302c  Intel 82865G Mainboard (D865GBF)",
+"		8086 3427  S875WP1-E mainboard",
+"	101a  82547EI Gigabit Ethernet Controller (Mobile)",
+"	101d  82546EB Gigabit Ethernet Controller",
+"		8086 1000  PRO/1000 MT Quad Port Server Adapter",
+"	101e  82540EP Gigabit Ethernet Controller (Mobile)",
+"		1014 0549  PRO/1000 MT Mobile Connection",
+"		1179 0001  PRO/1000 MT Mobile Connection",
+"		8086 101e  PRO/1000 MT Mobile Connection",
+"	1026  82545GM Gigabit Ethernet Controller",
+"		1028 0169  Precision 470",
+"		8086 1000  PRO/1000 MT Server Connection",
+"		8086 1001  PRO/1000 MT Server Adapter",
+"		8086 1002  PRO/1000 MT Server Adapter",
+"		8086 1026  PRO/1000 MT Server Connection",
+"	1027  82545GM Gigabit Ethernet Controller",
+"		103c 3103  NC310F PCI-X Gigabit Server Adapter",
+"		8086 1001  PRO/1000 MF Server Adapter(LX)",
+"		8086 1002  PRO/1000 MF Server Adapter(LX)",
+"		8086 1003  PRO/1000 MF Server Adapter(LX)",
+"		8086 1027  PRO/1000 MF Server Adapter",
+"	1028  82545GM Gigabit Ethernet Controller",
+"		8086 1028  PRO/1000 MB Server Adapter",
+"	1029  82559 Ethernet Controller",
+"	1030  82559 InBusiness 10/100",
+"	1031  82801CAM (ICH3) PRO/100 VE (LOM) Ethernet Controller",
+"		1014 0209  ThinkPad A/T/X Series",
+"		104d 80e7  Vaio PCG-GR214EP/GR214MP/GR215MP/GR314MP/GR315MP",
+"		104d 813c  Vaio PCG-GRV616G",
+"		107b 5350  EtherExpress PRO/100 VE",
+"		1179 0001  EtherExpress PRO/100 VE",
+"		144d c000  EtherExpress PRO/100 VE",
+"		144d c001  EtherExpress PRO/100 VE",
+"		144d c003  EtherExpress PRO/100 VE",
+"		144d c006  vpr Matrix 170B4",
+"	1032  82801CAM (ICH3) PRO/100 VE Ethernet Controller",
+"	1033  82801CAM (ICH3) PRO/100 VM (LOM) Ethernet Controller",
+"	1034  82801CAM (ICH3) PRO/100 VM Ethernet Controller",
+"	1035  82801CAM (ICH3)/82562EH (LOM)  Ethernet Controller",
+"	1036  82801CAM (ICH3) 82562EH Ethernet Controller",
+"	1037  82801CAM (ICH3) Chipset Ethernet Controller",
+"	1038  82801CAM (ICH3) PRO/100 VM (KM) Ethernet Controller",
+"		0e11 0098  Evo N600c",
+"	1039  82801DB PRO/100 VE (LOM) Ethernet Controller",
+"		1014 0267  NetVista A30p",
+"	103a  82801DB PRO/100 VE (CNR) Ethernet Controller",
+"	103b  82801DB PRO/100 VM (LOM) Ethernet Controller",
+"	103c  82801DB PRO/100 VM (CNR) Ethernet Controller",
+"	103d  82801DB PRO/100 VE (MOB) Ethernet Controller",
+"	103e  82801DB PRO/100 VM (MOB) Ethernet Controller",
+"	1040  536EP Data Fax Modem",
+"		16be 1040  V.9X DSP Data Fax Modem",
+"	1043  PRO/Wireless LAN 2100 3B Mini PCI Adapter",
+"		8086 2527  MIM2000/Centrino",
+"	1048  PRO/10GbE LR Server Adapter",
+"		8086 a01f  PRO/10GbE LR Server Adapter",
+"		8086 a11f  PRO/10GbE LR Server Adapter",
+"	104b  Ethernet Controller",
+"	1050  82562EZ 10/100 Ethernet Controller",
+"		1462 728c  865PE Neo2 (MS-6728)",
+"		1462 758c  MS-6758 (875P Neo)",
+"		8086 3020  D865PERL mainboard",
+"		8086 302f  Desktop Board D865GBF",
+"		8086 3427  S875WP1-E mainboard",
+"	1051  82801EB/ER (ICH5/ICH5R) integrated LAN Controller",
+"	1052  PRO/100 VM Network Connection",
+"	1053  PRO/100 VM Network Connection",
+"	1059  82551QM Ethernet Controller",
+"	105e  82571EB Gigabit Ethernet Controller",
+"		1775 6003  Telum GE-QT",
+"	105f  82571EB Gigabit Ethernet Controller",
+"	1060  82571EB Gigabit Ethernet Controller",
+"	1064  82562ET/EZ/GT/GZ - PRO/100 VE (LOM) Ethernet Controller",
+"		1043 80f8  P5GD1-VW Mainboard",
+"	1065  82562ET/EZ/GT/GZ - PRO/100 VE Ethernet Controller",
+"	1066  82562 EM/EX/GX - PRO/100 VM (LOM) Ethernet Controller",
+"	1067  82562 EM/EX/GX - PRO/100 VM Ethernet Controller",
+"	1068  82562ET/EZ/GT/GZ - PRO/100 VE (LOM) Ethernet Controller Mobile",
+"	1069  82562EM/EX/GX - PRO/100 VM (LOM) Ethernet Controller Mobile",
+"	106a  82562G - PRO/100 VE (LOM) Ethernet Controller",
+"	106b  82562G - PRO/100 VE Ethernet Controller Mobile",
+"	1075  82547GI Gigabit Ethernet Controller",
+"		1028 0165  PowerEdge 750",
+"		8086 0075  PRO/1000 CT Network Connection",
+"		8086 1075  PRO/1000 CT Network Connection",
+"	1076  82541GI/PI Gigabit Ethernet Controller",
+"		1028 0165  PowerEdge 750",
+"		1028 019a  PowerEdge SC1425",
+"		8086 0076  PRO/1000 MT Network Connection",
+"		8086 1076  PRO/1000 MT Network Connection",
+"		8086 1176  PRO/1000 MT Desktop Adapter",
+"		8086 1276  PRO/1000 MT Desktop Adapter",
+"	1077  82541GI Gigabit Ethernet Controller",
+"		1179 0001  PRO/1000 MT Mobile Connection",
+"		8086 0077  PRO/1000 MT Mobile Connection",
+"		8086 1077  PRO/1000 MT Mobile Connection",
+"	1078  82541EI Gigabit Ethernet Controller",
+"		8086 1078  PRO/1000 MT Network Connection",
+"	1079  82546GB Gigabit Ethernet Controller",
+"		103c 12a6  HP Dual Port 1000Base-T [A9900A]",
+"		103c 12cf  HP Core Dual Port 1000Base-T [AB352A]",
+"		1fc1 0027  Niagara 2261 Failover NIC",
+"		4c53 1090  Cx9 / Vx9 mainboard",
+"		4c53 10b0  CL9 mainboard",
+"		8086 0079  PRO/1000 MT Dual Port Network Connection",
+"		8086 1079  PRO/1000 MT Dual Port Network Connection",
+"		8086 1179  PRO/1000 MT Dual Port Network Connection",
+"		8086 117a  PRO/1000 MT Dual Port Server Adapter",
+"	107a  82546GB Gigabit Ethernet Controller",
+"		103c 12a8  HP Dual Port 1000base-SX [A9899A]",
+"		8086 107a  PRO/1000 MF Dual Port Server Adapter",
+"		8086 127a  PRO/1000 MF Dual Port Server Adapter",
+"	107b  82546GB Gigabit Ethernet Controller",
+"		8086 007b  PRO/1000 MB Dual Port Server Connection",
+"		8086 107b  PRO/1000 MB Dual Port Server Connection",
+"	107c  82541PI Gigabit Ethernet Controller",
+"	107d  82572EI Gigabit Ethernet Controller",
+"	107e  82572EI Gigabit Ethernet Controller",
+"	107f  82572EI Gigabit Ethernet Controller",
+"	1080  FA82537EP 56K V.92 Data/Fax Modem PCI",
+"	1081  Enterprise Southbridge LAN Copper",
+"	1082  Enterprise Southbridge LAN fiber",
+"	1083  Enterprise Southbridge LAN SERDES",
+"	1084  Enterprise Southbridge IDE Redirection",
+"	1085  Enterprise Southbridge Serial Port Redirection",
+"	1086  Enterprise Southbridge IPMI/KCS0",
+"	1087  Enterprise Southbridge UHCI Redirection",
+"	1089  Enterprise Southbridge BT",
+"	108a  82546EB Gigabit Ethernet Controller",
+"	108b  82573V Gigabit Ethernet Controller (Copper)",
+"	108c  82573E Gigabit Ethernet Controller (Copper)",
+"	108e  82573E KCS (Active Management)",
+"	108f  Intel(R) Active Management Technology - SOL",
+"	1092  Intel(R) PRO/100 VE Network Connection",
+"	1096  PRO/1000 EB Network Connection with I/O Acceleration",
+"	1097  Enterprise Southbridge DPT LAN fiber",
+"	1098  PRO/1000 EB Backplane Connection with I/O Acceleration",
+"	1099  82546GB Quad Port Server Adapter",
+"	109a  82573L Gigabit Ethernet Controller",
+"		17aa 207e  Thinkpad X60s",
+"	109b  82546GB PRO/1000 GF Quad Port Server Adapter",
+"	10a0  82571EB PRO/1000 AT Quad Port Bypass Adapter",
+"	10a1  82571EB PRO/1000 AF Quad Port Bypass Adapter",
+"	10b0  82573L PRO/1000 PL Network Connection",
+"	10b2  82573V PRO/1000 PM Network Connection",
+"	10b3  82573E PRO/1000 PM Network Connection",
+"	10b4  82573L PRO/1000 PL Network Connection",
+"	10b5  82546GB PRO/1000 GT Quad Port Server Adapter",
+"		103c 3109  NC340T PCI-X Quad-port Gigabit Server Adapter",
+"	1107  PRO/1000 MF Server Adapter (LX)",
+"	1130  82815 815 Chipset Host Bridge and Memory Controller Hub",
+"		1025 1016  Travelmate 612 TX",
+"		1043 8027  TUSL2-C Mainboard",
+"		104d 80df  Vaio PCG-FX403",
+"		8086 4532  D815EEA2 mainboard",
+"		8086 4557  D815EGEW Mainboard",
+"	1131  82815 815 Chipset AGP Bridge",
+"	1132  82815 CGC [Chipset Graphics Controller]",
+"		1025 1016  Travelmate 612 TX",
+"		104d 80df  Vaio PCG-FX403",
+"		8086 4532  D815EEA2 Mainboard",
+"		8086 4541  D815EEA Motherboard",
+"		8086 4557  D815EGEW Mainboard",
+"	1161  82806AA PCI64 Hub Advanced Programmable Interrupt Controller",
+"		8086 1161  82806AA PCI64 Hub APIC",
+"	1162  Xscale 80200 Big Endian Companion Chip",
+"	1200  Intel IXP1200 Network Processor",
+"		172a 0000  AEP SSL Accelerator",
+"	1209  8255xER/82551IT Fast Ethernet Controller",
+"		4c53 1050  CT7 mainboard",
+"		4c53 1051  CE7 mainboard",
+"		4c53 1070  PC6 mainboard",
+"	1221  82092AA PCI to PCMCIA Bridge",
+"	1222  82092AA IDE Controller",
+"	1223  SAA7116",
+"	1225  82452KX/GX [Orion]",
+"	1226  82596 PRO/10 PCI",
+"	1227  82865 EtherExpress PRO/100A",
+"	1228  82556 EtherExpress PRO/100 Smart",
+"	1229  82557/8/9 [Ethernet Pro 100]",
+"		0e11 3001  82559 Fast Ethernet LOM with Alert on LAN*",
+"		0e11 3002  82559 Fast Ethernet LOM with Alert on LAN*",
+"		0e11 3003  82559 Fast Ethernet LOM with Alert on LAN*",
+"		0e11 3004  82559 Fast Ethernet LOM with Alert on LAN*",
+"		0e11 3005  82559 Fast Ethernet LOM with Alert on LAN*",
+"		0e11 3006  82559 Fast Ethernet LOM with Alert on LAN*",
+"		0e11 3007  82559 Fast Ethernet LOM with Alert on LAN*",
+"		0e11 b01e  NC3120 Fast Ethernet NIC",
+"		0e11 b01f  NC3122 Fast Ethernet NIC (dual port)",
+"		0e11 b02f  NC1120 Ethernet NIC",
+"		0e11 b04a  Netelligent 10/100TX NIC with Wake on LAN",
+"		0e11 b0c6  NC3161 Fast Ethernet NIC (embedded, WOL)",
+"		0e11 b0c7  NC3160 Fast Ethernet NIC (embedded)",
+"		0e11 b0d7  NC3121 Fast Ethernet NIC (WOL)",
+"		0e11 b0dd  NC3131 Fast Ethernet NIC (dual port)",
+"		0e11 b0de  NC3132 Fast Ethernet Module (dual port)",
+"		0e11 b0e1  NC3133 Fast Ethernet Module (100-FX)",
+"		0e11 b134  NC3163 Fast Ethernet NIC (embedded, WOL)",
+"		0e11 b13c  NC3162 Fast Ethernet NIC (embedded)",
+"		0e11 b144  NC3123 Fast Ethernet NIC (WOL)",
+"		0e11 b163  NC3134 Fast Ethernet NIC (dual port)",
+"		0e11 b164  NC3135 Fast Ethernet Upgrade Module (dual port)",
+"		0e11 b1a4  NC7131 Gigabit Server Adapter",
+"		1014 005c  82558B Ethernet Pro 10/100",
+"		1014 01bc  82559 Fast Ethernet LAN On Motherboard",
+"		1014 01f1  10/100 Ethernet Server Adapter",
+"		1014 01f2  10/100 Ethernet Server Adapter",
+"		1014 0207  Ethernet Pro/100 S",
+"		1014 0232  10/100 Dual Port Server Adapter",
+"		1014 023a  ThinkPad R30",
+"		1014 105c  Netfinity 10/100",
+"		1014 2205  ThinkPad A22p",
+"		1014 305c  10/100 EtherJet Management Adapter",
+"		1014 405c  10/100 EtherJet Adapter with Alert on LAN",
+"		1014 505c  10/100 EtherJet Secure Management Adapter",
+"		1014 605c  10/100 EtherJet Secure Management Adapter",
+"		1014 705c  10/100 Netfinity 10/100 Ethernet Security Adapter",
+"		1014 805c  10/100 Netfinity 10/100 Ethernet Security Adapter",
+"		1028 009b  PowerEdge 2500/2550",
+"		1028 00ce  PowerEdge 1400",
+"		1033 8000  PC-9821X-B06",
+"		1033 8016  PK-UG-X006",
+"		1033 801f  PK-UG-X006",
+"		1033 8026  PK-UG-X006",
+"		1033 8063  82559-based Fast Ethernet Adapter",
+"		1033 8064  82559-based Fast Ethernet Adapter",
+"		103c 10c0  NetServer 10/100TX",
+"		103c 10c3  NetServer 10/100TX",
+"		103c 10ca  NetServer 10/100TX",
+"		103c 10cb  NetServer 10/100TX",
+"		103c 10e3  NetServer 10/100TX",
+"		103c 10e4  NetServer 10/100TX",
+"		103c 1200  NetServer 10/100TX",
+"		108e 10cf  EtherExpress PRO/100(B)",
+"		10c3 1100  SmartEther100 SC1100",
+"		10cf 1115  8255x-based Ethernet Adapter (10/100)",
+"		10cf 1143  8255x-based Ethernet Adapter (10/100)",
+"		110a 008b  82551QM Fast Ethernet Multifuction PCI/CardBus Controller",
+"		1179 0001  8255x-based Ethernet Adapter (10/100)",
+"		1179 0002  PCI FastEther LAN on Docker",
+"		1179 0003  8255x-based Fast Ethernet",
+"		1259 2560  AT-2560 100",
+"		1259 2561  AT-2560 100 FX Ethernet Adapter",
+"		1266 0001  NE10/100 Adapter",
+"		13e9 1000  6221L-4U",
+"		144d 2501  SEM-2000 MiniPCI LAN Adapter",
+"		144d 2502  SEM-2100IL MiniPCI LAN Adapter",
+"		1668 1100  EtherExpress PRO/100B (TX) (MiniPCI Ethernet+Modem)",
+"		4c53 1080  CT8 mainboard",
+"		4c53 10e0  PSL09 PrPMC",
+"		8086 0001  EtherExpress PRO/100B (TX)",
+"		8086 0002  EtherExpress PRO/100B (T4)",
+"		8086 0003  EtherExpress PRO/10+",
+"		8086 0004  EtherExpress PRO/100 WfM",
+"		8086 0005  82557 10/100",
+"		8086 0006  82557 10/100 with Wake on LAN",
+"		8086 0007  82558 10/100 Adapter",
+"		8086 0008  82558 10/100 with Wake on LAN",
+"		8086 000a  EtherExpress PRO/100+ Management Adapter",
+"		8086 000b  EtherExpress PRO/100+",
+"		8086 000c  EtherExpress PRO/100+ Management Adapter",
+"		8086 000d  EtherExpress PRO/100+ Alert On LAN II* Adapter",
+"		8086 000e  EtherExpress PRO/100+ Management Adapter with Alert On LAN*",
+"		8086 000f  EtherExpress PRO/100 Desktop Adapter",
+"		8086 0010  EtherExpress PRO/100 S Management Adapter",
+"		8086 0011  EtherExpress PRO/100 S Management Adapter",
+"		8086 0012  EtherExpress PRO/100 S Advanced Management Adapter (D)",
+"		8086 0013  EtherExpress PRO/100 S Advanced Management Adapter (E)",
+"		8086 0030  EtherExpress PRO/100  Management Adapter with Alert On LAN* GC",
+"		8086 0031  EtherExpress PRO/100 Desktop Adapter",
+"		8086 0040  EtherExpress PRO/100 S Desktop Adapter",
+"		8086 0041  EtherExpress PRO/100 S Desktop Adapter",
+"		8086 0042  EtherExpress PRO/100 Desktop Adapter",
+"		8086 0050  EtherExpress PRO/100 S Desktop Adapter",
+"		8086 1009  EtherExpress PRO/100+ Server Adapter",
+"		8086 100c  EtherExpress PRO/100+ Server Adapter (PILA8470B)",
+"		8086 1012  EtherExpress PRO/100 S Server Adapter (D)",
+"		8086 1013  EtherExpress PRO/100 S Server Adapter (E)",
+"		8086 1015  EtherExpress PRO/100 S Dual Port Server Adapter",
+"		8086 1017  EtherExpress PRO/100+ Dual Port Server Adapter",
+"		8086 1030  EtherExpress PRO/100+ Management Adapter with Alert On LAN* G Server",
+"		8086 1040  EtherExpress PRO/100 S Server Adapter",
+"		8086 1041  EtherExpress PRO/100 S Server Adapter",
+"		8086 1042  EtherExpress PRO/100 Server Adapter",
+"		8086 1050  EtherExpress PRO/100 S Server Adapter",
+"		8086 1051  EtherExpress PRO/100 Server Adapter",
+"		8086 1052  EtherExpress PRO/100 Server Adapter",
+"		8086 10f0  EtherExpress PRO/100+ Dual Port Adapter",
+"		8086 2009  EtherExpress PRO/100 S Mobile Adapter",
+"		8086 200d  EtherExpress PRO/100 Cardbus",
+"		8086 200e  EtherExpress PRO/100 LAN+V90 Cardbus Modem",
+"		8086 200f  EtherExpress PRO/100 SR Mobile Adapter",
+"		8086 2010  EtherExpress PRO/100 S Mobile Combo Adapter",
+"		8086 2013  EtherExpress PRO/100 SR Mobile Combo Adapter",
+"		8086 2016  EtherExpress PRO/100 S Mobile Adapter",
+"		8086 2017  EtherExpress PRO/100 S Combo Mobile Adapter",
+"		8086 2018  EtherExpress PRO/100 SR Mobile Adapter",
+"		8086 2019  EtherExpress PRO/100 SR Combo Mobile Adapter",
+"		8086 2101  EtherExpress PRO/100 P Mobile Adapter",
+"		8086 2102  EtherExpress PRO/100 SP Mobile Adapter",
+"		8086 2103  EtherExpress PRO/100 SP Mobile Adapter",
+"		8086 2104  EtherExpress PRO/100 SP Mobile Adapter",
+"		8086 2105  EtherExpress PRO/100 SP Mobile Adapter",
+"		8086 2106  EtherExpress PRO/100 P Mobile Adapter",
+"		8086 2107  EtherExpress PRO/100 Network Connection",
+"		8086 2108  EtherExpress PRO/100 Network Connection",
+"		8086 2200  EtherExpress PRO/100 P Mobile Combo Adapter",
+"		8086 2201  EtherExpress PRO/100 P Mobile Combo Adapter",
+"		8086 2202  EtherExpress PRO/100 SP Mobile Combo Adapter",
+"		8086 2203  EtherExpress PRO/100+ MiniPCI",
+"		8086 2204  EtherExpress PRO/100+ MiniPCI",
+"		8086 2205  EtherExpress PRO/100 SP Mobile Combo Adapter",
+"		8086 2206  EtherExpress PRO/100 SP Mobile Combo Adapter",
+"		8086 2207  EtherExpress PRO/100 SP Mobile Combo Adapter",
+"		8086 2208  EtherExpress PRO/100 P Mobile Combo Adapter",
+"		8086 2402  EtherExpress PRO/100+ MiniPCI",
+"		8086 2407  EtherExpress PRO/100+ MiniPCI",
+"		8086 2408  EtherExpress PRO/100+ MiniPCI",
+"		8086 2409  EtherExpress PRO/100+ MiniPCI",
+"		8086 240f  EtherExpress PRO/100+ MiniPCI",
+"		8086 2410  EtherExpress PRO/100+ MiniPCI",
+"		8086 2411  EtherExpress PRO/100+ MiniPCI",
+"		8086 2412  EtherExpress PRO/100+ MiniPCI",
+"		8086 2413  EtherExpress PRO/100+ MiniPCI",
+"		8086 3000  82559 Fast Ethernet LAN on Motherboard",
+"		8086 3001  82559 Fast Ethernet LOM with Basic Alert on LAN*",
+"		8086 3002  82559 Fast Ethernet LOM with Alert on LAN II*",
+"		8086 3006  EtherExpress PRO/100 S Network Connection",
+"		8086 3007  EtherExpress PRO/100 S Network Connection",
+"		8086 3008  EtherExpress PRO/100 Network Connection",
+"		8086 3010  EtherExpress PRO/100 S Network Connection",
+"		8086 3011  EtherExpress PRO/100 S Network Connection",
+"		8086 3012  EtherExpress PRO/100 Network Connection",
+"		8086 3411  SDS2 Mainboard",
+"	122d  430FX - 82437FX TSC [Triton I]",
+"	122e  82371FB PIIX ISA [Triton I]",
+"	1230  82371FB PIIX IDE [Triton I]",
+"	1231  DSVD Modem",
+"	1234  430MX - 82371MX Mobile PCI I/O IDE Xcelerator (MPIIX)",
+"	1235  430MX - 82437MX Mob. System Ctrlr (MTSC) & 82438MX Data Path (MTDP)",
+"	1237  440FX - 82441FX PMC [Natoma]",
+"	1239  82371FB PIIX IDE Interface",
+"	123b  82380PB PCI to PCI Docking Bridge",
+"	123c  82380AB (MISA) Mobile PCI-to-ISA Bridge",
+"	123d  683053 Programmable Interrupt Device",
+"	123e  82466GX (IHPC) Integrated Hot-Plug Controller",
+"	123f  82466GX Integrated Hot-Plug Controller (IHPC)",
+"	1240  82752 (752) AGP Graphics Accelerator",
+"	124b  82380FB (MPCI2) Mobile Docking Controller",
+"	1250  430HX - 82439HX TXC [Triton II]",
+"	1360  82806AA PCI64 Hub PCI Bridge",
+"	1361  82806AA PCI64 Hub Controller (HRes)",
+"		8086 1361  82806AA PCI64 Hub Controller (HRes)",
+"		8086 8000  82806AA PCI64 Hub Controller (HRes)",
+"	1460  82870P2 P64H2 Hub PCI Bridge",
+"	1461  82870P2 P64H2 I/OxAPIC",
+"		15d9 3480  P4DP6",
+"		4c53 1090  Cx9/Vx9 mainboard",
+"	1462  82870P2 P64H2 Hot Plug Controller",
+"	1960  80960RP [i960RP Microprocessor]",
+"		101e 0431  MegaRAID 431 RAID Controller",
+"		101e 0438  MegaRAID 438 Ultra2 LVD RAID Controller",
+"		101e 0466  MegaRAID 466 Express Plus RAID Controller",
+"		101e 0467  MegaRAID 467 Enterprise 1500 RAID Controller",
+"		101e 0490  MegaRAID 490 Express 300 RAID Controller",
+"		101e 0762  MegaRAID 762 Express RAID Controller",
+"		101e 09a0  PowerEdge Expandable RAID Controller 2/SC",
+"		1028 0467  PowerEdge Expandable RAID Controller 2/DC",
+"		1028 1111  PowerEdge Expandable RAID Controller 2/SC",
+"		103c 03a2  MegaRAID",
+"		103c 10c6  MegaRAID 438, HP NetRAID-3Si",
+"		103c 10c7  MegaRAID T5, Integrated HP NetRAID",
+"		103c 10cc  MegaRAID, Integrated HP NetRAID",
+"		103c 10cd  HP NetRAID-1Si",
+"		105a 0000  SuperTrak",
+"		105a 2168  SuperTrak Pro",
+"		105a 5168  SuperTrak66/100",
+"		1111 1111  MegaRAID 466, PowerEdge Expandable RAID Controller 2/SC",
+"		1111 1112  PowerEdge Expandable RAID Controller 2/SC",
+"		113c 03a2  MegaRAID",
+"		e4bf 1010  CG1-RADIO",
+"		e4bf 1020  CU2-QUARTET",
+"		e4bf 1040  CU1-CHORUS",
+"		e4bf 3100  CX1-BAND",
+"	1962  80960RM [i960RM Microprocessor]",
+"		105a 0000  SuperTrak SX6000 I2O CPU",
+"	1a21  82840 840 (Carmel) Chipset Host Bridge (Hub A)",
+"	1a23  82840 840 (Carmel) Chipset AGP Bridge",
+"	1a24  82840 840 (Carmel) Chipset PCI Bridge (Hub B)",
+"	1a30  82845 845 (Brookdale) Chipset Host Bridge",
+"		1028 010e  Optiplex GX240",
+"	1a31  82845 845 (Brookdale) Chipset AGP Bridge",
+"	1a38  Server DMA Engine",
+"	1a48  PRO/10GbE SR Server Adapter",
+"	2410  82801AA ISA Bridge (LPC)",
+"	2411  82801AA IDE",
+"	2412  82801AA USB",
+"	2413  82801AA SMBus",
+"	2415  82801AA AC'97 Audio",
+"		1028 0095  Precision Workstation 220 Integrated Digital Audio",
+"		110a 0051  Activy 2xx",
+"		11d4 0040  SoundMAX Integrated Digital Audio",
+"		11d4 0048  SoundMAX Integrated Digital Audio",
+"		11d4 5340  SoundMAX Integrated Digital Audio",
+"		1734 1025  Activy 3xx",
+"	2416  82801AA AC'97 Modem",
+"	2418  82801AA PCI Bridge",
+"	2420  82801AB ISA Bridge (LPC)",
+"	2421  82801AB IDE",
+"	2422  82801AB USB",
+"	2423  82801AB SMBus",
+"	2425  82801AB AC'97 Audio",
+"		11d4 0040  SoundMAX Integrated Digital Audio",
+"		11d4 0048  SoundMAX Integrated Digital Audio",
+"	2426  82801AB AC'97 Modem",
+"	2428  82801AB PCI Bridge",
+"	2440  82801BA ISA Bridge (LPC)",
+"	2442  82801BA/BAM USB (Hub #1)",
+"		1014 01c6  Netvista A40/A40p",
+"		1025 1016  Travelmate 612 TX",
+"		1028 010e  Optiplex GX240",
+"		1043 8027  TUSL2-C Mainboard",
+"		104d 80df  Vaio PCG-FX403",
+"		147b 0507  TH7II-RAID",
+"		8086 4532  D815EEA2 mainboard",
+"		8086 4557  D815EGEW Mainboard",
+"	2443  82801BA/BAM SMBus",
+"		1014 01c6  Netvista A40/A40p",
+"		1025 1016  Travelmate 612 TX",
+"		1028 010e  Optiplex GX240",
+"		1043 8027  TUSL2-C Mainboard",
+"		104d 80df  Vaio PCG-FX403",
+"		147b 0507  TH7II-RAID",
+"		8086 4532  D815EEA2 mainboard",
+"		8086 4557  D815EGEW Mainboard",
+"	2444  82801BA/BAM USB (Hub #2)",
+"		1025 1016  Travelmate 612 TX",
+"		1028 010e  Optiplex GX240",
+"		1043 8027  TUSL2-C Mainboard",
+"		104d 80df  Vaio PCG-FX403",
+"		147b 0507  TH7II-RAID",
+"		8086 4532  D815EEA2 mainboard",
+"	2445  82801BA/BAM AC'97 Audio",
+"		0e11 0088  Evo D500",
+"		1014 01c6  Netvista A40/A40p",
+"		1025 1016  Travelmate 612 TX",
+"		104d 80df  Vaio PCG-FX403",
+"		1462 3370  STAC9721 AC",
+"		147b 0507  TH7II-RAID",
+"		8086 4557  D815EGEW Mainboard",
+"	2446  82801BA/BAM AC'97 Modem",
+"		1025 1016  Travelmate 612 TX",
+"		104d 80df  Vaio PCG-FX403",
+"	2448  82801 Mobile PCI Bridge",
+"		103c 099c  NX6110/NC6120",
+"		1734 1055  Amilo M1420",
+"	2449  82801BA/BAM/CA/CAM Ethernet Controller",
+"		0e11 0012  EtherExpress PRO/100 VM",
+"		0e11 0091  EtherExpress PRO/100 VE",
+"		1014 01ce  EtherExpress PRO/100 VE",
+"		1014 01dc  EtherExpress PRO/100 VE",
+"		1014 01eb  EtherExpress PRO/100 VE",
+"		1014 01ec  EtherExpress PRO/100 VE",
+"		1014 0202  EtherExpress PRO/100 VE",
+"		1014 0205  EtherExpress PRO/100 VE",
+"		1014 0217  EtherExpress PRO/100 VE",
+"		1014 0234  EtherExpress PRO/100 VE",
+"		1014 023d  EtherExpress PRO/100 VE",
+"		1014 0244  EtherExpress PRO/100 VE",
+"		1014 0245  EtherExpress PRO/100 VE",
+"		1014 0265  PRO/100 VE Desktop Connection",
+"		1014 0267  PRO/100 VE Desktop Connection",
+"		1014 026a  PRO/100 VE Desktop Connection",
+"		109f 315d  EtherExpress PRO/100 VE",
+"		109f 3181  EtherExpress PRO/100 VE",
+"		1179 ff01  PRO/100 VE Network Connection",
+"		1186 7801  EtherExpress PRO/100 VE",
+"		144d 2602  HomePNA 1M CNR",
+"		8086 3010  EtherExpress PRO/100 VE",
+"		8086 3011  EtherExpress PRO/100 VM",
+"		8086 3012  82562EH based Phoneline",
+"		8086 3013  EtherExpress PRO/100 VE",
+"		8086 3014  EtherExpress PRO/100 VM",
+"		8086 3015  82562EH based Phoneline",
+"		8086 3016  EtherExpress PRO/100 P Mobile Combo",
+"		8086 3017  EtherExpress PRO/100 P Mobile",
+"		8086 3018  EtherExpress PRO/100",
+"	244a  82801BAM IDE U100",
+"		1025 1016  Travelmate 612TX",
+"		104d 80df  Vaio PCG-FX403",
+"	244b  82801BA IDE U100",
+"		1014 01c6  Netvista A40/A40p",
+"		1028 010e  Optiplex GX240",
+"		1043 8027  TUSL2-C Mainboard",
+"		147b 0507  TH7II-RAID",
+"		8086 4532  D815EEA2 mainboard",
+"		8086 4557  D815EGEW Mainboard",
+"	244c  82801BAM ISA Bridge (LPC)",
+"	244e  82801 PCI Bridge",
+"		1014 0267  NetVista A30p",
+"	2450  82801E ISA Bridge (LPC)",
+"	2452  82801E USB",
+"	2453  82801E SMBus",
+"	2459  82801E Ethernet Controller 0",
+"	245b  82801E IDE U100",
+"	245d  82801E Ethernet Controller 1",
+"	245e  82801E PCI Bridge",
+"	2480  82801CA LPC Interface Controller",
+"	2482  82801CA/CAM USB (Hub #1)",
+"		0e11 0030  Evo N600c",
+"		1014 0220  ThinkPad A/T/X Series",
+"		104d 80e7  VAIO PCG-GR214EP/GR214MP/GR215MP/GR314MP/GR315MP",
+"		15d9 3480  P4DP6",
+"		8086 1958  vpr Matrix 170B4",
+"		8086 3424  SE7501HG2 Mainboard",
+"		8086 4541  Latitude C640",
+"	2483  82801CA/CAM SMBus Controller",
+"		1014 0220  ThinkPad A/T/X Series",
+"		104d 80e7  VAIO PCG-GR214EP/GR214MP/GR215MP/GR314MP/GR315MP",
+"		15d9 3480  P4DP6",
+"		8086 1958  vpr Matrix 170B4",
+"	2484  82801CA/CAM USB (Hub #2)",
+"		0e11 0030  Evo N600c",
+"		1014 0220  ThinkPad A/T/X Series",
+"		104d 80e7  VAIO PCG-GR214EP/GR214MP/GR215MP/GR314MP/GR315MP",
+"		15d9 3480  P4DP6",
+"		8086 1958  vpr Matrix 170B4",
+"	2485  82801CA/CAM AC'97 Audio Controller",
+"		1013 5959  Crystal WMD Audio Codec",
+"		1014 0222  ThinkPad T23 (2647-4MG) or A30/A30p (2652/2653)",
+"		1014 0508  ThinkPad T30",
+"		1014 051c  ThinkPad A/T/X Series",
+"		104d 80e7  VAIO PCG-GR214EP/GR214MP/GR215MP/GR314MP/GR315MP",
+"		144d c006  vpr Matrix 170B4",
+"	2486  82801CA/CAM AC'97 Modem Controller",
+"		1014 0223  ThinkPad A/T/X Series",
+"		1014 0503  ThinkPad R31 2656BBG",
+"		1014 051a  ThinkPad A/T/X Series",
+"		101f 1025  620 Series",
+"		104d 80e7  VAIO PCG-GR214EP/GR214MP/GR215MP/GR314MP/GR315MP",
+"		134d 4c21  Dell Inspiron 2100 internal modem",
+"		144d 2115  vpr Matrix 170B4 internal modem",
+"		14f1 5421  MD56ORD V.92 MDC Modem",
+"	2487  82801CA/CAM USB (Hub #3)",
+"		0e11 0030  Evo N600c",
+"		1014 0220  ThinkPad A/T/X Series",
+"		104d 80e7  VAIO PCG-GR214EP/GR214MP/GR215MP/GR314MP/GR315MP",
+"		15d9 3480  P4DP6",
+"		8086 1958  vpr Matrix 170B4",
+"	248a  82801CAM IDE U100",
+"		0e11 0030  Evo N600c",
+"		1014 0220  ThinkPad A/T/X Series",
+"		104d 80e7  VAIO PCG-GR214EP/GR214MP/GR215MP/GR314MP/GR315MP",
+"		8086 1958  vpr Matrix 170B4",
+"		8086 4541  Latitude C640",
+"	248b  82801CA Ultra ATA Storage Controller",
+"		15d9 3480  P4DP6",
+"	248c  82801CAM ISA Bridge (LPC)",
+"	24c0  82801DB/DBL (ICH4/ICH4-L) LPC Interface Bridge",
+"		1014 0267  NetVista A30p",
+"		1462 5800  845PE Max (MS-6580)",
+"	24c1  82801DBL (ICH4-L) IDE Controller",
+"	24c2  82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #1",
+"		1014 0267  NetVista A30p",
+"		1025 005a  TravelMate 290",
+"		1028 0126  Optiplex GX260",
+"		1028 0163  Latitude D505",
+"		1028 0196  Inspiron 5160",
+"		103c 088c  NC8000 laptop",
+"		103c 0890  NC6000 laptop",
+"		1071 8160  MIM2000",
+"		1462 5800  845PE Max (MS-6580)",
+"		1509 2990  Averatec 5110H laptop",
+"		1734 1004  D1451 Mainboard (SCENIC N300, i845GV)",
+"		1734 1055  Amilo M1420",
+"		4c53 1090  Cx9 / Vx9 mainboard",
+"		8086 4541  Latitude D400",
+"	24c3  82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) SMBus Controller",
+"		1014 0267  NetVista A30p",
+"		1025 005a  TravelMate 290",
+"		1028 0126  Optiplex GX260",
+"		103c 088c  NC8000 laptop",
+"		103c 0890  NC6000 laptop",
+"		1071 8160  MIM2000",
+"		1458 24c2  GA-8PE667 Ultra",
+"		1462 5800  845PE Max (MS-6580)",
+"		1734 1004  D1451 Mainboard (SCENIC N300, i845GV)",
+"		1734 1055  Amilo M1420",
+"		4c53 1090  Cx9 / Vx9 mainboard",
+"	24c4  82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #2",
+"		1014 0267  NetVista A30p",
+"		1025 005a  TravelMate 290",
+"		1028 0126  Optiplex GX260",
+"		1028 0163  Latitude D505",
+"		1028 0196  Inspiron 5160",
+"		103c 088c  NC8000 laptop",
+"		103c 0890  NC6000 laptop",
+"		1071 8160  MIM2000",
+"		1462 5800  845PE Max (MS-6580)",
+"		1509 2990  Averatec 5110H",
+"		1734 1004  D1451 Mainboard (SCENIC N300, i845GV)",
+"		4c53 1090  Cx9 / Vx9 mainboard",
+"		8086 4541  Latitude D400",
+"	24c5  82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Audio Controller",
+"		0e11 00b8  Analog Devices Inc. codec [SoundMAX]",
+"		1014 0267  NetVista A30p",
+"		1025 005a  TravelMate 290",
+"		1028 0139  Latitude D400",
+"		1028 0163  Latitude D505",
+"		1028 0196  Inspiron 5160",
+"		103c 088c  NC8000 laptop",
+"		103c 0890  NC6000 laptop",
+"		1071 8160  MIM2000",
+"		1458 a002  GA-8PE667 Ultra",
+"		1462 5800  845PE Max (MS-6580)",
+"		1734 1005  D1451 (SCENIC N300, i845GV) Sigmatel STAC9750T",
+"		1734 1055  Amilo M1420",
+"	24c6  82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Modem Controller",
+"		1025 003c  Aspire 2001WLCi (Compal CL50 motherboard) implementation",
+"		1025 005a  TravelMate 290",
+"		1028 0196  Inspiron 5160",
+"		103c 088c  NC8000 laptop",
+"		103c 0890  NC6000 laptop",
+"		1071 8160  MIM2000",
+"	24c7  82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #3",
+"		1014 0267  NetVista A30p",
+"		1025 005a  TravelMate 290",
+"		1028 0126  Optiplex GX260",
+"		1028 0163  Latitude D505",
+"		1028 0196  Inspiron 5160",
+"		103c 088c  NC8000 laptop",
+"		103c 0890  NC6000 laptop",
+"		1071 8160  MIM2000",
+"		1462 5800  845PE Max (MS-6580)",
+"		1509 2990  Averatec 5110H",
+"		1734 1004  D1451 Mainboard (SCENIC N300, i845GV)",
+"		4c53 1090  Cx9 / Vx9 mainboard",
+"		8086 4541  Latitude D400",
+"	24ca  82801DBM (ICH4-M) IDE Controller",
+"		1025 005a  TravelMate 290",
+"		1028 0163  Latitude D505",
+"		1028 0196  Inspiron 5160",
+"		103c 088c  NC8000 laptop",
+"		103c 0890  NC6000 laptop",
+"		1071 8160  MIM2000",
+"		1734 1055  Amilo M1420",
+"		8086 4541  Latitude D400",
+"	24cb  82801DB (ICH4) IDE Controller",
+"		1014 0267  NetVista A30p",
+"		1028 0126  Optiplex GX260",
+"		1458 24c2  GA-8PE667 Ultra",
+"		1462 5800  845PE Max (MS-6580)",
+"		1734 1004  D1451 Mainboard (SCENIC N300, i845GV)",
+"		4c53 1090  Cx9 / Vx9 mainboard",
+"	24cc  82801DBM (ICH4-M) LPC Interface Bridge",
+"		1734 1055  Amilo M1420",
+"	24cd  82801DB/DBM (ICH4/ICH4-M) USB2 EHCI Controller",
+"		1014 0267  NetVista A30p",
+"		1025 005a  TravelMate 290",
+"		1028 011d  Latitude D600",
+"		1028 0126  Optiplex GX260",
+"		1028 0139  Latitude D400",
+"		1028 0163  Latitude D505",
+"		1028 0196  Inspiron 5160",
+"		103c 088c  NC8000 laptop",
+"		103c 0890  NC6000 laptop",
+"		1071 8160  MIM2000",
+"		1462 3981  845PE Max (MS-6580)",
+"		1509 1968  Averatec 5110H",
+"		1734 1004  D1451 Mainboard (SCENIC N300, i845GV)",
+"		1734 1055  Amilo M1420",
+"		4c53 1090  Cx9 / Vx9 mainboard",
+"	24d0  82801EB/ER (ICH5/ICH5R) LPC Interface Bridge",
+"	24d1  82801EB (ICH5) SATA Controller",
+"		1028 0169  Precision 470",
+"		1028 019a  PowerEdge SC1425",
+"		103c 12bc  d530 CMT (DG746A)",
+"		1043 80a6  P4P800 SE Mainboard",
+"		1458 24d1  GA-8IPE1000 Pro2 motherboard (865PE)",
+"		1462 7280  865PE Neo2 (MS-6728)",
+"		15d9 4580  P4SCE Mainboard",
+"		8086 3427  S875WP1-E mainboard",
+"		8086 4246  Desktop Board D865GBF",
+"		8086 524c  D865PERL mainboard",
+"	24d2  82801EB/ER (ICH5/ICH5R) USB UHCI Controller #1",
+"		1014 02ed  xSeries server mainboard",
+"		1028 0169  Precision 470",
+"		1028 0183  PowerEdge 1800",
+"		1028 019a  PowerEdge SC1425",
+"		103c 006a  NX9500",
+"		103c 12bc  d530 CMT (DG746A)",
+"		1043 80a6  P5P800-MX Mainboard",
+"		1458 24d2  GA-8IPE1000/8KNXP motherboard",
+"		1462 7280  865PE Neo2 (MS-6728)",
+"		15d9 4580  P4SCE Mainboard",
+"		1734 101c  Primergy RX300 S2",
+"		8086 3427  S875WP1-E mainboard",
+"		8086 4246  Desktop Board D865GBF",
+"		8086 524c  D865PERL mainboard",
+"	24d3  82801EB/ER (ICH5/ICH5R) SMBus Controller",
+"		1014 02ed  xSeries server mainboard",
+"		1028 0156  Precision 360",
+"		1028 0169  Precision 470",
+"		1043 80a6  P4P800 Mainboard",
+"		1458 24d2  GA-8IPE1000 Pro2 motherboard (865PE)",
+"		1462 7280  865PE Neo2 (MS-6728)",
+"		15d9 4580  P4SCE Mainboard",
+"		1734 101c  Primergy RX300 S2",
+"		8086 3427  S875WP1-E mainboard",
+"		8086 4246  Desktop Board D865GBF",
+"		8086 524c  D865PERL mainboard",
+"	24d4  82801EB/ER (ICH5/ICH5R) USB UHCI Controller #2",
+"		1014 02ed  xSeries server mainboard",
+"		1028 0169  Precision 470",
+"		1028 0183  PowerEdge 1800",
+"		1028 019a  PowerEdge SC1425",
+"		103c 006a  NX9500",
+"		103c 12bc  d530 CMT (DG746A)",
+"		1043 80a6  P5P800-MX Mainboard",
+"		1458 24d2  GA-8IPE1000 Pro2 motherboard (865PE)",
+"		1462 7280  865PE Neo2 (MS-6728)",
+"		15d9 4580  P4SCE Mainboard",
+"		1734 101c  Primergy RX300 S2",
+"		8086 3427  S875WP1-E mainboard",
+"		8086 4246  Desktop Board D865GBF",
+"		8086 524c  D865PERL mainboard",
+"	24d5  82801EB/ER (ICH5/ICH5R) AC'97 Audio Controller",
+"		1028 0169  Precision 470",
+"		103c 006a  NX9500",
+"		103c 12bc  d330 uT",
+"		1043 80f3  P4P800 Mainboard",
+"		1043 810f  P5P800-MX Mainboard",
+"		1458 a002  GA-8IPE1000/8KNXP motherboard",
+"		1462 0080  65PE Neo2-V (MS-6788) mainboard",
+"		1462 7280  865PE Neo2 (MS-6728)",
+"		8086 a000  D865PERL mainboard",
+"		8086 e000  D865PERL mainboard",
+"		8086 e001  Desktop Board D865GBF",
+"	24d6  82801EB/ER (ICH5/ICH5R) AC'97 Modem Controller",
+"		103c 006a  NX9500",
+"	24d7  82801EB/ER (ICH5/ICH5R) USB UHCI Controller #3",
+"		1014 02ed  xSeries server mainboard",
+"		1028 0169  Precision 470",
+"		1028 0183  PowerEdge 1800",
+"		103c 006a  NX9500",
+"		103c 12bc  d530 CMT (DG746A)",
+"		1043 80a6  P5P800-MX Mainboard",
+"		1458 24d2  GA-8IPE1000 Pro2 motherboard (865PE)",
+"		1462 7280  865PE Neo2 (MS-6728)",
+"		15d9 4580  P4SCE Mainboard",
+"		1734 101c  Primergy RX300 S2",
+"		8086 3427  S875WP1-E mainboard",
+"		8086 4246  Desktop Board D865GBF",
+"		8086 524c  D865PERL mainboard",
+"	24db  82801EB/ER (ICH5/ICH5R) IDE Controller",
+"		1014 02ed  xSeries server mainboard",
+"		1028 0169  Precision 470",
+"		1028 019a  PowerEdge SC1425",
+"		103c 006a  NX9500",
+"		103c 12bc  d530 CMT (DG746A)",
+"		1043 80a6  P5P800-MX Mainboard",
+"		1458 24d2  GA-8IPE1000 Pro2 motherboard (865PE)",
+"		1462 7280  865PE Neo2 (MS-6728)",
+"		1462 7580  MSI 875P",
+"		15d9 4580  P4SCE Mainboard",
+"		1734 101c  Primergy RX300 S2",
+"		8086 24db  P4C800 Mainboard",
+"		8086 3427  S875WP1-E mainboard",
+"		8086 4246  Desktop Board D865GBF",
+"		8086 524c  D865PERL mainboard",
+"	24dc  82801EB (ICH5) LPC Interface Bridge",
+"	24dd  82801EB/ER (ICH5/ICH5R) USB2 EHCI Controller",
+"		1014 02ed  xSeries server mainboard",
+"		1028 0169  Precision 470",
+"		1028 0183  PowerEdge 1800",
+"		1028 019a  PowerEdge SC1425",
+"		103c 006a  NX9500",
+"		103c 12bc  d530 CMT (DG746A)",
+"		1043 80a6  P5P800-MX Mainboard",
+"		1458 5006  GA-8IPE1000 Pro2 motherboard (865PE)",
+"		1462 7280  865PE Neo2 (MS-6728)",
+"		8086 3427  S875WP1-E mainboard",
+"		8086 4246  Desktop Board D865GBF",
+"		8086 524c  D865PERL mainboard",
+"	24de  82801EB/ER (ICH5/ICH5R) USB UHCI Controller #4",
+"		1014 02ed  xSeries server mainboard",
+"		1028 0169  Precision 470",
+"		1043 80a6  P5P800-MX Mainboard",
+"		1458 24d2  GA-8IPE1000 Pro2 motherboard (865PE)",
+"		1462 7280  865PE Neo2 (MS-6728)",
+"		15d9 4580  P4SCE Mainboard",
+"		1734 101c  Primergy RX300 S2",
+"		8086 3427  S875WP1-E mainboard",
+"		8086 4246  Desktop Board D865GBF",
+"		8086 524c  D865PERL mainboard",
+"	24df  82801ER (ICH5R) SATA Controller",
+"	2500  82820 820 (Camino) Chipset Host Bridge (MCH)",
+"		1028 0095  Precision Workstation 220 Chipset",
+"		1043 801c  P3C-2000 system chipset",
+"	2501  82820 820 (Camino) Chipset Host Bridge (MCH)",
+"		1043 801c  P3C-2000 system chipset",
+"	250b  82820 820 (Camino) Chipset Host Bridge",
+"	250f  82820 820 (Camino) Chipset AGP Bridge",
+"	2520  82805AA MTH Memory Translator Hub",
+"	2521  82804AA MRH-S Memory Repeater Hub for SDRAM",
+"	2530  82850 850 (Tehama) Chipset Host Bridge (MCH)",
+"		147b 0507  TH7II-RAID",
+"	2531  82860 860 (Wombat) Chipset Host Bridge (MCH)",
+"	2532  82850 850 (Tehama) Chipset AGP Bridge",
+"	2533  82860 860 (Wombat) Chipset AGP Bridge",
+"	2534  82860 860 (Wombat) Chipset PCI Bridge",
+"	2540  E7500 Memory Controller Hub",
+"		15d9 3480  P4DP6",
+"	2541  E7500/E7501 Host RASUM Controller",
+"		15d9 3480  P4DP6",
+"		4c53 1090  Cx9 / Vx9 mainboard",
+"		8086 3424  SE7501HG2 Mainboard",
+"	2543  E7500/E7501 Hub Interface B PCI-to-PCI Bridge",
+"	2544  E7500/E7501 Hub Interface B RASUM Controller",
+"		4c53 1090  Cx9 / Vx9 mainboard",
+"	2545  E7500/E7501 Hub Interface C PCI-to-PCI Bridge",
+"	2546  E7500/E7501 Hub Interface C RASUM Controller",
+"	2547  E7500/E7501 Hub Interface D PCI-to-PCI Bridge",
+"	2548  E7500/E7501 Hub Interface D RASUM Controller",
+"	254c  E7501 Memory Controller Hub",
+"		4c53 1090  Cx9 / Vx9 mainboard",
+"		8086 3424  SE7501HG2 Mainboard",
+"	2550  E7505 Memory Controller Hub",
+"	2551  E7505/E7205 Series RAS Controller",
+"	2552  E7505/E7205 PCI-to-AGP Bridge",
+"	2553  E7505 Hub Interface B PCI-to-PCI Bridge",
+"	2554  E7505 Hub Interface B PCI-to-PCI Bridge RAS Controller",
+"	255d  E7205 Memory Controller Hub",
+"	2560  82845G/GL[Brookdale-G]/GE/PE DRAM Controller/Host-Hub Interface",
+"		1028 0126  Optiplex GX260",
+"		1458 2560  GA-8PE667 Ultra",
+"		1462 5800  845PE Max (MS-6580)",
+"	2561  82845G/GL[Brookdale-G]/GE/PE Host-to-AGP Bridge",
+"	2562  82845G/GL[Brookdale-G]/GE Chipset Integrated Graphics Device",
+"		0e11 00b9  Evo D510 SFF",
+"		1014 0267  NetVista A30p",
+"		1734 1004  D1451 Mainboard (SCENIC N300, i845GV)",
+"	2570  82865G/PE/P DRAM Controller/Host-Hub Interface",
+"		103c 006a  NX9500",
+"		1043 80f2  P5P800-MX Mainboard",
+"		1458 2570  GA-8IPE1000 Pro2 motherboard (865PE)",
+"	2571  82865G/PE/P PCI to AGP Controller",
+"	2572  82865G Integrated Graphics Controller",
+"		1028 019d  Dimension 3000",
+"		103c 12bc  D530 sff(dc578av)",
+"		1043 80a5  P5P800-MX Mainboard",
+"		8086 4246  Desktop Board D865GBF",
+"	2573  82865G/PE/P PCI to CSA Bridge",
+"	2576  82865G/PE/P Processor to I/O Memory Interface",
+"	2578  82875P/E7210 Memory Controller Hub",
+"		1458 2578  GA-8KNXP motherboard (875P)",
+"		1462 7580  MS-6758 (875P Neo)",
+"		15d9 4580  P4SCE Motherboard",
+"	2579  82875P Processor to AGP Controller",
+"	257b  82875P/E7210 Processor to PCI to CSA Bridge",
+"	257e  82875P/E7210 Processor to I/O Memory Interface",
+"	2580  915G/P/GV/GL/PL/910GL Express Memory Controller Hub",
+"		1458 2580  GA-8I915ME-G Mainboard",
+"		1462 7028  915P/G Neo2",
+"		1734 105b  Scenic W620",
+"	2581  915G/P/GV/GL/PL/910GL Express PCI Express Root Port",
+"	2582  82915G/GV/910GL Express Chipset Family Graphics Controller",
+"		1028 1079  Optiplex GX280",
+"		103c 3006  DC7100 SFF(DX878AV)",
+"		1043 2582  P5GD1-VW Mainboard",
+"		1458 2582  GA-8I915ME-G Mainboard",
+"		1734 105b  Scenic W620",
+"	2584  925X/XE Express Memory Controller Hub",
+"	2585  925X/XE Express PCI Express Root Port",
+"	2588  E7220/E7221 Memory Controller Hub",
+"	2589  E7220/E7221 PCI Express Root Port",
+"	258a  E7221 Integrated Graphics Controller",
+"	2590  Mobile 915GM/PM/GMS/910GML Express Processor to DRAM Controller",
+"		1028 0182  Dell Latidude C610",
+"		103c 099c  NX6110/NC6120",
+"		a304 81b7  Vaio VGN-S3XP",
+"	2591  Mobile 915GM/PM Express PCI Express Root Port",
+"	2592  Mobile 915GM/GMS/910GML Express Graphics Controller",
+"		103c 099c  NX6110/NC6120",
+"		103c 308a  NC6220",
+"		1043 1881  GMA 900 915GM Integrated Graphics",
+"	25a1  6300ESB LPC Interface Controller",
+"	25a2  6300ESB PATA Storage Controller",
+"		4c53 10b0  CL9 mainboard",
+"		4c53 10e0  PSL09 PrPMC",
+"	25a3  6300ESB SATA Storage Controller",
+"		4c53 10b0  CL9 mainboard",
+"		4c53 10d0  Telum ASLP10 Processor AMC",
+"		4c53 10e0  PSL09 PrPMC",
+"	25a4  6300ESB SMBus Controller",
+"		4c53 10b0  CL9 mainboard",
+"		4c53 10d0  Telum ASLP10 Processor AMC",
+"		4c53 10e0  PSL09 PrPMC",
+"	25a6  6300ESB AC'97 Audio Controller",
+"		4c53 10b0  CL9 mainboard",
+"	25a7  6300ESB AC'97 Modem Controller",
+"	25a9  6300ESB USB Universal Host Controller",
+"		4c53 10b0  CL9 mainboard",
+"		4c53 10d0  Telum ASLP10 Processor AMC",
+"		4c53 10e0  PSL09 PrPMC",
+"	25aa  6300ESB USB Universal Host Controller",
+"		4c53 10b0  CL9 mainboard",
+"		4c53 10e0  PSL09 PrPMC",
+"	25ab  6300ESB Watchdog Timer",
+"		4c53 10b0  CL9 mainboard",
+"		4c53 10d0  Telum ASLP10 Processor AMC",
+"		4c53 10e0  PSL09 PrPMC",
+"	25ac  6300ESB I/O Advanced Programmable Interrupt Controller",
+"		4c53 10b0  CL9 mainboard",
+"		4c53 10d0  Telum ASLP10 Processor AMC",
+"		4c53 10e0  PSL09 PrPMC",
+"	25ad  6300ESB USB2 Enhanced Host Controller",
+"		4c53 10b0  CL9 mainboard",
+"		4c53 10d0  Telum ASLP10 Processor AMC",
+"		4c53 10e0  PSL09 PrPMC",
+"	25ae  6300ESB 64-bit PCI-X Bridge",
+"	25b0  6300ESB SATA RAID Controller",
+"		4c53 10d0  Telum ASLP10 Processor AMC",
+"		4c53 10e0  PSL09 PrPMC",
+"	25c0  Workstation Memory Controller Hub",
+"	25d0  Server Memory Controller Hub",
+"	25d4  Server Memory Contoller Hub",
+"	25d8  Server Memory Controller Hub",
+"	25e2  Server PCI Express x4 Port 2",
+"	25e3  Server PCI Express x4 Port 3",
+"	25e4  Server PCI Express x4 Port 4",
+"	25e5  Server PCI Express x4 Port 5",
+"	25e6  Server PCI Express x4 Port 6",
+"	25e7  Server PCI Express x4 Port 7",
+"	25e8  Server AMB Memory Mapped Registers",
+"	25f0  Server Error Reporting Registers",
+"	25f1  Reserved Registers",
+"	25f3  Reserved Registers",
+"	25f5  Server FBD Registers",
+"	25f6  Server FBD Registers",
+"	25f7  Server PCI Express x8 Port 2-3",
+"	25f8  Server PCI Express x8 Port 4-5",
+"	25f9  Server PCI Express x8 Port 6-7",
+"	25fa  Server PCI Express x16 Port 4-7",
+"	2600  E8500/E8501 Hub Interface 1.5",
+"	2601  E8500/E8501 PCI Express x4 Port D",
+"	2602  E8500/E8501 PCI Express x4 Port C0",
+"	2603  E8500/E8501 PCI Express x4 Port C1",
+"	2604  E8500/E8501 PCI Express x4 Port B0",
+"	2605  E8500/E8501 PCI Express x4 Port B1",
+"	2606  E8500/E8501 PCI Express x4 Port A0",
+"	2607  E8500/E8501 PCI Express x4 Port A1",
+"	2608  E8500/E8501 PCI Express x8 Port C",
+"	2609  E8500/E8501 PCI Express x8 Port B",
+"	260a  E8500/E8501 PCI Express x8 Port A",
+"	260c  E8500/E8501 IMI Registers",
+"	2610  E8500/E8501 Front Side Bus, Boot, and Interrupt Registers",
+"	2611  E8500/E8501 Address Mapping Registers",
+"	2612  E8500/E8501 RAS Registers",
+"	2613  E8500/E8501 Reserved Registers",
+"	2614  E8500/E8501 Reserved Registers",
+"	2615  E8500/E8501 Miscellaneous Registers",
+"	2617  E8500/E8501 Reserved Registers",
+"	2618  E8500/E8501 Reserved Registers",
+"	2619  E8500/E8501 Reserved Registers",
+"	261a  E8500/E8501 Reserved Registers",
+"	261b  E8500/E8501 Reserved Registers",
+"	261c  E8500/E8501 Reserved Registers",
+"	261d  E8500/E8501 Reserved Registers",
+"	261e  E8500/E8501 Reserved Registers",
+"	2620  E8500/E8501 eXternal Memory Bridge",
+"	2621  E8500/E8501 XMB Miscellaneous Registers",
+"	2622  E8500/E8501 XMB Memory Interleaving Registers",
+"	2623  E8500/E8501 XMB DDR Initialization and Calibration",
+"	2624  E8500/E8501 XMB Reserved Registers",
+"	2625  E8500/E8501 XMB Reserved Registers",
+"	2626  E8500/E8501 XMB Reserved Registers",
+"	2627  E8500/E8501 XMB Reserved Registers",
+"	2640  82801FB/FR (ICH6/ICH6R) LPC Interface Bridge",
+"		1462 7028  915P/G Neo2",
+"		1734 105c  Scenic W620",
+"	2641  82801FBM (ICH6M) LPC Interface Bridge",
+"		103c 099c  NX6110/NC6120",
+"	2642  82801FW/FRW (ICH6W/ICH6RW) LPC Interface Bridge",
+"	2651  82801FB/FW (ICH6/ICH6W) SATA Controller",
+"		1028 0179  Optiplex GX280",
+"		1043 2601  P5GD1-VW Mainboard",
+"		1734 105c  Scenic W620",
+"		8086 4147  D915GAG Motherboard",
+"	2652  82801FR/FRW (ICH6R/ICH6RW) SATA Controller",
+"		1462 7028  915P/G Neo2",
+"	2653  82801FBM (ICH6M) SATA Controller",
+"	2658  82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #1",
+"		1028 0179  Optiplex GX280",
+"		103c 099c  NX6110/NC6120",
+"		1043 80a6  P5GD1-VW Mainboard",
+"		1458 2558  GA-8I915ME-G Mainboard",
+"		1462 7028  915P/G Neo2",
+"		1734 105c  Scenic W620",
+"	2659  82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #2",
+"		1028 0179  Optiplex GX280",
+"		103c 099c  NX6110/NC6120",
+"		1043 80a6  P5GD1-VW Mainboard",
+"		1458 2659  GA-8I915ME-G Mainboard",
+"		1462 7028  915P/G Neo2",
+"		1734 105c  Scenic W620",
+"	265a  82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #3",
+"		1028 0179  Optiplex GX280",
+"		103c 099c  NX6110/NC6120",
+"		1043 80a6  P5GD1-VW Mainboard",
+"		1458 265a  GA-8I915ME-G Mainboard",
+"		1462 7028  915P/G Neo2",
+"		1734 105c  Scenic W620",
+"	265b  82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #4",
+"		1028 0179  Optiplex GX280",
+"		103c 099c  NX6110/NC6120",
+"		1043 80a6  P5GD1-VW Mainboard",
+"		1458 265a  GA-8I915ME-G Mainboard",
+"		1462 7028  915P/G Neo2",
+"		1734 105c  Scenic W620",
+"	265c  82801FB/FBM/FR/FW/FRW (ICH6 Family) USB2 EHCI Controller",
+"		1028 0179  Optiplex GX280",
+"		103c 099c  NX6110/NC6120",
+"		1043 80a6  P5GD1-VW Mainboard",
+"		1458 5006  GA-8I915ME-G Mainboard",
+"		1462 7028  915P/G Neo2",
+"		1734 105c  Scenic W620",
+"	2660  82801FB/FBM/FR/FW/FRW (ICH6 Family) PCI Express Port 1",
+"		103c 099c  NX6110/NC6120",
+"	2662  82801FB/FBM/FR/FW/FRW (ICH6 Family) PCI Express Port 2",
+"	2664  82801FB/FBM/FR/FW/FRW (ICH6 Family) PCI Express Port 3",
+"	2666  82801FB/FBM/FR/FW/FRW (ICH6 Family) PCI Express Port 4",
+"	2668  82801FB/FBM/FR/FW/FRW (ICH6 Family) High Definition Audio Controller",
+"		1043 814e  P5GD1-VW Mainboard",
+"	266a  82801FB/FBM/FR/FW/FRW (ICH6 Family) SMBus Controller",
+"		1028 0179  Optiplex GX280",
+"		1043 80a6  P5GD1-VW Mainboard",
+"		1458 266a  GA-8I915ME-G Mainboard",
+"		1462 7028  915P/G Neo2",
+"		1734 105c  Scenic W620",
+"	266c  82801FB/FBM/FR/FW/FRW (ICH6 Family) LAN Controller",
+"	266d  82801FB/FBM/FR/FW/FRW (ICH6 Family) AC'97 Modem Controller",
+"		1025 006a  Conexant AC'97 CoDec (in Acer TravelMate 2410 serie laptop)",
+"		103c 099c  NX6110/NC6120",
+"	266e  82801FB/FBM/FR/FW/FRW (ICH6 Family) AC'97 Audio Controller",
+"		1025 006a  Realtek ALC 655 codec (in Acer TravelMate 2410 serie laptop)",
+"		1028 0179  Optiplex GX280",
+"		1028 0182  Latitude D610 Laptop",
+"		1028 0188  Inspiron 6000 laptop",
+"		103c 0944  Compaq NC6220",
+"		103c 099c  NX6110/NC6120",
+"		103c 3006  DC7100 SFF(DX878AV)",
+"		1458 a002  GA-8I915ME-G Mainboard",
+"		152d 0745  Packard Bell A8550 Laptop",
+"		1734 105a  Scenic W620",
+"	266f  82801FB/FBM/FR/FW/FRW (ICH6 Family) IDE Controller",
+"		103c 099c  NX6110/NC6120",
+"		1043 80a6  P5GD1-VW Mainboard",
+"		1458 266f  GA-8I915ME-G Mainboard",
+"		1462 7028  915P/G Neo2",
+"		1734 105c  Scenic W620",
+"	2670  Enterprise Southbridge LPC",
+"	2680  Enterprise Southbridge SATA IDE",
+"	2681  Enterprise Southbridge SATA AHCI",
+"	2682  Enterprise Southbridge SATA RAID",
+"	2683  Enterprise Southbridge SATA RAID",
+"	2688  Enterprise Southbridge UHCI USB #1",
+"	2689  Enterprise Southbridge UHCI USB #2",
+"	268a  Enterprise Southbridge UHCI USB #3",
+"	268b  Enterprise Southbridge UHCI USB #4",
+"	268c  Enterprise Southbridge EHCI USB",
+"	2690  Enterprise Southbridge PCI Express Root Port 1",
+"	2692  Enterprise Southbridge PCI Express Root Port 2",
+"	2694  Enterprise Southbridge PCI Express Root Port 3",
+"	2696  Enterprise Southbridge PCI Express Root Port 4",
+"	2698  Enterprise Southbridge AC '97 Audio",
+"	2699  Enterprise Southbridge AC '97 Modem",
+"	269a  Enterprise Southbridge High Definition Audio",
+"	269b  Enterprise Southbridge SMBus",
+"	269e  Enterprise Southbridge PATA",
+"	2770  945G/GZ/P/PL Express Memory Controller Hub",
+"		8086 544e  DeskTop Board D945GTP",
+"	2771  945G/GZ/P/PL Express PCI Express Root Port",
+"	2772  945G/GZ Express Integrated Graphics Controller",
+"		8086 544e  DeskTop Board D945GTP",
+"	2774  955X Express Memory Controller Hub",
+"	2775  955X Express PCI Express Root Port",
+"	2776  945G/GZ Express Integrated Graphics Controller",
+"	2778  E7230 Memory Controller Hub",
+"	2779  E7230 PCI Express Root Port",
+"	277a  975X Express PCI Express Root Port",
+"	277c  975X Express Memory Controller Hub",
+"	277d  975X Express PCI Express Root Port",
+"	2782  82915G Express Chipset Family Graphics Controller",
+"		1043 2582  P5GD1-VW Mainboard",
+"		1734 105b  Scenic W620",
+"	2792  Mobile 915GM/GMS/910GML Express Graphics Controller",
+"		103c 099c  NX6110/NC6120",
+"		1043 1881  GMA 900 915GM Integrated Graphics",
+"	27a0  Mobile 945GM/PM/GMS/940GML and 945GT Express Memory Controller Hub",
+"	27a1  Mobile 945GM/PM/GMS/940GML and 945GT Express PCI Express Root Port",
+"	27a2  Mobile 945GM/GMS/940GML Express Integrated Graphics Controller",
+"	27a6  Mobile 945GM/GMS/940GML Express Integrated Graphics Controller",
+"	27b0  82801GH (ICH7DH) LPC Interface Bridge",
+"	27b8  82801GB/GR (ICH7 Family) LPC Interface Bridge",
+"		8086 544e  DeskTop Board D945GTP",
+"	27b9  82801GBM (ICH7-M) LPC Interface Bridge",
+"	27bd  82801GHM (ICH7-M DH) LPC Interface Bridge",
+"	27c0  82801GB/GR/GH (ICH7 Family) Serial ATA Storage Controller IDE",
+"		8086 544e  DeskTop Board D945GTP",
+"	27c1  82801GR/GH (ICH7 Family) Serial ATA Storage Controller AHCI",
+"	27c3  82801GR/GH (ICH7 Family) Serial ATA Storage Controller RAID",
+"	27c4  82801GBM/GHM (ICH7 Family) Serial ATA Storage Controller IDE",
+"	27c5  82801GBM/GHM (ICH7 Family) Serial ATA Storage Controller AHCI",
+"	27c6  82801GHM (ICH7-M DH) Serial ATA Storage Controller RAID",
+"	27c8  82801G (ICH7 Family) USB UHCI #1",
+"		8086 544e  DeskTop Board D945GTP",
+"	27c9  82801G (ICH7 Family) USB UHCI #2",
+"		8086 544e  DeskTop Board D945GTP",
+"	27ca  82801G (ICH7 Family) USB UHCI #3",
+"		8086 544e  DeskTop Board D945GTP",
+"	27cb  82801G (ICH7 Family) USB UHCI #4",
+"		8086 544e  DeskTop Board D945GTP",
+"	27cc  82801G (ICH7 Family) USB2 EHCI Controller",
+"		8086 544e  DeskTop Board D945GTP",
+"	27d0  82801G (ICH7 Family) PCI Express Port 1",
+"	27d2  82801G (ICH7 Family) PCI Express Port 2",
+"	27d4  82801G (ICH7 Family) PCI Express Port 3",
+"	27d6  82801G (ICH7 Family) PCI Express Port 4",
+"	27d8  82801G (ICH7 Family) High Definition Audio Controller",
+"	27da  82801G (ICH7 Family) SMBus Controller",
+"		8086 544e  DeskTop Board D945GTP",
+"	27dc  82801G (ICH7 Family) LAN Controller",
+"		8086 308d  DeskTop Board D945GTP",
+"	27dd  82801G (ICH7 Family) AC'97 Modem Controller",
+"	27de  82801G (ICH7 Family) AC'97 Audio Controller",
+"	27df  82801G (ICH7 Family) IDE Controller",
+"		8086 544e  DeskTop Board D945GTP",
+"	27e0  82801GR/GH/GHM (ICH7 Family) PCI Express Port 5",
+"	27e2  82801GR/GH/GHM (ICH7 Family) PCI Express Port 6",
+"	2810  LPC Interface Controller",
+"	2811  Mobile LPC Interface Controller",
+"	2812  LPC Interface Controller",
+"	2814  LPC Interface Controller",
+"	2815  Mobile LPC Interface Controller",
+"	2820  SATA Controller 1 IDE",
+"	2821  SATA Controller AHCI",
+"	2822  SATA Controller RAID",
+"	2824  SATA Controller AHCI",
+"	2825  SATA Controller 2 IDE",
+"	2828  Mobile SATA Controller IDE",
+"	2829  Mobile SATA Controller AHCI",
+"	282a  Mobile SATA Controller RAID",
+"	2830  USB UHCI Controller #1",
+"	2831  USB UHCI Controller #2",
+"	2832  USB UHCI Controller #3",
+"	2834  USB UHCI Controller #4",
+"	2835  USB UHCI Controller #5",
+"	2836  USB2 EHCI Controller #1",
+"	283a  USB2 EHCI Controller #2",
+"	283e  SMBus Controller",
+"	283f  PCI Express Port 1",
+"	2841  PCI Express Port 2",
+"	2843  PCI Express Port 3",
+"	2845  PCI Express Port 4",
+"	2847  PCI Express Port 5",
+"	2849  PCI Express Port 6",
+"	284b  HD Audio Controller",
+"	284f  Thermal Subsystem",
+"	2850  Mobile IDE Controller",
+"	2970  Memory Controller Hub",
+"	2971  PCI Express Root Port",
+"	2972  Integrated Graphics Controller",
+"	2973  Integrated Graphics Controller",
+"	2974  HECI Controller",
+"	2976  PT IDER Controller",
+"	2977  KT Controller",
+"	2990  Memory Controller Hub",
+"	2991  PCI Express Root Port",
+"	2992  Integrated Graphics Controller",
+"	2993  Integrated Graphics Controller",
+"	2994  HECI Controller",
+"	2995  HECI Controller",
+"	2996  PT IDER Controller",
+"	2997  KT Controller",
+"	29a0  Memory Controller Hub",
+"	29a1  PCI Express Root Port",
+"	29a2  Integrated Graphics Controller",
+"	29a3  Integrated Graphics Controller",
+"	29a4  HECI Controller",
+"	29a5  HECI Controller",
+"	29a6  PT IDER Controller",
+"	29a7  KT Controller",
+"	2a00  Mobile Memory Controller Hub",
+"	2a01  Mobile PCI Express Root Port",
+"	2a02  Mobile Integrated Graphics Controller",
+"	2a03  Mobile Integrated Graphics Controller",
+"	3092  Integrated RAID",
+"	3200  GD31244 PCI-X SATA HBA",
+"	3340  82855PM Processor to I/O Controller",
+"		1025 005a  TravelMate 290",
+"		103c 088c  NC8000 laptop",
+"		103c 0890  NC6000 laptop",
+"	3341  82855PM Processor to AGP Controller",
+"	3500  Enterprise Southbridge PCI Express Upstream Port",
+"	3501  Enterprise Southbridge PCI Express Upstream Port",
+"	3504  Enterprise Southbridge IOxAPIC",
+"	3505  Enterprise Southbridge IOxAPIC",
+"	350c  Enterprise Southbridge PCI Express to PCI-X Bridge",
+"	350d  Enterprise Southbridge PCI Express to PCI-X Bridge",
+"	3510  Enterprise Southbridge PCI Express Downstream Port E1",
+"	3511  Enterprise Southbridge PCI Express Downstream Port E1",
+"	3514  Enterprise Southbridge PCI Express Downstream Port E2",
+"	3515  Enterprise Southbridge PCI Express Downstream Port E2",
+"	3518  Enterprise Southbridge PCI Express Downstream Port E3",
+"	3519  Enterprise Southbridge PCI Express Downstream Port E3",
+"	3575  82830 830 Chipset Host Bridge",
+"		0e11 0030  Evo N600c",
+"		1014 021d  ThinkPad A/T/X Series",
+"		104d 80e7  VAIO PCG-GR214EP/GR214MP/GR215MP/GR314MP/GR315MP",
+"	3576  82830 830 Chipset AGP Bridge",
+"	3577  82830 CGC [Chipset Graphics Controller]",
+"		1014 0513  ThinkPad A/T/X Series",
+"	3578  82830 830 Chipset Host Bridge",
+"	3580  82852/82855 GM/GME/PM/GMV Processor to I/O Controller",
+"		1028 0139  Latitude D400",
+"		1028 0163  Latitude D505",
+"		1028 0196  Inspiron 5160",
+"		1734 1055  Amilo M1420",
+"		4c53 10b0  CL9 mainboard",
+"		4c53 10e0  PSL09 PrPMC",
+"	3581  82852/82855 GM/GME/PM/GMV Processor to AGP Controller",
+"		1734 1055  Amilo M1420",
+"	3582  82852/855GM Integrated Graphics Device",
+"		1028 0139  Latitude D400",
+"		1028 0163  Latitude D505",
+"		4c53 10b0  CL9 mainboard",
+"		4c53 10e0  PSL09 PrPMC",
+"	3584  82852/82855 GM/GME/PM/GMV Processor to I/O Controller",
+"		1028 0139  Latitude D400",
+"		1028 0163  Latitude D505",
+"		1028 0196  Inspiron 5160",
+"		1734 1055  Amilo M1420",
+"		4c53 10b0  CL9 mainboard",
+"		4c53 10e0  PSL09 PrPMC",
+"	3585  82852/82855 GM/GME/PM/GMV Processor to I/O Controller",
+"		1028 0139  Latitude D400",
+"		1028 0163  Latitude D505",
+"		1028 0196  Inspiron 5160",
+"		1734 1055  Amilo M1420",
+"		4c53 10b0  CL9 mainboard",
+"		4c53 10e0  PSL09 PrPMC",
+"	3590  E7520 Memory Controller Hub",
+"		1028 019a  PowerEdge SC1425",
+"		1734 103e  Primergy RX300 S2",
+"		4c53 10d0  Telum ASLP10 Processor AMC",
+"	3591  E7525/E7520 Error Reporting Registers",
+"		1028 0169  Precision 470",
+"		4c53 10d0  Telum ASLP10 Processor AMC",
+"	3592  E7320 Memory Controller Hub",
+"	3593  E7320 Error Reporting Registers",
+"	3594  E7520 DMA Controller",
+"		4c53 10d0  Telum ASLP10 Processor AMC",
+"	3595  E7525/E7520/E7320 PCI Express Port A",
+"	3596  E7525/E7520/E7320 PCI Express Port A1",
+"	3597  E7525/E7520 PCI Express Port B",
+"	3598  E7520 PCI Express Port B1",
+"	3599  E7520 PCI Express Port C",
+"	359a  E7520 PCI Express Port C1",
+"	359b  E7525/E7520/E7320 Extended Configuration Registers",
+"	359e  E7525 Memory Controller Hub",
+"		1028 0169  Precision 470",
+"	4220  PRO/Wireless 2200BG Network Connection",
+"	4222  PRO/Wireless 3945ABG Network Connection",
+"		8086 1005  PRO/Wireless 3945BG Network Connection",
+"		8086 1034  PRO/Wireless 3945BG Network Connection",
+"		8086 1044  PRO/Wireless 3945BG Network Connection",
+"	4223  PRO/Wireless 2915ABG Network Connection",
+"		1351 103c  Compaq NC6220",
+"	4224  PRO/Wireless 2915ABG Network Connection",
+"	4227  PRO/Wireless 3945ABG Network Connection",
+"		8086 1011  Thinkpad X60s",
+"		8086 1014  PRO/Wireless 3945BG Network Connection",
+"	5200  EtherExpress PRO/100 Intelligent Server",
+"	5201  EtherExpress PRO/100 Intelligent Server",
+"		8086 0001  EtherExpress PRO/100 Server Ethernet Adapter",
+"	530d  80310 IOP [IO Processor]",
+"	7000  82371SB PIIX3 ISA [Natoma/Triton II]",
+"	7010  82371SB PIIX3 IDE [Natoma/Triton II]",
+"	7020  82371SB PIIX3 USB [Natoma/Triton II]",
+"	7030  430VX - 82437VX TVX [Triton VX]",
+"	7050  Intercast Video Capture Card",
+"	7051  PB 642365-003 (Business Video Conferencing Card)",
+"	7100  430TX - 82439TX MTXC",
+"	7110  82371AB/EB/MB PIIX4 ISA",
+"		15ad 1976  virtualHW v3",
+"	7111  82371AB/EB/MB PIIX4 IDE",
+"		15ad 1976  virtualHW v3",
+"	7112  82371AB/EB/MB PIIX4 USB",
+"		15ad 1976  virtualHW v3",
+"	7113  82371AB/EB/MB PIIX4 ACPI",
+"		15ad 1976  virtualHW v3",
+"	7120  82810 GMCH [Graphics Memory Controller Hub]",
+"		4c53 1040  CL7 mainboard",
+"		4c53 1060  PC7 mainboard",
+"	7121  82810 CGC [Chipset Graphics Controller]",
+"		4c53 1040  CL7 mainboard",
+"		4c53 1060  PC7 mainboard",
+"		8086 4341  Cayman (CA810) Mainboard",
+"	7122  82810 DC-100 GMCH [Graphics Memory Controller Hub]",
+"	7123  82810 DC-100 CGC [Chipset Graphics Controller]",
+"	7124  82810E DC-133 GMCH [Graphics Memory Controller Hub]",
+"	7125  82810E DC-133 CGC [Chipset Graphics Controller]",
+"	7126  82810 DC-133 System and Graphics Controller",
+"	7128  82810-M DC-100 System and Graphics Controller",
+"	712a  82810-M DC-133 System and Graphics Controller",
+"	7180  440LX/EX - 82443LX/EX Host bridge",
+"	7181  440LX/EX - 82443LX/EX AGP bridge",
+"	7190  440BX/ZX/DX - 82443BX/ZX/DX Host bridge",
+"		0e11 0500  Armada 1750 Laptop System Chipset",
+"		0e11 b110  Armada M700/E500",
+"		1028 008e  PowerEdge 1300 mainboard",
+"		1179 0001  Toshiba Tecra 8100 Laptop System Chipset",
+"		15ad 1976  virtualHW v3",
+"		4c53 1050  CT7 mainboard",
+"		4c53 1051  CE7 mainboard",
+"	7191  440BX/ZX/DX - 82443BX/ZX/DX AGP bridge",
+"		1028 008e  PowerEdge 1300 mainboard",
+"	7192  440BX/ZX/DX - 82443BX/ZX/DX Host bridge (AGP disabled)",
+"		0e11 0460  Armada 1700 Laptop System Chipset",
+"		4c53 1000  CC7/CR7/CP7/VC7/VP7/VR7 mainboard",
+"	7194  82440MX Host Bridge",
+"		1033 0000  Versa Note Vxi",
+"		4c53 10a0  CA3/CR3 mainboard",
+"	7195  82440MX AC'97 Audio Controller",
+"		1033 80cc  Versa Note VXi",
+"		10cf 1099  QSound_SigmaTel Stac97 PCI Audio",
+"		11d4 0040  SoundMAX Integrated Digital Audio",
+"		11d4 0048  SoundMAX Integrated Digital Audio",
+"	7196  82440MX AC'97 Modem Controller",
+"	7198  82440MX ISA Bridge",
+"	7199  82440MX EIDE Controller",
+"	719a  82440MX USB Universal Host Controller",
+"	719b  82440MX Power Management Controller",
+"	71a0  440GX - 82443GX Host bridge",
+"		4c53 1050  CT7 mainboard",
+"		4c53 1051  CE7 mainboard",
+"	71a1  440GX - 82443GX AGP bridge",
+"	71a2  440GX - 82443GX Host bridge (AGP disabled)",
+"		4c53 1000  CC7/CR7/CP7/VC7/VP7/VR7 mainboard",
+"	7600  82372FB PIIX5 ISA",
+"	7601  82372FB PIIX5 IDE",
+"	7602  82372FB PIIX5 USB",
+"	7603  82372FB PIIX5 SMBus",
+"	7800  82740 (i740) AGP Graphics Accelerator",
+"		003d 0008  Starfighter AGP",
+"		003d 000b  Starfighter AGP",
+"		1092 0100  Stealth II G460",
+"		10b4 201a  Lightspeed 740",
+"		10b4 202f  Lightspeed 740",
+"		8086 0000  Terminator 2x/i",
+"		8086 0100  Intel740 Graphics Accelerator",
+"	84c4  450KX/GX [Orion] - 82454KX/GX PCI bridge",
+"	84c5  450KX/GX [Orion] - 82453KX/GX Memory controller",
+"	84ca  450NX - 82451NX Memory & I/O Controller",
+"	84cb  450NX - 82454NX/84460GX PCI Expander Bridge",
+"	84e0  460GX - 84460GX System Address Controller (SAC)",
+"	84e1  460GX - 84460GX System Data Controller (SDC)",
+"	84e2  460GX - 84460GX AGP Bridge (GXB function 2)",
+"	84e3  460GX - 84460GX Memory Address Controller (MAC)",
+"	84e4  460GX - 84460GX Memory Data Controller (MDC)",
+"	84e6  460GX - 82466GX Wide and fast PCI eXpander Bridge (WXB)",
+"	84ea  460GX - 84460GX AGP Bridge (GXB function 1)",
+"	8500  IXP4XX Intel Network Processor (IXP420/421/422/425/IXC1100)",
+"		1993 0ded  mGuard-PCI AV#2",
+"		1993 0dee  mGuard-PCI AV#1",
+"		1993 0def  mGuard-PCI AV#0",
+"	9000  IXP2000 Family Network Processor",
+"	9001  IXP2400 Network Processor",
+"	9002  IXP2300 Network Processor",
+"	9004  IXP2800 Network Processor",
+"	9621  Integrated RAID",
+"	9622  Integrated RAID",
+"	9641  Integrated RAID",
+"	96a1  Integrated RAID",
+"	b152  21152 PCI-to-PCI Bridge",
+"	b154  21154 PCI-to-PCI Bridge",
+"	b555  21555 Non transparent PCI-to-PCI Bridge",
+"		12d9 000a  PCI VoIP Gateway",
+"		4c53 1050  CT7 mainboard",
+"		4c53 1051  CE7 mainboard",
+"		e4bf 1000  CC8-1-BLUES",
+"8401  TRENDware International Inc.",
+"8800  Trigem Computer Inc.",
+"	2008  Video assistent component",
+"8866  T-Square Design Inc.",
+"8888  Silicon Magic",
+"8912  TRX",
+"8c4a  Winbond",
+"	1980  W89C940 misprogrammed [ne2k]",
+"8e0e  Computone Corporation",
+"8e2e  KTI",
+"	3000  ET32P2",
+"9004  Adaptec",
+"	0078  AHA-2940U_CN",
+"	1078  AIC-7810",
+"	1160  AIC-1160 [Family Fibre Channel Adapter]",
+"	2178  AIC-7821",
+"	3860  AHA-2930CU",
+"	3b78  AHA-4844W/4844UW",
+"	5075  AIC-755x",
+"	5078  AHA-7850",
+"		9004 7850  AHA-2904/Integrated AIC-7850",
+"	5175  AIC-755x",
+"	5178  AIC-7851",
+"	5275  AIC-755x",
+"	5278  AIC-7852",
+"	5375  AIC-755x",
+"	5378  AIC-7850",
+"	5475  AIC-755x",
+"	5478  AIC-7850",
+"	5575  AVA-2930",
+"	5578  AIC-7855",
+"	5647  ANA-7711 TCP Offload Engine",
+"		9004 7710  ANA-7711F TCP Offload Engine - Optical",
+"		9004 7711  ANA-7711LP TCP Offload Engine - Copper",
+"	5675  AIC-755x",
+"	5678  AIC-7856",
+"	5775  AIC-755x",
+"	5778  AIC-7850",
+"	5800  AIC-5800",
+"	5900  ANA-5910/5930/5940 ATM155 & 25 LAN Adapter",
+"	5905  ANA-5910A/5930A/5940A ATM Adapter",
+"	6038  AIC-3860",
+"	6075  AIC-1480 / APA-1480",
+"		9004 7560  AIC-1480 / APA-1480 Cardbus",
+"	6078  AIC-7860",
+"	6178  AIC-7861",
+"		9004 7861  AHA-2940AU Single",
+"	6278  AIC-7860",
+"	6378  AIC-7860",
+"	6478  AIC-786x",
+"	6578  AIC-786x",
+"	6678  AIC-786x",
+"	6778  AIC-786x",
+"	6915  ANA620xx/ANA69011A",
+"		9004 0008  ANA69011A/TX 10/100",
+"		9004 0009  ANA69011A/TX 10/100",
+"		9004 0010  ANA62022 2-port 10/100",
+"		9004 0018  ANA62044 4-port 10/100",
+"		9004 0019  ANA62044 4-port 10/100",
+"		9004 0020  ANA62022 2-port 10/100",
+"		9004 0028  ANA69011A/TX 10/100",
+"		9004 8008  ANA69011A/TX 64 bit 10/100",
+"		9004 8009  ANA69011A/TX 64 bit 10/100",
+"		9004 8010  ANA62022 2-port 64 bit 10/100",
+"		9004 8018  ANA62044 4-port 64 bit 10/100",
+"		9004 8019  ANA62044 4-port 64 bit 10/100",
+"		9004 8020  ANA62022 2-port 64 bit 10/100",
+"		9004 8028  ANA69011A/TX 64 bit 10/100",
+"	7078  AHA-294x / AIC-7870",
+"	7178  AHA-2940/2940W / AIC-7871",
+"	7278  AHA-3940/3940W / AIC-7872",
+"	7378  AHA-3985 / AIC-7873",
+"	7478  AHA-2944/2944W / AIC-7874",
+"	7578  AHA-3944/3944W / AIC-7875",
+"	7678  AHA-4944W/UW / AIC-7876",
+"	7710  ANA-7711F Network Accelerator Card (NAC) - Optical",
+"	7711  ANA-7711C Network Accelerator Card (NAC) - Copper",
+"	7778  AIC-787x",
+"	7810  AIC-7810",
+"	7815  AIC-7815 RAID+Memory Controller IC",
+"		9004 7815  ARO-1130U2 RAID Controller",
+"		9004 7840  AIC-7815 RAID+Memory Controller IC",
+"	7850  AIC-7850",
+"	7855  AHA-2930",
+"	7860  AIC-7860",
+"	7870  AIC-7870",
+"	7871  AHA-2940",
+"	7872  AHA-3940",
+"	7873  AHA-3980",
+"	7874  AHA-2944",
+"	7880  AIC-7880P",
+"	7890  AIC-7890",
+"	7891  AIC-789x",
+"	7892  AIC-789x",
+"	7893  AIC-789x",
+"	7894  AIC-789x",
+"	7895  AHA-2940U/UW / AHA-39xx / AIC-7895",
+"		9004 7890  AHA-2940U/2940UW Dual AHA-394xAU/AUW/AUWD AIC-7895B",
+"		9004 7891  AHA-2940U/2940UW Dual",
+"		9004 7892  AHA-3940AU/AUW/AUWD/UWD",
+"		9004 7894  AHA-3944AUWD",
+"		9004 7895  AHA-2940U/2940UW Dual AHA-394xAU/AUW/AUWD AIC-7895B",
+"		9004 7896  AHA-2940U/2940UW Dual AHA-394xAU/AUW/AUWD AIC-7895B",
+"		9004 7897  AHA-2940U/2940UW Dual AHA-394xAU/AUW/AUWD AIC-7895B",
+"	7896  AIC-789x",
+"	7897  AIC-789x",
+"	8078  AIC-7880U",
+"		9004 7880  AIC-7880P Ultra/Ultra Wide SCSI Chipset",
+"	8178  AHA-2940U/UW/D / AIC-7881U",
+"		9004 7881  AHA-2940UW SCSI Host Adapter",
+"	8278  AHA-3940U/UW/UWD / AIC-7882U",
+"	8378  AHA-3940U/UW / AIC-7883U",
+"	8478  AHA-2944UW / AIC-7884U",
+"	8578  AHA-3944U/UWD / AIC-7885",
+"	8678  AHA-4944UW / AIC-7886",
+"	8778  AHA-2940UW Pro / AIC-788x",
+"		9004 7887  2940UW Pro Ultra-Wide SCSI Controller",
+"	8878  AHA-2930UW / AIC-7888",
+"		9004 7888  AHA-2930UW SCSI Controller",
+"	8b78  ABA-1030",
+"	ec78  AHA-4944W/UW",
+"9005  Adaptec",
+"	0010  AHA-2940U2/U2W",
+"		9005 2180  AHA-2940U2 SCSI Controller",
+"		9005 8100  AHA-2940U2B SCSI Controller",
+"		9005 a100  AHA-2940U2B SCSI Controller",
+"		9005 a180  AHA-2940U2W SCSI Controller",
+"		9005 e100  AHA-2950U2B SCSI Controller",
+"	0011  AHA-2930U2",
+"	0013  78902",
+"		9005 0003  AAA-131U2 Array1000 1 Channel RAID Controller",
+"		9005 000f  AIC7890_ARO",
+"	001f  AHA-2940U2/U2W / 7890/7891",
+"		9005 000f  2940U2W SCSI Controller",
+"		9005 a180  2940U2W SCSI Controller",
+"	0020  AIC-7890",
+"	002f  AIC-7890",
+"	0030  AIC-7890",
+"	003f  AIC-7890",
+"	0050  AHA-3940U2x/395U2x",
+"		9005 f500  AHA-3950U2B",
+"		9005 ffff  AHA-3950U2B",
+"	0051  AHA-3950U2D",
+"		9005 b500  AHA-3950U2D",
+"	0053  AIC-7896 SCSI Controller",
+"		9005 ffff  AIC-7896 SCSI Controller mainboard implementation",
+"	005f  AIC-7896U2/7897U2",
+"	0080  AIC-7892A U160/m",
+"		0e11 e2a0  Compaq 64-Bit/66MHz Wide Ultra3 SCSI Adapter",
+"		9005 6220  AHA-29160C",
+"		9005 62a0  29160N Ultra160 SCSI Controller",
+"		9005 e220  29160LP Low Profile Ultra160 SCSI Controller",
+"		9005 e2a0  29160 Ultra160 SCSI Controller",
+"	0081  AIC-7892B U160/m",
+"		9005 62a1  19160 Ultra160 SCSI Controller",
+"	0083  AIC-7892D U160/m",
+"	008f  AIC-7892P U160/m",
+"		1179 0001  Magnia Z310",
+"		15d9 9005  Onboard SCSI Host Adapter",
+"	00c0  AHA-3960D / AIC-7899A U160/m",
+"		0e11 f620  Compaq 64-Bit/66MHz Dual Channel Wide Ultra3 SCSI Adapter",
+"		9005 f620  AHA-3960D U160/m",
+"	00c1  AIC-7899B U160/m",
+"	00c3  AIC-7899D U160/m",
+"	00c5  RAID subsystem HBA",
+"		1028 00c5  PowerEdge 2400,2500,2550,4400",
+"	00cf  AIC-7899P U160/m",
+"		1028 00ce  PowerEdge 1400",
+"		1028 00d1  PowerEdge 2550",
+"		1028 00d9  PowerEdge 2500",
+"		10f1 2462  Thunder K7 S2462",
+"		15d9 9005  Onboard SCSI Host Adapter",
+"		8086 3411  SDS2 Mainboard",
+"	0241  Serial ATA II RAID 1420SA",
+"	0250  ServeRAID Controller",
+"		1014 0279  ServeRAID-xx",
+"		1014 028c  ServeRAID-xx",
+"	0279  ServeRAID 6M",
+"	0283  AAC-RAID",
+"		9005 0283  Catapult",
+"	0284  AAC-RAID",
+"		9005 0284  Tomcat",
+"	0285  AAC-RAID",
+"		0e11 0295  SATA 6Ch (Bearcat)",
+"		1014 02f2  ServeRAID 8i",
+"		1028 0287  PowerEdge Expandable RAID Controller 320/DC",
+"		1028 0291  CERC SATA RAID 2 PCI SATA 6ch (DellCorsair)",
+"		103c 3227  AAR-2610SA",
+"		17aa 0286  Legend S220 (Legend Crusader)",
+"		17aa 0287  Legend S230 (Legend Vulcan)",
+"		9005 0285  2200S (Vulcan)",
+"		9005 0286  2120S (Crusader)",
+"		9005 0287  2200S (Vulcan-2m)",
+"		9005 0288  3230S (Harrier)",
+"		9005 0289  3240S (Tornado)",
+"		9005 028a  ASR-2020ZCR",
+"		9005 028b  ASR-2025ZCR (Terminator)",
+"		9005 028e  ASR-2020SA (Skyhawk)",
+"		9005 028f  ASR-2025SA",
+"		9005 0290  AAR-2410SA PCI SATA 4ch (Jaguar II)",
+"		9005 0292  AAR-2810SA PCI SATA 8ch (Corsair-8)",
+"		9005 0293  AAR-21610SA PCI SATA 16ch (Corsair-16)",
+"		9005 0294  ESD SO-DIMM PCI-X SATA ZCR (Prowler)",
+"		9005 0296  ASR-2240S",
+"		9005 0297  ASR-4005SAS",
+"		9005 0298  ASR-4000SAS",
+"		9005 0299  ASR-4800SAS",
+"		9005 029a  4805SAS",
+"	0286  AAC-RAID (Rocket)",
+"		1014 9540  ServeRAID 8k/8k-l4",
+"		1014 9580  ServeRAID 8k/8k-l8",
+"		9005 028c  ASR-2230S + ASR-2230SLP PCI-X (Lancer)",
+"		9005 028d  ASR-2130S",
+"		9005 029b  ASR-2820SA",
+"		9005 029c  ASR-2620SA",
+"		9005 029d  ASR-2420SA",
+"		9005 029e  ICP ICP9024R0",
+"		9005 029f  ICP ICP9014R0",
+"		9005 02a0  ICP ICP9047MA",
+"		9005 02a1  ICP ICP9087MA",
+"		9005 02a2  3800SAS",
+"		9005 02a3  ICP ICP5445AU",
+"		9005 02a4  ICP ICP5085LI",
+"		9005 02a5  ICP ICP5085BR",
+"		9005 02a6  ICP9067MA",
+"		9005 02a7  AAR-2830SA",
+"		9005 02a8  AAR-2430SA",
+"		9005 02a9  ICP5087AU",
+"		9005 02aa  ICP5047AU",
+"		9005 0800  Callisto",
+"	0500  Obsidian chipset SCSI controller",
+"		1014 02c1  PCI-X DDR 3Gb SAS Adapter (572A/572C)",
+"		1014 02c2  PCI-X DDR 3Gb SAS RAID Adapter (572B/572D)",
+"	0503  Scamp chipset SCSI controller",
+"		1014 02bf  Quad Channel PCI-X DDR U320 SCSI RAID Adapter (571E)",
+"		1014 02d5  Quad Channel PCI-X DDR U320 SCSI RAID Adapter (571F)",
+"	0910  AUA-3100B",
+"	091e  AUA-3100B",
+"	8000  ASC-29320A U320",
+"	800f  AIC-7901 U320",
+"	8010  ASC-39320 U320",
+"	8011  ASC-39320D",
+"		0e11 00ac  ASC-39320D U320",
+"		9005 0041  ASC-39320D U320",
+"	8012  ASC-29320 U320",
+"	8013  ASC-29320B U320",
+"	8014  ASC-29320LP U320",
+"	8015  ASC-39320B U320",
+"	8016  ASC-39320A U320",
+"	8017  ASC-29320ALP U320",
+"	801c  ASC-39320D U320",
+"	801d  AIC-7902B U320",
+"	801e  AIC-7901A U320",
+"	801f  AIC-7902 U320",
+"		1734 1011  Primergy RX300",
+"	8080  ASC-29320A U320 w/HostRAID",
+"	808f  AIC-7901 U320 w/HostRAID",
+"	8090  ASC-39320 U320 w/HostRAID",
+"	8091  ASC-39320D U320 w/HostRAID",
+"	8092  ASC-29320 U320 w/HostRAID",
+"	8093  ASC-29320B U320 w/HostRAID",
+"	8094  ASC-29320LP U320 w/HostRAID",
+"	8095  ASC-39320(B) U320 w/HostRAID",
+"	8096  ASC-39320A U320 w/HostRAID",
+"	8097  ASC-29320ALP U320 w/HostRAID",
+"	809c  ASC-39320D(B) U320 w/HostRAID",
+"	809d  AIC-7902(B) U320 w/HostRAID",
+"	809e  AIC-7901A U320 w/HostRAID",
+"	809f  AIC-7902 U320 w/HostRAID",
+"907f  Atronics",
+"	2015  IDE-2015PL",
+"919a  Gigapixel Corp",
+"9412  Holtek",
+"	6565  6565",
+"9699  Omni Media Technology Inc",
+"	6565  6565",
+"9710  NetMos Technology",
+"	7780  USB IRDA-port",
+"	9805  PCI 1 port parallel adapter",
+"	9815  PCI 9815 Multi-I/O Controller",
+"		1000 0020  2P0S (2 port parallel adaptor)",
+"	9835  PCI 9835 Multi-I/O Controller",
+"		1000 0002  2S (16C550 UART)",
+"		1000 0012  1P2S",
+"	9845  PCI 9845 Multi-I/O Controller",
+"		1000 0004  0P4S (4 port 16550A serial card)",
+"		1000 0006  0P6S (6 port 16550a serial card)",
+"	9855  PCI 9855 Multi-I/O Controller",
+"		1000 0014  1P4S",
+"9902  Stargen Inc.",
+"	0001  SG2010 PCI over Starfabric Bridge",
+"	0002  SG2010 PCI to Starfabric Gateway",
+"	0003  SG1010 Starfabric Switch and PCI Bridge",
+"a0a0  AOPEN Inc.",
+"a0f1  UNISYS Corporation",
+"a200  NEC Corporation",
+"a259  Hewlett Packard",
+"a25b  Hewlett Packard GmbH PL24-MKT",
+"a304  Sony",
+"a727  3Com Corporation",
+"	0013  3CRPAG175 Wireless PC Card",
+"aa42  Scitex Digital Video",
+"ac1e  Digital Receiver Technology Inc",
+"ac3d  Actuality Systems",
+"aecb  Adrienne Electronics Corporation",
+"	6250  VITC/LTC Timecode Reader card [PCI-VLTC/RDR]",
+"affe  Sirrix AG security technologies",
+"	dead  Sirrix.PCI4S0 4-port ISDN S0 interface",
+"b1b3  Shiva Europe Limited",
+"bd11  Pinnacle Systems, Inc. (Wrong ID)",
+"c001  TSI Telsys",
+"c0a9  Micron/Crucial Technology",
+"c0de  Motorola",
+"c0fe  Motion Engineering, Inc.",
+"ca50  Varian Australia Pty Ltd",
+"cafe  Chrysalis-ITS",
+"	0003  Luna K3 Hardware Security Module",
+"cccc  Catapult Communications",
+"cddd  Tyzx, Inc.",
+"	0101  DeepSea 1 High Speed Stereo Vision Frame Grabber",
+"	0200  DeepSea 2 High Speed Stereo Vision Frame Grabber",
+"d161  Digium, Inc.",
+"	0205  Wildcard TE205P",
+"	0210  Wildcard TE210P",
+"	0405  Wildcard TE405P Quad-Span togglable E1/T1/J1 card 5.0v",
+"	0406  Wildcard TE406P Quad-Span togglable E1/T1/J1 echo cancellation card 5.0v",
+"	0410  Wildcard TE410P Quad-Span togglable E1/T1/J1 card 3.3v",
+"	0411  Wildcard TE411P Quad-Span togglable E1/T1/J1 echo cancellation card 3.3v",
+"	2400  Wildcard TDM2400P",
+"d4d4  Dy4 Systems Inc",
+"	0601  PCI Mezzanine Card",
+"d531  I+ME ACTIA GmbH",
+"d84d  Exsys",
+"dead  Indigita Corporation",
+"deaf  Middle Digital Inc.",
+"	9050  PC Weasel Virtual VGA",
+"	9051  PC Weasel Serial Port",
+"	9052  PC Weasel Watchdog Timer",
+"e000  Winbond",
+"	e000  W89C940",
+"e159  Tiger Jet Network Inc.",
+"	0001  Tiger3XX Modem/ISDN interface",
+"		0059 0001  128k ISDN-S/T Adapter",
+"		0059 0003  128k ISDN-U Adapter",
+"		00a7 0001  TELES.S0/PCI 2.x ISDN Adapter",
+"		8086 0003  Digium X100P/X101P analogue PSTN FXO interface",
+"	0002  Tiger100APC ISDN chipset",
+"e4bf  EKF Elektronik GmbH",
+"e55e  Essence Technology, Inc.",
+"ea01  Eagle Technology",
+"	000a  PCI-773 Temperature Card",
+"	0032  PCI-730 & PC104P-30 Card",
+"	003e  PCI-762 Opto-Isolator Card",
+"	0041  PCI-763 Reed Relay Card",
+"	0043  PCI-769 Opto-Isolator Reed Relay Combo Card",
+"	0046  PCI-766 Analog Output Card",
+"	0052  PCI-703 Analog I/O Card",
+"	0800  PCI-800 Digital I/O Card",
+"ea60  RME",
+"	9896  Digi32",
+"	9897  Digi32 Pro",
+"	9898  Digi32/8",
+"eabb  Aashima Technology B.V.",
+"eace  Endace Measurement Systems, Ltd",
+"	3100  DAG 3.10 OC-3/OC-12",
+"	3200  DAG 3.2x OC-3/OC-12",
+"	320e  DAG 3.2E Fast Ethernet",
+"	340e  DAG 3.4E Fast Ethernet",
+"	341e  DAG 3.41E Fast Ethernet",
+"	3500  DAG 3.5 OC-3/OC-12",
+"	351c  DAG 3.5ECM Fast Ethernet",
+"	4100  DAG 4.10 OC-48",
+"	4110  DAG 4.11 OC-48",
+"	4220  DAG 4.2 OC-48",
+"	422e  DAG 4.2E Dual Gigabit Ethernet",
+"ec80  Belkin Corporation",
+"	ec00  F5D6000",
+"ecc0  Echo Digital Audio Corporation",
+"edd8  ARK Logic Inc",
+"	a091  1000PV [Stingray]",
+"	a099  2000PV [Stingray]",
+"	a0a1  2000MT",
+"	a0a9  2000MI",
+"f1d0  AJA Video",
+"	c0fe  Xena HS/HD-R",
+"	c0ff  Kona/Xena 2",
+"	cafe  Kona SD",
+"	cfee  Xena LS/SD-22-DA/SD-DA",
+"	dcaf  Kona HD",
+"	dfee  Xena HD-DA",
+"	efac  Xena SD-MM/SD-22-MM",
+"	facd  Xena HD-MM",
+"fa57  Interagon AS",
+"	0001  PMC [Pattern Matching Chip]",
+"fab7  Fabric7 Systems, Inc.",
+"febd  Ultraview Corp.",
+"feda  Broadcom Inc",
+"	a0fa  BCM4210 iLine10 HomePNA 2.0",
+"	a10e  BCM4230 iLine10 HomePNA 2.0",
+"fede  Fedetec Inc.",
+"	0003  TABIC PCI v3",
+"fffd  XenSource, Inc.",
+"	0101  PCI Event Channel Controller",
+"fffe  VMWare Inc",
+"	0405  Virtual SVGA 4.0",
+"	0710  Virtual SVGA",
+"ffff  Illegal Vendor ID",
+"C 00  Unclassified device",
+"	00  Non-VGA unclassified device",
+"	01  VGA compatible unclassified device",
+"C 01  Mass storage controller",
+"	00  SCSI storage controller",
+"	01  IDE interface",
+"	02  Floppy disk controller",
+"	03  IPI bus controller",
+"	04  RAID bus controller",
+"	05  ATA controller",
+"		20  ADMA single stepping",
+"		40  ADMA continuous operation",
+"	06  SATA controller",
+"		00  Vendor specific",
+"		01  AHCI 1.0",
+"	07  Serial Attached SCSI controller",
+"	80  Mass storage controller",
+"C 02  Network controller",
+"	00  Ethernet controller",
+"	01  Token ring network controller",
+"	02  FDDI network controller",
+"	03  ATM network controller",
+"	04  ISDN controller",
+"	80  Network controller",
+"C 03  Display controller",
+"	00  VGA compatible controller",
+"		00  VGA",
+"		01  8514",
+"	01  XGA compatible controller",
+"	02  3D controller",
+"	80  Display controller",
+"C 04  Multimedia controller",
+"	00  Multimedia video controller",
+"	01  Multimedia audio controller",
+"	02  Computer telephony device",
+"	03  Audio device",
+"	80  Multimedia controller",
+"C 05  Memory controller",
+"	00  RAM memory",
+"	01  FLASH memory",
+"	80  Memory controller",
+"C 06  Bridge",
+"	00  Host bridge",
+"	01  ISA bridge",
+"	02  EISA bridge",
+"	03  MicroChannel bridge",
+"	04  PCI bridge",
+"		00  Normal decode",
+"		01  Subtractive decode",
+"	05  PCMCIA bridge",
+"	06  NuBus bridge",
+"	07  CardBus bridge",
+"	08  RACEway bridge",
+"		00  Transparent mode",
+"		01  Endpoint mode",
+"	09  Semi-transparent PCI-to-PCI bridge",
+"		40  Primary bus towards host CPU",
+"		80  Secondary bus towards host CPU",
+"	0a  InfiniBand to PCI host bridge",
+"	80  Bridge",
+"C 07  Communication controller",
+"	00  Serial controller",
+"		00  8250",
+"		01  16450",
+"		02  16550",
+"		03  16650",
+"		04  16750",
+"		05  16850",
+"		06  16950",
+"	01  Parallel controller",
+"		00  SPP",
+"		01  BiDir",
+"		02  ECP",
+"		03  IEEE1284",
+"		fe  IEEE1284 Target",
+"	02  Multiport serial controller",
+"	03  Modem",
+"		00  Generic",
+"		01  Hayes/16450",
+"		02  Hayes/16550",
+"		03  Hayes/16650",
+"		04  Hayes/16750",
+"	80  Communication controller",
+"C 08  Generic system peripheral",
+"	00  PIC",
+"		00  8259",
+"		01  ISA PIC",
+"		02  EISA PIC",
+"		10  IO-APIC",
+"		20  IO(X)-APIC",
+"	01  DMA controller",
+"		00  8237",
+"		01  ISA DMA",
+"		02  EISA DMA",
+"	02  Timer",
+"		00  8254",
+"		01  ISA Timer",
+"		02  EISA Timers",
+"	03  RTC",
+"		00  Generic",
+"		01  ISA RTC",
+"	04  PCI Hot-plug controller",
+"	80  System peripheral",
+"C 09  Input device controller",
+"	00  Keyboard controller",
+"	01  Digitizer Pen",
+"	02  Mouse controller",
+"	03  Scanner controller",
+"	04  Gameport controller",
+"		00  Generic",
+"		10  Extended",
+"	80  Input device controller",
+"C 0a  Docking station",
+"	00  Generic Docking Station",
+"	80  Docking Station",
+"C 0b  Processor",
+"	00  386",
+"	01  486",
+"	02  Pentium",
+"	10  Alpha",
+"	20  Power PC",
+"	30  MIPS",
+"	40  Co-processor",
+"C 0c  Serial bus controller",
+"	00  FireWire (IEEE 1394)",
+"		00  Generic",
+"		10  OHCI",
+"	01  ACCESS Bus",
+"	02  SSA",
+"	03  USB Controller",
+"		00  UHCI",
+"		10  OHCI",
+"		20  EHCI",
+"		80  Unspecified",
+"		fe  USB Device",
+"	04  Fibre Channel",
+"	05  SMBus",
+"	06  InfiniBand",
+"C 0d  Wireless controller",
+"	00  IRDA controller",
+"	01  Consumer IR controller",
+"	10  RF controller",
+"	80  Wireless controller",
+"C 0e  Intelligent controller",
+"	00  I2O",
+"C 0f  Satellite communications controller",
+"	00  Satellite TV controller",
+"	01  Satellite audio communication controller",
+"	03  Satellite voice communication controller",
+"	04  Satellite data communication controller",
+"C 10  Encryption controller",
+"	00  Network and computing encryption device",
+"	10  Entertainment encryption device",
+"	80  Encryption controller",
+"C 11  Signal processing controller",
+"	00  DPIO module",
+"	01  Performance counters",
+"	10  Communication synchronizer",
+"	80  Signal processing controller",
+""
+};
Index: uspace/lib/pci/sysdep.h
===================================================================
--- uspace/lib/pci/sysdep.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/pci/sysdep.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,26 @@
+/*
+ *	The PCI Library -- System-Dependent Stuff
+ *
+ *	Copyright (c) 1997--2004 Martin Mares <mj@ucw.cz>
+ *
+ *	May 8, 2006 - Modified and ported to HelenOS by Jakub Jermar.
+ *
+ *	Can be freely distributed and used under the terms of the GNU GPL.
+ */
+
+#ifdef __GNUC__
+#define UNUSED __attribute__((unused))
+#define NONRET __attribute__((noreturn))
+#else
+#define UNUSED
+#define NONRET
+#define inline
+#endif
+
+typedef u8 byte;
+typedef u16 word;
+
+#define cpu_to_le16(x) (x)
+#define cpu_to_le32(x) (x)
+#define le16_to_cpu(x) (x)
+#define le32_to_cpu(x) (x)
Index: uspace/lib/pci/types.h
===================================================================
--- uspace/lib/pci/types.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
+++ uspace/lib/pci/types.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -0,0 +1,49 @@
+/*
+ *	The PCI Library -- Types and Format Strings
+ *
+ *	Copyright (c) 1997--2005 Martin Mares <mj@ucw.cz>
+ *
+ *	May 8, 2006 - Modified and ported to HelenOS by Jakub Jermar.
+ *
+ *	Can be freely distributed and used under the terms of the GNU GPL.
+ */
+
+#include <sys/types.h>
+
+#ifndef PCI_HAVE_Uxx_TYPES
+
+typedef uint8_t u8;
+typedef uint16_t u16;
+typedef uint32_t u32;
+
+#ifdef PCI_HAVE_64BIT_ADDRESS
+#include <limits.h>
+#if ULONG_MAX > 0xffffffff
+typedef unsigned long u64;
+#define PCI_U64_FMT "l"
+#else
+typedef unsigned long long u64;
+#define PCI_U64_FMT "ll"
+#endif
+#endif
+
+#endif				/* PCI_HAVE_Uxx_TYPES */
+
+#ifdef PCI_HAVE_64BIT_ADDRESS
+typedef u64 pciaddr_t;
+#define PCIADDR_T_FMT "%08" PCI_U64_FMT "x"
+#define PCIADDR_PORT_FMT "%04" PCI_U64_FMT "x"
+#else
+typedef u32 pciaddr_t;
+#define PCIADDR_T_FMT "%08x"
+#define PCIADDR_PORT_FMT "%04x"
+#endif
+
+#ifdef PCI_ARCH_SPARC64
+/* On sparc64 Linux the kernel reports remapped port addresses and IRQ numbers */
+#undef PCIADDR_PORT_FMT
+#define PCIADDR_PORT_FMT PCIADDR_T_FMT
+#define PCIIRQ_FMT "%08x"
+#else
+#define PCIIRQ_FMT "%d"
+#endif
Index: uspace/lib/softfloat/Makefile
===================================================================
--- uspace/lib/softfloat/Makefile	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/lib/softfloat/Makefile	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -29,8 +29,6 @@
 
 USPACE_PREFIX = ../..
-LIBS = $(LIBC_PREFIX)/libc.a
-EXTRA_CFLAGS += -Iinclude -Iarch/$(UARCH)/include/
-
-OUTPUT = libsoftfloat.a
+EXTRA_CFLAGS = -Iinclude -Iarch/$(UARCH)/include/
+LIBRARY = libsoftfloat
 
 SOURCES = \
@@ -45,3 +43,3 @@
 	generic/sub.c
 
-include ../Makefile.common
+include $(USPACE_PREFIX)/Makefile.common
Index: uspace/lib/softint/Makefile
===================================================================
--- uspace/lib/softint/Makefile	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/lib/softint/Makefile	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -29,8 +29,6 @@
 
 USPACE_PREFIX = ../..
-LIBS = $(LIBC_PREFIX)/libc.a
 EXTRA_CFLAGS = -Iinclude
-
-OUTPUT = libsoftint.a
+LIBRARY = libsoftint
 
 SOURCES = \
@@ -38,3 +36,3 @@
 	generic/multiplication.c
 
-include ../Makefile.common
+include $(USPACE_PREFIX)/Makefile.common
Index: pace/srv/Makefile.common
===================================================================
--- uspace/srv/Makefile.common	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,97 +1,0 @@
-#
-# Copyright (c) 2005 Martin Decky
-# Copyright (c) 2007 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.
-#
-
-## Common rules for building servers.
-#
-
-# Individual makefiles set:
-#
-#	USPACE_PREFIX	relative path to uspace/ directory
-#	LIBS		libraries to link with (with relative path)
-#	EXTRA_CFLAGS	additional flags to pass to C compiler
-#	JOB		job file name (like appname.job)
-#	OUTPUT		output binary name (like appname)
-#	SOURCES		list of source files
-#
-
-DEPEND = Makefile.depend
-DEPEND_PREV = $(DEPEND).prev
-
-LIBC_PREFIX = $(USPACE_PREFIX)/lib/libc
-LIBBLOCK_PREFIX = $(USPACE_PREFIX)/lib/libblock
-LIBFS_PREFIX = $(USPACE_PREFIX)/lib/libfs
-LIBPCI_PREFIX = $(USPACE_PREFIX)/lib/libpci
-SOFTINT_PREFIX = $(USPACE_PREFIX)/lib/softint
-
-LINK_SCRIPT ?= $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld
-
-JOB = $(OUTPUT).job
-
-OBJECTS := $(addsuffix .o,$(basename $(SOURCES)))
-
-include $(LIBC_PREFIX)/Makefile.toolchain
-
-CFLAGS += $(EXTRA_CFLAGS)
-
-.PHONY: all build clean
-
-all: \
-    $(LIBC_PREFIX)/../../../version \
-    $(LIBC_PREFIX)/../../../Makefile.common \
-    $(LIBC_PREFIX)/../../../Makefile.config \
-    $(LIBC_PREFIX)/../../../config.h \
-    $(LIBS) \
-    \
-    $(OUTPUT) $(OUTPUT).disasm \
-    $(EXTRA_OUTPUT)
-	-[ -f $(DEPEND) ] && mv -f $(DEPEND) $(DEPEND_PREV)
-
-clean:
-	rm -f $(DEPEND) $(DEPEND_PREV) $(JOB) $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm $(EXTRA_OUTPUT)
-	find . -name '*.o' -follow -exec rm \{\} \;
-
-build:
-
--include $(DEPEND)
-
-$(OUTPUT).disasm: $(OUTPUT)
-	$(OBJDUMP) -d $< > $@
-
-$(OUTPUT): $(LINK_SCRIPT) $(OBJECTS) $(LIBS)
-	$(LD) -T $(LINK_SCRIPT) $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map
-
-%.o: %.c $(DEPEND)
-	$(CC) $(DEFS) $(CFLAGS) -c $< -o $@
-ifeq ($(PRECHECK),y)
-	$(JOBFILE) $(JOB) $< $@ cc core $(DEFS) $(CFLAGS)
-endif
-
-$(DEPEND):
-	makedepend -f - -- $(DEPEND_DEFS) $(CFLAGS) -- $(SOURCES) > $@ 2> /dev/null
-	-[ -f $(DEPEND_PREV) ] && diff -q $(DEPEND_PREV) $@ && mv -f $(DEPEND_PREV) $@
Index: uspace/srv/bd/ata_bd/Makefile
===================================================================
--- uspace/srv/bd/ata_bd/Makefile	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/bd/ata_bd/Makefile	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -29,10 +29,8 @@
 
 USPACE_PREFIX = ../../..
-LIBS = $(LIBC_PREFIX)/libc.a
-
-OUTPUT = ata_bd
+BINARY = ata_bd
 
 SOURCES = \
 	ata_bd.c
 
-include ../../Makefile.common
+include $(USPACE_PREFIX)/Makefile.common
Index: uspace/srv/bd/ata_bd/ata_bd.c
===================================================================
--- uspace/srv/bd/ata_bd/ata_bd.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/bd/ata_bd/ata_bd.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -56,5 +56,5 @@
 #include <as.h>
 #include <fibril_synch.h>
-#include <string.h>
+#include <str.h>
 #include <devmap.h>
 #include <sys/types.h>
Index: uspace/srv/bd/ata_bd/ata_bd.h
===================================================================
--- uspace/srv/bd/ata_bd/ata_bd.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/bd/ata_bd/ata_bd.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -38,5 +38,5 @@
 #include <sys/types.h>
 #include <fibril_synch.h>
-#include <string.h>
+#include <str.h>
 
 enum {
Index: uspace/srv/bd/file_bd/Makefile
===================================================================
--- uspace/srv/bd/file_bd/Makefile	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/bd/file_bd/Makefile	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -29,10 +29,8 @@
 
 USPACE_PREFIX = ../../..
-LIBS = $(LIBC_PREFIX)/libc.a
-
-OUTPUT = file_bd
+BINARY = file_bd
 
 SOURCES = \
 	file_bd.c
 
-include ../../Makefile.common
+include $(USPACE_PREFIX)/Makefile.common
Index: uspace/srv/bd/gxe_bd/Makefile
===================================================================
--- uspace/srv/bd/gxe_bd/Makefile	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/bd/gxe_bd/Makefile	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -29,10 +29,8 @@
 
 USPACE_PREFIX = ../../..
-LIBS = $(LIBC_PREFIX)/libc.a
-
-OUTPUT = gxe_bd
+BINARY = gxe_bd
 
 SOURCES = \
 	gxe_bd.c
 
-include ../../Makefile.common
+include $(USPACE_PREFIX)/Makefile.common
Index: uspace/srv/bd/part/guid_part/Makefile
===================================================================
--- uspace/srv/bd/part/guid_part/Makefile	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/bd/part/guid_part/Makefile	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -28,12 +28,12 @@
 
 USPACE_PREFIX = ../../../..
-LIBS = $(LIBBLOCK_PREFIX)/libblock.a $(LIBC_PREFIX)/libc.a
+LIBS = $(LIBBLOCK_PREFIX)/libblock.a
 EXTRA_CFLAGS = -I$(LIBBLOCK_PREFIX)
 
 # Correct name is 'guid_part' but must use this because of FAT 8.3 names.
-OUTPUT = g_part
+BINARY = g_part
 
 SOURCES = \
 	guid_part.c
 
-include ../../../Makefile.common
+include $(USPACE_PREFIX)/Makefile.common
Index: uspace/srv/bd/part/mbr_part/Makefile
===================================================================
--- uspace/srv/bd/part/mbr_part/Makefile	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/bd/part/mbr_part/Makefile	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -29,11 +29,10 @@
 
 USPACE_PREFIX = ../../../..
-LIBS = $(LIBBLOCK_PREFIX)/libblock.a $(LIBC_PREFIX)/libc.a
+LIBS = $(LIBBLOCK_PREFIX)/libblock.a
 EXTRA_CFLAGS = -I$(LIBBLOCK_PREFIX)
-
-OUTPUT = mbr_part
+BINARY = mbr_part
 
 SOURCES = \
 	mbr_part.c
 
-include ../../../Makefile.common
+include $(USPACE_PREFIX)/Makefile.common
Index: uspace/srv/bd/rd/Makefile
===================================================================
--- uspace/srv/bd/rd/Makefile	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/bd/rd/Makefile	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -29,10 +29,8 @@
 
 USPACE_PREFIX = ../../..
-LIBS = $(LIBC_PREFIX)/libc.a
-
-OUTPUT = rd
+BINARY = rd
 
 SOURCES = \
 	rd.c
 
-include ../../Makefile.common
+include $(USPACE_PREFIX)/Makefile.common
Index: uspace/srv/clip/Makefile
===================================================================
--- uspace/srv/clip/Makefile	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/clip/Makefile	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -29,10 +29,8 @@
 
 USPACE_PREFIX = ../..
-LIBS = $(LIBC_PREFIX)/libc.a
-
-OUTPUT = clip
+BINARY = clip
 
 SOURCES = \
 	clip.c
 
-include ../Makefile.common
+include $(USPACE_PREFIX)/Makefile.common
Index: uspace/srv/devmap/Makefile
===================================================================
--- uspace/srv/devmap/Makefile	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/devmap/Makefile	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -29,10 +29,8 @@
 
 USPACE_PREFIX = ../..
-LIBS = $(LIBC_PREFIX)/libc.a
-
-OUTPUT = devmap
+BINARY = devmap
 
 SOURCES = \
 	devmap.c
 
-include ../Makefile.common
+include $(USPACE_PREFIX)/Makefile.common
Index: uspace/srv/devmap/devmap.c
===================================================================
--- uspace/srv/devmap/devmap.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/devmap/devmap.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -44,5 +44,5 @@
 #include <fibril_synch.h>
 #include <stdlib.h>
-#include <string.h>
+#include <str.h>
 #include <ipc/devmap.h>
 
Index: uspace/srv/fs/devfs/Makefile
===================================================================
--- uspace/srv/fs/devfs/Makefile	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/fs/devfs/Makefile	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -29,8 +29,7 @@
 
 USPACE_PREFIX = ../../..
-LIBS = $(LIBFS_PREFIX)/libfs.a $(LIBC_PREFIX)/libc.a
+LIBS = $(LIBFS_PREFIX)/libfs.a
 EXTRA_CFLAGS += -I$(LIBFS_PREFIX)
-
-OUTPUT = devfs
+BINARY = devfs
 
 SOURCES = \
@@ -38,3 +37,3 @@
 	devfs_ops.c
 
-include ../../Makefile.common
+include $(USPACE_PREFIX)/Makefile.common
Index: uspace/srv/fs/devfs/devfs_ops.c
===================================================================
--- uspace/srv/fs/devfs/devfs_ops.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/fs/devfs/devfs_ops.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -41,5 +41,5 @@
 #include <errno.h>
 #include <malloc.h>
-#include <string.h>
+#include <str.h>
 #include <libfs.h>
 #include <fibril_synch.h>
Index: uspace/srv/fs/fat/Makefile
===================================================================
--- uspace/srv/fs/fat/Makefile	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/fs/fat/Makefile	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -29,8 +29,7 @@
 
 USPACE_PREFIX = ../../..
-LIBS = $(LIBBLOCK_PREFIX)/libblock.a $(LIBFS_PREFIX)/libfs.a $(LIBC_PREFIX)/libc.a
+LIBS = $(LIBBLOCK_PREFIX)/libblock.a $(LIBFS_PREFIX)/libfs.a
 EXTRA_CFLAGS += -I$(LIBBLOCK_PREFIX) -I$(LIBFS_PREFIX)
-
-OUTPUT = fat
+BINARY = fat
 
 SOURCES = \
@@ -41,3 +40,3 @@
 	fat_fat.c
 
-include ../../Makefile.common
+include $(USPACE_PREFIX)/Makefile.common
Index: uspace/srv/fs/fat/fat_dentry.c
===================================================================
--- uspace/srv/fs/fat/fat_dentry.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/fs/fat/fat_dentry.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -38,5 +38,5 @@
 #include "fat_dentry.h"
 #include <ctype.h>
-#include <string.h>
+#include <str.h>
 
 static bool is_d_char(const char ch)
Index: uspace/srv/fs/fat/fat_idx.c
===================================================================
--- uspace/srv/fs/fat/fat_idx.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/fs/fat/fat_idx.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -39,5 +39,5 @@
 #include "../../vfs/vfs.h"
 #include <errno.h>
-#include <string.h>
+#include <str.h>
 #include <adt/hash_table.h>
 #include <adt/list.h>
Index: uspace/srv/fs/fat/fat_ops.c
===================================================================
--- uspace/srv/fs/fat/fat_ops.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/fs/fat/fat_ops.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -48,5 +48,5 @@
 #include <async.h>
 #include <errno.h>
-#include <string.h>
+#include <str.h>
 #include <byteorder.h>
 #include <adt/hash_table.h>
Index: uspace/srv/fs/tmpfs/Makefile
===================================================================
--- uspace/srv/fs/tmpfs/Makefile	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/fs/tmpfs/Makefile	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -29,8 +29,7 @@
 
 USPACE_PREFIX = ../../..
-LIBS = $(LIBBLOCK_PREFIX)/libblock.a $(LIBFS_PREFIX)/libfs.a $(LIBC_PREFIX)/libc.a
+LIBS = $(LIBBLOCK_PREFIX)/libblock.a $(LIBFS_PREFIX)/libfs.a
 EXTRA_CFLAGS += -I$(LIBBLOCK_PREFIX) -I$(LIBFS_PREFIX)
-
-OUTPUT = tmpfs
+BINARY = tmpfs
 
 SOURCES = \
@@ -39,3 +38,3 @@
 	tmpfs_dump.c
 
-include ../../Makefile.common
+include $(USPACE_PREFIX)/Makefile.common
Index: uspace/srv/fs/tmpfs/tmpfs_dump.c
===================================================================
--- uspace/srv/fs/tmpfs/tmpfs_dump.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/fs/tmpfs/tmpfs_dump.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -41,5 +41,5 @@
 #include <errno.h>
 #include <stdlib.h>
-#include <string.h>
+#include <str.h>
 #include <sys/types.h>
 #include <as.h>
Index: uspace/srv/fs/tmpfs/tmpfs_ops.c
===================================================================
--- uspace/srv/fs/tmpfs/tmpfs_ops.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/fs/tmpfs/tmpfs_ops.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -46,5 +46,5 @@
 #include <atomic.h>
 #include <stdlib.h>
-#include <string.h>
+#include <str.h>
 #include <stdio.h>
 #include <assert.h>
Index: uspace/srv/hid/adb_mouse/Makefile
===================================================================
--- uspace/srv/hid/adb_mouse/Makefile	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/hid/adb_mouse/Makefile	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -28,8 +28,6 @@
 
 USPACE_PREFIX = ../../..
-LIBS = $(LIBC_PREFIX)/libc.a
 EXTRA_CFLAGS = -Iinclude
-
-OUTPUT = adb_ms
+BINARY = adb_ms
 
 SOURCES = \
@@ -37,3 +35,3 @@
 	adb_dev.c
 
-include ../../Makefile.common
+include $(USPACE_PREFIX)/Makefile.common
Index: uspace/srv/hid/char_mouse/Makefile
===================================================================
--- uspace/srv/hid/char_mouse/Makefile	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/hid/char_mouse/Makefile	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -29,8 +29,6 @@
 
 USPACE_PREFIX = ../../..
-LIBS = $(LIBC_PREFIX)/libc.a
 EXTRA_CFLAGS = -Iinclude
-
-OUTPUT = char_ms
+BINARY = char_ms
 
 SOURCES = \
@@ -39,3 +37,3 @@
 	chardev.c
 
-include ../../Makefile.common
+include $(USPACE_PREFIX)/Makefile.common
Index: uspace/srv/hid/console/Makefile
===================================================================
--- uspace/srv/hid/console/Makefile	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/hid/console/Makefile	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -28,13 +28,31 @@
 #
 
-include Makefile.common
+USPACE_PREFIX = ../../..
+BINARY = console
 
-.PHONY: all clean
+GENERIC_SOURCES = \
+	console.c \
+	screenbuffer.c \
+	keybuffer.c \
+	gcons.c
 
-all: $(LIBC_PREFIX)/../../../Makefile.common $(LIBC_PREFIX)/../../../Makefile.config $(LIBC_PREFIX)/../../../config.h $(LIBS)
-	-[ -f $(DEPEND) ] && mv -f $(DEPEND) $(DEPEND_PREV)
-	$(MAKE) -f Makefile.build PRECHECK=$(PRECHECK)
+IMAGES = \
+	gfx/helenos.ppm \
+	gfx/nameic.ppm \
+	gfx/cons_selected.ppm \
+	gfx/cons_idle.ppm \
+	gfx/cons_has_data.ppm \
+	gfx/cons_kernel.ppm \
+	gfx/anim_1.ppm \
+	gfx/anim_2.ppm \
+	gfx/anim_3.ppm \
+	gfx/anim_4.ppm
 
-clean:
-	rm -f $(DEPEND) $(DEPEND_PREV) $(JOB) $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm
-	find . -name '*.o' -follow -exec rm \{\} \;
+SOURCES = \
+	$(GENERIC_SOURCES) \
+	$(IMAGES)
+
+include $(USPACE_PREFIX)/Makefile.common
+
+%.o: %.ppm
+	$(OBJCOPY) -I binary -O $(BFD_NAME) -B $(BFD_ARCH) $< $@
Index: pace/srv/hid/console/Makefile.build
===================================================================
--- uspace/srv/hid/console/Makefile.build	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,82 +1,0 @@
-#
-# Copyright (c) 2005 Martin Decky
-# Copyright (c) 2007 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.
-#
-
-## Setup toolchain
-#
-
-include Makefile.common
-include $(LIBC_PREFIX)/Makefile.toolchain
-
-## Sources
-#
-
-SOURCES = \
-	console.c \
-	screenbuffer.c \
-	keybuffer.c \
-	gcons.c
-
-IMAGES = \
-	gfx/helenos.ppm \
-	gfx/nameic.ppm \
-	gfx/cons_selected.ppm \
-	gfx/cons_idle.ppm \
-	gfx/cons_has_data.ppm \
-	gfx/cons_kernel.ppm \
-	gfx/anim_1.ppm \
-	gfx/anim_2.ppm \
-	gfx/anim_3.ppm \
-	gfx/anim_4.ppm
-
-OBJECTS := $(addsuffix .o,$(basename $(SOURCES))) $(addsuffix .o,$(basename $(IMAGES)))
-
-.PHONY: all
-
-all: $(OUTPUT) $(OUTPUT).disasm
-
--include $(DEPEND)
-
-$(OUTPUT).disasm: $(OUTPUT)
-	$(OBJDUMP) -d $< > $@
-
-$(OUTPUT): $(OBJECTS) $(LIBS)
-	$(LD) -T $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map
-
-%.o: %.c $(DEPEND)
-	$(CC) $(DEFS) $(CFLAGS) -c $< -o $@
-ifeq ($(PRECHECK),y)
-	$(JOBFILE) $(JOB) $< $@ cc core $(DEFS) $(CFLAGS)
-endif
-
-%.o: %.ppm
-	$(OBJCOPY) -I binary -O $(BFD_NAME) -B $(BFD_ARCH) $< $@
-
-$(DEPEND):
-	makedepend -f - -- $(DEPEND_DEFS) $(CFLAGS) -- $(SOURCES) > $@ 2> /dev/null
-	-[ -f $(DEPEND_PREV) ] && diff -q $(DEPEND_PREV) $@ && mv -f $(DEPEND_PREV) $@
Index: pace/srv/hid/console/Makefile.common
===================================================================
--- uspace/srv/hid/console/Makefile.common	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,40 +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.
-#
-
-
-## Common names
-#
-
-LIBC_PREFIX = ../../../lib/libc
-SOFTINT_PREFIX = ../../../lib/softint
-LIBS = $(LIBC_PREFIX)/libc.a
-
-DEPEND = Makefile.depend
-DEPEND_PREV = $(DEPEND).prev
-JOB = console.job
-OUTPUT = console
Index: uspace/srv/hid/console/console.c
===================================================================
--- uspace/srv/hid/console/console.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/hid/console/console.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -47,5 +47,5 @@
 #include <sys/mman.h>
 #include <stdio.h>
-#include <string.h>
+#include <str.h>
 #include <sysinfo.h>
 #include <event.h>
Index: uspace/srv/hid/console/gcons.c
===================================================================
--- uspace/srv/hid/console/gcons.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/hid/console/gcons.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -38,5 +38,5 @@
 #include <stdio.h>
 #include <sys/mman.h>
-#include <string.h>
+#include <str.h>
 #include <align.h>
 #include <bool.h>
Index: uspace/srv/hid/fb/Makefile
===================================================================
--- uspace/srv/hid/fb/Makefile	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/hid/fb/Makefile	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -28,13 +28,55 @@
 #
 
-include Makefile.common
+USPACE_PREFIX = ../../..
+BINARY = fb
 
-.PHONY: all clean
+SOURCES = \
+	main.c \
+	ppm.c
 
-all: $(LIBC_PREFIX)/../../../Makefile.common $(LIBC_PREFIX)/../../../Makefile.config $(LIBC_PREFIX)/../../../config.h $(LIBS)
-	-[ -f $(DEPEND) ] && mv -f $(DEPEND) $(DEPEND_PREV)
-	$(MAKE) -f Makefile.build PRECHECK=$(PRECHECK)
+ifneq ($(UARCH),ia64)
+	SOURCES += fb.c \
+		font-8x16.c
+	EXTRA_CFLAGS = -DFB_ENABLED
+endif
 
-clean:
-	rm -f $(DEPEND) $(DEPEND_PREV) $(JOB) $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm
-	find . -name '*.o' -follow -exec rm \{\} \;
+ifeq ($(UARCH),ia32)
+	SOURCES += ega.c
+	EXTRA_CFLAGS = -DEGA_ENABLED
+endif
+
+ifeq ($(UARCH),ia64)
+	SOURCES += ega.c \
+		ski.c \
+		serial_console.c
+	EXTRA_CFLAGS = -DSKI_ENABLED -DEGA_ENABLED
+endif
+
+ifeq ($(UARCH),amd64)
+	SOURCES += ega.c
+	EXTRA_CFLAGS = -DEGA_ENABLED
+endif
+
+ifeq ($(UARCH),mips32)
+	SOURCES += msim.c \
+		serial_console.c
+	EXTRA_CFLAGS = -DMSIM_ENABLED
+endif
+
+ifeq ($(UARCH),sparc64)
+	ifeq ($(PROCESSOR), sun4v)
+		SOURCES += niagara.c \
+			serial_console.c
+		EXTRA_CFLAGS = -DNIAGARA_ENABLED
+	endif
+
+	ifeq ($(MACHINE), serengeti)
+		SOURCES += sgcn.c \
+			serial_console.c
+		EXTRA_CFLAGS = -DSGCN_ENABLED
+	endif
+endif
+
+EXTRA_CFLAGS += -D$(UARCH)
+
+include $(USPACE_PREFIX)/Makefile.common
Index: pace/srv/hid/fb/Makefile.build
===================================================================
--- uspace/srv/hid/fb/Makefile.build	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,111 +1,0 @@
-#
-# Copyright (c) 2005 Martin Decky
-# Copyright (c) 2007 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.
-#
-
-## Setup toolchain
-#
-
-include Makefile.common
-include $(LIBC_PREFIX)/Makefile.toolchain
-
-## Sources
-#
-
-SOURCES = \
-	main.c \
-	ppm.c
-
-ifneq ($(UARCH),ia64)
-	SOURCES += fb.c \
-		font-8x16.c
-	CFLAGS += -DFB_ENABLED
-endif
-
-ifeq ($(UARCH),ia32)
-	SOURCES += ega.c
-	CFLAGS += -DEGA_ENABLED
-endif
-
-ifeq ($(UARCH),ia64)
-	SOURCES += ega.c \
-		ski.c \
-		serial_console.c
-	CFLAGS += -DSKI_ENABLED
-	CFLAGS += -DEGA_ENABLED
-endif
-
-ifeq ($(UARCH),amd64)
-	SOURCES += ega.c
-	CFLAGS += -DEGA_ENABLED
-endif
-
-ifeq ($(UARCH),mips32)
-	SOURCES += msim.c \
-		serial_console.c
-	CFLAGS += -DMSIM_ENABLED
-endif
-
-ifeq ($(UARCH),sparc64)
-	ifeq ($(PROCESSOR), sun4v)
-		SOURCES += niagara.c \
-			serial_console.c
-		CFLAGS += -DNIAGARA_ENABLED
-	endif
-
-	ifeq ($(MACHINE), serengeti)
-		SOURCES += sgcn.c \
-			serial_console.c
-		CFLAGS += -DSGCN_ENABLED
-	endif
-endif
-
-CFLAGS += -D$(UARCH)
-
-OBJECTS := $(addsuffix .o,$(basename $(SOURCES)))
-
-.PHONY: all
-
-all: $(OUTPUT) $(OUTPUT).disasm
-
--include $(DEPEND)
-
-$(OUTPUT).disasm: $(OUTPUT)
-	$(OBJDUMP) -d $< > $@
-
-$(OUTPUT): $(OBJECTS) $(LIBS)
-	$(LD) -T $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map
-
-%.o: %.c $(DEPEND)
-	$(CC) $(DEFS) $(CFLAGS) -c $< -o $@
-ifeq ($(PRECHECK),y)
-	$(JOBFILE) $(JOB) $< $@ cc core $(DEFS) $(CFLAGS)
-endif
-
-$(DEPEND):
-	makedepend -f - -- $(DEPEND_DEFS) $(CFLAGS) -- $(SOURCES) > $@ 2> /dev/null
-	-[ -f $(DEPEND_PREV) ] && diff -q $(DEPEND_PREV) $@ && mv -f $(DEPEND_PREV) $@
Index: pace/srv/hid/fb/Makefile.common
===================================================================
--- uspace/srv/hid/fb/Makefile.common	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,40 +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.
-#
-
-
-## Common names
-#
-
-LIBC_PREFIX = ../../../lib/libc
-SOFTINT_PREFIX = ../../../lib/softint
-LIBS = $(LIBC_PREFIX)/libc.a
-
-DEPEND = Makefile.depend
-DEPEND_PREV = $(DEPEND).prev
-JOB = fb.job
-OUTPUT = fb
Index: uspace/srv/hid/fb/fb.c
===================================================================
--- uspace/srv/hid/fb/fb.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/hid/fb/fb.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -41,5 +41,5 @@
 #include <stdlib.h>
 #include <unistd.h>
-#include <string.h>
+#include <str.h>
 #include <ddi.h>
 #include <sysinfo.h>
Index: uspace/srv/hid/fb/serial_console.c
===================================================================
--- uspace/srv/hid/fb/serial_console.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/hid/fb/serial_console.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -46,5 +46,5 @@
 #include <io/color.h>
 #include <io/style.h>
-#include <string.h>
+#include <str.h>
 
 #include "../console/screenbuffer.h"
Index: uspace/srv/hid/kbd/Makefile
===================================================================
--- uspace/srv/hid/kbd/Makefile	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/hid/kbd/Makefile	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -28,13 +28,135 @@
 #
 
-include Makefile.common
+USPACE_PREFIX = ../../..
+ROOT_PATH = $(USPACE_PREFIX)/..
 
-.PHONY: all clean
+COMMON_MAKEFILE = $(ROOT_PATH)/Makefile.common
+CONFIG_MAKEFILE = $(ROOT_PATH)/Makefile.config
 
-all: $(LIBC_PREFIX)/../../../Makefile.common $(LIBC_PREFIX)/../../../Makefile.config $(LIBC_PREFIX)/../../../config.h $(LIBS)
-	-[ -f $(DEPEND) ] && mv -f $(DEPEND) $(DEPEND_PREV)
-	$(MAKE) -f Makefile.build PRECHECK=$(PRECHECK)
+EXTRA_CFLAGS = -Iinclude
+BINARY = kbd
 
-clean:
-	rm -f $(DEPEND) $(DEPEND_PREV) $(JOB) $(OUTPUT) $(OUTPUT).map $(OUTPUT).disasm
-	find . -name '*.o' -follow -exec rm \{\} \;
+-include $(COMMON_MAKEFILE)
+-include $(CONFIG_MAKEFILE)
+
+## Sources
+#
+
+SOURCES = \
+	generic/kbd.c \
+	genarch/gsp.c \
+	genarch/stroke.c \
+	layout/cz.c \
+	layout/us_qwerty.c \
+	layout/us_dvorak.c
+
+ifeq ($(UARCH),amd64)
+	SOURCES += \
+		port/chardev.c \
+		ctl/pc.c
+endif
+
+ifeq ($(UARCH),arm32)
+	ifeq ($(MACHINE),testarm)
+		SOURCES += \
+			port/gxemul.c
+		
+		ifeq ($(CONFIG_FB),y)
+			SOURCES += \
+				ctl/gxe_fb.c
+		else
+			SOURCES += \
+				ctl/stty.c
+		endif
+	endif
+	ifeq ($(MACHINE),integratorcp)
+		SOURCES += \
+			port/pl050.c \
+			ctl/pl050.c
+	endif
+endif
+
+ifeq ($(UARCH),ia32)
+	SOURCES += \
+		port/chardev.c \
+		ctl/pc.c
+endif
+
+ifeq ($(MACHINE),i460GX)
+	SOURCES += \
+		port/chardev.c \
+		ctl/pc.c
+endif
+
+ifeq ($(MACHINE),ski)
+	SOURCES += \
+		port/ski.c \
+		ctl/stty.c
+endif
+
+ifeq ($(MACHINE),msim)
+	SOURCES += \
+		port/msim.c \
+		ctl/stty.c
+endif
+
+ifeq ($(MACHINE),lgxemul)
+	SOURCES += \
+		port/gxemul.c
+	
+	ifeq ($(CONFIG_FB),y)
+		SOURCES += \
+			ctl/gxe_fb.c
+	else
+		SOURCES += \
+			ctl/stty.c
+	endif
+endif
+
+ifeq ($(MACHINE),bgxemul)
+	SOURCES += \
+		port/gxemul.c
+	
+	ifeq ($(CONFIG_FB),y)
+		SOURCES += \
+			ctl/gxe_fb.c
+	else
+		SOURCES += \
+			ctl/stty.c
+	endif
+endif
+
+ifeq ($(UARCH),ppc32)
+	SOURCES += \
+		port/adb.c \
+		ctl/apple.c
+endif
+
+ifeq ($(UARCH),sparc64)
+	ifeq ($(PROCESSOR),sun4v)
+		SOURCES += \
+			port/niagara.c \
+			ctl/stty.c
+	else
+		ifeq ($(MACHINE),serengeti)
+			SOURCES += \
+				port/sgcn.c \
+				ctl/stty.c
+		endif
+		ifeq ($(MACHINE),generic)
+			SOURCES += \
+			port/sun.c \
+			port/z8530.c \
+			port/ns16550.c \
+			ctl/sun.c
+		endif
+	endif
+endif
+
+ifeq ($(UARCH),abs32le)
+	SOURCES += \
+		port/dummy.c \
+		ctl/pc.c
+endif
+
+include $(USPACE_PREFIX)/Makefile.common
Index: pace/srv/hid/kbd/Makefile.build
===================================================================
--- uspace/srv/hid/kbd/Makefile.build	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,180 +1,0 @@
-#
-# Copyright (c) 2005 Martin Decky
-# Copyright (c) 2007 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.
-#
-
-## Setup toolchain
-#
-
-include Makefile.common
-include $(LIBC_PREFIX)/Makefile.toolchain
-
-CFLAGS += -Iinclude
-
-## Sources
-#
-
-SOURCES = \
-	generic/kbd.c \
-	genarch/gsp.c \
-	genarch/stroke.c \
-	layout/cz.c \
-	layout/us_qwerty.c \
-	layout/us_dvorak.c
-
-ifeq ($(UARCH),amd64)
-	SOURCES += \
-		port/chardev.c \
-		ctl/pc.c
-endif
-
-ifeq ($(UARCH),arm32)
-	ifeq ($(MACHINE),testarm)
-		SOURCES += \
-			port/gxemul.c
-		
-		ifeq ($(CONFIG_FB),y)
-			SOURCES += \
-				ctl/gxe_fb.c
-		else
-			SOURCES += \
-				ctl/stty.c
-		endif
-	endif
-	ifeq ($(MACHINE),integratorcp)
-		SOURCES += \
-			port/pl050.c \
-			ctl/pl050.c
-	endif
-endif
-
-ifeq ($(UARCH),ia32)
-	SOURCES += \
-		port/chardev.c \
-		ctl/pc.c
-endif
-
-ifeq ($(MACHINE),i460GX)
-	SOURCES += \
-		port/chardev.c \
-		ctl/pc.c
-endif
-
-ifeq ($(MACHINE),ski)
-	SOURCES += \
-		port/ski.c \
-		ctl/stty.c
-endif
-
-ifeq ($(MACHINE),msim)
-	SOURCES += \
-		port/msim.c \
-		ctl/stty.c
-endif
-
-ifeq ($(MACHINE),lgxemul)
-	SOURCES += \
-		port/gxemul.c
-	
-	ifeq ($(CONFIG_FB),y)
-		SOURCES += \
-			ctl/gxe_fb.c
-	else
-		SOURCES += \
-			ctl/stty.c
-	endif
-endif
-
-ifeq ($(MACHINE),bgxemul)
-	SOURCES += \
-		port/gxemul.c
-	
-	ifeq ($(CONFIG_FB),y)
-		SOURCES += \
-			ctl/gxe_fb.c
-	else
-		SOURCES += \
-			ctl/stty.c
-	endif
-endif
-
-ifeq ($(UARCH),ppc32)
-	SOURCES += \
-		port/adb.c \
-		ctl/apple.c
-endif
-
-ifeq ($(UARCH),sparc64)
-	ifeq ($(PROCESSOR),sun4v)
-		SOURCES += \
-			port/niagara.c \
-			ctl/stty.c
-	else
-		ifeq ($(MACHINE),serengeti)
-			SOURCES += \
-				port/sgcn.c \
-				ctl/stty.c
-		endif
-		ifeq ($(MACHINE),generic)
-			SOURCES += \
-			port/sun.c \
-			port/z8530.c \
-			port/ns16550.c \
-			ctl/sun.c
-		endif
-	endif
-endif
-
-ifeq ($(UARCH),abs32le)
-	SOURCES += \
-		port/dummy.c \
-		ctl/pc.c
-endif
-
-OBJECTS := $(addsuffix .o,$(basename $(SOURCES)))
-
-.PHONY: all
-
-all: $(OUTPUT) $(OUTPUT).disasm
-
--include $(DEPEND)
-
-$(OUTPUT).disasm: $(OUTPUT)
-	$(OBJDUMP) -d $< > $@
-
-$(OUTPUT): $(OBJECTS) $(LIBS)
-	$(LD) -T $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map
-
-%.o: %.c $(DEPEND)
-	$(CC) $(DEFS) $(CFLAGS) -c $< -o $@
-ifeq ($(PRECHECK),y)
-	$(JOBFILE) $(JOB) $< $@ cc core $(DEFS) $(CFLAGS)
-endif
-
-$(DEPEND):
-	makedepend -f - -- $(DEPEND_DEFS) $(CFLAGS) -- $(SOURCES) > $@ 2> /dev/null
-	-[ -f $(DEPEND_PREV) ] && diff -q $(DEPEND_PREV) $@ && mv -f $(DEPEND_PREV) $@
Index: pace/srv/hid/kbd/Makefile.common
===================================================================
--- uspace/srv/hid/kbd/Makefile.common	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,40 +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.
-#
-
-
-## Common names
-#
-
-LIBC_PREFIX = ../../../lib/libc
-SOFTINT_PREFIX = ../../../lib/softint
-LIBS = $(LIBC_PREFIX)/libc.a
-
-DEPEND = Makefile.depend
-DEPEND_PREV = $(DEPEND).prev
-JOB = kbd.job
-OUTPUT = kbd
Index: uspace/srv/hw/bus/cuda_adb/Makefile
===================================================================
--- uspace/srv/hw/bus/cuda_adb/Makefile	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/hw/bus/cuda_adb/Makefile	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -28,11 +28,8 @@
 
 USPACE_PREFIX = ../../../..
-LIBS = $(LIBC_PREFIX)/libc.a
-
-OUTPUT = cuda_adb
+BINARY = cuda_adb
 
 SOURCES = \
 	cuda_adb.c
 
-include ../../../Makefile.common
-
+include $(USPACE_PREFIX)/Makefile.common
Index: uspace/srv/hw/bus/pci/Makefile
===================================================================
--- uspace/srv/hw/bus/pci/Makefile	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/hw/bus/pci/Makefile	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -29,11 +29,10 @@
 
 USPACE_PREFIX = ../../../..
-LIBS = $(LIBPCI_PREFIX)/libpci.a $(LIBC_PREFIX)/libc.a
+LIBS = $(LIBPCI_PREFIX)/libpci.a
 EXTRA_CFLAGS = -I$(LIBPCI_PREFIX)
-
-OUTPUT = pci
+BINARY = pci
 
 SOURCES = \
 	pci.c
 
-include ../../../Makefile.common
+include $(USPACE_PREFIX)/Makefile.common
Index: uspace/srv/hw/char/i8042/Makefile
===================================================================
--- uspace/srv/hw/char/i8042/Makefile	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/hw/char/i8042/Makefile	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -29,10 +29,8 @@
 
 USPACE_PREFIX = ../../../..
-LIBS = $(LIBC_PREFIX)/libc.a
-
-OUTPUT = i8042
+BINARY = i8042
 
 SOURCES = \
 	i8042.c
 
-include ../../../Makefile.common
+include $(USPACE_PREFIX)/Makefile.common
Index: uspace/srv/hw/cir/fhc/Makefile
===================================================================
--- uspace/srv/hw/cir/fhc/Makefile	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/hw/cir/fhc/Makefile	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -29,10 +29,8 @@
 
 USPACE_PREFIX = ../../../..
-LIBS = $(LIBC_PREFIX)/libc.a
-
-OUTPUT = fhc
+BINARY = fhc
 
 SOURCES = \
 	fhc.c
 
-include ../../../Makefile.common
+include $(USPACE_PREFIX)/Makefile.common
Index: uspace/srv/hw/cir/obio/Makefile
===================================================================
--- uspace/srv/hw/cir/obio/Makefile	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/hw/cir/obio/Makefile	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -29,10 +29,8 @@
 
 USPACE_PREFIX = ../../../..
-LIBS = $(LIBC_PREFIX)/libc.a
-
-OUTPUT = obio
+BINARY = obio
 
 SOURCES = \
 	obio.c
 
-include ../../../Makefile.common
+include $(USPACE_PREFIX)/Makefile.common
Index: uspace/srv/loader/Makefile
===================================================================
--- uspace/srv/loader/Makefile	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/loader/Makefile	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -28,15 +28,20 @@
 #
 
--include ../../../Makefile.common
--include ../../../Makefile.config
+USPACE_PREFIX = ../..
+ROOT_PATH = $(USPACE_PREFIX)/..
+
+COMMON_MAKEFILE = $(ROOT_PATH)/Makefile.common
+CONFIG_MAKEFILE = $(ROOT_PATH)/Makefile.config
+
+-include $(COMMON_MAKEFILE)
+-include $(CONFIG_MAKEFILE)
 -include arch/$(UARCH)/Makefile.inc
 
-USPACE_PREFIX = ../..
-LIBS = $(LIBC_PREFIX)/libc.a
-EXTRA_CFLAGS += -Iinclude
-LINK_SCRIPT = arch/$(UARCH)/_link.ld
+LINKER_SCRIPT = arch/$(UARCH)/_link.ld
+EXTRA_CLEAN = $(LINKER_SCRIPT)
 
-OUTPUT = loader
-EXTRA_OUTPUT = $(LINK_SCRIPT)
+EXTRA_CFLAGS = -Iinclude
+
+BINARY = loader
 
 GENERIC_SOURCES = \
@@ -45,9 +50,10 @@
 	interp.s
 
-SOURCES := $(GENERIC_SOURCES) $(ARCH_SOURCES)
-OBJECTS := $(addsuffix .o,$(basename $(SOURCES)))
+SOURCES = \
+	$(GENERIC_SOURCES) \
+	$(ARCH_SOURCES)
 
-include ../Makefile.common
+include $(USPACE_PREFIX)/Makefile.common
 
-$(LINK_SCRIPT): $(LINK_SCRIPT).in
+$(LINKER_SCRIPT): $(LINKER_SCRIPT).in
 	$(GCC) $(DEFS) $(CFLAGS) -DLIBC_PREFIX=$(LIBC_PREFIX) -E -x c $< | grep -v "^\#" > $@
Index: uspace/srv/loader/arch/abs32le/Makefile.inc
===================================================================
--- uspace/srv/loader/arch/abs32le/Makefile.inc	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/loader/arch/abs32le/Makefile.inc	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -27,3 +27,3 @@
 #
 
-ARCH_SOURCES := arch/$(UARCH)/abs32le.c
+ARCH_SOURCES = arch/$(UARCH)/abs32le.c
Index: uspace/srv/loader/arch/amd64/Makefile.inc
===================================================================
--- uspace/srv/loader/arch/amd64/Makefile.inc	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/loader/arch/amd64/Makefile.inc	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -27,3 +27,3 @@
 #
 
-ARCH_SOURCES := arch/$(UARCH)/amd64.s
+ARCH_SOURCES = arch/$(UARCH)/amd64.s
Index: uspace/srv/loader/arch/arm32/Makefile.inc
===================================================================
--- uspace/srv/loader/arch/arm32/Makefile.inc	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/loader/arch/arm32/Makefile.inc	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -27,3 +27,3 @@
 #
 
-ARCH_SOURCES := arch/$(UARCH)/arm32.s
+ARCH_SOURCES = arch/$(UARCH)/arm32.s
Index: uspace/srv/loader/arch/ia32/Makefile.inc
===================================================================
--- uspace/srv/loader/arch/ia32/Makefile.inc	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/loader/arch/ia32/Makefile.inc	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -27,3 +27,3 @@
 #
 
-ARCH_SOURCES := arch/$(UARCH)/ia32.s
+ARCH_SOURCES = arch/$(UARCH)/ia32.s
Index: uspace/srv/loader/arch/ia64/Makefile.inc
===================================================================
--- uspace/srv/loader/arch/ia64/Makefile.inc	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/loader/arch/ia64/Makefile.inc	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -27,4 +27,4 @@
 #
 
-ARCH_SOURCES := arch/$(UARCH)/ia64.s
+ARCH_SOURCES = arch/$(UARCH)/ia64.s
 AFLAGS += -xexplicit
Index: uspace/srv/loader/arch/mips32/Makefile.inc
===================================================================
--- uspace/srv/loader/arch/mips32/Makefile.inc	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/loader/arch/mips32/Makefile.inc	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -27,3 +27,3 @@
 #
 
-ARCH_SOURCES := arch/$(UARCH)/mips32.s
+ARCH_SOURCES = arch/$(UARCH)/mips32.s
Index: uspace/srv/loader/arch/ppc32/Makefile.inc
===================================================================
--- uspace/srv/loader/arch/ppc32/Makefile.inc	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/loader/arch/ppc32/Makefile.inc	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -27,3 +27,3 @@
 #
 
-ARCH_SOURCES := arch/$(UARCH)/ppc32.s
+ARCH_SOURCES = arch/$(UARCH)/ppc32.s
Index: uspace/srv/loader/arch/sparc64/Makefile.inc
===================================================================
--- uspace/srv/loader/arch/sparc64/Makefile.inc	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/loader/arch/sparc64/Makefile.inc	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -27,3 +27,3 @@
 #
 
-ARCH_SOURCES := arch/$(UARCH)/sparc64.s
+ARCH_SOURCES = arch/$(UARCH)/sparc64.s
Index: uspace/srv/loader/main.c
===================================================================
--- uspace/srv/loader/main.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/loader/main.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -58,5 +58,5 @@
 #include <errno.h>
 #include <async.h>
-#include <string.h>
+#include <str.h>
 #include <as.h>
 
Index: pace/srv/net/Makefile
===================================================================
--- uspace/srv/net/Makefile	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,92 +1,0 @@
-#
-# Copyright (c) 2009 Lukas Mejdrech
-# 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 ../../../Makefile.common
-include ../../../Makefile.config
-
-# keep netif drivers before nil modules
-# in order to support networking architectures build
-
-ifeq ($(CONFIG_NETIF_DP8390),y)
-	DIRS = netif/dp8390
-else
-	DIRS =
-endif
-
-DIRS += \
-	netif/lo \
-	nil/eth \
-	nil/nildummy \
-	net \
-	net/start \
-	socket \
-	app/echo \
-	app/ping \
-	app/nettest1 \
-	app/nettest2
-
-DIRS_MODULAR = \
-		il/arp \
-		il/ip \
-		tl/icmp \
-		tl/udp \
-		tl/tcp \
-
-DIRS_ALL = $(DIRS) $(DIRS_MODULAR)
-
-ifeq ($(NETWORKING), module)
-	BUILDS := $(addsuffix .build,$(DIRS))
-else
-ifeq ($(NETWORKING), modular)
-	BUILDS := $(addsuffix .build,$(DIRS_ALL))
-endif
-endif
-
-CLEANS := $(addsuffix .clean,$(DIRS_ALL))
-
-CHECKS := $(addsuffix .check,$(basename $(BUILDS)))
-
-.PHONY: all build $(BUILDS) $(CLEANS) clean
-
-all: $(BUILDS)
-
-build: $(BUILDS)
-
-check: $(CHECKS)
-
-clean: $(CLEANS)
-	find $(DIRS_ALL) ./ -name '*.o' -follow -exec rm \{\} \;
-
-$(CHECKS):
-	-$(MAKE) -C $(basename $@) check
-
-$(CLEANS):
-	-$(MAKE) -C $(basename $@) clean
-
-$(BUILDS):
-	$(MAKE) -C $(basename $@) all
Index: pace/srv/net/Makefile.module
===================================================================
--- uspace/srv/net/Makefile.module	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ 	(revision )
@@ -1,86 +1,0 @@
-#
-# Copyright (c) 2009 Lukas Mejdrech
-# 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.
-#
-
-## Setup toolchain
-#
-
-LIBC_PREFIX = $(NET_BASE)../../lib/libc
-SOFTINT_PREFIX = $(NET_BASE)../../lib/softint
-include $(LIBC_PREFIX)/Makefile.toolchain
-
-CFLAGS += -Iinclude -I../libadt/include
-CFLAGS += -Wno-strict-aliasing
-
-CHECK_CFLAGS = -fsyntax-only -Wextra -Wno-div-by-zero -Wsystem-headers -Wfloat-equal -Wdeclaration-after-statement -Wundef -Wno-endif-labels -Wshadow -Wlarger-than-1500 -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Wconversion -Wsign-compare -Waggregate-return -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes -Wmissing-declarations -Wmissing-field-initializers -Wmissing-noreturn -Wmissing-format-attribute -Wno-multichar -Wno-deprecated-declarations -Wpacked -Wpadded -Wredundant-decls -Wnested-externs -Wunreachable-code -Winline -Winvalid-pch -Wlong-long -Wvariadic-macros -Wdisabled-optimization -Wno-pointer-sign
-#-Wtraditional
-
-LIBS += $(LIBC_PREFIX)/libc.a
-
-DEPEND = Makefile.depend
-DEPEND_PREV = $(DEPEND).prev
-
-DEFS += $(NET_DEFS)
-
-OBJECTS := $(addsuffix .o,$(basename $(SOURCES)))
-DISASMS := $(addsuffix .disasm,$(basename $(OUTPUT)))
-
-.PHONY: all clean disasm
-
-all: $(OUTPUT) $(LIB) $(DISASMS)
-
-check:
-	$(CC) $(DEFS) $(CFLAGS) $(CHECK_CFLAGS) *.c
-
--include $(DEPEND)
-
-clean:
-	-rm -f $(OUTPUT) $(LIB) $(OUTPUT).map $(addsuffix .map,$(basename $(SOURCES))) $(DISASMS) $(DEPEND)
-
-$(OUTPUT): $(OBJECTS) $(LIBS)
-	$(LD) -T $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld $(OBJECTS) $(LIBS) $(LFLAGS) -o $@ -Map $(OUTPUT).map
-
-$(LIB): $(OBJECTS)
-	$(AR) rc $(LIB) $(OBJECTS)
-
-disasm: $(DISASMS)
-
-%.disasm: %
-	$(OBJDUMP) -d $< >$@
-
-%.o: %.S
-	$(CC) $(DEFS) $(AFLAGS) $(CFLAGS) -D__ASM__ -c $< -o $@
-
-%.o: %.s
-	$(AS) $(AFLAGS) $< -o $@
-
-%.o: %.c $(DEPEND)
-	$(CC) $(DEFS) $(CFLAGS) -c $< -o $@
-
-$(DEPEND):
-	makedepend -f - -- $(DEPEND_DEFS) $(CFLAGS) -- $(SOURCES) > $@ 2> /dev/null
-	-[ -f $(DEPEND_PREV) ] && diff -q $(DEPEND_PREV) $@ && mv -f $(DEPEND_PREV) $@
Index: uspace/srv/net/app/echo/Makefile
===================================================================
--- uspace/srv/net/app/echo/Makefile	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/net/app/echo/Makefile	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -1,4 +1,5 @@
 #
-# Copyright (c) 2009 Lukas Mejdrech
+# Copyright (c) 2005 Martin Decky
+# Copyright (c) 2007 Jakub Jermar
 # All rights reserved.
 #
@@ -27,22 +28,13 @@
 #
 
-NAME = echo
+NET_BASE = ../..
+USPACE_PREFIX = ../../../..
+LIBS = $(NET_BASE)/socket/libsocket.a
+BINARY = echo
 
-NET_BASE = ../../
-STRUCTURES = $(NET_BASE)structures/
+SOURCES = \
+	echo.c \
+	$(NET_BASE)/app/parse.c \
+	$(NET_BASE)/app/print_error.c
 
-include ../../../../../Makefile.common
-include ../../../../../Makefile.config
-
-## Sources
-#
-
-OUTPUT = $(NAME)
-SOURCES = \
-	$(NAME).c \
-	$(NET_BASE)app/parse.c \
-	$(NET_BASE)app/print_error.c
-
-LIBS += ../../socket/libsocket.a
-
-include $(NET_BASE)Makefile.module
+include $(USPACE_PREFIX)/Makefile.common
Index: uspace/srv/net/app/echo/echo.c
===================================================================
--- uspace/srv/net/app/echo/echo.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/net/app/echo/echo.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -38,5 +38,5 @@
 #include <malloc.h>
 #include <stdio.h>
-#include <string.h>
+#include <str.h>
 #include <task.h>
 
Index: uspace/srv/net/app/nettest1/Makefile
===================================================================
--- uspace/srv/net/app/nettest1/Makefile	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/net/app/nettest1/Makefile	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -1,4 +1,5 @@
 #
-# Copyright (c) 2009 Lukas Mejdrech
+# Copyright (c) 2005 Martin Decky
+# Copyright (c) 2007 Jakub Jermar
 # All rights reserved.
 #
@@ -27,23 +28,14 @@
 #
 
-NAME = nettest1
+NET_BASE = ../..
+USPACE_PREFIX = ../../../..
+LIBS = $(NET_BASE)/socket/libsocket.a
+BINARY = nettest1
 
-NET_BASE = ../../
-STRUCTURES = $(NET_BASE)structures/
+SOURCES = \
+	nettest1.c \
+	$(NET_BASE)/app/nettest.c \
+	$(NET_BASE)/app/parse.c \
+	$(NET_BASE)/app/print_error.c
 
-include ../../../../../Makefile.common
-include ../../../../../Makefile.config
-
-## Sources
-#
-
-OUTPUT = $(NAME)
-SOURCES = \
-	$(NAME).c \
-	$(NET_BASE)app/nettest.c \
-	$(NET_BASE)app/parse.c \
-	$(NET_BASE)app/print_error.c
-
-LIBS += ../../socket/libsocket.a
-
-include $(NET_BASE)Makefile.module
+include $(USPACE_PREFIX)/Makefile.common
Index: uspace/srv/net/app/nettest1/nettest1.c
===================================================================
--- uspace/srv/net/app/nettest1/nettest1.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/net/app/nettest1/nettest1.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -37,5 +37,5 @@
 #include <malloc.h>
 #include <stdio.h>
-#include <string.h>
+#include <str.h>
 #include <task.h>
 #include <time.h>
Index: uspace/srv/net/app/nettest2/Makefile
===================================================================
--- uspace/srv/net/app/nettest2/Makefile	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/net/app/nettest2/Makefile	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -1,4 +1,5 @@
 #
-# Copyright (c) 2009 Lukas Mejdrech
+# Copyright (c) 2005 Martin Decky
+# Copyright (c) 2007 Jakub Jermar
 # All rights reserved.
 #
@@ -27,23 +28,14 @@
 #
 
-NAME = nettest2
+NET_BASE = ../..
+USPACE_PREFIX = ../../../..
+LIBS = $(NET_BASE)/socket/libsocket.a
+BINARY = nettest2
 
-NET_BASE = ../../
-STRUCTURES = $(NET_BASE)structures/
+SOURCES = \
+	nettest2.c \
+	$(NET_BASE)/app/nettest.c \
+	$(NET_BASE)/app/parse.c \
+	$(NET_BASE)/app/print_error.c
 
-include ../../../../../Makefile.common
-include ../../../../../Makefile.config
-
-## Sources
-#
-
-OUTPUT = $(NAME)
-SOURCES = \
-	$(NAME).c \
-	$(NET_BASE)app/nettest.c \
-	$(NET_BASE)app/parse.c \
-	$(NET_BASE)app/print_error.c
-
-LIBS += ../../socket/libsocket.a
-
-include $(NET_BASE)Makefile.module
+include $(USPACE_PREFIX)/Makefile.common
Index: uspace/srv/net/app/nettest2/nettest2.c
===================================================================
--- uspace/srv/net/app/nettest2/nettest2.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/net/app/nettest2/nettest2.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -37,5 +37,5 @@
 #include <malloc.h>
 #include <stdio.h>
-#include <string.h>
+#include <str.h>
 #include <task.h>
 #include <time.h>
Index: uspace/srv/net/app/parse.c
===================================================================
--- uspace/srv/net/app/parse.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/net/app/parse.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,5 @@
 
 #include <stdio.h>
-#include <string.h>
+#include <str.h>
 
 #include "../include/socket.h"
Index: uspace/srv/net/app/ping/Makefile
===================================================================
--- uspace/srv/net/app/ping/Makefile	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/net/app/ping/Makefile	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -1,4 +1,5 @@
 #
-# Copyright (c) 2009 Lukas Mejdrech
+# Copyright (c) 2005 Martin Decky
+# Copyright (c) 2007 Jakub Jermar
 # All rights reserved.
 #
@@ -27,24 +28,17 @@
 #
 
-NAME = ping
+NET_BASE = ../..
+USPACE_PREFIX = ../../../..
+LIBS = $(NET_BASE)/socket/libsocket.a
+BINARY = ping
 
-NET_BASE = ../../
-STRUCTURES = $(NET_BASE)structures/
+SOURCES = \
+	ping.c \
+	$(NET_BASE)/app/parse.c \
+	$(NET_BASE)/app/print_error.c \
+	$(NET_BASE)/inet.c \
+	$(NET_BASE)/modules.c \
+	$(NET_BASE)/tl/icmp/icmp_api.c \
+	$(NET_BASE)/tl/icmp/icmp_common.c
 
-include ../../../../../Makefile.common
-include ../../../../../Makefile.config
-
-## Sources
-#
-
-OUTPUT = $(NAME)
-SOURCES = \
-	$(NAME).c \
-	$(NET_BASE)app/parse.c \
-	$(NET_BASE)app/print_error.c \
-	$(NET_BASE)inet.c \
-	$(NET_BASE)modules.c \
-	$(NET_BASE)tl/icmp/icmp_api.c \
-	$(NET_BASE)tl/icmp/icmp_common.c
-
-include $(NET_BASE)Makefile.module
+include $(USPACE_PREFIX)/Makefile.common
Index: uspace/srv/net/app/ping/ping.c
===================================================================
--- uspace/srv/net/app/ping/ping.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/net/app/ping/ping.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,5 @@
 
 #include <stdio.h>
-#include <string.h>
+#include <str.h>
 #include <task.h>
 #include <time.h>
Index: uspace/srv/net/il/arp/Makefile
===================================================================
--- uspace/srv/net/il/arp/Makefile	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/net/il/arp/Makefile	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -1,4 +1,5 @@
 #
-# Copyright (c) 2009 Lukas Mejdrech
+# Copyright (c) 2005 Martin Decky
+# Copyright (c) 2007 Jakub Jermar
 # All rights reserved.
 #
@@ -27,25 +28,20 @@
 #
 
-NAME = arp
+NET_BASE = ../..
+USPACE_PREFIX = ../../../..
+BINARY = arp
 
-NET_BASE = ../../
-STRUCTURES = $(NET_BASE)structures/
+SOURCES = \
+	arp.c \
+	arp_module.c \
+	$(NET_BASE)/module.c \
+	$(NET_BASE)/modules.c \
+	$(NET_BASE)/net/net_remote.c \
+	$(NET_BASE)/nil/nil_remote.c \
+	$(NET_BASE)/structures/char_map.c \
+	$(NET_BASE)/structures/measured_strings.c \
+	$(NET_BASE)/structures/packet/packet.c \
+	$(NET_BASE)/structures/packet/packet_client.c \
+	$(NET_BASE)/structures/packet/packet_remote.c
 
-## Sources
-#
-
-OUTPUT = $(NAME)
-SOURCES = \
-	$(NAME).c \
-	$(NAME)_module.c \
-	$(NET_BASE)module.c \
-	$(NET_BASE)modules.c \
-	$(NET_BASE)net/net_remote.c \
-	$(NET_BASE)nil/nil_remote.c \
-	$(STRUCTURES)char_map.c \
-	$(STRUCTURES)measured_strings.c \
-	$(STRUCTURES)packet/packet.c \
-	$(STRUCTURES)packet/packet_client.c \
-	$(STRUCTURES)packet/packet_remote.c
-
-include $(NET_BASE)Makefile.module
+include $(USPACE_PREFIX)/Makefile.common
Index: uspace/srv/net/il/arp/arp.c
===================================================================
--- uspace/srv/net/il/arp/arp.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/net/il/arp/arp.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -41,5 +41,5 @@
 #include <fibril_synch.h>
 #include <stdio.h>
-#include <string.h>
+#include <str.h>
 #include <task.h>
 
Index: uspace/srv/net/il/arp/arp_messages.h
===================================================================
--- uspace/srv/net/il/arp/arp_messages.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/net/il/arp/arp_messages.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -75,5 +75,6 @@
  *  @param[in] call The message call structure.
  */
-#define ARP_GET_NETIF(call)		(services_t) IPC_GET_ARG2(*call)
+#define ARP_GET_NETIF(call) \
+	({services_t service = (services_t) IPC_GET_ARG2(*call); service;})
 
 /*@}*/
Index: uspace/srv/net/il/ip/Makefile
===================================================================
--- uspace/srv/net/il/ip/Makefile	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/net/il/ip/Makefile	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -1,4 +1,5 @@
 #
-# Copyright (c) 2009 Lukas Mejdrech
+# Copyright (c) 2005 Martin Decky
+# Copyright (c) 2007 Jakub Jermar
 # All rights reserved.
 #
@@ -27,33 +28,28 @@
 #
 
-NAME = ip
+NET_BASE = ../..
+USPACE_PREFIX = ../../../..
+BINARY = ip
 
-NET_BASE = ../../
-STRUCTURES = $(NET_BASE)structures/
+SOURCES = \
+	ip.c \
+	ip_client.c \
+	ip_module.c \
+	$(NET_BASE)/checksum.c \
+	$(NET_BASE)/inet.c \
+	$(NET_BASE)/module.c \
+	$(NET_BASE)/modules.c \
+	$(NET_BASE)/il/arp/arp_remote.c \
+	$(NET_BASE)/nil/nil_remote.c \
+	$(NET_BASE)/net/net_remote.c \
+	$(NET_BASE)/tl/icmp/icmp_client.c \
+	$(NET_BASE)/tl/icmp/icmp_common.c \
+	$(NET_BASE)/tl/icmp/icmp_remote.c \
+	$(NET_BASE)/structures/char_map.c \
+	$(NET_BASE)/structures/measured_strings.c \
+	$(NET_BASE)/structures/module_map.c \
+	$(NET_BASE)/structures/packet/packet.c \
+	$(NET_BASE)/structures/packet/packet_client.c \
+	$(NET_BASE)/structures/packet/packet_remote.c
 
-## Sources
-#
-
-OUTPUT = $(NAME)
-SOURCES = \
-	$(NAME).c \
-	$(NAME)_client.c \
-	$(NAME)_module.c \
-	$(NET_BASE)checksum.c \
-	$(NET_BASE)inet.c \
-	$(NET_BASE)module.c \
-	$(NET_BASE)modules.c \
-	$(NET_BASE)il/arp/arp_remote.c \
-	$(NET_BASE)nil/nil_remote.c \
-	$(NET_BASE)net/net_remote.c \
-	$(NET_BASE)tl/icmp/icmp_client.c \
-	$(NET_BASE)tl/icmp/icmp_common.c \
-	$(NET_BASE)tl/icmp/icmp_remote.c \
-	$(STRUCTURES)char_map.c \
-	$(STRUCTURES)measured_strings.c \
-	$(STRUCTURES)module_map.c \
-	$(STRUCTURES)packet/packet.c \
-	$(STRUCTURES)packet/packet_client.c \
-	$(STRUCTURES)packet/packet_remote.c
-
-include $(NET_BASE)Makefile.module
+include $(USPACE_PREFIX)/Makefile.common
Index: uspace/srv/net/il/ip/ip.c
===================================================================
--- uspace/srv/net/il/ip/ip.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/net/il/ip/ip.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -40,5 +40,5 @@
 #include <fibril_synch.h>
 #include <stdio.h>
-#include <string.h>
+#include <str.h>
 
 #include <ipc/ipc.h>
@@ -893,4 +893,7 @@
 	struct sockaddr * addr;
 	size_t addrlen;
+	size_t prefix;
+	size_t suffix;
+	size_t content;
 	ip_pseudo_header_ref header;
 	size_t headerlen;
@@ -924,6 +927,6 @@
 			ERROR_PROPAGATE(ip_get_route_req(0, IP_GET_PROTOCOL(call), addr, (socklen_t) addrlen,
 			    &device_id, &header, &headerlen));
-			*IPC_SET_DEVICE(answer) = device_id;
-			*IP_SET_HEADERLEN(answer) = headerlen;
+			IPC_SET_DEVICE(answer, device_id);
+			IP_SET_HEADERLEN(answer, headerlen);
 			*answer_count = 2;
 			if(! ERROR_OCCURRED(data_reply(&headerlen, sizeof(headerlen)))){
@@ -933,6 +936,10 @@
 			return ERROR_CODE;
 		case NET_IL_PACKET_SPACE:
-			ERROR_PROPAGATE(ip_packet_size_message(IPC_GET_DEVICE(call), IPC_SET_ADDR(answer), IPC_SET_PREFIX(answer), IPC_SET_CONTENT(answer), IPC_SET_SUFFIX(answer)));
-			*answer_count = 3;
+			ERROR_PROPAGATE(ip_packet_size_message(IPC_GET_DEVICE(call), &addrlen, &prefix, &content, &suffix));
+			IPC_SET_ADDR(answer, addrlen);
+			IPC_SET_PREFIX(answer, prefix);
+			IPC_SET_CONTENT(answer, content);
+			IPC_SET_SUFFIX(answer, suffix);
+			*answer_count = 4;
 			return EOK;
 		case NET_IL_MTU_CHANGED:
Index: uspace/srv/net/il/ip/ip_messages.h
===================================================================
--- uspace/srv/net/il/ip/ip_messages.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/net/il/ip/ip_messages.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -72,25 +72,30 @@
  *  @param[in] call The message call structure.
  */
-#define IP_GET_ADDRESS(call)		({in_addr_t addr; addr.s_addr = IPC_GET_ARG3(*call); addr;})
+#define IP_GET_ADDRESS(call) \
+	({in_addr_t addr; addr.s_addr = IPC_GET_ARG3(*call); addr;})
 
 /** Returns the gateway message parameter.
  *  @param[in] call The message call structure.
  */
-#define IP_GET_GATEWAY(call)		({in_addr_t addr; addr.s_addr = IPC_GET_ARG2(*call); addr;})
+#define IP_GET_GATEWAY(call) \
+	({in_addr_t addr; addr.s_addr = IPC_GET_ARG2(*call); addr;})
 
 /** Sets the header length in the message answer.
  *  @param[out] answer The message answer structure.
  */
-#define IP_SET_HEADERLEN(answer)	(&IPC_GET_ARG2(*answer))
+#define IP_SET_HEADERLEN(answer, value) \
+	{ipcarg_t argument = (ipcarg_t) (value); IPC_SET_ARG2(*answer, argument);}
 
 /** Returns the network mask message parameter.
  *  @param[in] call The message call structure.
  */
-#define IP_GET_NETMASK(call)		({in_addr_t addr; addr.s_addr = IPC_GET_ARG4(*call); addr;})
+#define IP_GET_NETMASK(call) \
+	({in_addr_t addr; addr.s_addr = IPC_GET_ARG4(*call); addr;})
 
 /** Returns the protocol message parameter.
  *  @param[in] call The message call structure.
  */
-#define IP_GET_PROTOCOL(call)		((ip_protocol_t) IPC_GET_ARG1(*call))
+#define IP_GET_PROTOCOL(call) \
+	({ip_protocol_t protocol = (ip_protocol_t) IPC_GET_ARG1(*call); protocol;})
 
 /*@}*/
Index: uspace/srv/net/inet.c
===================================================================
--- uspace/srv/net/inet.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/net/inet.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -38,5 +38,5 @@
 #include <mem.h>
 #include <stdio.h>
-#include <string.h>
+#include <str.h>
 
 #include "include/in.h"
Index: uspace/srv/net/messages.h
===================================================================
--- uspace/srv/net/messages.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/net/messages.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -236,65 +236,78 @@
  *  @param[in] call The IPC call to be checked.
  */
-#define IS_NET_MESSAGE(call)			IS_IN_INTERVAL(IPC_GET_METHOD(*call), NET_FIRST, NET_LAST)
+#define IS_NET_MESSAGE(call) \
+	IS_IN_INTERVAL(IPC_GET_METHOD(*call), NET_FIRST, NET_LAST)
 
 /** Returns a value indicating whether the IPC call is an ARP message.
  *  @param[in] call The IPC call to be checked.
  */
-#define IS_NET_ARP_MESSAGE(call)		IS_IN_INTERVAL(IPC_GET_METHOD(*call), NET_ARP_FIRST, NET_ARP_LAST)
+#define IS_NET_ARP_MESSAGE(call) \
+	IS_IN_INTERVAL(IPC_GET_METHOD(*call), NET_ARP_FIRST, NET_ARP_LAST)
 
 /** Returns a value indicating whether the IPC call is an Ethernet message.
  *  @param[in] call The IPC call to be checked.
  */
-#define IS_NET_ETH_MESSAGE(call)		IS_IN_INTERVAL(IPC_GET_METHOD(*call), NET_ETH_FIRST, NET_ETH_LAST)
+#define IS_NET_ETH_MESSAGE(call) \
+	IS_IN_INTERVAL(IPC_GET_METHOD(*call), NET_ETH_FIRST, NET_ETH_LAST)
 
 /** Returns a value indicating whether the IPC call is an ICMP message.
  *  @param[in] call The IPC call to be checked.
  */
-#define IS_NET_ICMP_MESSAGE(call)		IS_IN_INTERVAL(IPC_GET_METHOD(*call), NET_ICMP_FIRST, NET_ICMP_LAST)
+#define IS_NET_ICMP_MESSAGE(call) \
+	IS_IN_INTERVAL(IPC_GET_METHOD(*call), NET_ICMP_FIRST, NET_ICMP_LAST)
 
 /** Returns a value indicating whether the IPC call is an inter-network layer message.
  *  @param[in] call The IPC call to be checked.
  */
-#define IS_NET_IL_MESSAGE(call)		IS_IN_INTERVAL(IPC_GET_METHOD(*call), NET_IL_FIRST, NET_IL_LAST)
+#define IS_NET_IL_MESSAGE(call) \
+	IS_IN_INTERVAL(IPC_GET_METHOD(*call), NET_IL_FIRST, NET_IL_LAST)
 
 /** Returns a value indicating whether the IPC call is an IP message.
  *  @param[in] call The IPC call to be checked.
  */
-#define IS_NET_IP_MESSAGE(call)		IS_IN_INTERVAL(IPC_GET_METHOD(*call), NET_IP_FIRST, NET_IP_LAST)
+#define IS_NET_IP_MESSAGE(call) \
+	IS_IN_INTERVAL(IPC_GET_METHOD(*call), NET_IP_FIRST, NET_IP_LAST)
 
 /** Returns a value indicating whether the IPC call is a generic networking message.
  *  @param[in] call The IPC call to be checked.
  */
-#define IS_NET_NET_MESSAGE(call)		IS_IN_INTERVAL(IPC_GET_METHOD(*call), NET_NET_FIRST, NET_NET_LAST)
+#define IS_NET_NET_MESSAGE(call) \
+	IS_IN_INTERVAL(IPC_GET_METHOD(*call), NET_NET_FIRST, NET_NET_LAST)
 
 /** Returns a value indicating whether the IPC call is a network interface layer message.
  *  @param[in] call The IPC call to be checked.
  */
-#define IS_NET_NIL_MESSAGE(call)		IS_IN_INTERVAL(IPC_GET_METHOD(*call), NET_NIL_FIRST, NET_NIL_LAST)
+#define IS_NET_NIL_MESSAGE(call) \
+	IS_IN_INTERVAL(IPC_GET_METHOD(*call), NET_NIL_FIRST, NET_NIL_LAST)
 
 /** Returns a value indicating whether the IPC call is a packet manaagement system message.
  *  @param[in] call The IPC call to be checked.
  */
-#define IS_NET_PACKET_MESSAGE(call)	IS_IN_INTERVAL(IPC_GET_METHOD(*call), NET_PACKET_FIRST, NET_PACKET_LAST)
+#define IS_NET_PACKET_MESSAGE(call) \
+	IS_IN_INTERVAL(IPC_GET_METHOD(*call), NET_PACKET_FIRST, NET_PACKET_LAST)
 
 /** Returns a value indicating whether the IPC call is a socket message.
  *  @param[in] call The IPC call to be checked.
  */
-#define IS_NET_SOCKET_MESSAGE(call)	IS_IN_INTERVAL(IPC_GET_METHOD(*call), NET_SOCKET_FIRST, NET_SOCKET_LAST)
+#define IS_NET_SOCKET_MESSAGE(call) \
+	IS_IN_INTERVAL(IPC_GET_METHOD(*call), NET_SOCKET_FIRST, NET_SOCKET_LAST)
 
 /** Returns a value indicating whether the IPC call is a TCP message.
  *  @param[in] call The IPC call to be checked.
  */
-#define IS_NET_TCP_MESSAGE(call)		IS_IN_INTERVAL(IPC_GET_METHOD(*call), NET_TCP_FIRST, NET_TCP_LAST)
+#define IS_NET_TCP_MESSAGE(call) \
+	IS_IN_INTERVAL(IPC_GET_METHOD(*call), NET_TCP_FIRST, NET_TCP_LAST)
 
 /** Returns a value indicating whether the IPC call is a transport layer message.
  *  @param[in] call The IPC call to be checked.
  */
-#define IS_NET_TL_MESSAGE(call)		IS_IN_INTERVAL(IPC_GET_METHOD(*call), NET_TL_FIRST, NET_TL_LAST)
+#define IS_NET_TL_MESSAGE(call) \
+	IS_IN_INTERVAL(IPC_GET_METHOD(*call), NET_TL_FIRST, NET_TL_LAST)
 
 /** Returns a value indicating whether the IPC call is a UDP message.
  *  @param[in] call The IPC call to be checked.
  */
-#define IS_NET_UDP_MESSAGE(call)		IS_IN_INTERVAL(IPC_GET_METHOD(*call), NET_UDP_FIRST, NET_UDP_LAST)
+#define IS_NET_UDP_MESSAGE(call) \
+	IS_IN_INTERVAL(IPC_GET_METHOD(*call), NET_UDP_FIRST, NET_UDP_LAST)
 
 /*@}*/
@@ -311,74 +324,84 @@
  *  @param[in] call The message call structure.
  */
-#define IPC_GET_DEVICE(call)		(device_id_t) IPC_GET_ARG1(*call)
-
-/*@}*/
+#define IPC_GET_DEVICE(call) \
+	({device_id_t device_id = (device_id_t) IPC_GET_ARG1(*call); device_id;})
+
+/*@;})*/
 
 /** @name Second arguments
  */
-/*@{*/
+/*@({*/
 
 /** Returns the packet identifier message argument.
  *  @param[in] call The message call structure.
  */
-#define IPC_GET_PACKET(call)		(packet_id_t) IPC_GET_ARG2(*call)
+#define IPC_GET_PACKET(call) \
+	({packet_id_t packet_id = (packet_id_t) IPC_GET_ARG2(*call); packet_id;})
 
 /** Returns the count message argument.
  *  @param[in] call The message call structure.
  */
-#define IPC_GET_COUNT(call)		(size_t) IPC_GET_ARG2(*call)
+#define IPC_GET_COUNT(call) \
+	({size_t size = (size_t) IPC_GET_ARG2(*call); size;})
 
 /** Returns the device state message argument.
  *  @param[in] call The message call structure.
  */
-#define IPC_GET_STATE(call)		(device_state_t) IPC_GET_ARG2(*call)
+#define IPC_GET_STATE(call) \
+	({device_state_t device_state = (device_state_t) IPC_GET_ARG2(*call); device_state;})
 
 /** Returns the maximum transmission unit message argument.
  *  @param[in] call The message call structure.
  */
-#define IPC_GET_MTU(call)			(size_t) IPC_GET_ARG2(*call)
-
-/*@}*/
+#define IPC_GET_MTU(call) \
+	({size_t size = (size_t) IPC_GET_ARG2(*call); size;})
+
+/*@;})*/
 
 /** @name Third arguments
  */
-/*@{*/
+/*@({*/
 
 /** Returns the device driver service message argument.
  *  @param[in] call The message call structure.
  */
-#define IPC_GET_SERVICE(call)		(services_t) IPC_GET_ARG3(*call)
+ #define IPC_GET_SERVICE(call) \
+	({services_t service = (services_t) IPC_GET_ARG3(*call); service;})
 
 /** Returns the target service message argument.
  *  @param[in] call The message call structure.
  */
-#define IPC_GET_TARGET(call)		(services_t) IPC_GET_ARG3(*call)
+#define IPC_GET_TARGET(call) \
+	({services_t service = (services_t) IPC_GET_ARG3(*call); service;})
 
 /** Returns the sender service message argument.
  *  @param[in] call The message call structure.
  */
-#define IPC_GET_SENDER(call)		(services_t) IPC_GET_ARG3(*call)
-
-/*@}*/
+#define IPC_GET_SENDER(call) \
+	({services_t service = (services_t) IPC_GET_ARG3(*call); service;})
+
+/*@;})*/
 
 /** @name Fourth arguments
  */
-/*@{*/
+/*@({*/
 
 /** Returns the error service message argument.
  *  @param[in] call The message call structure.
  */
-#define IPC_GET_ERROR(call)		(services_t) IPC_GET_ARG4(*call)
-
-/*@}*/
+#define IPC_GET_ERROR(call) \
+	({services_t service = (services_t) IPC_GET_ARG4(*call); service;})
+
+/*@;})*/
 
 /** @name Fifth arguments
  */
-/*@{*/
+/*@({*/
 
 /** Returns the phone message argument.
  *  @param[in] call The message call structure.
  */
-#define IPC_GET_PHONE(call)		(int) IPC_GET_ARG5(*call)
+#define IPC_GET_PHONE(call) \
+	({int phone = (int) IPC_GET_ARG5(*call); phone;})
 
 /*@}*/
@@ -391,10 +414,12 @@
  *  @param[out] answer The message answer structure.
  */
-#define IPC_SET_DEVICE(answer)	(&IPC_GET_ARG1(*answer))
+#define IPC_SET_DEVICE(answer, value) \
+	{ipcarg_t argument = (ipcarg_t) (value); IPC_SET_ARG1(*answer, argument);}
 
 /** Sets the minimum address length in the message answer.
  *  @param[out] answer The message answer structure.
  */
-#define IPC_SET_ADDR(answer)		(&IPC_GET_ARG1(*answer))
+#define IPC_SET_ADDR(answer, value) \
+	{ipcarg_t argument = (ipcarg_t) (value); IPC_SET_ARG1(*answer, argument);}
 
 /*@}*/
@@ -407,5 +432,6 @@
  *  @param[out] answer The message answer structure.
  */
-#define IPC_SET_PREFIX(answer)	(&IPC_GET_ARG2(*answer))
+#define IPC_SET_PREFIX(answer, value) \
+	{ipcarg_t argument = (ipcarg_t) (value); IPC_SET_ARG2(*answer, argument);}
 
 /*@}*/
@@ -418,5 +444,6 @@
  *  @param[out] answer The message answer structure.
  */
-#define IPC_SET_CONTENT(answer)	(&IPC_GET_ARG3(*answer))
+#define IPC_SET_CONTENT(answer, value) \
+	{ipcarg_t argument = (ipcarg_t) (value); IPC_SET_ARG3(*answer, argument);}
 
 /*@}*/
@@ -429,5 +456,6 @@
  *  @param[out] answer The message answer structure.
  */
-#define IPC_SET_SUFFIX(answer)	(&IPC_GET_ARG4(*answer))
+#define IPC_SET_SUFFIX(answer, value) \
+	{ipcarg_t argument = (ipcarg_t) (value); IPC_SET_ARG4(*answer, argument);}
 
 /*@}*/
Index: uspace/srv/net/net/Makefile
===================================================================
--- uspace/srv/net/net/Makefile	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/net/net/Makefile	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -1,4 +1,5 @@
 #
-# Copyright (c) 2009 Lukas Mejdrech
+# Copyright (c) 2005 Martin Decky
+# Copyright (c) 2007 Jakub Jermar
 # All rights reserved.
 #
@@ -27,50 +28,50 @@
 #
 
-NAME = net
+NET_BASE = ..
+USPACE_PREFIX = ../../..
+ROOT_PATH = $(USPACE_PREFIX)/..
 
-NET_BASE = ../
-STRUCTURES = $(NET_BASE)structures/
+COMMON_MAKEFILE = $(ROOT_PATH)/Makefile.common
+CONFIG_MAKEFILE = $(ROOT_PATH)/Makefile.config
 
-include $(NET_BASE)../../../Makefile.common
-include $(NET_BASE)../../../Makefile.config
+BINARY = net
 
-## Sources
-#
+-include $(COMMON_MAKEFILE)
+-include $(CONFIG_MAKEFILE)
 
-OUTPUT = $(NAME)
 SOURCES = \
-	$(NAME).c \
-	$(NET_BASE)module.c \
-	$(NET_BASE)modules.c \
-	$(NET_BASE)netif/netif_remote.c \
-	$(STRUCTURES)char_map.c \
-	$(STRUCTURES)measured_strings.c \
-	$(STRUCTURES)module_map.c \
-	$(STRUCTURES)packet/packet.c \
-	$(STRUCTURES)packet/packet_client.c \
-	$(STRUCTURES)packet/packet_server.c
+	net.c \
+	$(NET_BASE)/module.c \
+	$(NET_BASE)/modules.c \
+	$(NET_BASE)/netif/netif_remote.c \
+	$(NET_BASE)/structures/char_map.c \
+	$(NET_BASE)/structures/measured_strings.c \
+	$(NET_BASE)/structures/module_map.c \
+	$(NET_BASE)/structures/packet/packet.c \
+	$(NET_BASE)/structures/packet/packet_client.c \
+	$(NET_BASE)/structures/packet/packet_server.c
 
-ifeq ($(NETWORKING), module)
-
-	SOURCES +=	$(NAME)_bundle.c \
-				$(NET_BASE)checksum.c \
-				$(NET_BASE)inet.c \
-				$(NET_BASE)il/arp/arp.c \
-				$(NET_BASE)il/ip/ip.c \
-				$(NET_BASE)il/ip/ip_client.c \
-				$(NET_BASE)socket/socket_core.c \
-				$(NET_BASE)tl/icmp/icmp.c \
-				$(NET_BASE)tl/icmp/icmp_client.c \
-				$(NET_BASE)tl/tcp/tcp.c \
-				$(NET_BASE)tl/tl_common.c \
-				$(NET_BASE)tl/udp/udp.c \
-				$(STRUCTURES)dynamic_fifo.c
-
-else
-
-	SOURCES +=	$(NAME)_standalone.c \
-				$(NET_BASE)il/ip/ip_remote.c
-
+ifeq ($(CONFIG_NETWORKING),module)
+	SOURCES += \
+		net_bundle.c \
+		$(NET_BASE)/checksum.c \
+		$(NET_BASE)/inet.c \
+		$(NET_BASE)/il/arp/arp.c \
+		$(NET_BASE)/il/ip/ip.c \
+		$(NET_BASE)/il/ip/ip_client.c \
+		$(NET_BASE)/socket/socket_core.c \
+		$(NET_BASE)/tl/icmp/icmp.c \
+		$(NET_BASE)/tl/icmp/icmp_client.c \
+		$(NET_BASE)/tl/tcp/tcp.c \
+		$(NET_BASE)/tl/tl_common.c \
+		$(NET_BASE)/tl/udp/udp.c \
+		$(NET_BASE)/structures/dynamic_fifo.c
 endif
 
-include $(NET_BASE)Makefile.module
+ifeq ($(CONFIG_NETWORKING),modular)
+	SOURCES += \
+		net_standalone.c \
+		$(NET_BASE)/il/ip/ip_remote.c
+endif
+
+include $(USPACE_PREFIX)/Makefile.common
Index: uspace/srv/net/net/net.c
===================================================================
--- uspace/srv/net/net/net.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/net/net/net.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -41,5 +41,5 @@
 #include <malloc.h>
 #include <stdio.h>
-#include <string.h>
+#include <str.h>
 
 #include <ipc/ipc.h>
Index: uspace/srv/net/net/net_bundle.c
===================================================================
--- uspace/srv/net/net/net_bundle.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/net/net/net_bundle.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -36,5 +36,5 @@
  */
 
-#include <string.h>
+#include <str.h>
 
 #include <ipc/ipc.h>
Index: uspace/srv/net/net/net_standalone.c
===================================================================
--- uspace/srv/net/net/net_standalone.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/net/net/net_standalone.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -35,5 +35,5 @@
  */
 
-#include <string.h>
+#include <str.h>
 
 #include <ipc/ipc.h>
Index: uspace/srv/net/net/start/Makefile
===================================================================
--- uspace/srv/net/net/start/Makefile	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/net/net/start/Makefile	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -1,4 +1,5 @@
 #
-# Copyright (c) 2009 Lukas Mejdrech
+# Copyright (c) 2005 Martin Decky
+# Copyright (c) 2007 Jakub Jermar
 # All rights reserved.
 #
@@ -27,24 +28,16 @@
 #
 
-NAME = netstart
+NET_BASE = ../..
+USPACE_PREFIX = ../../../..
+BINARY = netstart
 
-NET_BASE = ../../
-STRUCTURES = $(NET_BASE)structures/
+SOURCES = \
+	netstart.c \
+	$(NET_BASE)/checksum.c \
+	$(NET_BASE)/modules.c \
+	$(NET_BASE)/self_test.c \
+	$(NET_BASE)/structures/char_map.c \
+	$(NET_BASE)/structures/dynamic_fifo.c \
+	$(NET_BASE)/structures/measured_strings.c
 
-include ../../../../../Makefile.common
-include ../../../../../Makefile.config
-
-## Sources
-#
-
-OUTPUT = $(NAME)
-SOURCES = \
-	$(NAME).c \
-	$(NET_BASE)checksum.c \
-	$(NET_BASE)modules.c \
-	$(NET_BASE)self_test.c \
-	$(STRUCTURES)char_map.c \
-	$(STRUCTURES)dynamic_fifo.c \
-	$(STRUCTURES)measured_strings.c
-
-include $(NET_BASE)Makefile.module
+include $(USPACE_PREFIX)/Makefile.common
Index: uspace/srv/net/netif/dp8390/Makefile
===================================================================
--- uspace/srv/net/netif/dp8390/Makefile	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/net/netif/dp8390/Makefile	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -1,4 +1,5 @@
 #
-# Copyright (c) 2009 Lukas Mejdrech
+# Copyright (c) 2005 Martin Decky
+# Copyright (c) 2007 Jakub Jermar
 # All rights reserved.
 #
@@ -27,41 +28,41 @@
 #
 
-NAME = dp8390
+NET_BASE = ../..
+USPACE_PREFIX = ../../../..
+ROOT_PATH = $(USPACE_PREFIX)/..
 
-NET_BASE = ../../
-STRUCTURES = $(NET_BASE)structures/
+COMMON_MAKEFILE = $(ROOT_PATH)/Makefile.common
+CONFIG_MAKEFILE = $(ROOT_PATH)/Makefile.config
 
-include $(NET_BASE)../../../Makefile.common
-include $(NET_BASE)../../../Makefile.config
+BINARY = dp8390
 
-## Sources
-#
+-include $(COMMON_MAKEFILE)
+-include $(CONFIG_MAKEFILE)
 
-OUTPUT = $(NAME)
 SOURCES = \
-	$(NAME).c \
-	$(NAME)_module.c \
+	dp8390.c \
+	dp8390_module.c \
 	ne2000.c \
-	$(NET_BASE)module.c \
-	$(NET_BASE)modules.c \
-	$(NET_BASE)netif/netif.c \
-	$(STRUCTURES)measured_strings.c \
-	$(STRUCTURES)packet/packet.c \
-	$(STRUCTURES)packet/packet_client.c \
-	$(STRUCTURES)packet/packet_remote.c
+	$(NET_BASE)/module.c \
+	$(NET_BASE)/modules.c \
+	$(NET_BASE)/netif/netif.c \
+	$(NET_BASE)/structures/measured_strings.c \
+	$(NET_BASE)/structures/packet/packet.c \
+	$(NET_BASE)/structures/packet/packet_client.c \
+	$(NET_BASE)/structures/packet/packet_remote.c
 
-ifeq ($(NETWORKING), module)
-
-	SOURCES +=	$(NET_BASE)checksum.c \
-				$(NET_BASE)nil/eth/eth.c \
-				$(NET_BASE)net/net_remote.c \
-				$(NET_BASE)netif/netif_nil_bundle.c
-
-else
-
-	SOURCES += 	$(NET_BASE)nil/nil_remote.c \
-				$(NET_BASE)netif/netif_standalone.c
-
+ifeq ($(CONFIG_NETWORKING),module)
+	SOURCES += \
+		$(NET_BASE)/checksum.c \
+		$(NET_BASE)/nil/eth/eth.c \
+		$(NET_BASE)/net/net_remote.c \
+		$(NET_BASE)/netif/netif_nil_bundle.c
 endif
 
-include $(NET_BASE)Makefile.module
+ifeq ($(CONFIG_NETWORKING),modular)
+	SOURCES += \
+		$(NET_BASE)/nil/nil_remote.c \
+		$(NET_BASE)/netif/netif_standalone.c
+endif
+
+include $(USPACE_PREFIX)/Makefile.common
Index: uspace/srv/net/netif/lo/Makefile
===================================================================
--- uspace/srv/net/netif/lo/Makefile	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/net/netif/lo/Makefile	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -1,4 +1,5 @@
 #
-# Copyright (c) 2009 Lukas Mejdrech
+# Copyright (c) 2005 Martin Decky
+# Copyright (c) 2007 Jakub Jermar
 # All rights reserved.
 #
@@ -27,38 +28,38 @@
 #
 
-NAME = lo
+NET_BASE = ../..
+USPACE_PREFIX = ../../../..
+ROOT_PATH = $(USPACE_PREFIX)/..
 
-NET_BASE = ../../
-STRUCTURES = $(NET_BASE)structures/
+COMMON_MAKEFILE = $(ROOT_PATH)/Makefile.common
+CONFIG_MAKEFILE = $(ROOT_PATH)/Makefile.config
 
-include $(NET_BASE)../../../Makefile.common
-include $(NET_BASE)../../../Makefile.config
+BINARY = lo
 
-## Sources
-#
+-include $(COMMON_MAKEFILE)
+-include $(CONFIG_MAKEFILE)
 
-OUTPUT = $(NAME)
 SOURCES = \
-	$(NAME).c \
-	$(NET_BASE)module.c \
-	$(NET_BASE)modules.c \
-	$(NET_BASE)net/net_remote.c \
-	$(NET_BASE)netif/netif.c \
-	$(STRUCTURES)measured_strings.c \
-	$(STRUCTURES)packet/packet.c \
-	$(STRUCTURES)packet/packet_client.c \
-	$(STRUCTURES)packet/packet_remote.c
+	lo.c \
+	$(NET_BASE)/module.c \
+	$(NET_BASE)/modules.c \
+	$(NET_BASE)/net/net_remote.c \
+	$(NET_BASE)/netif/netif.c \
+	$(NET_BASE)/structures/measured_strings.c \
+	$(NET_BASE)/structures/packet/packet.c \
+	$(NET_BASE)/structures/packet/packet_client.c \
+	$(NET_BASE)/structures/packet/packet_remote.c
 
-ifeq ($(NETWORKING), module)
-
-	SOURCES +=	$(NET_BASE)nil/nildummy/nildummy.c \
-				$(NET_BASE)netif/netif_nil_bundle.c
-
-else
-
-	SOURCES += 	$(NET_BASE)nil/nil_remote.c \
-				$(NET_BASE)netif/netif_standalone.c
-
+ifeq ($(CONFIG_NETWORKING),module)
+	SOURCES += \
+		$(NET_BASE)/nil/nildummy/nildummy.c \
+		$(NET_BASE)/netif/netif_nil_bundle.c
 endif
 
-include $(NET_BASE)Makefile.module
+ifeq ($(CONFIG_NETWORKING),modular)
+	SOURCES += \
+		$(NET_BASE)/nil/nil_remote.c \
+		$(NET_BASE)/netif/netif_standalone.c
+endif
+
+include $(USPACE_PREFIX)/Makefile.common
Index: uspace/srv/net/netif/lo/lo.c
===================================================================
--- uspace/srv/net/netif/lo/lo.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/net/netif/lo/lo.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -38,5 +38,5 @@
 #include <errno.h>
 #include <stdio.h>
-#include <string.h>
+#include <str.h>
 
 #include <ipc/ipc.h>
Index: uspace/srv/net/netif/netif_messages.h
===================================================================
--- uspace/srv/net/netif/netif_messages.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/net/netif/netif_messages.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -79,10 +79,12 @@
  *  @param[in] call The message call structure.
  */
-#define NETIF_GET_IRQ(call)		(int)	IPC_GET_ARG2(*call)
+#define NETIF_GET_IRQ(call) \
+	({int irq = (int) IPC_GET_ARG2(*call); irq;})
 
 /** Returns the input/output address message parameter.
  *  @param[in] call The message call structure.
  */
-#define NETIF_GET_IO(call)		(int)	IPC_GET_ARG3(*call)
+#define NETIF_GET_IO(call) \
+	({int io = (int) IPC_GET_ARG3(*call); io;})
 
 /*@}*/
Index: uspace/srv/net/nil/eth/Makefile
===================================================================
--- uspace/srv/net/nil/eth/Makefile	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/net/nil/eth/Makefile	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -1,4 +1,5 @@
 #
-# Copyright (c) 2009 Lukas Mejdrech
+# Copyright (c) 2005 Martin Decky
+# Copyright (c) 2007 Jakub Jermar
 # All rights reserved.
 #
@@ -27,22 +28,20 @@
 #
 
-NAME = eth
+NET_BASE = ../..
+USPACE_PREFIX = ../../../..
+BINARY = eth
 
-NET_BASE = ../../
-STRUCTURES = $(NET_BASE)structures/
+SOURCES = \
+	eth.c \
+	eth_module.c \
+	$(NET_BASE)/checksum.c \
+	$(NET_BASE)/module.c \
+	$(NET_BASE)/modules.c \
+	$(NET_BASE)/net/net_remote.c \
+	$(NET_BASE)/netif/netif_remote.c \
+	$(NET_BASE)/structures/measured_strings.c \
+	$(NET_BASE)/structures/packet/packet.c \
+	$(NET_BASE)/structures/packet/packet_client.c \
+	$(NET_BASE)/structures/packet/packet_remote.c
 
-OUTPUT = $(NAME)
-SOURCES = \
-	$(NAME).c \
-	$(NAME)_module.c \
-	$(NET_BASE)checksum.c \
-	$(NET_BASE)module.c \
-	$(NET_BASE)modules.c \
-	$(NET_BASE)net/net_remote.c \
-	$(NET_BASE)netif/netif_remote.c \
-	$(STRUCTURES)measured_strings.c \
-	$(STRUCTURES)packet/packet.c \
-	$(STRUCTURES)packet/packet_client.c \
-	$(STRUCTURES)packet/packet_remote.c
-
-include $(NET_BASE)Makefile.module
+include $(USPACE_PREFIX)/Makefile.common
Index: uspace/srv/net/nil/eth/eth.c
===================================================================
--- uspace/srv/net/nil/eth/eth.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/net/nil/eth/eth.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -40,5 +40,5 @@
 #include <mem.h>
 #include <stdio.h>
-#include <string.h>
+#include <str.h>
 
 #include <ipc/ipc.h>
@@ -709,4 +709,8 @@
 	measured_string_ref address;
 	packet_t packet;
+	size_t addrlen;
+	size_t prefix;
+	size_t suffix;
+	size_t content;
 
 //	printf("message %d - %d\n", IPC_GET_METHOD(*call), NET_NIL_FIRST);
@@ -721,5 +725,9 @@
 			return eth_send_message(IPC_GET_DEVICE(call), packet, IPC_GET_SERVICE(call));
 		case NET_NIL_PACKET_SPACE:
-			ERROR_PROPAGATE(eth_packet_space_message(IPC_GET_DEVICE(call), IPC_SET_ADDR(answer), IPC_SET_PREFIX(answer), IPC_SET_CONTENT(answer), IPC_SET_SUFFIX(answer)));
+			ERROR_PROPAGATE(eth_packet_space_message(IPC_GET_DEVICE(call), &addrlen, &prefix, &content, &suffix));
+			IPC_SET_ADDR(answer, addrlen);
+			IPC_SET_PREFIX(answer, prefix);
+			IPC_SET_CONTENT(answer, content);
+			IPC_SET_SUFFIX(answer, suffix);
 			*answer_count = 4;
 			return EOK;
Index: uspace/srv/net/nil/nil_messages.h
===================================================================
--- uspace/srv/net/nil/nil_messages.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/net/nil/nil_messages.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -82,5 +82,6 @@
 /** Returns the protocol service message parameter.
  */
-#define NIL_GET_PROTO(call)		(services_t) IPC_GET_ARG2(*call)
+#define NIL_GET_PROTO(call) \
+	({services_t service = (services_t) IPC_GET_ARG2(*call); service;})
 
 /*@}*/
Index: uspace/srv/net/nil/nildummy/Makefile
===================================================================
--- uspace/srv/net/nil/nildummy/Makefile	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/net/nil/nildummy/Makefile	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -1,4 +1,5 @@
 #
-# Copyright (c) 2009 Lukas Mejdrech
+# Copyright (c) 2005 Martin Decky
+# Copyright (c) 2007 Jakub Jermar
 # All rights reserved.
 #
@@ -27,21 +28,19 @@
 #
 
-NAME = nildummy
+NET_BASE = ../..
+USPACE_PREFIX = ../../../..
+BINARY = nildummy
 
-NET_BASE = ../../
-STRUCTURES = $(NET_BASE)structures/
+SOURCES = \
+	nildummy.c \
+	nildummy_module.c \
+	$(NET_BASE)/module.c \
+	$(NET_BASE)/modules.c \
+	$(NET_BASE)/net/net_remote.c \
+	$(NET_BASE)/netif/netif_remote.c \
+	$(NET_BASE)/structures/measured_strings.c \
+	$(NET_BASE)/structures/packet/packet.c \
+	$(NET_BASE)/structures/packet/packet_client.c \
+	$(NET_BASE)/structures/packet/packet_remote.c
 
-OUTPUT = $(NAME)
-SOURCES = \
-	$(NAME).c \
-	$(NAME)_module.c \
-	$(NET_BASE)module.c \
-	$(NET_BASE)modules.c \
-	$(NET_BASE)net/net_remote.c \
-	$(NET_BASE)netif/netif_remote.c \
-	$(STRUCTURES)measured_strings.c \
-	$(STRUCTURES)packet/packet.c \
-	$(STRUCTURES)packet/packet_client.c \
-	$(STRUCTURES)packet/packet_remote.c
-
-include $(NET_BASE)Makefile.module
+include $(USPACE_PREFIX)/Makefile.common
Index: uspace/srv/net/nil/nildummy/nildummy.c
===================================================================
--- uspace/srv/net/nil/nildummy/nildummy.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/net/nil/nildummy/nildummy.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -40,5 +40,5 @@
 #include <mem.h>
 #include <stdio.h>
-#include <string.h>
+#include <str.h>
 
 #include <ipc/ipc.h>
@@ -316,4 +316,8 @@
 	measured_string_ref address;
 	packet_t packet;
+	size_t addrlen;
+	size_t prefix;
+	size_t suffix;
+	size_t content;
 
 //	printf("message %d - %d\n", IPC_GET_METHOD(*call), NET_NIL_FIRST);
@@ -328,5 +332,9 @@
 			return nildummy_send_message(IPC_GET_DEVICE(call), packet, IPC_GET_SERVICE(call));
 		case NET_NIL_PACKET_SPACE:
-			ERROR_PROPAGATE(nildummy_packet_space_message(IPC_GET_DEVICE(call), IPC_SET_ADDR(answer), IPC_SET_PREFIX(answer), IPC_SET_CONTENT(answer), IPC_SET_SUFFIX(answer)));
+			ERROR_PROPAGATE(nildummy_packet_space_message(IPC_GET_DEVICE(call), &addrlen, &prefix, &content, &suffix));
+			IPC_SET_ADDR(answer, addrlen);
+			IPC_SET_PREFIX(answer, prefix);
+			IPC_SET_CONTENT(answer, content);
+			IPC_SET_SUFFIX(answer, suffix);
 			*answer_count = 4;
 			return EOK;
Index: uspace/srv/net/socket/Makefile
===================================================================
--- uspace/srv/net/socket/Makefile	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/net/socket/Makefile	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -1,4 +1,5 @@
 #
-# Copyright (c) 2009 Lukas Mejdrech
+# Copyright (c) 2005 Martin Decky
+# Copyright (c) 2007 Jakub Jermar
 # All rights reserved.
 #
@@ -27,18 +28,13 @@
 #
 
-NAME = socket
+NET_BASE = ..
+USPACE_PREFIX = ../../..
+LIBRARY = libsocket
 
-NET_BASE = ../
-STRUCTURES = $(NET_BASE)structures/
+SOURCES = \
+	socket_client.c \
+	$(NET_BASE)/inet.c \
+	$(NET_BASE)/modules.c \
+	$(NET_BASE)/structures/dynamic_fifo.c
 
-## Sources
-#
-
-LIB = lib$(NAME).a
-SOURCES = \
-	$(NAME)_client.c \
-	$(NET_BASE)inet.c \
-	$(NET_BASE)modules.c \
-	$(STRUCTURES)dynamic_fifo.c
-
-include $(NET_BASE)Makefile.module
+include $(USPACE_PREFIX)/Makefile.common
Index: uspace/srv/net/socket/socket_client.c
===================================================================
--- uspace/srv/net/socket/socket_client.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/net/socket/socket_client.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -421,4 +421,6 @@
 	int socket_id;
 	services_t service;
+	ipcarg_t fragment_size;
+	ipcarg_t header_size;
 
 	// find the appropriate service
@@ -478,9 +480,11 @@
 		return socket_id;
 	}
-	if(ERROR_OCCURRED((int) async_req_3_3(phone, NET_SOCKET, socket_id, 0, service, NULL, (ipcarg_t *) &socket->data_fragment_size, (ipcarg_t *) &socket->header_size))){
+	if(ERROR_OCCURRED((int) async_req_3_3(phone, NET_SOCKET, socket_id, 0, service, NULL, &fragment_size, &header_size))){
 		fibril_rwlock_write_unlock(&socket_globals.lock);
 		free(socket);
 		return ERROR_CODE;
 	}
+	socket->data_fragment_size = (size_t) fragment_size;
+	socket->header_size = (size_t) header_size;
 	// finish the new socket initialization
 	socket_initialize(socket, socket_id, phone, service);
Index: uspace/srv/net/socket/socket_messages.h
===================================================================
--- uspace/srv/net/socket/socket_messages.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/net/socket/socket_messages.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -115,80 +115,97 @@
  *  @param[out] answer The message answer structure.
  */
-#define SOCKET_SET_SOCKET_ID(answer)		&IPC_GET_ARG1(answer)
+#define SOCKET_SET_SOCKET_ID(answer, value) \
+	{ipcarg_t argument = (ipcarg_t) (value); IPC_SET_ARG1(answer, argument);}
 
 /** Returns the socket identifier message parameter.
  *  @param[in] call The message call structure.
  */
-#define SOCKET_GET_SOCKET_ID(call)		(int) IPC_GET_ARG1(call)
+#define SOCKET_GET_SOCKET_ID(call) \
+	({int socket_id = (int) IPC_GET_ARG1(call); socket_id;})
 
 /** Sets the read data length in the message answer.
  *  @param[out] answer The message answer structure.
  */
-#define SOCKET_SET_READ_DATA_LENGTH(answer)	&IPC_GET_ARG1(answer)
+#define SOCKET_SET_READ_DATA_LENGTH(answer, value) \
+	{ipcarg_t argument = (ipcarg_t) (value); IPC_SET_ARG1(answer, argument);}
 
 /** Returns the read data length message parameter.
  *  @param[in] call The message call structure.
  */
-#define SOCKET_GET_READ_DATA_LENGTH(call)	(int) IPC_GET_ARG1(call)
+#define SOCKET_GET_READ_DATA_LENGTH(call) \
+	({int data_length = (int) IPC_GET_ARG1(call); data_length;})
 
 /** Returns the backlog message parameter.
  *  @param[in] call The message call structure.
  */
-#define SOCKET_GET_BACKLOG(call)		(int) IPC_GET_ARG2(call)
+#define SOCKET_GET_BACKLOG(call) \
+	({int backlog = (int) IPC_GET_ARG2(call); backlog;})
 
 /** Returns the option level message parameter.
  *  @param[in] call The message call structure.
  */
-#define SOCKET_GET_OPT_LEVEL(call)		(int) IPC_GET_ARG2(call)
+#define SOCKET_GET_OPT_LEVEL(call) \
+	({int opt_level = (int) IPC_GET_ARG2(call); opt_level;})
 
 /** Returns the data fragment size message parameter.
  *  @param[in] call The message call structure.
  */
-#define SOCKET_GET_DATA_FRAGMENT_SIZE(call)	(size_t) IPC_GET_ARG2(call)
+#define SOCKET_GET_DATA_FRAGMENT_SIZE(call) \
+	({size_t size = (size_t) IPC_GET_ARG2(call); size;})
 
 /** Sets the data fragment size in the message answer.
  *  @param[out] answer The message answer structure.
  */
-#define SOCKET_SET_DATA_FRAGMENT_SIZE(answer)	&IPC_GET_ARG2(answer)
+#define SOCKET_SET_DATA_FRAGMENT_SIZE(answer, value) \
+	{ipcarg_t argument = (ipcarg_t) (value); IPC_SET_ARG2(answer, argument);}
 
 /** Sets the address length in the message answer.
  *  @param[out] answer The message answer structure.
  */
-#define SOCKET_SET_ADDRESS_LENGTH(answer)	&IPC_GET_ARG3(answer)
+#define SOCKET_SET_ADDRESS_LENGTH(answer, value) \
+	{ipcarg_t argument = (ipcarg_t) (value); IPC_SET_ARG3(answer, argument);}
 
 /** Returns the address length message parameter.
  *  @param[in] call The message call structure.
  */
-#define SOCKET_GET_ADDRESS_LENGTH(call)		(socklen_t) IPC_GET_ARG3(call)
+#define SOCKET_GET_ADDRESS_LENGTH(call) \
+	({socklen_t address_length = (socklen_t) IPC_GET_ARG3(call); address_length;})
 
 /** Sets the header size in the message answer.
  *  @param[out] answer The message answer structure.
  */
-#define SOCKET_SET_HEADER_SIZE(answer)		&IPC_GET_ARG3(answer)
+#define SOCKET_SET_HEADER_SIZE(answer, value) \
+	\
+	{ipcarg_t argument = (ipcarg_t) (value); IPC_SET_ARG3(answer, argument);}
 
 /** Returns the header size message parameter.
  *  @param[in] call The message call structure.
  */
-#define SOCKET_GET_HEADER_SIZE(call)		(size_t) IPC_GET_ARG3(call)
+#define SOCKET_GET_HEADER_SIZE(call) \
+	({size_t size = (size_t) IPC_GET_ARG3(call); size;})
 
 /** Returns the flags message parameter.
  *  @param[in] call The message call structure.
  */
-#define SOCKET_GET_FLAGS(call)			(int) IPC_GET_ARG4(call)
+#define SOCKET_GET_FLAGS(call) \
+	({int flags = (int) IPC_GET_ARG4(call); flags;})
 
 /** Returns the option name message parameter.
  *  @param[in] call The message call structure.
  */
-#define SOCKET_GET_OPT_NAME(call)		(int) IPC_GET_ARG4(call)
+#define SOCKET_GET_OPT_NAME(call) \
+	({int opt_name = (int) IPC_GET_ARG4(call); opt_name;})
 
 /** Returns the data fragments message parameter.
  *  @param[in] call The message call structure.
  */
-#define SOCKET_GET_DATA_FRAGMENTS(call)		(int) IPC_GET_ARG5(call)
+#define SOCKET_GET_DATA_FRAGMENTS(call) \
+	({int fragments = (int) IPC_GET_ARG5(call); fragments;})
 
 /** Returns the new socket identifier message parameter.
  *  @param[in] call The message call structure.
  */
-#define SOCKET_GET_NEW_SOCKET_ID(call)		(int) IPC_GET_ARG5(call)
+#define SOCKET_GET_NEW_SOCKET_ID(call) \
+	({int socket_id = (int) IPC_GET_ARG5(call); socket_id;})
 
 /*@}*/
Index: uspace/srv/net/structures/packet/packet_server.c
===================================================================
--- uspace/srv/net/structures/packet/packet_server.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/net/structures/packet/packet_server.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -194,6 +194,6 @@
 			}
 			*answer_count = 2;
-			IPC_SET_ARG1(*answer, packet->packet_id);
-			IPC_SET_ARG2(*answer, packet->length);
+			IPC_SET_ARG1(*answer, (ipcarg_t) packet->packet_id);
+			IPC_SET_ARG2(*answer, (ipcarg_t) packet->length);
 			return EOK;
 		case NET_PACKET_CREATE_4:
@@ -203,6 +203,6 @@
 			}
 			*answer_count = 2;
-			IPC_SET_ARG1(*answer, packet->packet_id);
-			IPC_SET_ARG2(*answer, packet->length);
+			IPC_SET_ARG1(*answer, (ipcarg_t) packet->packet_id);
+			IPC_SET_ARG2(*answer, (ipcarg_t) packet->length);
 			return EOK;
 		case NET_PACKET_GET:
@@ -217,5 +217,5 @@
 				return ENOENT;
 			}
-			IPC_SET_ARG1(*answer, packet->length);
+			IPC_SET_ARG1(*answer, (ipcarg_t) packet->length);
 			*answer_count = 1;
 			return EOK;
Index: uspace/srv/net/tl/icmp/Makefile
===================================================================
--- uspace/srv/net/tl/icmp/Makefile	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/net/tl/icmp/Makefile	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -1,4 +1,5 @@
 #
-# Copyright (c) 2009 Lukas Mejdrech
+# Copyright (c) 2005 Martin Decky
+# Copyright (c) 2007 Jakub Jermar
 # All rights reserved.
 #
@@ -27,27 +28,22 @@
 #
 
-NAME = icmp
+NET_BASE = ../..
+USPACE_PREFIX = ../../../..
+BINARY = icmp
 
-NET_BASE = ../../
-STRUCTURES = $(NET_BASE)structures/
+SOURCES = \
+	icmp.c \
+	icmp_module.c \
+	icmp_client.c \
+	$(NET_BASE)/checksum.c \
+	$(NET_BASE)/module.c \
+	$(NET_BASE)/modules.c \
+	$(NET_BASE)/il/ip/ip_client.c \
+	$(NET_BASE)/il/ip/ip_remote.c \
+	$(NET_BASE)/net/net_remote.c \
+	$(NET_BASE)/structures/measured_strings.c \
+	$(NET_BASE)/structures/packet/packet.c \
+	$(NET_BASE)/structures/packet/packet_client.c \
+	$(NET_BASE)/structures/packet/packet_remote.c
 
-## Sources
-#
-
-OUTPUT = $(NAME)
-SOURCES = \
-	$(NAME).c \
-	$(NAME)_module.c \
-	$(NAME)_client.c \
-	$(NET_BASE)checksum.c \
-	$(NET_BASE)module.c \
-	$(NET_BASE)modules.c \
-	$(NET_BASE)il/ip/ip_client.c \
-	$(NET_BASE)il/ip/ip_remote.c \
-	$(NET_BASE)net/net_remote.c \
-	$(STRUCTURES)measured_strings.c \
-	$(STRUCTURES)packet/packet.c \
-	$(STRUCTURES)packet/packet_client.c \
-	$(STRUCTURES)packet/packet_remote.c
-
-include $(NET_BASE)Makefile.module
+include $(USPACE_PREFIX)/Makefile.common
Index: uspace/srv/net/tl/icmp/icmp.c
===================================================================
--- uspace/srv/net/tl/icmp/icmp.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/net/tl/icmp/icmp.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -41,5 +41,5 @@
 #include <fibril_synch.h>
 #include <stdint.h>
-#include <string.h>
+#include <str.h>
 
 #include <ipc/ipc.h>
Index: uspace/srv/net/tl/icmp/icmp_messages.h
===================================================================
--- uspace/srv/net/tl/icmp/icmp_messages.h	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/net/tl/icmp/icmp_messages.h	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -82,40 +82,48 @@
  *  @param[in] call The message call structure.
  */
-#define ICMP_GET_CODE(call)		(icmp_code_t) IPC_GET_ARG1(*call)
+#define ICMP_GET_CODE(call) \
+	({icmp_code_t code = (icmp_code_t) IPC_GET_ARG1(*call); code;})
 
 /** Returns the ICMP link MTU message parameter.
  *  @param[in] call The message call structure.
  */
-#define ICMP_GET_MTU(call)		(icmp_param_t) IPC_GET_ARG3(*call)
+#define ICMP_GET_MTU(call) \
+	({icmp_param_t mtu = (icmp_param_t) IPC_GET_ARG3(*call); mtu;})
 
 /** Returns the pointer message parameter.
  *  @param[in] call The message call structure.
  */
-#define ICMP_GET_POINTER(call)		(icmp_param_t) IPC_GET_ARG3(*call)
+#define ICMP_GET_POINTER(call) \
+	({icmp_param_t pointer = (icmp_param_t) IPC_GET_ARG3(*call); pointer;})
 
 /** Returns the size message parameter.
  *  @param[in] call The message call structure.
  */
-#define ICMP_GET_SIZE(call)	(size_t) IPC_GET_ARG1(call)
+#define ICMP_GET_SIZE(call) \
+	({size_t size = (size_t) IPC_GET_ARG1(call); size;})
 
 /** Returns the timeout message parameter.
  *  @param[in] call The message call structure.
  */
-#define ICMP_GET_TIMEOUT(call)	((suseconds_t) IPC_GET_ARG2(call))
+#define ICMP_GET_TIMEOUT(call) \
+	(({suseconds_t timeout = (suseconds_t) IPC_GET_ARG2(call); timeout;}))
 
 /** Returns the time to live message parameter.
  *  @param[in] call The message call structure.
  */
-#define ICMP_GET_TTL(call)	(ip_ttl_t) IPC_GET_ARG3(call)
+#define ICMP_GET_TTL(call) \
+	({ip_ttl_t ttl = (ip_ttl_t) IPC_GET_ARG3(call); ttl;})
 
 /** Returns the type of service message parameter.
  *  @param[in] call The message call structure.
  */
-#define ICMP_GET_TOS(call)	(ip_tos_t) IPC_GET_ARG4(call)
+#define ICMP_GET_TOS(call) \
+	({ip_tos_t tos = (ip_tos_t) IPC_GET_ARG4(call); tos;})
 
 /** Returns the dont fragment message parameter.
  *  @param[in] call The message call structure.
  */
-#define ICMP_GET_DONT_FRAGMENT(call)		(int) IPC_GET_ARG5(call)
+#define ICMP_GET_DONT_FRAGMENT(call) \
+	({int dont_fragment = (int) IPC_GET_ARG5(call); dont_fragment;})
 
 /*@}*/
Index: uspace/srv/net/tl/tcp/Makefile
===================================================================
--- uspace/srv/net/tl/tcp/Makefile	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/net/tl/tcp/Makefile	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -1,4 +1,5 @@
 #
-# Copyright (c) 2009 Lukas Mejdrech
+# Copyright (c) 2005 Martin Decky
+# Copyright (c) 2007 Jakub Jermar
 # All rights reserved.
 #
@@ -27,33 +28,28 @@
 #
 
-NAME = tcp
+NET_BASE = ../..
+USPACE_PREFIX = ../../../..
+BINARY = tcp
 
-NET_BASE = ../../
-STRUCTURES = $(NET_BASE)structures/
+SOURCES = \
+	tcp.c \
+	tcp_module.c \
+	$(NET_BASE)/checksum.c \
+	$(NET_BASE)/module.c \
+	$(NET_BASE)/modules.c \
+	$(NET_BASE)/il/ip/ip_client.c \
+	$(NET_BASE)/il/ip/ip_remote.c \
+	$(NET_BASE)/net/net_remote.c \
+	$(NET_BASE)/socket/socket_core.c \
+	$(NET_BASE)/tl/icmp/icmp_client.c \
+	$(NET_BASE)/tl/icmp/icmp_common.c \
+	$(NET_BASE)/tl/icmp/icmp_remote.c \
+	$(NET_BASE)/tl/tl_common.c \
+	$(NET_BASE)/structures/char_map.c \
+	$(NET_BASE)/structures/dynamic_fifo.c \
+	$(NET_BASE)/structures/measured_strings.c \
+	$(NET_BASE)/structures/packet/packet.c \
+	$(NET_BASE)/structures/packet/packet_client.c \
+	$(NET_BASE)/structures/packet/packet_remote.c
 
-## Sources
-#
-
-OUTPUT = $(NAME)
-SOURCES = \
-	$(NAME).c \
-	$(NAME)_module.c \
-	$(NET_BASE)checksum.c \
-	$(NET_BASE)module.c \
-	$(NET_BASE)modules.c \
-	$(NET_BASE)il/ip/ip_client.c \
-	$(NET_BASE)il/ip/ip_remote.c \
-	$(NET_BASE)net/net_remote.c \
-	$(NET_BASE)socket/socket_core.c \
-	$(NET_BASE)tl/icmp/icmp_client.c \
-	$(NET_BASE)tl/icmp/icmp_common.c \
-	$(NET_BASE)tl/icmp/icmp_remote.c \
-	$(NET_BASE)tl/tl_common.c \
-	$(STRUCTURES)char_map.c \
-	$(STRUCTURES)dynamic_fifo.c \
-	$(STRUCTURES)measured_strings.c \
-	$(STRUCTURES)packet/packet.c \
-	$(STRUCTURES)packet/packet_client.c \
-	$(STRUCTURES)packet/packet_remote.c
-
-include $(NET_BASE)Makefile.module
+include $(USPACE_PREFIX)/Makefile.common
Index: uspace/srv/net/tl/tcp/tcp.c
===================================================================
--- uspace/srv/net/tl/tcp/tcp.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/net/tl/tcp/tcp.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -1062,4 +1062,5 @@
 	int socket_id;
 	size_t addrlen;
+	size_t size;
 	fibril_rwlock_t lock;
 	ipc_call_t answer;
@@ -1107,12 +1108,12 @@
 					socket_id = SOCKET_GET_SOCKET_ID(call);
 					res = socket_create(&local_sockets, app_phone, socket_data, &socket_id);
-					*SOCKET_SET_SOCKET_ID(answer) = socket_id;
+					SOCKET_SET_SOCKET_ID(answer, socket_id);
 					fibril_rwlock_write_unlock(&lock);
 					if(res == EOK){
 						if(tl_get_ip_packet_dimension(tcp_globals.ip_phone, &tcp_globals.dimensions, DEVICE_INVALID_ID, &packet_dimension) == EOK){
-							*SOCKET_SET_DATA_FRAGMENT_SIZE(answer) = ((packet_dimension->content < socket_data->data_fragment_size) ? packet_dimension->content : socket_data->data_fragment_size);
+							SOCKET_SET_DATA_FRAGMENT_SIZE(answer, ((packet_dimension->content < socket_data->data_fragment_size) ? packet_dimension->content : socket_data->data_fragment_size));
 						}
-//						*SOCKET_SET_DATA_FRAGMENT_SIZE(answer) = MAX_TCP_FRAGMENT_SIZE;
-						*SOCKET_SET_HEADER_SIZE(answer) = TCP_HEADER_SIZE;
+//						SOCKET_SET_DATA_FRAGMENT_SIZE(answer, MAX_TCP_FRAGMENT_SIZE);
+						SOCKET_SET_HEADER_SIZE(answer, TCP_HEADER_SIZE);
 						answer_count = 3;
 					}else{
@@ -1166,10 +1167,11 @@
 				fibril_rwlock_read_lock(&tcp_globals.lock);
 				fibril_rwlock_write_lock(&lock);
-				res = tcp_accept_message(&local_sockets, SOCKET_GET_SOCKET_ID(call), SOCKET_GET_NEW_SOCKET_ID(call), SOCKET_SET_DATA_FRAGMENT_SIZE(answer), &addrlen);
+				res = tcp_accept_message(&local_sockets, SOCKET_GET_SOCKET_ID(call), SOCKET_GET_NEW_SOCKET_ID(call), &size, &addrlen);
+				SOCKET_SET_DATA_FRAGMENT_SIZE(answer, size);
 				fibril_rwlock_write_unlock(&lock);
 				fibril_rwlock_read_unlock(&tcp_globals.lock);
 				if(res > 0){
-					*SOCKET_SET_SOCKET_ID(answer) = res;
-					*SOCKET_SET_ADDRESS_LENGTH(answer) = addrlen;
+					SOCKET_SET_SOCKET_ID(answer, res);
+					SOCKET_SET_ADDRESS_LENGTH(answer, addrlen);
 					answer_count = 3;
 				}
@@ -1178,5 +1180,6 @@
 				fibril_rwlock_read_lock(&tcp_globals.lock);
 				fibril_rwlock_write_lock(&lock);
-				res = tcp_send_message(&local_sockets, SOCKET_GET_SOCKET_ID(call), SOCKET_GET_DATA_FRAGMENTS(call), SOCKET_SET_DATA_FRAGMENT_SIZE(answer), SOCKET_GET_FLAGS(call));
+				res = tcp_send_message(&local_sockets, SOCKET_GET_SOCKET_ID(call), SOCKET_GET_DATA_FRAGMENTS(call), &size, SOCKET_GET_FLAGS(call));
+				SOCKET_SET_DATA_FRAGMENT_SIZE(answer, size);
 				if(res != EOK){
 					fibril_rwlock_write_unlock(&lock);
@@ -1191,5 +1194,6 @@
 					fibril_rwlock_read_lock(&tcp_globals.lock);
 					fibril_rwlock_write_lock(&lock);
-					res = tcp_send_message(&local_sockets, SOCKET_GET_SOCKET_ID(call), SOCKET_GET_DATA_FRAGMENTS(call), SOCKET_SET_DATA_FRAGMENT_SIZE(answer), SOCKET_GET_FLAGS(call));
+					res = tcp_send_message(&local_sockets, SOCKET_GET_SOCKET_ID(call), SOCKET_GET_DATA_FRAGMENTS(call), &size, SOCKET_GET_FLAGS(call));
+					SOCKET_SET_DATA_FRAGMENT_SIZE(answer, size);
 					if(res != EOK){
 						fibril_rwlock_write_unlock(&lock);
@@ -1208,5 +1212,5 @@
 				fibril_rwlock_read_unlock(&tcp_globals.lock);
 				if(res > 0){
-					*SOCKET_SET_READ_DATA_LENGTH(answer) = res;
+					SOCKET_SET_READ_DATA_LENGTH(answer, res);
 					answer_count = 1;
 					res = EOK;
@@ -1220,6 +1224,6 @@
 				fibril_rwlock_read_unlock(&tcp_globals.lock);
 				if(res > 0){
-					*SOCKET_SET_READ_DATA_LENGTH(answer) = res;
-					*SOCKET_SET_ADDRESS_LENGTH(answer) = addrlen;
+					SOCKET_SET_READ_DATA_LENGTH(answer, res);
+					SOCKET_SET_ADDRESS_LENGTH(answer, addrlen);
 					answer_count = 3;
 					res = EOK;
Index: uspace/srv/net/tl/udp/Makefile
===================================================================
--- uspace/srv/net/tl/udp/Makefile	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/net/tl/udp/Makefile	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -1,4 +1,5 @@
 #
-# Copyright (c) 2009 Lukas Mejdrech
+# Copyright (c) 2005 Martin Decky
+# Copyright (c) 2007 Jakub Jermar
 # All rights reserved.
 #
@@ -27,33 +28,28 @@
 #
 
-NAME = udp
+NET_BASE = ../..
+USPACE_PREFIX = ../../../..
+BINARY = udp
 
-NET_BASE = ../../
-STRUCTURES = $(NET_BASE)structures/
+SOURCES = \
+	udp.c \
+	udp_module.c \
+	$(NET_BASE)/checksum.c \
+	$(NET_BASE)/module.c \
+	$(NET_BASE)/modules.c \
+	$(NET_BASE)/il/ip/ip_client.c \
+	$(NET_BASE)/il/ip/ip_remote.c \
+	$(NET_BASE)/net/net_remote.c \
+	$(NET_BASE)/socket/socket_core.c \
+	$(NET_BASE)/tl/icmp/icmp_client.c \
+	$(NET_BASE)/tl/icmp/icmp_common.c \
+	$(NET_BASE)/tl/icmp/icmp_remote.c \
+	$(NET_BASE)/tl/tl_common.c \
+	$(NET_BASE)/structures/char_map.c \
+	$(NET_BASE)/structures/dynamic_fifo.c \
+	$(NET_BASE)/structures/measured_strings.c \
+	$(NET_BASE)/structures/packet/packet.c \
+	$(NET_BASE)/structures/packet/packet_client.c \
+	$(NET_BASE)/structures/packet/packet_remote.c
 
-## Sources
-#
-
-OUTPUT = $(NAME)
-SOURCES = \
-	$(NAME).c \
-	$(NAME)_module.c \
-	$(NET_BASE)checksum.c \
-	$(NET_BASE)module.c \
-	$(NET_BASE)modules.c \
-	$(NET_BASE)il/ip/ip_client.c \
-	$(NET_BASE)il/ip/ip_remote.c \
-	$(NET_BASE)net/net_remote.c \
-	$(NET_BASE)socket/socket_core.c \
-	$(NET_BASE)tl/icmp/icmp_client.c \
-	$(NET_BASE)tl/icmp/icmp_common.c \
-	$(NET_BASE)tl/icmp/icmp_remote.c \
-	$(NET_BASE)tl/tl_common.c \
-	$(STRUCTURES)char_map.c \
-	$(STRUCTURES)dynamic_fifo.c \
-	$(STRUCTURES)measured_strings.c \
-	$(STRUCTURES)packet/packet.c \
-	$(STRUCTURES)packet/packet_client.c \
-	$(STRUCTURES)packet/packet_remote.c
-
-include $(NET_BASE)Makefile.module
+include $(USPACE_PREFIX)/Makefile.common
Index: uspace/srv/net/tl/udp/udp.c
===================================================================
--- uspace/srv/net/tl/udp/udp.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/net/tl/udp/udp.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -419,4 +419,5 @@
 	int socket_id;
 	size_t addrlen;
+	size_t size;
 	ipc_call_t answer;
 	int answer_count;
@@ -454,12 +455,12 @@
 				socket_id = SOCKET_GET_SOCKET_ID(call);
 				res = socket_create(&local_sockets, app_phone, NULL, &socket_id);
-				*SOCKET_SET_SOCKET_ID(answer) = socket_id;
-				
+				SOCKET_SET_SOCKET_ID(answer, socket_id);
+
 				if(res == EOK){
 					if(tl_get_ip_packet_dimension(udp_globals.ip_phone, &udp_globals.dimensions, DEVICE_INVALID_ID, &packet_dimension) == EOK){
-						*SOCKET_SET_DATA_FRAGMENT_SIZE(answer) = packet_dimension->content;
+						SOCKET_SET_DATA_FRAGMENT_SIZE(answer, packet_dimension->content);
 					}
-//					*SOCKET_SET_DATA_FRAGMENT_SIZE(answer) = MAX_UDP_FRAGMENT_SIZE;
-					*SOCKET_SET_HEADER_SIZE(answer) = UDP_HEADER_SIZE;
+//					SOCKET_SET_DATA_FRAGMENT_SIZE(answer, MAX_UDP_FRAGMENT_SIZE);
+					SOCKET_SET_HEADER_SIZE(answer, UDP_HEADER_SIZE);
 					answer_count = 3;
 				}
@@ -478,5 +479,6 @@
 				if(res == EOK){
 					fibril_rwlock_write_lock(&udp_globals.lock);
-					res = udp_sendto_message(&local_sockets, SOCKET_GET_SOCKET_ID(call), addr, addrlen, SOCKET_GET_DATA_FRAGMENTS(call), SOCKET_SET_DATA_FRAGMENT_SIZE(answer), SOCKET_GET_FLAGS(call));
+					res = udp_sendto_message(&local_sockets, SOCKET_GET_SOCKET_ID(call), addr, addrlen, SOCKET_GET_DATA_FRAGMENTS(call), &size, SOCKET_GET_FLAGS(call));
+					SOCKET_SET_DATA_FRAGMENT_SIZE(answer, size);
 					if(res != EOK){
 						fibril_rwlock_write_unlock(&udp_globals.lock);
@@ -492,6 +494,6 @@
 				fibril_rwlock_write_unlock(&udp_globals.lock);
 				if(res > 0){
-					*SOCKET_SET_READ_DATA_LENGTH(answer) = res;
-					*SOCKET_SET_ADDRESS_LENGTH(answer) = addrlen;
+					SOCKET_SET_READ_DATA_LENGTH(answer, res);
+					SOCKET_SET_ADDRESS_LENGTH(answer, addrlen);
 					answer_count = 3;
 					res = EOK;
Index: uspace/srv/ns/Makefile
===================================================================
--- uspace/srv/ns/Makefile	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/ns/Makefile	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -29,7 +29,5 @@
 
 USPACE_PREFIX = ../..
-LIBS = $(LIBC_PREFIX)/libc.a
-
-OUTPUT = ns
+BINARY = ns
 
 SOURCES = \
@@ -39,3 +37,3 @@
 	task.c
 
-include ../Makefile.common
+include $(USPACE_PREFIX)/Makefile.common
Index: uspace/srv/taskmon/Makefile
===================================================================
--- uspace/srv/taskmon/Makefile	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/taskmon/Makefile	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -28,10 +28,8 @@
 
 USPACE_PREFIX = ../..
-LIBS = $(LIBC_PREFIX)/libc.a
-
-OUTPUT = taskmon
+BINARY = taskmon
 
 SOURCES = \
 	taskmon.c
 
-include ../Makefile.common
+include $(USPACE_PREFIX)/Makefile.common
Index: uspace/srv/vfs/Makefile
===================================================================
--- uspace/srv/vfs/Makefile	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/vfs/Makefile	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -29,7 +29,5 @@
 
 USPACE_PREFIX = ../..
-LIBS = $(LIBC_PREFIX)/libc.a
-
-OUTPUT = vfs
+BINARY = vfs
 
 SOURCES = \
@@ -41,3 +39,3 @@
 	vfs_register.c
 
-include ../Makefile.common
+include $(USPACE_PREFIX)/Makefile.common
Index: uspace/srv/vfs/vfs.c
===================================================================
--- uspace/srv/vfs/vfs.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/vfs/vfs.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -42,5 +42,5 @@
 #include <stdio.h>
 #include <bool.h>
-#include <string.h>
+#include <str.h>
 #include <as.h>
 #include <atomic.h>
Index: uspace/srv/vfs/vfs_file.c
===================================================================
--- uspace/srv/vfs/vfs_file.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/vfs/vfs_file.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -38,5 +38,5 @@
 #include <errno.h>
 #include <stdlib.h>
-#include <string.h>
+#include <str.h>
 #include <assert.h>
 #include <bool.h>
Index: uspace/srv/vfs/vfs_lookup.c
===================================================================
--- uspace/srv/vfs/vfs_lookup.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/vfs/vfs_lookup.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -41,5 +41,5 @@
 #include <async.h>
 #include <errno.h>
-#include <string.h>
+#include <str.h>
 #include <stdarg.h>
 #include <bool.h>
Index: uspace/srv/vfs/vfs_node.c
===================================================================
--- uspace/srv/vfs/vfs_node.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/vfs/vfs_node.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -38,5 +38,5 @@
 #include "vfs.h"
 #include <stdlib.h>
-#include <string.h>
+#include <str.h>
 #include <fibril_synch.h>
 #include <adt/hash_table.h>
Index: uspace/srv/vfs/vfs_ops.c
===================================================================
--- uspace/srv/vfs/vfs_ops.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/vfs/vfs_ops.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -44,5 +44,5 @@
 #include <stdio.h>
 #include <stdlib.h>
-#include <string.h>
+#include <str.h>
 #include <bool.h>
 #include <fibril_synch.h>
Index: uspace/srv/vfs/vfs_register.c
===================================================================
--- uspace/srv/vfs/vfs_register.c	(revision 4204ad9995854e56dae719be52c05abf90dee4e7)
+++ uspace/srv/vfs/vfs_register.c	(revision 12d77106be9d0f1eed699d9bb16b4d8fae4b4348)
@@ -43,5 +43,5 @@
 #include <stdio.h>
 #include <stdlib.h>
-#include <string.h>
+#include <str.h>
 #include <ctype.h>
 #include <bool.h>
