Index: boot/arch/ia32xen/Makefile.inc
===================================================================
--- boot/arch/ia32xen/Makefile.inc	(revision fd375a8d1ed315622d230241a9b3227ec34ba99e)
+++ 	(revision )
@@ -1,64 +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.
-#
-
-TASKS = \
-	$(USPACEDIR)/srv/ns/ns \
-	$(USPACEDIR)/srv/pci/pci \
-	$(USPACEDIR)/srv/fb/fb \
-	$(USPACEDIR)/srv/kbd/kbd \
-	$(USPACEDIR)/srv/console/console \
-	$(USPACEDIR)/srv/vfs/vfs \
-	$(USPACEDIR)/srv/fs/tmpfs/tmpfs \
-	$(USPACEDIR)/srv/fs/fat/fat \
-	$(USPACEDIR)/srv/devmap/devmap \
-	$(USPACEDIR)/app/init/init \
-	$(USPACEDIR)/app/tetris/tetris \
-	$(USPACEDIR)/app/tester/tester \
-	$(USPACEDIR)/app/klog/klog
-
-build: $(BASE)/image.iso
-
-$(BASE)/image.iso: arch/$(ARCH)/grub/stage2_eltorito arch/$(ARCH)/grub/menu.lst arch/$(ARCH)/grub/menu.debug.lst arch/$(ARCH)/grub/xen.gz arch/$(ARCH)/grub/xen.debug.gz $(KERNELDIR)/kernel.bin $(TASKS)
-	mkdir -p arch/$(ARCH)/iso/boot/grub
-	cp arch/$(ARCH)/grub/stage2_eltorito arch/$(ARCH)/iso/boot/grub/
-ifeq ($(CONFIG_DEBUG),y)
-	cp arch/$(ARCH)/grub/menu.debug.lst arch/$(ARCH)/iso/boot/grub/menu.lst
-	cp arch/$(ARCH)/grub/xen.debug.gz arch/$(ARCH)/iso/boot/
-else
-	cp arch/$(ARCH)/grub/menu.lst arch/$(ARCH)/iso/boot/grub/
-	cp arch/$(ARCH)/grub/xen.gz arch/$(ARCH)/iso/boot/
-endif
-	cp $(KERNELDIR)/kernel.bin arch/$(ARCH)/iso/boot/
-	for task in $(TASKS) ; do \
-		cp $$task arch/$(ARCH)/iso/boot/ ; \
-	done
-	mkisofs -J -r -b boot/grub/stage2_eltorito -no-emul-boot -boot-load-size 4 -boot-info-table -o $(BASE)/image.iso arch/$(ARCH)/iso/
-
-clean:
-	-rm -fr arch/$(ARCH)/iso
-	-rm -f $(BASE)/image.iso
Index: boot/arch/ia32xen/grub/COPYING
===================================================================
--- boot/arch/ia32xen/grub/COPYING	(revision fd375a8d1ed315622d230241a9b3227ec34ba99e)
+++ 	(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: boot/arch/ia32xen/grub/README
===================================================================
--- boot/arch/ia32xen/grub/README	(revision fd375a8d1ed315622d230241a9b3227ec34ba99e)
+++ 	(revision )
@@ -1,5 +1,0 @@
-For licensing terms of GRUB boot loader see the file COPYING contained
-in this directory. Full version of GRUB, including its source code,
-can be downloaded from GRUB's project page:
-
-http://www.gnu.org/software/grub/
Index: boot/arch/ia32xen/grub/menu.debug.lst
===================================================================
--- boot/arch/ia32xen/grub/menu.debug.lst	(revision fd375a8d1ed315622d230241a9b3227ec34ba99e)
+++ 	(revision )
@@ -1,16 +1,0 @@
-default 0
-timeout 10
-
-title=HelenOS/ia32xen
-root (cd)
-kernel /boot/xen.debug.gz noreboot console=com1,vga com1=auto,8n1,0x3f8
-module /boot/kernel.bin
-module /boot/ns
-module /boot/init
-module /boot/pci
-module /boot/fb
-module /boot/kbd
-module /boot/console
-module /boot/tetris
-module /boot/tester
-module /boot/klog
Index: boot/arch/ia32xen/grub/menu.lst
===================================================================
--- boot/arch/ia32xen/grub/menu.lst	(revision fd375a8d1ed315622d230241a9b3227ec34ba99e)
+++ 	(revision )
@@ -1,20 +1,0 @@
-default 0
-timeout 10
-
-title=HelenOS/ia32xen
-root (cd)
-kernel /boot/xen.gz
-module /boot/kernel.bin
-module /boot/ns
-module /boot/init
-module /boot/pci
-module /boot/fb
-module /boot/kbd
-module /boot/console
-module /boot/vfs
-module /boot/tmpfs
-module /boot/fat
-module /boot/devmap
-module /boot/tetris
-module /boot/tester
-module /boot/klog
Index: boot/arch/ppc64/Makefile.inc
===================================================================
--- boot/arch/ppc64/Makefile.inc	(revision fd375a8d1ed315622d230241a9b3227ec34ba99e)
+++ 	(revision )
@@ -1,44 +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.
-#
-
-DEFS += -DOPEN_BOOT
-
-build: $(BASE)/image.boot
-
-$(BASE)/image.boot: depend arch/$(ARCH)/loader/image.boot
-	cp arch/$(ARCH)/loader/image.boot $(BASE)/image.boot
-
-depend:
-	-rm arch/$(ARCH)/loader/image.boot
-
-arch/$(ARCH)/loader/image.boot:
-	make -C arch/$(ARCH)/loader COMPILER=$(COMPILER) KERNELDIR=../../../$(KERNELDIR) USPACEDIR=../../../$(USPACEDIR) "DEFS=$(DEFS)"
-
-clean: generic_clean
-	make -C arch/$(ARCH)/loader clean COMPILER=$(COMPILER) KERNELDIR=../../../$(KERNELDIR) USPACEDIR=../../../$(USPACEDIR)
-	-rm -f $(BASE)/image.boot
Index: boot/arch/ppc64/loader/Makefile
===================================================================
--- boot/arch/ppc64/loader/Makefile	(revision fd375a8d1ed315622d230241a9b3227ec34ba99e)
+++ 	(revision )
@@ -1,120 +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 ../../../../version
-include ../../../../Makefile.config
-
-## Toolchain configuration
-#
-
-ifndef CROSS_PREFIX
-	CROSS_PREFIX = /usr/local
-endif
-
-BFD_NAME = elf64-powerpc
-BFD_ARCH = powerpc:common64
-TARGET = ppc64-linux-gnu
-TOOLCHAIN_DIR = $(CROSS_PREFIX)/ppc64/bin
-
-ifeq ($(COMPILER),gcc_native)
-	CC = gcc
-	AS = as
-	LD = ld
-	OBJCOPY = objcopy
-	OBJDUMP = objdump
-endif
-
-ifeq ($(COMPILER),gcc_cross)
-	CC = $(TOOLCHAIN_DIR)/$(TARGET)-gcc
-	AS = $(TOOLCHAIN_DIR)/$(TARGET)-as
-	LD = $(TOOLCHAIN_DIR)/$(TARGET)-ld
-	OBJCOPY = $(TOOLCHAIN_DIR)/$(TARGET)-objcopy
-	OBJDUMP = $(TOOLCHAIN_DIR)/$(TARGET)-objdump
-endif
-
-CFLAGS = -DRELEASE=\"$(RELEASE)\" -I. -I../../../generic -I../../../genarch -nostdinc -nostdlib -fno-builtin -Werror-implicit-function-declaration -Wmissing-prototypes -Werror -O3 -mcpu=powerpc64 -msoft-float -m64 -pipe
-
-ifdef REVISION
-	CFLAGS += "-DREVISION=\"$(REVISION)\""
-endif
-
-ifdef TIMESTAMP
-	CFLAGS += "-DTIMESTAMP=\"$(TIMESTAMP)\""
-endif
-
-SOURCES = \
-	main.c \
-	ofwarch.c \
-	_components.c \
-	../../../genarch/ofw.c \
-	../../../generic/printf.c \
-	asm.S \
-	boot.S
-
-COMPONENTS = \
-	$(KERNELDIR)/kernel.bin \
-	$(USPACEDIR)/srv/ns/ns \
-	$(USPACEDIR)/srv/fb/fb \
-	$(USPACEDIR)/srv/kbd/kbd \
-	$(USPACEDIR)/srv/console/console \
-	$(USPACEDIR)/srv/vfs/vfs \
-	$(USPACEDIR)/srv/fs/tmpfs/tmpfs \
-	$(USPACEDIR)/srv/fs/fat/fat \
-	$(USPACEDIR)/srv/devmap/devmap \
-	$(USPACEDIR)/app/init/init \
-	$(USPACEDIR)/app/tetris/tetris \
-	$(USPACEDIR)/app/tester/tester \
-	$(USPACEDIR)/app/trace/trace \
-	$(USPACEDIR)/app/klog/klog
-
-OBJECTS := $(addsuffix .o,$(basename $(SOURCES)))
-COMPONENT_OBJECTS := $(addsuffix .o,$(basename $(notdir $(COMPONENTS))))
-
-.PHONY: all clean depend
-
-all: image.boot
-
--include Makefile.depend
-
-image.boot: depend _components.h _link.ld $(COMPONENT_OBJECTS) $(OBJECTS)
-	$(LD) -no-check-sections -N -T _link.ld $(COMPONENT_OBJECTS) $(OBJECTS) -o $@
-
-depend:
-	-makedepend -f - -- $(DEFS) $(CFLAGS) -- $(SOURCES) > Makefile.depend 2> /dev/null
-
-clean:
-	-rm -f _components.h _components.c _link.ld $(COMPONENT_OBJECTS) $(OBJECTS) image.boot Makefile.depend
-
-_components.h _components.c _link.ld $(COMPONENT_OBJECTS): $(COMPONENTS) _link.ld.in
-	../../../tools/pack.py $(OBJCOPY) $(BFD_NAME) $(BFD_ARCH) 4096 "unsigned long" $(COMPONENTS)
-
-%.o: %.S
-	$(CC) $(DEFS) $(CFLAGS) -D__ASM__ -c $< -o $@
-
-%.o: %.c
-	$(CC) $(DEFS) $(CFLAGS) -c $< -o $@
Index: boot/arch/ppc64/loader/_link.ld.in
===================================================================
--- boot/arch/ppc64/loader/_link.ld.in	(revision fd375a8d1ed315622d230241a9b3227ec34ba99e)
+++ 	(revision )
@@ -1,27 +1,0 @@
-OUTPUT_FORMAT("elf64-powerpc") 
-OUTPUT_ARCH(powerpc:common64) 
-ENTRY(start) 
- 
-SECTIONS {
-	.boot 0x0000000010000000: AT (0) { 
-		*(BOOTSTRAP);
-		*(REALMODE);
-		*(.text);
-		*(.toc);
-		
-		*(.opd);
-		*(.rodata);
-		*(.rodata.*);
-		*(.data);		/* initialized data */
-		*(.sdata);
-		*(.sdata2);
-		*(.sbss);
-		*(.bss);		/* uninitialized static variables */	
-		*(COMMON); 		/* global variables */
-[[COMPONENTS]]
-	} 
- 
-    /DISCARD/ : { 
-        *(*); 
-    } 
-}
Index: boot/arch/ppc64/loader/asm.S
===================================================================
--- boot/arch/ppc64/loader/asm.S	(revision fd375a8d1ed315622d230241a9b3227ec34ba99e)
+++ 	(revision )
@@ -1,279 +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 "asm.h"
-#include "regname.h"
-
-.text
-
-.global halt
-.global memcpy
-.global jump_to_kernel
-
-halt:
-	b halt
-
-memcpy:
-	srwi. r7, r5, 3
-	addi r6, r3, -4
-	addi r4, r4, -4
-	beq	2f
-	
-	andi. r0, r6, 3
-	mtctr r7
-	bne 5f
-	
-	1:
-	
-	lwz r7, 4(r4)
-	lwzu r8, 8(r4)
-	stw r7, 4(r6)
-	stwu r8, 8(r6)
-	bdnz 1b
-	
-	andi. r5, r5, 7
-	
-	2:
-	
-	cmplwi 0, r5, 4
-	blt 3f
-	
-	lwzu r0, 4(r4)
-	addi r5, r5, -4
-	stwu r0, 4(r6)
-	
-	3:
-	
-	cmpwi 0, r5, 0
-	beqlr
-	mtctr r5
-	addi r4, r4, 3
-	addi r6, r6, 3
-	
-	4:
-	
-	lbzu r0, 1(r4)
-	stbu r0, 1(r6)
-	bdnz 4b
-	blr
-	
-	5:
-	
-	subfic r0, r0, 4
-	mtctr r0
-	
-	6:
-	
-	lbz r7, 4(r4)
-	addi r4, r4, 1
-	stb r7, 4(r6)
-	addi r6, r6, 1
-	bdnz 6b
-	subf r5, r0, r5
-	rlwinm. r7, r5, 32-3, 3, 31
-	beq 2b
-	mtctr r7
-	b 1b
-
-
-jump_to_kernel:
-	
-	# r3 = bootinfo (pa)
-	# r4 = bootinfo_size
-	# r5 = trans (pa)
-	# r6 = bytes to copy
-	# r7 = real_mode (pa)
-	# r8 = framebuffer (pa)
-	# r9 = scanline
-	
-	# disable interrupts
-	
-	mfmsr r31
-	rlwinm r31, r31, 0, 17, 15
-	mtmsr r31
-	
-	# set real_mode meeting point address
-	
-	mtspr srr0, r7
-	
-	# jumps to real_mode
-	
-	mfmsr r31
-	lis r30, ~0@h
-	ori r30, r30, ~(msr_ir | msr_dr)@l
-	and r31, r31, r30
-	mtspr srr1, r31
-	
-	sync
-	isync
-	rfid
-
-.section REALMODE, "ax"
-.align PAGE_WIDTH
-.global real_mode
-
-real_mode:
-	
-	# copy kernel to proper location
-	#
-	# r5 = trans (pa)
-	# r6 = bytes to copy
-	# r8 = framebuffer (pa)
-	# r9 = scanline
-	
-	li r31, PAGE_SIZE >> 2
-	li r30, 0
-	
-	page_copy:
-		
-		cmpwi r6, 0
-		beq copy_end
-		
-		# copy page
-		
-		mtctr r31
-		lwz r29, 0(r5)
-		
-		copy_loop:
-			
-			lwz r28, 0(r29)
-			stw r28, 0(r30)
-			
-			addi r29, r29, 4
-			addi r30, r30, 4
-			subi r6, r6, 4
-			
-			cmpwi r6, 0
-			beq copy_end
-			
-			bdnz copy_loop
-			
-		addi r5, r5, 4
-		b page_copy
-	
-	copy_end:
-	
-	# initially fill segment registers
-	
-	li r31, 0
-	
-	li r29, 8
-	mtctr r29
-	li r30, 0                     # ASID 0 (VSIDs 0 .. 7)
-
-	seg_fill_uspace:
-	
-		mtsrin r30, r31
-		addi r30, r30, 1
-		addis r31, r31, 0x1000    # move to next SR
-		
-		bdnz seg_fill_uspace
-	
-	li r29, 8
-	mtctr r29
-	lis r30, 0x4000               # priviledged access only
-	ori r30, r30, 8               # ASID 0 (VSIDs 8 .. 15)
-	
-	seg_fill_kernel:
-	
-		mtsrin r30, r31
-		addi r30, r30, 1
-		addis r31, r31, 0x1000    # move to next SR
-		
-		bdnz seg_fill_kernel
-	
-	# create empty Page Hash Table
-	# on top of memory, size 64 KB
-	
-	lwz r31, 0(r3)                # r31 = memory size
-	
-	lis r30, 65536@h
-	ori r30, r30, 65536@l         # r30 = 65536
-	
-	subi r29, r30, 1              # r29 = 65535
-	
-	sub r31, r31, r30
-	andc r31, r31, r29            # pht = ALIGN_DOWN(memory_size - 65536, 65536)
-	
-	mtsdr1 r31
-	
-	li r29, 2
-	srw r30, r30, r29             # r30 = 16384
-	li r29, 0
-	
-	pht_clear:
-		
-		# write zeroes
-		
-		stw r29, 0(r31)
-		
-		addi r31, r31, 4
-		subi r30, r30, 4
-		
-		cmpwi r30, 0
-		beq clear_end
-		
-		bdnz pht_clear
-		
-	clear_end:
-	
-	tlbsync
-	
-	# start the kernel
-	#
-	# pc = KERNEL_START_ADDR
-	# r3 = bootinfo (pa)
-	# sprg0 = KA2PA(KERNEL_START_ADDR)
-	# sprg3 = physical memory size
-	# sp = 0 (pa)
-	
-	lis r31, KERNEL_START_ADDR@ha
-	addi r31, r31, KERNEL_START_ADDR@l
-	
-	mtspr srr0, r31
-	
-	subis r31, r31, 0x8000
-	mtsprg0 r31
-	
-	lwz r31, 0(r3)
-	mtsprg3 r31
-	
-	li sp, 0
-	
-	mfmsr r31
-	ori r31, r31, (msr_ir | msr_dr)@l
-	mtspr srr1, r31
-	
-	sync
-	isync
-	rfid
-
-.align PAGE_WIDTH
-.global trans
-trans:
-	.space (TRANS_SIZE * TRANS_ITEM_SIZE)
Index: boot/arch/ppc64/loader/asm.h
===================================================================
--- boot/arch/ppc64/loader/asm.h	(revision fd375a8d1ed315622d230241a9b3227ec34ba99e)
+++ 	(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_ppc64_ASM_H_
-#define BOOT_ppc64_ASM_H_
-
-#define PAGE_SIZE 4096
-#define PAGE_WIDTH 12
-
-#define TRANS_SIZE 1024
-#define TRANS_ITEM_SIZE 8
-
-#define KERNEL_START_ADDR 0x80008000
-
-#ifndef __ASM__
-
-#define memcpy(dst, src, cnt)  __builtin_memcpy((dst), (src), (cnt))
-
-extern void *trans[TRANS_SIZE];
-
-extern void halt();
-extern void jump_to_kernel(void *bootinfo, unsigned long bootinfo_size, void *trans, unsigned long kernel_size, void *real_mode, void *fb, unsigned long scanline) __attribute__((noreturn));
-extern void real_mode();
-
-#endif
-
-#endif
Index: boot/arch/ppc64/loader/boot.S
===================================================================
--- boot/arch/ppc64/loader/boot.S	(revision fd375a8d1ed315622d230241a9b3227ec34ba99e)
+++ 	(revision )
@@ -1,42 +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 "regname.h"
-
-.section BOOTSTRAP, "ax"
-
-.global start
-
-start:
-	lis r4, ofw_cif@ha
-	addi r4, r4, ofw_cif@l
-	stw r5, 0(r4)
-	
-	bl ofw_init
-	
-	b bootstrap
Index: boot/arch/ppc64/loader/main.c
===================================================================
--- boot/arch/ppc64/loader/main.c	(revision fd375a8d1ed315622d230241a9b3227ec34ba99e)
+++ 	(revision )
@@ -1,182 +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 "main.h" 
-#include <printf.h>
-#include "asm.h"
-#include "_components.h"
-#include <ofw.h>
-#include <align.h>
-
-#define HEAP_GAP 1024000
-
-bootinfo_t bootinfo;
-
-
-static void check_align(const void *addr, const char *desc)
-{
-	if ((unsigned long) addr % PAGE_SIZE != 0) {
-		printf("Error: %s not on page boundary, halting.\n", desc);
-		halt();
-	}
-}
-
-
-static void fix_overlap(void *va, void **pa, const char *desc, unsigned long *top)
-{
-	if ((unsigned long) *pa + PAGE_SIZE < *top) {
-		printf("Warning: %s overlaps kernel physical area\n", desc);
-		
-		void *new_va = (void *) (ALIGN_UP((unsigned long) KERNEL_END + HEAP_GAP, PAGE_SIZE) + *top);
-		void *new_pa = (void *) (HEAP_GAP + *top);
-		*top += PAGE_SIZE;
-		
-		if (ofw_map(new_pa, new_va, PAGE_SIZE, 0) != 0) {
-			printf("Error: Unable to map page aligned memory at %L (physical %L), halting.\n", new_va, new_pa);
-			halt();
-		}
-		
-		if ((unsigned long) new_pa + PAGE_SIZE < KERNEL_SIZE) {
-			printf("Error: %s cannot be relocated, halting.\n", desc);
-			halt();	
-		}
-		
-		printf("Relocating %L -> %L (physical %L -> %L)\n", va, new_va, *pa, new_pa);
-		*pa = new_pa;
-		memcpy(new_va, va, PAGE_SIZE);
-	}
-}
-
-char *release = RELEASE;
-
-#ifdef REVISION
-	char *revision = ", revision " REVISION;
-#else
-	char *revision = "";
-#endif
-
-#ifdef TIMESTAMP
-	char *timestamp = "\nBuilt on " TIMESTAMP;
-#else
-	char *timestamp = "";
-#endif
-
-/** Print version information. */
-static void version_print(void)
-{
-	printf("HelenOS PPC64 Bootloader\nRelease %s%s%s\nCopyright (c) 2006 HelenOS project\n", release, revision, timestamp);
-}
-
-void bootstrap(void)
-{
-	version_print();
-	
-	component_t components[COMPONENTS];
-	init_components(components);
-		
-	unsigned int i;
-	
-	for (i = 0; i < COMPONENTS; i++)
-		check_align(components[i].start, components[i].name);
-	
-	check_align(&real_mode, "bootstrap trampoline");
-	check_align(&trans, "translation table");
-	
-	if (!ofw_memmap(&bootinfo.memmap)) {
-		printf("Error: unable to get memory map, halting.\n");
-		halt();
-	}
-	
-	if (bootinfo.memmap.total == 0) {
-		printf("Error: no memory detected, halting.\n");
-		halt();
-	}
-	
-	if (!ofw_screen(&bootinfo.screen)) {
-		printf("Error: unable to get screen properties, halting.\n");
-		halt();
-	}
-	
-	if (!ofw_keyboard(&bootinfo.keyboard)) {
-		printf("Error: unable to get keyboard properties, halting.\n");
-		halt();
-	}
-	
-	printf("\nDevice statistics\n");
-	printf(" screen at %L, resolution %dx%d, %d bpp (scanline %d bytes)\n", bootinfo.screen.addr, bootinfo.screen.width, bootinfo.screen.height, bootinfo.screen.bpp, bootinfo.screen.scanline);
-	printf(" keyboard at %L (size %d bytes)\n", bootinfo.keyboard.addr, bootinfo.keyboard.size);
-	
-	void *real_mode_pa = ofw_translate(&real_mode);
-	void *trans_pa = ofw_translate(&trans);
-	void *bootinfo_pa = ofw_translate(&bootinfo);
-	
-	printf("\nMemory statistics (total %d MB)\n", bootinfo.memmap.total >> 20);
-	printf(" %L: boot info structure (physical %L)\n", &bootinfo, bootinfo_pa);
-	printf(" %L: bootstrap trampoline (physical %L)\n", &real_mode, real_mode_pa);
-	printf(" %L: translation table (physical %L)\n", &trans, trans_pa);
-	for (i = 0; i < COMPONENTS; i++)
-		printf(" %L: %s image (size %d bytes)\n", components[i].start, components[i].name, components[i].size);
-	
-	unsigned long top = 0;
-	for (i = 0; i < COMPONENTS; i++)
-		top += ALIGN_UP(components[i].size, PAGE_SIZE);
-	
-	unsigned long pages = ALIGN_UP(KERNEL_SIZE, PAGE_SIZE) >> PAGE_WIDTH;
-	
-	for (i = 0; i < pages; i++) {
-		void *pa = ofw_translate(KERNEL_START + (i << PAGE_WIDTH));
-		fix_overlap(KERNEL_START + (i << PAGE_WIDTH), &pa, "kernel", &top);
-		trans[i] = pa;
-	}
-	
-	bootinfo.taskmap.count = 0;
-	for (i = 1; i < COMPONENTS; i++) {
-		unsigned long component_pages = ALIGN_UP(components[i].size, PAGE_SIZE) >> PAGE_WIDTH;
-		unsigned long j;
-		
-		for (j = 0; j < component_pages; j++) {
-			void *pa = ofw_translate(components[i].start + (j << PAGE_WIDTH));
-			fix_overlap(components[i].start + (j << PAGE_WIDTH), &pa, components[i].name, &top);
-			trans[pages + j] = pa;
-			if (j == 0) {
-				bootinfo.taskmap.tasks[bootinfo.taskmap.count].addr = (void *) (pages << PAGE_WIDTH);
-				bootinfo.taskmap.tasks[bootinfo.taskmap.count].size = components[i].size;
-				bootinfo.taskmap.count++;
-			}
-		}
-		
-		pages += component_pages;
-	}
-	
-	fix_overlap(&real_mode, &real_mode_pa, "bootstrap trampoline", &top);
-	fix_overlap(&trans, &trans_pa, "translation table", &top);
-	fix_overlap(&bootinfo, &bootinfo_pa, "boot info", &top);
-	
-	printf("\nBooting the kernel...\n");
-	jump_to_kernel(bootinfo_pa, sizeof(bootinfo), trans_pa, pages << PAGE_WIDTH, real_mode_pa, (void *) bootinfo.screen.addr, bootinfo.screen.scanline);
-}
Index: boot/arch/ppc64/loader/main.h
===================================================================
--- boot/arch/ppc64/loader/main.h	(revision fd375a8d1ed315622d230241a9b3227ec34ba99e)
+++ 	(revision )
@@ -1,58 +1,0 @@
-/*
- * Copyright (c) 2005 Martin Decky
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef BOOT_ppc64_MAIN_H_
-#define BOOT_ppc64_MAIN_H_
-
-#include "ofw.h"
-
-#define TASKMAP_MAX_RECORDS 32
-
-typedef struct {
-	void *addr;
-	unsigned long size;
-} task_t;
-
-typedef struct {
-	unsigned long count;
-	task_t tasks[TASKMAP_MAX_RECORDS];
-} taskmap_t;
-
-typedef struct {
-	memmap_t memmap;
-	taskmap_t taskmap;
-	screen_t screen;
-	keyboard_t keyboard;
-} bootinfo_t;
-
-extern void start(void);
-extern void bootstrap(void);
-
-extern memmap_t memmap;
-
-#endif
Index: boot/arch/ppc64/loader/ofwarch.c
===================================================================
--- boot/arch/ppc64/loader/ofwarch.c	(revision fd375a8d1ed315622d230241a9b3227ec34ba99e)
+++ 	(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.
- */
-
-#include <ofwarch.h>
-#include <ofw.h>
-#include <printf.h>
-
-typedef int (* ofw_entry_t)(ofw_args_t *args);
-
-int ofw(ofw_args_t *args)
-{
-	return ((ofw_entry_t) ofw_cif)(args);
-}
-
-void write(const char *str, const int len)
-{
-	ofw_write(str, len);
-}
-
-int ofw_keyboard(keyboard_t *keyboard)
-{
-	char device_name[BUF_SIZE];
-	
-	if (ofw_get_property(ofw_aliases, "macio", device_name, sizeof(device_name)) <= 0)
-		return false;
-				
-	phandle device = ofw_find_device(device_name);
-	if (device == -1)
-		return false;
-								
-	pci_reg_t macio;
-	if (ofw_get_property(device, "assigned-addresses", &macio, sizeof(macio)) <= 0)
-		return false;
-	keyboard->addr = (void *) (((unsigned long) macio.addr.addr_lo) | (((unsigned long) macio.addr.addr_hi) << 32));
-	keyboard->size = macio.size_lo;
-
-	return true;
-}
-
-int ofw_translate_failed(ofw_arg_t flag)
-{
-	return 0;
-}
Index: boot/arch/ppc64/loader/ofwarch.h
===================================================================
--- boot/arch/ppc64/loader/ofwarch.h	(revision fd375a8d1ed315622d230241a9b3227ec34ba99e)
+++ 	(revision )
@@ -1,35 +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.
- */
-
-#ifndef BOOT_ppc64_OFWARCH_H_
-#define BOOT_ppc64_OFWARCH_H_
-
-#define OFW_ADDRESS_CELLS	2
-#define OFW_SIZE_CELLS		2
-
-#endif
Index: boot/arch/ppc64/loader/regname.h
===================================================================
--- boot/arch/ppc64/loader/regname.h	(revision fd375a8d1ed315622d230241a9b3227ec34ba99e)
+++ 	(revision )
@@ -1,204 +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.
- */
-
-#ifndef __ppc32_REGNAME_H__
-#define __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
-
-/* Special Purpose Registers (SPRs) */
-#define	xer		1
-#define lr		8
-#define ctr		9
-#define	dec		22
-#define	sdr1	25
-#define	srr0	26
-#define srr1	27
-#define	sprg0	272
-#define	sprg1	273
-#define	sprg2	274
-#define	sprg3	275
-#define	prv		287
-#define hid0	1008
-
-/* MSR bits */
-#define msr_ir	(1 << 4)
-#define msr_dr	(1 << 5)
-
-/* HID0 bits */
-#define hid0_ice	(1 << 15)
-#define hid0_dce	(1 << 14)
-#define hid0_icfi	(1 << 11)
-#define hid0_dci	(1 << 10)
-
-#endif
Index: boot/arch/ppc64/loader/types.h
===================================================================
--- boot/arch/ppc64/loader/types.h	(revision fd375a8d1ed315622d230241a9b3227ec34ba99e)
+++ 	(revision )
@@ -1,44 +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_ppc64_TYPES_H_
-#define BOOT_ppc64_TYPES_H_
-
-#include <gentypes.h>
-
-typedef signed char int8_t;
-
-typedef unsigned char uint8_t;
-typedef unsigned short uint16_t;
-typedef unsigned int uint32_t;
-typedef unsigned long  uint64_t;
-
-typedef uint64_t uintptr_t;
-typedef uint64_t unative_t;
-
-#endif
