sb_machdep.c (201905) | sb_machdep.c (202864) |
---|---|
1/*- 2 * Copyright (c) 2007 Bruce M. Simpson. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2007 Bruce M. Simpson. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> |
28__FBSDID("$FreeBSD: head/sys/mips/sibyte/sb_machdep.c 201881 2010-01-09 03:08:22Z imp $"); | 28__FBSDID("$FreeBSD: head/sys/mips/sibyte/sb_machdep.c 202864 2010-01-23 03:19:13Z neel $"); |
29 30#include <sys/param.h> 31#include <machine/cpuregs.h> 32 33#include "opt_ddb.h" 34#include "opt_kdb.h" 35 36#include <sys/param.h> --- 188 unchanged lines hidden (view full) --- 225} 226 227void 228platform_trap_exit(void) 229{ 230 231} 232 | 29 30#include <sys/param.h> 31#include <machine/cpuregs.h> 32 33#include "opt_ddb.h" 34#include "opt_kdb.h" 35 36#include <sys/param.h> --- 188 unchanged lines hidden (view full) --- 225} 226 227void 228platform_trap_exit(void) 229{ 230 231} 232 |
233static void 234kseg0_map_coherent(void) 235{ 236 uint32_t config; 237 const int CFG_K0_COHERENT = 5; 238 239 config = mips_rd_config(); 240 config &= ~CFG_K0_MASK; 241 config |= CFG_K0_COHERENT; 242 mips_wr_config(config); 243} 244 |
|
233void 234platform_start(__register_t a0, __register_t a1, __register_t a2, 235 __register_t a3) 236{ 237 vm_offset_t kernend; 238 | 245void 246platform_start(__register_t a0, __register_t a1, __register_t a2, 247 __register_t a3) 248{ 249 vm_offset_t kernend; 250 |
251 /* 252 * Make sure that kseg0 is mapped cacheable-coherent 253 */ 254 kseg0_map_coherent(); 255 |
|
239 /* clear the BSS and SBSS segments */ 240 memset(&edata, 0, (vm_offset_t)&end - (vm_offset_t)&edata); 241 kernend = round_page((vm_offset_t)&end); 242 243 /* Initialize pcpu stuff */ 244 mips_pcpu0_init(); 245 246#ifdef CFE --- 18 unchanged lines hidden --- | 256 /* clear the BSS and SBSS segments */ 257 memset(&edata, 0, (vm_offset_t)&end - (vm_offset_t)&edata); 258 kernend = round_page((vm_offset_t)&end); 259 260 /* Initialize pcpu stuff */ 261 mips_pcpu0_init(); 262 263#ifdef CFE --- 18 unchanged lines hidden --- |