1187418Sgonzo/*- 2187418Sgonzo * Copyright (c) 2005 Olivier Houchard. All rights reserved. 3187418Sgonzo * 4187418Sgonzo * Redistribution and use in source and binary forms, with or without 5187418Sgonzo * modification, are permitted provided that the following conditions 6187418Sgonzo * are met: 7187418Sgonzo * 1. Redistributions of source code must retain the above copyright 8187418Sgonzo * notice, this list of conditions and the following disclaimer. 9187418Sgonzo * 2. Redistributions in binary form must reproduce the above copyright 10187418Sgonzo * notice, this list of conditions and the following disclaimer in the 11187418Sgonzo * documentation and/or other materials provided with the distribution. 12187418Sgonzo * 13187418Sgonzo * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 14187418Sgonzo * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 15187418Sgonzo * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 16187418Sgonzo * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 17187418Sgonzo * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 18187418Sgonzo * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 19187418Sgonzo * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 20187418Sgonzo * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 21187418Sgonzo * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 22187418Sgonzo * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23187418Sgonzo */ 24187418Sgonzo 25187418Sgonzo#include <machine/asm.h> 26187418Sgonzo__FBSDID("$FreeBSD$") 27216474Sjchandra 28216474SjchandraENTRY(_start) 29216474Sjchandra PTR_LA t0, kernel_end 30216474Sjchandra move sp, t0 31216474Sjchandra add sp, 0x2000 32216474Sjchandra and sp, ~0x7 33216474Sjchandra PTR_LA t0, _startC 34216474Sjchandra j t0 35216474Sjchandra nop 36216474SjchandraEND(_start) 37216474Sjchandra 38216474Sjchandra#ifndef KERNNAME 39216474Sjchandra#error Need a kernel name here 40216474Sjchandra#endif 41216474Sjchandra 42187418Sgonzo.section ".real_kernel","aw" 43187418Sgonzo.globl kernel_start; 44187418Sgonzokernel_start: 45187418Sgonzo.incbin KERNNAME 46187418Sgonzo.globl kernel_end; 47187418Sgonzokernel_end: 48