From owner-svn-src-user@FreeBSD.ORG Sat May 11 19:46:23 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id DDEEB80B; Sat, 11 May 2013 19:46:23 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id CD99069D; Sat, 11 May 2013 19:46:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r4BJkNPs037519; Sat, 11 May 2013 19:46:23 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r4BJkGXG037471; Sat, 11 May 2013 19:46:16 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201305111946.r4BJkGXG037471@svn.freebsd.org> From: Attilio Rao Date: Sat, 11 May 2013 19:46:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r250526 - in user/attilio/jeff-numa: . bin/dd bin/sh etc lib/libc/gen lib/libthr/thread sbin/dmesg sbin/hastctl sbin/hastd share/examples/ppi share/man/man3 share/misc share/syscons/fon... X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 May 2013 19:46:23 -0000 Author: attilio Date: Sat May 11 19:46:15 2013 New Revision: 250526 URL: http://svnweb.freebsd.org/changeset/base/250526 Log: MFC Added: user/attilio/jeff-numa/sys/boot/fdt/dts/beaglebone-black.dts - copied unchanged from r250525, user/attilio/vmcontention/sys/boot/fdt/dts/beaglebone-black.dts user/attilio/jeff-numa/usr.sbin/bsnmpd/modules/snmp_hast/snmp_hast.3 - copied unchanged from r250525, user/attilio/vmcontention/usr.sbin/bsnmpd/modules/snmp_hast/snmp_hast.3 Deleted: user/attilio/jeff-numa/usr.sbin/bsnmpd/modules/snmp_hast/snmp_hast.8 user/attilio/jeff-numa/usr.sbin/makefs/compat/ user/attilio/jeff-numa/usr.sbin/makefs/getid.c Modified: user/attilio/jeff-numa/Makefile.inc1 user/attilio/jeff-numa/bin/dd/args.c user/attilio/jeff-numa/bin/dd/conv_tab.c user/attilio/jeff-numa/bin/dd/dd.c user/attilio/jeff-numa/bin/dd/extern.h user/attilio/jeff-numa/bin/dd/misc.c user/attilio/jeff-numa/bin/dd/position.c user/attilio/jeff-numa/bin/sh/var.c user/attilio/jeff-numa/etc/protocols user/attilio/jeff-numa/lib/libc/gen/posix_spawn_file_actions_addopen.3 user/attilio/jeff-numa/lib/libc/gen/wordexp.c user/attilio/jeff-numa/lib/libthr/thread/thr_sig.c user/attilio/jeff-numa/sbin/dmesg/dmesg.8 user/attilio/jeff-numa/sbin/dmesg/dmesg.c user/attilio/jeff-numa/sbin/hastctl/Makefile user/attilio/jeff-numa/sbin/hastd/Makefile user/attilio/jeff-numa/sbin/hastd/token.l user/attilio/jeff-numa/share/examples/ppi/ppilcd.c user/attilio/jeff-numa/share/man/man3/queue.3 user/attilio/jeff-numa/share/misc/pci_vendors user/attilio/jeff-numa/share/syscons/fonts/iso05-8x16.fnt user/attilio/jeff-numa/sys/amd64/amd64/fpu.c user/attilio/jeff-numa/sys/amd64/amd64/genassym.c user/attilio/jeff-numa/sys/amd64/amd64/identcpu.c user/attilio/jeff-numa/sys/amd64/amd64/machdep.c user/attilio/jeff-numa/sys/amd64/ia32/ia32_signal.c user/attilio/jeff-numa/sys/amd64/include/pcb.h user/attilio/jeff-numa/sys/amd64/linux32/linux32_machdep.c user/attilio/jeff-numa/sys/amd64/linux32/linux32_sysvec.c user/attilio/jeff-numa/sys/amd64/vmm/io/vlapic.c user/attilio/jeff-numa/sys/amd64/vmm/vmm_dev.c user/attilio/jeff-numa/sys/amd64/vmm/vmm_stat.c user/attilio/jeff-numa/sys/amd64/vmm/vmm_stat.h user/attilio/jeff-numa/sys/boot/fdt/dts/am335x.dtsi user/attilio/jeff-numa/sys/boot/fdt/dts/beaglebone.dts user/attilio/jeff-numa/sys/cam/ata/ata_pmp.c user/attilio/jeff-numa/sys/cam/ctl/scsi_ctl.c user/attilio/jeff-numa/sys/cam/scsi/scsi_da.c user/attilio/jeff-numa/sys/cam/scsi/scsi_pt.c user/attilio/jeff-numa/sys/conf/options user/attilio/jeff-numa/sys/contrib/octeon-sdk/cvmx-app-init.h user/attilio/jeff-numa/sys/contrib/octeon-sdk/cvmx-helper-board.c user/attilio/jeff-numa/sys/contrib/octeon-sdk/cvmx-helper-sgmii.c user/attilio/jeff-numa/sys/contrib/octeon-sdk/cvmx-mgmt-port.c user/attilio/jeff-numa/sys/contrib/octeon-sdk/cvmx-pcie.c user/attilio/jeff-numa/sys/contrib/octeon-sdk/cvmx-rtc.h user/attilio/jeff-numa/sys/dev/aic7xxx/aic7xxx.h user/attilio/jeff-numa/sys/dev/ath/if_ath.c user/attilio/jeff-numa/sys/dev/ath/if_ath_tx_edma.c user/attilio/jeff-numa/sys/dev/cp/if_cp.c user/attilio/jeff-numa/sys/dev/ctau/if_ct.c user/attilio/jeff-numa/sys/dev/cx/csigma.c user/attilio/jeff-numa/sys/dev/cx/if_cx.c user/attilio/jeff-numa/sys/dev/e1000/if_em.c user/attilio/jeff-numa/sys/dev/e1000/if_em.h user/attilio/jeff-numa/sys/dev/e1000/if_lem.c user/attilio/jeff-numa/sys/dev/e1000/if_lem.h user/attilio/jeff-numa/sys/dev/hptmv/entry.c user/attilio/jeff-numa/sys/dev/isci/scil/scif_sas_domain.c user/attilio/jeff-numa/sys/dev/netmap/netmap_mem2.c user/attilio/jeff-numa/sys/dev/nsp/nsp.c user/attilio/jeff-numa/sys/dev/pci/pci.c user/attilio/jeff-numa/sys/dev/sfxge/common/efx_mcdi.c user/attilio/jeff-numa/sys/dev/sn/if_sn.c user/attilio/jeff-numa/sys/dev/stg/tmc18c30.c user/attilio/jeff-numa/sys/fs/nullfs/null.h user/attilio/jeff-numa/sys/fs/nullfs/null_subr.c user/attilio/jeff-numa/sys/fs/nullfs/null_vfsops.c user/attilio/jeff-numa/sys/fs/nullfs/null_vnops.c user/attilio/jeff-numa/sys/kern/kern_lock.c user/attilio/jeff-numa/sys/kern/subr_witness.c user/attilio/jeff-numa/sys/kern/uipc_syscalls.c user/attilio/jeff-numa/sys/kern/uipc_usrreq.c user/attilio/jeff-numa/sys/kern/vfs_subr.c user/attilio/jeff-numa/sys/kern/vfs_syscalls.c user/attilio/jeff-numa/sys/mips/conf/OCTEON1 user/attilio/jeff-numa/sys/mips/conf/ROUTERSTATION.hints user/attilio/jeff-numa/sys/mips/mips/bus_space_fdt.c user/attilio/jeff-numa/sys/mips/mips/bus_space_generic.c user/attilio/jeff-numa/sys/net/if_gre.c user/attilio/jeff-numa/sys/net80211/ieee80211_ht.c user/attilio/jeff-numa/sys/netgraph/bluetooth/l2cap/ng_l2cap_cmds.c user/attilio/jeff-numa/sys/netinet/if_ether.c user/attilio/jeff-numa/sys/netinet/ip_gre.c user/attilio/jeff-numa/sys/netinet/sctp_pcb.c user/attilio/jeff-numa/sys/netinet6/sctp6_usrreq.c user/attilio/jeff-numa/sys/netpfil/pf/if_pfsync.c user/attilio/jeff-numa/sys/netpfil/pf/pf.c user/attilio/jeff-numa/sys/netpfil/pf/pf_ioctl.c user/attilio/jeff-numa/sys/ofed/drivers/net/mlx4/eq.c user/attilio/jeff-numa/sys/sys/lock.h user/attilio/jeff-numa/sys/sys/lockmgr.h user/attilio/jeff-numa/sys/sys/mount.h user/attilio/jeff-numa/sys/vm/vm_radix.c user/attilio/jeff-numa/sys/x86/cpufreq/p4tcc.c user/attilio/jeff-numa/tools/regression/file/dup/dup.c user/attilio/jeff-numa/usr.bin/calendar/calendars/calendar.freebsd user/attilio/jeff-numa/usr.bin/gcore/Makefile user/attilio/jeff-numa/usr.bin/lockf/lockf.1 user/attilio/jeff-numa/usr.bin/lockf/lockf.c user/attilio/jeff-numa/usr.bin/split/split.1 user/attilio/jeff-numa/usr.bin/split/split.c user/attilio/jeff-numa/usr.bin/xargs/xargs.c user/attilio/jeff-numa/usr.sbin/arp/arp.4 user/attilio/jeff-numa/usr.sbin/bluetooth/hccontrol/link_control.c user/attilio/jeff-numa/usr.sbin/bsdconfig/share/packages/index.subr user/attilio/jeff-numa/usr.sbin/bsdinstall/distextract/Makefile user/attilio/jeff-numa/usr.sbin/bsdinstall/distfetch/Makefile user/attilio/jeff-numa/usr.sbin/bsdinstall/partedit/Makefile user/attilio/jeff-numa/usr.sbin/bsnmpd/modules/snmp_hast/Makefile user/attilio/jeff-numa/usr.sbin/ctladm/ctladm.c user/attilio/jeff-numa/usr.sbin/dumpcis/printcis.c user/attilio/jeff-numa/usr.sbin/makefs/Makefile user/attilio/jeff-numa/usr.sbin/makefs/makefs.h user/attilio/jeff-numa/usr.sbin/makefs/walk.c user/attilio/jeff-numa/usr.sbin/mergemaster/mergemaster.sh user/attilio/jeff-numa/usr.sbin/vidcontrol/vidcontrol.c Directory Properties: user/attilio/jeff-numa/ (props changed) user/attilio/jeff-numa/lib/libc/ (props changed) user/attilio/jeff-numa/sbin/ (props changed) user/attilio/jeff-numa/sys/ (props changed) user/attilio/jeff-numa/sys/amd64/vmm/ (props changed) user/attilio/jeff-numa/sys/boot/ (props changed) user/attilio/jeff-numa/sys/conf/ (props changed) user/attilio/jeff-numa/sys/contrib/octeon-sdk/ (props changed) user/attilio/jeff-numa/usr.bin/calendar/ (props changed) Modified: user/attilio/jeff-numa/Makefile.inc1 ============================================================================== --- user/attilio/jeff-numa/Makefile.inc1 Sat May 11 19:41:52 2013 (r250525) +++ user/attilio/jeff-numa/Makefile.inc1 Sat May 11 19:46:15 2013 (r250526) @@ -1176,7 +1176,8 @@ _kerberos5_bootstrap_tools= \ kerberos5/lib/libroken \ kerberos5/lib/libvers \ kerberos5/tools/asn1_compile \ - kerberos5/tools/slc + kerberos5/tools/slc \ + usr.bin/compile_et .endif # Please document (add comment) why something is in 'bootstrap-tools'. Modified: user/attilio/jeff-numa/bin/dd/args.c ============================================================================== --- user/attilio/jeff-numa/bin/dd/args.c Sat May 11 19:41:52 2013 (r250525) +++ user/attilio/jeff-numa/bin/dd/args.c Sat May 11 19:46:15 2013 (r250526) @@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include Modified: user/attilio/jeff-numa/bin/dd/conv_tab.c ============================================================================== --- user/attilio/jeff-numa/bin/dd/conv_tab.c Sat May 11 19:41:52 2013 (r250525) +++ user/attilio/jeff-numa/bin/dd/conv_tab.c Sat May 11 19:46:15 2013 (r250526) @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include "dd.h" Modified: user/attilio/jeff-numa/bin/dd/dd.c ============================================================================== --- user/attilio/jeff-numa/bin/dd/dd.c Sat May 11 19:41:52 2013 (r250525) +++ user/attilio/jeff-numa/bin/dd/dd.c Sat May 11 19:46:15 2013 (r250526) @@ -81,6 +81,7 @@ size_t cbsz; /* conversion block size uintmax_t files_cnt = 1; /* # of files to copy */ const u_char *ctab; /* conversion table */ char fill_char; /* Character to fill with if defined */ +volatile sig_atomic_t need_summary; int main(int argc __unused, char *argv[]) @@ -89,7 +90,7 @@ main(int argc __unused, char *argv[]) jcl(argv); setup(); - (void)signal(SIGINFO, summaryx); + (void)signal(SIGINFO, siginfo_handler); (void)signal(SIGINT, terminate); atexit(summary); @@ -375,6 +376,9 @@ dd_in(void) in.dbp += in.dbrcnt; (*cfunc)(); + if (need_summary) { + summary(); + } } } Modified: user/attilio/jeff-numa/bin/dd/extern.h ============================================================================== --- user/attilio/jeff-numa/bin/dd/extern.h Sat May 11 19:41:52 2013 (r250525) +++ user/attilio/jeff-numa/bin/dd/extern.h Sat May 11 19:46:15 2013 (r250526) @@ -43,7 +43,7 @@ void jcl(char **); void pos_in(void); void pos_out(void); void summary(void); -void summaryx(int); +void siginfo_handler(int); void terminate(int); void unblock(void); void unblock_close(void); @@ -61,3 +61,4 @@ extern const u_char e2a_32V[], e2a_POSIX extern const u_char a2ibm_32V[], a2ibm_POSIX[]; extern u_char casetab[]; extern char fill_char; +extern volatile sig_atomic_t need_summary; Modified: user/attilio/jeff-numa/bin/dd/misc.c ============================================================================== --- user/attilio/jeff-numa/bin/dd/misc.c Sat May 11 19:41:52 2013 (r250525) +++ user/attilio/jeff-numa/bin/dd/misc.c Sat May 11 19:46:15 2013 (r250526) @@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -57,41 +58,32 @@ summary(void) { struct timeval tv; double secs; - char buf[100]; (void)gettimeofday(&tv, NULL); secs = tv.tv_sec + tv.tv_usec * 1e-6 - st.start; if (secs < 1e-6) secs = 1e-6; - /* Use snprintf(3) so that we don't reenter stdio(3). */ - (void)snprintf(buf, sizeof(buf), + (void)fprintf(stderr, "%ju+%ju records in\n%ju+%ju records out\n", st.in_full, st.in_part, st.out_full, st.out_part); - (void)write(STDERR_FILENO, buf, strlen(buf)); - if (st.swab) { - (void)snprintf(buf, sizeof(buf), "%ju odd length swab %s\n", + if (st.swab) + (void)fprintf(stderr, "%ju odd length swab %s\n", st.swab, (st.swab == 1) ? "block" : "blocks"); - (void)write(STDERR_FILENO, buf, strlen(buf)); - } - if (st.trunc) { - (void)snprintf(buf, sizeof(buf), "%ju truncated %s\n", + if (st.trunc) + (void)fprintf(stderr, "%ju truncated %s\n", st.trunc, (st.trunc == 1) ? "block" : "blocks"); - (void)write(STDERR_FILENO, buf, strlen(buf)); - } - (void)snprintf(buf, sizeof(buf), + (void)fprintf(stderr, "%ju bytes transferred in %.6f secs (%.0f bytes/sec)\n", st.bytes, secs, st.bytes / secs); - (void)write(STDERR_FILENO, buf, strlen(buf)); + need_summary = 0; } /* ARGSUSED */ void -summaryx(int notused __unused) +siginfo_handler(int signo __unused) { - int save_errno = errno; - summary(); - errno = save_errno; + need_summary = 1; } /* ARGSUSED */ Modified: user/attilio/jeff-numa/bin/dd/position.c ============================================================================== --- user/attilio/jeff-numa/bin/dd/position.c Sat May 11 19:41:52 2013 (r250525) +++ user/attilio/jeff-numa/bin/dd/position.c Sat May 11 19:46:15 2013 (r250526) @@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include "dd.h" @@ -91,6 +92,8 @@ pos_in(void) } } else --cnt; + if (need_summary) + summary(); continue; } Modified: user/attilio/jeff-numa/bin/sh/var.c ============================================================================== --- user/attilio/jeff-numa/bin/sh/var.c Sat May 11 19:41:52 2013 (r250525) +++ user/attilio/jeff-numa/bin/sh/var.c Sat May 11 19:46:15 2013 (r250526) @@ -877,7 +877,7 @@ unsetvar(const char *s) /* - * Returns true if the two strings specify the same varable. The first + * Returns true if the two strings specify the same variable. The first * variable name is terminated by '='; the second may be terminated by * either '=' or '\0'. */ @@ -898,7 +898,7 @@ varequal(const char *p, const char *q) * Search for a variable. * 'name' may be terminated by '=' or a NUL. * vppp is set to the pointer to vp, or the list head if vp isn't found - * lenp is set to the number of charactets in 'name' + * lenp is set to the number of characters in 'name' */ static struct var * Modified: user/attilio/jeff-numa/etc/protocols ============================================================================== --- user/attilio/jeff-numa/etc/protocols Sat May 11 19:41:52 2013 (r250525) +++ user/attilio/jeff-numa/etc/protocols Sat May 11 19:46:15 2013 (r250526) @@ -92,6 +92,7 @@ vmtp 81 VMTP # Versatile Message Transp secure-vmtp 82 SECURE-VMTP # SECURE-VMTP vines 83 VINES # VINES ttp 84 TTP # TTP +#iptm 84 IPTM # Protocol Internet Protocol Traffic nsfnet-igp 85 NSFNET-IGP # NSFNET-IGP dgp 86 DGP # Dissimilar Gateway Protocol tcf 87 TCF # TCF @@ -145,7 +146,13 @@ rsvp-e2e-ignore 134 RSVP-E2E-IGNORE # Ag mobility-header 135 Mobility-Header # Mobility Support in IPv6 udplite 136 UDPLite # The UDP-Lite Protocol mpls-in-ip 137 MPLS-IN-IP # Encapsulating MPLS in IP +manet 138 MANET # MANET Protocols (RFC5498) +hip 139 HIP # Host Identity Protocol (RFC5201) +shim6 140 SHIM6 # Shim6 Protocol (RFC5533) +wesp 141 WESP # Wrapped Encapsulating Security Payload (RFC5840) +rohc 142 ROHC # Robust Header Compression (RFC5858) # 138-254 # Unassigned pfsync 240 PFSYNC # PF Synchronization +# 253-254 # Use for experimentation and testing (RFC3692) # 255 # Reserved divert 258 DIVERT # Divert pseudo-protocol [non IANA] Modified: user/attilio/jeff-numa/lib/libc/gen/posix_spawn_file_actions_addopen.3 ============================================================================== --- user/attilio/jeff-numa/lib/libc/gen/posix_spawn_file_actions_addopen.3 Sat May 11 19:41:52 2013 (r250525) +++ user/attilio/jeff-numa/lib/libc/gen/posix_spawn_file_actions_addopen.3 Sat May 11 19:46:15 2013 (r250526) @@ -34,7 +34,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 24, 2008 +.Dd May 9, 2013 .Dt POSIX_SPAWN_FILE_ACTIONS_ADDOPEN 3 .Os .Sh NAME @@ -123,7 +123,19 @@ to be duplicated as dup2(fildes, newfildes) .Ed .Pp -had been called) when a new process is spawned using this file actions object. +had been called) when a new process is spawned using this file actions object, +except that the +.Dv FD_CLOEXEC +flag for +.Fa newfildes +is cleared even if +.Fa fildes +is equal to +.Fa newfildes . +The difference from +.Fn dup2 +is useful for passing a particular file descriptor +to a particular child process. .Pp The .Fn posix_spawn_file_actions_addclose @@ -145,7 +157,7 @@ otherwise, an error number is returned t These functions fail if: .Bl -tag -width Er -.It Bq Er EINVAL +.It Bq Er EBADF The value specified by .Fa fildes or @@ -169,7 +181,16 @@ The and .Fn posix_spawn_file_actions_addclose functions conform to -.St -p1003.1-2001 . +.St -p1003.1-2001 , +with the exception of the behavior of +.Fn posix_spawn_file_actions_adddup2 +if +.Fa fildes +is equal to +.Fa newfildes +(clearing +.Dv FD_CLOEXEC ) . +A future update of the Standard is expected to require this behavior, .Sh HISTORY The .Fn posix_spawn_file_actions_addopen , Modified: user/attilio/jeff-numa/lib/libc/gen/wordexp.c ============================================================================== --- user/attilio/jeff-numa/lib/libc/gen/wordexp.c Sat May 11 19:41:52 2013 (r250525) +++ user/attilio/jeff-numa/lib/libc/gen/wordexp.c Sat May 11 19:46:15 2013 (r250526) @@ -139,25 +139,15 @@ we_askshell(const char *words, wordexp_t * We are the child; just get /bin/sh to run the wordexp * builtin on `words'. */ - int devnull; - char *cmd; - (void)_sigprocmask(SIG_SETMASK, &oldsigblock, NULL); _close(pdes[0]); if (_dup2(pdes[1], STDOUT_FILENO) < 0) _exit(1); _close(pdes[1]); - if (asprintf(&cmd, "wordexp %s\n", words) < 0) - _exit(1); - if ((flags & WRDE_SHOWERR) == 0) { - if ((devnull = _open(_PATH_DEVNULL, O_RDWR, 0666)) < 0) - _exit(1); - if (_dup2(devnull, STDERR_FILENO) < 0) - _exit(1); - _close(devnull); - } execl(_PATH_BSHELL, "sh", flags & WRDE_UNDEF ? "-u" : "+u", - "-c", cmd, (char *)NULL); + "-c", "eval \"$1\";eval \"wordexp $2\"", "", + flags & WRDE_SHOWERR ? "" : "exec 2>/dev/null", words, + (char *)NULL); _exit(1); } Modified: user/attilio/jeff-numa/lib/libthr/thread/thr_sig.c ============================================================================== --- user/attilio/jeff-numa/lib/libthr/thread/thr_sig.c Sat May 11 19:41:52 2013 (r250525) +++ user/attilio/jeff-numa/lib/libthr/thread/thr_sig.c Sat May 11 19:46:15 2013 (r250526) @@ -725,8 +725,10 @@ _setcontext(const ucontext_t *ucp) { ucontext_t uc; - if (ucp == NULL) - return (EINVAL); + if (ucp == NULL) { + errno = EINVAL; + return (-1); + } if (!SIGISMEMBER(uc.uc_sigmask, SIGCANCEL)) return __sys_setcontext(ucp); (void) memcpy(&uc, ucp, sizeof(uc)); @@ -740,8 +742,10 @@ _swapcontext(ucontext_t *oucp, const uco { ucontext_t uc; - if (oucp == NULL || ucp == NULL) - return (EINVAL); + if (oucp == NULL || ucp == NULL) { + errno = EINVAL; + return (-1); + } if (SIGISMEMBER(ucp->uc_sigmask, SIGCANCEL)) { (void) memcpy(&uc, ucp, sizeof(uc)); SIGDELSET(uc.uc_sigmask, SIGCANCEL); Modified: user/attilio/jeff-numa/sbin/dmesg/dmesg.8 ============================================================================== --- user/attilio/jeff-numa/sbin/dmesg/dmesg.8 Sat May 11 19:41:52 2013 (r250525) +++ user/attilio/jeff-numa/sbin/dmesg/dmesg.8 Sat May 11 19:46:15 2013 (r250526) @@ -28,7 +28,7 @@ .\" @(#)dmesg.8 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd June 5, 1993 +.Dd May 9, 2013 .Dt DMESG 8 .Os .Sh NAME @@ -36,7 +36,7 @@ .Nd "display the system message buffer" .Sh SYNOPSIS .Nm -.Op Fl a +.Op Fl ac .Op Fl M Ar core Op Fl N Ar system .Sh DESCRIPTION The @@ -59,6 +59,8 @@ Show all data in the message buffer. This includes any syslog records and .Pa /dev/console output. +.It Fl c +Clear the kernel buffer after printing. .It Fl M Extract values associated with the name list from the specified core. .It Fl N Modified: user/attilio/jeff-numa/sbin/dmesg/dmesg.c ============================================================================== --- user/attilio/jeff-numa/sbin/dmesg/dmesg.c Sat May 11 19:41:52 2013 (r250525) +++ user/attilio/jeff-numa/sbin/dmesg/dmesg.c Sat May 11 19:46:15 2013 (r250526) @@ -54,6 +54,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -79,15 +80,20 @@ main(int argc, char *argv[]) kvm_t *kd; size_t buflen, bufpos; long pri; - int all, ch; + int ch, clear; + bool all; - all = 0; + all = false; + clear = false; (void) setlocale(LC_CTYPE, ""); memf = nlistf = NULL; - while ((ch = getopt(argc, argv, "aM:N:")) != -1) + while ((ch = getopt(argc, argv, "acM:N:")) != -1) switch(ch) { case 'a': - all++; + all = true; + break; + case 'c': + clear = true; break; case 'M': memf = optarg; @@ -190,12 +196,16 @@ main(int argc, char *argv[]) (void)strvisx(visbp, p, nextp - p, 0); (void)printf("%s", visbp); } + if (clear) + if (sysctlbyname("kern.msgbuf_clear", NULL, NULL, &clear, sizeof(int))) + err(1, "sysctl kern.msgbuf_clear"); + exit(0); } void usage(void) { - (void)fprintf(stderr, "usage: dmesg [-a] [-M core [-N system]]\n"); + fprintf(stderr, "usage: dmesg [-ac] [-M core [-N system]]\n"); exit(1); } Modified: user/attilio/jeff-numa/sbin/hastctl/Makefile ============================================================================== --- user/attilio/jeff-numa/sbin/hastctl/Makefile Sat May 11 19:41:52 2013 (r250525) +++ user/attilio/jeff-numa/sbin/hastctl/Makefile Sat May 11 19:46:15 2013 (r250526) @@ -32,8 +32,8 @@ CFLAGS+=-DINET6 CFLAGS+=-DYY_NO_UNPUT CFLAGS+=-DYY_NO_INPUT -DPADD= ${LIBL} ${LIBUTIL} -LDADD= -ll -lutil +DPADD= ${LIBUTIL} +LDADD= -lutil .if ${MK_OPENSSL} != "no" DPADD+= ${LIBCRYPTO} LDADD+= -lcrypto Modified: user/attilio/jeff-numa/sbin/hastd/Makefile ============================================================================== --- user/attilio/jeff-numa/sbin/hastd/Makefile Sat May 11 19:41:52 2013 (r250525) +++ user/attilio/jeff-numa/sbin/hastd/Makefile Sat May 11 19:46:15 2013 (r250526) @@ -31,7 +31,7 @@ CFLAGS+=-DINET6 .endif DPADD= ${LIBGEOM} ${LIBBSDXML} ${LIBSBUF} ${LIBL} ${LIBPTHREAD} ${LIBUTIL} -LDADD= -lgeom -lbsdxml -lsbuf -ll -lpthread -lutil +LDADD= -lgeom -lbsdxml -lsbuf -lpthread -lutil .if ${MK_OPENSSL} != "no" DPADD+= ${LIBCRYPTO} LDADD+= -lcrypto Modified: user/attilio/jeff-numa/sbin/hastd/token.l ============================================================================== --- user/attilio/jeff-numa/sbin/hastd/token.l Sat May 11 19:41:52 2013 (r250525) +++ user/attilio/jeff-numa/sbin/hastd/token.l Sat May 11 19:46:15 2013 (r250526) @@ -46,6 +46,7 @@ int lineno; %option noinput %option nounput +%option noyywrap %% control { DP; return CONTROL; } Modified: user/attilio/jeff-numa/share/examples/ppi/ppilcd.c ============================================================================== --- user/attilio/jeff-numa/share/examples/ppi/ppilcd.c Sat May 11 19:41:52 2013 (r250525) +++ user/attilio/jeff-numa/share/examples/ppi/ppilcd.c Sat May 11 19:46:15 2013 (r250526) @@ -269,7 +269,7 @@ do_char(struct lcd_driver *driver, char * one of the ground pins (eg. pin 25). * * Note that the pinning on some LCD modules has the odd and even pins - * arranged as though reversed; check carefully before conecting a module + * arranged as though reversed; check carefully before connecting a module * as it is possible to toast the HD44780 if the power is reversed. */ Modified: user/attilio/jeff-numa/share/man/man3/queue.3 ============================================================================== --- user/attilio/jeff-numa/share/man/man3/queue.3 Sat May 11 19:41:52 2013 (r250525) +++ user/attilio/jeff-numa/share/man/man3/queue.3 Sat May 11 19:46:15 2013 (r250526) @@ -404,7 +404,8 @@ The macro .Nm SLIST_REMOVE_AFTER removes the element after .Fa elm -from the list. Unlike +from the list. +Unlike .Fa SLIST_REMOVE , this macro does not traverse the entire list. .Pp @@ -595,7 +596,8 @@ The macro .Nm STAILQ_REMOVE_AFTER removes the element after .Fa elm -from the tail queue. Unlike +from the tail queue. +Unlike .Fa STAILQ_REMOVE , this macro does not traverse the entire tail queue. .Pp Modified: user/attilio/jeff-numa/share/misc/pci_vendors ============================================================================== --- user/attilio/jeff-numa/share/misc/pci_vendors Sat May 11 19:41:52 2013 (r250525) +++ user/attilio/jeff-numa/share/misc/pci_vendors Sat May 11 19:46:15 2013 (r250526) @@ -11402,7 +11402,7 @@ 0040 QSC-200/300 0050 ESC-100D 0060 ESC-100M - 00f0 MPAC-100 Syncronous Serial Card (Zilog 85230) + 00f0 MPAC-100 Synchronous Serial Card (Zilog 85230) 0170 QSCLP-100 0180 DSCLP-100 0190 SSCLP-100 Modified: user/attilio/jeff-numa/share/syscons/fonts/iso05-8x16.fnt ============================================================================== --- user/attilio/jeff-numa/share/syscons/fonts/iso05-8x16.fnt Sat May 11 19:41:52 2013 (r250525) +++ user/attilio/jeff-numa/share/syscons/fonts/iso05-8x16.fnt Sat May 11 19:46:15 2013 (r250526) @@ -40,7 +40,7 @@ M`'S&_L#`QGP````````X;&1@\&!@8&#P``````` M`.!@8&QV9F9F9N8````````8&``X&!@8&!@\````````!@8`#@8&!@8&!F9F M/````.!@8&9L>'AL9N8````````X&!@8&!@8&!@\````````````[/[6UM;6 MQ@```````````-QF9F9F9F8```````````!\QL;&QL9\````````````W&9F -M9F9F?&!@\`````````````````````````````#<=F9@8&#P```````````` +M9F9F?&!@\````````';,S,S,S'P,#!X```````#<=F9@8&#P```````````` M?,9@.`S&?````````!`P,/PP,#`P-AP```````````#,S,S,S,QV```````` M````9F9F9F8\&````````````,;&UM;6_FP```````````#&;#@X.&S&```` M````````QL;&QL;&?@8,^````````/[,&#!@QOX````````.&!@8pcb_fsbase = 0; pcb->pcb_gsbase = 0; - clear_pcb_flags(pcb, PCB_32BIT | PCB_GS32BIT); + clear_pcb_flags(pcb, PCB_32BIT); pcb->pcb_initial_fpucw = __INITIAL_FPUCW__; set_pcb_flags(pcb, PCB_FULL_IRET); Modified: user/attilio/jeff-numa/sys/amd64/ia32/ia32_signal.c ============================================================================== --- user/attilio/jeff-numa/sys/amd64/ia32/ia32_signal.c Sat May 11 19:41:52 2013 (r250525) +++ user/attilio/jeff-numa/sys/amd64/ia32/ia32_signal.c Sat May 11 19:46:15 2013 (r250526) @@ -1001,6 +1001,5 @@ ia32_setregs(struct thread *td, struct i /* Return via doreti so that we can change to a different %cs */ set_pcb_flags(pcb, PCB_32BIT | PCB_FULL_IRET); - clear_pcb_flags(pcb, PCB_GS32BIT); td->td_retval[1] = 0; } Modified: user/attilio/jeff-numa/sys/amd64/include/pcb.h ============================================================================== --- user/attilio/jeff-numa/sys/amd64/include/pcb.h Sat May 11 19:41:52 2013 (r250525) +++ user/attilio/jeff-numa/sys/amd64/include/pcb.h Sat May 11 19:46:15 2013 (r250526) @@ -77,7 +77,6 @@ struct pcb { #define PCB_KERNFPU 0x04 /* kernel uses fpu */ #define PCB_FPUINITDONE 0x08 /* fpu state is initialized */ #define PCB_USERFPUINITDONE 0x10 /* fpu user state is initialized */ -#define PCB_GS32BIT 0x20 /* linux gs switch */ #define PCB_32BIT 0x40 /* process has 32 bit context (segs etc) */ uint16_t pcb_initial_fpucw; Modified: user/attilio/jeff-numa/sys/amd64/linux32/linux32_machdep.c ============================================================================== --- user/attilio/jeff-numa/sys/amd64/linux32/linux32_machdep.c Sat May 11 19:41:52 2013 (r250525) +++ user/attilio/jeff-numa/sys/amd64/linux32/linux32_machdep.c Sat May 11 19:46:15 2013 (r250526) @@ -447,7 +447,7 @@ linux_set_cloned_tls(struct thread *td, pcb->pcb_gsbase = (register_t)info.base_addr; /* XXXKIB pcb->pcb_gs32sd = sd; */ td->td_frame->tf_gs = GSEL(GUGS32_SEL, SEL_UPL); - set_pcb_flags(pcb, PCB_GS32BIT | PCB_32BIT); + set_pcb_flags(pcb, PCB_32BIT); } return (error); @@ -1026,7 +1026,7 @@ linux_set_thread_area(struct thread *td, pcb = td->td_pcb; pcb->pcb_gsbase = (register_t)info.base_addr; - set_pcb_flags(pcb, PCB_32BIT | PCB_GS32BIT); + set_pcb_flags(pcb, PCB_32BIT); update_gdt_gsbase(td, info.base_addr); return (0); Modified: user/attilio/jeff-numa/sys/amd64/linux32/linux32_sysvec.c ============================================================================== --- user/attilio/jeff-numa/sys/amd64/linux32/linux32_sysvec.c Sat May 11 19:41:52 2013 (r250525) +++ user/attilio/jeff-numa/sys/amd64/linux32/linux32_sysvec.c Sat May 11 19:46:15 2013 (r250526) @@ -868,7 +868,6 @@ exec_linux_setregs(struct thread *td, st /* Do full restore on return so that we can change to a different %cs */ set_pcb_flags(pcb, PCB_32BIT | PCB_FULL_IRET); - clear_pcb_flags(pcb, PCB_GS32BIT); td->td_retval[1] = 0; } Modified: user/attilio/jeff-numa/sys/amd64/vmm/io/vlapic.c ============================================================================== --- user/attilio/jeff-numa/sys/amd64/vmm/io/vlapic.c Sat May 11 19:41:52 2013 (r250525) +++ user/attilio/jeff-numa/sys/amd64/vmm/io/vlapic.c Sat May 11 19:46:15 2013 (r250526) @@ -430,6 +430,8 @@ vlapic_fire_timer(struct vlapic *vlapic) } } +static VMM_STAT_ARRAY(IPIS_SENT, VM_MAXCPU, "ipis sent to vcpu"); + static int lapic_process_icr(struct vlapic *vlapic, uint64_t icrval) { @@ -466,9 +468,11 @@ lapic_process_icr(struct vlapic *vlapic, while ((i = cpusetobj_ffs(&dmask)) != 0) { i--; CPU_CLR(i, &dmask); - if (mode == APIC_DELMODE_FIXED) + if (mode == APIC_DELMODE_FIXED) { lapic_set_intr(vlapic->vm, i, vec); - else + vmm_stat_array_incr(vlapic->vm, vlapic->vcpuid, + IPIS_SENT, i, 1); + } else vm_inject_nmi(vlapic->vm, i); } Modified: user/attilio/jeff-numa/sys/amd64/vmm/vmm_dev.c ============================================================================== --- user/attilio/jeff-numa/sys/amd64/vmm/vmm_dev.c Sat May 11 19:41:52 2013 (r250525) +++ user/attilio/jeff-numa/sys/amd64/vmm/vmm_dev.c Sat May 11 19:46:15 2013 (r250526) @@ -235,18 +235,13 @@ vmmdev_ioctl(struct cdev *cdev, u_long c error = vm_run(sc->vm, vmrun); break; case VM_STAT_DESC: { - const char *desc; statdesc = (struct vm_stat_desc *)data; - desc = vmm_stat_desc(statdesc->index); - if (desc != NULL) { - error = 0; - strlcpy(statdesc->desc, desc, sizeof(statdesc->desc)); - } else - error = EINVAL; + error = vmm_stat_desc_copy(statdesc->index, + statdesc->desc, sizeof(statdesc->desc)); break; } case VM_STATS: { - CTASSERT(MAX_VM_STATS >= MAX_VMM_STAT_TYPES); + CTASSERT(MAX_VM_STATS >= MAX_VMM_STAT_ELEMS); vmstats = (struct vm_stats *)data; getmicrotime(&vmstats->tv); error = vmm_stat_copy(sc->vm, vmstats->cpuid, Modified: user/attilio/jeff-numa/sys/amd64/vmm/vmm_stat.c ============================================================================== --- user/attilio/jeff-numa/sys/amd64/vmm/vmm_stat.c Sat May 11 19:41:52 2013 (r250525) +++ user/attilio/jeff-numa/sys/amd64/vmm/vmm_stat.c Sat May 11 19:46:15 2013 (r250526) @@ -39,8 +39,16 @@ __FBSDID("$FreeBSD$"); #include "vmm_util.h" #include "vmm_stat.h" -static int vstnum; -static struct vmm_stat_type *vsttab[MAX_VMM_STAT_TYPES]; +/* + * 'vst_num_elems' is the total number of addressable statistic elements + * 'vst_num_types' is the number of unique statistic types + * + * It is always true that 'vst_num_elems' is greater than or equal to + * 'vst_num_types'. This is because a stat type may represent more than + * one element (for e.g. VMM_STAT_ARRAY). + */ +static int vst_num_elems, vst_num_types; +static struct vmm_stat_type *vsttab[MAX_VMM_STAT_ELEMS]; static MALLOC_DEFINE(M_VMM_STAT, "vmm stat", "vmm stat"); @@ -59,13 +67,15 @@ vmm_stat_init(void *arg) if (vst->scope == VMM_STAT_SCOPE_AMD && !vmm_is_amd()) return; - if (vstnum >= MAX_VMM_STAT_TYPES) { + if (vst_num_elems + vst->nelems >= MAX_VMM_STAT_ELEMS) { printf("Cannot accomodate vmm stat type \"%s\"!\n", vst->desc); return; } - vst->index = vstnum; - vsttab[vstnum++] = vst; + vst->index = vst_num_elems; + vst_num_elems += vst->nelems; + + vsttab[vst_num_types++] = vst; } int @@ -78,9 +88,9 @@ vmm_stat_copy(struct vm *vm, int vcpu, i return (EINVAL); stats = vcpu_stats(vm, vcpu); - for (i = 0; i < vstnum; i++) + for (i = 0; i < vst_num_elems; i++) buf[i] = stats[i]; - *num_stats = vstnum; + *num_stats = vst_num_elems; return (0); } @@ -89,7 +99,7 @@ vmm_stat_alloc(void) { u_long size; - size = vstnum * sizeof(uint64_t); + size = vst_num_elems * sizeof(uint64_t); return (malloc(size, M_VMM_STAT, M_ZERO | M_WAITOK)); } @@ -100,14 +110,26 @@ vmm_stat_free(void *vp) free(vp, M_VMM_STAT); } -const char * -vmm_stat_desc(int index) +int +vmm_stat_desc_copy(int index, char *buf, int bufsize) { + int i; + struct vmm_stat_type *vst; + + for (i = 0; i < vst_num_types; i++) { + vst = vsttab[i]; + if (index >= vst->index && index < vst->index + vst->nelems) { + if (vst->nelems > 1) { + snprintf(buf, bufsize, "%s[%d]", + vst->desc, index - vst->index); + } else { + strlcpy(buf, vst->desc, bufsize); + } + return (0); /* found it */ + } + } - if (index >= 0 && index < vstnum) - return (vsttab[index]->desc); - else - return (NULL); + return (EINVAL); } /* global statistics */ Modified: user/attilio/jeff-numa/sys/amd64/vmm/vmm_stat.h ============================================================================== --- user/attilio/jeff-numa/sys/amd64/vmm/vmm_stat.h Sat May 11 19:41:52 2013 (r250525) +++ user/attilio/jeff-numa/sys/amd64/vmm/vmm_stat.h Sat May 11 19:46:15 2013 (r250526) @@ -34,7 +34,7 @@ struct vm; -#define MAX_VMM_STAT_TYPES 64 /* arbitrary */ +#define MAX_VMM_STAT_ELEMS 64 /* arbitrary */ enum vmm_stat_scope { VMM_STAT_SCOPE_ANY, @@ -44,15 +44,16 @@ enum vmm_stat_scope { struct vmm_stat_type { int index; /* position in the stats buffer */ + int nelems; /* standalone or array */ const char *desc; /* description of statistic */ enum vmm_stat_scope scope; }; void vmm_stat_init(void *arg); -#define VMM_STAT_DEFINE(type, desc, scope) \ +#define VMM_STAT_DEFINE(type, nelems, desc, scope) \ struct vmm_stat_type type[1] = { \ - { -1, desc, scope } \ + { -1, nelems, desc, scope } \ }; \ SYSINIT(type##_stat, SI_SUB_KLD, SI_ORDER_ANY, vmm_stat_init, type) @@ -60,11 +61,14 @@ void vmm_stat_init(void *arg); extern struct vmm_stat_type type[1] #define VMM_STAT(type, desc) \ - VMM_STAT_DEFINE(type, desc, VMM_STAT_SCOPE_ANY) + VMM_STAT_DEFINE(type, 1, desc, VMM_STAT_SCOPE_ANY) #define VMM_STAT_INTEL(type, desc) \ - VMM_STAT_DEFINE(type, desc, VMM_STAT_SCOPE_INTEL) + VMM_STAT_DEFINE(type, 1, desc, VMM_STAT_SCOPE_INTEL) #define VMM_STAT_AMD(type, desc) \ - VMM_STAT_DEFINE(type, desc, VMM_STAT_SCOPE_AMD) + VMM_STAT_DEFINE(type, 1, desc, VMM_STAT_SCOPE_AMD) + +#define VMM_STAT_ARRAY(type, nelems, desc) \ + VMM_STAT_DEFINE(type, nelems, desc, VMM_STAT_SCOPE_ANY) void *vmm_stat_alloc(void); void vmm_stat_free(void *vp); @@ -73,15 +77,29 @@ void vmm_stat_free(void *vp); * 'buf' should be at least fit 'MAX_VMM_STAT_TYPES' entries */ int vmm_stat_copy(struct vm *vm, int vcpu, int *num_stats, uint64_t *buf); -const char *vmm_stat_desc(int index); +int vmm_stat_desc_copy(int index, char *buf, int buflen); + +static void __inline +vmm_stat_array_incr(struct vm *vm, int vcpu, struct vmm_stat_type *vst, + int statidx, uint64_t x) +{ +#ifdef VMM_KEEP_STATS + uint64_t *stats; + + stats = vcpu_stats(vm, vcpu); + + if (vst->index >= 0 && statidx < vst->nelems) + stats[vst->index + statidx] += x; +#endif +} + static void __inline vmm_stat_incr(struct vm *vm, int vcpu, struct vmm_stat_type *vst, uint64_t x) { -#ifdef VMM_KEEP_STATS - uint64_t *stats = vcpu_stats(vm, vcpu); - if (vst->index >= 0) - stats[vst->index] += x; + +#ifdef VMM_KEEP_STATS + vmm_stat_array_incr(vm, vcpu, vst, 0, x); #endif } Modified: user/attilio/jeff-numa/sys/boot/fdt/dts/am335x.dtsi ============================================================================== --- user/attilio/jeff-numa/sys/boot/fdt/dts/am335x.dtsi Sat May 11 19:41:52 2013 (r250525) +++ user/attilio/jeff-numa/sys/boot/fdt/dts/am335x.dtsi Sat May 11 19:46:15 2013 (r250526) @@ -27,7 +27,6 @@ */ / { - compatible = "ti,am335x"; #address-cells = <1>; #size-cells = <1>; @@ -107,7 +106,7 @@ interrupt-parent = <&AINTC>; }; - mmchs0@4809C000 { + mmchs0@48060000 { compatible = "ti,mmchs"; reg =<0x48060000 0x1000 >; interrupts = <64>; @@ -115,6 +114,15 @@ mmchs-device-id = <0>; }; + mmchs1@481D8000 { + compatible = "ti,mmchs"; + reg =<0x481D8000 0x1000 >; + interrupts = <28>; + interrupt-parent = <&AINTC>; + mmchs-device-id = <1>; + status = "disabled"; + }; + enet0: ethernet@4A100000 { #address-cells = <1>; #size-cells = <1>; Copied: user/attilio/jeff-numa/sys/boot/fdt/dts/beaglebone-black.dts (from r250525, user/attilio/vmcontention/sys/boot/fdt/dts/beaglebone-black.dts) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/attilio/jeff-numa/sys/boot/fdt/dts/beaglebone-black.dts Sat May 11 19:46:15 2013 (r250526, copy of r250525, user/attilio/vmcontention/sys/boot/fdt/dts/beaglebone-black.dts) @@ -0,0 +1,149 @@ +/*- + * Copyright (c) 2012 Damjan Marion + * 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. + * + * $FreeBSD$ + */ + +/dts-v1/; + +/include/ "am335x.dtsi" + +/ { + model = "beaglebone-black"; + compatible = "beaglebone-black", "beaglebone", "ti,am335x"; + + + aliases { + soc = &SOC; + uart0 = &uart0; + }; + + memory { + device_type = "memory"; + reg = < 0x80000000 0x20000000 >; /* 512MB RAM */ + }; + + am335x { + scm@44e10000 { + /* Set of triplets < padname, muxname, padstate> */ + scm-pad-config = + /* I2C0 */ + "I2C0_SDA", "I2C0_SDA","i2c", + "I2C0_SCL", "I2C0_SCL","i2c", + /* Ethernet */ + "MII1_RX_ER", "gmii1_rxerr", "input_pulldown", + "MII1_TX_EN", "gmii1_txen", "output", + "MII1_RX_DV", "gmii1_rxdv", "input_pulldown", + "MII1_TXD3", "gmii1_txd3", "output", + "MII1_TXD2", "gmii1_txd2", "output", + "MII1_TXD1", "gmii1_txd1", "output", + "MII1_TXD0", "gmii1_txd0", "output", + "MII1_TX_CLK", "gmii1_txclk", "input_pulldown", + "MII1_RX_CLK", "gmii1_rxclk", "input_pulldown", + "MII1_RXD3", "gmii1_rxd3", "input_pulldown", + "MII1_RXD2", "gmii1_rxd2", "input_pulldown", + "MII1_RXD1", "gmii1_rxd1", "input_pulldown", + "MII1_RXD0", "gmii1_rxd0", "input_pulldown", + "MDIO", "mdio_data", "input_pullup", + "MDC", "mdio_clk", "output_pullup", + /* MMCSD0 */ + "MMC0_CMD", "mmc0_cmd", "input_pullup", + "MMC0_CLK", "mmc0_clk", "input_pullup", + "MMC0_DAT0", "mmc0_dat0", "input_pullup", + "MMC0_DAT1", "mmc0_dat1", "input_pullup", + "MMC0_DAT2", "mmc0_dat2", "input_pullup", + "MMC0_DAT3", "mmc0_dat3", "input_pullup", + /* MMC1 */ + "GPMC_CSn1", "mmc1_clk", "input_pulldown", + "GPMC_CSn2", "mmc1_cmd", "input_pulldown", + "GPMC_AD0", "mmc1_dat0", "input_pulldown", + "GPMC_AD1", "mmc1_dat1", "input_pulldown", + "GPMC_AD2", "mmc1_dat2", "input_pulldown", + "GPMC_AD3", "mmc1_dat3", "input_pulldown", + "GPMC_AD4", "mmc1_dat4", "input_pulldown", + "GPMC_AD5", "mmc1_dat5", "input_pulldown", + "GPMC_AD6", "mmc1_dat6", "input_pulldown", + "GPMC_AD7", "mmc1_dat7", "input_pulldown", + /* GPIO */ + "ECAP0_IN_PWM0_OUT", "gpio0_7", "input_pulldown", + "GPMC_AD10", "gpio0_26", "input_pulldown", + "GPMC_AD11", "gpio0_27", "input_pulldown", + "GPMC_AD12", "gpio1_12", "input_pulldown", + "GPMC_AD13", "gpio1_13", "input_pulldown", + "GPMC_AD14", "gpio1_14", "input_pulldown", + "GPMC_AD15", "gpio1_15", "input_pulldown", + "GPMC_A0", "gpio1_16", "input_pulldown", + "GPMC_A1", "gpio1_17", "input_pulldown", + "GPMC_A5", "gpio1_21", "output", /* User LED 1 */ + "GPMC_A6", "gpio1_22", "output", /* User LED 2 */ + "GPMC_A7", "gpio1_23", "output", /* User LED 3 */ + "GPMC_A8", "gpio1_24", "output", /* User LED 4 */ + "GPMC_BEn1", "gpio1_28", "input_pulldown", + "GPMC_CSn0", "gpio1_29", "input_pulldown", + "GPMC_CLK", "gpio2_1", "input_pulldown", + "LCD_DATA0", "gpio2_6", "input_pulldown", + "LCD_DATA1", "gpio2_7", "input_pulldown", + "LCD_DATA2", "gpio2_8", "input_pulldown", + "LCD_DATA3", "gpio2_9", "input_pulldown", + "LCD_DATA4", "gpio2_10", "input_pulldown", + "LCD_DATA5", "gpio2_11", "input_pulldown", + "LCD_DATA6", "gpio2_12", "input_pulldown", + "LCD_DATA7", "gpio2_13", "input_pulldown", + "LCD_VSYNC", "gpio2_22", "input_pulldown", + "LCD_HSYNC", "gpio2_23", "input_pulldown", + "LCD_PCLK", "gpio2_24", "input_pulldown", + "LCD_AC_BIAS_EN", "gpio2_25", "input_pulldown", + "MCASP0_FSR", "gpio3_19", "input_pulldown", + "MCASP0_AHCLKX", "gpio3_21", "input_pulldown", + /* TIMERs */ + "GPMC_ADVn_ALE", "timer4", "output", + "GPMC_BEn0_CLE", "timer5", "output", + "GPMC_WEn", "timer6", "output", + "GPMC_OEn_REn", "timer7", "output", + /* PWM */ + "GPMC_A2", "ehrpwm1A", "output", + "GPMC_A3", "ehrpwm1B", "output", + "GPMC_AD8", "ehrpwm2A", "output", + "GPMC_AD9", "ehrpwm2B", "output"; + }; + + mmchs1@481D8000 { + status = "ok"; + }; + + + i2c@44e0b000 { + pmic@24 { + compatible = "ti,am335x-pmic"; + reg = <0x24>; + }; + } + }; + + chosen { + stdin = "uart0"; *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***