sb_scd.c (205364) | sb_scd.c (205675) |
---|---|
1/*- 2 * Copyright (c) 2009 Neelkanth Natu 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) 2009 Neelkanth Natu 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_scd.c 205364 2010-03-20 05:49:06Z neel $"); | 28__FBSDID("$FreeBSD: head/sys/mips/sibyte/sb_scd.c 205675 2010-03-26 07:15:27Z neel $"); |
29 30#include <sys/param.h> 31#include <sys/kernel.h> 32#include <sys/systm.h> 33#include <sys/module.h> 34#include <sys/bus.h> 35 36#include <machine/resource.h> 37#include <machine/hwfunc.h> 38 39#include "sb_scd.h" 40 | 29 30#include <sys/param.h> 31#include <sys/kernel.h> 32#include <sys/systm.h> 33#include <sys/module.h> 34#include <sys/bus.h> 35 36#include <machine/resource.h> 37#include <machine/hwfunc.h> 38 39#include "sb_scd.h" 40 |
41extern void sb_store64(uint32_t addr, uint64_t val); 42extern uint64_t sb_load64(uint32_t addr); | 41/* 42 * We compile a 32-bit kernel to run on the SB-1 processor which is a 64-bit 43 * processor. It has some registers that must be accessed using 64-bit load 44 * and store instructions. 45 * 46 * We use the mips_ld() and mips_sd() functions to do this for us. 47 */ 48#define sb_store64(addr, val) mips3_sd((uint64_t *)(addr), (val)) 49#define sb_load64(addr) mips3_ld((uint64_t *)(addr)) |
43 44/* 45 * System Control and Debug (SCD) unit on the Sibyte ZBbus. 46 */ 47 48/* 49 * Extract the value starting at bit position 'b' for 'n' bits from 'x'. 50 */ --- 244 unchanged lines hidden --- | 50 51/* 52 * System Control and Debug (SCD) unit on the Sibyte ZBbus. 53 */ 54 55/* 56 * Extract the value starting at bit position 'b' for 'n' bits from 'x'. 57 */ --- 244 unchanged lines hidden --- |