Fix by hand files that aren't added automatically by svn.

BIG SUCKAGE!
This commit is contained in:
Attilio Rao 2011-05-09 22:13:07 +00:00
parent bd55ede060
commit eb469fd404
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/projects/largeSMP/; revision=221716
13 changed files with 485 additions and 0 deletions

179
share/man/man4/geom_map.4 Normal file
View File

@ -0,0 +1,179 @@
.\"
.\" Copyright (c) 2011 Aleksandr Rybalko
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $FreeBSD$
.\"
.Dd April 5, 2011
.Dt GEOM_MAP 4
.Os
.Sh NAME
.Nm geom_map
.Nd "GEOM module that map difined items as separate partitions"
.Sh SYNOPSIS
To compile this driver into the kernel,
place the following line in your
kernel configuration file:
.Bd -ragged -offset indent
.Cd "device geom_map"
.Ed
.Sh DESCRIPTION
The
.Nm
framework provides support for mapping defined parts of the media. Basicaly it
is helpful in the embedded devices where in the one continous flash are loader,
kernel and rootfs parts. The
.Nm
allows making them available as separate parts and protect loader from
overwriting.
.Pp
At boot time
.Nm
partitions listed (only with bootverbose) as:
.Bd -literal -offset indent
MAP: 0x30000, data=0x30000 "/dev/map/bootloader"
MAP: 30000x10000, data=0x10000 "/dev/map/factory"
MAP: 40000x7a0000, data=0x7a0000 "/dev/map/upgrade"
MAP: search key ".!/bin/sh" from 0x100000, step 0x10000
MAP: 40000x110000, data=0x110000 "/dev/map/kernel"
MAP: search key ".!/bin/sh" from 0x100000, step 0x10000
MAP: 150000x690000, data=0x690000 "/dev/map/rootfs"
MAP: 7e0000x20000, data=0x20000 "/dev/map/config"
.Ed
.Pp
Also
.Nm
current configuration can be accessible with sysctl's kern.geom.conftxt,
kern.geom.confxml, kern.geom.confdot or geom map list.
.Bd -literal -offset indent
# sysctl kern.geom.conftxt
kern.geom.conftxt: 0 MD md0 10485760 512 u 0 s 512 f 0 fs 0 l 10485760 t malloc
0 DISK cfid0 8388608 4 hd 0 sc 0
1 MAP map/config 131072 4 i 5 o 8257536 entry 0 dsize 131072
1 MAP map/rootfs 6881280 4 i 4 o 1376256 entry 0 dsize 6881280
2 UNCOMPRESS map/rootfs.uncompress 18677760 512
1 MAP map/kernel 1114112 4 i 3 o 262144 entry 0 dsize 1114112
1 MAP map/upgrade 7995392 4 i 2 o 262144 entry 0 dsize 7995392
1 MAP map/factory 65536 4 i 1 o 196608 entry 0 dsize 65536
1 MAP map/bootloader 196608 4 i 0 o 0 entry 0 dsize 196608
.Ed
.Pp
Driver configuration can be done in device hints file. List of used parameters:
.Bl -tag -width indent
.It Fa at
select media to attach
.It Fa name
name of partiton (will create device /dev/map/that_name)
.It Fa start
offset from the beginning of the parent media to start of the mapped partition.
This field can also have special value
"search:searchstart:searchstep:searchkey", where:
.Bl -tag -width indent
.It Fa searchstart
offset from the beginning of the parent media where search will be started
.It Fa searchstep
value of the increment used while searching for the partition boundary markers
.It Fa searchkey
key which will be used to find partition boundary markers. Wildcard "." char
can be used to match any char on that position
.El
.It Fa end
offset from the beginning of the parent media to end of the mapped partition.
This field can also have special value
"search:searchstart:searchstep:searchkey", look "start" for details.
.It Fa offset
offset where the data of mapped partition begins
.El
.Pp
Each record contains start address(bytes) from the media begin, size(bytes),
offset where the data of mapped partition begins, and the name of new device.
.Bd -literal -offset indent
MAP: 150000x690000, data=0x690000 "/dev/map/rootfs"
.Ed
.Bd -literal
00150000 - begin address
00690000 - size
00000000 - data begin from zero offset
00690000 - data size
"map/rootfs" - new media will be accessible via /dev/map/rootfs dev.
.Ed
.Sh EXAMPLES
.Pp
.Bl -bullet -compact
If we need to implement layout shown above, we need to define the folowing
hints:
.Bd -literal -offset indent
hint.map.0.at="cfid0"
hint.map.0.start=0x00000000
hint.map.0.end=0x00030000
hint.map.0.name="bootloader"
hint.map.0.readonly=1
.Ed
define "/dev/map/bootloader" at disk "cfid0" starting at 0x00000000 and end
0x00030000, also marked as readonly.
.Bd -literal -offset indent
hint.map.1.at="cfid0"
hint.map.1.start=0x00030000
hint.map.1.end=0x00040000
hint.map.1.name="factory"
hint.map.2.at="cfid0"
hint.map.2.start=0x00040000
hint.map.2.end=0x007e0000
hint.map.2.name="upgrade"
hint.map.3.at="cfid0"
hint.map.3.name="kernel"
hint.map.3.start=0x00040000
hint.map.3.end="search:0x00100000:0x10000:.!/bin/sh"
.Ed
define "/dev/map/kernel" at disk "cfid0" starting at 0x00040000, but end
position must be searched by the key ".!/bin/sh", from offset 0x00100000 to end
of media with step 0x10000. Real marker in that case is "#!/bin/sh", but "#"
terminates the line when hints file is parsed, so we need to use wildcard "."
instead of "#".
.Bd -literal -offset indent
hint.map.4.at="cfid0"
hint.map.4.name="rootfs"
hint.map.4.start="search:0x00100000:0x10000:.!/bin/sh"
hint.map.4.end=0x007e0000
hint.map.5.at="cfid0"
hint.map.5.start=0x007e0000
hint.map.5.end=0x00800000
hint.map.5.name="config"
.Ed
.El
.Sh SEE ALSO
.Xr GEOM 4 ,
.Xr geom 8 ,
.Xr sysctl 8
.Sh AUTHORS
.An -nosplit
The
.Nm
driver was written by
.An "Aleksandr Rybalko" Aq ray@ddteam.net .

120
sys/nfs/nfs_kdtrace.h Normal file
View File

@ -0,0 +1,120 @@
/*-
* Copyright (c) 2009 Robert N. M. Watson
* All rights reserved.
*
* This software was developed at the University of Cambridge Computer
* Laboratory with support from a grant from Google, Inc.
*
* 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$
*/
#ifndef _NFSCLIENT_NFS_KDTRACE_H_
#define _NFSCLIENT_NFS_KDTRACE_H_
#ifdef KDTRACE_HOOKS
#include <sys/dtrace_bsd.h>
/*
* Definitions for NFS access cache probes.
*/
extern uint32_t nfsclient_accesscache_flush_done_id;
extern uint32_t nfsclient_accesscache_get_hit_id;
extern uint32_t nfsclient_accesscache_get_miss_id;
extern uint32_t nfsclient_accesscache_load_done_id;
#define KDTRACE_NFS_ACCESSCACHE_FLUSH_DONE(vp) do { \
if (dtrace_nfsclient_accesscache_flush_done_probe != NULL) \
(dtrace_nfsclient_accesscache_flush_done_probe)( \
nfsclient_accesscache_flush_done_id, (vp)); \
} while (0)
#define KDTRACE_NFS_ACCESSCACHE_GET_HIT(vp, uid, mode) do { \
if (dtrace_nfsclient_accesscache_get_hit_probe != NULL) \
(dtrace_nfsclient_accesscache_get_hit_probe)( \
nfsclient_accesscache_get_hit_id, (vp), (uid), \
(mode)); \
} while (0)
#define KDTRACE_NFS_ACCESSCACHE_GET_MISS(vp, uid, mode) do { \
if (dtrace_nfsclient_accesscache_get_miss_probe != NULL) \
(dtrace_nfsclient_accesscache_get_miss_probe)( \
nfsclient_accesscache_get_miss_id, (vp), (uid), \
(mode)); \
} while (0)
#define KDTRACE_NFS_ACCESSCACHE_LOAD_DONE(vp, uid, rmode, error) do { \
if (dtrace_nfsclient_accesscache_load_done_probe != NULL) \
(dtrace_nfsclient_accesscache_load_done_probe)( \
nfsclient_accesscache_load_done_id, (vp), (uid), \
(rmode), (error)); \
} while (0)
/*
* Definitions for NFS attribute cache probes.
*/
extern uint32_t nfsclient_attrcache_flush_done_id;
extern uint32_t nfsclient_attrcache_get_hit_id;
extern uint32_t nfsclient_attrcache_get_miss_id;
extern uint32_t nfsclient_attrcache_load_done_id;
#define KDTRACE_NFS_ATTRCACHE_FLUSH_DONE(vp) do { \
if (dtrace_nfsclient_attrcache_flush_done_probe != NULL) \
(dtrace_nfsclient_attrcache_flush_done_probe)( \
nfsclient_attrcache_flush_done_id, (vp)); \
} while (0)
#define KDTRACE_NFS_ATTRCACHE_GET_HIT(vp, vap) do { \
if (dtrace_nfsclient_attrcache_get_hit_probe != NULL) \
(dtrace_nfsclient_attrcache_get_hit_probe)( \
nfsclient_attrcache_get_hit_id, (vp), (vap)); \
} while (0)
#define KDTRACE_NFS_ATTRCACHE_GET_MISS(vp) do { \
if (dtrace_nfsclient_attrcache_get_miss_probe != NULL) \
(dtrace_nfsclient_attrcache_get_miss_probe)( \
nfsclient_attrcache_get_miss_id, (vp)); \
} while (0)
#define KDTRACE_NFS_ATTRCACHE_LOAD_DONE(vp, vap, error) do { \
if (dtrace_nfsclient_attrcache_load_done_probe != NULL) \
(dtrace_nfsclient_attrcache_load_done_probe)( \
nfsclient_attrcache_load_done_id, (vp), (vap), \
(error)); \
} while (0)
#else /* !KDTRACE_HOOKS */
#define KDTRACE_NFS_ACCESSCACHE_FLUSH_DONE(vp)
#define KDTRACE_NFS_ACCESSCACHE_GET_HIT(vp, uid, mode)
#define KDTRACE_NFS_ACCESSCACHE_GET_MISS(vp, uid, mode)
#define KDTRACE_NFS_ACCESSCACHE_LOAD_DONE(vp, uid, rmode, error)
#define KDTRACE_NFS_ATTRCACHE_FLUSH_DONE(vp)
#define KDTRACE_NFS_ATTRCACHE_GET_HIT(vp, vap)
#define KDTRACE_NFS_ATTRCACHE_GET_MISS(vp)
#define KDTRACE_NFS_ATTRCACHE_LOAD_DONE(vp, vap, error)
#endif /* KDTRACE_HOOKS */
#endif /* !_NFSCLIENT_NFS_KDTRACE_H_ */

82
sys/sys/_stdint.h Normal file
View File

@ -0,0 +1,82 @@
/*-
* Copyright (c) 2011 David E. O'Brien <obrien@FreeBSD.org>
* Copyright (c) 2001 Mike Barcroft <mike@FreeBSD.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $FreeBSD$
*/
#ifndef _SYS__STDINT_H_
#define _SYS__STDINT_H_
#ifndef _INT8_T_DECLARED
typedef __int8_t int8_t;
#define _INT8_T_DECLARED
#endif
#ifndef _INT16_T_DECLARED
typedef __int16_t int16_t;
#define _INT16_T_DECLARED
#endif
#ifndef _INT32_T_DECLARED
typedef __int32_t int32_t;
#define _INT32_T_DECLARED
#endif
#ifndef _INT64_T_DECLARED
typedef __int64_t int64_t;
#define _INT64_T_DECLARED
#endif
#ifndef _UINT8_T_DECLARED
typedef __uint8_t uint8_t;
#define _UINT8_T_DECLARED
#endif
#ifndef _UINT16_T_DECLARED
typedef __uint16_t uint16_t;
#define _UINT16_T_DECLARED
#endif
#ifndef _UINT32_T_DECLARED
typedef __uint32_t uint32_t;
#define _UINT32_T_DECLARED
#endif
#ifndef _UINT64_T_DECLARED
typedef __uint64_t uint64_t;
#define _UINT64_T_DECLARED
#endif
#ifndef _INTPTR_T_DECLARED
typedef __intptr_t intptr_t;
#define _INTPTR_T_DECLARED
#endif
#ifndef _UINTPTR_T_DECLARED
typedef __uintptr_t uintptr_t;
#define _UINTPTR_T_DECLARED
#endif
#endif /* !_SYS__STDINT_H_ */

View File

@ -0,0 +1,4 @@
.\" $FreeBSD: head/tools/build/options/WITHOUT_GPIO 221541 2011-05-06 19:14:06Z ru $
Set to not build
.Xr gpioctl 8
as part of the base system.

View File

@ -0,0 +1,12 @@
# $FreeBSD: head/tools/regression/bin/sh/parser/dollar-quote1.0 221513 2011-05-05 20:55:55Z jilles $
set -e
[ $'hi' = hi ]
[ $'hi
there' = 'hi
there' ]
[ $'\"\'\\\a\b\f\t\v' = "\"'\\$(printf "\a\b\f\t\v")" ]
[ $'hi\nthere' = 'hi
there' ]
[ $'a\rb' = "$(printf "a\rb")" ]

View File

@ -0,0 +1,5 @@
# $FreeBSD: head/tools/regression/bin/sh/parser/dollar-quote2.0 221513 2011-05-05 20:55:55Z jilles $
# This depends on the ASCII character set.
[ $'\e' = "$(printf "\033")" ]

View File

@ -0,0 +1,22 @@
# $FreeBSD: head/tools/regression/bin/sh/parser/dollar-quote3.0 221513 2011-05-05 20:55:55Z jilles $
unset LC_ALL
LC_CTYPE=en_US.ISO8859-1
export LC_CTYPE
e=
for i in 0 1 2 3; do
for j in 0 1 2 3 4 5 6 7; do
for k in 0 1 2 3 4 5 6 7; do
case $i$j$k in
000) continue ;;
esac
e="$e\\$i$j$k"
done
done
done
ee=`printf "$e"`
[ "${#ee}" = 255 ] || echo length bad
# Start a new shell so the locale change is picked up.
[ "$(${SH} -c "printf %s \$'$e'")" = "$ee" ]

View File

@ -0,0 +1,19 @@
# $FreeBSD: head/tools/regression/bin/sh/parser/dollar-quote4.0 221513 2011-05-05 20:55:55Z jilles $
unset LC_ALL
LC_CTYPE=en_US.ISO8859-1
export LC_CTYPE
e=
for i in 0 1 2 3 4 5 6 7 8 9 a b c d e f; do
for j in 0 1 2 3 4 5 6 7 8 9 a b c d e f; do
case $i$j in
00) continue ;;
esac
e="$e\x$i$j"
done
done
# Start a new shell so the locale change is picked up.
ee="$(${SH} -c "printf %s \$'$e'")"
[ "${#ee}" = 255 ] || echo length bad

View File

@ -0,0 +1,12 @@
# $FreeBSD: head/tools/regression/bin/sh/parser/dollar-quote5.0 221513 2011-05-05 20:55:55Z jilles $
# This depends on the ASCII character set.
set -e
[ $'\ca\cb\cc\cd\ce\cf\cg\ch\ci\cj\ck\cl\cm\cn\co\cp\cq\cr\cs\ct\cu\cv\cw\cx\cy\cz' = $'\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032' ]
[ $'\cA\cB\cC\cD\cE\cF\cG\cH\cI\cJ\cK\cL\cM\cN\cO\cP\cQ\cR\cS\cT\cU\cV\cW\cX\cY\cZ' = $'\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032' ]
[ $'\c[' = $'\033' ]
[ $'\c]' = $'\035' ]
[ $'\c^' = $'\036' ]
[ $'\c_' = $'\037' ]

View File

@ -0,0 +1,5 @@
# $FreeBSD: head/tools/regression/bin/sh/parser/dollar-quote6.0 221513 2011-05-05 20:55:55Z jilles $
# This depends on the ASCII character set.
[ $'\c\\' = $'\034' ]

View File

@ -0,0 +1,6 @@
# $FreeBSD: head/tools/regression/bin/sh/parser/dollar-quote7.0 221513 2011-05-05 20:55:55Z jilles $
set -e
[ $'\u0024\u0040\u0060' = '$@`' ]
[ $'\U00000024\U00000040\U00000060' = '$@`' ]

View File

@ -0,0 +1,11 @@
# $FreeBSD: head/tools/regression/bin/sh/parser/dollar-quote8.0 221513 2011-05-05 20:55:55Z jilles $
[ $'hello\0' = hello ]
[ $'hello\0world' = hello ]
[ $'hello\0'$'world' = helloworld ]
[ $'hello\000' = hello ]
[ $'hello\000world' = hello ]
[ $'hello\000'$'world' = helloworld ]
[ $'hello\x00' = hello ]
[ $'hello\x00world' = hello ]
[ $'hello\x00'$'world' = helloworld ]

View File

@ -0,0 +1,8 @@
# $FreeBSD: head/tools/regression/bin/sh/parser/dollar-quote9.0 221513 2011-05-05 20:55:55Z jilles $
# POSIX and C99 say D800-DFFF are undefined in a universal character name.
# We reject this but many other shells expand to something that looks like
# CESU-8.
v=$( (eval ": \$'\uD800'") 2>&1 >/dev/null)
[ $? -ne 0 ] && [ -n "$v" ]