From owner-svn-soc-all@freebsd.org Sun Jun 28 01:39:18 2015 Return-Path: Delivered-To: svn-soc-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4D26698C7A9 for ; Sun, 28 Jun 2015 01:39:18 +0000 (UTC) (envelope-from roam@FreeBSD.org) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 32CF3129B for ; Sun, 28 Jun 2015 01:39:18 +0000 (UTC) (envelope-from roam@FreeBSD.org) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5S1dIlf059327 for ; Sun, 28 Jun 2015 01:39:18 GMT (envelope-from roam@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.9/8.14.9/Submit) id t5S1dH5l059318 for svn-soc-all@FreeBSD.org; Sun, 28 Jun 2015 01:39:17 GMT (envelope-from roam@FreeBSD.org) Date: Sun, 28 Jun 2015 01:39:17 GMT Message-Id: <201506280139.t5S1dH5l059318@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to roam@FreeBSD.org using -f From: roam@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r287679 - soc2015/roam/ng_ayiya MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jun 2015 01:39:18 -0000 Author: roam Date: Sun Jun 28 01:39:16 2015 New Revision: 287679 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=287679 Log: scaffold: configure two nodes back to back. Add the scaffold 'two' command and the Makefile 'two' target to configure two ng_ayiya nodes on lo0 aliases and let them talk to each other. Unfortunately, no IPv6 traffic may actually pass between them, at least for the present, since nothing can actually be forced to go "through" the interface :) ObQuote: "I am he as you are he as you are me and we are all together" Modified: soc2015/roam/ng_ayiya/Makefile soc2015/roam/ng_ayiya/scaffold.pl Modified: soc2015/roam/ng_ayiya/Makefile ============================================================================== --- soc2015/roam/ng_ayiya/Makefile Sat Jun 27 23:28:56 2015 (r287678) +++ soc2015/roam/ng_ayiya/Makefile Sun Jun 28 01:39:16 2015 (r287679) @@ -40,6 +40,9 @@ up: ${SCAFFOLD} setup +two: + ${SCAFFOLD} two + down: ${SCAFFOLD} shutdown Modified: soc2015/roam/ng_ayiya/scaffold.pl ============================================================================== --- soc2015/roam/ng_ayiya/scaffold.pl Sat Jun 27 23:28:56 2015 (r287678) +++ soc2015/roam/ng_ayiya/scaffold.pl Sun Jun 28 01:39:16 2015 (r287679) @@ -41,12 +41,16 @@ sub usage($); sub version(); -sub get_ayiya; +sub get_ayiya(;$); sub ngctl_list(); sub ngctl($ @); sub run_command(@); sub check_wait_result($ $ $); sub get_tic_tunnel($); +sub setup_node($ $); +sub setup_inet6($ $); +sub setup_ayiya($ $; $); +sub ensure_inet_aliases($ @); sub cmd_help($ @); sub cmd_setup($ @); @@ -54,6 +58,7 @@ sub cmd_status($ @); sub cmd_version($ @); sub cmd_inet6($ @); +sub cmd_two($ @); my %cmds = ( ayiya => \&cmd_ayiya, @@ -64,6 +69,7 @@ setup => \&cmd_setup, shutdown => \&cmd_shutdown, teardown => \&cmd_shutdown, + two => \&cmd_two, status => \&cmd_status, version => \&cmd_version, ); @@ -99,6 +105,7 @@ scaffold [-v] setup scaffold [-v] shutdown [all] scaffold [-v] status + scaffold [-v] two scaffold -V | -h -h display program usage information and exit @@ -185,13 +192,11 @@ sub shutdown_node($) { my ($node) = @_; - my $i6 = $node->{config}->{hooks}->{inet6}; - if (defined $i6) { - ngctl 'shutdown', "[$i6->{id}]:"; + for (grep defined, @{$node->{config}->{hooks}}{qw/ayiya inet6/}) { + ngctl 'shutdown', "[$_->{id}]:"; } ngctl 'shutdown', "[$node->{id}]:"; - # TODO: the ksocket one, too } sub cmd_shutdown($ @) @@ -250,31 +255,7 @@ my $ay = get_ayiya; if (!$ay->{ours}) { - my %found = map { ($_->{id}, 1) } @{$ay->{all}}; - - debug "Creating a new AYIYA node"; - ngctl 'mkpeer', 'ayiya', 'a', 'control/create'; - $ay = get_ayiya; - my @new = map $_->{id}, @{$ay->{all}}; - debug "Looking for an ID in (".join(' ', sort @new). - ") that's not in (".join(' ', sort keys %found).")"; - my $id; - for (@new) { - if (!defined $found{$_}) { - $id = $_; - last; - } - } - if (!defined $id) { - die "Internal error: no new AYIYA nodes\n"; - } - debug "- found $id"; - ngctl 'name', "[$id]:", 'sc_ayiya'; - $ay = get_ayiya; - if (!$ay->{ours} || $ay->{ours}->{id} ne $id) { - die "Internal error: get_ayiya() did not recognize ". - "node [$id] as ours\n"; - } + $ay = setup_node $ay, ''; } else { debug "Our node already there"; } @@ -284,15 +265,50 @@ "[$ay->{ours}->{id}] $ay->{ours}->{name}"; } -sub get_ayiya() +sub setup_node($ $) +{ + my ($ay, $suffix) = @_; + + my %found = map { ($_->{id}, 1) } @{$ay->{all}}; + + debug "Creating a new AYIYA node"; + ngctl 'mkpeer', 'ayiya', 'a', 'control/create'; + $ay = get_ayiya $suffix; + my @new = map $_->{id}, @{$ay->{all}}; + debug "Looking for an ID in (".join(' ', sort @new). + ") that's not in (".join(' ', sort keys %found).")"; + my $id; + for (@new) { + if (!defined $found{$_}) { + $id = $_; + last; + } + } + if (!defined $id) { + die "Internal error: no new AYIYA nodes\n"; + } + debug "- found $id"; + ngctl 'name', "[$id]:", "sc_ayiya$suffix"; + $ay = get_ayiya $suffix; + if (!$ay->{ours} || $ay->{ours}->{id} ne $id) { + die "Internal error: get_ayiya() did not recognize ". + "node [$id] as ours\n"; + } + return $ay; +} + +sub get_ayiya(;$) { + my ($suffix) = @_; + $suffix //= ''; + my $nodes = ngctl_list; my $res = { all => $nodes->{type}{ayiya} // [], ours => undef, others => [], }; - my $nm = 'sc_ayiya'; + my $nm = "sc_ayiya$suffix"; debug "Got ".scalar(@{$res->{all}})." AYIYA node(s), looking for $nm"; for my $node (@{$res->{all}}) { my $name = "[$node->{id}] '$node->{name}'"; @@ -393,11 +409,16 @@ warn "The inet6 command expects a tunnel name parameter\n"; usage 1; } - my $tunnel = shift @args; - my $t = get_tic_tunnel $tunnel; - my $ayiya = get_ayiya; + setup_inet6 '', get_tic_tunnel shift @args; + # FIXME: Add a default route here, too. +} +sub setup_inet6($ $) +{ + my ($suffix, $t) = @_; + + my $ayiya = get_ayiya $suffix; if (!$ayiya->{ours}) { die "Our ng_ayiya node is not configured\n"; } @@ -410,16 +431,15 @@ } # OK, let's create one - my $hkname = "inet6/$tunnel"; + my $hkname = 'inet6/'.$t->id; ngctl 'mkpeer', "$c->{name}:", 'iface', $hkname, 'inet6'; - $ayiya = get_ayiya; + $ayiya = get_ayiya $suffix; my $iface = $ayiya->{ours}->{config}->{hooks}->{inet6}->{name}; if (!defined $iface) { die "Could not query the newly-created ng_iface node\n"; } run_command 'ifconfig', $iface, 'inet6', $t->ipv6_local; - # FIXME: Add a default route here, too. } sub get_tic_tunnel($) @@ -463,11 +483,15 @@ warn "The ayiya command expects a tunnel name parameter\n"; usage 1; } - my $tunnel = shift @args; - my $t = get_tic_tunnel $tunnel; - my $ayiya = get_ayiya; + setup_ayiya '', get_tic_tunnel shift @args; +} + +sub setup_ayiya($ $; $) +{ + my ($suffix, $t, $localaddr) = @_; + my $ayiya = get_ayiya $suffix; if (!$ayiya->{ours}) { die "Our ng_ayiya node is not configured\n"; } @@ -485,18 +509,99 @@ $p = "[ $p ]"; ngctl 'msg', "$c->{name}:", 'secrethash', $p; # OK, let's create one - my $hkname = "ayiya/$tunnel"; + my $hkname = 'ayiya/'.$t->id; my $hkpeer = 'inet/dgram/udp'; - my $pname = 'sc_conn'; + my $pname = "sc_conn$suffix"; ngctl 'mkpeer', "$c->{name}:", 'ksocket', $hkname, $hkpeer; ngctl 'name', "$c->{name}:$hkname", $pname; - $ayiya = get_ayiya; + $ayiya = get_ayiya $suffix; $c = $ayiya->{ours}->{config}; if (!defined $c || $c->{hooks}->{ayiya}->{name} ne $pname) { die "Could not query the newly-created ng_ksocket node\n"; } + if (defined $localaddr) { + ngctl 'msg', "$pname:", 'bind', "inet/$localaddr:5072"; + } ngctl 'msg', "$pname:", 'connect', 'inet/'.$t->ipv4_pop.':5072'; debug "Trying to get the node to configure itself"; ngctl 'msg', "$c->{name}:", 'configure'; } + +sub cmd_two($ @) +{ + my ($cmd, @args) = @_; + + if (@args) { + say STDERR "The 'two' command does not need any arguments\n"; + usage 1; + } + + cmd_setup 'setup'; + + my $client = get_ayiya; + if (!$client->{ours}) { + die "Our ng_ayiya node is not configured\n"; + } + + my $server = get_ayiya '_s'; + if (!$server->{ours}) { + debug "Setting up the server node"; + $server = setup_node $server, '_s'; + debug "Got a server node: [$server->{ours}->{id}] ". + "'$server->{ours}->{name}'"; + } + + my ($client6, $server6) = ('fec0::1', 'fec0::2'); + my ($client4, $server4) = ('127.0.13.1', '127.0.13.2'); + ensure_inet_aliases 'lo0', $client4, $server4; + + my %defs = ( + TunnelId => 'T00001', + Password => 'secret', + Type => 'AYIYA', + ); + my $cli_tun = Net::SixXS::Data::Tunnel->from_hash({ + %defs, + 'IPv6 Endpoint' => $client6, + 'IPv6 POP' => $server6, + 'IPv4 POP' => $server4, + }); + my $srv_tun = Net::SixXS::Data::Tunnel->from_hash({ + %defs, + 'IPv6 Endpoint' => $server6, + 'IPv6 POP' => $client6, + 'IPv4 POP' => $client4, + }); + + setup_inet6 '', $cli_tun; + setup_inet6 '_s', $srv_tun; + + setup_ayiya '', $cli_tun, $client4; + setup_ayiya '_s', $srv_tun, $server4; +} + +sub ensure_inet_aliases($ @) +{ + my ($iface, @addresses) = @_; + + my $all = 1; + my $config = run_command 'ifconfig', $iface; + for my $addr (@addresses) { + debug "Checking $iface for $addr"; + if (index($config, $addr) == -1) { + undef $all; + debug "- nope, trying to bring it up"; + run_command 'ifconfig', $iface, 'inet', $addr, + 'netmask', '0xffffffff', 'alias'; + } + } + return if $all; + + # Now check... + $config = run_command 'ifconfig', $iface; + my @missing = grep { index($config, $_) == -1 } @addresses; + if (@missing) { + die "Could not bring up @missing on $iface\n"; + } +} From owner-svn-soc-all@freebsd.org Sun Jun 28 01:39:23 2015 Return-Path: Delivered-To: svn-soc-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2233198C7BE for ; Sun, 28 Jun 2015 01:39:23 +0000 (UTC) (envelope-from roam@FreeBSD.org) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1415E12AF for ; Sun, 28 Jun 2015 01:39:23 +0000 (UTC) (envelope-from roam@FreeBSD.org) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5S1dMgn059375 for ; Sun, 28 Jun 2015 01:39:22 GMT (envelope-from roam@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.9/8.14.9/Submit) id t5S1dMqk059370 for svn-soc-all@FreeBSD.org; Sun, 28 Jun 2015 01:39:22 GMT (envelope-from roam@FreeBSD.org) Date: Sun, 28 Jun 2015 01:39:22 GMT Message-Id: <201506280139.t5S1dMqk059370@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to roam@FreeBSD.org using -f From: roam@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r287680 - soc2015/roam/ng_ayiya MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jun 2015 01:39:23 -0000 Author: roam Date: Sun Jun 28 01:39:21 2015 New Revision: 287680 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=287680 Log: scaffold: bind to the "IPv4 Endpoint" if possible. For testing purposes only, if the tic-tunnels.txt file has an "IPv4 Endpoint" value that looks like an IPv4 address, use that value to bind the local UDP ksocket to. This does not break compatibility with the actual SixXS TIC tunnel definitions since the TIC servers return "ayiya" as the "IPv4 Endpoint" value, so this path will never be chosen. However, it allows one to build custom tunnels between two hosts under one's control. ObQuote: "Here I am, here I remain" Modified: soc2015/roam/ng_ayiya/scaffold.pl Modified: soc2015/roam/ng_ayiya/scaffold.pl ============================================================================== --- soc2015/roam/ng_ayiya/scaffold.pl Sun Jun 28 01:39:16 2015 (r287679) +++ soc2015/roam/ng_ayiya/scaffold.pl Sun Jun 28 01:39:21 2015 (r287680) @@ -519,6 +519,10 @@ if (!defined $c || $c->{hooks}->{ayiya}->{name} ne $pname) { die "Could not query the newly-created ng_ksocket node\n"; } + if (!defined $localaddr && defined $t->ipv4_local && + $t->ipv4_local =~ /^\d+(\.\d+)+$/) { + $localaddr = $t->ipv4_local; + } if (defined $localaddr) { ngctl 'msg', "$pname:", 'bind', "inet/$localaddr:5072"; } From owner-svn-soc-all@freebsd.org Sun Jun 28 01:39:26 2015 Return-Path: Delivered-To: svn-soc-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 98D5B98C7D2 for ; Sun, 28 Jun 2015 01:39:26 +0000 (UTC) (envelope-from roam@FreeBSD.org) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8AD4B12C0 for ; Sun, 28 Jun 2015 01:39:26 +0000 (UTC) (envelope-from roam@FreeBSD.org) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5S1dQHi059408 for ; Sun, 28 Jun 2015 01:39:26 GMT (envelope-from roam@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.9/8.14.9/Submit) id t5S1dQPi059402 for svn-soc-all@FreeBSD.org; Sun, 28 Jun 2015 01:39:26 GMT (envelope-from roam@FreeBSD.org) Date: Sun, 28 Jun 2015 01:39:26 GMT Message-Id: <201506280139.t5S1dQPi059402@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to roam@FreeBSD.org using -f From: roam@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r287681 - soc2015/roam/ng_ayiya MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jun 2015 01:39:26 -0000 Author: roam Date: Sun Jun 28 01:39:25 2015 New Revision: 287681 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=287681 Log: Add a sample tic-tunnels.txt file. Provide a sample file for testing a pair of ng_ayiya nodes on neighboring machines in a local network - or at least one side's configuration. This makes use of the non-standard "IPv4 Endpoint" behavior in the testing scaffold. It also makes use of site-local IPv6 addresses which, although deprecated, might still come in useful every once in a while. Link-local IPv6 addresses are not used, since the ng_ayiya node explicitly ignores them when querying the ng_iface node for its address to choose one for the "Identity" AYIYA field. ObQuote: "Let me tell you how it will be" Added: soc2015/roam/ng_ayiya/tic-tunnels.txt.sample Added: soc2015/roam/ng_ayiya/tic-tunnels.txt.sample ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ soc2015/roam/ng_ayiya/tic-tunnels.txt.sample Sun Jun 28 01:39:25 2015 (r287681) @@ -0,0 +1,15 @@ +T22928 + AdminState: enabled + Heartbeat_Interval: 60 + IPv4 Endpoint: 10.0.2.15 + IPv4 POP: 10.0.2.16 + IPv6 Endpoint: fec0::1 + IPv6 POP: fec0::2 + IPv6 PrefixLength: 64 + POP Id: localtest + Password: aa6263d5e8005b9da9b35f83aa945143 + Tunnel MTU: 1280 + Tunnel Name: local testing tunnel + TunnelId: T22928 + Type: ayiya + UserState: enabled From owner-svn-soc-all@freebsd.org Sun Jun 28 01:39:31 2015 Return-Path: Delivered-To: svn-soc-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2068698C7E5 for ; Sun, 28 Jun 2015 01:39:31 +0000 (UTC) (envelope-from roam@FreeBSD.org) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 054DA12D1 for ; Sun, 28 Jun 2015 01:39:31 +0000 (UTC) (envelope-from roam@FreeBSD.org) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5S1dUlD059437 for ; Sun, 28 Jun 2015 01:39:30 GMT (envelope-from roam@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.9/8.14.9/Submit) id t5S1dULm059431 for svn-soc-all@FreeBSD.org; Sun, 28 Jun 2015 01:39:30 GMT (envelope-from roam@FreeBSD.org) Date: Sun, 28 Jun 2015 01:39:30 GMT Message-Id: <201506280139.t5S1dULm059431@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to roam@FreeBSD.org using -f From: roam@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r287682 - soc2015/roam/ng_ayiya MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jun 2015 01:39:31 -0000 Author: roam Date: Sun Jun 28 01:39:29 2015 New Revision: 287682 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=287682 Log: Implement the GET/SET_VERSION/MOTD messages. Keep the ng_ayiya node's version and "message of the day" text strings in almost-ready-to-send mbufs. Update them on a SET_* control message and return them on a GET_* one. Not replying to actual AYIYA "version" and "motd" queries yet, nor querying the remote side for theirs yet. ObQuote: "I can't remember my name, will I ever find myself" Modified: soc2015/roam/ng_ayiya/ng_ayiya.c soc2015/roam/ng_ayiya/ng_ayiya.h Modified: soc2015/roam/ng_ayiya/ng_ayiya.c ============================================================================== --- soc2015/roam/ng_ayiya/ng_ayiya.c Sun Jun 28 01:39:25 2015 (r287681) +++ soc2015/roam/ng_ayiya/ng_ayiya.c Sun Jun 28 01:39:29 2015 (r287682) @@ -78,6 +78,34 @@ NULL, &ng_parse_uint32_type, }, + { + NGM_AYIYA_COOKIE, + NGM_AYIYA_SET_VERSION, + "set_version", + &ng_parse_string_type, + NULL, + }, + { + NGM_AYIYA_COOKIE, + NGM_AYIYA_SET_MOTD, + "set_motd", + &ng_parse_string_type, + NULL, + }, + { + NGM_AYIYA_COOKIE, + NGM_AYIYA_GET_VERSION, + "get_version", + NULL, + &ng_parse_string_type, + }, + { + NGM_AYIYA_COOKIE, + NGM_AYIYA_GET_MOTD, + "get_motd", + NULL, + &ng_parse_string_type, + }, { 0 } }; @@ -119,12 +147,48 @@ hook_p hooks[AYIYA_HOOK_LAST]; node_p node; item_p configuring; + struct mbuf *m_version, *m_motd; bool configured; }; typedef struct ng_ayiya_private *priv_p; static int send_heartbeat(const node_p node); +static struct mbuf * +ayiya_m_extend_to(struct mbuf * const m, size_t left) +{ + for (struct mbuf *mm = m; mm != NULL && left > 0; mm = mm->m_next) + { + const size_t len = min(M_TRAILINGSPACE(mm), left); + mm->m_len = len; + m->m_pkthdr.len += len; + left -= len; + } + if (left > 0) + /* FIXME: Hmm, tack another mbuf at the end or something? */ + return (NULL); + return (m); +} + +static struct mbuf * +ayiya_m_getm(const size_t sz, const int how) +{ + struct mbuf * const m = m_getm2(NULL, sz, how, MT_DATA, M_PKTHDR); + if (m == NULL) + return (NULL); + struct mbuf * const m2 = ayiya_m_extend_to(m, sz); + if (m2 == NULL) { + m_freem(m); + return (NULL); + } + return (m2); +} + +#define AYIYA_VERSION "ng_ayiya 0.1.0.dev177" +#define AYIYA_VERSION_SZ sizeof(AYIYA_VERSION) +#define AYIYA_MOTD "No message of the day defined yet." +#define AYIYA_MOTD_SZ sizeof(AYIYA_MOTD) + static int ng_ayiya_constructor(const node_p node) { @@ -133,7 +197,27 @@ priv = malloc(sizeof(*priv), M_NETGRAPH_AYIYA, M_WAITOK | M_ZERO); NG_NODE_SET_PRIVATE(node, priv); priv->node = node; + + priv->m_version = ayiya_m_getm(AYIYA_VERSION_SZ, M_WAITOK); + if (priv->m_version == NULL) + goto no_mem; + bcopy(AYIYA_VERSION, priv->m_version->m_data, AYIYA_VERSION_SZ); + + priv->m_motd = ayiya_m_getm(AYIYA_MOTD_SZ, M_WAITOK); + if (priv->m_motd == NULL) + goto no_mem; + bcopy(AYIYA_MOTD, priv->m_motd->m_data, AYIYA_MOTD_SZ); + return (0); + +no_mem: + m_freem(priv->m_motd); + priv->m_motd = NULL; + m_freem(priv->m_version); + priv->m_version = NULL; + free(priv, M_NETGRAPH_AYIYA); + NG_NODE_SET_PRIVATE(node, NULL); + return (ENOMEM); } #define ERROUT(x) do { error = (x); goto done; } while (0) @@ -305,6 +389,42 @@ return (0); } + case NGM_AYIYA_GET_VERSION: + { + const priv_p priv = NG_NODE_PRIVATE(node); + NG_MKRESPONSE(resp, msg, priv->m_version->m_len, M_WAITOK); + bcopy(priv->m_version->m_data, resp->data, priv->m_version->m_len); + break; + } + + case NGM_AYIYA_GET_MOTD: + { + const priv_p priv = NG_NODE_PRIVATE(node); + NG_MKRESPONSE(resp, msg, priv->m_motd->m_len, M_WAITOK); + bcopy(priv->m_motd->m_data, resp->data, priv->m_motd->m_len); + break; + } + + case NGM_AYIYA_SET_VERSION: + case NGM_AYIYA_SET_MOTD: + { + const size_t sz = msg->header.arglen; + struct mbuf * const m = ayiya_m_getm(sz, M_WAITOK); + if (m == NULL) { + error = ENOMEM; + break; + } + bcopy(msg->data, m->m_data, sz); + + const priv_p priv = NG_NODE_PRIVATE(node); + struct mbuf ** const mm = + msg->header.cmd == NGM_AYIYA_SET_VERSION? + &priv->m_version: &priv->m_motd; + m_freem(*mm); + *mm = m; + break; + } + default: error = EINVAL; break; @@ -413,10 +533,14 @@ { const priv_p priv = NG_NODE_PRIVATE(node); - if (priv->configuring) - configuring_respond(node, ECONNABORTED); - free(priv, M_NETGRAPH_AYIYA); - NG_NODE_SET_PRIVATE(node, NULL); + if (priv != NULL) { + if (priv->configuring) + configuring_respond(node, ECONNABORTED); + m_freem(priv->m_motd); + m_freem(priv->m_version); + free(priv, M_NETGRAPH_AYIYA); + NG_NODE_SET_PRIVATE(node, NULL); + } NG_NODE_UNREF(node); return (0); } @@ -443,21 +567,10 @@ { struct mbuf *m = *mb; - if (m == NULL) { - size_t left = sizeof(struct ng_ayiya_packet); - m = m_getm2(NULL, left, M_NOWAIT, MT_DATA, M_PKTHDR); - if (m == NULL) - return (ENOMEM); - for (struct mbuf *mm = m; mm != NULL && left > 0; mm = mm->m_next) - { - const size_t len = min(M_TRAILINGSPACE(mm), left); - mm->m_len = len; - m->m_pkthdr.len += len; - left -= len; - } - } else { + if (m == NULL) + m = ayiya_m_getm(sizeof(struct ng_ayiya_packet), M_NOWAIT); + else M_PREPEND(m, sizeof(struct ng_ayiya_packet), M_NOWAIT); - } if (m->m_next) m = m_defrag(m, M_NOWAIT); if (m == NULL) Modified: soc2015/roam/ng_ayiya/ng_ayiya.h ============================================================================== --- soc2015/roam/ng_ayiya/ng_ayiya.h Sun Jun 28 01:39:25 2015 (r287681) +++ soc2015/roam/ng_ayiya/ng_ayiya.h Sun Jun 28 01:39:29 2015 (r287682) @@ -34,6 +34,10 @@ enum { NGM_AYIYA_SECRETHASH = 1, NGM_AYIYA_CONFIGURE, + NGM_AYIYA_SET_VERSION, + NGM_AYIYA_SET_MOTD, + NGM_AYIYA_GET_VERSION, + NGM_AYIYA_GET_MOTD, }; struct ng_ayiya_header { From owner-svn-soc-all@freebsd.org Sun Jun 28 01:39:35 2015 Return-Path: Delivered-To: svn-soc-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0D59498C7F9 for ; Sun, 28 Jun 2015 01:39:35 +0000 (UTC) (envelope-from roam@FreeBSD.org) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F26D212E2 for ; Sun, 28 Jun 2015 01:39:34 +0000 (UTC) (envelope-from roam@FreeBSD.org) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5S1dYZw059478 for ; Sun, 28 Jun 2015 01:39:34 GMT (envelope-from roam@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.9/8.14.9/Submit) id t5S1dYwm059475 for svn-soc-all@FreeBSD.org; Sun, 28 Jun 2015 01:39:34 GMT (envelope-from roam@FreeBSD.org) Date: Sun, 28 Jun 2015 01:39:34 GMT Message-Id: <201506280139.t5S1dYwm059475@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to roam@FreeBSD.org using -f From: roam@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r287683 - soc2015/roam/ng_ayiya MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jun 2015 01:39:35 -0000 Author: roam Date: Sun Jun 28 01:39:33 2015 New Revision: 287683 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=287683 Log: Add a ng_ayiya(4) manual page. Regrettably, it is not automatically installed yet. ObQuote: "Listen, learn, read on" Added: soc2015/roam/ng_ayiya/ng_ayiya.4 Added: soc2015/roam/ng_ayiya/ng_ayiya.4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ soc2015/roam/ng_ayiya/ng_ayiya.4 Sun Jun 28 01:39:33 2015 (r287683) @@ -0,0 +1,227 @@ +.\" Copyright (c) 2015 Peter Pentchev +.\" 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. +.\" +.Dd June 24, 2015 +.Dt NG_AYIYA 4 +.Os +.Sh NAME +.Nm ng_ayiya +.Nd Anything-In-Anything tunnel node type +.Sh SYNOPSIS +.In netgraph/ng_ayiya.h +.Sh DESCRIPTION +An +.Nm ayiya +node maintains an +.Dq Anything-In-Anything +.Pq Tn AYIYA +tunnel between a local IPv6 interface and a remote +.Tn AYIYA +server (e.g. a +.Tn SixXS +IPv6 tunnel). +It encapsulates packets going out of the local IPv6 interface into +.Tn AYIYA +packets and sends them to the remote server, then decodes packets +received from the latter and sends them to the IPv6 interface as +incoming packets. +.Pp +An +.Nm ayiya +node has at least two hooks during normal operation: a +.Va inet6 +or +.Va inet6/* +one to the +.Xr ng_iface 4 +node corresponding to the local IPv6 interface, and a +.Va ayiya +or +.Va ayiya/* +one to the +.Xr ng_ksocket 4 +node connected to the remote +.Tn AYIYA +server. +It also accepts a third hook named +.Va control +for management and configuration purposes; any data coming in +via that hook is ignored. +.Pp +Setting up an +.Nm ayiya +node usually involves the following steps: +.Bl -tag -width "*" +.It * +Create the +.Nm ayiya +node, possibly through setting up a +.Va control +hook to a +.Nm socket +node. +.It * +Configure the tunnel by sending a +.Dv NGM_AYIYA_SECRETHASH +control message to set the secret hash used for authentication of the +.Tn AYIYA +packets. +.It * +Configure the node by sending a +.Dv NGM_AYIYA_SET_VERSION +and optionally a +.Dv NGM_AYIYA_SET_MOTD +control message. +.It * +Connect the +.Va inet6 +hook to a +.Xr ng_iface 4 +Netgraph node that will serve as the local IPv6 interface. +.It * +Set up the IPv6 address of the +.Xr ng_iface 4 +node, e.g. with information obtained via the +.Tn TIC +protocol negotiation that also supplied the secret hash. +.It * +Connect the +.Va ayiya +hook to a +.Xr ng_ksocket 4 +Netgraph node that will provide the connection to the +.Tn AYIYA +server; usually the connection is made to the +.Xr ng_ksocket 4 +node's +.Va inet/dgram/udp +hook. +.It * +Connect the +.Xr ng_ksocket 4 +node to the +.Tn AYIYA +server. +.It * +Activate the +.Nm ayiya +node by sending it the +.Dv NGM_AYIYA_CONFIGURE +control message; when the message has been processed, the tunnel +should be up and running. +.El +.Sh HOOKS +The +.Nm ayiya +node supports the following hooks: +.Bl -tag -width "control" +.It Va ayiya +The actual connection to the +.Tn AYIYA +server; typically connected to the +.Dv inet/dgram/udp +hook of a +.Xr ng_ksocket 4 +node. +This hook may also be named +.Va ayiya/* +for the administrator's convenience; any text after the slash is +ignored. +.It Va control +Control messages only, any data packets are ignored. +.It Va inet6 +The local IPv6 interface, a +.Xr ng_iface 4 +node with at least one non-local-scoped IPv6 address at the time the +.Dv NGM_AYIYA_CONFIGURE +control message is processed. +This hook may also be named +.Va inet6/* +for the administrator's convenience; any text after the slash is +ignored. +.El +.Sh CONTROL MESSAGES +The +.Nm ayiya +node supports the generic control messages; it provides a human-readable +status description as a reply to a +.Dv NGM_TEXT_STATUS +control message and a JSON status description as a reply to a +.Dv NGM_TEXT_CONFIG +control message. +It also supports the following control messages: +.Bl -tag -width "NGM_AYIYA_GET_VERSION" +.It Dv NGM_AYIYA_CONFIGURE +Commence operations: obtain the local IPv6 address from the +.Xr ng_iface 4 +node connected to the +.Va inet6 +hook, then send an +.Tn AYIYA +heartbeat packet to the +.Va ayiya +hook and start forwarding packets between the two. +.It Dv NGM_AYIYA_GET_VERSION +Get the local +.Nm ayiya +node's version string. +.It Dv NGM_AYIYA_GET_MOTD +Get the local +.Nm ayiya +node's +.Dq message of the day +string. +.It Dv NGM_AYIYA_SECRETHASH +Set the secret hash used for authenticating the +.Tn AYIYA +packets. +The message parameter should be a SHA1 hash of the +.Va Password +field obtained via TIC negotiation. +.It Dv NGM_AYIYA_SET_VERSION +Set the local +.Nm ayiya +node's version string. +.It Dv NGM_AYIYA_SET_MOTD +Set the local +.Nm ayiya +node's +.Dq message of the day +string. +.El +.Sh SHUTDOWN +This node shuts down upon receipt of a +.Dv NGM_SHUTDOWN +control message. +.Sh SEE ALSO +.Xr netgraph 4 , +.Xr ng_iface 4 , +.Xr ng_ksocket 4 , +.Xr ngctl 8 +.Sh HISTORY +The +.Nm ayiya +node type was developed by Peter Pentchev. +.Sh AUTHORS +.An Peter Pentchev Aq Mt roam@FreeBSD.org From owner-svn-soc-all@freebsd.org Sun Jun 28 01:39:38 2015 Return-Path: Delivered-To: svn-soc-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 492A598C80A for ; Sun, 28 Jun 2015 01:39:38 +0000 (UTC) (envelope-from roam@FreeBSD.org) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3AED612EB for ; Sun, 28 Jun 2015 01:39:38 +0000 (UTC) (envelope-from roam@FreeBSD.org) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5S1dcIZ059502 for ; Sun, 28 Jun 2015 01:39:38 GMT (envelope-from roam@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.9/8.14.9/Submit) id t5S1dbig059498 for svn-soc-all@FreeBSD.org; Sun, 28 Jun 2015 01:39:37 GMT (envelope-from roam@FreeBSD.org) Date: Sun, 28 Jun 2015 01:39:37 GMT Message-Id: <201506280139.t5S1dbig059498@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to roam@FreeBSD.org using -f From: roam@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r287684 - soc2015/roam MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jun 2015 01:39:38 -0000 Author: roam Date: Sun Jun 28 01:39:37 2015 New Revision: 287684 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=287684 Log: Scratch two items off the ng_ayiya to-do list. The manual page is there and with the tic-tunnels.txt.sample file setting up a testing "lab" should be easier. Well, there's also the almost-functional "scaffold two" command, but it doesn't really count, since no packets will go through the AYIYA interfaces. ObQuote: "One step closer" Modified: soc2015/roam/README.txt Modified: soc2015/roam/README.txt ============================================================================== --- soc2015/roam/README.txt Sun Jun 28 01:39:33 2015 (r287683) +++ soc2015/roam/README.txt Sun Jun 28 01:39:37 2015 (r287684) @@ -151,12 +151,7 @@ - use a callout to periodically send an AYIYA heartbeat packet -- write a ng_ayiya manual page - - finish the Net-SixXS Perl distribution (mostly documentation) and release it to CPAN -- extend the testing scaffold to make it easy to pit two ng_ayiya nodes - against each other - - teach sixxs-aiccu about ng_ayiya From owner-svn-soc-all@freebsd.org Sun Jun 28 01:39:41 2015 Return-Path: Delivered-To: svn-soc-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B4C5998C81E for ; Sun, 28 Jun 2015 01:39:41 +0000 (UTC) (envelope-from roam@FreeBSD.org) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A6C491304 for ; Sun, 28 Jun 2015 01:39:41 +0000 (UTC) (envelope-from roam@FreeBSD.org) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5S1dfVT059545 for ; Sun, 28 Jun 2015 01:39:41 GMT (envelope-from roam@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.9/8.14.9/Submit) id t5S1df5X059540 for svn-soc-all@FreeBSD.org; Sun, 28 Jun 2015 01:39:41 GMT (envelope-from roam@FreeBSD.org) Date: Sun, 28 Jun 2015 01:39:41 GMT Message-Id: <201506280139.t5S1df5X059540@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to roam@FreeBSD.org using -f From: roam@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r287685 - soc2015/roam/ng_ayiya MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jun 2015 01:39:41 -0000 Author: roam Date: Sun Jun 28 01:39:40 2015 New Revision: 287685 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=287685 Log: Detect link-local addresses better. It's not just fe80::/16, it's a bit more complicated than that. Also, explain the reasoning behind skipping link-local addresses. ObQuote: "Step 2: There's so much we can do" Modified: soc2015/roam/ng_ayiya/ng_ayiya.c Modified: soc2015/roam/ng_ayiya/ng_ayiya.c ============================================================================== --- soc2015/roam/ng_ayiya/ng_ayiya.c Sun Jun 28 01:39:37 2015 (r287684) +++ soc2015/roam/ng_ayiya/ng_ayiya.c Sun Jun 28 01:39:40 2015 (r287685) @@ -450,7 +450,13 @@ continue; const struct sockaddr_in6 * const a = (const struct sockaddr_in6 *)ifa->ifa_addr; - if (a->sin6_addr.s6_addr16[0] == IPV6_ADDR_INT16_ULL) + /** + * Skip link-local addresses, they can't be used as + * AYIYA "Identity"; hope the administrator or the TIC + * client has set the appropriate tunnel endpoint IPv6 + * address on the interface by now. + */ + if ((htons(a->sin6_addr.s6_addr16[0]) & 0xFFC0) == 0xFE80) continue; const priv_p priv = NG_NODE_PRIVATE(node); From owner-svn-soc-all@freebsd.org Sun Jun 28 15:59:28 2015 Return-Path: Delivered-To: svn-soc-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9DBB498F133 for ; Sun, 28 Jun 2015 15:59:28 +0000 (UTC) (envelope-from iateaca@FreeBSD.org) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 869D71F0F for ; Sun, 28 Jun 2015 15:59:28 +0000 (UTC) (envelope-from iateaca@FreeBSD.org) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5SFxSfn081050 for ; Sun, 28 Jun 2015 15:59:28 GMT (envelope-from iateaca@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.9/8.14.9/Submit) id t5SFxS3A081037 for svn-soc-all@FreeBSD.org; Sun, 28 Jun 2015 15:59:28 GMT (envelope-from iateaca@FreeBSD.org) Date: Sun, 28 Jun 2015 15:59:28 GMT Message-Id: <201506281559.t5SFxS3A081037@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to iateaca@FreeBSD.org using -f From: iateaca@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r287699 - soc2015/iateaca/bhyve-ne2000-head/usr.sbin/bhyve MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jun 2015 15:59:28 -0000 Author: iateaca Date: Sun Jun 28 15:59:27 2015 New Revision: 287699 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=287699 Log: implement some logging and asserting related with the receive buffer ring Modified: soc2015/iateaca/bhyve-ne2000-head/usr.sbin/bhyve/pci_ne2000.c Modified: soc2015/iateaca/bhyve-ne2000-head/usr.sbin/bhyve/pci_ne2000.c ============================================================================== --- soc2015/iateaca/bhyve-ne2000-head/usr.sbin/bhyve/pci_ne2000.c Sun Jun 28 12:52:28 2015 (r287698) +++ soc2015/iateaca/bhyve-ne2000-head/usr.sbin/bhyve/pci_ne2000.c Sun Jun 28 15:59:27 2015 (r287699) @@ -131,6 +131,9 @@ ne2000_tap_callback(int fd, enum ev_type type, void *param); static int +ne2000_receive_ring_is_valid(struct pci_ne2000_softc *sc); + +static int ne2000_parse_input(char *opts, char *tap_name, uint8_t *mac); /* @@ -260,6 +263,31 @@ } static int +ne2000_receive_ring_is_valid(struct pci_ne2000_softc *sc) +{ + uint8_t pstart = 0; + uint8_t pstop = 0; + + uint8_t curr = 0; + uint8_t bnry = 0; + + pstart = ne2000_get_reg_by_offset(sc, NE2000_P0, ED_P0_PSTART); + pstop = ne2000_get_reg_by_offset(sc, NE2000_P0, ED_P0_PSTOP); + + curr = ne2000_get_reg_by_offset(sc, NE2000_P1, ED_P1_CURR); + bnry = ne2000_get_reg_by_offset(sc, NE2000_P0, ED_P0_BNRY); + + if (pstart == 0 || pstop == 0) + return 0; + if (curr < pstart || curr >= pstop) + return 0; + if (bnry < pstart || bnry >= pstop) + return 0; + + return 1; +} + +static int ne2000_parse_input(char *opts, char *tap_name, uint8_t *mac) { uint8_t len = 0; @@ -442,6 +470,9 @@ uint16_t rbcr = 0; uint16_t rsar = 0; + uint8_t pstart = 0; + uint8_t pstop = 0; + switch (offset) { case ED_NOVELL_RESET: sc->reset = value; @@ -469,6 +500,15 @@ assert(rsar < NE2000_MEM_SIZE); + if (ne2000_receive_ring_is_valid(sc)) { + pstart = ne2000_get_reg_by_offset(sc, NE2000_P0, + ED_P0_PSTART); + pstop = ne2000_get_reg_by_offset(sc, NE2000_P0, + ED_P0_PSTOP); + assert(rsar + 1 < pstart * ED_PAGE_SIZE || + rsar >= pstop * ED_PAGE_SIZE); + } + /* copy the value in LOW - HIGH order */ sc->ram[rsar] = value; sc->ram[rsar + 1] = value >> 8; @@ -515,6 +555,9 @@ uint16_t tbcr = 0; uint8_t tpsr = 0; + uint8_t pstart = 0; + uint8_t pstop = 0; + switch (offset) { case ED_P0_CR: if (value & ED_CR_STP) { @@ -562,6 +605,20 @@ assert(err == 0); } break; + case ED_P0_PSTART: + DPRINTF("Page Start Register: %d", value); + assert(value > 0 && value * ED_PAGE_SIZE < NE2000_MEM_SIZE); + break; + case ED_P0_PSTOP: + DPRINTF("Page Stop Register: %d", value); + assert(value > 0 && value * ED_PAGE_SIZE <= NE2000_MEM_SIZE); + break; + case ED_P0_BNRY: + DPRINTF("Boundary Register: %d", value); + pstart = ne2000_get_reg_by_offset(sc, NE2000_P0, ED_P0_PSTART); + pstop = ne2000_get_reg_by_offset(sc, NE2000_P0, ED_P0_PSTOP); + assert(value >= pstart && value < pstop); + break; case ED_P0_ISR: ne2000_set_field_by_offset(sc, NE2000_P0, ED_P0_ISR, value, 0); pci_ne2000_update_intr(sc); @@ -575,8 +632,17 @@ ne2000_emul_reg_page1(struct pci_ne2000_softc *sc, uint8_t offset, uint8_t value) { + uint8_t pstart = 0; + uint8_t pstop = 0; + if (offset == ED_P1_CR) return ne2000_emul_reg_page0(sc, offset, value); + else if (offset == ED_P1_CURR) { + DPRINTF("Current Page Register: %d", value); + pstart = ne2000_get_reg_by_offset(sc, NE2000_P0, ED_P0_PSTART); + pstop = ne2000_get_reg_by_offset(sc, NE2000_P0, ED_P0_PSTOP); + assert(value >= pstart && value < pstop); + } return 0; } From owner-svn-soc-all@freebsd.org Sun Jun 28 16:18:58 2015 Return-Path: Delivered-To: svn-soc-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C30F198F3A6 for ; Sun, 28 Jun 2015 16:18:58 +0000 (UTC) (envelope-from clord@FreeBSD.org) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B20101A7F for ; Sun, 28 Jun 2015 16:18:58 +0000 (UTC) (envelope-from clord@FreeBSD.org) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5SGIwLo033449 for ; Sun, 28 Jun 2015 16:18:58 GMT (envelope-from clord@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.9/8.14.9/Submit) id t5SGItlQ033437 for svn-soc-all@FreeBSD.org; Sun, 28 Jun 2015 16:18:55 GMT (envelope-from clord@FreeBSD.org) Date: Sun, 28 Jun 2015 16:18:55 GMT Message-Id: <201506281618.t5SGItlQ033437@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to clord@FreeBSD.org using -f From: clord@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r287700 - in soc2015/clord/head/sys/contrib/ficl: . contrib ficlplatform softcore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jun 2015 16:18:59 -0000 Author: clord Date: Sun Jun 28 16:18:55 2015 New Revision: 287700 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=287700 Log: Import Ficl 4 sources Added: soc2015/clord/head/sys/contrib/ficl/Makefile - copied unchanged from r285383, mirror/FreeBSD/vendor/ficl/dist/Makefile soc2015/clord/head/sys/contrib/ficl/bit.c - copied unchanged from r285383, mirror/FreeBSD/vendor/ficl/dist/bit.c soc2015/clord/head/sys/contrib/ficl/callback.c - copied unchanged from r285383, mirror/FreeBSD/vendor/ficl/dist/callback.c soc2015/clord/head/sys/contrib/ficl/compatibility.c - copied unchanged from r285383, mirror/FreeBSD/vendor/ficl/dist/compatibility.c soc2015/clord/head/sys/contrib/ficl/contrib/ - copied from r285383, mirror/FreeBSD/vendor/ficl/dist/contrib/ soc2015/clord/head/sys/contrib/ficl/dictionary.c - copied unchanged from r285383, mirror/FreeBSD/vendor/ficl/dist/dictionary.c soc2015/clord/head/sys/contrib/ficl/double.c - copied unchanged from r285383, mirror/FreeBSD/vendor/ficl/dist/double.c soc2015/clord/head/sys/contrib/ficl/extras.c - copied unchanged from r285383, mirror/FreeBSD/vendor/ficl/dist/extras.c soc2015/clord/head/sys/contrib/ficl/ficlcompatibility.h - copied unchanged from r285383, mirror/FreeBSD/vendor/ficl/dist/ficlcompatibility.h soc2015/clord/head/sys/contrib/ficl/ficldll.def - copied unchanged from r285383, mirror/FreeBSD/vendor/ficl/dist/ficldll.def soc2015/clord/head/sys/contrib/ficl/ficldll.dsp - copied unchanged from r285383, mirror/FreeBSD/vendor/ficl/dist/ficldll.dsp soc2015/clord/head/sys/contrib/ficl/ficlexe.dsp - copied unchanged from r285383, mirror/FreeBSD/vendor/ficl/dist/ficlexe.dsp soc2015/clord/head/sys/contrib/ficl/ficllib.dsp - copied unchanged from r285383, mirror/FreeBSD/vendor/ficl/dist/ficllib.dsp soc2015/clord/head/sys/contrib/ficl/ficllocal.h - copied unchanged from r285383, mirror/FreeBSD/vendor/ficl/dist/ficllocal.h soc2015/clord/head/sys/contrib/ficl/ficlplatform/ - copied from r285383, mirror/FreeBSD/vendor/ficl/dist/ficlplatform/ soc2015/clord/head/sys/contrib/ficl/ficltokens.h - copied unchanged from r285383, mirror/FreeBSD/vendor/ficl/dist/ficltokens.h soc2015/clord/head/sys/contrib/ficl/hash.c - copied unchanged from r285383, mirror/FreeBSD/vendor/ficl/dist/hash.c soc2015/clord/head/sys/contrib/ficl/lzcompress.c - copied unchanged from r285383, mirror/FreeBSD/vendor/ficl/dist/lzcompress.c soc2015/clord/head/sys/contrib/ficl/lzuncompress.c - copied unchanged from r285383, mirror/FreeBSD/vendor/ficl/dist/lzuncompress.c soc2015/clord/head/sys/contrib/ficl/main.c - copied unchanged from r285383, mirror/FreeBSD/vendor/ficl/dist/main.c soc2015/clord/head/sys/contrib/ficl/primitives.c - copied unchanged from r285383, mirror/FreeBSD/vendor/ficl/dist/primitives.c soc2015/clord/head/sys/contrib/ficl/softcore/ - copied from r285383, mirror/FreeBSD/vendor/ficl/dist/softcore/ soc2015/clord/head/sys/contrib/ficl/system.c - copied unchanged from r285383, mirror/FreeBSD/vendor/ficl/dist/system.c soc2015/clord/head/sys/contrib/ficl/utility.c - copied unchanged from r285383, mirror/FreeBSD/vendor/ficl/dist/utility.c soc2015/clord/head/sys/contrib/ficl/word.c - copied unchanged from r285383, mirror/FreeBSD/vendor/ficl/dist/word.c Modified: soc2015/clord/head/sys/contrib/ficl/ (props changed) soc2015/clord/head/sys/contrib/ficl/ReadMe.txt soc2015/clord/head/sys/contrib/ficl/ficl.h soc2015/clord/head/sys/contrib/ficl/fileaccess.c soc2015/clord/head/sys/contrib/ficl/float.c soc2015/clord/head/sys/contrib/ficl/prefix.c soc2015/clord/head/sys/contrib/ficl/search.c soc2015/clord/head/sys/contrib/ficl/stack.c soc2015/clord/head/sys/contrib/ficl/tools.c soc2015/clord/head/sys/contrib/ficl/vm.c Copied: soc2015/clord/head/sys/contrib/ficl/Makefile (from r285383, mirror/FreeBSD/vendor/ficl/dist/Makefile) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ soc2015/clord/head/sys/contrib/ficl/Makefile Sun Jun 28 16:18:55 2015 (r287700, copy of r285383, mirror/FreeBSD/vendor/ficl/dist/Makefile) @@ -0,0 +1,60 @@ +OBJECTS= dictionary.o system.o fileaccess.o float.o double.o prefix.o search.o softcore.o stack.o tools.o vm.o primitives.o bit.o lzuncompress.o unix.o utility.o hash.o callback.o word.o extras.o +HEADERS= ficl.h ficlplatform/unix.h +# +# Flags for shared library +#TARGET= -Dlinux # riscos MOTO_CPU32 +SHFLAGS = -fPIC +CFLAGS= -O $(SHFLAGS) -Wall +CPPFLAGS= $(TARGET) -I. +CC = cc +LIB = ar cr +RANLIB = ranlib + +MAJOR = 4 +MINOR = 1.0 + +ficl: main.o $(HEADERS) libficl.a + $(CC) $(CFLAGS) $(LDFLAGS) main.o -o ficl -L. -lficl -lm + +lib: libficl.so.$(MAJOR).$(MINOR) + +# static library build +libficl.a: $(OBJECTS) + $(LIB) libficl.a $(OBJECTS) + $(RANLIB) libficl.a + +# shared library build +libficl.so.$(MAJOR).$(MINOR): $(OBJECTS) + $(CC) $(LDFLAGS) -shared -Wl,-soname,libficl.so.$(MAJOR).$(MINOR) \ + -o libficl.so.$(MAJOR).$(MINOR) $(OBJECTS) + ln -sf libficl.so.$(MAJOR).$(MINOR) libficl.so + +main: main.o ficl.h sysdep.h libficl.so.$(MAJOR).$(MINOR) + $(CC) $(CFLAGS) $(LDFLAGS) main.o -o main -L. -lficl -lm + ln -sf libficl.so.$(MAJOR).$(MINOR) libficl.so.$(MAJOR) + +# depend explicitly to help finding source files in another subdirectory, +# and repeat commands since gmake doesn't understand otherwise +ansi.o: ficlplatform/ansi.c $(HEADERS) + $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $< +unix.o: ficlplatform/unix.c $(HEADERS) + $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $< + +# +# generic object code +# +.SUFFIXES: .cxx .cc .c .o + +.c.o: + $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $< + +.cxx.o: + $(CPP) $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $< + +.cc.o: + $(CPP) $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $< +# +# generic cleanup code +# +clean: + rm -f *.o *.a libficl.* ficl Modified: soc2015/clord/head/sys/contrib/ficl/ReadMe.txt ============================================================================== --- soc2015/clord/head/sys/contrib/ficl/ReadMe.txt Sun Jun 28 15:59:27 2015 (r287699) +++ soc2015/clord/head/sys/contrib/ficl/ReadMe.txt Sun Jun 28 16:18:55 2015 (r287700) @@ -1,5 +1,5 @@ -FICL 3.03 -April 2002 +FICL 4.1.0 +October 2010 ________ OVERVIEW @@ -10,18 +10,22 @@ Command Language". For more information, please see the "doc" directory. -For release notes, please see "doc/ficl_rel.html". +For release notes, please see "doc/releases.html". ____________ INSTALLATION Ficl builds out-of-the-box on the following platforms: - * Linux: use "Makefile.linux". - * RiscOS: use "Makefile.riscos". + * NetBSD, FreeBSD: use "Makefile". + * Linux: use "Makefile.linux", but it should work with + "Makefile" as well. * Win32: use "ficl.dsw" / "ficl.dsp". -To port to other platforms, be sure to examine "sysdep.h", and -we suggest you start with the Linux makefile. (And please--feel -free to submit your portability changes!) +To port to other platforms, we suggest you start with the generic +"Makefile" and the "unix.c" / "unix.h" platform-specific implementation +files. (And please--feel free to submit your portability changes!) + +(Note: Ficl used to build under RiscOS, but we broke everything +for the 4.0 release. Please fix it and send us the diffs!) ____________ FICL LICENSE Copied: soc2015/clord/head/sys/contrib/ficl/bit.c (from r285383, mirror/FreeBSD/vendor/ficl/dist/bit.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ soc2015/clord/head/sys/contrib/ficl/bit.c Sun Jun 28 16:18:55 2015 (r287700, copy of r285383, mirror/FreeBSD/vendor/ficl/dist/bit.c) @@ -0,0 +1,49 @@ +#include "ficl.h" + +int ficlBitGet(const unsigned char *bits, size_t index) + { + int byteIndex = index >> 3; + int bitIndex = index & 7; + unsigned char mask = (unsigned char)(128 >> bitIndex); + + return ((mask & bits[byteIndex]) ? 1 : 0); + } + + + +void ficlBitSet(unsigned char *bits, size_t index, int value) + { + int byteIndex = index >> 3; + int bitIndex = index & 7; + unsigned char mask = (unsigned char)(128 >> bitIndex); + + if (value) + bits[byteIndex] |= mask; + else + bits[byteIndex] &= ~mask; + } + + +void ficlBitGetString(unsigned char *destination, const unsigned char *source, int offset, int count, int destAlignment) + { + int bit = destAlignment - count; + while (count--) + ficlBitSet(destination, bit++, ficlBitGet(source, offset++)); + } + + +/* +** This will actually work correctly *regardless* of the local architecture. +** --lch +**/ +ficlUnsigned16 ficlNetworkUnsigned16(ficlUnsigned16 number) +{ + ficlUnsigned8 *pointer = (ficlUnsigned8 *)&number; + return (ficlUnsigned16)(((ficlUnsigned16)(pointer[0] << 8)) | (pointer[1])); +} + +ficlUnsigned32 ficlNetworkUnsigned32(ficlUnsigned32 number) +{ + ficlUnsigned16 *pointer = (ficlUnsigned16 *)&number; + return ((ficlUnsigned32)(ficlNetworkUnsigned16(pointer[0]) << 16)) | ficlNetworkUnsigned16(pointer[1]); +} Copied: soc2015/clord/head/sys/contrib/ficl/callback.c (from r285383, mirror/FreeBSD/vendor/ficl/dist/callback.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ soc2015/clord/head/sys/contrib/ficl/callback.c Sun Jun 28 16:18:55 2015 (r287700, copy of r285383, mirror/FreeBSD/vendor/ficl/dist/callback.c) @@ -0,0 +1,76 @@ +#include "ficl.h" + + +extern ficlSystem *ficlSystemGlobal; + +/************************************************************************** + f i c l C a l l b a c k T e x t O u t +** Feeds text to the vm's output callback +**************************************************************************/ +void ficlCallbackTextOut(ficlCallback *callback, char *text) +{ + ficlOutputFunction textOut = NULL; + + if (callback != NULL) + { + if (callback->textOut != NULL) + textOut = callback->textOut; + else if ((callback->system != NULL) && (callback != &(callback->system->callback))) + { + ficlCallbackTextOut(&(callback->system->callback), text); + return; + } + } + + if ((textOut == NULL) && (ficlSystemGlobal != NULL)) + { + callback = &(ficlSystemGlobal->callback); + textOut = callback->textOut; + } + + if (textOut == NULL) + textOut = ficlCallbackDefaultTextOut; + + (textOut)(callback, text); + + return; +} + + +/************************************************************************** + f i c l C a l l b a c k E r r o r O u t +** Feeds text to the vm's error output callback +**************************************************************************/ +void ficlCallbackErrorOut(ficlCallback *callback, char *text) +{ + ficlOutputFunction errorOut = NULL; + + if (callback != NULL) + { + if (callback->errorOut != NULL) + errorOut = callback->errorOut; + else if ((callback->system != NULL) && (callback != &(callback->system->callback))) + { + ficlCallbackErrorOut(&(callback->system->callback), text); + return; + } + } + + if ((errorOut == NULL) && (ficlSystemGlobal != NULL)) + { + callback = &(ficlSystemGlobal->callback); + errorOut = callback->errorOut; + } + + if (errorOut == NULL) + { + ficlCallbackTextOut(callback, text); + return; + } + + (errorOut)(callback, text); + + return; +} + + Copied: soc2015/clord/head/sys/contrib/ficl/compatibility.c (from r285383, mirror/FreeBSD/vendor/ficl/dist/compatibility.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ soc2015/clord/head/sys/contrib/ficl/compatibility.c Sun Jun 28 16:18:55 2015 (r287700, copy of r285383, mirror/FreeBSD/vendor/ficl/dist/compatibility.c) @@ -0,0 +1,284 @@ +#define FICL_FORCE_COMPATIBILITY 1 +#include "ficl.h" + + +FICL_PLATFORM_EXTERN ficlStack *stackCreate (unsigned cells) { return ficlStackCreate(NULL, "unknown", cells); } +FICL_PLATFORM_EXTERN void stackDelete (ficlStack *stack) { ficlStackDestroy(stack); } +FICL_PLATFORM_EXTERN int stackDepth (ficlStack *stack) { return ficlStackDepth(stack); } +FICL_PLATFORM_EXTERN void stackDrop (ficlStack *stack, int n) { ficlStackDrop(stack, n); } +FICL_PLATFORM_EXTERN ficlCell stackFetch (ficlStack *stack, int n) { return ficlStackFetch(stack, n); } +FICL_PLATFORM_EXTERN ficlCell stackGetTop (ficlStack *stack) { return ficlStackFetch(stack, 0); } +#if FICL_WANT_LOCALS +FICL_PLATFORM_EXTERN void stackLink (ficlStack *stack, int cells) { ficlStackLink(stack, cells); } +FICL_PLATFORM_EXTERN void stackUnlink (ficlStack *stack) { ficlStackUnlink(stack); } +#endif /* FICL_WANT_LOCALS */ +FICL_PLATFORM_EXTERN void stackPick (ficlStack *stack, int n) { ficlStackPick(stack, n); } +FICL_PLATFORM_EXTERN ficlCell stackPop (ficlStack *stack) { return ficlStackPop(stack); } +FICL_PLATFORM_EXTERN void *stackPopPtr (ficlStack *stack) { return ficlStackPopPointer(stack); } +FICL_PLATFORM_EXTERN ficlUnsigned stackPopUNS (ficlStack *stack) { return ficlStackPopUnsigned(stack); } +FICL_PLATFORM_EXTERN ficlInteger stackPopINT (ficlStack *stack) { return ficlStackPopInteger(stack); } +FICL_PLATFORM_EXTERN void stackPush (ficlStack *stack, ficlCell cell) { ficlStackPush(stack, cell); } +FICL_PLATFORM_EXTERN void stackPushPtr (ficlStack *stack, void *pointer) { ficlStackPushPointer(stack, pointer); } +FICL_PLATFORM_EXTERN void stackPushUNS (ficlStack *stack, ficlUnsigned u) { ficlStackPushUnsigned(stack, u); } +FICL_PLATFORM_EXTERN void stackPushINT (ficlStack *stack, ficlInteger i) { ficlStackPushInteger(stack, i); } +FICL_PLATFORM_EXTERN void stackReset (ficlStack *stack) { ficlStackReset(stack); } +FICL_PLATFORM_EXTERN void stackRoll (ficlStack *stack, int n) { ficlStackRoll(stack, n); } +FICL_PLATFORM_EXTERN void stackSetTop (ficlStack *stack, ficlCell cell) { ficlStackSetTop(stack, cell); } +FICL_PLATFORM_EXTERN void stackStore (ficlStack *stack, int n, ficlCell cell) { ficlStackStore(stack, n, cell); } + +#if (FICL_WANT_FLOAT) +FICL_PLATFORM_EXTERN ficlFloat stackPopFloat (ficlStack *stack) { return ficlStackPopFloat(stack); } +FICL_PLATFORM_EXTERN void stackPushFloat(ficlStack *stack, ficlFloat f) { ficlStackPushFloat(stack, f); } +#endif + +FICL_PLATFORM_EXTERN int wordIsImmediate(ficlWord *word) { return ficlWordIsImmediate(word); } +FICL_PLATFORM_EXTERN int wordIsCompileOnly(ficlWord *word) { return ficlWordIsCompileOnly(word); } + + +FICL_PLATFORM_EXTERN void vmBranchRelative(ficlVm *vm, int offset) { ficlVmBranchRelative(vm, offset); } +FICL_PLATFORM_EXTERN ficlVm *vmCreate (ficlVm *vm, unsigned nPStack, unsigned nRStack) { return ficlVmCreate(vm, nPStack, nRStack); } +FICL_PLATFORM_EXTERN void vmDelete (ficlVm *vm) { ficlVmDestroy(vm); } +FICL_PLATFORM_EXTERN void vmExecute (ficlVm *vm, ficlWord *word) { ficlVmExecuteWord(vm, word); } +FICL_PLATFORM_EXTERN ficlDictionary *vmGetDict (ficlVm *vm) { return ficlVmGetDictionary(vm); } +FICL_PLATFORM_EXTERN char * vmGetString (ficlVm *vm, ficlCountedString *spDest, char delimiter) { return ficlVmGetString(vm, spDest, delimiter); } +FICL_PLATFORM_EXTERN ficlString vmGetWord (ficlVm *vm) { return ficlVmGetWord(vm); } +FICL_PLATFORM_EXTERN ficlString vmGetWord0 (ficlVm *vm) { return ficlVmGetWord0(vm); } +FICL_PLATFORM_EXTERN int vmGetWordToPad (ficlVm *vm) { return ficlVmGetWordToPad(vm); } +FICL_PLATFORM_EXTERN ficlString vmParseString (ficlVm *vm, char delimiter) { return ficlVmParseString(vm, delimiter); } +FICL_PLATFORM_EXTERN ficlString vmParseStringEx(ficlVm *vm, char delimiter, char skipLeading) { return ficlVmParseStringEx(vm, delimiter, skipLeading); } +FICL_PLATFORM_EXTERN ficlCell vmPop (ficlVm *vm) { return ficlVmPop(vm); } +FICL_PLATFORM_EXTERN void vmPush (ficlVm *vm, ficlCell cell) { ficlVmPush(vm, cell); } +FICL_PLATFORM_EXTERN void vmPopIP (ficlVm *vm) { ficlVmPopIP(vm); } +FICL_PLATFORM_EXTERN void vmPushIP (ficlVm *vm, ficlIp newIP) { ficlVmPushIP(vm, newIP); } +FICL_PLATFORM_EXTERN void vmQuit (ficlVm *vm) { ficlVmQuit(vm); } +FICL_PLATFORM_EXTERN void vmReset (ficlVm *vm) { ficlVmReset(vm); } +FICL_PLATFORM_EXTERN void vmThrow (ficlVm *vm, int except) { ficlVmThrow(vm, except); } +FICL_PLATFORM_EXTERN void vmThrowErr (ficlVm *vm, char *fmt, ...) { va_list list; va_start(list, fmt); ficlVmThrowErrorVararg(vm, fmt, list); va_end(list); } + +FICL_PLATFORM_EXTERN void vmCheckStack(ficlVm *vm, int popCells, int pushCells) { FICL_IGNORE(vm); FICL_IGNORE(popCells); FICL_IGNORE(pushCells); FICL_STACK_CHECK(vm->dataStack, popCells, pushCells); } +#if FICL_WANT_FLOAT +FICL_PLATFORM_EXTERN void vmCheckFStack(ficlVm *vm, int popCells, int pushCells) { FICL_IGNORE(vm); FICL_IGNORE(popCells); FICL_IGNORE(pushCells); FICL_STACK_CHECK(vm->floatStack, popCells, pushCells); } +#endif + +FICL_PLATFORM_EXTERN void vmPushTib (ficlVm *vm, char *text, ficlInteger nChars, ficlTIB *pSaveTib) { ficlVmPushTib(vm, text, nChars, pSaveTib); } +FICL_PLATFORM_EXTERN void vmPopTib (ficlVm *vm, ficlTIB *pTib) { ficlVmPopTib(vm, pTib); } + +FICL_PLATFORM_EXTERN int isPowerOfTwo(ficlUnsigned u) { return ficlIsPowerOfTwo(u); } + +#if defined(_WIN32) +/* #SHEESH +** Why do Microsoft Meatballs insist on contaminating +** my namespace with their string functions??? +*/ +#pragma warning(disable: 4273) +#endif +char *ltoa(ficlInteger value, char *string, int radix ) { return ficlLtoa(value, string, radix); } +char *ultoa(ficlUnsigned value, char *string, int radix ) { return ficlUltoa(value, string, radix); } +char *strrev( char *string ) { return ficlStringReverse(string); } +#if defined(_WIN32) +#pragma warning(default: 4273) +#endif +FICL_PLATFORM_EXTERN char digit_to_char(int value) { return ficlDigitToCharacter(value); } +FICL_PLATFORM_EXTERN char *skipSpace(char *cp, char *end) { return ficlStringSkipSpace(cp, end); } +FICL_PLATFORM_EXTERN char *caseFold(char *cp) { return ficlStringCaseFold(cp); } +FICL_PLATFORM_EXTERN int strincmp(char *cp1, char *cp2, ficlUnsigned count) { return ficlStrincmp(cp1, cp2, count); } + +FICL_PLATFORM_EXTERN void hashForget (ficlHash *hash, void *where) { ficlHashForget(hash, where); } +FICL_PLATFORM_EXTERN ficlUnsigned16 hashHashCode (ficlString string) { return ficlHashCode(string); } +FICL_PLATFORM_EXTERN void hashInsertWord(ficlHash *hash, ficlWord *word) { ficlHashInsertWord(hash, word); } +FICL_PLATFORM_EXTERN ficlWord *hashLookup (ficlHash *hash, ficlString string, ficlUnsigned16 hashCode) { return ficlHashLookup(hash, string, hashCode); } +FICL_PLATFORM_EXTERN void hashReset (ficlHash *hash) { ficlHashReset(hash); } + + +FICL_PLATFORM_EXTERN void *alignPtr(void *ptr) { return ficlAlignPointer(ptr); } +FICL_PLATFORM_EXTERN void dictAbortDefinition(ficlDictionary *dictionary) { ficlDictionaryAbortDefinition(dictionary); } +FICL_PLATFORM_EXTERN void dictAlign (ficlDictionary *dictionary) { ficlDictionaryAlign(dictionary); } +FICL_PLATFORM_EXTERN int dictAllot (ficlDictionary *dictionary, int n) { ficlDictionaryAllot(dictionary, n); return 0; } +FICL_PLATFORM_EXTERN int dictAllotCells (ficlDictionary *dictionary, int cells) { ficlDictionaryAllotCells(dictionary, cells); return 0; } +FICL_PLATFORM_EXTERN void dictAppendCell (ficlDictionary *dictionary, ficlCell cell) { ficlDictionaryAppendCell(dictionary, cell); } +FICL_PLATFORM_EXTERN void dictAppendChar (ficlDictionary *dictionary, char c) { ficlDictionaryAppendCharacter(dictionary, c); } +FICL_PLATFORM_EXTERN ficlWord *dictAppendWord (ficlDictionary *dictionary, + char *name, + ficlPrimitive code, + ficlUnsigned8 flags) + { return ficlDictionaryAppendPrimitive(dictionary, name, code, flags); } +FICL_PLATFORM_EXTERN ficlWord *dictAppendWord2(ficlDictionary *dictionary, + ficlString name, + ficlPrimitive code, + ficlUnsigned8 flags) + { return ficlDictionaryAppendWord(dictionary, name, code, flags); } +FICL_PLATFORM_EXTERN void dictAppendUNS (ficlDictionary *dictionary, ficlUnsigned u) { ficlDictionaryAppendUnsigned(dictionary, u); } +FICL_PLATFORM_EXTERN int dictCellsAvail (ficlDictionary *dictionary) { return ficlDictionaryCellsAvailable(dictionary); } +FICL_PLATFORM_EXTERN int dictCellsUsed (ficlDictionary *dictionary) { return ficlDictionaryCellsUsed(dictionary); } +FICL_PLATFORM_EXTERN void dictCheck (ficlDictionary *dictionary, ficlVm *vm, int n) { FICL_IGNORE(dictionary); FICL_IGNORE(vm); FICL_IGNORE(n); FICL_VM_DICTIONARY_CHECK(vm, dictionary, n); } +FICL_PLATFORM_EXTERN ficlDictionary *dictCreate(unsigned cells) { return ficlDictionaryCreate(NULL, cells); } +FICL_PLATFORM_EXTERN ficlDictionary *dictCreateHashed(unsigned cells, unsigned hash) { return ficlDictionaryCreateHashed(NULL, cells, hash); } +FICL_PLATFORM_EXTERN ficlHash *dictCreateWordlist(ficlDictionary *dictionary, int nBuckets) { return ficlDictionaryCreateWordlist(dictionary, nBuckets); } +FICL_PLATFORM_EXTERN void dictDelete (ficlDictionary *dictionary) { ficlDictionaryDestroy(dictionary); } +FICL_PLATFORM_EXTERN void dictEmpty (ficlDictionary *dictionary, unsigned nHash) { ficlDictionaryEmpty(dictionary, nHash); } +#if FICL_WANT_FLOAT +FICL_PLATFORM_EXTERN void ficlPrimitiveHashSummary(ficlVm *vm); +FICL_PLATFORM_EXTERN void dictHashSummary(ficlVm *vm) { ficlPrimitiveHashSummary(vm); } +#endif +FICL_PLATFORM_EXTERN int dictIncludes (ficlDictionary *dictionary, void *p) { return ficlDictionaryIncludes(dictionary, p); } +FICL_PLATFORM_EXTERN ficlWord *dictLookup (ficlDictionary *dictionary, ficlString name) { return ficlDictionaryLookup(dictionary, name); } +#if FICL_WANT_LOCALS +FICL_PLATFORM_EXTERN ficlWord *ficlLookupLoc (ficlSystem *system, ficlString name) { return ficlDictionaryLookup(ficlSystemGetLocals(system), name); } +#endif +FICL_PLATFORM_EXTERN void dictResetSearchOrder(ficlDictionary *dictionary) { ficlDictionaryResetSearchOrder(dictionary); } +FICL_PLATFORM_EXTERN void dictSetFlags (ficlDictionary *dictionary, ficlUnsigned8 set, ficlUnsigned8 clear) { ficlDictionarySetFlags(dictionary, set); ficlDictionaryClearFlags(dictionary, clear); } +FICL_PLATFORM_EXTERN void dictSetImmediate(ficlDictionary *dictionary) { ficlDictionarySetImmediate(dictionary); } +FICL_PLATFORM_EXTERN void dictUnsmudge (ficlDictionary *dictionary) { ficlDictionaryUnsmudge(dictionary); } +FICL_PLATFORM_EXTERN ficlCell *dictWhere (ficlDictionary *dictionary) { return ficlDictionaryWhere(dictionary); } + +FICL_PLATFORM_EXTERN int ficlAddParseStep(ficlSystem *system, ficlWord *word) { return ficlSystemAddParseStep(system, word); } +FICL_PLATFORM_EXTERN void ficlAddPrecompiledParseStep(ficlSystem *system, char *name, ficlParseStep pStep) { ficlSystemAddPrimitiveParseStep(system, name, pStep); } +FICL_PLATFORM_EXTERN void ficlPrimitiveParseStepList(ficlVm *vm); +FICL_PLATFORM_EXTERN void ficlListParseSteps(ficlVm *vm) { ficlPrimitiveParseStepList(vm); } + +FICL_PLATFORM_EXTERN void ficlTermSystem(ficlSystem *system) { ficlSystemDestroy(system); } +FICL_PLATFORM_EXTERN int ficlEvaluate(ficlVm *vm, char *pText) { return ficlVmEvaluate(vm, pText); } +FICL_PLATFORM_EXTERN int ficlExec (ficlVm *vm, char *pText) { ficlString s; FICL_STRING_SET_FROM_CSTRING(s, pText); return ficlVmExecuteString(vm, s); } +FICL_PLATFORM_EXTERN int ficlExecC(ficlVm *vm, char *pText, ficlInteger nChars) { ficlString s; FICL_STRING_SET_POINTER(s, pText); FICL_STRING_SET_LENGTH(s, nChars); return ficlVmExecuteString(vm, s); } +FICL_PLATFORM_EXTERN int ficlExecXT(ficlVm *vm, ficlWord *word) { return ficlVmExecuteXT(vm, word); } +FICL_PLATFORM_EXTERN void ficlFreeVM(ficlVm *vm) { ficlVmDestroy(vm); } + + + + + +static void thunkTextOut(ficlCallback *callback, char *text) + { + ficlCompatibilityOutputFunction outputFunction; + if ((callback->vm != NULL) && (callback->vm->thunkedTextout != NULL)) + outputFunction = callback->system->thunkedTextout; + else if (callback->system->thunkedTextout != NULL) + outputFunction = callback->system->thunkedTextout; + else + { + ficlCallbackDefaultTextOut(callback, text); + return; + } + ficlCompatibilityTextOutCallback(callback, text, outputFunction); + } + + +FICL_PLATFORM_EXTERN void vmSetTextOut(ficlVm *vm, ficlCompatibilityOutputFunction textOut) + { + vm->thunkedTextout = textOut; + ficlVmSetTextOut(vm, thunkTextOut); + } + +FICL_PLATFORM_EXTERN void vmTextOut (ficlVm *vm, char *text, int fNewline) + { + ficlVmTextOut(vm, text); + if (fNewline) + ficlVmTextOut(vm, "\n"); + } + + +FICL_PLATFORM_EXTERN void ficlTextOut (ficlVm *vm, char *text, int fNewline) + { + vmTextOut(vm, text, fNewline); + } + +extern ficlSystem *ficlSystemGlobal; +static defaultStackSize = FICL_DEFAULT_STACK_SIZE; +FICL_PLATFORM_EXTERN int ficlSetStackSize(int nStackCells) +{ + if (defaultStackSize < nStackCells) + defaultStackSize = nStackCells; + if ((ficlSystemGlobal != NULL) && (ficlSystemGlobal->stackSize < nStackCells)) + ficlSystemGlobal->stackSize = nStackCells; + return defaultStackSize; +} + + +FICL_PLATFORM_EXTERN ficlSystem *ficlInitSystemEx(ficlSystemInformation *fsi) +{ + ficlSystem *returnValue; + ficlCompatibilityOutputFunction thunkedTextout; + ficlSystemInformation clone; + + memcpy(&clone, fsi, sizeof(clone)); + thunkedTextout = (ficlCompatibilityOutputFunction)clone.textOut; + clone.textOut = clone.errorOut = thunkTextOut; + + returnValue = ficlSystemCreate(&clone); + if (returnValue != NULL) + { + returnValue->thunkedTextout = thunkedTextout; + } + return returnValue; +} + + +FICL_PLATFORM_EXTERN ficlSystem *ficlInitSystem(int nDictCells) +{ + ficlSystemInformation fsi; + ficlSystemInformationInitialize(&fsi); + fsi.dictionarySize = nDictCells; + if (fsi.stackSize < defaultStackSize) + fsi.stackSize = defaultStackSize; + return ficlSystemCreate(&fsi); +} + + + + +FICL_PLATFORM_EXTERN ficlVm *ficlNewVM(ficlSystem *system) +{ + ficlVm *returnValue = ficlSystemCreateVm(system); + if (returnValue != NULL) + { + if ((returnValue->callback.textOut != NULL) && (returnValue->callback.textOut != thunkTextOut)) + { + returnValue->thunkedTextout = (ficlCompatibilityOutputFunction)returnValue->callback.textOut; + returnValue->callback.textOut = thunkTextOut; + } + if ((returnValue->callback.errorOut != NULL) && (returnValue->callback.errorOut != thunkTextOut)) + { + if (returnValue->thunkedTextout == NULL) + returnValue->thunkedTextout = (ficlCompatibilityOutputFunction)returnValue->callback.errorOut; + returnValue->callback.errorOut = thunkTextOut; + } + } + return returnValue; +} + + + +FICL_PLATFORM_EXTERN ficlWord *ficlLookup(ficlSystem *system, char *name) { return ficlSystemLookup(system, name); } +FICL_PLATFORM_EXTERN ficlDictionary *ficlGetDict(ficlSystem *system) { return ficlSystemGetDictionary(system); } +FICL_PLATFORM_EXTERN ficlDictionary *ficlGetEnv (ficlSystem *system) { return ficlSystemGetEnvironment(system); } +FICL_PLATFORM_EXTERN void ficlSetEnv (ficlSystem *system, char *name, ficlInteger value) { ficlDictionarySetConstant(ficlSystemGetDictionary(system), name, value); } +FICL_PLATFORM_EXTERN void ficlSetEnvD(ficlSystem *system, char *name, ficlInteger high, ficlInteger low) { ficl2Unsigned value; FICL_2UNSIGNED_SET(low, high, value); ficlDictionarySet2Constant(ficlSystemGetDictionary(system), name, FICL_2UNSIGNED_TO_2INTEGER(value)); } +#if FICL_WANT_LOCALS +FICL_PLATFORM_EXTERN ficlDictionary *ficlGetLoc (ficlSystem *system) { return ficlSystemGetLocals(system); } +#endif +FICL_PLATFORM_EXTERN int ficlBuild(ficlSystem *system, char *name, ficlPrimitive code, char flags) { ficlDictionary *dictionary = ficlSystemGetDictionary(system); ficlDictionaryLock(dictionary, FICL_TRUE); ficlDictionaryAppendPrimitive(dictionary, name, code, flags); ficlDictionaryLock(dictionary, FICL_FALSE); return 0; } +FICL_PLATFORM_EXTERN void ficlCompileCore(ficlSystem *system) { ficlSystemCompileCore(system); } +FICL_PLATFORM_EXTERN void ficlCompilePrefix(ficlSystem *system) { ficlSystemCompilePrefix(system); } +FICL_PLATFORM_EXTERN void ficlCompileSearch(ficlSystem *system) { ficlSystemCompileSearch(system); } +FICL_PLATFORM_EXTERN void ficlCompileSoftCore(ficlSystem *system) { ficlSystemCompileSoftCore(system); } +FICL_PLATFORM_EXTERN void ficlCompileTools(ficlSystem *system) { ficlSystemCompileTools(system); } +FICL_PLATFORM_EXTERN void ficlCompileFile(ficlSystem *system) { ficlSystemCompileFile(system); } +#if FICL_WANT_FLOAT +FICL_PLATFORM_EXTERN void ficlCompileFloat(ficlSystem *system) { ficlSystemCompileFloat(system); } +FICL_PLATFORM_EXTERN int ficlParseFloatNumber( ficlVm *vm, ficlString string) { return ficlVmParseFloatNumber(vm, string); } +#endif +#if FICL_WANT_PLATFORM +FICL_PLATFORM_EXTERN void ficlCompilePlatform(ficlSystem *system) { ficlSystemCompilePlatform(system); } +#endif +FICL_PLATFORM_EXTERN int ficlParsePrefix(ficlVm *vm, ficlString string) { return ficlVmParsePrefix(vm, string); } + +FICL_PLATFORM_EXTERN int ficlParseNumber(ficlVm *vm, ficlString string) { return ficlVmParseNumber(vm, string); } +FICL_PLATFORM_EXTERN void ficlTick(ficlVm *vm) { ficlPrimitiveTick(vm); } +FICL_PLATFORM_EXTERN void parseStepParen(ficlVm *vm) { ficlPrimitiveParseStepParen(vm); } + +FICL_PLATFORM_EXTERN int isAFiclWord(ficlDictionary *dictionary, ficlWord *word) { return ficlDictionaryIsAWord(dictionary, word); } + + +FICL_PLATFORM_EXTERN void buildTestInterface(ficlSystem *system) { ficlSystemCompileExtras(system); } + + Copied: soc2015/clord/head/sys/contrib/ficl/dictionary.c (from r285383, mirror/FreeBSD/vendor/ficl/dist/dictionary.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ soc2015/clord/head/sys/contrib/ficl/dictionary.c Sun Jun 28 16:18:55 2015 (r287700, copy of r285383, mirror/FreeBSD/vendor/ficl/dist/dictionary.c) @@ -0,0 +1,851 @@ +/******************************************************************* +** d i c t . c +** Forth Inspired Command Language - dictionary methods +** Author: John Sadler (john_sadler@alum.mit.edu) +** Created: 19 July 1997 +** $Id: dictionary.c,v 1.2 2010/09/12 15:14:52 asau Exp $ +*******************************************************************/ +/* +** This file implements the dictionary -- Ficl's model of +** memory management. All Ficl words are stored in the +** dictionary. A word is a named chunk of data with its +** associated code. Ficl treats all words the same, even +** precompiled ones, so your words become first-class +** extensions of the language. You can even define new +** control structures. +** +** 29 jun 1998 (sadler) added variable sized hash table support +*/ +/* +** Copyright (c) 1997-2001 John Sadler (john_sadler@alum.mit.edu) +** All rights reserved. +** +** Get the latest Ficl release at http://ficl.sourceforge.net +** +** I am interested in hearing from anyone who uses Ficl. If you have +** a problem, a success story, a defect, an enhancement request, or +** if you would like to contribute to the Ficl release, please +** contact me by email at the address above. +** +** L I C E N S E and D I S C L A I M E R +** +** 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 +#include +#include +#include + +#include "ficl.h" + +#define FICL_SAFE_CALLBACK_FROM_SYSTEM(system) (((system) != NULL) ? &((system)->callback) : NULL) +#define FICL_SAFE_SYSTEM_FROM_DICTIONARY(dictionary) (((dictionary) != NULL) ? (dictionary)->system : NULL) +#define FICL_DICTIONARY_ASSERT(dictionary, expression) FICL_SYSTEM_ASSERT(FICL_SAFE_SYSTEM_FROM_DICTIONARY(dictionary), expression) + +/************************************************************************** + d i c t A b o r t D e f i n i t i o n +** Abort a definition in process: reclaim its memory and unlink it +** from the dictionary list. Assumes that there is a smudged +** definition in process...otherwise does nothing. +** NOTE: this function is not smart enough to unlink a word that +** has been successfully defined (ie linked into a hash). It +** only works for defs in process. If the def has been unsmudged, +** nothing happens. +**************************************************************************/ +void ficlDictionaryAbortDefinition(ficlDictionary *dictionary) +{ + ficlWord *word; + ficlDictionaryLock(dictionary, FICL_TRUE); + word = dictionary->smudge; + + if (word->flags & FICL_WORD_SMUDGED) + dictionary->here = (ficlCell *)word->name; + + ficlDictionaryLock(dictionary, FICL_FALSE); + return; +} + + +/************************************************************************** + d i c t A l i g n +** Align the dictionary's free space pointer +**************************************************************************/ +void ficlDictionaryAlign(ficlDictionary *dictionary) +{ + dictionary->here = ficlAlignPointer(dictionary->here); +} + + +/************************************************************************** + d i c t A l l o t +** Allocate or remove n chars of dictionary space, with +** checks for underrun and overrun +**************************************************************************/ +void ficlDictionaryAllot(ficlDictionary *dictionary, int n) +{ + char *here = (char *)dictionary->here; + here += n; + dictionary->here = FICL_POINTER_TO_CELL(here); +} + + +/************************************************************************** + d i c t A l l o t C e l l s +** Reserve space for the requested number of ficlCells in the +** dictionary. If nficlCells < 0 , removes space from the dictionary. +**************************************************************************/ +void ficlDictionaryAllotCells(ficlDictionary *dictionary, int nficlCells) +{ + dictionary->here += nficlCells; +} + + +/************************************************************************** + d i c t A p p e n d C e l l +** Append the specified ficlCell to the dictionary +**************************************************************************/ +void ficlDictionaryAppendCell(ficlDictionary *dictionary, ficlCell c) +{ + *dictionary->here++ = c; + return; +} + + +/************************************************************************** + d i c t A p p e n d C h a r +** Append the specified char to the dictionary +**************************************************************************/ +void ficlDictionaryAppendCharacter(ficlDictionary *dictionary, char c) +{ + char *here = (char *)dictionary->here; + *here++ = c; + dictionary->here = FICL_POINTER_TO_CELL(here); + return; +} + + +/************************************************************************** + d i c t A p p e n d U N S +** Append the specified ficlUnsigned to the dictionary +**************************************************************************/ +void ficlDictionaryAppendUnsigned(ficlDictionary *dictionary, ficlUnsigned u) +{ + *dictionary->here++ = FICL_LVALUE_TO_CELL(u); + return; +} + + +void *ficlDictionaryAppendData(ficlDictionary *dictionary, void *data, ficlInteger length) +{ + char *here = (char *)dictionary->here; + char *oldHere = here; + char *from = (char *)data; + + if (length == 0) + { + ficlDictionaryAlign(dictionary); + return (char *)dictionary->here; + } + + while (length) + { + *here++ = *from++; + length--; + } + + *here++ = '\0'; + + dictionary->here = FICL_POINTER_TO_CELL(here); + ficlDictionaryAlign(dictionary); + return oldHere; +} + + +/************************************************************************** + d i c t C o p y N a m e +** Copy up to FICL_NAME_LENGTH characters of the name specified by s into +** the dictionary starting at "here", then NULL-terminate the name, +** point "here" to the next available byte, and return the address of +** the beginning of the name. Used by dictAppendWord. +** N O T E S : +** 1. "here" is guaranteed to be aligned after this operation. +** 2. If the string has zero length, align and return "here" +**************************************************************************/ +char *ficlDictionaryAppendString(ficlDictionary *dictionary, ficlString s) +{ + void *data = FICL_STRING_GET_POINTER(s); + ficlInteger length = FICL_STRING_GET_LENGTH(s); + + if (length > FICL_NAME_LENGTH) + length = FICL_NAME_LENGTH; + + return ficlDictionaryAppendData(dictionary, data, length); +} + + +ficlWord *ficlDictionaryAppendConstantInstruction(ficlDictionary *dictionary, ficlString name, ficlInstruction instruction, ficlInteger value) +{ + ficlWord *word = ficlDictionaryAppendWord(dictionary, name, (ficlPrimitive)instruction, FICL_WORD_DEFAULT); + if (word != NULL) + ficlDictionaryAppendUnsigned(dictionary, value); + return word; +} + + +ficlWord *ficlDictionaryAppend2ConstantInstruction(ficlDictionary *dictionary, ficlString name, ficlInstruction instruction, ficl2Integer value) +{ + ficlWord *word = ficlDictionaryAppendWord(dictionary, name, (ficlPrimitive)instruction, FICL_WORD_DEFAULT); + if (word != NULL) + { + ficlDictionaryAppendUnsigned(dictionary, FICL_2UNSIGNED_GET_HIGH(value)); + ficlDictionaryAppendUnsigned(dictionary, FICL_2UNSIGNED_GET_LOW(value)); + } + return word; +} + + + +ficlWord *ficlDictionaryAppendConstant(ficlDictionary *dictionary, char *name, ficlInteger value) +{ + ficlString s; + FICL_STRING_SET_FROM_CSTRING(s, name); + return ficlDictionaryAppendConstantInstruction(dictionary, s, ficlInstructionConstantParen, value); +} + + + +ficlWord *ficlDictionaryAppend2Constant(ficlDictionary *dictionary, char *name, ficl2Integer value) +{ + ficlString s; + FICL_STRING_SET_FROM_CSTRING(s, name); + return ficlDictionaryAppend2ConstantInstruction(dictionary, s, ficlInstruction2ConstantParen, value); +} + + + +ficlWord *ficlDictionarySetConstantInstruction(ficlDictionary *dictionary, ficlString name, ficlInstruction instruction, ficlInteger value) +{ + ficlWord *word = ficlDictionaryLookup(dictionary, name); + + if (word == NULL) + { + word = ficlDictionaryAppendConstantInstruction(dictionary, name, instruction, value); + } + else + { + word->code = (ficlPrimitive)instruction; + word->param[0] = FICL_LVALUE_TO_CELL(value); + } + return word; +} + +ficlWord *ficlDictionarySetConstant(ficlDictionary *dictionary, char *name, ficlInteger value) +{ + ficlString s; + FICL_STRING_SET_FROM_CSTRING(s, name); + return ficlDictionarySetConstantInstruction(dictionary, s, ficlInstructionConstantParen, value); +} + +ficlWord *ficlDictionarySet2ConstantInstruction(ficlDictionary *dictionary, ficlString s, ficlInstruction instruction, ficl2Integer value) +{ + ficlWord *word; + word = ficlDictionaryLookup(dictionary, s); + + /* only reuse the existing word if we're sure it has space for a 2constant */ + if ((word != NULL) && + ((((ficlInstruction)word->code) == ficlInstruction2ConstantParen) +#if FICL_WANT_FLOAT + || + (((ficlInstruction)word->code) == ficlInstructionF2ConstantParen) +#endif /* FICL_WANT_FLOAT */ + ) + ) + { + word->code = (ficlPrimitive)instruction; + word->param[0].u = FICL_2UNSIGNED_GET_HIGH(value); + word->param[1].u = FICL_2UNSIGNED_GET_LOW(value); + } + else + { + word = ficlDictionaryAppend2ConstantInstruction(dictionary, s, instruction, value); + } + + return word; +} + + +ficlWord *ficlDictionarySet2Constant(ficlDictionary *dictionary, char *name, ficl2Integer value) +{ + ficlString s; + FICL_STRING_SET_FROM_CSTRING(s, name); + return ficlDictionarySet2ConstantInstruction(dictionary, s, ficlInstruction2ConstantParen, value); +} + + +ficlWord *ficlDictionarySetConstantString(ficlDictionary *dictionary, char *name, char *value) +{ + ficlString s; + ficl2Integer valueAs2Integer; + FICL_2INTEGER_SET(strlen(value), (intptr_t)value, valueAs2Integer); + FICL_STRING_SET_FROM_CSTRING(s, name); + + return ficlDictionarySet2ConstantInstruction(dictionary, s, ficlInstruction2ConstantParen, valueAs2Integer); +} + + + +/************************************************************************** + d i c t A p p e n d W o r d +** Create a new word in the dictionary with the specified +** ficlString, code, and flags. Does not require a NULL-terminated +** name. +**************************************************************************/ +ficlWord *ficlDictionaryAppendWord(ficlDictionary *dictionary, + ficlString name, + ficlPrimitive code, + ficlUnsigned8 flags) +{ + ficlUnsigned8 length = (ficlUnsigned8)FICL_STRING_GET_LENGTH(name); + char *nameCopy; + ficlWord *word; + + ficlDictionaryLock(dictionary, FICL_TRUE); + + /* + ** NOTE: ficlDictionaryAppendString advances "here" as a side-effect. + ** It must execute before word is initialized. + */ + nameCopy = ficlDictionaryAppendString(dictionary, name); + word = (ficlWord *)dictionary->here; + dictionary->smudge = word; + word->hash = ficlHashCode(name); + word->code = code; + word->semiParen = ficlInstructionSemiParen; + word->flags = (ficlUnsigned8)(flags | FICL_WORD_SMUDGED); + word->length = length; + word->name = nameCopy; + /* + ** Point "here" to first ficlCell of new word's param area... + */ + dictionary->here = word->param; + + if (!(flags & FICL_WORD_SMUDGED)) + ficlDictionaryUnsmudge(dictionary); + + ficlDictionaryLock(dictionary, FICL_FALSE); + return word; +} + + +/************************************************************************** + d i c t A p p e n d W o r d +** Create a new word in the dictionary with the specified +** name, code, and flags. Name must be NULL-terminated. +**************************************************************************/ +ficlWord *ficlDictionaryAppendPrimitive(ficlDictionary *dictionary, + char *name, + ficlPrimitive code, + ficlUnsigned8 flags) +{ + ficlString s; + FICL_STRING_SET_FROM_CSTRING(s, name); + return ficlDictionaryAppendWord(dictionary, s, code, flags); +} + + +ficlWord *ficlDictionarySetPrimitive(ficlDictionary *dictionary, + char *name, + ficlPrimitive code, + ficlUnsigned8 flags) +{ + ficlString s; + ficlWord *word; + + FICL_STRING_SET_FROM_CSTRING(s, name); + word = ficlDictionaryLookup(dictionary, s); + + if (word == NULL) + { + word = ficlDictionaryAppendPrimitive(dictionary, name, code, flags); + } + else + { + word->code = (ficlPrimitive)code; + word->flags = flags; + } + return word; +} + + +ficlWord *ficlDictionaryAppendInstruction(ficlDictionary *dictionary, + char *name, + ficlInstruction i, + ficlUnsigned8 flags) +{ + return ficlDictionaryAppendPrimitive(dictionary, name, (ficlPrimitive)i, (ficlUnsigned8)(FICL_WORD_INSTRUCTION | flags)); +} + +ficlWord *ficlDictionarySetInstruction(ficlDictionary *dictionary, + char *name, + ficlInstruction i, + ficlUnsigned8 flags) +{ + return ficlDictionarySetPrimitive(dictionary, name, (ficlPrimitive)i, (ficlUnsigned8)(FICL_WORD_INSTRUCTION | flags)); +} + + +/************************************************************************** + d i c t C e l l s A v a i l +** Returns the number of empty ficlCells left in the dictionary +**************************************************************************/ +int ficlDictionaryCellsAvailable(ficlDictionary *dictionary) +{ + return dictionary->size - ficlDictionaryCellsUsed(dictionary); +} + + +/************************************************************************** + d i c t C e l l s U s e d +** Returns the number of ficlCells consumed in the dicionary +**************************************************************************/ +int ficlDictionaryCellsUsed(ficlDictionary *dictionary) +{ + return dictionary->here - dictionary->base; +} + + + +/************************************************************************** + d i c t C r e a t e +** Create and initialize a dictionary with the specified number +** of ficlCells capacity, and no hashing (hash size == 1). +**************************************************************************/ +ficlDictionary *ficlDictionaryCreate(ficlSystem *system, unsigned size) +{ + return ficlDictionaryCreateHashed(system, size, 1); +} + + +ficlDictionary *ficlDictionaryCreateHashed(ficlSystem *system, unsigned size, unsigned bucketCount) +{ + ficlDictionary *dictionary; + size_t nAlloc; + + nAlloc = sizeof(ficlDictionary) + (size * sizeof (ficlCell)) + + sizeof(ficlHash) + (bucketCount - 1) * sizeof (ficlWord *); + + dictionary = ficlMalloc(nAlloc); + FICL_SYSTEM_ASSERT(system, dictionary != NULL); + + dictionary->size = size; + dictionary->system = system; + + ficlDictionaryEmpty(dictionary, bucketCount); + return dictionary; +} + + +/************************************************************************** + d i c t C r e a t e W o r d l i s t +** Create and initialize an anonymous wordlist +**************************************************************************/ +ficlHash *ficlDictionaryCreateWordlist(ficlDictionary *dictionary, int bucketCount) +{ + ficlHash *hash; + + ficlDictionaryAlign(dictionary); + hash = (ficlHash *)dictionary->here; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-soc-all@freebsd.org Sun Jun 28 23:36:31 2015 Return-Path: Delivered-To: svn-soc-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3069998F310 for ; Sun, 28 Jun 2015 23:36:31 +0000 (UTC) (envelope-from pratiksinghal@FreeBSD.org) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1118315D2 for ; Sun, 28 Jun 2015 23:36:31 +0000 (UTC) (envelope-from pratiksinghal@FreeBSD.org) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5SNaVmc011092 for ; Sun, 28 Jun 2015 23:36:31 GMT (envelope-from pratiksinghal@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.9/8.14.9/Submit) id t5SNaLKF011021 for svn-soc-all@FreeBSD.org; Sun, 28 Jun 2015 23:36:21 GMT (envelope-from pratiksinghal@FreeBSD.org) Date: Sun, 28 Jun 2015 23:36:21 GMT Message-Id: <201506282336.t5SNaLKF011021@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to pratiksinghal@FreeBSD.org using -f From: pratiksinghal@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r287706 - in soc2015/pratiksinghal/cubie-head: contrib/bmake contrib/bmake/mk contrib/diff/src contrib/dtc contrib/elftoolchain contrib/elftoolchain/common contrib/elftoolchain/elfco... MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jun 2015 23:36:31 -0000 Author: pratiksinghal Date: Sun Jun 28 23:36:18 2015 New Revision: 287706 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=287706 Log: Applied the loos patch and merged with ~HEAD Added: soc2015/pratiksinghal/cubie-head/contrib/file/magic/Magdir/cbor - copied unchanged from r287668, mirror/FreeBSD/head/contrib/file/magic/Magdir/cbor soc2015/pratiksinghal/cubie-head/contrib/file/magic/Magdir/nasa - copied unchanged from r287668, mirror/FreeBSD/head/contrib/file/magic/Magdir/nasa soc2015/pratiksinghal/cubie-head/contrib/file/src/gmtime_r.c - copied unchanged from r287668, mirror/FreeBSD/head/contrib/file/src/gmtime_r.c soc2015/pratiksinghal/cubie-head/contrib/file/src/localtime_r.c - copied unchanged from r287668, mirror/FreeBSD/head/contrib/file/src/localtime_r.c soc2015/pratiksinghal/cubie-head/contrib/top/top.local.hs - copied unchanged from r287668, mirror/FreeBSD/head/contrib/top/top.local.hs soc2015/pratiksinghal/cubie-head/contrib/top/top.xs - copied unchanged from r287668, mirror/FreeBSD/head/contrib/top/top.xs soc2015/pratiksinghal/cubie-head/games/caesar/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/games/caesar/Makefile.depend soc2015/pratiksinghal/cubie-head/games/factor/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/games/factor/Makefile.depend soc2015/pratiksinghal/cubie-head/games/fortune/datfiles/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/games/fortune/datfiles/Makefile.depend soc2015/pratiksinghal/cubie-head/games/fortune/fortune/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/games/fortune/fortune/Makefile.depend soc2015/pratiksinghal/cubie-head/games/fortune/strfile/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/games/fortune/strfile/Makefile.depend soc2015/pratiksinghal/cubie-head/games/fortune/unstr/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/games/fortune/unstr/Makefile.depend soc2015/pratiksinghal/cubie-head/games/grdc/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/games/grdc/Makefile.depend soc2015/pratiksinghal/cubie-head/games/morse/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/games/morse/Makefile.depend soc2015/pratiksinghal/cubie-head/games/number/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/games/number/Makefile.depend soc2015/pratiksinghal/cubie-head/games/pom/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/games/pom/Makefile.depend soc2015/pratiksinghal/cubie-head/games/primes/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/games/primes/Makefile.depend soc2015/pratiksinghal/cubie-head/games/random/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/games/random/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/lib/csu/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/lib/csu/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/lib/libdialog/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/lib/libdialog/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/lib/libgcc/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/lib/libgcc/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/lib/libgcov/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/lib/libgcov/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/lib/libgomp/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/lib/libgomp/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/lib/libreadline/readline/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/lib/libreadline/readline/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/lib/libregex/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/lib/libregex/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/lib/libssp/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/lib/libssp/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/lib/libssp/libssp_nonshared/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/lib/libssp/libssp_nonshared/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/lib/libstdc++/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/lib/libstdc++/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/lib/libsupc++/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/lib/libsupc++/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/binutils/addr2line/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/binutils/addr2line/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/binutils/ar/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/binutils/ar/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/binutils/as/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/binutils/as/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/binutils/doc/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/binutils/doc/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/binutils/ld/Makefile.depend.amd64 - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/binutils/ld/Makefile.depend.amd64 soc2015/pratiksinghal/cubie-head/gnu/usr.bin/binutils/ld/Makefile.depend.host - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/binutils/ld/Makefile.depend.host soc2015/pratiksinghal/cubie-head/gnu/usr.bin/binutils/libbfd/Makefile.depend.amd64 - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/binutils/libbfd/Makefile.depend.amd64 soc2015/pratiksinghal/cubie-head/gnu/usr.bin/binutils/libbfd/Makefile.depend.host - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/binutils/libbfd/Makefile.depend.host soc2015/pratiksinghal/cubie-head/gnu/usr.bin/binutils/libbinutils/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/binutils/libbinutils/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/binutils/libiberty/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/binutils/libiberty/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/binutils/libopcodes/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/binutils/libopcodes/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/binutils/nm/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/binutils/nm/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/binutils/objcopy/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/binutils/objcopy/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/binutils/objdump/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/binutils/objdump/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/binutils/ranlib/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/binutils/ranlib/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/binutils/readelf/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/binutils/readelf/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/binutils/size/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/binutils/size/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/binutils/strings/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/binutils/strings/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/binutils/strip/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/binutils/strip/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/cc/c++/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/cc/c++/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/cc/c++filt/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/cc/c++filt/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/cc/cc/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/cc/cc/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/cc/cc1/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/cc/cc1/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/cc/cc1plus/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/cc/cc1plus/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/cc/cc_int/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/cc/cc_int/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/cc/cc_tools/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/cc/cc_tools/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/cc/cpp/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/cc/cpp/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/cc/gcov/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/cc/gcov/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/cc/include/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/cc/include/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/cc/libcpp/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/cc/libcpp/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/cc/libdecnumber/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/cc/libdecnumber/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/cc/libiberty/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/cc/libiberty/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/dialog/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/dialog/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/diff/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/diff/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/diff3/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/diff3/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/dtc/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/dtc/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/gdb/gdb/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/gdb/gdb/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/gdb/gdbserver/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/gdb/gdbserver/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/gdb/gdbtui/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/gdb/gdbtui/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/gdb/kgdb/Makefile.depend.amd64 - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/gdb/kgdb/Makefile.depend.amd64 soc2015/pratiksinghal/cubie-head/gnu/usr.bin/gdb/libgdb/Makefile.depend.amd64 - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/gdb/libgdb/Makefile.depend.amd64 soc2015/pratiksinghal/cubie-head/gnu/usr.bin/gperf/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/gperf/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/grep/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/grep/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/groff/contrib/mm/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/groff/contrib/mm/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/groff/font/devX100-12/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/groff/font/devX100-12/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/groff/font/devX100/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/groff/font/devX100/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/groff/font/devX75-12/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/groff/font/devX75-12/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/groff/font/devX75/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/groff/font/devX75/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/groff/font/devascii/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/groff/font/devascii/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/groff/font/devcp1047/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/groff/font/devcp1047/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/groff/font/devdvi/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/groff/font/devdvi/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/groff/font/devhtml/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/groff/font/devhtml/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/groff/font/devkoi8-r/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/groff/font/devkoi8-r/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/groff/font/devlatin1/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/groff/font/devlatin1/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/groff/font/devlbp/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/groff/font/devlbp/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/groff/font/devlj4/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/groff/font/devlj4/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/groff/font/devps/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/groff/font/devps/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/groff/font/devutf8/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/groff/font/devutf8/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/groff/man/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/groff/man/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/groff/src/devices/grodvi/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/groff/src/devices/grodvi/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/groff/src/devices/grohtml/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/groff/src/devices/grohtml/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/groff/src/devices/grolbp/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/groff/src/devices/grolbp/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/groff/src/devices/grolj4/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/groff/src/devices/grolj4/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/groff/src/devices/grops/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/groff/src/devices/grops/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/groff/src/devices/grotty/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/groff/src/devices/grotty/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/groff/src/libs/libbib/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/groff/src/libs/libbib/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/groff/src/libs/libdriver/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/groff/src/libs/libdriver/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/groff/src/libs/libgroff/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/groff/src/libs/libgroff/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/groff/src/preproc/eqn/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/groff/src/preproc/eqn/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/groff/src/preproc/grn/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/groff/src/preproc/grn/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/groff/src/preproc/html/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/groff/src/preproc/html/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/groff/src/preproc/pic/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/groff/src/preproc/pic/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/groff/src/preproc/refer/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/groff/src/preproc/refer/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/groff/src/preproc/tbl/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/groff/src/preproc/tbl/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/groff/src/roff/groff/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/groff/src/roff/groff/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/groff/src/roff/grog/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/groff/src/roff/grog/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/groff/src/roff/nroff/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/groff/src/roff/nroff/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/groff/src/roff/psroff/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/groff/src/roff/psroff/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/groff/src/roff/troff/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/groff/src/roff/troff/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/groff/src/utils/addftinfo/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/groff/src/utils/addftinfo/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/groff/src/utils/afmtodit/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/groff/src/utils/afmtodit/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/groff/src/utils/hpftodit/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/groff/src/utils/hpftodit/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/groff/src/utils/indxbib/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/groff/src/utils/indxbib/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/groff/src/utils/lkbib/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/groff/src/utils/lkbib/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/groff/src/utils/lookbib/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/groff/src/utils/lookbib/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/groff/src/utils/pfbtops/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/groff/src/utils/pfbtops/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/groff/src/utils/tfmtodit/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/groff/src/utils/tfmtodit/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/groff/tmac/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/groff/tmac/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/rcs/ci/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/rcs/ci/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/rcs/co/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/rcs/co/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/rcs/ident/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/rcs/ident/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/rcs/lib/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/rcs/lib/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/rcs/merge/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/rcs/merge/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/rcs/rcs/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/rcs/rcs/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/rcs/rcsclean/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/rcs/rcsclean/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/rcs/rcsdiff/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/rcs/rcsdiff/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/rcs/rcsfreeze/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/rcs/rcsfreeze/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/rcs/rcsmerge/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/rcs/rcsmerge/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/rcs/rlog/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/rcs/rlog/Makefile.depend soc2015/pratiksinghal/cubie-head/gnu/usr.bin/sdiff/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/gnu/usr.bin/sdiff/Makefile.depend soc2015/pratiksinghal/cubie-head/kerberos5/lib/libasn1/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/kerberos5/lib/libasn1/Makefile.depend soc2015/pratiksinghal/cubie-head/kerberos5/lib/libgssapi_krb5/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/kerberos5/lib/libgssapi_krb5/Makefile.depend soc2015/pratiksinghal/cubie-head/kerberos5/lib/libgssapi_ntlm/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/kerberos5/lib/libgssapi_ntlm/Makefile.depend soc2015/pratiksinghal/cubie-head/kerberos5/lib/libgssapi_spnego/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/kerberos5/lib/libgssapi_spnego/Makefile.depend soc2015/pratiksinghal/cubie-head/kerberos5/lib/libhdb/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/kerberos5/lib/libhdb/Makefile.depend soc2015/pratiksinghal/cubie-head/kerberos5/lib/libheimbase/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/kerberos5/lib/libheimbase/Makefile.depend soc2015/pratiksinghal/cubie-head/kerberos5/lib/libheimipcc/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/kerberos5/lib/libheimipcc/Makefile.depend soc2015/pratiksinghal/cubie-head/kerberos5/lib/libheimipcs/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/kerberos5/lib/libheimipcs/Makefile.depend soc2015/pratiksinghal/cubie-head/kerberos5/lib/libheimntlm/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/kerberos5/lib/libheimntlm/Makefile.depend soc2015/pratiksinghal/cubie-head/kerberos5/lib/libhx509/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/kerberos5/lib/libhx509/Makefile.depend soc2015/pratiksinghal/cubie-head/kerberos5/lib/libkadm5clnt/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/kerberos5/lib/libkadm5clnt/Makefile.depend soc2015/pratiksinghal/cubie-head/kerberos5/lib/libkadm5srv/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/kerberos5/lib/libkadm5srv/Makefile.depend soc2015/pratiksinghal/cubie-head/kerberos5/lib/libkafs5/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/kerberos5/lib/libkafs5/Makefile.depend soc2015/pratiksinghal/cubie-head/kerberos5/lib/libkdc/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/kerberos5/lib/libkdc/Makefile.depend soc2015/pratiksinghal/cubie-head/kerberos5/lib/libkrb5/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/kerberos5/lib/libkrb5/Makefile.depend soc2015/pratiksinghal/cubie-head/kerberos5/lib/libroken/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/kerberos5/lib/libroken/Makefile.depend soc2015/pratiksinghal/cubie-head/kerberos5/lib/libsl/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/kerberos5/lib/libsl/Makefile.depend soc2015/pratiksinghal/cubie-head/kerberos5/lib/libvers/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/kerberos5/lib/libvers/Makefile.depend soc2015/pratiksinghal/cubie-head/kerberos5/lib/libwind/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/kerberos5/lib/libwind/Makefile.depend soc2015/pratiksinghal/cubie-head/kerberos5/libexec/digest-service/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/kerberos5/libexec/digest-service/Makefile.depend soc2015/pratiksinghal/cubie-head/kerberos5/libexec/hprop/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/kerberos5/libexec/hprop/Makefile.depend soc2015/pratiksinghal/cubie-head/kerberos5/libexec/hpropd/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/kerberos5/libexec/hpropd/Makefile.depend soc2015/pratiksinghal/cubie-head/kerberos5/libexec/ipropd-master/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/kerberos5/libexec/ipropd-master/Makefile.depend soc2015/pratiksinghal/cubie-head/kerberos5/libexec/ipropd-slave/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/kerberos5/libexec/ipropd-slave/Makefile.depend soc2015/pratiksinghal/cubie-head/kerberos5/libexec/kadmind/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/kerberos5/libexec/kadmind/Makefile.depend soc2015/pratiksinghal/cubie-head/kerberos5/libexec/kcm/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/kerberos5/libexec/kcm/Makefile.depend soc2015/pratiksinghal/cubie-head/kerberos5/libexec/kdc/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/kerberos5/libexec/kdc/Makefile.depend soc2015/pratiksinghal/cubie-head/kerberos5/libexec/kdigest/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/kerberos5/libexec/kdigest/Makefile.depend soc2015/pratiksinghal/cubie-head/kerberos5/libexec/kfd/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/kerberos5/libexec/kfd/Makefile.depend soc2015/pratiksinghal/cubie-head/kerberos5/libexec/kimpersonate/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/kerberos5/libexec/kimpersonate/Makefile.depend soc2015/pratiksinghal/cubie-head/kerberos5/libexec/kpasswdd/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/kerberos5/libexec/kpasswdd/Makefile.depend soc2015/pratiksinghal/cubie-head/kerberos5/tools/asn1_compile/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/kerberos5/tools/asn1_compile/Makefile.depend soc2015/pratiksinghal/cubie-head/kerberos5/tools/make-roken/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/kerberos5/tools/make-roken/Makefile.depend soc2015/pratiksinghal/cubie-head/kerberos5/tools/slc/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/kerberos5/tools/slc/Makefile.depend soc2015/pratiksinghal/cubie-head/kerberos5/usr.bin/hxtool/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/kerberos5/usr.bin/hxtool/Makefile.depend soc2015/pratiksinghal/cubie-head/kerberos5/usr.bin/kadmin/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/kerberos5/usr.bin/kadmin/Makefile.depend soc2015/pratiksinghal/cubie-head/kerberos5/usr.bin/kcc/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/kerberos5/usr.bin/kcc/Makefile.depend soc2015/pratiksinghal/cubie-head/kerberos5/usr.bin/kdestroy/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/kerberos5/usr.bin/kdestroy/Makefile.depend soc2015/pratiksinghal/cubie-head/kerberos5/usr.bin/kf/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/kerberos5/usr.bin/kf/Makefile.depend soc2015/pratiksinghal/cubie-head/kerberos5/usr.bin/kgetcred/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/kerberos5/usr.bin/kgetcred/Makefile.depend soc2015/pratiksinghal/cubie-head/kerberos5/usr.bin/kinit/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/kerberos5/usr.bin/kinit/Makefile.depend soc2015/pratiksinghal/cubie-head/kerberos5/usr.bin/kpasswd/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/kerberos5/usr.bin/kpasswd/Makefile.depend soc2015/pratiksinghal/cubie-head/kerberos5/usr.bin/krb5-config/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/kerberos5/usr.bin/krb5-config/Makefile.depend soc2015/pratiksinghal/cubie-head/kerberos5/usr.bin/ksu/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/kerberos5/usr.bin/ksu/Makefile.depend soc2015/pratiksinghal/cubie-head/kerberos5/usr.bin/string2key/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/kerberos5/usr.bin/string2key/Makefile.depend soc2015/pratiksinghal/cubie-head/kerberos5/usr.bin/verify_krb5_conf/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/kerberos5/usr.bin/verify_krb5_conf/Makefile.depend soc2015/pratiksinghal/cubie-head/kerberos5/usr.sbin/iprop-log/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/kerberos5/usr.sbin/iprop-log/Makefile.depend soc2015/pratiksinghal/cubie-head/kerberos5/usr.sbin/kstash/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/kerberos5/usr.sbin/kstash/Makefile.depend soc2015/pratiksinghal/cubie-head/kerberos5/usr.sbin/ktutil/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/kerberos5/usr.sbin/ktutil/Makefile.depend soc2015/pratiksinghal/cubie-head/release/Makefile.azure - copied unchanged from r287669, mirror/FreeBSD/head/release/Makefile.azure soc2015/pratiksinghal/cubie-head/release/Makefile.gce - copied unchanged from r287669, mirror/FreeBSD/head/release/Makefile.gce soc2015/pratiksinghal/cubie-head/release/arm/CUBOX-HUMMINGBOARD.conf - copied unchanged from r287669, mirror/FreeBSD/head/release/arm/CUBOX-HUMMINGBOARD.conf soc2015/pratiksinghal/cubie-head/release/arm/GUMSTIX.conf - copied unchanged from r287669, mirror/FreeBSD/head/release/arm/GUMSTIX.conf soc2015/pratiksinghal/cubie-head/rescue/librescue/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/rescue/librescue/Makefile.depend soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/secure/lib/libcrypto/Makefile.depend soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/engines/lib4758cca/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/secure/lib/libcrypto/engines/lib4758cca/Makefile.depend soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/engines/libaep/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/secure/lib/libcrypto/engines/libaep/Makefile.depend soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/engines/libatalla/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/secure/lib/libcrypto/engines/libatalla/Makefile.depend soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/engines/libchil/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/secure/lib/libcrypto/engines/libchil/Makefile.depend soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/engines/libcswift/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/secure/lib/libcrypto/engines/libcswift/Makefile.depend soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/engines/libgost/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/secure/lib/libcrypto/engines/libgost/Makefile.depend soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/engines/libnuron/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/secure/lib/libcrypto/engines/libnuron/Makefile.depend soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/engines/libsureware/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/secure/lib/libcrypto/engines/libsureware/Makefile.depend soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/engines/libubsec/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/secure/lib/libcrypto/engines/libubsec/Makefile.depend soc2015/pratiksinghal/cubie-head/secure/lib/libssh/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/secure/lib/libssh/Makefile.depend soc2015/pratiksinghal/cubie-head/secure/lib/libssl/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/secure/lib/libssl/Makefile.depend soc2015/pratiksinghal/cubie-head/secure/libexec/sftp-server/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/secure/libexec/sftp-server/Makefile.depend soc2015/pratiksinghal/cubie-head/secure/libexec/ssh-keysign/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/secure/libexec/ssh-keysign/Makefile.depend soc2015/pratiksinghal/cubie-head/secure/libexec/ssh-pkcs11-helper/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/secure/libexec/ssh-pkcs11-helper/Makefile.depend soc2015/pratiksinghal/cubie-head/secure/usr.bin/bdes/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/secure/usr.bin/bdes/Makefile.depend soc2015/pratiksinghal/cubie-head/secure/usr.bin/openssl/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/secure/usr.bin/openssl/Makefile.depend soc2015/pratiksinghal/cubie-head/secure/usr.bin/scp/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/secure/usr.bin/scp/Makefile.depend soc2015/pratiksinghal/cubie-head/secure/usr.bin/sftp/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/secure/usr.bin/sftp/Makefile.depend soc2015/pratiksinghal/cubie-head/secure/usr.bin/ssh-add/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/secure/usr.bin/ssh-add/Makefile.depend soc2015/pratiksinghal/cubie-head/secure/usr.bin/ssh-agent/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/secure/usr.bin/ssh-agent/Makefile.depend soc2015/pratiksinghal/cubie-head/secure/usr.bin/ssh-keygen/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/secure/usr.bin/ssh-keygen/Makefile.depend soc2015/pratiksinghal/cubie-head/secure/usr.bin/ssh-keyscan/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/secure/usr.bin/ssh-keyscan/Makefile.depend soc2015/pratiksinghal/cubie-head/secure/usr.bin/ssh/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/secure/usr.bin/ssh/Makefile.depend soc2015/pratiksinghal/cubie-head/secure/usr.sbin/sshd/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/secure/usr.sbin/sshd/Makefile.depend soc2015/pratiksinghal/cubie-head/share/colldef/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/share/colldef/Makefile.depend soc2015/pratiksinghal/cubie-head/share/dict/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/share/dict/Makefile.depend soc2015/pratiksinghal/cubie-head/share/doc/IPv6/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/share/doc/IPv6/Makefile.depend soc2015/pratiksinghal/cubie-head/share/doc/atf/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/share/doc/atf/Makefile.depend soc2015/pratiksinghal/cubie-head/share/doc/legal/intel_ipw/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/share/doc/legal/intel_ipw/Makefile.depend soc2015/pratiksinghal/cubie-head/share/doc/legal/intel_iwi/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/share/doc/legal/intel_iwi/Makefile.depend soc2015/pratiksinghal/cubie-head/share/doc/legal/intel_iwn/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/share/doc/legal/intel_iwn/Makefile.depend soc2015/pratiksinghal/cubie-head/share/doc/legal/intel_wpi/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/share/doc/legal/intel_wpi/Makefile.depend soc2015/pratiksinghal/cubie-head/share/doc/legal/realtek/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/share/doc/legal/realtek/Makefile.depend soc2015/pratiksinghal/cubie-head/share/doc/llvm/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/share/doc/llvm/Makefile.depend soc2015/pratiksinghal/cubie-head/share/doc/llvm/clang/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/share/doc/llvm/clang/Makefile.depend soc2015/pratiksinghal/cubie-head/share/doc/usd/13.viref/merge.awk - copied unchanged from r287669, mirror/FreeBSD/head/share/doc/usd/13.viref/merge.awk soc2015/pratiksinghal/cubie-head/share/dtrace/toolkit/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/share/dtrace/toolkit/Makefile.depend soc2015/pratiksinghal/cubie-head/share/examples/ipfilter/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/share/examples/ipfilter/Makefile.depend soc2015/pratiksinghal/cubie-head/share/examples/libvgl/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/share/examples/libvgl/Makefile.depend soc2015/pratiksinghal/cubie-head/share/examples/pf/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/share/examples/pf/Makefile.depend soc2015/pratiksinghal/cubie-head/share/i18n/csmapper/APPLE/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/share/i18n/csmapper/APPLE/Makefile.depend soc2015/pratiksinghal/cubie-head/share/i18n/csmapper/AST/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/share/i18n/csmapper/AST/Makefile.depend soc2015/pratiksinghal/cubie-head/share/i18n/csmapper/BIG5/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/share/i18n/csmapper/BIG5/Makefile.depend soc2015/pratiksinghal/cubie-head/share/i18n/csmapper/CNS/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/share/i18n/csmapper/CNS/Makefile.depend soc2015/pratiksinghal/cubie-head/share/i18n/csmapper/CP/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/share/i18n/csmapper/CP/Makefile.depend soc2015/pratiksinghal/cubie-head/share/i18n/csmapper/EBCDIC/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/share/i18n/csmapper/EBCDIC/Makefile.depend soc2015/pratiksinghal/cubie-head/share/i18n/csmapper/GB/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/share/i18n/csmapper/GB/Makefile.depend soc2015/pratiksinghal/cubie-head/share/i18n/csmapper/GEORGIAN/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/share/i18n/csmapper/GEORGIAN/Makefile.depend soc2015/pratiksinghal/cubie-head/share/i18n/csmapper/ISO-8859/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/share/i18n/csmapper/ISO-8859/Makefile.depend soc2015/pratiksinghal/cubie-head/share/i18n/csmapper/ISO646/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/share/i18n/csmapper/ISO646/Makefile.depend soc2015/pratiksinghal/cubie-head/share/i18n/csmapper/JIS/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/share/i18n/csmapper/JIS/Makefile.depend soc2015/pratiksinghal/cubie-head/share/i18n/csmapper/KAZAKH/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/share/i18n/csmapper/KAZAKH/Makefile.depend soc2015/pratiksinghal/cubie-head/share/i18n/csmapper/KOI/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/share/i18n/csmapper/KOI/Makefile.depend soc2015/pratiksinghal/cubie-head/share/i18n/csmapper/KS/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/share/i18n/csmapper/KS/Makefile.depend soc2015/pratiksinghal/cubie-head/share/i18n/csmapper/MISC/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/share/i18n/csmapper/MISC/Makefile.depend soc2015/pratiksinghal/cubie-head/share/i18n/csmapper/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/share/i18n/csmapper/Makefile.depend soc2015/pratiksinghal/cubie-head/share/i18n/csmapper/TCVN/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/share/i18n/csmapper/TCVN/Makefile.depend soc2015/pratiksinghal/cubie-head/share/i18n/esdb/APPLE/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/share/i18n/esdb/APPLE/Makefile.depend soc2015/pratiksinghal/cubie-head/share/i18n/esdb/AST/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/share/i18n/esdb/AST/Makefile.depend soc2015/pratiksinghal/cubie-head/share/i18n/esdb/BIG5/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/share/i18n/esdb/BIG5/Makefile.depend soc2015/pratiksinghal/cubie-head/share/i18n/esdb/CP/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/share/i18n/esdb/CP/Makefile.depend soc2015/pratiksinghal/cubie-head/share/i18n/esdb/DEC/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/share/i18n/esdb/DEC/Makefile.depend soc2015/pratiksinghal/cubie-head/share/i18n/esdb/EBCDIC/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/share/i18n/esdb/EBCDIC/Makefile.depend soc2015/pratiksinghal/cubie-head/share/i18n/esdb/EUC/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/share/i18n/esdb/EUC/Makefile.depend soc2015/pratiksinghal/cubie-head/share/i18n/esdb/GB/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/share/i18n/esdb/GB/Makefile.depend soc2015/pratiksinghal/cubie-head/share/i18n/esdb/GEORGIAN/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/share/i18n/esdb/GEORGIAN/Makefile.depend soc2015/pratiksinghal/cubie-head/share/i18n/esdb/ISO-2022/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/share/i18n/esdb/ISO-2022/Makefile.depend soc2015/pratiksinghal/cubie-head/share/i18n/esdb/ISO-8859/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/share/i18n/esdb/ISO-8859/Makefile.depend soc2015/pratiksinghal/cubie-head/share/i18n/esdb/ISO646/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/share/i18n/esdb/ISO646/Makefile.depend soc2015/pratiksinghal/cubie-head/share/i18n/esdb/KAZAKH/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/share/i18n/esdb/KAZAKH/Makefile.depend soc2015/pratiksinghal/cubie-head/share/i18n/esdb/KOI/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/share/i18n/esdb/KOI/Makefile.depend soc2015/pratiksinghal/cubie-head/share/i18n/esdb/MISC/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/share/i18n/esdb/MISC/Makefile.depend soc2015/pratiksinghal/cubie-head/share/i18n/esdb/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/share/i18n/esdb/Makefile.depend soc2015/pratiksinghal/cubie-head/share/i18n/esdb/TCVN/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/share/i18n/esdb/TCVN/Makefile.depend soc2015/pratiksinghal/cubie-head/share/i18n/esdb/UTF/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/share/i18n/esdb/UTF/Makefile.depend soc2015/pratiksinghal/cubie-head/share/man/man1/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/share/man/man1/Makefile.depend soc2015/pratiksinghal/cubie-head/share/man/man3/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/share/man/man3/Makefile.depend soc2015/pratiksinghal/cubie-head/share/man/man4/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/share/man/man4/Makefile.depend soc2015/pratiksinghal/cubie-head/share/man/man4/man4.arm/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/share/man/man4/man4.arm/Makefile.depend soc2015/pratiksinghal/cubie-head/share/man/man4/man4.i386/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/share/man/man4/man4.i386/Makefile.depend soc2015/pratiksinghal/cubie-head/share/man/man4/man4.powerpc/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/share/man/man4/man4.powerpc/Makefile.depend soc2015/pratiksinghal/cubie-head/share/man/man4/man4.sparc64/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/share/man/man4/man4.sparc64/Makefile.depend soc2015/pratiksinghal/cubie-head/share/man/man5/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/share/man/man5/Makefile.depend soc2015/pratiksinghal/cubie-head/share/man/man6/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/share/man/man6/Makefile.depend soc2015/pratiksinghal/cubie-head/share/man/man7/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/share/man/man7/Makefile.depend soc2015/pratiksinghal/cubie-head/share/man/man8/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/share/man/man8/Makefile.depend soc2015/pratiksinghal/cubie-head/share/man/man9/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/share/man/man9/Makefile.depend soc2015/pratiksinghal/cubie-head/share/me/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/share/me/Makefile.depend soc2015/pratiksinghal/cubie-head/share/misc/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/share/misc/Makefile.depend soc2015/pratiksinghal/cubie-head/share/mk/auto.obj.mk - copied unchanged from r287669, mirror/FreeBSD/head/share/mk/auto.obj.mk soc2015/pratiksinghal/cubie-head/share/mk/dirdeps.mk - copied unchanged from r287669, mirror/FreeBSD/head/share/mk/dirdeps.mk soc2015/pratiksinghal/cubie-head/share/mk/gendirdeps.mk - copied unchanged from r287669, mirror/FreeBSD/head/share/mk/gendirdeps.mk soc2015/pratiksinghal/cubie-head/share/mk/host-target.mk - copied unchanged from r287669, mirror/FreeBSD/head/share/mk/host-target.mk soc2015/pratiksinghal/cubie-head/share/mk/install-new.mk - copied unchanged from r287669, mirror/FreeBSD/head/share/mk/install-new.mk soc2015/pratiksinghal/cubie-head/share/mk/local.autodep.mk - copied unchanged from r287669, mirror/FreeBSD/head/share/mk/local.autodep.mk soc2015/pratiksinghal/cubie-head/share/mk/local.dirdeps.mk - copied unchanged from r287669, mirror/FreeBSD/head/share/mk/local.dirdeps.mk soc2015/pratiksinghal/cubie-head/share/mk/local.init.mk - copied unchanged from r287669, mirror/FreeBSD/head/share/mk/local.init.mk soc2015/pratiksinghal/cubie-head/share/mk/local.meta.sys.mk - copied unchanged from r287669, mirror/FreeBSD/head/share/mk/local.meta.sys.mk soc2015/pratiksinghal/cubie-head/share/mk/local.sys.env.mk - copied unchanged from r287669, mirror/FreeBSD/head/share/mk/local.sys.env.mk soc2015/pratiksinghal/cubie-head/share/mk/local.sys.mk - copied unchanged from r287669, mirror/FreeBSD/head/share/mk/local.sys.mk soc2015/pratiksinghal/cubie-head/share/mk/meta.autodep.mk - copied unchanged from r287669, mirror/FreeBSD/head/share/mk/meta.autodep.mk soc2015/pratiksinghal/cubie-head/share/mk/meta.stage.mk - copied unchanged from r287669, mirror/FreeBSD/head/share/mk/meta.stage.mk soc2015/pratiksinghal/cubie-head/share/mk/meta.subdir.mk - copied unchanged from r287669, mirror/FreeBSD/head/share/mk/meta.subdir.mk soc2015/pratiksinghal/cubie-head/share/mk/meta.sys.mk - copied unchanged from r287669, mirror/FreeBSD/head/share/mk/meta.sys.mk soc2015/pratiksinghal/cubie-head/share/mk/meta2deps.py - copied unchanged from r287669, mirror/FreeBSD/head/share/mk/meta2deps.py soc2015/pratiksinghal/cubie-head/share/mk/meta2deps.sh - copied unchanged from r287669, mirror/FreeBSD/head/share/mk/meta2deps.sh soc2015/pratiksinghal/cubie-head/share/mk/src.sys.env.mk - copied unchanged from r287669, mirror/FreeBSD/head/share/mk/src.sys.env.mk soc2015/pratiksinghal/cubie-head/share/mk/stage-install.sh - copied unchanged from r287669, mirror/FreeBSD/head/share/mk/stage-install.sh soc2015/pratiksinghal/cubie-head/share/mk/sys.dependfile.mk - copied unchanged from r287669, mirror/FreeBSD/head/share/mk/sys.dependfile.mk soc2015/pratiksinghal/cubie-head/share/mklocale/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/share/mklocale/Makefile.depend soc2015/pratiksinghal/cubie-head/share/monetdef/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/share/monetdef/Makefile.depend soc2015/pratiksinghal/cubie-head/share/msgdef/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/share/msgdef/Makefile.depend soc2015/pratiksinghal/cubie-head/share/numericdef/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/share/numericdef/Makefile.depend soc2015/pratiksinghal/cubie-head/share/security/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/share/security/Makefile.depend soc2015/pratiksinghal/cubie-head/share/sendmail/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/share/sendmail/Makefile.depend soc2015/pratiksinghal/cubie-head/share/skel/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/share/skel/Makefile.depend soc2015/pratiksinghal/cubie-head/share/snmp/mibs/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/share/snmp/mibs/Makefile.depend soc2015/pratiksinghal/cubie-head/share/syscons/fonts/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/share/syscons/fonts/Makefile.depend soc2015/pratiksinghal/cubie-head/share/syscons/keymaps/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/share/syscons/keymaps/Makefile.depend soc2015/pratiksinghal/cubie-head/share/syscons/scrnmaps/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/share/syscons/scrnmaps/Makefile.depend soc2015/pratiksinghal/cubie-head/share/tabset/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/share/tabset/Makefile.depend soc2015/pratiksinghal/cubie-head/share/termcap/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/share/termcap/Makefile.depend soc2015/pratiksinghal/cubie-head/share/timedef/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/share/timedef/Makefile.depend soc2015/pratiksinghal/cubie-head/share/zoneinfo/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/share/zoneinfo/Makefile.depend soc2015/pratiksinghal/cubie-head/tools/build/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/tools/build/Makefile.depend soc2015/pratiksinghal/cubie-head/tools/build/options/WITHOUT_MANDOCDB - copied unchanged from r287669, mirror/FreeBSD/head/tools/build/options/WITHOUT_MANDOCDB soc2015/pratiksinghal/cubie-head/tools/build/options/WITH_AUTO_OBJ - copied unchanged from r287669, mirror/FreeBSD/head/tools/build/options/WITH_AUTO_OBJ soc2015/pratiksinghal/cubie-head/tools/build/options/WITH_DIRDEPS_CACHE - copied unchanged from r287669, mirror/FreeBSD/head/tools/build/options/WITH_DIRDEPS_CACHE soc2015/pratiksinghal/cubie-head/tools/build/options/WITH_META_FILES - copied unchanged from r287669, mirror/FreeBSD/head/tools/build/options/WITH_META_FILES soc2015/pratiksinghal/cubie-head/tools/build/options/WITH_META_MODE - copied unchanged from r287669, mirror/FreeBSD/head/tools/build/options/WITH_META_MODE soc2015/pratiksinghal/cubie-head/tools/build/options/WITH_STAGING - copied unchanged from r287669, mirror/FreeBSD/head/tools/build/options/WITH_STAGING soc2015/pratiksinghal/cubie-head/tools/build/options/WITH_STAGING_MAN - copied unchanged from r287669, mirror/FreeBSD/head/tools/build/options/WITH_STAGING_MAN soc2015/pratiksinghal/cubie-head/tools/build/options/WITH_STAGING_PROG - copied unchanged from r287669, mirror/FreeBSD/head/tools/build/options/WITH_STAGING_PROG soc2015/pratiksinghal/cubie-head/tools/build/options/WITH_STALE_STAGED - copied unchanged from r287669, mirror/FreeBSD/head/tools/build/options/WITH_STALE_STAGED soc2015/pratiksinghal/cubie-head/tools/build/options/WITH_SYSROOT - copied unchanged from r287669, mirror/FreeBSD/head/tools/build/options/WITH_SYSROOT soc2015/pratiksinghal/cubie-head/tools/bus_space/C/libbus.h - copied unchanged from r287669, mirror/FreeBSD/head/tools/bus_space/C/libbus.h soc2015/pratiksinghal/cubie-head/tools/bus_space/bus.c - copied unchanged from r287669, mirror/FreeBSD/head/tools/bus_space/bus.c soc2015/pratiksinghal/cubie-head/tools/bus_space/bus.h - copied unchanged from r287669, mirror/FreeBSD/head/tools/bus_space/bus.h soc2015/pratiksinghal/cubie-head/tools/bus_space/busdma.c - copied unchanged from r287669, mirror/FreeBSD/head/tools/bus_space/busdma.c soc2015/pratiksinghal/cubie-head/tools/bus_space/busdma.h - copied unchanged from r287669, mirror/FreeBSD/head/tools/bus_space/busdma.h soc2015/pratiksinghal/cubie-head/tools/regression/include/stdatomic/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/tools/regression/include/stdatomic/Makefile.depend soc2015/pratiksinghal/cubie-head/tools/tools/ath/ath_ee_9300_print/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/tools/tools/ath/ath_ee_9300_print/Makefile.depend soc2015/pratiksinghal/cubie-head/tools/tools/drm/radeon/mkregtable/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/tools/tools/drm/radeon/mkregtable/Makefile.depend soc2015/pratiksinghal/cubie-head/tools/tools/makeroot/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/tools/tools/makeroot/Makefile.depend soc2015/pratiksinghal/cubie-head/tools/tools/usbtest/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/tools/tools/usbtest/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/addr2line/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/addr2line/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/alias/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/alias/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/apply/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/apply/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/ar/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/ar/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/asa/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/asa/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/at/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/at/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/atm/sscop/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/atm/sscop/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/awk/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/awk/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/banner/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/banner/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/basename/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/basename/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/bc/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/bc/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/biff/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/biff/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/bluetooth/bthost/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/bluetooth/bthost/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/bluetooth/btsockstat/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/bluetooth/btsockstat/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/bluetooth/rfcomm_sppd/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/bluetooth/rfcomm_sppd/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/bmake/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/bmake/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/brandelf/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/brandelf/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/bsdiff/bsdiff/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/bsdiff/bsdiff/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/bsdiff/bspatch/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/bsdiff/bspatch/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/bzip2/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/bzip2/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/bzip2recover/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/bzip2recover/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/c89/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/c89/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/c99/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/c99/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/calendar/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/calendar/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/cap_mkdb/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/cap_mkdb/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/catman/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/catman/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/chat/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/chat/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/checknr/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/checknr/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/chkey/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/chkey/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/chpass/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/chpass/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/cksum/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/cksum/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/clang/clang-tblgen/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/clang/clang-tblgen/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/clang/clang/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/clang/clang/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/clang/lldb/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/clang/lldb/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/clang/tblgen/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/clang/tblgen/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/cmp/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/cmp/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/col/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/col/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/colcrt/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/colcrt/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/colldef/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/colldef/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/colrm/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/colrm/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/column/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/column/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/comm/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/comm/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/compile_et/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/compile_et/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/compress/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/compress/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/cpio/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/cpio/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/cpuset/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/cpuset/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/csplit/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/csplit/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/ctags/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/ctags/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/ctlstat/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/ctlstat/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/cut/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/cut/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/dc/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/dc/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/dirname/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/dirname/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/du/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/du/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/ee/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/ee/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/elf2aout/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/elf2aout/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/elfcopy/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/elfcopy/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/elfdump/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/elfdump/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/enigma/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/enigma/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/env/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/env/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/expand/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/expand/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/false/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/false/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/fetch/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/fetch/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/file/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/file/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/file2c/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/file2c/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/find/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/find/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/finger/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/finger/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/fmt/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/fmt/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/fold/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/fold/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/from/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/from/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/fstat/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/fstat/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/fsync/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/fsync/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/ftp/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/ftp/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/gcore/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/gcore/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/gencat/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/gencat/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/getconf/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/getconf/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/getent/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/getent/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/getopt/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/getopt/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/gprof/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/gprof/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/grep/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/grep/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/gzip/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/gzip/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/head/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/head/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/hexdump/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/hexdump/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/host/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/host/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/id/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/id/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/indent/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/indent/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/ipcrm/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/ipcrm/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/ipcs/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/ipcs/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/join/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/join/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/jot/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/jot/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/kdump/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/kdump/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/keylogin/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/keylogin/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/keylogout/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/keylogout/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/killall/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/killall/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/ktrace/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/ktrace/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/ktrdump/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/ktrdump/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/lam/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/lam/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/last/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/last/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/lastcomm/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/lastcomm/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/ldd/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/ldd/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/leave/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/leave/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/less/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/less/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/lessecho/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/lessecho/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/lesskey/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/lesskey/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/lex/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/lex/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/lex/lib/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/lex/lib/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/limits/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/limits/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/locale/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/locale/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/locate/bigram/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/locate/bigram/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/locate/code/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/locate/code/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/locate/locate/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/locate/locate/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/lock/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/lock/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/lockf/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/lockf/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/logger/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/logger/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/login/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/login/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/logins/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/logins/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/logname/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/logname/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/look/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/look/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/lorder/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/lorder/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/lsvfs/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/lsvfs/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/lzmainfo/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/lzmainfo/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/m4/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/m4/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/mail/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/mail/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/makewhatis/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/makewhatis/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/man/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/man/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/mandoc/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/mandoc/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/mesg/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/mesg/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/minigzip/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/minigzip/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/ministat/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/ministat/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/mkcsmapper_static/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/mkcsmapper_static/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/mkdep/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/mkdep/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/mkfifo/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/mkfifo/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/mklocale/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/mklocale/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/mkstr/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/mkstr/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/mktemp/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/mktemp/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/mkulzma/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/mkulzma/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/mkuzip/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/mkuzip/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/msgs/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/msgs/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/mt/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/mt/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/nc/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/nc/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/ncal/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/ncal/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/netstat/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/netstat/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/newgrp/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/newgrp/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/newkey/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/newkey/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/nfsstat/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/nfsstat/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/nice/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/nice/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/nl/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/nl/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/nm/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/nm/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/nohup/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/nohup/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/opieinfo/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/opieinfo/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/opiekey/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/opiekey/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/opiepasswd/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/opiepasswd/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/pagesize/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/pagesize/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/pamtest/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/pamtest/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/passwd/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/passwd/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/paste/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/paste/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/pathchk/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/pathchk/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/perror/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/perror/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/pr/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/pr/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/printenv/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/printenv/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/printf/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/printf/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/procstat/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/procstat/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/quota/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/quota/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/rctl/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/rctl/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/readelf/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/readelf/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/renice/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/renice/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/rev/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/rev/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/revoke/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/revoke/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/rlogin/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/rlogin/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/rpcgen/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/rpcgen/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/rpcinfo/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/rpcinfo/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/rs/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/rs/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/rsh/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/rsh/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/rup/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/rup/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/ruptime/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/ruptime/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/rusers/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/rusers/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/rwall/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/rwall/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/rwho/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/rwho/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/script/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/script/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/sed/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/sed/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/seq/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/seq/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/setchannel/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/setchannel/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/shar/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/shar/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/showmount/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/showmount/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/size/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/size/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/smbutil/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/smbutil/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/sockstat/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/sockstat/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/sort/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/sort/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/split/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/split/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/ssh-copy-id/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/ssh-copy-id/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/stat/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/stat/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/stdbuf/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/stdbuf/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/strings/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/strings/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/su/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/su/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/svn/lib/libapr/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/svn/lib/libapr/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/svn/lib/libapr_util/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/svn/lib/libapr_util/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/svn/lib/libserf/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/svn/lib/libserf/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/svn/lib/libsvn_client/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/svn/lib/libsvn_client/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/svn/lib/libsvn_delta/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/svn/lib/libsvn_delta/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/svn/lib/libsvn_diff/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/svn/lib/libsvn_diff/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/svn/lib/libsvn_fs/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/svn/lib/libsvn_fs/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/svn/lib/libsvn_fs_fs/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/svn/lib/libsvn_fs_fs/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/svn/lib/libsvn_fs_util/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/svn/lib/libsvn_fs_util/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/svn/lib/libsvn_ra/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/svn/lib/libsvn_ra/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/svn/lib/libsvn_ra_local/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/svn/lib/libsvn_ra_local/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/svn/lib/libsvn_ra_serf/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/svn/lib/libsvn_ra_serf/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/svn/lib/libsvn_ra_svn/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/svn/lib/libsvn_ra_svn/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/svn/lib/libsvn_repos/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/svn/lib/libsvn_repos/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/svn/lib/libsvn_subr/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/svn/lib/libsvn_subr/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/svn/lib/libsvn_wc/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/svn/lib/libsvn_wc/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/svn/svn/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/svn/svn/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/svn/svnadmin/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/svn/svnadmin/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/svn/svndumpfilter/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/svn/svndumpfilter/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/svn/svnlook/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/svn/svnlook/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/svn/svnmucc/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/svn/svnmucc/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/svn/svnrdump/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/svn/svnrdump/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/svn/svnserve/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/svn/svnserve/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/svn/svnsync/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/svn/svnsync/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/svn/svnversion/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/svn/svnversion/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/systat/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/systat/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/tabs/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/tabs/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/tail/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/tail/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/talk/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/talk/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/tar/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/tar/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/tcopy/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/tcopy/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/tee/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/tee/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/telnet/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/telnet/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/tftp/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/tftp/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/time/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/time/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/timeout/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/timeout/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/tip/tip/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/tip/tip/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/top/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/top/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/touch/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/touch/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/tput/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/tput/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/tr/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/tr/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/true/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/true/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/truncate/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/truncate/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/truss/Makefile.depend.amd64 - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/truss/Makefile.depend.amd64 soc2015/pratiksinghal/cubie-head/usr.bin/tset/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/tset/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/tsort/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/tsort/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/tty/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/tty/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/ul/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/ul/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/uname/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/uname/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/unexpand/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/unexpand/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/unifdef/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/unifdef/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/uniq/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/uniq/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/units/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/units/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/unvis/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/unvis/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/unzip/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/unzip/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/usbhidaction/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/usbhidaction/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/usbhidctl/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/usbhidctl/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/users/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/users/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/uudecode/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/uudecode/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/uuencode/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/uuencode/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/vacation/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/vacation/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/vgrind/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/vgrind/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/vgrind/RETEST/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/vgrind/RETEST/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/vi/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/vi/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/vis/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/vis/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/vmstat/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/vmstat/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/vtfontcvt/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/vtfontcvt/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/w/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/w/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/wall/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/wall/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/wc/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/wc/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/what/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/what/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/whereis/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/whereis/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/which/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/which/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/who/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/who/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/whois/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/whois/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/write/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/write/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/xargs/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/xargs/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/xinstall/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/xinstall/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/xinstall/Makefile.depend.host - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/xinstall/Makefile.depend.host soc2015/pratiksinghal/cubie-head/usr.bin/xlint/lint1/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/xlint/lint1/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/xlint/lint2/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/xlint/lint2/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/xlint/llib/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/xlint/llib/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/xlint/xlint/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/xlint/xlint/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/xstr/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/xstr/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/xz/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/xz/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/xzdec/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/xzdec/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/yacc/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/yacc/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/yes/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/yes/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/ypcat/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/ypcat/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/ypmatch/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/ypmatch/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.bin/ypwhich/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.bin/ypwhich/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/ac/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/ac/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/adduser/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/adduser/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/amd/amq/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.sbin/amd/amq/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/amd/fsinfo/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/amd/fsinfo/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/amd/hlfsd/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/amd/hlfsd/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/amd/include/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/amd/include/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/amd/libamu/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/amd/libamu/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/amd/mk-amd-map/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/amd/mk-amd-map/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/amd/pawd/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/amd/pawd/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/amd/scripts/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/amd/scripts/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/amd/wire-test/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.sbin/amd/wire-test/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/arp/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/arp/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/asf/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/asf/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/audit/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/audit/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/auditd/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/auditd/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/auditreduce/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/auditreduce/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/authpf/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/authpf/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/bluetooth/ath3kfw/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/bluetooth/ath3kfw/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/bluetooth/bcmfw/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/bluetooth/bcmfw/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/bluetooth/bt3cfw/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/bluetooth/bt3cfw/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/bluetooth/bthidcontrol/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/bluetooth/bthidcontrol/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/bluetooth/bthidd/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/bluetooth/bthidd/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/bluetooth/btpand/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/bluetooth/btpand/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/bluetooth/hccontrol/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/bluetooth/hccontrol/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/bluetooth/hcsecd/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/bluetooth/hcsecd/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/bluetooth/hcseriald/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/bluetooth/hcseriald/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/bluetooth/l2control/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/bluetooth/l2control/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/bluetooth/l2ping/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/bluetooth/l2ping/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/bluetooth/rfcomm_pppd/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/bluetooth/rfcomm_pppd/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/bluetooth/sdpcontrol/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/bluetooth/sdpcontrol/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/bluetooth/sdpd/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/bluetooth/sdpd/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/boot0cfg/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/boot0cfg/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/boot98cfg/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/boot98cfg/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/bootparamd/bootparamd/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/bootparamd/bootparamd/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/bootparamd/callbootd/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/bootparamd/callbootd/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/bsdinstall/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/bsdinstall/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/bsdinstall/distextract/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/bsdinstall/distextract/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/bsdinstall/distfetch/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/bsdinstall/distfetch/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/bsdinstall/partedit/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/bsdinstall/partedit/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/bsdinstall/scripts/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/bsdinstall/scripts/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/bsnmpd/bsnmpd/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/bsnmpd/bsnmpd/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/bsnmpd/gensnmptree/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/bsnmpd/gensnmptree/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/bsnmpd/modules/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/bsnmpd/modules/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/bsnmpd/modules/snmp_atm/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/bsnmpd/modules/snmp_atm/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/bsnmpd/modules/snmp_bridge/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/bsnmpd/modules/snmp_bridge/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/bsnmpd/modules/snmp_hast/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/bsnmpd/modules/snmp_hast/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/bsnmpd/modules/snmp_hostres/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/bsnmpd/modules/snmp_hostres/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/bsnmpd/modules/snmp_lm75/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/bsnmpd/modules/snmp_lm75/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/bsnmpd/modules/snmp_mibII/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/bsnmpd/modules/snmp_mibII/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/bsnmpd/modules/snmp_netgraph/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/bsnmpd/modules/snmp_netgraph/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/bsnmpd/modules/snmp_pf/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/bsnmpd/modules/snmp_pf/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/bsnmpd/modules/snmp_target/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/bsnmpd/modules/snmp_target/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/bsnmpd/modules/snmp_usm/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/bsnmpd/modules/snmp_usm/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/bsnmpd/modules/snmp_vacm/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/bsnmpd/modules/snmp_vacm/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/bsnmpd/modules/snmp_wlan/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/bsnmpd/modules/snmp_wlan/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/bsnmpd/tools/bsnmptools/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/bsnmpd/tools/bsnmptools/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/bsnmpd/tools/libbsnmptools/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/bsnmpd/tools/libbsnmptools/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/btxld/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.sbin/btxld/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/chroot/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/chroot/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/ckdist/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/ckdist/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/clear_locks/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/clear_locks/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/config/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/config/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/cpucontrol/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/cpucontrol/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/cron/cron/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/cron/cron/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/cron/crontab/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/cron/crontab/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/cron/lib/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/cron/lib/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/crunch/crunchgen/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/crunch/crunchgen/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/crunch/crunchide/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/crunch/crunchide/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/dconschat/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/dconschat/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/devinfo/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/devinfo/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/digictl/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/digictl/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/diskinfo/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/diskinfo/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/dumpcis/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/dumpcis/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/etcupdate/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/etcupdate/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/extattr/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/extattr/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/extattrctl/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/extattrctl/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/fdcontrol/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/fdcontrol/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/fdformat/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/fdformat/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/fdread/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/fdread/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/fifolog/fifolog_create/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/fifolog/fifolog_create/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/fifolog/fifolog_writer/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/fifolog/fifolog_writer/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/fifolog/lib/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/fifolog/lib/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/flowctl/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/flowctl/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/freebsd-update/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/freebsd-update/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/fstyp/geli.c - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/fstyp/geli.c soc2015/pratiksinghal/cubie-head/usr.sbin/fstyp/zfs.c - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/fstyp/zfs.c soc2015/pratiksinghal/cubie-head/usr.sbin/fwcontrol/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/fwcontrol/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/getpmac/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/getpmac/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/gpioctl/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/gpioctl/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/gssd/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/gssd/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/ifmcstat/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/ifmcstat/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/inetd/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/inetd/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/iostat/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/iostat/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/ip6addrctl/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/ip6addrctl/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/jexec/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/jexec/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/kbdmap/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/kbdmap/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/kgmon/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/kgmon/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/kgzip/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/kgzip/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/lastlogin/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/lastlogin/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/lptcontrol/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/lptcontrol/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/mailwrapper/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/mailwrapper/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/memcontrol/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/memcontrol/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/mergemaster/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/mergemaster/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/mixer/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/mixer/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/mlxcontrol/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/mlxcontrol/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/mptable/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.sbin/mptable/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/mtest/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/mtest/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/ndiscvt/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/ndiscvt/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/ndp/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/ndp/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/newsyslog/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/newsyslog/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/nfsdumpstate/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/nfsdumpstate/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/nfsrevoke/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/nfsrevoke/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/nghook/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/nghook/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/nologin/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/nologin/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/nscd/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/nscd/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/pc-sysinstall/backend-partmanager/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/pc-sysinstall/backend-partmanager/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/pc-sysinstall/backend-query/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/pc-sysinstall/backend-query/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/pc-sysinstall/backend/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/pc-sysinstall/backend/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/pc-sysinstall/conf/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/pc-sysinstall/conf/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/pc-sysinstall/doc/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/pc-sysinstall/doc/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/pc-sysinstall/examples/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/pc-sysinstall/examples/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/pc-sysinstall/pc-sysinstall/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/pc-sysinstall/pc-sysinstall/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/periodic/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/periodic/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/pkg/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/pkg/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/pmcannotate/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/pmcannotate/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/pmccontrol/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/pmccontrol/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/pnpinfo/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/pnpinfo/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/portsnap/make_index/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/portsnap/make_index/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/portsnap/phttpget/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/portsnap/phttpget/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/portsnap/portsnap/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/portsnap/portsnap/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/powerd/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/powerd/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/pppctl/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/pppctl/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/praliases/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/praliases/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/praudit/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/praudit/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/procctl/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/procctl/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/pstat/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/pstat/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/pwd_mkdb/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/pwd_mkdb/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/quot/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/quot/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/quotaon/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.sbin/quotaon/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/rarpd/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/rarpd/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/repquota/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/repquota/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/rip6query/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/rip6query/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/route6d/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/route6d/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/rpc.statd/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/rpc.statd/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/rpc.yppasswdd/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/rpc.yppasswdd/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/rpc.ypupdated/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/rpc.ypupdated/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/rpcbind/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/rpcbind/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/rrenumd/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/rrenumd/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/rtadvd/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/rtadvd/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/rtsold/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/rtsold/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/rwhod/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/rwhod/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/sa/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/sa/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/sendmail/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/sendmail/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/service/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/service/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/services_mkdb/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/services_mkdb/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/setfib/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/setfib/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/setpmac/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/setpmac/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/sicontrol/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/sicontrol/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/smbmsg/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/smbmsg/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/snapinfo/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/snapinfo/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/spkrtest/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/spkrtest/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/spray/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/spray/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/syslogd/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/syslogd/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/tcpdchk/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.sbin/tcpdchk/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/tcpdmatch/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/tcpdmatch/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/tcpdrop/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/tcpdrop/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/tcpdump/tcpdump/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/tcpdump/tcpdump/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/timed/timed/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/timed/timed/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/timed/timedc/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/timed/timedc/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/traceroute/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/traceroute/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/tzsetup/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/tzsetup/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/ugidfw/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/ugidfw/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/uhsoctl/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/uhsoctl/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/usbconfig/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.sbin/usbconfig/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/usbdump/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.sbin/usbdump/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/utx/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/utx/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/vidcontrol/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.sbin/vidcontrol/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/vipw/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/vipw/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/watch/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/watch/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/wlconfig/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/wlconfig/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/wpa/hostapd/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/wpa/hostapd/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/wpa/hostapd_cli/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/wpa/hostapd_cli/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/wpa/ndis_events/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/wpa/ndis_events/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/wpa/wpa_cli/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/wpa/wpa_cli/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/wpa/wpa_passphrase/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/wpa/wpa_passphrase/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/wpa/wpa_supplicant/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/wpa/wpa_supplicant/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/yp_mkdb/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/yp_mkdb/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/ypbind/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/ypbind/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/yppush/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/yppush/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/ypserv/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/ypserv/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/ypset/Makefile.depend - copied unchanged from r287669, mirror/FreeBSD/head/usr.sbin/ypset/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/zic/zdump/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/zic/zdump/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/zic/zic/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/zic/zic/Makefile.depend soc2015/pratiksinghal/cubie-head/usr.sbin/zzz/Makefile.depend - copied unchanged from r287668, mirror/FreeBSD/head/usr.sbin/zzz/Makefile.depend Deleted: soc2015/pratiksinghal/cubie-head/contrib/top/top.X soc2015/pratiksinghal/cubie-head/contrib/top/top.local.H soc2015/pratiksinghal/cubie-head/release/tools/gce-package.sh soc2015/pratiksinghal/cubie-head/share/man/man9/PCI_ADD_VF.9 soc2015/pratiksinghal/cubie-head/share/man/man9/PCI_INIT_IOV.9 soc2015/pratiksinghal/cubie-head/share/man/man9/PCI_UNINIT_IOV.9 soc2015/pratiksinghal/cubie-head/sys/arm/allwinner/a10_dma.c soc2015/pratiksinghal/cubie-head/sys/arm/allwinner/a10_dma.h soc2015/pratiksinghal/cubie-head/tools/bus_space/C/libbus_space.h soc2015/pratiksinghal/cubie-head/tools/bus_space/bus_space.c soc2015/pratiksinghal/cubie-head/tools/bus_space/bus_space.h soc2015/pratiksinghal/cubie-head/usr.bin/make/ Modified: soc2015/pratiksinghal/cubie-head/contrib/bmake/ (props changed) soc2015/pratiksinghal/cubie-head/contrib/bmake/ChangeLog soc2015/pratiksinghal/cubie-head/contrib/bmake/Makefile soc2015/pratiksinghal/cubie-head/contrib/bmake/bmake.1 soc2015/pratiksinghal/cubie-head/contrib/bmake/bmake.cat1 soc2015/pratiksinghal/cubie-head/contrib/bmake/make.1 soc2015/pratiksinghal/cubie-head/contrib/bmake/mk/ChangeLog soc2015/pratiksinghal/cubie-head/contrib/bmake/mk/dirdeps.mk soc2015/pratiksinghal/cubie-head/contrib/bmake/mk/gendirdeps.mk soc2015/pratiksinghal/cubie-head/contrib/bmake/mk/install-mk soc2015/pratiksinghal/cubie-head/contrib/bmake/mk/meta.stage.mk soc2015/pratiksinghal/cubie-head/contrib/bmake/mk/meta.sys.mk soc2015/pratiksinghal/cubie-head/contrib/bmake/mk/mkopt.sh soc2015/pratiksinghal/cubie-head/contrib/bmake/targ.c soc2015/pratiksinghal/cubie-head/contrib/diff/src/context.c soc2015/pratiksinghal/cubie-head/contrib/dtc/checks.c soc2015/pratiksinghal/cubie-head/contrib/elftoolchain/ (props changed) soc2015/pratiksinghal/cubie-head/contrib/elftoolchain/common/_elftc.h soc2015/pratiksinghal/cubie-head/contrib/elftoolchain/common/elfdefinitions.h soc2015/pratiksinghal/cubie-head/contrib/elftoolchain/elfcopy/elfcopy.h soc2015/pratiksinghal/cubie-head/contrib/elftoolchain/elfcopy/main.c soc2015/pratiksinghal/cubie-head/contrib/elftoolchain/elfcopy/sections.c soc2015/pratiksinghal/cubie-head/contrib/elftoolchain/elfcopy/symbols.c soc2015/pratiksinghal/cubie-head/contrib/elftoolchain/libdwarf/dwarf_sections.c soc2015/pratiksinghal/cubie-head/contrib/elftoolchain/libdwarf/libdwarf_reloc.c soc2015/pratiksinghal/cubie-head/contrib/elftoolchain/libelftc/libelftc_dem_gnu3.c soc2015/pratiksinghal/cubie-head/contrib/elftoolchain/libelftc/os.Linux.mk soc2015/pratiksinghal/cubie-head/contrib/elftoolchain/readelf/readelf.1 soc2015/pratiksinghal/cubie-head/contrib/elftoolchain/readelf/readelf.c soc2015/pratiksinghal/cubie-head/contrib/file/ (props changed) soc2015/pratiksinghal/cubie-head/contrib/file/ChangeLog soc2015/pratiksinghal/cubie-head/contrib/file/Makefile.in soc2015/pratiksinghal/cubie-head/contrib/file/TODO soc2015/pratiksinghal/cubie-head/contrib/file/aclocal.m4 soc2015/pratiksinghal/cubie-head/contrib/file/compile soc2015/pratiksinghal/cubie-head/contrib/file/config.h.in soc2015/pratiksinghal/cubie-head/contrib/file/configure soc2015/pratiksinghal/cubie-head/contrib/file/configure.ac soc2015/pratiksinghal/cubie-head/contrib/file/depcomp soc2015/pratiksinghal/cubie-head/contrib/file/doc/Makefile.in soc2015/pratiksinghal/cubie-head/contrib/file/doc/file.man soc2015/pratiksinghal/cubie-head/contrib/file/doc/libmagic.man soc2015/pratiksinghal/cubie-head/contrib/file/ltmain.sh soc2015/pratiksinghal/cubie-head/contrib/file/magic/Magdir/android soc2015/pratiksinghal/cubie-head/contrib/file/magic/Magdir/apple soc2015/pratiksinghal/cubie-head/contrib/file/magic/Magdir/archive soc2015/pratiksinghal/cubie-head/contrib/file/magic/Magdir/audio soc2015/pratiksinghal/cubie-head/contrib/file/magic/Magdir/cafebabe soc2015/pratiksinghal/cubie-head/contrib/file/magic/Magdir/commands soc2015/pratiksinghal/cubie-head/contrib/file/magic/Magdir/compress soc2015/pratiksinghal/cubie-head/contrib/file/magic/Magdir/console soc2015/pratiksinghal/cubie-head/contrib/file/magic/Magdir/dyadic soc2015/pratiksinghal/cubie-head/contrib/file/magic/Magdir/filesystems soc2015/pratiksinghal/cubie-head/contrib/file/magic/Magdir/gnu soc2015/pratiksinghal/cubie-head/contrib/file/magic/Magdir/images soc2015/pratiksinghal/cubie-head/contrib/file/magic/Magdir/jpeg soc2015/pratiksinghal/cubie-head/contrib/file/magic/Magdir/linux soc2015/pratiksinghal/cubie-head/contrib/file/magic/Magdir/mach soc2015/pratiksinghal/cubie-head/contrib/file/magic/Magdir/mathematica soc2015/pratiksinghal/cubie-head/contrib/file/magic/Magdir/misctools soc2015/pratiksinghal/cubie-head/contrib/file/magic/Magdir/modem soc2015/pratiksinghal/cubie-head/contrib/file/magic/Magdir/mozilla soc2015/pratiksinghal/cubie-head/contrib/file/magic/Magdir/os2 soc2015/pratiksinghal/cubie-head/contrib/file/magic/Magdir/pdf soc2015/pratiksinghal/cubie-head/contrib/file/magic/Magdir/perl soc2015/pratiksinghal/cubie-head/contrib/file/magic/Magdir/riff soc2015/pratiksinghal/cubie-head/contrib/file/magic/Magdir/sereal soc2015/pratiksinghal/cubie-head/contrib/file/magic/Magdir/sgml soc2015/pratiksinghal/cubie-head/contrib/file/magic/Magdir/varied.script soc2015/pratiksinghal/cubie-head/contrib/file/magic/Magdir/vorbis soc2015/pratiksinghal/cubie-head/contrib/file/magic/Makefile.am soc2015/pratiksinghal/cubie-head/contrib/file/magic/Makefile.in soc2015/pratiksinghal/cubie-head/contrib/file/missing soc2015/pratiksinghal/cubie-head/contrib/file/python/Makefile.in soc2015/pratiksinghal/cubie-head/contrib/file/src/Makefile.in soc2015/pratiksinghal/cubie-head/contrib/file/src/apprentice.c soc2015/pratiksinghal/cubie-head/contrib/file/src/ascmagic.c soc2015/pratiksinghal/cubie-head/contrib/file/src/cdf.c soc2015/pratiksinghal/cubie-head/contrib/file/src/cdf.h soc2015/pratiksinghal/cubie-head/contrib/file/src/compress.c soc2015/pratiksinghal/cubie-head/contrib/file/src/encoding.c soc2015/pratiksinghal/cubie-head/contrib/file/src/file.c soc2015/pratiksinghal/cubie-head/contrib/file/src/file.h soc2015/pratiksinghal/cubie-head/contrib/file/src/file_opts.h soc2015/pratiksinghal/cubie-head/contrib/file/src/fsmagic.c soc2015/pratiksinghal/cubie-head/contrib/file/src/funcs.c soc2015/pratiksinghal/cubie-head/contrib/file/src/is_tar.c soc2015/pratiksinghal/cubie-head/contrib/file/src/magic.c soc2015/pratiksinghal/cubie-head/contrib/file/src/magic.h soc2015/pratiksinghal/cubie-head/contrib/file/src/magic.h.in soc2015/pratiksinghal/cubie-head/contrib/file/src/print.c soc2015/pratiksinghal/cubie-head/contrib/file/src/readcdf.c soc2015/pratiksinghal/cubie-head/contrib/file/src/readelf.c soc2015/pratiksinghal/cubie-head/contrib/file/src/softmagic.c soc2015/pratiksinghal/cubie-head/contrib/file/tests/Makefile.in soc2015/pratiksinghal/cubie-head/contrib/gcc/config/arm/lib1funcs.asm soc2015/pratiksinghal/cubie-head/contrib/gcc/longlong.h soc2015/pratiksinghal/cubie-head/contrib/libcxxrt/ (props changed) soc2015/pratiksinghal/cubie-head/contrib/libcxxrt/FREEBSD-upgrade soc2015/pratiksinghal/cubie-head/contrib/libcxxrt/libelftc_dem_gnu3.c soc2015/pratiksinghal/cubie-head/contrib/libxo/libxo/libxo.c soc2015/pratiksinghal/cubie-head/contrib/mdocml/read.c soc2015/pratiksinghal/cubie-head/contrib/netbsd-tests/lib/libc/c063/t_faccessat.c soc2015/pratiksinghal/cubie-head/contrib/netbsd-tests/lib/libc/c063/t_openat.c soc2015/pratiksinghal/cubie-head/contrib/netbsd-tests/lib/libc/c063/t_readlinkat.c soc2015/pratiksinghal/cubie-head/contrib/netbsd-tests/lib/libc/c063/t_unlinkat.c soc2015/pratiksinghal/cubie-head/contrib/sendmail/src/sendmail.h soc2015/pratiksinghal/cubie-head/contrib/sendmail/src/tls.c soc2015/pratiksinghal/cubie-head/contrib/traceroute/traceroute.8 soc2015/pratiksinghal/cubie-head/contrib/traceroute/traceroute.c soc2015/pratiksinghal/cubie-head/contrib/tzdata/ (props changed) soc2015/pratiksinghal/cubie-head/contrib/tzdata/africa soc2015/pratiksinghal/cubie-head/contrib/tzdata/northamerica soc2015/pratiksinghal/cubie-head/contrib/tzdata/southamerica soc2015/pratiksinghal/cubie-head/contrib/tzdata/zone1970.tab soc2015/pratiksinghal/cubie-head/games/grdc/grdc.c soc2015/pratiksinghal/cubie-head/gnu/lib/csu/Makefile soc2015/pratiksinghal/cubie-head/gnu/lib/libgcc/Makefile soc2015/pratiksinghal/cubie-head/gnu/lib/libreadline/readline/Makefile soc2015/pratiksinghal/cubie-head/gnu/usr.bin/binutils/ld/Makefile soc2015/pratiksinghal/cubie-head/gnu/usr.bin/binutils/libbfd/Makefile soc2015/pratiksinghal/cubie-head/gnu/usr.bin/cc/cc_tools/Makefile soc2015/pratiksinghal/cubie-head/gnu/usr.bin/groff/Makefile.inc soc2015/pratiksinghal/cubie-head/gnu/usr.bin/groff/font/devX100-12/Makefile soc2015/pratiksinghal/cubie-head/gnu/usr.bin/groff/font/devX100/Makefile soc2015/pratiksinghal/cubie-head/gnu/usr.bin/groff/font/devX75-12/Makefile soc2015/pratiksinghal/cubie-head/gnu/usr.bin/groff/font/devX75/Makefile soc2015/pratiksinghal/cubie-head/kerberos5/Makefile.inc soc2015/pratiksinghal/cubie-head/kerberos5/lib/libasn1/Makefile soc2015/pratiksinghal/cubie-head/kerberos5/lib/libhdb/Makefile soc2015/pratiksinghal/cubie-head/kerberos5/lib/libheimipcc/Makefile soc2015/pratiksinghal/cubie-head/kerberos5/lib/libhx509/Makefile soc2015/pratiksinghal/cubie-head/release/Makefile.ec2 soc2015/pratiksinghal/cubie-head/release/Makefile.mirrors soc2015/pratiksinghal/cubie-head/release/Makefile.vm soc2015/pratiksinghal/cubie-head/release/arm/BEAGLEBONE.conf soc2015/pratiksinghal/cubie-head/release/arm/PANDABOARD.conf soc2015/pratiksinghal/cubie-head/release/arm/RPI2.conf soc2015/pratiksinghal/cubie-head/release/arm/WANDBOARD.conf soc2015/pratiksinghal/cubie-head/release/doc/en_US.ISO8859-1/relnotes/article.xml soc2015/pratiksinghal/cubie-head/release/doc/share/xml/sponsor.ent soc2015/pratiksinghal/cubie-head/release/tools/arm.subr soc2015/pratiksinghal/cubie-head/release/tools/azure.conf soc2015/pratiksinghal/cubie-head/release/tools/ec2.conf soc2015/pratiksinghal/cubie-head/secure/lib/libcrypt/crypt-blowfish.c soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/Makefile.inc soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/ASN1_STRING_length.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/ASN1_STRING_new.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/ASN1_generate_nconf.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/BIO_ctrl.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/BIO_f_base64.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/BIO_f_buffer.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/BIO_f_cipher.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/BIO_f_md.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/BIO_f_null.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/BIO_f_ssl.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/BIO_find_type.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/BIO_new.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/BIO_new_CMS.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/BIO_push.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/BIO_read.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/BIO_s_accept.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/BIO_s_bio.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/BIO_s_connect.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/BIO_s_fd.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/BIO_s_file.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/BIO_s_mem.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/BIO_s_null.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/BIO_s_socket.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/BIO_set_callback.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/BIO_should_retry.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/BN_BLINDING_new.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/BN_CTX_new.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/BN_CTX_start.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/BN_add.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/BN_add_word.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/BN_bn2bin.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/BN_cmp.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/BN_copy.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/BN_generate_prime.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/BN_mod_inverse.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/BN_new.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/BN_num_bytes.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/BN_rand.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/BN_set_bit.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/BN_swap.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/BN_zero.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/CMS_add0_cert.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/CMS_add1_recipient_cert.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/CMS_add1_signer.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/CMS_compress.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/CMS_decrypt.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/CMS_encrypt.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/CMS_final.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/CMS_get0_RecipientInfos.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/CMS_get0_SignerInfos.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/CMS_get0_type.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/CMS_get1_ReceiptRequest.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/CMS_sign.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/CMS_sign_receipt.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/CMS_uncompress.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/CMS_verify.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/CMS_verify_receipt.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/CONF_modules_free.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/CONF_modules_load_file.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/DH_generate_key.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/DH_generate_parameters.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/DH_get_ex_new_index.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/DH_new.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/DH_set_method.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/DH_size.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/DSA_SIG_new.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/DSA_do_sign.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/DSA_dup_DH.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/DSA_generate_key.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/DSA_generate_parameters.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/DSA_new.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/DSA_set_method.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/DSA_sign.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/DSA_size.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/ERR_GET_LIB.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/ERR_clear_error.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/ERR_error_string.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/ERR_get_error.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/ERR_load_crypto_strings.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/ERR_load_strings.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/ERR_print_errors.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/ERR_put_error.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/ERR_remove_state.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/ERR_set_mark.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/EVP_BytesToKey.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/EVP_DigestInit.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/EVP_DigestSignInit.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/EVP_DigestVerifyInit.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/EVP_EncryptInit.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/EVP_OpenInit.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/EVP_PKEY_CTX_ctrl.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/EVP_PKEY_CTX_new.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/EVP_PKEY_cmp.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/EVP_PKEY_decrypt.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/EVP_PKEY_derive.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/EVP_PKEY_encrypt.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/EVP_PKEY_get_default_digest.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/EVP_PKEY_keygen.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/EVP_PKEY_new.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/EVP_PKEY_print_private.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/EVP_PKEY_set1_RSA.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/EVP_PKEY_sign.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/EVP_PKEY_verify.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/EVP_PKEY_verify_recover.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/EVP_SealInit.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/EVP_SignInit.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/EVP_VerifyInit.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/OBJ_nid2obj.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/OPENSSL_Applink.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/OPENSSL_VERSION_NUMBER.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/OPENSSL_config.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/OPENSSL_ia32cap.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/OPENSSL_load_builtin_modules.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/OpenSSL_add_all_algorithms.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/PEM_write_bio_CMS_stream.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/PEM_write_bio_PKCS7_stream.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/PKCS12_create.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/PKCS12_parse.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/PKCS7_decrypt.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/PKCS7_encrypt.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/PKCS7_sign.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/PKCS7_sign_add_signer.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/PKCS7_verify.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/RAND_add.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/RAND_bytes.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/RAND_cleanup.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/RAND_egd.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/RAND_load_file.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/RAND_set_rand_method.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/RSA_blinding_on.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/RSA_check_key.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/RSA_generate_key.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/RSA_get_ex_new_index.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/RSA_new.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/RSA_padding_add_PKCS1_type_1.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/RSA_print.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/RSA_private_encrypt.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/RSA_public_encrypt.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/RSA_set_method.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/RSA_sign.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/RSA_sign_ASN1_OCTET_STRING.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/RSA_size.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/SMIME_read_CMS.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/SMIME_read_PKCS7.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/SMIME_write_CMS.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/SMIME_write_PKCS7.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/X509_NAME_ENTRY_get_object.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/X509_NAME_add_entry_by_txt.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/X509_NAME_get_index_by_NID.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/X509_NAME_print_ex.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/X509_STORE_CTX_get_error.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/X509_STORE_CTX_get_ex_new_index.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/X509_STORE_CTX_new.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/X509_STORE_CTX_set_verify_cb.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/X509_STORE_set_verify_cb_func.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/X509_VERIFY_PARAM_set_flags.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/X509_new.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/X509_verify_cert.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/bio.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/blowfish.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/bn.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/bn_internal.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/buffer.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/crypto.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/d2i_ASN1_OBJECT.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/d2i_CMS_ContentInfo.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/d2i_DHparams.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/d2i_DSAPublicKey.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/d2i_ECPrivateKey.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/d2i_PKCS8PrivateKey.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/d2i_RSAPublicKey.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/d2i_X509.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/d2i_X509_ALGOR.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/d2i_X509_CRL.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/d2i_X509_NAME.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/d2i_X509_REQ.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/d2i_X509_SIG.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/des.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/dh.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/dsa.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/ecdsa.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/engine.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/err.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/evp.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/hmac.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/i2d_CMS_bio_stream.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/i2d_PKCS7_bio_stream.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/lh_stats.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/lhash.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/md5.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/mdc2.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/pem.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/rand.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/rc4.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/ripemd.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/rsa.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/sha.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/threads.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/ui.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/ui_compat.3 soc2015/pratiksinghal/cubie-head/secure/lib/libcrypto/man/x509.3 soc2015/pratiksinghal/cubie-head/secure/lib/libssl/man/SSL_CIPHER_get_name.3 soc2015/pratiksinghal/cubie-head/secure/lib/libssl/man/SSL_COMP_add_compression_method.3 soc2015/pratiksinghal/cubie-head/secure/lib/libssl/man/SSL_CTX_add_extra_chain_cert.3 soc2015/pratiksinghal/cubie-head/secure/lib/libssl/man/SSL_CTX_add_session.3 soc2015/pratiksinghal/cubie-head/secure/lib/libssl/man/SSL_CTX_ctrl.3 soc2015/pratiksinghal/cubie-head/secure/lib/libssl/man/SSL_CTX_flush_sessions.3 soc2015/pratiksinghal/cubie-head/secure/lib/libssl/man/SSL_CTX_free.3 soc2015/pratiksinghal/cubie-head/secure/lib/libssl/man/SSL_CTX_get_ex_new_index.3 soc2015/pratiksinghal/cubie-head/secure/lib/libssl/man/SSL_CTX_get_verify_mode.3 soc2015/pratiksinghal/cubie-head/secure/lib/libssl/man/SSL_CTX_load_verify_locations.3 soc2015/pratiksinghal/cubie-head/secure/lib/libssl/man/SSL_CTX_new.3 soc2015/pratiksinghal/cubie-head/secure/lib/libssl/man/SSL_CTX_sess_number.3 soc2015/pratiksinghal/cubie-head/secure/lib/libssl/man/SSL_CTX_sess_set_cache_size.3 soc2015/pratiksinghal/cubie-head/secure/lib/libssl/man/SSL_CTX_sess_set_get_cb.3 soc2015/pratiksinghal/cubie-head/secure/lib/libssl/man/SSL_CTX_sessions.3 soc2015/pratiksinghal/cubie-head/secure/lib/libssl/man/SSL_CTX_set_cert_store.3 soc2015/pratiksinghal/cubie-head/secure/lib/libssl/man/SSL_CTX_set_cert_verify_callback.3 soc2015/pratiksinghal/cubie-head/secure/lib/libssl/man/SSL_CTX_set_cipher_list.3 soc2015/pratiksinghal/cubie-head/secure/lib/libssl/man/SSL_CTX_set_client_CA_list.3 soc2015/pratiksinghal/cubie-head/secure/lib/libssl/man/SSL_CTX_set_client_cert_cb.3 soc2015/pratiksinghal/cubie-head/secure/lib/libssl/man/SSL_CTX_set_default_passwd_cb.3 soc2015/pratiksinghal/cubie-head/secure/lib/libssl/man/SSL_CTX_set_generate_session_id.3 soc2015/pratiksinghal/cubie-head/secure/lib/libssl/man/SSL_CTX_set_info_callback.3 soc2015/pratiksinghal/cubie-head/secure/lib/libssl/man/SSL_CTX_set_max_cert_list.3 soc2015/pratiksinghal/cubie-head/secure/lib/libssl/man/SSL_CTX_set_mode.3 soc2015/pratiksinghal/cubie-head/secure/lib/libssl/man/SSL_CTX_set_msg_callback.3 soc2015/pratiksinghal/cubie-head/secure/lib/libssl/man/SSL_CTX_set_options.3 soc2015/pratiksinghal/cubie-head/secure/lib/libssl/man/SSL_CTX_set_psk_client_callback.3 soc2015/pratiksinghal/cubie-head/secure/lib/libssl/man/SSL_CTX_set_quiet_shutdown.3 soc2015/pratiksinghal/cubie-head/secure/lib/libssl/man/SSL_CTX_set_read_ahead.3 soc2015/pratiksinghal/cubie-head/secure/lib/libssl/man/SSL_CTX_set_session_cache_mode.3 soc2015/pratiksinghal/cubie-head/secure/lib/libssl/man/SSL_CTX_set_session_id_context.3 soc2015/pratiksinghal/cubie-head/secure/lib/libssl/man/SSL_CTX_set_ssl_version.3 soc2015/pratiksinghal/cubie-head/secure/lib/libssl/man/SSL_CTX_set_timeout.3 soc2015/pratiksinghal/cubie-head/secure/lib/libssl/man/SSL_CTX_set_tlsext_ticket_key_cb.3 soc2015/pratiksinghal/cubie-head/secure/lib/libssl/man/SSL_CTX_set_tmp_dh_callback.3 soc2015/pratiksinghal/cubie-head/secure/lib/libssl/man/SSL_CTX_set_tmp_rsa_callback.3 soc2015/pratiksinghal/cubie-head/secure/lib/libssl/man/SSL_CTX_set_verify.3 soc2015/pratiksinghal/cubie-head/secure/lib/libssl/man/SSL_CTX_use_certificate.3 soc2015/pratiksinghal/cubie-head/secure/lib/libssl/man/SSL_CTX_use_psk_identity_hint.3 soc2015/pratiksinghal/cubie-head/secure/lib/libssl/man/SSL_SESSION_free.3 soc2015/pratiksinghal/cubie-head/secure/lib/libssl/man/SSL_SESSION_get_ex_new_index.3 soc2015/pratiksinghal/cubie-head/secure/lib/libssl/man/SSL_SESSION_get_time.3 soc2015/pratiksinghal/cubie-head/secure/lib/libssl/man/SSL_accept.3 soc2015/pratiksinghal/cubie-head/secure/lib/libssl/man/SSL_alert_type_string.3 soc2015/pratiksinghal/cubie-head/secure/lib/libssl/man/SSL_clear.3 soc2015/pratiksinghal/cubie-head/secure/lib/libssl/man/SSL_connect.3 soc2015/pratiksinghal/cubie-head/secure/lib/libssl/man/SSL_do_handshake.3 soc2015/pratiksinghal/cubie-head/secure/lib/libssl/man/SSL_free.3 soc2015/pratiksinghal/cubie-head/secure/lib/libssl/man/SSL_get_SSL_CTX.3 soc2015/pratiksinghal/cubie-head/secure/lib/libssl/man/SSL_get_ciphers.3 soc2015/pratiksinghal/cubie-head/secure/lib/libssl/man/SSL_get_client_CA_list.3 soc2015/pratiksinghal/cubie-head/secure/lib/libssl/man/SSL_get_current_cipher.3 soc2015/pratiksinghal/cubie-head/secure/lib/libssl/man/SSL_get_default_timeout.3 soc2015/pratiksinghal/cubie-head/secure/lib/libssl/man/SSL_get_error.3 soc2015/pratiksinghal/cubie-head/secure/lib/libssl/man/SSL_get_ex_data_X509_STORE_CTX_idx.3 soc2015/pratiksinghal/cubie-head/secure/lib/libssl/man/SSL_get_ex_new_index.3 soc2015/pratiksinghal/cubie-head/secure/lib/libssl/man/SSL_get_fd.3 soc2015/pratiksinghal/cubie-head/secure/lib/libssl/man/SSL_get_peer_cert_chain.3 soc2015/pratiksinghal/cubie-head/secure/lib/libssl/man/SSL_get_peer_certificate.3 soc2015/pratiksinghal/cubie-head/secure/lib/libssl/man/SSL_get_psk_identity.3 soc2015/pratiksinghal/cubie-head/secure/lib/libssl/man/SSL_get_rbio.3 soc2015/pratiksinghal/cubie-head/secure/lib/libssl/man/SSL_get_session.3 soc2015/pratiksinghal/cubie-head/secure/lib/libssl/man/SSL_get_verify_result.3 soc2015/pratiksinghal/cubie-head/secure/lib/libssl/man/SSL_get_version.3 soc2015/pratiksinghal/cubie-head/secure/lib/libssl/man/SSL_library_init.3 soc2015/pratiksinghal/cubie-head/secure/lib/libssl/man/SSL_load_client_CA_file.3 soc2015/pratiksinghal/cubie-head/secure/lib/libssl/man/SSL_new.3 soc2015/pratiksinghal/cubie-head/secure/lib/libssl/man/SSL_pending.3 soc2015/pratiksinghal/cubie-head/secure/lib/libssl/man/SSL_read.3 soc2015/pratiksinghal/cubie-head/secure/lib/libssl/man/SSL_rstate_string.3 soc2015/pratiksinghal/cubie-head/secure/lib/libssl/man/SSL_session_reused.3 soc2015/pratiksinghal/cubie-head/secure/lib/libssl/man/SSL_set_bio.3 soc2015/pratiksinghal/cubie-head/secure/lib/libssl/man/SSL_set_connect_state.3 soc2015/pratiksinghal/cubie-head/secure/lib/libssl/man/SSL_set_fd.3 soc2015/pratiksinghal/cubie-head/secure/lib/libssl/man/SSL_set_session.3 soc2015/pratiksinghal/cubie-head/secure/lib/libssl/man/SSL_set_shutdown.3 soc2015/pratiksinghal/cubie-head/secure/lib/libssl/man/SSL_set_verify_result.3 soc2015/pratiksinghal/cubie-head/secure/lib/libssl/man/SSL_shutdown.3 soc2015/pratiksinghal/cubie-head/secure/lib/libssl/man/SSL_state_string.3 soc2015/pratiksinghal/cubie-head/secure/lib/libssl/man/SSL_want.3 soc2015/pratiksinghal/cubie-head/secure/lib/libssl/man/SSL_write.3 soc2015/pratiksinghal/cubie-head/secure/lib/libssl/man/d2i_SSL_SESSION.3 soc2015/pratiksinghal/cubie-head/secure/lib/libssl/man/ssl.3 soc2015/pratiksinghal/cubie-head/secure/usr.bin/openssl/man/CA.pl.1 soc2015/pratiksinghal/cubie-head/secure/usr.bin/openssl/man/asn1parse.1 soc2015/pratiksinghal/cubie-head/secure/usr.bin/openssl/man/c_rehash.1 soc2015/pratiksinghal/cubie-head/secure/usr.bin/openssl/man/ca.1 soc2015/pratiksinghal/cubie-head/secure/usr.bin/openssl/man/ciphers.1 soc2015/pratiksinghal/cubie-head/secure/usr.bin/openssl/man/cms.1 soc2015/pratiksinghal/cubie-head/secure/usr.bin/openssl/man/crl.1 soc2015/pratiksinghal/cubie-head/secure/usr.bin/openssl/man/crl2pkcs7.1 soc2015/pratiksinghal/cubie-head/secure/usr.bin/openssl/man/dgst.1 soc2015/pratiksinghal/cubie-head/secure/usr.bin/openssl/man/dhparam.1 soc2015/pratiksinghal/cubie-head/secure/usr.bin/openssl/man/dsa.1 soc2015/pratiksinghal/cubie-head/secure/usr.bin/openssl/man/dsaparam.1 soc2015/pratiksinghal/cubie-head/secure/usr.bin/openssl/man/ec.1 soc2015/pratiksinghal/cubie-head/secure/usr.bin/openssl/man/ecparam.1 soc2015/pratiksinghal/cubie-head/secure/usr.bin/openssl/man/enc.1 soc2015/pratiksinghal/cubie-head/secure/usr.bin/openssl/man/errstr.1 soc2015/pratiksinghal/cubie-head/secure/usr.bin/openssl/man/gendsa.1 soc2015/pratiksinghal/cubie-head/secure/usr.bin/openssl/man/genpkey.1 soc2015/pratiksinghal/cubie-head/secure/usr.bin/openssl/man/genrsa.1 soc2015/pratiksinghal/cubie-head/secure/usr.bin/openssl/man/nseq.1 soc2015/pratiksinghal/cubie-head/secure/usr.bin/openssl/man/ocsp.1 soc2015/pratiksinghal/cubie-head/secure/usr.bin/openssl/man/openssl.1 soc2015/pratiksinghal/cubie-head/secure/usr.bin/openssl/man/passwd.1 soc2015/pratiksinghal/cubie-head/secure/usr.bin/openssl/man/pkcs12.1 soc2015/pratiksinghal/cubie-head/secure/usr.bin/openssl/man/pkcs7.1 soc2015/pratiksinghal/cubie-head/secure/usr.bin/openssl/man/pkcs8.1 soc2015/pratiksinghal/cubie-head/secure/usr.bin/openssl/man/pkey.1 soc2015/pratiksinghal/cubie-head/secure/usr.bin/openssl/man/pkeyparam.1 soc2015/pratiksinghal/cubie-head/secure/usr.bin/openssl/man/pkeyutl.1 soc2015/pratiksinghal/cubie-head/secure/usr.bin/openssl/man/rand.1 soc2015/pratiksinghal/cubie-head/secure/usr.bin/openssl/man/req.1 soc2015/pratiksinghal/cubie-head/secure/usr.bin/openssl/man/rsa.1 soc2015/pratiksinghal/cubie-head/secure/usr.bin/openssl/man/rsautl.1 soc2015/pratiksinghal/cubie-head/secure/usr.bin/openssl/man/s_client.1 soc2015/pratiksinghal/cubie-head/secure/usr.bin/openssl/man/s_server.1 soc2015/pratiksinghal/cubie-head/secure/usr.bin/openssl/man/s_time.1 soc2015/pratiksinghal/cubie-head/secure/usr.bin/openssl/man/sess_id.1 soc2015/pratiksinghal/cubie-head/secure/usr.bin/openssl/man/smime.1 soc2015/pratiksinghal/cubie-head/secure/usr.bin/openssl/man/speed.1 soc2015/pratiksinghal/cubie-head/secure/usr.bin/openssl/man/spkac.1 soc2015/pratiksinghal/cubie-head/secure/usr.bin/openssl/man/ts.1 soc2015/pratiksinghal/cubie-head/secure/usr.bin/openssl/man/tsget.1 soc2015/pratiksinghal/cubie-head/secure/usr.bin/openssl/man/verify.1 soc2015/pratiksinghal/cubie-head/secure/usr.bin/openssl/man/version.1 soc2015/pratiksinghal/cubie-head/secure/usr.bin/openssl/man/x509.1 soc2015/pratiksinghal/cubie-head/secure/usr.bin/openssl/man/x509v3_config.1 soc2015/pratiksinghal/cubie-head/share/colldef/Makefile soc2015/pratiksinghal/cubie-head/share/dict/Makefile soc2015/pratiksinghal/cubie-head/share/doc/IPv6/Makefile soc2015/pratiksinghal/cubie-head/share/doc/atf/Makefile soc2015/pratiksinghal/cubie-head/share/doc/legal/intel_ipw/Makefile soc2015/pratiksinghal/cubie-head/share/doc/legal/intel_iwi/Makefile soc2015/pratiksinghal/cubie-head/share/doc/legal/intel_iwn/Makefile soc2015/pratiksinghal/cubie-head/share/doc/legal/intel_wpi/Makefile soc2015/pratiksinghal/cubie-head/share/doc/legal/realtek/Makefile soc2015/pratiksinghal/cubie-head/share/doc/llvm/Makefile soc2015/pratiksinghal/cubie-head/share/doc/llvm/clang/Makefile soc2015/pratiksinghal/cubie-head/share/doc/papers/bufbio/bio.ms soc2015/pratiksinghal/cubie-head/share/doc/pjdfstest/Makefile soc2015/pratiksinghal/cubie-head/share/doc/usd/13.viref/Makefile soc2015/pratiksinghal/cubie-head/share/dtrace/toolkit/Makefile soc2015/pratiksinghal/cubie-head/share/i18n/csmapper/Makefile.inc soc2015/pratiksinghal/cubie-head/share/i18n/esdb/Makefile.inc soc2015/pratiksinghal/cubie-head/share/man/man4/acpi_hp.4 soc2015/pratiksinghal/cubie-head/share/man/man4/acpi_ibm.4 soc2015/pratiksinghal/cubie-head/share/man/man4/ada.4 soc2015/pratiksinghal/cubie-head/share/man/man4/altq.4 soc2015/pratiksinghal/cubie-head/share/man/man4/em.4 soc2015/pratiksinghal/cubie-head/share/man/man4/malo.4 soc2015/pratiksinghal/cubie-head/share/misc/Makefile soc2015/pratiksinghal/cubie-head/share/misc/committers-ports.dot soc2015/pratiksinghal/cubie-head/share/mk/Makefile soc2015/pratiksinghal/cubie-head/share/mk/bsd.compiler.mk soc2015/pratiksinghal/cubie-head/share/mk/bsd.cpu.mk soc2015/pratiksinghal/cubie-head/share/mk/bsd.crunchgen.mk soc2015/pratiksinghal/cubie-head/share/mk/bsd.dep.mk soc2015/pratiksinghal/cubie-head/share/mk/bsd.doc.mk soc2015/pratiksinghal/cubie-head/share/mk/bsd.files.mk soc2015/pratiksinghal/cubie-head/share/mk/bsd.incs.mk soc2015/pratiksinghal/cubie-head/share/mk/bsd.init.mk soc2015/pratiksinghal/cubie-head/share/mk/bsd.lib.mk soc2015/pratiksinghal/cubie-head/share/mk/bsd.man.mk soc2015/pratiksinghal/cubie-head/share/mk/bsd.mkopt.mk soc2015/pratiksinghal/cubie-head/share/mk/bsd.nls.mk soc2015/pratiksinghal/cubie-head/share/mk/bsd.obj.mk soc2015/pratiksinghal/cubie-head/share/mk/bsd.opts.mk soc2015/pratiksinghal/cubie-head/share/mk/bsd.own.mk soc2015/pratiksinghal/cubie-head/share/mk/bsd.prog.mk soc2015/pratiksinghal/cubie-head/share/mk/bsd.progs.mk soc2015/pratiksinghal/cubie-head/share/mk/bsd.subdir.mk soc2015/pratiksinghal/cubie-head/share/mk/bsd.sys.mk soc2015/pratiksinghal/cubie-head/share/mk/bsd.test.mk soc2015/pratiksinghal/cubie-head/share/mk/src.libnames.mk soc2015/pratiksinghal/cubie-head/share/mk/src.opts.mk soc2015/pratiksinghal/cubie-head/share/mk/src.sys.mk soc2015/pratiksinghal/cubie-head/share/mk/sys.mk soc2015/pratiksinghal/cubie-head/share/mklocale/Makefile soc2015/pratiksinghal/cubie-head/share/monetdef/Makefile soc2015/pratiksinghal/cubie-head/share/msgdef/Makefile soc2015/pratiksinghal/cubie-head/share/numericdef/Makefile soc2015/pratiksinghal/cubie-head/share/sendmail/Makefile soc2015/pratiksinghal/cubie-head/share/skel/Makefile soc2015/pratiksinghal/cubie-head/share/syscons/fonts/Makefile soc2015/pratiksinghal/cubie-head/share/syscons/keymaps/Makefile soc2015/pratiksinghal/cubie-head/sys/arm/allwinner/a10_mmc.c soc2015/pratiksinghal/cubie-head/sys/arm/allwinner/a10_mmc.h soc2015/pratiksinghal/cubie-head/sys/arm/conf/CUBIEBOARD soc2015/pratiksinghal/cubie-head/tests/Makefile soc2015/pratiksinghal/cubie-head/tests/sys/kern/ptrace_test.c soc2015/pratiksinghal/cubie-head/tests/sys/pjdfstest/pjdfstest/Makefile soc2015/pratiksinghal/cubie-head/tools/build/mk/Makefile.boot soc2015/pratiksinghal/cubie-head/tools/build/mk/OptionalObsoleteFiles.inc soc2015/pratiksinghal/cubie-head/tools/build/options/makeman soc2015/pratiksinghal/cubie-head/tools/bus_space/C/Makefile soc2015/pratiksinghal/cubie-head/tools/bus_space/C/lang.c soc2015/pratiksinghal/cubie-head/tools/bus_space/Makefile.inc soc2015/pratiksinghal/cubie-head/tools/bus_space/Python/Makefile soc2015/pratiksinghal/cubie-head/tools/bus_space/Python/lang.c soc2015/pratiksinghal/cubie-head/usr.bin/Makefile soc2015/pratiksinghal/cubie-head/usr.bin/alias/Makefile soc2015/pratiksinghal/cubie-head/usr.bin/bmake/Makefile soc2015/pratiksinghal/cubie-head/usr.bin/calendar/calendars/calendar.freebsd soc2015/pratiksinghal/cubie-head/usr.bin/calendar/calendars/calendar.holiday soc2015/pratiksinghal/cubie-head/usr.bin/clang/clang.prog.mk soc2015/pratiksinghal/cubie-head/usr.bin/clang/lldb/Makefile soc2015/pratiksinghal/cubie-head/usr.bin/colcrt/colcrt.1 soc2015/pratiksinghal/cubie-head/usr.bin/colrm/colrm.1 soc2015/pratiksinghal/cubie-head/usr.bin/expand/expand.1 soc2015/pratiksinghal/cubie-head/usr.bin/fold/fold.1 soc2015/pratiksinghal/cubie-head/usr.bin/grep/Makefile soc2015/pratiksinghal/cubie-head/usr.bin/kdump/Makefile soc2015/pratiksinghal/cubie-head/usr.bin/kdump/mkioctls soc2015/pratiksinghal/cubie-head/usr.bin/keylogin/Makefile soc2015/pratiksinghal/cubie-head/usr.bin/last/last.1 soc2015/pratiksinghal/cubie-head/usr.bin/mail/Makefile soc2015/pratiksinghal/cubie-head/usr.bin/mail/main.c soc2015/pratiksinghal/cubie-head/usr.bin/man/Makefile soc2015/pratiksinghal/cubie-head/usr.bin/mandoc/Makefile soc2015/pratiksinghal/cubie-head/usr.bin/mkcsmapper_static/Makefile soc2015/pratiksinghal/cubie-head/usr.bin/mkesdb_static/Makefile soc2015/pratiksinghal/cubie-head/usr.bin/mkimg/Makefile soc2015/pratiksinghal/cubie-head/usr.bin/mkimg/format.c soc2015/pratiksinghal/cubie-head/usr.bin/mkimg/gpt.c soc2015/pratiksinghal/cubie-head/usr.bin/mkimg/mbr.c soc2015/pratiksinghal/cubie-head/usr.bin/mkimg/scheme.c soc2015/pratiksinghal/cubie-head/usr.bin/mkimg/scheme.h soc2015/pratiksinghal/cubie-head/usr.bin/mkimg/tests/img-1x1-4096-apm.vhd.gz.uu soc2015/pratiksinghal/cubie-head/usr.bin/mkimg/tests/img-1x1-4096-apm.vhdf.gz.uu soc2015/pratiksinghal/cubie-head/usr.bin/mkimg/tests/img-1x1-4096-bsd.vhd.gz.uu soc2015/pratiksinghal/cubie-head/usr.bin/mkimg/tests/img-1x1-4096-bsd.vhdf.gz.uu soc2015/pratiksinghal/cubie-head/usr.bin/mkimg/tests/img-1x1-4096-ebr.vhd.gz.uu soc2015/pratiksinghal/cubie-head/usr.bin/mkimg/tests/img-1x1-4096-ebr.vhdf.gz.uu soc2015/pratiksinghal/cubie-head/usr.bin/mkimg/tests/img-1x1-4096-gpt.vhd.gz.uu soc2015/pratiksinghal/cubie-head/usr.bin/mkimg/tests/img-1x1-4096-gpt.vhdf.gz.uu soc2015/pratiksinghal/cubie-head/usr.bin/mkimg/tests/img-1x1-4096-mbr.vhd.gz.uu soc2015/pratiksinghal/cubie-head/usr.bin/mkimg/tests/img-1x1-4096-mbr.vhdf.gz.uu soc2015/pratiksinghal/cubie-head/usr.bin/mkimg/tests/img-1x1-4096-pc98.vhd.gz.uu soc2015/pratiksinghal/cubie-head/usr.bin/mkimg/tests/img-1x1-4096-pc98.vhdf.gz.uu soc2015/pratiksinghal/cubie-head/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.vhd.gz.uu soc2015/pratiksinghal/cubie-head/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.vhdf.gz.uu soc2015/pratiksinghal/cubie-head/usr.bin/mkimg/tests/img-1x1-512-apm.vhd.gz.uu soc2015/pratiksinghal/cubie-head/usr.bin/mkimg/tests/img-1x1-512-apm.vhdf.gz.uu soc2015/pratiksinghal/cubie-head/usr.bin/mkimg/tests/img-1x1-512-bsd.vhd.gz.uu soc2015/pratiksinghal/cubie-head/usr.bin/mkimg/tests/img-1x1-512-bsd.vhdf.gz.uu soc2015/pratiksinghal/cubie-head/usr.bin/mkimg/tests/img-1x1-512-ebr.vhd.gz.uu soc2015/pratiksinghal/cubie-head/usr.bin/mkimg/tests/img-1x1-512-ebr.vhdf.gz.uu soc2015/pratiksinghal/cubie-head/usr.bin/mkimg/tests/img-1x1-512-gpt.vhd.gz.uu soc2015/pratiksinghal/cubie-head/usr.bin/mkimg/tests/img-1x1-512-gpt.vhdf.gz.uu soc2015/pratiksinghal/cubie-head/usr.bin/mkimg/tests/img-1x1-512-mbr.vhd.gz.uu soc2015/pratiksinghal/cubie-head/usr.bin/mkimg/tests/img-1x1-512-mbr.vhdf.gz.uu soc2015/pratiksinghal/cubie-head/usr.bin/mkimg/tests/img-1x1-512-pc98.vhd.gz.uu soc2015/pratiksinghal/cubie-head/usr.bin/mkimg/tests/img-1x1-512-pc98.vhdf.gz.uu soc2015/pratiksinghal/cubie-head/usr.bin/mkimg/tests/img-1x1-512-vtoc8.vhd.gz.uu soc2015/pratiksinghal/cubie-head/usr.bin/mkimg/tests/img-1x1-512-vtoc8.vhdf.gz.uu soc2015/pratiksinghal/cubie-head/usr.bin/mkimg/tests/img-63x255-4096-apm.vhd.gz.uu soc2015/pratiksinghal/cubie-head/usr.bin/mkimg/tests/img-63x255-4096-apm.vhdf.gz.uu soc2015/pratiksinghal/cubie-head/usr.bin/mkimg/tests/img-63x255-4096-bsd.vhd.gz.uu soc2015/pratiksinghal/cubie-head/usr.bin/mkimg/tests/img-63x255-4096-bsd.vhdf.gz.uu soc2015/pratiksinghal/cubie-head/usr.bin/mkimg/tests/img-63x255-4096-ebr.vhd.gz.uu soc2015/pratiksinghal/cubie-head/usr.bin/mkimg/tests/img-63x255-4096-ebr.vhdf.gz.uu soc2015/pratiksinghal/cubie-head/usr.bin/mkimg/tests/img-63x255-4096-gpt.vhd.gz.uu soc2015/pratiksinghal/cubie-head/usr.bin/mkimg/tests/img-63x255-4096-gpt.vhdf.gz.uu soc2015/pratiksinghal/cubie-head/usr.bin/mkimg/tests/img-63x255-4096-mbr.vhd.gz.uu soc2015/pratiksinghal/cubie-head/usr.bin/mkimg/tests/img-63x255-4096-mbr.vhdf.gz.uu soc2015/pratiksinghal/cubie-head/usr.bin/mkimg/tests/img-63x255-4096-pc98.vhd.gz.uu soc2015/pratiksinghal/cubie-head/usr.bin/mkimg/tests/img-63x255-4096-pc98.vhdf.gz.uu soc2015/pratiksinghal/cubie-head/usr.bin/mkimg/tests/img-63x255-4096-vtoc8.vhd.gz.uu soc2015/pratiksinghal/cubie-head/usr.bin/mkimg/tests/img-63x255-4096-vtoc8.vhdf.gz.uu soc2015/pratiksinghal/cubie-head/usr.bin/mkimg/tests/img-63x255-512-apm.vhd.gz.uu soc2015/pratiksinghal/cubie-head/usr.bin/mkimg/tests/img-63x255-512-apm.vhdf.gz.uu soc2015/pratiksinghal/cubie-head/usr.bin/mkimg/tests/img-63x255-512-bsd.vhd.gz.uu soc2015/pratiksinghal/cubie-head/usr.bin/mkimg/tests/img-63x255-512-bsd.vhdf.gz.uu soc2015/pratiksinghal/cubie-head/usr.bin/mkimg/tests/img-63x255-512-ebr.vhd.gz.uu soc2015/pratiksinghal/cubie-head/usr.bin/mkimg/tests/img-63x255-512-ebr.vhdf.gz.uu soc2015/pratiksinghal/cubie-head/usr.bin/mkimg/tests/img-63x255-512-gpt.vhd.gz.uu soc2015/pratiksinghal/cubie-head/usr.bin/mkimg/tests/img-63x255-512-gpt.vhdf.gz.uu soc2015/pratiksinghal/cubie-head/usr.bin/mkimg/tests/img-63x255-512-mbr.vhd.gz.uu soc2015/pratiksinghal/cubie-head/usr.bin/mkimg/tests/img-63x255-512-mbr.vhdf.gz.uu soc2015/pratiksinghal/cubie-head/usr.bin/mkimg/tests/img-63x255-512-pc98.vhd.gz.uu soc2015/pratiksinghal/cubie-head/usr.bin/mkimg/tests/img-63x255-512-pc98.vhdf.gz.uu soc2015/pratiksinghal/cubie-head/usr.bin/mkimg/tests/img-63x255-512-vtoc8.vhd.gz.uu soc2015/pratiksinghal/cubie-head/usr.bin/mkimg/tests/img-63x255-512-vtoc8.vhdf.gz.uu soc2015/pratiksinghal/cubie-head/usr.bin/mkimg/vhd.c soc2015/pratiksinghal/cubie-head/usr.bin/mkstr/mkstr.1 soc2015/pratiksinghal/cubie-head/usr.bin/mkstr/mkstr.c soc2015/pratiksinghal/cubie-head/usr.bin/rsh/Makefile soc2015/pratiksinghal/cubie-head/usr.bin/rsh/rsh.c soc2015/pratiksinghal/cubie-head/usr.bin/rup/Makefile soc2015/pratiksinghal/cubie-head/usr.bin/sockstat/sockstat.1 soc2015/pratiksinghal/cubie-head/usr.bin/sockstat/sockstat.c soc2015/pratiksinghal/cubie-head/usr.bin/systat/Makefile soc2015/pratiksinghal/cubie-head/usr.bin/systat/main.c soc2015/pratiksinghal/cubie-head/usr.bin/top/Makefile soc2015/pratiksinghal/cubie-head/usr.bin/truss/Makefile soc2015/pratiksinghal/cubie-head/usr.bin/tset/tset.1 soc2015/pratiksinghal/cubie-head/usr.bin/vgrind/regexp.c soc2015/pratiksinghal/cubie-head/usr.bin/vgrind/vgrindefs.c soc2015/pratiksinghal/cubie-head/usr.bin/vmstat/vmstat.8 soc2015/pratiksinghal/cubie-head/usr.bin/vmstat/vmstat.c soc2015/pratiksinghal/cubie-head/usr.bin/vtfontcvt/Makefile soc2015/pratiksinghal/cubie-head/usr.bin/xinstall/xinstall.c soc2015/pratiksinghal/cubie-head/usr.bin/xlint/llib/Makefile soc2015/pratiksinghal/cubie-head/usr.sbin/bhyvectl/Makefile soc2015/pratiksinghal/cubie-head/usr.sbin/bhyvectl/bhyvectl.c soc2015/pratiksinghal/cubie-head/usr.sbin/bhyveload/bhyveload.c soc2015/pratiksinghal/cubie-head/usr.sbin/ctld/ctl.conf.5 soc2015/pratiksinghal/cubie-head/usr.sbin/ctld/kernel.c soc2015/pratiksinghal/cubie-head/usr.sbin/ctld/login.c soc2015/pratiksinghal/cubie-head/usr.sbin/fstyp/Makefile soc2015/pratiksinghal/cubie-head/usr.sbin/fstyp/cd9660.c soc2015/pratiksinghal/cubie-head/usr.sbin/fstyp/fstyp.8 soc2015/pratiksinghal/cubie-head/usr.sbin/fstyp/fstyp.c soc2015/pratiksinghal/cubie-head/usr.sbin/fstyp/fstyp.h soc2015/pratiksinghal/cubie-head/usr.sbin/fstyp/msdosfs.c soc2015/pratiksinghal/cubie-head/usr.sbin/pwd_mkdb/pwd_mkdb.8 soc2015/pratiksinghal/cubie-head/usr.sbin/pwd_mkdb/pwd_mkdb.c soc2015/pratiksinghal/cubie-head/usr.sbin/syslogd/syslogd.8 soc2015/pratiksinghal/cubie-head/usr.sbin/yppush/yppush_main.c Modified: soc2015/pratiksinghal/cubie-head/contrib/bmake/ChangeLog ============================================================================== --- soc2015/pratiksinghal/cubie-head/contrib/bmake/ChangeLog Sun Jun 28 21:36:00 2015 (r287705) +++ soc2015/pratiksinghal/cubie-head/contrib/bmake/ChangeLog Sun Jun 28 23:36:18 2015 (r287706) @@ -1,3 +1,9 @@ +2015-06-06 Simon J. Gerraty + + * Makefile (MAKE_VERSION): 20150606 + Merge with NetBSD make, pick up + o make.1: document .OBJDIR target + 2015-05-05 Simon J. Gerraty * Makefile (MAKE_VERSION): 20150505 Modified: soc2015/pratiksinghal/cubie-head/contrib/bmake/Makefile ============================================================================== --- soc2015/pratiksinghal/cubie-head/contrib/bmake/Makefile Sun Jun 28 21:36:00 2015 (r287705) +++ soc2015/pratiksinghal/cubie-head/contrib/bmake/Makefile Sun Jun 28 23:36:18 2015 (r287706) @@ -1,7 +1,7 @@ -# $Id: Makefile,v 1.38 2015/05/05 21:58:05 sjg Exp $ +# $Id: Makefile,v 1.39 2015/06/07 15:54:37 sjg Exp $ # Base version on src date -MAKE_VERSION= 20150505 +MAKE_VERSION= 20150606 PROG= bmake Modified: soc2015/pratiksinghal/cubie-head/contrib/bmake/bmake.1 ============================================================================== --- soc2015/pratiksinghal/cubie-head/contrib/bmake/bmake.1 Sun Jun 28 21:36:00 2015 (r287705) +++ soc2015/pratiksinghal/cubie-head/contrib/bmake/bmake.1 Sun Jun 28 23:36:18 2015 (r287706) @@ -1,4 +1,4 @@ -.\" $NetBSD: make.1,v 1.247 2015/04/10 08:43:32 wiz Exp $ +.\" $NetBSD: make.1,v 1.249 2015/06/05 07:33:40 wiz Exp $ .\" .\" Copyright (c) 1990, 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" from: @(#)make.1 8.4 (Berkeley) 3/19/94 .\" -.Dd April 9, 2015 +.Dd June 4, 2015 .Dt MAKE 1 .Os .Sh NAME @@ -993,14 +993,15 @@ .Ql Ev MAKEOBJDIR . .Pp .Ql Va .OBJDIR -may be modified in the makefile as a global variable. +may be modified in the makefile via the special target +.Ql Ic .OBJDIR . In all cases, .Nm will .Xr chdir 2 -to +to the specified directory if it exists, and set .Ql Va .OBJDIR -and set +and .Ql Ev PWD to that directory before executing any targets. . @@ -2001,6 +2002,15 @@ Synonym for .Ic .NOTPARALLEL , for compatibility with other pmake variants. +.It Ic .OBJDIR +The source is a new value for +.Ql Va .OBJDIR . +If it exists, +.Nm +will +.Xr chdir 2 +to it and update the value of +.Ql Va .OBJDIR . .It Ic .ORDER The named targets are made in sequence. This ordering does not add targets to the list of targets to be made. Modified: soc2015/pratiksinghal/cubie-head/contrib/bmake/bmake.cat1 ============================================================================== --- soc2015/pratiksinghal/cubie-head/contrib/bmake/bmake.cat1 Sun Jun 28 21:36:00 2015 (r287705) +++ soc2015/pratiksinghal/cubie-head/contrib/bmake/bmake.cat1 Sun Jun 28 23:36:18 2015 (r287706) @@ -647,10 +647,10 @@ may be used. This is especially useful with `MAKEOBJDIR'. - `_._O_B_J_D_I_R' may be modified in the makefile as a global - variable. In all cases, bbmmaakkee will chdir(2) to `_._O_B_J_D_I_R' - and set `PWD' to that directory before executing any tar- - gets. + `_._O_B_J_D_I_R' may be modified in the makefile via the special + target `..OOBBJJDDIIRR'. In all cases, bbmmaakkee will chdir(2) to + the specified directory if it exists, and set `_._O_B_J_D_I_R' + and `PWD' to that directory before executing any targets. _._P_A_R_S_E_D_I_R A path to the directory of the current `_M_a_k_e_f_i_l_e' being parsed. @@ -1271,6 +1271,9 @@ Synonym for ..NNOOTTPPAARRAALLLLEELL, for compatibility with other pmake variants. + ..OOBBJJDDIIRR The source is a new value for `_._O_B_J_D_I_R'. If it exists, bbmmaakkee + will chdir(2) to it and update the value of `_._O_B_J_D_I_R'. + ..OORRDDEERR The named targets are made in sequence. This ordering does not add targets to the list of targets to be made. Since the depen- dents of a target do not get built until the target itself could @@ -1449,4 +1452,4 @@ There is no way of escaping a space character in a filename. -NetBSD 5.1 April 9, 2015 NetBSD 5.1 +NetBSD 5.1 June 4, 2015 NetBSD 5.1 Modified: soc2015/pratiksinghal/cubie-head/contrib/bmake/make.1 ============================================================================== --- soc2015/pratiksinghal/cubie-head/contrib/bmake/make.1 Sun Jun 28 21:36:00 2015 (r287705) +++ soc2015/pratiksinghal/cubie-head/contrib/bmake/make.1 Sun Jun 28 23:36:18 2015 (r287706) @@ -1,4 +1,4 @@ -.\" $NetBSD: make.1,v 1.247 2015/04/10 08:43:32 wiz Exp $ +.\" $NetBSD: make.1,v 1.249 2015/06/05 07:33:40 wiz Exp $ .\" .\" Copyright (c) 1990, 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" from: @(#)make.1 8.4 (Berkeley) 3/19/94 .\" -.Dd April 9, 2015 +.Dd June 4, 2015 .Dt MAKE 1 .Os .Sh NAME @@ -1004,14 +1004,15 @@ .Ql Ev MAKEOBJDIR . .Pp .Ql Va .OBJDIR -may be modified in the makefile as a global variable. +may be modified in the makefile via the special target +.Ql Ic .OBJDIR . In all cases, .Nm will .Xr chdir 2 -to +to the specified directory if it exists, and set .Ql Va .OBJDIR -and set +and .Ql Ev PWD to that directory before executing any targets. . @@ -2012,6 +2013,15 @@ Synonym for .Ic .NOTPARALLEL , for compatibility with other pmake variants. +.It Ic .OBJDIR +The source is a new value for +.Ql Va .OBJDIR . +If it exists, +.Nm +will +.Xr chdir 2 +to it and update the value of +.Ql Va .OBJDIR . .It Ic .ORDER The named targets are made in sequence. This ordering does not add targets to the list of targets to be made. Modified: soc2015/pratiksinghal/cubie-head/contrib/bmake/mk/ChangeLog ============================================================================== --- soc2015/pratiksinghal/cubie-head/contrib/bmake/mk/ChangeLog Sun Jun 28 21:36:00 2015 (r287705) +++ soc2015/pratiksinghal/cubie-head/contrib/bmake/mk/ChangeLog Sun Jun 28 23:36:18 2015 (r287706) @@ -1,3 +1,29 @@ +2015-06-06 Simon J. Gerraty + + * install-mk (MK_VERSION): 20150606 + + * dirdeps.mk: don't rely on manually maintained Makefile.depend + to set DEP_RELDIR and reset DIRDEPS. + By setting DEP_RELDIR ourselves we can skip :tA + + * gendirdeps.mk: skip setting DEP_RELDIR. + +2015-05-24 Simon J. Gerraty + + * dirdeps.mk: avoid wildcards like make(bootstrap*) + +2015-05-20 Simon J. Gerraty + + * install-mk (MK_VERSION): 20150520 + + * dirdeps.mk: when we are building dirdeps cache file we *want* + meta_oodate to look at all the Makefile.depend files, so + set .MAKE.DEPENDFILE to something that won't match. + + * meta.stage.mk: for STAGE_AS_* basename of file may not be unique + so first use absolute path as key. + Also skip staging at level 0. + 2015-04-30 Simon J. Gerraty * install-mk (MK_VERSION): 20150430 Modified: soc2015/pratiksinghal/cubie-head/contrib/bmake/mk/dirdeps.mk ============================================================================== --- soc2015/pratiksinghal/cubie-head/contrib/bmake/mk/dirdeps.mk Sun Jun 28 21:36:00 2015 (r287705) +++ soc2015/pratiksinghal/cubie-head/contrib/bmake/mk/dirdeps.mk Sun Jun 28 23:36:18 2015 (r287706) @@ -1,4 +1,4 @@ -# $Id: dirdeps.mk,v 1.51 2015/05/06 06:07:30 sjg Exp $ +# $Id: dirdeps.mk,v 1.54 2015/06/08 20:55:11 sjg Exp $ # Copyright (c) 2010-2013, Juniper Networks, Inc. # All rights reserved. @@ -383,6 +383,7 @@ DIRDEPS="${DIRDEPS}" \ MAKEFLAGS= ${.MAKE} -C ${_CURDIR} -f ${BUILD_DIRDEPS_MAKEFILE} \ ${BUILD_DIRDEPS_TARGETS} BUILD_DIRDEPS_CACHE=yes \ + .MAKE.DEPENDFILE=.none \ 3>&1 1>&2 | sed 's,${SRCTOP},$${SRCTOP},g' >> ${.TARGET}.new && \ mv ${.TARGET}.new ${.TARGET} @@ -587,6 +588,11 @@ _DEP_TARGET_SPEC := ${d:E} # some makefiles may still look at this _DEP_MACHINE := ${d:E:C/,.*//} +# set this "just in case" +# we can skip :tA since we computed the path above +DEP_RELDIR := ${_m:H:S,${SRCTOP}/,,} +# and reset this +DIRDEPS = .if ${_debug_reldir} && ${_qm} != ${_m} .info loading ${_m} for ${d:E} .endif @@ -602,13 +608,15 @@ .elif ${.MAKE.LEVEL} > 42 .error You should have stopped recursing by now. .else -_DEP_RELDIR := ${DEP_RELDIR} +# we are building something +DEP_RELDIR := ${RELDIR} +_DEP_RELDIR := ${RELDIR} # pickup local dependencies .-include <.depend> .endif # bootstrapping new dependencies made easy? -.if make(bootstrap*) && !target(bootstrap) +.if (make(bootstrap) || make(bootstrap-recurse)) && !target(bootstrap) .if exists(${.CURDIR}/${.MAKE.DEPENDFILE:T}) # stop here Modified: soc2015/pratiksinghal/cubie-head/contrib/bmake/mk/gendirdeps.mk ============================================================================== --- soc2015/pratiksinghal/cubie-head/contrib/bmake/mk/gendirdeps.mk Sun Jun 28 21:36:00 2015 (r287705) +++ soc2015/pratiksinghal/cubie-head/contrib/bmake/mk/gendirdeps.mk Sun Jun 28 23:36:18 2015 (r287706) @@ -1,4 +1,4 @@ -# $Id: gendirdeps.mk,v 1.26 2014/09/05 04:40:52 sjg Exp $ +# $Id: gendirdeps.mk,v 1.27 2015/06/08 20:55:11 sjg Exp $ # Copyright (c) 2010-2013, Juniper Networks, Inc. # All rights reserved. @@ -311,7 +311,6 @@ # to output _{VAR} tokens which we will turn into proper ${VAR} references. ${_DEPENDFILE}: ${CAT_DEPEND:M.depend} ${META_FILES:O:u:@m@${exists($m):?$m:}@} ${_this} ${META2DEPS} @(echo '# Autogenerated - do NOT edit!'; echo; \ - echo 'DEP_RELDIR := $${_PARSEDIR:S,$${SRCTOP}/,,}'; echo; \ echo 'DIRDEPS = \'; \ echo '${DIRDEPS:@d@ $d \\${.newline}@}'; echo; \ ${_include_src_dirdeps} \ @@ -332,7 +331,6 @@ ${_DEPENDFILE}: ${MAKEFILE} ${_this} @(echo '# Autogenerated - do NOT edit!'; echo; \ - echo 'DEP_RELDIR := $${_PARSEDIR:S,$${SRCTOP}/,,}'; echo; \ echo 'DIRDEPS = \'; \ echo '${DIRDEPS:@d@ $d \\${.newline}@}'; echo; \ echo '.include '; \ Modified: soc2015/pratiksinghal/cubie-head/contrib/bmake/mk/install-mk ============================================================================== --- soc2015/pratiksinghal/cubie-head/contrib/bmake/mk/install-mk Sun Jun 28 21:36:00 2015 (r287705) +++ soc2015/pratiksinghal/cubie-head/contrib/bmake/mk/install-mk Sun Jun 28 23:36:18 2015 (r287706) @@ -55,7 +55,7 @@ # Simon J. Gerraty # RCSid: -# $Id: install-mk,v 1.110 2015/05/01 06:37:49 sjg Exp $ +# $Id: install-mk,v 1.112 2015/06/08 20:55:11 sjg Exp $ # # @(#) Copyright (c) 1994 Simon J. Gerraty # @@ -70,7 +70,7 @@ # sjg@crufty.net # -MK_VERSION=20150430 +MK_VERSION=20150606 OWNER= GROUP= MODE=444 Modified: soc2015/pratiksinghal/cubie-head/contrib/bmake/mk/meta.stage.mk ============================================================================== --- soc2015/pratiksinghal/cubie-head/contrib/bmake/mk/meta.stage.mk Sun Jun 28 21:36:00 2015 (r287705) +++ soc2015/pratiksinghal/cubie-head/contrib/bmake/mk/meta.stage.mk Sun Jun 28 23:36:18 2015 (r287706) @@ -1,4 +1,4 @@ -# $Id: meta.stage.mk,v 1.34 2014/11/20 22:40:08 sjg Exp $ +# $Id: meta.stage.mk,v 1.35 2015/05/20 06:40:33 sjg Exp $ # # @(#) Copyright (c) 2011, Simon J. Gerraty # @@ -218,7 +218,7 @@ stage_as: stage_as.$s stage_as.$s: .dirdep - @${STAGE_AS_SCRIPT}; StageAs ${FLAGS.$@} ${STAGE_FILES_DIR.$s:U${STAGE_DIR.$s}:${STAGE_DIR_FILTER}} ${STAGE_AS.$s:@f@$f ${STAGE_AS_${f:T}:U${f:T}}@} + @${STAGE_AS_SCRIPT}; StageAs ${FLAGS.$@} ${STAGE_FILES_DIR.$s:U${STAGE_DIR.$s}:${STAGE_DIR_FILTER}} ${STAGE_AS.$s:@f@$f ${STAGE_AS_${f:tA}:U${STAGE_AS_${f:T}:U${f:T}}}@} @touch $@ .endfor @@ -238,7 +238,9 @@ # generally we want staging to wait until everything else is done STAGING_WAIT ?= .WAIT +.if ${.MAKE.LEVEL} > 0 all: ${STAGING_WAIT} staging +.endif .if exists(${.PARSEDIR}/stage-install.sh) && !defined(STAGE_INSTALL) # this will run install(1) and then followup with .dirdep files. Modified: soc2015/pratiksinghal/cubie-head/contrib/bmake/mk/meta.sys.mk ============================================================================== --- soc2015/pratiksinghal/cubie-head/contrib/bmake/mk/meta.sys.mk Sun Jun 28 21:36:00 2015 (r287705) +++ soc2015/pratiksinghal/cubie-head/contrib/bmake/mk/meta.sys.mk Sun Jun 28 23:36:18 2015 (r287706) @@ -1,4 +1,4 @@ -# $Id: meta.sys.mk,v 1.20 2014/08/04 05:12:27 sjg Exp $ +# $Id: meta.sys.mk,v 1.21 2015/06/01 22:43:49 sjg Exp $ # # @(#) Copyright (c) 2010, Simon J. Gerraty @@ -108,11 +108,16 @@ .if ${.MAKE.MODE:Mmeta*} != "" MKDEP_MK = meta.autodep.mk -# if we think we are updating dependencies, -# then filemon had better be present -.if ${UPDATE_DEPENDFILE:Uyes:tl} != "no" && !exists(/dev/filemon) +.if ${UPDATE_DEPENDFILE:Uyes:tl} != "no" +.if ${.MAKEFLAGS:Uno:M-k} != "" +# make this more obvious +.warning Setting UPDATE_DEPENDFILE=NO due to -k +UPDATE_DEPENDFILE= NO +.export UPDATE_DEPENDFILE +.elif !exists(/dev/filemon) .error ${.newline}ERROR: The filemon module (/dev/filemon) is not loaded. .endif +.endif .if ${.MAKE.LEVEL} == 0 # make sure dirdeps target exists and do it first Modified: soc2015/pratiksinghal/cubie-head/contrib/bmake/mk/mkopt.sh ============================================================================== --- soc2015/pratiksinghal/cubie-head/contrib/bmake/mk/mkopt.sh Sun Jun 28 21:36:00 2015 (r287705) +++ soc2015/pratiksinghal/cubie-head/contrib/bmake/mk/mkopt.sh Sun Jun 28 23:36:18 2015 (r287706) @@ -1,5 +1,5 @@ : -# $Id: mkopt.sh,v 1.8 2014/11/15 07:07:18 sjg Exp $ +# $Id: mkopt.sh,v 1.10 2015/06/07 17:29:08 sjg Exp $ # # @(#) Copyright (c) 2014, Simon J. Gerraty # @@ -19,9 +19,10 @@ # no need to be included more than once _MKOPT_SH=: +_MKOPT_PREFIX=${_MKOPT_PREFIX:-MK_} # -# _mk_opt OPT default +# _mk_opt default OPT # # Set MK_$OPT # @@ -35,7 +36,7 @@ # _mk_opt() { _d=$1 - _mo=MK_$2 _wo=WITHOUT_$2 _wi=WITH_$2 + _mo=${_MKOPT_PREFIX}$2 _wo=WITHOUT_$2 _wi=WITH_$2 eval "_mov=\$$_mo _wov=\$$_wo _wiv=\$$_wi" case "$_wiv" in @@ -63,15 +64,23 @@ _d=no for _o in "$@" do - case "$_o" in + case "$_o" in + */*) # option is dirname default comes from basename + eval "_d=\$${_MKOPT_PREFIX}${_o#*/}" + _o=${_o%/*} + ;; yes|no) _d=$_o; continue;; esac _mk_opt $_d $_o done } +# handle either options.mk style OPTIONS_DEFAULT_* +# or FreeBSD's new bsd.mkopt.mk style __DEFAULT_*_OPTIONS _mk_opts_defaults() { - _mk_opts no $__DEFAULT_NO_OPTIONS yes $__DEFAULT_YES_OPTIONS + _mk_opts no $OPTIONS_DEFAULT_NO $__DEFAULT_NO_OPTIONS \ + yes $OPTIONS_DEFAULT_YES $__DEFAULT_YES_OPTIONS \ + $OPTIONS_DEFAULT_DEPENDENT $__DEFAULT_DEPENDENT_OPTIONS } case "/$0" in Modified: soc2015/pratiksinghal/cubie-head/contrib/bmake/targ.c ============================================================================== --- soc2015/pratiksinghal/cubie-head/contrib/bmake/targ.c Sun Jun 28 21:36:00 2015 (r287705) +++ soc2015/pratiksinghal/cubie-head/contrib/bmake/targ.c Sun Jun 28 23:36:18 2015 (r287706) @@ -1,4 +1,4 @@ -/* $NetBSD: targ.c,v 1.59 2014/09/07 20:55:34 joerg Exp $ */ +/* $NetBSD: targ.c,v 1.60 2015/05/25 09:01:06 manu Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,14 +69,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: targ.c,v 1.59 2014/09/07 20:55:34 joerg Exp $"; +static char rcsid[] = "$NetBSD: targ.c,v 1.60 2015/05/25 09:01:06 manu Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)targ.c 8.2 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: targ.c,v 1.59 2014/09/07 20:55:34 joerg Exp $"); +__RCSID("$NetBSD: targ.c,v 1.60 2015/05/25 09:01:06 manu Exp $"); #endif #endif /* not lint */ #endif Modified: soc2015/pratiksinghal/cubie-head/contrib/diff/src/context.c ============================================================================== --- soc2015/pratiksinghal/cubie-head/contrib/diff/src/context.c Sun Jun 28 21:36:00 2015 (r287705) +++ soc2015/pratiksinghal/cubie-head/contrib/diff/src/context.c Sun Jun 28 23:36:18 2015 (r287706) @@ -62,7 +62,7 @@ { time_t sec = inf->stat.st_mtime; verify (info_preserved, sizeof inf->stat.st_mtime <= sizeof sec); - sprintf (buf, "%jd.%.9d", (intmax_t)sec, nsec); + sprintf (buf, "%jd.%.9ld", (intmax_t)sec, nsec); } fprintf (outfile, "%s %s\t%s\n", mark, inf->name, buf); } Modified: soc2015/pratiksinghal/cubie-head/contrib/dtc/checks.c ============================================================================== --- soc2015/pratiksinghal/cubie-head/contrib/dtc/checks.c Sun Jun 28 21:36:00 2015 (r287705) +++ soc2015/pratiksinghal/cubie-head/contrib/dtc/checks.c Sun Jun 28 23:36:18 2015 (r287706) @@ -624,11 +624,11 @@ if (!reg && !ranges) return; - if ((node->parent->addr_cells == -1)) + if (node->parent->addr_cells == -1) FAIL(c, "Relying on default #address-cells value for %s", node->fullpath); - if ((node->parent->size_cells == -1)) + if (node->parent->size_cells == -1) FAIL(c, "Relying on default #size-cells value for %s", node->fullpath); } Modified: soc2015/pratiksinghal/cubie-head/contrib/elftoolchain/common/_elftc.h ============================================================================== --- soc2015/pratiksinghal/cubie-head/contrib/elftoolchain/common/_elftc.h Sun Jun 28 21:36:00 2015 (r287705) +++ soc2015/pratiksinghal/cubie-head/contrib/elftoolchain/common/_elftc.h Sun Jun 28 23:36:18 2015 (r287706) @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: _elftc.h 3175 2015-03-27 17:21:24Z emaste $ + * $Id: _elftc.h 3209 2015-05-17 13:40:46Z kaiwang27 $ */ /** @@ -342,12 +342,13 @@ #if defined(__GLIBC__) || defined(__linux__) - +#ifndef _GNU_SOURCE /* * GLIBC based systems have a global 'char *' pointer referencing * the executable's name. */ extern const char *program_invocation_short_name; +#endif /* !_GNU_SOURCE */ #define ELFTC_GETPROGNAME() program_invocation_short_name Modified: soc2015/pratiksinghal/cubie-head/contrib/elftoolchain/common/elfdefinitions.h ============================================================================== --- soc2015/pratiksinghal/cubie-head/contrib/elftoolchain/common/elfdefinitions.h Sun Jun 28 21:36:00 2015 (r287705) +++ soc2015/pratiksinghal/cubie-head/contrib/elftoolchain/common/elfdefinitions.h Sun Jun 28 23:36:18 2015 (r287706) @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: elfdefinitions.h 3178 2015-03-30 18:29:13Z emaste $ + * $Id: elfdefinitions.h 3198 2015-05-14 18:36:19Z emaste $ */ /* @@ -565,6 +565,7 @@ _ELF_DEFINE_EM(EM_386, 3, "Intel 80386") \ _ELF_DEFINE_EM(EM_68K, 4, "Motorola 68000") \ _ELF_DEFINE_EM(EM_88K, 5, "Motorola 88000") \ +_ELF_DEFINE_EM(EM_IAMCU, 6, "Intel MCU") \ _ELF_DEFINE_EM(EM_860, 7, "Intel 80860") \ _ELF_DEFINE_EM(EM_MIPS, 8, "MIPS I Architecture") \ _ELF_DEFINE_EM(EM_S370, 9, "IBM System/370 Processor") \ Modified: soc2015/pratiksinghal/cubie-head/contrib/elftoolchain/elfcopy/elfcopy.h ============================================================================== --- soc2015/pratiksinghal/cubie-head/contrib/elftoolchain/elfcopy/elfcopy.h Sun Jun 28 21:36:00 2015 (r287705) +++ soc2015/pratiksinghal/cubie-head/contrib/elftoolchain/elfcopy/elfcopy.h Sun Jun 28 23:36:18 2015 (r287706) @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: elfcopy.h 3173 2015-03-27 16:46:13Z emaste $ + * $Id: elfcopy.h 3221 2015-05-24 23:42:43Z kaiwang27 $ */ #include @@ -237,6 +237,7 @@ uint64_t *secndx; /* section index map. */ uint64_t *symndx; /* symbol index map. */ unsigned char *v_rel; /* symbols needed by relocation. */ + unsigned char *v_grp; /* symbols refered by section group. */ unsigned char *v_secsym; /* sections with section symbol. */ STAILQ_HEAD(, segment) v_seg; /* list of segments. */ STAILQ_HEAD(, sec_action) v_sac;/* list of section operations. */ Modified: soc2015/pratiksinghal/cubie-head/contrib/elftoolchain/elfcopy/main.c ============================================================================== --- soc2015/pratiksinghal/cubie-head/contrib/elftoolchain/elfcopy/main.c Sun Jun 28 21:36:00 2015 (r287705) +++ soc2015/pratiksinghal/cubie-head/contrib/elftoolchain/elfcopy/main.c Sun Jun 28 23:36:18 2015 (r287706) @@ -39,7 +39,7 @@ #include "elfcopy.h" -ELFTC_VCSID("$Id: main.c 3174 2015-03-27 17:13:41Z emaste $"); +ELFTC_VCSID("$Id: main.c 3216 2015-05-23 21:16:36Z kaiwang27 $"); enum options { @@ -404,8 +404,19 @@ * Insert SHDR table into the internal section list as a "pseudo" * section, so later it will get sorted and resynced just as "normal" * sections. + * + * Under FreeBSD, Binutils objcopy always put the section header + * at the end of all the sections. We want to do the same here. + * + * However, note that the behaviour is still different with Binutils: + * elfcopy checks the FreeBSD OSABI tag to tell whether it needs to + * move the section headers, while Binutils is probably configured + * this way when it's compiled on FreeBSD. */ - shtab = insert_shtab(ecp, 0); + if (oeh.e_ident[EI_OSABI] == ELFOSABI_FREEBSD) + shtab = insert_shtab(ecp, 1); + else + shtab = insert_shtab(ecp, 0); /* * Resync section offsets in the output object. This is needed @@ -485,6 +496,11 @@ free(sec); } } + + if (ecp->secndx != NULL) { + free(ecp->secndx); + ecp->secndx = NULL; + } } /* Create a temporary file. */ Modified: soc2015/pratiksinghal/cubie-head/contrib/elftoolchain/elfcopy/sections.c ============================================================================== --- soc2015/pratiksinghal/cubie-head/contrib/elftoolchain/elfcopy/sections.c Sun Jun 28 21:36:00 2015 (r287705) +++ soc2015/pratiksinghal/cubie-head/contrib/elftoolchain/elfcopy/sections.c Sun Jun 28 23:36:18 2015 (r287706) @@ -34,7 +34,7 @@ #include "elfcopy.h" -ELFTC_VCSID("$Id: sections.c 3185 2015-04-11 08:56:34Z kaiwang27 $"); +ELFTC_VCSID("$Id: sections.c 3220 2015-05-24 23:42:39Z kaiwang27 $"); static void add_gnu_debuglink(struct elfcopy *ecp); static uint32_t calc_crc32(const char *p, size_t len, uint32_t crc); @@ -56,6 +56,7 @@ static void print_section(struct section *s); static void *read_section(struct section *s, size_t *size); static void update_reloc(struct elfcopy *ecp, struct section *s); +static void update_section_group(struct elfcopy *ecp, struct section *s); int is_remove_section(struct elfcopy *ecp, const char *name) @@ -552,6 +553,14 @@ (s->type == SHT_REL || s->type == SHT_RELA)) filter_reloc(ecp, s); + /* + * The section indices in the SHT_GROUP section needs + * to be updated since we might have stripped some + * sections and changed section numbering. + */ + if (s->type == SHT_GROUP) + update_section_group(ecp, s); + if (is_modify_section(ecp, s->name)) modify_section(ecp, s); @@ -571,6 +580,71 @@ } } + +/* + * Update section group section. The section indices in the SHT_GROUP + * section need update after section numbering changed. + */ +static void +update_section_group(struct elfcopy *ecp, struct section *s) +{ + GElf_Shdr ish; + Elf_Data *id; + uint32_t *ws, *wd; + uint64_t n; + size_t ishnum; + int i, j; + + if (!elf_getshnum(ecp->ein, &ishnum)) + errx(EXIT_FAILURE, "elf_getshnum failed: %s", + elf_errmsg(-1)); + + if (gelf_getshdr(s->is, &ish) == NULL) + errx(EXIT_FAILURE, "gelf_getehdr() failed: %s", + elf_errmsg(-1)); + + if ((id = elf_getdata(s->is, NULL)) == NULL) + errx(EXIT_FAILURE, "elf_getdata() failed: %s", + elf_errmsg(-1)); + + if (ish.sh_size == 0) + return; + + if (ish.sh_entsize == 0) + ish.sh_entsize = 4; + + ws = id->d_buf; + + /* We only support COMDAT section. */ +#ifndef GRP_COMDAT +#define GRP_COMDAT 0x1 +#endif + if ((*ws & GRP_COMDAT) == 0) + return; + + if ((s->buf = malloc(ish.sh_size)) == NULL) + err(EXIT_FAILURE, "malloc failed"); + + s->sz = ish.sh_size; + + wd = s->buf; + + /* Copy the flag word as-is. */ + *wd = *ws; + + /* Update the section indices. */ + n = ish.sh_size / ish.sh_entsize; + for(i = 1, j = 1; (uint64_t)i < n; i++) { + if (ws[i] != SHN_UNDEF && ws[i] < ishnum && + ecp->secndx[ws[i]] != 0) + wd[j++] = ecp->secndx[ws[i]]; + else + s->sz -= 4; + } + + s->nocopy = 1; +} + /* * Filter relocation entries, only keep those entries whose * symbol is in the keep list. @@ -1028,8 +1102,11 @@ osh.sh_flags |= SHF_WRITE; if (sec_flags & SF_CODE) osh.sh_flags |= SHF_EXECINSTR; - } else + } else { osh.sh_flags = ish.sh_flags; + if (ish.sh_type == SHT_REL || ish.sh_type == SHT_RELA) + osh.sh_flags |= SHF_INFO_LINK; + } } if (name == NULL) @@ -1272,6 +1349,14 @@ s = ecp->shstrtab; + if (s->os == NULL) { + /* Input object does not contain .shstrtab section */ + if ((s->os = elf_newscn(ecp->eout)) == NULL) + errx(EXIT_FAILURE, "elf_newscn failed: %s", + elf_errmsg(-1)); + insert_to_sec_list(ecp, s, 1); + } + if (gelf_getshdr(s->os, &sh) == NULL) errx(EXIT_FAILURE, "692 gelf_getshdr() failed: %s", elf_errmsg(-1)); Modified: soc2015/pratiksinghal/cubie-head/contrib/elftoolchain/elfcopy/symbols.c ============================================================================== --- soc2015/pratiksinghal/cubie-head/contrib/elftoolchain/elfcopy/symbols.c Sun Jun 28 21:36:00 2015 (r287705) +++ soc2015/pratiksinghal/cubie-head/contrib/elftoolchain/elfcopy/symbols.c Sun Jun 28 23:36:18 2015 (r287706) @@ -33,7 +33,7 @@ #include "elfcopy.h" -ELFTC_VCSID("$Id: symbols.c 3191 2015-05-04 17:07:01Z jkoshy $"); +ELFTC_VCSID("$Id: symbols.c 3222 2015-05-24 23:47:23Z kaiwang27 $"); /* Symbol table buffer structure. */ struct symbuf { @@ -77,7 +77,8 @@ static int lookup_exact_string(hash_head *hash, const char *buf, const char *s); static int generate_symbols(struct elfcopy *ecp); -static void mark_symbols(struct elfcopy *ecp, size_t sc); +static void mark_reloc_symbols(struct elfcopy *ecp, size_t sc); +static void mark_section_group_symbols(struct elfcopy *ecp, size_t sc); static int match_wildcard(const char *name, const char *pattern); uint32_t str_hash(const char *s); @@ -160,6 +161,10 @@ if (BIT_ISSET(ecp->v_rel, i)) return (1); + /* Symbols refered by COMDAT sections are needed. */ + if (BIT_ISSET(ecp->v_grp, i)) + return (1); + /* * For relocatable files (.o files), global and weak symbols * are needed. @@ -207,7 +212,10 @@ return (1); if (ecp->v_rel == NULL) - mark_symbols(ecp, sc); + mark_reloc_symbols(ecp, sc); + + if (ecp->v_grp == NULL) + mark_section_group_symbols(ecp, sc); if (is_needed_symbol(ecp, i, s)) return (0); @@ -233,7 +241,7 @@ * Mark symbols refered by relocation entries. */ static void -mark_symbols(struct elfcopy *ecp, size_t sc) +mark_reloc_symbols(struct elfcopy *ecp, size_t sc) { const char *name; Elf_Data *d; @@ -311,6 +319,49 @@ elf_errmsg(elferr)); } +static void +mark_section_group_symbols(struct elfcopy *ecp, size_t sc) +{ + const char *name; + Elf_Scn *s; + GElf_Shdr sh; + size_t indx; + int elferr; + + ecp->v_grp = calloc((sc + 7) / 8, 1); + if (ecp->v_grp == NULL) + err(EXIT_FAILURE, "calloc failed"); + + if (elf_getshstrndx(ecp->ein, &indx) == 0) + errx(EXIT_FAILURE, "elf_getshstrndx failed: %s", + elf_errmsg(-1)); + + s = NULL; + while ((s = elf_nextscn(ecp->ein, s)) != NULL) { + if (gelf_getshdr(s, &sh) != &sh) + errx(EXIT_FAILURE, "elf_getshdr failed: %s", + elf_errmsg(-1)); + + if (sh.sh_type != SHT_GROUP) + continue; + + if ((name = elf_strptr(ecp->ein, indx, sh.sh_name)) == NULL) + errx(EXIT_FAILURE, "elf_strptr failed: %s", + elf_errmsg(-1)); + if (is_remove_section(ecp, name)) + continue; + + if (sh.sh_info > 0 && sh.sh_info < sc) + BIT_SET(ecp->v_grp, sh.sh_info); + else if (sh.sh_info != 0) + warnx("invalid symbox index"); + } + elferr = elf_errno(); + if (elferr != 0) + errx(EXIT_FAILURE, "elf_nextscn failed: %s", + elf_errmsg(elferr)); +} + static int generate_symbols(struct elfcopy *ecp) { @@ -351,6 +402,8 @@ ecp->symtab->buf = sy_buf; ecp->strtab->buf = st_buf; + gsym = NULL; + /* * Create bit vector v_secsym, which is used to mark sections * that already have corresponding STT_SECTION symbols. @@ -384,7 +437,7 @@ /* Symbol table should exist if this function is called. */ if (symndx == 0) { warnx("can't find .strtab section"); - return (0); + goto clean; } /* Locate .symtab of input object. */ @@ -413,7 +466,6 @@ * output object, it is used by update_reloc() later to update * relocation information. */ - gsym = NULL; sc = ish.sh_size / ish.sh_entsize; if (sc > 0) { ecp->symndx = calloc(sc, sizeof(*ecp->symndx)); @@ -427,7 +479,7 @@ if (elferr != 0) errx(EXIT_FAILURE, "elf_getdata failed: %s", elf_errmsg(elferr)); - return (0); + goto clean; } } else return (0); @@ -523,7 +575,7 @@ * check if that only local symbol is the reserved symbol. */ if (sy_buf->nls <= 1 && sy_buf->ngs == 0) - return (0); + goto clean; /* * Create STT_SECTION symbols for sections that do not already @@ -550,6 +602,7 @@ sym.st_value = s->vma; sym.st_size = 0; sym.st_info = GELF_ST_INFO(STB_LOCAL, STT_SECTION); + sym.st_other = STV_DEFAULT; /* * Don't let add_to_symtab() touch sym.st_shndx. * In this case, we know the index already. @@ -583,6 +636,12 @@ } return (1); + +clean: + free(gsym); + free_symtab(ecp); + + return (0); } void @@ -624,7 +683,9 @@ if (((ecp->flags & SYMTAB_INTACT) == 0) && !generate_symbols(ecp)) { TAILQ_REMOVE(&ecp->v_sec, ecp->symtab, sec_list); TAILQ_REMOVE(&ecp->v_sec, ecp->strtab, sec_list); + free(ecp->symtab->buf); free(ecp->symtab); + free(ecp->strtab->buf); free(ecp->strtab); ecp->symtab = NULL; ecp->strtab = NULL; @@ -697,6 +758,23 @@ } } } + + if (ecp->symndx != NULL) { + free(ecp->symndx); + ecp->symndx = NULL; + } + if (ecp->v_rel != NULL) { + free(ecp->v_rel); + ecp->v_rel = NULL; + } + if (ecp->v_grp != NULL) { + free(ecp->v_grp); + ecp->v_grp = NULL; + } + if (ecp->v_secsym != NULL) { + free(ecp->v_secsym); + ecp->v_secsym = NULL; + } } void Modified: soc2015/pratiksinghal/cubie-head/contrib/elftoolchain/libdwarf/dwarf_sections.c ============================================================================== --- soc2015/pratiksinghal/cubie-head/contrib/elftoolchain/libdwarf/dwarf_sections.c Sun Jun 28 21:36:00 2015 (r287705) +++ soc2015/pratiksinghal/cubie-head/contrib/elftoolchain/libdwarf/dwarf_sections.c Sun Jun 28 23:36:18 2015 (r287706) @@ -104,8 +104,8 @@ Dwarf_Unsigned *debug_ranges, Dwarf_Unsigned *debug_pubtypes) { - return (dwarf_get_section_max_offsets(dbg, debug_info, debug_abbrev, + return (dwarf_get_section_max_offsets_b(dbg, debug_info, debug_abbrev, debug_line, debug_loc, debug_aranges, debug_macinfo, debug_pubnames, debug_str, debug_frame, debug_ranges, - debug_pubtypes)); + debug_pubtypes, NULL)); } Modified: soc2015/pratiksinghal/cubie-head/contrib/elftoolchain/libdwarf/libdwarf_reloc.c ============================================================================== --- soc2015/pratiksinghal/cubie-head/contrib/elftoolchain/libdwarf/libdwarf_reloc.c Sun Jun 28 21:36:00 2015 (r287705) +++ soc2015/pratiksinghal/cubie-head/contrib/elftoolchain/libdwarf/libdwarf_reloc.c Sun Jun 28 23:36:18 2015 (r287706) @@ -26,7 +26,7 @@ #include "_libdwarf.h" -ELFTC_VCSID("$Id: libdwarf_reloc.c 3149 2015-02-15 19:00:06Z emaste $"); +ELFTC_VCSID("$Id: libdwarf_reloc.c 3198 2015-05-14 18:36:19Z emaste $"); Dwarf_Unsigned _dwarf_get_reloc_type(Dwarf_P_Debug dbg, int is64) @@ -75,6 +75,7 @@ return (4); break; case EM_386: + case EM_IAMCU: if (rel_type == R_386_32) return (4); break; Modified: soc2015/pratiksinghal/cubie-head/contrib/elftoolchain/libelftc/libelftc_dem_gnu3.c ============================================================================== --- soc2015/pratiksinghal/cubie-head/contrib/elftoolchain/libelftc/libelftc_dem_gnu3.c Sun Jun 28 21:36:00 2015 (r287705) +++ soc2015/pratiksinghal/cubie-head/contrib/elftoolchain/libelftc/libelftc_dem_gnu3.c Sun Jun 28 23:36:18 2015 (r287706) @@ -36,7 +36,7 @@ #include "_libelftc.h" -ELFTC_VCSID("$Id: libelftc_dem_gnu3.c 3194 2015-05-05 17:55:16Z emaste $"); +ELFTC_VCSID("$Id: libelftc_dem_gnu3.c 3212 2015-05-17 13:40:55Z kaiwang27 $"); /** * @file cpp_demangle.c @@ -50,7 +50,7 @@ enum type_qualifier { TYPE_PTR, TYPE_REF, TYPE_CMX, TYPE_IMG, TYPE_EXT, TYPE_RST, TYPE_VAT, - TYPE_CST + TYPE_CST, TYPE_VEC }; struct vector_type_qualifier { @@ -84,6 +84,7 @@ int func_type; const char *cur; /* current mangled name ptr */ const char *last_sname; /* last source name */ + int push_head; }; #define CPP_DEMANGLE_TRY_LIMIT 128 @@ -112,6 +113,8 @@ static int cpp_demangle_read_encoding(struct cpp_demangle_data *); static int cpp_demangle_read_expr_primary(struct cpp_demangle_data *); static int cpp_demangle_read_expression(struct cpp_demangle_data *); +static int cpp_demangle_read_expression_flat(struct cpp_demangle_data *, + char **); static int cpp_demangle_read_expression_binary(struct cpp_demangle_data *, const char *, size_t); static int cpp_demangle_read_expression_unary(struct cpp_demangle_data *, @@ -123,8 +126,12 @@ static int cpp_demangle_local_source_name(struct cpp_demangle_data *ddata); static int cpp_demangle_read_local_name(struct cpp_demangle_data *); static int cpp_demangle_read_name(struct cpp_demangle_data *); +static int cpp_demangle_read_name_flat(struct cpp_demangle_data *, + char**); static int cpp_demangle_read_nested_name(struct cpp_demangle_data *); static int cpp_demangle_read_number(struct cpp_demangle_data *, long *); +static int cpp_demangle_read_number_as_string(struct cpp_demangle_data *, + char **); static int cpp_demangle_read_nv_offset(struct cpp_demangle_data *); static int cpp_demangle_read_offset(struct cpp_demangle_data *); static int cpp_demangle_read_offset_number(struct cpp_demangle_data *); @@ -138,6 +145,8 @@ static int cpp_demangle_read_tmpl_args(struct cpp_demangle_data *); static int cpp_demangle_read_tmpl_param(struct cpp_demangle_data *); static int cpp_demangle_read_type(struct cpp_demangle_data *, int); +static int cpp_demangle_read_type_flat(struct cpp_demangle_data *, + char **); static int cpp_demangle_read_uqname(struct cpp_demangle_data *); static int cpp_demangle_read_v_offset(struct cpp_demangle_data *); static char *decode_fp_to_double(const char *, size_t); @@ -156,8 +165,6 @@ static int vector_type_qualifier_push(struct vector_type_qualifier *, enum type_qualifier); -static int cpp_demangle_gnu3_push_head; - /** * @brief Decode the input string by IA-64 C++ ABI style. * @@ -190,7 +197,6 @@ if (!cpp_demangle_data_init(&ddata, org + 2)) return (NULL); - cpp_demangle_gnu3_push_head = 0; rtn = NULL; if (!cpp_demangle_read_encoding(&ddata)) @@ -277,6 +283,7 @@ d->func_type = 0; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-soc-all@freebsd.org Mon Jun 29 01:32:00 2015 Return-Path: Delivered-To: svn-soc-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7B4B398C504 for ; Mon, 29 Jun 2015 01:32:00 +0000 (UTC) (envelope-from sdouglas@FreeBSD.org) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6A90B15EC for ; Mon, 29 Jun 2015 01:32:00 +0000 (UTC) (envelope-from sdouglas@FreeBSD.org) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5T1W0hB043930 for ; Mon, 29 Jun 2015 01:32:00 GMT (envelope-from sdouglas@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.9/8.14.9/Submit) id t5T1Vwlt043917 for svn-soc-all@FreeBSD.org; Mon, 29 Jun 2015 01:31:58 GMT (envelope-from sdouglas@FreeBSD.org) Date: Mon, 29 Jun 2015 01:31:58 GMT Message-Id: <201506290131.t5T1Vwlt043917@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to sdouglas@FreeBSD.org using -f From: sdouglas@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r287708 - in soc2015/sdouglas/pxebhyve-head/usr.sbin/pxebhyve: . tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2015 01:32:00 -0000 Author: sdouglas Date: Mon Jun 29 01:31:57 2015 New Revision: 287708 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=287708 Log: TFTP and DHCP working on a specified tap interface. Added: soc2015/sdouglas/pxebhyve-head/usr.sbin/pxebhyve/ soc2015/sdouglas/pxebhyve-head/usr.sbin/pxebhyve/Makefile soc2015/sdouglas/pxebhyve-head/usr.sbin/pxebhyve/alloc.c soc2015/sdouglas/pxebhyve-head/usr.sbin/pxebhyve/bpf.c soc2015/sdouglas/pxebhyve-head/usr.sbin/pxebhyve/clparse.c soc2015/sdouglas/pxebhyve-head/usr.sbin/pxebhyve/conflex.c soc2015/sdouglas/pxebhyve-head/usr.sbin/pxebhyve/convert.c soc2015/sdouglas/pxebhyve-head/usr.sbin/pxebhyve/dhclient-script soc2015/sdouglas/pxebhyve-head/usr.sbin/pxebhyve/dhclient-script.8 soc2015/sdouglas/pxebhyve-head/usr.sbin/pxebhyve/dhclient-script.8.gz (contents, props changed) soc2015/sdouglas/pxebhyve-head/usr.sbin/pxebhyve/dhclient.8 soc2015/sdouglas/pxebhyve-head/usr.sbin/pxebhyve/dhclient.conf soc2015/sdouglas/pxebhyve-head/usr.sbin/pxebhyve/dhclient.conf.5 soc2015/sdouglas/pxebhyve-head/usr.sbin/pxebhyve/dhclient.conf.5.gz (contents, props changed) soc2015/sdouglas/pxebhyve-head/usr.sbin/pxebhyve/dhclient.leases.5 soc2015/sdouglas/pxebhyve-head/usr.sbin/pxebhyve/dhclient.leases.5.gz (contents, props changed) soc2015/sdouglas/pxebhyve-head/usr.sbin/pxebhyve/dhcp-options.5 soc2015/sdouglas/pxebhyve-head/usr.sbin/pxebhyve/dhcp-options.5.gz (contents, props changed) soc2015/sdouglas/pxebhyve-head/usr.sbin/pxebhyve/dhcp.c soc2015/sdouglas/pxebhyve-head/usr.sbin/pxebhyve/dhcp.h soc2015/sdouglas/pxebhyve-head/usr.sbin/pxebhyve/dhcpd.h soc2015/sdouglas/pxebhyve-head/usr.sbin/pxebhyve/dhctoken.h soc2015/sdouglas/pxebhyve-head/usr.sbin/pxebhyve/dispatch.c soc2015/sdouglas/pxebhyve-head/usr.sbin/pxebhyve/easytftp.h soc2015/sdouglas/pxebhyve-head/usr.sbin/pxebhyve/errwarn.c soc2015/sdouglas/pxebhyve-head/usr.sbin/pxebhyve/hash.c soc2015/sdouglas/pxebhyve-head/usr.sbin/pxebhyve/inet.c soc2015/sdouglas/pxebhyve-head/usr.sbin/pxebhyve/options.c soc2015/sdouglas/pxebhyve-head/usr.sbin/pxebhyve/packet.c soc2015/sdouglas/pxebhyve-head/usr.sbin/pxebhyve/parse.c soc2015/sdouglas/pxebhyve-head/usr.sbin/pxebhyve/privsep.c soc2015/sdouglas/pxebhyve-head/usr.sbin/pxebhyve/privsep.h soc2015/sdouglas/pxebhyve-head/usr.sbin/pxebhyve/pxebhyve.c soc2015/sdouglas/pxebhyve-head/usr.sbin/pxebhyve/search_replace.pl soc2015/sdouglas/pxebhyve-head/usr.sbin/pxebhyve/tables.c soc2015/sdouglas/pxebhyve-head/usr.sbin/pxebhyve/tests/ soc2015/sdouglas/pxebhyve-head/usr.sbin/pxebhyve/tests/Makefile soc2015/sdouglas/pxebhyve-head/usr.sbin/pxebhyve/tests/fake.c soc2015/sdouglas/pxebhyve-head/usr.sbin/pxebhyve/tests/option-domain-search.c soc2015/sdouglas/pxebhyve-head/usr.sbin/pxebhyve/tree.c soc2015/sdouglas/pxebhyve-head/usr.sbin/pxebhyve/tree.h soc2015/sdouglas/pxebhyve-head/usr.sbin/pxebhyve/userboot_dhclient.h Added: soc2015/sdouglas/pxebhyve-head/usr.sbin/pxebhyve/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ soc2015/sdouglas/pxebhyve-head/usr.sbin/pxebhyve/Makefile Mon Jun 29 01:31:57 2015 (r287708) @@ -0,0 +1,54 @@ +# $OpenBSD: Makefile,v 1.9 2004/05/04 12:52:05 henning Exp $ +# $FreeBSD: head/sbin/dhclient/Makefile 275030 2014-11-25 11:23:12Z bapt $ +# +# Copyright (c) 1996, 1997 The Internet Software Consortium. +# 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. +# 3. Neither the name of The Internet Software Consortium nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM 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 INTERNET SOFTWARE CONSORTIUM 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 +SRCS= ../../libexec/tftpd/tftp-file.c ../../libexec/tftpd/tftp-io.c ../../libexec/tftpd/tftp-options.c ../../libexec/tftpd/tftp-transfer.c +SRCS+= ../../libexec/tftpd/tftp-utils.c ../../usr.bin/tftp/tftp.c +SRCS+= clparse.c alloc.c dispatch.c hash.c bpf.c options.c \ + tree.c conflex.c errwarn.c inet.c packet.c convert.c tables.c \ + parse.c privsep.c +SRCS+= pxebhyve.c +PROG= pxebhyve +MAN= dhclient.8 +SCRIPTS=dhclient-script +LIBADD= util +WARNS?= 2 +CFLAGS+=-I../../usr.bin/tftp/ +CFLAGS+= -I../../libexec/tftpd/ +CPATH=../../libexec/tftpd/ ../../usr.bin/tftp/ + +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + +.include Added: soc2015/sdouglas/pxebhyve-head/usr.sbin/pxebhyve/alloc.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ soc2015/sdouglas/pxebhyve-head/usr.sbin/pxebhyve/alloc.c Mon Jun 29 01:31:57 2015 (r287708) @@ -0,0 +1,79 @@ +/* $OpenBSD: alloc.c,v 1.9 2004/05/04 20:28:40 deraadt Exp $ */ + +/* Memory allocation... */ + +/* + * Copyright (c) 1995, 1996, 1998 The Internet Software Consortium. + * 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. + * 3. Neither the name of The Internet Software Consortium nor the names + * of its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM 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 INTERNET SOFTWARE CONSORTIUM 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. + * + * This software has been written for the Internet Software Consortium + * by Ted Lemon in cooperation with Vixie + * Enterprises. To learn more about the Internet Software Consortium, + * see ``http://www.vix.com/isc''. To learn more about Vixie + * Enterprises, see ``http://www.vix.com''. + */ + +#include +__FBSDID("$FreeBSD: head/sbin/dhclient/alloc.c 149399 2005-08-23 23:59:55Z brooks $"); + +#include "dhcpd.h" + +struct string_list * +new_string_list(size_t size) +{ + struct string_list *rval; + + rval = calloc(1, sizeof(struct string_list) + size); + if (rval != NULL) + rval->string = ((char *)rval) + sizeof(struct string_list); + return (rval); +} + +struct hash_table * +new_hash_table(int count) +{ + struct hash_table *rval; + + rval = calloc(1, sizeof(struct hash_table) - + (DEFAULT_HASH_SIZE * sizeof(struct hash_bucket *)) + + (count * sizeof(struct hash_bucket *))); + if (rval == NULL) + return (NULL); + rval->hash_count = count; + return (rval); +} + +struct hash_bucket * +new_hash_bucket(void) +{ + struct hash_bucket *rval = calloc(1, sizeof(struct hash_bucket)); + + return (rval); +} Added: soc2015/sdouglas/pxebhyve-head/usr.sbin/pxebhyve/bpf.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ soc2015/sdouglas/pxebhyve-head/usr.sbin/pxebhyve/bpf.c Mon Jun 29 01:31:57 2015 (r287708) @@ -0,0 +1,485 @@ +/* $OpenBSD: bpf.c,v 1.13 2004/05/05 14:28:58 deraadt Exp $ */ + +/* BPF socket interface code, originally contributed by Archie Cobbs. */ + +/* + * Copyright (c) 1995, 1996, 1998, 1999 + * The Internet Software Consortium. 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. + * 3. Neither the name of The Internet Software Consortium nor the names + * of its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM 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 INTERNET SOFTWARE CONSORTIUM 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. + * + * This software has been written for the Internet Software Consortium + * by Ted Lemon in cooperation with Vixie + * Enterprises. To learn more about the Internet Software Consortium, + * see ``http://www.vix.com/isc''. To learn more about Vixie + * Enterprises, see ``http://www.vix.com''. + */ + +#include +__FBSDID("$FreeBSD: head/sbin/dhclient/bpf.c 267914 2014-06-26 13:57:44Z pjd $"); + +#include "dhcpd.h" +#include "privsep.h" +#include +#include +#include + +#include +#include +#include +#include +#include + +#define BPF_FORMAT "/dev/bpf%d" + +/* + * Called by get_interface_list for each interface that's discovered. + * Opens a packet filter for each interface and adds it to the select + * mask. + */ +int +if_register_bpf(struct interface_info *info, int flags) +{ + char filename[50]; + int sock, b; + + /* Open a BPF device */ + for (b = 0;; b++) { + snprintf(filename, sizeof(filename), BPF_FORMAT, b); + sock = open(filename, flags); + if (sock < 0) { + if (errno == EBUSY) + continue; + else + error("Can't find free bpf: %m"); + } else + break; + } + + /* Set the BPF device to point at this interface. */ + if (ioctl(sock, BIOCSETIF, info->ifp) < 0) + error("Can't attach interface %s to bpf device %s: %m", + info->name, filename); + + return (sock); +} + +/* + * Packet write filter program: + * 'ip and udp and src port bootps and dst port (bootps or bootpc)' + */ +struct bpf_insn dhcp_bpf_wfilter[] = { + BPF_STMT(BPF_LD + BPF_B + BPF_IND, 14), + BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, (IPVERSION << 4) + 5, 0, 12), + + /* Make sure this is an IP packet... */ + BPF_STMT(BPF_LD + BPF_H + BPF_ABS, 12), + BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, ETHERTYPE_IP, 0, 10), + + /* Make sure it's a UDP packet... */ + BPF_STMT(BPF_LD + BPF_B + BPF_ABS, 23), + BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, IPPROTO_UDP, 0, 8), + + /* Make sure this isn't a fragment... */ + BPF_STMT(BPF_LD + BPF_H + BPF_ABS, 20), + BPF_JUMP(BPF_JMP + BPF_JSET + BPF_K, 0x1fff, 6, 0), /* patched */ + + /* Get the IP header length... */ + BPF_STMT(BPF_LDX + BPF_B + BPF_MSH, 14), + + /* Make sure it's from the right port... */ + BPF_STMT(BPF_LD + BPF_H + BPF_IND, 14), + BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, 68, 0, 3), + + /* Make sure it is to the right ports ... */ + BPF_STMT(BPF_LD + BPF_H + BPF_IND, 16), + BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, 67, 0, 1), + + /* If we passed all the tests, ask for the whole packet. */ + BPF_STMT(BPF_RET+BPF_K, (u_int)-1), + + /* Otherwise, drop it. */ + BPF_STMT(BPF_RET+BPF_K, 0), +}; + +int dhcp_bpf_wfilter_len = sizeof(dhcp_bpf_wfilter) / sizeof(struct bpf_insn); + +void +if_register_send(struct interface_info *info) +{ + cap_rights_t rights; + struct bpf_version v; + struct bpf_program p; + int sock, on = 1; + + /* Open a BPF device and hang it on this interface... */ + info->wfdesc = if_register_bpf(info, O_WRONLY); + + /* Make sure the BPF version is in range... */ + if (ioctl(info->wfdesc, BIOCVERSION, &v) < 0) + error("Can't get BPF version: %m"); + + if (v.bv_major != BPF_MAJOR_VERSION || + v.bv_minor < BPF_MINOR_VERSION) + error("Kernel BPF version out of range - recompile dhcpd!"); + + /* Set up the bpf write filter program structure. */ + p.bf_len = dhcp_bpf_wfilter_len; + p.bf_insns = dhcp_bpf_wfilter; + + if (dhcp_bpf_wfilter[7].k == 0x1fff) + dhcp_bpf_wfilter[7].k = htons(IP_MF|IP_OFFMASK); + + if (ioctl(info->wfdesc, BIOCSETWF, &p) < 0) + error("Can't install write filter program: %m"); + + if (ioctl(info->wfdesc, BIOCLOCK, NULL) < 0) + error("Cannot lock bpf"); + + cap_rights_init(&rights, CAP_WRITE); + if (cap_rights_limit(info->wfdesc, &rights) < 0 && errno != ENOSYS) + error("Can't limit bpf descriptor: %m"); + + /* + * Use raw socket for unicast send. + */ + if ((sock = socket(AF_INET, SOCK_RAW, IPPROTO_UDP)) == -1) + error("socket(SOCK_RAW): %m"); + if (setsockopt(sock, IPPROTO_IP, IP_HDRINCL, &on, + sizeof(on)) == -1) + error("setsockopt(IP_HDRINCL): %m"); + info->ufdesc = sock; +} + +/* + * Packet filter program... + * + * XXX: Changes to the filter program may require changes to the + * constant offsets used in if_register_send to patch the BPF program! + */ +struct bpf_insn dhcp_bpf_filter[] = { + /* Make sure this is an IP packet... */ + BPF_STMT(BPF_LD + BPF_H + BPF_ABS, 12), + BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, ETHERTYPE_IP, 0, 8), + + /* Make sure it's a UDP packet... */ + BPF_STMT(BPF_LD + BPF_B + BPF_ABS, 23), + BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, IPPROTO_UDP, 0, 6), + + /* Make sure this isn't a fragment... */ + BPF_STMT(BPF_LD + BPF_H + BPF_ABS, 20), + BPF_JUMP(BPF_JMP + BPF_JSET + BPF_K, 0x1fff, 4, 0), + + /* Get the IP header length... */ + BPF_STMT(BPF_LDX + BPF_B + BPF_MSH, 14), + + /* Make sure it's to the right port... */ + BPF_STMT(BPF_LD + BPF_H + BPF_IND, 16), + BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, 67, 0, 1), /* patch */ + + /* If we passed all the tests, ask for the whole packet. */ + BPF_STMT(BPF_RET+BPF_K, (u_int)-1), + + /* Otherwise, drop it. */ + BPF_STMT(BPF_RET+BPF_K, 0), +}; + +int dhcp_bpf_filter_len = sizeof(dhcp_bpf_filter) / sizeof(struct bpf_insn); + +void +if_register_receive(struct interface_info *info) +{ + static const unsigned long cmds[2] = { SIOCGIFFLAGS, SIOCGIFMEDIA }; + cap_rights_t rights; + struct bpf_version v; + struct bpf_program p; + int flag = 1, sz; + + /* Open a BPF device and hang it on this interface... */ + info->rfdesc = if_register_bpf(info, O_RDONLY); + + /* Make sure the BPF version is in range... */ + if (ioctl(info->rfdesc, BIOCVERSION, &v) < 0) + error("Can't get BPF version: %m"); + + if (v.bv_major != BPF_MAJOR_VERSION || + v.bv_minor < BPF_MINOR_VERSION) + error("Kernel BPF version out of range - recompile dhcpd!"); + + /* + * Set immediate mode so that reads return as soon as a packet + * comes in, rather than waiting for the input buffer to fill + * with packets. + */ + if (ioctl(info->rfdesc, BIOCIMMEDIATE, &flag) < 0) + error("Can't set immediate mode on bpf device: %m"); + + /* Get the required BPF buffer length from the kernel. */ + if (ioctl(info->rfdesc, BIOCGBLEN, &sz) < 0) + error("Can't get bpf buffer length: %m"); + info->rbuf_max = sz; + info->rbuf = malloc(info->rbuf_max); + if (!info->rbuf) + error("Can't allocate %lu bytes for bpf input buffer.", + (unsigned long)info->rbuf_max); + info->rbuf_offset = 0; + info->rbuf_len = 0; + + /* Set up the bpf filter program structure. */ + p.bf_len = dhcp_bpf_filter_len; + p.bf_insns = dhcp_bpf_filter; + + /* Patch the server port into the BPF program... + * + * XXX: changes to filter program may require changes to the + * insn number(s) used below! + */ + dhcp_bpf_filter[8].k = LOCAL_PORT; + + if (ioctl(info->rfdesc, BIOCSETF, &p) < 0) + error("Can't install packet filter program: %m"); + + if (ioctl(info->rfdesc, BIOCLOCK, NULL) < 0) + error("Cannot lock bpf"); + + cap_rights_init(&rights, CAP_IOCTL, CAP_EVENT, CAP_READ); + if (cap_rights_limit(info->rfdesc, &rights) < 0 && errno != ENOSYS) + error("Can't limit bpf descriptor: %m"); + if (cap_ioctls_limit(info->rfdesc, cmds, 2) < 0 && errno != ENOSYS) + error("Can't limit ioctls for bpf descriptor: %m"); +} + +void +send_packet_unpriv(int privfd, struct dhcp_packet *raw, size_t len, + struct in_addr from, struct in_addr to) +{ + struct imsg_hdr hdr; + struct buf *buf; + int errs; + + hdr.code = IMSG_SEND_PACKET; + hdr.len = sizeof(hdr) + + sizeof(size_t) + len + + sizeof(from) + sizeof(to); + + if ((buf = buf_open(hdr.len)) == NULL) + error("buf_open: %m"); + + errs = 0; + errs += buf_add(buf, &hdr, sizeof(hdr)); + errs += buf_add(buf, &len, sizeof(len)); + errs += buf_add(buf, raw, len); + errs += buf_add(buf, &from, sizeof(from)); + errs += buf_add(buf, &to, sizeof(to)); + if (errs) + error("buf_add: %m"); + + if (buf_close(privfd, buf) == -1) + error("buf_close: %m"); +} + +void +send_packet_priv(struct interface_info *interface, struct imsg_hdr *hdr, int fd) +{ + unsigned char buf[256]; + struct iovec iov[2]; + struct msghdr msg; + struct dhcp_packet raw; + size_t len; + struct in_addr from, to; + int result, bufp = 0; + + if (hdr->len < sizeof(*hdr) + sizeof(size_t)) + error("corrupted message received"); + buf_read(fd, &len, sizeof(len)); + if (hdr->len != sizeof(*hdr) + sizeof(size_t) + len + + sizeof(from) + sizeof(to)) { + error("corrupted message received"); + } + if (len > sizeof(raw)) + error("corrupted message received"); + buf_read(fd, &raw, len); + buf_read(fd, &from, sizeof(from)); + buf_read(fd, &to, sizeof(to)); + + /* Assemble the headers... */ + if (to.s_addr == INADDR_BROADCAST) + assemble_hw_header(interface, buf, &bufp); + assemble_udp_ip_header(buf, &bufp, from.s_addr, to.s_addr, + htons(REMOTE_PORT), (unsigned char *)&raw, len); + + iov[0].iov_base = buf; + iov[0].iov_len = bufp; + iov[1].iov_base = &raw; + iov[1].iov_len = len; + + /* Fire it off */ + if (to.s_addr == INADDR_BROADCAST) + result = writev(interface->wfdesc, iov, 2); + else { + struct sockaddr_in sato; + + sato.sin_addr = to; + sato.sin_port = htons(REMOTE_PORT); + sato.sin_family = AF_INET; + sato.sin_len = sizeof(sato); + + memset(&msg, 0, sizeof(msg)); + msg.msg_name = (struct sockaddr *)&sato; + msg.msg_namelen = sizeof(sato); + msg.msg_iov = iov; + msg.msg_iovlen = 2; + result = sendmsg(interface->ufdesc, &msg, 0); + } + + if (result < 0) + warning("send_packet: %m"); +} + +ssize_t +dhcp_receive_packet(struct interface_info *interface, unsigned char *buf, + size_t len, struct sockaddr_in *from, struct hardware *hfrom) +{ + int length = 0, offset = 0; + struct bpf_hdr hdr; + + /* + * All this complexity is because BPF doesn't guarantee that + * only one packet will be returned at a time. We're getting + * what we deserve, though - this is a terrible abuse of the BPF + * interface. Sigh. + */ + + /* Process packets until we get one we can return or until we've + * done a read and gotten nothing we can return... + */ + do { + /* If the buffer is empty, fill it. */ + if (interface->rbuf_offset >= interface->rbuf_len) { + length = read(interface->rfdesc, interface->rbuf, + interface->rbuf_max); + if (length <= 0) + return (length); + interface->rbuf_offset = 0; + interface->rbuf_len = length; + } + + /* + * If there isn't room for a whole bpf header, something + * went wrong, but we'll ignore it and hope it goes + * away... XXX + */ + if (interface->rbuf_len - interface->rbuf_offset < + sizeof(hdr)) { + interface->rbuf_offset = interface->rbuf_len; + continue; + } + + /* Copy out a bpf header... */ + memcpy(&hdr, &interface->rbuf[interface->rbuf_offset], + sizeof(hdr)); + + /* + * If the bpf header plus data doesn't fit in what's + * left of the buffer, stick head in sand yet again... + */ + if (interface->rbuf_offset + hdr.bh_hdrlen + hdr.bh_caplen > + interface->rbuf_len) { + interface->rbuf_offset = interface->rbuf_len; + continue; + } + + /* Skip over the BPF header... */ + interface->rbuf_offset += hdr.bh_hdrlen; + + /* + * If the captured data wasn't the whole packet, or if + * the packet won't fit in the input buffer, all we can + * do is drop it. + */ + if (hdr.bh_caplen != hdr.bh_datalen) { + interface->rbuf_offset = + BPF_WORDALIGN(interface->rbuf_offset + + hdr.bh_caplen); + continue; + } + + /* Decode the physical header... */ + offset = decode_hw_header(interface->rbuf, + interface->rbuf_offset, hfrom); + + /* + * If a physical layer checksum failed (dunno of any + * physical layer that supports this, but WTH), skip + * this packet. + */ + if (offset < 0) { + interface->rbuf_offset = + BPF_WORDALIGN(interface->rbuf_offset + + hdr.bh_caplen); + continue; + } + interface->rbuf_offset += offset; + hdr.bh_caplen -= offset; + + /* Decode the IP and UDP headers... */ + offset = decode_udp_ip_header(interface->rbuf, + interface->rbuf_offset, from, NULL, hdr.bh_caplen); + + /* If the IP or UDP checksum was bad, skip the packet... */ + if (offset < 0) { + interface->rbuf_offset = + BPF_WORDALIGN(interface->rbuf_offset + + hdr.bh_caplen); + continue; + } + interface->rbuf_offset += offset; + hdr.bh_caplen -= offset; + + /* + * If there's not enough room to stash the packet data, + * we have to skip it (this shouldn't happen in real + * life, though). + */ + if (hdr.bh_caplen > len) { + interface->rbuf_offset = + BPF_WORDALIGN(interface->rbuf_offset + + hdr.bh_caplen); + continue; + } + + /* Copy out the data in the packet... */ + memcpy(buf, interface->rbuf + interface->rbuf_offset, + hdr.bh_caplen); + interface->rbuf_offset = + BPF_WORDALIGN(interface->rbuf_offset + + hdr.bh_caplen); + return (hdr.bh_caplen); + } while (!length); + return (0); +} Added: soc2015/sdouglas/pxebhyve-head/usr.sbin/pxebhyve/clparse.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ soc2015/sdouglas/pxebhyve-head/usr.sbin/pxebhyve/clparse.c Mon Jun 29 01:31:57 2015 (r287708) @@ -0,0 +1,951 @@ +/* $OpenBSD: clparse.c,v 1.18 2004/09/15 18:15:18 henning Exp $ */ + +/* Parser for dhclient config and lease files... */ + +/* + * Copyright (c) 1997 The Internet Software Consortium. + * 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. + * 3. Neither the name of The Internet Software Consortium nor the names + * of its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM 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 INTERNET SOFTWARE CONSORTIUM 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. + * + * This software has been written for the Internet Software Consortium + * by Ted Lemon in cooperation with Vixie + * Enterprises. To learn more about the Internet Software Consortium, + * see ``http://www.vix.com/isc''. To learn more about Vixie + * Enterprises, see ``http://www.vix.com''. + */ + +#include +__FBSDID("$FreeBSD: head/sbin/dhclient/clparse.c 252506 2013-07-02 13:24:37Z bms $"); + +#include "dhcpd.h" +#include "dhctoken.h" + +struct client_config top_level_config; +struct interface_info *dummy_interfaces; +extern struct interface_info *ifi; + +char client_script_name[] = "/sbin/dhclient-script"; + +/* + * client-conf-file :== client-declarations EOF + * client-declarations :== + * | client-declaration + * | client-declarations client-declaration + */ +int +read_client_conf(void) +{ + FILE *cfile; + char *val; + int token; + struct client_config *config; + + new_parse(path_dhclient_conf); + + /* Set up the initial dhcp option universe. */ + initialize_universes(); + + /* Initialize the top level client configuration. */ + memset(&top_level_config, 0, sizeof(top_level_config)); + + /* Set some defaults... */ + top_level_config.timeout = 60; + top_level_config.select_interval = 0; + top_level_config.reboot_timeout = 10; + top_level_config.retry_interval = 300; + top_level_config.backoff_cutoff = 15; + top_level_config.initial_interval = 3; + top_level_config.bootp_policy = ACCEPT; + top_level_config.script_name = client_script_name; + top_level_config.requested_options + [top_level_config.requested_option_count++] = DHO_SUBNET_MASK; + top_level_config.requested_options + [top_level_config.requested_option_count++] = DHO_BROADCAST_ADDRESS; + top_level_config.requested_options + [top_level_config.requested_option_count++] = DHO_TIME_OFFSET; + top_level_config.requested_options + [top_level_config.requested_option_count++] = DHO_CLASSLESS_ROUTES; + top_level_config.requested_options + [top_level_config.requested_option_count++] = DHO_ROUTERS; + top_level_config.requested_options + [top_level_config.requested_option_count++] = DHO_DOMAIN_NAME; + top_level_config.requested_options + [top_level_config.requested_option_count++] = + DHO_DOMAIN_NAME_SERVERS; + top_level_config.requested_options + [top_level_config.requested_option_count++] = DHO_HOST_NAME; + top_level_config.requested_options + [top_level_config.requested_option_count++] = DHO_DOMAIN_SEARCH; + + if ((cfile = fopen(path_dhclient_conf, "r")) != NULL) { + do { + token = peek_token(&val, cfile); + if (token == EOF) + break; + parse_client_statement(cfile, NULL, &top_level_config); + } while (1); + token = next_token(&val, cfile); /* Clear the peek buffer */ + fclose(cfile); + } + + /* + * Set up state and config structures for clients that don't + * have per-interface configuration declarations. + */ + config = NULL; + if (!ifi->client) { + ifi->client = malloc(sizeof(struct client_state)); + if (!ifi->client) + error("no memory for client state."); + memset(ifi->client, 0, sizeof(*(ifi->client))); + } + if (!ifi->client->config) { + if (!config) { + config = malloc(sizeof(struct client_config)); + if (!config) + error("no memory for client config."); + memcpy(config, &top_level_config, + sizeof(top_level_config)); + } + ifi->client->config = config; + } + + return (!warnings_occurred); +} + +/* + * lease-file :== client-lease-statements EOF + * client-lease-statements :== + * | client-lease-statements LEASE client-lease-statement + */ +void +read_client_leases(void) +{ + FILE *cfile; + char *val; + int token; + + new_parse(path_dhclient_db); + + /* Open the lease file. If we can't open it, just return - + we can safely trust the server to remember our state. */ + if ((cfile = fopen(path_dhclient_db, "r")) == NULL) + return; + do { + token = next_token(&val, cfile); + if (token == EOF) + break; + if (token != LEASE) { + warning("Corrupt lease file - possible data loss!"); + skip_to_semi(cfile); + break; + } else + parse_client_lease_statement(cfile, 0); + + } while (1); + fclose(cfile); +} + +/* + * client-declaration :== + * SEND option-decl | + * DEFAULT option-decl | + * SUPERSEDE option-decl | + * PREPEND option-decl | + * APPEND option-decl | + * hardware-declaration | + * REQUEST option-list | + * REQUIRE option-list | + * TIMEOUT number | + * RETRY number | + * REBOOT number | + * SELECT_TIMEOUT number | + * SCRIPT string | + * interface-declaration | + * LEASE client-lease-statement | + * ALIAS client-lease-statement + */ +void +parse_client_statement(FILE *cfile, struct interface_info *ip, + struct client_config *config) +{ + int token; + char *val; + struct option *option; + + switch (next_token(&val, cfile)) { + case SEND: + parse_option_decl(cfile, &config->send_options[0]); + return; + case DEFAULT: + option = parse_option_decl(cfile, &config->defaults[0]); + if (option) + config->default_actions[option->code] = ACTION_DEFAULT; + return; + case SUPERSEDE: + option = parse_option_decl(cfile, &config->defaults[0]); + if (option) + config->default_actions[option->code] = + ACTION_SUPERSEDE; + return; + case APPEND: + option = parse_option_decl(cfile, &config->defaults[0]); + if (option) + config->default_actions[option->code] = ACTION_APPEND; + return; + case PREPEND: + option = parse_option_decl(cfile, &config->defaults[0]); + if (option) + config->default_actions[option->code] = ACTION_PREPEND; + return; + case MEDIA: + parse_string_list(cfile, &config->media, 1); + return; + case HARDWARE: + if (ip) + parse_hardware_param(cfile, &ip->hw_address); + else { + parse_warn("hardware address parameter %s", + "not allowed here."); + skip_to_semi(cfile); + } + return; + case REQUEST: + config->requested_option_count = + parse_option_list(cfile, config->requested_options); + return; + case REQUIRE: + memset(config->required_options, 0, + sizeof(config->required_options)); + parse_option_list(cfile, config->required_options); + return; + case TIMEOUT: + parse_lease_time(cfile, &config->timeout); + return; + case RETRY: + parse_lease_time(cfile, &config->retry_interval); + return; + case SELECT_TIMEOUT: + parse_lease_time(cfile, &config->select_interval); + return; + case REBOOT: + parse_lease_time(cfile, &config->reboot_timeout); + return; + case BACKOFF_CUTOFF: + parse_lease_time(cfile, &config->backoff_cutoff); + return; + case INITIAL_INTERVAL: + parse_lease_time(cfile, &config->initial_interval); + return; + case SCRIPT: + config->script_name = parse_string(cfile); + return; + case INTERFACE: + if (ip) + parse_warn("nested interface declaration."); + parse_interface_declaration(cfile, config); + return; + case LEASE: + parse_client_lease_statement(cfile, 1); + return; + case ALIAS: + parse_client_lease_statement(cfile, 2); + return; + case REJECT: + parse_reject_statement(cfile, config); + return; + default: + parse_warn("expecting a statement."); + skip_to_semi(cfile); + break; + } + token = next_token(&val, cfile); + if (token != SEMI) { + parse_warn("semicolon expected."); + skip_to_semi(cfile); + } +} + +int +parse_X(FILE *cfile, u_int8_t *buf, int max) +{ + int token; + char *val; + int len; + + token = peek_token(&val, cfile); + if (token == NUMBER_OR_NAME || token == NUMBER) { + len = 0; + do { + token = next_token(&val, cfile); + if (token != NUMBER && token != NUMBER_OR_NAME) { + parse_warn("expecting hexadecimal constant."); + skip_to_semi(cfile); + return (0); + } + convert_num(&buf[len], val, 16, 8); + if (len++ > max) { + parse_warn("hexadecimal constant too long."); + skip_to_semi(cfile); + return (0); + } + token = peek_token(&val, cfile); + if (token == COLON) + token = next_token(&val, cfile); + } while (token == COLON); + val = (char *)buf; + } else if (token == STRING) { + token = next_token(&val, cfile); + len = strlen(val); + if (len + 1 > max) { + parse_warn("string constant too long."); + skip_to_semi(cfile); + return (0); + } + memcpy(buf, val, len + 1); + } else { + parse_warn("expecting string or hexadecimal data"); + skip_to_semi(cfile); + return (0); + } + return (len); +} + +/* + * option-list :== option_name | + * option_list COMMA option_name + */ +int +parse_option_list(FILE *cfile, u_int8_t *list) +{ + int ix, i; + int token; + char *val; + + ix = 0; + do { + token = next_token(&val, cfile); + if (!is_identifier(token)) { + parse_warn("expected option name."); + skip_to_semi(cfile); + return (0); + } + for (i = 0; i < 256; i++) + if (!strcasecmp(dhcp_options[i].name, val)) + break; + + if (i == 256) { + parse_warn("%s: unexpected option name.", val); + skip_to_semi(cfile); + return (0); + } + list[ix++] = i; + if (ix == 256) { + parse_warn("%s: too many options.", val); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-soc-all@freebsd.org Mon Jun 29 05:21:07 2015 Return-Path: Delivered-To: svn-soc-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2134D98D916 for ; Mon, 29 Jun 2015 05:21:07 +0000 (UTC) (envelope-from btw@FreeBSD.org) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 07EE8120E for ; Mon, 29 Jun 2015 05:21:07 +0000 (UTC) (envelope-from btw@FreeBSD.org) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5T5L6il083231 for ; Mon, 29 Jun 2015 05:21:06 GMT (envelope-from btw@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.9/8.14.9/Submit) id t5T5L5AP082598 for svn-soc-all@FreeBSD.org; Mon, 29 Jun 2015 05:21:05 GMT (envelope-from btw@FreeBSD.org) Date: Mon, 29 Jun 2015 05:21:05 GMT Message-Id: <201506290521.t5T5L5AP082598@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to btw@FreeBSD.org using -f From: btw@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r287709 - in soc2015/btw/head/sys: netinet netinet6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2015 05:21:07 -0000 Author: btw Date: Mon Jun 29 05:21:04 2015 New Revision: 287709 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=287709 Log: Extend the socket layer to allow querying the RSS affinity of a socket using socket options. Modified: soc2015/btw/head/sys/netinet/in.h soc2015/btw/head/sys/netinet/ip_output.c soc2015/btw/head/sys/netinet6/in6.h soc2015/btw/head/sys/netinet6/ip6_output.c Modified: soc2015/btw/head/sys/netinet/in.h ============================================================================== --- soc2015/btw/head/sys/netinet/in.h Mon Jun 29 01:31:57 2015 (r287708) +++ soc2015/btw/head/sys/netinet/in.h Mon Jun 29 05:21:04 2015 (r287709) @@ -493,6 +493,7 @@ #define IP_RSSBUCKETID 92 /* get RSS flowid -> bucket mapping */ #define IP_RECVFLOWID 93 /* bool; receive IP flowid/flowtype w/ datagram */ #define IP_RECVRSSBUCKETID 94 /* bool; receive IP RSS bucket id w/ datagram */ +#define IP_RSSCPUID 95 /* int; get RSS flowid -> cpuid mapping */ /* * Defaults and limits for options Modified: soc2015/btw/head/sys/netinet/ip_output.c ============================================================================== --- soc2015/btw/head/sys/netinet/ip_output.c Mon Jun 29 01:31:57 2015 (r287708) +++ soc2015/btw/head/sys/netinet/ip_output.c Mon Jun 29 05:21:04 2015 (r287709) @@ -882,6 +882,7 @@ int error, optval; #ifdef RSS uint32_t rss_bucket; + uint32_t rss_cpuid; int retval; #endif @@ -1188,6 +1189,7 @@ case IP_RECVFLOWID: #ifdef RSS case IP_RSSBUCKETID: + case IP_RSSCPUID: case IP_RECVRSSBUCKETID: #endif switch (sopt->sopt_name) { @@ -1267,6 +1269,14 @@ else error = EINVAL; break; + case IP_RSSCPUID: + rss_cpuid = rss_hash2cpuid(inp->inp_flowid, + inp->inp_flowtype); + if (rss_cpuid != NETISR_CPUID_NONE) + optval = rss_cpuid; + else + error = EINVAL; + break; case IP_RECVRSSBUCKETID: optval = OPTBIT2(INP_RECVRSSBUCKETID); break; Modified: soc2015/btw/head/sys/netinet6/in6.h ============================================================================== --- soc2015/btw/head/sys/netinet6/in6.h Mon Jun 29 01:31:57 2015 (r287708) +++ soc2015/btw/head/sys/netinet6/in6.h Mon Jun 29 05:21:04 2015 (r287709) @@ -485,6 +485,7 @@ #define IPV6_FLOWID 67 /* int; flowid of given socket */ #define IPV6_FLOWTYPE 68 /* int; flowtype of given socket */ #define IPV6_RSSBUCKETID 69 /* int; RSS bucket ID of given socket */ +#define IPV6_RSSCPUID 70 /* int; RSS cpu ID of given socket */ /* * The following option is private; do not use it from user applications. Modified: soc2015/btw/head/sys/netinet6/ip6_output.c ============================================================================== --- soc2015/btw/head/sys/netinet6/ip6_output.c Mon Jun 29 01:31:57 2015 (r287708) +++ soc2015/btw/head/sys/netinet6/ip6_output.c Mon Jun 29 05:21:04 2015 (r287709) @@ -1299,6 +1299,7 @@ struct thread *td; #ifdef RSS uint32_t rss_bucket; + uint32_t rss_cpuid; int retval; #endif @@ -1813,6 +1814,7 @@ case IPV6_FLOWTYPE: #ifdef RSS case IPV6_RSSBUCKETID: + case IPV6_RSSCPUID: #endif switch (optname) { @@ -1894,6 +1896,16 @@ else error = EINVAL; break; + + case IPV6_RSSCPUID: + rss_cpuid = + rss_hash2cpuid(in6p->inp_flowid, + in6p->inp_flowtype); + if (rss_cpuid != NETISR_CPUID_NONE) + optval = rss_cpuid; + else + error = EINVAL; + break; #endif case IPV6_BINDMULTI: From owner-svn-soc-all@freebsd.org Mon Jun 29 14:23:22 2015 Return-Path: Delivered-To: svn-soc-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B1F9198F3FA for ; Mon, 29 Jun 2015 14:23:22 +0000 (UTC) (envelope-from clord@FreeBSD.org) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A104E1487 for ; Mon, 29 Jun 2015 14:23:22 +0000 (UTC) (envelope-from clord@FreeBSD.org) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5TENMwS010334 for ; Mon, 29 Jun 2015 14:23:22 GMT (envelope-from clord@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.9/8.14.9/Submit) id t5TENL8k010321 for svn-soc-all@FreeBSD.org; Mon, 29 Jun 2015 14:23:21 GMT (envelope-from clord@FreeBSD.org) Date: Mon, 29 Jun 2015 14:23:21 GMT Message-Id: <201506291423.t5TENL8k010321@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to clord@FreeBSD.org using -f From: clord@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r287721 - in soc2015/clord/head/sys/contrib/ficl: . contrib ficlplatform softcore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2015 14:23:22 -0000 Author: clord Date: Mon Jun 29 14:23:21 2015 New Revision: 287721 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=287721 Log: Revert wrong Ficl 4 import Deleted: soc2015/clord/head/sys/contrib/ficl/Makefile soc2015/clord/head/sys/contrib/ficl/bit.c soc2015/clord/head/sys/contrib/ficl/callback.c soc2015/clord/head/sys/contrib/ficl/compatibility.c soc2015/clord/head/sys/contrib/ficl/contrib/ soc2015/clord/head/sys/contrib/ficl/dictionary.c soc2015/clord/head/sys/contrib/ficl/double.c soc2015/clord/head/sys/contrib/ficl/extras.c soc2015/clord/head/sys/contrib/ficl/ficlcompatibility.h soc2015/clord/head/sys/contrib/ficl/ficldll.def soc2015/clord/head/sys/contrib/ficl/ficldll.dsp soc2015/clord/head/sys/contrib/ficl/ficlexe.dsp soc2015/clord/head/sys/contrib/ficl/ficllib.dsp soc2015/clord/head/sys/contrib/ficl/ficllocal.h soc2015/clord/head/sys/contrib/ficl/ficlplatform/ soc2015/clord/head/sys/contrib/ficl/ficltokens.h soc2015/clord/head/sys/contrib/ficl/hash.c soc2015/clord/head/sys/contrib/ficl/lzcompress.c soc2015/clord/head/sys/contrib/ficl/lzuncompress.c soc2015/clord/head/sys/contrib/ficl/main.c soc2015/clord/head/sys/contrib/ficl/primitives.c soc2015/clord/head/sys/contrib/ficl/softcore/ soc2015/clord/head/sys/contrib/ficl/system.c soc2015/clord/head/sys/contrib/ficl/utility.c soc2015/clord/head/sys/contrib/ficl/word.c Modified: soc2015/clord/head/sys/contrib/ficl/ (props changed) soc2015/clord/head/sys/contrib/ficl/ReadMe.txt soc2015/clord/head/sys/contrib/ficl/ficl.h soc2015/clord/head/sys/contrib/ficl/fileaccess.c soc2015/clord/head/sys/contrib/ficl/float.c soc2015/clord/head/sys/contrib/ficl/prefix.c soc2015/clord/head/sys/contrib/ficl/search.c soc2015/clord/head/sys/contrib/ficl/stack.c soc2015/clord/head/sys/contrib/ficl/tools.c soc2015/clord/head/sys/contrib/ficl/vm.c Modified: soc2015/clord/head/sys/contrib/ficl/ReadMe.txt ============================================================================== --- soc2015/clord/head/sys/contrib/ficl/ReadMe.txt Mon Jun 29 13:48:44 2015 (r287720) +++ soc2015/clord/head/sys/contrib/ficl/ReadMe.txt Mon Jun 29 14:23:21 2015 (r287721) @@ -1,5 +1,5 @@ -FICL 4.1.0 -October 2010 +FICL 3.03 +April 2002 ________ OVERVIEW @@ -10,22 +10,18 @@ Command Language". For more information, please see the "doc" directory. -For release notes, please see "doc/releases.html". +For release notes, please see "doc/ficl_rel.html". ____________ INSTALLATION Ficl builds out-of-the-box on the following platforms: - * NetBSD, FreeBSD: use "Makefile". - * Linux: use "Makefile.linux", but it should work with - "Makefile" as well. + * Linux: use "Makefile.linux". + * RiscOS: use "Makefile.riscos". * Win32: use "ficl.dsw" / "ficl.dsp". -To port to other platforms, we suggest you start with the generic -"Makefile" and the "unix.c" / "unix.h" platform-specific implementation -files. (And please--feel free to submit your portability changes!) - -(Note: Ficl used to build under RiscOS, but we broke everything -for the 4.0 release. Please fix it and send us the diffs!) +To port to other platforms, be sure to examine "sysdep.h", and +we suggest you start with the Linux makefile. (And please--feel +free to submit your portability changes!) ____________ FICL LICENSE Modified: soc2015/clord/head/sys/contrib/ficl/ficl.h ============================================================================== --- soc2015/clord/head/sys/contrib/ficl/ficl.h Mon Jun 29 13:48:44 2015 (r287720) +++ soc2015/clord/head/sys/contrib/ficl/ficl.h Mon Jun 29 14:23:21 2015 (r287721) @@ -4,17 +4,17 @@ ** Author: John Sadler (john_sadler@alum.mit.edu) ** Created: 19 July 1997 ** Dedicated to RHS, in loving memory -** $Id: ficl.h,v 1.25 2010/10/03 09:52:12 asau Exp $ -******************************************************************** -** +** $Id: ficl.h,v 1.18 2001/12/05 07:21:34 jsadler Exp $ +*******************************************************************/ +/* ** Copyright (c) 1997-2001 John Sadler (john_sadler@alum.mit.edu) ** All rights reserved. ** ** Get the latest Ficl release at http://ficl.sourceforge.net ** -** I am interested in hearing from anyone who uses Ficl. If you have +** I am interested in hearing from anyone who uses ficl. If you have ** a problem, a success story, a defect, an enhancement request, or -** if you would like to contribute to the Ficl release, please +** if you would like to contribute to the ficl release, please ** contact me by email at the address above. ** ** L I C E N S E and D I S C L A I M E R @@ -68,7 +68,7 @@ ** in a multitasking system. Unlike Forth, Ficl's outer interpreter ** expects a text block as input, and returns to the caller after each ** text block, so the "data pump" is somewhere in external code. This -** is more like TCL than Forth, which usually expects to be at the center +** is more like TCL than Forth, which usually expcets to be at the center ** of the system, requesting input at its convenience. Each Ficl virtual ** machine can be bound to a different I/O channel, and is independent ** of all others in in the same address space except that all virtual @@ -116,10 +116,10 @@ ** system. For example, INT16 is a short on some compilers and an ** int on others. Check the default CELL alignment controlled by ** FICL_ALIGN. If necessary, add new definitions of ficlMalloc, ficlFree, -** ficlLockDictionary, and ficlCallbackDefaultTextOut to work with your -** operating system. Finally, use testmain.c as a guide to installing the -** Ficl system and one or more virtual machines into your code. You do not -** need to include testmain.c in your build. +** ficlLockDictionary, and ficlTextOut to work with your operating system. +** Finally, use testmain.c as a guide to installing the Ficl system and +** one or more virtual machines into your code. You do not need to include +** testmain.c in your build. ** ** T o D o L i s t ** @@ -130,514 +130,118 @@ ** ** F o r M o r e I n f o r m a t i o n ** -** Web home of Ficl +** Web home of ficl ** http://ficl.sourceforge.net ** Check this website for Forth literature (including the ANSI standard) ** http://www.taygeta.com/forthlit.html ** and here for software and more links ** http://www.taygeta.com/forth.html -*/ - - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include -#include -#include -#include -#include - -/* -** Put all your local defines in ficllocal.h, -** rather than editing the makefile/project/etc. -** ficllocal.h will always ship as an inert file. -*/ -#include "ficllocal.h" - - - - -#if defined(FICL_ANSI) - #include "ficlplatform/ansi.h" -#elif defined(_WIN32) - #include "ficlplatform/win32.h" -#elif defined (FREEBSD_ALPHA) - #include "ficlplatform/alpha.h" -#elif defined(unix) || defined(__unix__) || defined(__unix) - #include "ficlplatform/unix.h" -#else /* catch-all */ - #include "ficlplatform/ansi.h" -#endif /* platform */ - - - -/* -** -** B U I L D C O N T R O L S -** -** First, the FICL_WANT_* settings. -** These are all optional settings that you may or may not -** want Ficl to use. -** -*/ - -/* -** FICL_WANT_MINIMAL -** If set to nonzero, build the smallest possible Ficl interpreter. -*/ -#if !defined(FICL_WANT_MINIMAL) -#define FICL_WANT_MINIMAL (0) -#endif - -#if FICL_WANT_MINIMAL -#define FICL_WANT_SOFTWORDS (0) -#define FICL_WANT_FILE (0) -#define FICL_WANT_FLOAT (0) -#define FICL_WANT_USER (0) -#define FICL_WANT_LOCALS (0) -#define FICL_WANT_DEBUGGER (0) -#define FICL_WANT_OOP (0) -#define FICL_WANT_PLATFORM (0) -#define FICL_WANT_MULTITHREADED (0) -#define FICL_WANT_EXTENDED_PREFIX (0) - -#define FICL_ROBUST (0) - -#endif /* FICL_WANT_MINIMAL */ - - -/* -** FICL_WANT_PLATFORM -** Includes words defined in ficlCompilePlatform -** (see ficlplatform/win32.c and ficlplatform/unix.c for example) -*/ -#if !defined (FICL_WANT_PLATFORM) -#define FICL_WANT_PLATFORM (0) -#endif /* FICL_WANT_PLATFORM */ - - -/* -** FICL_WANT_COMPATIBILITY -** Changes Ficl 4 at compile-time so it is source-compatible -** with the Ficl 3 API. If you are a new user to Ficl you -** don't need to worry about this setting; if you are upgrading -** from a pre-4.0 version of Ficl, see doc/upgrading.html for -** more information. -*/ -#if !defined FICL_WANT_COMPATIBILITY -#define FICL_WANT_COMPATIBILITY (0) -#endif /* !defined FICL_WANT_COMPATIBILITY */ - - - -/* -** FICL_WANT_LZ_SOFTCORE -** If nonzero, the softcore words are stored compressed -** with patent-unencumbered Lempel-Ziv '77 compression. -** This results in a smaller Ficl interpreter, and adds -** only a *tiny* runtime speed hit. -** -** As of version 4.0.27, all the runtime code for the decompressor -** is 688 bytes on a single-threaded release build, but saves 14179 -** bytes of data. That's a net savings of over 13k! Plus, it makes -** the resulting executable harder to hack :) ** -** On my 850MHz Duron machine, decompression took 0.00384 seconds -** if QueryPerformanceCounter() can be believed... it claims that it -** took 13765 cycles to complete, and that my machine runs 3579545 -** cycles/second. +** Obvious Performance enhancement opportunities +** Compile speed +** - work on interpret speed +** - turn off locals (FICL_WANT_LOCALS) +** Interpret speed +** - Change inner interpreter (and everything else) +** so that a definition is a list of pointers to functions +** and inline data rather than pointers to words. This gets +** rid of vm->runningWord and a level of indirection in the +** inner loop. I'll look at it for ficl 3.0 +** - Make the main hash table a bigger prime (HASHSIZE) +** - FORGET about twiddling the hash function - my experience is +** that that is a waste of time. +** - Eliminate the need to pass the pVM parameter on the stack +** by dedicating a register to it. Most words need access to the +** vm, but the parameter passing overhead can be reduced. One way +** requires that the host OS have a task switch callout. Create +** a global variable for the running VM and refer to it in words +** that need VM access. Alternative: use thread local storage. +** For single threaded implementations, you can just use a global. +** The first two solutions create portability problems, so I +** haven't considered doing them. Another possibility is to +** declare the pVm parameter to be "register", and hope the compiler +** pays attention. ** -** Contributed by Larry Hastings. -*/ -#if !defined (FICL_WANT_LZ_SOFTCORE) -#define FICL_WANT_LZ_SOFTCORE (1) -#endif /* FICL_WANT_LZ_SOFTCORE */ - - -/* -** FICL_WANT_FILE -** Includes the FILE and FILE-EXT wordset and associated code. -** Turn this off if you do not have a file system! -** Contributed by Larry Hastings */ -#if !defined (FICL_WANT_FILE) -#define FICL_WANT_FILE (1) -#endif /* FICL_WANT_FILE */ /* -** FICL_WANT_FLOAT -** Includes a floating point stack for the VM, and words to do float operations. -** Contributed by Guy Carver -*/ -#if !defined (FICL_WANT_FLOAT) -#define FICL_WANT_FLOAT (1) -#endif /* FICL_WANT_FLOAT */ - -/* -** FICL_WANT_DEBUGGER -** Inludes a simple source level debugger -*/ -#if !defined (FICL_WANT_DEBUGGER) -#define FICL_WANT_DEBUGGER (1) -#endif /* FICL_WANT_DEBUGGER */ - -/* -** FICL_EXTENDED_PREFIX -** Enables a bunch of extra prefixes in prefix.c -** and prefix.fr (if included as part of softcore.c) -*/ -#if !defined FICL_WANT_EXTENDED_PREFIX -#define FICL_WANT_EXTENDED_PREFIX (0) -#endif /* FICL_WANT_EXTENDED_PREFIX */ - -/* -** FICL_WANT_USER -** Enables user variables: per-instance variables bound to the VM. -** Kind of like thread-local storage. Could be implemented in a -** VM private dictionary, but I've chosen the lower overhead -** approach of an array of CELLs instead. -*/ -#if !defined FICL_WANT_USER -#define FICL_WANT_USER (1) -#endif /* FICL_WANT_USER */ - -/* -** FICL_WANT_LOCALS -** Controls the creation of the LOCALS wordset -** and a private dictionary for local variable compilation. -*/ -#if !defined FICL_WANT_LOCALS -#define FICL_WANT_LOCALS (1) -#endif /* FICL_WANT_LOCALS */ - -/* -** FICL_WANT_OOP -** Inludes object oriented programming support (in softwords) -** OOP support requires locals and user variables! -*/ -#if !defined (FICL_WANT_OOP) -#define FICL_WANT_OOP ((FICL_WANT_LOCALS) && (FICL_WANT_USER)) -#endif /* FICL_WANT_OOP */ - -/* -** FICL_WANT_SOFTWORDS -** Controls inclusion of all softwords in softcore.c. -*/ -#if !defined (FICL_WANT_SOFTWORDS) -#define FICL_WANT_SOFTWORDS (1) -#endif /* FICL_WANT_SOFTWORDS */ - -/* -** FICL_WANT_MULTITHREADED -** Enables dictionary mutual exclusion wia the -** ficlLockDictionary() system dependent function. -** -** Note: this implementation is experimental and poorly -** tested. Further, it's unnecessary unless you really -** intend to have multiple SESSIONS (poor choice of name -** on my part) - that is, threads that modify the dictionary -** at the same time. -*/ -#if !defined FICL_WANT_MULTITHREADED -#define FICL_WANT_MULTITHREADED (0) -#endif /* FICL_WANT_MULTITHREADED */ - - -/* -** FICL_WANT_OPTIMIZE -** Do you want to optimize for size, or for speed? -** Note that this doesn't affect Ficl very much one way -** or the other at the moment. -** Contributed by Larry Hastings -*/ -#define FICL_OPTIMIZE_FOR_SPEED (1) -#define FICL_OPTIMIZE_FOR_SIZE (2) -#if !defined (FICL_WANT_OPTIMIZE) -#define FICL_WANT_OPTIMIZE FICL_OPTIMIZE_FOR_SPEED -#endif /* FICL_WANT_OPTIMIZE */ - - -/* -** FICL_WANT_VCALL -** Ficl OO support for calling vtable methods. Win32 only. -** Contributed by Guy Carver -*/ -#if !defined (FICL_WANT_VCALL) -#define FICL_WANT_VCALL (0) -#endif /* FICL_WANT_VCALL */ - - - -/* -** P L A T F O R M S E T T I N G S -** -** The FICL_PLATFORM_* settings. -** These indicate attributes about the local platform. -*/ - - -/* -** FICL_PLATFORM_OS -** String constant describing the current hardware architecture. -*/ -#if !defined (FICL_PLATFORM_ARCHITECTURE) -#define FICL_PLATFORM_ARCHITECTURE "unknown" -#endif - -/* -** FICL_PLATFORM_OS -** String constant describing the current operating system. -*/ -#if !defined (FICL_PLATFORM_OS) -#define FICL_PLATFORM_OS "unknown" -#endif - -/* -** FICL_PLATFORM_HAS_2INTEGER -** Indicates whether or not the current architecture -** supports a native double-width integer type. -** If you set this to 1 in your ficlplatform/ *.h file, -** you *must* create typedefs for the following two types: -** ficl2Unsigned -** ficl2Integer -** If this is set to 0, Ficl will implement double-width -** integer math in C, which is both bigger *and* slower -** (the double whammy!). Make sure your compiler really -** genuinely doesn't support native double-width integers -** before setting this to 0. -*/ -#if !defined (FICL_PLATFORM_HAS_2INTEGER) -#define FICL_PLATFORM_HAS_2INTEGER (0) -#endif - -/* -** FICL_PLATFORM_HAS_FTRUNCATE -** Indicates whether or not the current platform provides -** the ftruncate() function (available on most UNIXes). -** This function is necessary to provide the complete -** File-Access wordset. -** -** If your platform does not have ftruncate() per se, -** but does have some method of truncating files, you -** should be able to implement ftruncate() yourself and -** set this constant to 1. For an example of this see -** "ficlplatform/win32.c". -*/ -#if !defined (FICL_PLATFORM_HAS_FTRUNCATE) -#define FICL_PLATFORM_HAS_FTRUNCATE (0) -#endif - - -/* -** FICL_PLATFORM_INLINE -** Must be defined, should be a function prototype type-modifying -** keyword that makes a function "inline". Ficl does not assume -** that the local platform supports inline functions; it therefore -** only uses "inline" where "static" would also work, and uses "static" -** in the absence of another keyword. -*/ -#if !defined FICL_PLATFORM_INLINE -#define FICL_PLATFORM_INLINE static -#endif /* !defined FICL_PLATFORM_INLINE */ - -/* -** FICL_PLATFORM_EXTERN -** Must be defined, should be a keyword used to declare -** a function prototype as being a genuine prototype. -** You should only have to fiddle with this setting if -** you're not using an ANSI-compliant compiler, in which -** case, good luck! -*/ -#if !defined FICL_PLATFORM_EXTERN -#define FICL_PLATFORM_EXTERN extern -#endif /* !defined FICL_PLATFORM_EXTERN */ - - - -/* -** FICL_PLATFORM_BASIC_TYPES -** -** If not defined yet, -*/ -#if !defined(FICL_PLATFORM_BASIC_TYPES) -typedef char ficlInteger8; -typedef unsigned char ficlUnsigned8; -typedef short ficlInteger16; -typedef unsigned short ficlUnsigned16; -typedef long ficlInteger32; -typedef unsigned long ficlUnsigned32; - -typedef ficlInteger32 ficlInteger; -typedef ficlUnsigned32 ficlUnsigned; -typedef float ficlFloat; - -#endif /* !defined(FICL_PLATFORM_BASIC_TYPES) */ - - - - - - - -/* -** FICL_ROBUST enables bounds checking of stacks and the dictionary. -** This will detect stack over and underflows and dictionary overflows. -** Any exceptional condition will result in an assertion failure. -** (As generated by the ANSI assert macro) -** FICL_ROBUST == 1 --> stack checking in the outer interpreter -** FICL_ROBUST == 2 also enables checking in many primitives -*/ - -#if !defined FICL_ROBUST -#define FICL_ROBUST (2) -#endif /* FICL_ROBUST */ - - - -/* -** FICL_DEFAULT_STACK_SIZE Specifies the default size (in CELLs) of -** a new virtual machine's stacks, unless overridden at -** create time. -*/ -#if !defined FICL_DEFAULT_STACK_SIZE -#define FICL_DEFAULT_STACK_SIZE (128) -#endif - -/* -** FICL_DEFAULT_DICTIONARY_SIZE specifies the number of ficlCells to allocate -** for the system dictionary by default. The value -** can be overridden at startup time as well. -*/ -#if !defined FICL_DEFAULT_DICTIONARY_SIZE -#define FICL_DEFAULT_DICTIONARY_SIZE (12288) -#endif - -/* -** FICL_DEFAULT_ENVIRONMENT_SIZE specifies the number of cells -** to allot for the environment-query dictionary. -*/ -#if !defined FICL_DEFAULT_ENVIRONMENT_SIZE -#define FICL_DEFAULT_ENVIRONMENT_SIZE (512) -#endif - -/* -** FICL_MAX_WORDLISTS specifies the maximum number of wordlists in -** the dictionary search order. See Forth DPANS sec 16.3.3 -** (file://dpans16.htm#16.3.3) -*/ -#if !defined FICL_MAX_WORDLISTS -#define FICL_MAX_WORDLISTS (16) -#endif - -/* -** FICL_MAX_PARSE_STEPS controls the size of an array in the FICL_SYSTEM structure -** that stores pointers to parser extension functions. I would never expect to have -** more than 8 of these, so that's the default limit. Too many of these functions -** will probably exact a nasty performance penalty. -*/ -#if !defined FICL_MAX_PARSE_STEPS -#define FICL_MAX_PARSE_STEPS (8) -#endif - -/* -** Maximum number of local variables per definition. -** This only affects the size of the locals dictionary, -** and there's only one per entire ficlSystem, so it -** doesn't make sense to be a piker here. -*/ -#if (!defined(FICL_MAX_LOCALS)) && FICL_WANT_LOCALS -#define FICL_MAX_LOCALS (64) -#endif - -/* -** The pad is a small scratch area for text manipulation. ANS Forth -** requires it to hold at least 84 characters. -*/ -#if !defined FICL_PAD_SIZE -#define FICL_PAD_SIZE (256) -#endif - -/* -** ANS Forth requires that a word's name contain {1..31} characters. +** Revision History: +** +** 15 Apr 1999 (sadler) Merged FreeBSD changes for exception wordset and +** counted strings in ficlExec. +** 12 Jan 1999 (sobral) Corrected EVALUATE behavior. Now TIB has an +** "end" field, and all words respect this. ficlExec is passed a "size" +** of TIB, as well as vmPushTib. This size is used to calculate the "end" +** of the string, ie, base+size. If the size is not known, pass -1. +** +** 10 Jan 1999 (sobral) EXCEPTION word set has been added, and existing +** words has been modified to conform to EXCEPTION EXT word set. +** +** 27 Aug 1998 (sadler) testing and corrections for LOCALS, LOCALS EXT, +** SEARCH / SEARCH EXT, TOOLS / TOOLS EXT. +** Added .X to display in hex, PARSE and PARSE-WORD to supplement WORD, +** EMPTY to clear stack. +** +** 29 jun 1998 (sadler) added variable sized hash table support +** and ANS Forth optional SEARCH & SEARCH EXT word set. +** 26 May 1998 (sadler) +** FICL_PROMPT macro +** 14 April 1998 (sadler) V1.04 +** Ficlwin: Windows version, Skip Carter's Linux port +** 5 March 1998 (sadler) V1.03 +** Bug fixes -- passes John Ryan's ANS test suite "core.fr" +** +** 24 February 1998 (sadler) V1.02 +** -Fixed bugs in <# # #> +** -Changed FICL_WORD so that storage for the name characters +** can be allocated from the dictionary as needed rather than +** reserving 32 bytes in each word whether needed or not - +** this saved 50% of the dictionary storage requirement. +** -Added words in testmain for Win32 functions system,chdir,cwd, +** also added a word that loads and evaluates a file. +** +** December 1997 (sadler) +** -Added VM_RESTART exception handling in ficlExec -- this lets words +** that require additional text to succeed (like :, create, variable...) +** recover gracefully from an empty input buffer rather than emitting +** an error message. Definitions can span multiple input blocks with +** no restrictions. +** -Changed #include order so that is included in sysdep.h, +** and sysdep is included in all other files. This lets you define +** NDEBUG in sysdep.h to disable assertions if you want to. +** -Make PC specific system dependent code conditional on _M_IX86 +** defined so that ports can coexist in sysdep.h/sysdep.c */ -#if !defined FICL_NAME_LENGTH -#define FICL_NAME_LENGTH (31) -#endif -/* -** Default size of hash table. For most uniform -** performance, use a prime number! -*/ -#if !defined FICL_HASH_SIZE - #define FICL_HASH_SIZE (241) +#ifdef __cplusplus +extern "C" { #endif - -/* -** Default number of USER flags. -*/ -#if (!defined(FICL_USER_CELLS)) && FICL_WANT_USER -#define FICL_USER_CELLS (16) -#endif - - - - - +#include "sysdep.h" +#include /* UCHAR_MAX */ /* ** Forward declarations... read on. */ -struct ficlWord; -typedef struct ficlWord ficlWord; -struct ficlVm; -typedef struct ficlVm ficlVm; -struct ficlDictionary; -typedef struct ficlDictionary ficlDictionary; -struct ficlSystem; -typedef struct ficlSystem ficlSystem; -struct ficlSystemInformation; -typedef struct ficlSystemInformation ficlSystemInformation; -struct ficlCallback; -typedef struct ficlCallback ficlCallback; -struct ficlCountedString; -typedef struct ficlCountedString ficlCountedString; -struct ficlString; -typedef struct ficlString ficlString; - - -/* -** System dependent routines: -** Edit the implementations in your appropriate ficlplatform/ *.c to be -** compatible with your runtime environment. -** -** ficlCallbackDefaultTextOut sends a zero-terminated string to the -** default output device - used for system error messages. -** -** ficlMalloc(), ficlRealloc() and ficlFree() have the same semantics -** as the functions malloc(), realloc(), and free() from the standard C library. -*/ -FICL_PLATFORM_EXTERN void ficlCallbackDefaultTextOut(ficlCallback *callback, char *text); -FICL_PLATFORM_EXTERN void *ficlMalloc (size_t size); -FICL_PLATFORM_EXTERN void ficlFree (void *p); -FICL_PLATFORM_EXTERN void *ficlRealloc(void *p, size_t size); - - - - - +struct ficl_word; +typedef struct ficl_word FICL_WORD; +struct vm; +typedef struct vm FICL_VM; +struct ficl_dict; +typedef struct ficl_dict FICL_DICT; +struct ficl_system; +typedef struct ficl_system FICL_SYSTEM; +struct ficl_system_info; +typedef struct ficl_system_info FICL_SYSTEM_INFO; /* ** the Good Stuff starts here... */ -#define FICL_VERSION "4.1.0" - +#define FICL_VER "3.03" +#define FICL_VER_MAJOR 3 +#define FICL_VER_MINOR 3 #if !defined (FICL_PROMPT) -#define FICL_PROMPT "ok> " +#define FICL_PROMPT "ok> " #endif /* @@ -650,250 +254,76 @@ #define FICL_BOOL(x) ((x) ? FICL_TRUE : FICL_FALSE) -#if !defined FICL_IGNORE /* Macro to silence unused param warnings */ -#define FICL_IGNORE(x) (void)x -#endif /* !defined FICL_IGNORE */ - - - - -#if !defined NULL -#define NULL ((void *)0) -#endif - - -/* -** Jiggery-pokery for the FICL_WANT_COMPATIBILITY compatibility layer. -** Even if you're not using it, compatibility.c won't compile properly -** unless FICL_WANT_COMPATIBILITY is turned on. Hence, we force it to -** always be turned on. -*/ -#ifdef FICL_FORCE_COMPATIBILITY -#undef FICL_WANT_COMPATIBILITY -#define FICL_WANT_COMPATIBILITY (1) -#endif /* FICL_FORCE_COMPATIBILITY */ - - - - - /* -** 2integer structures -*/ -#if FICL_PLATFORM_HAS_2INTEGER - -#define FICL_2INTEGER_SET(high, low, doublei) ((doublei) = (ficl2Integer)(((ficlUnsigned)(low)) | (((ficl2Integer)(high)) << FICL_BITS_PER_CELL))) -#define FICL_2INTEGER_TO_2UNSIGNED(doublei) ((ficl2Unsigned)(doublei)) - -#define FICL_2UNSIGNED_SET(high, low, doubleu) ((doubleu) = ((ficl2Unsigned)(low)) | (((ficl2Unsigned)(high)) << FICL_BITS_PER_CELL)) -#define FICL_2UNSIGNED_GET_LOW(doubleu) ((ficlUnsigned)(doubleu & ((((ficl2Integer)1) << FICL_BITS_PER_CELL) - 1))) -#define FICL_2UNSIGNED_GET_HIGH(doubleu) ((ficlUnsigned)(doubleu >> FICL_BITS_PER_CELL)) -#define FICL_2UNSIGNED_NOT_ZERO(doubleu) ((doubleu) != 0) -#define FICL_2UNSIGNED_TO_2INTEGER(doubleu) ((ficl2Integer)(doubleu)) - -#define FICL_INTEGER_TO_2INTEGER(i, doublei) ((doublei) = (i)) -#define FICL_UNSIGNED_TO_2UNSIGNED(u, doubleu) ((doubleu) = (u)) - -#define ficl2IntegerIsNegative(doublei) ((doublei) < 0) -#define ficl2IntegerNegate(doublei) (-(doublei)) - -#define ficl2IntegerMultiply(x, y) (((ficl2Integer)(x)) * ((ficl2Integer)(y))) -#define ficl2IntegerDecrement(x) (((ficl2Integer)(x)) - 1) - -#define ficl2UnsignedAdd(x, y) (((ficl2Unsigned)(x)) + ((ficl2Unsigned)(y))) -#define ficl2UnsignedSubtract(x, y) (((ficl2Unsigned)(x)) - ((ficl2Unsigned)(y))) -#define ficl2UnsignedMultiply(x, y) (((ficl2Unsigned)(x)) * ((ficl2Unsigned)(y))) -#define ficl2UnsignedMultiplyAccumulate(u, mul, add) (((u) * (mul)) + (add)) -#define ficl2UnsignedArithmeticShiftLeft(x) ((x) << 1) -#define ficl2UnsignedArithmeticShiftRight(x) ((x) >> 1) -#define ficl2UnsignedCompare(x, y) ficl2UnsignedSubtract(x, y) -#define ficl2UnsignedOr(x, y) ((x) | (y)) - -#else /* FICL_PLATFORM_HAS_2INTEGER */ - -typedef struct -{ - ficlUnsigned high; - ficlUnsigned low; -} ficl2Unsigned; - -typedef struct -{ - ficlInteger high; - ficlInteger low; -} ficl2Integer; - - -#define FICL_2INTEGER_SET(hi, lo, doublei) { ficl2Integer x; x.low = (lo); x.high = (hi); (doublei) = x; } -#define FICL_2INTEGER_TO_2UNSIGNED(doublei) (*(ficl2Unsigned *)(&(doublei))) - - -#define FICL_2UNSIGNED_SET(hi, lo, doubleu) { ficl2Unsigned x; x.low = (lo); x.high = (hi); (doubleu) = x; } -#define FICL_2UNSIGNED_GET_LOW(doubleu) ((doubleu).low) -#define FICL_2UNSIGNED_GET_HIGH(doubleu) ((doubleu).high) -#define FICL_2UNSIGNED_NOT_ZERO(doubleu) ((doubleu).high || (doubleu).low) -#define FICL_2UNSIGNED_TO_2INTEGER(doubleu) (*(ficl2Integer *)(&(doubleu))) - -#define FICL_INTEGER_TO_2INTEGER(i, doublei) { ficlInteger __x = (ficlInteger)(i); FICL_2INTEGER_SET((__x < 0) ? -1L : 0, __x, doublei) } -#define FICL_UNSIGNED_TO_2UNSIGNED(u, doubleu) FICL_2UNSIGNED_SET(0, u, doubleu) - - -FICL_PLATFORM_EXTERN int ficl2IntegerIsNegative(ficl2Integer x); -FICL_PLATFORM_EXTERN ficl2Integer ficl2IntegerNegate(ficl2Integer x); - -FICL_PLATFORM_EXTERN ficl2Integer ficl2IntegerMultiply(ficlInteger x, ficlInteger y); -FICL_PLATFORM_EXTERN ficl2Integer ficl2IntegerDecrement(ficl2Integer x); - -FICL_PLATFORM_EXTERN ficl2Unsigned ficl2UnsignedAdd(ficl2Unsigned x, ficl2Unsigned y); -FICL_PLATFORM_EXTERN ficl2Unsigned ficl2UnsignedSubtract(ficl2Unsigned x, ficl2Unsigned y); -FICL_PLATFORM_EXTERN ficl2Unsigned ficl2UnsignedMultiply(ficlUnsigned x, ficlUnsigned y); -FICL_PLATFORM_EXTERN ficl2Unsigned ficl2UnsignedMultiplyAccumulate(ficl2Unsigned u, ficlUnsigned mul, ficlUnsigned add); -FICL_PLATFORM_EXTERN ficl2Unsigned ficl2UnsignedArithmeticShiftLeft( ficl2Unsigned x ); -FICL_PLATFORM_EXTERN ficl2Unsigned ficl2UnsignedArithmeticShiftRight( ficl2Unsigned x ); -FICL_PLATFORM_EXTERN int ficl2UnsignedCompare(ficl2Unsigned x, ficl2Unsigned y); -FICL_PLATFORM_EXTERN ficl2Unsigned ficl2UnsignedOr( ficl2Unsigned x, ficl2Unsigned y ); - -#endif /* FICL_PLATFORM_HAS_2INTEGER */ - -FICL_PLATFORM_EXTERN ficl2Integer ficl2IntegerAbsoluteValue(ficl2Integer x); - -/* -** These structures represent the result of division. -*/ -typedef struct -{ - ficl2Unsigned quotient; - ficlUnsigned remainder; -} ficl2UnsignedQR; - -typedef struct -{ - ficl2Integer quotient; - ficlInteger remainder; -} ficl2IntegerQR; - - -#define FICL_2INTEGERQR_TO_2UNSIGNEDQR(doubleiqr) (*(ficl2UnsignedQR *)(&(doubleiqr))) -#define FICL_2UNSIGNEDQR_TO_2INTEGERQR(doubleuqr) (*(ficl2IntegerQR *)(&(doubleuqr))) - -/* -** 64 bit integer math support routines: multiply two UNS32s -** to get a 64 bit product, & divide the product by an UNS32 -** to get an UNS32 quotient and remainder. Much easier in asm -** on a 32 bit CPU than in C, which usually doesn't support -** the double length result (but it should). -*/ -FICL_PLATFORM_EXTERN ficl2IntegerQR ficl2IntegerDivideFloored(ficl2Integer num, ficlInteger den); -FICL_PLATFORM_EXTERN ficl2IntegerQR ficl2IntegerDivideSymmetric(ficl2Integer num, ficlInteger den); - -FICL_PLATFORM_EXTERN ficl2UnsignedQR ficl2UnsignedDivide(ficl2Unsigned q, ficlUnsigned y); - - - - - - -/* -** A ficlCell is the main storage type. It must be large enough +** A CELL is the main storage type. It must be large enough ** to contain a pointer or a scalar. In order to accommodate ** 32 bit and 64 bit processors, use abstract types for int, ** unsigned, and float. -** -** A ficlUnsigned, ficlInteger, and ficlFloat *MUST* be the same -** size as a "void *" on the target system. (Sorry, but that's -** a design constraint of FORTH.) */ -typedef union ficlCell +typedef union _cell { - ficlInteger i; - ficlUnsigned u; + FICL_INT i; + FICL_UNS u; #if (FICL_WANT_FLOAT) - ficlFloat f; + FICL_FLOAT f; #endif void *p; void (*fn)(void); -} ficlCell; - - -#define FICL_BITS_PER_CELL (sizeof(ficlCell) * 8) +} CELL; /* -** FICL_PLATFORM_ALIGNMENT is the number of bytes to which -** the dictionary pointer address must be aligned. This value -** is usually either 2 or 4, depending on the memory architecture -** of the target system; 4 is safe on any 16 or 32 bit -** machine. 8 would be appropriate for a 64 bit machine. -*/ -#if !defined FICL_PLATFORM_ALIGNMENT -#define FICL_PLATFORM_ALIGNMENT (4) -#endif - - -/* -** FICL_LVALUE_TO_CELL does a little pointer trickery to cast any CELL sized +** LVALUEtoCELL does a little pointer trickery to cast any CELL sized ** lvalue (informal definition: an expression whose result has an ** address) to CELL. Remember that constants and casts are NOT ** themselves lvalues! */ -#define FICL_LVALUE_TO_CELL(v) (*(ficlCell *)&v) +#define LVALUEtoCELL(v) (*(CELL *)&v) /* ** PTRtoCELL is a cast through void * intended to satisfy the ** most outrageously pedantic compiler... (I won't mention ** its name) */ -#define FICL_POINTER_TO_CELL(p) ((ficlCell *)(void *)p) +#define PTRtoCELL (CELL *)(void *) +#define PTRtoSTRING (FICL_STRING *)(void *) /* -** FORTH defines the "counted string" data type. This is -** a "Pascal-style" string, where the first byte is an unsigned -** count of characters, followed by the characters themselves. -** The Ficl structure for this is ficlCountedString. -** Ficl also often zero-terminates them so that they work with the -** usual C runtime library string functions... strlen(), strcmp(), -** and the like. (Belt & suspenders? You decide.) -** -** The problem is, this limits strings to 255 characters, which -** can be a bit constricting to us wordy types. So FORTH only -** uses counted strings for backwards compatibility, and all new -** words are "c-addr u" style, where the address and length are -** stored separately, and the length is a full unsigned "cell" size. -** (For more on this trend, see DPANS94 section A.3.1.3.4.) -** Ficl represents this with the ficlString structure. Note that -** these are frequently *not* zero-terminated! Don't depend on -** it--that way lies madness. +** Strings in FICL are stored in Pascal style - with a count +** preceding the text. We'll also NULL-terminate them so that +** they work with the usual C lib string functions. (Belt & +** suspenders? You decide.) +** STRINGINFO hides the implementation with a couple of +** macros for use in internal routines. */ -struct ficlCountedString +typedef unsigned char FICL_COUNT; +#define FICL_STRING_MAX UCHAR_MAX +typedef struct _ficl_string { - ficlUnsigned8 length; + FICL_COUNT count; char text[1]; -}; - -#define FICL_COUNTED_STRING_GET_LENGTH(cs) ((cs).length) -#define FICL_COUNTED_STRING_GET_POINTER(cs) ((cs).text) +} FICL_STRING; -#define FICL_COUNTED_STRING_MAX (256) -#define FICL_POINTER_TO_COUNTED_STRING(p) ((ficlCountedString *)(void *)p) - -struct ficlString +typedef struct { - ficlUnsigned length; - char *text; -}; - - -#define FICL_STRING_GET_LENGTH(fs) ((fs).length) -#define FICL_STRING_GET_POINTER(fs) ((fs).text) -#define FICL_STRING_SET_LENGTH(fs, l) ((fs).length = (ficlUnsigned)(l)) -#define FICL_STRING_SET_POINTER(fs, p) ((fs).text = (char *)(p)) -#define FICL_STRING_SET_FROM_COUNTED_STRING(string, countedstring) \ - {(string).text = (countedstring).text; (string).length = (countedstring).length;} + FICL_UNS count; + char *cp; +} STRINGINFO; + +#define SI_COUNT(si) (si.count) +#define SI_PTR(si) (si.cp) +#define SI_SETLEN(si, len) (si.count = (FICL_UNS)(len)) +#define SI_SETPTR(si, ptr) (si.cp = (char *)(ptr)) /* -** Init a FICL_STRING from a pointer to a zero-terminated string +** Init a STRINGINFO from a pointer to NULL-terminated string */ -#define FICL_STRING_SET_FROM_CSTRING(string, cstring) \ - {(string).text = (cstring); (string).length = strlen(cstring);} +#define SI_PSZ(si, psz) \ + {si.cp = psz; si.count = (FICL_COUNT)strlen(psz);} +/* +** Init a STRINGINFO from a pointer to FICL_STRING +*/ +#define SI_PFS(si, pfs) \ + {si.cp = pfs->text; si.count = pfs->count;} /* ** Ficl uses this little structure to hold the address of @@ -907,14 +337,14 @@ ** null-terminated string aware functions find most easy to deal ** with. ** Notice, though, that nobody really uses this except evaluate, -** so it might just be moved to ficlVm instead. (sobral) +** so it might just be moved to FICL_VM instead. (sobral) */ typedef struct { - ficlInteger index; + FICL_INT index; char *end; - char *text; -} ficlTIB; + char *cp; +} TIB; /* *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-soc-all@freebsd.org Mon Jun 29 16:19:12 2015 Return-Path: Delivered-To: svn-soc-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E06EA98FC76 for ; Mon, 29 Jun 2015 16:19:11 +0000 (UTC) (envelope-from kczekirda@FreeBSD.org) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C5B101D42 for ; Mon, 29 Jun 2015 16:19:11 +0000 (UTC) (envelope-from kczekirda@FreeBSD.org) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5TGJBjF044253 for ; Mon, 29 Jun 2015 16:19:11 GMT (envelope-from kczekirda@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.9/8.14.9/Submit) id t5TGJ5lv044169 for svn-soc-all@FreeBSD.org; Mon, 29 Jun 2015 16:19:05 GMT (envelope-from kczekirda@FreeBSD.org) Date: Mon, 29 Jun 2015 16:19:05 GMT Message-Id: <201506291619.t5TGJ5lv044169@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to kczekirda@FreeBSD.org using -f From: kczekirda@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r287724 - in soc2015/kczekirda/mfsbsd: . conf scripts tools tools/roothack MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2015 16:19:12 -0000 Author: kczekirda Date: Mon Jun 29 16:19:04 2015 New Revision: 287724 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=287724 Log: clean mfsbsd Added: soc2015/kczekirda/mfsbsd/ soc2015/kczekirda/mfsbsd/BUILD soc2015/kczekirda/mfsbsd/INSTALL soc2015/kczekirda/mfsbsd/LICENSE soc2015/kczekirda/mfsbsd/Makefile soc2015/kczekirda/mfsbsd/README soc2015/kczekirda/mfsbsd/README.md soc2015/kczekirda/mfsbsd/conf/ soc2015/kczekirda/mfsbsd/conf/authorized_keys.sample soc2015/kczekirda/mfsbsd/conf/boot.config.sample soc2015/kczekirda/mfsbsd/conf/hosts.sample soc2015/kczekirda/mfsbsd/conf/interfaces.conf.sample soc2015/kczekirda/mfsbsd/conf/loader.conf.sample soc2015/kczekirda/mfsbsd/conf/rc.conf.sample soc2015/kczekirda/mfsbsd/conf/rc.local.sample soc2015/kczekirda/mfsbsd/conf/resolv.conf.sample soc2015/kczekirda/mfsbsd/conf/ttys.sample soc2015/kczekirda/mfsbsd/scripts/ soc2015/kczekirda/mfsbsd/scripts/interfaces soc2015/kczekirda/mfsbsd/scripts/mdinit (contents, props changed) soc2015/kczekirda/mfsbsd/scripts/mfsbsd soc2015/kczekirda/mfsbsd/scripts/packages soc2015/kczekirda/mfsbsd/tools/ soc2015/kczekirda/mfsbsd/tools/destroygeom (contents, props changed) soc2015/kczekirda/mfsbsd/tools/doFS.sh (contents, props changed) soc2015/kczekirda/mfsbsd/tools/motd soc2015/kczekirda/mfsbsd/tools/motd.se soc2015/kczekirda/mfsbsd/tools/prunelist soc2015/kczekirda/mfsbsd/tools/prunelist.9 soc2015/kczekirda/mfsbsd/tools/roothack/ soc2015/kczekirda/mfsbsd/tools/roothack/Makefile soc2015/kczekirda/mfsbsd/tools/roothack/roothack.c soc2015/kczekirda/mfsbsd/tools/zfsinstall (contents, props changed) Added: soc2015/kczekirda/mfsbsd/BUILD ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ soc2015/kczekirda/mfsbsd/BUILD Mon Jun 29 16:19:04 2015 (r287724) @@ -0,0 +1,68 @@ +# $Id$ +# +# mfsBSD building instructions +# Copyright (c) 2007-2013 Martin Matuska +# +# Version 2.1 + +BUILDING INSTRUCTIONS: + 1. Configuration + Read hints in the sample configuration files in the conf/ directory, copy + these files to files without .sample ending and make modifications to suit + your needs. + + 2. Additional packages and files + If you want any packages installed, copy the .tbz files that should be + automatically installed into the packages/ directory. + + Add any additional files into the customfiles/ directory. These will be copied + recursively into the root of the boot image. + + WARNING: Your image should not exceed 45MB in total, otherwise kernel panic + may occur on boot-time. To allow bigger images, you have to + recompile your kernel with increased NKPT (e.g. NKPT=120) + + 3. Distribution or custom world and kernel + You may choose to build from a FreeBSD distribution (e.g. CDROM), or by + using make buildworld / buildkernel from your own world and kernel + configuration. + + To use a distribution (e.g. FreeBSD cdrom), you need access to it + (e.g. a mounted FreeBSD ISO via mdconfig) and use BASE=/path/to/distribution + + To use your own but already built world and kernel, use CUSTOM=1 + If you want this script to do make buildworld and make buildkernel for you, + use BUILDWORLD=1 and BUILDKERNEL=1 + +4. Creating images + + You may create three types of output: disc image for use by dd(1), + ISO image or a simple .tar.gz file + + Examples: + + a) disc image + make BASE=/cdrom/usr/freebsd-dist + make BASE=/cdrom/9.2-RELEASE + make CUSTOM=1 BUILDWORLD=1 BUILDKERNEL=1 + + b) bootable ISO file: + make iso BASE=/cdrom/usr/freebsd-dist + make iso BASE=/cdrom/9.2-RELEASE + make iso CUSTOM=1 BUILDWORLD=1 BUILDKERNEL=1 + + c) .tar.gz file: + make tar BASE=/cdrom/usr/freebsd-dist + make tar BASE=/cdrom/9.2-RELEASE + make tar CUSTOM=1 BUILDWORLD=1 BUILDKERNEL=1 + + d) roothack edition: + make iso CUSTOM=1 BUILDWORLD=1 BUILDKERNEL=1 ROOTHACK=1 + + e) special edition (with FreeBSD distribution): + make iso BASE=/cdrom/9.2-RELEASE RELEASE=9.2-RELEASE ARCH=amd64 + + f) GCE-compatible .tar.gz file: + make gce BASE=/cdrom/usr/freebsd-dist + make gce BASE=/cdrom/9.2-RELEASE + make gce CUSTOM=1 BUILDWORLD=1 BUILDKERNEL=1 Added: soc2015/kczekirda/mfsbsd/INSTALL ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ soc2015/kczekirda/mfsbsd/INSTALL Mon Jun 29 16:19:04 2015 (r287724) @@ -0,0 +1,43 @@ +# $Id$ +# +# mfsBSD installation (deployment) instructions +# Copyright (c) 2007-2013 Martin Matuska +# +# Version 2.1 + +BUILD: +For customized build please see the BUILD file + +DEPLOYMENT: + +Scenario 1: +You have a linux server without console access and want to install +FreeBSD on this server. + +a) modify your configuration files (do this properly, or no ssh access) +b) create an image file (e.g. make BASE=/cdrom/9.2-RELEASE) +c) write image with dd to the bootable harddrive of the linux server +d) reboot +e) ssh to your machine and enjoy :) + +Scenario 2: +You want a rescue CD-ROM with a minimal FreeBSD installation that doesn't +need to remain in the tray after booting. + +a) modify your configuration files +b) create an iso image file (e.g. make iso BASE=/cdrom/9.2-RELEASE) +c) burn ISO image onto a writable CD +d) boot from the CD and enjoy :) + +Scenario 3: +You want a rescue partition on your FreeBSD system so you can re-partition +all harddrives remotely. + +a) modify your configuration files +b) create an .tar.gz file (e.g. make tar BASE=/cdrom/9.2-RELEASE) +c) create your slice with sysinstall or fdisk (e.g. ada0s1) +d) auto-label the slice (e.g. bsdlabel -r -w ada0s1 auto) +e) create a filesystem on the slice (e.g. newfs /dev/ada0s1a) +f) mount the slice and extract your .tar.gz file on it +g) configure a bootmanager (e.g. boot0cfg -B -s 1 /dev/ada0) +h) boot from your rescue system and enjoy :) Added: soc2015/kczekirda/mfsbsd/LICENSE ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ soc2015/kczekirda/mfsbsd/LICENSE Mon Jun 29 16:19:04 2015 (r287724) @@ -0,0 +1,25 @@ +The compilation of software known as mfsBSD is distributed under the +following terms: + +Copyright (C) 2007-2013 Martin Matuska. 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 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 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. Added: soc2015/kczekirda/mfsbsd/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ soc2015/kczekirda/mfsbsd/Makefile Mon Jun 29 16:19:04 2015 (r287724) @@ -0,0 +1,573 @@ +# $Id$ +# +# mfsBSD +# Copyright (c) 2007-2013 Martin Matuska +# +# Version 2.1 +# + +# +# User-defined variables +# +BASE?=/cdrom/usr/freebsd-dist +KERNCONF?= GENERIC +MFSROOT_FREE_INODES?=10% +MFSROOT_FREE_BLOCKS?=10% +MFSROOT_MAXSIZE?=64m + +# If you want to build your own kernel and make you own world, you need to set +# -DCUSTOM or CUSTOM=1 +# +# To make buildworld use +# -DCUSTOM -DBUILDWORLD or CUSTOM=1 BUILDWORLD=1 +# +# To make buildkernel use +# -DCUSTOM -DBUILDKERNEL or CUSTOM=1 BUILDKERNEL=1 +# +# For all of this use +# -DCUSTOM -DBUILDWORLD -DBUILDKERNEL or CUSTOM=1 BUILDKERNEL=1 BUILDWORLD=1 +# + +# +# Paths +# +SRC_DIR?=/usr/src +CFGDIR?=conf +SCRIPTSDIR=scripts +PACKAGESDIR?=packages +CUSTOMFILESDIR=customfiles +TOOLSDIR=tools +PRUNELIST?=${TOOLSDIR}/prunelist +PKG_STATIC?=${TOOLSDIR}/pkg-static +# +# Program defaults +# +MKDIR=/bin/mkdir -p +CHOWN=/usr/sbin/chown +CAT=/bin/cat +PWD=/bin/pwd +TAR=/usr/bin/tar +GTAR=/usr/local/bin/gtar +CP=/bin/cp +MV=/bin/mv +RM=/bin/rm +RMDIR=/bin/rmdir +CHFLAGS=/bin/chflags +GZIP=/usr/bin/gzip +TOUCH=/usr/bin/touch +INSTALL=/usr/bin/install +LS=/bin/ls +LN=/bin/ln +FIND=/usr/bin/find +PW=/usr/sbin/pw +SED=/usr/bin/sed +UNAME=/usr/bin/uname +BZIP2=/usr/bin/bzip2 +XZ=/usr/bin/xz +MAKEFS=/usr/sbin/makefs +MKISOFS=/usr/local/bin/mkisofs +SSHKEYGEN=/usr/bin/ssh-keygen +SYSCTL=/sbin/sysctl +PKG=/usr/local/sbin/pkg +# +CURDIR!=${PWD} +WRKDIR?=${CURDIR}/tmp +# +BSDLABEL=bsdlabel +# +DOFS=${TOOLSDIR}/doFS.sh +SCRIPTS=mdinit mfsbsd interfaces packages +BOOTMODULES=acpi ahci +MFSMODULES=geom_mirror geom_nop opensolaris zfs ext2fs snp smbus ipmi ntfs nullfs tmpfs \ + aesni crypto cryptodev geom_eli +# + +.if defined(V) +_v= +.else +_v=@ +.endif + +.if !defined(ARCH) +TARGET!= ${SYSCTL} -n hw.machine_arch +.else +TARGET= ${ARCH} +.endif + +.if !defined(RELEASE) +RELEASE!=${UNAME} -r +.endif + +.if !defined(SE) +IMAGE_PREFIX?= mfsbsd +.else +IMAGE_PREFIX?= mfsbsd-se +.endif + +IMAGE?= ${IMAGE_PREFIX}-${RELEASE}-${TARGET}.img +ISOIMAGE?= ${IMAGE_PREFIX}-${RELEASE}-${TARGET}.iso +TARFILE?= ${IMAGE_PREFIX}-${RELEASE}-${TARGET}.tar +GCEFILE?= ${IMAGE_PREFIX}-${RELEASE}-${TARGET}.tar.gz +_DISTDIR= ${WRKDIR}/dist/${RELEASE}-${TARGET} + +.if !defined(DEBUG) +EXCLUDE=--exclude *.symbols +.else +EXCLUDE= +.endif + +# Roothack stuff +.if defined(ROOTHACK_FILE) && exists(${ROOTHACK_FILE}) +ROOTHACK=1 +ROOTHACK_PREBUILT=1 +_ROOTHACK_FILE=${ROOTHACK_FILE} +.else +_ROOTHACK_FILE=${WRKDIR}/roothack/roothack +.endif + +# Check if we are installing FreeBSD 9 or higher +.if exists(${BASE}/base.txz) && exists(${BASE}/kernel.txz) +FREEBSD9?=yes +BASEFILE?=${BASE}/base.txz +KERNELFILE?=${BASE}/kernel.txz +.else +BASEFILE?=${BASE}/base/base.?? +KERNELFILE?=${BASE}/kernels/generic.?? +.endif + +.if defined(MAKEJOBS) +_MAKEJOBS= -j${MAKEJOBS} +.endif + +_ROOTDIR= ${WRKDIR}/mfs +_BOOTDIR= ${_ROOTDIR}/boot +.if defined(ROOTHACK) +_DESTDIR= ${_ROOTDIR}/rw +MFSROOT_FREE_INODES?=1% +MFSROOT_FREE_BLOCKS?=1% +.else +_DESTDIR= ${_ROOTDIR} +.endif + +.if !defined(SE) +# Environment for custom build +BUILDENV?= env \ + NO_FSCHG=1 \ + WITHOUT_CLANG=1 \ + WITHOUT_DICT=1 \ + WITHOUT_GAMES=1 \ + WITHOUT_LIB32=1 + +# Environment for custom install +INSTALLENV?= ${BUILDENV} \ + WITHOUT_TOOLCHAIN=1 +.endif + +.if defined(FULLDIST) +NO_PRUNE=1 +WITH_RESCUE=1 +.endif + +all: image + +destdir: ${_DESTDIR} ${_BOOTDIR} +${_DESTDIR}: + ${_v}${MKDIR} ${_DESTDIR} && ${CHOWN} root:wheel ${_DESTDIR} + +${_BOOTDIR}: + ${_v}${MKDIR} ${_BOOTDIR}/kernel ${_BOOTDIR}/modules && ${CHOWN} -R root:wheel ${_BOOTDIR} + +extract: destdir ${WRKDIR}/.extract_done +${WRKDIR}/.extract_done: +.if !defined(CUSTOM) + ${_v}if [ ! -d "${BASE}" ]; then \ + echo "Please set the environment variable BASE to a path"; \ + echo "with FreeBSD distribution files (e.g. /cdrom/9.2-RELEASE)"; \ + echo "Examples:"; \ + echo "make BASE=/cdrom/9.2-RELEASE"; \ + echo "make BASE=/cdrom/usr/freebsd-dist"; \ + exit 1; \ + fi +.if !defined(FREEBSD9) + ${_v}for DIR in base kernels; do \ + if [ ! -d "${BASE}/$$DIR" ]; then \ + echo "Cannot find directory \"${BASE}/$$DIR\""; \ + exit 1; \ + fi \ + done +.endif + @echo -n "Extracting base and kernel ..." + ${_v}${CAT} ${BASEFILE} | ${TAR} --unlink -xpzf - -C ${_DESTDIR} +.if !defined(FREEBSD9) + ${_v}${CAT} ${KERNELFILE} | ${TAR} --unlink -xpzf - -C ${_BOOTDIR} + ${_v}${MV} ${_BOOTDIR}/${KERNCONF}/* ${_BOOTDIR}/kernel + ${_v}${RMDIR} ${_BOOTDIR}/${KERNCONF} +.else + ${_v}${CAT} ${KERNELFILE} | ${TAR} --unlink -xpzf - -C ${_ROOTDIR} +.endif + @echo " done" +.endif + ${_v}${TOUCH} ${WRKDIR}/.extract_done + +build: extract ${WRKDIR}/.build_done +${WRKDIR}/.build_done: +.if defined(CUSTOM) +. if defined(BUILDWORLD) + @echo -n "Building world ..." + ${_v}cd ${SRC_DIR} && \ + ${BUILDENV} make ${_MAKEJOBS} buildworld TARGET=${TARGET} +. endif +. if defined(BUILDKERNEL) + @echo -n "Building kernel KERNCONF=${KERNCONF} ..." + ${_v}cd ${SRC_DIR} && make buildkernel KERNCONF=${KERNCONF} TARGET=${TARGET} +. endif +.endif + ${_v}${TOUCH} ${WRKDIR}/.build_done + +install: destdir build ${WRKDIR}/.install_done +${WRKDIR}/.install_done: +.if defined(CUSTOM) + @echo -n "Installing world and kernel KERNCONF=${KERNCONF} ..." + ${_v}cd ${SRC_DIR} && \ + ${INSTALLENV} make installworld distribution DESTDIR="${_DESTDIR}" TARGET=${TARGET} && \ + ${INSTALLENV} make installkernel KERNCONF=${KERNCONF} DESTDIR="${_ROOTDIR}" TARGET=${TARGET} +.endif +.if defined(SE) +. if !defined(CUSTOM) && exists(${BASE}/base.txz) && exists(${BASE}/kernel.txz) + @echo -n "Copying base.txz and kernel.txz ..." +. else + @echo -n "Creating base.txz and kernel.txz ..." +. endif + ${_v}${MKDIR} ${_DISTDIR} +. if defined(ROOTHACK) + ${_v}${CP} -rp ${_BOOTDIR}/kernel ${_DESTDIR}/boot +. endif +. if !defined(CUSTOM) && exists(${BASE}/base.txz) && exists(${BASE}/kernel.txz) + ${_v}${CP} ${BASE}/base.txz ${_DISTDIR}/base.txz + ${_v}${CP} ${BASE}/kernel.txz ${_DISTDIR}/kernel.txz +. else + ${_v}${TAR} -c -C ${_DESTDIR} -J ${EXCLUDE} --exclude "boot/kernel/*" -f ${_DISTDIR}/base.txz . + ${_v}${TAR} -c -C ${_DESTDIR} -J ${EXCLUDE} -f ${_DISTDIR}/kernel.txz boot/kernel +. endif + @echo " done" +. if defined(ROOTHACK) + ${_v}${RM} -rf ${_DESTDIR}/boot/kernel +. endif +.endif + ${_v}${CHFLAGS} -R noschg ${_DESTDIR} > /dev/null 2> /dev/null || exit 0 +.if !defined(WITHOUT_RESCUE) && defined(RESCUE_LINKS) + ${_v}cd ${_DESTDIR} && \ + for FILE in `${FIND} rescue -type f`; do \ + FILE=$${FILE##rescue/}; \ + if [ -f bin/$$FILE ]; then \ + ${RM} bin/$$FILE && \ + ${LN} rescue/$$FILE bin/$$FILE; \ + elif [ -f sbin/$$FILE ]; then \ + ${RM} sbin/$$FILE && \ + ${LN} rescue/$$FILE sbin/$$FILE; \ + elif [ -f usr/bin/$$FILE ]; then \ + ${RM} usr/bin/$$FILE && \ + ${LN} -s ../../rescue/$$FILE usr/bin/$$FILE; \ + elif [ -f usr/sbin/$$FILE ]; then \ + ${RM} usr/sbin/$$FILE && \ + ${LN} -s ../../rescue/$$FILE usr/sbin/$$FILE; \ + fi; \ + done +.endif +.if defined(WITHOUT_RESCUE) + ${_v}cd ${_DESTDIR} && ${RM} -rf rescue +.endif + ${_v}${TOUCH} ${WRKDIR}/.install_done + +prune: install ${WRKDIR}/.prune_done +${WRKDIR}/.prune_done: +.if !defined(NO_PRUNE) + @echo -n "Removing selected files from distribution ..." + ${_v}if [ -f "${PRUNELIST}" ]; then \ + for FILE in `cat ${PRUNELIST}`; do \ + if [ -n "$${FILE}" ]; then \ + ${RM} -rf ${_DESTDIR}/$${FILE}; \ + fi; \ + done; \ + fi + ${_v}${TOUCH} ${WRKDIR}/.prune_done + @echo " done" +.endif + +packages: install prune ${WRKDIR}/.packages_done +${WRKDIR}/.packages_done: + @echo -n "Installing pkgng ..." +. if !exists(${PKG_STATIC}) + @echo "pkg-static not found at: ${PKG_STATIC}" + ${_v}exit 1 +. endif + ${_v}mkdir -p ${_DESTDIR}/usr/local/sbin + ${_v}${INSTALL} -o root -g wheel -m 0755 ${PKG_STATIC} ${_DESTDIR}/usr/local/sbin/ + ${_v}${LN} -sf pkg-static ${_DESTDIR}/usr/local/sbin/pkg + @echo " done" + ${_v}if [ -d "${PACKAGESDIR}" ]; then \ + echo -n "Copying user packages ..."; \ + ${CP} -rf ${PACKAGESDIR} ${_DESTDIR}; \ + echo " done"; \ + fi + ${_v}if [ -d "${_DESTDIR}/packages" ]; then \ + echo -n "Installing user packages ..."; \ + fi + ${_v}if [ -d "${_DESTDIR}/packages" ]; then \ + cd ${_DESTDIR}/packages && for _FILE in *; do \ + _FILES="$${_FILES} /packages/$${_FILE}"; \ + done; \ + ${PKG} -c ${_DESTDIR} add -M $${_FILES}; \ + fi + ${_v}if [ -d "${_DESTDIR}/packages" ]; then \ + ${RM} -rf ${_DESTDIR}/packages; \ + echo " done"; \ + fi + ${_v}${TOUCH} ${WRKDIR}/.packages_done + +config: install ${WRKDIR}/.config_done +${WRKDIR}/.config_done: + @echo -n "Installing configuration scripts and files ..." +.for FILE in boot.config loader.conf rc.conf rc.local resolv.conf interfaces.conf ttys +. if !exists(${CFGDIR}/${FILE}) && !exists(${CFGDIR}/${FILE}.sample) + @echo "Missing ${CFGDIR}/${FILE}.sample" && exit 1 +. endif +.endfor +.if defined(SE) + ${_v}${INSTALL} -m 0644 ${TOOLSDIR}/motd.se ${_DESTDIR}/etc/motd + ${_v}${INSTALL} -d -m 0755 ${_DESTDIR}/cdrom +.else + ${_v}${INSTALL} -m 0644 ${TOOLSDIR}/motd ${_DESTDIR}/etc/motd +.endif + ${_v}${MKDIR} ${_DESTDIR}/stand ${_DESTDIR}/etc/rc.conf.d + ${_v}if [ -f "${CFGDIR}/boot.config" ]; then \ + ${INSTALL} -m 0644 ${CFGDIR}/boot.config ${_ROOTDIR}/boot.config; \ + else \ + ${INSTALL} -m 0644 ${CFGDIR}/boot.config.sample ${_ROOTDIR}/boot.config; \ + fi + ${_v}if [ -f "${CFGDIR}/loader.conf" ]; then \ + ${INSTALL} -m 0644 ${CFGDIR}/loader.conf ${_BOOTDIR}/loader.conf; \ + else \ + ${INSTALL} -m 0644 ${CFGDIR}/loader.conf.sample ${_BOOTDIR}/loader.conf; \ + fi + ${_v}if [ -f "${CFGDIR}/rc.local" ]; then \ + ${INSTALL} -m 0744 ${CFGDIR}/rc.local ${_DESTDIR}/etc/rc.local; \ + else \ + ${INSTALL} -m 0744 ${CFGDIR}/rc.local.sample ${_DESTDIR}/etc/rc.local; \ + fi +.for FILE in rc.conf ttys + ${_v}if [ -f "${CFGDIR}/${FILE}" ]; then \ + ${INSTALL} -m 0644 ${CFGDIR}/${FILE} ${_DESTDIR}/etc/${FILE}; \ + else \ + ${INSTALL} -m 0644 ${CFGDIR}/${FILE}.sample ${_DESTDIR}/etc/${FILE}; \ + fi +.endfor +.if defined(ROOTHACK) + @echo 'root_rw_mount="NO"' >> ${_DESTDIR}/etc/rc.conf +.endif + ${_v}if [ -f "${CFGDIR}/resolv.conf" ]; then \ + ${INSTALL} -m 0644 ${CFGDIR}/resolv.conf ${_DESTDIR}/etc/resolv.conf; \ + fi + ${_v}if [ -f "${CFGDIR}/interfaces.conf" ]; then \ + ${INSTALL} -m 0644 ${CFGDIR}/interfaces.conf ${_DESTDIR}/etc/rc.conf.d/interfaces; \ + fi + ${_v}if [ -f "${CFGDIR}/authorized_keys" ]; then \ + ${INSTALL} -d -m 0700 ${_DESTDIR}/root/.ssh; \ + ${INSTALL} ${CFGDIR}/authorized_keys ${_DESTDIR}/root/.ssh/; \ + fi + ${_v}${MKDIR} ${_DESTDIR}/root/bin + ${_v}${INSTALL} ${TOOLSDIR}/zfsinstall ${_DESTDIR}/root/bin + ${_v}${INSTALL} ${TOOLSDIR}/destroygeom ${_DESTDIR}/root/bin + ${_v}for SCRIPT in ${SCRIPTS}; do \ + ${INSTALL} -m 0555 ${SCRIPTSDIR}/$${SCRIPT} ${_DESTDIR}/etc/rc.d/; \ + done +# ${_v}${SED} -I -E 's/\(ttyv[2-7].*\)on /\1off/g' ${_DESTDIR}/etc/ttys +.if !defined(ROOTHACK) + ${_v}echo "/dev/md0 / ufs rw 0 0" > ${_DESTDIR}/etc/fstab + ${_v}echo "tmpfs /tmp tmpfs rw,mode=1777 0 0" >> ${_DESTDIR}/etc/fstab +.else + ${_v}${TOUCH} ${_DESTDIR}/etc/fstab +.endif +.if defined(ROOTPW) + ${_v}echo ${ROOTPW} | ${PW} -V ${_DESTDIR}/etc usermod root -h 0 +.endif + ${_v}echo PermitRootLogin yes >> ${_DESTDIR}/etc/ssh/sshd_config +.if exists(${CFGDIR}/hosts) + ${_v}${INSTALL} -m 0644 ${CFGDIR}/hosts ${_DESTDIR}/etc/hosts +.elif exists(${CFGDIR}/hosts.sample) + ${_v}${INSTALL} -m 0644 ${CFGDIR}/hosts.sample ${_DESTDIR}/etc/hosts +.else + @echo "Missing ${CFGDIR}/hosts.sample" && exit 1 +.endif + ${_v}${TOUCH} ${WRKDIR}/.config_done + @echo " done" + +genkeys: config ${WRKDIR}/.genkeys_done +${WRKDIR}/.genkeys_done: + @echo -n "Generating SSH host keys ..." + ${_v}${SSHKEYGEN} -t rsa1 -b 1024 -f ${_DESTDIR}/etc/ssh/ssh_host_key -N '' > /dev/null + ${_v}${SSHKEYGEN} -t dsa -f ${_DESTDIR}/etc/ssh/ssh_host_dsa_key -N '' > /dev/null + ${_v}${SSHKEYGEN} -t rsa -f ${_DESTDIR}/etc/ssh/ssh_host_rsa_key -N '' > /dev/null + ${_v}${TOUCH} ${WRKDIR}/.genkeys_done + @echo " done" + +customfiles: config ${WRKDIR}/.customfiles_done +${WRKDIR}/.customfiles_done: +.if exists(${CUSTOMFILESDIR}) + @echo "Copying user files ..." + ${_v}${CP} -afv ${CUSTOMFILESDIR}/ ${_DESTDIR}/ + ${_v}${TOUCH} ${WRKDIR}/.customfiles_done + @echo " done" +.endif + +compress-usr: install prune config genkeys customfiles boot packages ${WRKDIR}/.compress-usr_done +${WRKDIR}/.compress-usr_done: +.if !defined(ROOTHACK) + @echo -n "Compressing usr ..." + ${_v}${TAR} -c -J -C ${_DESTDIR} -f ${_DESTDIR}/.usr.tar.xz usr + ${_v}${RM} -rf ${_DESTDIR}/usr && ${MKDIR} ${_DESTDIR}/usr +.else + @echo -n "Compressing root ..." + ${_v}${TAR} -c -C ${_ROOTDIR} -f - rw | \ + ${XZ} -v -c > ${_ROOTDIR}/root.txz + ${_v}${RM} -rf ${_DESTDIR} && ${MKDIR} ${_DESTDIR} +.endif + ${_v}${TOUCH} ${WRKDIR}/.compress-usr_done + @echo " done" + +roothack: ${WRKDIR}/roothack/roothack +${WRKDIR}/roothack/roothack: +.if !defined(ROOTHACK_PREBUILT) + ${_v}${MKDIR} -p ${WRKDIR}/roothack + ${_v}cd ${TOOLSDIR}/roothack && env MAKEOBJDIR=${WRKDIR}/roothack make +.endif + +install-roothack: compress-usr roothack ${WRKDIR}/.install-roothack_done +${WRKDIR}/.install-roothack_done: + @echo -n "Installing roothack ..." + ${_v}${MKDIR} -p ${_ROOTDIR}/dev ${_ROOTDIR}/sbin + ${_v}${INSTALL} -m 555 ${_ROOTHACK_FILE} ${_ROOTDIR}/sbin/init + ${_v}${TOUCH} ${WRKDIR}/.install-roothack_done + @echo " done" + +boot: install prune ${WRKDIR}/.boot_done +${WRKDIR}/.boot_done: + @echo -n "Configuring boot environment ..." + ${_v}${MKDIR} ${WRKDIR}/disk/boot && ${CHOWN} root:wheel ${WRKDIR}/disk + ${_v}${RM} -f ${_BOOTDIR}/kernel/kernel.debug + ${_v}${CP} -rp ${_BOOTDIR}/kernel ${WRKDIR}/disk/boot +.for FILE in boot defaults loader loader.help *.rc *.4th + ${_v}${CP} -rp ${_DESTDIR}/boot/${FILE} ${WRKDIR}/disk/boot +.endfor + ${_v}${RM} -rf ${WRKDIR}/disk/boot/kernel/*.ko ${WRKDIR}/disk/boot/kernel/*.symbols +.if defined(DEBUG) + ${_v}test -f ${_BOOTDIR}/kernel/kernel.symbols \ + && ${INSTALL} -m 0555 ${_BOOTDIR}/kernel/kernel.symbols ${WRKDIR}/disk/boot/kernel >/dev/null 2>/dev/null || exit 0 +.endif +.for FILE in ${BOOTMODULES} + ${_v}test -f ${_BOOTDIR}/kernel/${FILE}.ko \ + && ${INSTALL} -m 0555 ${_BOOTDIR}/kernel/${FILE}.ko ${WRKDIR}/disk/boot/kernel >/dev/null 2>/dev/null || exit 0 +. if defined(DEBUG) + ${_v}test -f ${_BOOTDIR}/kernel/${FILE}.ko \ + && ${INSTALL} -m 0555 ${_BOOTDIR}/kernel/${FILE}.ko.symbols ${WRKDIR}/disk/boot/kernel >/dev/null 2>/dev/null || exit 0 +. endif +.endfor + ${_v}${MKDIR} -p ${_DESTDIR}/boot/modules +.for FILE in ${MFSMODULES} + ${_v}test -f ${_BOOTDIR}/kernel/${FILE}.ko \ + && ${INSTALL} -m 0555 ${_BOOTDIR}/kernel/${FILE}.ko ${_DESTDIR}/boot/modules >/dev/null 2>/dev/null || exit 0 +. if defined(DEBUG) + ${_v}test -f ${_BOOTDIR}/kernel/${FILE}.ko.symbols \ + && ${INSTALL} -m 0555 ${_BOOTDIR}/kernel/${FILE}.ko.symbols ${_DESTDIR}/boot/modules >/dev/null 2>/dev/null || exit 0 +. endif +.endfor +.if defined(ROOTHACK) + @echo -n "Installing tmpfs module for roothack ..." + ${_v}${MKDIR} -p ${_ROOTDIR}/boot/modules + ${_v}${INSTALL} -m 0666 ${_BOOTDIR}/kernel/tmpfs.ko ${_ROOTDIR}/boot/modules + @echo " done" +.endif + ${_v}${RM} -rf ${_BOOTDIR}/kernel ${_BOOTDIR}/*.symbols + ${_v}${TOUCH} ${WRKDIR}/.boot_done + @echo " done" + +.if defined(ROOTHACK) +mfsroot: install prune config genkeys customfiles boot compress-usr packages install-roothack ${WRKDIR}/.mfsroot_done +.else +mfsroot: install prune config genkeys customfiles boot compress-usr packages ${WRKDIR}/.mfsroot_done +.endif +${WRKDIR}/.mfsroot_done: + @echo -n "Creating and compressing mfsroot ..." + ${_v}${MKDIR} ${WRKDIR}/mnt + ${_v}${MAKEFS} -t ffs -m ${MFSROOT_MAXSIZE} -f ${MFSROOT_FREE_INODES} -b ${MFSROOT_FREE_BLOCKS} ${WRKDIR}/disk/mfsroot ${_ROOTDIR} > /dev/null + ${_v}${RM} -rf ${WRKDIR}/mnt ${_DESTDIR} + ${_v}${GZIP} -9 -f ${WRKDIR}/disk/mfsroot + ${_v}${GZIP} -9 -f ${WRKDIR}/disk/boot/kernel/kernel + ${_v}if [ -f "${CFGDIR}/loader.conf" ]; then \ + ${INSTALL} -m 0644 ${CFGDIR}/loader.conf ${WRKDIR}/disk/boot/loader.conf; \ + else \ + ${INSTALL} -m 0644 ${CFGDIR}/loader.conf.sample ${WRKDIR}/disk/boot/loader.conf; \ + fi + ${_v}${TOUCH} ${WRKDIR}/.mfsroot_done + @echo " done" + +fbsddist: install prune config genkeys customfiles boot compress-usr packages mfsroot ${WRKDIR}/.fbsddist_done +${WRKDIR}/.fbsddist_done: +.if defined(SE) + @echo -n "Copying FreeBSD installation image ..." + ${_v}${CP} -rf ${_DISTDIR} ${WRKDIR}/disk/ + @echo " done" +.endif + ${_v}${TOUCH} ${WRKDIR}/.fbsddist_done + +image: install prune config genkeys customfiles boot compress-usr mfsroot fbsddist ${IMAGE} +${IMAGE}: + @echo -n "Creating image file ..." + ${_v}${MKDIR} ${WRKDIR}/mnt ${WRKDIR}/trees/base/boot + ${_v}${INSTALL} -m 0444 ${WRKDIR}/disk/boot/boot ${WRKDIR}/trees/base/boot/ + ${_v}${DOFS} ${BSDLABEL} "" ${WRKDIR}/disk.img ${WRKDIR} ${WRKDIR}/mnt 0 ${WRKDIR}/disk 80000 auto > /dev/null 2> /dev/null + ${_v}${RM} -rf ${WRKDIR}/mnt ${WRKDIR}/trees + ${_v}${MV} ${WRKDIR}/disk.img ${IMAGE} + @echo " done" + ${_v}${LS} -l ${IMAGE} + +gce: install prune config genkeys customfiles boot compress-usr mfsroot fbsddist ${IMAGE} ${GCEFILE} +${GCEFILE}: + @echo -n "Creating GCE-compatible tarball..." +.if !exists(${GTAR}) + ${_v}echo "${GTAR} is missing, please install archivers/gtar first"; exit 1 +.else + ${_v}${GTAR} -C ${CURDIR} -Szcf ${GCEFILE} --transform='s/${IMAGE}/disk.raw/' ${IMAGE} + @echo " GCE tarball built" + ${_v}${LS} -l ${GCEFILE} +.endif + +iso: install prune config genkeys customfiles boot compress-usr mfsroot fbsddist ${ISOIMAGE} +${ISOIMAGE}: + @echo -n "Creating ISO image ..." +.if defined(USE_MKISOFS) +. if !exists(${MKISOFS}) + @echo "${MKISOFS} is missing, please install sysutils/cdrtools first"; exit 1 +. else + ${_v}${MKISOFS} -b boot/cdboot -no-emul-boot -r -J -V mfsBSD -o ${ISOIMAGE} ${WRKDIR}/disk > /dev/null 2> /dev/null +. endif +.else + ${_v}${MAKEFS} -t cd9660 -o rockridge,bootimage=i386\;/boot/cdboot,no-emul-boot,label=mfsBSD ${ISOIMAGE} ${WRKDIR}/disk +.endif + @echo " done" + ${_v}${LS} -l ${ISOIMAGE} + +tar: install prune config customfiles boot compress-usr mfsroot fbsddist ${TARFILE} +${TARFILE}: + @echo -n "Creating tar file ..." + ${_v}cd ${WRKDIR}/disk && ${FIND} . -depth 1 \ + -exec ${TAR} -r -f ${CURDIR}/${TARFILE} {} \; + @echo " done" + ${_v}${LS} -l ${TARFILE} + +clean-roothack: + ${_v}${RM} -rf ${WRKDIR}/roothack + +clean: clean-roothack + ${_v}if [ -d ${WRKDIR} ]; then ${CHFLAGS} -R noschg ${WRKDIR}; fi + ${_v}cd ${WRKDIR} && ${RM} -rf mfs mnt disk dist trees .*_done Added: soc2015/kczekirda/mfsbsd/README ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ soc2015/kczekirda/mfsbsd/README Mon Jun 29 16:19:04 2015 (r287724) @@ -0,0 +1,31 @@ +# $Id$ +# +# mfsBSD README +# Copyright (c) 2007-2013 Martin Matuska +# +# Version 2.1 + +DESCRIPTION: +This is a set of scripts that generates a bootable image, ISO file or boot +files only, that create a working minimal installation of FreeBSD. This +minimal installation gets completely loaded into memory. + +The image may be written directly using dd(1) onto any bootable block device, +e.g. a hard disk or a USB stick e.g. /dev/da0, or a bootable slice only, +e.g. /dev/ada0s1 + +REQUIREMENTS (build): + - FreeBSD 8 or higher installed, tested on i386 or amd64 + - Base and kernel from a FreeBSD 8 or higher distribution + (release or snapshots, e.g mounted CDROM disc1 or ISO file) + +REQUIREMENTS (run): + - a minimum of 512MB system memory + +See BUILD and INSTALL files for building and installation instructions. + +--------------------------------------------------------------- +Project homepage: http://mfsbsd.vx.sk + +This project is based on the ideas of the depenguinator project: +http://www.daemonology.net/depenguinator/ Added: soc2015/kczekirda/mfsbsd/README.md ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ soc2015/kczekirda/mfsbsd/README.md Mon Jun 29 16:19:04 2015 (r287724) @@ -0,0 +1,31 @@ +mfsBSD +========= + +Copyright (c) 2007-2013 Martin Matuska + +## Description + +This is a set of scripts that generates a bootable image, ISO file or boot +files only, that create a working minimal installation of FreeBSD. This +minimal installation gets completely loaded into memory. + +The image may be written directly using dd(1) onto any bootable block device, +e.g. a hard disk or a USB stick e.g. /dev/da0, or a bootable slice only, +e.g. /dev/ada0s1 + +## Build-time requirements + - FreeBSD 8 or higher installed, tested on i386 or amd64 + - Base and kernel from a FreeBSD 8 or higher distribution + (release or snapshots, e.g mounted CDROM disc1 or ISO file) + +## Runtime requirements + - a minimum of 512MB system memory + +## Other information + +See BUILD and INSTALL files for building and installation instructions. + +Project homepage: http://mfsbsd.vx.sk + +This project is based on the ideas of the depenguinator project: +http://www.daemonology.net/depenguinator/ Added: soc2015/kczekirda/mfsbsd/conf/authorized_keys.sample ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ soc2015/kczekirda/mfsbsd/conf/authorized_keys.sample Mon Jun 29 16:19:04 2015 (r287724) @@ -0,0 +1,2 @@ +# $Id$ +# Public SSH key(s) for root authorization Added: soc2015/kczekirda/mfsbsd/conf/boot.config.sample ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ soc2015/kczekirda/mfsbsd/conf/boot.config.sample Mon Jun 29 16:19:04 2015 (r287724) @@ -0,0 +1 @@ +-D Added: soc2015/kczekirda/mfsbsd/conf/hosts.sample ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ soc2015/kczekirda/mfsbsd/conf/hosts.sample Mon Jun 29 16:19:04 2015 (r287724) @@ -0,0 +1,6 @@ +# $Id$ +# +# The file will be the /etc/hosts file in your image +# +::1 localhost localhost.my.domain +127.0.0.1 localhost localhost.my.domain Added: soc2015/kczekirda/mfsbsd/conf/interfaces.conf.sample ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ soc2015/kczekirda/mfsbsd/conf/interfaces.conf.sample Mon Jun 29 16:19:04 2015 (r287724) @@ -0,0 +1,16 @@ +# $Id$ +# +# If you don't know the exact interface names and/or order in which they +# appear, you can configure interfaces depending on their MAC addresses here. + +# mac_interfaces should be a user-defined list of virtual interface names. +#mac_interfaces="ext1 ext2" + +# ifconfig_FOO_mac should be the MAC address of interface FOO +#ifconfig_ext1_mac="00:00:00:00:00:00" +#ifconfig_ext2_mac="ff:ff:ff:ff:ff:ff" + +# ifconfig_FOO should be configured like the real interface behind FOO +# for more information, see ifconfig(8) +#ifconfig_ext1="inet 192.168.0.1/24" +#ifconfig_ext2="inet 192.168.1.1/24" Added: soc2015/kczekirda/mfsbsd/conf/loader.conf.sample ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ soc2015/kczekirda/mfsbsd/conf/loader.conf.sample Mon Jun 29 16:19:04 2015 (r287724) @@ -0,0 +1,56 @@ +# $Id$ +# +# This is the /boot/loader.conf of your image +# +# Custom mfsbsd variables +# +# Set all auto-detected interfaces to DHCP +#mfsbsd.autodhcp="YES" +# +# Define a new root password +#mfsbsd.rootpw="foobar" +# +# Alternatively define a root password hash like in master.passwd +# NOTICE: replace '$' characters with '%' +#mfsbsd.rootpwhash="" +# +# Add additional nameservers here +#mfsbsd.nameservers="192.168.1.1 192.168.1.2" +# +# Change system hostname +#mfsbsd.hostname="mfsbsd" +# +# List of interfaces to be set +#mfsbsd.interfaces="em0 em1" +# +# Individual configuration of each interface +#mfsbsd.ifconfig_em0="DHCP" +#mfsbsd.ifconfig_em1="DHCP" +# +# List of special interfaces to be created +#mfsbsd.cloned_interfaces="" +# +# List of mac_interfaces (see interfaces.conf.sample) +#mfsbsd.mac_interfaces="eth0" +#mfsbsd.ifconfig_eth0_mac="xx:xx:xx:xx:xx:xx" +#mfsbsd.ifconfig_eth0="inet 192.168.1.10/24" +# +# Default router +#mfsbsd.defaultrouter="192.168.1.1" +# +# List of static routes and their definitions +#mfsbsd.static_routes="r1 r2" +#mfsbsd.route_r1="-net 192.168.2 192.168.1.1" +#mfsbsd.route_r2="-net 192.168.3 192.168.1.1" + +# +# Do not change anything here until you know what you are doing +# +geom_uzip_load="YES" +tmpfs_load="YES" +mfs_load="YES" +mfs_type="mfs_root" +mfs_name="/mfsroot" +ahci_load="YES" +vfs.root.mountfrom="ufs:/dev/md0" +mfsbsd.autodhcp="YES" Added: soc2015/kczekirda/mfsbsd/conf/rc.conf.sample ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ soc2015/kczekirda/mfsbsd/conf/rc.conf.sample Mon Jun 29 16:19:04 2015 (r287724) @@ -0,0 +1,24 @@ +# $Id$ +# +# This will be the rc.conf file in your image. +# +# You may set anything you want here, including network interfaces. +# If you are not sure about network interface names and/or their order, +# see the interfaces.conf file in this directory. +# +# Set this to any desired hostname +hostname="mfsbsd" +# +# You need a gateway defined for a working network setup +#defaultrouter="192.168.0.254" +# +# You may configure a network interface here, you may use "DHCP" as well +#ifconfig_em0="inet 192.168.0.1 netmask 255.255.255.0" +#ifconfig_rl0="DHCP" +# +# Change the values below only if you know what you are doing! +# +sshd_enable="YES" +sendmail_enable="NONE" +cron_enable="NO" +local_enable="YES" Added: soc2015/kczekirda/mfsbsd/conf/rc.local.sample ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ soc2015/kczekirda/mfsbsd/conf/rc.local.sample Mon Jun 29 16:19:04 2015 (r287724) @@ -0,0 +1,2 @@ +# sample rc.local +# add your code below \ No newline at end of file Added: soc2015/kczekirda/mfsbsd/conf/resolv.conf.sample ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ soc2015/kczekirda/mfsbsd/conf/resolv.conf.sample Mon Jun 29 16:19:04 2015 (r287724) @@ -0,0 +1,6 @@ +# $Id$ +# +# The file will be the /etc/resolv.conf file in your image +# +#domain com +#nameserver 192.168.0.254 Added: soc2015/kczekirda/mfsbsd/conf/ttys.sample ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ soc2015/kczekirda/mfsbsd/conf/ttys.sample Mon Jun 29 16:19:04 2015 (r287724) @@ -0,0 +1,278 @@ +# $Id$ +# +console none unknown off secure +# +ttyv0 "/usr/libexec/getty Pc" cons25 on secure +# Virtual terminals +ttyv1 "/usr/libexec/getty Pc" cons25 on secure +ttyv2 "/usr/libexec/getty Pc" cons25 off secure +ttyv3 "/usr/libexec/getty Pc" cons25 off secure +ttyv4 "/usr/libexec/getty Pc" cons25 off secure +ttyv5 "/usr/libexec/getty Pc" cons25 off secure +ttyv6 "/usr/libexec/getty Pc" cons25 off secure +ttyv7 "/usr/libexec/getty Pc" cons25 off secure +ttyv8 "/usr/local/bin/xdm -nodaemon" xterm off secure +# Serial terminals +ttyu0 "/usr/libexec/getty std.19200" dialup on secure +ttyu1 "/usr/libexec/getty std.19200" dialup on secure +ttyu2 "/usr/libexec/getty std.9600" dialup off secure +ttyu3 "/usr/libexec/getty std.9600" dialup off secure +# Dumb console +dcons "/usr/libexec/getty std.9600" vt100 off secure +# Pseudo terminals +ttyp0 none network +ttyp1 none network +ttyp2 none network +ttyp3 none network +ttyp4 none network +ttyp5 none network +ttyp6 none network +ttyp7 none network +ttyp8 none network +ttyp9 none network +ttypa none network +ttypb none network +ttypc none network +ttypd none network +ttype none network +ttypf none network +ttypg none network +ttyph none network +ttypi none network +ttypj none network +ttypk none network +ttypl none network +ttypm none network +ttypn none network +ttypo none network +ttypp none network +ttypq none network +ttypr none network +ttyps none network +ttypt none network +ttypu none network +ttypv none network +ttyq0 none network +ttyq1 none network +ttyq2 none network +ttyq3 none network +ttyq4 none network +ttyq5 none network +ttyq6 none network +ttyq7 none network +ttyq8 none network +ttyq9 none network +ttyqa none network +ttyqb none network +ttyqc none network +ttyqd none network +ttyqe none network +ttyqf none network *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-soc-all@freebsd.org Mon Jun 29 17:10:13 2015 Return-Path: Delivered-To: svn-soc-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1CA969905D7 for ; Mon, 29 Jun 2015 17:10:13 +0000 (UTC) (envelope-from kczekirda@FreeBSD.org) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E86A719F2 for ; Mon, 29 Jun 2015 17:10:12 +0000 (UTC) (envelope-from kczekirda@FreeBSD.org) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5THACGM028801 for ; Mon, 29 Jun 2015 17:10:12 GMT (envelope-from kczekirda@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.9/8.14.9/Submit) id t5THACMw028783 for svn-soc-all@FreeBSD.org; Mon, 29 Jun 2015 17:10:12 GMT (envelope-from kczekirda@FreeBSD.org) Date: Mon, 29 Jun 2015 17:10:12 GMT Message-Id: <201506291710.t5THACMw028783@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to kczekirda@FreeBSD.org using -f From: kczekirda@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r287725 - soc2015/kczekirda/mfsbsd/tools MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2015 17:10:13 -0000 Author: kczekirda Date: Mon Jun 29 17:10:11 2015 New Revision: 287725 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=287725 Log: prunelist Modified: soc2015/kczekirda/mfsbsd/tools/prunelist Modified: soc2015/kczekirda/mfsbsd/tools/prunelist ============================================================================== --- soc2015/kczekirda/mfsbsd/tools/prunelist Mon Jun 29 16:19:04 2015 (r287724) +++ soc2015/kczekirda/mfsbsd/tools/prunelist Mon Jun 29 17:10:11 2015 (r287725) @@ -1,49 +1,46 @@ -usr/bin/c++ -usr/bin/c++filt -usr/bin/g++ -usr/bin/c89 -usr/bin/c99 -usr/bin/CC -usr/bin/cc -usr/bin/clang -usr/bin/clang++ -usr/bin/clang-cpp -usr/bin/clang-tblgen -usr/bin/cpp -usr/bin/gcc -usr/bin/yacc -usr/bin/f77 -usr/bin/byacc -usr/bin/addr2line -usr/bin/ar +#usr/bin/c++ +#usr/bin/c++filt +#usr/bin/g++ +#usr/bin/c89 +#usr/bin/c99 +#usr/bin/CC +#usr/bin/cc +#usr/bin/clang +#usr/bin/clang++ +#usr/bin/clang-cpp +#usr/bin/clang-tblgen +#usr/bin/cpp +#usr/bin/gcc +#usr/bin/yacc +#usr/bin/f77 +#usr/bin/byacc +#usr/bin/addr2line +#usr/bin/ar usr/bin/gnu-ar usr/bin/gnu-ranlib -usr/bin/as -usr/bin/gasp -usr/bin/gdb -usr/bin/gdbreplay -usr/bin/ld -usr/bin/nm -usr/bin/objcopy -usr/bin/objdump -usr/bin/ranlib -usr/bin/readelf -usr/bin/size -usr/bin/strip -usr/bin/gdbtui -usr/bin/kgdb +#usr/bin/as +#usr/bin/gasp +#usr/bin/gdb +#usr/bin/gdbreplay +#usr/bin/ld +#usr/bin/nm +#usr/bin/objcopy +#usr/bin/objdump +#usr/bin/ranlib +#usr/bin/readelf +#usr/bin/size +#usr/bin/strip +#usr/bin/gdbtui +#usr/bin/kgdb +#usr/include usr/games -usr/include -usr/lib32 -usr/lib/*.a -usr/lib/private/*.a -usr/lib/private/libunbound* -usr/libexec/cc1 -usr/libexec/cc1obj -usr/libexec/cc1plus -usr/libexec/f771 -usr/sbin/unbound* -usr/share/dict +#usr/lib32 +#usr/lib/*.a +#usr/libexec/cc1 +#usr/libexec/cc1obj +#usr/libexec/cc1plus +#usr/libexec/f771 +#usr/share/dict usr/share/doc usr/share/examples usr/share/info @@ -51,3 +48,19 @@ usr/share/man usr/share/openssl usr/share/nls +usr/bin/dig +#usr/bin/host +#usr/bin/nslookup +usr/bin/nsupdate +usr/sbin/dnssec-dsfromkey +usr/sbin/dnssec-signzone +#usr/sbin/lwresd +#usr/sbin/named +usr/sbin/named-checkconf +usr/sbin/named-checkzone +usr/sbin/named-compilezone +usr/sbin/dnssec-keygen +usr/sbin/dnssec-keyfromlabel +usr/sbin/rndc-confgen +usr/sbin/named-reconfig +usr/sbin/named-reload From owner-svn-soc-all@freebsd.org Mon Jun 29 17:11:54 2015 Return-Path: Delivered-To: svn-soc-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B15739906A8 for ; Mon, 29 Jun 2015 17:11:54 +0000 (UTC) (envelope-from kczekirda@FreeBSD.org) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A28051C32 for ; Mon, 29 Jun 2015 17:11:54 +0000 (UTC) (envelope-from kczekirda@FreeBSD.org) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5THBsrZ034646 for ; Mon, 29 Jun 2015 17:11:54 GMT (envelope-from kczekirda@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.9/8.14.9/Submit) id t5THBsC0034643 for svn-soc-all@FreeBSD.org; Mon, 29 Jun 2015 17:11:54 GMT (envelope-from kczekirda@FreeBSD.org) Date: Mon, 29 Jun 2015 17:11:54 GMT Message-Id: <201506291711.t5THBsC0034643@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to kczekirda@FreeBSD.org using -f From: kczekirda@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r287726 - soc2015/kczekirda/mfsbsd MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2015 17:11:54 -0000 Author: kczekirda Date: Mon Jun 29 17:11:53 2015 New Revision: 287726 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=287726 Log: usr to tmpfs Modified: soc2015/kczekirda/mfsbsd/Makefile Modified: soc2015/kczekirda/mfsbsd/Makefile ============================================================================== --- soc2015/kczekirda/mfsbsd/Makefile Mon Jun 29 17:10:11 2015 (r287725) +++ soc2015/kczekirda/mfsbsd/Makefile Mon Jun 29 17:11:53 2015 (r287726) @@ -385,6 +385,7 @@ .if !defined(ROOTHACK) ${_v}echo "/dev/md0 / ufs rw 0 0" > ${_DESTDIR}/etc/fstab ${_v}echo "tmpfs /tmp tmpfs rw,mode=1777 0 0" >> ${_DESTDIR}/etc/fstab + ${_v}echo "tmpfs /usr tmpfs rw,mode=1755 0 0" >> ${_DESTDIR}/etc/fstab .else ${_v}${TOUCH} ${_DESTDIR}/etc/fstab .endif From owner-svn-soc-all@freebsd.org Mon Jun 29 19:03:16 2015 Return-Path: Delivered-To: svn-soc-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3F28F98F975 for ; Mon, 29 Jun 2015 19:03:16 +0000 (UTC) (envelope-from roam@FreeBSD.org) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2F51115A4 for ; Mon, 29 Jun 2015 19:03:16 +0000 (UTC) (envelope-from roam@FreeBSD.org) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5TJ3Gcn067428 for ; Mon, 29 Jun 2015 19:03:16 GMT (envelope-from roam@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.9/8.14.9/Submit) id t5TJ3DMa067409 for svn-soc-all@FreeBSD.org; Mon, 29 Jun 2015 19:03:13 GMT (envelope-from roam@FreeBSD.org) Date: Mon, 29 Jun 2015 19:03:13 GMT Message-Id: <201506291903.t5TJ3DMa067409@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to roam@FreeBSD.org using -f From: roam@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r287735 - in soc2015/roam: . ayiya_resp ng_ayiya MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2015 19:03:16 -0000 Author: roam Date: Mon Jun 29 19:03:13 2015 New Revision: 287735 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=287735 Log: Add a userland responder to non-forward packets. ng_ayiya: - send all packets that do not contain forwarded IPv6 data down the "control" hook if it's connected. - break out the signing part of ayiya_build() into ayiya_sign() - move the m_adj() call to remove the AYIYA header from ayiya_verify() to the consumer, the rcvdata function, since we do need the full AYIYA packet to forward down the control hook - add constants for the AYIYA opcodes and use them ayiya_resp: - write a proof-of-concept C program that uses libnetgraph to connect to the "control" hook, wait for remote packets, interpret them, and send packets of its own ObQuote: "Do you, do you, do you, do you wanna dance?" Added: soc2015/roam/Makefile soc2015/roam/ayiya_resp/ soc2015/roam/ayiya_resp/Makefile soc2015/roam/ayiya_resp/main.c Modified: soc2015/roam/ng_ayiya/ng_ayiya.4 soc2015/roam/ng_ayiya/ng_ayiya.c soc2015/roam/ng_ayiya/ng_ayiya.h Added: soc2015/roam/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ soc2015/roam/Makefile Mon Jun 29 19:03:13 2015 (r287735) @@ -0,0 +1,42 @@ +# Copyright (c) 2015 Peter Pentchev +# 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. + +SUBDIR= ayiya_resp ng_ayiya + +.include + +down: + cd ${.CURDIR}/ng_ayiya && ${MAKE} down + +up: + cd ${.CURDIR}/ng_ayiya && ${MAKE} up + +tic: + cd ${.CURDIR}/ng_ayiya && ${MAKE} tic + +clitest: tic + cd ${.CURDIR}/ayiya_resp && ${MAKE} clitest + +clitest-quiet: tic + cd ${.CURDIR}/ayiya_resp && ${MAKE} clitest-quiet Added: soc2015/roam/ayiya_resp/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ soc2015/roam/ayiya_resp/Makefile Mon Jun 29 19:03:13 2015 (r287735) @@ -0,0 +1,42 @@ +# Copyright (c) 2015 Peter Pentchev +# 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. + +PROG= ayiya_resp +SRCS= main.c +NO_MAN= yes +WARNS?= 9 +DPADD= ${LIBNETGRAPH} +LDADD= -lnetgraph + +CFLAGS+= -I${.CURDIR}/.. + +.include + +clitest: + sudo ${.OBJDIR}/${PROG} -v config + sudo ${.OBJDIR}/${PROG} -v loop + +clitest-quiet: + sudo ${.OBJDIR}/${PROG} -v config + sudo ${.OBJDIR}/${PROG} -q loop Added: soc2015/roam/ayiya_resp/main.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ soc2015/roam/ayiya_resp/main.c Mon Jun 29 19:03:13 2015 (r287735) @@ -0,0 +1,433 @@ +/*- + * Copyright (c) 2015 Peter Pentchev + * 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 + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include + +#define A_SEL_TIMEOUT 0x0000 +#define A_SEL_RD_DATA 0x0001 +#define A_SEL_WR_DATA 0x0002 +#define A_SEL_EXC 0x0004 + +#define MOTD \ + "1435504634\n" \ + "Complaint In The System\n" \ + "Welcome to the system, here's the situation;\n" \ + "It's a bit confusing, welcome to the maze!\n" + +static int quiet; +static int verbose; + +static void usage(int _ferr); +static void version(void); +static void debug(const char *fmt, ...) __printflike(1, 2); + +static int cmd_config(const char *cmd, char * const args[], unsigned argc); +static int cmd_loop(const char *cmd, char * const args[], unsigned argc); + +static void ayiya_connect(int *, int *); +static void ayiya_get_config(int, bool); +static unsigned ayiya_select(int, bool, bool); +static void send_packet(int, ayiya_opcode, const char *, size_t); +static void send_empty_packet(int, ayiya_opcode); + +static struct { + const char *name; + int (*func)(const char *cmd, char * const args[], unsigned argc); +} commands[] = { + { "config", cmd_config }, + { "loop", cmd_loop }, +}; +#define COMMANDS (sizeof(commands) / sizeof(commands[0])) + +#define AYIYA_ND "sc_ayiya" + +static union { + struct ng_mesg msg; + char buf[32768]; +} ng_msgbuf; +static char ng_msgpath[NG_PATHSIZ]; + +int +main(int argc, char * const argv[]) +{ + int ch, hflag, Vflag; + + hflag = Vflag = 0; + while (ch = getopt(argc, argv, "hqVv"), ch != -1) + switch (ch) { + case 'h': + hflag = 1; + break; + + case 'q': + quiet = 1; + break; + + case 'V': + Vflag = 1; + break; + + case 'v': + verbose++; + break; + + default: + usage(1); + /* NOTREACHED */ + } + if (Vflag) + version(); + if (hflag) + usage(0); + if (Vflag || hflag) + return (0); + + argc -= optind; + argv += optind; + if (argc < 1) { + warnx("No command specified"); + usage(1); + } + const size_t len = strlen(argv[0]); + unsigned idx = COMMANDS; + for (unsigned i = 0; i < COMMANDS; i++) { + if (strcmp(argv[0], commands[i].name) == 0) { + idx = i; + break; + } else if (strncmp(argv[0], commands[i].name, len) == 0) { + if (idx != COMMANDS) { + warnx("Ambiguous command '%s'", argv[0]); + usage(1); + } + idx = i; + } + } + if (idx == COMMANDS) { + warnx("Unrecognized command '%s'", argv[0]); + usage(1); + } + return (commands[idx].func)(argv[0], argv + 1, argc - 1); +} + +void +usage(const int _ferr) +{ + const char * const s = + "Usage:\tayiya_resp [-v] config\n" + "\tayiya_resp [-qv] loop\n" + "\tayiya_resp -V | -h\n" + "\n" + "\t-h\tdisplay program usage information and exit\n" + "\t-n\tspecify the number of lines to checksum for each file\n" + "\t-q\tquiet mode; only respond, do not originate AYIYA packets\n" + "\t-V\tdisplay program version information and exit\n" + "\t-v\tverbose operation; display diagnostic output\n"; + + fprintf(_ferr? stderr: stdout, "%s", s); + if (_ferr) + exit(1); +} + +void +version(void) +{ + puts("ayiya_resp 0.1.0.dev178"); +} + +void +debug(const char * const fmt, ...) +{ + va_list v; + + va_start(v, fmt); + if (verbose) + vfprintf(stderr, fmt, v); + va_end(v); +} + +int +cmd_config(const char * const cmd __unused, char * const args[] __unused, + const unsigned argc) +{ + if (argc != 0) + errx(1, "The 'config' command expects no arguments"); + + int cs, ds; + ayiya_connect(&cs, &ds); + ayiya_get_config(cs, true); + return (0); +} + +int +cmd_loop(const char * const cmd __unused, char * const args[] __unused, + const unsigned argc) +{ + if (argc != 0) + errx(1, "The 'loop' command expects no arguments"); + + int cs, ds; + ayiya_connect(&cs, &ds); + ayiya_get_config(cs, false); + + srandomdev(); + time_t next_heartbeat = time(NULL); + time_t next_motd = next_heartbeat + 7 + (random() % 7); + for (;;) { + const time_t now = time(NULL); + debug("Loop: now %ld heartbeat %ld motd %ld\n", + now, next_heartbeat, next_motd); + const bool do_heartbeat = !quiet && now >= next_heartbeat; + const bool do_motd = !quiet && now >= next_motd; + debug("- select, heartbeat %s, motd %s\n", + do_heartbeat? "true": "false", + do_motd? "true": "false"); + const unsigned sel = ayiya_select(ds, true, + do_heartbeat || do_motd); + if (sel == A_SEL_TIMEOUT) { + debug("- we got nothin'\n"); + continue; + } + const time_t rcvat = time(NULL); + + if (sel & A_SEL_WR_DATA) { + if (do_heartbeat) { + debug("Sending a heartbeat\n"); + send_empty_packet(ds, AYIYA_OP_HEARTBEAT); + next_heartbeat = now + 10; + } + + if (do_motd) { + debug("Sending a MOTD\n"); + send_packet(ds, AYIYA_OP_MOTD, + MOTD, sizeof(MOTD) - 1); + next_motd = now + 7 + (random() % 7); + } + } + + if (sel & A_SEL_RD_DATA) { + const int len = NgRecvData(ds, ng_msgbuf.buf, + sizeof(ng_msgbuf.buf), ng_msgpath); + if (len < 0) + err(1, "Receiving data"); + if (len < 1) { + warnx("Our Netgraph socket was closed"); + return (0); + } + debug("Got %d bytes of data:\n", len); + for (int d = 0; d < len; d++) + debug("%02hhX%c", ng_msgbuf.buf[d], + d % 16 == 15? '\n': ' '); + if (len % 16 != 0) + debug("\n"); + + const struct ng_ayiya_header * const hdr = + (const struct ng_ayiya_header *)ng_msgbuf.buf; + const size_t hlen = ayiya_offset_data(hdr); + const char * const data = &ng_msgbuf.buf[hlen]; + const size_t dlen = len - hlen; + switch (hdr->opcode) { + case AYIYA_OP_HEARTBEAT: + printf("%jd Heartbeat received\n", + (intmax_t)rcvat); + break; + + case AYIYA_OP_MOTD: + printf("%jd Message of the day:\n", + (intmax_t)rcvat); + for (size_t d = 0; d < dlen; d++) { + const char ch = data[d]; + if (ch >= 32 || ch == '\n' || ch == '\t') + putchar(ch); + else + printf("%%%02hhX", ch); + } + putchar('\n'); + break; + + default: + debug("FIXME: handle opcode %d\n", hdr->opcode); + break; + } + } + } + /* NOTREACHED */ +} + +void +ayiya_get_config(const int cs, const bool twice) +{ + if (NgSendMsg(cs, "c", NGM_GENERIC_COOKIE, NGM_TEXT_CONFIG, NULL, 0) == -1) + err(1, "Could not query the configuration of the %s AYIYA node", + AYIYA_ND); + debug("Waiting for the ng_ayiya 'config' reply\n"); + + unsigned sel = ayiya_select(cs, true, false); + if (sel == A_SEL_TIMEOUT) + errx(1, "Did not receive a reply from the %s AYIYA node in two seconds", AYIYA_ND); + else if (sel & A_SEL_EXC) + errx(1, "Something bad happened on the control fd %d", cs); + else if (!(sel & A_SEL_RD_DATA)) + errx(1, "Something very weird happened, no data to read on the control fd %d", cs); + + struct ng_mesg * const msg = &ng_msgbuf.msg; + if (NgRecvMsg(cs, msg, sizeof(ng_msgbuf.buf), ng_msgpath) == -1) + err(1, "Could not get the configuration of the %s AYIYA node", + AYIYA_ND); + debug("Got a 'config' reply from '%s': version %u cmd %X arglen %u\n", + ng_msgpath, msg->header.version, msg->header.cmd, msg->header.arglen); + char * endptr = &msg->data[msg->header.arglen]; + if (endptr >= &ng_msgbuf.buf[sizeof(ng_msgbuf.buf)]) + errx(1, "The 'config' response did not fit in 32K..."); + *endptr = '\0'; + debug("The data itself:\n%s\n", msg->data); + + if (!twice) + return; + debug("OK, let's wait a second time\n"); + sel = ayiya_select(cs, true, false); + if (sel != A_SEL_TIMEOUT) + errx(1, "Something really weird happened, ayiya_select() " + "returned %d for the control fd", sel); + debug("No data as expected\n"); +} + +void +ayiya_connect(int * const cs, int * const ds) +{ + assert(cs != NULL && ds != NULL); + + if (NgMkSockNode("ayiya_resp_ctl", cs, ds) == -1) + err(1, "Could not create the control socket node"); + + const struct ngm_connect c = { + .path = AYIYA_ND ":", + .ourhook = "c", + .peerhook = "control", + }; + if (NgSendMsg(*cs, ".", NGM_GENERIC_COOKIE, NGM_CONNECT, + &c, sizeof(c)) == -1) + err(1, "Could not connect to the %s AYIYA node", AYIYA_ND); + + int flags = fcntl(*cs, F_GETFL); + debug("- cs flags: %X (non-blocking: %s, append-only: %s, " + "direct I/O: %s, async: %s)\n", flags, + flags & O_NONBLOCK? "true": "false", + flags & O_APPEND? "true": "false", + flags & O_DIRECT? "true": "false", + flags & O_ASYNC? "true": "false"); + if (!(flags & O_NONBLOCK) && + fcntl(*cs, F_SETFL, flags | O_NONBLOCK) == -1) + err(1, "Could not set the control socket to non-blocking mode"); + flags = fcntl(*ds, F_GETFL); + debug("- ds flags: %X (non-blocking: %s, append-only: %s, " + "direct I/O: %s, async: %s)\n", flags, + flags & O_NONBLOCK? "true": "false", + flags & O_APPEND? "true": "false", + flags & O_DIRECT? "true": "false", + flags & O_ASYNC? "true": "false"); + if (!(flags & O_NONBLOCK) && + fcntl(*ds, F_SETFL, flags | O_NONBLOCK) == -1) + err(1, "Could not set the ds socket to non-blocking mode"); +} + +unsigned +ayiya_select(const int fd, const bool do_read, const bool do_write) +{ + fd_set rd, wr, exc; + FD_ZERO(&rd); + FD_ZERO(&wr); + FD_ZERO(&exc); + if (do_read) + FD_SET(fd, &rd); + if (do_write) + FD_SET(fd, &wr); + FD_SET(fd, &exc); + + struct timeval to = { .tv_sec = 2, .tv_usec = 0 }; + const int res = select(fd + 1, &rd, &wr, &exc, &to); + if (res == 0) + return (A_SEL_TIMEOUT); + else if (res != 1) + errx(1, "Something really weird happened, " + "select() on fd %d returned %d", fd, res); + + unsigned val = 0; + if (FD_ISSET(fd, &rd)) + val |= A_SEL_RD_DATA; + if (FD_ISSET(fd, &wr)) + val |= A_SEL_WR_DATA; + if (FD_ISSET(fd, &exc)) + val |= A_SEL_EXC; + return (val); +} + +void +send_packet(const int ds, const ayiya_opcode op, const char * const data, + const size_t len) +{ + struct ng_ayiya_packet * const pkt = + (struct ng_ayiya_packet *)&ng_msgbuf.buf; + if (sizeof(*pkt) + len > sizeof(ng_msgbuf.buf)) + errx(1, "Internal error: send_packet() length %zu too big, " + "max %zu", len, sizeof(ng_msgbuf.buf) - sizeof(*pkt)); + pkt->hdr.idlen = 4; + pkt->hdr.idtype = 1; // Integer + pkt->hdr.siglen = sizeof(pkt->signature) / 4; + pkt->hdr.hshmeth = 2; // SHA1 + pkt->hdr.autmeth = 1; // shared secret + pkt->hdr.opcode = op; + pkt->hdr.nextheader = IPPROTO_NONE; + pkt->hdr.epochtime = time(NULL); + + if (len > 0) + bcopy(data, pkt + 1, len); + + if (NgSendData(ds, "c", ng_msgbuf.buf, sizeof(*pkt) + len) == -1) + err(1, "Could not send data on the data socket"); +} + +void +send_empty_packet(const int ds, const ayiya_opcode op) +{ + send_packet(ds, op, NULL, 0); +} Modified: soc2015/roam/ng_ayiya/ng_ayiya.4 ============================================================================== --- soc2015/roam/ng_ayiya/ng_ayiya.4 Mon Jun 29 18:56:53 2015 (r287734) +++ soc2015/roam/ng_ayiya/ng_ayiya.4 Mon Jun 29 19:03:13 2015 (r287735) @@ -130,6 +130,23 @@ .Dv NGM_AYIYA_CONFIGURE control message; when the message has been processed, the tunnel should be up and running. +.It * +Start an +.Tn AYIYA +responder program that will connect to the +.Nm ayiya +node's +.Va control +hook, listen for any incoming heartbeat, echo, "message of the day", +or query packets, and process them as necessary. +A sample +.Tn AYIYA +responder using the +.Nm ayiya +Netgraph node is available in the +.Nm +source directory as +.Xr ayiya_resp 8 . .El .Sh HOOKS The Modified: soc2015/roam/ng_ayiya/ng_ayiya.c ============================================================================== --- soc2015/roam/ng_ayiya/ng_ayiya.c Mon Jun 29 18:56:53 2015 (r287734) +++ soc2015/roam/ng_ayiya/ng_ayiya.c Mon Jun 29 19:03:13 2015 (r287735) @@ -567,20 +567,31 @@ return (AYIYA_HOOK_LAST); } +static int ayiya_sign(struct mbuf **mb, priv_p priv); + static int -ayiya_build(struct mbuf **mb, const u_char opcode, const u_char nextheader, +ayiya_build(struct mbuf ** const mb, const u_char opcode, const u_char nextheader, const priv_p priv) { struct mbuf *m = *mb; - if (m == NULL) + if (m == NULL) { m = ayiya_m_getm(sizeof(struct ng_ayiya_packet), M_NOWAIT); - else + *mb = m; + } else { M_PREPEND(m, sizeof(struct ng_ayiya_packet), M_NOWAIT); - if (m->m_next) - m = m_defrag(m, M_NOWAIT); - if (m == NULL) - return (ENOMEM); + *mb = m; + } + if (m->m_next) { + struct mbuf * const m2 = m_defrag(m, M_NOWAIT); + if (m2 == NULL) { + m_freem(m); + *mb = NULL; + return (ENOMEM); + } + m = m2; + *mb = m; + } struct ng_ayiya_header * const hdr = (struct ng_ayiya_header *)m->m_data; struct ng_ayiya_packet * const pkt = @@ -595,6 +606,27 @@ hdr->nextheader = nextheader; hdr->epochtime = htonl(time_second); + return (ayiya_sign(mb, priv)); +} + +static int +ayiya_sign(struct mbuf ** const mb, const priv_p priv) +{ + struct mbuf *m = *mb; + + if (m->m_next) { + struct mbuf * const m2 = m_defrag(m, M_NOWAIT); + if (m2 == NULL) { + m_freem(m); + *mb = NULL; + return (ENOMEM); + } + m = m2; + *mb = m; + } + + struct ng_ayiya_packet * const pkt = + (struct ng_ayiya_packet *)m->m_data; bcopy(priv->identity, pkt->identity, sizeof(pkt->identity)); /* Start with the secret hash... */ @@ -610,22 +642,25 @@ bcopy(hash, pkt->signature, sizeof(pkt->signature)); /* And I think we're done. */ - *mb = m; return (0); } static int ayiya_verify(struct mbuf **mb, u_char * const opcode, u_char * const nextheader, - const priv_p priv) + int32_t * const ofs, const priv_p priv) { struct mbuf *m = *mb; if (m->m_next) { - m = m_defrag(m, M_NOWAIT); + struct mbuf * const m2 = m_defrag(m, M_NOWAIT); + if (m2 == NULL) { + m_freem(m); + *mb = NULL; + return (ENOMEM); + } + m = m2; *mb = m; } - if (m == NULL) - return (ENOMEM); const int32_t len = m->m_len; struct ng_ayiya_header * const hdr = (struct ng_ayiya_header *)m->m_data; @@ -704,8 +739,7 @@ return (EOPNOTSUPP); } - m_adj(m, ofs_data); - *mb = m; + *ofs = ofs_data; *opcode = hdr->opcode; *nextheader = hdr->nextheader; return (0); @@ -746,7 +780,8 @@ } /* Prepare a packet for forwarding */ - int error = ayiya_build(&m, 1, IPPROTO_IPV6, priv); + int error = ayiya_build(&m, AYIYA_OP_FORWARD, + IPPROTO_IPV6, priv); if (error != 0) return (error); @@ -758,7 +793,8 @@ { u_char opcode; u_char nextheader; - int error = ayiya_verify(&m, &opcode, &nextheader, priv); + int32_t ofs; + int error = ayiya_verify(&m, &opcode, &nextheader, &ofs, priv); if (error != 0) { m_freem(m); @@ -767,24 +803,63 @@ switch (opcode) { - case 1: + case AYIYA_OP_FORWARD: + case AYIYA_OP_ECHO_AND_FORWARD: + { + const int echo = opcode == AYIYA_OP_ECHO_AND_FORWARD; + struct mbuf *mf; + if (!echo) { + m_adj(m, ofs); + mf = m; + } else { + mf = ayiya_m_getm(m->m_len - ofs, M_NOWAIT); + bcopy(m->m_data + ofs, mf->m_data, mf->m_len); + } + /* Forward */ if (nextheader != IPPROTO_IPV6) { + if (echo) + m_freem(mf); m_freem(m); return (0); } int error; - NG_SEND_DATA_ONLY(error, priv->hooks[AYIYA_HOOK_INET6], m); - /* Ignore the error, nothing to do, really. */ - break; + NG_SEND_DATA_ONLY(error, priv->hooks[AYIYA_HOOK_INET6], mf); + if (!echo) + return (0); + } default: - break; + { + if (priv->hooks[AYIYA_HOOK_CONTROL] == NULL) { + m_freem(m); + return (0); + } + int error; + NG_SEND_DATA_ONLY(error, priv->hooks[AYIYA_HOOK_CONTROL], m); + return (0); + } + } + /* NOTREACHED */ } - m_freem(m); - return (0); + case AYIYA_HOOK_CONTROL: + { + if (!priv->configured) { + m_freem(m); + return (ENOTCONN); + } + + int error = ayiya_sign(&m, priv); + if (error != 0) + { + m_freem(m); + return (0); + } + + NG_SEND_DATA_ONLY(error, priv->hooks[AYIYA_HOOK_AYIYA], m); + return (error); } default: Modified: soc2015/roam/ng_ayiya/ng_ayiya.h ============================================================================== --- soc2015/roam/ng_ayiya/ng_ayiya.h Mon Jun 29 18:56:53 2015 (r287734) +++ soc2015/roam/ng_ayiya/ng_ayiya.h Mon Jun 29 19:03:13 2015 (r287735) @@ -40,6 +40,17 @@ NGM_AYIYA_GET_MOTD, }; +typedef enum { + AYIYA_OP_HEARTBEAT = 0, + AYIYA_OP_FORWARD = 1, + AYIYA_OP_ECHO = 2, + AYIYA_OP_ECHO_AND_FORWARD = 3, + AYIYA_OP_ECHO_RESP = 4, + AYIYA_OP_MOTD = 5, + AYIYA_OP_QUERY = 6, + AYIYA_OP_QUERY_RESP = 7, +} ayiya_opcode; + struct ng_ayiya_header { #if _BYTE_ORDER == _BIG_ENDIAN unsigned idlen:4, @@ -69,4 +80,24 @@ u_char signature[20]; } __packed; +static inline size_t ayiya_offset_id(const struct ng_ayiya_header * const hdr) { + return (sizeof(*hdr)); +} + +static inline size_t ayiya_length_id(const struct ng_ayiya_header * const hdr) { + return (1 << hdr->idlen); +} + +static inline size_t ayiya_offset_sig(const struct ng_ayiya_header * const hdr) { + return (ayiya_offset_id(hdr) + ayiya_length_id(hdr)); +} + +static inline size_t ayiya_length_sig(const struct ng_ayiya_header * const hdr) { + return (4 * hdr->siglen); +} + +static inline size_t ayiya_offset_data(const struct ng_ayiya_header * const hdr) { + return (ayiya_offset_sig(hdr) + ayiya_length_sig(hdr)); +} + #endif From owner-svn-soc-all@freebsd.org Mon Jun 29 19:03:20 2015 Return-Path: Delivered-To: svn-soc-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9CDA798F98F for ; Mon, 29 Jun 2015 19:03:20 +0000 (UTC) (envelope-from roam@FreeBSD.org) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8EA9515BC for ; Mon, 29 Jun 2015 19:03:20 +0000 (UTC) (envelope-from roam@FreeBSD.org) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5TJ3Khv067440 for ; Mon, 29 Jun 2015 19:03:20 GMT (envelope-from roam@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.9/8.14.9/Submit) id t5TJ3Ksd067438 for svn-soc-all@FreeBSD.org; Mon, 29 Jun 2015 19:03:20 GMT (envelope-from roam@FreeBSD.org) Date: Mon, 29 Jun 2015 19:03:20 GMT Message-Id: <201506291903.t5TJ3Ksd067438@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to roam@FreeBSD.org using -f From: roam@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r287736 - soc2015/roam/ng_ayiya MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2015 19:03:20 -0000 Author: roam Date: Mon Jun 29 19:03:19 2015 New Revision: 287736 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=287736 Log: Use the ayiya_offset/length functions in ng_ayiya. ObQuote: "That's the way we do it" Modified: soc2015/roam/ng_ayiya/ng_ayiya.c Modified: soc2015/roam/ng_ayiya/ng_ayiya.c ============================================================================== --- soc2015/roam/ng_ayiya/ng_ayiya.c Mon Jun 29 19:03:13 2015 (r287735) +++ soc2015/roam/ng_ayiya/ng_ayiya.c Mon Jun 29 19:03:19 2015 (r287736) @@ -661,20 +661,20 @@ m = m2; *mb = m; } - const int32_t len = m->m_len; + const size_t len = m->m_len; struct ng_ayiya_header * const hdr = (struct ng_ayiya_header *)m->m_data; - const int32_t ofs_id = sizeof(*hdr); + const size_t ofs_id = ayiya_offset_id(hdr); if (len < ofs_id) return (EINVAL); if (hdr->idlen > 4) return (EINVAL); - const int32_t ofs_sig = ofs_id + (1 << hdr->idlen); + const size_t ofs_sig = ayiya_offset_sig(hdr); if (len < ofs_sig) return (EINVAL); - const unsigned siglen = 4 * hdr->siglen; + const size_t siglen = ayiya_length_sig(hdr); u_char * const sig = ((u_char *)hdr) + ofs_sig; - const int32_t ofs_data = ofs_sig + siglen; + const size_t ofs_data = ayiya_offset_data(hdr); if (len < ofs_data) return (EINVAL); From owner-svn-soc-all@freebsd.org Mon Jun 29 19:03:24 2015 Return-Path: Delivered-To: svn-soc-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 117BA98F9AC for ; Mon, 29 Jun 2015 19:03:24 +0000 (UTC) (envelope-from roam@FreeBSD.org) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 02CED15CE for ; Mon, 29 Jun 2015 19:03:24 +0000 (UTC) (envelope-from roam@FreeBSD.org) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5TJ3NPx067463 for ; Mon, 29 Jun 2015 19:03:23 GMT (envelope-from roam@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.9/8.14.9/Submit) id t5TJ3Nte067460 for svn-soc-all@FreeBSD.org; Mon, 29 Jun 2015 19:03:23 GMT (envelope-from roam@FreeBSD.org) Date: Mon, 29 Jun 2015 19:03:23 GMT Message-Id: <201506291903.t5TJ3Nte067460@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to roam@FreeBSD.org using -f From: roam@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r287737 - soc2015/roam/ng_ayiya MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2015 19:03:24 -0000 Author: roam Date: Mon Jun 29 19:03:22 2015 New Revision: 287737 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=287737 Log: Perform the link-local check in a sensible way. There's a macro for that! Pointed out by: bz (mentor) Didn't read the next page of in6.h: roam (myself) Modified: soc2015/roam/ng_ayiya/ng_ayiya.c Modified: soc2015/roam/ng_ayiya/ng_ayiya.c ============================================================================== --- soc2015/roam/ng_ayiya/ng_ayiya.c Mon Jun 29 19:03:19 2015 (r287736) +++ soc2015/roam/ng_ayiya/ng_ayiya.c Mon Jun 29 19:03:22 2015 (r287737) @@ -456,7 +456,7 @@ * client has set the appropriate tunnel endpoint IPv6 * address on the interface by now. */ - if ((htons(a->sin6_addr.s6_addr16[0]) & 0xFFC0) == 0xFE80) + if (IN6_IS_ADDR_LINKLOCAL(&a->sin6_addr)) continue; const priv_p priv = NG_NODE_PRIVATE(node); From owner-svn-soc-all@freebsd.org Mon Jun 29 19:03:27 2015 Return-Path: Delivered-To: svn-soc-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8FEAA98F9C2 for ; Mon, 29 Jun 2015 19:03:27 +0000 (UTC) (envelope-from roam@FreeBSD.org) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8169315DF for ; Mon, 29 Jun 2015 19:03:27 +0000 (UTC) (envelope-from roam@FreeBSD.org) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5TJ3RPi067505 for ; Mon, 29 Jun 2015 19:03:27 GMT (envelope-from roam@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.9/8.14.9/Submit) id t5TJ3QWe067501 for svn-soc-all@FreeBSD.org; Mon, 29 Jun 2015 19:03:26 GMT (envelope-from roam@FreeBSD.org) Date: Mon, 29 Jun 2015 19:03:26 GMT Message-Id: <201506291903.t5TJ3QWe067501@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to roam@FreeBSD.org using -f From: roam@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r287738 - soc2015/roam/ng_ayiya MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2015 19:03:27 -0000 Author: roam Date: Mon Jun 29 19:03:26 2015 New Revision: 287738 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=287738 Log: Use RFC 5180 (IPv6 benchmarking) addresses. Suggested by: bz (mentor) ObQuote: "Is it a twister?" Modified: soc2015/roam/ng_ayiya/tic-tunnels.txt.sample Modified: soc2015/roam/ng_ayiya/tic-tunnels.txt.sample ============================================================================== --- soc2015/roam/ng_ayiya/tic-tunnels.txt.sample Mon Jun 29 19:03:22 2015 (r287737) +++ soc2015/roam/ng_ayiya/tic-tunnels.txt.sample Mon Jun 29 19:03:26 2015 (r287738) @@ -3,8 +3,8 @@ Heartbeat_Interval: 60 IPv4 Endpoint: 10.0.2.15 IPv4 POP: 10.0.2.16 - IPv6 Endpoint: fec0::1 - IPv6 POP: fec0::2 + IPv6 Endpoint: 2001:0200:0:22::1 + IPv6 POP: 2001:0200:0:22::2 IPv6 PrefixLength: 64 POP Id: localtest Password: aa6263d5e8005b9da9b35f83aa945143 From owner-svn-soc-all@freebsd.org Mon Jun 29 19:03:32 2015 Return-Path: Delivered-To: svn-soc-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4F49B98F9DD for ; Mon, 29 Jun 2015 19:03:32 +0000 (UTC) (envelope-from roam@FreeBSD.org) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 33F6815F2 for ; Mon, 29 Jun 2015 19:03:32 +0000 (UTC) (envelope-from roam@FreeBSD.org) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5TJ3WX3067550 for ; Mon, 29 Jun 2015 19:03:32 GMT (envelope-from roam@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.9/8.14.9/Submit) id t5TJ3Ub7067535 for svn-soc-all@FreeBSD.org; Mon, 29 Jun 2015 19:03:30 GMT (envelope-from roam@FreeBSD.org) Date: Mon, 29 Jun 2015 19:03:30 GMT Message-Id: <201506291903.t5TJ3Ub7067535@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to roam@FreeBSD.org using -f From: roam@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r287739 - soc2015/roam/ng_ayiya MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2015 19:03:32 -0000 Author: roam Date: Mon Jun 29 19:03:30 2015 New Revision: 287739 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=287739 Log: Remove GET/SET_VERSION/MOTD, handled by responders. As noted by my mentor, the heartbeat, version, "message of the day", and other non-IPv6-data packets would much better be processed in userland. Thus, revert most of rev. 287682 that added four control messages and some private structure members, as well as the blurbs about them in the manual page. ObQuote: "What good's causing problems when no one's complaining?" Modified: soc2015/roam/ng_ayiya/ng_ayiya.4 soc2015/roam/ng_ayiya/ng_ayiya.c soc2015/roam/ng_ayiya/ng_ayiya.h Modified: soc2015/roam/ng_ayiya/ng_ayiya.4 ============================================================================== --- soc2015/roam/ng_ayiya/ng_ayiya.4 Mon Jun 29 19:03:26 2015 (r287738) +++ soc2015/roam/ng_ayiya/ng_ayiya.4 Mon Jun 29 19:03:30 2015 (r287739) @@ -88,12 +88,6 @@ .Tn AYIYA packets. .It * -Configure the node by sending a -.Dv NGM_AYIYA_SET_VERSION -and optionally a -.Dv NGM_AYIYA_SET_MOTD -control message. -.It * Connect the .Va inet6 hook to a @@ -199,16 +193,6 @@ heartbeat packet to the .Va ayiya hook and start forwarding packets between the two. -.It Dv NGM_AYIYA_GET_VERSION -Get the local -.Nm ayiya -node's version string. -.It Dv NGM_AYIYA_GET_MOTD -Get the local -.Nm ayiya -node's -.Dq message of the day -string. .It Dv NGM_AYIYA_SECRETHASH Set the secret hash used for authenticating the .Tn AYIYA @@ -216,16 +200,6 @@ The message parameter should be a SHA1 hash of the .Va Password field obtained via TIC negotiation. -.It Dv NGM_AYIYA_SET_VERSION -Set the local -.Nm ayiya -node's version string. -.It Dv NGM_AYIYA_SET_MOTD -Set the local -.Nm ayiya -node's -.Dq message of the day -string. .El .Sh SHUTDOWN This node shuts down upon receipt of a Modified: soc2015/roam/ng_ayiya/ng_ayiya.c ============================================================================== --- soc2015/roam/ng_ayiya/ng_ayiya.c Mon Jun 29 19:03:26 2015 (r287738) +++ soc2015/roam/ng_ayiya/ng_ayiya.c Mon Jun 29 19:03:30 2015 (r287739) @@ -78,34 +78,6 @@ NULL, &ng_parse_uint32_type, }, - { - NGM_AYIYA_COOKIE, - NGM_AYIYA_SET_VERSION, - "set_version", - &ng_parse_string_type, - NULL, - }, - { - NGM_AYIYA_COOKIE, - NGM_AYIYA_SET_MOTD, - "set_motd", - &ng_parse_string_type, - NULL, - }, - { - NGM_AYIYA_COOKIE, - NGM_AYIYA_GET_VERSION, - "get_version", - NULL, - &ng_parse_string_type, - }, - { - NGM_AYIYA_COOKIE, - NGM_AYIYA_GET_MOTD, - "get_motd", - NULL, - &ng_parse_string_type, - }, { 0 } }; @@ -147,7 +119,6 @@ hook_p hooks[AYIYA_HOOK_LAST]; node_p node; item_p configuring; - struct mbuf *m_version, *m_motd; bool configured; }; typedef struct ng_ayiya_private *priv_p; @@ -184,11 +155,6 @@ return (m2); } -#define AYIYA_VERSION "ng_ayiya 0.1.0.dev177" -#define AYIYA_VERSION_SZ sizeof(AYIYA_VERSION) -#define AYIYA_MOTD "No message of the day defined yet." -#define AYIYA_MOTD_SZ sizeof(AYIYA_MOTD) - static int ng_ayiya_constructor(const node_p node) { @@ -197,27 +163,7 @@ priv = malloc(sizeof(*priv), M_NETGRAPH_AYIYA, M_WAITOK | M_ZERO); NG_NODE_SET_PRIVATE(node, priv); priv->node = node; - - priv->m_version = ayiya_m_getm(AYIYA_VERSION_SZ, M_WAITOK); - if (priv->m_version == NULL) - goto no_mem; - bcopy(AYIYA_VERSION, priv->m_version->m_data, AYIYA_VERSION_SZ); - - priv->m_motd = ayiya_m_getm(AYIYA_MOTD_SZ, M_WAITOK); - if (priv->m_motd == NULL) - goto no_mem; - bcopy(AYIYA_MOTD, priv->m_motd->m_data, AYIYA_MOTD_SZ); - return (0); - -no_mem: - m_freem(priv->m_motd); - priv->m_motd = NULL; - m_freem(priv->m_version); - priv->m_version = NULL; - free(priv, M_NETGRAPH_AYIYA); - NG_NODE_SET_PRIVATE(node, NULL); - return (ENOMEM); } #define ERROUT(x) do { error = (x); goto done; } while (0) @@ -389,42 +335,6 @@ return (0); } - case NGM_AYIYA_GET_VERSION: - { - const priv_p priv = NG_NODE_PRIVATE(node); - NG_MKRESPONSE(resp, msg, priv->m_version->m_len, M_WAITOK); - bcopy(priv->m_version->m_data, resp->data, priv->m_version->m_len); - break; - } - - case NGM_AYIYA_GET_MOTD: - { - const priv_p priv = NG_NODE_PRIVATE(node); - NG_MKRESPONSE(resp, msg, priv->m_motd->m_len, M_WAITOK); - bcopy(priv->m_motd->m_data, resp->data, priv->m_motd->m_len); - break; - } - - case NGM_AYIYA_SET_VERSION: - case NGM_AYIYA_SET_MOTD: - { - const size_t sz = msg->header.arglen; - struct mbuf * const m = ayiya_m_getm(sz, M_WAITOK); - if (m == NULL) { - error = ENOMEM; - break; - } - bcopy(msg->data, m->m_data, sz); - - const priv_p priv = NG_NODE_PRIVATE(node); - struct mbuf ** const mm = - msg->header.cmd == NGM_AYIYA_SET_VERSION? - &priv->m_version: &priv->m_motd; - m_freem(*mm); - *mm = m; - break; - } - default: error = EINVAL; break; @@ -542,8 +452,6 @@ if (priv != NULL) { if (priv->configuring) configuring_respond(node, ECONNABORTED); - m_freem(priv->m_motd); - m_freem(priv->m_version); free(priv, M_NETGRAPH_AYIYA); NG_NODE_SET_PRIVATE(node, NULL); } Modified: soc2015/roam/ng_ayiya/ng_ayiya.h ============================================================================== --- soc2015/roam/ng_ayiya/ng_ayiya.h Mon Jun 29 19:03:26 2015 (r287738) +++ soc2015/roam/ng_ayiya/ng_ayiya.h Mon Jun 29 19:03:30 2015 (r287739) @@ -34,10 +34,6 @@ enum { NGM_AYIYA_SECRETHASH = 1, NGM_AYIYA_CONFIGURE, - NGM_AYIYA_SET_VERSION, - NGM_AYIYA_SET_MOTD, - NGM_AYIYA_GET_VERSION, - NGM_AYIYA_GET_MOTD, }; typedef enum { From owner-svn-soc-all@freebsd.org Mon Jun 29 19:39:57 2015 Return-Path: Delivered-To: svn-soc-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 895889900CA for ; Mon, 29 Jun 2015 19:39:57 +0000 (UTC) (envelope-from clord@FreeBSD.org) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7807819C6 for ; Mon, 29 Jun 2015 19:39:57 +0000 (UTC) (envelope-from clord@FreeBSD.org) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5TJdvHh099084 for ; Mon, 29 Jun 2015 19:39:57 GMT (envelope-from clord@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.9/8.14.9/Submit) id t5TJdsWU099032 for svn-soc-all@FreeBSD.org; Mon, 29 Jun 2015 19:39:54 GMT (envelope-from clord@FreeBSD.org) Date: Mon, 29 Jun 2015 19:39:54 GMT Message-Id: <201506291939.t5TJdsWU099032@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to clord@FreeBSD.org using -f From: clord@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r287740 - in soc2015/clord/head/sys/contrib/ficl: . contrib ficlplatform softcore softwords MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2015 19:39:57 -0000 Author: clord Date: Mon Jun 29 19:39:54 2015 New Revision: 287740 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=287740 Log: Import Ficl 4 sources second attempt Added: soc2015/clord/head/sys/contrib/ficl/Makefile - copied unchanged from r285383, mirror/FreeBSD/vendor/ficl/dist/Makefile soc2015/clord/head/sys/contrib/ficl/bit.c - copied unchanged from r285383, mirror/FreeBSD/vendor/ficl/dist/bit.c soc2015/clord/head/sys/contrib/ficl/callback.c - copied unchanged from r285383, mirror/FreeBSD/vendor/ficl/dist/callback.c soc2015/clord/head/sys/contrib/ficl/compatibility.c - copied unchanged from r285383, mirror/FreeBSD/vendor/ficl/dist/compatibility.c soc2015/clord/head/sys/contrib/ficl/contrib/ - copied from r285383, mirror/FreeBSD/vendor/ficl/dist/contrib/ soc2015/clord/head/sys/contrib/ficl/dictionary.c - copied unchanged from r287721, soc2015/clord/head/sys/contrib/ficl/dict.c soc2015/clord/head/sys/contrib/ficl/double.c - copied unchanged from r287721, soc2015/clord/head/sys/contrib/ficl/math64.c soc2015/clord/head/sys/contrib/ficl/extras.c - copied unchanged from r285383, mirror/FreeBSD/vendor/ficl/dist/extras.c soc2015/clord/head/sys/contrib/ficl/ficlcompatibility.h - copied unchanged from r285383, mirror/FreeBSD/vendor/ficl/dist/ficlcompatibility.h soc2015/clord/head/sys/contrib/ficl/ficldll.def - copied unchanged from r285383, mirror/FreeBSD/vendor/ficl/dist/ficldll.def soc2015/clord/head/sys/contrib/ficl/ficldll.dsp - copied unchanged from r285383, mirror/FreeBSD/vendor/ficl/dist/ficldll.dsp soc2015/clord/head/sys/contrib/ficl/ficlexe.dsp - copied unchanged from r285383, mirror/FreeBSD/vendor/ficl/dist/ficlexe.dsp soc2015/clord/head/sys/contrib/ficl/ficllib.dsp - copied unchanged from r285383, mirror/FreeBSD/vendor/ficl/dist/ficllib.dsp soc2015/clord/head/sys/contrib/ficl/ficllocal.h - copied unchanged from r285383, mirror/FreeBSD/vendor/ficl/dist/ficllocal.h soc2015/clord/head/sys/contrib/ficl/ficlplatform/ - copied from r285383, mirror/FreeBSD/vendor/ficl/dist/ficlplatform/ soc2015/clord/head/sys/contrib/ficl/ficltokens.h - copied unchanged from r285383, mirror/FreeBSD/vendor/ficl/dist/ficltokens.h soc2015/clord/head/sys/contrib/ficl/hash.c - copied unchanged from r285383, mirror/FreeBSD/vendor/ficl/dist/hash.c soc2015/clord/head/sys/contrib/ficl/lzcompress.c - copied unchanged from r285383, mirror/FreeBSD/vendor/ficl/dist/lzcompress.c soc2015/clord/head/sys/contrib/ficl/lzuncompress.c - copied unchanged from r285383, mirror/FreeBSD/vendor/ficl/dist/lzuncompress.c soc2015/clord/head/sys/contrib/ficl/main.c - copied unchanged from r285383, mirror/FreeBSD/vendor/ficl/dist/main.c soc2015/clord/head/sys/contrib/ficl/primitives.c - copied unchanged from r287721, soc2015/clord/head/sys/contrib/ficl/words.c soc2015/clord/head/sys/contrib/ficl/softcore/ (props changed) - copied from r287721, soc2015/clord/head/sys/contrib/ficl/softwords/ soc2015/clord/head/sys/contrib/ficl/system.c - copied unchanged from r287721, soc2015/clord/head/sys/contrib/ficl/ficl.c soc2015/clord/head/sys/contrib/ficl/utility.c - copied unchanged from r285383, mirror/FreeBSD/vendor/ficl/dist/utility.c soc2015/clord/head/sys/contrib/ficl/word.c - copied unchanged from r285383, mirror/FreeBSD/vendor/ficl/dist/word.c Deleted: soc2015/clord/head/sys/contrib/ficl/dict.c soc2015/clord/head/sys/contrib/ficl/ficl.c soc2015/clord/head/sys/contrib/ficl/math64.c soc2015/clord/head/sys/contrib/ficl/math64.h soc2015/clord/head/sys/contrib/ficl/softwords/ soc2015/clord/head/sys/contrib/ficl/testmain.c soc2015/clord/head/sys/contrib/ficl/unix.c soc2015/clord/head/sys/contrib/ficl/words.c Modified: soc2015/clord/head/sys/contrib/ficl/ (props changed) soc2015/clord/head/sys/contrib/ficl/ReadMe.txt soc2015/clord/head/sys/contrib/ficl/ficl.h soc2015/clord/head/sys/contrib/ficl/fileaccess.c soc2015/clord/head/sys/contrib/ficl/float.c soc2015/clord/head/sys/contrib/ficl/prefix.c soc2015/clord/head/sys/contrib/ficl/search.c soc2015/clord/head/sys/contrib/ficl/stack.c soc2015/clord/head/sys/contrib/ficl/tools.c soc2015/clord/head/sys/contrib/ficl/vm.c Copied: soc2015/clord/head/sys/contrib/ficl/Makefile (from r285383, mirror/FreeBSD/vendor/ficl/dist/Makefile) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ soc2015/clord/head/sys/contrib/ficl/Makefile Mon Jun 29 19:39:54 2015 (r287740, copy of r285383, mirror/FreeBSD/vendor/ficl/dist/Makefile) @@ -0,0 +1,60 @@ +OBJECTS= dictionary.o system.o fileaccess.o float.o double.o prefix.o search.o softcore.o stack.o tools.o vm.o primitives.o bit.o lzuncompress.o unix.o utility.o hash.o callback.o word.o extras.o +HEADERS= ficl.h ficlplatform/unix.h +# +# Flags for shared library +#TARGET= -Dlinux # riscos MOTO_CPU32 +SHFLAGS = -fPIC +CFLAGS= -O $(SHFLAGS) -Wall +CPPFLAGS= $(TARGET) -I. +CC = cc +LIB = ar cr +RANLIB = ranlib + +MAJOR = 4 +MINOR = 1.0 + +ficl: main.o $(HEADERS) libficl.a + $(CC) $(CFLAGS) $(LDFLAGS) main.o -o ficl -L. -lficl -lm + +lib: libficl.so.$(MAJOR).$(MINOR) + +# static library build +libficl.a: $(OBJECTS) + $(LIB) libficl.a $(OBJECTS) + $(RANLIB) libficl.a + +# shared library build +libficl.so.$(MAJOR).$(MINOR): $(OBJECTS) + $(CC) $(LDFLAGS) -shared -Wl,-soname,libficl.so.$(MAJOR).$(MINOR) \ + -o libficl.so.$(MAJOR).$(MINOR) $(OBJECTS) + ln -sf libficl.so.$(MAJOR).$(MINOR) libficl.so + +main: main.o ficl.h sysdep.h libficl.so.$(MAJOR).$(MINOR) + $(CC) $(CFLAGS) $(LDFLAGS) main.o -o main -L. -lficl -lm + ln -sf libficl.so.$(MAJOR).$(MINOR) libficl.so.$(MAJOR) + +# depend explicitly to help finding source files in another subdirectory, +# and repeat commands since gmake doesn't understand otherwise +ansi.o: ficlplatform/ansi.c $(HEADERS) + $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $< +unix.o: ficlplatform/unix.c $(HEADERS) + $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $< + +# +# generic object code +# +.SUFFIXES: .cxx .cc .c .o + +.c.o: + $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $< + +.cxx.o: + $(CPP) $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $< + +.cc.o: + $(CPP) $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $< +# +# generic cleanup code +# +clean: + rm -f *.o *.a libficl.* ficl Modified: soc2015/clord/head/sys/contrib/ficl/ReadMe.txt ============================================================================== --- soc2015/clord/head/sys/contrib/ficl/ReadMe.txt Mon Jun 29 19:03:30 2015 (r287739) +++ soc2015/clord/head/sys/contrib/ficl/ReadMe.txt Mon Jun 29 19:39:54 2015 (r287740) @@ -1,5 +1,5 @@ -FICL 3.03 -April 2002 +FICL 4.1.0 +October 2010 ________ OVERVIEW @@ -10,18 +10,22 @@ Command Language". For more information, please see the "doc" directory. -For release notes, please see "doc/ficl_rel.html". +For release notes, please see "doc/releases.html". ____________ INSTALLATION Ficl builds out-of-the-box on the following platforms: - * Linux: use "Makefile.linux". - * RiscOS: use "Makefile.riscos". + * NetBSD, FreeBSD: use "Makefile". + * Linux: use "Makefile.linux", but it should work with + "Makefile" as well. * Win32: use "ficl.dsw" / "ficl.dsp". -To port to other platforms, be sure to examine "sysdep.h", and -we suggest you start with the Linux makefile. (And please--feel -free to submit your portability changes!) +To port to other platforms, we suggest you start with the generic +"Makefile" and the "unix.c" / "unix.h" platform-specific implementation +files. (And please--feel free to submit your portability changes!) + +(Note: Ficl used to build under RiscOS, but we broke everything +for the 4.0 release. Please fix it and send us the diffs!) ____________ FICL LICENSE Copied: soc2015/clord/head/sys/contrib/ficl/bit.c (from r285383, mirror/FreeBSD/vendor/ficl/dist/bit.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ soc2015/clord/head/sys/contrib/ficl/bit.c Mon Jun 29 19:39:54 2015 (r287740, copy of r285383, mirror/FreeBSD/vendor/ficl/dist/bit.c) @@ -0,0 +1,49 @@ +#include "ficl.h" + +int ficlBitGet(const unsigned char *bits, size_t index) + { + int byteIndex = index >> 3; + int bitIndex = index & 7; + unsigned char mask = (unsigned char)(128 >> bitIndex); + + return ((mask & bits[byteIndex]) ? 1 : 0); + } + + + +void ficlBitSet(unsigned char *bits, size_t index, int value) + { + int byteIndex = index >> 3; + int bitIndex = index & 7; + unsigned char mask = (unsigned char)(128 >> bitIndex); + + if (value) + bits[byteIndex] |= mask; + else + bits[byteIndex] &= ~mask; + } + + +void ficlBitGetString(unsigned char *destination, const unsigned char *source, int offset, int count, int destAlignment) + { + int bit = destAlignment - count; + while (count--) + ficlBitSet(destination, bit++, ficlBitGet(source, offset++)); + } + + +/* +** This will actually work correctly *regardless* of the local architecture. +** --lch +**/ +ficlUnsigned16 ficlNetworkUnsigned16(ficlUnsigned16 number) +{ + ficlUnsigned8 *pointer = (ficlUnsigned8 *)&number; + return (ficlUnsigned16)(((ficlUnsigned16)(pointer[0] << 8)) | (pointer[1])); +} + +ficlUnsigned32 ficlNetworkUnsigned32(ficlUnsigned32 number) +{ + ficlUnsigned16 *pointer = (ficlUnsigned16 *)&number; + return ((ficlUnsigned32)(ficlNetworkUnsigned16(pointer[0]) << 16)) | ficlNetworkUnsigned16(pointer[1]); +} Copied: soc2015/clord/head/sys/contrib/ficl/callback.c (from r285383, mirror/FreeBSD/vendor/ficl/dist/callback.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ soc2015/clord/head/sys/contrib/ficl/callback.c Mon Jun 29 19:39:54 2015 (r287740, copy of r285383, mirror/FreeBSD/vendor/ficl/dist/callback.c) @@ -0,0 +1,76 @@ +#include "ficl.h" + + +extern ficlSystem *ficlSystemGlobal; + +/************************************************************************** + f i c l C a l l b a c k T e x t O u t +** Feeds text to the vm's output callback +**************************************************************************/ +void ficlCallbackTextOut(ficlCallback *callback, char *text) +{ + ficlOutputFunction textOut = NULL; + + if (callback != NULL) + { + if (callback->textOut != NULL) + textOut = callback->textOut; + else if ((callback->system != NULL) && (callback != &(callback->system->callback))) + { + ficlCallbackTextOut(&(callback->system->callback), text); + return; + } + } + + if ((textOut == NULL) && (ficlSystemGlobal != NULL)) + { + callback = &(ficlSystemGlobal->callback); + textOut = callback->textOut; + } + + if (textOut == NULL) + textOut = ficlCallbackDefaultTextOut; + + (textOut)(callback, text); + + return; +} + + +/************************************************************************** + f i c l C a l l b a c k E r r o r O u t +** Feeds text to the vm's error output callback +**************************************************************************/ +void ficlCallbackErrorOut(ficlCallback *callback, char *text) +{ + ficlOutputFunction errorOut = NULL; + + if (callback != NULL) + { + if (callback->errorOut != NULL) + errorOut = callback->errorOut; + else if ((callback->system != NULL) && (callback != &(callback->system->callback))) + { + ficlCallbackErrorOut(&(callback->system->callback), text); + return; + } + } + + if ((errorOut == NULL) && (ficlSystemGlobal != NULL)) + { + callback = &(ficlSystemGlobal->callback); + errorOut = callback->errorOut; + } + + if (errorOut == NULL) + { + ficlCallbackTextOut(callback, text); + return; + } + + (errorOut)(callback, text); + + return; +} + + Copied: soc2015/clord/head/sys/contrib/ficl/compatibility.c (from r285383, mirror/FreeBSD/vendor/ficl/dist/compatibility.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ soc2015/clord/head/sys/contrib/ficl/compatibility.c Mon Jun 29 19:39:54 2015 (r287740, copy of r285383, mirror/FreeBSD/vendor/ficl/dist/compatibility.c) @@ -0,0 +1,284 @@ +#define FICL_FORCE_COMPATIBILITY 1 +#include "ficl.h" + + +FICL_PLATFORM_EXTERN ficlStack *stackCreate (unsigned cells) { return ficlStackCreate(NULL, "unknown", cells); } +FICL_PLATFORM_EXTERN void stackDelete (ficlStack *stack) { ficlStackDestroy(stack); } +FICL_PLATFORM_EXTERN int stackDepth (ficlStack *stack) { return ficlStackDepth(stack); } +FICL_PLATFORM_EXTERN void stackDrop (ficlStack *stack, int n) { ficlStackDrop(stack, n); } +FICL_PLATFORM_EXTERN ficlCell stackFetch (ficlStack *stack, int n) { return ficlStackFetch(stack, n); } +FICL_PLATFORM_EXTERN ficlCell stackGetTop (ficlStack *stack) { return ficlStackFetch(stack, 0); } +#if FICL_WANT_LOCALS +FICL_PLATFORM_EXTERN void stackLink (ficlStack *stack, int cells) { ficlStackLink(stack, cells); } +FICL_PLATFORM_EXTERN void stackUnlink (ficlStack *stack) { ficlStackUnlink(stack); } +#endif /* FICL_WANT_LOCALS */ +FICL_PLATFORM_EXTERN void stackPick (ficlStack *stack, int n) { ficlStackPick(stack, n); } +FICL_PLATFORM_EXTERN ficlCell stackPop (ficlStack *stack) { return ficlStackPop(stack); } +FICL_PLATFORM_EXTERN void *stackPopPtr (ficlStack *stack) { return ficlStackPopPointer(stack); } +FICL_PLATFORM_EXTERN ficlUnsigned stackPopUNS (ficlStack *stack) { return ficlStackPopUnsigned(stack); } +FICL_PLATFORM_EXTERN ficlInteger stackPopINT (ficlStack *stack) { return ficlStackPopInteger(stack); } +FICL_PLATFORM_EXTERN void stackPush (ficlStack *stack, ficlCell cell) { ficlStackPush(stack, cell); } +FICL_PLATFORM_EXTERN void stackPushPtr (ficlStack *stack, void *pointer) { ficlStackPushPointer(stack, pointer); } +FICL_PLATFORM_EXTERN void stackPushUNS (ficlStack *stack, ficlUnsigned u) { ficlStackPushUnsigned(stack, u); } +FICL_PLATFORM_EXTERN void stackPushINT (ficlStack *stack, ficlInteger i) { ficlStackPushInteger(stack, i); } +FICL_PLATFORM_EXTERN void stackReset (ficlStack *stack) { ficlStackReset(stack); } +FICL_PLATFORM_EXTERN void stackRoll (ficlStack *stack, int n) { ficlStackRoll(stack, n); } +FICL_PLATFORM_EXTERN void stackSetTop (ficlStack *stack, ficlCell cell) { ficlStackSetTop(stack, cell); } +FICL_PLATFORM_EXTERN void stackStore (ficlStack *stack, int n, ficlCell cell) { ficlStackStore(stack, n, cell); } + +#if (FICL_WANT_FLOAT) +FICL_PLATFORM_EXTERN ficlFloat stackPopFloat (ficlStack *stack) { return ficlStackPopFloat(stack); } +FICL_PLATFORM_EXTERN void stackPushFloat(ficlStack *stack, ficlFloat f) { ficlStackPushFloat(stack, f); } +#endif + +FICL_PLATFORM_EXTERN int wordIsImmediate(ficlWord *word) { return ficlWordIsImmediate(word); } +FICL_PLATFORM_EXTERN int wordIsCompileOnly(ficlWord *word) { return ficlWordIsCompileOnly(word); } + + +FICL_PLATFORM_EXTERN void vmBranchRelative(ficlVm *vm, int offset) { ficlVmBranchRelative(vm, offset); } +FICL_PLATFORM_EXTERN ficlVm *vmCreate (ficlVm *vm, unsigned nPStack, unsigned nRStack) { return ficlVmCreate(vm, nPStack, nRStack); } +FICL_PLATFORM_EXTERN void vmDelete (ficlVm *vm) { ficlVmDestroy(vm); } +FICL_PLATFORM_EXTERN void vmExecute (ficlVm *vm, ficlWord *word) { ficlVmExecuteWord(vm, word); } +FICL_PLATFORM_EXTERN ficlDictionary *vmGetDict (ficlVm *vm) { return ficlVmGetDictionary(vm); } +FICL_PLATFORM_EXTERN char * vmGetString (ficlVm *vm, ficlCountedString *spDest, char delimiter) { return ficlVmGetString(vm, spDest, delimiter); } +FICL_PLATFORM_EXTERN ficlString vmGetWord (ficlVm *vm) { return ficlVmGetWord(vm); } +FICL_PLATFORM_EXTERN ficlString vmGetWord0 (ficlVm *vm) { return ficlVmGetWord0(vm); } +FICL_PLATFORM_EXTERN int vmGetWordToPad (ficlVm *vm) { return ficlVmGetWordToPad(vm); } +FICL_PLATFORM_EXTERN ficlString vmParseString (ficlVm *vm, char delimiter) { return ficlVmParseString(vm, delimiter); } +FICL_PLATFORM_EXTERN ficlString vmParseStringEx(ficlVm *vm, char delimiter, char skipLeading) { return ficlVmParseStringEx(vm, delimiter, skipLeading); } +FICL_PLATFORM_EXTERN ficlCell vmPop (ficlVm *vm) { return ficlVmPop(vm); } +FICL_PLATFORM_EXTERN void vmPush (ficlVm *vm, ficlCell cell) { ficlVmPush(vm, cell); } +FICL_PLATFORM_EXTERN void vmPopIP (ficlVm *vm) { ficlVmPopIP(vm); } +FICL_PLATFORM_EXTERN void vmPushIP (ficlVm *vm, ficlIp newIP) { ficlVmPushIP(vm, newIP); } +FICL_PLATFORM_EXTERN void vmQuit (ficlVm *vm) { ficlVmQuit(vm); } +FICL_PLATFORM_EXTERN void vmReset (ficlVm *vm) { ficlVmReset(vm); } +FICL_PLATFORM_EXTERN void vmThrow (ficlVm *vm, int except) { ficlVmThrow(vm, except); } +FICL_PLATFORM_EXTERN void vmThrowErr (ficlVm *vm, char *fmt, ...) { va_list list; va_start(list, fmt); ficlVmThrowErrorVararg(vm, fmt, list); va_end(list); } + +FICL_PLATFORM_EXTERN void vmCheckStack(ficlVm *vm, int popCells, int pushCells) { FICL_IGNORE(vm); FICL_IGNORE(popCells); FICL_IGNORE(pushCells); FICL_STACK_CHECK(vm->dataStack, popCells, pushCells); } +#if FICL_WANT_FLOAT +FICL_PLATFORM_EXTERN void vmCheckFStack(ficlVm *vm, int popCells, int pushCells) { FICL_IGNORE(vm); FICL_IGNORE(popCells); FICL_IGNORE(pushCells); FICL_STACK_CHECK(vm->floatStack, popCells, pushCells); } +#endif + +FICL_PLATFORM_EXTERN void vmPushTib (ficlVm *vm, char *text, ficlInteger nChars, ficlTIB *pSaveTib) { ficlVmPushTib(vm, text, nChars, pSaveTib); } +FICL_PLATFORM_EXTERN void vmPopTib (ficlVm *vm, ficlTIB *pTib) { ficlVmPopTib(vm, pTib); } + +FICL_PLATFORM_EXTERN int isPowerOfTwo(ficlUnsigned u) { return ficlIsPowerOfTwo(u); } + +#if defined(_WIN32) +/* #SHEESH +** Why do Microsoft Meatballs insist on contaminating +** my namespace with their string functions??? +*/ +#pragma warning(disable: 4273) +#endif +char *ltoa(ficlInteger value, char *string, int radix ) { return ficlLtoa(value, string, radix); } +char *ultoa(ficlUnsigned value, char *string, int radix ) { return ficlUltoa(value, string, radix); } +char *strrev( char *string ) { return ficlStringReverse(string); } +#if defined(_WIN32) +#pragma warning(default: 4273) +#endif +FICL_PLATFORM_EXTERN char digit_to_char(int value) { return ficlDigitToCharacter(value); } +FICL_PLATFORM_EXTERN char *skipSpace(char *cp, char *end) { return ficlStringSkipSpace(cp, end); } +FICL_PLATFORM_EXTERN char *caseFold(char *cp) { return ficlStringCaseFold(cp); } +FICL_PLATFORM_EXTERN int strincmp(char *cp1, char *cp2, ficlUnsigned count) { return ficlStrincmp(cp1, cp2, count); } + +FICL_PLATFORM_EXTERN void hashForget (ficlHash *hash, void *where) { ficlHashForget(hash, where); } +FICL_PLATFORM_EXTERN ficlUnsigned16 hashHashCode (ficlString string) { return ficlHashCode(string); } +FICL_PLATFORM_EXTERN void hashInsertWord(ficlHash *hash, ficlWord *word) { ficlHashInsertWord(hash, word); } +FICL_PLATFORM_EXTERN ficlWord *hashLookup (ficlHash *hash, ficlString string, ficlUnsigned16 hashCode) { return ficlHashLookup(hash, string, hashCode); } +FICL_PLATFORM_EXTERN void hashReset (ficlHash *hash) { ficlHashReset(hash); } + + +FICL_PLATFORM_EXTERN void *alignPtr(void *ptr) { return ficlAlignPointer(ptr); } +FICL_PLATFORM_EXTERN void dictAbortDefinition(ficlDictionary *dictionary) { ficlDictionaryAbortDefinition(dictionary); } +FICL_PLATFORM_EXTERN void dictAlign (ficlDictionary *dictionary) { ficlDictionaryAlign(dictionary); } +FICL_PLATFORM_EXTERN int dictAllot (ficlDictionary *dictionary, int n) { ficlDictionaryAllot(dictionary, n); return 0; } +FICL_PLATFORM_EXTERN int dictAllotCells (ficlDictionary *dictionary, int cells) { ficlDictionaryAllotCells(dictionary, cells); return 0; } +FICL_PLATFORM_EXTERN void dictAppendCell (ficlDictionary *dictionary, ficlCell cell) { ficlDictionaryAppendCell(dictionary, cell); } +FICL_PLATFORM_EXTERN void dictAppendChar (ficlDictionary *dictionary, char c) { ficlDictionaryAppendCharacter(dictionary, c); } +FICL_PLATFORM_EXTERN ficlWord *dictAppendWord (ficlDictionary *dictionary, + char *name, + ficlPrimitive code, + ficlUnsigned8 flags) + { return ficlDictionaryAppendPrimitive(dictionary, name, code, flags); } +FICL_PLATFORM_EXTERN ficlWord *dictAppendWord2(ficlDictionary *dictionary, + ficlString name, + ficlPrimitive code, + ficlUnsigned8 flags) + { return ficlDictionaryAppendWord(dictionary, name, code, flags); } +FICL_PLATFORM_EXTERN void dictAppendUNS (ficlDictionary *dictionary, ficlUnsigned u) { ficlDictionaryAppendUnsigned(dictionary, u); } +FICL_PLATFORM_EXTERN int dictCellsAvail (ficlDictionary *dictionary) { return ficlDictionaryCellsAvailable(dictionary); } +FICL_PLATFORM_EXTERN int dictCellsUsed (ficlDictionary *dictionary) { return ficlDictionaryCellsUsed(dictionary); } +FICL_PLATFORM_EXTERN void dictCheck (ficlDictionary *dictionary, ficlVm *vm, int n) { FICL_IGNORE(dictionary); FICL_IGNORE(vm); FICL_IGNORE(n); FICL_VM_DICTIONARY_CHECK(vm, dictionary, n); } +FICL_PLATFORM_EXTERN ficlDictionary *dictCreate(unsigned cells) { return ficlDictionaryCreate(NULL, cells); } +FICL_PLATFORM_EXTERN ficlDictionary *dictCreateHashed(unsigned cells, unsigned hash) { return ficlDictionaryCreateHashed(NULL, cells, hash); } +FICL_PLATFORM_EXTERN ficlHash *dictCreateWordlist(ficlDictionary *dictionary, int nBuckets) { return ficlDictionaryCreateWordlist(dictionary, nBuckets); } +FICL_PLATFORM_EXTERN void dictDelete (ficlDictionary *dictionary) { ficlDictionaryDestroy(dictionary); } +FICL_PLATFORM_EXTERN void dictEmpty (ficlDictionary *dictionary, unsigned nHash) { ficlDictionaryEmpty(dictionary, nHash); } +#if FICL_WANT_FLOAT +FICL_PLATFORM_EXTERN void ficlPrimitiveHashSummary(ficlVm *vm); +FICL_PLATFORM_EXTERN void dictHashSummary(ficlVm *vm) { ficlPrimitiveHashSummary(vm); } +#endif +FICL_PLATFORM_EXTERN int dictIncludes (ficlDictionary *dictionary, void *p) { return ficlDictionaryIncludes(dictionary, p); } +FICL_PLATFORM_EXTERN ficlWord *dictLookup (ficlDictionary *dictionary, ficlString name) { return ficlDictionaryLookup(dictionary, name); } +#if FICL_WANT_LOCALS +FICL_PLATFORM_EXTERN ficlWord *ficlLookupLoc (ficlSystem *system, ficlString name) { return ficlDictionaryLookup(ficlSystemGetLocals(system), name); } +#endif +FICL_PLATFORM_EXTERN void dictResetSearchOrder(ficlDictionary *dictionary) { ficlDictionaryResetSearchOrder(dictionary); } +FICL_PLATFORM_EXTERN void dictSetFlags (ficlDictionary *dictionary, ficlUnsigned8 set, ficlUnsigned8 clear) { ficlDictionarySetFlags(dictionary, set); ficlDictionaryClearFlags(dictionary, clear); } +FICL_PLATFORM_EXTERN void dictSetImmediate(ficlDictionary *dictionary) { ficlDictionarySetImmediate(dictionary); } +FICL_PLATFORM_EXTERN void dictUnsmudge (ficlDictionary *dictionary) { ficlDictionaryUnsmudge(dictionary); } +FICL_PLATFORM_EXTERN ficlCell *dictWhere (ficlDictionary *dictionary) { return ficlDictionaryWhere(dictionary); } + +FICL_PLATFORM_EXTERN int ficlAddParseStep(ficlSystem *system, ficlWord *word) { return ficlSystemAddParseStep(system, word); } +FICL_PLATFORM_EXTERN void ficlAddPrecompiledParseStep(ficlSystem *system, char *name, ficlParseStep pStep) { ficlSystemAddPrimitiveParseStep(system, name, pStep); } +FICL_PLATFORM_EXTERN void ficlPrimitiveParseStepList(ficlVm *vm); +FICL_PLATFORM_EXTERN void ficlListParseSteps(ficlVm *vm) { ficlPrimitiveParseStepList(vm); } + +FICL_PLATFORM_EXTERN void ficlTermSystem(ficlSystem *system) { ficlSystemDestroy(system); } +FICL_PLATFORM_EXTERN int ficlEvaluate(ficlVm *vm, char *pText) { return ficlVmEvaluate(vm, pText); } +FICL_PLATFORM_EXTERN int ficlExec (ficlVm *vm, char *pText) { ficlString s; FICL_STRING_SET_FROM_CSTRING(s, pText); return ficlVmExecuteString(vm, s); } +FICL_PLATFORM_EXTERN int ficlExecC(ficlVm *vm, char *pText, ficlInteger nChars) { ficlString s; FICL_STRING_SET_POINTER(s, pText); FICL_STRING_SET_LENGTH(s, nChars); return ficlVmExecuteString(vm, s); } +FICL_PLATFORM_EXTERN int ficlExecXT(ficlVm *vm, ficlWord *word) { return ficlVmExecuteXT(vm, word); } +FICL_PLATFORM_EXTERN void ficlFreeVM(ficlVm *vm) { ficlVmDestroy(vm); } + + + + + +static void thunkTextOut(ficlCallback *callback, char *text) + { + ficlCompatibilityOutputFunction outputFunction; + if ((callback->vm != NULL) && (callback->vm->thunkedTextout != NULL)) + outputFunction = callback->system->thunkedTextout; + else if (callback->system->thunkedTextout != NULL) + outputFunction = callback->system->thunkedTextout; + else + { + ficlCallbackDefaultTextOut(callback, text); + return; + } + ficlCompatibilityTextOutCallback(callback, text, outputFunction); + } + + +FICL_PLATFORM_EXTERN void vmSetTextOut(ficlVm *vm, ficlCompatibilityOutputFunction textOut) + { + vm->thunkedTextout = textOut; + ficlVmSetTextOut(vm, thunkTextOut); + } + +FICL_PLATFORM_EXTERN void vmTextOut (ficlVm *vm, char *text, int fNewline) + { + ficlVmTextOut(vm, text); + if (fNewline) + ficlVmTextOut(vm, "\n"); + } + + +FICL_PLATFORM_EXTERN void ficlTextOut (ficlVm *vm, char *text, int fNewline) + { + vmTextOut(vm, text, fNewline); + } + +extern ficlSystem *ficlSystemGlobal; +static defaultStackSize = FICL_DEFAULT_STACK_SIZE; +FICL_PLATFORM_EXTERN int ficlSetStackSize(int nStackCells) +{ + if (defaultStackSize < nStackCells) + defaultStackSize = nStackCells; + if ((ficlSystemGlobal != NULL) && (ficlSystemGlobal->stackSize < nStackCells)) + ficlSystemGlobal->stackSize = nStackCells; + return defaultStackSize; +} + + +FICL_PLATFORM_EXTERN ficlSystem *ficlInitSystemEx(ficlSystemInformation *fsi) +{ + ficlSystem *returnValue; + ficlCompatibilityOutputFunction thunkedTextout; + ficlSystemInformation clone; + + memcpy(&clone, fsi, sizeof(clone)); + thunkedTextout = (ficlCompatibilityOutputFunction)clone.textOut; + clone.textOut = clone.errorOut = thunkTextOut; + + returnValue = ficlSystemCreate(&clone); + if (returnValue != NULL) + { + returnValue->thunkedTextout = thunkedTextout; + } + return returnValue; +} + + +FICL_PLATFORM_EXTERN ficlSystem *ficlInitSystem(int nDictCells) +{ + ficlSystemInformation fsi; + ficlSystemInformationInitialize(&fsi); + fsi.dictionarySize = nDictCells; + if (fsi.stackSize < defaultStackSize) + fsi.stackSize = defaultStackSize; + return ficlSystemCreate(&fsi); +} + + + + +FICL_PLATFORM_EXTERN ficlVm *ficlNewVM(ficlSystem *system) +{ + ficlVm *returnValue = ficlSystemCreateVm(system); + if (returnValue != NULL) + { + if ((returnValue->callback.textOut != NULL) && (returnValue->callback.textOut != thunkTextOut)) + { + returnValue->thunkedTextout = (ficlCompatibilityOutputFunction)returnValue->callback.textOut; + returnValue->callback.textOut = thunkTextOut; + } + if ((returnValue->callback.errorOut != NULL) && (returnValue->callback.errorOut != thunkTextOut)) + { + if (returnValue->thunkedTextout == NULL) + returnValue->thunkedTextout = (ficlCompatibilityOutputFunction)returnValue->callback.errorOut; + returnValue->callback.errorOut = thunkTextOut; + } + } + return returnValue; +} + + + +FICL_PLATFORM_EXTERN ficlWord *ficlLookup(ficlSystem *system, char *name) { return ficlSystemLookup(system, name); } +FICL_PLATFORM_EXTERN ficlDictionary *ficlGetDict(ficlSystem *system) { return ficlSystemGetDictionary(system); } +FICL_PLATFORM_EXTERN ficlDictionary *ficlGetEnv (ficlSystem *system) { return ficlSystemGetEnvironment(system); } +FICL_PLATFORM_EXTERN void ficlSetEnv (ficlSystem *system, char *name, ficlInteger value) { ficlDictionarySetConstant(ficlSystemGetDictionary(system), name, value); } +FICL_PLATFORM_EXTERN void ficlSetEnvD(ficlSystem *system, char *name, ficlInteger high, ficlInteger low) { ficl2Unsigned value; FICL_2UNSIGNED_SET(low, high, value); ficlDictionarySet2Constant(ficlSystemGetDictionary(system), name, FICL_2UNSIGNED_TO_2INTEGER(value)); } +#if FICL_WANT_LOCALS +FICL_PLATFORM_EXTERN ficlDictionary *ficlGetLoc (ficlSystem *system) { return ficlSystemGetLocals(system); } +#endif +FICL_PLATFORM_EXTERN int ficlBuild(ficlSystem *system, char *name, ficlPrimitive code, char flags) { ficlDictionary *dictionary = ficlSystemGetDictionary(system); ficlDictionaryLock(dictionary, FICL_TRUE); ficlDictionaryAppendPrimitive(dictionary, name, code, flags); ficlDictionaryLock(dictionary, FICL_FALSE); return 0; } +FICL_PLATFORM_EXTERN void ficlCompileCore(ficlSystem *system) { ficlSystemCompileCore(system); } +FICL_PLATFORM_EXTERN void ficlCompilePrefix(ficlSystem *system) { ficlSystemCompilePrefix(system); } +FICL_PLATFORM_EXTERN void ficlCompileSearch(ficlSystem *system) { ficlSystemCompileSearch(system); } +FICL_PLATFORM_EXTERN void ficlCompileSoftCore(ficlSystem *system) { ficlSystemCompileSoftCore(system); } +FICL_PLATFORM_EXTERN void ficlCompileTools(ficlSystem *system) { ficlSystemCompileTools(system); } +FICL_PLATFORM_EXTERN void ficlCompileFile(ficlSystem *system) { ficlSystemCompileFile(system); } +#if FICL_WANT_FLOAT +FICL_PLATFORM_EXTERN void ficlCompileFloat(ficlSystem *system) { ficlSystemCompileFloat(system); } +FICL_PLATFORM_EXTERN int ficlParseFloatNumber( ficlVm *vm, ficlString string) { return ficlVmParseFloatNumber(vm, string); } +#endif +#if FICL_WANT_PLATFORM +FICL_PLATFORM_EXTERN void ficlCompilePlatform(ficlSystem *system) { ficlSystemCompilePlatform(system); } +#endif +FICL_PLATFORM_EXTERN int ficlParsePrefix(ficlVm *vm, ficlString string) { return ficlVmParsePrefix(vm, string); } + +FICL_PLATFORM_EXTERN int ficlParseNumber(ficlVm *vm, ficlString string) { return ficlVmParseNumber(vm, string); } +FICL_PLATFORM_EXTERN void ficlTick(ficlVm *vm) { ficlPrimitiveTick(vm); } +FICL_PLATFORM_EXTERN void parseStepParen(ficlVm *vm) { ficlPrimitiveParseStepParen(vm); } + +FICL_PLATFORM_EXTERN int isAFiclWord(ficlDictionary *dictionary, ficlWord *word) { return ficlDictionaryIsAWord(dictionary, word); } + + +FICL_PLATFORM_EXTERN void buildTestInterface(ficlSystem *system) { ficlSystemCompileExtras(system); } + + Copied: soc2015/clord/head/sys/contrib/ficl/dictionary.c (from r287721, soc2015/clord/head/sys/contrib/ficl/dict.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ soc2015/clord/head/sys/contrib/ficl/dictionary.c Mon Jun 29 19:39:54 2015 (r287740, copy of r287721, soc2015/clord/head/sys/contrib/ficl/dict.c) @@ -0,0 +1,864 @@ +/******************************************************************* +** d i c t . c +** Forth Inspired Command Language - dictionary methods +** Author: John Sadler (john_sadler@alum.mit.edu) +** Created: 19 July 1997 +** $Id: dict.c,v 1.14 2001/12/05 07:21:34 jsadler Exp $ +*******************************************************************/ +/* +** This file implements the dictionary -- FICL's model of +** memory management. All FICL words are stored in the +** dictionary. A word is a named chunk of data with its +** associated code. FICL treats all words the same, even +** precompiled ones, so your words become first-class +** extensions of the language. You can even define new +** control structures. +** +** 29 jun 1998 (sadler) added variable sized hash table support +*/ +/* +** Copyright (c) 1997-2001 John Sadler (john_sadler@alum.mit.edu) +** All rights reserved. +** +** Get the latest Ficl release at http://ficl.sourceforge.net +** +** I am interested in hearing from anyone who uses ficl. If you have +** a problem, a success story, a defect, an enhancement request, or +** if you would like to contribute to the ficl release, please +** contact me by email at the address above. +** +** L I C E N S E and D I S C L A I M E R +** +** 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$ */ + +#ifdef TESTMAIN +#include +#include +#else +#include +#endif +#include +#include "ficl.h" + +/* Dictionary on-demand resizing control variables */ +CELL dictThreshold; +CELL dictIncrease; + + +static char *dictCopyName(FICL_DICT *pDict, STRINGINFO si); + +/************************************************************************** + d i c t A b o r t D e f i n i t i o n +** Abort a definition in process: reclaim its memory and unlink it +** from the dictionary list. Assumes that there is a smudged +** definition in process...otherwise does nothing. +** NOTE: this function is not smart enough to unlink a word that +** has been successfully defined (ie linked into a hash). It +** only works for defs in process. If the def has been unsmudged, +** nothing happens. +**************************************************************************/ +void dictAbortDefinition(FICL_DICT *pDict) +{ + FICL_WORD *pFW; + ficlLockDictionary(TRUE); + pFW = pDict->smudge; + + if (pFW->flags & FW_SMUDGE) + pDict->here = (CELL *)pFW->name; + + ficlLockDictionary(FALSE); + return; +} + + +/************************************************************************** + a l i g n P t r +** Aligns the given pointer to FICL_ALIGN address units. +** Returns the aligned pointer value. +**************************************************************************/ +void *alignPtr(void *ptr) +{ +#if FICL_ALIGN > 0 + char *cp; + CELL c; + cp = (char *)ptr + FICL_ALIGN_ADD; + c.p = (void *)cp; + c.u = c.u & (~FICL_ALIGN_ADD); + ptr = (CELL *)c.p; +#endif + return ptr; +} + + +/************************************************************************** + d i c t A l i g n +** Align the dictionary's free space pointer +**************************************************************************/ +void dictAlign(FICL_DICT *pDict) +{ + pDict->here = alignPtr(pDict->here); +} + + +/************************************************************************** + d i c t A l l o t +** Allocate or remove n chars of dictionary space, with +** checks for underrun and overrun +**************************************************************************/ +int dictAllot(FICL_DICT *pDict, int n) +{ + char *cp = (char *)pDict->here; +#if FICL_ROBUST + if (n > 0) + { + if ((unsigned)n <= dictCellsAvail(pDict) * sizeof (CELL)) + cp += n; + else + return 1; /* dict is full */ + } + else + { + n = -n; + if ((unsigned)n <= dictCellsUsed(pDict) * sizeof (CELL)) + cp -= n; + else /* prevent underflow */ + cp -= dictCellsUsed(pDict) * sizeof (CELL); + } +#else + cp += n; +#endif + pDict->here = PTRtoCELL cp; + return 0; +} + + +/************************************************************************** + d i c t A l l o t C e l l s +** Reserve space for the requested number of cells in the +** dictionary. If nCells < 0 , removes space from the dictionary. +**************************************************************************/ +int dictAllotCells(FICL_DICT *pDict, int nCells) +{ +#if FICL_ROBUST + if (nCells > 0) + { + if (nCells <= dictCellsAvail(pDict)) + pDict->here += nCells; + else + return 1; /* dict is full */ + } + else + { + nCells = -nCells; + if (nCells <= dictCellsUsed(pDict)) + pDict->here -= nCells; + else /* prevent underflow */ + pDict->here -= dictCellsUsed(pDict); + } +#else + pDict->here += nCells; +#endif + return 0; +} + + +/************************************************************************** + d i c t A p p e n d C e l l +** Append the specified cell to the dictionary +**************************************************************************/ +void dictAppendCell(FICL_DICT *pDict, CELL c) +{ + *pDict->here++ = c; + return; +} + + +/************************************************************************** + d i c t A p p e n d C h a r +** Append the specified char to the dictionary +**************************************************************************/ +void dictAppendChar(FICL_DICT *pDict, char c) +{ + char *cp = (char *)pDict->here; + *cp++ = c; + pDict->here = PTRtoCELL cp; + return; +} + + +/************************************************************************** + d i c t A p p e n d W o r d +** Create a new word in the dictionary with the specified +** name, code, and flags. Name must be NULL-terminated. +**************************************************************************/ +FICL_WORD *dictAppendWord(FICL_DICT *pDict, + char *name, + FICL_CODE pCode, + UNS8 flags) +{ + STRINGINFO si; + SI_SETLEN(si, strlen(name)); + SI_SETPTR(si, name); + return dictAppendWord2(pDict, si, pCode, flags); +} + + +/************************************************************************** + d i c t A p p e n d W o r d 2 +** Create a new word in the dictionary with the specified +** STRINGINFO, code, and flags. Does not require a NULL-terminated +** name. +**************************************************************************/ +FICL_WORD *dictAppendWord2(FICL_DICT *pDict, + STRINGINFO si, + FICL_CODE pCode, + UNS8 flags) +{ + FICL_COUNT len = (FICL_COUNT)SI_COUNT(si); + char *pName; + FICL_WORD *pFW; + + ficlLockDictionary(TRUE); + + /* + ** NOTE: dictCopyName advances "here" as a side-effect. + ** It must execute before pFW is initialized. + */ + pName = dictCopyName(pDict, si); + pFW = (FICL_WORD *)pDict->here; + pDict->smudge = pFW; + pFW->hash = hashHashCode(si); + pFW->code = pCode; + pFW->flags = (UNS8)(flags | FW_SMUDGE); + pFW->nName = (char)len; + pFW->name = pName; + /* + ** Point "here" to first cell of new word's param area... + */ + pDict->here = pFW->param; + + if (!(flags & FW_SMUDGE)) + dictUnsmudge(pDict); + + ficlLockDictionary(FALSE); + return pFW; +} + + +/************************************************************************** + d i c t A p p e n d U N S +** Append the specified FICL_UNS to the dictionary +**************************************************************************/ +void dictAppendUNS(FICL_DICT *pDict, FICL_UNS u) +{ + *pDict->here++ = LVALUEtoCELL(u); + return; +} + + +/************************************************************************** + d i c t C e l l s A v a i l +** Returns the number of empty cells left in the dictionary +**************************************************************************/ +int dictCellsAvail(FICL_DICT *pDict) +{ + return pDict->size - dictCellsUsed(pDict); +} + + +/************************************************************************** + d i c t C e l l s U s e d +** Returns the number of cells consumed in the dicionary +**************************************************************************/ +int dictCellsUsed(FICL_DICT *pDict) +{ + return pDict->here - pDict->dict; +} + + +/************************************************************************** + d i c t C h e c k +** Checks the dictionary for corruption and throws appropriate +** errors. +** Input: +n number of ADDRESS UNITS (not Cells) proposed to allot +** -n number of ADDRESS UNITS proposed to de-allot +** 0 just do a consistency check +**************************************************************************/ +void dictCheck(FICL_DICT *pDict, FICL_VM *pVM, int n) +{ + if ((n >= 0) && (dictCellsAvail(pDict) * (int)sizeof(CELL) < n)) + { + vmThrowErr(pVM, "Error: dictionary full"); + } + + if ((n <= 0) && (dictCellsUsed(pDict) * (int)sizeof(CELL) < -n)) + { + vmThrowErr(pVM, "Error: dictionary underflow"); + } + + if (pDict->nLists > FICL_DEFAULT_VOCS) + { + dictResetSearchOrder(pDict); + vmThrowErr(pVM, "Error: search order overflow"); + } + else if (pDict->nLists < 0) + { + dictResetSearchOrder(pDict); + vmThrowErr(pVM, "Error: search order underflow"); + } + + return; +} + + +/************************************************************************** + d i c t C o p y N a m e +** Copy up to nFICLNAME characters of the name specified by si into +** the dictionary starting at "here", then NULL-terminate the name, +** point "here" to the next available byte, and return the address of +** the beginning of the name. Used by dictAppendWord. +** N O T E S : +** 1. "here" is guaranteed to be aligned after this operation. +** 2. If the string has zero length, align and return "here" +**************************************************************************/ +static char *dictCopyName(FICL_DICT *pDict, STRINGINFO si) +{ + char *oldCP = (char *)pDict->here; + char *cp = oldCP; + char *name = SI_PTR(si); + int i = SI_COUNT(si); + + if (i == 0) + { + dictAlign(pDict); + return (char *)pDict->here; + } + + if (i > nFICLNAME) + i = nFICLNAME; + + for (; i > 0; --i) + { + *cp++ = *name++; + } + + *cp++ = '\0'; + + pDict->here = PTRtoCELL cp; + dictAlign(pDict); + return oldCP; +} + + +/************************************************************************** + d i c t C r e a t e +** Create and initialize a dictionary with the specified number +** of cells capacity, and no hashing (hash size == 1). +**************************************************************************/ +FICL_DICT *dictCreate(unsigned nCells) +{ + return dictCreateHashed(nCells, 1); +} + + +FICL_DICT *dictCreateHashed(unsigned nCells, unsigned nHash) +{ + FICL_DICT *pDict; + size_t nAlloc; + + nAlloc = sizeof (FICL_HASH) + nCells * sizeof (CELL) + + (nHash - 1) * sizeof (FICL_WORD *); + + pDict = ficlMalloc(sizeof (FICL_DICT)); + assert(pDict); + memset(pDict, 0, sizeof (FICL_DICT)); + pDict->dict = ficlMalloc(nAlloc); + assert(pDict->dict); + + pDict->size = nCells; + dictEmpty(pDict, nHash); + return pDict; +} + + +/************************************************************************** + d i c t C r e a t e W o r d l i s t +** Create and initialize an anonymous wordlist +**************************************************************************/ +FICL_HASH *dictCreateWordlist(FICL_DICT *dp, int nBuckets) +{ + FICL_HASH *pHash; + + dictAlign(dp); + pHash = (FICL_HASH *)dp->here; + dictAllot(dp, sizeof (FICL_HASH) + + (nBuckets-1) * sizeof (FICL_WORD *)); + + pHash->size = nBuckets; + hashReset(pHash); + return pHash; +} + + +/************************************************************************** + d i c t D e l e t e +** Free all memory allocated for the given dictionary +**************************************************************************/ +void dictDelete(FICL_DICT *pDict) +{ + assert(pDict); + ficlFree(pDict); + return; +} + + +/************************************************************************** + d i c t E m p t y +** Empty the dictionary, reset its hash table, and reset its search order. +** Clears and (re-)creates the hash table with the size specified by nHash. +**************************************************************************/ +void dictEmpty(FICL_DICT *pDict, unsigned nHash) +{ + FICL_HASH *pHash; + + pDict->here = pDict->dict; + + dictAlign(pDict); + pHash = (FICL_HASH *)pDict->here; + dictAllot(pDict, + sizeof (FICL_HASH) + (nHash - 1) * sizeof (FICL_WORD *)); + + pHash->size = nHash; + hashReset(pHash); + + pDict->pForthWords = pHash; + pDict->smudge = NULL; + dictResetSearchOrder(pDict); + return; +} + + +/************************************************************************** + d i c t H a s h S u m m a r y +** Calculate a figure of merit for the dictionary hash table based +** on the average search depth for all the words in the dictionary, +** assuming uniform distribution of target keys. The figure of merit +** is the ratio of the total search depth for all keys in the table +** versus a theoretical optimum that would be achieved if the keys +** were distributed into the table as evenly as possible. +** The figure would be worse if the hash table used an open +** addressing scheme (i.e. collisions resolved by searching the +** table for an empty slot) for a given size table. +**************************************************************************/ +#if FICL_WANT_FLOAT +void dictHashSummary(FICL_VM *pVM) +{ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-soc-all@freebsd.org Mon Jun 29 19:47:38 2015 Return-Path: Delivered-To: svn-soc-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 66636990230 for ; Mon, 29 Jun 2015 19:47:38 +0000 (UTC) (envelope-from roam@FreeBSD.org) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5819C1DF7 for ; Mon, 29 Jun 2015 19:47:38 +0000 (UTC) (envelope-from roam@FreeBSD.org) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5TJlcQr008545 for ; Mon, 29 Jun 2015 19:47:38 GMT (envelope-from roam@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.9/8.14.9/Submit) id t5TJlbRO008541 for svn-soc-all@FreeBSD.org; Mon, 29 Jun 2015 19:47:37 GMT (envelope-from roam@FreeBSD.org) Date: Mon, 29 Jun 2015 19:47:37 GMT Message-Id: <201506291947.t5TJlbRO008541@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to roam@FreeBSD.org using -f From: roam@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r287741 - soc2015/roam MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2015 19:47:38 -0000 Author: roam Date: Mon Jun 29 19:47:37 2015 New Revision: 287741 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=287741 Log: Drop some ng_ayiya to-do items. The userland "responder" program should take care of sending hearbeat packets, responding to the peer's queries, and sending any needed queries of its own. The Netgraph module itself does not need to bother with any of that. ObQuote: "But I won't do that, no, I won't do that" Modified: soc2015/roam/README.txt Modified: soc2015/roam/README.txt ============================================================================== --- soc2015/roam/README.txt Mon Jun 29 19:39:54 2015 (r287740) +++ soc2015/roam/README.txt Mon Jun 29 19:47:37 2015 (r287741) @@ -144,13 +144,6 @@ To-do list ---------- -- respond to AYIYA queries, maybe with content supplied via more Netgraph - control messages - -- send AYIYA queries, maybe in response to more Netgraph control messages - -- use a callout to periodically send an AYIYA heartbeat packet - - finish the Net-SixXS Perl distribution (mostly documentation) and release it to CPAN From owner-svn-soc-all@freebsd.org Mon Jun 29 19:47:42 2015 Return-Path: Delivered-To: svn-soc-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A4E9D990241 for ; Mon, 29 Jun 2015 19:47:42 +0000 (UTC) (envelope-from roam@FreeBSD.org) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 969D91E0B for ; Mon, 29 Jun 2015 19:47:42 +0000 (UTC) (envelope-from roam@FreeBSD.org) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5TJlgX3008577 for ; Mon, 29 Jun 2015 19:47:42 GMT (envelope-from roam@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.9/8.14.9/Submit) id t5TJlg1R008573 for svn-soc-all@FreeBSD.org; Mon, 29 Jun 2015 19:47:42 GMT (envelope-from roam@FreeBSD.org) Date: Mon, 29 Jun 2015 19:47:42 GMT Message-Id: <201506291947.t5TJlg1R008573@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to roam@FreeBSD.org using -f From: roam@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r287742 - soc2015/roam/ng_ayiya MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2015 19:47:42 -0000 Author: roam Date: Mon Jun 29 19:47:41 2015 New Revision: 287742 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=287742 Log: Document data packets through the control hook. Add a note about the concept of forwarding all AYIYA packets that do not contain IPv6 forwarded data down the control hook, and signing and sending out all data packets coming in through the hook. ObQuote: "I read the news today, oh boy" Modified: soc2015/roam/ng_ayiya/ng_ayiya.4 Modified: soc2015/roam/ng_ayiya/ng_ayiya.4 ============================================================================== --- soc2015/roam/ng_ayiya/ng_ayiya.4 Mon Jun 29 19:47:37 2015 (r287741) +++ soc2015/roam/ng_ayiya/ng_ayiya.4 Mon Jun 29 19:47:41 2015 (r287742) @@ -160,7 +160,27 @@ for the administrator's convenience; any text after the slash is ignored. .It Va control -Control messages only, any data packets are ignored. +A hook used by userland programs to initialize and control the +.Tn AYIYA +tunnel's operation. +This hook is a suitable avenue for sending control messages to the +.Nm ayiya +node during its configuration. +It also serves another purpose: all packets that arrive from the +.Tn AYIYA +peer and are not IPv6 forwarded data packets (opcode 1) are sent +as data packets down the +.Nm ayiya +node's +.Va control +hook for the userland program to process. +Similarly, all data packets coming in via the +.Va control +hook are signed with the +.Tn AYIYA +tunnel's secret hash and sent to the +.Tn AYIYA +peer. .It Va inet6 The local IPv6 interface, a .Xr ng_iface 4 From owner-svn-soc-all@freebsd.org Tue Jun 30 15:02:03 2015 Return-Path: Delivered-To: svn-soc-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AD95998EF77 for ; Tue, 30 Jun 2015 15:02:03 +0000 (UTC) (envelope-from mihai@FreeBSD.org) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 97E6F1A64 for ; Tue, 30 Jun 2015 15:02:03 +0000 (UTC) (envelope-from mihai@FreeBSD.org) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5UF23DC052795 for ; Tue, 30 Jun 2015 15:02:03 GMT (envelope-from mihai@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.9/8.14.9/Submit) id t5UF21iS050324 for svn-soc-all@FreeBSD.org; Tue, 30 Jun 2015 15:02:01 GMT (envelope-from mihai@FreeBSD.org) Date: Tue, 30 Jun 2015 15:02:01 GMT Message-Id: <201506301502.t5UF21iS050324@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to mihai@FreeBSD.org using -f From: mihai@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r287759 - in soc2015/mihai/bhyve-on-arm-head/sys: arm/vmm modules/vmm-arm MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jun 2015 15:02:03 -0000 Author: mihai Date: Tue Jun 30 15:02:00 2015 New Revision: 287759 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=287759 Log: sys: arm: vmm: add save/restore low-level mechanism for a guest OS Added: soc2015/mihai/bhyve-on-arm-head/sys/arm/vmm/hyp_genassym.c Modified: soc2015/mihai/bhyve-on-arm-head/sys/arm/vmm/arm.h soc2015/mihai/bhyve-on-arm-head/sys/arm/vmm/hyp.S soc2015/mihai/bhyve-on-arm-head/sys/arm/vmm/hyp.h soc2015/mihai/bhyve-on-arm-head/sys/modules/vmm-arm/Makefile Modified: soc2015/mihai/bhyve-on-arm-head/sys/arm/vmm/arm.h ============================================================================== --- soc2015/mihai/bhyve-on-arm-head/sys/arm/vmm/arm.h Tue Jun 30 14:17:02 2015 (r287758) +++ soc2015/mihai/bhyve-on-arm-head/sys/arm/vmm/arm.h Tue Jun 30 15:02:00 2015 (r287759) @@ -1,9 +1,75 @@ #include "mmu.h" +#include + +struct hypctx { + struct hyp* hyp; + + struct reg regs; + + uint32_t hcr; + + uint32_t midr; + uint32_t mpidr; + + uint32_t sp_und; + uint32_t lr_und; + uint32_t spsr_und; + + uint32_t sp_svc; + uint32_t lr_svc; + uint32_t spsr_svc; + + uint32_t sp_abt; + uint32_t lr_abt; + uint32_t spsr_abt; + + uint32_t sp_irq; + uint32_t lr_irq; + uint32_t spsr_irq; + + uint32_t sp_fiq; + uint32_t lr_fiq; + uint32_t spsr_fiq; + uint32_t r8_fiq; + uint32_t r9_fiq; + uint32_t r10_fiq; + uint32_t r11_fiq; + uint32_t r12_fiq; + + uint32_t cp15_sctlr; + uint32_t cp15_cpacr; + uint32_t cp15_ttbcr; + uint32_t cp15_dacr; + uint64_t cp15_ttbr0; + uint64_t cp15_ttbr1; + uint32_t cp15_prrr; + uint32_t cp15_nmrr; + uint32_t cp15_csselr; + uint32_t cp15_cid; + uint32_t cp15_tid_urw; + uint32_t cp15_tid_uro; + uint32_t cp15_tid_priv; + uint32_t cp15_dfsr; + uint32_t cp15_ifsr; + uint32_t cp15_adfsr; + uint32_t cp15_aifsr; + uint32_t cp15_dfar; + uint32_t cp15_ifar; + uint32_t cp15_vbar; + uint32_t cp15_cntkctl; + uint64_t cp15_par; + uint32_t cp15_amair0; + uint32_t cp15_amair1; + +}; struct hyp { lpae_pd_entry_t l1pd[2 * LPAE_L1_ENTRIES]; + lpae_pd_entry_t vttbr; + struct hypctx ctx[VM_MAXCPU]; struct vm *vm; }; +CTASSERT((offsetof(struct hyp, l1pd) & PAGE_MASK) == 0); uint64_t vmm_call_hyp(void *hyp_func_addr, ...); Modified: soc2015/mihai/bhyve-on-arm-head/sys/arm/vmm/hyp.S ============================================================================== --- soc2015/mihai/bhyve-on-arm-head/sys/arm/vmm/hyp.S Tue Jun 30 14:17:02 2015 (r287758) +++ soc2015/mihai/bhyve-on-arm-head/sys/arm/vmm/hyp.S Tue Jun 30 15:02:00 2015 (r287759) @@ -6,9 +6,9 @@ #include #include +#include "hyp_assym.h" #include "hyp.h" - .text .globl hyp_code_start .globl hyp_code_end @@ -21,6 +21,108 @@ hvc #0 bx lr END(vmm_call_hyp) +/* + * int hyp_enter_guest(struct *hyp_vmxctx); + * - r0 pointer to the struct hyp_vmxctx + */ +ENTRY(hyp_enter_guest) + mcr p15, 4, r0, c13, c0, 2 @ Store hyp_vmxctx into HTPIDR + save_host_regs + + /* Save HOST CP15 registers */ + load_cp15_regs_batch1 @ Load in r2-r12 CP15 regs + push {r2-r12} + load_cp15_regs_batch2 @ Load in r2-r12 CP15 regs + push {r2-r12} + load_cp15_regs_batch3 @ Load in r2-r6 CP15 regs + push {r2-r6} + + /* Load GUEST CP15 registers */ + load_guest_cp15_regs_batch1 + store_cp15_regs_batch1 + load_guest_cp15_regs_batch2 + store_cp15_regs_batch2 + load_guest_cp15_regs_batch3 + store_cp15_regs_batch3 + + /* Enable stage-2 MMU, trap interrupts */ + ldr r1, [r0, #HYPCTX_HCR] + mcr p15, 4, r1, c1, c1, 0 + + /* Set MIDR and MPIDR for the Guest */ + ldr r1, [r0, #HYPCTX_MIDR] + mcr p15, 4, r1, c0, c0, 0 + ldr r1, [r0, #HYPCTX_MPIDR] + mcr p15, 4, r1, c0, c0, 5 + + /* Set VTTBR for stage-2 translation */ + ldr r1, [r0, #HYPCTX_HYP] + add r1, r1, #HYP_VTTBR + ldrd r2, r3, [r1] + mcrr p15, 6, r2, r3, c2 + + /* Trap access to the CP10/CP11 [vfp/simd] */ + mrc p15, 4, r1, c1, c1, 2 + ldr r2, =(HCPTR_TTA | HCPTR_TCP(10) | HCPTR_TCP(11)) + orr r1, r1, r2 + mcr p15, 4, r1, c1, c1, 2 + + + restore_guest_regs + + eret +hyp_exit_guest: + /* + * r0 - hypctx pointer + * r1 - exception code + * guest r0-r2 saved on stack when trapping in HYP mode + */ + + save_guest_regs + + /* Disable trap access to the CP10/CP11 [vfp/simd] */ + mrc p15, 4, r2, c1, c1, 2 + ldr r3, =(HCPTR_TTA | HCPTR_TCP(10) | HCPTR_TCP(11)) + bic r2, r2, r3 + mcr p15, 4, r2, c1, c1, 2 + + /* Set VTTBR to 0 (VMID to 0) */ + mov r2, #0 + mov r3, #0 + mcrr p15, 6, r2, r3, c2 + + /* Set MIDR and MPIDR at hardware values */ + mrc p15, 0, r2, c0, c0, 0 + mcr p15, 4, r2, c0, c0, 0 + mrc p15, 0, r2, c0, c0, 5 + mcr p15, 4, r2, c0, c0, 5 + + /* Disable all traps - HCR */ + mov r2, #0 + mcr p15, 4, r1, c1, c1, 0 + + + /* Save guest CP15 registers */ + load_cp15_regs_batch1 + store_guest_cp15_regs_batch1 + load_cp15_regs_batch2 + store_guest_cp15_regs_batch2 + load_cp15_regs_batch3 + store_guest_cp15_regs_batch3 + + /* Load HOST CP15 registers in reverse order from the stack */ + pop {r2-r6} + store_cp15_regs_batch3 @ Load in r2-r6 CP15 regs + pop {r2-r12} + store_cp15_regs_batch2 @ Load in r2-r12 CP15 regs + pop {r2-r12} + store_cp15_regs_batch1 @ Load in r2-r12 CP15 regs + + restore_host_regs + + mov r0, r1 @ r0 must hold the return value + bx lr @ go back to the host ("Returned from function" comment) +END(hyp_enter_guest) /* * void vmm_stub_install(void *hypervisor_stub_vect); @@ -72,7 +174,7 @@ hyp_init_hvc: mcr p15, 4, r0, c12, c0, 0 @ set HVBAR to the new vector mov sp, r1 @ set SP. r1 contains the stack pointer - mcrr p15, 4, r2, r3, c2 @ set the HTTBR (r2 is the low word, r3 is the low word) + mcrr p15, 4, r2, r3, c2 @ set the HTTBR (r2 is the low word, r3 is the high word) isb @ Set HTCR.T0SZ=0 so x=5 (ARM man: B4.1.76) @@ -184,18 +286,27 @@ mrs lr, SPSR push {lr} + /* Build param list for the function pointer in r0 */ mov lr, r0 mov r0, r1 mov r1, r2 mov r2, r3 blx lr + /* Returned from function */ pop {lr} msr SPSR_csxf, lr pop {lr} eret guest_trap: - b loop + /* Load hypctx in r0 from HTPIDR*/ + mrc p15, 4, r0, c13, c0, 2 + mov r1, #EXCEPTION_HVC + + // TODO: check exception cause and load status registers in hypctx + + b hyp_exit_guest + .align hyp_fiq: b loop @@ -221,7 +332,10 @@ eret guest_bad_exception: - b loop + /* Load hypctx pointer to r0 */ + mrc p15, 4, r0, c13, c0, 2 + // TODO: load HSR in VCPU + b hyp_exit_guest END(handle_bad_exception) loop: Modified: soc2015/mihai/bhyve-on-arm-head/sys/arm/vmm/hyp.h ============================================================================== --- soc2015/mihai/bhyve-on-arm-head/sys/arm/vmm/hyp.h Tue Jun 30 14:17:02 2015 (r287758) +++ soc2015/mihai/bhyve-on-arm-head/sys/arm/vmm/hyp.h Tue Jun 30 15:02:00 2015 (r287759) @@ -26,6 +26,12 @@ #define HSCTLR_A (1 << 1) #define HSCTLR_M (1 << 0) #define HSCTLR_MASK (HSCTLR_M | HSCTLR_A | HSCTLR_C | HSCTLR_I | HSCTLR_WXN | HSCTLR_FI | HSCTLR_EE | HSCTLR_TE) +/* Hyp Coprocessor Trap Register */ +#define HCPTR_TCP(x) (1 << x) +#define HCPTR_TCP_MASK (0x3fff) +#define HCPTR_TASE (1 << 15) +#define HCPTR_TTA (1 << 20) +#define HCPTR_TCPAC (1 << 31) /* TTBCR and HTCR Registers bits */ #define TTBCR_EAE (1 << 31) @@ -55,6 +61,67 @@ #define VTCR_SL_L2 (0 << 6) /* Starting-level: 2 */ #define VTCR_SL_L1 (1 << 6) /* Starting-level: 1 */ +/* Hyp Configuration Register (HCR) bits */ +#define HCR_TGE (1 << 27) +#define HCR_TVM (1 << 26) +#define HCR_TTLB (1 << 25) +#define HCR_TPU (1 << 24) +#define HCR_TPC (1 << 23) +#define HCR_TSW (1 << 22) +#define HCR_TAC (1 << 21) +#define HCR_TIDCP (1 << 20) +#define HCR_TSC (1 << 19) +#define HCR_TID3 (1 << 18) +#define HCR_TID2 (1 << 17) +#define HCR_TID1 (1 << 16) +#define HCR_TID0 (1 << 15) +#define HCR_TWE (1 << 14) +#define HCR_TWI (1 << 13) +#define HCR_DC (1 << 12) +#define HCR_BSU (3 << 10) +#define HCR_BSU_IS (1 << 10) +#define HCR_FB (1 << 9) +#define HCR_VA (1 << 8) +#define HCR_VI (1 << 7) +#define HCR_VF (1 << 6) +#define HCR_AMO (1 << 5) +#define HCR_IMO (1 << 4) +#define HCR_FMO (1 << 3) +#define HCR_PTW (1 << 2) +#define HCR_SWIO (1 << 1) +#define HCR_VM 1 +/* + * B4.1.65 HCR, Hyp Configuration Register, + * + * HCR_TSW - Trap set/way cache maintenance operations + * HCR_TAC - Trap ACTLR accessses + * HCR_TIDCP - Trap lockdown + * HCR_TSC - Trap SMC instruction + * HCR_TWE - Trap WFE instruction + * HCR_TWI - Trap WFI instruction + * HCR_BSU_IS - + * HCR_FB - Force broadcast TLB/branch predictor/ cache invalidate across ISB + * HCR_AMO - Overrides the CPSR.A bit, and enables signaling by the VA bit + * HCR_IMO - Overrides the CPSR.I bit, and enables signaling by the VI bit + * HCR_FMO - Overrides the CPSR.F bit, and enables signaling by the VF bit + * HCR_SWIO - Set/way invalidation override + * HCR_VM - Virtualization MMU enable (stage 2) + */ +#define HCR_GUEST_MASK (HCR_TSW | HCR_TAC | HCR_TIDCP | \ + HCR_TSC | HCR_TWE | HCR_TWI | HCR_BSU_IS | HCR_FB | \ + HCR_AMO | HCR_IMO | HCR_FMO | HCR_SWIO | HCR_VM + +/* Hyp Coprocessor Trap Register */ +#define HCPTR_TCP(x) (1 << x) +#define HCPTR_TCP_MASK (0x3fff) +#define HCPTR_TASE (1 << 15) +#define HCPTR_TTA (1 << 20) +#define HCPTR_TCPAC (1 << 31) + +/* Hyp System Trap Register */ +#define HSTR_T(x) (1 << x) +#define HSTR_TTEE (1 << 16) +#define HSTR_TJDBX (1 << 17) /* * Memory region attributes for LPAE (defined in pgtable-3level.h): @@ -79,4 +146,260 @@ #define HMAIR0 MAIR0 #define HMAIR1 MAIR1 +#define HYPCTX_REGS_R(x) (HYPCTX_REGS + x * 4) + +/* Banked registers */ +#define SAVE_GUEST_BANKED_REG(reg) \ + mrs r2, reg; \ + str r2, [r0, #HYPCTX_##reg] +#define SAVE_GUEST_BANKED_MODE(mode) \ + SAVE_GUEST_BANKED_REG(SP_##mode); \ + SAVE_GUEST_BANKED_REG(LR_##mode); \ + SAVE_GUEST_BANKED_REG(SPSR_##mode) + +#define RESTORE_GUEST_BANKED_REG(reg) \ + ldr r2, [r0, #HYPCTX_##reg]; \ + msr reg, r2 +#define RESTORE_GUEST_BANKED_MODE(mode) \ + RESTORE_GUEST_BANKED_REG(SP_##mode); \ + RESTORE_GUEST_BANKED_REG(LR_##mode); \ + RESTORE_GUEST_BANKED_REG(SPSR_##mode) + +#define save_guest_regs \ + /* r0 - address of the hypctx */ \ + add r2, r0, #HYPCTX_REGS_R(3); \ + stm r2, {r3-r12}; \ + pop {r3-r5}; @ Get r0-r2 from the stack \ + add r2, r0, #HYPCTX_REGS_R(0); \ + stm r2, {r3-r5}; \ + \ + str lr, [r0, #HYPCTX_REGS_LR]; \ + mrs r2, SP_usr; \ + str r2, [r0, #HYPCTX_REGS_SP]; \ + \ + mrs r2, ELR_hyp; \ + str r2, [r0, #HYPCTX_REGS_PC]; \ + mrs r2, spsr; \ + str r2, [r0, #HYPCTX_REGS_CPSR]; \ + \ + SAVE_GUEST_BANKED_MODE(svc); \ + SAVE_GUEST_BANKED_MODE(abt); \ + SAVE_GUEST_BANKED_MODE(und); \ + SAVE_GUEST_BANKED_MODE(irq); \ + SAVE_GUEST_BANKED_MODE(fiq); \ + SAVE_GUEST_BANKED_REG(r8_fiq); \ + SAVE_GUEST_BANKED_REG(r9_fiq); \ + SAVE_GUEST_BANKED_REG(r10_fiq); \ + SAVE_GUEST_BANKED_REG(r11_fiq); \ + SAVE_GUEST_BANKED_REG(r12_fiq) + +#define restore_guest_regs \ + /* r0 - address of the hypctx */ \ + RESTORE_GUEST_BANKED_MODE(svc); \ + RESTORE_GUEST_BANKED_MODE(abt); \ + RESTORE_GUEST_BANKED_MODE(und); \ + RESTORE_GUEST_BANKED_MODE(irq); \ + RESTORE_GUEST_BANKED_MODE(fiq); \ + RESTORE_GUEST_BANKED_REG(r8_fiq); \ + RESTORE_GUEST_BANKED_REG(r9_fiq); \ + RESTORE_GUEST_BANKED_REG(r10_fiq); \ + RESTORE_GUEST_BANKED_REG(r11_fiq); \ + RESTORE_GUEST_BANKED_REG(r12_fiq); \ + \ + ldr r2, [r0, #HYPCTX_REGS_PC]; \ + msr ELR_hyp, r2; \ + ldr r2, [r0, #HYPCTX_REGS_CPSR]; \ + msr SPSR_cxsf, r2; \ + \ + ldr lr, [r0, #HYPCTX_REGS_LR]; \ + ldr r2, [r0, #HYPCTX_REGS_SP]; \ + msr SP_usr, r2; \ + \ + add r2, r0, #HYPCTX_REGS_R(0); \ + ldm r2, {r0-r12} + + +#define SAVE_HOST_BANKED_REG(reg) \ + mrs r2, reg; \ + push {r2} +#define SAVE_HOST_BANKED_MODE(mode) \ + SAVE_HOST_BANKED_REG(SP_##mode); \ + SAVE_HOST_BANKED_REG(LR_##mode); \ + SAVE_HOST_BANKED_REG(SPSR_##mode) + +#define RESTORE_HOST_BANKED_REG(reg) \ + pop {r2}; \ + msr reg, r2 +#define RESTORE_HOST_BANKED_MODE(mode) \ + RESTORE_HOST_BANKED_REG(SPSR_##mode); \ + RESTORE_HOST_BANKED_REG(LR_##mode); \ + RESTORE_HOST_BANKED_REG(SP_##mode) + +#define save_host_regs \ + /* SPSR was saved when entered HYP mode */ \ + mrs r2, ELR_hyp; \ + push {r2}; \ + \ + push {r4-r12}; \ + mrs r2, SP_usr; \ + push {r2}; \ + push {lr}; \ + \ + SAVE_HOST_BANKED_MODE(svc); \ + SAVE_HOST_BANKED_MODE(abt); \ + SAVE_HOST_BANKED_MODE(und); \ + SAVE_HOST_BANKED_MODE(irq); \ + SAVE_HOST_BANKED_MODE(fiq); \ + SAVE_HOST_BANKED_REG(r8_fiq); \ + SAVE_HOST_BANKED_REG(r9_fiq); \ + SAVE_HOST_BANKED_REG(r10_fiq); \ + SAVE_HOST_BANKED_REG(r11_fiq); \ + SAVE_HOST_BANKED_REG(r12_fiq) + +#define restore_host_regs \ + RESTORE_HOST_BANKED_REG(r12_fiq); \ + RESTORE_HOST_BANKED_REG(r11_fiq); \ + RESTORE_HOST_BANKED_REG(r10_fiq); \ + RESTORE_HOST_BANKED_REG(r9_fiq); \ + RESTORE_HOST_BANKED_REG(r8_fiq); \ + RESTORE_HOST_BANKED_MODE(fiq); \ + RESTORE_HOST_BANKED_MODE(irq); \ + RESTORE_HOST_BANKED_MODE(und); \ + RESTORE_HOST_BANKED_MODE(abt); \ + RESTORE_HOST_BANKED_MODE(svc); \ + \ + pop {lr}; \ + pop {r2}; \ + msr SP_usr, r2; \ + pop {r4-r12}; \ + \ + pop {r2}; \ + msr ELR_hyp, r2 + +#define load_cp15_regs_batch1 \ + mrc p15, 0, r2, c1, c0, 0; @ SCTLR \ + mrc p15, 0, r3, c1, c0, 2; @ CPACR \ + mrc p15, 0, r4, c2, c0, 2; @ TTBCR \ + mrc p15, 0, r5, c3, c0, 0; @ DACR \ + mrrc p15, 0, r6, r7, c2; @ TTBR 0 \ + mrrc p15, 1, r8, r9, c2; @ TTBR 1 \ + mrc p15, 0, r10, c10, c2, 0; @ PRRR \ + mrc p15, 0, r11, c10, c2, 1; @ NMRR \ + mrc p15, 2, r12, c0, c0, 0 @ CSSELR + +#define load_cp15_regs_batch2 \ + mrc p15, 0, r2, c13, c0, 1; @ CID \ + mrc p15, 0, r3, c13, c0, 2; @ TID_URW \ + mrc p15, 0, r4, c13, c0, 3; @ TID_URO \ + mrc p15, 0, r5, c13, c0, 4; @ TID_PRIV \ + mrc p15, 0, r6, c5, c0, 0; @ DFSR \ + mrc p15, 0, r7, c5, c0, 1; @ IFSR \ + mrc p15, 0, r8, c5, c1, 0; @ ADFSR \ + mrc p15, 0, r9, c5, c1, 1; @ AIFSR \ + mrc p15, 0, r10, c6, c0, 0; @ DFAR \ + mrc p15, 0, r11, c6, c0, 2; @ IFAR \ + mrc p15, 0, r12, c12, c0, 0 @ VBAR + +#define load_cp15_regs_batch3 \ + mrc p15, 0, r2, c14, c1, 0; @ CNTKCTL \ + mrrc p15, 0, r3, r4, c7; @ PAR \ + mrc p15, 0, r5, c10, c3, 0; @ AMAIR0 \ + mrc p15, 0, r6, c10, c3, 1 @ AMAIR1 + +#define store_cp15_regs_batch1 \ + mcr p15, 0, r2, c1, c0, 0; @ SCTLR \ + mcr p15, 0, r3, c1, c0, 2; @ CPACR \ + mcr p15, 0, r4, c2, c0, 2; @ TTBCR \ + mcr p15, 0, r5, c3, c0, 0; @ DACR \ + mcrr p15, 0, r6, r7, c2; @ TTBR 0 \ + mcrr p15, 1, r8, r9, c2; @ TTBR 1 \ + mcr p15, 0, r10, c10, c2, 0; @ PRRR \ + mcr p15, 0, r11, c10, c2, 1; @ NMRR \ + mcr p15, 2, r12, c0, c0, 0 @ CSSELR + +#define store_cp15_regs_batch2 \ + mcr p15, 0, r2, c13, c0, 1; @ CID \ + mcr p15, 0, r3, c13, c0, 2; @ TID_URW \ + mcr p15, 0, r4, c13, c0, 3; @ TID_URO \ + mcr p15, 0, r5, c13, c0, 4; @ TID_PRIV \ + mcr p15, 0, r6, c5, c0, 0; @ DFSR \ + mcr p15, 0, r7, c5, c0, 1; @ IFSR \ + mcr p15, 0, r8, c5, c1, 0; @ ADFSR \ + mcr p15, 0, r9, c5, c1, 1; @ AIFSR \ + mcr p15, 0, r10, c6, c0, 0; @ DFAR \ + mcr p15, 0, r11, c6, c0, 2; @ IFAR \ + mcr p15, 0, r12, c12, c0, 0 @ VBAR + +#define store_cp15_regs_batch3 \ + mcr p15, 0, r2, c14, c1, 0; @ CNTKCTL \ + mcrr p15, 0, r3, r4, c7; @ PAR \ + mcr p15, 0, r5, c10, c3, 0; @ AMAIR0 \ + mcr p15, 0, r6, c10, c3, 1 @ AMAIR1 + +#define store_guest_cp15_regs_batch1 \ + str r2, [r0, #HYPCTX_CP15_SCTLR]; \ + str r3, [r0, #HYPCTX_CP15_CPACR]; \ + str r4, [r0, #HYPCTX_CP15_TTBCR]; \ + str r5, [r0, #HYPCTX_CP15_DACR]; \ + add r2, r0, #HYPCTX_CP15_TTBR0; \ + strd r6, r7, [r2]; \ + add r2, r0, #HYPCTX_CP15_TTBR1; \ + strd r8, r9, [r2]; \ + str r10, [r0, #HYPCTX_CP15_PRRR]; \ + str r11, [r0, #HYPCTX_CP15_NMRR]; \ + str r12, [r0, #HYPCTX_CP15_CSSELR] + +#define store_guest_cp15_regs_batch2 \ + str r2, [r0, #HYPCTX_CP15_CID]; \ + str r3, [r0, #HYPCTX_CP15_TID_URW]; \ + str r4, [r0, #HYPCTX_CP15_TID_URO]; \ + str r5, [r0, #HYPCTX_CP15_TID_PRIV]; \ + str r6, [r0, #HYPCTX_CP15_DFSR]; \ + str r7, [r0, #HYPCTX_CP15_IFSR]; \ + str r8, [r0, #HYPCTX_CP15_ADFSR]; \ + str r9, [r0, #HYPCTX_CP15_AIFSR]; \ + str r10, [r0, #HYPCTX_CP15_DFAR]; \ + str r11, [r0, #HYPCTX_CP15_IFAR]; \ + str r12, [r0, #HYPCTX_CP15_VBAR] + +#define store_guest_cp15_regs_batch3 \ + str r2, [r0, #HYPCTX_CP15_CNTKCTL]; \ + add r2, r0, #HYPCTX_CP15_PAR; \ + strd r4, r5, [r2]; \ + str r3, [r0, #HYPCTX_CP15_AMAIR0]; \ + str r6, [r0, #HYPCTX_CP15_AMAIR1] + +#define load_guest_cp15_regs_batch1 \ + ldr r2, [r0, #HYPCTX_CP15_SCTLR]; \ + ldr r3, [r0, #HYPCTX_CP15_CPACR]; \ + ldr r4, [r0, #HYPCTX_CP15_TTBCR]; \ + ldr r5, [r0, #HYPCTX_CP15_DACR]; \ + add r2, r0, #HYPCTX_CP15_TTBR0; \ + ldrd r6, r7, [r2]; \ + add r2, r0, #HYPCTX_CP15_TTBR1; \ + ldrd r8, r9, [r2]; \ + ldr r10, [r0, #HYPCTX_CP15_PRRR]; \ + ldr r11, [r0, #HYPCTX_CP15_NMRR]; \ + ldr r12, [r0, #HYPCTX_CP15_CSSELR] + +#define load_guest_cp15_regs_batch2 \ + ldr r2, [r0, #HYPCTX_CP15_CID]; \ + ldr r3, [r0, #HYPCTX_CP15_TID_URW]; \ + ldr r4, [r0, #HYPCTX_CP15_TID_URO]; \ + ldr r5, [r0, #HYPCTX_CP15_TID_PRIV]; \ + ldr r6, [r0, #HYPCTX_CP15_DFSR]; \ + ldr r7, [r0, #HYPCTX_CP15_IFSR]; \ + ldr r8, [r0, #HYPCTX_CP15_ADFSR]; \ + ldr r9, [r0, #HYPCTX_CP15_AIFSR]; \ + ldr r10, [r0, #HYPCTX_CP15_DFAR]; \ + ldr r11, [r0, #HYPCTX_CP15_IFAR]; \ + ldr r12, [r0, #HYPCTX_CP15_VBAR] + +#define load_guest_cp15_regs_batch3 \ + ldr r2, [r0, #HYPCTX_CP15_CNTKCTL]; \ + add r2, r0, #HYPCTX_CP15_PAR; \ + ldrd r4, r5, [r2]; \ + ldr r3, [r0, #HYPCTX_CP15_AMAIR0]; \ + ldr r6, [r0, #HYPCTX_CP15_AMAIR1] + #endif Added: soc2015/mihai/bhyve-on-arm-head/sys/arm/vmm/hyp_genassym.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ soc2015/mihai/bhyve-on-arm-head/sys/arm/vmm/hyp_genassym.c Tue Jun 30 15:02:00 2015 (r287759) @@ -0,0 +1,94 @@ +#include + +#include +#include +#include +#include + +#include +#include + +#include +#include "arm.h" + +ASSYM(HYPCTX_HYP, offsetof(struct hypctx, hyp)); +ASSYM(HYP_VTTBR, offsetof(struct hyp, vttbr)); + +ASSYM(HYPCTX_MIDR, offsetof(struct hypctx, midr)); +ASSYM(HYPCTX_MPIDR, offsetof(struct hypctx, mpidr)); +ASSYM(HYPCTX_HCR, offsetof(struct hypctx, hcr)); + +ASSYM(HYPCTX_SP_und, offsetof(struct hypctx, sp_und)); +ASSYM(HYPCTX_LR_und, offsetof(struct hypctx, lr_und)); +ASSYM(HYPCTX_SPSR_und, offsetof(struct hypctx, spsr_und)); +ASSYM(HYPCTX_SP_svc, offsetof(struct hypctx, sp_svc)); +ASSYM(HYPCTX_LR_svc, offsetof(struct hypctx, lr_svc)); +ASSYM(HYPCTX_SPSR_svc, offsetof(struct hypctx, spsr_svc)); +ASSYM(HYPCTX_SP_abt, offsetof(struct hypctx, sp_abt)); +ASSYM(HYPCTX_LR_abt, offsetof(struct hypctx, lr_abt)); +ASSYM(HYPCTX_SPSR_abt, offsetof(struct hypctx, spsr_abt)); +ASSYM(HYPCTX_SP_irq, offsetof(struct hypctx, sp_irq)); +ASSYM(HYPCTX_LR_irq, offsetof(struct hypctx, lr_irq)); +ASSYM(HYPCTX_SPSR_irq, offsetof(struct hypctx, spsr_irq)); +ASSYM(HYPCTX_SP_fiq, offsetof(struct hypctx, sp_fiq)); +ASSYM(HYPCTX_LR_fiq, offsetof(struct hypctx, lr_fiq)); +ASSYM(HYPCTX_SPSR_fiq, offsetof(struct hypctx, spsr_fiq)); +ASSYM(HYPCTX_r8_fiq, offsetof(struct hypctx, r8_fiq)); +ASSYM(HYPCTX_r9_fiq, offsetof(struct hypctx, r9_fiq)); +ASSYM(HYPCTX_r10_fiq, offsetof(struct hypctx, r10_fiq)); +ASSYM(HYPCTX_r11_fiq, offsetof(struct hypctx, r11_fiq)); +ASSYM(HYPCTX_r12_fiq, offsetof(struct hypctx, r12_fiq)); + +ASSYM(HYPCTX_REGS, offsetof(struct hypctx, regs)); +ASSYM(HYPCTX_REGS_LR, offsetof(struct hypctx, regs.r_lr)); +ASSYM(HYPCTX_REGS_SP, offsetof(struct hypctx, regs.r_sp)); +ASSYM(HYPCTX_REGS_PC, offsetof(struct hypctx, regs.r_pc)); +ASSYM(HYPCTX_REGS_CPSR, offsetof(struct hypctx, regs.r_cpsr)); + + +ASSYM(HYPCTX_CP15_SCTLR, offsetof(struct hypctx, cp15_sctlr)); +ASSYM(HYPCTX_CP15_CPACR, offsetof(struct hypctx, cp15_cpacr)); +ASSYM(HYPCTX_CP15_TTBCR, offsetof(struct hypctx, cp15_ttbcr)); +ASSYM(HYPCTX_CP15_DACR, offsetof(struct hypctx, cp15_dacr)); +ASSYM(HYPCTX_CP15_TTBR0, offsetof(struct hypctx, cp15_ttbr0)); +ASSYM(HYPCTX_CP15_TTBR1, offsetof(struct hypctx, cp15_ttbr1)); +ASSYM(HYPCTX_CP15_PRRR, offsetof(struct hypctx, cp15_prrr)); +ASSYM(HYPCTX_CP15_NMRR, offsetof(struct hypctx, cp15_nmrr)); +ASSYM(HYPCTX_CP15_CSSELR, offsetof(struct hypctx, cp15_csselr)); +ASSYM(HYPCTX_CP15_CID, offsetof(struct hypctx, cp15_cid)); +ASSYM(HYPCTX_CP15_TID_URW, offsetof(struct hypctx, cp15_tid_urw)); +ASSYM(HYPCTX_CP15_TID_URO, offsetof(struct hypctx, cp15_tid_uro)); +ASSYM(HYPCTX_CP15_TID_PRIV, offsetof(struct hypctx, cp15_tid_priv)); +ASSYM(HYPCTX_CP15_DFSR, offsetof(struct hypctx, cp15_dfsr)); +ASSYM(HYPCTX_CP15_IFSR, offsetof(struct hypctx, cp15_ifsr)); +ASSYM(HYPCTX_CP15_ADFSR, offsetof(struct hypctx, cp15_adfsr)); +ASSYM(HYPCTX_CP15_AIFSR, offsetof(struct hypctx, cp15_aifsr)); +ASSYM(HYPCTX_CP15_DFAR, offsetof(struct hypctx, cp15_dfar)); +ASSYM(HYPCTX_CP15_IFAR, offsetof(struct hypctx, cp15_ifar)); +ASSYM(HYPCTX_CP15_VBAR, offsetof(struct hypctx, cp15_vbar)); +ASSYM(HYPCTX_CP15_CNTKCTL, offsetof(struct hypctx, cp15_cntkctl)); +ASSYM(HYPCTX_CP15_PAR, offsetof(struct hypctx, cp15_par)); +ASSYM(HYPCTX_CP15_AMAIR0, offsetof(struct hypctx, cp15_amair0)); +ASSYM(HYPCTX_CP15_AMAIR1, offsetof(struct hypctx, cp15_amair1)); + + + + + + + + + + + + + + + + + + + + + + Modified: soc2015/mihai/bhyve-on-arm-head/sys/modules/vmm-arm/Makefile ============================================================================== --- soc2015/mihai/bhyve-on-arm-head/sys/modules/vmm-arm/Makefile Tue Jun 30 14:17:02 2015 (r287758) +++ soc2015/mihai/bhyve-on-arm-head/sys/modules/vmm-arm/Makefile Tue Jun 30 15:02:00 2015 (r287759) @@ -1,6 +1,8 @@ KMOD= vmm-arm SRCS= opt_acpi.h opt_ddb.h device_if.h bus_if.h pci_if.h +SRCS+= hyp_assym.h +DPSRCS= hyp_genassym.c CFLAGS+= -DVMM_KEEP_STATS -DSMP CFLAGS+= -I${.CURDIR}/../../arm/vmm @@ -14,5 +16,12 @@ arm.c \ hyp.S +CLEANFILES= hyp_assym.h hyp_genassym.o + +hyp_assym.h: hyp_genassym.o + sh ${SYSDIR}/kern/genassym.sh hyp_genassym.o > ${.TARGET} + +hyp_genassym.o: + ${CC} -c ${CFLAGS:N-fno-common} ${.IMPSRC} .include From owner-svn-soc-all@freebsd.org Tue Jun 30 21:23:02 2015 Return-Path: Delivered-To: svn-soc-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9DF78991F99 for ; Tue, 30 Jun 2015 21:23:02 +0000 (UTC) (envelope-from clord@FreeBSD.org) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8D8941688 for ; Tue, 30 Jun 2015 21:23:02 +0000 (UTC) (envelope-from clord@FreeBSD.org) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5ULN25Z019788 for ; Tue, 30 Jun 2015 21:23:02 GMT (envelope-from clord@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.9/8.14.9/Submit) id t5ULN1uM019783 for svn-soc-all@FreeBSD.org; Tue, 30 Jun 2015 21:23:01 GMT (envelope-from clord@FreeBSD.org) Date: Tue, 30 Jun 2015 21:23:01 GMT Message-Id: <201506302123.t5ULN1uM019783@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to clord@FreeBSD.org using -f From: clord@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r287788 - in soc2015/clord/head/sys/contrib/ficl: . softcore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jun 2015 21:23:02 -0000 Author: clord Date: Tue Jun 30 21:23:01 2015 New Revision: 287788 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=287788 Log: Update files to Ficl 4 that were missed in the merge process Added: soc2015/clord/head/sys/contrib/ficl/softcore/ficl.fr (props changed) - copied unchanged from r287787, mirror/FreeBSD/vendor/ficl/dist/softcore/ficl.fr soc2015/clord/head/sys/contrib/ficl/softcore/make.bat (props changed) - copied unchanged from r287787, mirror/FreeBSD/vendor/ficl/dist/softcore/make.bat soc2015/clord/head/sys/contrib/ficl/softcore/makefile (props changed) - copied unchanged from r287787, mirror/FreeBSD/vendor/ficl/dist/softcore/makefile soc2015/clord/head/sys/contrib/ficl/softcore/makesoftcore.c (props changed) - copied unchanged from r287787, mirror/FreeBSD/vendor/ficl/dist/softcore/makesoftcore.c Modified: soc2015/clord/head/sys/contrib/ficl/dictionary.c soc2015/clord/head/sys/contrib/ficl/double.c soc2015/clord/head/sys/contrib/ficl/primitives.c soc2015/clord/head/sys/contrib/ficl/softcore/classes.fr soc2015/clord/head/sys/contrib/ficl/softcore/ficlclass.fr soc2015/clord/head/sys/contrib/ficl/softcore/ficllocal.fr soc2015/clord/head/sys/contrib/ficl/softcore/fileaccess.fr soc2015/clord/head/sys/contrib/ficl/softcore/forml.fr soc2015/clord/head/sys/contrib/ficl/softcore/ifbrack.fr soc2015/clord/head/sys/contrib/ficl/softcore/jhlocal.fr soc2015/clord/head/sys/contrib/ficl/softcore/marker.fr soc2015/clord/head/sys/contrib/ficl/softcore/oo.fr soc2015/clord/head/sys/contrib/ficl/softcore/prefix.fr soc2015/clord/head/sys/contrib/ficl/softcore/softcore.fr soc2015/clord/head/sys/contrib/ficl/softcore/string.fr soc2015/clord/head/sys/contrib/ficl/system.c Modified: soc2015/clord/head/sys/contrib/ficl/dictionary.c ============================================================================== --- soc2015/clord/head/sys/contrib/ficl/dictionary.c Tue Jun 30 20:59:07 2015 (r287787) +++ soc2015/clord/head/sys/contrib/ficl/dictionary.c Tue Jun 30 21:23:01 2015 (r287788) @@ -3,13 +3,13 @@ ** Forth Inspired Command Language - dictionary methods ** Author: John Sadler (john_sadler@alum.mit.edu) ** Created: 19 July 1997 -** $Id: dict.c,v 1.14 2001/12/05 07:21:34 jsadler Exp $ +** $Id: dictionary.c,v 1.2 2010/09/12 15:14:52 asau Exp $ *******************************************************************/ /* -** This file implements the dictionary -- FICL's model of -** memory management. All FICL words are stored in the +** This file implements the dictionary -- Ficl's model of +** memory management. All Ficl words are stored in the ** dictionary. A word is a named chunk of data with its -** associated code. FICL treats all words the same, even +** associated code. Ficl treats all words the same, even ** precompiled ones, so your words become first-class ** extensions of the language. You can even define new ** control structures. @@ -22,9 +22,9 @@ ** ** Get the latest Ficl release at http://ficl.sourceforge.net ** -** I am interested in hearing from anyone who uses ficl. If you have +** I am interested in hearing from anyone who uses Ficl. If you have ** a problem, a success story, a defect, an enhancement request, or -** if you would like to contribute to the ficl release, please +** if you would like to contribute to the Ficl release, please ** contact me by email at the address above. ** ** L I C E N S E and D I S C L A I M E R @@ -51,23 +51,16 @@ ** SUCH DAMAGE. */ -/* $FreeBSD$ */ - -#ifdef TESTMAIN -#include #include -#else -#include -#endif +#include +#include #include -#include "ficl.h" - -/* Dictionary on-demand resizing control variables */ -CELL dictThreshold; -CELL dictIncrease; +#include "ficl.h" -static char *dictCopyName(FICL_DICT *pDict, STRINGINFO si); +#define FICL_SAFE_CALLBACK_FROM_SYSTEM(system) (((system) != NULL) ? &((system)->callback) : NULL) +#define FICL_SAFE_SYSTEM_FROM_DICTIONARY(dictionary) (((dictionary) != NULL) ? (dictionary)->system : NULL) +#define FICL_DICTIONARY_ASSERT(dictionary, expression) FICL_SYSTEM_ASSERT(FICL_SAFE_SYSTEM_FROM_DICTIONARY(dictionary), expression) /************************************************************************** d i c t A b o r t D e f i n i t i o n @@ -79,46 +72,27 @@ ** only works for defs in process. If the def has been unsmudged, ** nothing happens. **************************************************************************/ -void dictAbortDefinition(FICL_DICT *pDict) +void ficlDictionaryAbortDefinition(ficlDictionary *dictionary) { - FICL_WORD *pFW; - ficlLockDictionary(TRUE); - pFW = pDict->smudge; + ficlWord *word; + ficlDictionaryLock(dictionary, FICL_TRUE); + word = dictionary->smudge; - if (pFW->flags & FW_SMUDGE) - pDict->here = (CELL *)pFW->name; + if (word->flags & FICL_WORD_SMUDGED) + dictionary->here = (ficlCell *)word->name; - ficlLockDictionary(FALSE); + ficlDictionaryLock(dictionary, FICL_FALSE); return; } /************************************************************************** - a l i g n P t r -** Aligns the given pointer to FICL_ALIGN address units. -** Returns the aligned pointer value. -**************************************************************************/ -void *alignPtr(void *ptr) -{ -#if FICL_ALIGN > 0 - char *cp; - CELL c; - cp = (char *)ptr + FICL_ALIGN_ADD; - c.p = (void *)cp; - c.u = c.u & (~FICL_ALIGN_ADD); - ptr = (CELL *)c.p; -#endif - return ptr; -} - - -/************************************************************************** d i c t A l i g n ** Align the dictionary's free space pointer **************************************************************************/ -void dictAlign(FICL_DICT *pDict) +void ficlDictionaryAlign(ficlDictionary *dictionary) { - pDict->here = alignPtr(pDict->here); + dictionary->here = ficlAlignPointer(dictionary->here); } @@ -127,70 +101,32 @@ ** Allocate or remove n chars of dictionary space, with ** checks for underrun and overrun **************************************************************************/ -int dictAllot(FICL_DICT *pDict, int n) +void ficlDictionaryAllot(ficlDictionary *dictionary, int n) { - char *cp = (char *)pDict->here; -#if FICL_ROBUST - if (n > 0) - { - if ((unsigned)n <= dictCellsAvail(pDict) * sizeof (CELL)) - cp += n; - else - return 1; /* dict is full */ - } - else - { - n = -n; - if ((unsigned)n <= dictCellsUsed(pDict) * sizeof (CELL)) - cp -= n; - else /* prevent underflow */ - cp -= dictCellsUsed(pDict) * sizeof (CELL); - } -#else - cp += n; -#endif - pDict->here = PTRtoCELL cp; - return 0; + char *here = (char *)dictionary->here; + here += n; + dictionary->here = FICL_POINTER_TO_CELL(here); } /************************************************************************** d i c t A l l o t C e l l s -** Reserve space for the requested number of cells in the -** dictionary. If nCells < 0 , removes space from the dictionary. +** Reserve space for the requested number of ficlCells in the +** dictionary. If nficlCells < 0 , removes space from the dictionary. **************************************************************************/ -int dictAllotCells(FICL_DICT *pDict, int nCells) +void ficlDictionaryAllotCells(ficlDictionary *dictionary, int nficlCells) { -#if FICL_ROBUST - if (nCells > 0) - { - if (nCells <= dictCellsAvail(pDict)) - pDict->here += nCells; - else - return 1; /* dict is full */ - } - else - { - nCells = -nCells; - if (nCells <= dictCellsUsed(pDict)) - pDict->here -= nCells; - else /* prevent underflow */ - pDict->here -= dictCellsUsed(pDict); - } -#else - pDict->here += nCells; -#endif - return 0; + dictionary->here += nficlCells; } /************************************************************************** d i c t A p p e n d C e l l -** Append the specified cell to the dictionary +** Append the specified ficlCell to the dictionary **************************************************************************/ -void dictAppendCell(FICL_DICT *pDict, CELL c) +void ficlDictionaryAppendCell(ficlDictionary *dictionary, ficlCell c) { - *pDict->here++ = c; + *dictionary->here++ = c; return; } @@ -199,207 +135,333 @@ d i c t A p p e n d C h a r ** Append the specified char to the dictionary **************************************************************************/ -void dictAppendChar(FICL_DICT *pDict, char c) +void ficlDictionaryAppendCharacter(ficlDictionary *dictionary, char c) { - char *cp = (char *)pDict->here; - *cp++ = c; - pDict->here = PTRtoCELL cp; + char *here = (char *)dictionary->here; + *here++ = c; + dictionary->here = FICL_POINTER_TO_CELL(here); return; } /************************************************************************** - d i c t A p p e n d W o r d -** Create a new word in the dictionary with the specified -** name, code, and flags. Name must be NULL-terminated. + d i c t A p p e n d U N S +** Append the specified ficlUnsigned to the dictionary **************************************************************************/ -FICL_WORD *dictAppendWord(FICL_DICT *pDict, - char *name, - FICL_CODE pCode, - UNS8 flags) +void ficlDictionaryAppendUnsigned(ficlDictionary *dictionary, ficlUnsigned u) { - STRINGINFO si; - SI_SETLEN(si, strlen(name)); - SI_SETPTR(si, name); - return dictAppendWord2(pDict, si, pCode, flags); + *dictionary->here++ = FICL_LVALUE_TO_CELL(u); + return; } -/************************************************************************** - d i c t A p p e n d W o r d 2 -** Create a new word in the dictionary with the specified -** STRINGINFO, code, and flags. Does not require a NULL-terminated -** name. -**************************************************************************/ -FICL_WORD *dictAppendWord2(FICL_DICT *pDict, - STRINGINFO si, - FICL_CODE pCode, - UNS8 flags) -{ - FICL_COUNT len = (FICL_COUNT)SI_COUNT(si); - char *pName; - FICL_WORD *pFW; - - ficlLockDictionary(TRUE); +void *ficlDictionaryAppendData(ficlDictionary *dictionary, void *data, ficlInteger length) +{ + char *here = (char *)dictionary->here; + char *oldHere = here; + char *from = (char *)data; + + if (length == 0) + { + ficlDictionaryAlign(dictionary); + return (char *)dictionary->here; + } - /* - ** NOTE: dictCopyName advances "here" as a side-effect. - ** It must execute before pFW is initialized. - */ - pName = dictCopyName(pDict, si); - pFW = (FICL_WORD *)pDict->here; - pDict->smudge = pFW; - pFW->hash = hashHashCode(si); - pFW->code = pCode; - pFW->flags = (UNS8)(flags | FW_SMUDGE); - pFW->nName = (char)len; - pFW->name = pName; - /* - ** Point "here" to first cell of new word's param area... - */ - pDict->here = pFW->param; + while (length) + { + *here++ = *from++; + length--; + } - if (!(flags & FW_SMUDGE)) - dictUnsmudge(pDict); + *here++ = '\0'; - ficlLockDictionary(FALSE); - return pFW; + dictionary->here = FICL_POINTER_TO_CELL(here); + ficlDictionaryAlign(dictionary); + return oldHere; } /************************************************************************** - d i c t A p p e n d U N S -** Append the specified FICL_UNS to the dictionary + d i c t C o p y N a m e +** Copy up to FICL_NAME_LENGTH characters of the name specified by s into +** the dictionary starting at "here", then NULL-terminate the name, +** point "here" to the next available byte, and return the address of +** the beginning of the name. Used by dictAppendWord. +** N O T E S : +** 1. "here" is guaranteed to be aligned after this operation. +** 2. If the string has zero length, align and return "here" **************************************************************************/ -void dictAppendUNS(FICL_DICT *pDict, FICL_UNS u) +char *ficlDictionaryAppendString(ficlDictionary *dictionary, ficlString s) { - *pDict->here++ = LVALUEtoCELL(u); - return; + void *data = FICL_STRING_GET_POINTER(s); + ficlInteger length = FICL_STRING_GET_LENGTH(s); + + if (length > FICL_NAME_LENGTH) + length = FICL_NAME_LENGTH; + + return ficlDictionaryAppendData(dictionary, data, length); } -/************************************************************************** - d i c t C e l l s A v a i l -** Returns the number of empty cells left in the dictionary -**************************************************************************/ -int dictCellsAvail(FICL_DICT *pDict) +ficlWord *ficlDictionaryAppendConstantInstruction(ficlDictionary *dictionary, ficlString name, ficlInstruction instruction, ficlInteger value) { - return pDict->size - dictCellsUsed(pDict); + ficlWord *word = ficlDictionaryAppendWord(dictionary, name, (ficlPrimitive)instruction, FICL_WORD_DEFAULT); + if (word != NULL) + ficlDictionaryAppendUnsigned(dictionary, value); + return word; } -/************************************************************************** - d i c t C e l l s U s e d -** Returns the number of cells consumed in the dicionary -**************************************************************************/ -int dictCellsUsed(FICL_DICT *pDict) +ficlWord *ficlDictionaryAppend2ConstantInstruction(ficlDictionary *dictionary, ficlString name, ficlInstruction instruction, ficl2Integer value) { - return pDict->here - pDict->dict; + ficlWord *word = ficlDictionaryAppendWord(dictionary, name, (ficlPrimitive)instruction, FICL_WORD_DEFAULT); + if (word != NULL) + { + ficlDictionaryAppendUnsigned(dictionary, FICL_2UNSIGNED_GET_HIGH(value)); + ficlDictionaryAppendUnsigned(dictionary, FICL_2UNSIGNED_GET_LOW(value)); + } + return word; } -/************************************************************************** - d i c t C h e c k -** Checks the dictionary for corruption and throws appropriate -** errors. -** Input: +n number of ADDRESS UNITS (not Cells) proposed to allot -** -n number of ADDRESS UNITS proposed to de-allot -** 0 just do a consistency check -**************************************************************************/ -void dictCheck(FICL_DICT *pDict, FICL_VM *pVM, int n) + +ficlWord *ficlDictionaryAppendConstant(ficlDictionary *dictionary, char *name, ficlInteger value) { - if ((n >= 0) && (dictCellsAvail(pDict) * (int)sizeof(CELL) < n)) + ficlString s; + FICL_STRING_SET_FROM_CSTRING(s, name); + return ficlDictionaryAppendConstantInstruction(dictionary, s, ficlInstructionConstantParen, value); +} + + + +ficlWord *ficlDictionaryAppend2Constant(ficlDictionary *dictionary, char *name, ficl2Integer value) +{ + ficlString s; + FICL_STRING_SET_FROM_CSTRING(s, name); + return ficlDictionaryAppend2ConstantInstruction(dictionary, s, ficlInstruction2ConstantParen, value); +} + + + +ficlWord *ficlDictionarySetConstantInstruction(ficlDictionary *dictionary, ficlString name, ficlInstruction instruction, ficlInteger value) +{ + ficlWord *word = ficlDictionaryLookup(dictionary, name); + + if (word == NULL) { - vmThrowErr(pVM, "Error: dictionary full"); + word = ficlDictionaryAppendConstantInstruction(dictionary, name, instruction, value); } - - if ((n <= 0) && (dictCellsUsed(pDict) * (int)sizeof(CELL) < -n)) + else { - vmThrowErr(pVM, "Error: dictionary underflow"); + word->code = (ficlPrimitive)instruction; + word->param[0] = FICL_LVALUE_TO_CELL(value); } + return word; +} - if (pDict->nLists > FICL_DEFAULT_VOCS) - { - dictResetSearchOrder(pDict); - vmThrowErr(pVM, "Error: search order overflow"); +ficlWord *ficlDictionarySetConstant(ficlDictionary *dictionary, char *name, ficlInteger value) +{ + ficlString s; + FICL_STRING_SET_FROM_CSTRING(s, name); + return ficlDictionarySetConstantInstruction(dictionary, s, ficlInstructionConstantParen, value); +} + +ficlWord *ficlDictionarySet2ConstantInstruction(ficlDictionary *dictionary, ficlString s, ficlInstruction instruction, ficl2Integer value) +{ + ficlWord *word; + word = ficlDictionaryLookup(dictionary, s); + + /* only reuse the existing word if we're sure it has space for a 2constant */ + if ((word != NULL) && + ((((ficlInstruction)word->code) == ficlInstruction2ConstantParen) +#if FICL_WANT_FLOAT + || + (((ficlInstruction)word->code) == ficlInstructionF2ConstantParen) +#endif /* FICL_WANT_FLOAT */ + ) + ) + { + word->code = (ficlPrimitive)instruction; + word->param[0].u = FICL_2UNSIGNED_GET_HIGH(value); + word->param[1].u = FICL_2UNSIGNED_GET_LOW(value); } - else if (pDict->nLists < 0) + else { - dictResetSearchOrder(pDict); - vmThrowErr(pVM, "Error: search order underflow"); + word = ficlDictionaryAppend2ConstantInstruction(dictionary, s, instruction, value); } - return; + return word; +} + + +ficlWord *ficlDictionarySet2Constant(ficlDictionary *dictionary, char *name, ficl2Integer value) +{ + ficlString s; + FICL_STRING_SET_FROM_CSTRING(s, name); + return ficlDictionarySet2ConstantInstruction(dictionary, s, ficlInstruction2ConstantParen, value); } +ficlWord *ficlDictionarySetConstantString(ficlDictionary *dictionary, char *name, char *value) +{ + ficlString s; + ficl2Integer valueAs2Integer; + FICL_2INTEGER_SET(strlen(value), (intptr_t)value, valueAs2Integer); + FICL_STRING_SET_FROM_CSTRING(s, name); + + return ficlDictionarySet2ConstantInstruction(dictionary, s, ficlInstruction2ConstantParen, valueAs2Integer); +} + + + /************************************************************************** - d i c t C o p y N a m e -** Copy up to nFICLNAME characters of the name specified by si into -** the dictionary starting at "here", then NULL-terminate the name, -** point "here" to the next available byte, and return the address of -** the beginning of the name. Used by dictAppendWord. -** N O T E S : -** 1. "here" is guaranteed to be aligned after this operation. -** 2. If the string has zero length, align and return "here" + d i c t A p p e n d W o r d +** Create a new word in the dictionary with the specified +** ficlString, code, and flags. Does not require a NULL-terminated +** name. +**************************************************************************/ +ficlWord *ficlDictionaryAppendWord(ficlDictionary *dictionary, + ficlString name, + ficlPrimitive code, + ficlUnsigned8 flags) +{ + ficlUnsigned8 length = (ficlUnsigned8)FICL_STRING_GET_LENGTH(name); + char *nameCopy; + ficlWord *word; + + ficlDictionaryLock(dictionary, FICL_TRUE); + + /* + ** NOTE: ficlDictionaryAppendString advances "here" as a side-effect. + ** It must execute before word is initialized. + */ + nameCopy = ficlDictionaryAppendString(dictionary, name); + word = (ficlWord *)dictionary->here; + dictionary->smudge = word; + word->hash = ficlHashCode(name); + word->code = code; + word->semiParen = ficlInstructionSemiParen; + word->flags = (ficlUnsigned8)(flags | FICL_WORD_SMUDGED); + word->length = length; + word->name = nameCopy; + /* + ** Point "here" to first ficlCell of new word's param area... + */ + dictionary->here = word->param; + + if (!(flags & FICL_WORD_SMUDGED)) + ficlDictionaryUnsmudge(dictionary); + + ficlDictionaryLock(dictionary, FICL_FALSE); + return word; +} + + +/************************************************************************** + d i c t A p p e n d W o r d +** Create a new word in the dictionary with the specified +** name, code, and flags. Name must be NULL-terminated. **************************************************************************/ -static char *dictCopyName(FICL_DICT *pDict, STRINGINFO si) +ficlWord *ficlDictionaryAppendPrimitive(ficlDictionary *dictionary, + char *name, + ficlPrimitive code, + ficlUnsigned8 flags) { - char *oldCP = (char *)pDict->here; - char *cp = oldCP; - char *name = SI_PTR(si); - int i = SI_COUNT(si); + ficlString s; + FICL_STRING_SET_FROM_CSTRING(s, name); + return ficlDictionaryAppendWord(dictionary, s, code, flags); +} + - if (i == 0) +ficlWord *ficlDictionarySetPrimitive(ficlDictionary *dictionary, + char *name, + ficlPrimitive code, + ficlUnsigned8 flags) +{ + ficlString s; + ficlWord *word; + + FICL_STRING_SET_FROM_CSTRING(s, name); + word = ficlDictionaryLookup(dictionary, s); + + if (word == NULL) { - dictAlign(pDict); - return (char *)pDict->here; + word = ficlDictionaryAppendPrimitive(dictionary, name, code, flags); } - - if (i > nFICLNAME) - i = nFICLNAME; - - for (; i > 0; --i) + else { - *cp++ = *name++; + word->code = (ficlPrimitive)code; + word->flags = flags; } + return word; +} - *cp++ = '\0'; - pDict->here = PTRtoCELL cp; - dictAlign(pDict); - return oldCP; +ficlWord *ficlDictionaryAppendInstruction(ficlDictionary *dictionary, + char *name, + ficlInstruction i, + ficlUnsigned8 flags) +{ + return ficlDictionaryAppendPrimitive(dictionary, name, (ficlPrimitive)i, (ficlUnsigned8)(FICL_WORD_INSTRUCTION | flags)); +} + +ficlWord *ficlDictionarySetInstruction(ficlDictionary *dictionary, + char *name, + ficlInstruction i, + ficlUnsigned8 flags) +{ + return ficlDictionarySetPrimitive(dictionary, name, (ficlPrimitive)i, (ficlUnsigned8)(FICL_WORD_INSTRUCTION | flags)); } /************************************************************************** + d i c t C e l l s A v a i l +** Returns the number of empty ficlCells left in the dictionary +**************************************************************************/ +int ficlDictionaryCellsAvailable(ficlDictionary *dictionary) +{ + return dictionary->size - ficlDictionaryCellsUsed(dictionary); +} + + +/************************************************************************** + d i c t C e l l s U s e d +** Returns the number of ficlCells consumed in the dicionary +**************************************************************************/ +int ficlDictionaryCellsUsed(ficlDictionary *dictionary) +{ + return dictionary->here - dictionary->base; +} + + + +/************************************************************************** d i c t C r e a t e ** Create and initialize a dictionary with the specified number -** of cells capacity, and no hashing (hash size == 1). +** of ficlCells capacity, and no hashing (hash size == 1). **************************************************************************/ -FICL_DICT *dictCreate(unsigned nCells) +ficlDictionary *ficlDictionaryCreate(ficlSystem *system, unsigned size) { - return dictCreateHashed(nCells, 1); + return ficlDictionaryCreateHashed(system, size, 1); } -FICL_DICT *dictCreateHashed(unsigned nCells, unsigned nHash) +ficlDictionary *ficlDictionaryCreateHashed(ficlSystem *system, unsigned size, unsigned bucketCount) { - FICL_DICT *pDict; + ficlDictionary *dictionary; size_t nAlloc; - nAlloc = sizeof (FICL_HASH) + nCells * sizeof (CELL) - + (nHash - 1) * sizeof (FICL_WORD *); + nAlloc = sizeof(ficlDictionary) + (size * sizeof (ficlCell)) + + sizeof(ficlHash) + (bucketCount - 1) * sizeof (ficlWord *); + + dictionary = ficlMalloc(nAlloc); + FICL_SYSTEM_ASSERT(system, dictionary != NULL); + + dictionary->size = size; + dictionary->system = system; - pDict = ficlMalloc(sizeof (FICL_DICT)); - assert(pDict); - memset(pDict, 0, sizeof (FICL_DICT)); - pDict->dict = ficlMalloc(nAlloc); - assert(pDict->dict); - - pDict->size = nCells; - dictEmpty(pDict, nHash); - return pDict; + ficlDictionaryEmpty(dictionary, bucketCount); + return dictionary; } @@ -407,18 +469,18 @@ d i c t C r e a t e W o r d l i s t ** Create and initialize an anonymous wordlist **************************************************************************/ -FICL_HASH *dictCreateWordlist(FICL_DICT *dp, int nBuckets) +ficlHash *ficlDictionaryCreateWordlist(ficlDictionary *dictionary, int bucketCount) { - FICL_HASH *pHash; + ficlHash *hash; - dictAlign(dp); - pHash = (FICL_HASH *)dp->here; - dictAllot(dp, sizeof (FICL_HASH) - + (nBuckets-1) * sizeof (FICL_WORD *)); - - pHash->size = nBuckets; - hashReset(pHash); - return pHash; + ficlDictionaryAlign(dictionary); + hash = (ficlHash *)dictionary->here; + ficlDictionaryAllot(dictionary, sizeof (ficlHash) + + (bucketCount - 1) * sizeof (ficlWord *)); + + hash->size = bucketCount; + ficlHashReset(hash); + return hash; } @@ -426,10 +488,10 @@ d i c t D e l e t e ** Free all memory allocated for the given dictionary **************************************************************************/ -void dictDelete(FICL_DICT *pDict) +void ficlDictionaryDestroy(ficlDictionary *dictionary) { - assert(pDict); - ficlFree(pDict); + FICL_DICTIONARY_ASSERT(dictionary, dictionary != NULL); + ficlFree(dictionary); return; } @@ -439,194 +501,279 @@ ** Empty the dictionary, reset its hash table, and reset its search order. ** Clears and (re-)creates the hash table with the size specified by nHash. **************************************************************************/ -void dictEmpty(FICL_DICT *pDict, unsigned nHash) +void ficlDictionaryEmpty(ficlDictionary *dictionary, unsigned bucketCount) { - FICL_HASH *pHash; + ficlHash *hash; - pDict->here = pDict->dict; + dictionary->here = dictionary->base; - dictAlign(pDict); - pHash = (FICL_HASH *)pDict->here; - dictAllot(pDict, - sizeof (FICL_HASH) + (nHash - 1) * sizeof (FICL_WORD *)); + ficlDictionaryAlign(dictionary); + hash = (ficlHash *)dictionary->here; + ficlDictionaryAllot(dictionary, + sizeof (ficlHash) + (bucketCount - 1) * sizeof (ficlWord *)); - pHash->size = nHash; - hashReset(pHash); + hash->size = bucketCount; + ficlHashReset(hash); - pDict->pForthWords = pHash; - pDict->smudge = NULL; - dictResetSearchOrder(pDict); + dictionary->forthWordlist = hash; + dictionary->smudge = NULL; + ficlDictionaryResetSearchOrder(dictionary); return; } /************************************************************************** - d i c t H a s h S u m m a r y -** Calculate a figure of merit for the dictionary hash table based -** on the average search depth for all the words in the dictionary, -** assuming uniform distribution of target keys. The figure of merit -** is the ratio of the total search depth for all keys in the table -** versus a theoretical optimum that would be achieved if the keys -** were distributed into the table as evenly as possible. -** The figure would be worse if the hash table used an open -** addressing scheme (i.e. collisions resolved by searching the -** table for an empty slot) for a given size table. +** i s A F i c l W o r d +** Vet a candidate pointer carefully to make sure +** it's not some chunk o' inline data... +** It has to have a name, and it has to look +** like it's in the dictionary address range. +** NOTE: this excludes :noname words! **************************************************************************/ -#if FICL_WANT_FLOAT -void dictHashSummary(FICL_VM *pVM) +int ficlDictionaryIsAWord(ficlDictionary *dictionary, ficlWord *word) { - FICL_DICT *dp = vmGetDict(pVM); - FICL_HASH *pFHash; - FICL_WORD **pHash; - unsigned size; - FICL_WORD *pFW; - unsigned i; - int nMax = 0; - int nWords = 0; - int nFilled; - double avg = 0.0; - double best; - int nAvg, nRem, nDepth; - - dictCheck(dp, pVM, 0); - - pFHash = dp->pSearch[dp->nLists - 1]; - pHash = pFHash->table; - size = pFHash->size; - nFilled = size; + if ( (((ficlInstruction)word) > ficlInstructionInvalid) + && (((ficlInstruction)word) < ficlInstructionLast) ) + return 1; - for (i = 0; i < size; i++) - { - int n = 0; - pFW = pHash[i]; + if (!ficlDictionaryIncludes(dictionary, word)) + return 0; - while (pFW) - { - ++n; - ++nWords; - pFW = pFW->link; - } + if (!ficlDictionaryIncludes(dictionary, word->name)) + return 0; - avg += (double)(n * (n+1)) / 2.0; + if ((word->link != NULL) && !ficlDictionaryIncludes(dictionary, word->link)) + return 0; - if (n > nMax) - nMax = n; - if (n == 0) - --nFilled; - } + if ((word->length <= 0) || (word->name[word->length] != '\0')) + return 0; - /* Calc actual avg search depth for this hash */ - avg = avg / nWords; + if (strlen(word->name) != word->length) + return 0; - /* Calc best possible performance with this size hash */ - nAvg = nWords / size; - nRem = nWords % size; - nDepth = size * (nAvg * (nAvg+1))/2 + (nAvg+1)*nRem; - best = (double)nDepth/nWords; + return 1; +} - sprintf(pVM->pad, - "%d bins, %2.0f%% filled, Depth: Max=%d, Avg=%2.1f, Best=%2.1f, Score: %2.0f%%", - size, - (double)nFilled * 100.0 / size, nMax, - avg, - best, - 100.0 * best / avg); - ficlTextOut(pVM, pVM->pad, 1); +/************************************************************************** + f i n d E n c l o s i n g W o r d +** Given a pointer to something, check to make sure it's an address in the +** dictionary. If so, search backwards until we find something that looks +** like a dictionary header. If successful, return the address of the +** ficlWord found. Otherwise return NULL. +** nSEARCH_CELLS sets the maximum neighborhood this func will search before giving up +**************************************************************************/ +#define nSEARCH_CELLS 100 - return; +ficlWord *ficlDictionaryFindEnclosingWord(ficlDictionary *dictionary, ficlCell *cell) +{ + ficlWord *word; + int i; + + if (!ficlDictionaryIncludes(dictionary, (void *)cell)) + return NULL; + + for (i = nSEARCH_CELLS; i > 0; --i, --cell) + { + word = (ficlWord *)(cell + 1 - (sizeof(ficlWord) / sizeof(ficlCell))); + if (ficlDictionaryIsAWord(dictionary, word)) + return word; + } + + return NULL; } -#endif + /************************************************************************** d i c t I n c l u d e s -** Returns TRUE iff the given pointer is within the address range of +** Returns FICL_TRUE iff the given pointer is within the address range of ** the dictionary. **************************************************************************/ -int dictIncludes(FICL_DICT *pDict, void *p) +int ficlDictionaryIncludes(ficlDictionary *dictionary, void *p) { - return ((p >= (void *) &pDict->dict) - && (p < (void *)(&pDict->dict + pDict->size)) - ); + return ((p >= (void *) &dictionary->base) + && (p < (void *)(&dictionary->base + dictionary->size))); } + /************************************************************************** d i c t L o o k u p -** Find the FICL_WORD that matches the given name and length. +** Find the ficlWord that matches the given name and length. ** If found, returns the word's address. Otherwise returns NULL. ** Uses the search order list to search multiple wordlists. **************************************************************************/ -FICL_WORD *dictLookup(FICL_DICT *pDict, STRINGINFO si) +ficlWord *ficlDictionaryLookup(ficlDictionary *dictionary, ficlString name) { - FICL_WORD *pFW = NULL; - FICL_HASH *pHash; + ficlWord *word = NULL; + ficlHash *hash; int i; - UNS16 hashCode = hashHashCode(si); + ficlUnsigned16 hashCode = ficlHashCode(name); - assert(pDict); + FICL_DICTIONARY_ASSERT(dictionary, dictionary != NULL); - ficlLockDictionary(1); + ficlDictionaryLock(dictionary, FICL_TRUE); - for (i = (int)pDict->nLists - 1; (i >= 0) && (!pFW); --i) + for (i = (int)dictionary->wordlistCount - 1; (i >= 0) && (!word); --i) { - pHash = pDict->pSearch[i]; - pFW = hashLookup(pHash, si, hashCode); + hash = dictionary->wordlists[i]; + word = ficlHashLookup(hash, name, hashCode); } - ficlLockDictionary(0); - return pFW; + ficlDictionaryLock(dictionary, FICL_TRUE); + return word; } /************************************************************************** - f i c l L o o k u p L o c -** Same as dictLookup, but looks in system locals dictionary first... -** Assumes locals dictionary has only one wordlist... + s e e +** TOOLS ( "name" -- ) +** Display a human-readable representation of the named word's definition. +** The source of the representation (object-code decompilation, source +** block, etc.) and the particular form of the display is implementation +** defined. **************************************************************************/ -#if FICL_WANT_LOCALS -FICL_WORD *ficlLookupLoc(FICL_SYSTEM *pSys, STRINGINFO si) +/* +** ficlSeeColon (for proctologists only) +** Walks a colon definition, decompiling +** on the fly. Knows about primitive control structures. +*/ +char *ficlDictionaryInstructionNames[] = { - FICL_WORD *pFW = NULL; - FICL_DICT *pDict = pSys->dp; - FICL_HASH *pHash = ficlGetLoc(pSys)->pForthWords; - int i; - UNS16 hashCode = hashHashCode(si); - - assert(pHash); - assert(pDict); +#define FICL_TOKEN(token, description) description, +#define FICL_INSTRUCTION_TOKEN(token, description, flags) description, +#include "ficltokens.h" +#undef FICL_TOKEN +#undef FICL_INSTRUCTION_TOKEN +}; - ficlLockDictionary(1); - /* - ** check the locals dict first... - */ - pFW = hashLookup(pHash, si, hashCode); +void ficlDictionarySee(ficlDictionary *dictionary, ficlWord *word, ficlCallback *callback) +{ + char *trace; + ficlCell *cell = word->param; + ficlCell *param0 = cell; + char buffer[128]; - /* - ** If no joy, (!pFW) --------------------------v - ** iterate over the search list in the main dict - */ - for (i = (int)pDict->nLists - 1; (i >= 0) && (!pFW); --i) + for (; cell->i != ficlInstructionSemiParen; cell++) { - pHash = pDict->pSearch[i]; - pFW = hashLookup(pHash, si, hashCode); + ficlWord *word = (ficlWord *)(cell->p); + + trace = buffer; + if ((void *)cell == (void *)buffer) + *trace++ = '>'; + else + *trace++ = ' '; + trace += sprintf(trace, "%3d ", cell - param0); + + if (ficlDictionaryIsAWord(dictionary, word)) + { + ficlWordKind kind = ficlWordClassify(word); + ficlCell c, c2; + + switch (kind) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-soc-all@freebsd.org Wed Jul 1 09:58:27 2015 Return-Path: Delivered-To: svn-soc-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 913AF990532 for ; Wed, 1 Jul 2015 09:58:27 +0000 (UTC) (envelope-from pratiksinghal@FreeBSD.org) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 791101A5D for ; Wed, 1 Jul 2015 09:58:27 +0000 (UTC) (envelope-from pratiksinghal@FreeBSD.org) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.9/8.14.9) with ESMTP id t619wRRQ055600 for ; Wed, 1 Jul 2015 09:58:27 GMT (envelope-from pratiksinghal@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.9/8.14.9/Submit) id t619wQls055581 for svn-soc-all@FreeBSD.org; Wed, 1 Jul 2015 09:58:26 GMT (envelope-from pratiksinghal@FreeBSD.org) Date: Wed, 1 Jul 2015 09:58:26 GMT Message-Id: <201507010958.t619wQls055581@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to pratiksinghal@FreeBSD.org using -f From: pratiksinghal@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r287803 - soc2015/pratiksinghal/cubie-head/sys/arm/allwinner MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2015 09:58:27 -0000 Author: pratiksinghal Date: Wed Jul 1 09:58:26 2015 New Revision: 287803 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=287803 Log: 1) Added the code for separate DMA module 2) The code committed is yet to be tested on hardware. Added: soc2015/pratiksinghal/cubie-head/sys/arm/allwinner/a10_dma.c soc2015/pratiksinghal/cubie-head/sys/arm/allwinner/a10_dma.h Added: soc2015/pratiksinghal/cubie-head/sys/arm/allwinner/a10_dma.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ soc2015/pratiksinghal/cubie-head/sys/arm/allwinner/a10_dma.c Wed Jul 1 09:58:26 2015 (r287803) @@ -0,0 +1,332 @@ +/*- + * Copyright (c) 2015 Pratik Singhal + * 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 +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include + +#include "a10_dma.h" + +enum a10_dma_channel_type { + NDMA, + DDMA +} ; + +struct a10_dma_channel { + enum a10_dma_channel_type ch_type; + uint32_t ch_index; + void (*ch_a10_dma_intr_handle) (void *); + void * ch_a10_dma_intr_args; + bus_size_t ch_offset; +}; + +struct a10_dma_softc { + device_t a10_dma_dev; + bus_space_tag_t a10_dma_bst; + bus_space_handle_t a10_dma_bsh; + struct resource * a10_dma_memory_resource; + struct resource * a10_dma_irq_resource; + void* a10_dma_intrhand; + int a10_dma_mem_rid; + int a10_dma_irq_rid; + struct mtx a10_dma_mtx; + struct a10_dma_channel a10_ndma_channels[NNDMA]; + struct a10_dma_channel a10_ddma_channels[NDDMA]; +} ; + +static struct a10_dma_softc *sc; +static int a10_dma_probe(device_t); +static int a10_dma_attach(device_t); +static int a10_dma_detach(device_t); +static void a10_dma_intr(void *); +static struct a10_dma_channel * a10_dma_alloc_channel(uint32_t, void (*) (void *), void *); +static int a10_dma_start_transfer(struct a10_dma_channel *, bus_addr_t, bus_addr_t, bus_size_t); +static void a10_dma_free_channel(struct a10_dma_channel *); +static void a10_dma_set_config(struct a10_dma_channel *, uint32_t); +static uint32_t a10_dma_get_config(struct a10_dma_channel *); +static void a10_dma_halt(struct a10_dma_channel *); + +#define A10_DMA_LOCK(_sc) mtx_lock(&(_sc)->a10_dma_mtx) +#define A10_DMA_UNLOCK(_sc) mtx_unlock(&(_sc)->a10_dma_mtx) +#define A10_DMA_READ_4(_sc, _reg) \ + bus_space_read_4((_sc)->a10_dma_bst, (_sc)->a10_dma_bsh, _reg) +#define A10_DMA_WRITE_4(_sc,_reg, _value) \ + bus_space_write_4((_sc)->a10_dma_bst, (_sc)->a10_dma_bsh, _reg, _value) +#define A10_DMACH_READ_4(_sc, _reg) \ + A10_DMA_READ_4(sc, (_reg) + (_sc)->ch_offset) +#define A10_DMACH_WRITE_4(_sc, _reg, _value) \ + A10_DMA_WRITE_4(sc, (_reg) + (_sc)->ch_offset, _value) + + +static int +a10_dma_probe(device_t dev) +{ + if (!ofw_bus_status_okay(dev)) + return (ENXIO) ; + if (!ofw_bus_is_compatible(dev, "allwinner,sun4i-a10-dma")) + return (ENXIO) ; + device_set_desc(dev, "Allwinner A10 DMA Controller") ; + + return (BUS_PROBE_DEFAULT) ; +} + +static int +a10_dma_attach(device_t dev) +{ + uint32_t ind; + + sc = device_get_softc(dev); + sc->a10_dma_dev = dev; + + sc->a10_dma_memory_resource = bus_alloc_resource_any(sc->a10_dma_dev, SYS_RES_MEMORY, &sc->a10_dma_mem_rid, RF_ACTIVE); + if (sc->a10_dma_memory_resource == NULL) { + device_printf(sc->a10_dma_dev, "Cannot allocate DMA memory resource!\n"); + goto fail; + } + sc->a10_dma_irq_resource = bus_alloc_resource_any(sc->a10_dma_dev, SYS_RES_IRQ, &sc->a10_dma_irq_rid, RF_ACTIVE | RF_SHAREABLE); + if (sc->a10_dma_irq_resource == NULL) { + device_printf(sc->a10_dma_dev, "Cannot allocate DMA IRQ resource\n"); + goto fail; + } + if (bus_setup_intr(sc->a10_dma_dev, sc->a10_dma_irq_resource, INTR_TYPE_MISC | INTR_MPSAFE, + NULL, a10_dma_intr,NULL, &sc->a10_dma_intrhand)) { + device_printf(sc->a10_dma_dev, "Couldn't setup DMA interrupt handler\n"); + goto fail; + } + + mtx_init(&sc->a10_dma_mtx,device_get_nameunit(sc->a10_dma_dev),"a10_dma",MTX_DEF); + + A10_DMA_WRITE_4(sc, A10_DMA_IRQ_EN, 0); + A10_DMA_WRITE_4(sc, A10_DMA_IRQ_PEND_STA, ~0); + + for (ind = 0; ind < NNDMA; ind++) { + sc->a10_ndma_channels[ind].ch_index = ind; + sc->a10_ndma_channels[ind].ch_a10_dma_intr_args = NULL; + sc->a10_ndma_channels[ind].ch_a10_dma_intr_handle = NULL; + sc->a10_ndma_channels[ind].ch_offset = A10_NDMA_REG(ind); + } + for (ind = 0; ind < NDDMA; ind++) { + sc->a10_ddma_channels[ind].ch_index = ind; + sc->a10_ddma_channels[ind].ch_a10_dma_intr_args = NULL; + sc->a10_ddma_channels[ind].ch_a10_dma_intr_handle = NULL; + sc->a10_ddma_channels[ind].ch_offset = A10_DDMA_REG(ind); + } + + return (0); + + fail: + mtx_destroy(&sc->a10_dma_mtx); + if (sc->a10_dma_memory_resource != NULL) + bus_release_resource(sc->a10_dma_dev, SYS_RES_MEMORY, sc->a10_dma_mem_rid, sc->a10_dma_memory_resource); + if (sc->a10_dma_irq_resource != NULL) { + bus_teardown_intr(sc->a10_dma_dev, sc->a10_dma_irq_resource,sc->a10_dma_intrhand); + bus_release_resource(sc->a10_dma_dev, SYS_RES_IRQ, sc->a10_dma_irq_rid, sc->a10_dma_irq_resource); + } + return (ENXIO); +} + +static int +a10_dma_detach(device_t dev) +{ + return (EBUSY); +} + +static void +a10_dma_intr(void *arg) +{ + uint32_t status,bit,index; + void (*intr)(void*); + void *args; + status = A10_DMA_READ_4(sc,A10_DMA_IRQ_PEND_STA); + + if (!status) + return; + A10_DMA_WRITE_4(sc, A10_DMA_IRQ_PEND_STA, status); + /* Clear any half transfer interrupts (if present) and acknowledge full transfer interrupts only*/ + status = status & (0xaaaaaaaa) ; + while ((bit = ffs(status)) != 0) { + index = ((bit-1)/2)&7; + if (bit <= 16) { + intr = sc->a10_ndma_channels[index].ch_a10_dma_intr_handle; + args = sc->a10_ndma_channels[index].ch_a10_dma_intr_args; + if (intr == NULL) { + device_printf(sc->a10_dma_dev, "Spurious interrupt, NDMA channel %d not assigned.\n",index); + continue; + } + } + else { + intr = sc->a10_ddma_channels[index].ch_a10_dma_intr_handle; + args = sc->a10_ddma_channels[index].ch_a10_dma_intr_args; + if (intr == NULL){ + device_printf(sc->a10_dma_dev, "Spurious interrupt DDMA channel %d not assigned.\n", index); + continue; + } + } + intr(args); + } + +} + +static struct a10_dma_channel * +a10_dma_alloc_channel(uint32_t type, void (*intr) (void *), void *args) +{ + struct a10_dma_channel *list; + uint32_t count,index,irqen; + if (type == DMA_TYPE_OTHER){ + list = sc->a10_ndma_channels; + count = NNDMA; + } + else { + list = sc->a10_ddma_channels; + count = NDDMA; + } + + A10_DMA_LOCK(sc); + for (index = 0; index < count; index++) { + if (list[index].ch_a10_dma_intr_handle == NULL) { + list[index].ch_a10_dma_intr_args = args; + list[index].ch_a10_dma_intr_handle = intr; + + irqen = A10_DMA_READ_4(sc,A10_DMA_IRQ_EN); + if (list[index].ch_type == NDMA) + irqen |= A10_DMA_IRQ_NDMA_END(index); + else + irqen |= A10_DMA_IRQ_DDMA_END(index); + A10_DMA_WRITE_4(sc, A10_DMA_IRQ_EN, irqen); + break; + } + } + A10_DMA_UNLOCK(sc); + if (index == count) + return NULL; + else + return &list[index]; +} + +static int +a10_dma_start_transfer(struct a10_dma_channel *channel, bus_addr_t src, bus_addr_t dest, bus_size_t count) +{ + uint32_t config; + config = a10_dma_get_config(channel); + + if (channel->ch_type == NDMA) { + if (config & A10_NDMA_CTRL_DMA_LOADING) + return (EBUSY); + A10_DMACH_WRITE_4(channel, A10_NDMA_SRC_ADDR, src); + A10_DMACH_WRITE_4(channel, A10_NDMA_DEST_ADDR, dest); + A10_DMACH_WRITE_4(channel, A10_NDMA_BC, count); + + config |= A10_NDMA_CTRL_DMA_LOADING; + } + else { + if (config & A10_DDMA_CTRL_DMA_LOADING) + return (EBUSY); + A10_DMACH_WRITE_4(channel, A10_DDMA_SRC_START_ADDR, src); + A10_DMACH_WRITE_4(channel, A10_DDMA_DEST_START_ADDR, dest); + A10_DMACH_WRITE_4(channel, A10_DDMA_BC, count); + A10_DMACH_WRITE_4(channel, A10_DDMA_PARA, + //__SHIFTIN(31, A10_DDMA_PARA_DST_DATA_BLK_SIZ) | + __SHIFTIN(7, A10_DDMA_PARA_DST_WAIT_CYC) | + //__SHIFTIN(31, A10_DDMA_PARA_SRC_DATA_BLK_SIZ) | + __SHIFTIN(7, A10_DDMA_PARA_SRC_WAIT_CYC)) ; + config |= A10_DDMA_CTRL_DMA_LOADING; + } + a10_dma_set_config(channel,config); + + return (0); +} + +/* Do we have to write to the configuration register as well ? */ +static void +a10_dma_free_channel(struct a10_dma_channel *channel) +{ + uint32_t irqen, config; + + if (channel->ch_a10_dma_intr_handle == NULL) + return; + + A10_DMA_LOCK(sc); + channel->ch_a10_dma_intr_args = NULL; + channel->ch_a10_dma_intr_handle = NULL; + A10_DMA_UNLOCK(sc); + + /* Disable interrupts and reset the channel. */ + irqen = A10_DMA_READ_4(sc,A10_DMA_IRQ_EN); + config = a10_dma_get_config(channel); + if (channel->ch_type == NDMA) { + config &= ~(A10_NDMA_CTRL_DMA_LOADING); + irqen &= ~(A10_DMA_IRQ_NDMA_END(channel->ch_index)); + } + else { + config &= ~(A10_DDMA_CTRL_DMA_LOADING); + irqen &= ~(A10_DMA_IRQ_DDMA_END(channel->ch_index)); + } + A10_DMA_WRITE_4(sc, A10_DMA_IRQ_EN, irqen); + a10_dma_set_config(channel, config); +} + +static void +a10_dma_set_config(struct a10_dma_channel *channel, uint32_t config) +{ + if (channel->ch_type == NDMA) + A10_DMACH_WRITE_4(channel, A10_NDMA_CTRL, config); + else + A10_DMACH_WRITE_4(channel, A10_DDMA_CTRL, config); +} + +static uint32_t +a10_dma_get_config(struct a10_dma_channel *channel) +{ + if (channel->ch_type == NDMA) + return (A10_DMACH_READ_4(channel, A10_NDMA_CTRL)); + else + return (A10_DMACH_READ_4(channel, A10_DDMA_CTRL)); +} + +static void +a10_dma_halt_transfer(struct a10_dma_channel *channel) +{ + uint32_t config = a10_dma_get_config(channel); + if (channel->ch_type == NDMA) + config &= ~A10_NDMA_CTRL_DMA_LOADING; + else + config &= ~A10_DDMA_CTRL_DMA_LOADING; + a10_dma_set_config(channel, config); + +} + Added: soc2015/pratiksinghal/cubie-head/sys/arm/allwinner/a10_dma.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ soc2015/pratiksinghal/cubie-head/sys/arm/allwinner/a10_dma.h Wed Jul 1 09:58:26 2015 (r287803) @@ -0,0 +1,168 @@ +/*- + * Copyright (c) 2015 Pratik Singhal + * 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. + */ + +#ifndef _A10_DMA_H +#define _A10_DMA_H + +#define __LOWEST_SET_BIT(__mask) ((((__mask) - 1) & (__mask)) ^ (__mask)) +#define __BIT(__n) (((__n) == 32) ? 0 : ((uint32_t)1 << (__n))) +#define __BITS(__m, __n) \ + ((__BIT(MAX((__m), (__n)) + 1) - 1) ^ (__BIT(MIN((__m), (__n))) - 1)) +#define __SHIFTIN(__x, __mask) ((__x) * __LOWEST_SET_BIT(__mask)) + +/* Module base address. */ +#define DMA (0x10C02000) + +#define NNDMA 8 +#define NDDMA 8 + +#define A10_DMA_IRQ_EN 0x0000 +#define A10_DMA_IRQ_PEND_STA 0x0004 +#define A10_NDMA_AUTO_GATE 0x0008 +#define A10_NDMA_REG(n) (0x100+0x20*(n)) +#define A10_NDMA_CTRL 0x0000 +#define A10_NDMA_SRC_ADDR 0x0004 +#define A10_NDMA_DEST_ADDR 0x0008 +#define A10_NDMA_BC 0x000c + +#define A10_DDMA(n) (0x300+0x20*(n)) +#define A10_DDMA_REG(n) (0x300+0x20*(n)) +#define A10_DDMA_CTRL 0x0000 +#define A10_DDMA_SRC_START_ADDR 0x0004 +#define A10_DDMA_DEST_START_ADDR 0x0008 +#define A10_DDMA_BC 0x000c +#define A10_DDMA_PARA 0x0018 + +#define A10_DMA_IRQ_HF_MASK 0x55555555 +#define A10_DMA_IRQ_DDMA __BITS(31,16) +#define A10_DMA_IRQ_DDMA_END(n) __BIT(17+2*(n)) +#define A10_DMA_IRQ_DDMA_HF(n) __BIT(16+2*(n)) +#define A10_DMA_IRQ_NDMA __BITS(15,0) +#define A10_DMA_IRQ_NDMA_END(n) __BIT(1+2*(n)) +#define A10_DMA_IRQ_NDMA_HF(n) __BIT(0+2*(n)) + +#define A10_NDMA_AUTO_GATING_DIS __BIT(16) + +#define A10_DMA_CTRL_DST_DATA_WIDTH __BITS(26,25) +#define A10_DMA_CTRL_DATA_WIDTH_8 0 +#define A10_DMA_CTRL_DATA_WIDTH_16 1 +#define A10_DMA_CTRL_DATA_WIDTH_32 2 +#define A10_DMA_CTRL_DST_BURST_LEN __BITS(24,23) +#define A10_DMA_CTRL_BURST_LEN_1 0 +#define A10_DMA_CTRL_BURST_LEN_4 1 +#define A10_DMA_CTRL_BURST_LEN_8 2 +#define A10_DMA_CTRL_DST_DRQ_TYPE __BITS(20,16) +#define A10_DMA_CTRL_BC_REMAINING __BIT(15) +#define A10_DMA_CTRL_SRC_DATA_WIDTH __BITS(10,9) +#define A10_DMA_CTRL_SRC_BURST_LEN __BITS(8,7) +#define A10_DMA_CTRL_SRC_DRQ_TYPE __BITS(4,0) + +#define A10_NDMA_CTRL_DMA_LOADING __BIT(31) +#define A10_NDMA_CTRL_DMA_CONTIN_MODE __BIT(30) +#define A10_NDMA_CTRL_WAIT_STATE_LOG2 __BITS(29,27) +#define A10_NDMA_CTRL_DST_NON_SECURE __BIT(22) +#define A10_NDMA_CTRL_DST_ADDR_NOINCR __BIT(21) +#define A10_NDMA_CTRL_DRQ_IRO 0 +#define A10_NDMA_CTRL_DRQ_IR1 1 +#define A10_NDMA_CTRL_DRQ_SPDIF 2 +#define A10_NDMA_CTRL_DRQ_IISO 3 +#define A10_NDMA_CTRL_DRQ_IIS1 4 +#define A10_NDMA_CTRL_DRQ_AC97 5 +#define A10_NDMA_CTRL_DRQ_IIS2 6 +#define A10_NDMA_CTRL_DRQ_UARTO 8 +#define A10_NDMA_CTRL_DRQ_UART1 9 +#define A10_NDMA_CTRL_DRQ_UART2 10 +#define A10_NDMA_CTRL_DRQ_UART3 11 +#define A10_NDMA_CTRL_DRQ_UART4 12 +#define A10_NDMA_CTRL_DRQ_UART5 13 +#define A10_NDMA_CTRL_DRQ_UART6 14 +#define A10_NDMA_CTRL_DRQ_UART7 15 +#define A10_NDMA_CTRL_DRQ_DDC 16 +#define A10_NDMA_CTRL_DRQ_USB_EP1 17 +#define A10_NDMA_CTRL_DRQ_CODEC 19 +#define A10_NDMA_CTRL_DRQ_SRAM 21 +#define A10_NDMA_CTRL_DRQ_SDRAM 22 +#define A10_NDMA_CTRL_DRQ_TP_AD 23 +#define A10_NDMA_CTRL_DRQ_SPI0 24 +#define A10_NDMA_CTRL_DRQ_SPI1 25 +#define A10_NDMA_CTRL_DRQ_SPI2 26 +#define A10_NDMA_CTRL_DRQ_SPI3 27 +#define A10_NDMA_CTRL_DRQ_USB_EP2 28 +#define A10_NDMA_CTRL_DRQ_USB_EP3 29 +#define A10_NDMA_CTRL_DRQ_USB_EP4 30 +#define A10_NDMA_CTRL_DRQ_USB_EP5 31 +#define A10_NDMA_CTRL_SRC_NON_SECURE __BIT(6) +#define A10_NDMA_CTRL_SRC_ADDR_NOINCR __BIT(5) + +#define A10_NDMA_BC_COUNT __BITS(17,0) + +#define A10_DDMA_CTRL_DMA_LOADING __BIT(31) +#define A10_DDMA_CTRL_BUSY __BIT(30) +#define A10_DDMA_CTRL_DMA_CONTIN_MODE __BIT(29) +#define A10_DDMA_CTRL_DST_NON_SECURE __BIT(28) +#define A10_DDMA_CTRL_DST_ADDR_MODE __BITS(22,21) +#define A10_DDMA_CTRL_DMA_ADDR_LINEAR 0 +#define A10_DDMA_CTRL_DMA_ADDR_IO 1 +#define A10_DDMA_CTRL_DMA_ADDR_HPAGE 2 +#define A10_DDMA_CTRL_DMA_ADDR_VPAGE 3 +#define A10_DDMA_CTRL_DST_DRQ_TYPE __BITS(20,16) +#define A10_DDMA_CTRL_DRQ_SRAM 0 +#define A10_DDMA_CTRL_DRQ_SDRAM 1 +#define A10_DDMA_CTRL_DRQ_NFC 3 +#define A10_DDMA_CTRL_DRQ_USB0 4 +#define A10_DDMA_CTRL_DRQ_EMAC_TX 6 +#define A10_DDMA_CTRL_DRQ_EMAC_RX 7 +#define A10_DDMA_CTRL_DRQ_SPI1_TX 8 +#define A10_DDMA_CTRL_DRQ_SPI1_RX 9 +#define A10_DDMA_CTRL_DRQ_SS_TX 10 +#define A10_DDMA_CTRL_DRQ_SS_RX 11 +#define A10_DDMA_CTRL_DRQ_TCON0 14 +#define A10_DDMA_CTRL_DRQ_TCON1 15 +#define A10_DDMA_CTRL_DRQ_MS_TX 23 +#define A10_DDMA_CTRL_DRQ_MS_RX 23 +#define A10_DDMA_CTRL_DRQ_HDMI_AUDIO 24 +#define A10_DDMA_CTRL_DRQ_SPI0_TX 26 +#define A10_DDMA_CTRL_DRQ_SPI0_RX 27 +#define A10_DDMA_CTRL_DRQ_SPI2_TX 28 +#define A10_DDMA_CTRL_DRQ_SPI2_RX 29 +#define A10_DDMA_CTRL_DRQ_SPI3_TX 30 +#define A10_DDMA_CTRL_DRQ_SPI3_RX 31 +#define A10_DDMA_CTRL_SRC_NON_SECURE __BIT(12) +#define A10_DDMA_CTRL_SRC_ADDR_MODE __BITS(6,5) + +#define A10_DDMA_BC_COUNT __BITS(13,0) + +#define A10_DDMA_PARA_DST_DATA_BLK_SIZ __BITS(31,24) +#define A10_DDMA_PARA_DST_WAIT_CYC __BITS(23,16) +#define A10_DDMA_PARA_SRC_DATA_BLK_SIZ __BITS(15,8) +#define A10_DDMA_PARA_SRC_WAIT_CYC __BITS(7,0) + +/* To be used with alloc function when passing the type arguement.*/ +#define DMA_TYPE_DDMA 0x01 +#define DMA_TYPE_HDMI_AUDIO 0x02 +#define DMA_TYPE_OTHER 0x03 + +#endif /* _A10_DMA_H */ \ No newline at end of file From owner-svn-soc-all@freebsd.org Wed Jul 1 15:15:59 2015 Return-Path: Delivered-To: svn-soc-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5DCC9991378 for ; Wed, 1 Jul 2015 15:15:59 +0000 (UTC) (envelope-from clord@FreeBSD.org) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4E7481E87 for ; Wed, 1 Jul 2015 15:15:59 +0000 (UTC) (envelope-from clord@FreeBSD.org) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.9/8.14.9) with ESMTP id t61FFxbO079360 for ; Wed, 1 Jul 2015 15:15:59 GMT (envelope-from clord@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.9/8.14.9/Submit) id t61FFwYQ079354 for svn-soc-all@FreeBSD.org; Wed, 1 Jul 2015 15:15:58 GMT (envelope-from clord@FreeBSD.org) Date: Wed, 1 Jul 2015 15:15:58 GMT Message-Id: <201507011515.t61FFwYQ079354@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to clord@FreeBSD.org using -f From: clord@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r287814 - soc2015/clord/head/sys/contrib/ficl MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2015 15:15:59 -0000 Author: clord Date: Wed Jul 1 15:15:58 2015 New Revision: 287814 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=287814 Log: Add another file missed in merge process Added: soc2015/clord/head/sys/contrib/ficl/softcore.c (props changed) - copied unchanged from r287813, mirror/FreeBSD/vendor/ficl/dist/softcore.c Copied: soc2015/clord/head/sys/contrib/ficl/softcore.c (from r287813, mirror/FreeBSD/vendor/ficl/dist/softcore.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ soc2015/clord/head/sys/contrib/ficl/softcore.c Wed Jul 1 15:15:58 2015 (r287814, copy of r287813, mirror/FreeBSD/vendor/ficl/dist/softcore.c) @@ -0,0 +1,2551 @@ +/* +** Ficl softcore +** both uncompressed and Lempel-Ziv compressed versions. +** +** Generated 2003/05/05 12:42:30 +**/ + +#include "ficl.h" + + +static size_t ficlSoftcoreUncompressedSize = 25687; /* not including trailing null */ + +#if !FICL_WANT_LZ_SOFTCORE + +static char ficlSoftcoreUncompressed[] = + ": empty ( xn..x1 -- ) depth 0 ?do drop loop ;\n" + ": cell- ( addr -- addr ) [ 1 cells ] literal - ;\n" + ": -rot ( a b c -- c a b ) 2 -roll ;\n" + ": abs ( x -- x )\n" + "dup 0< if negate endif ;\n" + "decimal 32 constant bl\n" + ": space ( -- ) bl emit ;\n" + ": spaces ( n -- ) 0 ?do space loop ;\n" + ": abort\"\n" + "state @ if\n" + "postpone if\n" + "postpone .\"\n" + "postpone cr\n" + "-2\n" + "postpone literal\n" + "postpone throw\n" + "postpone endif\n" + "else\n" + "[char] \" parse\n" + "rot if\n" + "type\n" + "cr\n" + "-2 throw\n" + "else\n" + "2drop\n" + "endif\n" + "endif\n" + "; immediate\n" + ".( loading CORE EXT words ) cr\n" + "0 constant false\n" + "false invert constant true\n" + ": <> = 0= ;\n" + ": 0<> 0= 0= ;\n" + ": compile, , ;\n" + ": convert char+ 65535 >number drop ; \\ cribbed from DPANS A.6.2.0970\n" + ": erase ( addr u -- ) 0 fill ;\n" + "variable span\n" + ": expect ( c-addr u1 -- ) accept span ! ;\n" + ": nip ( y x -- x ) swap drop ;\n" + ": tuck ( y x -- x y x) swap over ;\n" + ": within ( test low high -- flag ) over - >r - r> u< ;\n" + ": ? ( addr -- ) @ . ;\n" + ": dump ( addr u -- )\n" + "0 ?do\n" + "dup c@ . 1+\n" + "i 7 and 7 = if cr endif\n" + "loop drop\n" + ";\n" + ".( loading SEARCH & SEARCH-EXT words ) cr\n" + ": brand-wordlist ( wid -- ) last-word >name drop wid-set-name ;\n" + ": ficl-named-wordlist \\ ( hash-size name -- ) run: ( -- wid )\n" + "ficl-wordlist dup create , brand-wordlist does> @ ;\n" + ": wordlist ( -- )\n" + "1 ficl-wordlist ;\n" + ": ficl-set-current ( wid -- old-wid )\n" + "get-current swap set-current ;\n" + ": do-vocabulary ( -- )\n" + "does> @ search> drop >search ;\n" + ": ficl-vocabulary ( nBuckets name -- )\n" + "ficl-named-wordlist do-vocabulary ;\n" + ": vocabulary ( name -- )\n" + "1 ficl-vocabulary ;\n" + ": previous ( -- ) search> drop ;\n" + "1 ficl-named-wordlist hidden\n" + ": hide hidden dup >search ficl-set-current ;\n" + ": also ( -- )\n" + "search> dup >search >search ;\n" + ": forth ( -- )\n" + "search> drop\n" + "forth-wordlist >search ;\n" + ": only ( -- )\n" + "-1 set-order ;\n" + "hide\n" + ": list-wid ( wid -- )\n" + "dup wid-get-name ( wid c-addr u )\n" + "?dup if\n" + "type drop\n" + "else\n" + "drop .\" (unnamed wid) \" x.\n" + "endif cr\n" + ";\n" + "set-current \\ stop hiding words\n" + ": order ( -- )\n" + ".\" Search:\" cr\n" + "get-order 0 ?do 3 spaces list-wid loop cr\n" + ".\" Compile: \" get-current list-wid cr\n" + ";\n" + ": debug ' debug-xt ; immediate\n" + ": on-step .\" S: \" .s-simple cr ;\n" + "previous \\ lose hidden words from search order\n" + "hide\n" + ": ?[if] ( c-addr u -- c-addr u flag )\n" + "2dup s\" [if]\" compare-insensitive 0=\n" + ";\n" + ": ?[else] ( c-addr u -- c-addr u flag )\n" + "2dup s\" [else]\" compare-insensitive 0=\n" + ";\n" + ": ?[then] ( c-addr u -- c-addr u flag )\n" + "2dup s\" [then]\" compare-insensitive 0= >r\n" + "2dup s\" [endif]\" compare-insensitive 0= r>\n" + "or\n" + ";\n" + "set-current\n" + ": [else] ( -- )\n" + "1 \\ ( level )\n" + "begin\n" + "begin\n" + "parse-word dup while \\ ( level addr len )\n" + "?[if] if \\ ( level addr len )\n" + "2drop 1+ \\ ( level )\n" + "else \\ ( level addr len )\n" + "?[else] if \\ ( level addr len )\n" + "2drop 1- dup if 1+ endif\n" + "else\n" + "?[then] if 2drop 1- else 2drop endif\n" + "endif\n" + "endif ?dup 0= if exit endif \\ level\n" + "repeat 2drop \\ level\n" + "refill 0= until \\ level\n" + "drop\n" + "; immediate\n" + ": [if] ( flag -- )\n" + "0= if postpone [else] then ; immediate\n" + ": [then] ( -- ) ; immediate\n" + ": [endif] ( -- ) ; immediate\n" + "previous\n" + "variable save-current\n" + ": start-prefixes get-current save-current ! set-current ;\n" + ": end-prefixes save-current @ set-current ;\n" + ": show-prefixes >search words search> drop ;\n" + "start-prefixes\n" + "S\" FICL_WANT_EXTENDED_PREFIX\" ENVIRONMENT? drop [if]\n" + ": \" postpone s\" ; immediate\n" + ": .( postpone .( ; immediate\n" + ": \\ postpone \\ ; immediate\n" + ": // postpone \\ ; immediate\n" + ": 0b 2 __tempbase ; immediate\n" + ": 0o 8 __tempbase ; immediate\n" + "[endif]\n" + ": 0d 10 __tempbase ; immediate\n" + ": 0x 16 __tempbase ; immediate\n" + "end-prefixes\n" + "S\" FICL_WANT_USER\" ENVIRONMENT? drop [if]\n" + "variable nUser 0 nUser !\n" + ": user \\ name ( -- )\n" + "nUser dup @ user 1 swap +! ;\n" + "[endif]\n" + "S\" FICL_WANT_LOCALS\" ENVIRONMENT? drop [if]\n" + ": locals| ( name...name | -- )\n" + "begin\n" + "bl word count\n" + "dup 0= abort\" where's the delimiter??\"\n" + "over c@\n" + "[char] | - over 1- or\n" + "while\n" + "(local)\n" + "repeat 2drop 0 0 (local)\n" + "; immediate\n" + ": local ( name -- ) bl word count (local) ; immediate\n" + ": 2local ( name -- ) bl word count (2local) ; immediate\n" + ": end-locals ( -- ) 0 0 (local) ; immediate\n" + ": strdup ( c-addr length -- c-addr2 length2 ior )\n" + "0 locals| addr2 length c-addr | end-locals\n" + "length 1 + allocate\n" + "0= if\n" + "to addr2\n" + "c-addr addr2 length move\n" + "addr2 length 0\n" + "else\n" + "0 -1\n" + "endif\n" + ";\n" + ": strcat ( 2:a 2:b -- 2:new-a )\n" + "0 locals| b-length b-u b-addr a-u a-addr | end-locals\n" + "b-u to b-length\n" + "b-addr a-addr a-u + b-length move\n" + "a-addr a-u b-length +\n" + ";\n" + ": strcpy ( 2:a 2:b -- 2:new-a )\n" + "locals| b-u b-addr a-u a-addr | end-locals\n" + "a-addr 0 b-addr b-u strcat\n" + ";\n" + "[endif]\n" + "S\" FICL_WANT_LOCALS\" ENVIRONMENT? drop [if]\n" + ".( loading Johns-Hopkins locals ) cr\n" + "hide\n" + ": compiled-zero ficlInstruction0 , ;\n" + ": compiled-float-zero ficlInstructionF0 , ;\n" + ": ?-- ( c-addr u -- c-addr u flag )\n" + "2dup s\" --\" compare 0= ;\n" + ": ?} ( c-addr u -- c-addr u flag )\n" + "2dup s\" }\" compare 0= ;\n" + ": ?| ( c-addr u -- c-addr u flag )\n" + "2dup s\" |\" compare 0= ;\n" + "1 constant local-is-double\n" + "2 constant local-is-float\n" + ": parse-local-prefix-flags ( c-addr u -- c-addr u flags )\n" + "0 0 0 locals| stop-loop colon-offset flags u c-addr |\n" + "c-addr c@ [char] : =\n" + "if\n" + "over over 0 exit\n" + "endif\n" + "u 0 do\n" + "c-addr i + c@\n" + "case\n" + "[char] 1 of flags local-is-double invert and to flags endof\n" + "[char] 2 of flags local-is-double or to flags endof\n" + "[char] d of flags local-is-double or to flags endof\n" + "[char] f of flags local-is-float or to flags endof\n" + "[char] i of flags local-is-float invert and to flags endof\n" + "[char] s of flags local-is-double invert and to flags endof\n" + "[char] : of i 1+ to colon-offset 1 to stop-loop endof\n" + "1 to stop-loop\n" + "endcase\n" + "stop-loop if leave endif\n" + "loop\n" + "colon-offset 0=\n" + "colon-offset u =\n" + "or\n" + "if\n" + "c-addr u 0 exit\n" + "endif\n" + "c-addr colon-offset +\n" + "u colon-offset -\n" + "flags\n" + ";\n" + ": ?delim ( c-addr u -- state | c-addr u 0 )\n" + "?| if 2drop 1 exit endif\n" + "?-- if 2drop 2 exit endif\n" + "?} if 2drop 3 exit endif\n" + "dup 0=\n" + "if 2drop 4 exit endif\n" + "0\n" + ";\n" + "set-current\n" + ": {\n" + "0 0 0 locals| flags local-state nLocals |\n" + "begin\n" + "parse-word ?delim dup to local-state\n" + "0= while\n" + "nLocals 1+ to nLocals\n" + "repeat\n" + "nLocals 0 ?do\n" + "parse-local-prefix-flags to flags\n" + "flags local-is-double and if\n" + "flags local-is-float and if (f2local) else (2local) endif\n" + "else\n" + "flags local-is-float and if (flocal) else (local) endif\n" + "endif\n" + "loop \\ ( )\n" + "local-state 1 = if\n" + "begin\n" + "parse-word\n" + "?delim dup to local-state\n" + "0= while\n" + "parse-local-prefix-flags to flags\n" + "flags local-is-double and if\n" + "flags local-is-float and if\n" + "compiled-float-zero compiled-float-zero (f2local)\n" + "else\n" + "compiled-zero compiled-zero (2local)\n" + "endif\n" + "else\n" + "flags local-is-float and if\n" + "compiled-float-zero (flocal)\n" + "else\n" + "compiled-zero (local)\n" + "endif\n" + "endif\n" + "repeat\n" + "endif\n" + "0 0 (local)\n" + "local-state 2 = if\n" + "begin\n" + "parse-word\n" + "?delim dup to local-state\n" + "3 < while\n" + "local-state 0= if 2drop endif\n" + "repeat\n" + "endif\n" + "local-state 3 <> abort\" syntax error in { } local line\"\n" + "; immediate compile-only\n" + "previous\n" + "[endif]\n" + ".( loading MARKER ) cr\n" + ": marker ( \"name\" -- )\n" + "create\n" + "get-current ,\n" + "get-order dup ,\n" + "0 ?do , loop\n" + "does>\n" + "0 set-order \\ clear search order\n" + "dup body> >name drop\n" + "here - allot \\ reset HERE to my xt-addr\n" + "dup @ ( pfa current-wid )\n" + "dup set-current forget-wid ( pfa )\n" + "cell+ dup @ swap ( count count-addr )\n" + "over cells + swap ( last-wid-addr count )\n" + "0 ?do\n" + "dup @ dup ( wid-addr wid wid )\n" + ">search forget-wid ( wid-addr )\n" + "cell-\n" + "loop\n" + "drop\n" + ";\n" + "S\" FICL_WANT_OOP\" ENVIRONMENT? drop [if]\n" + ".( loading ficl O-O extensions ) cr\n" + "17 ficl-vocabulary oop\n" + "also oop definitions\n" + "user current-class\n" + "0 current-class !\n" + ": parse-method \\ name run: ( -- c-addr u )\n" + "parse-word\n" + "postpone sliteral\n" + "; compile-only\n" + ": (lookup-method) { class 2:name -- class 0 | class xt 1 | class xt -1 }\n" + "class name class cell+ @ ( class c-addr u wid )\n" + "search-wordlist\n" + ";\n" + ": lookup-method { class 2:name -- class xt }\n" + "class name (lookup-method) ( 0 | xt 1 | xt -1 )\n" + "0= if\n" + "name type .\" not found in \"\n" + "class body> >name type\n" + "cr abort\n" + "endif\n" + ";\n" + ": find-method-xt \\ name ( class -- class xt )\n" + "parse-word lookup-method\n" + ";\n" + ": catch-method ( instance class c-addr u -- exc-flag )\n" + "lookup-method catch\n" + ";\n" + ": exec-method ( instance class c-addr u -- )\n" + "lookup-method execute\n" + ";\n" + ": --> ( instance class -- ??? )\n" + "state @ 0= if\n" + "find-method-xt execute\n" + "else\n" + "parse-method postpone exec-method\n" + "endif\n" + "; immediate\n" + ": c-> ( instance class -- ?? exc-flag )\n" + "state @ 0= if\n" + "find-method-xt catch\n" + "else\n" + "parse-method postpone catch-method\n" + "endif\n" + "; immediate\n" + ": method create does> body> >name lookup-method execute ;\n" + "1 ficl-named-wordlist instance-vars\n" + "instance-vars dup >search ficl-set-current\n" + ": => \\ c:( class meta -- ) run: ( -- ??? ) invokes compiled method\n" + "drop find-method-xt compile, drop\n" + "; immediate compile-only\n" + ": my=> \\ c:( -- ) run: ( -- ??? ) late bind compiled method of current-class\n" + "current-class @ dup postpone =>\n" + "; immediate compile-only\n" + ": my=[ \\ same as my=> , but binds a chain of methods\n" + "current-class @\n" + "begin\n" + "parse-word 2dup ( class c-addr u c-addr u )\n" + "s\" ]\" compare while ( class c-addr u )\n" + "lookup-method ( class xt )\n" + "dup compile, ( class xt )\n" + "dup ?object if \\ If object member, get new class. Otherwise assume same class\n" + "nip >body cell+ @ ( new-class )\n" + "else\n" + "drop ( class )\n" + "endif\n" + "repeat 2drop drop\n" + "; immediate compile-only\n" + ": do-instance-var\n" + "does> ( instance class addr[offset] -- addr[field] )\n" + "nip @ +\n" + ";\n" + ": addr-units: ( offset size \"name\" -- offset' )\n" + "create over , +\n" + "do-instance-var\n" + ";\n" + ": chars: \\ ( offset nCells \"name\" -- offset' ) Create n char member.\n" + "chars addr-units: ;\n" + ": char: \\ ( offset nCells \"name\" -- offset' ) Create 1 char member.\n" + "1 chars: ;\n" + ": cells: ( offset nCells \"name\" -- offset' )\n" + "cells >r aligned r> addr-units:\n" + ";\n" + ": cell: ( offset nCells \"name\" -- offset' )\n" + "1 cells: ;\n" + ": do-aggregate\n" + "objectify\n" + "does> ( instance class pfa -- a-instance a-class )\n" + "2@ ( inst class a-class a-offset )\n" + "2swap drop ( a-class a-offset inst )\n" + "+ swap ( a-inst a-class )\n" + ";\n" + ": obj: { offset class meta -- offset' } \\ \"name\"\n" + "create offset , class ,\n" + "class meta --> get-size offset +\n" + "do-aggregate\n" + ";\n" + ": array: ( offset n class meta \"name\" -- offset' )\n" + "locals| meta class nobjs offset |\n" + "create offset , class ,\n" + "class meta --> get-size nobjs * offset +\n" + "do-aggregate\n" + ";\n" + ": ref: ( offset class meta \"name\" -- offset' )\n" + "locals| meta class offset |\n" + "create offset , class ,\n" + "offset cell+\n" + "does> ( inst class pfa -- ptr-inst ptr-class )\n" + "2@ ( inst class ptr-class ptr-offset )\n" + "2swap drop + @ swap\n" + ";\n" + "S\" FICL_WANT_VCALL\" ENVIRONMENT? drop [if]\n" + ": vcall: ( paramcnt \"name\" -- )\n" + "current-class @ 8 + dup @ dup 1+ rot ! \\ Kludge fix to get to .vtCount before it's defined.\n" + "create , , \\ ( paramcnt index -- )\n" + "does> \\ ( inst class pfa -- ptr-inst ptr-class )\n" + "nip 2@ vcall \\ ( params offset inst class offset -- )\n" + ";\n" + ": vcallr: 0x80000000 or vcall: ; \\ Call with return address desired.\n" + "S\" FICL_WANT_FLOAT\" ENVIRONMENT? drop [if]\n" + ": vcallf: \\ ( paramcnt -- f: r )\n" + "0x80000000 or\n" + "current-class @ 8 + dup @ dup 1+ rot ! \\ Kludge fix to get to .vtCount before it's defined.\n" + "create , , \\ ( paramcnt index -- )\n" + "does> \\ ( inst class pfa -- ptr-inst ptr-class )\n" + "nip 2@ vcall f> \\ ( params offset inst class offset -- f: r )\n" + ";\n" + "[endif] \\ FICL_WANT_FLOAT\n" + "[endif] \\ FICL_WANT_VCALL\n" + ": end-class ( old-wid addr[size] size -- )\n" + "swap ! set-current\n" + "search> drop \\ pop struct builder wordlist\n" + ";\n" + ": suspend-class ( old-wid addr[size] size -- ) end-class ;\n" + "set-current previous\n" + ": do-do-instance ( -- )\n" + "s\" : .do-instance does> [ current-class @ ] literal ;\"\n" + "evaluate\n" + ";\n" + ":noname\n" + "wordlist\n" + "create\n" + "immediate\n" + "0 , \\ NULL parent class\n" + "dup , \\ wid\n" + "[ S\" FICL_WANT_VCALL\" ENVIRONMENT? drop ] [if]\n" + "4 cells , \\ instance size\n" + "[else]\n" + "3 cells , \\ instance size\n" + "[endif]\n" + "ficl-set-current\n" + "does> dup\n" + "; execute metaclass\n" + "metaclass drop cell+ @ brand-wordlist\n" + "metaclass drop current-class !\n" + "do-do-instance\n" + "instance-vars >search\n" + "create .super ( class metaclass -- parent-class )\n" + "0 cells , do-instance-var\n" + "create .wid ( class metaclass -- wid ) \\ return wid of class\n" + "1 cells , do-instance-var\n" + "S\" FICL_WANT_VCALL\" ENVIRONMENT? drop [if]\n" + "create .vtCount \\ Number of VTABLE methods, if any\n" + "2 cells , do-instance-var\n" + "create .size ( class metaclass -- size ) \\ return class's payload size\n" + "3 cells , do-instance-var\n" + "[else]\n" + "create .size ( class metaclass -- size ) \\ return class's payload size\n" + "2 cells , do-instance-var\n" + "[endif]\n" + ": get-size metaclass => .size @ ;\n" + ": get-wid metaclass => .wid @ ;\n" + ": get-super metaclass => .super @ ;\n" + "S\" FICL_WANT_VCALL\" ENVIRONMENT? drop [if]\n" + ": get-vtCount metaclass => .vtCount @ ;\n" + ": get-vtAdd metaclass => .vtCount ;\n" + "[endif]\n" + ": instance ( class metaclass \"name\" -- instance class )\n" + "locals| meta parent |\n" + "create\n" + "here parent --> .do-instance \\ ( inst class )\n" + "parent meta metaclass => get-size\n" + "allot \\ allocate payload space\n" + ";\n" + ": array ( n class metaclass \"name\" -- n instance class )\n" + "locals| meta parent nobj |\n" + "create nobj\n" + "here parent --> .do-instance \\ ( nobj inst class )\n" + "parent meta metaclass => get-size\n" + "nobj * allot \\ allocate payload space\n" + ";\n" + ": new \\ ( class metaclass \"name\" -- )\n" + "metaclass => instance --> init\n" + ";\n" + ": new-array ( n class metaclass \"name\" -- )\n" + "metaclass => array\n" + "--> array-init\n" + ";\n" + ": alloc \\ ( class metaclass -- instance class )\n" + "locals| meta class |\n" + "class meta metaclass => get-size allocate ( -- addr fail-flag )\n" + "abort\" allocate failed \" ( -- addr )\n" + "class 2dup --> init\n" + ";\n" + ": alloc-array \\ ( n class metaclass -- instance class )\n" + "locals| meta class nobj |\n" + "class meta metaclass => get-size\n" + "nobj * allocate ( -- addr fail-flag )\n" + "abort\" allocate failed \" ( -- addr )\n" + "nobj over class --> array-init\n" + "class\n" + ";\n" + ": allot { 2:this -- 2:instance }\n" + "here ( instance-address )\n" + "this my=> get-size allot\n" + "this drop 2dup --> init\n" + ";\n" + ": allot-array { nobj 2:this -- 2:instance }\n" + "here ( instance-address )\n" + "this my=> get-size nobj * allot\n" + "this drop 2dup ( 2instance 2instance )\n" + "nobj -rot --> array-init\n" + ";\n" + ": ref ( instance-addr class metaclass \"name\" -- )\n" + "drop create , ,\n" + "does> 2@\n" + ";\n" + ": resume-class { 2:this -- old-wid addr[size] size }\n" + "this --> .wid @ ficl-set-current ( old-wid )\n" + "this --> .size dup @ ( old-wid addr[size] size )\n" + "instance-vars >search\n" + ";\n" + ": sub ( class metaclass \"name\" -- old-wid addr[size] size )\n" + "wordlist\n" + "locals| wid meta parent |\n" + "parent meta metaclass => get-wid\n" + "wid wid-set-super \\ set superclass\n" + "create immediate \\ get the subclass name\n" + "wid brand-wordlist \\ label the subclass wordlist\n" + "here current-class ! \\ prep for do-do-instance\n" + "parent , \\ save parent class\n" + "wid , \\ save wid\n" + "[ S\" FICL_WANT_VCALL\" ENVIRONMENT? drop ] [if]\n" + "parent meta --> get-vtCount ,\n" + "[endif]\n" + "here parent meta --> get-size dup , ( addr[size] size )\n" + "metaclass => .do-instance\n" + "wid ficl-set-current -rot\n" + "do-do-instance\n" + "instance-vars >search \\ push struct builder wordlist\n" + ";\n" + ": offset-of ( class metaclass \"name\" -- offset )\n" + "drop find-method-xt nip >body @ ;\n" + ": id ( class metaclass -- c-addr u )\n" + "drop body> >name ;\n" + ": methods \\ ( class meta -- )\n" + "locals| meta class |\n" + "begin\n" + "class body> >name type .\" methods:\" cr\n" + "class meta --> get-wid >search words cr previous\n" + "class meta metaclass => get-super\n" + "dup to class\n" + "0= until cr\n" + ";\n" + ": pedigree ( class meta -- )\n" + "locals| meta class |\n" + "begin\n" + "class body> >name type space\n" + "class meta metaclass => get-super\n" + "dup to class\n" + "0= until cr\n" + ";\n" + ": see ( class meta -- )\n" + "metaclass => get-wid >search see previous ;\n" + ": debug ( class meta -- )\n" + "find-method-xt debug-xt ;\n" + "previous set-current\n" + "metaclass drop\n" + "constant meta\n" + ": subclass --> sub ;\n" + "S\" FICL_WANT_VCALL\" ENVIRONMENT? drop [if]\n" + ": hasvtable 4 + ; immediate\n" + "[endif]\n" + ":noname\n" + "wordlist\n" + "create immediate\n" + "0 , \\ NULL parent class\n" + "dup , \\ wid\n" + "0 , \\ instance size\n" + "[ S\" FICL_WANT_VCALL\" ENVIRONMENT? drop ] [if]\n" + "0 , \\ .vtCount\n" + "[endif]\n" + "ficl-set-current\n" + "does> meta\n" + "; execute object\n" + "object drop cell+ @ brand-wordlist\n" + "object drop current-class !\n" + "do-do-instance\n" + "instance-vars >search\n" + ": class ( instance class -- class metaclass )\n" + "nip meta ;\n" + ": init ( instance class -- )\n" + "meta\n" + "metaclass => get-size ( inst size )\n" + "erase ;\n" + ": array-init ( nobj inst class -- )\n" + "0 dup locals| &init &next class inst |\n" + "class s\" init\" lookup-method to &init\n" + "s\" next\" lookup-method to &next\n" + "drop\n" + "0 ?do\n" + "inst class 2dup\n" + "&init execute\n" + "&next execute drop to inst\n" + "loop\n" + ";\n" + ": free \\ ( instance class -- )\n" + "drop free\n" + "abort\" free failed \"\n" + ";\n" + ": super ( instance class -- instance parent-class )\n" + "meta metaclass => get-super ;\n" + ": pedigree ( instance class -- )\n" + "object => class\n" + "metaclass => pedigree ;\n" + ": size ( instance class -- sizeof-instance )\n" + "object => class\n" + "metaclass => get-size ;\n" + ": methods ( instance class -- )\n" + "object => class\n" + "metaclass => methods ;\n" + ": index ( n instance class -- instance[n] class )\n" + "locals| class inst |\n" + "inst class\n" + "object => class\n" + "metaclass => get-size * ( n*size )\n" + "inst + class ;\n" + ": next ( instance[n] class -- instance[n+1] class )\n" + "locals| class inst |\n" + "inst class\n" + "object => class\n" + "metaclass => get-size\n" + "inst +\n" + "class ;\n" + ": prev ( instance[n] class -- instance[n-1] class )\n" + "locals| class inst |\n" + "inst class\n" + "object => class\n" + "metaclass => get-size\n" + "inst swap -\n" + "class ;\n" + ": debug ( 2this -- ?? )\n" + "find-method-xt debug-xt ;\n" + "previous set-current\n" + "only definitions\n" + ": oo only also oop definitions ;\n" + "[endif]\n" + "S\" FICL_WANT_OOP\" ENVIRONMENT? drop [if]\n" + ".( loading ficl utility classes ) cr\n" + "also oop definitions\n" + "object subclass c-ref\n" + "cell: .class\n" + "cell: .instance\n" + ": get ( inst class -- refinst refclass )\n" + "drop 2@ ;\n" + ": set ( refinst refclass inst class -- )\n" + "drop 2! ;\n" + "end-class\n" + "object subclass c-byte\n" + "char: .payload\n" + ": get drop c@ ;\n" + ": set drop c! ;\n" + "end-class\n" + "object subclass c-2byte\n" + "2 chars: .payload\n" + ": get drop w@ ;\n" + ": set drop w! ;\n" + "end-class\n" + "object subclass c-4byte\n" + "4 chars: .payload\n" + ": get drop q@ ;\n" + ": set drop q! ;\n" + "end-class\n" + "object subclass c-cell\n" + "cell: .payload\n" + ": get drop @ ;\n" + ": set drop ! ;\n" + "end-class\n" + "object subclass c-ptr\n" + "c-cell obj: .addr\n" + ": get-ptr ( inst class -- addr )\n" + "c-ptr => .addr\n" + "c-cell => get\n" + ";\n" + ": set-ptr ( addr inst class -- )\n" + "c-ptr => .addr\n" + "c-cell => set\n" + ";\n" + ": clr-ptr\n" + "0 -rot c-ptr => .addr c-cell => set\n" + ";\n" + ": ?null ( inst class -- flag )\n" + "c-ptr => get-ptr 0=\n" + ";\n" + ": inc-ptr ( inst class -- )\n" + "2dup 2dup ( i c i c i c )\n" + "c-ptr => get-ptr -rot ( i c addr i c )\n" + "--> @size + -rot ( addr' i c )\n" + "c-ptr => set-ptr\n" + ";\n" + ": dec-ptr ( inst class -- )\n" + "2dup 2dup ( i c i c i c )\n" + "c-ptr => get-ptr -rot ( i c addr i c )\n" + "--> @size - -rot ( addr' i c )\n" + "c-ptr => set-ptr\n" + ";\n" + ": index-ptr { index 2:this -- }\n" + "this --> get-ptr ( addr )\n" + "this --> @size index * + ( addr' )\n" + "this --> set-ptr\n" + ";\n" + "end-class\n" + "c-ptr subclass c-cellPtr\n" + ": @size 2drop 1 cells ;\n" + ": get ( inst class -- cell )\n" + "c-ptr => get-ptr @\n" + ";\n" + ": set ( value inst class -- )\n" + "c-ptr => get-ptr !\n" + ";\n" + "end-class\n" + "c-ptr subclass c-4bytePtr\n" + ": @size 2drop 4 ;\n" + ": get ( inst class -- value )\n" + "c-ptr => get-ptr q@\n" + ";\n" + ": set ( value inst class -- )\n" + "c-ptr => get-ptr q!\n" + ";\n" + "end-class\n" + "c-ptr subclass c-2bytePtr\n" + ": @size 2drop 2 ;\n" + ": get ( inst class -- value )\n" + "c-ptr => get-ptr w@\n" + ";\n" + ": set ( value inst class -- )\n" + "c-ptr => get-ptr w!\n" + ";\n" + "end-class\n" + "c-ptr subclass c-bytePtr\n" + ": @size 2drop 1 ;\n" + ": get ( inst class -- value )\n" + "c-ptr => get-ptr c@\n" + ";\n" + ": set ( value inst class -- )\n" + "c-ptr => get-ptr c!\n" + ";\n" + "end-class\n" + "previous definitions\n" + "[endif]\n" + "S\" FICL_WANT_OOP\" ENVIRONMENT? drop [if]\n" + ".( loading ficl string class ) cr\n" + "also oop definitions\n" + "object subclass c-string\n" + "c-cell obj: .count\n" + "c-cell obj: .buflen\n" + "c-ptr obj: .buf\n" + "32 constant min-buf\n" + ": get-count ( 2:this -- count ) my=[ .count get ] ;\n" + ": set-count ( count 2:this -- ) my=[ .count set ] ;\n" + ": ?empty ( 2:this -- flag ) --> get-count 0= ;\n" + ": get-buflen ( 2:this -- len ) my=[ .buflen get ] ;\n" + ": set-buflen ( len 2:this -- ) my=[ .buflen set ] ;\n" + ": get-buf ( 2:this -- ptr ) my=[ .buf get-ptr ] ;\n" + ": set-buf { ptr len 2:this -- }\n" + "ptr this my=[ .buf set-ptr ]\n" + "len this my=> set-buflen\n" + ";\n" + ": clr-buf ( 2:this -- )\n" + "0 0 2over my=> set-buf\n" + "0 -rot my=> set-count\n" + ";\n" + ": free-buf { 2:this -- }\n" + "this my=> get-buf\n" + "?dup if\n" + "free\n" + "abort\" c-string free failed\"\n" + "this my=> clr-buf\n" + "endif\n" + ";\n" + ": size-buf { size 2:this -- }\n" + "size 0< abort\" need positive size for size-buf\"\n" + "size 0= if\n" + "this --> free-buf exit\n" + "endif\n" + "my=> min-buf size over / 1+ * chars to size\n" + "this --> get-buflen 0=\n" + "if\n" + "size allocate\n" + "abort\" out of memory\"\n" + "size this --> set-buf\n" + "size this --> set-buflen\n" + "exit\n" + "endif\n" + "size this --> get-buflen > if\n" + "this --> get-buf size resize\n" + "abort\" out of memory\"\n" + "size this --> set-buf\n" + "endif\n" + ";\n" + ": set { c-addr u 2:this -- }\n" + "u this --> size-buf\n" + "u this --> set-count\n" + "c-addr this --> get-buf u move\n" + ";\n" + ": get { 2:this -- c-addr u }\n" + "this --> get-buf\n" + "this --> get-count\n" + ";\n" + ": cat { c-addr u 2:this -- }\n" + "this --> get-count u + dup >r\n" + "this --> size-buf\n" + "c-addr this --> get-buf this --> get-count + u move\n" + "r> this --> set-count\n" + ";\n" + ": type { 2:this -- }\n" + "this --> ?empty if .\" (empty) \" exit endif\n" + "this --> .buf --> get-ptr\n" + "this --> .count --> get\n" + "type\n" + ";\n" + ": compare ( 2string 2:this -- n )\n" + "--> get\n" + "2swap\n" + "--> get\n" + "2swap compare\n" + ";\n" + ": hashcode ( 2:this -- hashcode )\n" + "--> get hash\n" + ";\n" + ": free ( 2:this -- ) 2dup --> free-buf object => free ;\n" + "end-class\n" + "c-string subclass c-hashstring\n" + "c-2byte obj: .hashcode\n" + ": set-hashcode { 2:this -- }\n" + "this --> super --> hashcode\n" + "this --> .hashcode --> set\n" + ";\n" + ": get-hashcode ( 2:this -- hashcode )\n" + "--> .hashcode --> get\n" + ";\n" + ": set ( c-addr u 2:this -- )\n" + "2swap 2over --> super --> set\n" + "--> set-hashcode\n" + ";\n" + ": cat ( c-addr u 2:this -- )\n" + "2swap 2over --> super --> cat\n" + "--> set-hashcode\n" + ";\n" + "end-class\n" + "previous definitions\n" + "[endif]\n" + "S\" FICL_PLATFORM_OS\" ENVIRONMENT? drop S\" WIN32\" compare-insensitive 0= [if]\n" + ": GetProcAddress ( name-addr name-u hmodule -- address )\n" + "3 \\ argumentCount\n" + "0 \\ floatArgumentBitfield\n" + "2 \\ cstringArgumentBitfield\n" + "(get-proc-address) \\ functionAddress\n" + "[\n" + "multicall-calltype-function multicall-returntype-integer or literal \\ flags\n" + "]\n" + "multicall ;\n" + ": LoadLibrary ( name-addr name-u -- hmodule )\n" + "2 \\ argumentCount\n" + "0 \\ floatArgumentBitfield\n" + "1 \\ cstringArgumentBitfield\n" + "[\n" + "S\" LoadLibraryA\" kernel32.dll GetProcAddress literal \\ functionAddress\n" + "multicall-calltype-function multicall-returntype-integer or literal \\ flags\n" + "]\n" + "multicall ;\n" + ": FreeLibrary ( hmodule -- success )\n" + "1 \\ argumentCount\n" + "0 \\ floatArgumentBitfield\n" + "0 \\ cstringArgumentBitfield\n" + "[\n" + "S\" FreeLibrary\" kernel32.dll GetProcAddress literal \\ functionAddress\n" + "multicall-calltype-function multicall-returntype-integer or literal \\ flags\n" + "]\n" + "multicall ;\n" + ": DebugBreak ( -- )\n" + "0 \\ argumentCount\n" + "0 \\ floatArgumentBitfield\n" + "0 \\ cstringArgumentBitfield\n" + "[\n" + "S\" DebugBreak\" kernel32.dll GetProcAddress literal \\ functionAddress\n" + "multicall-calltype-function multicall-returntype-void or literal \\ flags\n" + "]\n" + "multicall ;\n" + ": OutputDebugString ( addr u -- )\n" + "2 \\ argumentCount\n" + "0 \\ floatArgumentBitfield\n" + "1 \\ cstringArgumentBitfield\n" + "[\n" + "S\" OutputDebugStringA\" kernel32.dll GetProcAddress literal \\ functionAddress\n" + "multicall-calltype-function multicall-returntype-void or literal \\ flags\n" + "]\n" + "multicall ;\n" + ": GetTickCount ( -- ticks )\n" + "0 \\ argumentCount\n" + "0 \\ floatArgumentBitfield\n" + "0 \\ cstringArgumentBitfield\n" + "[\n" + "S\" GetTickCount\" kernel32.dll GetProcAddress literal \\ functionAddress\n" + "multicall-calltype-function multicall-returntype-integer or literal \\ flags\n" + "]\n" + "multicall ;\n" + "S\" user32.dll\" LoadLibrary constant user32.dll\n" + ": MessageBox ( flags title-addr title-u body-addr body-u hwnd -- button )\n" + "6 \\ argumentCount\n" + "0 \\ floatArgumentBitfield\n" + "[\n" + "2 8 or literal \\ cstringArgumentBitfield\n" + "S\" MessageBoxA\" user32.dll GetProcAddress literal \\ functionAddress\n" + "multicall-calltype-function multicall-returntype-integer or literal \\ flags\n" + "]\n" + "multicall ;\n" + "0x00000000 constant MB_OK\n" + "0x00000001 constant MB_OKCANCEL\n" + "0x00000002 constant MB_ABORTRETRYIGNORE\n" + "0x00000003 constant MB_YESNOCANCEL\n" + "0x00000004 constant MB_YESNO\n" + "0x00000005 constant MB_RETRYCANCEL\n" + "0x00000010 constant MB_ICONHAND\n" + "0x00000020 constant MB_ICONQUESTION\n" + "0x00000030 constant MB_ICONEXCLAMATION\n" + "0x00000040 constant MB_ICONASTERISK\n" + "0x00000080 constant MB_USERICON\n" + "0x00000000 constant MB_DEFBUTTON1\n" + "0x00000100 constant MB_DEFBUTTON2\n" + "0x00000200 constant MB_DEFBUTTON3\n" + "0x00000300 constant MB_DEFBUTTON4\n" + "0x00000000 constant MB_APPLMODAL\n" + "0x00001000 constant MB_SYSTEMMODAL\n" + "0x00002000 constant MB_TASKMODAL\n" + "0x00004000 constant MB_HELP\n" + "0x00008000 constant MB_NOFOCUS\n" + "0x00010000 constant MB_SETFOREGROUND\n" + "0x00020000 constant MB_DEFAULT_DESKTOP_ONLY\n" + "0x00040000 constant MB_TOPMOST\n" + "0x00080000 constant MB_RIGHT\n" + "0x00100000 constant MB_RTLREADING\n" + "MB_ICONEXCLAMATION constant MB_ICONWARNING\n" + "MB_ICONHAND constant MB_ICONERROR\n" + "MB_ICONASTERISK constant MB_ICONINFORMATION\n" + "MB_ICONHAND constant MB_ICONSTOP\n" + "0x00200000 constant MB_SERVICE_NOTIFICATION\n" + "0x00040000 constant MB_SERVICE_NOTIFICATION\n" + "0x00040000 constant MB_SERVICE_NOTIFICATION_NT3X\n" + "0x0000000F constant MB_TYPEMASK\n" + "0x000000F0 constant MB_ICONMASK\n" + "0x00000F00 constant MB_DEFMASK\n" + "0x00003000 constant MB_MODEMASK\n" + "0x0000C000 constant MB_MISCMASK\n" + "1 constant IDOK\n" + "2 constant IDCANCEL\n" + "3 constant IDABORT\n" + "4 constant IDRETRY\n" + "5 constant IDIGNORE\n" + "6 constant IDYES\n" + "7 constant IDNO\n" + "8 constant IDCLOSE\n" + "9 constant IDHELP\n" + ": output-debug-string OutputDebugString ;\n" + ": debug-break DebugBreak ;\n" + ": uaddr->cstring { addr u | cstring -- cstring }\n" + "u 1+ allocate\n" *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-soc-all@freebsd.org Wed Jul 1 15:22:04 2015 Return-Path: Delivered-To: svn-soc-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3ADD199151D for ; Wed, 1 Jul 2015 15:22:04 +0000 (UTC) (envelope-from mihai@FreeBSD.org) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2B22921EA for ; Wed, 1 Jul 2015 15:22:04 +0000 (UTC) (envelope-from mihai@FreeBSD.org) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.9/8.14.9) with ESMTP id t61FM4TG089804 for ; Wed, 1 Jul 2015 15:22:04 GMT (envelope-from mihai@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.9/8.14.9/Submit) id t61FM2MC089768 for svn-soc-all@FreeBSD.org; Wed, 1 Jul 2015 15:22:02 GMT (envelope-from mihai@FreeBSD.org) Date: Wed, 1 Jul 2015 15:22:02 GMT Message-Id: <201507011522.t61FM2MC089768@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to mihai@FreeBSD.org using -f From: mihai@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r287815 - soc2015/mihai/bhyve-on-arm-head/sys/arm/vmm MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2015 15:22:04 -0000 Author: mihai Date: Wed Jul 1 15:22:01 2015 New Revision: 287815 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=287815 Log: sys: arm: vmm: call the low-level primitives to initialize, run and clean a virtual machine Added: soc2015/mihai/bhyve-on-arm-head/sys/arm/vmm/hyp_helpers.h Modified: soc2015/mihai/bhyve-on-arm-head/sys/arm/vmm/arm.c soc2015/mihai/bhyve-on-arm-head/sys/arm/vmm/arm.h soc2015/mihai/bhyve-on-arm-head/sys/arm/vmm/hyp.S soc2015/mihai/bhyve-on-arm-head/sys/arm/vmm/hyp.h Modified: soc2015/mihai/bhyve-on-arm-head/sys/arm/vmm/arm.c ============================================================================== --- soc2015/mihai/bhyve-on-arm-head/sys/arm/vmm/arm.c Wed Jul 1 15:15:58 2015 (r287814) +++ soc2015/mihai/bhyve-on-arm-head/sys/arm/vmm/arm.c Wed Jul 1 15:22:01 2015 (r287815) @@ -7,15 +7,23 @@ #include #include #include +#include +#include + #include #include +#include #include #include #include "mmu.h" #include "arm.h" +#include "hyp.h" + +#define HANDLED 1 +#define UNHANDLED 0 MALLOC_DEFINE(M_HYP, "ARM VMM HYP", "ARM VMM HYP"); @@ -27,12 +35,43 @@ lpae_pd_entry_t *hyp_l1pd; char *stack; +static uint64_t vmid_generation = 1; +static struct mtx vmid_generation_mtx; + +static void set_vttbr(struct hyp* hyp) { + if (hyp->vmid_generation && + ((hyp->vmid_generation & ~VMID_GENERATION_MASK) != + (atomic_load_64(&vmid_generation) & ~VMID_GENERATION_MASK))) + goto out; + + mtx_lock(&vmid_generation_mtx); + + /* Another VCPU has change the VMID already */ + if (hyp->vmid_generation && + ((hyp->vmid_generation & ~VMID_GENERATION_MASK) != + (vmid_generation & ~VMID_GENERATION_MASK))) { + mtx_unlock(&vmid_generation_mtx); + goto out; + } + + vmid_generation++; + if (!(vmid_generation & VMID_GENERATION_MASK)) + vmid_generation++; + + hyp->vmid_generation = vmid_generation; + mtx_unlock(&vmid_generation_mtx); +out: + hyp->vttbr = BUILD_VTTBR((hyp->vmid_generation & VMID_GENERATION_MASK), hyp->l1pd_phys); +} + static int arm_init(int ipinum) { char *stack_top; lpae_vm_paddr_t phys_hyp_l1pd; + mtx_init(&vmid_generation_mtx, "vmid_generation_mtx", NULL, MTX_DEF); + stack = malloc(PAGE_SIZE, M_HYP, M_WAITOK | M_ZERO); stack_top = stack + PAGE_SIZE; @@ -100,20 +139,18 @@ arm_cleanup(void) { printf("%s before vmm_call_hyp\n", __func__); - vmm_call_hyp((void *) vtophys(vmm_stub_install), (void *)vtophys(&hypervisor_stub_vect[0])); printf("%s after vmm_call_hyp\n", __func__); printf("%s before freestack\n", __func__); - free(stack, M_HYP); - printf("%s before lpae_vmcleanup\n", __func__); + printf("%s before lpae_vmcleanup\n", __func__); lpae_vmcleanup(NULL); - printf("%s before vmm_call_hyp\n", __func__); free(hyp_l1pd, M_HYP); + mtx_destroy(&vmid_generation_mtx); return 0; } @@ -128,19 +165,79 @@ static void * arm_vminit(struct vm *vm, pmap_t pmap) { - return NULL; + struct hyp *hyp; + struct hypctx *hypctx; + int i; + + hyp = malloc(sizeof(struct hyp), M_HYP, M_WAITOK | M_ZERO); + if ((uintptr_t)hyp & PAGE_MASK) { + panic("malloc of struct hyp not aligned on %d byte boundary", + PAGE_SIZE); + } + hyp->vm = vm; + + hyp->l1pd_phys = (lpae_pd_entry_t) vtophys(&hyp->l1pd[0]); + set_vttbr(hyp); + + for (i = 0; i < VM_MAXCPU; i++) { + hypctx = &hyp->ctx[i]; + hypctx->vcpu = i; + hypctx->hyp = hyp; + hypctx->hcr = HCR_GUEST_MASK; + hypctx->midr = cpu_ident(); + hypctx->mpidr = (cp15_mpidr_get() & MPIDR_SMP_MASK) | + MPIDR_AFF1_LEVEL(i) | + MPIDR_AFF0_LEVEL(i); + } + + lpae_vmmmap_set(NULL, + (lpae_vm_vaddr_t)hyp, + (lpae_vm_paddr_t)vtophys(hyp), + sizeof(struct hyp), + VM_PROT_READ | VM_PROT_WRITE); + + return (hyp); } static int arm_vmrun(void *arg, int vcpu, register_t rip, pmap_t pmap, void *rend_cookie, void *suspended_cookie) { + int rc; + int handled; + struct hyp *hyp; + struct hypctx *hypctx; + struct vm *vm; + + hyp = arg; + hypctx = &hyp->ctx[vcpu]; + vm = hyp->vm; + + do { + handled = UNHANDLED; + + rc = vmm_call_hyp((void *)hyp_enter_guest, hypctx); + + handled = HANDLED; + + } while(handled); return 0; } static void arm_vmcleanup(void *arg) { + struct hyp *hyp = arg; + + /* Unmap from HYP-mode the hyp tructure */ + lpae_vmmmap_set(NULL, + (lpae_vm_vaddr_t)hyp, + (lpae_vm_paddr_t)vtophys(hyp), + sizeof(struct hyp), + VM_PROT_NONE); + + lpae_vmcleanup(&(hyp->l1pd[0])); + free(hyp, M_HYP); } static int Modified: soc2015/mihai/bhyve-on-arm-head/sys/arm/vmm/arm.h ============================================================================== --- soc2015/mihai/bhyve-on-arm-head/sys/arm/vmm/arm.h Wed Jul 1 15:15:58 2015 (r287814) +++ soc2015/mihai/bhyve-on-arm-head/sys/arm/vmm/arm.h Wed Jul 1 15:22:01 2015 (r287815) @@ -2,15 +2,16 @@ #include struct hypctx { + uint32_t vcpu; struct hyp* hyp; - struct reg regs; - uint32_t hcr; uint32_t midr; uint32_t mpidr; + struct reg regs; + uint32_t sp_und; uint32_t lr_und; uint32_t spsr_und; @@ -66,14 +67,27 @@ struct hyp { lpae_pd_entry_t l1pd[2 * LPAE_L1_ENTRIES]; lpae_pd_entry_t vttbr; - struct hypctx ctx[VM_MAXCPU]; + uint64_t vmid_generation; struct vm *vm; -}; + lpae_pd_entry_t l1pd_phys; + struct hypctx ctx[VM_MAXCPU]; + }; CTASSERT((offsetof(struct hyp, l1pd) & PAGE_MASK) == 0); uint64_t vmm_call_hyp(void *hyp_func_addr, ...); -void vmm_stub_install(void *hypervisor_stub_vect); +extern void vmm_stub_install(void *hypervisor_stub_vect); +extern int hyp_enter_guest(struct hypctx *hypctx); #define LOW(x) (x & 0xFFFFFFFF) #define HIGH(x) LOW(x >> 32) + +#define VMID_GENERATION_MASK ((1UL<<8) - 1) +#define BUILD_VTTBR(VMID, PTADDR) ((VMID << 48) | PTADDR); + +#define MPIDR_SMP_MASK (0x3 << 30) +#define MPIDR_AFF1_LEVEL(x) ((x >> 2) << 8) +#define MPIDR_AFF0_LEVEL(x) ((x & 0x3) << 0) + + + Modified: soc2015/mihai/bhyve-on-arm-head/sys/arm/vmm/hyp.S ============================================================================== --- soc2015/mihai/bhyve-on-arm-head/sys/arm/vmm/hyp.S Wed Jul 1 15:15:58 2015 (r287814) +++ soc2015/mihai/bhyve-on-arm-head/sys/arm/vmm/hyp.S Wed Jul 1 15:22:01 2015 (r287815) @@ -6,8 +6,9 @@ #include #include -#include "hyp_assym.h" #include "hyp.h" +#include "hyp_assym.h" +#include "hyp_helpers.h" .text .globl hyp_code_start Modified: soc2015/mihai/bhyve-on-arm-head/sys/arm/vmm/hyp.h ============================================================================== --- soc2015/mihai/bhyve-on-arm-head/sys/arm/vmm/hyp.h Wed Jul 1 15:15:58 2015 (r287814) +++ soc2015/mihai/bhyve-on-arm-head/sys/arm/vmm/hyp.h Wed Jul 1 15:22:01 2015 (r287815) @@ -109,7 +109,7 @@ */ #define HCR_GUEST_MASK (HCR_TSW | HCR_TAC | HCR_TIDCP | \ HCR_TSC | HCR_TWE | HCR_TWI | HCR_BSU_IS | HCR_FB | \ - HCR_AMO | HCR_IMO | HCR_FMO | HCR_SWIO | HCR_VM + HCR_AMO | HCR_IMO | HCR_FMO | HCR_SWIO | HCR_VM) /* Hyp Coprocessor Trap Register */ #define HCPTR_TCP(x) (1 << x) @@ -148,258 +148,5 @@ #define HYPCTX_REGS_R(x) (HYPCTX_REGS + x * 4) -/* Banked registers */ -#define SAVE_GUEST_BANKED_REG(reg) \ - mrs r2, reg; \ - str r2, [r0, #HYPCTX_##reg] -#define SAVE_GUEST_BANKED_MODE(mode) \ - SAVE_GUEST_BANKED_REG(SP_##mode); \ - SAVE_GUEST_BANKED_REG(LR_##mode); \ - SAVE_GUEST_BANKED_REG(SPSR_##mode) - -#define RESTORE_GUEST_BANKED_REG(reg) \ - ldr r2, [r0, #HYPCTX_##reg]; \ - msr reg, r2 -#define RESTORE_GUEST_BANKED_MODE(mode) \ - RESTORE_GUEST_BANKED_REG(SP_##mode); \ - RESTORE_GUEST_BANKED_REG(LR_##mode); \ - RESTORE_GUEST_BANKED_REG(SPSR_##mode) - -#define save_guest_regs \ - /* r0 - address of the hypctx */ \ - add r2, r0, #HYPCTX_REGS_R(3); \ - stm r2, {r3-r12}; \ - pop {r3-r5}; @ Get r0-r2 from the stack \ - add r2, r0, #HYPCTX_REGS_R(0); \ - stm r2, {r3-r5}; \ - \ - str lr, [r0, #HYPCTX_REGS_LR]; \ - mrs r2, SP_usr; \ - str r2, [r0, #HYPCTX_REGS_SP]; \ - \ - mrs r2, ELR_hyp; \ - str r2, [r0, #HYPCTX_REGS_PC]; \ - mrs r2, spsr; \ - str r2, [r0, #HYPCTX_REGS_CPSR]; \ - \ - SAVE_GUEST_BANKED_MODE(svc); \ - SAVE_GUEST_BANKED_MODE(abt); \ - SAVE_GUEST_BANKED_MODE(und); \ - SAVE_GUEST_BANKED_MODE(irq); \ - SAVE_GUEST_BANKED_MODE(fiq); \ - SAVE_GUEST_BANKED_REG(r8_fiq); \ - SAVE_GUEST_BANKED_REG(r9_fiq); \ - SAVE_GUEST_BANKED_REG(r10_fiq); \ - SAVE_GUEST_BANKED_REG(r11_fiq); \ - SAVE_GUEST_BANKED_REG(r12_fiq) - -#define restore_guest_regs \ - /* r0 - address of the hypctx */ \ - RESTORE_GUEST_BANKED_MODE(svc); \ - RESTORE_GUEST_BANKED_MODE(abt); \ - RESTORE_GUEST_BANKED_MODE(und); \ - RESTORE_GUEST_BANKED_MODE(irq); \ - RESTORE_GUEST_BANKED_MODE(fiq); \ - RESTORE_GUEST_BANKED_REG(r8_fiq); \ - RESTORE_GUEST_BANKED_REG(r9_fiq); \ - RESTORE_GUEST_BANKED_REG(r10_fiq); \ - RESTORE_GUEST_BANKED_REG(r11_fiq); \ - RESTORE_GUEST_BANKED_REG(r12_fiq); \ - \ - ldr r2, [r0, #HYPCTX_REGS_PC]; \ - msr ELR_hyp, r2; \ - ldr r2, [r0, #HYPCTX_REGS_CPSR]; \ - msr SPSR_cxsf, r2; \ - \ - ldr lr, [r0, #HYPCTX_REGS_LR]; \ - ldr r2, [r0, #HYPCTX_REGS_SP]; \ - msr SP_usr, r2; \ - \ - add r2, r0, #HYPCTX_REGS_R(0); \ - ldm r2, {r0-r12} - - -#define SAVE_HOST_BANKED_REG(reg) \ - mrs r2, reg; \ - push {r2} -#define SAVE_HOST_BANKED_MODE(mode) \ - SAVE_HOST_BANKED_REG(SP_##mode); \ - SAVE_HOST_BANKED_REG(LR_##mode); \ - SAVE_HOST_BANKED_REG(SPSR_##mode) - -#define RESTORE_HOST_BANKED_REG(reg) \ - pop {r2}; \ - msr reg, r2 -#define RESTORE_HOST_BANKED_MODE(mode) \ - RESTORE_HOST_BANKED_REG(SPSR_##mode); \ - RESTORE_HOST_BANKED_REG(LR_##mode); \ - RESTORE_HOST_BANKED_REG(SP_##mode) - -#define save_host_regs \ - /* SPSR was saved when entered HYP mode */ \ - mrs r2, ELR_hyp; \ - push {r2}; \ - \ - push {r4-r12}; \ - mrs r2, SP_usr; \ - push {r2}; \ - push {lr}; \ - \ - SAVE_HOST_BANKED_MODE(svc); \ - SAVE_HOST_BANKED_MODE(abt); \ - SAVE_HOST_BANKED_MODE(und); \ - SAVE_HOST_BANKED_MODE(irq); \ - SAVE_HOST_BANKED_MODE(fiq); \ - SAVE_HOST_BANKED_REG(r8_fiq); \ - SAVE_HOST_BANKED_REG(r9_fiq); \ - SAVE_HOST_BANKED_REG(r10_fiq); \ - SAVE_HOST_BANKED_REG(r11_fiq); \ - SAVE_HOST_BANKED_REG(r12_fiq) - -#define restore_host_regs \ - RESTORE_HOST_BANKED_REG(r12_fiq); \ - RESTORE_HOST_BANKED_REG(r11_fiq); \ - RESTORE_HOST_BANKED_REG(r10_fiq); \ - RESTORE_HOST_BANKED_REG(r9_fiq); \ - RESTORE_HOST_BANKED_REG(r8_fiq); \ - RESTORE_HOST_BANKED_MODE(fiq); \ - RESTORE_HOST_BANKED_MODE(irq); \ - RESTORE_HOST_BANKED_MODE(und); \ - RESTORE_HOST_BANKED_MODE(abt); \ - RESTORE_HOST_BANKED_MODE(svc); \ - \ - pop {lr}; \ - pop {r2}; \ - msr SP_usr, r2; \ - pop {r4-r12}; \ - \ - pop {r2}; \ - msr ELR_hyp, r2 - -#define load_cp15_regs_batch1 \ - mrc p15, 0, r2, c1, c0, 0; @ SCTLR \ - mrc p15, 0, r3, c1, c0, 2; @ CPACR \ - mrc p15, 0, r4, c2, c0, 2; @ TTBCR \ - mrc p15, 0, r5, c3, c0, 0; @ DACR \ - mrrc p15, 0, r6, r7, c2; @ TTBR 0 \ - mrrc p15, 1, r8, r9, c2; @ TTBR 1 \ - mrc p15, 0, r10, c10, c2, 0; @ PRRR \ - mrc p15, 0, r11, c10, c2, 1; @ NMRR \ - mrc p15, 2, r12, c0, c0, 0 @ CSSELR - -#define load_cp15_regs_batch2 \ - mrc p15, 0, r2, c13, c0, 1; @ CID \ - mrc p15, 0, r3, c13, c0, 2; @ TID_URW \ - mrc p15, 0, r4, c13, c0, 3; @ TID_URO \ - mrc p15, 0, r5, c13, c0, 4; @ TID_PRIV \ - mrc p15, 0, r6, c5, c0, 0; @ DFSR \ - mrc p15, 0, r7, c5, c0, 1; @ IFSR \ - mrc p15, 0, r8, c5, c1, 0; @ ADFSR \ - mrc p15, 0, r9, c5, c1, 1; @ AIFSR \ - mrc p15, 0, r10, c6, c0, 0; @ DFAR \ - mrc p15, 0, r11, c6, c0, 2; @ IFAR \ - mrc p15, 0, r12, c12, c0, 0 @ VBAR - -#define load_cp15_regs_batch3 \ - mrc p15, 0, r2, c14, c1, 0; @ CNTKCTL \ - mrrc p15, 0, r3, r4, c7; @ PAR \ - mrc p15, 0, r5, c10, c3, 0; @ AMAIR0 \ - mrc p15, 0, r6, c10, c3, 1 @ AMAIR1 - -#define store_cp15_regs_batch1 \ - mcr p15, 0, r2, c1, c0, 0; @ SCTLR \ - mcr p15, 0, r3, c1, c0, 2; @ CPACR \ - mcr p15, 0, r4, c2, c0, 2; @ TTBCR \ - mcr p15, 0, r5, c3, c0, 0; @ DACR \ - mcrr p15, 0, r6, r7, c2; @ TTBR 0 \ - mcrr p15, 1, r8, r9, c2; @ TTBR 1 \ - mcr p15, 0, r10, c10, c2, 0; @ PRRR \ - mcr p15, 0, r11, c10, c2, 1; @ NMRR \ - mcr p15, 2, r12, c0, c0, 0 @ CSSELR - -#define store_cp15_regs_batch2 \ - mcr p15, 0, r2, c13, c0, 1; @ CID \ - mcr p15, 0, r3, c13, c0, 2; @ TID_URW \ - mcr p15, 0, r4, c13, c0, 3; @ TID_URO \ - mcr p15, 0, r5, c13, c0, 4; @ TID_PRIV \ - mcr p15, 0, r6, c5, c0, 0; @ DFSR \ - mcr p15, 0, r7, c5, c0, 1; @ IFSR \ - mcr p15, 0, r8, c5, c1, 0; @ ADFSR \ - mcr p15, 0, r9, c5, c1, 1; @ AIFSR \ - mcr p15, 0, r10, c6, c0, 0; @ DFAR \ - mcr p15, 0, r11, c6, c0, 2; @ IFAR \ - mcr p15, 0, r12, c12, c0, 0 @ VBAR - -#define store_cp15_regs_batch3 \ - mcr p15, 0, r2, c14, c1, 0; @ CNTKCTL \ - mcrr p15, 0, r3, r4, c7; @ PAR \ - mcr p15, 0, r5, c10, c3, 0; @ AMAIR0 \ - mcr p15, 0, r6, c10, c3, 1 @ AMAIR1 - -#define store_guest_cp15_regs_batch1 \ - str r2, [r0, #HYPCTX_CP15_SCTLR]; \ - str r3, [r0, #HYPCTX_CP15_CPACR]; \ - str r4, [r0, #HYPCTX_CP15_TTBCR]; \ - str r5, [r0, #HYPCTX_CP15_DACR]; \ - add r2, r0, #HYPCTX_CP15_TTBR0; \ - strd r6, r7, [r2]; \ - add r2, r0, #HYPCTX_CP15_TTBR1; \ - strd r8, r9, [r2]; \ - str r10, [r0, #HYPCTX_CP15_PRRR]; \ - str r11, [r0, #HYPCTX_CP15_NMRR]; \ - str r12, [r0, #HYPCTX_CP15_CSSELR] - -#define store_guest_cp15_regs_batch2 \ - str r2, [r0, #HYPCTX_CP15_CID]; \ - str r3, [r0, #HYPCTX_CP15_TID_URW]; \ - str r4, [r0, #HYPCTX_CP15_TID_URO]; \ - str r5, [r0, #HYPCTX_CP15_TID_PRIV]; \ - str r6, [r0, #HYPCTX_CP15_DFSR]; \ - str r7, [r0, #HYPCTX_CP15_IFSR]; \ - str r8, [r0, #HYPCTX_CP15_ADFSR]; \ - str r9, [r0, #HYPCTX_CP15_AIFSR]; \ - str r10, [r0, #HYPCTX_CP15_DFAR]; \ - str r11, [r0, #HYPCTX_CP15_IFAR]; \ - str r12, [r0, #HYPCTX_CP15_VBAR] - -#define store_guest_cp15_regs_batch3 \ - str r2, [r0, #HYPCTX_CP15_CNTKCTL]; \ - add r2, r0, #HYPCTX_CP15_PAR; \ - strd r4, r5, [r2]; \ - str r3, [r0, #HYPCTX_CP15_AMAIR0]; \ - str r6, [r0, #HYPCTX_CP15_AMAIR1] - -#define load_guest_cp15_regs_batch1 \ - ldr r2, [r0, #HYPCTX_CP15_SCTLR]; \ - ldr r3, [r0, #HYPCTX_CP15_CPACR]; \ - ldr r4, [r0, #HYPCTX_CP15_TTBCR]; \ - ldr r5, [r0, #HYPCTX_CP15_DACR]; \ - add r2, r0, #HYPCTX_CP15_TTBR0; \ - ldrd r6, r7, [r2]; \ - add r2, r0, #HYPCTX_CP15_TTBR1; \ - ldrd r8, r9, [r2]; \ - ldr r10, [r0, #HYPCTX_CP15_PRRR]; \ - ldr r11, [r0, #HYPCTX_CP15_NMRR]; \ - ldr r12, [r0, #HYPCTX_CP15_CSSELR] - -#define load_guest_cp15_regs_batch2 \ - ldr r2, [r0, #HYPCTX_CP15_CID]; \ - ldr r3, [r0, #HYPCTX_CP15_TID_URW]; \ - ldr r4, [r0, #HYPCTX_CP15_TID_URO]; \ - ldr r5, [r0, #HYPCTX_CP15_TID_PRIV]; \ - ldr r6, [r0, #HYPCTX_CP15_DFSR]; \ - ldr r7, [r0, #HYPCTX_CP15_IFSR]; \ - ldr r8, [r0, #HYPCTX_CP15_ADFSR]; \ - ldr r9, [r0, #HYPCTX_CP15_AIFSR]; \ - ldr r10, [r0, #HYPCTX_CP15_DFAR]; \ - ldr r11, [r0, #HYPCTX_CP15_IFAR]; \ - ldr r12, [r0, #HYPCTX_CP15_VBAR] - -#define load_guest_cp15_regs_batch3 \ - ldr r2, [r0, #HYPCTX_CP15_CNTKCTL]; \ - add r2, r0, #HYPCTX_CP15_PAR; \ - ldrd r4, r5, [r2]; \ - ldr r3, [r0, #HYPCTX_CP15_AMAIR0]; \ - ldr r6, [r0, #HYPCTX_CP15_AMAIR1] - #endif + Added: soc2015/mihai/bhyve-on-arm-head/sys/arm/vmm/hyp_helpers.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ soc2015/mihai/bhyve-on-arm-head/sys/arm/vmm/hyp_helpers.h Wed Jul 1 15:22:01 2015 (r287815) @@ -0,0 +1,259 @@ +#ifndef _VMM_HYP_HELPERS_H_ +#define _VMM_HYP_HELPERS_H_ + + +/* Banked registers */ +#define SAVE_GUEST_BANKED_REG(reg) \ + mrs r2, reg; \ + str r2, [r0, #HYPCTX_##reg] +#define SAVE_GUEST_BANKED_MODE(mode) \ + SAVE_GUEST_BANKED_REG(SP_##mode); \ + SAVE_GUEST_BANKED_REG(LR_##mode); \ + SAVE_GUEST_BANKED_REG(SPSR_##mode) + +#define RESTORE_GUEST_BANKED_REG(reg) \ + ldr r2, [r0, #HYPCTX_##reg]; \ + msr reg, r2 +#define RESTORE_GUEST_BANKED_MODE(mode) \ + RESTORE_GUEST_BANKED_REG(SP_##mode); \ + RESTORE_GUEST_BANKED_REG(LR_##mode); \ + RESTORE_GUEST_BANKED_REG(SPSR_##mode) + +#define save_guest_regs \ + /* r0 - address of the hypctx */ \ + add r2, r0, #HYPCTX_REGS_R(3); \ + stm r2, {r3-r12}; \ + pop {r3-r5}; @ Get r0-r2 from the stack \ + add r2, r0, #HYPCTX_REGS_R(0); \ + stm r2, {r3-r5}; \ + \ + str lr, [r0, #HYPCTX_REGS_LR]; \ + mrs r2, SP_usr; \ + str r2, [r0, #HYPCTX_REGS_SP]; \ + \ + mrs r2, ELR_hyp; \ + str r2, [r0, #HYPCTX_REGS_PC]; \ + mrs r2, spsr; \ + str r2, [r0, #HYPCTX_REGS_CPSR]; \ + \ + SAVE_GUEST_BANKED_MODE(svc); \ + SAVE_GUEST_BANKED_MODE(abt); \ + SAVE_GUEST_BANKED_MODE(und); \ + SAVE_GUEST_BANKED_MODE(irq); \ + SAVE_GUEST_BANKED_MODE(fiq); \ + SAVE_GUEST_BANKED_REG(r8_fiq); \ + SAVE_GUEST_BANKED_REG(r9_fiq); \ + SAVE_GUEST_BANKED_REG(r10_fiq); \ + SAVE_GUEST_BANKED_REG(r11_fiq); \ + SAVE_GUEST_BANKED_REG(r12_fiq) + +#define restore_guest_regs \ + /* r0 - address of the hypctx */ \ + RESTORE_GUEST_BANKED_MODE(svc); \ + RESTORE_GUEST_BANKED_MODE(abt); \ + RESTORE_GUEST_BANKED_MODE(und); \ + RESTORE_GUEST_BANKED_MODE(irq); \ + RESTORE_GUEST_BANKED_MODE(fiq); \ + RESTORE_GUEST_BANKED_REG(r8_fiq); \ + RESTORE_GUEST_BANKED_REG(r9_fiq); \ + RESTORE_GUEST_BANKED_REG(r10_fiq); \ + RESTORE_GUEST_BANKED_REG(r11_fiq); \ + RESTORE_GUEST_BANKED_REG(r12_fiq); \ + \ + ldr r2, [r0, #HYPCTX_REGS_PC]; \ + msr ELR_hyp, r2; \ + ldr r2, [r0, #HYPCTX_REGS_CPSR]; \ + msr SPSR_cxsf, r2; \ + \ + ldr lr, [r0, #HYPCTX_REGS_LR]; \ + ldr r2, [r0, #HYPCTX_REGS_SP]; \ + msr SP_usr, r2; \ + \ + add r2, r0, #HYPCTX_REGS_R(0); \ + ldm r2, {r0-r12} + + +#define SAVE_HOST_BANKED_REG(reg) \ + mrs r2, reg; \ + push {r2} +#define SAVE_HOST_BANKED_MODE(mode) \ + SAVE_HOST_BANKED_REG(SP_##mode); \ + SAVE_HOST_BANKED_REG(LR_##mode); \ + SAVE_HOST_BANKED_REG(SPSR_##mode) + +#define RESTORE_HOST_BANKED_REG(reg) \ + pop {r2}; \ + msr reg, r2 +#define RESTORE_HOST_BANKED_MODE(mode) \ + RESTORE_HOST_BANKED_REG(SPSR_##mode); \ + RESTORE_HOST_BANKED_REG(LR_##mode); \ + RESTORE_HOST_BANKED_REG(SP_##mode) + +#define save_host_regs \ + /* SPSR was saved when entered HYP mode */ \ + mrs r2, ELR_hyp; \ + push {r2}; \ + \ + push {r4-r12}; \ + mrs r2, SP_usr; \ + push {r2}; \ + push {lr}; \ + \ + SAVE_HOST_BANKED_MODE(svc); \ + SAVE_HOST_BANKED_MODE(abt); \ + SAVE_HOST_BANKED_MODE(und); \ + SAVE_HOST_BANKED_MODE(irq); \ + SAVE_HOST_BANKED_MODE(fiq); \ + SAVE_HOST_BANKED_REG(r8_fiq); \ + SAVE_HOST_BANKED_REG(r9_fiq); \ + SAVE_HOST_BANKED_REG(r10_fiq); \ + SAVE_HOST_BANKED_REG(r11_fiq); \ + SAVE_HOST_BANKED_REG(r12_fiq) + +#define restore_host_regs \ + RESTORE_HOST_BANKED_REG(r12_fiq); \ + RESTORE_HOST_BANKED_REG(r11_fiq); \ + RESTORE_HOST_BANKED_REG(r10_fiq); \ + RESTORE_HOST_BANKED_REG(r9_fiq); \ + RESTORE_HOST_BANKED_REG(r8_fiq); \ + RESTORE_HOST_BANKED_MODE(fiq); \ + RESTORE_HOST_BANKED_MODE(irq); \ + RESTORE_HOST_BANKED_MODE(und); \ + RESTORE_HOST_BANKED_MODE(abt); \ + RESTORE_HOST_BANKED_MODE(svc); \ + \ + pop {lr}; \ + pop {r2}; \ + msr SP_usr, r2; \ + pop {r4-r12}; \ + \ + pop {r2}; \ + msr ELR_hyp, r2 + +#define load_cp15_regs_batch1 \ + mrc p15, 0, r2, c1, c0, 0; @ SCTLR \ + mrc p15, 0, r3, c1, c0, 2; @ CPACR \ + mrc p15, 0, r4, c2, c0, 2; @ TTBCR \ + mrc p15, 0, r5, c3, c0, 0; @ DACR \ + mrrc p15, 0, r6, r7, c2; @ TTBR 0 \ + mrrc p15, 1, r8, r9, c2; @ TTBR 1 \ + mrc p15, 0, r10, c10, c2, 0; @ PRRR \ + mrc p15, 0, r11, c10, c2, 1; @ NMRR \ + mrc p15, 2, r12, c0, c0, 0 @ CSSELR + +#define load_cp15_regs_batch2 \ + mrc p15, 0, r2, c13, c0, 1; @ CID \ + mrc p15, 0, r3, c13, c0, 2; @ TID_URW \ + mrc p15, 0, r4, c13, c0, 3; @ TID_URO \ + mrc p15, 0, r5, c13, c0, 4; @ TID_PRIV \ + mrc p15, 0, r6, c5, c0, 0; @ DFSR \ + mrc p15, 0, r7, c5, c0, 1; @ IFSR \ + mrc p15, 0, r8, c5, c1, 0; @ ADFSR \ + mrc p15, 0, r9, c5, c1, 1; @ AIFSR \ + mrc p15, 0, r10, c6, c0, 0; @ DFAR \ + mrc p15, 0, r11, c6, c0, 2; @ IFAR \ + mrc p15, 0, r12, c12, c0, 0 @ VBAR + +#define load_cp15_regs_batch3 \ + mrc p15, 0, r2, c14, c1, 0; @ CNTKCTL \ + mrrc p15, 0, r3, r4, c7; @ PAR \ + mrc p15, 0, r5, c10, c3, 0; @ AMAIR0 \ + mrc p15, 0, r6, c10, c3, 1 @ AMAIR1 + +#define store_cp15_regs_batch1 \ + mcr p15, 0, r2, c1, c0, 0; @ SCTLR \ + mcr p15, 0, r3, c1, c0, 2; @ CPACR \ + mcr p15, 0, r4, c2, c0, 2; @ TTBCR \ + mcr p15, 0, r5, c3, c0, 0; @ DACR \ + mcrr p15, 0, r6, r7, c2; @ TTBR 0 \ + mcrr p15, 1, r8, r9, c2; @ TTBR 1 \ + mcr p15, 0, r10, c10, c2, 0; @ PRRR \ + mcr p15, 0, r11, c10, c2, 1; @ NMRR \ + mcr p15, 2, r12, c0, c0, 0 @ CSSELR + +#define store_cp15_regs_batch2 \ + mcr p15, 0, r2, c13, c0, 1; @ CID \ + mcr p15, 0, r3, c13, c0, 2; @ TID_URW \ + mcr p15, 0, r4, c13, c0, 3; @ TID_URO \ + mcr p15, 0, r5, c13, c0, 4; @ TID_PRIV \ + mcr p15, 0, r6, c5, c0, 0; @ DFSR \ + mcr p15, 0, r7, c5, c0, 1; @ IFSR \ + mcr p15, 0, r8, c5, c1, 0; @ ADFSR \ + mcr p15, 0, r9, c5, c1, 1; @ AIFSR \ + mcr p15, 0, r10, c6, c0, 0; @ DFAR \ + mcr p15, 0, r11, c6, c0, 2; @ IFAR \ + mcr p15, 0, r12, c12, c0, 0 @ VBAR + +#define store_cp15_regs_batch3 \ + mcr p15, 0, r2, c14, c1, 0; @ CNTKCTL \ + mcrr p15, 0, r3, r4, c7; @ PAR \ + mcr p15, 0, r5, c10, c3, 0; @ AMAIR0 \ + mcr p15, 0, r6, c10, c3, 1 @ AMAIR1 + +#define store_guest_cp15_regs_batch1 \ + str r2, [r0, #HYPCTX_CP15_SCTLR]; \ + str r3, [r0, #HYPCTX_CP15_CPACR]; \ + str r4, [r0, #HYPCTX_CP15_TTBCR]; \ + str r5, [r0, #HYPCTX_CP15_DACR]; \ + add r2, r0, #HYPCTX_CP15_TTBR0; \ + strd r6, r7, [r2]; \ + add r2, r0, #HYPCTX_CP15_TTBR1; \ + strd r8, r9, [r2]; \ + str r10, [r0, #HYPCTX_CP15_PRRR]; \ + str r11, [r0, #HYPCTX_CP15_NMRR]; \ + str r12, [r0, #HYPCTX_CP15_CSSELR] + +#define store_guest_cp15_regs_batch2 \ + str r2, [r0, #HYPCTX_CP15_CID]; \ + str r3, [r0, #HYPCTX_CP15_TID_URW]; \ + str r4, [r0, #HYPCTX_CP15_TID_URO]; \ + str r5, [r0, #HYPCTX_CP15_TID_PRIV]; \ + str r6, [r0, #HYPCTX_CP15_DFSR]; \ + str r7, [r0, #HYPCTX_CP15_IFSR]; \ + str r8, [r0, #HYPCTX_CP15_ADFSR]; \ + str r9, [r0, #HYPCTX_CP15_AIFSR]; \ + str r10, [r0, #HYPCTX_CP15_DFAR]; \ + str r11, [r0, #HYPCTX_CP15_IFAR]; \ + str r12, [r0, #HYPCTX_CP15_VBAR] + +#define store_guest_cp15_regs_batch3 \ + str r2, [r0, #HYPCTX_CP15_CNTKCTL]; \ + add r2, r0, #HYPCTX_CP15_PAR; \ + strd r4, r5, [r2]; \ + str r3, [r0, #HYPCTX_CP15_AMAIR0]; \ + str r6, [r0, #HYPCTX_CP15_AMAIR1] + +#define load_guest_cp15_regs_batch1 \ + ldr r2, [r0, #HYPCTX_CP15_SCTLR]; \ + ldr r3, [r0, #HYPCTX_CP15_CPACR]; \ + ldr r4, [r0, #HYPCTX_CP15_TTBCR]; \ + ldr r5, [r0, #HYPCTX_CP15_DACR]; \ + add r2, r0, #HYPCTX_CP15_TTBR0; \ + ldrd r6, r7, [r2]; \ + add r2, r0, #HYPCTX_CP15_TTBR1; \ + ldrd r8, r9, [r2]; \ + ldr r10, [r0, #HYPCTX_CP15_PRRR]; \ + ldr r11, [r0, #HYPCTX_CP15_NMRR]; \ + ldr r12, [r0, #HYPCTX_CP15_CSSELR] + +#define load_guest_cp15_regs_batch2 \ + ldr r2, [r0, #HYPCTX_CP15_CID]; \ + ldr r3, [r0, #HYPCTX_CP15_TID_URW]; \ + ldr r4, [r0, #HYPCTX_CP15_TID_URO]; \ + ldr r5, [r0, #HYPCTX_CP15_TID_PRIV]; \ + ldr r6, [r0, #HYPCTX_CP15_DFSR]; \ + ldr r7, [r0, #HYPCTX_CP15_IFSR]; \ + ldr r8, [r0, #HYPCTX_CP15_ADFSR]; \ + ldr r9, [r0, #HYPCTX_CP15_AIFSR]; \ + ldr r10, [r0, #HYPCTX_CP15_DFAR]; \ + ldr r11, [r0, #HYPCTX_CP15_IFAR]; \ + ldr r12, [r0, #HYPCTX_CP15_VBAR] + +#define load_guest_cp15_regs_batch3 \ + ldr r2, [r0, #HYPCTX_CP15_CNTKCTL]; \ + add r2, r0, #HYPCTX_CP15_PAR; \ + ldrd r4, r5, [r2]; \ + ldr r3, [r0, #HYPCTX_CP15_AMAIR0]; \ + ldr r6, [r0, #HYPCTX_CP15_AMAIR1] + +#endif From owner-svn-soc-all@freebsd.org Wed Jul 1 19:03:31 2015 Return-Path: Delivered-To: svn-soc-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A8892991649 for ; Wed, 1 Jul 2015 19:03:31 +0000 (UTC) (envelope-from kczekirda@FreeBSD.org) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 99FEC1E80 for ; Wed, 1 Jul 2015 19:03:31 +0000 (UTC) (envelope-from kczekirda@FreeBSD.org) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.9/8.14.9) with ESMTP id t61J3Vqg004756 for ; Wed, 1 Jul 2015 19:03:31 GMT (envelope-from kczekirda@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.9/8.14.9/Submit) id t61J3VHT004753 for svn-soc-all@FreeBSD.org; Wed, 1 Jul 2015 19:03:31 GMT (envelope-from kczekirda@FreeBSD.org) Date: Wed, 1 Jul 2015 19:03:31 GMT Message-Id: <201507011903.t61J3VHT004753@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to kczekirda@FreeBSD.org using -f From: kczekirda@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r287824 - soc2015/kczekirda/www MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2015 19:03:31 -0000 Author: kczekirda Date: Wed Jul 1 19:03:30 2015 New Revision: 287824 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=287824 Log: mfsbsd sanboot Modified: soc2015/kczekirda/www/menu.ipxe Modified: soc2015/kczekirda/www/menu.ipxe ============================================================================== --- soc2015/kczekirda/www/menu.ipxe Wed Jul 1 17:27:44 2015 (r287823) +++ soc2015/kczekirda/www/menu.ipxe Wed Jul 1 19:03:30 2015 (r287824) @@ -1,4 +1,3 @@ #!ipxe - dhcp -shell +sanboot --drive 0x81 --no-describe http://192.168.22.3/mfsbsd.iso From owner-svn-soc-all@freebsd.org Wed Jul 1 20:07:51 2015 Return-Path: Delivered-To: svn-soc-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 810609921B0 for ; Wed, 1 Jul 2015 20:07:51 +0000 (UTC) (envelope-from kczekirda@FreeBSD.org) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 71E181CA2 for ; Wed, 1 Jul 2015 20:07:51 +0000 (UTC) (envelope-from kczekirda@FreeBSD.org) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.9/8.14.9) with ESMTP id t61K7pqp098694 for ; Wed, 1 Jul 2015 20:07:51 GMT (envelope-from kczekirda@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.9/8.14.9/Submit) id t61K7oTr098692 for svn-soc-all@FreeBSD.org; Wed, 1 Jul 2015 20:07:50 GMT (envelope-from kczekirda@FreeBSD.org) Date: Wed, 1 Jul 2015 20:07:50 GMT Message-Id: <201507012007.t61K7oTr098692@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to kczekirda@FreeBSD.org using -f From: kczekirda@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r287826 - soc2015/kczekirda/www MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2015 20:07:51 -0000 Author: kczekirda Date: Wed Jul 1 20:07:50 2015 New Revision: 287826 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=287826 Log: ipxe menu Modified: soc2015/kczekirda/www/menu.ipxe Modified: soc2015/kczekirda/www/menu.ipxe ============================================================================== --- soc2015/kczekirda/www/menu.ipxe Wed Jul 1 19:46:57 2015 (r287825) +++ soc2015/kczekirda/www/menu.ipxe Wed Jul 1 20:07:50 2015 (r287826) @@ -1,3 +1,22 @@ #!ipxe dhcp -sanboot --drive 0x81 --no-describe http://192.168.22.3/mfsbsd.iso + +set timeout 10000 +set selected F11 + +set www 192.168.22.3 + +:menu +menu Where do you want to go today? +item --gap -- [ip=${ip} hostname=${hostname}] +item +item hdd Local hdd +item mfsbsd mfsBSD sanboot make release +choose --timeout ${timeout} selected +goto ${selected} + +:mfsbsd +sanboot --drive 0x81 --no-describe http://${www}/mfsbsd.iso + +:hdd +sanboot --drive 0x80 --no-describe From owner-svn-soc-all@freebsd.org Thu Jul 2 13:47:18 2015 Return-Path: Delivered-To: svn-soc-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9465099367A for ; Thu, 2 Jul 2015 13:47:18 +0000 (UTC) (envelope-from mihai@FreeBSD.org) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 842DD2534 for ; Thu, 2 Jul 2015 13:47:18 +0000 (UTC) (envelope-from mihai@FreeBSD.org) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.9/8.14.9) with ESMTP id t62DlI8I073782 for ; Thu, 2 Jul 2015 13:47:18 GMT (envelope-from mihai@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.9/8.14.9/Submit) id t62DlFbo073759 for svn-soc-all@FreeBSD.org; Thu, 2 Jul 2015 13:47:15 GMT (envelope-from mihai@FreeBSD.org) Date: Thu, 2 Jul 2015 13:47:15 GMT Message-Id: <201507021347.t62DlFbo073759@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to mihai@FreeBSD.org using -f From: mihai@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r287842 - in soc2015/mihai/bhyve-on-arm-head/sys: arm/include arm/vmm modules/vmm-arm MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Jul 2015 13:47:18 -0000 Author: mihai Date: Thu Jul 2 13:47:14 2015 New Revision: 287842 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=287842 Log: soc2015: mihai: bhyve-on-arm: sys: arm: vmm: add memory management support - wired Added: soc2015/mihai/bhyve-on-arm-head/sys/arm/vmm/vmm_mem.c soc2015/mihai/bhyve-on-arm-head/sys/arm/vmm/vmm_mem.h Modified: soc2015/mihai/bhyve-on-arm-head/sys/arm/include/vmm.h soc2015/mihai/bhyve-on-arm-head/sys/arm/vmm/arm.c soc2015/mihai/bhyve-on-arm-head/sys/arm/vmm/mmu.c soc2015/mihai/bhyve-on-arm-head/sys/arm/vmm/mmu.h soc2015/mihai/bhyve-on-arm-head/sys/arm/vmm/vmm.c soc2015/mihai/bhyve-on-arm-head/sys/modules/vmm-arm/Makefile Modified: soc2015/mihai/bhyve-on-arm-head/sys/arm/include/vmm.h ============================================================================== --- soc2015/mihai/bhyve-on-arm-head/sys/arm/include/vmm.h Thu Jul 2 12:53:22 2015 (r287841) +++ soc2015/mihai/bhyve-on-arm-head/sys/arm/include/vmm.h Thu Jul 2 13:47:14 2015 (r287842) @@ -127,6 +127,11 @@ struct pmap *pmap, void *rendezvous_cookie, void *suspend_cookie); typedef void (*vmi_cleanup_func_t)(void *vmi); +typedef int (*vmi_mmap_set_func_t)(void *vmi, uint64_t gpa, + uint64_t hpa, size_t length, + int prot); +typedef uint64_t (*vmi_mmap_get_func_t)(void *vmi, uint64_t ipa); + typedef int (*vmi_get_register_t)(void *vmi, int vcpu, int num, uint64_t *retval); typedef int (*vmi_set_register_t)(void *vmi, int vcpu, int num, @@ -150,6 +155,8 @@ vmi_init_func_t vminit; /* vm-specific initialization */ vmi_run_func_t vmrun; vmi_cleanup_func_t vmcleanup; + vmi_mmap_set_func_t vmmapset; + vmi_mmap_get_func_t vmmapget; vmi_get_register_t vmgetreg; vmi_set_register_t vmsetreg; vmi_get_desc_t vmgetdesc; @@ -203,7 +210,7 @@ int vm_get_x2apic_state(struct vm *vm, int vcpu, enum x2apic_state *state); int vm_set_x2apic_state(struct vm *vm, int vcpu, enum x2apic_state state); int vm_apicid2vcpuid(struct vm *vm, int apicid); -int vm_activate_cpu(struct vm *vm, int vcpu); +void vm_activate_cpu(struct vm *vm, int vcpu); struct vm_exit *vm_exitinfo(struct vm *vm, int vcpuid); void vm_exit_suspended(struct vm *vm, int vcpuid, uint64_t rip); void vm_exit_rendezvous(struct vm *vm, int vcpuid, uint64_t rip); Modified: soc2015/mihai/bhyve-on-arm-head/sys/arm/vmm/arm.c ============================================================================== --- soc2015/mihai/bhyve-on-arm-head/sys/arm/vmm/arm.c Thu Jul 2 12:53:22 2015 (r287841) +++ soc2015/mihai/bhyve-on-arm-head/sys/arm/vmm/arm.c Thu Jul 2 13:47:14 2015 (r287842) @@ -259,6 +259,8 @@ arm_vminit, arm_vmrun, arm_vmcleanup, + lpae_vmmmap_set, + NULL, arm_getreg, arm_setreg, NULL, /* vmi_get_desc_t */ Modified: soc2015/mihai/bhyve-on-arm-head/sys/arm/vmm/mmu.c ============================================================================== --- soc2015/mihai/bhyve-on-arm-head/sys/arm/vmm/mmu.c Thu Jul 2 12:53:22 2015 (r287841) +++ soc2015/mihai/bhyve-on-arm-head/sys/arm/vmm/mmu.c Thu Jul 2 13:47:14 2015 (r287842) @@ -179,10 +179,10 @@ } } int lpae_vmmmap_set(void *arg, - lpae_vm_vaddr_t virt_start, - lpae_vm_paddr_t phys_start, + uint64_t virt_start, + uint64_t phys_start, size_t len, - vm_prot_t prot) + int prot) { size_t n; struct hyp *vm_hyp; Modified: soc2015/mihai/bhyve-on-arm-head/sys/arm/vmm/mmu.h ============================================================================== --- soc2015/mihai/bhyve-on-arm-head/sys/arm/vmm/mmu.h Thu Jul 2 12:53:22 2015 (r287841) +++ soc2015/mihai/bhyve-on-arm-head/sys/arm/vmm/mmu.h Thu Jul 2 13:47:14 2015 (r287842) @@ -5,13 +5,13 @@ typedef uint64_t lpae_pt_entry_t; /* LPAE page table entry */ typedef uint64_t lpae_vm_paddr_t; /* LPAE VM paddr */ -typedef uint32_t lpae_vm_vaddr_t; /* LPAE VM vaddr */ +typedef uint64_t lpae_vm_vaddr_t; /* LPAE VM vaddr */ int lpae_vmmmap_set(void *arg, - lpae_vm_vaddr_t virt_start, - lpae_vm_paddr_t phys_start, + uint64_t virt_start, + uint64_t phys_start, size_t len, - vm_prot_t prot); + int prot); void lpae_vmcleanup(void *arg); void dump_lpae_mapping(void *arg); Modified: soc2015/mihai/bhyve-on-arm-head/sys/arm/vmm/vmm.c ============================================================================== --- soc2015/mihai/bhyve-on-arm-head/sys/arm/vmm/vmm.c Thu Jul 2 12:53:22 2015 (r287841) +++ soc2015/mihai/bhyve-on-arm-head/sys/arm/vmm/vmm.c Thu Jul 2 13:47:14 2015 (r287842) @@ -33,27 +33,16 @@ #include #include "vmm_stat.h" +#include "vmm_mem.h" -/* - * Initialization: - * (a) allocated when vcpu is created - * (i) initialized when vcpu is created and when it is reinitialized - * (o) initialized the first time the vcpu is created - * (x) initialized before use - */ struct vcpu { - struct mtx mtx; /* (o) protects 'state' and 'hostcpu' */ - enum vcpu_state state; /* (o) vcpu state */ - int hostcpu; /* (o) vcpu's host cpu */ - uint64_t exitintinfo; /* (i) events pending at VM exit */ - int nmi_pending; /* (i) NMI pending */ - int extint_pending; /* (i) INTR pending */ - int exception_pending; /* (i) exception pending */ - int exc_vector; /* (x) exception collateral */ - int exc_errcode_valid; - uint32_t exc_errcode; - void *stats; /* (a,i) statistics */ - struct vm_exit exitinfo; /* (x) exit reason and collateral */ + int flags; + enum vcpu_state state; + struct mtx mtx; + int hostcpu; /* host cpuid this vcpu last ran on */ + int vcpuid; + void *stats; + struct vm_exit exitinfo; uint64_t nextrip; /* (x) next instruction to execute */ }; @@ -71,52 +60,39 @@ }; #define VM_MAX_MEMORY_SEGMENTS 2 -/* - * Initialization: - * (o) initialized the first time the VM is created - * (i) initialized when VM is created and when it is reinitialized - * (x) initialized before use - */ struct vm { - void *cookie; /* (i) cpu-specific data */ - void *iommu; /* (x) iommu-specific data */ - struct vhpet *vhpet; /* (i) virtual HPET */ - struct vioapic *vioapic; /* (i) virtual ioapic */ - struct vatpic *vatpic; /* (i) virtual atpic */ - struct vatpit *vatpit; /* (i) virtual atpit */ - struct vpmtmr *vpmtmr; /* (i) virtual ACPI PM timer */ - struct vrtc *vrtc; /* (o) virtual RTC */ - volatile cpuset_t active_cpus; /* (i) active vcpus */ - int suspend; /* (i) stop VM execution */ - volatile cpuset_t suspended_cpus; /* (i) suspended vcpus */ - volatile cpuset_t halted_cpus; /* (x) cpus in a hard halt */ - cpuset_t rendezvous_req_cpus; /* (x) rendezvous requested */ - cpuset_t rendezvous_done_cpus; /* (x) rendezvous finished */ - void *rendezvous_arg; /* (x) rendezvous func/arg */ - vm_rendezvous_func_t rendezvous_func; - struct mtx rendezvous_mtx; /* (o) rendezvous lock */ - int num_mem_segs; /* (o) guest memory segments */ - struct mem_seg mem_segs[VM_MAX_MEMORY_SEGMENTS]; - struct vmspace *vmspace; /* (o) guest's address space */ - char name[VM_MAX_NAMELEN]; /* (o) virtual machine name */ - struct vcpu vcpu[VM_MAXCPU]; /* (i) guest vcpus */ + void *cookie; /* processor-specific data */ + void *iommu; /* iommu-specific data */ + struct vcpu vcpu[VM_MAXCPU]; + int num_mem_segs; + struct vm_memory_segment mem_segs[VM_MAX_MEMORY_SEGMENTS]; + char name[VM_MAX_NAMELEN]; + + /* + * Set of active vcpus. + * An active vcpu is one that has been started implicitly (BSP) or + * explicitly (AP) by sending it a startup ipi. + */ + cpuset_t active_cpus; }; + static int vmm_initialized; static struct vmm_ops *ops; #define VMM_INIT(num) (ops != NULL ? (*ops->init)(num) : 0) #define VMM_CLEANUP() (ops != NULL ? (*ops->cleanup)() : 0) -#define VMM_RESUME() (ops != NULL ? (*ops->resume)() : 0) -#define VMINIT(vm, pmap) (ops != NULL ? (*ops->vminit)(vm, pmap): NULL) +#define VMINIT(vm) (ops != NULL ? (*ops->vminit)(vm, NULL): NULL) #define VMRUN(vmi, vcpu, rip, pmap, rptr, sptr) \ (ops != NULL ? (*ops->vmrun)(vmi, vcpu, rip, pmap, rptr, sptr) : ENXIO) #define VMCLEANUP(vmi) (ops != NULL ? (*ops->vmcleanup)(vmi) : NULL) -#define VMSPACE_ALLOC(min, max) \ - (ops != NULL ? (*ops->vmspace_alloc)(min, max) : NULL) -#define VMSPACE_FREE(vmspace) \ - (ops != NULL ? (*ops->vmspace_free)(vmspace) : ENXIO) +#define VMMMAP_SET(vmi, gpa, hpa, len, attr, prot, spm) \ + (ops != NULL ? \ + (*ops->vmmmap_set)(vmi, gpa, hpa, len, attr, prot, spm) : \ + ENXIO) +#define VMMMAP_GET(vmi, gpa) \ + (ops != NULL ? (*ops->vmmmap_get)(vmi, gpa) : ENXIO) #define VMGETREG(vmi, vcpu, num, retval) \ (ops != NULL ? (*ops->vmgetreg)(vmi, vcpu, num, retval) : ENXIO) #define VMSETREG(vmi, vcpu, num, val) \ @@ -129,10 +105,6 @@ (ops != NULL ? (*ops->vmgetcap)(vmi, vcpu, num, retval) : ENXIO) #define VMSETCAP(vmi, vcpu, num, val) \ (ops != NULL ? (*ops->vmsetcap)(vmi, vcpu, num, val) : ENXIO) -#define VLAPIC_INIT(vmi, vcpu) \ - (ops != NULL ? (*ops->vlapic_init)(vmi, vcpu) : NULL) -#define VLAPIC_CLEANUP(vmi, vlapic) \ - (ops != NULL ? (*ops->vlapic_cleanup)(vmi, vlapic) : NULL) #define fpu_start_emulating() load_cr0(rcr0() | CR0_TS) #define fpu_stop_emulating() clts() @@ -168,31 +140,16 @@ // struct vcpu *vcpu = &vm->vcpu[i]; } - static void -vcpu_init(struct vm *vm, int vcpu_id, bool create) +vcpu_init(struct vm *vm, uint32_t vcpu_id) { struct vcpu *vcpu; - - KASSERT(vcpu_id >= 0 && vcpu_id < VM_MAXCPU, - ("vcpu_init: invalid vcpu %d", vcpu_id)); - + vcpu = &vm->vcpu[vcpu_id]; - if (create) { - KASSERT(!vcpu_lock_initialized(vcpu), ("vcpu %d already " - "initialized", vcpu_id)); - vcpu_lock_init(vcpu); - vcpu->state = VCPU_IDLE; - vcpu->hostcpu = NOCPU; - } - -} - -static void -vmm_resume(void) -{ - VMM_RESUME(); + vcpu_lock_init(vcpu); + vcpu->hostcpu = NOCPU; + vcpu->vcpuid = vcpu_id; } static int @@ -248,28 +205,14 @@ DECLARE_MODULE(vmm, vmm_kmod, SI_SUB_SMP + 1, SI_ORDER_ANY); MODULE_VERSION(vmm, 1); -static void -vm_init(struct vm *vm, bool create) -{ - int i; - - vm->cookie = VMINIT(vm, vmspace_pmap(vm->vmspace)); - vm->iommu = NULL; - - CPU_ZERO(&vm->active_cpus); - - vm->suspend = 0; - CPU_ZERO(&vm->suspended_cpus); - - for (i = 0; i < VM_MAXCPU; i++) - vcpu_init(vm, i, create); -} - int vm_create(const char *name, struct vm **retvm) { + int i; struct vm *vm; - struct vmspace *vmspace; + vm_paddr_t maxaddr; + + const int BSP = 0; /* * If vmm.ko could not be successfully initialized then don't attempt @@ -281,32 +224,25 @@ if (name == NULL || strlen(name) >= VM_MAX_NAMELEN) return (EINVAL); - vmspace = VMSPACE_ALLOC(0, VM_MAXUSER_ADDRESS); - if (vmspace == NULL) - return (ENOMEM); - vm = malloc(sizeof(struct vm), M_VM, M_WAITOK | M_ZERO); strcpy(vm->name, name); - vm->num_mem_segs = 0; - vm->vmspace = vmspace; - mtx_init(&vm->rendezvous_mtx, "vm rendezvous lock", 0, MTX_DEF); + vm->cookie = VMINIT(vm); - vm_init(vm, true); + for (i = 0; i < VM_MAXCPU; i++) { + vcpu_init(vm, i); + } + + maxaddr = vmm_mem_maxaddr(); + vm_activate_cpu(vm, BSP); *retvm = vm; return (0); } - static void vm_cleanup(struct vm *vm, bool destroy) { VMCLEANUP(vm->cookie); - - if (destroy) { - VMSPACE_FREE(vm->vmspace); - vm->vmspace = NULL; - } } void @@ -316,25 +252,6 @@ free(vm, M_VM); } -int -vm_reinit(struct vm *vm) -{ - int error; - - /* - * A virtual machine can be reset only if all vcpus are suspended. - */ - if (CPU_CMP(&vm->suspended_cpus, &vm->active_cpus) == 0) { - vm_cleanup(vm, false); - vm_init(vm, false); - error = 0; - } else { - error = EBUSY; - } - - return (error); -} - const char * vm_name(struct vm *vm) { @@ -348,7 +265,6 @@ struct vcpu *vcpu; struct vm_exit *vme; bool retu; - pmap_t pmap; void *rptr = NULL, *sptr = NULL; vcpuid = vmrun->cpuid; @@ -359,19 +275,12 @@ if (!CPU_ISSET(vcpuid, &vm->active_cpus)) return (EINVAL); - if (CPU_ISSET(vcpuid, &vm->suspended_cpus)) - return (EINVAL); - - pmap = vmspace_pmap(vm->vmspace); vcpu = &vm->vcpu[vcpuid]; vme = &vcpu->exitinfo; restart: critical_enter(); - KASSERT(!CPU_ISSET(curcpu, &pmap->pm_active), - ("vm_run: absurd pm_active")); - - error = VMRUN(vm->cookie, vcpuid, vcpu->nextrip, pmap, rptr, sptr); + error = VMRUN(vm->cookie, vcpuid, vcpu->nextrip, NULL, rptr, sptr); critical_exit(); @@ -392,19 +301,19 @@ return (error); } - -cpuset_t -vm_active_cpus(struct vm *vm) +void +vm_activate_cpu(struct vm *vm, int vcpuid) { - return (vm->active_cpus); + if (vcpuid >= 0 && vcpuid < VM_MAXCPU) + CPU_SET(vcpuid, &vm->active_cpus); } cpuset_t -vm_suspended_cpus(struct vm *vm) +vm_active_cpus(struct vm *vm) { - return (vm->suspended_cpus); + return (vm->active_cpus); } void * Added: soc2015/mihai/bhyve-on-arm-head/sys/arm/vmm/vmm_mem.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ soc2015/mihai/bhyve-on-arm-head/sys/arm/vmm/vmm_mem.c Thu Jul 2 13:47:14 2015 (r287842) @@ -0,0 +1,135 @@ +/*- + * Copyright (c) 2011 NetApp, Inc. + * 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 NETAPP, INC ``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 NETAPP, INC 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: head/sys/amd64/vmm/vmm_mem.c 245678 2013-01-20 03:42:49Z neel $ + */ + +#include +__FBSDID("$FreeBSD: head/sys/amd64/vmm/vmm_mem.c 245678 2013-01-20 03:42:49Z neel $"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include + +#include "vmm_mem.h" + +SYSCTL_DECL(_hw_vmm); + +static u_long pages_allocated; +SYSCTL_ULONG(_hw_vmm, OID_AUTO, pages_allocated, CTLFLAG_RD, + &pages_allocated, 0, "4KB pages allocated"); + +static void +update_pages_allocated(int howmany) +{ + pages_allocated += howmany; /* XXX locking? */ +} + +int +vmm_mem_init(void) +{ + + return (0); +} + +vm_paddr_t +vmm_mem_alloc(size_t size) +{ + + int flags; + vm_page_t m; + vm_paddr_t pa; + + if (size != PAGE_SIZE) + panic("vmm_mem_alloc: invalid allocation size %zu", size); + + flags = VM_ALLOC_NORMAL | VM_ALLOC_NOOBJ | VM_ALLOC_WIRED | + VM_ALLOC_ZERO; + + while (1) { + /* + * XXX need policy to determine when to back off the allocation + */ + m = vm_page_alloc(NULL, 0, flags); + if (m == NULL) + VM_WAIT; + else + break; + } + + pa = VM_PAGE_TO_PHYS(m); + +// if ((m->flags & PG_ZERO) == 0) +// pagezero((void *)PHYS_TO_DMAP(pa)); + + m->valid = VM_PAGE_BITS_ALL; + update_pages_allocated(1); + + return (pa); +} + +void +vmm_mem_free(vm_paddr_t base, size_t length) +{ + vm_page_t m; + + if (base & PAGE_MASK) { + panic("vmm_mem_free: base 0x%0x must be aligned on a " + "0x%0x boundary\n", base, PAGE_SIZE); + } + + if (length != PAGE_SIZE) + panic("vmm_mem_free: invalid length %zu", length); + + m = PHYS_TO_VM_PAGE(base); + m->wire_count--; + vm_page_free(m); + atomic_subtract_int(&vm_cnt.v_wire_count, 1); + + update_pages_allocated(-1); +} + +vm_paddr_t +vmm_mem_maxaddr(void) +{ + + return (ptoa(Maxmem)); +} Added: soc2015/mihai/bhyve-on-arm-head/sys/arm/vmm/vmm_mem.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ soc2015/mihai/bhyve-on-arm-head/sys/arm/vmm/vmm_mem.h Thu Jul 2 13:47:14 2015 (r287842) @@ -0,0 +1,37 @@ +/*- + * Copyright (c) 2011 NetApp, Inc. + * 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 NETAPP, INC ``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 NETAPP, INC 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: head/sys/amd64/vmm/vmm_mem.h 245678 2013-01-20 03:42:49Z neel $ + */ + +#ifndef _VMM_MEM_H_ +#define _VMM_MEM_H_ + +int vmm_mem_init(void); +vm_paddr_t vmm_mem_alloc(size_t size); +void vmm_mem_free(vm_paddr_t start, size_t size); +vm_paddr_t vmm_mem_maxaddr(void); + +#endif Modified: soc2015/mihai/bhyve-on-arm-head/sys/modules/vmm-arm/Makefile ============================================================================== --- soc2015/mihai/bhyve-on-arm-head/sys/modules/vmm-arm/Makefile Thu Jul 2 12:53:22 2015 (r287841) +++ soc2015/mihai/bhyve-on-arm-head/sys/modules/vmm-arm/Makefile Thu Jul 2 13:47:14 2015 (r287842) @@ -11,6 +11,7 @@ .PATH: ${.CURDIR}/../../arm/vmm SRCS+= vmm.c \ vmm_dev.c \ + vmm_mem.c \ mmu.c \ vmm_stat.c \ arm.c \ From owner-svn-soc-all@freebsd.org Thu Jul 2 16:18:35 2015 Return-Path: Delivered-To: svn-soc-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8751B993599 for ; Thu, 2 Jul 2015 16:18:35 +0000 (UTC) (envelope-from clord@FreeBSD.org) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 785AB1634 for ; Thu, 2 Jul 2015 16:18:35 +0000 (UTC) (envelope-from clord@FreeBSD.org) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.9/8.14.9) with ESMTP id t62GIZqI022181 for ; Thu, 2 Jul 2015 16:18:35 GMT (envelope-from clord@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.9/8.14.9/Submit) id t62GIYpI022179 for svn-soc-all@FreeBSD.org; Thu, 2 Jul 2015 16:18:34 GMT (envelope-from clord@FreeBSD.org) Date: Thu, 2 Jul 2015 16:18:34 GMT Message-Id: <201507021618.t62GIYpI022179@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to clord@FreeBSD.org using -f From: clord@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r287860 - soc2015/clord/head/sys/contrib/ficl MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Jul 2015 16:18:35 -0000 Author: clord Date: Thu Jul 2 16:18:34 2015 New Revision: 287860 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=287860 Log: Use Ficl in compatibility mode at first Modified: soc2015/clord/head/sys/contrib/ficl/ficllocal.h Modified: soc2015/clord/head/sys/contrib/ficl/ficllocal.h ============================================================================== --- soc2015/clord/head/sys/contrib/ficl/ficllocal.h Thu Jul 2 15:26:40 2015 (r287859) +++ soc2015/clord/head/sys/contrib/ficl/ficllocal.h Thu Jul 2 16:18:34 2015 (r287860) @@ -5,4 +5,4 @@ ** */ - +#define FICL_WANT_COMPATIBILITY (1) From owner-svn-soc-all@freebsd.org Thu Jul 2 16:18:59 2015 Return-Path: Delivered-To: svn-soc-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 18BC49935AB for ; Thu, 2 Jul 2015 16:18:59 +0000 (UTC) (envelope-from clord@FreeBSD.org) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 09D981658 for ; Thu, 2 Jul 2015 16:18:59 +0000 (UTC) (envelope-from clord@FreeBSD.org) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.9/8.14.9) with ESMTP id t62GIwCZ022468 for ; Thu, 2 Jul 2015 16:18:58 GMT (envelope-from clord@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.9/8.14.9/Submit) id t62GIwAF022467 for svn-soc-all@FreeBSD.org; Thu, 2 Jul 2015 16:18:58 GMT (envelope-from clord@FreeBSD.org) Date: Thu, 2 Jul 2015 16:18:58 GMT Message-Id: <201507021618.t62GIwAF022467@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to clord@FreeBSD.org using -f From: clord@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r287861 - in soc2015/clord/head/sys/contrib/ficl: . contrib ficlplatform softcore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Jul 2015 16:18:59 -0000 Author: clord Date: Thu Jul 2 16:18:58 2015 New Revision: 287861 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=287861 Log: Remove unnecessary Ficl source files Deleted: soc2015/clord/head/sys/contrib/ficl/contrib/ soc2015/clord/head/sys/contrib/ficl/ficldll.def soc2015/clord/head/sys/contrib/ficl/ficldll.dsp soc2015/clord/head/sys/contrib/ficl/ficlexe.dsp soc2015/clord/head/sys/contrib/ficl/ficllib.dsp soc2015/clord/head/sys/contrib/ficl/ficlplatform/ansi.c soc2015/clord/head/sys/contrib/ficl/ficlplatform/ansi.h soc2015/clord/head/sys/contrib/ficl/ficlplatform/win32.c soc2015/clord/head/sys/contrib/ficl/ficlplatform/win32.h soc2015/clord/head/sys/contrib/ficl/softcore/make.bat From owner-svn-soc-all@freebsd.org Thu Jul 2 20:05:42 2015 Return-Path: Delivered-To: svn-soc-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0FDBA993DDD for ; Thu, 2 Jul 2015 20:05:42 +0000 (UTC) (envelope-from clord@FreeBSD.org) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E86D61EF2 for ; Thu, 2 Jul 2015 20:05:41 +0000 (UTC) (envelope-from clord@FreeBSD.org) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.9/8.14.9) with ESMTP id t62K5f91074357 for ; Thu, 2 Jul 2015 20:05:41 GMT (envelope-from clord@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.9/8.14.9/Submit) id t62K5d0L074311 for svn-soc-all@FreeBSD.org; Thu, 2 Jul 2015 20:05:39 GMT (envelope-from clord@FreeBSD.org) Date: Thu, 2 Jul 2015 20:05:39 GMT Message-Id: <201507022005.t62K5d0L074311@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to clord@FreeBSD.org using -f From: clord@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r287874 - soc2015/clord/head/sys/contrib/ficl MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Jul 2015 20:05:42 -0000 Author: clord Date: Thu Jul 2 20:05:39 2015 New Revision: 287874 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=287874 Log: Apply patches to Ficl soruce from the existing Ficl port Modified: soc2015/clord/head/sys/contrib/ficl/dictionary.c soc2015/clord/head/sys/contrib/ficl/ficl.h soc2015/clord/head/sys/contrib/ficl/float.c soc2015/clord/head/sys/contrib/ficl/primitives.c soc2015/clord/head/sys/contrib/ficl/tools.c Modified: soc2015/clord/head/sys/contrib/ficl/dictionary.c ============================================================================== --- soc2015/clord/head/sys/contrib/ficl/dictionary.c Thu Jul 2 19:41:08 2015 (r287873) +++ soc2015/clord/head/sys/contrib/ficl/dictionary.c Thu Jul 2 20:05:39 2015 (r287874) @@ -662,7 +662,7 @@ *trace++ = '>'; else *trace++ = ' '; - trace += sprintf(trace, "%3d ", cell - param0); + trace += sprintf(trace, "%3ld ", (long)(cell - param0)); if (ficlDictionaryIsAWord(dictionary, word)) { @@ -676,7 +676,7 @@ break; case FICL_WORDKIND_INSTRUCTION_WITH_ARGUMENT: c = *++cell; - sprintf(trace, "%s (instruction %ld), with argument %ld (%#lx)", ficlDictionaryInstructionNames[(long)word], (long)word, c.i, c.u); + sprintf(trace, "%s (instruction %ld), with argument %ld (%#lx)", ficlDictionaryInstructionNames[(long)word], (long)word, (long)c.i, (long unsigned)c.u); break; case FICL_WORDKIND_INSTRUCTION_WORD: sprintf(trace, "%s :: executes %s (instruction word %ld)", word->name, ficlDictionaryInstructionNames[(long)word->code], (long)word->code); @@ -687,20 +687,20 @@ { ficlWord *word = (ficlWord *)c.p; sprintf(trace, "%.*s ( %#lx literal )", - word->length, word->name, c.u); + word->length, word->name, (long unsigned)c.u); } else - sprintf(trace, "literal %ld (%#lx)", c.i, c.u); + sprintf(trace, "literal %ld (%#lx)", (long)c.i, (long unsigned)c.u); break; case FICL_WORDKIND_2LITERAL: c = *++cell; c2 = *++cell; - sprintf(trace, "2literal %d %d (%#lx %#lx)", c2.i, c.i, c2.u, c.u); + sprintf(trace, "2literal %ld %ld (%#lx %#lx)", (long)c2.i, (long)c.i, (long unsigned)c2.u, (long unsigned)c.u); break; #if FICL_WANT_FLOAT case FICL_WORDKIND_FLITERAL: c = *++cell; - sprintf(trace, "fliteral %f (%#lx)", c.f, c.u); + sprintf(trace, "fliteral %f (%#lx)", (double)c.f, (long unsigned)c.u); break; #endif /* FICL_WANT_FLOAT */ case FICL_WORDKIND_STRING_LITERAL: @@ -719,32 +719,32 @@ break; case FICL_WORDKIND_BRANCH0: c = *++cell; - sprintf(trace, "branch0 %d", cell + c.i - param0); + sprintf(trace, "branch0 %ld", (long)(cell + c.i - param0)); break; case FICL_WORDKIND_BRANCH: c = *++cell; - sprintf(trace, "branch %d", cell + c.i - param0); + sprintf(trace, "branch %ld", (long)(cell + c.i - param0)); break; case FICL_WORDKIND_QDO: c = *++cell; - sprintf(trace, "?do (leave %d)", (ficlCell *)c.p - param0); + sprintf(trace, "?do (leave %ld)", (long)((ficlCell *)c.p - param0)); break; case FICL_WORDKIND_DO: c = *++cell; - sprintf(trace, "do (leave %d)", (ficlCell *)c.p - param0); + sprintf(trace, "do (leave %ld)", (long)((ficlCell *)c.p - param0)); break; case FICL_WORDKIND_LOOP: c = *++cell; - sprintf(trace, "loop (branch %d)", cell + c.i - param0); + sprintf(trace, "loop (branch %ld)", (long)(cell + c.i - param0)); break; case FICL_WORDKIND_OF: c = *++cell; - sprintf(trace, "of (branch %d)", cell + c.i - param0); + sprintf(trace, "of (branch %ld)", (long)(cell + c.i - param0)); break; case FICL_WORDKIND_PLOOP: c = *++cell; - sprintf(trace, "+loop (branch %d)", cell + c.i - param0); + sprintf(trace, "+loop (branch %ld)", (long)(cell + c.i - param0)); break; default: sprintf(trace, "%.*s", word->length, word->name); @@ -754,7 +754,7 @@ } else /* probably not a word - punt and print value */ { - sprintf(trace, "%ld ( %#lx )", cell->i, cell->u); + sprintf(trace, "%ld ( %#lx )", (long)cell->i, (long unsigned)cell->u); } ficlCallbackTextOut(callback, buffer); Modified: soc2015/clord/head/sys/contrib/ficl/ficl.h ============================================================================== --- soc2015/clord/head/sys/contrib/ficl/ficl.h Thu Jul 2 19:41:08 2015 (r287873) +++ soc2015/clord/head/sys/contrib/ficl/ficl.h Thu Jul 2 20:05:39 2015 (r287874) @@ -165,6 +165,8 @@ #include "ficlplatform/ansi.h" #elif defined(_WIN32) #include "ficlplatform/win32.h" +#elif defined (FREEBSD) + #include "ficlplatform/unix.h" #elif defined (FREEBSD_ALPHA) #include "ficlplatform/alpha.h" #elif defined(unix) || defined(__unix__) || defined(__unix) Modified: soc2015/clord/head/sys/contrib/ficl/float.c ============================================================================== --- soc2015/clord/head/sys/contrib/ficl/float.c Thu Jul 2 19:41:08 2015 (r287873) +++ soc2015/clord/head/sys/contrib/ficl/float.c Thu Jul 2 20:05:39 2015 (r287874) @@ -161,7 +161,7 @@ { struct stackContext *context = (struct stackContext *)c; char buffer[64]; - sprintf(buffer, "[0x%08x %3d] %16f (0x%08x)\n", cell, context->count++, (double)(cell->f), cell->i); + sprintf(buffer, "[0x%08lx %3d] %16f (0x%08lx)\n", (long unsigned)cell, context->count++, (double)(cell->f), (long)cell->i); ficlVmTextOut(context->vm, buffer); return FICL_TRUE; } Modified: soc2015/clord/head/sys/contrib/ficl/primitives.c ============================================================================== --- soc2015/clord/head/sys/contrib/ficl/primitives.c Thu Jul 2 19:41:08 2015 (r287873) +++ soc2015/clord/head/sys/contrib/ficl/primitives.c Thu Jul 2 20:05:39 2015 (r287874) @@ -487,7 +487,7 @@ ficlStackPushPointer(vm->dataStack, bufferStart); ficlStackPushInteger(vm->dataStack, buffer - bufferStart); - ficlStackPushInteger(vm->dataStack, append && FICL_TRUE); + ficlStackPushInteger(vm->dataStack, FICL_BOOL(!append)); } @@ -1350,7 +1350,7 @@ static void ficlPrimitiveIsObject(ficlVm *vm) { - int flag; + ficlInteger flag; ficlWord *word = (ficlWord *)ficlStackPopPointer(vm->dataStack); flag = ((word != NULL) && (word->flags & FICL_WORD_OBJECT)) ? FICL_TRUE : FICL_FALSE; Modified: soc2015/clord/head/sys/contrib/ficl/tools.c ============================================================================== --- soc2015/clord/head/sys/contrib/ficl/tools.c Thu Jul 2 19:41:08 2015 (r287873) +++ soc2015/clord/head/sys/contrib/ficl/tools.c Thu Jul 2 20:05:39 2015 (r287874) @@ -242,24 +242,24 @@ break; case FICL_WORDKIND_VARIABLE: - sprintf(vm->pad, "variable = %ld (%#lx)\n", word->param->i, word->param->u); + sprintf(vm->pad, "variable = %ld (%#lx)\n", (long)word->param->i, (long unsigned)word->param->u); ficlVmTextOut(vm, vm->pad); break; #if FICL_WANT_USER case FICL_WORDKIND_USER: - sprintf(vm->pad, "user variable %ld (%#lx)\n", word->param->i, word->param->u); + sprintf(vm->pad, "user variable %ld (%#lx)\n", (long)word->param->i, (long unsigned)word->param->u); ficlVmTextOut(vm, vm->pad); break; #endif case FICL_WORDKIND_CONSTANT: - sprintf(vm->pad, "constant = %ld (%#lx)\n", word->param->i, word->param->u); + sprintf(vm->pad, "constant = %ld (%#lx)\n", (long)word->param->i, (long unsigned)word->param->u); ficlVmTextOut(vm, vm->pad); break; case FICL_WORDKIND_2CONSTANT: - sprintf(vm->pad, "constant = %ld %ld (%#lx %#lx)\n", word->param[1].i, word->param->i, word->param[1].u, word->param->u); + sprintf(vm->pad, "constant = %ld %ld (%#lx %#lx)\n", (long)word->param[1].i, (long)word->param->i, (long unsigned)word->param[1].u, (long unsigned)word->param->u); ficlVmTextOut(vm, vm->pad); break; @@ -573,7 +573,7 @@ { struct stackContext *context = (struct stackContext *)c; char buffer[64]; - sprintf(buffer, "[0x%08x %3d]: %12d (0x%08x)\n", cell, context->count++, cell->i, cell->i); + sprintf(buffer, "[0x%08lx %3d]: %12ld (0x%08lx)\n", (long unsigned)cell, context->count++, (long)cell->i, (long unsigned)cell->u); /* Did it should be cell->i, not cell->u? */ ficlVmTextOut(context->vm, buffer); return FICL_TRUE; } @@ -586,7 +586,7 @@ FICL_STACK_CHECK(stack, 0, 0); - sprintf(buffer, "[%s stack has %d entries, top at 0x%08x]\n", stack->name, ficlStackDepth(stack), stack->top); + sprintf(buffer, "[%s stack has %d entries, top at 0x%08lx]\n", stack->name, ficlStackDepth(stack), (long unsigned)stack->top); ficlVmTextOut(vm, buffer); if (callback == NULL) @@ -598,7 +598,7 @@ } ficlStackWalk(stack, callback, context, FICL_FALSE); - sprintf(buffer, "[%s stack base at 0x%08x]\n", stack->name, stack->base); + sprintf(buffer, "[%s stack base at 0x%08lx]\n", stack->name, (long unsigned)stack->base); ficlVmTextOut(vm, buffer); return; @@ -618,7 +618,7 @@ { struct stackContext *context = (struct stackContext *)c; char buffer[32]; - sprintf(buffer, "%s%d", context->count ? " " : "", cell->i); + sprintf(buffer, "%s%ld", context->count ? " " : "", (long)cell->i); context->count++; ficlVmTextOut(context->vm, buffer); return FICL_TRUE; @@ -650,7 +650,7 @@ struct stackContext *context = (struct stackContext *)c; char buffer[128]; - sprintf(buffer, "[0x%08x %3d] %12d (0x%08x)", cell, context->count++, cell->i, cell->i); + sprintf(buffer, "[0x%08lx %3d] %12ld (0x%08lx)", (long unsigned)cell, context->count++, (long)cell->i, (long unsigned)cell->u); /* Did it should be cell->i, not cell->u? */ /* ** Attempt to find the word that contains the return From owner-svn-soc-all@freebsd.org Fri Jul 3 08:55:01 2015 Return-Path: Delivered-To: svn-soc-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C4D20993BFF for ; Fri, 3 Jul 2015 08:55:01 +0000 (UTC) (envelope-from btw@FreeBSD.org) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B618D2B67 for ; Fri, 3 Jul 2015 08:55:01 +0000 (UTC) (envelope-from btw@FreeBSD.org) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.9/8.14.9) with ESMTP id t638t1L4069571 for ; Fri, 3 Jul 2015 08:55:01 GMT (envelope-from btw@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.9/8.14.9/Submit) id t638t1n1069559 for svn-soc-all@FreeBSD.org; Fri, 3 Jul 2015 08:55:01 GMT (envelope-from btw@FreeBSD.org) Date: Fri, 3 Jul 2015 08:55:01 GMT Message-Id: <201507030855.t638t1n1069559@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to btw@FreeBSD.org using -f From: btw@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r287899 - soc2015/btw/head/sys/amd64/conf MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Jul 2015 08:55:01 -0000 Author: btw Date: Fri Jul 3 08:55:00 2015 New Revision: 287899 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=287899 Log: Enable the virtio drivers in CUSTOM. Modified: soc2015/btw/head/sys/amd64/conf/CUSTOM Modified: soc2015/btw/head/sys/amd64/conf/CUSTOM ============================================================================== --- soc2015/btw/head/sys/amd64/conf/CUSTOM Fri Jul 3 07:00:24 2015 (r287898) +++ soc2015/btw/head/sys/amd64/conf/CUSTOM Fri Jul 3 08:55:00 2015 (r287899) @@ -332,13 +332,13 @@ # device mmcsd # MMC/SD memory card # device sdhci # Generic PCI SD Host Controller # -# # VirtIO support -# device virtio # Generic VirtIO bus (required) -# device virtio_pci # VirtIO PCI device -# device vtnet # VirtIO Ethernet device -# device virtio_blk # VirtIO Block device -# device virtio_scsi # VirtIO SCSI device -# device virtio_balloon # VirtIO Memory Balloon device +# VirtIO support +device virtio # Generic VirtIO bus (required) +device virtio_pci # VirtIO PCI device +device vtnet # VirtIO Ethernet device +device virtio_blk # VirtIO Block device +device virtio_scsi # VirtIO SCSI device +device virtio_balloon # VirtIO Memory Balloon device # # # HyperV drivers and enchancement support # # NOTE: HYPERV depends on hyperv. They must be added or removed together. From owner-svn-soc-all@freebsd.org Fri Jul 3 21:42:01 2015 Return-Path: Delivered-To: svn-soc-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 85447994107 for ; Fri, 3 Jul 2015 21:42:01 +0000 (UTC) (envelope-from clord@FreeBSD.org) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 765772CDB for ; Fri, 3 Jul 2015 21:42:01 +0000 (UTC) (envelope-from clord@FreeBSD.org) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.9/8.14.9) with ESMTP id t63Lg1mX061567 for ; Fri, 3 Jul 2015 21:42:01 GMT (envelope-from clord@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.9/8.14.9/Submit) id t63Lg0IQ061357 for svn-soc-all@FreeBSD.org; Fri, 3 Jul 2015 21:42:00 GMT (envelope-from clord@FreeBSD.org) Date: Fri, 3 Jul 2015 21:42:00 GMT Message-Id: <201507032142.t63Lg0IQ061357@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to clord@FreeBSD.org using -f From: clord@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r287929 - soc2015/clord/head/sys/boot/ficl MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Jul 2015 21:42:01 -0000 Author: clord Date: Fri Jul 3 21:42:00 2015 New Revision: 287929 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=287929 Log: Begin Makefile modifications for building Ficl 4 Modified: soc2015/clord/head/sys/boot/ficl/Makefile Modified: soc2015/clord/head/sys/boot/ficl/Makefile ============================================================================== --- soc2015/clord/head/sys/boot/ficl/Makefile Fri Jul 3 20:43:31 2015 (r287928) +++ soc2015/clord/head/sys/boot/ficl/Makefile Fri Jul 3 21:42:00 2015 (r287929) @@ -10,11 +10,12 @@ .else .PATH: ${FICLDIR}/${MACHINE_CPUARCH} .endif -BASE_SRCS= dict.c ficl.c fileaccess.c float.c loader.c math64.c \ - prefix.c search.c stack.c tools.c vm.c words.c +BASE_SRCS= dictionary.c system.c fileaccess.c float.c double.c prefix.c \ + search.c stack.c tools.c vm.c primitives.c bit.c \ + lzuncompress.c utility.c hash.c callback.c word.c extras.c loader.c SRCS= ${BASE_SRCS} sysdep.c softcore.c -CLEANFILES= softcore.c testmain testmain.o +CLEANFILES= softcore.c main main.o CFLAGS+= -ffreestanding .if ${MACHINE_CPUARCH} == "i386" || \ (${MACHINE_CPUARCH} == "amd64" && defined(FICL32)) @@ -41,7 +42,7 @@ .endif .ifmake testmain CFLAGS+= -DTESTMAIN -D_TESTMAIN -SRCS+= testmain.c +SRCS+= main.c PROG= testmain .include .else @@ -51,7 +52,7 @@ .endif # Standard softwords -.PATH: ${FICLDIR}/softwords +.PATH: ${FICLDIR}/softcore SOFTWORDS= softcore.fr jhlocal.fr marker.fr freebsd.fr ficllocal.fr \ ifbrack.fr # Optional OO extension softwords From owner-svn-soc-all@freebsd.org Fri Jul 3 21:47:37 2015 Return-Path: Delivered-To: svn-soc-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B2CDE9941EC for ; Fri, 3 Jul 2015 21:47:37 +0000 (UTC) (envelope-from clord@FreeBSD.org) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A41671058 for ; Fri, 3 Jul 2015 21:47:37 +0000 (UTC) (envelope-from clord@FreeBSD.org) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.9/8.14.9) with ESMTP id t63LlbG3065401 for ; Fri, 3 Jul 2015 21:47:37 GMT (envelope-from clord@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.9/8.14.9/Submit) id t63LlbaU065393 for svn-soc-all@FreeBSD.org; Fri, 3 Jul 2015 21:47:37 GMT (envelope-from clord@FreeBSD.org) Date: Fri, 3 Jul 2015 21:47:37 GMT Message-Id: <201507032147.t63LlbaU065393@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to clord@FreeBSD.org using -f From: clord@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r287930 - soc2015/clord/head/sys/contrib/ficl MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Jul 2015 21:47:37 -0000 Author: clord Date: Fri Jul 3 21:47:36 2015 New Revision: 287930 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=287930 Log: Include ficlcompatibility.h a little sooner so to avoid problem of compiler not seeing FICL_VM as a valid type. Also delete an extra #endif conditional directive. Modified: soc2015/clord/head/sys/contrib/ficl/ficl.h Modified: soc2015/clord/head/sys/contrib/ficl/ficl.h ============================================================================== --- soc2015/clord/head/sys/contrib/ficl/ficl.h Fri Jul 3 21:42:00 2015 (r287929) +++ soc2015/clord/head/sys/contrib/ficl/ficl.h Fri Jul 3 21:47:36 2015 (r287930) @@ -1622,6 +1622,9 @@ #define ficlSystemGetContext(system) ((system)->context) +#if FICL_WANT_COMPATIBILITY + #include "ficlcompatibility.h" +#endif /* FICL_WANT_COMPATIBILITY */ /* ** External interface to Ficl... @@ -1809,7 +1812,6 @@ FILE *f; char filename[256]; } ficlFile; -#endif #if defined (FICL_PLATFORM_HAS_FTRUNCATE) @@ -1871,11 +1873,6 @@ -#if FICL_WANT_COMPATIBILITY - #include "ficlcompatibility.h" -#endif /* FICL_WANT_COMPATIBILITY */ - - #ifdef __cplusplus } #endif