Subversion Repositories HelenOS

Compare Revisions

No changes between revisions

Ignore whitespace Rev 1964 → Rev 4646

/tags/0.2.0/boot/trunk/boot.config
File deleted
/tags/0.2.0/boot/trunk/arch/ppc64/Makefile.inc
File deleted
/tags/0.2.0/boot/trunk/arch/ppc64/loader/main.h
File deleted
/tags/0.2.0/boot/trunk/arch/ppc64/loader/ofw.c
File deleted
/tags/0.2.0/boot/trunk/arch/ppc64/loader/Makefile
File deleted
/tags/0.2.0/boot/trunk/arch/ppc64/loader/pack
File deleted
Property changes:
Deleted: svn:executable
-*
\ No newline at end of property
/tags/0.2.0/boot/trunk/arch/ppc64/loader/ofw.h
File deleted
/tags/0.2.0/boot/trunk/arch/ppc64/loader/asm.S
File deleted
/tags/0.2.0/boot/trunk/arch/ppc64/loader/printf.c
File deleted
/tags/0.2.0/boot/trunk/arch/ppc64/loader/regname.h
File deleted
/tags/0.2.0/boot/trunk/arch/ppc64/loader/boot.S
File deleted
/tags/0.2.0/boot/trunk/arch/ppc64/loader/main.c
File deleted
/tags/0.2.0/boot/trunk/arch/ppc64/loader/asm.h
File deleted
/tags/0.2.0/boot/trunk/arch/ppc64/loader/printf.h
File deleted
/tags/0.2.0/boot/trunk/arch/mips32/Makefile.inc
File deleted
/tags/0.2.0/boot/trunk/arch/mips32/loader/printf.h
File deleted
/tags/0.2.0/boot/trunk/arch/mips32/loader/_link.ld
File deleted
/tags/0.2.0/boot/trunk/arch/mips32/loader/main.h
File deleted
/tags/0.2.0/boot/trunk/arch/mips32/loader/msim.h
File deleted
/tags/0.2.0/boot/trunk/arch/mips32/loader/Makefile
File deleted
/tags/0.2.0/boot/trunk/arch/mips32/loader/asm.S
File deleted
/tags/0.2.0/boot/trunk/arch/mips32/loader/printf.c
File deleted
/tags/0.2.0/boot/trunk/arch/mips32/loader/regname.h
File deleted
/tags/0.2.0/boot/trunk/arch/mips32/loader/boot.S
File deleted
/tags/0.2.0/boot/trunk/arch/mips32/loader/main.c
File deleted
/tags/0.2.0/boot/trunk/arch/mips32/loader/msim.c
File deleted
/tags/0.2.0/boot/trunk/arch/mips32/loader/asm.h
File deleted
/tags/0.2.0/boot/trunk/arch/ia32/Makefile.inc
File deleted
/tags/0.2.0/boot/trunk/arch/ia32/grub/menu.lst
File deleted
/tags/0.2.0/boot/trunk/arch/ia32/grub/stage2_eltorito
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Deleted: svn:mime-type
-application/octet-stream
\ No newline at end of property
/tags/0.2.0/boot/trunk/arch/ia32/grub/COPYING
File deleted
/tags/0.2.0/boot/trunk/arch/ia32/grub/README
File deleted
/tags/0.2.0/boot/trunk/arch/sparc64/Makefile.inc
File deleted
/tags/0.2.0/boot/trunk/arch/sparc64/silo/COPYING
File deleted
/tags/0.2.0/boot/trunk/arch/sparc64/silo/silo.conf
File deleted
/tags/0.2.0/boot/trunk/arch/sparc64/silo/silo.tar.gz
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Deleted: svn:mime-type
-application/octet-stream
\ No newline at end of property
/tags/0.2.0/boot/trunk/arch/sparc64/silo/README
File deleted
/tags/0.2.0/boot/trunk/arch/ia64/Makefile.inc
File deleted
/tags/0.2.0/boot/trunk/arch/ppc32/Makefile.inc
File deleted
/tags/0.2.0/boot/trunk/arch/ppc32/loader/ofw.c
File deleted
/tags/0.2.0/boot/trunk/arch/ppc32/loader/Makefile
File deleted
/tags/0.2.0/boot/trunk/arch/ppc32/loader/pack
File deleted
Property changes:
Deleted: svn:executable
-*
\ No newline at end of property
/tags/0.2.0/boot/trunk/arch/ppc32/loader/debug.inc
File deleted
/tags/0.2.0/boot/trunk/arch/ppc32/loader/ofw.h
File deleted
/tags/0.2.0/boot/trunk/arch/ppc32/loader/asm.S
File deleted
/tags/0.2.0/boot/trunk/arch/ppc32/loader/printf.c
File deleted
/tags/0.2.0/boot/trunk/arch/ppc32/loader/regname.h
File deleted
/tags/0.2.0/boot/trunk/arch/ppc32/loader/boot.S
File deleted
/tags/0.2.0/boot/trunk/arch/ppc32/loader/main.c
File deleted
/tags/0.2.0/boot/trunk/arch/ppc32/loader/asm.h
File deleted
/tags/0.2.0/boot/trunk/arch/ppc32/loader/printf.h
File deleted
/tags/0.2.0/boot/trunk/arch/ppc32/loader/main.h
File deleted
/tags/0.2.0/boot/trunk/arch/amd64/grub/README
File deleted
/tags/0.2.0/boot/trunk/arch/amd64/grub/menu.lst
File deleted
/tags/0.2.0/boot/trunk/arch/amd64/grub/stage2_eltorito
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Deleted: svn:mime-type
-application/octet-stream
\ No newline at end of property
/tags/0.2.0/boot/trunk/arch/amd64/grub/COPYING
File deleted
/tags/0.2.0/boot/trunk/arch/amd64/Makefile.inc
File deleted
/tags/0.2.0/boot/trunk/Makefile
File deleted
/tags/0.2.0/boot/trunk/tools/config.py
File deleted
Property changes:
Deleted: svn:executable
-*
\ No newline at end of property
/tags/0.2.0/boot/tools/config.py
0,0 → 1,494
#!/usr/bin/env python
"""
Boot configuration script
"""
import sys
import os
import re
import commands
 
INPUT = 'boot.config'
OUTPUT = 'Makefile.config'
TMPOUTPUT = 'Makefile.config.tmp'
 
class DefaultDialog:
"Wrapper dialog that tries to return default values"
def __init__(self, dlg):
self.dlg = dlg
 
def set_title(self,text):
self.dlg.set_title(text)
def yesno(self, text, default=None):
if default is not None:
return default
return self.dlg.yesno(text, default)
def noyes(self, text, default=None):
if default is not None:
return default
return self.dlg.noyes(text, default)
def choice(self, text, choices, defopt=None):
if defopt is not None:
return choices[defopt][0]
return self.dlg.choice(text, choices, defopt)
 
class NoDialog:
def __init__(self):
self.printed = None
self.title = 'HelenOS Configuration'
 
def print_title(self):
if not self.printed:
sys.stdout.write("\n*** %s ***\n" % self.title)
self.printed = True
 
def set_title(self, text):
self.title = text
self.printed = False
def noyes(self, text, default=None):
if not default:
default = 'n'
return self.yesno(text, default)
def yesno(self, text, default=None):
self.print_title()
if default != 'n':
default = 'y'
while 1:
sys.stdout.write("%s (y/n)[%s]: " % (text,default))
inp = sys.stdin.readline()
if not inp:
raise EOFError
inp = inp.strip().lower()
if not inp:
return default
if inp == 'y':
return 'y'
elif inp == 'n':
return 'n'
 
def _print_choice(self, text, choices, defopt):
sys.stdout.write('%s:\n' % text)
for i,(text,descr) in enumerate(choices):
sys.stdout.write('\t%2d. %s\n' % (i, descr))
if defopt is not None:
sys.stdout.write('Enter choice number[%d]: ' % defopt)
else:
sys.stdout.write('Enter choice number: ')
 
def menu(self, text, choices, button, defopt=None):
self.title = 'Main menu'
menu = []
for key, descr in choices:
txt = key + (45-len(key))*' ' + ': ' + descr
menu.append((key, txt))
return self.choice(text, [button] + menu)
def choice(self, text, choices, defopt=None):
self.print_title()
while 1:
self._print_choice(text, choices, defopt)
inp = sys.stdin.readline()
if not inp:
raise EOFError
if not inp.strip():
if defopt is not None:
return choices[defopt][0]
continue
try:
number = int(inp.strip())
except ValueError:
continue
if number < 0 or number >= len(choices):
continue
return choices[number][0]
 
 
def eof_checker(fnc):
def wrapper(self, *args, **kw):
try:
return fnc(self, *args, **kw)
except EOFError:
return getattr(self.bckdialog,fnc.func_name)(*args, **kw)
return wrapper
 
class Dialog(NoDialog):
def __init__(self):
NoDialog.__init__(self)
self.dlgcmd = os.environ.get('DIALOG','dialog')
self.title = ''
self.backtitle = 'HelenOS Kernel Configuration'
if os.system('%s --print-maxsize >/dev/null 2>&1' % self.dlgcmd) != 0:
raise NotImplementedError
self.bckdialog = NoDialog()
 
def set_title(self,text):
self.title = text
self.bckdialog.set_title(text)
def calldlg(self,*args,**kw):
"Wrapper for calling 'dialog' program"
indesc, outdesc = os.pipe()
pid = os.fork()
if not pid:
os.close(2)
os.dup(outdesc)
os.close(indesc)
dlgargs = [self.dlgcmd,'--title',self.title,
'--backtitle', self.backtitle]
for key,val in kw.items():
dlgargs.append('--'+key)
dlgargs.append(val)
dlgargs += args
os.execlp(self.dlgcmd,*dlgargs)
 
os.close(outdesc)
try:
errout = os.fdopen(indesc,'r')
data = errout.read()
errout.close()
pid,status = os.wait()
except:
os.system('reset') # Reset terminal
raise
if not os.WIFEXITED(status):
os.system('reset') # Reset terminal
raise EOFError
status = os.WEXITSTATUS(status)
if status == 255:
raise EOFError
return status,data
def yesno(self, text, default=None):
if text[-1] not in ('?',':'):
text = text + ':'
width = '50'
height = '5'
if len(text) < 48:
text = ' '*int(((48-len(text))/2)) + text
else:
width = '0'
height = '0'
if default == 'n':
res,data = self.calldlg('--defaultno','--yesno',text,height,width)
else:
res,data = self.calldlg('--yesno',text,height,width)
 
if res == 0:
return 'y'
return 'n'
yesno = eof_checker(yesno)
 
def menu(self, text, choices, button, defopt=None):
self.title = 'Main menu'
text = text + ':'
width = '70'
height = str(8 + len(choices))
args = []
for key,val in choices:
args.append(key)
args.append(val)
 
kw = {}
if defopt:
kw['default-item'] = choices[defopt][0]
res,data = self.calldlg('--ok-label','Change',
'--extra-label',button[1],
'--extra-button',
'--menu',text,height,width,
str(len(choices)),*args,**kw)
if res == 3:
return button[0]
if res == 1: # Cancel
sys.exit(1)
elif res:
print data
raise EOFError
return data
menu = eof_checker(menu)
def choice(self, text, choices, defopt=None):
text = text + ':'
width = '50'
height = str(8 + len(choices))
args = []
for key,val in choices:
args.append(key)
args.append(val)
 
kw = {}
if defopt:
kw['default-item'] = choices[defopt][0]
res,data = self.calldlg('--nocancel','--menu',text,height,width,
str(len(choices)),*args, **kw)
if res:
print data
raise EOFError
return data
choice = eof_checker(choice)
def read_defaults(fname,defaults):
"Read saved values from last configuration run"
f = file(fname,'r')
for line in f:
res = re.match(r'^(?:#!# )?([^#]\w*)\s*=\s*(.*?)\s*$', line)
if res:
defaults[res.group(1)] = res.group(2)
f.close()
 
def check_condition(text, defaults, asked_names):
seen_vars = [ x[0] for x in asked_names ]
ctype = 'cnf'
if ')|' in text or '|(' in text:
ctype = 'dnf'
if ctype == 'cnf':
conds = text.split('&')
else:
conds = text.split('|')
 
for cond in conds:
if cond.startswith('(') and cond.endswith(')'):
cond = cond[1:-1]
inside = check_inside(cond, defaults, ctype, seen_vars)
if ctype == 'cnf' and not inside:
return False
if ctype == 'dnf' and inside:
return True
 
if ctype == 'cnf':
return True
return False
 
def check_inside(text, defaults, ctype, seen_vars):
"""
Check that the condition specified on input line is True
 
only CNF is supported
"""
if ctype == 'cnf':
conds = text.split('|')
else:
conds = text.split('&')
for cond in conds:
res = re.match(r'^(.*?)(!?=)(.*)$', cond)
if not res:
raise RuntimeError("Invalid condition: %s" % cond)
condname = res.group(1)
oper = res.group(2)
condval = res.group(3)
if condname not in seen_vars:
varval = ''
## raise RuntimeError("Variable %s not defined before being asked." %\
## condname)
elif not defaults.has_key(condname):
raise RuntimeError("Condition var %s does not exist: %s" % \
(condname,text))
else:
varval = defaults[condname]
if ctype == 'cnf':
if oper == '=' and condval == varval:
return True
if oper == '!=' and condval != varval:
return True
else:
if oper== '=' and condval != varval:
return False
if oper== '!=' and condval == varval:
return False
if ctype=='cnf':
return False
return True
 
def parse_config(input, output, dlg, defaults={}, askonly=None):
"Parse configuration file and create Makefile.config on the fly"
def ask_the_question(dialog):
"Ask question based on the type of variables to ask"
# This is quite a hack, this thingy is written just to
# have access to local variables..
if vartype == 'y/n':
return dialog.yesno(comment, default)
elif vartype == 'n/y':
return dialog.noyes(comment, default)
elif vartype == 'choice':
defopt = None
if default is not None:
for i,(key,val) in enumerate(choices):
if key == default:
defopt = i
break
return dialog.choice(comment, choices, defopt)
else:
raise RuntimeError("Bad method: %s" % vartype)
 
f = file(input, 'r')
outf = file(output, 'w')
 
outf.write('#########################################\n')
outf.write('## AUTO-GENERATED FILE, DO NOT EDIT!!! ##\n')
outf.write('#########################################\n\n')
 
asked_names = []
 
comment = ''
default = None
choices = []
for line in f:
if line.startswith('%'):
res = re.match(r'^%\s*(?:\[(.*?)\])?\s*(.*)$', line)
if not res:
raise RuntimeError('Invalid command: %s' % line)
if res.group(1):
if not check_condition(res.group(1), defaults,
asked_names):
continue
args = res.group(2).strip().split(' ')
cmd = args[0].lower()
args = args[1:]
if cmd == 'saveas':
outf.write('%s = %s\n' % (args[1],defaults[args[0]]))
elif cmd == 'shellcmd':
varname = args[0]
args = args[1:]
for i,arg in enumerate(args):
if arg.startswith('$'):
args[i] = defaults[arg[1:]]
data,status = commands.getstatusoutput(' '.join(args))
if status:
raise RuntimeError('Error running: %s' % ' '.join(args))
outf.write('%s = %s\n' % (varname,data.strip()))
continue
if line.startswith('!'):
# Ask a question
res = re.search(r'!\s*(?:\[(.*?)\])?\s*([^\s]+)\s*\((.*)\)\s*$', line)
if not res:
raise RuntimeError("Weird line: %s" % line)
varname = res.group(2)
vartype = res.group(3)
 
default = defaults.get(varname,None)
if res.group(1):
if not check_condition(res.group(1), defaults,
asked_names):
if default is not None:
outf.write('#!# %s = %s\n' % (varname, default))
# Clear cumulated values
comment = ''
default = None
choices = []
continue
asked_names.append((varname,comment))
 
if default is None or not askonly or askonly == varname:
default = ask_the_question(dlg)
else:
default = ask_the_question(DefaultDialog(dlg))
 
outf.write('%s = %s\n' % (varname, default))
# Remeber the selected value
defaults[varname] = default
# Clear cumulated values
comment = ''
default = None
choices = []
continue
if line.startswith('@'):
# Add new line into the 'choice array'
res = re.match(r'@\s*(?:\[(.*?)\])?\s*"(.*?)"\s*(.*)$', line)
if not res:
raise RuntimeError("Bad line: %s" % line)
if res.group(1):
if not check_condition(res.group(1),defaults,
asked_names):
continue
choices.append((res.group(2), res.group(3)))
continue
 
# All other things print to output file
outf.write(line)
if re.match(r'^#[^#]', line):
# Last comment before question will be displayed to the user
comment = line[1:].strip()
elif line.startswith('## '):
# Set title of the dialog window
dlg.set_title(line[2:].strip())
 
outf.write('\n')
outf.write('REVISION = %s\n' % commands.getoutput('svnversion . 2> /dev/null'))
outf.write('TIMESTAMP = %s\n' % commands.getoutput('date "+%Y-%m-%d %H:%M:%S"'))
outf.close()
f.close()
return asked_names
 
def main():
defaults = {}
try:
dlg = Dialog()
except NotImplementedError:
dlg = NoDialog()
 
if len(sys.argv) >= 2 and sys.argv[1]=='default':
defmode = True
else:
defmode = False
 
# Default run will update the configuration file
# with newest options
if os.path.exists(OUTPUT):
read_defaults(OUTPUT, defaults)
 
# Get ARCH from command line if specified
if len(sys.argv) >= 3:
defaults['ARCH'] = sys.argv[2]
 
# Dry run only with defaults
varnames = parse_config(INPUT, TMPOUTPUT, DefaultDialog(dlg), defaults)
# If not in default mode, present selection of all possibilities
if not defmode:
defopt = 0
while 1:
# varnames contains variable names that were in the
# last question set
choices = [ (x[1],defaults[x[0]]) for x in varnames ]
res = dlg.menu('Configuration',choices,('save','Save'),defopt)
if res == 'save':
parse_config(INPUT, TMPOUTPUT, DefaultDialog(dlg), defaults)
break
# transfer description back to varname
for i,(vname,descr) in enumerate(varnames):
if res == descr:
defopt = i
break
# Ask the user a simple question, produce output
# as if the user answered all the other questions
# with default answer
varnames = parse_config(INPUT, TMPOUTPUT, dlg, defaults,
askonly=varnames[i][0])
if os.path.exists(OUTPUT):
os.unlink(OUTPUT)
os.rename(TMPOUTPUT, OUTPUT)
if not defmode and dlg.yesno('Rebuild everything?') == 'y':
os.execlp('make','make','clean','build')
 
if __name__ == '__main__':
main()
Property changes:
Added: svn:executable
+*
\ No newline at end of property
/tags/0.2.0/boot/boot.config
0,0 → 1,32
## General configuration directives
 
# Architecture
@ "amd64" AMD64/Intel EM64T
@ "ia32" Intel IA-32
@ "ia64" Intel IA-64
@ "mips32" MIPS 32-bit
@ "ppc32" PowerPC 32-bit
@ "ppc64" PowerPC 64-bit
@ "sparc64" Sun UltraSPARC
! ARCH (choice)
 
# PPC32 Compiler
@ "cross" Cross-compiler
@ "native" Native
! [ARCH=ppc32] PPC32_COMPILER (choice)
% [ARCH=ppc32] SAVEAS PPC32_COMPILER COMPILER
 
# Debug bootloader
! [ARCH=ppc32] CONFIG_DEBUG (y/n)
 
# PPC64 Compiler
@ "cross" Cross-compiler
@ "native" Native
! [ARCH=ppc64] PPC64_COMPILER (choice)
% [ARCH=ppc64] SAVEAS PPC64_COMPILER COMPILER
 
# MIPS32 Compiler
@ "cross" Cross-compiler
@ "native" Native
! [ARCH=mips32] MIPS32_COMPILER (choice)
% [ARCH=mips32] SAVEAS MIPS32_COMPILER COMPILER
/tags/0.2.0/boot/Makefile
0,0 → 1,78
#
# 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 configuration
#
 
-include Makefile.config
 
## Common flags
#
 
BASE = ..
KERNELDIR = $(BASE)/kernel
USPACEDIR = $(BASE)/uspace
 
## Setup arch configuration
#
 
-include arch/$(ARCH)/Makefile.inc
 
ifeq ($(CONFIG_DEBUG),y)
DEFS += -DCONFIG_DEBUG
endif
 
.PHONY: all build config distclean arch_distclean clean kernel uspace clean_kernel clean_uspace distclean_kernel distclean_uspace
 
all:
tools/config.py default
$(MAKE) -C . build $(ARCH)
 
config:
tools/config.py
 
distclean: clean arch_distclean
-rm Makefile.config
 
kernel:
$(MAKE) -C $(KERNELDIR) NARCH=$(ARCH)
 
uspace:
$(MAKE) -C $(USPACEDIR) NARCH=$(ARCH)
 
clean_kernel:
$(MAKE) -C $(KERNELDIR) clean ARCH=$(ARCH)
 
clean_uspace:
$(MAKE) -C $(USPACEDIR) clean ARCH=$(ARCH)
 
distclean_kernel:
$(MAKE) -C $(KERNELDIR) distclean ARCH=$(ARCH)
 
distclean_uspace:
$(MAKE) -C $(USPACEDIR) distclean ARCH=$(ARCH)
/tags/0.2.0/boot/arch/ppc32/loader/ofw.h
0,0 → 1,77
/*
* 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 __OFW_H__
#define __OFW_H__
 
#define NULL 0
#define MEMMAP_MAX_RECORDS 32
#define false 0
#define true 1
 
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)
 
typedef struct {
void *start;
unsigned int size;
} memzone_t;
 
typedef struct {
unsigned int total;
unsigned int count;
memzone_t zones[MEMMAP_MAX_RECORDS];
} memmap_t;
 
typedef struct {
void *addr;
unsigned int width;
unsigned int height;
unsigned int bpp;
unsigned int scanline;
} screen_t;
 
typedef struct {
void *addr;
unsigned int size;
} keyboard_t;
 
 
extern void init(void);
extern void ofw_write(const char *str, const int len);
 
extern void *ofw_translate(const void *virt);
extern int ofw_map(const void *phys, const void *virt, const int size, const int mode);
extern int ofw_memmap(memmap_t *map);
extern int ofw_screen(screen_t *screen);
extern int ofw_keyboard(keyboard_t *keyboard);
 
#endif
/tags/0.2.0/boot/arch/ppc32/loader/main.c
0,0 → 1,160
/*
* 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"
 
#define HEAP_GAP 1024000
 
bootinfo_t bootinfo;
 
 
static void check_align(const void *addr, const char *desc)
{
if ((unsigned int) 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 int *top)
{
if ((unsigned int) *pa + PAGE_SIZE < *top) {
printf("Warning: %s overlaps kernel physical area\n", desc);
void *new_va = (void *) (ALIGN_UP((unsigned int) 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 int) 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);
}
}
 
 
void bootstrap(void)
{
printf("\nHelenOS PPC Bootloader\n");
init_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 int top = 0;
for (i = 0; i < COMPONENTS; i++)
top += ALIGN_UP(components[i].size, PAGE_SIZE);
unsigned int 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 int component_pages = ALIGN_UP(components[i].size, PAGE_SIZE) >> PAGE_WIDTH;
unsigned int 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, bootinfo.screen.addr, bootinfo.screen.scanline);
}
/tags/0.2.0/boot/arch/ppc32/loader/main.h
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.
*/
 
#ifndef __MAIN_H__
#define __MAIN_H__
 
#include "ofw.h"
 
/** Align to the nearest higher address.
*
* @param addr Address or size to be aligned.
* @param align Size of alignment, must be power of 2.
*/
#define ALIGN_UP(addr, align) (((addr) + ((align) - 1)) & ~((align) - 1))
 
#define TASKMAP_MAX_RECORDS 32
 
typedef struct {
void *addr;
unsigned int size;
} task_t;
 
typedef struct {
unsigned int count;
task_t tasks[TASKMAP_MAX_RECORDS];
} taskmap_t;
 
typedef struct {
taskmap_t taskmap;
memmap_t memmap;
screen_t screen;
keyboard_t keyboard;
} bootinfo_t;
 
extern void start(void);
extern void bootstrap(void);
 
extern memmap_t memmap;
 
#endif
/tags/0.2.0/boot/arch/ppc32/loader/ofw.c
0,0 → 1,266
/*
* 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 "ofw.h"
#include "asm.h"
#include "printf.h"
 
#define MAX_OFW_ARGS 10
#define BUF_SIZE 1024
 
typedef unsigned int ofw_arg_t;
typedef unsigned int ihandle;
typedef unsigned int phandle;
 
/** OpenFirmware command structure
*
*/
typedef struct {
const char *service; /**< Command name */
unsigned int nargs; /**< Number of in arguments */
unsigned int nret; /**< Number of out arguments */
ofw_arg_t args[MAX_OFW_ARGS]; /**< List of arguments */
} ofw_args_t;
 
typedef void (*ofw_entry)(ofw_args_t *);
 
 
ofw_entry ofw;
 
phandle ofw_chosen;
ihandle ofw_stdout;
phandle ofw_root;
ihandle ofw_mmu;
phandle ofw_memory;
phandle ofw_aliases;
 
 
static int ofw_call(const char *service, const int nargs, const int nret, ofw_arg_t *rets, ...)
{
va_list list;
ofw_args_t args;
int i;
args.service = service;
args.nargs = nargs;
args.nret = nret;
va_start(list, rets);
for (i = 0; i < nargs; i++)
args.args[i] = va_arg(list, ofw_arg_t);
va_end(list);
for (i = 0; i < nret; i++)
args.args[i + nargs] = 0;
ofw(&args);
for (i = 1; i < nret; i++)
rets[i - 1] = args.args[i + nargs];
return args.args[nargs];
}
 
 
static phandle ofw_find_device(const char *name)
{
return ofw_call("finddevice", 1, 1, NULL, name);
}
 
 
static int ofw_get_property(const phandle device, const char *name, const void *buf, const int buflen)
{
return ofw_call("getprop", 4, 1, NULL, device, name, buf, buflen);
}
 
 
static unsigned int ofw_get_address_cells(const phandle device)
{
unsigned int ret;
if (ofw_get_property(device, "#address-cells", &ret, sizeof(ret)) <= 0)
if (ofw_get_property(ofw_root, "#address-cells", &ret, sizeof(ret)) <= 0)
ret = 1;
return ret;
}
 
 
static unsigned int ofw_get_size_cells(const phandle device)
{
unsigned int ret;
if (ofw_get_property(device, "#size-cells", &ret, sizeof(ret)) <= 0)
if (ofw_get_property(ofw_root, "#size-cells", &ret, sizeof(ret)) <= 0)
ret = 1;
return ret;
}
 
 
static ihandle ofw_open(const char *name)
{
return ofw_call("open", 1, 1, NULL, name);
}
 
 
void init(void)
{
ofw_chosen = ofw_find_device("/chosen");
if (ofw_chosen == -1)
halt();
if (ofw_get_property(ofw_chosen, "stdout", &ofw_stdout, sizeof(ofw_stdout)) <= 0)
ofw_stdout = 0;
ofw_root = ofw_find_device("/");
if (ofw_root == -1) {
puts("\r\nError: Unable to find / device, halted.\r\n");
halt();
}
if (ofw_get_property(ofw_chosen, "mmu", &ofw_mmu, sizeof(ofw_mmu)) <= 0) {
puts("\r\nError: Unable to get mmu property, halted.\r\n");
halt();
}
ofw_memory = ofw_find_device("/memory");
if (ofw_memory == -1) {
puts("\r\nError: Unable to find /memory device, halted.\r\n");
halt();
}
ofw_aliases = ofw_find_device("/aliases");
if (ofw_aliases == -1) {
puts("\r\nError: Unable to find /aliases device, halted.\r\n");
halt();
}
}
 
 
void ofw_write(const char *str, const int len)
{
if (ofw_stdout == 0)
return;
ofw_call("write", 3, 1, NULL, ofw_stdout, str, len);
}
 
 
void *ofw_translate(const void *virt)
{
ofw_arg_t result[3];
if (ofw_call("call-method", 4, 4, result, "translate", ofw_mmu, virt, 1) != 0) {
puts("Error: MMU method translate() failed, halting.\n");
halt();
}
return (void *) result[2];
}
 
 
int ofw_map(const void *phys, const void *virt, const int size, const int mode)
{
return ofw_call("call-method", 6, 1, NULL, "map", ofw_mmu, mode, size, virt, phys);
}
 
 
int ofw_memmap(memmap_t *map)
{
unsigned int buf[BUF_SIZE];
int ret = ofw_get_property(ofw_memory, "reg", buf, sizeof(unsigned int) * BUF_SIZE);
if (ret <= 0)
return false;
unsigned int ac = ofw_get_address_cells(ofw_memory);
unsigned int sc = ofw_get_size_cells(ofw_memory);
int pos;
map->total = 0;
map->count = 0;
for (pos = 0; (pos < ret / sizeof(unsigned int)) && (map->count < MEMMAP_MAX_RECORDS); pos += ac + sc) {
void * start = (void *) buf[pos + ac - 1];
unsigned int size = buf[pos + ac + sc - 1];
if (size > 0) {
map->zones[map->count].start = start;
map->zones[map->count].size = size;
map->count++;
map->total += size;
}
}
}
 
 
int ofw_screen(screen_t *screen)
{
char device_name[BUF_SIZE];
if (ofw_get_property(ofw_aliases, "screen", device_name, sizeof(char) * BUF_SIZE) <= 0)
return false;
phandle device = ofw_find_device(device_name);
if (device == -1)
return false;
if (ofw_get_property(device, "address", &screen->addr, sizeof(screen->addr)) <= 0)
return false;
if (ofw_get_property(device, "width", &screen->width, sizeof(screen->width)) <= 0)
return false;
if (ofw_get_property(device, "height", &screen->height, sizeof(screen->height)) <= 0)
return false;
if (ofw_get_property(device, "depth", &screen->bpp, sizeof(screen->bpp)) <= 0)
return false;
if (ofw_get_property(device, "linebytes", &screen->scanline, sizeof(screen->scanline)) <= 0)
return false;
return true;
}
 
 
int ofw_keyboard(keyboard_t *keyboard)
{
char device_name[BUF_SIZE];
if (ofw_get_property(ofw_aliases, "macio", device_name, sizeof(char) * BUF_SIZE) <= 0)
return false;
phandle device = ofw_find_device(device_name);
if (device == -1)
return false;
// FIXME
keyboard->addr = (void *) 0x80816000;
keyboard->size = 7680;
return true;
}
/tags/0.2.0/boot/arch/ppc32/loader/Makefile
0,0 → 1,94
#
# 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.
#
 
## Toolchain configuration
#
 
TARGET = ppc-linux-gnu
TOOLCHAIN_DIR = /usr/local/ppc/bin
 
ifeq ($(COMPILER),native)
CC = gcc
AS = as
LD = ld
OBJCOPY = objcopy
OBJDUMP = objdump
else
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 = -nostdinc -nostdlib -fno-builtin -Werror-implicit-function-declaration -Wmissing-prototypes -Werror -O3 -mcpu=powerpc -msoft-float -m32
 
SOURCES = \
main.c \
ofw.c \
printf.c \
asm.S \
boot.S
 
COMPONENTS = \
$(KERNELDIR)/kernel.bin \
$(USPACEDIR)/ns/ns \
$(USPACEDIR)/init/init \
$(USPACEDIR)/fb/fb \
$(USPACEDIR)/kbd/kbd \
$(USPACEDIR)/console/console \
$(USPACEDIR)/tetris/tetris \
$(USPACEDIR)/ipcc/ipcc \
$(USPACEDIR)/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) kernel.o
$(LD) -no-check-sections -N -T _link.ld $(COMPONENT_OBJECTS) $(OBJECTS) -o $@
 
depend:
-makedepend $(DEFS) $(CFLAGS) -f - $(SOURCES) > Makefile.depend 2> /dev/null
 
clean:
-rm -f _components.h _link.ld $(COMPONENT_OBJECTS) $(OBJECTS) image.boot Makefile.depend
 
_components.h _link.ld $(COMPONENT_OBJECTS): $(COMPONENTS)
./pack $(OBJCOPY) $(COMPONENTS)
 
%.o: %.S
$(CC) $(DEFS) $(CFLAGS) -D__ASM__ -c $< -o $@
 
%.o: %.c
$(CC) $(DEFS) $(CFLAGS) -c $< -o $@
/tags/0.2.0/boot/arch/ppc32/loader/asm.S
0,0 → 1,284
#
# 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"
#include "debug.inc"
 
.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 | msr_ee)@l
and r31, r31, r30
mtspr srr1, r31
sync
isync
rfi
 
.section REALMODE, "ax"
.align PAGE_WIDTH
.global real_mode
 
real_mode:
DEBUG_INIT
DEBUG_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)
DEBUG_INIT
DEBUG_copy_loop
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
DEBUG_end_copy_loop
addi r5, r5, 4
b page_copy
copy_end:
DEBUG_segments
# initially fill segment registers
 
li r31, 16
mtctr r31
li r31, 0
li r30, 0x2000
 
seg_fill:
mtsrin r30, r31
addi r30, r30, 0x111
addis r31, r31, 0x1000 # move to next SR
bdnz seg_fill
# invalidate block address translation registers
DEBUG_bat
li r30, 0
mtspr ibat0u, r30
mtspr ibat0l, r30
mtspr ibat1u, r30
mtspr ibat1l, r30
mtspr ibat2u, r30
mtspr ibat2l, r30
mtspr ibat3u, r30
mtspr ibat3l, r30
mtspr dbat0u, r30
mtspr dbat0l, r30
mtspr dbat1u, r30
mtspr dbat1l, r30
mtspr dbat2u, r30
mtspr dbat2l, r30
mtspr dbat3u, r30
mtspr dbat3l, r30
# create identity mapping
DEBUG_mapping
# FIXME: map exactly the size of RAM
lis r31, 0x8000
ori r31, r31, 0x0ffe
lis r30, 0x0000
ori r30, r30, 0x0002
mtspr ibat0u, r31
mtspr ibat0l, r30
mtspr dbat0u, r31
mtspr dbat0l, r30
DEBUG_tlb
tlbia
tlbsync
DEBUG_prepare
# start the kernel
#
# r3 = bootinfo (pa)
lis r31, KERNEL_START_ADDR@ha
addi r31, r31, KERNEL_START_ADDR@l
mtspr srr0, r31
mfmsr r31
ori r31, r31, (msr_ir | msr_dr)@l
mtspr srr1, r31
sync
isync
DEBUG_rfi
rfi
 
.align PAGE_WIDTH
.global trans
trans:
.space (TRANS_SIZE * TRANS_ITEM_SIZE)
/tags/0.2.0/boot/arch/ppc32/loader/debug.inc
0,0 → 1,8299
#
# 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.
#
 
.macro DEBUG_INIT
#ifdef CONFIG_DEBUG
lis r11, 65535
ori r11, r11, 65535
lis r12, 0
ori r12, r12, 0
mr r10, r8
#endif
.endm
 
.macro DEBUG_real_mode
#ifdef CONFIG_DEBUG
stw r12, 0(r10)
stw r12, 4(r10)
stw r12, 8(r10)
stw r12, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r12, 72(r10)
stw r12, 76(r10)
stw r12, 80(r10)
stw r12, 84(r10)
stw r12, 88(r10)
stw r12, 92(r10)
stw r12, 96(r10)
stw r12, 100(r10)
stw r12, 104(r10)
stw r12, 108(r10)
stw r12, 112(r10)
stw r12, 116(r10)
stw r12, 120(r10)
stw r12, 124(r10)
stw r12, 128(r10)
stw r12, 132(r10)
stw r12, 136(r10)
stw r12, 140(r10)
stw r12, 144(r10)
stw r12, 148(r10)
stw r12, 152(r10)
stw r12, 156(r10)
stw r12, 160(r10)
stw r12, 164(r10)
stw r12, 168(r10)
stw r12, 172(r10)
stw r12, 176(r10)
stw r12, 180(r10)
stw r12, 184(r10)
stw r12, 188(r10)
stw r12, 192(r10)
stw r12, 196(r10)
stw r12, 200(r10)
stw r12, 204(r10)
stw r12, 208(r10)
stw r12, 212(r10)
stw r12, 216(r10)
stw r12, 220(r10)
stw r12, 224(r10)
stw r12, 228(r10)
stw r12, 232(r10)
stw r12, 236(r10)
stw r12, 240(r10)
stw r12, 244(r10)
stw r12, 248(r10)
stw r12, 252(r10)
stw r12, 256(r10)
stw r12, 260(r10)
stw r12, 264(r10)
stw r12, 268(r10)
stw r12, 272(r10)
stw r12, 276(r10)
stw r12, 280(r10)
stw r12, 284(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r12, 8(r10)
stw r12, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r12, 72(r10)
stw r12, 76(r10)
stw r12, 80(r10)
stw r12, 84(r10)
stw r12, 88(r10)
stw r12, 92(r10)
stw r12, 96(r10)
stw r12, 100(r10)
stw r12, 104(r10)
stw r12, 108(r10)
stw r12, 112(r10)
stw r12, 116(r10)
stw r12, 120(r10)
stw r12, 124(r10)
stw r12, 128(r10)
stw r12, 132(r10)
stw r12, 136(r10)
stw r12, 140(r10)
stw r12, 144(r10)
stw r12, 148(r10)
stw r12, 152(r10)
stw r12, 156(r10)
stw r12, 160(r10)
stw r12, 164(r10)
stw r12, 168(r10)
stw r12, 172(r10)
stw r12, 176(r10)
stw r12, 180(r10)
stw r12, 184(r10)
stw r12, 188(r10)
stw r12, 192(r10)
stw r12, 196(r10)
stw r12, 200(r10)
stw r12, 204(r10)
stw r12, 208(r10)
stw r12, 212(r10)
stw r12, 216(r10)
stw r12, 220(r10)
stw r12, 224(r10)
stw r12, 228(r10)
stw r12, 232(r10)
stw r12, 236(r10)
stw r12, 240(r10)
stw r12, 244(r10)
stw r12, 248(r10)
stw r12, 252(r10)
stw r12, 256(r10)
stw r12, 260(r10)
stw r12, 264(r10)
stw r12, 268(r10)
stw r12, 272(r10)
stw r12, 276(r10)
stw r12, 280(r10)
stw r12, 284(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r12, 8(r10)
stw r12, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r12, 72(r10)
stw r12, 76(r10)
stw r12, 80(r10)
stw r12, 84(r10)
stw r12, 88(r10)
stw r12, 92(r10)
stw r12, 96(r10)
stw r12, 100(r10)
stw r12, 104(r10)
stw r11, 108(r10)
stw r11, 112(r10)
stw r11, 116(r10)
stw r12, 120(r10)
stw r12, 124(r10)
stw r12, 128(r10)
stw r12, 132(r10)
stw r12, 136(r10)
stw r12, 140(r10)
stw r12, 144(r10)
stw r12, 148(r10)
stw r12, 152(r10)
stw r12, 156(r10)
stw r12, 160(r10)
stw r12, 164(r10)
stw r12, 168(r10)
stw r12, 172(r10)
stw r12, 176(r10)
stw r12, 180(r10)
stw r12, 184(r10)
stw r12, 188(r10)
stw r12, 192(r10)
stw r12, 196(r10)
stw r12, 200(r10)
stw r12, 204(r10)
stw r12, 208(r10)
stw r12, 212(r10)
stw r12, 216(r10)
stw r12, 220(r10)
stw r12, 224(r10)
stw r12, 228(r10)
stw r12, 232(r10)
stw r12, 236(r10)
stw r11, 240(r10)
stw r11, 244(r10)
stw r11, 248(r10)
stw r12, 252(r10)
stw r12, 256(r10)
stw r12, 260(r10)
stw r12, 264(r10)
stw r12, 268(r10)
stw r12, 272(r10)
stw r12, 276(r10)
stw r12, 280(r10)
stw r12, 284(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r12, 8(r10)
stw r12, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r12, 72(r10)
stw r12, 76(r10)
stw r12, 80(r10)
stw r12, 84(r10)
stw r12, 88(r10)
stw r12, 92(r10)
stw r12, 96(r10)
stw r12, 100(r10)
stw r12, 104(r10)
stw r12, 108(r10)
stw r11, 112(r10)
stw r11, 116(r10)
stw r12, 120(r10)
stw r12, 124(r10)
stw r12, 128(r10)
stw r12, 132(r10)
stw r12, 136(r10)
stw r12, 140(r10)
stw r12, 144(r10)
stw r12, 148(r10)
stw r12, 152(r10)
stw r12, 156(r10)
stw r12, 160(r10)
stw r12, 164(r10)
stw r12, 168(r10)
stw r12, 172(r10)
stw r12, 176(r10)
stw r12, 180(r10)
stw r12, 184(r10)
stw r12, 188(r10)
stw r12, 192(r10)
stw r12, 196(r10)
stw r12, 200(r10)
stw r12, 204(r10)
stw r12, 208(r10)
stw r12, 212(r10)
stw r12, 216(r10)
stw r12, 220(r10)
stw r12, 224(r10)
stw r12, 228(r10)
stw r12, 232(r10)
stw r12, 236(r10)
stw r12, 240(r10)
stw r11, 244(r10)
stw r11, 248(r10)
stw r12, 252(r10)
stw r12, 256(r10)
stw r12, 260(r10)
stw r12, 264(r10)
stw r12, 268(r10)
stw r12, 272(r10)
stw r12, 276(r10)
stw r12, 280(r10)
stw r12, 284(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r12, 8(r10)
stw r12, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r12, 72(r10)
stw r12, 76(r10)
stw r12, 80(r10)
stw r12, 84(r10)
stw r12, 88(r10)
stw r12, 92(r10)
stw r12, 96(r10)
stw r12, 100(r10)
stw r12, 104(r10)
stw r12, 108(r10)
stw r11, 112(r10)
stw r11, 116(r10)
stw r12, 120(r10)
stw r12, 124(r10)
stw r12, 128(r10)
stw r12, 132(r10)
stw r12, 136(r10)
stw r12, 140(r10)
stw r12, 144(r10)
stw r12, 148(r10)
stw r12, 152(r10)
stw r12, 156(r10)
stw r12, 160(r10)
stw r12, 164(r10)
stw r12, 168(r10)
stw r12, 172(r10)
stw r12, 176(r10)
stw r12, 180(r10)
stw r12, 184(r10)
stw r12, 188(r10)
stw r12, 192(r10)
stw r12, 196(r10)
stw r12, 200(r10)
stw r12, 204(r10)
stw r12, 208(r10)
stw r12, 212(r10)
stw r12, 216(r10)
stw r12, 220(r10)
stw r12, 224(r10)
stw r12, 228(r10)
stw r12, 232(r10)
stw r12, 236(r10)
stw r12, 240(r10)
stw r11, 244(r10)
stw r11, 248(r10)
stw r12, 252(r10)
stw r12, 256(r10)
stw r12, 260(r10)
stw r12, 264(r10)
stw r12, 268(r10)
stw r12, 272(r10)
stw r12, 276(r10)
stw r12, 280(r10)
stw r12, 284(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r11, 4(r10)
stw r11, 8(r10)
stw r12, 12(r10)
stw r11, 16(r10)
stw r11, 20(r10)
stw r11, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r11, 40(r10)
stw r11, 44(r10)
stw r11, 48(r10)
stw r11, 52(r10)
stw r11, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r11, 72(r10)
stw r11, 76(r10)
stw r11, 80(r10)
stw r11, 84(r10)
stw r12, 88(r10)
stw r12, 92(r10)
stw r12, 96(r10)
stw r12, 100(r10)
stw r12, 104(r10)
stw r12, 108(r10)
stw r11, 112(r10)
stw r11, 116(r10)
stw r12, 120(r10)
stw r12, 124(r10)
stw r12, 128(r10)
stw r12, 132(r10)
stw r12, 136(r10)
stw r12, 140(r10)
stw r12, 144(r10)
stw r12, 148(r10)
stw r12, 152(r10)
stw r12, 156(r10)
stw r12, 160(r10)
stw r11, 164(r10)
stw r11, 168(r10)
stw r11, 172(r10)
stw r12, 176(r10)
stw r11, 180(r10)
stw r11, 184(r10)
stw r12, 188(r10)
stw r12, 192(r10)
stw r12, 196(r10)
stw r11, 200(r10)
stw r11, 204(r10)
stw r11, 208(r10)
stw r11, 212(r10)
stw r11, 216(r10)
stw r12, 220(r10)
stw r12, 224(r10)
stw r12, 228(r10)
stw r12, 232(r10)
stw r11, 236(r10)
stw r11, 240(r10)
stw r11, 244(r10)
stw r11, 248(r10)
stw r12, 252(r10)
stw r12, 256(r10)
stw r12, 260(r10)
stw r11, 264(r10)
stw r11, 268(r10)
stw r11, 272(r10)
stw r11, 276(r10)
stw r11, 280(r10)
stw r12, 284(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r11, 8(r10)
stw r11, 12(r10)
stw r11, 16(r10)
stw r12, 20(r10)
stw r11, 24(r10)
stw r11, 28(r10)
stw r12, 32(r10)
stw r11, 36(r10)
stw r11, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r11, 56(r10)
stw r11, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r12, 72(r10)
stw r12, 76(r10)
stw r12, 80(r10)
stw r11, 84(r10)
stw r11, 88(r10)
stw r12, 92(r10)
stw r12, 96(r10)
stw r12, 100(r10)
stw r12, 104(r10)
stw r12, 108(r10)
stw r11, 112(r10)
stw r11, 116(r10)
stw r12, 120(r10)
stw r12, 124(r10)
stw r12, 128(r10)
stw r12, 132(r10)
stw r12, 136(r10)
stw r12, 140(r10)
stw r12, 144(r10)
stw r12, 148(r10)
stw r12, 152(r10)
stw r12, 156(r10)
stw r12, 160(r10)
stw r11, 164(r10)
stw r11, 168(r10)
stw r11, 172(r10)
stw r11, 176(r10)
stw r11, 180(r10)
stw r11, 184(r10)
stw r11, 188(r10)
stw r12, 192(r10)
stw r11, 196(r10)
stw r11, 200(r10)
stw r12, 204(r10)
stw r12, 208(r10)
stw r12, 212(r10)
stw r11, 216(r10)
stw r11, 220(r10)
stw r12, 224(r10)
stw r12, 228(r10)
stw r11, 232(r10)
stw r11, 236(r10)
stw r12, 240(r10)
stw r11, 244(r10)
stw r11, 248(r10)
stw r12, 252(r10)
stw r12, 256(r10)
stw r11, 260(r10)
stw r11, 264(r10)
stw r12, 268(r10)
stw r12, 272(r10)
stw r12, 276(r10)
stw r11, 280(r10)
stw r11, 284(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r11, 8(r10)
stw r11, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r11, 24(r10)
stw r11, 28(r10)
stw r12, 32(r10)
stw r11, 36(r10)
stw r11, 40(r10)
stw r11, 44(r10)
stw r11, 48(r10)
stw r11, 52(r10)
stw r11, 56(r10)
stw r11, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r11, 72(r10)
stw r11, 76(r10)
stw r11, 80(r10)
stw r11, 84(r10)
stw r11, 88(r10)
stw r12, 92(r10)
stw r12, 96(r10)
stw r12, 100(r10)
stw r12, 104(r10)
stw r12, 108(r10)
stw r11, 112(r10)
stw r11, 116(r10)
stw r12, 120(r10)
stw r12, 124(r10)
stw r12, 128(r10)
stw r12, 132(r10)
stw r12, 136(r10)
stw r12, 140(r10)
stw r12, 144(r10)
stw r12, 148(r10)
stw r12, 152(r10)
stw r12, 156(r10)
stw r12, 160(r10)
stw r11, 164(r10)
stw r11, 168(r10)
stw r12, 172(r10)
stw r11, 176(r10)
stw r12, 180(r10)
stw r11, 184(r10)
stw r11, 188(r10)
stw r12, 192(r10)
stw r11, 196(r10)
stw r11, 200(r10)
stw r12, 204(r10)
stw r12, 208(r10)
stw r12, 212(r10)
stw r11, 216(r10)
stw r11, 220(r10)
stw r12, 224(r10)
stw r11, 228(r10)
stw r11, 232(r10)
stw r12, 236(r10)
stw r12, 240(r10)
stw r11, 244(r10)
stw r11, 248(r10)
stw r12, 252(r10)
stw r12, 256(r10)
stw r11, 260(r10)
stw r11, 264(r10)
stw r11, 268(r10)
stw r11, 272(r10)
stw r11, 276(r10)
stw r11, 280(r10)
stw r11, 284(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r11, 8(r10)
stw r11, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r11, 36(r10)
stw r11, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r11, 68(r10)
stw r11, 72(r10)
stw r12, 76(r10)
stw r12, 80(r10)
stw r11, 84(r10)
stw r11, 88(r10)
stw r12, 92(r10)
stw r12, 96(r10)
stw r12, 100(r10)
stw r12, 104(r10)
stw r12, 108(r10)
stw r11, 112(r10)
stw r11, 116(r10)
stw r12, 120(r10)
stw r12, 124(r10)
stw r12, 128(r10)
stw r12, 132(r10)
stw r12, 136(r10)
stw r12, 140(r10)
stw r12, 144(r10)
stw r12, 148(r10)
stw r12, 152(r10)
stw r12, 156(r10)
stw r12, 160(r10)
stw r11, 164(r10)
stw r11, 168(r10)
stw r12, 172(r10)
stw r11, 176(r10)
stw r12, 180(r10)
stw r11, 184(r10)
stw r11, 188(r10)
stw r12, 192(r10)
stw r11, 196(r10)
stw r11, 200(r10)
stw r12, 204(r10)
stw r12, 208(r10)
stw r12, 212(r10)
stw r11, 216(r10)
stw r11, 220(r10)
stw r12, 224(r10)
stw r11, 228(r10)
stw r11, 232(r10)
stw r12, 236(r10)
stw r12, 240(r10)
stw r11, 244(r10)
stw r11, 248(r10)
stw r12, 252(r10)
stw r12, 256(r10)
stw r11, 260(r10)
stw r11, 264(r10)
stw r12, 268(r10)
stw r12, 272(r10)
stw r12, 276(r10)
stw r12, 280(r10)
stw r12, 284(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r11, 8(r10)
stw r11, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r11, 36(r10)
stw r11, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r11, 68(r10)
stw r11, 72(r10)
stw r12, 76(r10)
stw r12, 80(r10)
stw r11, 84(r10)
stw r11, 88(r10)
stw r12, 92(r10)
stw r12, 96(r10)
stw r12, 100(r10)
stw r12, 104(r10)
stw r12, 108(r10)
stw r11, 112(r10)
stw r11, 116(r10)
stw r12, 120(r10)
stw r12, 124(r10)
stw r12, 128(r10)
stw r12, 132(r10)
stw r12, 136(r10)
stw r12, 140(r10)
stw r12, 144(r10)
stw r12, 148(r10)
stw r12, 152(r10)
stw r12, 156(r10)
stw r12, 160(r10)
stw r11, 164(r10)
stw r11, 168(r10)
stw r12, 172(r10)
stw r11, 176(r10)
stw r12, 180(r10)
stw r11, 184(r10)
stw r11, 188(r10)
stw r12, 192(r10)
stw r11, 196(r10)
stw r11, 200(r10)
stw r12, 204(r10)
stw r12, 208(r10)
stw r12, 212(r10)
stw r11, 216(r10)
stw r11, 220(r10)
stw r12, 224(r10)
stw r11, 228(r10)
stw r11, 232(r10)
stw r12, 236(r10)
stw r12, 240(r10)
stw r11, 244(r10)
stw r11, 248(r10)
stw r12, 252(r10)
stw r12, 256(r10)
stw r11, 260(r10)
stw r11, 264(r10)
stw r12, 268(r10)
stw r12, 272(r10)
stw r12, 276(r10)
stw r12, 280(r10)
stw r12, 284(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r11, 8(r10)
stw r11, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r11, 36(r10)
stw r11, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r11, 56(r10)
stw r11, 60(r10)
stw r12, 64(r10)
stw r11, 68(r10)
stw r11, 72(r10)
stw r12, 76(r10)
stw r12, 80(r10)
stw r11, 84(r10)
stw r11, 88(r10)
stw r12, 92(r10)
stw r12, 96(r10)
stw r12, 100(r10)
stw r12, 104(r10)
stw r12, 108(r10)
stw r11, 112(r10)
stw r11, 116(r10)
stw r12, 120(r10)
stw r12, 124(r10)
stw r12, 128(r10)
stw r12, 132(r10)
stw r12, 136(r10)
stw r12, 140(r10)
stw r12, 144(r10)
stw r12, 148(r10)
stw r12, 152(r10)
stw r12, 156(r10)
stw r12, 160(r10)
stw r11, 164(r10)
stw r11, 168(r10)
stw r12, 172(r10)
stw r11, 176(r10)
stw r12, 180(r10)
stw r11, 184(r10)
stw r11, 188(r10)
stw r12, 192(r10)
stw r11, 196(r10)
stw r11, 200(r10)
stw r12, 204(r10)
stw r12, 208(r10)
stw r12, 212(r10)
stw r11, 216(r10)
stw r11, 220(r10)
stw r12, 224(r10)
stw r11, 228(r10)
stw r11, 232(r10)
stw r12, 236(r10)
stw r12, 240(r10)
stw r11, 244(r10)
stw r11, 248(r10)
stw r12, 252(r10)
stw r12, 256(r10)
stw r11, 260(r10)
stw r11, 264(r10)
stw r12, 268(r10)
stw r12, 272(r10)
stw r12, 276(r10)
stw r11, 280(r10)
stw r11, 284(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r11, 4(r10)
stw r11, 8(r10)
stw r11, 12(r10)
stw r11, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r11, 40(r10)
stw r11, 44(r10)
stw r11, 48(r10)
stw r11, 52(r10)
stw r11, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r11, 72(r10)
stw r11, 76(r10)
stw r11, 80(r10)
stw r12, 84(r10)
stw r11, 88(r10)
stw r11, 92(r10)
stw r12, 96(r10)
stw r12, 100(r10)
stw r12, 104(r10)
stw r11, 108(r10)
stw r11, 112(r10)
stw r11, 116(r10)
stw r11, 120(r10)
stw r12, 124(r10)
stw r12, 128(r10)
stw r12, 132(r10)
stw r12, 136(r10)
stw r12, 140(r10)
stw r12, 144(r10)
stw r12, 148(r10)
stw r12, 152(r10)
stw r12, 156(r10)
stw r12, 160(r10)
stw r11, 164(r10)
stw r11, 168(r10)
stw r12, 172(r10)
stw r12, 176(r10)
stw r12, 180(r10)
stw r11, 184(r10)
stw r11, 188(r10)
stw r12, 192(r10)
stw r12, 196(r10)
stw r11, 200(r10)
stw r11, 204(r10)
stw r11, 208(r10)
stw r11, 212(r10)
stw r11, 216(r10)
stw r12, 220(r10)
stw r12, 224(r10)
stw r12, 228(r10)
stw r11, 232(r10)
stw r11, 236(r10)
stw r11, 240(r10)
stw r12, 244(r10)
stw r11, 248(r10)
stw r11, 252(r10)
stw r12, 256(r10)
stw r12, 260(r10)
stw r11, 264(r10)
stw r11, 268(r10)
stw r11, 272(r10)
stw r11, 276(r10)
stw r11, 280(r10)
stw r12, 284(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r12, 8(r10)
stw r12, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r12, 72(r10)
stw r12, 76(r10)
stw r12, 80(r10)
stw r12, 84(r10)
stw r12, 88(r10)
stw r12, 92(r10)
stw r12, 96(r10)
stw r12, 100(r10)
stw r12, 104(r10)
stw r12, 108(r10)
stw r12, 112(r10)
stw r12, 116(r10)
stw r12, 120(r10)
stw r12, 124(r10)
stw r12, 128(r10)
stw r12, 132(r10)
stw r12, 136(r10)
stw r12, 140(r10)
stw r12, 144(r10)
stw r12, 148(r10)
stw r12, 152(r10)
stw r12, 156(r10)
stw r12, 160(r10)
stw r12, 164(r10)
stw r12, 168(r10)
stw r12, 172(r10)
stw r12, 176(r10)
stw r12, 180(r10)
stw r12, 184(r10)
stw r12, 188(r10)
stw r12, 192(r10)
stw r12, 196(r10)
stw r12, 200(r10)
stw r12, 204(r10)
stw r12, 208(r10)
stw r12, 212(r10)
stw r12, 216(r10)
stw r12, 220(r10)
stw r12, 224(r10)
stw r12, 228(r10)
stw r12, 232(r10)
stw r12, 236(r10)
stw r12, 240(r10)
stw r12, 244(r10)
stw r12, 248(r10)
stw r12, 252(r10)
stw r12, 256(r10)
stw r12, 260(r10)
stw r12, 264(r10)
stw r12, 268(r10)
stw r12, 272(r10)
stw r12, 276(r10)
stw r12, 280(r10)
stw r12, 284(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r12, 8(r10)
stw r12, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r12, 72(r10)
stw r12, 76(r10)
stw r12, 80(r10)
stw r12, 84(r10)
stw r12, 88(r10)
stw r12, 92(r10)
stw r12, 96(r10)
stw r12, 100(r10)
stw r12, 104(r10)
stw r12, 108(r10)
stw r12, 112(r10)
stw r12, 116(r10)
stw r12, 120(r10)
stw r12, 124(r10)
stw r12, 128(r10)
stw r11, 132(r10)
stw r11, 136(r10)
stw r11, 140(r10)
stw r11, 144(r10)
stw r11, 148(r10)
stw r11, 152(r10)
stw r11, 156(r10)
stw r12, 160(r10)
stw r12, 164(r10)
stw r12, 168(r10)
stw r12, 172(r10)
stw r12, 176(r10)
stw r12, 180(r10)
stw r12, 184(r10)
stw r12, 188(r10)
stw r12, 192(r10)
stw r12, 196(r10)
stw r12, 200(r10)
stw r12, 204(r10)
stw r12, 208(r10)
stw r12, 212(r10)
stw r12, 216(r10)
stw r12, 220(r10)
stw r12, 224(r10)
stw r12, 228(r10)
stw r12, 232(r10)
stw r12, 236(r10)
stw r12, 240(r10)
stw r12, 244(r10)
stw r12, 248(r10)
stw r12, 252(r10)
stw r12, 256(r10)
stw r12, 260(r10)
stw r12, 264(r10)
stw r12, 268(r10)
stw r12, 272(r10)
stw r12, 276(r10)
stw r12, 280(r10)
stw r12, 284(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r12, 8(r10)
stw r12, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r12, 72(r10)
stw r12, 76(r10)
stw r12, 80(r10)
stw r12, 84(r10)
stw r12, 88(r10)
stw r12, 92(r10)
stw r12, 96(r10)
stw r12, 100(r10)
stw r12, 104(r10)
stw r12, 108(r10)
stw r12, 112(r10)
stw r12, 116(r10)
stw r12, 120(r10)
stw r12, 124(r10)
stw r12, 128(r10)
stw r12, 132(r10)
stw r12, 136(r10)
stw r12, 140(r10)
stw r12, 144(r10)
stw r12, 148(r10)
stw r12, 152(r10)
stw r12, 156(r10)
stw r12, 160(r10)
stw r12, 164(r10)
stw r12, 168(r10)
stw r12, 172(r10)
stw r12, 176(r10)
stw r12, 180(r10)
stw r12, 184(r10)
stw r12, 188(r10)
stw r12, 192(r10)
stw r12, 196(r10)
stw r12, 200(r10)
stw r12, 204(r10)
stw r12, 208(r10)
stw r12, 212(r10)
stw r12, 216(r10)
stw r12, 220(r10)
stw r12, 224(r10)
stw r12, 228(r10)
stw r12, 232(r10)
stw r12, 236(r10)
stw r12, 240(r10)
stw r12, 244(r10)
stw r12, 248(r10)
stw r12, 252(r10)
stw r12, 256(r10)
stw r12, 260(r10)
stw r12, 264(r10)
stw r12, 268(r10)
stw r12, 272(r10)
stw r12, 276(r10)
stw r12, 280(r10)
stw r12, 284(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r12, 8(r10)
stw r12, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r12, 72(r10)
stw r12, 76(r10)
stw r12, 80(r10)
stw r12, 84(r10)
stw r12, 88(r10)
stw r12, 92(r10)
stw r12, 96(r10)
stw r12, 100(r10)
stw r12, 104(r10)
stw r12, 108(r10)
stw r12, 112(r10)
stw r12, 116(r10)
stw r12, 120(r10)
stw r12, 124(r10)
stw r12, 128(r10)
stw r12, 132(r10)
stw r12, 136(r10)
stw r12, 140(r10)
stw r12, 144(r10)
stw r12, 148(r10)
stw r12, 152(r10)
stw r12, 156(r10)
stw r12, 160(r10)
stw r12, 164(r10)
stw r12, 168(r10)
stw r12, 172(r10)
stw r12, 176(r10)
stw r12, 180(r10)
stw r12, 184(r10)
stw r12, 188(r10)
stw r12, 192(r10)
stw r12, 196(r10)
stw r12, 200(r10)
stw r12, 204(r10)
stw r12, 208(r10)
stw r12, 212(r10)
stw r12, 216(r10)
stw r12, 220(r10)
stw r12, 224(r10)
stw r12, 228(r10)
stw r12, 232(r10)
stw r12, 236(r10)
stw r12, 240(r10)
stw r12, 244(r10)
stw r12, 248(r10)
stw r12, 252(r10)
stw r12, 256(r10)
stw r12, 260(r10)
stw r12, 264(r10)
stw r12, 268(r10)
stw r12, 272(r10)
stw r12, 276(r10)
stw r12, 280(r10)
stw r12, 284(r10)
#endif
.endm
 
.macro DEBUG_copy_loop
#ifdef CONFIG_DEBUG
stw r12, 0(r10)
stw r12, 4(r10)
stw r12, 8(r10)
stw r12, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r12, 72(r10)
stw r12, 76(r10)
stw r12, 80(r10)
stw r12, 84(r10)
stw r12, 88(r10)
stw r12, 92(r10)
stw r12, 96(r10)
stw r12, 100(r10)
stw r12, 104(r10)
stw r12, 108(r10)
stw r12, 112(r10)
stw r12, 116(r10)
stw r12, 120(r10)
stw r12, 124(r10)
stw r12, 128(r10)
stw r12, 132(r10)
stw r12, 136(r10)
stw r12, 140(r10)
stw r12, 144(r10)
stw r12, 148(r10)
stw r12, 152(r10)
stw r12, 156(r10)
stw r12, 160(r10)
stw r12, 164(r10)
stw r12, 168(r10)
stw r12, 172(r10)
stw r12, 176(r10)
stw r12, 180(r10)
stw r12, 184(r10)
stw r12, 188(r10)
stw r12, 192(r10)
stw r12, 196(r10)
stw r12, 200(r10)
stw r12, 204(r10)
stw r12, 208(r10)
stw r12, 212(r10)
stw r12, 216(r10)
stw r12, 220(r10)
stw r12, 224(r10)
stw r12, 228(r10)
stw r12, 232(r10)
stw r12, 236(r10)
stw r12, 240(r10)
stw r12, 244(r10)
stw r12, 248(r10)
stw r12, 252(r10)
stw r12, 256(r10)
stw r12, 260(r10)
stw r12, 264(r10)
stw r12, 268(r10)
stw r12, 272(r10)
stw r12, 276(r10)
stw r12, 280(r10)
stw r12, 284(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r12, 8(r10)
stw r12, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r12, 72(r10)
stw r12, 76(r10)
stw r12, 80(r10)
stw r12, 84(r10)
stw r12, 88(r10)
stw r12, 92(r10)
stw r12, 96(r10)
stw r12, 100(r10)
stw r12, 104(r10)
stw r12, 108(r10)
stw r12, 112(r10)
stw r12, 116(r10)
stw r12, 120(r10)
stw r12, 124(r10)
stw r12, 128(r10)
stw r12, 132(r10)
stw r12, 136(r10)
stw r12, 140(r10)
stw r12, 144(r10)
stw r12, 148(r10)
stw r12, 152(r10)
stw r12, 156(r10)
stw r12, 160(r10)
stw r12, 164(r10)
stw r12, 168(r10)
stw r12, 172(r10)
stw r12, 176(r10)
stw r12, 180(r10)
stw r12, 184(r10)
stw r12, 188(r10)
stw r12, 192(r10)
stw r12, 196(r10)
stw r12, 200(r10)
stw r12, 204(r10)
stw r12, 208(r10)
stw r12, 212(r10)
stw r12, 216(r10)
stw r12, 220(r10)
stw r12, 224(r10)
stw r12, 228(r10)
stw r12, 232(r10)
stw r12, 236(r10)
stw r12, 240(r10)
stw r12, 244(r10)
stw r12, 248(r10)
stw r12, 252(r10)
stw r12, 256(r10)
stw r12, 260(r10)
stw r12, 264(r10)
stw r12, 268(r10)
stw r12, 272(r10)
stw r12, 276(r10)
stw r12, 280(r10)
stw r12, 284(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r12, 8(r10)
stw r12, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r12, 72(r10)
stw r12, 76(r10)
stw r12, 80(r10)
stw r12, 84(r10)
stw r12, 88(r10)
stw r12, 92(r10)
stw r12, 96(r10)
stw r12, 100(r10)
stw r12, 104(r10)
stw r12, 108(r10)
stw r12, 112(r10)
stw r12, 116(r10)
stw r12, 120(r10)
stw r12, 124(r10)
stw r12, 128(r10)
stw r12, 132(r10)
stw r12, 136(r10)
stw r12, 140(r10)
stw r12, 144(r10)
stw r12, 148(r10)
stw r12, 152(r10)
stw r12, 156(r10)
stw r12, 160(r10)
stw r12, 164(r10)
stw r12, 168(r10)
stw r11, 172(r10)
stw r11, 176(r10)
stw r11, 180(r10)
stw r12, 184(r10)
stw r12, 188(r10)
stw r12, 192(r10)
stw r12, 196(r10)
stw r12, 200(r10)
stw r12, 204(r10)
stw r12, 208(r10)
stw r12, 212(r10)
stw r12, 216(r10)
stw r12, 220(r10)
stw r12, 224(r10)
stw r12, 228(r10)
stw r12, 232(r10)
stw r12, 236(r10)
stw r12, 240(r10)
stw r12, 244(r10)
stw r12, 248(r10)
stw r12, 252(r10)
stw r12, 256(r10)
stw r12, 260(r10)
stw r12, 264(r10)
stw r12, 268(r10)
stw r12, 272(r10)
stw r12, 276(r10)
stw r12, 280(r10)
stw r12, 284(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r12, 8(r10)
stw r12, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r12, 72(r10)
stw r12, 76(r10)
stw r12, 80(r10)
stw r12, 84(r10)
stw r12, 88(r10)
stw r12, 92(r10)
stw r12, 96(r10)
stw r12, 100(r10)
stw r12, 104(r10)
stw r12, 108(r10)
stw r12, 112(r10)
stw r12, 116(r10)
stw r12, 120(r10)
stw r12, 124(r10)
stw r12, 128(r10)
stw r12, 132(r10)
stw r12, 136(r10)
stw r12, 140(r10)
stw r12, 144(r10)
stw r12, 148(r10)
stw r12, 152(r10)
stw r12, 156(r10)
stw r12, 160(r10)
stw r12, 164(r10)
stw r12, 168(r10)
stw r12, 172(r10)
stw r11, 176(r10)
stw r11, 180(r10)
stw r12, 184(r10)
stw r12, 188(r10)
stw r12, 192(r10)
stw r12, 196(r10)
stw r12, 200(r10)
stw r12, 204(r10)
stw r12, 208(r10)
stw r12, 212(r10)
stw r12, 216(r10)
stw r12, 220(r10)
stw r12, 224(r10)
stw r12, 228(r10)
stw r12, 232(r10)
stw r12, 236(r10)
stw r12, 240(r10)
stw r12, 244(r10)
stw r12, 248(r10)
stw r12, 252(r10)
stw r12, 256(r10)
stw r12, 260(r10)
stw r12, 264(r10)
stw r12, 268(r10)
stw r12, 272(r10)
stw r12, 276(r10)
stw r12, 280(r10)
stw r12, 284(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r12, 8(r10)
stw r12, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r12, 72(r10)
stw r12, 76(r10)
stw r12, 80(r10)
stw r12, 84(r10)
stw r12, 88(r10)
stw r12, 92(r10)
stw r12, 96(r10)
stw r12, 100(r10)
stw r12, 104(r10)
stw r12, 108(r10)
stw r12, 112(r10)
stw r12, 116(r10)
stw r12, 120(r10)
stw r12, 124(r10)
stw r12, 128(r10)
stw r12, 132(r10)
stw r12, 136(r10)
stw r12, 140(r10)
stw r12, 144(r10)
stw r12, 148(r10)
stw r12, 152(r10)
stw r12, 156(r10)
stw r12, 160(r10)
stw r12, 164(r10)
stw r12, 168(r10)
stw r12, 172(r10)
stw r11, 176(r10)
stw r11, 180(r10)
stw r12, 184(r10)
stw r12, 188(r10)
stw r12, 192(r10)
stw r12, 196(r10)
stw r12, 200(r10)
stw r12, 204(r10)
stw r12, 208(r10)
stw r12, 212(r10)
stw r12, 216(r10)
stw r12, 220(r10)
stw r12, 224(r10)
stw r12, 228(r10)
stw r12, 232(r10)
stw r12, 236(r10)
stw r12, 240(r10)
stw r12, 244(r10)
stw r12, 248(r10)
stw r12, 252(r10)
stw r12, 256(r10)
stw r12, 260(r10)
stw r12, 264(r10)
stw r12, 268(r10)
stw r12, 272(r10)
stw r12, 276(r10)
stw r12, 280(r10)
stw r12, 284(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r11, 8(r10)
stw r11, 12(r10)
stw r11, 16(r10)
stw r11, 20(r10)
stw r11, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r11, 40(r10)
stw r11, 44(r10)
stw r11, 48(r10)
stw r11, 52(r10)
stw r11, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r11, 68(r10)
stw r11, 72(r10)
stw r12, 76(r10)
stw r11, 80(r10)
stw r11, 84(r10)
stw r11, 88(r10)
stw r12, 92(r10)
stw r12, 96(r10)
stw r11, 100(r10)
stw r11, 104(r10)
stw r12, 108(r10)
stw r12, 112(r10)
stw r12, 116(r10)
stw r11, 120(r10)
stw r11, 124(r10)
stw r12, 128(r10)
stw r12, 132(r10)
stw r12, 136(r10)
stw r12, 140(r10)
stw r12, 144(r10)
stw r12, 148(r10)
stw r12, 152(r10)
stw r12, 156(r10)
stw r12, 160(r10)
stw r12, 164(r10)
stw r12, 168(r10)
stw r12, 172(r10)
stw r11, 176(r10)
stw r11, 180(r10)
stw r12, 184(r10)
stw r12, 188(r10)
stw r12, 192(r10)
stw r12, 196(r10)
stw r11, 200(r10)
stw r11, 204(r10)
stw r11, 208(r10)
stw r11, 212(r10)
stw r11, 216(r10)
stw r12, 220(r10)
stw r12, 224(r10)
stw r12, 228(r10)
stw r11, 232(r10)
stw r11, 236(r10)
stw r11, 240(r10)
stw r11, 244(r10)
stw r11, 248(r10)
stw r12, 252(r10)
stw r12, 256(r10)
stw r11, 260(r10)
stw r11, 264(r10)
stw r12, 268(r10)
stw r11, 272(r10)
stw r11, 276(r10)
stw r11, 280(r10)
stw r12, 284(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r11, 4(r10)
stw r11, 8(r10)
stw r12, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r11, 24(r10)
stw r11, 28(r10)
stw r12, 32(r10)
stw r11, 36(r10)
stw r11, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r11, 56(r10)
stw r11, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r11, 72(r10)
stw r11, 76(r10)
stw r12, 80(r10)
stw r12, 84(r10)
stw r11, 88(r10)
stw r11, 92(r10)
stw r12, 96(r10)
stw r11, 100(r10)
stw r11, 104(r10)
stw r12, 108(r10)
stw r12, 112(r10)
stw r12, 116(r10)
stw r11, 120(r10)
stw r11, 124(r10)
stw r12, 128(r10)
stw r12, 132(r10)
stw r12, 136(r10)
stw r12, 140(r10)
stw r12, 144(r10)
stw r12, 148(r10)
stw r12, 152(r10)
stw r12, 156(r10)
stw r12, 160(r10)
stw r12, 164(r10)
stw r12, 168(r10)
stw r12, 172(r10)
stw r11, 176(r10)
stw r11, 180(r10)
stw r12, 184(r10)
stw r12, 188(r10)
stw r12, 192(r10)
stw r11, 196(r10)
stw r11, 200(r10)
stw r12, 204(r10)
stw r12, 208(r10)
stw r12, 212(r10)
stw r11, 216(r10)
stw r11, 220(r10)
stw r12, 224(r10)
stw r11, 228(r10)
stw r11, 232(r10)
stw r12, 236(r10)
stw r12, 240(r10)
stw r12, 244(r10)
stw r11, 248(r10)
stw r11, 252(r10)
stw r12, 256(r10)
stw r12, 260(r10)
stw r11, 264(r10)
stw r11, 268(r10)
stw r12, 272(r10)
stw r12, 276(r10)
stw r11, 280(r10)
stw r11, 284(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r11, 4(r10)
stw r11, 8(r10)
stw r12, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r11, 36(r10)
stw r11, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r11, 56(r10)
stw r11, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r11, 72(r10)
stw r11, 76(r10)
stw r12, 80(r10)
stw r12, 84(r10)
stw r11, 88(r10)
stw r11, 92(r10)
stw r12, 96(r10)
stw r11, 100(r10)
stw r11, 104(r10)
stw r12, 108(r10)
stw r12, 112(r10)
stw r12, 116(r10)
stw r11, 120(r10)
stw r11, 124(r10)
stw r12, 128(r10)
stw r12, 132(r10)
stw r12, 136(r10)
stw r12, 140(r10)
stw r12, 144(r10)
stw r12, 148(r10)
stw r12, 152(r10)
stw r12, 156(r10)
stw r12, 160(r10)
stw r12, 164(r10)
stw r12, 168(r10)
stw r12, 172(r10)
stw r11, 176(r10)
stw r11, 180(r10)
stw r12, 184(r10)
stw r12, 188(r10)
stw r12, 192(r10)
stw r11, 196(r10)
stw r11, 200(r10)
stw r12, 204(r10)
stw r12, 208(r10)
stw r12, 212(r10)
stw r11, 216(r10)
stw r11, 220(r10)
stw r12, 224(r10)
stw r11, 228(r10)
stw r11, 232(r10)
stw r12, 236(r10)
stw r12, 240(r10)
stw r12, 244(r10)
stw r11, 248(r10)
stw r11, 252(r10)
stw r12, 256(r10)
stw r12, 260(r10)
stw r11, 264(r10)
stw r11, 268(r10)
stw r12, 272(r10)
stw r12, 276(r10)
stw r11, 280(r10)
stw r11, 284(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r11, 4(r10)
stw r11, 8(r10)
stw r12, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r11, 36(r10)
stw r11, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r11, 56(r10)
stw r11, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r11, 72(r10)
stw r11, 76(r10)
stw r12, 80(r10)
stw r12, 84(r10)
stw r11, 88(r10)
stw r11, 92(r10)
stw r12, 96(r10)
stw r11, 100(r10)
stw r11, 104(r10)
stw r12, 108(r10)
stw r12, 112(r10)
stw r12, 116(r10)
stw r11, 120(r10)
stw r11, 124(r10)
stw r12, 128(r10)
stw r12, 132(r10)
stw r12, 136(r10)
stw r12, 140(r10)
stw r12, 144(r10)
stw r12, 148(r10)
stw r12, 152(r10)
stw r12, 156(r10)
stw r12, 160(r10)
stw r12, 164(r10)
stw r12, 168(r10)
stw r12, 172(r10)
stw r11, 176(r10)
stw r11, 180(r10)
stw r12, 184(r10)
stw r12, 188(r10)
stw r12, 192(r10)
stw r11, 196(r10)
stw r11, 200(r10)
stw r12, 204(r10)
stw r12, 208(r10)
stw r12, 212(r10)
stw r11, 216(r10)
stw r11, 220(r10)
stw r12, 224(r10)
stw r11, 228(r10)
stw r11, 232(r10)
stw r12, 236(r10)
stw r12, 240(r10)
stw r12, 244(r10)
stw r11, 248(r10)
stw r11, 252(r10)
stw r12, 256(r10)
stw r12, 260(r10)
stw r11, 264(r10)
stw r11, 268(r10)
stw r12, 272(r10)
stw r12, 276(r10)
stw r11, 280(r10)
stw r11, 284(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r11, 4(r10)
stw r11, 8(r10)
stw r12, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r11, 36(r10)
stw r11, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r11, 56(r10)
stw r11, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r11, 72(r10)
stw r11, 76(r10)
stw r12, 80(r10)
stw r12, 84(r10)
stw r11, 88(r10)
stw r11, 92(r10)
stw r12, 96(r10)
stw r11, 100(r10)
stw r11, 104(r10)
stw r12, 108(r10)
stw r12, 112(r10)
stw r12, 116(r10)
stw r11, 120(r10)
stw r11, 124(r10)
stw r12, 128(r10)
stw r12, 132(r10)
stw r12, 136(r10)
stw r12, 140(r10)
stw r12, 144(r10)
stw r12, 148(r10)
stw r12, 152(r10)
stw r12, 156(r10)
stw r12, 160(r10)
stw r12, 164(r10)
stw r12, 168(r10)
stw r12, 172(r10)
stw r11, 176(r10)
stw r11, 180(r10)
stw r12, 184(r10)
stw r12, 188(r10)
stw r12, 192(r10)
stw r11, 196(r10)
stw r11, 200(r10)
stw r12, 204(r10)
stw r12, 208(r10)
stw r12, 212(r10)
stw r11, 216(r10)
stw r11, 220(r10)
stw r12, 224(r10)
stw r11, 228(r10)
stw r11, 232(r10)
stw r12, 236(r10)
stw r12, 240(r10)
stw r12, 244(r10)
stw r11, 248(r10)
stw r11, 252(r10)
stw r12, 256(r10)
stw r12, 260(r10)
stw r11, 264(r10)
stw r11, 268(r10)
stw r12, 272(r10)
stw r12, 276(r10)
stw r11, 280(r10)
stw r11, 284(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r11, 4(r10)
stw r11, 8(r10)
stw r12, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r11, 24(r10)
stw r11, 28(r10)
stw r12, 32(r10)
stw r11, 36(r10)
stw r11, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r11, 56(r10)
stw r11, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r11, 72(r10)
stw r11, 76(r10)
stw r12, 80(r10)
stw r12, 84(r10)
stw r11, 88(r10)
stw r11, 92(r10)
stw r12, 96(r10)
stw r11, 100(r10)
stw r11, 104(r10)
stw r12, 108(r10)
stw r12, 112(r10)
stw r12, 116(r10)
stw r11, 120(r10)
stw r11, 124(r10)
stw r12, 128(r10)
stw r12, 132(r10)
stw r12, 136(r10)
stw r12, 140(r10)
stw r12, 144(r10)
stw r12, 148(r10)
stw r12, 152(r10)
stw r12, 156(r10)
stw r12, 160(r10)
stw r12, 164(r10)
stw r12, 168(r10)
stw r12, 172(r10)
stw r11, 176(r10)
stw r11, 180(r10)
stw r12, 184(r10)
stw r12, 188(r10)
stw r12, 192(r10)
stw r11, 196(r10)
stw r11, 200(r10)
stw r12, 204(r10)
stw r12, 208(r10)
stw r12, 212(r10)
stw r11, 216(r10)
stw r11, 220(r10)
stw r12, 224(r10)
stw r11, 228(r10)
stw r11, 232(r10)
stw r12, 236(r10)
stw r12, 240(r10)
stw r12, 244(r10)
stw r11, 248(r10)
stw r11, 252(r10)
stw r12, 256(r10)
stw r12, 260(r10)
stw r11, 264(r10)
stw r11, 268(r10)
stw r12, 272(r10)
stw r12, 276(r10)
stw r11, 280(r10)
stw r11, 284(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r11, 8(r10)
stw r11, 12(r10)
stw r11, 16(r10)
stw r11, 20(r10)
stw r11, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r11, 40(r10)
stw r11, 44(r10)
stw r11, 48(r10)
stw r11, 52(r10)
stw r11, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r11, 72(r10)
stw r11, 76(r10)
stw r11, 80(r10)
stw r11, 84(r10)
stw r11, 88(r10)
stw r12, 92(r10)
stw r12, 96(r10)
stw r12, 100(r10)
stw r11, 104(r10)
stw r11, 108(r10)
stw r11, 112(r10)
stw r11, 116(r10)
stw r11, 120(r10)
stw r11, 124(r10)
stw r12, 128(r10)
stw r12, 132(r10)
stw r12, 136(r10)
stw r12, 140(r10)
stw r12, 144(r10)
stw r12, 148(r10)
stw r12, 152(r10)
stw r12, 156(r10)
stw r12, 160(r10)
stw r12, 164(r10)
stw r12, 168(r10)
stw r11, 172(r10)
stw r11, 176(r10)
stw r11, 180(r10)
stw r11, 184(r10)
stw r12, 188(r10)
stw r12, 192(r10)
stw r12, 196(r10)
stw r11, 200(r10)
stw r11, 204(r10)
stw r11, 208(r10)
stw r11, 212(r10)
stw r11, 216(r10)
stw r12, 220(r10)
stw r12, 224(r10)
stw r12, 228(r10)
stw r11, 232(r10)
stw r11, 236(r10)
stw r11, 240(r10)
stw r11, 244(r10)
stw r11, 248(r10)
stw r12, 252(r10)
stw r12, 256(r10)
stw r12, 260(r10)
stw r11, 264(r10)
stw r11, 268(r10)
stw r11, 272(r10)
stw r11, 276(r10)
stw r11, 280(r10)
stw r12, 284(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r12, 8(r10)
stw r12, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r11, 72(r10)
stw r11, 76(r10)
stw r12, 80(r10)
stw r12, 84(r10)
stw r12, 88(r10)
stw r12, 92(r10)
stw r12, 96(r10)
stw r12, 100(r10)
stw r12, 104(r10)
stw r12, 108(r10)
stw r12, 112(r10)
stw r12, 116(r10)
stw r11, 120(r10)
stw r11, 124(r10)
stw r12, 128(r10)
stw r12, 132(r10)
stw r12, 136(r10)
stw r12, 140(r10)
stw r12, 144(r10)
stw r12, 148(r10)
stw r12, 152(r10)
stw r12, 156(r10)
stw r12, 160(r10)
stw r12, 164(r10)
stw r12, 168(r10)
stw r12, 172(r10)
stw r12, 176(r10)
stw r12, 180(r10)
stw r12, 184(r10)
stw r12, 188(r10)
stw r12, 192(r10)
stw r12, 196(r10)
stw r12, 200(r10)
stw r12, 204(r10)
stw r12, 208(r10)
stw r12, 212(r10)
stw r12, 216(r10)
stw r12, 220(r10)
stw r12, 224(r10)
stw r12, 228(r10)
stw r12, 232(r10)
stw r12, 236(r10)
stw r12, 240(r10)
stw r12, 244(r10)
stw r12, 248(r10)
stw r12, 252(r10)
stw r12, 256(r10)
stw r12, 260(r10)
stw r11, 264(r10)
stw r11, 268(r10)
stw r12, 272(r10)
stw r12, 276(r10)
stw r12, 280(r10)
stw r12, 284(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r12, 8(r10)
stw r12, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r11, 72(r10)
stw r11, 76(r10)
stw r12, 80(r10)
stw r12, 84(r10)
stw r12, 88(r10)
stw r12, 92(r10)
stw r12, 96(r10)
stw r12, 100(r10)
stw r12, 104(r10)
stw r12, 108(r10)
stw r12, 112(r10)
stw r11, 116(r10)
stw r11, 120(r10)
stw r12, 124(r10)
stw r12, 128(r10)
stw r11, 132(r10)
stw r11, 136(r10)
stw r11, 140(r10)
stw r11, 144(r10)
stw r11, 148(r10)
stw r11, 152(r10)
stw r11, 156(r10)
stw r12, 160(r10)
stw r12, 164(r10)
stw r12, 168(r10)
stw r12, 172(r10)
stw r12, 176(r10)
stw r12, 180(r10)
stw r12, 184(r10)
stw r12, 188(r10)
stw r12, 192(r10)
stw r12, 196(r10)
stw r12, 200(r10)
stw r12, 204(r10)
stw r12, 208(r10)
stw r12, 212(r10)
stw r12, 216(r10)
stw r12, 220(r10)
stw r12, 224(r10)
stw r12, 228(r10)
stw r12, 232(r10)
stw r12, 236(r10)
stw r12, 240(r10)
stw r12, 244(r10)
stw r12, 248(r10)
stw r12, 252(r10)
stw r12, 256(r10)
stw r12, 260(r10)
stw r11, 264(r10)
stw r11, 268(r10)
stw r12, 272(r10)
stw r12, 276(r10)
stw r12, 280(r10)
stw r12, 284(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r12, 8(r10)
stw r12, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r11, 68(r10)
stw r11, 72(r10)
stw r11, 76(r10)
stw r11, 80(r10)
stw r12, 84(r10)
stw r12, 88(r10)
stw r12, 92(r10)
stw r12, 96(r10)
stw r11, 100(r10)
stw r11, 104(r10)
stw r11, 108(r10)
stw r11, 112(r10)
stw r11, 116(r10)
stw r12, 120(r10)
stw r12, 124(r10)
stw r12, 128(r10)
stw r12, 132(r10)
stw r12, 136(r10)
stw r12, 140(r10)
stw r12, 144(r10)
stw r12, 148(r10)
stw r12, 152(r10)
stw r12, 156(r10)
stw r12, 160(r10)
stw r12, 164(r10)
stw r12, 168(r10)
stw r12, 172(r10)
stw r12, 176(r10)
stw r12, 180(r10)
stw r12, 184(r10)
stw r12, 188(r10)
stw r12, 192(r10)
stw r12, 196(r10)
stw r12, 200(r10)
stw r12, 204(r10)
stw r12, 208(r10)
stw r12, 212(r10)
stw r12, 216(r10)
stw r12, 220(r10)
stw r12, 224(r10)
stw r12, 228(r10)
stw r12, 232(r10)
stw r12, 236(r10)
stw r12, 240(r10)
stw r12, 244(r10)
stw r12, 248(r10)
stw r12, 252(r10)
stw r12, 256(r10)
stw r11, 260(r10)
stw r11, 264(r10)
stw r11, 268(r10)
stw r11, 272(r10)
stw r12, 276(r10)
stw r12, 280(r10)
stw r12, 284(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r12, 8(r10)
stw r12, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r12, 72(r10)
stw r12, 76(r10)
stw r12, 80(r10)
stw r12, 84(r10)
stw r12, 88(r10)
stw r12, 92(r10)
stw r12, 96(r10)
stw r12, 100(r10)
stw r12, 104(r10)
stw r12, 108(r10)
stw r12, 112(r10)
stw r12, 116(r10)
stw r12, 120(r10)
stw r12, 124(r10)
stw r12, 128(r10)
stw r12, 132(r10)
stw r12, 136(r10)
stw r12, 140(r10)
stw r12, 144(r10)
stw r12, 148(r10)
stw r12, 152(r10)
stw r12, 156(r10)
stw r12, 160(r10)
stw r12, 164(r10)
stw r12, 168(r10)
stw r12, 172(r10)
stw r12, 176(r10)
stw r12, 180(r10)
stw r12, 184(r10)
stw r12, 188(r10)
stw r12, 192(r10)
stw r12, 196(r10)
stw r12, 200(r10)
stw r12, 204(r10)
stw r12, 208(r10)
stw r12, 212(r10)
stw r12, 216(r10)
stw r12, 220(r10)
stw r12, 224(r10)
stw r12, 228(r10)
stw r12, 232(r10)
stw r12, 236(r10)
stw r12, 240(r10)
stw r12, 244(r10)
stw r12, 248(r10)
stw r12, 252(r10)
stw r12, 256(r10)
stw r12, 260(r10)
stw r12, 264(r10)
stw r12, 268(r10)
stw r12, 272(r10)
stw r12, 276(r10)
stw r12, 280(r10)
stw r12, 284(r10)
#endif
.endm
 
.macro DEBUG_end_copy_loop
#ifdef CONFIG_DEBUG
stw r12, 0(r10)
stw r12, 4(r10)
stw r12, 8(r10)
stw r12, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r12, 72(r10)
stw r12, 76(r10)
stw r12, 80(r10)
stw r12, 84(r10)
stw r12, 88(r10)
stw r12, 92(r10)
stw r12, 96(r10)
stw r12, 100(r10)
stw r12, 104(r10)
stw r12, 108(r10)
stw r12, 112(r10)
stw r12, 116(r10)
stw r12, 120(r10)
stw r12, 124(r10)
stw r12, 128(r10)
stw r12, 132(r10)
stw r12, 136(r10)
stw r12, 140(r10)
stw r12, 144(r10)
stw r12, 148(r10)
stw r12, 152(r10)
stw r12, 156(r10)
stw r12, 160(r10)
stw r12, 164(r10)
stw r12, 168(r10)
stw r12, 172(r10)
stw r12, 176(r10)
stw r12, 180(r10)
stw r12, 184(r10)
stw r12, 188(r10)
stw r12, 192(r10)
stw r12, 196(r10)
stw r12, 200(r10)
stw r12, 204(r10)
stw r12, 208(r10)
stw r12, 212(r10)
stw r12, 216(r10)
stw r12, 220(r10)
stw r12, 224(r10)
stw r12, 228(r10)
stw r12, 232(r10)
stw r12, 236(r10)
stw r12, 240(r10)
stw r12, 244(r10)
stw r12, 248(r10)
stw r12, 252(r10)
stw r12, 256(r10)
stw r12, 260(r10)
stw r12, 264(r10)
stw r12, 268(r10)
stw r12, 272(r10)
stw r12, 276(r10)
stw r12, 280(r10)
stw r12, 284(r10)
stw r12, 288(r10)
stw r12, 292(r10)
stw r12, 296(r10)
stw r12, 300(r10)
stw r12, 304(r10)
stw r12, 308(r10)
stw r12, 312(r10)
stw r12, 316(r10)
stw r12, 320(r10)
stw r12, 324(r10)
stw r12, 328(r10)
stw r12, 332(r10)
stw r12, 336(r10)
stw r12, 340(r10)
stw r12, 344(r10)
stw r12, 348(r10)
stw r12, 352(r10)
stw r12, 356(r10)
stw r12, 360(r10)
stw r12, 364(r10)
stw r12, 368(r10)
stw r12, 372(r10)
stw r12, 376(r10)
stw r12, 380(r10)
stw r12, 384(r10)
stw r12, 388(r10)
stw r12, 392(r10)
stw r12, 396(r10)
stw r12, 400(r10)
stw r12, 404(r10)
stw r12, 408(r10)
stw r12, 412(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r12, 8(r10)
stw r12, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r12, 72(r10)
stw r12, 76(r10)
stw r12, 80(r10)
stw r12, 84(r10)
stw r12, 88(r10)
stw r12, 92(r10)
stw r12, 96(r10)
stw r12, 100(r10)
stw r12, 104(r10)
stw r12, 108(r10)
stw r12, 112(r10)
stw r12, 116(r10)
stw r12, 120(r10)
stw r12, 124(r10)
stw r12, 128(r10)
stw r12, 132(r10)
stw r12, 136(r10)
stw r12, 140(r10)
stw r12, 144(r10)
stw r12, 148(r10)
stw r12, 152(r10)
stw r12, 156(r10)
stw r12, 160(r10)
stw r12, 164(r10)
stw r12, 168(r10)
stw r12, 172(r10)
stw r12, 176(r10)
stw r12, 180(r10)
stw r12, 184(r10)
stw r12, 188(r10)
stw r12, 192(r10)
stw r12, 196(r10)
stw r12, 200(r10)
stw r12, 204(r10)
stw r12, 208(r10)
stw r12, 212(r10)
stw r12, 216(r10)
stw r12, 220(r10)
stw r12, 224(r10)
stw r12, 228(r10)
stw r12, 232(r10)
stw r12, 236(r10)
stw r12, 240(r10)
stw r12, 244(r10)
stw r12, 248(r10)
stw r12, 252(r10)
stw r12, 256(r10)
stw r12, 260(r10)
stw r12, 264(r10)
stw r12, 268(r10)
stw r12, 272(r10)
stw r12, 276(r10)
stw r12, 280(r10)
stw r12, 284(r10)
stw r12, 288(r10)
stw r12, 292(r10)
stw r12, 296(r10)
stw r12, 300(r10)
stw r12, 304(r10)
stw r12, 308(r10)
stw r12, 312(r10)
stw r12, 316(r10)
stw r12, 320(r10)
stw r12, 324(r10)
stw r12, 328(r10)
stw r12, 332(r10)
stw r12, 336(r10)
stw r12, 340(r10)
stw r12, 344(r10)
stw r12, 348(r10)
stw r12, 352(r10)
stw r12, 356(r10)
stw r12, 360(r10)
stw r12, 364(r10)
stw r12, 368(r10)
stw r12, 372(r10)
stw r12, 376(r10)
stw r12, 380(r10)
stw r12, 384(r10)
stw r12, 388(r10)
stw r12, 392(r10)
stw r12, 396(r10)
stw r12, 400(r10)
stw r12, 404(r10)
stw r12, 408(r10)
stw r12, 412(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r12, 8(r10)
stw r12, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r12, 72(r10)
stw r12, 76(r10)
stw r11, 80(r10)
stw r11, 84(r10)
stw r11, 88(r10)
stw r12, 92(r10)
stw r12, 96(r10)
stw r12, 100(r10)
stw r12, 104(r10)
stw r12, 108(r10)
stw r12, 112(r10)
stw r12, 116(r10)
stw r12, 120(r10)
stw r12, 124(r10)
stw r12, 128(r10)
stw r12, 132(r10)
stw r12, 136(r10)
stw r12, 140(r10)
stw r12, 144(r10)
stw r12, 148(r10)
stw r12, 152(r10)
stw r12, 156(r10)
stw r12, 160(r10)
stw r12, 164(r10)
stw r12, 168(r10)
stw r12, 172(r10)
stw r12, 176(r10)
stw r12, 180(r10)
stw r12, 184(r10)
stw r12, 188(r10)
stw r12, 192(r10)
stw r12, 196(r10)
stw r12, 200(r10)
stw r12, 204(r10)
stw r12, 208(r10)
stw r12, 212(r10)
stw r12, 216(r10)
stw r12, 220(r10)
stw r12, 224(r10)
stw r12, 228(r10)
stw r12, 232(r10)
stw r12, 236(r10)
stw r12, 240(r10)
stw r12, 244(r10)
stw r12, 248(r10)
stw r12, 252(r10)
stw r12, 256(r10)
stw r12, 260(r10)
stw r12, 264(r10)
stw r12, 268(r10)
stw r12, 272(r10)
stw r12, 276(r10)
stw r12, 280(r10)
stw r12, 284(r10)
stw r12, 288(r10)
stw r12, 292(r10)
stw r12, 296(r10)
stw r11, 300(r10)
stw r11, 304(r10)
stw r11, 308(r10)
stw r12, 312(r10)
stw r12, 316(r10)
stw r12, 320(r10)
stw r12, 324(r10)
stw r12, 328(r10)
stw r12, 332(r10)
stw r12, 336(r10)
stw r12, 340(r10)
stw r12, 344(r10)
stw r12, 348(r10)
stw r12, 352(r10)
stw r12, 356(r10)
stw r12, 360(r10)
stw r12, 364(r10)
stw r12, 368(r10)
stw r12, 372(r10)
stw r12, 376(r10)
stw r12, 380(r10)
stw r12, 384(r10)
stw r12, 388(r10)
stw r12, 392(r10)
stw r12, 396(r10)
stw r12, 400(r10)
stw r12, 404(r10)
stw r12, 408(r10)
stw r12, 412(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r12, 8(r10)
stw r12, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r12, 72(r10)
stw r12, 76(r10)
stw r12, 80(r10)
stw r11, 84(r10)
stw r11, 88(r10)
stw r12, 92(r10)
stw r12, 96(r10)
stw r12, 100(r10)
stw r12, 104(r10)
stw r12, 108(r10)
stw r12, 112(r10)
stw r12, 116(r10)
stw r12, 120(r10)
stw r12, 124(r10)
stw r12, 128(r10)
stw r12, 132(r10)
stw r12, 136(r10)
stw r12, 140(r10)
stw r12, 144(r10)
stw r12, 148(r10)
stw r12, 152(r10)
stw r12, 156(r10)
stw r12, 160(r10)
stw r12, 164(r10)
stw r12, 168(r10)
stw r12, 172(r10)
stw r12, 176(r10)
stw r12, 180(r10)
stw r12, 184(r10)
stw r12, 188(r10)
stw r12, 192(r10)
stw r12, 196(r10)
stw r12, 200(r10)
stw r12, 204(r10)
stw r12, 208(r10)
stw r12, 212(r10)
stw r12, 216(r10)
stw r12, 220(r10)
stw r12, 224(r10)
stw r12, 228(r10)
stw r12, 232(r10)
stw r12, 236(r10)
stw r12, 240(r10)
stw r12, 244(r10)
stw r12, 248(r10)
stw r12, 252(r10)
stw r12, 256(r10)
stw r12, 260(r10)
stw r12, 264(r10)
stw r12, 268(r10)
stw r12, 272(r10)
stw r12, 276(r10)
stw r12, 280(r10)
stw r12, 284(r10)
stw r12, 288(r10)
stw r12, 292(r10)
stw r12, 296(r10)
stw r12, 300(r10)
stw r11, 304(r10)
stw r11, 308(r10)
stw r12, 312(r10)
stw r12, 316(r10)
stw r12, 320(r10)
stw r12, 324(r10)
stw r12, 328(r10)
stw r12, 332(r10)
stw r12, 336(r10)
stw r12, 340(r10)
stw r12, 344(r10)
stw r12, 348(r10)
stw r12, 352(r10)
stw r12, 356(r10)
stw r12, 360(r10)
stw r12, 364(r10)
stw r12, 368(r10)
stw r12, 372(r10)
stw r12, 376(r10)
stw r12, 380(r10)
stw r12, 384(r10)
stw r12, 388(r10)
stw r12, 392(r10)
stw r12, 396(r10)
stw r12, 400(r10)
stw r12, 404(r10)
stw r12, 408(r10)
stw r12, 412(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r12, 8(r10)
stw r12, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r12, 72(r10)
stw r12, 76(r10)
stw r12, 80(r10)
stw r11, 84(r10)
stw r11, 88(r10)
stw r12, 92(r10)
stw r12, 96(r10)
stw r12, 100(r10)
stw r12, 104(r10)
stw r12, 108(r10)
stw r12, 112(r10)
stw r12, 116(r10)
stw r12, 120(r10)
stw r12, 124(r10)
stw r12, 128(r10)
stw r12, 132(r10)
stw r12, 136(r10)
stw r12, 140(r10)
stw r12, 144(r10)
stw r12, 148(r10)
stw r12, 152(r10)
stw r12, 156(r10)
stw r12, 160(r10)
stw r12, 164(r10)
stw r12, 168(r10)
stw r12, 172(r10)
stw r12, 176(r10)
stw r12, 180(r10)
stw r12, 184(r10)
stw r12, 188(r10)
stw r12, 192(r10)
stw r12, 196(r10)
stw r12, 200(r10)
stw r12, 204(r10)
stw r12, 208(r10)
stw r12, 212(r10)
stw r12, 216(r10)
stw r12, 220(r10)
stw r12, 224(r10)
stw r12, 228(r10)
stw r12, 232(r10)
stw r12, 236(r10)
stw r12, 240(r10)
stw r12, 244(r10)
stw r12, 248(r10)
stw r12, 252(r10)
stw r12, 256(r10)
stw r12, 260(r10)
stw r12, 264(r10)
stw r12, 268(r10)
stw r12, 272(r10)
stw r12, 276(r10)
stw r12, 280(r10)
stw r12, 284(r10)
stw r12, 288(r10)
stw r12, 292(r10)
stw r12, 296(r10)
stw r12, 300(r10)
stw r11, 304(r10)
stw r11, 308(r10)
stw r12, 312(r10)
stw r12, 316(r10)
stw r12, 320(r10)
stw r12, 324(r10)
stw r12, 328(r10)
stw r12, 332(r10)
stw r12, 336(r10)
stw r12, 340(r10)
stw r12, 344(r10)
stw r12, 348(r10)
stw r12, 352(r10)
stw r12, 356(r10)
stw r12, 360(r10)
stw r12, 364(r10)
stw r12, 368(r10)
stw r12, 372(r10)
stw r12, 376(r10)
stw r12, 380(r10)
stw r12, 384(r10)
stw r12, 388(r10)
stw r12, 392(r10)
stw r12, 396(r10)
stw r12, 400(r10)
stw r12, 404(r10)
stw r12, 408(r10)
stw r12, 412(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r11, 8(r10)
stw r11, 12(r10)
stw r11, 16(r10)
stw r11, 20(r10)
stw r11, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r11, 36(r10)
stw r11, 40(r10)
stw r12, 44(r10)
stw r11, 48(r10)
stw r11, 52(r10)
stw r11, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r12, 72(r10)
stw r11, 76(r10)
stw r11, 80(r10)
stw r11, 84(r10)
stw r11, 88(r10)
stw r12, 92(r10)
stw r12, 96(r10)
stw r12, 100(r10)
stw r12, 104(r10)
stw r12, 108(r10)
stw r12, 112(r10)
stw r12, 116(r10)
stw r12, 120(r10)
stw r12, 124(r10)
stw r12, 128(r10)
stw r12, 132(r10)
stw r11, 136(r10)
stw r11, 140(r10)
stw r11, 144(r10)
stw r11, 148(r10)
stw r11, 152(r10)
stw r12, 156(r10)
stw r12, 160(r10)
stw r12, 164(r10)
stw r11, 168(r10)
stw r11, 172(r10)
stw r11, 176(r10)
stw r11, 180(r10)
stw r11, 184(r10)
stw r12, 188(r10)
stw r12, 192(r10)
stw r11, 196(r10)
stw r11, 200(r10)
stw r12, 204(r10)
stw r11, 208(r10)
stw r11, 212(r10)
stw r11, 216(r10)
stw r12, 220(r10)
stw r12, 224(r10)
stw r11, 228(r10)
stw r11, 232(r10)
stw r12, 236(r10)
stw r12, 240(r10)
stw r12, 244(r10)
stw r11, 248(r10)
stw r11, 252(r10)
stw r12, 256(r10)
stw r12, 260(r10)
stw r12, 264(r10)
stw r12, 268(r10)
stw r12, 272(r10)
stw r12, 276(r10)
stw r12, 280(r10)
stw r12, 284(r10)
stw r12, 288(r10)
stw r12, 292(r10)
stw r12, 296(r10)
stw r12, 300(r10)
stw r11, 304(r10)
stw r11, 308(r10)
stw r12, 312(r10)
stw r12, 316(r10)
stw r12, 320(r10)
stw r12, 324(r10)
stw r11, 328(r10)
stw r11, 332(r10)
stw r11, 336(r10)
stw r11, 340(r10)
stw r11, 344(r10)
stw r12, 348(r10)
stw r12, 352(r10)
stw r12, 356(r10)
stw r11, 360(r10)
stw r11, 364(r10)
stw r11, 368(r10)
stw r11, 372(r10)
stw r11, 376(r10)
stw r12, 380(r10)
stw r12, 384(r10)
stw r11, 388(r10)
stw r11, 392(r10)
stw r12, 396(r10)
stw r11, 400(r10)
stw r11, 404(r10)
stw r11, 408(r10)
stw r12, 412(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r11, 4(r10)
stw r11, 8(r10)
stw r12, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r11, 24(r10)
stw r11, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r11, 40(r10)
stw r11, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r11, 56(r10)
stw r11, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r11, 72(r10)
stw r11, 76(r10)
stw r12, 80(r10)
stw r11, 84(r10)
stw r11, 88(r10)
stw r12, 92(r10)
stw r12, 96(r10)
stw r12, 100(r10)
stw r12, 104(r10)
stw r12, 108(r10)
stw r12, 112(r10)
stw r12, 116(r10)
stw r12, 120(r10)
stw r12, 124(r10)
stw r12, 128(r10)
stw r11, 132(r10)
stw r11, 136(r10)
stw r12, 140(r10)
stw r12, 144(r10)
stw r12, 148(r10)
stw r11, 152(r10)
stw r11, 156(r10)
stw r12, 160(r10)
stw r11, 164(r10)
stw r11, 168(r10)
stw r12, 172(r10)
stw r12, 176(r10)
stw r12, 180(r10)
stw r11, 184(r10)
stw r11, 188(r10)
stw r12, 192(r10)
stw r12, 196(r10)
stw r11, 200(r10)
stw r11, 204(r10)
stw r12, 208(r10)
stw r12, 212(r10)
stw r11, 216(r10)
stw r11, 220(r10)
stw r12, 224(r10)
stw r11, 228(r10)
stw r11, 232(r10)
stw r12, 236(r10)
stw r12, 240(r10)
stw r12, 244(r10)
stw r11, 248(r10)
stw r11, 252(r10)
stw r12, 256(r10)
stw r12, 260(r10)
stw r12, 264(r10)
stw r12, 268(r10)
stw r12, 272(r10)
stw r12, 276(r10)
stw r12, 280(r10)
stw r12, 284(r10)
stw r12, 288(r10)
stw r12, 292(r10)
stw r12, 296(r10)
stw r12, 300(r10)
stw r11, 304(r10)
stw r11, 308(r10)
stw r12, 312(r10)
stw r12, 316(r10)
stw r12, 320(r10)
stw r11, 324(r10)
stw r11, 328(r10)
stw r12, 332(r10)
stw r12, 336(r10)
stw r12, 340(r10)
stw r11, 344(r10)
stw r11, 348(r10)
stw r12, 352(r10)
stw r11, 356(r10)
stw r11, 360(r10)
stw r12, 364(r10)
stw r12, 368(r10)
stw r12, 372(r10)
stw r11, 376(r10)
stw r11, 380(r10)
stw r12, 384(r10)
stw r12, 388(r10)
stw r11, 392(r10)
stw r11, 396(r10)
stw r12, 400(r10)
stw r12, 404(r10)
stw r11, 408(r10)
stw r11, 412(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r11, 4(r10)
stw r11, 8(r10)
stw r11, 12(r10)
stw r11, 16(r10)
stw r11, 20(r10)
stw r11, 24(r10)
stw r11, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r11, 40(r10)
stw r11, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r11, 56(r10)
stw r11, 60(r10)
stw r12, 64(r10)
stw r11, 68(r10)
stw r11, 72(r10)
stw r12, 76(r10)
stw r12, 80(r10)
stw r11, 84(r10)
stw r11, 88(r10)
stw r12, 92(r10)
stw r12, 96(r10)
stw r12, 100(r10)
stw r12, 104(r10)
stw r12, 108(r10)
stw r12, 112(r10)
stw r12, 116(r10)
stw r12, 120(r10)
stw r12, 124(r10)
stw r12, 128(r10)
stw r11, 132(r10)
stw r11, 136(r10)
stw r12, 140(r10)
stw r12, 144(r10)
stw r12, 148(r10)
stw r12, 152(r10)
stw r12, 156(r10)
stw r12, 160(r10)
stw r11, 164(r10)
stw r11, 168(r10)
stw r12, 172(r10)
stw r12, 176(r10)
stw r12, 180(r10)
stw r11, 184(r10)
stw r11, 188(r10)
stw r12, 192(r10)
stw r12, 196(r10)
stw r11, 200(r10)
stw r11, 204(r10)
stw r12, 208(r10)
stw r12, 212(r10)
stw r11, 216(r10)
stw r11, 220(r10)
stw r12, 224(r10)
stw r11, 228(r10)
stw r11, 232(r10)
stw r12, 236(r10)
stw r12, 240(r10)
stw r12, 244(r10)
stw r11, 248(r10)
stw r11, 252(r10)
stw r12, 256(r10)
stw r12, 260(r10)
stw r12, 264(r10)
stw r12, 268(r10)
stw r12, 272(r10)
stw r12, 276(r10)
stw r12, 280(r10)
stw r12, 284(r10)
stw r12, 288(r10)
stw r12, 292(r10)
stw r12, 296(r10)
stw r12, 300(r10)
stw r11, 304(r10)
stw r11, 308(r10)
stw r12, 312(r10)
stw r12, 316(r10)
stw r12, 320(r10)
stw r11, 324(r10)
stw r11, 328(r10)
stw r12, 332(r10)
stw r12, 336(r10)
stw r12, 340(r10)
stw r11, 344(r10)
stw r11, 348(r10)
stw r12, 352(r10)
stw r11, 356(r10)
stw r11, 360(r10)
stw r12, 364(r10)
stw r12, 368(r10)
stw r12, 372(r10)
stw r11, 376(r10)
stw r11, 380(r10)
stw r12, 384(r10)
stw r12, 388(r10)
stw r11, 392(r10)
stw r11, 396(r10)
stw r12, 400(r10)
stw r12, 404(r10)
stw r11, 408(r10)
stw r11, 412(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r11, 4(r10)
stw r11, 8(r10)
stw r12, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r11, 40(r10)
stw r11, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r11, 56(r10)
stw r11, 60(r10)
stw r12, 64(r10)
stw r11, 68(r10)
stw r11, 72(r10)
stw r12, 76(r10)
stw r12, 80(r10)
stw r11, 84(r10)
stw r11, 88(r10)
stw r12, 92(r10)
stw r12, 96(r10)
stw r12, 100(r10)
stw r12, 104(r10)
stw r12, 108(r10)
stw r12, 112(r10)
stw r12, 116(r10)
stw r12, 120(r10)
stw r12, 124(r10)
stw r12, 128(r10)
stw r11, 132(r10)
stw r11, 136(r10)
stw r12, 140(r10)
stw r12, 144(r10)
stw r12, 148(r10)
stw r12, 152(r10)
stw r12, 156(r10)
stw r12, 160(r10)
stw r11, 164(r10)
stw r11, 168(r10)
stw r12, 172(r10)
stw r12, 176(r10)
stw r12, 180(r10)
stw r11, 184(r10)
stw r11, 188(r10)
stw r12, 192(r10)
stw r12, 196(r10)
stw r11, 200(r10)
stw r11, 204(r10)
stw r12, 208(r10)
stw r12, 212(r10)
stw r11, 216(r10)
stw r11, 220(r10)
stw r12, 224(r10)
stw r11, 228(r10)
stw r11, 232(r10)
stw r12, 236(r10)
stw r12, 240(r10)
stw r12, 244(r10)
stw r11, 248(r10)
stw r11, 252(r10)
stw r12, 256(r10)
stw r12, 260(r10)
stw r12, 264(r10)
stw r12, 268(r10)
stw r12, 272(r10)
stw r12, 276(r10)
stw r12, 280(r10)
stw r12, 284(r10)
stw r12, 288(r10)
stw r12, 292(r10)
stw r12, 296(r10)
stw r12, 300(r10)
stw r11, 304(r10)
stw r11, 308(r10)
stw r12, 312(r10)
stw r12, 316(r10)
stw r12, 320(r10)
stw r11, 324(r10)
stw r11, 328(r10)
stw r12, 332(r10)
stw r12, 336(r10)
stw r12, 340(r10)
stw r11, 344(r10)
stw r11, 348(r10)
stw r12, 352(r10)
stw r11, 356(r10)
stw r11, 360(r10)
stw r12, 364(r10)
stw r12, 368(r10)
stw r12, 372(r10)
stw r11, 376(r10)
stw r11, 380(r10)
stw r12, 384(r10)
stw r12, 388(r10)
stw r11, 392(r10)
stw r11, 396(r10)
stw r12, 400(r10)
stw r12, 404(r10)
stw r11, 408(r10)
stw r11, 412(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r11, 4(r10)
stw r11, 8(r10)
stw r12, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r11, 40(r10)
stw r11, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r11, 56(r10)
stw r11, 60(r10)
stw r12, 64(r10)
stw r11, 68(r10)
stw r11, 72(r10)
stw r12, 76(r10)
stw r12, 80(r10)
stw r11, 84(r10)
stw r11, 88(r10)
stw r12, 92(r10)
stw r12, 96(r10)
stw r12, 100(r10)
stw r12, 104(r10)
stw r12, 108(r10)
stw r12, 112(r10)
stw r12, 116(r10)
stw r12, 120(r10)
stw r12, 124(r10)
stw r12, 128(r10)
stw r11, 132(r10)
stw r11, 136(r10)
stw r12, 140(r10)
stw r12, 144(r10)
stw r12, 148(r10)
stw r12, 152(r10)
stw r12, 156(r10)
stw r12, 160(r10)
stw r11, 164(r10)
stw r11, 168(r10)
stw r12, 172(r10)
stw r12, 176(r10)
stw r12, 180(r10)
stw r11, 184(r10)
stw r11, 188(r10)
stw r12, 192(r10)
stw r12, 196(r10)
stw r11, 200(r10)
stw r11, 204(r10)
stw r12, 208(r10)
stw r12, 212(r10)
stw r11, 216(r10)
stw r11, 220(r10)
stw r12, 224(r10)
stw r11, 228(r10)
stw r11, 232(r10)
stw r12, 236(r10)
stw r12, 240(r10)
stw r12, 244(r10)
stw r11, 248(r10)
stw r11, 252(r10)
stw r12, 256(r10)
stw r12, 260(r10)
stw r12, 264(r10)
stw r12, 268(r10)
stw r12, 272(r10)
stw r12, 276(r10)
stw r12, 280(r10)
stw r12, 284(r10)
stw r12, 288(r10)
stw r12, 292(r10)
stw r12, 296(r10)
stw r12, 300(r10)
stw r11, 304(r10)
stw r11, 308(r10)
stw r12, 312(r10)
stw r12, 316(r10)
stw r12, 320(r10)
stw r11, 324(r10)
stw r11, 328(r10)
stw r12, 332(r10)
stw r12, 336(r10)
stw r12, 340(r10)
stw r11, 344(r10)
stw r11, 348(r10)
stw r12, 352(r10)
stw r11, 356(r10)
stw r11, 360(r10)
stw r12, 364(r10)
stw r12, 368(r10)
stw r12, 372(r10)
stw r11, 376(r10)
stw r11, 380(r10)
stw r12, 384(r10)
stw r12, 388(r10)
stw r11, 392(r10)
stw r11, 396(r10)
stw r12, 400(r10)
stw r12, 404(r10)
stw r11, 408(r10)
stw r11, 412(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r11, 4(r10)
stw r11, 8(r10)
stw r12, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r11, 24(r10)
stw r11, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r11, 40(r10)
stw r11, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r11, 56(r10)
stw r11, 60(r10)
stw r12, 64(r10)
stw r11, 68(r10)
stw r11, 72(r10)
stw r12, 76(r10)
stw r12, 80(r10)
stw r11, 84(r10)
stw r11, 88(r10)
stw r12, 92(r10)
stw r12, 96(r10)
stw r12, 100(r10)
stw r12, 104(r10)
stw r12, 108(r10)
stw r12, 112(r10)
stw r12, 116(r10)
stw r12, 120(r10)
stw r12, 124(r10)
stw r12, 128(r10)
stw r11, 132(r10)
stw r11, 136(r10)
stw r12, 140(r10)
stw r12, 144(r10)
stw r12, 148(r10)
stw r11, 152(r10)
stw r11, 156(r10)
stw r12, 160(r10)
stw r11, 164(r10)
stw r11, 168(r10)
stw r12, 172(r10)
stw r12, 176(r10)
stw r12, 180(r10)
stw r11, 184(r10)
stw r11, 188(r10)
stw r12, 192(r10)
stw r12, 196(r10)
stw r11, 200(r10)
stw r11, 204(r10)
stw r12, 208(r10)
stw r12, 212(r10)
stw r11, 216(r10)
stw r11, 220(r10)
stw r12, 224(r10)
stw r11, 228(r10)
stw r11, 232(r10)
stw r12, 236(r10)
stw r12, 240(r10)
stw r12, 244(r10)
stw r11, 248(r10)
stw r11, 252(r10)
stw r12, 256(r10)
stw r12, 260(r10)
stw r12, 264(r10)
stw r12, 268(r10)
stw r12, 272(r10)
stw r12, 276(r10)
stw r12, 280(r10)
stw r12, 284(r10)
stw r12, 288(r10)
stw r12, 292(r10)
stw r12, 296(r10)
stw r12, 300(r10)
stw r11, 304(r10)
stw r11, 308(r10)
stw r12, 312(r10)
stw r12, 316(r10)
stw r12, 320(r10)
stw r11, 324(r10)
stw r11, 328(r10)
stw r12, 332(r10)
stw r12, 336(r10)
stw r12, 340(r10)
stw r11, 344(r10)
stw r11, 348(r10)
stw r12, 352(r10)
stw r11, 356(r10)
stw r11, 360(r10)
stw r12, 364(r10)
stw r12, 368(r10)
stw r12, 372(r10)
stw r11, 376(r10)
stw r11, 380(r10)
stw r12, 384(r10)
stw r12, 388(r10)
stw r11, 392(r10)
stw r11, 396(r10)
stw r12, 400(r10)
stw r12, 404(r10)
stw r11, 408(r10)
stw r11, 412(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r11, 8(r10)
stw r11, 12(r10)
stw r11, 16(r10)
stw r11, 20(r10)
stw r11, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r11, 40(r10)
stw r11, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r11, 56(r10)
stw r11, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r11, 72(r10)
stw r11, 76(r10)
stw r11, 80(r10)
stw r12, 84(r10)
stw r11, 88(r10)
stw r11, 92(r10)
stw r12, 96(r10)
stw r12, 100(r10)
stw r12, 104(r10)
stw r12, 108(r10)
stw r12, 112(r10)
stw r12, 116(r10)
stw r12, 120(r10)
stw r12, 124(r10)
stw r12, 128(r10)
stw r12, 132(r10)
stw r11, 136(r10)
stw r11, 140(r10)
stw r11, 144(r10)
stw r11, 148(r10)
stw r11, 152(r10)
stw r12, 156(r10)
stw r12, 160(r10)
stw r12, 164(r10)
stw r11, 168(r10)
stw r11, 172(r10)
stw r11, 176(r10)
stw r11, 180(r10)
stw r11, 184(r10)
stw r12, 188(r10)
stw r12, 192(r10)
stw r12, 196(r10)
stw r11, 200(r10)
stw r11, 204(r10)
stw r11, 208(r10)
stw r11, 212(r10)
stw r11, 216(r10)
stw r12, 220(r10)
stw r12, 224(r10)
stw r12, 228(r10)
stw r11, 232(r10)
stw r11, 236(r10)
stw r11, 240(r10)
stw r11, 244(r10)
stw r11, 248(r10)
stw r11, 252(r10)
stw r12, 256(r10)
stw r12, 260(r10)
stw r12, 264(r10)
stw r12, 268(r10)
stw r12, 272(r10)
stw r12, 276(r10)
stw r12, 280(r10)
stw r12, 284(r10)
stw r12, 288(r10)
stw r12, 292(r10)
stw r12, 296(r10)
stw r11, 300(r10)
stw r11, 304(r10)
stw r11, 308(r10)
stw r11, 312(r10)
stw r12, 316(r10)
stw r12, 320(r10)
stw r12, 324(r10)
stw r11, 328(r10)
stw r11, 332(r10)
stw r11, 336(r10)
stw r11, 340(r10)
stw r11, 344(r10)
stw r12, 348(r10)
stw r12, 352(r10)
stw r12, 356(r10)
stw r11, 360(r10)
stw r11, 364(r10)
stw r11, 368(r10)
stw r11, 372(r10)
stw r11, 376(r10)
stw r12, 380(r10)
stw r12, 384(r10)
stw r12, 388(r10)
stw r11, 392(r10)
stw r11, 396(r10)
stw r11, 400(r10)
stw r11, 404(r10)
stw r11, 408(r10)
stw r12, 412(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r12, 8(r10)
stw r12, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r12, 72(r10)
stw r12, 76(r10)
stw r12, 80(r10)
stw r12, 84(r10)
stw r12, 88(r10)
stw r12, 92(r10)
stw r12, 96(r10)
stw r12, 100(r10)
stw r12, 104(r10)
stw r12, 108(r10)
stw r12, 112(r10)
stw r12, 116(r10)
stw r12, 120(r10)
stw r12, 124(r10)
stw r12, 128(r10)
stw r12, 132(r10)
stw r12, 136(r10)
stw r12, 140(r10)
stw r12, 144(r10)
stw r12, 148(r10)
stw r12, 152(r10)
stw r12, 156(r10)
stw r12, 160(r10)
stw r12, 164(r10)
stw r12, 168(r10)
stw r12, 172(r10)
stw r12, 176(r10)
stw r12, 180(r10)
stw r12, 184(r10)
stw r12, 188(r10)
stw r12, 192(r10)
stw r12, 196(r10)
stw r11, 200(r10)
stw r11, 204(r10)
stw r12, 208(r10)
stw r12, 212(r10)
stw r12, 216(r10)
stw r12, 220(r10)
stw r12, 224(r10)
stw r12, 228(r10)
stw r12, 232(r10)
stw r12, 236(r10)
stw r12, 240(r10)
stw r12, 244(r10)
stw r11, 248(r10)
stw r11, 252(r10)
stw r12, 256(r10)
stw r12, 260(r10)
stw r12, 264(r10)
stw r12, 268(r10)
stw r12, 272(r10)
stw r12, 276(r10)
stw r12, 280(r10)
stw r12, 284(r10)
stw r12, 288(r10)
stw r12, 292(r10)
stw r12, 296(r10)
stw r12, 300(r10)
stw r12, 304(r10)
stw r12, 308(r10)
stw r12, 312(r10)
stw r12, 316(r10)
stw r12, 320(r10)
stw r12, 324(r10)
stw r12, 328(r10)
stw r12, 332(r10)
stw r12, 336(r10)
stw r12, 340(r10)
stw r12, 344(r10)
stw r12, 348(r10)
stw r12, 352(r10)
stw r12, 356(r10)
stw r12, 360(r10)
stw r12, 364(r10)
stw r12, 368(r10)
stw r12, 372(r10)
stw r12, 376(r10)
stw r12, 380(r10)
stw r12, 384(r10)
stw r12, 388(r10)
stw r11, 392(r10)
stw r11, 396(r10)
stw r12, 400(r10)
stw r12, 404(r10)
stw r12, 408(r10)
stw r12, 412(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r12, 8(r10)
stw r12, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r12, 72(r10)
stw r12, 76(r10)
stw r12, 80(r10)
stw r12, 84(r10)
stw r12, 88(r10)
stw r12, 92(r10)
stw r12, 96(r10)
stw r11, 100(r10)
stw r11, 104(r10)
stw r11, 108(r10)
stw r11, 112(r10)
stw r11, 116(r10)
stw r11, 120(r10)
stw r11, 124(r10)
stw r12, 128(r10)
stw r12, 132(r10)
stw r12, 136(r10)
stw r12, 140(r10)
stw r12, 144(r10)
stw r12, 148(r10)
stw r12, 152(r10)
stw r12, 156(r10)
stw r12, 160(r10)
stw r12, 164(r10)
stw r12, 168(r10)
stw r12, 172(r10)
stw r12, 176(r10)
stw r12, 180(r10)
stw r12, 184(r10)
stw r12, 188(r10)
stw r12, 192(r10)
stw r12, 196(r10)
stw r11, 200(r10)
stw r11, 204(r10)
stw r12, 208(r10)
stw r12, 212(r10)
stw r12, 216(r10)
stw r12, 220(r10)
stw r12, 224(r10)
stw r12, 228(r10)
stw r12, 232(r10)
stw r12, 236(r10)
stw r12, 240(r10)
stw r11, 244(r10)
stw r11, 248(r10)
stw r12, 252(r10)
stw r12, 256(r10)
stw r11, 260(r10)
stw r11, 264(r10)
stw r11, 268(r10)
stw r11, 272(r10)
stw r11, 276(r10)
stw r11, 280(r10)
stw r11, 284(r10)
stw r12, 288(r10)
stw r12, 292(r10)
stw r12, 296(r10)
stw r12, 300(r10)
stw r12, 304(r10)
stw r12, 308(r10)
stw r12, 312(r10)
stw r12, 316(r10)
stw r12, 320(r10)
stw r12, 324(r10)
stw r12, 328(r10)
stw r12, 332(r10)
stw r12, 336(r10)
stw r12, 340(r10)
stw r12, 344(r10)
stw r12, 348(r10)
stw r12, 352(r10)
stw r12, 356(r10)
stw r12, 360(r10)
stw r12, 364(r10)
stw r12, 368(r10)
stw r12, 372(r10)
stw r12, 376(r10)
stw r12, 380(r10)
stw r12, 384(r10)
stw r12, 388(r10)
stw r11, 392(r10)
stw r11, 396(r10)
stw r12, 400(r10)
stw r12, 404(r10)
stw r12, 408(r10)
stw r12, 412(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r12, 8(r10)
stw r12, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r12, 72(r10)
stw r12, 76(r10)
stw r12, 80(r10)
stw r12, 84(r10)
stw r12, 88(r10)
stw r12, 92(r10)
stw r12, 96(r10)
stw r12, 100(r10)
stw r12, 104(r10)
stw r12, 108(r10)
stw r12, 112(r10)
stw r12, 116(r10)
stw r12, 120(r10)
stw r12, 124(r10)
stw r12, 128(r10)
stw r12, 132(r10)
stw r12, 136(r10)
stw r12, 140(r10)
stw r12, 144(r10)
stw r12, 148(r10)
stw r12, 152(r10)
stw r12, 156(r10)
stw r12, 160(r10)
stw r12, 164(r10)
stw r12, 168(r10)
stw r12, 172(r10)
stw r12, 176(r10)
stw r12, 180(r10)
stw r12, 184(r10)
stw r12, 188(r10)
stw r12, 192(r10)
stw r11, 196(r10)
stw r11, 200(r10)
stw r11, 204(r10)
stw r11, 208(r10)
stw r12, 212(r10)
stw r12, 216(r10)
stw r12, 220(r10)
stw r12, 224(r10)
stw r11, 228(r10)
stw r11, 232(r10)
stw r11, 236(r10)
stw r11, 240(r10)
stw r11, 244(r10)
stw r12, 248(r10)
stw r12, 252(r10)
stw r12, 256(r10)
stw r12, 260(r10)
stw r12, 264(r10)
stw r12, 268(r10)
stw r12, 272(r10)
stw r12, 276(r10)
stw r12, 280(r10)
stw r12, 284(r10)
stw r12, 288(r10)
stw r12, 292(r10)
stw r12, 296(r10)
stw r12, 300(r10)
stw r12, 304(r10)
stw r12, 308(r10)
stw r12, 312(r10)
stw r12, 316(r10)
stw r12, 320(r10)
stw r12, 324(r10)
stw r12, 328(r10)
stw r12, 332(r10)
stw r12, 336(r10)
stw r12, 340(r10)
stw r12, 344(r10)
stw r12, 348(r10)
stw r12, 352(r10)
stw r12, 356(r10)
stw r12, 360(r10)
stw r12, 364(r10)
stw r12, 368(r10)
stw r12, 372(r10)
stw r12, 376(r10)
stw r12, 380(r10)
stw r12, 384(r10)
stw r11, 388(r10)
stw r11, 392(r10)
stw r11, 396(r10)
stw r11, 400(r10)
stw r12, 404(r10)
stw r12, 408(r10)
stw r12, 412(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r12, 8(r10)
stw r12, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r12, 72(r10)
stw r12, 76(r10)
stw r12, 80(r10)
stw r12, 84(r10)
stw r12, 88(r10)
stw r12, 92(r10)
stw r12, 96(r10)
stw r12, 100(r10)
stw r12, 104(r10)
stw r12, 108(r10)
stw r12, 112(r10)
stw r12, 116(r10)
stw r12, 120(r10)
stw r12, 124(r10)
stw r12, 128(r10)
stw r12, 132(r10)
stw r12, 136(r10)
stw r12, 140(r10)
stw r12, 144(r10)
stw r12, 148(r10)
stw r12, 152(r10)
stw r12, 156(r10)
stw r12, 160(r10)
stw r12, 164(r10)
stw r12, 168(r10)
stw r12, 172(r10)
stw r12, 176(r10)
stw r12, 180(r10)
stw r12, 184(r10)
stw r12, 188(r10)
stw r12, 192(r10)
stw r12, 196(r10)
stw r12, 200(r10)
stw r12, 204(r10)
stw r12, 208(r10)
stw r12, 212(r10)
stw r12, 216(r10)
stw r12, 220(r10)
stw r12, 224(r10)
stw r12, 228(r10)
stw r12, 232(r10)
stw r12, 236(r10)
stw r12, 240(r10)
stw r12, 244(r10)
stw r12, 248(r10)
stw r12, 252(r10)
stw r12, 256(r10)
stw r12, 260(r10)
stw r12, 264(r10)
stw r12, 268(r10)
stw r12, 272(r10)
stw r12, 276(r10)
stw r12, 280(r10)
stw r12, 284(r10)
stw r12, 288(r10)
stw r12, 292(r10)
stw r12, 296(r10)
stw r12, 300(r10)
stw r12, 304(r10)
stw r12, 308(r10)
stw r12, 312(r10)
stw r12, 316(r10)
stw r12, 320(r10)
stw r12, 324(r10)
stw r12, 328(r10)
stw r12, 332(r10)
stw r12, 336(r10)
stw r12, 340(r10)
stw r12, 344(r10)
stw r12, 348(r10)
stw r12, 352(r10)
stw r12, 356(r10)
stw r12, 360(r10)
stw r12, 364(r10)
stw r12, 368(r10)
stw r12, 372(r10)
stw r12, 376(r10)
stw r12, 380(r10)
stw r12, 384(r10)
stw r12, 388(r10)
stw r12, 392(r10)
stw r12, 396(r10)
stw r12, 400(r10)
stw r12, 404(r10)
stw r12, 408(r10)
stw r12, 412(r10)
#endif
.endm
 
.macro DEBUG_segments
#ifdef CONFIG_DEBUG
stw r12, 0(r10)
stw r12, 4(r10)
stw r12, 8(r10)
stw r12, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r12, 72(r10)
stw r12, 76(r10)
stw r12, 80(r10)
stw r12, 84(r10)
stw r12, 88(r10)
stw r12, 92(r10)
stw r12, 96(r10)
stw r12, 100(r10)
stw r12, 104(r10)
stw r12, 108(r10)
stw r12, 112(r10)
stw r12, 116(r10)
stw r12, 120(r10)
stw r12, 124(r10)
stw r12, 128(r10)
stw r12, 132(r10)
stw r12, 136(r10)
stw r12, 140(r10)
stw r12, 144(r10)
stw r12, 148(r10)
stw r12, 152(r10)
stw r12, 156(r10)
stw r12, 160(r10)
stw r12, 164(r10)
stw r12, 168(r10)
stw r12, 172(r10)
stw r12, 176(r10)
stw r12, 180(r10)
stw r12, 184(r10)
stw r12, 188(r10)
stw r12, 192(r10)
stw r12, 196(r10)
stw r12, 200(r10)
stw r12, 204(r10)
stw r12, 208(r10)
stw r12, 212(r10)
stw r12, 216(r10)
stw r12, 220(r10)
stw r12, 224(r10)
stw r12, 228(r10)
stw r12, 232(r10)
stw r12, 236(r10)
stw r12, 240(r10)
stw r12, 244(r10)
stw r12, 248(r10)
stw r12, 252(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r12, 8(r10)
stw r12, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r12, 72(r10)
stw r12, 76(r10)
stw r12, 80(r10)
stw r12, 84(r10)
stw r12, 88(r10)
stw r12, 92(r10)
stw r12, 96(r10)
stw r12, 100(r10)
stw r12, 104(r10)
stw r12, 108(r10)
stw r12, 112(r10)
stw r12, 116(r10)
stw r12, 120(r10)
stw r12, 124(r10)
stw r12, 128(r10)
stw r12, 132(r10)
stw r12, 136(r10)
stw r12, 140(r10)
stw r12, 144(r10)
stw r12, 148(r10)
stw r12, 152(r10)
stw r12, 156(r10)
stw r12, 160(r10)
stw r12, 164(r10)
stw r12, 168(r10)
stw r12, 172(r10)
stw r12, 176(r10)
stw r12, 180(r10)
stw r12, 184(r10)
stw r12, 188(r10)
stw r12, 192(r10)
stw r12, 196(r10)
stw r12, 200(r10)
stw r12, 204(r10)
stw r12, 208(r10)
stw r12, 212(r10)
stw r12, 216(r10)
stw r12, 220(r10)
stw r12, 224(r10)
stw r12, 228(r10)
stw r12, 232(r10)
stw r12, 236(r10)
stw r12, 240(r10)
stw r12, 244(r10)
stw r12, 248(r10)
stw r12, 252(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r12, 8(r10)
stw r12, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r12, 72(r10)
stw r12, 76(r10)
stw r12, 80(r10)
stw r12, 84(r10)
stw r12, 88(r10)
stw r12, 92(r10)
stw r12, 96(r10)
stw r12, 100(r10)
stw r12, 104(r10)
stw r12, 108(r10)
stw r12, 112(r10)
stw r12, 116(r10)
stw r12, 120(r10)
stw r12, 124(r10)
stw r12, 128(r10)
stw r12, 132(r10)
stw r12, 136(r10)
stw r12, 140(r10)
stw r12, 144(r10)
stw r12, 148(r10)
stw r12, 152(r10)
stw r12, 156(r10)
stw r12, 160(r10)
stw r12, 164(r10)
stw r12, 168(r10)
stw r12, 172(r10)
stw r12, 176(r10)
stw r12, 180(r10)
stw r12, 184(r10)
stw r12, 188(r10)
stw r12, 192(r10)
stw r12, 196(r10)
stw r12, 200(r10)
stw r12, 204(r10)
stw r11, 208(r10)
stw r12, 212(r10)
stw r12, 216(r10)
stw r12, 220(r10)
stw r12, 224(r10)
stw r12, 228(r10)
stw r12, 232(r10)
stw r12, 236(r10)
stw r12, 240(r10)
stw r12, 244(r10)
stw r12, 248(r10)
stw r12, 252(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r12, 8(r10)
stw r12, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r12, 72(r10)
stw r12, 76(r10)
stw r12, 80(r10)
stw r12, 84(r10)
stw r12, 88(r10)
stw r12, 92(r10)
stw r12, 96(r10)
stw r12, 100(r10)
stw r12, 104(r10)
stw r12, 108(r10)
stw r12, 112(r10)
stw r12, 116(r10)
stw r12, 120(r10)
stw r12, 124(r10)
stw r12, 128(r10)
stw r12, 132(r10)
stw r12, 136(r10)
stw r12, 140(r10)
stw r12, 144(r10)
stw r12, 148(r10)
stw r12, 152(r10)
stw r12, 156(r10)
stw r12, 160(r10)
stw r12, 164(r10)
stw r12, 168(r10)
stw r12, 172(r10)
stw r12, 176(r10)
stw r12, 180(r10)
stw r12, 184(r10)
stw r12, 188(r10)
stw r12, 192(r10)
stw r12, 196(r10)
stw r12, 200(r10)
stw r11, 204(r10)
stw r11, 208(r10)
stw r12, 212(r10)
stw r12, 216(r10)
stw r12, 220(r10)
stw r12, 224(r10)
stw r12, 228(r10)
stw r12, 232(r10)
stw r12, 236(r10)
stw r12, 240(r10)
stw r12, 244(r10)
stw r12, 248(r10)
stw r12, 252(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r12, 8(r10)
stw r12, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r12, 72(r10)
stw r12, 76(r10)
stw r12, 80(r10)
stw r12, 84(r10)
stw r12, 88(r10)
stw r12, 92(r10)
stw r12, 96(r10)
stw r12, 100(r10)
stw r12, 104(r10)
stw r12, 108(r10)
stw r12, 112(r10)
stw r12, 116(r10)
stw r12, 120(r10)
stw r12, 124(r10)
stw r12, 128(r10)
stw r12, 132(r10)
stw r12, 136(r10)
stw r12, 140(r10)
stw r12, 144(r10)
stw r12, 148(r10)
stw r12, 152(r10)
stw r12, 156(r10)
stw r12, 160(r10)
stw r12, 164(r10)
stw r12, 168(r10)
stw r12, 172(r10)
stw r12, 176(r10)
stw r12, 180(r10)
stw r12, 184(r10)
stw r12, 188(r10)
stw r12, 192(r10)
stw r12, 196(r10)
stw r12, 200(r10)
stw r11, 204(r10)
stw r11, 208(r10)
stw r12, 212(r10)
stw r12, 216(r10)
stw r12, 220(r10)
stw r12, 224(r10)
stw r12, 228(r10)
stw r12, 232(r10)
stw r12, 236(r10)
stw r12, 240(r10)
stw r12, 244(r10)
stw r12, 248(r10)
stw r12, 252(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r11, 8(r10)
stw r11, 12(r10)
stw r11, 16(r10)
stw r11, 20(r10)
stw r11, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r11, 40(r10)
stw r11, 44(r10)
stw r11, 48(r10)
stw r11, 52(r10)
stw r11, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r11, 72(r10)
stw r11, 76(r10)
stw r11, 80(r10)
stw r12, 84(r10)
stw r11, 88(r10)
stw r11, 92(r10)
stw r12, 96(r10)
stw r11, 100(r10)
stw r11, 104(r10)
stw r11, 108(r10)
stw r12, 112(r10)
stw r11, 116(r10)
stw r11, 120(r10)
stw r12, 124(r10)
stw r12, 128(r10)
stw r12, 132(r10)
stw r11, 136(r10)
stw r11, 140(r10)
stw r11, 144(r10)
stw r11, 148(r10)
stw r11, 152(r10)
stw r12, 156(r10)
stw r12, 160(r10)
stw r11, 164(r10)
stw r11, 168(r10)
stw r12, 172(r10)
stw r11, 176(r10)
stw r11, 180(r10)
stw r11, 184(r10)
stw r12, 188(r10)
stw r12, 192(r10)
stw r11, 196(r10)
stw r11, 200(r10)
stw r11, 204(r10)
stw r11, 208(r10)
stw r11, 212(r10)
stw r11, 216(r10)
stw r12, 220(r10)
stw r12, 224(r10)
stw r12, 228(r10)
stw r11, 232(r10)
stw r11, 236(r10)
stw r11, 240(r10)
stw r11, 244(r10)
stw r11, 248(r10)
stw r12, 252(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r11, 4(r10)
stw r11, 8(r10)
stw r12, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r11, 24(r10)
stw r11, 28(r10)
stw r12, 32(r10)
stw r11, 36(r10)
stw r11, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r11, 56(r10)
stw r11, 60(r10)
stw r12, 64(r10)
stw r11, 68(r10)
stw r11, 72(r10)
stw r12, 76(r10)
stw r12, 80(r10)
stw r11, 84(r10)
stw r11, 88(r10)
stw r12, 92(r10)
stw r12, 96(r10)
stw r11, 100(r10)
stw r11, 104(r10)
stw r11, 108(r10)
stw r11, 112(r10)
stw r11, 116(r10)
stw r11, 120(r10)
stw r11, 124(r10)
stw r12, 128(r10)
stw r11, 132(r10)
stw r11, 136(r10)
stw r12, 140(r10)
stw r12, 144(r10)
stw r12, 148(r10)
stw r11, 152(r10)
stw r11, 156(r10)
stw r12, 160(r10)
stw r12, 164(r10)
stw r11, 168(r10)
stw r11, 172(r10)
stw r12, 176(r10)
stw r12, 180(r10)
stw r11, 184(r10)
stw r11, 188(r10)
stw r12, 192(r10)
stw r12, 196(r10)
stw r12, 200(r10)
stw r11, 204(r10)
stw r11, 208(r10)
stw r12, 212(r10)
stw r12, 216(r10)
stw r12, 220(r10)
stw r12, 224(r10)
stw r11, 228(r10)
stw r11, 232(r10)
stw r12, 236(r10)
stw r12, 240(r10)
stw r12, 244(r10)
stw r11, 248(r10)
stw r11, 252(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r11, 8(r10)
stw r11, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r11, 36(r10)
stw r11, 40(r10)
stw r11, 44(r10)
stw r11, 48(r10)
stw r11, 52(r10)
stw r11, 56(r10)
stw r11, 60(r10)
stw r12, 64(r10)
stw r11, 68(r10)
stw r11, 72(r10)
stw r12, 76(r10)
stw r12, 80(r10)
stw r11, 84(r10)
stw r11, 88(r10)
stw r12, 92(r10)
stw r12, 96(r10)
stw r11, 100(r10)
stw r11, 104(r10)
stw r12, 108(r10)
stw r11, 112(r10)
stw r12, 116(r10)
stw r11, 120(r10)
stw r11, 124(r10)
stw r12, 128(r10)
stw r11, 132(r10)
stw r11, 136(r10)
stw r11, 140(r10)
stw r11, 144(r10)
stw r11, 148(r10)
stw r11, 152(r10)
stw r11, 156(r10)
stw r12, 160(r10)
stw r12, 164(r10)
stw r11, 168(r10)
stw r11, 172(r10)
stw r12, 176(r10)
stw r12, 180(r10)
stw r11, 184(r10)
stw r11, 188(r10)
stw r12, 192(r10)
stw r12, 196(r10)
stw r12, 200(r10)
stw r11, 204(r10)
stw r11, 208(r10)
stw r12, 212(r10)
stw r12, 216(r10)
stw r12, 220(r10)
stw r12, 224(r10)
stw r12, 228(r10)
stw r11, 232(r10)
stw r11, 236(r10)
stw r12, 240(r10)
stw r12, 244(r10)
stw r12, 248(r10)
stw r12, 252(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r12, 8(r10)
stw r11, 12(r10)
stw r11, 16(r10)
stw r11, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r11, 36(r10)
stw r11, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r11, 68(r10)
stw r11, 72(r10)
stw r12, 76(r10)
stw r12, 80(r10)
stw r11, 84(r10)
stw r11, 88(r10)
stw r12, 92(r10)
stw r12, 96(r10)
stw r11, 100(r10)
stw r11, 104(r10)
stw r12, 108(r10)
stw r11, 112(r10)
stw r12, 116(r10)
stw r11, 120(r10)
stw r11, 124(r10)
stw r12, 128(r10)
stw r11, 132(r10)
stw r11, 136(r10)
stw r12, 140(r10)
stw r12, 144(r10)
stw r12, 148(r10)
stw r12, 152(r10)
stw r12, 156(r10)
stw r12, 160(r10)
stw r12, 164(r10)
stw r11, 168(r10)
stw r11, 172(r10)
stw r12, 176(r10)
stw r12, 180(r10)
stw r11, 184(r10)
stw r11, 188(r10)
stw r12, 192(r10)
stw r12, 196(r10)
stw r12, 200(r10)
stw r11, 204(r10)
stw r11, 208(r10)
stw r12, 212(r10)
stw r12, 216(r10)
stw r12, 220(r10)
stw r12, 224(r10)
stw r12, 228(r10)
stw r12, 232(r10)
stw r11, 236(r10)
stw r11, 240(r10)
stw r11, 244(r10)
stw r12, 248(r10)
stw r12, 252(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r12, 8(r10)
stw r12, 12(r10)
stw r12, 16(r10)
stw r11, 20(r10)
stw r11, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r11, 36(r10)
stw r11, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r11, 68(r10)
stw r11, 72(r10)
stw r12, 76(r10)
stw r12, 80(r10)
stw r11, 84(r10)
stw r11, 88(r10)
stw r12, 92(r10)
stw r12, 96(r10)
stw r11, 100(r10)
stw r11, 104(r10)
stw r12, 108(r10)
stw r11, 112(r10)
stw r12, 116(r10)
stw r11, 120(r10)
stw r11, 124(r10)
stw r12, 128(r10)
stw r11, 132(r10)
stw r11, 136(r10)
stw r12, 140(r10)
stw r12, 144(r10)
stw r12, 148(r10)
stw r12, 152(r10)
stw r12, 156(r10)
stw r12, 160(r10)
stw r12, 164(r10)
stw r11, 168(r10)
stw r11, 172(r10)
stw r12, 176(r10)
stw r12, 180(r10)
stw r11, 184(r10)
stw r11, 188(r10)
stw r12, 192(r10)
stw r12, 196(r10)
stw r12, 200(r10)
stw r11, 204(r10)
stw r11, 208(r10)
stw r12, 212(r10)
stw r12, 216(r10)
stw r12, 220(r10)
stw r12, 224(r10)
stw r12, 228(r10)
stw r12, 232(r10)
stw r12, 236(r10)
stw r12, 240(r10)
stw r11, 244(r10)
stw r11, 248(r10)
stw r12, 252(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r11, 4(r10)
stw r11, 8(r10)
stw r12, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r11, 24(r10)
stw r11, 28(r10)
stw r12, 32(r10)
stw r11, 36(r10)
stw r11, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r11, 56(r10)
stw r11, 60(r10)
stw r12, 64(r10)
stw r11, 68(r10)
stw r11, 72(r10)
stw r12, 76(r10)
stw r12, 80(r10)
stw r11, 84(r10)
stw r11, 88(r10)
stw r12, 92(r10)
stw r12, 96(r10)
stw r11, 100(r10)
stw r11, 104(r10)
stw r12, 108(r10)
stw r11, 112(r10)
stw r12, 116(r10)
stw r11, 120(r10)
stw r11, 124(r10)
stw r12, 128(r10)
stw r11, 132(r10)
stw r11, 136(r10)
stw r12, 140(r10)
stw r12, 144(r10)
stw r12, 148(r10)
stw r11, 152(r10)
stw r11, 156(r10)
stw r12, 160(r10)
stw r12, 164(r10)
stw r11, 168(r10)
stw r11, 172(r10)
stw r12, 176(r10)
stw r12, 180(r10)
stw r11, 184(r10)
stw r11, 188(r10)
stw r12, 192(r10)
stw r12, 196(r10)
stw r12, 200(r10)
stw r11, 204(r10)
stw r11, 208(r10)
stw r12, 212(r10)
stw r11, 216(r10)
stw r11, 220(r10)
stw r12, 224(r10)
stw r11, 228(r10)
stw r11, 232(r10)
stw r12, 236(r10)
stw r12, 240(r10)
stw r12, 244(r10)
stw r11, 248(r10)
stw r11, 252(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r11, 8(r10)
stw r11, 12(r10)
stw r11, 16(r10)
stw r11, 20(r10)
stw r11, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r11, 40(r10)
stw r11, 44(r10)
stw r11, 48(r10)
stw r11, 52(r10)
stw r11, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r11, 72(r10)
stw r11, 76(r10)
stw r11, 80(r10)
stw r11, 84(r10)
stw r11, 88(r10)
stw r12, 92(r10)
stw r12, 96(r10)
stw r11, 100(r10)
stw r11, 104(r10)
stw r12, 108(r10)
stw r12, 112(r10)
stw r12, 116(r10)
stw r11, 120(r10)
stw r11, 124(r10)
stw r12, 128(r10)
stw r12, 132(r10)
stw r11, 136(r10)
stw r11, 140(r10)
stw r11, 144(r10)
stw r11, 148(r10)
stw r11, 152(r10)
stw r12, 156(r10)
stw r12, 160(r10)
stw r12, 164(r10)
stw r11, 168(r10)
stw r11, 172(r10)
stw r12, 176(r10)
stw r12, 180(r10)
stw r11, 184(r10)
stw r11, 188(r10)
stw r12, 192(r10)
stw r12, 196(r10)
stw r12, 200(r10)
stw r12, 204(r10)
stw r11, 208(r10)
stw r11, 212(r10)
stw r11, 216(r10)
stw r12, 220(r10)
stw r12, 224(r10)
stw r12, 228(r10)
stw r11, 232(r10)
stw r11, 236(r10)
stw r11, 240(r10)
stw r11, 244(r10)
stw r11, 248(r10)
stw r12, 252(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r12, 8(r10)
stw r12, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r12, 72(r10)
stw r12, 76(r10)
stw r12, 80(r10)
stw r11, 84(r10)
stw r11, 88(r10)
stw r12, 92(r10)
stw r12, 96(r10)
stw r12, 100(r10)
stw r12, 104(r10)
stw r12, 108(r10)
stw r12, 112(r10)
stw r12, 116(r10)
stw r12, 120(r10)
stw r12, 124(r10)
stw r12, 128(r10)
stw r12, 132(r10)
stw r12, 136(r10)
stw r12, 140(r10)
stw r12, 144(r10)
stw r12, 148(r10)
stw r12, 152(r10)
stw r12, 156(r10)
stw r12, 160(r10)
stw r12, 164(r10)
stw r12, 168(r10)
stw r12, 172(r10)
stw r12, 176(r10)
stw r12, 180(r10)
stw r12, 184(r10)
stw r12, 188(r10)
stw r12, 192(r10)
stw r12, 196(r10)
stw r12, 200(r10)
stw r12, 204(r10)
stw r12, 208(r10)
stw r12, 212(r10)
stw r12, 216(r10)
stw r12, 220(r10)
stw r12, 224(r10)
stw r12, 228(r10)
stw r12, 232(r10)
stw r12, 236(r10)
stw r12, 240(r10)
stw r12, 244(r10)
stw r12, 248(r10)
stw r12, 252(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r12, 8(r10)
stw r12, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r11, 68(r10)
stw r11, 72(r10)
stw r12, 76(r10)
stw r12, 80(r10)
stw r11, 84(r10)
stw r11, 88(r10)
stw r12, 92(r10)
stw r12, 96(r10)
stw r12, 100(r10)
stw r12, 104(r10)
stw r12, 108(r10)
stw r12, 112(r10)
stw r12, 116(r10)
stw r12, 120(r10)
stw r12, 124(r10)
stw r12, 128(r10)
stw r12, 132(r10)
stw r12, 136(r10)
stw r12, 140(r10)
stw r12, 144(r10)
stw r12, 148(r10)
stw r12, 152(r10)
stw r12, 156(r10)
stw r12, 160(r10)
stw r12, 164(r10)
stw r12, 168(r10)
stw r12, 172(r10)
stw r12, 176(r10)
stw r12, 180(r10)
stw r12, 184(r10)
stw r12, 188(r10)
stw r12, 192(r10)
stw r12, 196(r10)
stw r12, 200(r10)
stw r12, 204(r10)
stw r12, 208(r10)
stw r12, 212(r10)
stw r12, 216(r10)
stw r12, 220(r10)
stw r12, 224(r10)
stw r12, 228(r10)
stw r12, 232(r10)
stw r12, 236(r10)
stw r12, 240(r10)
stw r12, 244(r10)
stw r12, 248(r10)
stw r12, 252(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r12, 8(r10)
stw r12, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r11, 72(r10)
stw r11, 76(r10)
stw r11, 80(r10)
stw r11, 84(r10)
stw r12, 88(r10)
stw r12, 92(r10)
stw r12, 96(r10)
stw r12, 100(r10)
stw r12, 104(r10)
stw r12, 108(r10)
stw r12, 112(r10)
stw r12, 116(r10)
stw r12, 120(r10)
stw r12, 124(r10)
stw r12, 128(r10)
stw r12, 132(r10)
stw r12, 136(r10)
stw r12, 140(r10)
stw r12, 144(r10)
stw r12, 148(r10)
stw r12, 152(r10)
stw r12, 156(r10)
stw r12, 160(r10)
stw r12, 164(r10)
stw r12, 168(r10)
stw r12, 172(r10)
stw r12, 176(r10)
stw r12, 180(r10)
stw r12, 184(r10)
stw r12, 188(r10)
stw r12, 192(r10)
stw r12, 196(r10)
stw r12, 200(r10)
stw r12, 204(r10)
stw r12, 208(r10)
stw r12, 212(r10)
stw r12, 216(r10)
stw r12, 220(r10)
stw r12, 224(r10)
stw r12, 228(r10)
stw r12, 232(r10)
stw r12, 236(r10)
stw r12, 240(r10)
stw r12, 244(r10)
stw r12, 248(r10)
stw r12, 252(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r12, 8(r10)
stw r12, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r12, 72(r10)
stw r12, 76(r10)
stw r12, 80(r10)
stw r12, 84(r10)
stw r12, 88(r10)
stw r12, 92(r10)
stw r12, 96(r10)
stw r12, 100(r10)
stw r12, 104(r10)
stw r12, 108(r10)
stw r12, 112(r10)
stw r12, 116(r10)
stw r12, 120(r10)
stw r12, 124(r10)
stw r12, 128(r10)
stw r12, 132(r10)
stw r12, 136(r10)
stw r12, 140(r10)
stw r12, 144(r10)
stw r12, 148(r10)
stw r12, 152(r10)
stw r12, 156(r10)
stw r12, 160(r10)
stw r12, 164(r10)
stw r12, 168(r10)
stw r12, 172(r10)
stw r12, 176(r10)
stw r12, 180(r10)
stw r12, 184(r10)
stw r12, 188(r10)
stw r12, 192(r10)
stw r12, 196(r10)
stw r12, 200(r10)
stw r12, 204(r10)
stw r12, 208(r10)
stw r12, 212(r10)
stw r12, 216(r10)
stw r12, 220(r10)
stw r12, 224(r10)
stw r12, 228(r10)
stw r12, 232(r10)
stw r12, 236(r10)
stw r12, 240(r10)
stw r12, 244(r10)
stw r12, 248(r10)
stw r12, 252(r10)
#endif
.endm
 
.macro DEBUG_bat
#ifdef CONFIG_DEBUG
stw r12, 0(r10)
stw r12, 4(r10)
stw r12, 8(r10)
stw r12, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r12, 72(r10)
stw r12, 76(r10)
stw r12, 80(r10)
stw r12, 84(r10)
stw r12, 88(r10)
stw r12, 92(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r12, 8(r10)
stw r12, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r12, 72(r10)
stw r12, 76(r10)
stw r12, 80(r10)
stw r12, 84(r10)
stw r12, 88(r10)
stw r12, 92(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r11, 4(r10)
stw r11, 8(r10)
stw r11, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r12, 72(r10)
stw r12, 76(r10)
stw r11, 80(r10)
stw r12, 84(r10)
stw r12, 88(r10)
stw r12, 92(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r11, 8(r10)
stw r11, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r12, 72(r10)
stw r11, 76(r10)
stw r11, 80(r10)
stw r12, 84(r10)
stw r12, 88(r10)
stw r12, 92(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r11, 8(r10)
stw r11, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r12, 72(r10)
stw r11, 76(r10)
stw r11, 80(r10)
stw r12, 84(r10)
stw r12, 88(r10)
stw r12, 92(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r11, 8(r10)
stw r11, 12(r10)
stw r11, 16(r10)
stw r11, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r11, 40(r10)
stw r11, 44(r10)
stw r11, 48(r10)
stw r11, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r11, 68(r10)
stw r11, 72(r10)
stw r11, 76(r10)
stw r11, 80(r10)
stw r11, 84(r10)
stw r11, 88(r10)
stw r12, 92(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r11, 8(r10)
stw r11, 12(r10)
stw r12, 16(r10)
stw r11, 20(r10)
stw r11, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r11, 52(r10)
stw r11, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r12, 72(r10)
stw r11, 76(r10)
stw r11, 80(r10)
stw r12, 84(r10)
stw r12, 88(r10)
stw r12, 92(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r11, 8(r10)
stw r11, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r11, 24(r10)
stw r11, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r11, 40(r10)
stw r11, 44(r10)
stw r11, 48(r10)
stw r11, 52(r10)
stw r11, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r12, 72(r10)
stw r11, 76(r10)
stw r11, 80(r10)
stw r12, 84(r10)
stw r12, 88(r10)
stw r12, 92(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r11, 8(r10)
stw r11, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r11, 24(r10)
stw r11, 28(r10)
stw r12, 32(r10)
stw r11, 36(r10)
stw r11, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r11, 52(r10)
stw r11, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r12, 72(r10)
stw r11, 76(r10)
stw r11, 80(r10)
stw r12, 84(r10)
stw r12, 88(r10)
stw r12, 92(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r11, 8(r10)
stw r11, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r11, 24(r10)
stw r11, 28(r10)
stw r12, 32(r10)
stw r11, 36(r10)
stw r11, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r11, 52(r10)
stw r11, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r12, 72(r10)
stw r11, 76(r10)
stw r11, 80(r10)
stw r12, 84(r10)
stw r12, 88(r10)
stw r12, 92(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r11, 8(r10)
stw r11, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r11, 24(r10)
stw r11, 28(r10)
stw r12, 32(r10)
stw r11, 36(r10)
stw r11, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r11, 52(r10)
stw r11, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r12, 72(r10)
stw r11, 76(r10)
stw r11, 80(r10)
stw r12, 84(r10)
stw r11, 88(r10)
stw r11, 92(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r11, 8(r10)
stw r11, 12(r10)
stw r11, 16(r10)
stw r11, 20(r10)
stw r11, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r11, 40(r10)
stw r11, 44(r10)
stw r11, 48(r10)
stw r12, 52(r10)
stw r11, 56(r10)
stw r11, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r12, 72(r10)
stw r12, 76(r10)
stw r11, 80(r10)
stw r11, 84(r10)
stw r11, 88(r10)
stw r12, 92(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r12, 8(r10)
stw r12, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r12, 72(r10)
stw r12, 76(r10)
stw r12, 80(r10)
stw r12, 84(r10)
stw r12, 88(r10)
stw r12, 92(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r12, 8(r10)
stw r12, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r12, 72(r10)
stw r12, 76(r10)
stw r12, 80(r10)
stw r12, 84(r10)
stw r12, 88(r10)
stw r12, 92(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r12, 8(r10)
stw r12, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r12, 72(r10)
stw r12, 76(r10)
stw r12, 80(r10)
stw r12, 84(r10)
stw r12, 88(r10)
stw r12, 92(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r12, 8(r10)
stw r12, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r12, 72(r10)
stw r12, 76(r10)
stw r12, 80(r10)
stw r12, 84(r10)
stw r12, 88(r10)
stw r12, 92(r10)
#endif
.endm
 
.macro DEBUG_mapping
#ifdef CONFIG_DEBUG
stw r12, 0(r10)
stw r12, 4(r10)
stw r12, 8(r10)
stw r12, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r12, 72(r10)
stw r12, 76(r10)
stw r12, 80(r10)
stw r12, 84(r10)
stw r12, 88(r10)
stw r12, 92(r10)
stw r12, 96(r10)
stw r12, 100(r10)
stw r12, 104(r10)
stw r12, 108(r10)
stw r12, 112(r10)
stw r12, 116(r10)
stw r12, 120(r10)
stw r12, 124(r10)
stw r12, 128(r10)
stw r12, 132(r10)
stw r12, 136(r10)
stw r12, 140(r10)
stw r12, 144(r10)
stw r12, 148(r10)
stw r12, 152(r10)
stw r12, 156(r10)
stw r12, 160(r10)
stw r12, 164(r10)
stw r12, 168(r10)
stw r12, 172(r10)
stw r12, 176(r10)
stw r12, 180(r10)
stw r12, 184(r10)
stw r12, 188(r10)
stw r12, 192(r10)
stw r12, 196(r10)
stw r12, 200(r10)
stw r12, 204(r10)
stw r12, 208(r10)
stw r12, 212(r10)
stw r12, 216(r10)
stw r12, 220(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r12, 8(r10)
stw r12, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r12, 72(r10)
stw r12, 76(r10)
stw r12, 80(r10)
stw r12, 84(r10)
stw r12, 88(r10)
stw r12, 92(r10)
stw r12, 96(r10)
stw r12, 100(r10)
stw r12, 104(r10)
stw r12, 108(r10)
stw r12, 112(r10)
stw r12, 116(r10)
stw r12, 120(r10)
stw r12, 124(r10)
stw r12, 128(r10)
stw r12, 132(r10)
stw r12, 136(r10)
stw r12, 140(r10)
stw r12, 144(r10)
stw r12, 148(r10)
stw r12, 152(r10)
stw r12, 156(r10)
stw r12, 160(r10)
stw r12, 164(r10)
stw r12, 168(r10)
stw r12, 172(r10)
stw r12, 176(r10)
stw r12, 180(r10)
stw r12, 184(r10)
stw r12, 188(r10)
stw r12, 192(r10)
stw r12, 196(r10)
stw r12, 200(r10)
stw r12, 204(r10)
stw r12, 208(r10)
stw r12, 212(r10)
stw r12, 216(r10)
stw r12, 220(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r12, 8(r10)
stw r12, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r12, 72(r10)
stw r12, 76(r10)
stw r12, 80(r10)
stw r12, 84(r10)
stw r12, 88(r10)
stw r12, 92(r10)
stw r12, 96(r10)
stw r12, 100(r10)
stw r12, 104(r10)
stw r12, 108(r10)
stw r12, 112(r10)
stw r12, 116(r10)
stw r12, 120(r10)
stw r12, 124(r10)
stw r12, 128(r10)
stw r12, 132(r10)
stw r12, 136(r10)
stw r12, 140(r10)
stw r11, 144(r10)
stw r11, 148(r10)
stw r12, 152(r10)
stw r12, 156(r10)
stw r12, 160(r10)
stw r12, 164(r10)
stw r12, 168(r10)
stw r12, 172(r10)
stw r12, 176(r10)
stw r12, 180(r10)
stw r12, 184(r10)
stw r12, 188(r10)
stw r12, 192(r10)
stw r12, 196(r10)
stw r12, 200(r10)
stw r12, 204(r10)
stw r12, 208(r10)
stw r12, 212(r10)
stw r12, 216(r10)
stw r12, 220(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r12, 8(r10)
stw r12, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r12, 72(r10)
stw r12, 76(r10)
stw r12, 80(r10)
stw r12, 84(r10)
stw r12, 88(r10)
stw r12, 92(r10)
stw r12, 96(r10)
stw r12, 100(r10)
stw r12, 104(r10)
stw r12, 108(r10)
stw r12, 112(r10)
stw r12, 116(r10)
stw r12, 120(r10)
stw r12, 124(r10)
stw r12, 128(r10)
stw r12, 132(r10)
stw r12, 136(r10)
stw r12, 140(r10)
stw r11, 144(r10)
stw r11, 148(r10)
stw r12, 152(r10)
stw r12, 156(r10)
stw r12, 160(r10)
stw r12, 164(r10)
stw r12, 168(r10)
stw r12, 172(r10)
stw r12, 176(r10)
stw r12, 180(r10)
stw r12, 184(r10)
stw r12, 188(r10)
stw r12, 192(r10)
stw r12, 196(r10)
stw r12, 200(r10)
stw r12, 204(r10)
stw r12, 208(r10)
stw r12, 212(r10)
stw r12, 216(r10)
stw r12, 220(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r12, 8(r10)
stw r12, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r12, 72(r10)
stw r12, 76(r10)
stw r12, 80(r10)
stw r12, 84(r10)
stw r12, 88(r10)
stw r12, 92(r10)
stw r12, 96(r10)
stw r12, 100(r10)
stw r12, 104(r10)
stw r12, 108(r10)
stw r12, 112(r10)
stw r12, 116(r10)
stw r12, 120(r10)
stw r12, 124(r10)
stw r12, 128(r10)
stw r12, 132(r10)
stw r12, 136(r10)
stw r12, 140(r10)
stw r12, 144(r10)
stw r12, 148(r10)
stw r12, 152(r10)
stw r12, 156(r10)
stw r12, 160(r10)
stw r12, 164(r10)
stw r12, 168(r10)
stw r12, 172(r10)
stw r12, 176(r10)
stw r12, 180(r10)
stw r12, 184(r10)
stw r12, 188(r10)
stw r12, 192(r10)
stw r12, 196(r10)
stw r12, 200(r10)
stw r12, 204(r10)
stw r12, 208(r10)
stw r12, 212(r10)
stw r12, 216(r10)
stw r12, 220(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r11, 4(r10)
stw r11, 8(r10)
stw r11, 12(r10)
stw r12, 16(r10)
stw r11, 20(r10)
stw r11, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r11, 40(r10)
stw r11, 44(r10)
stw r11, 48(r10)
stw r11, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r11, 68(r10)
stw r11, 72(r10)
stw r12, 76(r10)
stw r11, 80(r10)
stw r11, 84(r10)
stw r11, 88(r10)
stw r12, 92(r10)
stw r12, 96(r10)
stw r11, 100(r10)
stw r11, 104(r10)
stw r12, 108(r10)
stw r11, 112(r10)
stw r11, 116(r10)
stw r11, 120(r10)
stw r12, 124(r10)
stw r12, 128(r10)
stw r12, 132(r10)
stw r12, 136(r10)
stw r11, 140(r10)
stw r11, 144(r10)
stw r11, 148(r10)
stw r12, 152(r10)
stw r12, 156(r10)
stw r12, 160(r10)
stw r11, 164(r10)
stw r11, 168(r10)
stw r12, 172(r10)
stw r11, 176(r10)
stw r11, 180(r10)
stw r11, 184(r10)
stw r12, 188(r10)
stw r12, 192(r10)
stw r12, 196(r10)
stw r11, 200(r10)
stw r11, 204(r10)
stw r11, 208(r10)
stw r12, 212(r10)
stw r11, 216(r10)
stw r11, 220(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r11, 4(r10)
stw r11, 8(r10)
stw r11, 12(r10)
stw r11, 16(r10)
stw r11, 20(r10)
stw r11, 24(r10)
stw r11, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r11, 52(r10)
stw r11, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r11, 72(r10)
stw r11, 76(r10)
stw r12, 80(r10)
stw r12, 84(r10)
stw r11, 88(r10)
stw r11, 92(r10)
stw r12, 96(r10)
stw r12, 100(r10)
stw r11, 104(r10)
stw r11, 108(r10)
stw r12, 112(r10)
stw r12, 116(r10)
stw r11, 120(r10)
stw r11, 124(r10)
stw r12, 128(r10)
stw r12, 132(r10)
stw r12, 136(r10)
stw r12, 140(r10)
stw r11, 144(r10)
stw r11, 148(r10)
stw r12, 152(r10)
stw r12, 156(r10)
stw r12, 160(r10)
stw r12, 164(r10)
stw r11, 168(r10)
stw r11, 172(r10)
stw r12, 176(r10)
stw r12, 180(r10)
stw r11, 184(r10)
stw r11, 188(r10)
stw r12, 192(r10)
stw r11, 196(r10)
stw r11, 200(r10)
stw r12, 204(r10)
stw r12, 208(r10)
stw r11, 212(r10)
stw r11, 216(r10)
stw r12, 220(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r11, 4(r10)
stw r11, 8(r10)
stw r12, 12(r10)
stw r11, 16(r10)
stw r12, 20(r10)
stw r11, 24(r10)
stw r11, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r11, 40(r10)
stw r11, 44(r10)
stw r11, 48(r10)
stw r11, 52(r10)
stw r11, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r11, 72(r10)
stw r11, 76(r10)
stw r12, 80(r10)
stw r12, 84(r10)
stw r11, 88(r10)
stw r11, 92(r10)
stw r12, 96(r10)
stw r12, 100(r10)
stw r11, 104(r10)
stw r11, 108(r10)
stw r12, 112(r10)
stw r12, 116(r10)
stw r11, 120(r10)
stw r11, 124(r10)
stw r12, 128(r10)
stw r12, 132(r10)
stw r12, 136(r10)
stw r12, 140(r10)
stw r11, 144(r10)
stw r11, 148(r10)
stw r12, 152(r10)
stw r12, 156(r10)
stw r12, 160(r10)
stw r12, 164(r10)
stw r11, 168(r10)
stw r11, 172(r10)
stw r12, 176(r10)
stw r12, 180(r10)
stw r11, 184(r10)
stw r11, 188(r10)
stw r12, 192(r10)
stw r11, 196(r10)
stw r11, 200(r10)
stw r12, 204(r10)
stw r12, 208(r10)
stw r11, 212(r10)
stw r11, 216(r10)
stw r12, 220(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r11, 4(r10)
stw r11, 8(r10)
stw r12, 12(r10)
stw r11, 16(r10)
stw r12, 20(r10)
stw r11, 24(r10)
stw r11, 28(r10)
stw r12, 32(r10)
stw r11, 36(r10)
stw r11, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r11, 52(r10)
stw r11, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r11, 72(r10)
stw r11, 76(r10)
stw r12, 80(r10)
stw r12, 84(r10)
stw r11, 88(r10)
stw r11, 92(r10)
stw r12, 96(r10)
stw r12, 100(r10)
stw r11, 104(r10)
stw r11, 108(r10)
stw r12, 112(r10)
stw r12, 116(r10)
stw r11, 120(r10)
stw r11, 124(r10)
stw r12, 128(r10)
stw r12, 132(r10)
stw r12, 136(r10)
stw r12, 140(r10)
stw r11, 144(r10)
stw r11, 148(r10)
stw r12, 152(r10)
stw r12, 156(r10)
stw r12, 160(r10)
stw r12, 164(r10)
stw r11, 168(r10)
stw r11, 172(r10)
stw r12, 176(r10)
stw r12, 180(r10)
stw r11, 184(r10)
stw r11, 188(r10)
stw r12, 192(r10)
stw r11, 196(r10)
stw r11, 200(r10)
stw r12, 204(r10)
stw r12, 208(r10)
stw r11, 212(r10)
stw r11, 216(r10)
stw r12, 220(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r11, 4(r10)
stw r11, 8(r10)
stw r12, 12(r10)
stw r11, 16(r10)
stw r12, 20(r10)
stw r11, 24(r10)
stw r11, 28(r10)
stw r12, 32(r10)
stw r11, 36(r10)
stw r11, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r11, 52(r10)
stw r11, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r11, 72(r10)
stw r11, 76(r10)
stw r12, 80(r10)
stw r12, 84(r10)
stw r11, 88(r10)
stw r11, 92(r10)
stw r12, 96(r10)
stw r12, 100(r10)
stw r11, 104(r10)
stw r11, 108(r10)
stw r12, 112(r10)
stw r12, 116(r10)
stw r11, 120(r10)
stw r11, 124(r10)
stw r12, 128(r10)
stw r12, 132(r10)
stw r12, 136(r10)
stw r12, 140(r10)
stw r11, 144(r10)
stw r11, 148(r10)
stw r12, 152(r10)
stw r12, 156(r10)
stw r12, 160(r10)
stw r12, 164(r10)
stw r11, 168(r10)
stw r11, 172(r10)
stw r12, 176(r10)
stw r12, 180(r10)
stw r11, 184(r10)
stw r11, 188(r10)
stw r12, 192(r10)
stw r11, 196(r10)
stw r11, 200(r10)
stw r12, 204(r10)
stw r12, 208(r10)
stw r11, 212(r10)
stw r11, 216(r10)
stw r12, 220(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r11, 4(r10)
stw r11, 8(r10)
stw r12, 12(r10)
stw r11, 16(r10)
stw r12, 20(r10)
stw r11, 24(r10)
stw r11, 28(r10)
stw r12, 32(r10)
stw r11, 36(r10)
stw r11, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r11, 52(r10)
stw r11, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r11, 72(r10)
stw r11, 76(r10)
stw r12, 80(r10)
stw r12, 84(r10)
stw r11, 88(r10)
stw r11, 92(r10)
stw r12, 96(r10)
stw r12, 100(r10)
stw r11, 104(r10)
stw r11, 108(r10)
stw r12, 112(r10)
stw r12, 116(r10)
stw r11, 120(r10)
stw r11, 124(r10)
stw r12, 128(r10)
stw r12, 132(r10)
stw r12, 136(r10)
stw r12, 140(r10)
stw r11, 144(r10)
stw r11, 148(r10)
stw r12, 152(r10)
stw r12, 156(r10)
stw r12, 160(r10)
stw r12, 164(r10)
stw r11, 168(r10)
stw r11, 172(r10)
stw r12, 176(r10)
stw r12, 180(r10)
stw r11, 184(r10)
stw r11, 188(r10)
stw r12, 192(r10)
stw r11, 196(r10)
stw r11, 200(r10)
stw r12, 204(r10)
stw r12, 208(r10)
stw r11, 212(r10)
stw r11, 216(r10)
stw r12, 220(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r11, 4(r10)
stw r11, 8(r10)
stw r12, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r11, 24(r10)
stw r11, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r11, 40(r10)
stw r11, 44(r10)
stw r11, 48(r10)
stw r12, 52(r10)
stw r11, 56(r10)
stw r11, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r11, 72(r10)
stw r11, 76(r10)
stw r11, 80(r10)
stw r11, 84(r10)
stw r11, 88(r10)
stw r12, 92(r10)
stw r12, 96(r10)
stw r12, 100(r10)
stw r11, 104(r10)
stw r11, 108(r10)
stw r11, 112(r10)
stw r11, 116(r10)
stw r11, 120(r10)
stw r12, 124(r10)
stw r12, 128(r10)
stw r12, 132(r10)
stw r12, 136(r10)
stw r11, 140(r10)
stw r11, 144(r10)
stw r11, 148(r10)
stw r11, 152(r10)
stw r12, 156(r10)
stw r12, 160(r10)
stw r12, 164(r10)
stw r11, 168(r10)
stw r11, 172(r10)
stw r12, 176(r10)
stw r12, 180(r10)
stw r11, 184(r10)
stw r11, 188(r10)
stw r12, 192(r10)
stw r12, 196(r10)
stw r11, 200(r10)
stw r11, 204(r10)
stw r11, 208(r10)
stw r11, 212(r10)
stw r11, 216(r10)
stw r12, 220(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r12, 8(r10)
stw r12, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r11, 72(r10)
stw r11, 76(r10)
stw r12, 80(r10)
stw r12, 84(r10)
stw r12, 88(r10)
stw r12, 92(r10)
stw r12, 96(r10)
stw r12, 100(r10)
stw r11, 104(r10)
stw r11, 108(r10)
stw r12, 112(r10)
stw r12, 116(r10)
stw r12, 120(r10)
stw r12, 124(r10)
stw r12, 128(r10)
stw r12, 132(r10)
stw r12, 136(r10)
stw r12, 140(r10)
stw r12, 144(r10)
stw r12, 148(r10)
stw r12, 152(r10)
stw r12, 156(r10)
stw r12, 160(r10)
stw r12, 164(r10)
stw r12, 168(r10)
stw r12, 172(r10)
stw r12, 176(r10)
stw r12, 180(r10)
stw r12, 184(r10)
stw r12, 188(r10)
stw r12, 192(r10)
stw r12, 196(r10)
stw r12, 200(r10)
stw r12, 204(r10)
stw r12, 208(r10)
stw r11, 212(r10)
stw r11, 216(r10)
stw r12, 220(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r12, 8(r10)
stw r12, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r11, 72(r10)
stw r11, 76(r10)
stw r12, 80(r10)
stw r12, 84(r10)
stw r12, 88(r10)
stw r12, 92(r10)
stw r12, 96(r10)
stw r12, 100(r10)
stw r11, 104(r10)
stw r11, 108(r10)
stw r12, 112(r10)
stw r12, 116(r10)
stw r12, 120(r10)
stw r12, 124(r10)
stw r12, 128(r10)
stw r12, 132(r10)
stw r12, 136(r10)
stw r12, 140(r10)
stw r12, 144(r10)
stw r12, 148(r10)
stw r12, 152(r10)
stw r12, 156(r10)
stw r12, 160(r10)
stw r12, 164(r10)
stw r12, 168(r10)
stw r12, 172(r10)
stw r12, 176(r10)
stw r12, 180(r10)
stw r12, 184(r10)
stw r12, 188(r10)
stw r12, 192(r10)
stw r11, 196(r10)
stw r11, 200(r10)
stw r12, 204(r10)
stw r12, 208(r10)
stw r11, 212(r10)
stw r11, 216(r10)
stw r12, 220(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r12, 8(r10)
stw r12, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r11, 68(r10)
stw r11, 72(r10)
stw r11, 76(r10)
stw r11, 80(r10)
stw r12, 84(r10)
stw r12, 88(r10)
stw r12, 92(r10)
stw r12, 96(r10)
stw r11, 100(r10)
stw r11, 104(r10)
stw r11, 108(r10)
stw r11, 112(r10)
stw r12, 116(r10)
stw r12, 120(r10)
stw r12, 124(r10)
stw r12, 128(r10)
stw r12, 132(r10)
stw r12, 136(r10)
stw r12, 140(r10)
stw r12, 144(r10)
stw r12, 148(r10)
stw r12, 152(r10)
stw r12, 156(r10)
stw r12, 160(r10)
stw r12, 164(r10)
stw r12, 168(r10)
stw r12, 172(r10)
stw r12, 176(r10)
stw r12, 180(r10)
stw r12, 184(r10)
stw r12, 188(r10)
stw r12, 192(r10)
stw r12, 196(r10)
stw r11, 200(r10)
stw r11, 204(r10)
stw r11, 208(r10)
stw r11, 212(r10)
stw r12, 216(r10)
stw r12, 220(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r12, 8(r10)
stw r12, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r12, 72(r10)
stw r12, 76(r10)
stw r12, 80(r10)
stw r12, 84(r10)
stw r12, 88(r10)
stw r12, 92(r10)
stw r12, 96(r10)
stw r12, 100(r10)
stw r12, 104(r10)
stw r12, 108(r10)
stw r12, 112(r10)
stw r12, 116(r10)
stw r12, 120(r10)
stw r12, 124(r10)
stw r12, 128(r10)
stw r12, 132(r10)
stw r12, 136(r10)
stw r12, 140(r10)
stw r12, 144(r10)
stw r12, 148(r10)
stw r12, 152(r10)
stw r12, 156(r10)
stw r12, 160(r10)
stw r12, 164(r10)
stw r12, 168(r10)
stw r12, 172(r10)
stw r12, 176(r10)
stw r12, 180(r10)
stw r12, 184(r10)
stw r12, 188(r10)
stw r12, 192(r10)
stw r12, 196(r10)
stw r12, 200(r10)
stw r12, 204(r10)
stw r12, 208(r10)
stw r12, 212(r10)
stw r12, 216(r10)
stw r12, 220(r10)
#endif
.endm
 
.macro DEBUG_tlb
#ifdef CONFIG_DEBUG
stw r12, 0(r10)
stw r12, 4(r10)
stw r12, 8(r10)
stw r12, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r12, 72(r10)
stw r12, 76(r10)
stw r12, 80(r10)
stw r12, 84(r10)
stw r12, 88(r10)
stw r12, 92(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r12, 8(r10)
stw r12, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r12, 72(r10)
stw r12, 76(r10)
stw r12, 80(r10)
stw r12, 84(r10)
stw r12, 88(r10)
stw r12, 92(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r12, 8(r10)
stw r12, 12(r10)
stw r11, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r11, 44(r10)
stw r11, 48(r10)
stw r11, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r11, 68(r10)
stw r11, 72(r10)
stw r11, 76(r10)
stw r12, 80(r10)
stw r12, 84(r10)
stw r12, 88(r10)
stw r12, 92(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r12, 8(r10)
stw r11, 12(r10)
stw r11, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r12, 44(r10)
stw r11, 48(r10)
stw r11, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r11, 72(r10)
stw r11, 76(r10)
stw r12, 80(r10)
stw r12, 84(r10)
stw r12, 88(r10)
stw r12, 92(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r12, 8(r10)
stw r11, 12(r10)
stw r11, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r12, 44(r10)
stw r11, 48(r10)
stw r11, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r11, 72(r10)
stw r11, 76(r10)
stw r12, 80(r10)
stw r12, 84(r10)
stw r12, 88(r10)
stw r12, 92(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r11, 4(r10)
stw r11, 8(r10)
stw r11, 12(r10)
stw r11, 16(r10)
stw r11, 20(r10)
stw r11, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r12, 44(r10)
stw r11, 48(r10)
stw r11, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r11, 72(r10)
stw r11, 76(r10)
stw r11, 80(r10)
stw r11, 84(r10)
stw r12, 88(r10)
stw r12, 92(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r12, 8(r10)
stw r11, 12(r10)
stw r11, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r12, 44(r10)
stw r11, 48(r10)
stw r11, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r11, 72(r10)
stw r11, 76(r10)
stw r12, 80(r10)
stw r11, 84(r10)
stw r11, 88(r10)
stw r12, 92(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r12, 8(r10)
stw r11, 12(r10)
stw r11, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r12, 44(r10)
stw r11, 48(r10)
stw r11, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r11, 72(r10)
stw r11, 76(r10)
stw r12, 80(r10)
stw r12, 84(r10)
stw r11, 88(r10)
stw r11, 92(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r12, 8(r10)
stw r11, 12(r10)
stw r11, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r12, 44(r10)
stw r11, 48(r10)
stw r11, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r11, 72(r10)
stw r11, 76(r10)
stw r12, 80(r10)
stw r12, 84(r10)
stw r11, 88(r10)
stw r11, 92(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r12, 8(r10)
stw r11, 12(r10)
stw r11, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r12, 44(r10)
stw r11, 48(r10)
stw r11, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r11, 72(r10)
stw r11, 76(r10)
stw r12, 80(r10)
stw r12, 84(r10)
stw r11, 88(r10)
stw r11, 92(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r12, 8(r10)
stw r11, 12(r10)
stw r11, 16(r10)
stw r12, 20(r10)
stw r11, 24(r10)
stw r11, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r12, 44(r10)
stw r11, 48(r10)
stw r11, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r11, 72(r10)
stw r11, 76(r10)
stw r12, 80(r10)
stw r12, 84(r10)
stw r11, 88(r10)
stw r11, 92(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r12, 8(r10)
stw r12, 12(r10)
stw r11, 16(r10)
stw r11, 20(r10)
stw r11, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r11, 44(r10)
stw r11, 48(r10)
stw r11, 52(r10)
stw r11, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r11, 72(r10)
stw r11, 76(r10)
stw r11, 80(r10)
stw r11, 84(r10)
stw r11, 88(r10)
stw r12, 92(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r12, 8(r10)
stw r12, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r12, 72(r10)
stw r12, 76(r10)
stw r12, 80(r10)
stw r12, 84(r10)
stw r12, 88(r10)
stw r12, 92(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r12, 8(r10)
stw r12, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r12, 72(r10)
stw r12, 76(r10)
stw r12, 80(r10)
stw r12, 84(r10)
stw r12, 88(r10)
stw r12, 92(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r12, 8(r10)
stw r12, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r12, 72(r10)
stw r12, 76(r10)
stw r12, 80(r10)
stw r12, 84(r10)
stw r12, 88(r10)
stw r12, 92(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r12, 8(r10)
stw r12, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r12, 72(r10)
stw r12, 76(r10)
stw r12, 80(r10)
stw r12, 84(r10)
stw r12, 88(r10)
stw r12, 92(r10)
#endif
.endm
 
.macro DEBUG_prepare
#ifdef CONFIG_DEBUG
stw r12, 0(r10)
stw r12, 4(r10)
stw r12, 8(r10)
stw r12, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r12, 72(r10)
stw r12, 76(r10)
stw r12, 80(r10)
stw r12, 84(r10)
stw r12, 88(r10)
stw r12, 92(r10)
stw r12, 96(r10)
stw r12, 100(r10)
stw r12, 104(r10)
stw r12, 108(r10)
stw r12, 112(r10)
stw r12, 116(r10)
stw r12, 120(r10)
stw r12, 124(r10)
stw r12, 128(r10)
stw r12, 132(r10)
stw r12, 136(r10)
stw r12, 140(r10)
stw r12, 144(r10)
stw r12, 148(r10)
stw r12, 152(r10)
stw r12, 156(r10)
stw r12, 160(r10)
stw r12, 164(r10)
stw r12, 168(r10)
stw r12, 172(r10)
stw r12, 176(r10)
stw r12, 180(r10)
stw r12, 184(r10)
stw r12, 188(r10)
stw r12, 192(r10)
stw r12, 196(r10)
stw r12, 200(r10)
stw r12, 204(r10)
stw r12, 208(r10)
stw r12, 212(r10)
stw r12, 216(r10)
stw r12, 220(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r12, 8(r10)
stw r12, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r12, 72(r10)
stw r12, 76(r10)
stw r12, 80(r10)
stw r12, 84(r10)
stw r12, 88(r10)
stw r12, 92(r10)
stw r12, 96(r10)
stw r12, 100(r10)
stw r12, 104(r10)
stw r12, 108(r10)
stw r12, 112(r10)
stw r12, 116(r10)
stw r12, 120(r10)
stw r12, 124(r10)
stw r12, 128(r10)
stw r12, 132(r10)
stw r12, 136(r10)
stw r12, 140(r10)
stw r12, 144(r10)
stw r12, 148(r10)
stw r12, 152(r10)
stw r12, 156(r10)
stw r12, 160(r10)
stw r12, 164(r10)
stw r12, 168(r10)
stw r12, 172(r10)
stw r12, 176(r10)
stw r12, 180(r10)
stw r12, 184(r10)
stw r12, 188(r10)
stw r12, 192(r10)
stw r12, 196(r10)
stw r12, 200(r10)
stw r12, 204(r10)
stw r12, 208(r10)
stw r12, 212(r10)
stw r12, 216(r10)
stw r12, 220(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r12, 8(r10)
stw r12, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r12, 72(r10)
stw r12, 76(r10)
stw r12, 80(r10)
stw r12, 84(r10)
stw r12, 88(r10)
stw r12, 92(r10)
stw r12, 96(r10)
stw r12, 100(r10)
stw r12, 104(r10)
stw r12, 108(r10)
stw r12, 112(r10)
stw r12, 116(r10)
stw r12, 120(r10)
stw r12, 124(r10)
stw r12, 128(r10)
stw r12, 132(r10)
stw r12, 136(r10)
stw r12, 140(r10)
stw r12, 144(r10)
stw r12, 148(r10)
stw r12, 152(r10)
stw r12, 156(r10)
stw r12, 160(r10)
stw r12, 164(r10)
stw r12, 168(r10)
stw r12, 172(r10)
stw r12, 176(r10)
stw r12, 180(r10)
stw r12, 184(r10)
stw r12, 188(r10)
stw r12, 192(r10)
stw r12, 196(r10)
stw r12, 200(r10)
stw r12, 204(r10)
stw r12, 208(r10)
stw r12, 212(r10)
stw r12, 216(r10)
stw r12, 220(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r12, 8(r10)
stw r12, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r12, 72(r10)
stw r12, 76(r10)
stw r12, 80(r10)
stw r12, 84(r10)
stw r12, 88(r10)
stw r12, 92(r10)
stw r12, 96(r10)
stw r12, 100(r10)
stw r12, 104(r10)
stw r12, 108(r10)
stw r12, 112(r10)
stw r12, 116(r10)
stw r12, 120(r10)
stw r12, 124(r10)
stw r12, 128(r10)
stw r12, 132(r10)
stw r12, 136(r10)
stw r12, 140(r10)
stw r12, 144(r10)
stw r12, 148(r10)
stw r12, 152(r10)
stw r12, 156(r10)
stw r12, 160(r10)
stw r12, 164(r10)
stw r12, 168(r10)
stw r12, 172(r10)
stw r12, 176(r10)
stw r12, 180(r10)
stw r12, 184(r10)
stw r12, 188(r10)
stw r12, 192(r10)
stw r12, 196(r10)
stw r12, 200(r10)
stw r12, 204(r10)
stw r12, 208(r10)
stw r12, 212(r10)
stw r12, 216(r10)
stw r12, 220(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r12, 8(r10)
stw r12, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r12, 72(r10)
stw r12, 76(r10)
stw r12, 80(r10)
stw r12, 84(r10)
stw r12, 88(r10)
stw r12, 92(r10)
stw r12, 96(r10)
stw r12, 100(r10)
stw r12, 104(r10)
stw r12, 108(r10)
stw r12, 112(r10)
stw r12, 116(r10)
stw r12, 120(r10)
stw r12, 124(r10)
stw r12, 128(r10)
stw r12, 132(r10)
stw r12, 136(r10)
stw r12, 140(r10)
stw r12, 144(r10)
stw r12, 148(r10)
stw r12, 152(r10)
stw r12, 156(r10)
stw r12, 160(r10)
stw r12, 164(r10)
stw r12, 168(r10)
stw r12, 172(r10)
stw r12, 176(r10)
stw r12, 180(r10)
stw r12, 184(r10)
stw r12, 188(r10)
stw r12, 192(r10)
stw r12, 196(r10)
stw r12, 200(r10)
stw r12, 204(r10)
stw r12, 208(r10)
stw r12, 212(r10)
stw r12, 216(r10)
stw r12, 220(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r11, 4(r10)
stw r11, 8(r10)
stw r12, 12(r10)
stw r11, 16(r10)
stw r11, 20(r10)
stw r11, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r11, 36(r10)
stw r11, 40(r10)
stw r12, 44(r10)
stw r11, 48(r10)
stw r11, 52(r10)
stw r11, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r11, 72(r10)
stw r11, 76(r10)
stw r11, 80(r10)
stw r11, 84(r10)
stw r11, 88(r10)
stw r12, 92(r10)
stw r12, 96(r10)
stw r11, 100(r10)
stw r11, 104(r10)
stw r12, 108(r10)
stw r11, 112(r10)
stw r11, 116(r10)
stw r11, 120(r10)
stw r12, 124(r10)
stw r12, 128(r10)
stw r12, 132(r10)
stw r11, 136(r10)
stw r11, 140(r10)
stw r11, 144(r10)
stw r11, 148(r10)
stw r12, 152(r10)
stw r12, 156(r10)
stw r12, 160(r10)
stw r11, 164(r10)
stw r11, 168(r10)
stw r12, 172(r10)
stw r11, 176(r10)
stw r11, 180(r10)
stw r11, 184(r10)
stw r12, 188(r10)
stw r12, 192(r10)
stw r12, 196(r10)
stw r11, 200(r10)
stw r11, 204(r10)
stw r11, 208(r10)
stw r11, 212(r10)
stw r11, 216(r10)
stw r12, 220(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r11, 8(r10)
stw r11, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r11, 24(r10)
stw r11, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r11, 40(r10)
stw r11, 44(r10)
stw r11, 48(r10)
stw r12, 52(r10)
stw r11, 56(r10)
stw r11, 60(r10)
stw r12, 64(r10)
stw r11, 68(r10)
stw r11, 72(r10)
stw r12, 76(r10)
stw r12, 80(r10)
stw r12, 84(r10)
stw r11, 88(r10)
stw r11, 92(r10)
stw r12, 96(r10)
stw r12, 100(r10)
stw r11, 104(r10)
stw r11, 108(r10)
stw r12, 112(r10)
stw r12, 116(r10)
stw r11, 120(r10)
stw r11, 124(r10)
stw r12, 128(r10)
stw r12, 132(r10)
stw r12, 136(r10)
stw r12, 140(r10)
stw r12, 144(r10)
stw r11, 148(r10)
stw r11, 152(r10)
stw r12, 156(r10)
stw r12, 160(r10)
stw r12, 164(r10)
stw r11, 168(r10)
stw r11, 172(r10)
stw r11, 176(r10)
stw r12, 180(r10)
stw r11, 184(r10)
stw r11, 188(r10)
stw r12, 192(r10)
stw r11, 196(r10)
stw r11, 200(r10)
stw r12, 204(r10)
stw r12, 208(r10)
stw r12, 212(r10)
stw r11, 216(r10)
stw r11, 220(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r11, 8(r10)
stw r11, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r11, 24(r10)
stw r11, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r11, 40(r10)
stw r11, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r11, 56(r10)
stw r11, 60(r10)
stw r12, 64(r10)
stw r11, 68(r10)
stw r11, 72(r10)
stw r11, 76(r10)
stw r11, 80(r10)
stw r11, 84(r10)
stw r11, 88(r10)
stw r11, 92(r10)
stw r12, 96(r10)
stw r12, 100(r10)
stw r11, 104(r10)
stw r11, 108(r10)
stw r12, 112(r10)
stw r12, 116(r10)
stw r11, 120(r10)
stw r11, 124(r10)
stw r12, 128(r10)
stw r12, 132(r10)
stw r11, 136(r10)
stw r11, 140(r10)
stw r11, 144(r10)
stw r11, 148(r10)
stw r11, 152(r10)
stw r12, 156(r10)
stw r12, 160(r10)
stw r12, 164(r10)
stw r11, 168(r10)
stw r11, 172(r10)
stw r12, 176(r10)
stw r12, 180(r10)
stw r11, 184(r10)
stw r11, 188(r10)
stw r12, 192(r10)
stw r11, 196(r10)
stw r11, 200(r10)
stw r11, 204(r10)
stw r11, 208(r10)
stw r11, 212(r10)
stw r11, 216(r10)
stw r11, 220(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r11, 8(r10)
stw r11, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r11, 24(r10)
stw r11, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r11, 40(r10)
stw r11, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r11, 68(r10)
stw r11, 72(r10)
stw r12, 76(r10)
stw r12, 80(r10)
stw r12, 84(r10)
stw r12, 88(r10)
stw r12, 92(r10)
stw r12, 96(r10)
stw r12, 100(r10)
stw r11, 104(r10)
stw r11, 108(r10)
stw r12, 112(r10)
stw r12, 116(r10)
stw r11, 120(r10)
stw r11, 124(r10)
stw r12, 128(r10)
stw r11, 132(r10)
stw r11, 136(r10)
stw r12, 140(r10)
stw r12, 144(r10)
stw r11, 148(r10)
stw r11, 152(r10)
stw r12, 156(r10)
stw r12, 160(r10)
stw r12, 164(r10)
stw r11, 168(r10)
stw r11, 172(r10)
stw r12, 176(r10)
stw r12, 180(r10)
stw r12, 184(r10)
stw r12, 188(r10)
stw r12, 192(r10)
stw r11, 196(r10)
stw r11, 200(r10)
stw r12, 204(r10)
stw r12, 208(r10)
stw r12, 212(r10)
stw r12, 216(r10)
stw r12, 220(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r11, 8(r10)
stw r11, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r11, 24(r10)
stw r11, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r11, 40(r10)
stw r11, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r11, 68(r10)
stw r11, 72(r10)
stw r12, 76(r10)
stw r12, 80(r10)
stw r12, 84(r10)
stw r12, 88(r10)
stw r12, 92(r10)
stw r12, 96(r10)
stw r12, 100(r10)
stw r11, 104(r10)
stw r11, 108(r10)
stw r12, 112(r10)
stw r12, 116(r10)
stw r11, 120(r10)
stw r11, 124(r10)
stw r12, 128(r10)
stw r11, 132(r10)
stw r11, 136(r10)
stw r12, 140(r10)
stw r12, 144(r10)
stw r11, 148(r10)
stw r11, 152(r10)
stw r12, 156(r10)
stw r12, 160(r10)
stw r12, 164(r10)
stw r11, 168(r10)
stw r11, 172(r10)
stw r12, 176(r10)
stw r12, 180(r10)
stw r12, 184(r10)
stw r12, 188(r10)
stw r12, 192(r10)
stw r11, 196(r10)
stw r11, 200(r10)
stw r12, 204(r10)
stw r12, 208(r10)
stw r12, 212(r10)
stw r12, 216(r10)
stw r12, 220(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r11, 8(r10)
stw r11, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r11, 24(r10)
stw r11, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r11, 40(r10)
stw r11, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r11, 68(r10)
stw r11, 72(r10)
stw r12, 76(r10)
stw r12, 80(r10)
stw r12, 84(r10)
stw r11, 88(r10)
stw r11, 92(r10)
stw r12, 96(r10)
stw r12, 100(r10)
stw r11, 104(r10)
stw r11, 108(r10)
stw r12, 112(r10)
stw r12, 116(r10)
stw r11, 120(r10)
stw r11, 124(r10)
stw r12, 128(r10)
stw r11, 132(r10)
stw r11, 136(r10)
stw r12, 140(r10)
stw r12, 144(r10)
stw r11, 148(r10)
stw r11, 152(r10)
stw r12, 156(r10)
stw r12, 160(r10)
stw r12, 164(r10)
stw r11, 168(r10)
stw r11, 172(r10)
stw r12, 176(r10)
stw r12, 180(r10)
stw r12, 184(r10)
stw r12, 188(r10)
stw r12, 192(r10)
stw r11, 196(r10)
stw r11, 200(r10)
stw r12, 204(r10)
stw r12, 208(r10)
stw r12, 212(r10)
stw r11, 216(r10)
stw r11, 220(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r11, 8(r10)
stw r11, 12(r10)
stw r11, 16(r10)
stw r11, 20(r10)
stw r11, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r11, 36(r10)
stw r11, 40(r10)
stw r11, 44(r10)
stw r11, 48(r10)
stw r12, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r11, 72(r10)
stw r11, 76(r10)
stw r11, 80(r10)
stw r11, 84(r10)
stw r11, 88(r10)
stw r12, 92(r10)
stw r12, 96(r10)
stw r12, 100(r10)
stw r11, 104(r10)
stw r11, 108(r10)
stw r11, 112(r10)
stw r11, 116(r10)
stw r11, 120(r10)
stw r12, 124(r10)
stw r12, 128(r10)
stw r12, 132(r10)
stw r11, 136(r10)
stw r11, 140(r10)
stw r11, 144(r10)
stw r12, 148(r10)
stw r11, 152(r10)
stw r11, 156(r10)
stw r12, 160(r10)
stw r11, 164(r10)
stw r11, 168(r10)
stw r11, 172(r10)
stw r11, 176(r10)
stw r12, 180(r10)
stw r12, 184(r10)
stw r12, 188(r10)
stw r12, 192(r10)
stw r12, 196(r10)
stw r11, 200(r10)
stw r11, 204(r10)
stw r11, 208(r10)
stw r11, 212(r10)
stw r11, 216(r10)
stw r12, 220(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r11, 8(r10)
stw r11, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r12, 72(r10)
stw r12, 76(r10)
stw r12, 80(r10)
stw r12, 84(r10)
stw r12, 88(r10)
stw r12, 92(r10)
stw r12, 96(r10)
stw r12, 100(r10)
stw r11, 104(r10)
stw r11, 108(r10)
stw r12, 112(r10)
stw r12, 116(r10)
stw r12, 120(r10)
stw r12, 124(r10)
stw r12, 128(r10)
stw r12, 132(r10)
stw r12, 136(r10)
stw r12, 140(r10)
stw r12, 144(r10)
stw r12, 148(r10)
stw r12, 152(r10)
stw r12, 156(r10)
stw r12, 160(r10)
stw r12, 164(r10)
stw r12, 168(r10)
stw r12, 172(r10)
stw r12, 176(r10)
stw r12, 180(r10)
stw r12, 184(r10)
stw r12, 188(r10)
stw r12, 192(r10)
stw r12, 196(r10)
stw r12, 200(r10)
stw r12, 204(r10)
stw r12, 208(r10)
stw r12, 212(r10)
stw r12, 216(r10)
stw r12, 220(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r11, 8(r10)
stw r11, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r12, 72(r10)
stw r12, 76(r10)
stw r12, 80(r10)
stw r12, 84(r10)
stw r12, 88(r10)
stw r12, 92(r10)
stw r12, 96(r10)
stw r12, 100(r10)
stw r11, 104(r10)
stw r11, 108(r10)
stw r12, 112(r10)
stw r12, 116(r10)
stw r12, 120(r10)
stw r12, 124(r10)
stw r12, 128(r10)
stw r12, 132(r10)
stw r12, 136(r10)
stw r12, 140(r10)
stw r12, 144(r10)
stw r12, 148(r10)
stw r12, 152(r10)
stw r12, 156(r10)
stw r12, 160(r10)
stw r12, 164(r10)
stw r12, 168(r10)
stw r12, 172(r10)
stw r12, 176(r10)
stw r12, 180(r10)
stw r12, 184(r10)
stw r12, 188(r10)
stw r12, 192(r10)
stw r12, 196(r10)
stw r12, 200(r10)
stw r12, 204(r10)
stw r12, 208(r10)
stw r12, 212(r10)
stw r12, 216(r10)
stw r12, 220(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r11, 4(r10)
stw r11, 8(r10)
stw r11, 12(r10)
stw r11, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r12, 72(r10)
stw r12, 76(r10)
stw r12, 80(r10)
stw r12, 84(r10)
stw r12, 88(r10)
stw r12, 92(r10)
stw r12, 96(r10)
stw r11, 100(r10)
stw r11, 104(r10)
stw r11, 108(r10)
stw r11, 112(r10)
stw r12, 116(r10)
stw r12, 120(r10)
stw r12, 124(r10)
stw r12, 128(r10)
stw r12, 132(r10)
stw r12, 136(r10)
stw r12, 140(r10)
stw r12, 144(r10)
stw r12, 148(r10)
stw r12, 152(r10)
stw r12, 156(r10)
stw r12, 160(r10)
stw r12, 164(r10)
stw r12, 168(r10)
stw r12, 172(r10)
stw r12, 176(r10)
stw r12, 180(r10)
stw r12, 184(r10)
stw r12, 188(r10)
stw r12, 192(r10)
stw r12, 196(r10)
stw r12, 200(r10)
stw r12, 204(r10)
stw r12, 208(r10)
stw r12, 212(r10)
stw r12, 216(r10)
stw r12, 220(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r12, 8(r10)
stw r12, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r12, 72(r10)
stw r12, 76(r10)
stw r12, 80(r10)
stw r12, 84(r10)
stw r12, 88(r10)
stw r12, 92(r10)
stw r12, 96(r10)
stw r12, 100(r10)
stw r12, 104(r10)
stw r12, 108(r10)
stw r12, 112(r10)
stw r12, 116(r10)
stw r12, 120(r10)
stw r12, 124(r10)
stw r12, 128(r10)
stw r12, 132(r10)
stw r12, 136(r10)
stw r12, 140(r10)
stw r12, 144(r10)
stw r12, 148(r10)
stw r12, 152(r10)
stw r12, 156(r10)
stw r12, 160(r10)
stw r12, 164(r10)
stw r12, 168(r10)
stw r12, 172(r10)
stw r12, 176(r10)
stw r12, 180(r10)
stw r12, 184(r10)
stw r12, 188(r10)
stw r12, 192(r10)
stw r12, 196(r10)
stw r12, 200(r10)
stw r12, 204(r10)
stw r12, 208(r10)
stw r12, 212(r10)
stw r12, 216(r10)
stw r12, 220(r10)
#endif
.endm
 
.macro DEBUG_rfi
#ifdef CONFIG_DEBUG
stw r12, 0(r10)
stw r12, 4(r10)
stw r12, 8(r10)
stw r12, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r12, 72(r10)
stw r12, 76(r10)
stw r12, 80(r10)
stw r12, 84(r10)
stw r12, 88(r10)
stw r12, 92(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r12, 8(r10)
stw r12, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r12, 72(r10)
stw r12, 76(r10)
stw r12, 80(r10)
stw r12, 84(r10)
stw r12, 88(r10)
stw r12, 92(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r12, 8(r10)
stw r12, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r12, 44(r10)
stw r11, 48(r10)
stw r11, 52(r10)
stw r11, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r12, 72(r10)
stw r12, 76(r10)
stw r11, 80(r10)
stw r11, 84(r10)
stw r12, 88(r10)
stw r12, 92(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r12, 8(r10)
stw r12, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r11, 44(r10)
stw r11, 48(r10)
stw r12, 52(r10)
stw r11, 56(r10)
stw r11, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r12, 72(r10)
stw r12, 76(r10)
stw r11, 80(r10)
stw r11, 84(r10)
stw r12, 88(r10)
stw r12, 92(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r12, 8(r10)
stw r12, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r11, 44(r10)
stw r11, 48(r10)
stw r12, 52(r10)
stw r12, 56(r10)
stw r11, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r12, 72(r10)
stw r12, 76(r10)
stw r12, 80(r10)
stw r12, 84(r10)
stw r12, 88(r10)
stw r12, 92(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r11, 4(r10)
stw r11, 8(r10)
stw r12, 12(r10)
stw r11, 16(r10)
stw r11, 20(r10)
stw r11, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r11, 44(r10)
stw r11, 48(r10)
stw r12, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r12, 72(r10)
stw r11, 76(r10)
stw r11, 80(r10)
stw r11, 84(r10)
stw r12, 88(r10)
stw r12, 92(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r11, 8(r10)
stw r11, 12(r10)
stw r11, 16(r10)
stw r12, 20(r10)
stw r11, 24(r10)
stw r11, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r11, 40(r10)
stw r11, 44(r10)
stw r11, 48(r10)
stw r11, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r12, 72(r10)
stw r12, 76(r10)
stw r11, 80(r10)
stw r11, 84(r10)
stw r12, 88(r10)
stw r12, 92(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r11, 8(r10)
stw r11, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r11, 24(r10)
stw r11, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r11, 44(r10)
stw r11, 48(r10)
stw r12, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r12, 72(r10)
stw r12, 76(r10)
stw r11, 80(r10)
stw r11, 84(r10)
stw r12, 88(r10)
stw r12, 92(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r11, 8(r10)
stw r11, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r11, 44(r10)
stw r11, 48(r10)
stw r12, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r12, 72(r10)
stw r12, 76(r10)
stw r11, 80(r10)
stw r11, 84(r10)
stw r12, 88(r10)
stw r12, 92(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r11, 8(r10)
stw r11, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r11, 44(r10)
stw r11, 48(r10)
stw r12, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r12, 72(r10)
stw r12, 76(r10)
stw r11, 80(r10)
stw r11, 84(r10)
stw r12, 88(r10)
stw r12, 92(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r11, 8(r10)
stw r11, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r11, 44(r10)
stw r11, 48(r10)
stw r12, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r12, 72(r10)
stw r12, 76(r10)
stw r11, 80(r10)
stw r11, 84(r10)
stw r12, 88(r10)
stw r12, 92(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r11, 4(r10)
stw r11, 8(r10)
stw r11, 12(r10)
stw r11, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r11, 40(r10)
stw r11, 44(r10)
stw r11, 48(r10)
stw r11, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r12, 72(r10)
stw r11, 76(r10)
stw r11, 80(r10)
stw r11, 84(r10)
stw r11, 88(r10)
stw r12, 92(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r12, 8(r10)
stw r12, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r12, 72(r10)
stw r12, 76(r10)
stw r12, 80(r10)
stw r12, 84(r10)
stw r12, 88(r10)
stw r12, 92(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r12, 8(r10)
stw r12, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r12, 72(r10)
stw r12, 76(r10)
stw r12, 80(r10)
stw r12, 84(r10)
stw r12, 88(r10)
stw r12, 92(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r12, 8(r10)
stw r12, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r12, 72(r10)
stw r12, 76(r10)
stw r12, 80(r10)
stw r12, 84(r10)
stw r12, 88(r10)
stw r12, 92(r10)
add r10, r10, r9
stw r12, 0(r10)
stw r12, 4(r10)
stw r12, 8(r10)
stw r12, 12(r10)
stw r12, 16(r10)
stw r12, 20(r10)
stw r12, 24(r10)
stw r12, 28(r10)
stw r12, 32(r10)
stw r12, 36(r10)
stw r12, 40(r10)
stw r12, 44(r10)
stw r12, 48(r10)
stw r12, 52(r10)
stw r12, 56(r10)
stw r12, 60(r10)
stw r12, 64(r10)
stw r12, 68(r10)
stw r12, 72(r10)
stw r12, 76(r10)
stw r12, 80(r10)
stw r12, 84(r10)
stw r12, 88(r10)
stw r12, 92(r10)
#endif
.endm
/tags/0.2.0/boot/arch/ppc32/loader/regname.h
0,0 → 1,221
/*
* 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 ibat0u 528
#define ibat0l 529
#define ibat1u 530
#define ibat1l 531
#define ibat2u 532
#define ibat2l 533
#define ibat3u 534
#define ibat3l 535
#define dbat0u 536
#define dbat0l 537
#define dbat1u 538
#define dbat1l 539
#define dbat2u 540
#define dbat2l 541
#define dbat3u 542
#define dbat3l 543
#define hid0 1008
 
/* MSR bits */
#define msr_ir (1 << 4)
#define msr_dr (1 << 5)
#define msr_ee (1 << 15)
 
/* HID0 bits */
#define hid0_ice (1 << 15)
#define hid0_dce (1 << 14)
#define hid0_icfi (1 << 11)
#define hid0_dci (1 << 10)
 
#endif
/tags/0.2.0/boot/arch/ppc32/loader/asm.h
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.
*/
 
#ifndef __ASM_H__
#define __ASM_H__
 
#define PAGE_SIZE 4096
#define PAGE_WIDTH 12
 
#define TRANS_SIZE 1024
#define TRANS_ITEM_SIZE 4
 
#define KERNEL_START_ADDR 0x80004000
 
#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 int bootinfo_size, void *trans, unsigned int kernel_size, void *real_mode, void *fb, unsigned int scanline) __attribute__((noreturn));
extern void real_mode();
 
#endif
 
#endif
/tags/0.2.0/boot/arch/ppc32/loader/pack
0,0 → 1,118
#! /bin/sh
 
#
# 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.
#
 
[ "$#" -lt 1 ] && exit 1
 
OBJCOPY="$1"
LINK="_link.ld"
HEADER="_components.h"
 
shift
 
echo 'OUTPUT_FORMAT("elf32-powerpc")
OUTPUT_ARCH(powerpc:common)
ENTRY(start)
 
SECTIONS {
.boot 0x10000000: AT (0) {
*(BOOTSTRAP);
*(REALMODE);
*(.text);
*(.rodata);
*(.rodata.*);
*(.data); /* initialized data */
*(.sdata);
*(.sdata2);
*(.sbss);
*(.bss); /* uninitialized static variables */
*(COMMON); /* global variables */
. = ALIGN(4096);
*(.kernel_image);' > "$LINK"
 
echo '#ifndef ___COMPONENTS_H__
#define ___COMPONENTS_H__
 
typedef struct {
char *name;
void *start;
void *end;
unsigned int size;
} component_t;' > "$HEADER"
 
COUNT="0"
DATA=""
 
for TASK in "$@" ; do
BASENAME="`basename "$TASK" | sed 's/^\(.*\)\.[^.]*$/\1/'`"
OBJECT="${BASENAME}.o"
SYMBOL="`echo "_binary_$TASK" | tr "./" "__"`"
MACRO="`echo "$BASENAME" | tr [:lower:] [:upper:]`"
echo "$TASK -> $OBJECT"
echo "
. = ALIGN(4096);
*(.${BASENAME}_image);" >> "$LINK"
echo "
extern int ${SYMBOL}_start;
extern int ${SYMBOL}_end;
 
#define ${MACRO}_START ((void *) &${SYMBOL}_start)
#define ${MACRO}_END ((void *) &${SYMBOL}_end)
#define ${MACRO}_SIZE ((unsigned int) ${MACRO}_END - (unsigned int) ${MACRO}_START)" >> "$HEADER"
"$OBJCOPY" -I binary -O elf32-powerpc -B powerpc:common --rename-section ".data=.${BASENAME}_image" "$TASK" "$OBJECT"
DATA="${DATA}
components[$COUNT].name = \"${BASENAME}\";
components[$COUNT].start = ${MACRO}_START;
components[$COUNT].end = ${MACRO}_END;
components[$COUNT].size = ${MACRO}_SIZE;";
COUNT="`expr "$COUNT" + 1`"
done
 
echo ' }
}' >> "$LINK"
 
echo "
#define COMPONENTS $COUNT
 
component_t components[COMPONENTS];
 
static void init_components(void)
{
$DATA
}
 
#endif
" >> "$HEADER"
Property changes:
Added: svn:executable
+*
\ No newline at end of property
/tags/0.2.0/boot/arch/ppc32/loader/boot.S
0,0 → 1,42
#
# 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@ha
addi r4, r4, ofw@l
stw r5, 0(r4)
bl init
b bootstrap
/tags/0.2.0/boot/arch/ppc32/loader/printf.h
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.
*/
 
#ifndef __PRINTF_H__
#define __PRINTF_H__
 
#define INT8 1
#define INT16 2
#define INT32 4
#define INT64 8
 
typedef signed char __s8;
 
typedef unsigned char __u8;
typedef unsigned short __u16;
typedef unsigned int __u32;
typedef unsigned long long __u64;
 
typedef __u32 __address;
typedef __u32 __native;
 
typedef char *char_ptr;
 
void puts(const char *str);
void printf(const char *fmt, ...);
 
#endif
/tags/0.2.0/boot/arch/ppc32/loader/printf.c
0,0 → 1,243
/*
* 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 "printf.h"
#include "ofw.h"
 
static char digits[] = "0123456789abcdef"; /**< Hexadecimal characters */
 
 
void puts(const char *str)
{
int len = 0;
while (str[len] != 0)
len++;
ofw_write(str, len);
}
 
 
/** Print hexadecimal digits
*
* Print fixed count of hexadecimal digits from
* the number num. The digits are printed in
* natural left-to-right order starting with
* the width-th digit.
*
* @param num Number containing digits.
* @param width Count of digits to print.
*
*/
static void print_fixed_hex(const __u64 num, const int width)
{
int i;
for (i = width * 8 - 4; i >= 0; i -= 4)
ofw_write(digits + ((num >> i) & 0xf), 1);
}
 
 
/** Print number in given base
*
* Print significant digits of a number in given
* base.
*
* @param num Number to print.
* @param base Base to print the number in (should
* be in range 2 .. 16).
*
*/
static void print_number(const __native num, const unsigned int base)
{
int val = num;
char d[sizeof(__native) * 8 + 1]; /* this is good enough even for base == 2 */
int i = sizeof(__native) * 8 - 1;
do {
d[i--] = digits[val % base];
} while (val /= base);
d[sizeof(__native) * 8] = 0;
puts(&d[i + 1]);
}
 
 
/** General formatted text print
*
* Print text formatted according the fmt parameter
* and variant arguments. Each formatting directive
* begins with \% (percentage) character and one of the
* following character:
*
* \% Prints the percentage character.
*
* s The next variant argument is treated as char*
* and printed as a NULL terminated string.
*
* c The next variant argument is treated as a single char.
*
* p The next variant argument is treated as a maximum
* bit-width integer with respect to architecture
* and printed in full hexadecimal width.
*
* P As with 'p', but '0x' is prefixed.
*
* q The next variant argument is treated as a 64b integer
* and printed in full hexadecimal width.
*
* Q As with 'q', but '0x' is prefixed.
*
* l The next variant argument is treated as a 32b integer
* and printed in full hexadecimal width.
*
* L As with 'l', but '0x' is prefixed.
*
* w The next variant argument is treated as a 16b integer
* and printed in full hexadecimal width.
*
* W As with 'w', but '0x' is prefixed.
*
* b The next variant argument is treated as a 8b integer
* and printed in full hexadecimal width.
*
* B As with 'b', but '0x' is prefixed.
*
* d The next variant argument is treated as integer
* and printed in standard decimal format (only significant
* digits).
*
* x The next variant argument is treated as integer
* and printed in standard hexadecimal format (only significant
* digits).
*
* X As with 'x', but '0x' is prefixed.
*
* All other characters from fmt except the formatting directives
* are printed in verbatim.
*
* @param fmt Formatting NULL terminated string.
*/
void printf(const char *fmt, ...)
{
int i = 0;
va_list ap;
char c;
va_start(ap, fmt);
while ((c = fmt[i++])) {
switch (c) {
/* control character */
case '%':
switch (c = fmt[i++]) {
/* percentile itself */
case '%':
break;
/*
* String and character conversions.
*/
case 's':
puts(va_arg(ap, char_ptr));
goto loop;
case 'c':
c = (char) va_arg(ap, int);
break;
/*
* Hexadecimal conversions with fixed width.
*/
case 'P':
puts("0x");
case 'p':
print_fixed_hex(va_arg(ap, __native), sizeof(__native));
goto loop;
case 'Q':
puts("0x");
case 'q':
print_fixed_hex(va_arg(ap, __u64), INT64);
goto loop;
case 'L':
puts("0x");
case 'l':
print_fixed_hex(va_arg(ap, __native), INT32);
goto loop;
case 'W':
puts("0x");
case 'w':
print_fixed_hex(va_arg(ap, __native), INT16);
goto loop;
case 'B':
puts("0x");
case 'b':
print_fixed_hex(va_arg(ap, __native), INT8);
goto loop;
/*
* Decimal and hexadecimal conversions.
*/
case 'd':
print_number(va_arg(ap, __native), 10);
goto loop;
case 'X':
puts("0x");
case 'x':
print_number(va_arg(ap, __native), 16);
goto loop;
/*
* Bad formatting.
*/
default:
goto out;
}
default:
if (c == '\n')
ofw_write("\r", 1);
ofw_write(&c, 1);
}
loop:
;
}
out:
va_end(ap);
}
/tags/0.2.0/boot/arch/ppc32/Makefile.inc
0,0 → 1,39
#
# 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.
#
 
build: image.boot
 
image.boot: kernel uspace
make -C arch/$(ARCH)/loader COMPILER=$(COMPILER) KERNELDIR=../../../$(KERNELDIR) USPACEDIR=../../../$(USPACEDIR) "DEFS=$(DEFS)"
cp arch/$(ARCH)/loader/image.boot image.boot
 
clean: clean_kernel clean_uspace
make -C arch/$(ARCH)/loader clean KERNELDIR=../../../$(KERNELDIR) USPACEDIR=../../../$(USPACEDIR)
-rm -f image.boot
 
arch_distclean: distclean_kernel distclean_uspace
/tags/0.2.0/boot/arch/amd64/grub/menu.lst
0,0 → 1,15
default 0
timeout 10
 
title=HelenOS
root (cd)
kernel /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/ipcc
module /boot/klog
/tags/0.2.0/boot/arch/amd64/grub/stage2_eltorito
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/tags/0.2.0/boot/arch/amd64/grub/COPYING
0,0 → 1,340
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.
/tags/0.2.0/boot/arch/amd64/grub/README
0,0 → 1,5
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/
/tags/0.2.0/boot/arch/amd64/Makefile.inc
0,0 → 1,51
#
# 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.
#
 
build: image.iso
 
image.iso: kernel uspace
mkdir -p arch/$(ARCH)/iso/boot/grub
cp arch/$(ARCH)/grub/stage2_eltorito arch/$(ARCH)/iso/boot/grub/
cp arch/$(ARCH)/grub/menu.lst arch/$(ARCH)/iso/boot/grub/
cp $(KERNELDIR)/kernel.bin arch/$(ARCH)/iso/boot/
cp $(USPACEDIR)/init/init arch/$(ARCH)/iso/boot/
cp $(USPACEDIR)/ns/ns arch/$(ARCH)/iso/boot/
cp $(USPACEDIR)/pci/pci arch/$(ARCH)/iso/boot/
cp $(USPACEDIR)/fb/fb arch/$(ARCH)/iso/boot/
cp $(USPACEDIR)/kbd/kbd arch/$(ARCH)/iso/boot/
cp $(USPACEDIR)/console/console arch/$(ARCH)/iso/boot/
cp $(USPACEDIR)/tetris/tetris arch/$(ARCH)/iso/boot/
cp $(USPACEDIR)/ipcc/ipcc arch/$(ARCH)/iso/boot/
cp $(USPACEDIR)/klog/klog arch/$(ARCH)/iso/boot/
mkisofs -J -r -b boot/grub/stage2_eltorito -no-emul-boot -boot-load-size 4 -boot-info-table -o image.iso arch/$(ARCH)/iso/
 
clean: clean_kernel clean_uspace
-rm -fr arch/$(ARCH)/iso
-rm -f image.iso
 
arch_distclean: distclean_kernel distclean_uspace
/tags/0.2.0/boot/arch/ia32/grub/menu.lst
0,0 → 1,15
default 0
timeout 10
 
title=HelenOS
root (cd)
kernel /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/ipcc
module /boot/klog
/tags/0.2.0/boot/arch/ia32/grub/stage2_eltorito
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/tags/0.2.0/boot/arch/ia32/grub/COPYING
0,0 → 1,340
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.
/tags/0.2.0/boot/arch/ia32/grub/README
0,0 → 1,5
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/
/tags/0.2.0/boot/arch/ia32/Makefile.inc
0,0 → 1,51
#
# 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.
#
 
build: image.iso
 
image.iso: kernel uspace
mkdir -p arch/$(ARCH)/iso/boot/grub
cp arch/$(ARCH)/grub/stage2_eltorito arch/$(ARCH)/iso/boot/grub/
cp arch/$(ARCH)/grub/menu.lst arch/$(ARCH)/iso/boot/grub/
cp $(KERNELDIR)/kernel.bin arch/$(ARCH)/iso/boot/
cp $(USPACEDIR)/init/init arch/$(ARCH)/iso/boot/
cp $(USPACEDIR)/ns/ns arch/$(ARCH)/iso/boot/
cp $(USPACEDIR)/pci/pci arch/$(ARCH)/iso/boot/
cp $(USPACEDIR)/fb/fb arch/$(ARCH)/iso/boot/
cp $(USPACEDIR)/kbd/kbd arch/$(ARCH)/iso/boot/
cp $(USPACEDIR)/console/console arch/$(ARCH)/iso/boot/
cp $(USPACEDIR)/tetris/tetris arch/$(ARCH)/iso/boot/
cp $(USPACEDIR)/ipcc/ipcc arch/$(ARCH)/iso/boot/
cp $(USPACEDIR)/klog/klog arch/$(ARCH)/iso/boot/
mkisofs -J -r -b boot/grub/stage2_eltorito -no-emul-boot -boot-load-size 4 -boot-info-table -o image.iso arch/$(ARCH)/iso/
 
clean: clean_kernel clean_uspace
-rm -fr arch/$(ARCH)/iso
-rm -f image.iso
 
arch_distclean: distclean_kernel distclean_uspace
/tags/0.2.0/boot/arch/ppc64/loader/ofw.c
0,0 → 1,247
/*
* 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 "ofw.h"
#include "asm.h"
#include "printf.h"
 
#define MAX_OFW_ARGS 10
#define BUF_SIZE 1024
 
typedef unsigned int ofw_arg_t;
typedef unsigned int ihandle;
typedef unsigned int phandle;
 
/** OpenFirmware command structure
*
*/
typedef struct {
const char *service; /**< Command name */
unsigned int nargs; /**< Number of in arguments */
unsigned int nret; /**< Number of out arguments */
ofw_arg_t args[MAX_OFW_ARGS]; /**< List of arguments */
} ofw_args_t;
 
typedef void (*ofw_entry)(ofw_args_t *);
 
 
ofw_entry ofw;
 
phandle ofw_chosen;
ihandle ofw_stdout;
phandle ofw_root;
ihandle ofw_mmu;
phandle ofw_memory;
phandle ofw_aliases;
 
 
static int ofw_call(const char *service, const int nargs, const int nret, ofw_arg_t *rets, ...)
{
va_list list;
ofw_args_t args;
int i;
args.service = service;
args.nargs = nargs;
args.nret = nret;
va_start(list, rets);
for (i = 0; i < nargs; i++)
args.args[i] = va_arg(list, ofw_arg_t);
va_end(list);
for (i = 0; i < nret; i++)
args.args[i + nargs] = 0;
ofw(&args);
for (i = 1; i < nret; i++)
rets[i - 1] = args.args[i + nargs];
return args.args[nargs];
}
 
 
static phandle ofw_find_device(const char *name)
{
return ofw_call("finddevice", 1, 1, NULL, name);
}
 
 
static int ofw_get_property(const phandle device, const char *name, const void *buf, const int buflen)
{
return ofw_call("getprop", 4, 1, NULL, device, name, buf, buflen);
}
 
 
static unsigned int ofw_get_address_cells(const phandle device)
{
unsigned int ret;
if (ofw_get_property(device, "#address-cells", &ret, sizeof(ret)) <= 0)
if (ofw_get_property(ofw_root, "#address-cells", &ret, sizeof(ret)) <= 0)
ret = 1;
return ret;
}
 
 
static unsigned int ofw_get_size_cells(const phandle device)
{
unsigned int ret;
if (ofw_get_property(device, "#size-cells", &ret, sizeof(ret)) <= 0)
if (ofw_get_property(ofw_root, "#size-cells", &ret, sizeof(ret)) <= 0)
ret = 1;
return ret;
}
 
 
static ihandle ofw_open(const char *name)
{
return ofw_call("open", 1, 1, NULL, name);
}
 
 
void init(void)
{
ofw_chosen = ofw_find_device("/chosen");
if (ofw_chosen == -1)
halt();
if (ofw_get_property(ofw_chosen, "stdout", &ofw_stdout, sizeof(ofw_stdout)) <= 0)
ofw_stdout = 0;
ofw_root = ofw_find_device("/");
if (ofw_root == -1) {
puts("\r\nError: Unable to find / device, halted.\r\n");
halt();
}
if (ofw_get_property(ofw_chosen, "mmu", &ofw_mmu, sizeof(ofw_mmu)) <= 0) {
puts("\r\nError: Unable to get mmu property, halted.\r\n");
halt();
}
ofw_memory = ofw_find_device("/memory");
if (ofw_memory == -1) {
puts("\r\nError: Unable to find /memory device, halted.\r\n");
halt();
}
ofw_aliases = ofw_find_device("/aliases");
if (ofw_aliases == -1) {
puts("\r\nError: Unable to find /aliases device, halted.\r\n");
halt();
}
}
 
 
void ofw_write(const char *str, const long len)
{
if (ofw_stdout == 0)
return;
ofw_call("write", 3, 1, NULL, ofw_stdout, str, len);
}
 
 
void *ofw_translate(const void *virt)
{
ofw_arg_t result[3];
if (ofw_call("call-method", 4, 4, result, "translate", ofw_mmu, (unsigned long) virt, 1) != 0) {
puts("Error: MMU method translate() failed, halting.\n");
halt();
}
return (void *) (unsigned long) result[2];
}
 
 
int ofw_map(const void *phys, const void *virt, const long size, const int mode)
{
return ofw_call("call-method", 6, 1, NULL, "map", ofw_mmu, mode, size, virt, phys);
}
 
 
int ofw_memmap(memmap_t *map)
{
unsigned int buf[BUF_SIZE];
int ret = ofw_get_property(ofw_memory, "reg", buf, sizeof(unsigned int) * BUF_SIZE);
if (ret <= 0)
return false;
unsigned int ac = ofw_get_address_cells(ofw_memory);
unsigned int sc = ofw_get_size_cells(ofw_memory);
int pos;
map->total = 0;
map->count = 0;
for (pos = 0; (pos < ret / sizeof(unsigned int)) && (map->count < MEMMAP_MAX_RECORDS); pos += ac + sc) {
void * start = (void *) (unsigned long) buf[pos + ac - 1];
unsigned int size = buf[pos + ac + sc - 1];
if (size > 0) {
map->zones[map->count].start = start;
map->zones[map->count].size = size;
map->count++;
map->total += size;
}
}
}
 
 
int ofw_screen(screen_t *screen)
{
char device_name[BUF_SIZE];
if (ofw_get_property(ofw_aliases, "screen", device_name, sizeof(char) * BUF_SIZE) <= 0)
return false;
phandle device = ofw_find_device(device_name);
if (device == -1)
return false;
if (ofw_get_property(device, "address", &screen->addr, sizeof(screen->addr)) <= 0)
return false;
if (ofw_get_property(device, "width", &screen->width, sizeof(screen->width)) <= 0)
return false;
if (ofw_get_property(device, "height", &screen->height, sizeof(screen->height)) <= 0)
return false;
if (ofw_get_property(device, "depth", &screen->bpp, sizeof(screen->bpp)) <= 0)
return false;
if (ofw_get_property(device, "linebytes", &screen->scanline, sizeof(screen->scanline)) <= 0)
return false;
return true;
}
/tags/0.2.0/boot/arch/ppc64/loader/Makefile
0,0 → 1,90
#
# 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.
#
 
## Toolchain configuration
#
 
TARGET = ppc64-linux-gnu
TOOLCHAIN_DIR = /usr/local/ppc64/bin
 
ifeq ($(COMPILER),native)
CC = gcc
AS = as
LD = ld
OBJCOPY = objcopy
OBJDUMP = objdump
else
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 = -nostdinc -nostdlib -fno-builtin -Werror-implicit-function-declaration -Wmissing-prototypes -Werror -O3 -mcpu=powerpc64 -msoft-float -m64
DEFS =
 
SOURCES = \
main.c \
ofw.c \
printf.c \
asm.S \
boot.S
 
COMPONENTS = \
$(KERNELDIR)/kernel.bin \
$(USPACEDIR)/ns/ns \
$(USPACEDIR)/init/init \
$(USPACEDIR)/fb/fb
 
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) kernel.o
$(LD) -no-check-sections -N -T _link.ld $(COMPONENT_OBJECTS) $(OBJECTS) -o $@
 
depend:
-makedepend $(DEFS) $(CFLAGS) -f - $(SOURCES) > Makefile.depend 2> /dev/null
 
clean:
-rm -f _components.h _link.ld $(COMPONENT_OBJECTS) $(OBJECTS) image.boot Makefile.depend
 
_components.h _link.ld $(COMPONENT_OBJECTS): $(COMPONENTS)
./pack $(OBJCOPY) $(COMPONENTS)
 
%.o: %.S
$(CC) $(DEFS) $(CFLAGS) -D__ASM__ -c $< -o $@
 
%.o: %.c
$(CC) $(DEFS) $(CFLAGS) -c $< -o $@
/tags/0.2.0/boot/arch/ppc64/loader/pack
0,0 → 1,124
#! /bin/sh
 
#
# 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.
#
 
[ "$#" -lt 1 ] && exit 1
 
OBJCOPY="$1"
LINK="_link.ld"
HEADER="_components.h"
 
shift
 
echo '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 */
. = ALIGN(4096);
*(.kernel_image);' > "$LINK"
 
echo '#ifndef ___COMPONENTS_H__
#define ___COMPONENTS_H__
 
typedef struct {
char *name;
void *start;
void *end;
unsigned long size;
} component_t;' > "$HEADER"
 
COUNT="0"
DATA=""
 
for TASK in "$@" ; do
BASENAME="`basename "$TASK" | sed 's/^\(.*\)\.[^.]*$/\1/'`"
OBJECT="${BASENAME}.o"
SYMBOL="`echo "_binary_$TASK" | tr "./" "__"`"
MACRO="`echo "$BASENAME" | tr [:lower:] [:upper:]`"
echo "$TASK -> $OBJECT"
echo "
. = ALIGN(4096);
*(.${BASENAME}_image);" >> "$LINK"
echo "
extern int ${SYMBOL}_start;
extern int ${SYMBOL}_end;
 
#define ${MACRO}_START ((void *) &${SYMBOL}_start)
#define ${MACRO}_END ((void *) &${SYMBOL}_end)
#define ${MACRO}_SIZE ((unsigned long) ${MACRO}_END - (unsigned long) ${MACRO}_START)" >> "$HEADER"
"$OBJCOPY" -I binary -O elf64-powerpc -B powerpc:common64 --rename-section ".data=.${BASENAME}_image" "$TASK" "$OBJECT"
DATA="${DATA}
components[$COUNT].name = \"${BASENAME}\";
components[$COUNT].start = ${MACRO}_START;
components[$COUNT].end = ${MACRO}_END;
components[$COUNT].size = ${MACRO}_SIZE;";
COUNT="`expr "$COUNT" + 1`"
done
 
echo '}
 
/DISCARD/ : {
*(*);
}
}' >> "$LINK"
 
echo "
#define COMPONENTS $COUNT
 
component_t components[COMPONENTS];
 
static void init_components(void)
{
$DATA
}
 
#endif
" >> "$HEADER"
Property changes:
Added: svn:executable
+*
\ No newline at end of property
/tags/0.2.0/boot/arch/ppc64/loader/asm.S
0,0 → 1,215
#
# 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)
# 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
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, 16
mtctr r31
li r31, 0
li r30, 0x2000
 
seg_fill:
mtsrin r30, r31
addi r30, r30, 0x111
addis r31, r31, 0x1000 # move to next SR
bdnz seg_fill
tlbia
tlbsync
# start the kernel
#
# r3 = bootinfo (pa)
lis r31, KERNEL_START_ADDR@ha
addi r31, r31, KERNEL_START_ADDR@l
mtspr srr0, r31
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)
/tags/0.2.0/boot/arch/ppc64/loader/ofw.h
0,0 → 1,71
/*
* 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 __OFW_H__
#define __OFW_H__
 
#define NULL 0
#define MEMMAP_MAX_RECORDS 32
#define false 0
#define true 1
 
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)
 
typedef struct {
void *start;
unsigned long size;
} memzone_t;
 
typedef struct {
unsigned long total;
unsigned int count;
memzone_t zones[MEMMAP_MAX_RECORDS];
} memmap_t;
 
typedef struct {
void *addr;
unsigned int width;
unsigned int height;
unsigned int bpp;
unsigned int scanline;
} screen_t;
 
 
extern void init(void);
extern void ofw_write(const char *str, const long len);
 
extern void *ofw_translate(const void *virt);
extern int ofw_map(const void *phys, const void *virt, const long size, const int mode);
extern int ofw_memmap(memmap_t *map);
extern int ofw_screen(screen_t *screen);
 
#endif
/tags/0.2.0/boot/arch/ppc64/loader/boot.S
0,0 → 1,42
#
# 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@ha
addi r4, r4, ofw@l
stw r5, 0(r4)
bl init
b bootstrap
/tags/0.2.0/boot/arch/ppc64/loader/regname.h
0,0 → 1,204
/*
* 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
/tags/0.2.0/boot/arch/ppc64/loader/main.c
0,0 → 1,154
/*
* 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"
 
#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);
}
}
 
 
void bootstrap(void)
{
printf("\nHelenOS PPC Bootloader\n");
init_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();
}
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);
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);
}
/tags/0.2.0/boot/arch/ppc64/loader/asm.h
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.
*/
 
#ifndef __ASM_H__
#define __ASM_H__
 
#define PAGE_SIZE 4096
#define PAGE_WIDTH 12
 
#define TRANS_SIZE 1024
#define TRANS_ITEM_SIZE 8
 
#define KERNEL_START_ADDR 0x80004000
 
#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) __attribute__((noreturn));
extern void real_mode();
 
#endif
 
#endif
/tags/0.2.0/boot/arch/ppc64/loader/main.h
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.
*/
 
#ifndef __MAIN_H__
#define __MAIN_H__
 
#include "ofw.h"
 
/** Align to the nearest higher address.
*
* @param addr Address or size to be aligned.
* @param align Size of alignment, must be power of 2.
*/
#define ALIGN_UP(addr, align) (((addr) + ((align) - 1)) & ~((align) - 1))
 
#define TASKMAP_MAX_RECORDS 32
 
typedef struct {
void *addr;
unsigned long size;
} task_t;
 
typedef struct {
unsigned int count;
task_t tasks[TASKMAP_MAX_RECORDS];
} taskmap_t;
 
typedef struct {
taskmap_t taskmap;
memmap_t memmap;
screen_t screen;
} bootinfo_t;
 
extern void start(void);
extern void bootstrap(void);
 
extern memmap_t memmap;
 
#endif
/tags/0.2.0/boot/arch/ppc64/loader/printf.c
0,0 → 1,243
/*
* 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 "printf.h"
#include "ofw.h"
 
static char digits[] = "0123456789abcdef"; /**< Hexadecimal characters */
 
 
void puts(const char *str)
{
long len = 0;
while (str[len] != 0)
len++;
ofw_write(str, len);
}
 
 
/** Print hexadecimal digits
*
* Print fixed count of hexadecimal digits from
* the number num. The digits are printed in
* natural left-to-right order starting with
* the width-th digit.
*
* @param num Number containing digits.
* @param width Count of digits to print.
*
*/
static void print_fixed_hex(const __u64 num, const int width)
{
int i;
for (i = width * 8 - 4; i >= 0; i -= 4)
ofw_write(digits + ((num >> i) & 0xf), 1);
}
 
 
/** Print number in given base
*
* Print significant digits of a number in given
* base.
*
* @param num Number to print.
* @param base Base to print the number in (should
* be in range 2 .. 16).
*
*/
static void print_number(const __native num, const unsigned int base)
{
int val = num;
char d[sizeof(__native) * 8 + 1]; /* this is good enough even for base == 2 */
int i = sizeof(__native) * 8 - 1;
do {
d[i--] = digits[val % base];
} while (val /= base);
d[sizeof(__native) * 8] = 0;
puts(&d[i + 1]);
}
 
 
/** General formatted text print
*
* Print text formatted according the fmt parameter
* and variant arguments. Each formatting directive
* begins with \% (percentage) character and one of the
* following character:
*
* \% Prints the percentage character.
*
* s The next variant argument is treated as char*
* and printed as a NULL terminated string.
*
* c The next variant argument is treated as a single char.
*
* p The next variant argument is treated as a maximum
* bit-width integer with respect to architecture
* and printed in full hexadecimal width.
*
* P As with 'p', but '0x' is prefixed.
*
* q The next variant argument is treated as a 64b integer
* and printed in full hexadecimal width.
*
* Q As with 'q', but '0x' is prefixed.
*
* l The next variant argument is treated as a 32b integer
* and printed in full hexadecimal width.
*
* L As with 'l', but '0x' is prefixed.
*
* w The next variant argument is treated as a 16b integer
* and printed in full hexadecimal width.
*
* W As with 'w', but '0x' is prefixed.
*
* b The next variant argument is treated as a 8b integer
* and printed in full hexadecimal width.
*
* B As with 'b', but '0x' is prefixed.
*
* d The next variant argument is treated as integer
* and printed in standard decimal format (only significant
* digits).
*
* x The next variant argument is treated as integer
* and printed in standard hexadecimal format (only significant
* digits).
*
* X As with 'x', but '0x' is prefixed.
*
* All other characters from fmt except the formatting directives
* are printed in verbatim.
*
* @param fmt Formatting NULL terminated string.
*/
void printf(const char *fmt, ...)
{
long i = 0;
va_list ap;
char c;
va_start(ap, fmt);
while ((c = fmt[i++])) {
switch (c) {
/* control character */
case '%':
switch (c = fmt[i++]) {
/* percentile itself */
case '%':
break;
/*
* String and character conversions.
*/
case 's':
puts(va_arg(ap, char_ptr));
goto loop;
case 'c':
c = (char) va_arg(ap, int);
break;
/*
* Hexadecimal conversions with fixed width.
*/
case 'P':
puts("0x");
case 'p':
print_fixed_hex(va_arg(ap, __native), sizeof(__native));
goto loop;
case 'Q':
puts("0x");
case 'q':
print_fixed_hex(va_arg(ap, __u64), INT64);
goto loop;
case 'L':
puts("0x");
case 'l':
print_fixed_hex(va_arg(ap, __native), INT32);
goto loop;
case 'W':
puts("0x");
case 'w':
print_fixed_hex(va_arg(ap, __native), INT16);
goto loop;
case 'B':
puts("0x");
case 'b':
print_fixed_hex(va_arg(ap, __native), INT8);
goto loop;
/*
* Decimal and hexadecimal conversions.
*/
case 'd':
print_number(va_arg(ap, __native), 10);
goto loop;
case 'X':
puts("0x");
case 'x':
print_number(va_arg(ap, __native), 16);
goto loop;
/*
* Bad formatting.
*/
default:
goto out;
}
default:
if (c == '\n')
ofw_write("\r", 1);
ofw_write(&c, 1);
}
loop:
;
}
out:
va_end(ap);
}
/tags/0.2.0/boot/arch/ppc64/loader/printf.h
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.
*/
 
#ifndef __PRINTF_H__
#define __PRINTF_H__
 
#define INT8 1
#define INT16 2
#define INT32 4
#define INT64 8
 
typedef signed char __s8;
 
typedef unsigned char __u8;
typedef unsigned short __u16;
typedef unsigned int __u32;
typedef unsigned long __u64;
 
typedef __u64 __address;
typedef __u64 __native;
 
typedef char *char_ptr;
 
void puts(const char *str);
void printf(const char *fmt, ...);
 
#endif
/tags/0.2.0/boot/arch/ppc64/Makefile.inc
0,0 → 1,39
#
# 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.
#
 
build: image.boot
 
image.boot: kernel uspace
make -C arch/$(ARCH)/loader COMPILER=$(COMPILER) KERNELDIR=../../../$(KERNELDIR) USPACEDIR=../../../$(USPACEDIR)
cp arch/$(ARCH)/loader/image.boot image.boot
 
clean: clean_kernel clean_uspace
make -C arch/$(ARCH)/loader clean KERNELDIR=../../../$(KERNELDIR) USPACEDIR=../../../$(USPACEDIR)
-rm -f image.boot
 
arch_distclean: distclean_kernel distclean_uspace
/tags/0.2.0/boot/arch/mips32/Makefile.inc
0,0 → 1,39
#
# 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.
#
 
build: image.boot
 
image.boot: kernel uspace
make -C arch/$(ARCH)/loader COMPILER=$(COMPILER) KERNEL=../../../$(KERNELDIR)/kernel.bin
cp arch/$(ARCH)/loader/image.boot image.boot
 
clean: clean_kernel clean_uspace
make -C arch/$(ARCH)/loader clean
-rm -f image.boot
 
arch_distclean: distclean_kernel distclean_uspace
/tags/0.2.0/boot/arch/mips32/loader/asm.S
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.
#
 
#include "regname.h"
 
.set noat
.set noreorder
.set nomacro
 
.text
 
.global halt
.global jump_to_kernel
 
halt:
b halt
nop
 
jump_to_kernel:
# .word 0x39
j $a0
nop
/tags/0.2.0/boot/arch/mips32/loader/printf.c
0,0 → 1,241
/*
* 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 "printf.h"
#include "msim.h"
 
static char digits[] = "0123456789abcdef"; /**< Hexadecimal characters */
 
 
void puts(const char *str)
{
int len = 0;
while (str[len] != 0)
len++;
write(str, len);
}
 
 
/** Print hexadecimal digits
*
* Print fixed count of hexadecimal digits from
* the number num. The digits are printed in
* natural left-to-right order starting with
* the width-th digit.
*
* @param num Number containing digits.
* @param width Count of digits to print.
*
*/
static void print_fixed_hex(const __u64 num, const int width)
{
int i;
for (i = width * 8 - 4; i >= 0; i -= 4)
write(digits + ((num >> i) & 0xf), 1);
}
 
 
/** Print number in given base
*
* Print significant digits of a number in given
* base.
*
* @param num Number to print.
* @param base Base to print the number in (should
* be in range 2 .. 16).
*
*/
static void print_number(const __native num, const unsigned int base)
{
int val = num;
char d[sizeof(__native) * 8 + 1]; /* this is good enough even for base == 2 */
int i = sizeof(__native) * 8 - 1;
do {
d[i--] = digits[val % base];
} while (val /= base);
d[sizeof(__native) * 8] = 0;
puts(&d[i + 1]);
}
 
 
/** General formatted text print
*
* Print text formatted according the fmt parameter
* and variant arguments. Each formatting directive
* begins with \% (percentage) character and one of the
* following character:
*
* \% Prints the percentage character.
*
* s The next variant argument is treated as char*
* and printed as a NULL terminated string.
*
* c The next variant argument is treated as a single char.
*
* p The next variant argument is treated as a maximum
* bit-width integer with respect to architecture
* and printed in full hexadecimal width.
*
* P As with 'p', but '0x' is prefixed.
*
* q The next variant argument is treated as a 64b integer
* and printed in full hexadecimal width.
*
* Q As with 'q', but '0x' is prefixed.
*
* l The next variant argument is treated as a 32b integer
* and printed in full hexadecimal width.
*
* L As with 'l', but '0x' is prefixed.
*
* w The next variant argument is treated as a 16b integer
* and printed in full hexadecimal width.
*
* W As with 'w', but '0x' is prefixed.
*
* b The next variant argument is treated as a 8b integer
* and printed in full hexadecimal width.
*
* B As with 'b', but '0x' is prefixed.
*
* d The next variant argument is treated as integer
* and printed in standard decimal format (only significant
* digits).
*
* x The next variant argument is treated as integer
* and printed in standard hexadecimal format (only significant
* digits).
*
* X As with 'x', but '0x' is prefixed.
*
* All other characters from fmt except the formatting directives
* are printed in verbatim.
*
* @param fmt Formatting NULL terminated string.
*/
void printf(const char *fmt, ...)
{
int i = 0;
va_list ap;
char c;
va_start(ap, fmt);
while ((c = fmt[i++])) {
switch (c) {
/* control character */
case '%':
switch (c = fmt[i++]) {
/* percentile itself */
case '%':
break;
/*
* String and character conversions.
*/
case 's':
puts(va_arg(ap, char_ptr));
goto loop;
case 'c':
c = (char) va_arg(ap, int);
break;
/*
* Hexadecimal conversions with fixed width.
*/
case 'P':
puts("0x");
case 'p':
print_fixed_hex(va_arg(ap, __native), sizeof(__native));
goto loop;
case 'Q':
puts("0x");
case 'q':
print_fixed_hex(va_arg(ap, __u64), INT64);
goto loop;
case 'L':
puts("0x");
case 'l':
print_fixed_hex(va_arg(ap, __native), INT32);
goto loop;
case 'W':
puts("0x");
case 'w':
print_fixed_hex(va_arg(ap, __native), INT16);
goto loop;
case 'B':
puts("0x");
case 'b':
print_fixed_hex(va_arg(ap, __native), INT8);
goto loop;
/*
* Decimal and hexadecimal conversions.
*/
case 'd':
print_number(va_arg(ap, __native), 10);
goto loop;
case 'X':
puts("0x");
case 'x':
print_number(va_arg(ap, __native), 16);
goto loop;
/*
* Bad formatting.
*/
default:
goto out;
}
default:
write(&c, 1);
}
loop:
;
}
out:
va_end(ap);
}
/tags/0.2.0/boot/arch/mips32/loader/boot.S
0,0 → 1,45
#
# 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"
 
#define INITIAL_STACK 0x10000
 
.set noat
.set noreorder
.set nomacro
 
.section BOOTSTRAP
 
.global start
start:
lui $sp, INITIAL_STACK >> 16
ori $sp, $sp, INITIAL_STACK & 0xffff
 
j bootstrap
nop
/tags/0.2.0/boot/arch/mips32/loader/regname.h
0,0 → 1,89
/*
* 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.
*/
 
#ifndef __mips32_REGNAME_H_
#define __mips32_REGNAME_H_
 
#define zero 0
#define at 1
#define v0 2
#define v1 3
#define a0 4
#define a1 5
#define a2 6
#define a3 7
#define t0 8
#define t1 9
#define t2 10
#define t3 11
#define t4 12
#define t5 13
#define t6 14
#define t7 15
#define s0 16
#define s1 17
#define s2 18
#define s3 19
#define s4 20
#define s5 21
#define s6 22
#define s7 23
#define t8 24
#define t9 25
#define k0 26
#define k1 27
#define gp 28
#define sp 29
#define s8 30
#define ra 31
 
#define rindex 0
#define rrandom 1
#define entrylo0 2
#define entrylo1 3
#define context 4
#define pagemask 5
#define wired 6
#define badvaddr 8
#define count 9
#define entryhi 10
#define compare 11
#define status 12
#define cause 13
#define epc 14
#define rconfig 16
#define lladdr 17
#define watchlo 18
#define watchhi 19
#define xcontext 20
#define rdebug 23
#define depc 24
#define eepc 30
 
 
#endif /* _REGNAME_H_ */
/tags/0.2.0/boot/arch/mips32/loader/main.c
0,0 → 1,56
/*
* 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 "msim.h"
#include "asm.h"
 
#define KERNEL_VIRTUAL_ADDRESS 0x80100000
#define KERNEL_START &_binary_____________kernel_kernel_bin_start
#define KERNEL_END &_binary_____________kernel_kernel_bin_end
#define KERNEL_SIZE ((unsigned int) KERNEL_END - (unsigned int) KERNEL_START)
 
void bootstrap(void)
{
printf("HelenOS MIPS Bootloader\n");
printf("loaded at %L\n", &start);
printf("kernel memory at %L (size %d bytes)\n", KERNEL_VIRTUAL_ADDRESS, KERNEL_SIZE);
// TODO: implement memcpy
int i;
for (i = 0; i < KERNEL_SIZE; i++) {
if (i % 4096 == 0)
printf(".");
((char *) KERNEL_VIRTUAL_ADDRESS)[i] = ((char *) KERNEL_START)[i];
}
printf("\nBooting the kernel...\n");
jump_to_kernel((void *) KERNEL_VIRTUAL_ADDRESS);
}
/tags/0.2.0/boot/arch/mips32/loader/asm.h
0,0 → 1,34
/*
* 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 __ASM_H__
#define __ASM_H__
 
void jump_to_kernel(void *code) __attribute__((noreturn));
 
#endif
/tags/0.2.0/boot/arch/mips32/loader/msim.c
0,0 → 1,42
/*
* 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 "msim.h"
#include "printf.h"
 
 
#define MSIM_VIDEORAM 0xB0000000
 
 
void write(const char *str, const int len)
{
int i;
for (i = 0; i < len; i++)
*((char *) MSIM_VIDEORAM) = str[i];
}
/tags/0.2.0/boot/arch/mips32/loader/printf.h
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.
*/
 
#ifndef __PRINTF_H__
#define __PRINTF_H__
 
#define INT8 1
#define INT16 2
#define INT32 4
#define INT64 8
 
typedef signed char __s8;
 
typedef unsigned char __u8;
typedef unsigned short __u16;
typedef unsigned long __u32;
typedef long long __u64;
 
typedef __u32 __address;
typedef __u32 __native;
 
typedef char *char_ptr;
 
void puts(const char *str);
void printf(const char *fmt, ...);
 
#endif
/tags/0.2.0/boot/arch/mips32/loader/_link.ld
0,0 → 1,24
/*
* MIPS linker script
*
*/
 
OUTPUT_FORMAT(binary)
ENTRY(start)
 
SECTIONS {
.image 0xbfc00000: AT (0) {
*(BOOTSTRAP)
*(.text);
*(.rodata);
*(.rodata.*);
*(.data); /* initialized data */
*(.sdata);
*(.sdata2);
*(.sbss);
*(.bss); /* uninitialized static variables */
*(COMMON); /* global variables */
*(.reginfo);
}
}
/tags/0.2.0/boot/arch/mips32/loader/main.h
0,0 → 1,37
/*
* 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 __MAIN_H__
#define __MAIN_H__
 
extern int _binary_____________kernel_kernel_bin_start;
extern int _binary_____________kernel_kernel_bin_end;
extern void start(void);
extern void bootstrap(void);
 
#endif
/tags/0.2.0/boot/arch/mips32/loader/msim.h
0,0 → 1,48
/*
* 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 __MSIM_H__
#define __MSIM_H__
 
#define NULL 0
#define false 0
#define true 1
 
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)
 
extern void init(void);
extern void halt(void);
 
extern void write(const char *str, const int len);
extern void *translate(void *addr);
 
#endif
/tags/0.2.0/boot/arch/mips32/loader/Makefile
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.
#
 
## Toolchain configuration
#
 
TARGET = mipsel-linux-gnu
TOOLCHAIN_DIR = /usr/local/mipsel/bin
 
ifeq ($(COMPILER),native)
CC = gcc
AS = as
LD = ld
OBJCOPY = objcopy
OBJDUMP = objdump
else
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 = -nostdinc -nostdlib -fno-builtin -Werror-implicit-function-declaration -Wmissing-prototypes -Werror -O3 -mno-abicalls -G 0 -fno-zero-initialized-in-bss -mhard-float -mips3
DEFS =
 
SOURCES = \
main.c \
printf.c \
msim.c \
asm.S \
boot.S
 
OBJECTS := $(addsuffix .o,$(basename $(SOURCES)))
 
.PHONY: all clean depend
 
all: image.boot
 
-include Makefile.depend
 
image.boot: depend $(OBJECTS) kernel.o
$(LD) -no-check-sections -N -T _link.ld $(OBJECTS) kernel.o -o $@
 
depend:
-makedepend $(DEFS) $(CFLAGS) -f - $(SOURCES) > Makefile.depend 2> /dev/null
 
clean:
-rm -f $(OBJECTS) image.boot kernel.o Makefile.depend
 
kernel.o: $(KERNEL)
$(OBJCOPY) -I binary -O elf32-tradlittlemips -B mips $(KERNEL) $@
 
%.o: %.S
$(CC) $(DEFS) $(CFLAGS) -D__ASM__ -c $< -o $@
 
%.o: %.c
$(CC) $(DEFS) $(CFLAGS) -c $< -o $@
/tags/0.2.0/boot/arch/ia64/Makefile.inc
0,0 → 1,43
#
# 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.
#
 
VMAXLMA_SRC=$(KERNELDIR)/contrib/arch/ia64/vmaxlma.c
 
build: kernel.bin
 
kernel.bin: kernel uspace vmaxlma
cp $(KERNELDIR)/kernel.bin .
./vmaxlma kernel.bin
 
vmaxlma: $(VMAXLMA_SRC)
gcc $(VMAXLMA_SRC) -o $@
 
clean: clean_kernel clean_uspace
-rm -f kernel.bin vmaxlma
 
arch_distclean: distclean_kernel distclean_uspace
/tags/0.2.0/boot/arch/sparc64/Makefile.inc
0,0 → 1,45
#
# 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.
#
 
TMP=distroot
 
build: image.iso
 
image.iso: kernel
mkdir -p $(TMP)/boot
mkdir -p $(TMP)/kernel
cat arch/$(ARCH)/silo/silo.tar.gz | (cd $(TMP)/boot; tar xvfz -)
cp arch/$(ARCH)/silo/README arch/$(ARCH)/silo/COPYING arch/$(ARCH)/silo/silo.conf $(TMP)/boot
ln -sf ../../$(KERNELDIR)/kernel.bin $(TMP)/kernel/kernel.bin
mkisofs -f -G $(TMP)/boot/isofs.b -B ... -r -o image.iso $(TMP)/
 
clean: clean_kernel
-rm -fr $(TMP)
-rm -f image.iso
 
arch_distclean: distclean_kernel
/tags/0.2.0/boot/arch/sparc64/silo/README
0,0 → 1,5
For licensing terms of SILO boot loader see the file COPYING contained
in this directory. Full version of SILO, including its source code,
can be downloaded from SILO's project page:
 
http://www.sparc-boot.org/
/tags/0.2.0/boot/arch/sparc64/silo/silo.tar.gz
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/tags/0.2.0/boot/arch/sparc64/silo/silo.conf
0,0 → 1,3
timeout = 0
image = /kernel/kernel.bin
label = spartan
/tags/0.2.0/boot/arch/sparc64/silo/COPYING
0,0 → 1,340
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.