/* * Copyright (c) 2007 Dietmar Hahn * ***************************************************************************** * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to * deal in the Software without restriction, including without limitation the * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or * sell copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. */ #include #include #include #include #include #include /* * Allocate kernel stack area. * This is used for stack pointer (goes down from kstack+PAGE_SIZE) and * RSE (goes up from kstack). */ .section .data.start,"aw" .global kstack .align PAGE_SIZE kstack: .space KSTACK_PAGES * PAGE_SIZE .text /* * Start the kernel. * r28 points to the address of the boot parameter area, given * from the bootloader. * Execution reaches here in physical mode. */ ENTRY(_start) .prologue .save rp, r0 // terminate unwind chain with a NULL rp .body alloc loc0=ar.pfs,0,1,1,0 rsm psr.i | psr.ic ;; srlz.i ;; /* * Initialize mini-os region registers: * Currently only region registers 5 and 7 are used for addressing. * rr[5] : virtual kernel address space * rr[7] : directly mapped physically addresses. */ movl r2=0<