Date: Thu, 18 Nov 2010 11:19:23 +0000 (UTC) From: "Jayachandran C." <jchandra@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r215452 - in user/jchandra/8-stable-mips/sys: dev/cfe mips/atheros modules Message-ID: <201011181119.oAIBJNCp027327@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jchandra Date: Thu Nov 18 11:19:23 2010 New Revision: 215452 URL: http://svn.freebsd.org/changeset/base/215452 Log: MFC 202061, 202091,203001 to update dev/cfe MFC 205845 to fix module build Added: - copied unchanged from r202061, head/sys/dev/cfe/cfe_env.c Directory Properties: user/jchandra/8-stable-mips/sys/dev/cfe/cfe_env.c (props changed) Modified: user/jchandra/8-stable-mips/sys/dev/cfe/cfe_api.c user/jchandra/8-stable-mips/sys/dev/cfe/cfe_console.c user/jchandra/8-stable-mips/sys/mips/atheros/apb.c user/jchandra/8-stable-mips/sys/modules/Makefile Directory Properties: user/jchandra/8-stable-mips/sys/ (props changed) user/jchandra/8-stable-mips/sys/amd64/include/xen/ (props changed) user/jchandra/8-stable-mips/sys/cddl/contrib/opensolaris/ (props changed) user/jchandra/8-stable-mips/sys/contrib/dev/acpica/ (props changed) user/jchandra/8-stable-mips/sys/contrib/pf/ (props changed) user/jchandra/8-stable-mips/sys/dev/xen/xenpci/ (props changed) user/jchandra/8-stable-mips/sys/mips/cavium/dev/ (props changed) Modified: user/jchandra/8-stable-mips/sys/dev/cfe/cfe_api.c ============================================================================== --- user/jchandra/8-stable-mips/sys/dev/cfe/cfe_api.c Thu Nov 18 10:34:18 2010 (r215451) +++ user/jchandra/8-stable-mips/sys/dev/cfe/cfe_api.c Thu Nov 18 11:19:23 2010 (r215452) @@ -160,7 +160,7 @@ cfe_enumenv(int idx, char *name, int nam { cfe_xiocb_t xiocb; - xiocb.xiocb_fcode = CFE_CMD_ENV_SET; + xiocb.xiocb_fcode = CFE_CMD_ENV_ENUM; xiocb.xiocb_status = 0; xiocb.xiocb_handle = 0; xiocb.xiocb_flags = 0; Modified: user/jchandra/8-stable-mips/sys/dev/cfe/cfe_console.c ============================================================================== --- user/jchandra/8-stable-mips/sys/dev/cfe/cfe_console.c Thu Nov 18 10:34:18 2010 (r215451) +++ user/jchandra/8-stable-mips/sys/dev/cfe/cfe_console.c Thu Nov 18 11:19:23 2010 (r215452) @@ -84,14 +84,12 @@ CONSOLE_DRIVER(cfe); static void cn_drvinit(void *unused) { - char output[32]; struct tty *tp; if (cfe_consdev.cn_pri != CN_DEAD && cfe_consdev.cn_name[0] != '\0') { tp = tty_alloc(&cfe_ttydevsw, NULL); - tty_makedev(tp, NULL, "%s", output); - tty_makealias(tp, "cfecons"); + tty_makedev(tp, NULL, "cfecons"); } } @@ -117,15 +115,21 @@ cfe_tty_close(struct tty *tp) static void cfe_tty_outwakeup(struct tty *tp) { - int len; + int len, written, rc; u_char buf[CFEBURSTLEN]; for (;;) { len = ttydisc_getc(tp, buf, sizeof buf); if (len == 0) break; - while (cfe_write(conhandle, buf, len) == 0) - continue; + + written = 0; + while (written < len) { + rc = cfe_write(conhandle, &buf[written], len - written); + if (rc < 0) + break; + written += rc; + } } } @@ -184,13 +188,9 @@ cfe_cnterm(struct consdev *cp) static int cfe_cngetc(struct consdev *cp) { - int result; unsigned char ch; - while ((result = cfe_read(conhandle, &ch, 1)) == 0) - continue; - - if (result > 0) { + if (cfe_read(conhandle, &ch, 1) == 1) { #if defined(KDB) && defined(ALT_BREAK_TO_DEBUGGER) int kdb_brk; Copied: user/jchandra/8-stable-mips/sys/dev/cfe/cfe_env.c (from r202061, head/sys/dev/cfe/cfe_env.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/jchandra/8-stable-mips/sys/dev/cfe/cfe_env.c Thu Nov 18 11:19:23 2010 (r215452, copy of r202061, head/sys/dev/cfe/cfe_env.c) @@ -0,0 +1,74 @@ +/*- + * Copyright (c) 2009 Neelkanth Natu + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include <sys/param.h> +#include <sys/kernel.h> +#include <sys/systm.h> + +#include <dev/cfe/cfe_api.h> + +__FBSDID("$FreeBSD$"); + +#ifndef CFE_ENV_SIZE +#define CFE_ENV_SIZE PAGE_SIZE /* default is one page */ +#endif + +extern void cfe_env_init(void); + +static char cfe_env_buf[CFE_ENV_SIZE]; + +void +cfe_env_init(void) +{ + int idx, len; + char name[64], val[128], *cp, *cplim; + + cp = cfe_env_buf; + cplim = cp + CFE_ENV_SIZE; + + idx = 0; + while (1) { + if (cfe_enumenv(idx, name, sizeof(name), val, sizeof(val)) != 0) + break; + + if (bootverbose) + printf("Importing CFE env: \"%s=%s\"\n", name, val); + + /* + * name=val\0\0 + */ + len = strlen(name) + 1 + strlen(val) + 1 + 1; + if (cplim - cp < len) + printf("No space to store CFE env: \"%s=%s\"\n", + name, val); + else + cp += sprintf(cp, "%s=%s", name, val) + 1; + ++idx; + } + *cp++ = '\0'; + + kern_envp = cfe_env_buf; +} Modified: user/jchandra/8-stable-mips/sys/mips/atheros/apb.c ============================================================================== --- user/jchandra/8-stable-mips/sys/mips/atheros/apb.c Thu Nov 18 10:34:18 2010 (r215451) +++ user/jchandra/8-stable-mips/sys/mips/atheros/apb.c Thu Nov 18 11:19:23 2010 (r215452) @@ -52,7 +52,7 @@ __FBSDID("$FreeBSD$"); static int apb_activate_resource(device_t, device_t, int, int, struct resource *); -static device_t apb_add_child(device_t, int, const char *, int); +static device_t apb_add_child(device_t, u_int, const char *, int); static struct resource * apb_alloc_resource(device_t, device_t, int, int *, u_long, u_long, u_long, u_int); @@ -397,7 +397,7 @@ apb_hinted_child(device_t bus, const cha } static device_t -apb_add_child(device_t bus, int order, const char *name, int unit) +apb_add_child(device_t bus, u_int order, const char *name, int unit) { device_t child; struct apb_ivar *ivar; Modified: user/jchandra/8-stable-mips/sys/modules/Makefile ============================================================================== --- user/jchandra/8-stable-mips/sys/modules/Makefile Thu Nov 18 10:34:18 2010 (r215451) +++ user/jchandra/8-stable-mips/sys/modules/Makefile Thu Nov 18 11:19:23 2010 (r215452) @@ -35,15 +35,15 @@ SUBDIR= ${_3dfx} \ ata \ ath \ ${_auxio} \ - bce \ + ${_bce} \ bfe \ bge \ ${_bios} \ ${_bktr} \ ${_bm} \ bridgestp \ - bwi \ - bwn \ + ${_bwi} \ + ${_bwn} \ cam \ ${_canbepm} \ ${_canbus} \ @@ -67,7 +67,7 @@ SUBDIR= ${_3dfx} \ ${_cryptodev} \ ${_cs} \ ${_ctau} \ - cxgb \ + ${_cxgb} \ ${_cyclic} \ dc \ dcons \ @@ -178,13 +178,13 @@ SUBDIR= ${_3dfx} \ mcd \ md \ mem \ - mfi \ + ${_mfi} \ mii \ mlx \ ${_mly} \ mmc \ mmcsd \ - mpt \ + ${_mpt} \ mqueue \ msdosfs \ msdosfs_iconv \ @@ -257,7 +257,7 @@ SUBDIR= ${_3dfx} \ sem \ sf \ sge \ - siba_bwn \ + ${_siba_bwn} \ siftr \ siis \ sis \ @@ -275,7 +275,7 @@ SUBDIR= ${_3dfx} \ stge \ ${_streams} \ ${_svr4} \ - sym \ + ${_sym} \ ${_syscons} \ sysvipc \ ti \ @@ -287,7 +287,7 @@ SUBDIR= ${_3dfx} \ twe \ tx \ txp \ - uart \ + ${_uart} \ ubsec \ udf \ udf_iconv \ @@ -320,11 +320,26 @@ SUBDIR= ${_3dfx} \ ${_zfs} \ zlib \ -.if ${MACHINE_ARCH} != "powerpc" +.if ${MACHINE_ARCH} != "powerpc" && ${MACHINE_ARCH} != "arm" && \ + ${MACHINE_ARCH} != "mips" _syscons= syscons _vpo= vpo .endif +.if ${MACHINE_ARCH} != "arm" && ${MACHINE_ARCH} != "mips" +# no BUS_SPACE_UNSPECIFIED +_bce= bce +_bwi= bwi +_bwn= bwn +_mfi= mfi +_mpt= mpt +_siba_bwn= siba_bwn +# No barrier instruction support (specific to this driver) +_sym= sym +# no uart_cpu_$MACHINE_ARCH +_uart= uart +.endif + .if ${MK_CRYPT} != "no" || defined(ALL_MODULES) .if exists(${.CURDIR}/../opencrypto) _crypto= crypto
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201011181119.oAIBJNCp027327>