Index: boot/arch/mips64/Makefile.inc
===================================================================
--- boot/arch/mips64/Makefile.inc	(revision c451d2214eee6d7cef53afd87177f8dbb0926c2f)
+++ 	(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.
-#
-
-BFD_ARCH = mips:4000
-BITS = 64
-EXTRA_CFLAGS = -msoft-float -mno-abicalls -G 0 -fno-zero-initialized-in-bss -mips3 -mabi=64
-
-ifeq ($(MACHINE),msim)
-	BFD_NAME = elf64-tradlittlemips
-	BFD_OUTPUT = binary
-	ENDIANESS = LE
-endif
-
-SOURCES = \
-	arch/$(BARCH)/src/asm.S \
-	arch/$(BARCH)/src/main.c \
-	arch/$(BARCH)/src/putchar.c \
-	$(COMPS_C) \
-	genarch/src/division.c \
-	genarch/src/multiplication.c \
-	generic/src/memstr.c \
-	generic/src/printf_core.c \
-	generic/src/vprintf.c \
-	generic/src/printf.c \
-	generic/src/str.c \
-	generic/src/version.c \
-	generic/src/inflate.c
Index: boot/arch/mips64/_link.ld.in
===================================================================
--- boot/arch/mips64/_link.ld.in	(revision c451d2214eee6d7cef53afd87177f8dbb0926c2f)
+++ 	(revision )
@@ -1,30 +1,0 @@
-OUTPUT_FORMAT(elf64-tradlittlemips)
-ENTRY(start)
-
-SECTIONS {
-	. = 0xffffffffbfc00000;
-	.text : {
-		*(BOOTSTRAP);
-		*(.text);
-	}
-	.data : {
-		*(.data);       /* initialized data */
-		*(.rodata);
-		*(.rodata.*);
-		*(.sdata);
-		*(.reginfo);
-		*(.sbss);
-		*(.scommon);
-		*(.bss);        /* uninitialized static variables */
-		*(COMMON);      /* global variables */
-[[COMPONENTS]]
-	}
-	
-	/DISCARD/ : {
-		*(.gnu.*);
-		*(.mdebug*);
-		*(.pdr);
-		*(.comment);
-		*(.note);
-	}
-}
Index: boot/arch/mips64/include/arch.h
===================================================================
--- boot/arch/mips64/include/arch.h	(revision c451d2214eee6d7cef53afd87177f8dbb0926c2f)
+++ 	(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.
- */
-
-#ifndef BOOT_mips64_ARCH_H_
-#define BOOT_mips64_ARCH_H_
-
-#define PAGE_WIDTH  14
-#define PAGE_SIZE   (1 << PAGE_WIDTH)
-
-#define CPUMAP_OFFSET    0x00001000
-#define STACK_OFFSET     0x00002000
-#define BOOTINFO_OFFSET  0x00003000
-#define BOOT_OFFSET      0x00100000
-#define LOADER_OFFSET    0x1fc00000
-
-#define MSIM_VIDEORAM_ADDRESS  0xffffffffb0000000
-#define MSIM_DORDER_ADDRESS    0xffffffffb0000100
-
-#ifndef __ASM__
-	#define PA2KA(addr)    (((uintptr_t) (addr)) + 0xffffffff80000000)
-	#define KSEG2PA(addr)  (((uintptr_t) (addr)) - 0xffffffffa0000000)
-#else
-	#define PA2KA(addr)    ((addr) + 0xffffffff80000000)
-	#define KSEG2PA(addr)  ((addr) - 0xffffffffa0000000)
-#endif
-
-#endif
Index: boot/arch/mips64/include/asm.h
===================================================================
--- boot/arch/mips64/include/asm.h	(revision c451d2214eee6d7cef53afd87177f8dbb0926c2f)
+++ 	(revision )
@@ -1,1 +1,0 @@
-../../mips32/include/asm.h
Index: boot/arch/mips64/include/main.h
===================================================================
--- boot/arch/mips64/include/main.h	(revision c451d2214eee6d7cef53afd87177f8dbb0926c2f)
+++ 	(revision )
@@ -1,1 +1,0 @@
-../../mips32/include/main.h
Index: boot/arch/mips64/include/regname.h
===================================================================
--- boot/arch/mips64/include/regname.h	(revision c451d2214eee6d7cef53afd87177f8dbb0926c2f)
+++ 	(revision )
@@ -1,1 +1,0 @@
-../../mips32/include/regname.h
Index: boot/arch/mips64/include/types.h
===================================================================
--- boot/arch/mips64/include/types.h	(revision c451d2214eee6d7cef53afd87177f8dbb0926c2f)
+++ 	(revision )
@@ -1,54 +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.
- */
-
-#ifndef BOOT_mips64_TYPES_H_
-#define BOOT_mips64_TYPES_H_
-
-#define TASKMAP_MAX_RECORDS        32
-#define CPUMAP_MAX_RECORDS         32
-#define BOOTINFO_TASK_NAME_BUFLEN  32
-
-typedef uint64_t size_t;
-typedef uint64_t uintptr_t;
-
-typedef struct {
-	/** Address where the task was placed. */
-	void *addr;
-	/** Size of the task's binary. */
-	size_t size;
-	/** Task name. */
-	char name[BOOTINFO_TASK_NAME_BUFLEN];
-} task_t;
-
-typedef struct {
-	uint32_t cpumap;
-	size_t cnt;
-	task_t tasks[TASKMAP_MAX_RECORDS];
-} bootinfo_t;
-
-#endif
Index: boot/arch/mips64/src/asm.S
===================================================================
--- boot/arch/mips64/src/asm.S	(revision c451d2214eee6d7cef53afd87177f8dbb0926c2f)
+++ 	(revision )
@@ -1,150 +1,0 @@
-#
-# Copyright (c) 2006 Martin Decky
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# - Redistributions of source code must retain the above copyright
-#   notice, this list of conditions and the following disclaimer.
-# - Redistributions in binary form must reproduce the above copyright
-#   notice, this list of conditions and the following disclaimer in the
-#   documentation and/or other materials provided with the distribution.
-# - The name of the author may not be used to endorse or promote products
-#   derived from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-
-#include <arch/arch.h>
-#include <arch/regname.h>
-
-.set noat
-.set noreorder
-.set nomacro
-
-.global start
-.global halt
-.global jump_to_kernel
-
-.section BOOTSTRAP
-
-start:
-	/*
-	 * Setup the CP0 configuration
-	 *  - Enable 64-bit kernel addressing mode
-	 *  - Enable 64-bit supervisor adressing mode
-	 *  - Enable 64-bit user addressing mode
-	 */
-	mfc0 $a0, $status
-	ori $a0, 0x00e0
-	mtc0 $a0, $status
-	
-	/*
-	 * Setup CPU map (on msim this code
-	 * is executed in parallel on all CPUs,
-	 * but it not an issue).
-	 */
-	dla $a0, PA2KA(CPUMAP_OFFSET)
-	
-	sw $zero, 0($a0)
-	sw $zero, 4($a0)
-	sw $zero, 8($a0)
-	sw $zero, 12($a0)
-	
-	sw $zero, 16($a0)
-	sw $zero, 20($a0)
-	sw $zero, 24($a0)
-	sw $zero, 28($a0)
-	
-	sw $zero, 32($a0)
-	sw $zero, 36($a0)
-	sw $zero, 40($a0)
-	sw $zero, 44($a0)
-	
-	sw $zero, 48($a0)
-	sw $zero, 52($a0)
-	sw $zero, 56($a0)
-	sw $zero, 60($a0)
-	
-	sw $zero, 64($a0)
-	sw $zero, 68($a0)
-	sw $zero, 72($a0)
-	sw $zero, 76($a0)
-	
-	sw $zero, 80($a0)
-	sw $zero, 84($a0)
-	sw $zero, 88($a0)
-	sw $zero, 92($a0)
-	
-	sw $zero, 96($a0)
-	sw $zero, 100($a0)
-	sw $zero, 104($a0)
-	sw $zero, 108($a0)
-	
-	sw $zero, 112($a0)
-	sw $zero, 116($a0)
-	sw $zero, 120($a0)
-	sw $zero, 124($a0)
-	
-	lui $a1, 1
-	
-#ifdef MACHINE_msim
-	
-	/* Read dorder value */
-	dla $k0, MSIM_DORDER_ADDRESS
-	lw $k1, ($k0)
-	
-	/*
-	 * If we are not running on BSP
-	 * then end in an infinite loop.
-	 */
-	beq $k1, $zero, bsp
-	nop
-	
-	/* Record CPU presence */
-	sll $a2, $k1, 2
-	addu $a2, $a2, $a0
-	sw $a1, ($a2)
-	
-	loop:
-		j loop
-		nop
-	
-#endif
-	
-	bsp:
-		/* Record CPU presence */
-		sw $a1, ($a0)
-		
-		/* Setup initial stack */
-		dla $sp, PA2KA(STACK_OFFSET)
-		
-		j bootstrap
-		nop
-
-.text
-
-halt:
-	j halt
-	nop
-
-jump_to_kernel:
-	/*
-	 * TODO:
-	 *
-	 * Make sure that the I-cache, D-cache and memory are mutually
-	 * coherent before passing control to the copied code.
-	 */
-	j $a0
-	nop
Index: boot/arch/mips64/src/main.c
===================================================================
--- boot/arch/mips64/src/main.c	(revision c451d2214eee6d7cef53afd87177f8dbb0926c2f)
+++ 	(revision )
@@ -1,126 +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.
- */
-
-#include <arch/main.h>
-#include <arch/arch.h>
-#include <arch/asm.h>
-#include <arch/_components.h>
-#include <halt.h>
-#include <printf.h>
-#include <memstr.h>
-#include <version.h>
-#include <macros.h>
-#include <align.h>
-#include <str.h>
-#include <errno.h>
-#include <inflate.h>
-
-#define TOP2ADDR(top)  (((void *) PA2KA(BOOT_OFFSET)) + (top))
-
-static bootinfo_t *bootinfo = (bootinfo_t *) PA2KA(BOOTINFO_OFFSET);
-static uint32_t *cpumap = (uint32_t *) PA2KA(CPUMAP_OFFSET);
-
-void bootstrap(void)
-{
-	version_print();
-	
-	printf("\nMemory statistics\n");
-	printf(" %p|%p: CPU map\n", (void *) PA2KA(CPUMAP_OFFSET),
-	    (void *) CPUMAP_OFFSET);
-	printf(" %p|%p: bootstrap stack\n", (void *) PA2KA(STACK_OFFSET),
-	    (void *) STACK_OFFSET);
-	printf(" %p|%p: boot info structure\n",
-	    (void *) PA2KA(BOOTINFO_OFFSET), (void *) BOOTINFO_OFFSET);
-	printf(" %p|%p: kernel entry point\n", (void *) PA2KA(BOOT_OFFSET),
-	    (void *) BOOT_OFFSET);
-	printf(" %p|%p: bootloader entry point\n",
-	    (void *) PA2KA(LOADER_OFFSET), (void *) LOADER_OFFSET);
-	
-	size_t i;
-	for (i = 0; i < COMPONENTS; i++)
-		printf(" %p|%p: %s image (%zu/%zu bytes)\n", components[i].start,
-		    (void *) KSEG2PA(components[i].start), components[i].name,
-		    components[i].inflated, components[i].size);
-	
-	void *dest[COMPONENTS];
-	size_t top = 0;
-	size_t cnt = 0;
-	bootinfo->cnt = 0;
-	for (i = 0; i < min(COMPONENTS, TASKMAP_MAX_RECORDS); i++) {
-		top = ALIGN_UP(top, PAGE_SIZE);
-		
-		if (i > 0) {
-			bootinfo->tasks[bootinfo->cnt].addr = TOP2ADDR(top);
-			bootinfo->tasks[bootinfo->cnt].size = components[i].inflated;
-			
-			str_cpy(bootinfo->tasks[bootinfo->cnt].name,
-			    BOOTINFO_TASK_NAME_BUFLEN, components[i].name);
-			
-			bootinfo->cnt++;
-		}
-		
-		dest[i] = TOP2ADDR(top);
-		top += components[i].inflated;
-		cnt++;
-	}
-	
-	printf("\nInflating components ... ");
-	
-	for (i = cnt; i > 0; i--) {
-		void *tail = dest[i - 1] + components[i].inflated;
-		if (tail >= ((void *) PA2KA(LOADER_OFFSET))) {
-			printf("\n%s: Image too large to fit (%p >= %p), halting.\n",
-			    components[i].name, tail, (void *) PA2KA(LOADER_OFFSET));
-			halt();
-		}
-		
-		printf("%s ", components[i - 1].name);
-		
-		int err = inflate(components[i - 1].start, components[i - 1].size,
-		    dest[i - 1], components[i - 1].inflated);
-		
-		if (err != EOK) {
-			printf("\n%s: Inflating error %d, halting.\n",
-			    components[i - 1].name, err);
-			halt();
-		}
-	}
-	
-	printf(".\n");
-	
-	printf("Copying CPU map ... \n");
-	
-	bootinfo->cpumap = 0;
-	for (i = 0; i < CPUMAP_MAX_RECORDS; i++) {
-		if (cpumap[i] != 0)
-			bootinfo->cpumap |= (1 << i);
-	}
-	
-	printf("Booting the kernel ... \n");
-	jump_to_kernel((void *) PA2KA(BOOT_OFFSET), bootinfo);
-}
Index: boot/arch/mips64/src/putchar.c
===================================================================
--- boot/arch/mips64/src/putchar.c	(revision c451d2214eee6d7cef53afd87177f8dbb0926c2f)
+++ 	(revision )
@@ -1,40 +1,0 @@
-/*
- * Copyright (c) 2006 Martin Decky
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <typedefs.h>
-#include <arch/arch.h>
-#include <putchar.h>
-#include <str.h>
-
-void putchar(const wchar_t ch)
-{
-	if (ascii_check(ch))
-		*((char *) MSIM_VIDEORAM_ADDRESS) = ch;
-	else
-		*((char *) MSIM_VIDEORAM_ADDRESS) = U_SPECIAL;
-}
