From owner-p4-projects@FreeBSD.ORG Sat Oct 4 13:26:12 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A564F1065691; Sat, 4 Oct 2008 13:26:12 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 68A19106568B for ; Sat, 4 Oct 2008 13:26:12 +0000 (UTC) (envelope-from raj@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 558428FC16 for ; Sat, 4 Oct 2008 13:26:12 +0000 (UTC) (envelope-from raj@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id m94DQC7l023686 for ; Sat, 4 Oct 2008 13:26:12 GMT (envelope-from raj@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id m94DQCNs023684 for perforce@freebsd.org; Sat, 4 Oct 2008 13:26:12 GMT (envelope-from raj@freebsd.org) Date: Sat, 4 Oct 2008 13:26:12 GMT Message-Id: <200810041326.m94DQCNs023684@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to raj@freebsd.org using -f From: Rafal Jaworowski To: Perforce Change Reviews Cc: Subject: PERFORCE change 150959 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Oct 2008 13:26:13 -0000 http://perforce.freebsd.org/chv.cgi?CH=150959 Change 150959 by raj@raj_mimi on 2008/10/04 13:26:08 IFC @150957 Affected files ... .. //depot/projects/arm/src/lib/libpmc/Makefile#4 integrate .. //depot/projects/arm/src/lib/libpmc/pmc.3#8 integrate .. //depot/projects/arm/src/lib/libpmc/pmc.atom.3#1 branch .. //depot/projects/arm/src/lib/libpmc/pmc.core.3#1 branch .. //depot/projects/arm/src/lib/libpmc/pmc.core2.3#1 branch .. //depot/projects/arm/src/lib/libpmc/pmc.iaf.3#1 branch .. //depot/projects/arm/src/sys/boot/forth/loader.conf#21 integrate .. //depot/projects/arm/src/sys/boot/uboot/lib/api_public.h#3 integrate .. //depot/projects/arm/src/sys/boot/uboot/lib/glue.c#6 integrate .. //depot/projects/arm/src/sys/boot/uboot/lib/glue.h#4 integrate .. //depot/projects/arm/src/sys/boot/uboot/lib/net.c#5 integrate .. //depot/projects/arm/src/sys/conf/files#93 integrate .. //depot/projects/arm/src/sys/dev/hptiop/hptiop.h#3 integrate .. //depot/projects/arm/src/usr.sbin/sysinstall/devices.c#9 integrate Differences ... ==== //depot/projects/arm/src/lib/libpmc/Makefile#4 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/lib/libpmc/Makefile,v 1.11 2008/09/16 16:57:14 jkoshy Exp $ +# $FreeBSD: src/lib/libpmc/Makefile,v 1.12 2008/10/04 12:27:49 jkoshy Exp $ LIB= pmc @@ -24,6 +24,10 @@ MAN+= pmclog.3 # PMC-dependent manual pages +MAN+= pmc.atom.3 +MAN+= pmc.core.3 +MAN+= pmc.core2.3 +MAN+= pmc.iaf.3 MAN+= pmc.k7.3 MAN+= pmc.k8.3 MAN+= pmc.p4.3 ==== //depot/projects/arm/src/lib/libpmc/pmc.3#8 (text+ko) ==== @@ -21,7 +21,7 @@ .\" out of the use of this software, even if advised of the possibility of .\" such damage. .\" -.\" $FreeBSD: src/lib/libpmc/pmc.3,v 1.22 2008/09/22 14:31:24 jkoshy Exp $ +.\" $FreeBSD: src/lib/libpmc/pmc.3,v 1.23 2008/10/04 12:35:02 jkoshy Exp $ .\" .Dd September 16, 2008 .Os @@ -185,15 +185,15 @@ .Vt enum pmc_class enumeration. Supported PMC kinds include: -.Bl -tag -width "Li PMC_CLASS_IA_FIXED" -compact -.It Li PMC_CLASS_IA +.Bl -tag -width "Li PMC_CLASS_IAF" -compact +.It Li PMC_CLASS_IAF +Fixed function hardwre counters presents in CPUs conforming to the +.Tn Intel +performance measurement architecture version 2 and later. +.It Li PMC_CLASS_IAP Programmable hardware counters present in CPUs conforming to the .Tn Intel performance measurement architecture version 1 and later. -.It Li PMC_CLASS_IA_FIXED -Fixed function hardwre counters presents in CPUs conforming to the -.Tn Intel -performance measurement architecture version 2 and later. .It Li PMC_CLASS_K7 Programmable hardware counters present in .Tn "AMD Athlon" @@ -474,10 +474,12 @@ .El .Pp .Ss PMC Architecture Dependent Events -PMC architecture dependent event specifiers are described in their own -individual manual pages: +PMC architecture dependent event specifiers are described in the +following manual pages: .Bl -column " PMC_CLASS_TSC " "MANUAL PAGE " .It Em "PMC Class" Ta Em "Manual Page" +.It Li PMC_CLASS_IAF Ta Xr pmc.iaf 3 +.It Li PMC_CLASS_IAP Ta Xr pmc.atom 3 , Xr pmc.core 3 , Xr pmc.core2 3 .It Li PMC_CLASS_K7 Ta Xr pmc.k7 3 .It Li PMC_CLASS_K8 Ta Xr pmc.k8 3 .It Li PMC_CLASS_P4 Ta Xr pmc.p4 3 @@ -503,6 +505,10 @@ API is .Ud .Sh SEE ALSO +.Xr pmc.atom 3 , +.Xr pmc.core 3 , +.Xr pmc.core2 3 , +.Xr pmc.iaf 3 , .Xr pmc.k7 3 , .Xr pmc.k8 3 , .Xr pmc.p4 3 , ==== //depot/projects/arm/src/sys/boot/forth/loader.conf#21 (text+ko) ==== @@ -6,7 +6,7 @@ # # All arguments must be in double quotes. # -# $FreeBSD: src/sys/boot/forth/loader.conf,v 1.133 2008/09/10 18:36:58 jhb Exp $ +# $FreeBSD: src/sys/boot/forth/loader.conf,v 1.134 2008/10/04 11:49:53 stas Exp $ ############################################################## ### Basic configuration options ############################ @@ -208,6 +208,7 @@ ############################################################## miibus_load="NO" # miibus support, needed for some drivers +if_ae_load="NO" # Attansic/Atheros L2 FastEthernet if_age_load="NO" # Attansic/Atheros L1 Gigabit Ethernet if_an_load="NO" # Aironet 4500/4800 802.11 wireless NICs if_ar_load="NO" # Digi SYNC/570i ==== //depot/projects/arm/src/sys/boot/uboot/lib/api_public.h#3 (text+ko) ==== @@ -48,7 +48,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/boot/uboot/lib/api_public.h,v 1.3 2008/03/13 17:54:21 obrien Exp $ + * $FreeBSD: src/sys/boot/uboot/lib/api_public.h,v 1.5 2008/10/04 13:19:15 raj Exp $ * * This file needs to be kept in sync with U-Boot reference: * http://www.denx.de/cgi-bin/gitweb.cgi?p=u-boot.git;a=blob;f=include/api_public.h @@ -62,6 +62,7 @@ #define API_ENOMEM 3 /* no memory */ #define API_EBUSY 4 /* busy, occupied etc. */ #define API_EIO 5 /* I/O error */ +#define API_ESYSC 6 /* syscall error */ typedef int (*scp_t)(int, int *, ...); @@ -117,7 +118,7 @@ #undef CFG_64BIT_LBA #ifdef CFG_64BIT_LBA -typedef u_int64_t lbasize_t; +typedef uint64_t lbasize_t; #else typedef unsigned long lbasize_t; #endif ==== //depot/projects/arm/src/sys/boot/uboot/lib/glue.c#6 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/boot/uboot/lib/glue.c,v 1.5 2008/09/03 17:48:41 raj Exp $"); +__FBSDID("$FreeBSD: src/sys/boot/uboot/lib/glue.c,v 1.7 2008/10/04 13:19:15 raj Exp $"); #include #include "api_public.h" @@ -216,9 +216,7 @@ syscall(API_RESET, NULL); } - -#define MR_MAX 5 -static struct mem_region mr[MR_MAX]; +static struct mem_region mr[UB_MAX_MR]; static struct sys_info si; struct sys_info * @@ -228,7 +226,7 @@ memset(&si, 0, sizeof(struct sys_info)); si.mr = mr; - si.mr_no = MR_MAX; + si.mr_no = UB_MAX_MR; memset(&mr, 0, sizeof(mr)); if (!syscall(API_GET_SYS_INFO, &err, (u_int32_t)&si)) @@ -267,19 +265,17 @@ * * devices * - * Devices are identified by handles: numbers 0, 1, 2, ..., MAX_DEVS-1 + * Devices are identified by handles: numbers 0, 1, 2, ..., UB_MAX_DEV-1 * ***************************************************************************/ -#define MAX_DEVS 6 - -static struct device_info devices[MAX_DEVS]; +static struct device_info devices[UB_MAX_DEV]; struct device_info * ub_dev_get(int i) { - return ((i < 0 || i >= MAX_DEVS) ? NULL : &devices[i]); + return ((i < 0 || i >= UB_MAX_DEV) ? NULL : &devices[i]); } /* @@ -294,7 +290,7 @@ struct device_info *di; int n = 0; - memset(&devices, 0, sizeof(struct device_info) * MAX_DEVS); + memset(&devices, 0, sizeof(struct device_info) * UB_MAX_DEV); di = &devices[0]; if (!syscall(API_DEV_ENUM, NULL, di)) @@ -302,7 +298,7 @@ while (di->cookie != NULL) { - if (++n >= MAX_DEVS) + if (++n >= UB_MAX_DEV) break; /* take another device_info */ @@ -330,7 +326,7 @@ struct device_info *di; int err = 0; - if (handle < 0 || handle >= MAX_DEVS) + if (handle < 0 || handle >= UB_MAX_DEV) return (API_EINVAL); di = &devices[handle]; @@ -345,7 +341,7 @@ { struct device_info *di; - if (handle < 0 || handle >= MAX_DEVS) + if (handle < 0 || handle >= UB_MAX_DEV) return (API_EINVAL); di = &devices[handle]; @@ -367,7 +363,7 @@ dev_valid(int handle) { - if (handle < 0 || handle >= MAX_DEVS) + if (handle < 0 || handle >= UB_MAX_DEV) return (0); if (devices[handle].state != DEV_STA_OPEN) @@ -390,7 +386,8 @@ } int -ub_dev_read(int handle, void *buf, lbasize_t len, lbastart_t start) +ub_dev_read(int handle, void *buf, lbasize_t len, lbastart_t start, + lbasize_t *rlen) { struct device_info *di; lbasize_t act_len; @@ -401,15 +398,12 @@ di = &devices[handle]; if (!syscall(API_DEV_READ, &err, di, buf, &len, &start, &act_len)) - return (-1); + return (API_ESYSC); - if (err) - return (err); + if (!err && rlen) + *rlen = act_len; - if (act_len != len) - return (API_EIO); - - return (0); + return (err); } static int @@ -426,7 +420,7 @@ } int -ub_dev_recv(int handle, void *buf, int len) +ub_dev_recv(int handle, void *buf, int len, int *rlen) { struct device_info *di; int err = 0, act_len; @@ -436,12 +430,12 @@ di = &devices[handle]; if (!syscall(API_DEV_READ, &err, di, buf, &len, &act_len)) - return (-1); + return (API_ESYSC); - if (err) - return (-1); + if (!err) + *rlen = act_len; - return (act_len); + return (err); } int @@ -455,7 +449,7 @@ di = &devices[handle]; if (!syscall(API_DEV_WRITE, &err, di, buf, &len)) - return (-1); + return (API_ESYSC); return (err); } @@ -483,7 +477,7 @@ ub_mem_type(int flags) { - switch(flags & 0x000F) { + switch (flags & 0x000F) { case MR_ATTR_FLASH: return ("FLASH"); case MR_ATTR_DRAM: ==== //depot/projects/arm/src/sys/boot/uboot/lib/glue.h#4 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/boot/uboot/lib/glue.h,v 1.4 2008/09/03 17:48:41 raj Exp $ + * $FreeBSD: src/sys/boot/uboot/lib/glue.h,v 1.6 2008/10/04 13:19:15 raj Exp $ */ /* @@ -40,6 +40,9 @@ int api_search_sig(struct api_signature **sig); +#define UB_MAX_MR 5 /* max mem regions number */ +#define UB_MAX_DEV 6 /* max devices number */ + /* * The ub_ library calls are part of the application, not U-Boot code! They * are front-end wrappers that are used by the consumer application: they @@ -50,8 +53,8 @@ /* console */ int ub_getc(void); int ub_tstc(void); -void ub_putc(char c); -void ub_puts(const char *s); +void ub_putc(char); +void ub_puts(const char *); /* system */ void ub_reset(void); @@ -62,19 +65,18 @@ unsigned long ub_get_timer(unsigned long); /* env vars */ -char *ub_env_get(const char *name); -void ub_env_set(const char *name, char *value); -const char *ub_env_enum(const char *last); +char *ub_env_get(const char *); +void ub_env_set(const char *, char *); +const char *ub_env_enum(const char *); /* devices */ int ub_dev_enum(void); -int ub_dev_open(int handle); -int ub_dev_close(int handle); -int ub_dev_read(int handle, void *buf, lbasize_t len, lbastart_t start); -int ub_dev_send(int handle, void *buf, int len); -int ub_dev_recv(int handle, void *buf, int len); - -struct device_info * ub_dev_get(int); +int ub_dev_open(int); +int ub_dev_close(int); +int ub_dev_read(int, void *, lbasize_t, lbastart_t, lbasize_t *); +int ub_dev_send(int, void *, int); +int ub_dev_recv(int, void *, int, int *); +struct device_info *ub_dev_get(int); void ub_dump_di(int); void ub_dump_si(struct sys_info *); ==== //depot/projects/arm/src/sys/boot/uboot/lib/net.c#5 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/boot/uboot/lib/net.c,v 1.4 2008/09/03 15:39:50 raj Exp $"); +__FBSDID("$FreeBSD: src/sys/boot/uboot/lib/net.c,v 1.6 2008/10/04 13:19:15 raj Exp $"); #include #include @@ -59,8 +59,8 @@ static int net_put(struct iodesc *, void *, size_t); static void net_end(struct netif *); -extern int devs_no; -extern struct netif_stats net_stats[]; +extern int devs_no; +extern struct netif_stats net_stats[]; struct netif_dif net_ifs[] = { /* dif_unit dif_nsel dif_stats dif_private */ @@ -82,10 +82,10 @@ }; struct uboot_softc { - u_int32_t sc_pad; - u_int8_t sc_rxbuf[ETHER_MAX_LEN]; - u_int8_t sc_txbuf[ETHER_MAX_LEN + PKTALIGN]; - u_int8_t *sc_txbufp; + uint32_t sc_pad; + uint8_t sc_rxbuf[ETHER_MAX_LEN]; + uint8_t sc_txbuf[ETHER_MAX_LEN + PKTALIGN]; + uint8_t *sc_txbufp; int sc_handle; /* device handle for ub_dev_xxx */ }; @@ -170,38 +170,43 @@ static int net_get(struct iodesc *desc, void *pkt, size_t len, time_t timeout) { - struct netif *nif = desc->io_netif; - struct uboot_softc *sc = nif->nif_devdata; - time_t t; - int length; + struct netif *nif = desc->io_netif; + struct uboot_softc *sc = nif->nif_devdata; + time_t t; + int err, rlen; #if defined(NETIF_DEBUG) printf("net_get: pkt %x, len %d, timeout %d\n", pkt, len, timeout); #endif t = getsecs(); do { - length = ub_dev_recv(sc->sc_handle, sc->sc_rxbuf, len); - } while ((length == -1 || length == 0) && - (getsecs() - t < timeout)); + err = ub_dev_recv(sc->sc_handle, sc->sc_rxbuf, len, &rlen); + + if (err != 0) { + printf("net_get: ub_dev_recv() failed, error=%d\n", + err); + rlen = 0; + break; + } + } while ((rlen == -1 || rlen == 0) && (getsecs() - t < timeout)); #if defined(NETIF_DEBUG) - printf("net_get: received len %d (%x)\n", length, length); + printf("net_get: received len %d (%x)\n", rlen, rlen); #endif - if (length > 0) { - memcpy(pkt, sc->sc_rxbuf, MIN(len, length)); - if (length != len) { + if (rlen > 0) { + memcpy(pkt, sc->sc_rxbuf, MIN(len, rlen)); + if (rlen != len) { #if defined(NETIF_DEBUG) - printf("net_get: len %x, length %x\n", len, length); + printf("net_get: len %x, rlen %x\n", len, rlen); #endif } - return (length); + return (rlen); } return (-1); } - static void net_init(struct iodesc *desc, void *machdep_hint) { @@ -236,7 +241,6 @@ (unsigned long)sc->sc_txbufp % PKTALIGN; } - static void net_end(struct netif *nif) { ==== //depot/projects/arm/src/sys/conf/files#93 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/files,v 1.1335 2008/10/03 10:31:31 stas Exp $ +# $FreeBSD: src/sys/conf/files,v 1.1336 2008/10/04 10:39:31 antoine Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -697,7 +697,7 @@ dev/hme/if_hme.c optional hme dev/hme/if_hme_pci.c optional hme pci dev/hme/if_hme_sbus.c optional hme sbus -dev/hptiop/hptiop.c optional hptiop cam +dev/hptiop/hptiop.c optional hptiop scbus dev/hwpmc/hwpmc_logging.c optional hwpmc dev/hwpmc/hwpmc_mod.c optional hwpmc dev/ichsmb/ichsmb.c optional ichsmb ==== //depot/projects/arm/src/sys/dev/hptiop/hptiop.h#3 (text+ko) ==== @@ -27,13 +27,13 @@ #define _HPTIOP_H #include -__FBSDID("$FreeBSD: src/sys/dev/hptiop/hptiop.h,v 1.2 2008/02/03 16:07:12 scottl Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/hptiop/hptiop.h,v 1.3 2008/10/04 10:39:31 antoine Exp $"); #define DBG 0 #ifdef DBG -int hpt_dbg_level = 0; -#define KdPrint(x) do { if (hpt_dbg_level) printf x; } while (0) +int hpt_iop_dbg_level = 0; +#define KdPrint(x) do { if (hpt_iop_dbg_level) printf x; } while (0) #define HPT_ASSERT(x) assert(x) #else #define KdPrint(x) ==== //depot/projects/arm/src/usr.sbin/sysinstall/devices.c#9 (text+ko) ==== @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $FreeBSD: src/usr.sbin/sysinstall/devices.c,v 1.177 2008/08/11 04:58:06 weongyo Exp $ + * $FreeBSD: src/usr.sbin/sysinstall/devices.c,v 1.178 2008/10/04 11:49:26 stas Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -93,6 +93,7 @@ DISK("mfid%d", "LSI MegaRAID SAS array", 4), FLOPPY("fd%d", "floppy drive unit A", 4), SERIAL("cuad%d", "%s on device %s (COM%d)", 16), + NETWORK("ae", "Attansic/Atheros L2 FastEthernet"), NETWORK("age", "Attansic/Atheros L1 Gigabit Ethernet"), NETWORK("an", "Aironet 4500/4800 802.11 wireless adapter"), NETWORK("ath", "Atheros IEEE 802.11 wireless adapter"),