aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm63xx
diff options
context:
space:
mode:
authorFlorian Fainelli <florian@openwrt.org>2012-07-26 17:03:08 +0000
committerFlorian Fainelli <florian@openwrt.org>2012-07-26 17:03:08 +0000
commit38058ef2b9b90cd45f29813c03e9c7e3a3c6cd46 (patch)
tree3e4f2eb51056042b771f24dca8743b2ce90c47c6 /target/linux/brcm63xx
parentbc998d69d03b619f6a9e4d23e2bc0dcc66af6636 (diff)
downloadupstream-38058ef2b9b90cd45f29813c03e9c7e3a3c6cd46.tar.gz
upstream-38058ef2b9b90cd45f29813c03e9c7e3a3c6cd46.tar.bz2
upstream-38058ef2b9b90cd45f29813c03e9c7e3a3c6cd46.zip
[brcm2708] add more missing config symbols
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@32884 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/brcm63xx')
0 files changed, 0 insertions, 0 deletions
108' href='#n108'>108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227
/*
 * Copyright (c) 2007 Dietmar Hahn <dietmar.hahn@fujitsu-siemens.com>
 *
 *****************************************************************************
 * 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 "asm.h"
#include "page.h"
#include "ia64_cpu.h"
#include "ia64_fpu.h"
#include "privop.h"
#include "offsets.h"



	/*
	 * 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<<IA64_RR_IDX_POS
	movl	r3=1<<IA64_RR_IDX_POS
	;;
	mov	rr[r2]=r0
	mov	rr[r3]=r0
	;;
	movl	r2=2<<IA64_RR_IDX_POS
	movl	r3=3<<IA64_RR_IDX_POS
	;;
	mov	rr[r2]=r0
	mov	rr[r3]=r0
	;;
	movl	r2=4<<IA64_RR_IDX_POS
	movl	r3=6<<IA64_RR_IDX_POS
	;;
	mov	rr[r2]=r0
	mov	rr[r3]=r0
	;;
	// Wired memory for kernel data and text.
	movl	r2=IA64_RR_VAL(KERNEL_TR_PAGE_SIZE,0)
	movl	r3=5<<IA64_RR_IDX_POS		// region 5
	;;
	mov	rr[r3]=r2
	;;
	/*
	 * Region 7 addresses are only for directly mapped physically
	 * addresses.
	 */
	movl	r2=IA64_RR_VAL(PTE_PS_16K,0)
	movl	r3=7<<IA64_RR_IDX_POS		// region 7
	;;
	mov	rr[r3]=r2
	;;

	/*
	 * Now pin mappings into the TLB for kernel text and data
	 */
	mov	r18=KERNEL_TR_PAGE_SIZE<<IA64_ITIR_PS
	movl	r17=KERNEL_START
	;;
	mov	cr.itir=r18
	mov	cr.ifa=r17
	mov	r16=IA64_TR_KERNEL
	mov	r3=ip
	movl	r18=PTE_KERNEL_ATTR
	;;
	dep	r2=0,r3,0,KERNEL_TR_PAGE_SIZE
	;;
	or	r18=r2,r18
	;;
	srlz.i
	;;
	itr.i	itr[r16]=r18
	;;
	itr.d	dtr[r16]=r18
	;;
	srlz.i

	/*  Switch into virtual mode */
	movl	r16=STARTUP_PSR
	;;
	mov	cr.ipsr=r16
	movl	r17=1f
	;;
	mov	cr.iip=r17
	mov	cr.ifs=r0
	;;
	rfi
	;;
1:	/* now we are in virtual mode */

	movl	r3=ia64_trap_table
	;;
	mov	cr.iva=r3
	;;

	movl	r2=IA64_FPSR_DEFAULT
	movl	r3=IA64_DCR_DEFAULT
	;;
	srlz.i
	movl	gp=__gp

	mov	ar.fpsr=r2
	mov	cr.dcr=r3
	;;
	movl	r2=kstack
	movl	r5=KSTACK_PAGES * PAGE_SIZE - 16
	mov	ar.rsc=0	// place RSE in enforced lazy mode
	;;
	loadrs			// clear the dirty partition
	;;
	mov	ar.bspstore=r2	// establish the new RSE stack
	add	sp=r2,r5
	;;
	mov	ar.rsc=IA64_RSE_EAGER	// place RSE in eager mode

	;;
	movl	r2=ia64_boot_paramP
	mov	r3=7		// make address virtual region 7.
	;;
	dep	r28=r3,r28,61,3
	;;
				// save the address of the boot param area
				// passed by the bootloader
	st8	[r2]=r28
	;;

	/* Set xsi base. I use here XSI_BASE. */
#define FW_HYPERCALL_SET_SHARED_INFO_VA                 0x600
	mov r2=FW_HYPERCALL_SET_SHARED_INFO_VA
	movl r28=XSI_BASE
	;;
	break 0x1000
	;;
	/*
	 * I set up here the pointer to the global start_info structure.
	 * This structure will be initialized in arch_init().
	 */
	movl	out0=start_info_union
		// Prepare out0 - the pointer to start_info_t.
	movl	r14=XSI_BASE
	;;
	add	r15=START_INFO_PFN,r14	// add offset to XSI_BASE
	;;
	START_INFO_PFN_ld	r14=[r15]	// load the start_info_pfn
	add	r16=7, r0
	;;
#if defined(BIG_ENDIAN)
	mux1	r14=r14,@rev		// swap because mini-os is in BE
#endif
	;;
	shl	r15=r14,PAGE_SHIFT_XEN_16K	// pfn << PAGE_SHIFT_XEN_16K
	shl	r16=r16,IA64_RR_IDX_POS		// (7<<IA64_RR_IDX_POS)
	;;
	or	out0=r16, r15			// make a region 7 address
	;;
	ssm	psr.i | psr.ic
	;;
	srlz.i
	;;
	br.call.sptk.many rp=start_kernel
	;;
	add	r2=3,r0
	;;
	ld8	r3=[r2]
	;;

self:	hint @pause
	br.sptk.many self		// endless loop
END(_start)


ENTRY(do_nop)
	nop	0x01
	add	r15=1,r15
	br.ret.sptk.many rp
END(do_nop)