Index: user/ngie/more-tests2/sbin/geom/Makefile =================================================================== --- user/ngie/more-tests2/sbin/geom/Makefile (revision 293822) +++ user/ngie/more-tests2/sbin/geom/Makefile (revision 293823) @@ -1,33 +1,27 @@ # $FreeBSD$ .if defined(RESCUE) || defined(RELEASE_CRUNCH) .PATH: ${.CURDIR}/class/part \ ${.CURDIR}/class/label \ ${.CURDIR}/core \ ${.CURDIR}/misc PROG= geom SRCS= geom.c geom_label.c geom_part.c subr.c MAN= WARNS?= 2 CFLAGS+=-I${.CURDIR} -I${.CURDIR}/core -DSTATIC_GEOM_CLASSES LIBADD= geom util .include .else -.include - SUBDIR= core class - -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif .include .endif Index: user/ngie/more-tests2/sbin/geom/class/Makefile =================================================================== --- user/ngie/more-tests2/sbin/geom/class/Makefile (revision 293822) +++ user/ngie/more-tests2/sbin/geom/class/Makefile (revision 293823) @@ -1,28 +1,24 @@ # $FreeBSD$ .include SUBDIR= cache SUBDIR+=concat .if ${MK_OPENSSL} != "no" SUBDIR+=eli .endif SUBDIR+=journal SUBDIR+=label SUBDIR+=mirror SUBDIR+=mountver SUBDIR+=multipath SUBDIR+=nop SUBDIR+=part SUBDIR+=raid SUBDIR+=raid3 SUBDIR+=sched SUBDIR+=shsec SUBDIR+=stripe SUBDIR+=virstor -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif - .include Index: user/ngie/more-tests2/sbin/geom/core/tests/MdLoad/MdLoad.c =================================================================== --- user/ngie/more-tests2/sbin/geom/core/tests/MdLoad/MdLoad.c (revision 293822) +++ user/ngie/more-tests2/sbin/geom/core/tests/MdLoad/MdLoad.c (nonexistent) @@ -1,275 +0,0 @@ -/*- - * Copyright (c) 2003 Poul-Henning Kamp - * Copyright (c) 2002 Networks Associates Technology, Inc. - * All rights reserved. - * - * This software was developed for the FreeBSD Project by Poul-Henning Kamp - * and NAI Labs, the Security Research Division of Network Associates, Inc. - * under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the - * DARPA CHATS research program. - * - * 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. The names of the authors may not be used to endorse or promote - * products derived from this software without specific prior written - * permission. - * - * 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$ - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -struct sector { - LIST_ENTRY(sector) sectors; - off_t offset; - unsigned char *data; -}; - -struct simdisk_softc { - int sectorsize; - off_t mediasize; - off_t lastsector; - LIST_HEAD(,sector) sectors; - struct sbuf *sbuf; - struct sector *sp; - u_int fwsectors; - u_int fwheads; - u_int fwcylinders; -}; - -static void -g_simdisk_insertsector(struct simdisk_softc *sc, struct sector *dsp) -{ - struct sector *dsp2, *dsp3; - - if (sc->lastsector < dsp->offset) - sc->lastsector = dsp->offset; - if (LIST_EMPTY(&sc->sectors)) { - LIST_INSERT_HEAD(&sc->sectors, dsp, sectors); - return; - } - dsp3 = NULL; - LIST_FOREACH(dsp2, &sc->sectors, sectors) { - dsp3 = dsp2; - if (dsp2->offset > dsp->offset) { - LIST_INSERT_BEFORE(dsp2, dsp, sectors); - return; - } - } - LIST_INSERT_AFTER(dsp3, dsp, sectors); -} - -static void -startElement(void *userData, const char *name, const char **atts __unused) -{ - struct simdisk_softc *sc; - - sc = userData; - if (!strcasecmp(name, "sector")) { - sc->sp = calloc(1, sizeof(*sc->sp) + sc->sectorsize); - sc->sp->data = (u_char *)(sc->sp + 1); - } - sbuf_clear(sc->sbuf); -} - -static void -endElement(void *userData, const char *name) -{ - struct simdisk_softc *sc; - char *p; - u_char *q; - int i, j; - off_t o; - - sc = userData; - - if (!strcasecmp(name, "comment")) { - sbuf_clear(sc->sbuf); - return; - } - sbuf_finish(sc->sbuf); - if (!strcasecmp(name, "sectorsize")) { - sc->sectorsize = strtoul(sbuf_data(sc->sbuf), &p, 0); - if (*p != '\0') - errx(1, "strtoul croaked on sectorsize"); - } else if (!strcasecmp(name, "mediasize")) { - o = strtoull(sbuf_data(sc->sbuf), &p, 0); - if (*p != '\0') - errx(1, "strtoul croaked on mediasize"); - if (o > 0) - sc->mediasize = o; - } else if (!strcasecmp(name, "fwsectors")) { - sc->fwsectors = strtoul(sbuf_data(sc->sbuf), &p, 0); - if (*p != '\0') - errx(1, "strtoul croaked on fwsectors"); - } else if (!strcasecmp(name, "fwheads")) { - sc->fwheads = strtoul(sbuf_data(sc->sbuf), &p, 0); - if (*p != '\0') - errx(1, "strtoul croaked on fwheads"); - } else if (!strcasecmp(name, "fwcylinders")) { - sc->fwcylinders = strtoul(sbuf_data(sc->sbuf), &p, 0); - if (*p != '\0') - errx(1, "strtoul croaked on fwcylinders"); - } else if (!strcasecmp(name, "offset")) { - sc->sp->offset= strtoull(sbuf_data(sc->sbuf), &p, 0); - if (*p != '\0') - errx(1, "strtoul croaked on offset"); - } else if (!strcasecmp(name, "fill")) { - j = strtoul(sbuf_data(sc->sbuf), NULL, 16); - memset(sc->sp->data, j, sc->sectorsize); - } else if (!strcasecmp(name, "hexdata")) { - q = sc->sp->data; - p = sbuf_data(sc->sbuf); - for (i = 0; i < sc->sectorsize; i++) { - if (!isxdigit(*p)) - errx(1, "I croaked on hexdata %d:(%02x)", i, *p); - if (isdigit(*p)) - j = (*p - '0') << 4; - else - j = (tolower(*p) - 'a' + 10) << 4; - p++; - if (!isxdigit(*p)) - errx(1, "I croaked on hexdata %d:(%02x)", i, *p); - if (isdigit(*p)) - j |= *p - '0'; - else - j |= tolower(*p) - 'a' + 10; - p++; - *q++ = j; - } - } else if (!strcasecmp(name, "sector")) { - g_simdisk_insertsector(sc, sc->sp); - sc->sp = NULL; - } else if (!strcasecmp(name, "diskimage")) { - } else if (!strcasecmp(name, "FreeBSD")) { - } else { - printf("<%s>[[%s]]\n", name, sbuf_data(sc->sbuf)); - } - sbuf_clear(sc->sbuf); -} - -static void -characterData(void *userData, const XML_Char *s, int len) -{ - const char *b, *e; - struct simdisk_softc *sc; - - sc = userData; - b = s; - e = s + len - 1; - while (isspace(*b) && b < e) - b++; - while (isspace(*e) && e > b) - e--; - if (e != b || !isspace(*b)) - sbuf_bcat(sc->sbuf, b, e - b + 1); -} - -static struct simdisk_softc * -g_simdisk_xml_load(const char *file) -{ - XML_Parser parser = XML_ParserCreate(NULL); - struct stat st; - char *p; - struct simdisk_softc *sc; - int fd, i; - - sc = calloc(1, sizeof *sc); - sc->sbuf = sbuf_new_auto(); - LIST_INIT(&sc->sectors); - XML_SetUserData(parser, sc); - XML_SetElementHandler(parser, startElement, endElement); - XML_SetCharacterDataHandler(parser, characterData); - - fd = open(file, O_RDONLY); - if (fd < 0) - err(1, "%s: opening %s failed", __func__, file); - if (fstat(fd, &st) == -1) - err(1, "%s: fstat'ing %s failed", __func__, file); - p = mmap(NULL, st.st_size, PROT_READ, MAP_NOCORE|MAP_PRIVATE, fd, 0); - if (p == MAP_FAILED) - err(1, "%s: mmap'ing %s failed", __func__, file); - i = XML_Parse(parser, p, st.st_size, 1); - if (i != 1) - errx(1, "XML_Parse complains: return %d", i); - munmap(p, st.st_size); - close(fd); - XML_ParserFree(parser); - return (sc); -} - -int -main(int argc, char **argv) -{ - struct simdisk_softc *sc; - char buf[BUFSIZ]; - int error, fd; - struct sector *dsp; - - if (argc != 3) - errx(1, "Usage: %s mddevice xmlfile", argv[0]); - - sc = g_simdisk_xml_load(argv[2]); - if (sc->mediasize == 0) - sc->mediasize = sc->lastsector + sc->sectorsize * 10; - if (sc->sectorsize == 0) - sc->sectorsize = 512; - sprintf(buf, "mdconfig -a -t malloc -s %jd -S %d", - (intmax_t)sc->mediasize / sc->sectorsize, sc->sectorsize); - if (sc->fwsectors && sc->fwheads) - sprintf(buf + strlen(buf), " -x %d -y %d", - sc->fwsectors, sc->fwheads); - sprintf(buf + strlen(buf), " -u %s", argv[1]); - error = system(buf); - if (error) - err(1, "calling `%s` failed; status=%d", buf, error); - fd = open(argv[1], O_RDWR); - if (fd < 0 && errno == ENOENT) { - sprintf(buf, "%s%s", _PATH_DEV, argv[1]); - fd = open(buf, O_RDWR); - } - if (fd < 0) - err(1, "Could not open %s", argv[1]); - LIST_FOREACH(dsp, &sc->sectors, sectors) { - lseek(fd, dsp->offset, SEEK_SET); - error = write(fd, dsp->data, sc->sectorsize); - if (error != sc->sectorsize) - err(1, "write sectordata failed"); - } - close(fd); - exit (0); -} Property changes on: user/ngie/more-tests2/sbin/geom/core/tests/MdLoad/MdLoad.c ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: user/ngie/more-tests2/sbin/geom/core/tests/MdLoad/Makefile =================================================================== --- user/ngie/more-tests2/sbin/geom/core/tests/MdLoad/Makefile (revision 293822) +++ user/ngie/more-tests2/sbin/geom/core/tests/MdLoad/Makefile (nonexistent) @@ -1,18 +0,0 @@ -# $FreeBSD$ - -BINDIR= ${TESTSBASE}/sbin/geom/core/MdLoad - -PROG= MdLoad - -DPADD= ${LIBSBUF} ${LIBBSDXML} -LDADD= -lsbuf -lbsdxml - -MAN= - -WARNS?= 4 - -check: .PHONY -check: ${PROG} - ./${PROG} md34 ../Data/disk.critter.ad0.xml - -.include Property changes on: user/ngie/more-tests2/sbin/geom/core/tests/MdLoad/Makefile ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: user/ngie/more-tests2/sbin/geom/core/tests/ConfCmp/ConfCmp.c =================================================================== --- user/ngie/more-tests2/sbin/geom/core/tests/ConfCmp/ConfCmp.c (revision 293822) +++ user/ngie/more-tests2/sbin/geom/core/tests/ConfCmp/ConfCmp.c (nonexistent) @@ -1,379 +0,0 @@ -/*- - * Copyright (c) 2002 Poul-Henning Kamp - * Copyright (c) 2002 Networks Associates Technology, Inc. - * All rights reserved. - * - * This software was developed for the FreeBSD Project by Poul-Henning Kamp - * and NAI Labs, the Security Research Division of Network Associates, Inc. - * under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the - * DARPA CHATS research program. - * - * 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. The names of the authors may not be used to endorse or promote - * products derived from this software without specific prior written - * permission. - * - * 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$ - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -FILE *fsubs; - -struct node { - LIST_HEAD(, node) children; - LIST_ENTRY(node) siblings; - struct node *parent; - const char *name; - struct sbuf *cont; - struct sbuf *key; - char *id; - char *ref; -}; - -struct mytree { - struct node *top; - struct node *cur; - int indent; - int ignore; -}; - -struct ref { - LIST_ENTRY(ref) next; - char *k1; - char *k2; -}; - -LIST_HEAD(, ref) refs = LIST_HEAD_INITIALIZER(refs); - -static struct node * -new_node(void) -{ - struct node *np; - - np = calloc(1, sizeof *np); - np->cont = sbuf_new_auto(); - sbuf_clear(np->cont); - np->key = sbuf_new_auto(); - sbuf_clear(np->key); - LIST_INIT(&np->children); - return (np); -} - -static void -indent(int n) -{ - - printf("%*.*s", n, n, ""); -} - -static void -StartElement(void *userData, const char *name, const char **attr) -{ - struct mytree *mt; - struct node *np; - int i; - - mt = userData; - if (!strcmp(name, "FreeBSD")) { - mt->ignore = 1; - return; - } - mt->ignore = 0; - mt->indent += 2; - np = new_node(); - for (i = 0; attr[i]; i += 2) { - if (!strcmp(attr[i], "id")) - np->id = strdup(attr[i+1]); - else if (!strcmp(attr[i], "ref")) - np->ref = strdup(attr[i+1]); - } - np->name = strdup(name); - sbuf_cat(np->key, name); - sbuf_cat(np->key, "::"); - np->parent = mt->cur; - LIST_INSERT_HEAD(&mt->cur->children, np, siblings); - mt->cur = np; -} - -static void -EndElement(void *userData, const char *name __unused) -{ - struct mytree *mt; - struct node *np; - - mt = userData; - if (mt->ignore) - return; - - mt->indent -= 2; - sbuf_finish(mt->cur->cont); - LIST_FOREACH(np, &mt->cur->children, siblings) { - if (strcmp(np->name, "name")) - continue; - sbuf_cat(mt->cur->key, sbuf_data(np->cont)); - break; - } - sbuf_finish(mt->cur->key); - mt->cur = mt->cur->parent; -} - -static void -CharData(void *userData , const XML_Char *s , int len) -{ - struct mytree *mt; - const char *b, *e; - - mt = userData; - if (mt->ignore) - return; - b = s; - e = s + len - 1; - while (isspace(*b) && b < e) - b++; - while (isspace(*e) && e > b) - e--; - if (e != b || *b) - sbuf_bcat(mt->cur->cont, b, e - b + 1); -} - -static struct mytree * -dofile(char *filename) -{ - XML_Parser parser; - struct mytree *mt; - struct stat st; - int fd; - char *p; - int i; - - parser = XML_ParserCreate(NULL); - mt = calloc(1, sizeof *mt); - mt->top = new_node(); - mt->top->name = "(top)"; - mt->top->parent = mt->top; - mt->cur = mt->top; - sbuf_finish(mt->top->key); - sbuf_finish(mt->top->cont); - XML_SetUserData(parser, mt); - XML_SetElementHandler(parser, StartElement, EndElement); - XML_SetCharacterDataHandler(parser, CharData); - fd = open(filename, O_RDONLY); - if (fd < 0) - err(1, "%s", filename); - fstat(fd, &st); - p = mmap(NULL, st.st_size, PROT_READ, MAP_NOCORE|MAP_PRIVATE, fd, 0); - i = XML_Parse(parser, p, st.st_size, 1); - if (i != 1) - errx(1, "XML_Parse complained -> %d", i); - munmap(p, st.st_size); - close(fd); - XML_ParserFree(parser); - sbuf_finish(mt->top->cont); - if (i) - return (mt); - else - return (NULL); -} - -static void -print_node(struct node *np) -{ - printf("\"%s\" -- \"%s\" -- \"%s\"", np->name, sbuf_data(np->cont), sbuf_data(np->key)); - if (np->id) - printf(" id=\"%s\"", np->id); - if (np->ref) - printf(" ref=\"%s\"", np->ref); - printf("\n"); -} - -#if 0 -static void -print_tree(struct node *np, int n) -{ - struct node *np1; - - indent(n); printf("%s id=%s ref=%s\n", np->name, np->id, np->ref); - LIST_FOREACH(np1, &np->children, siblings) - print_tree(np1, n + 2); -} -#endif - -static void -sort_node(struct node *np) -{ - struct node *np1, *np2; - int n; - - LIST_FOREACH(np1, &np->children, siblings) - sort_node(np1); - do { - np1 = LIST_FIRST(&np->children); - n = 0; - for (;;) { - if (np1 == NULL) - return; - np2 = LIST_NEXT(np1, siblings); - if (np2 == NULL) - return; - if (strcmp(sbuf_data(np1->key), sbuf_data(np2->key)) > 0) { - LIST_REMOVE(np2, siblings); - LIST_INSERT_BEFORE(np1, np2, siblings); - n++; - break; - } - np1 = np2; - } - } while (n); -} - -static int -refcmp(char *r1, char *r2) -{ - struct ref *r; - - LIST_FOREACH(r, &refs, next) { - if (!strcmp(r1, r->k1)) - return (strcmp(r2, r->k2)); - } - r = calloc(1, sizeof(*r)); - r->k1 = strdup(r1); - r->k2 = strdup(r2); - LIST_INSERT_HEAD(&refs, r, next); - if (fsubs != NULL) { - fprintf(fsubs, "s/%s/%s/g\n", r1, r2); - fflush(fsubs); - } - return (0); -} - -static int compare_node2(struct node *n1, struct node *n2, int in); - -static int -compare_node(struct node *n1, struct node *n2, int in) -{ - int i; - struct node *n1a, *n2a; - - i = strcmp(n1->name, n2->name); - if (i) - return (i); - if (n1->id && n2->id) - i = refcmp(n1->id, n2->id); - else if (n1->id || n2->id) - i = -1; - if (i) - return (i); - if (n1->ref && n2->ref) - i = refcmp(n1->ref, n2->ref); - else if (n1->ref || n2->ref) - i = -1; - if (i) - return (i); - if (!strcmp(n1->name, "ref")) - i = refcmp(sbuf_data(n1->cont), sbuf_data(n2->cont)); - else - i = strcmp(sbuf_data(n1->cont), sbuf_data(n2->cont)); - if (i) - return (1); - n1a = LIST_FIRST(&n1->children); - n2a = LIST_FIRST(&n2->children); - for (;;) { - if (n1a == NULL && n2a == NULL) - return (0); - if (n1a != NULL && n2a == NULL) { - printf("1>"); - indent(in); - print_node(n1a); - printf("2>\n"); - return (1); - } - if (n1a == NULL && n2a != NULL) { - printf("1>\n"); - printf("2>"); - indent(in); - print_node(n2a); - return (1); - } - i = compare_node2(n1a, n2a, in + 2); - if (i) - return (1); - n1a = LIST_NEXT(n1a, siblings); - n2a = LIST_NEXT(n2a, siblings); - } - return (0); -} - -static int -compare_node2(struct node *n1, struct node *n2, int in) -{ - int i; - - i = compare_node(n1, n2, in); - if (i) { - printf("1>"); - indent(in); - print_node(n1); - printf("2>"); - indent(in); - print_node(n2); - } - return (i); -} - - - -int -main(int argc, char **argv) -{ - struct mytree *t1, *t2; - int i; - - fsubs = fopen("_.subs", "w"); - setbuf(stdout, NULL); - setbuf(stderr, NULL); - if (argc != 3) - errx(1, "usage: %s file1 file2", argv[0]); - - t1 = dofile(argv[1]); - if (t1 == NULL) - errx(2, "XML parser error on file %s", argv[1]); - sort_node(t1->top); - t2 = dofile(argv[2]); - if (t2 == NULL) - errx(2, "XML parser error on file %s", argv[2]); - sort_node(t2->top); - i = compare_node(t1->top, t2->top, 0); - return (i); -} - Property changes on: user/ngie/more-tests2/sbin/geom/core/tests/ConfCmp/ConfCmp.c ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: user/ngie/more-tests2/sbin/geom/core/tests/ConfCmp/a1.conf =================================================================== --- user/ngie/more-tests2/sbin/geom/core/tests/ConfCmp/a1.conf (revision 293822) +++ user/ngie/more-tests2/sbin/geom/core/tests/ConfCmp/a1.conf (nonexistent) @@ -1,414 +0,0 @@ - - $FreeBSD$ - - 0x80712c0 - DEV-method - - 0x80bfd00 - 0x80712c0 - ad0s3d - 4 - - 0x80b9500 - 0x80bfd00 - 0x80bf880 - r0w0e0 - - - - 0x80bfc80 - 0x80712c0 - ad0s3c - 4 - - 0x80b94c0 - 0x80bfc80 - 0x80bf800 - r0w0e0 - - - - 0x80bfc00 - 0x80712c0 - ad0s3a - 4 - - 0x80b9480 - 0x80bfc00 - 0x80bf780 - r0w0e0 - - - - 0x80bfb80 - 0x80712c0 - ad0s2c - 4 - - 0x80b9440 - 0x80bfb80 - 0x80bf600 - r0w0e0 - - - - 0x80bfb00 - 0x80712c0 - ad0s1f - 4 - - 0x80b9400 - 0x80bfb00 - 0x80bf480 - r0w0e0 - - - - 0x80bfa80 - 0x80712c0 - ad0s1e - 4 - - 0x80b93c0 - 0x80bfa80 - 0x80bf400 - r0w0e0 - - - - 0x80bfa00 - 0x80712c0 - ad0s1c - 4 - - 0x80b9380 - 0x80bfa00 - 0x80bf380 - r0w0e0 - - - - 0x80bf980 - 0x80712c0 - ad0s1b - 4 - - 0x80b9340 - 0x80bf980 - 0x80bf300 - r0w0e0 - - - - 0x80bf900 - 0x80712c0 - ad0s1a - 4 - - 0x80b9300 - 0x80bf900 - 0x80bf280 - r0w0e0 - - - - 0x80bf680 - 0x80712c0 - ad0s3 - 3 - - 0x80b9280 - 0x80bf680 - 0x80bf100 - r0w0e0 - - - - 0x80bf500 - 0x80712c0 - ad0s2 - 3 - - 0x80b9200 - 0x80bf500 - 0x80bf080 - r0w0e0 - - - - 0x80bf180 - 0x80712c0 - ad0s1 - 3 - - 0x80b9180 - 0x80bf180 - 0x80bf000 - r0w0e0 - - - - 0x80b9080 - 0x80712c0 - ad0 - 2 - - 0x80b90c0 - 0x80b9080 - 0x80b9040 - r0w0e0 - - - - - 0x8071280 - MBREXT-method - - - 0x8071260 - MBR-method - - 0x80b9100 - 0x8071260 - ad0 - 2 - - - - 0x80b9140 - 0x80b9100 - 0x80b9040 - r0w0e0 - - - - - 0x80bf100 - 0x80b9100 - r0w0e0 - ad0s3 - - 2 - 8585256960 - 16768080 - 8585256960 - 16768080 - 165 - - - - 0x80bf080 - 0x80b9100 - r0w0e0 - ad0s2 - - 1 - 5364817920 - 10478160 - 3220439040 - 6289920 - 165 - - - - 0x80bf000 - 0x80b9100 - r0w0e0 - ad0s1 - - 0 - 3220406784 - 6289857 - 32256 - 63 - 165 - - - - - - 0x80712a0 - BSD-method - - 0x80bf700 - 0x80712a0 - ad0s3 - 3 - - - - 0x80b92c0 - 0x80bf700 - 0x80bf100 - r0w0e0 - - - - - 0x80bf880 - 0x80bf700 - r0w0e0 - ad0s3d - - 3 - 6488104960 - 12672080 - 10682408960 - 20864080 - - - - 0x80bf800 - 0x80bf700 - r0w0e0 - ad0s3c - - 2 - 8585256960 - 16768080 - 8585256960 - 16768080 - - - - 0x80bf780 - 0x80bf700 - r0w0e0 - ad0s3a - - 0 - 2097152000 - 4096000 - 8585256960 - 16768080 - - - - - 0x80bf580 - 0x80712a0 - ad0s2 - 3 - - - - 0x80b9240 - 0x80bf580 - 0x80bf080 - r0w0e0 - - - - - 0x80bf600 - 0x80bf580 - r0w0e0 - ad0s2c - - 2 - 5364817920 - 10478160 - 3220439040 - 6289920 - - - - - 0x80bf200 - 0x80712a0 - ad0s1 - 3 - - - - 0x80b91c0 - 0x80bf200 - 0x80bf000 - r0w0e0 - - - - - 0x80bf480 - 0x80bf200 - r0w0e0 - ad0s1f - - 5 - 2066973184 - 4037057 - 1153465856 - 2252863 - - - - 0x80bf400 - 0x80bf200 - r0w0e0 - ad0s1e - - 4 - 524288000 - 1024000 - 629177856 - 1228863 - - - - 0x80bf380 - 0x80bf200 - r0w0e0 - ad0s1c - - 2 - 3220406784 - 6289857 - 32256 - 63 - - - - 0x80bf300 - 0x80bf200 - r0w0e0 - ad0s1b - - 1 - 524288000 - 1024000 - 104889856 - 204863 - - - - 0x80bf280 - 0x80bf200 - r0w0e0 - ad0s1a - - 0 - 104857600 - 204800 - 32256 - 63 - - - - - - 0x80711c0 - SIMDISK-method - - 0x80b9000 - 0x80711c0 - ad0 - 1 - - 0x80b9040 - 0x80b9000 - r0w0e0 - ad0 - - - - Property changes on: user/ngie/more-tests2/sbin/geom/core/tests/ConfCmp/a1.conf ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: user/ngie/more-tests2/sbin/geom/core/tests/ConfCmp/a1a.conf =================================================================== --- user/ngie/more-tests2/sbin/geom/core/tests/ConfCmp/a1a.conf (revision 293822) +++ user/ngie/more-tests2/sbin/geom/core/tests/ConfCmp/a1a.conf (nonexistent) @@ -1,414 +0,0 @@ - - $FreeBSD$ - - 0x90712c0 - DEV-method - - 0x90bfd00 - 0x90712c0 - ad0s3d - 4 - - 0x90b9500 - 0x90bfd00 - 0x90bf880 - r0w0e0 - - - - 0x90bfc80 - 0x90712c0 - ad0s3c - 4 - - 0x90b94c0 - 0x90bfc80 - 0x90bf800 - r0w0e0 - - - - 0x90bfc00 - 0x90712c0 - ad0s3a - 4 - - 0x90b9480 - 0x90bfc00 - 0x90bf780 - r0w0e0 - - - - 0x90bfb80 - 0x90712c0 - ad0s2c - 4 - - 0x90b9440 - 0x90bfb80 - 0x90bf600 - r0w0e0 - - - - 0x90bfb00 - 0x90712c0 - ad0s1f - 4 - - 0x90b9400 - 0x90bfb00 - 0x90bf480 - r0w0e0 - - - - 0x90bfa80 - 0x90712c0 - ad0s1e - 4 - - 0x90b93c0 - 0x90bfa80 - 0x90bf400 - r0w0e0 - - - - 0x90bfa00 - 0x90712c0 - ad0s1c - 4 - - 0x90b9380 - 0x90bfa00 - 0x90bf380 - r0w0e0 - - - - 0x90bf980 - 0x90712c0 - ad0s1b - 4 - - 0x90b9340 - 0x90bf980 - 0x90bf300 - r0w0e0 - - - - 0x90bf900 - 0x90712c0 - ad0s1a - 4 - - 0x90b9300 - 0x90bf900 - 0x90bf280 - r0w0e0 - - - - 0x90bf680 - 0x90712c0 - ad0s3 - 3 - - 0x90b9280 - 0x90bf680 - 0x90bf100 - r0w0e0 - - - - 0x90bf500 - 0x90712c0 - ad0s2 - 3 - - 0x90b9200 - 0x90bf500 - 0x90bf080 - r0w0e0 - - - - 0x90bf180 - 0x90712c0 - ad0s1 - 3 - - 0x90b9180 - 0x90bf180 - 0x90bf000 - r0w0e0 - - - - 0x90b9080 - 0x90712c0 - ad0 - 2 - - 0x90b90c0 - 0x90b9080 - 0x90b9040 - r0w0e0 - - - - - 0x9071280 - MBREXT-method - - - 0x9071260 - MBR-method - - 0x90b9100 - 0x9071260 - ad0 - 2 - - - - 0x90b9140 - 0x90b9100 - 0x90b9040 - r0w0e0 - - - - - 0x90bf100 - 0x90b9100 - r0w0e0 - ad0s3 - - 2 - 8585256960 - 16768080 - 8585256960 - 16768080 - 165 - - - - 0x90bf080 - 0x90b9100 - r0w0e0 - ad0s2 - - 1 - 5364817920 - 10478160 - 3220439040 - 6289920 - 165 - - - - 0x90bf000 - 0x90b9100 - r0w0e0 - ad0s1 - - 0 - 3220406784 - 6289857 - 32256 - 63 - 165 - - - - - - 0x90712a0 - BSD-method - - 0x90bf700 - 0x90712a0 - ad0s3 - 3 - - - - 0x90b92c0 - 0x90bf700 - 0x90bf100 - r0w0e0 - - - - - 0x90bf880 - 0x90bf700 - r0w0e0 - ad0s3d - - 3 - 6488104960 - 12672080 - 10682408960 - 20864080 - - - - 0x90bf800 - 0x90bf700 - r0w0e0 - ad0s3c - - 2 - 8585256960 - 16768080 - 8585256960 - 16768080 - - - - 0x90bf780 - 0x90bf700 - r0w0e0 - ad0s3a - - 0 - 2097152000 - 4096000 - 8585256960 - 16768080 - - - - - 0x90bf580 - 0x90712a0 - ad0s2 - 3 - - - - 0x90b9240 - 0x90bf580 - 0x90bf080 - r0w0e0 - - - - - 0x90bf600 - 0x90bf580 - r0w0e0 - ad0s2c - - 2 - 5364817920 - 10478160 - 3220439040 - 6289920 - - - - - 0x90bf200 - 0x90712a0 - ad0s1 - 3 - - - - 0x90b91c0 - 0x90bf200 - 0x90bf000 - r0w0e0 - - - - - 0x90bf480 - 0x90bf200 - r0w0e0 - ad0s1f - - 5 - 2066973184 - 4037057 - 1153465856 - 2252863 - - - - 0x90bf400 - 0x90bf200 - r0w0e0 - ad0s1e - - 4 - 524288000 - 1024000 - 629177856 - 1228863 - - - - 0x90bf380 - 0x90bf200 - r0w0e0 - ad0s1c - - 2 - 3220406784 - 6289857 - 32256 - 63 - - - - 0x90bf300 - 0x90bf200 - r0w0e0 - ad0s1b - - 1 - 524288000 - 1024000 - 104889856 - 204863 - - - - 0x90bf280 - 0x90bf200 - r0w0e0 - ad0s1a - - 0 - 104857600 - 204800 - 32256 - 63 - - - - - - 0x90711c0 - SIMDISK-method - - 0x90b9000 - 0x90711c0 - ad0 - 1 - - 0x90b9040 - 0x90b9000 - r0w0e0 - ad0 - - - - Property changes on: user/ngie/more-tests2/sbin/geom/core/tests/ConfCmp/a1a.conf ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: user/ngie/more-tests2/sbin/geom/core/tests/ConfCmp/a2.conf =================================================================== --- user/ngie/more-tests2/sbin/geom/core/tests/ConfCmp/a2.conf (revision 293822) +++ user/ngie/more-tests2/sbin/geom/core/tests/ConfCmp/a2.conf (nonexistent) @@ -1,207 +0,0 @@ - - $FreeBSD$ - - DEV-class - - - wd0s1f - 4 - - - - r0w0e0 - - - - - wd0s1e - 4 - - - - r0w0e0 - - - - - wd0s1c - 4 - - - - r0w0e0 - - - - - wd0s1b - 4 - - - - r0w0e0 - - - - - wd0s1a - 4 - - - - r0w0e0 - - - - - wd0s1 - 3 - - - - r0w0e0 - - - - - wd0 - 2 - - - - r0w0e0 - - - - - PC98-class - - - wd0 - 2 - - 8704 - - - - - r0w0e0 - - - - - - r0w0e0 - wd0s1 - - 0 - 1626533888 - 3176824 - 69632 - 136 - - - - - - SUNLABEL-class - - - MBREXT-class - - - MBR-class - - - BSD-class - - - wd0s1 - 3 - - 512 - 8192 - - - - - r0w0e0 - - - - - - r0w0e0 - wd0s1f - - 5 - 1390673920 - 2716160 - 235929600 - 460800 - - - - - r0w0e0 - wd0s1e - - 4 - 52428800 - 102400 - 183500800 - 358400 - - - - - r0w0e0 - wd0s1c - - 2 - 1626603520 - 3176960 - 0 - 0 - - - - - r0w0e0 - wd0s1b - - 1 - 104857600 - 204800 - 78643200 - 153600 - - - - - r0w0e0 - wd0s1a - - 0 - 78643200 - 153600 - 0 - 0 - - - - - - SIMDISK-class - - - wd0 - 1 - - - r0w0e0 - wd0 - - - - Property changes on: user/ngie/more-tests2/sbin/geom/core/tests/ConfCmp/a2.conf ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: user/ngie/more-tests2/sbin/geom/core/tests/ConfCmp/a2a.conf =================================================================== --- user/ngie/more-tests2/sbin/geom/core/tests/ConfCmp/a2a.conf (revision 293822) +++ user/ngie/more-tests2/sbin/geom/core/tests/ConfCmp/a2a.conf (nonexistent) @@ -1,207 +0,0 @@ - - $FreeBSD$ - - DEV-class - - - wd0s1f - 4 - - - - r0w0e0 - - - - - wd0s1e - 4 - - - - r0w0e0 - - - - - wd0s1c - 4 - - - - r0w0e0 - - - - - wd0s1b - 4 - - - - r0w0e0 - - - - - wd0s1a - 4 - - - - r0w0e0 - - - - - wd0s1 - 3 - - - - r0w0e0 - - - - - wd0 - 2 - - - - r0w0e0 - - - - - PC98-class - - - wd0 - 2 - - 8704 - - - - - r0w0e0 - - - - - - r0w0e0 - wd0s1 - - 0 - 1626533888 - 3176824 - 69632 - 136 - - - - - - SUNLABEL-class - - - MBREXT-class - - - MBR-class - - - BSD-class - - - wd0s1 - 3 - - 512 - 8192 - - - - - r0w0e0 - - - - - - r0w0e0 - wd0s1f - - 5 - 1390673920 - 2716160 - 235929600 - 460800 - - - - - r0w0e0 - wd0s1e - - 4 - 52428800 - 102400 - 183500800 - 358400 - - - - - r0w0e0 - wd0s1c - - 2 - 1626603520 - 3176960 - 0 - 0 - - - - - r0w0e0 - wd0s1b - - 1 - 104857600 - 204800 - 78643200 - 153600 - - - - - r0w0e0 - wd0s1a - - 0 - 78643200 - 153600 - 0 - 0 - - - - - - SIMDISK-class - - - wd0 - 1 - - - r0w0e0 - wd0 - - - - Property changes on: user/ngie/more-tests2/sbin/geom/core/tests/ConfCmp/a2a.conf ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: user/ngie/more-tests2/sbin/geom/core/tests/ConfCmp/a1b.conf =================================================================== --- user/ngie/more-tests2/sbin/geom/core/tests/ConfCmp/a1b.conf (revision 293822) +++ user/ngie/more-tests2/sbin/geom/core/tests/ConfCmp/a1b.conf (nonexistent) @@ -1,414 +0,0 @@ - - $FreeBSD$ - - 0x80712c0 - DEV-method - - 0x80bfd00 - 0x80712c0 - ad0s3d - 4 - - 0x80b9500 - 0x80bfd00 - 0x80bf880 - r0w0e0 - - - - 0x80bfc80 - 0x80712c0 - ad0s3c - 4 - - 0x80b94c0 - 0x80bfc80 - 0x80bf800 - r0w0e0 - - - - 0x80bfc00 - 0x80712c0 - ad0s3a - 4 - - 0x80b9480 - 0x80bfc00 - 0x80bf780 - r0w0e0 - - - - 0x80bfb80 - 0x80712c0 - ad0s2c - 4 - - 0x80b9440 - 0x80bfb80 - 0x80bf600 - r0w0e0 - - - - 0x80bfb00 - 0x80712c0 - ad0s1f - 4 - - 0x80b9400 - 0x80bfb00 - 0x80bf480 - r0w0e0 - - - - 0x80bfa80 - 0x80712c0 - ad0s1e - 4 - - 0x80b93c0 - 0x80bfa80 - 0x80bf400 - r0w0e0 - - - - 0x80bfa00 - 0x80712c0 - ad0s1c - 4 - - 0x80b9380 - 0x80bfa00 - 0x80bf380 - r0w0e0 - - - - 0x80bf980 - 0x80712c0 - ad0s1b - 4 - - 0x80b9340 - 0x80bf980 - 0x80bf300 - r0w0e0 - - - - 0x80bf900 - 0x80712c0 - ad0s1a - 4 - - 0x80b9300 - 0x80bf900 - 0x80bf280 - r0w0e0 - - - - 0x80bf680 - 0x80712c0 - ad0s3 - 3 - - 0x80b9280 - 0x80bf680 - 0x80bf100 - r0w0e0 - - - - 0x80bf500 - 0x80712c0 - ad0s2 - 3 - - 0x80b9200 - 0x80bf500 - 0x80bf080 - r0w0e0 - - - - 0x80bf180 - 0x80712c0 - ad0s1 - 3 - - 0x80b9180 - 0x80bf180 - 0x80bf000 - r0w0e0 - - - - 0x80b9080 - 0x80712c0 - ad0 - 2 - - 0x80b90c0 - 0x80b9080 - 0x80b9040 - r0w0e0 - - - - - 0x8071280 - MBREXT-method - - - 0x8071260 - MBR-method - - 0x80b9100 - 0x8071260 - ad0 - 2 - - - - 0x80b9140 - 0x80b9100 - 0x80b9040 - r0w0e0 - - - - - 0x80bf100 - 0x80b9100 - r0w0e0 - ad0s3 - - 2 - 8585256960 - 16768080 - 8585256960 - 16768080 - 165 - - - - 0x80bf080 - 0x80b9100 - r0w0e0 - ad0s2 - - 1 - 5364817920 - 10478160 - 3220439040 - 6289920 - 165 - - - - 0x80bf000 - 0x80b9100 - r0w0e0 - ad0s1 - - 0 - 3220406784 - 6289857 - 32256 - 63 - 165 - - - - - - 0x80712a0 - BSD-method - - 0x80bf700 - 0x80712a0 - ad0s3 - 3 - - - - 0x80b92c0 - 0x80bf700 - 0x80bf100 - r0w0e0 - - - - - 0x80bf880 - 0x80bf700 - r0w0e0 - ad0s3d - - 3 - 6488104960 - 12672080 - 10682408960 - 20864080 - - - - 0x80bf800 - 0x80bf700 - r0w0e0 - ad0s3c - - 2 - 8585256960 - 16768080 - 8585256960 - 16768080 - - - - 0x80bf780 - 0x80bf700 - r0w0e0 - ad0s3a - - 0 - 2097152000 - 4096000 - 8585256960 - 16768080 - - - - - 0x80bf580 - 0x80712a0 - ad0s2 - 3 - - - - 0x80b9240 - 0x80bf580 - 0x80bf080 - r0w0e0 - - - - - 0x80bf600 - 0x80bf580 - r0w0e0 - ad0s2c - - 2 - 5364817920 - 10478160 - 3220439040 - 6289920 - - - - - 0x80bf200 - 0x80712a0 - ad0s1 - 3 - - - - 0x80b91c0 - 0x80bf200 - 0x80bf000 - r0w0e0 - - - - - 0x80bf480 - 0x80bf200 - r0w0e0 - ad0s1f - - 5 - 2066973184 - 4037057 - 1153465856 - 2252863 - - - - 0x80bf400 - 0x80bf200 - r0w0e0 - ad0s1e - - 4 - 524288000 - 1024000 - 629177856 - 1228863 - - - - 0x80bf380 - 0x80bf200 - r0w0e0 - ad0s1c - - 2 - 3220406784 - 6289857 - 32256 - 63 - - - - 0x80bf300 - 0x80bf200 - r0w0e0 - ad0s1b - - 1 - 524288000 - 1024000 - 104889856 - 204863 - - - - 0x80bf280 - 0x80bf200 - r0w0e0 - ad0s1a - - 0 - 104857600 - 204800 - 32256 - 63 - - - - - - 0x80711c0 - SIMDISK-method - - 0x80b9000 - 0x80711c0 - ad0 - 1 - - 0x80b9041 - 0x80b9000 - r0w0e0 - ad0 - - - - Property changes on: user/ngie/more-tests2/sbin/geom/core/tests/ConfCmp/a1b.conf ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: user/ngie/more-tests2/sbin/geom/core/tests/ConfCmp/a1c.conf =================================================================== --- user/ngie/more-tests2/sbin/geom/core/tests/ConfCmp/a1c.conf (revision 293822) +++ user/ngie/more-tests2/sbin/geom/core/tests/ConfCmp/a1c.conf (nonexistent) @@ -1,414 +0,0 @@ - - $FreeBSD$ - - 0x80712c0 - DEV-method - - 0x80bfd00 - 0x80712c0 - ad0s3d - 4 - - 0x80b9500 - 0x80bfd00 - 0x80bf880 - r0w0e0 - - - - 0x80bfc80 - 0x80712c0 - ad0s3c - 4 - - 0x80b94c0 - 0x80bfc80 - 0x80bf800 - r0w0e0 - - - - 0x80bfc00 - 0x80712c0 - ad0s3a - 4 - - 0x80b9480 - 0x80bfc00 - 0x80bf780 - r0w0e0 - - - - 0x80bfb80 - 0x80712c0 - ad0s2c - 4 - - 0x80b9440 - 0x80bfb80 - 0x80bf600 - r0w0e0 - - - - 0x80bfb00 - 0x80712c0 - ad0s1f - 4 - - 0x80b9400 - 0x80bfb00 - 0x80bf480 - r0w0e0 - - - - 0x80bfa80 - 0x80712c0 - ad0s1e - 4 - - 0x80b93c0 - 0x80bfa80 - 0x80bf400 - r0w0e0 - - - - 0x80bfa00 - 0x80712c0 - ad0s1c - 4 - - 0x80b9380 - 0x80bfa00 - 0x80bf380 - r0w0e0 - - - - 0x80bf980 - 0x80712c0 - ad0s1b - 4 - - 0x80b9340 - 0x80bf980 - 0x80bf300 - r0w0e0 - - - - 0x80bf900 - 0x80712c0 - ad0s1a - 4 - - 0x80b9300 - 0x80bf900 - 0x80bf280 - r0w0e0 - - - - 0x80bf680 - 0x80712c0 - ad0s3 - 3 - - 0x80b9280 - 0x80bf680 - 0x80bf100 - r0w0e0 - - - - 0x80bf500 - 0x80712c0 - ad0s2 - 3 - - 0x80b9200 - 0x80bf500 - 0x80bf080 - r0w0e0 - - - - 0x80bf180 - 0x80712c0 - ad0s1 - 3 - - 0x80b9180 - 0x80bf180 - 0x80bf000 - r0w0e0 - - - - 0x80b9080 - 0x80712c0 - ad0 - 2 - - 0x80b90c0 - 0x80b9080 - 0x80b9040 - r0w0e0 - - - - - 0x8071280 - MBREXT-method - - - 0x8071260 - MBR-method - - 0x80b9100 - 0x8071260 - ad0 - 2 - - - - 0x80b9140 - 0x80b9100 - 0x80b9040 - r0w0e0 - - - - - 0x80bf100 - 0x80b9100 - r0w0e0 - ad0s3 - - 2 - 8585256960 - 16768080 - 8585256960 - 16768080 - 165 - - - - 0x80bf080 - 0x80b9100 - r0w0e0 - ad0s2 - - 1 - 5364817920 - 10478160 - 3220439040 - 6289920 - 165 - - - - 0x80bf000 - 0x80b9100 - r0w0e0 - ad0s1 - - 0 - 3220406784 - 6289857 - 32256 - 63 - 165 - - - - - - 0x80712a0 - BSD-method - - 0x80bf700 - 0x80712a0 - ad0s3 - 3 - - - - 0x80b92c0 - 0x80bf700 - 0x80bf100 - r0w0e0 - - - - - 0x80bf880 - 0x80bf700 - r0w0e0 - ad0s3d - - 3 - 6488104960 - 12672080 - 10682408960 - 20864080 - - - - 0x80bf800 - 0x80bf700 - r0w0e0 - ad0s3c - - 2 - 8585256960 - 16768080 - 8585256960 - 16768080 - - - - 0x80bf780 - 0x80bf700 - r0w0e0 - ad0s3a - - 0 - 2097152000 - 4096000 - 8585256960 - 16768080 - - - - - 0x80bf580 - 0x80712a0 - ad0s2 - 3 - - - - 0x80b9240 - 0x80bf580 - 0x80bf080 - r0w0e0 - - - - - 0x80bf600 - 0x80bf580 - r0w0e0 - ad0s2c - - 2 - 5364817920 - 10478160 - 3220439040 - 6289920 - - - - - 0x80bf200 - 0x80712a0 - ad0s1 - 3 - - - - 0x80b91c0 - 0x80bf200 - 0x80bf000 - r0w0e0 - - - - - 0x80bf480 - 0x80bf200 - r0w0e0 - ad0s1f - - 5 - 2066973184 - 4037057 - 1153465856 - 2252863 - - - - 0x80bf400 - 0x80bf200 - r0w0e0 - ad0s1e - - 4 - 524288000 - 1024000 - 629177856 - 1228863 - - - - 0x80bf380 - 0x80bf200 - r0w0e0 - ad0s1c - - 2 - 3220406784 - 6289857 - 32256 - 63 - - - - 0x80bf300 - 0x80bf200 - r0w0e0 - ad0s1b - - 1 - 524288000 - 1024000 - 104889856 - 204863 - - - - 0x80bf280 - 0x80bf200 - r0w0e0 - ad0s1a - - 0 - 104857600 - 204800 - 32256 - 63 - - - - - - 0x80711c0 - SIMDISK-method - - 0x80b9000 - 0x80711c0 - ad0 - 1 - - 0x80b9040 - 0x80b9000 - r0w0e1 - ad0 - - - - Property changes on: user/ngie/more-tests2/sbin/geom/core/tests/ConfCmp/a1c.conf ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: user/ngie/more-tests2/sbin/geom/core/tests/ConfCmp/a2b.conf =================================================================== --- user/ngie/more-tests2/sbin/geom/core/tests/ConfCmp/a2b.conf (revision 293822) +++ user/ngie/more-tests2/sbin/geom/core/tests/ConfCmp/a2b.conf (nonexistent) @@ -1,207 +0,0 @@ - - $FreeBSD$ - - DEV-class - - - wd0s1f - 4 - - - - r0w0e0 - - - - - wd0s1e - 4 - - - - r0w0e0 - - - - - wd0s1c - 4 - - - - r0w0e0 - - - - - wd0s1b - 4 - - - - r0w0e0 - - - - - wd0s1a - 4 - - - - r0w0e0 - - - - - wd0s1 - 3 - - - - r0w0e0 - - - - - wd0 - 2 - - - - r0w0e0 - - - - - PC98-class - - - wd0 - 2 - - 8704 - - - - - r0w0e0 - - - - - - r0w0e0 - wd0s1 - - 0 - 1626533888 - 3176824 - 69632 - 136 - - - - - - SUNLABEL-class - - - MBREXT-class - - - MBR-class - - - BSD-class - - - wd0s1 - 3 - - 512 - 8192 - - - - - r0w0e0 - - - - - - r0w0e0 - wd0s1f - - 5 - 1390673920 - 2716160 - 235929600 - 460800 - - - - - r0w0e0 - wd0s1e - - 4 - 52428800 - 102400 - 183500800 - 358400 - - - - - r0w0e0 - wd0s1c - - 2 - 1626603520 - 3176960 - 0 - 0 - - - - - r0w0e0 - wd0s1b - - 1 - 104857600 - 204800 - 78643200 - 153600 - - - - - r0w0e0 - wd0s1a - - 0 - 78643200 - 153600 - 0 - 0 - - - - - - SIMDISK-class - - - wd0 - 1 - - - r0w0e0 - wd0 - - - - Property changes on: user/ngie/more-tests2/sbin/geom/core/tests/ConfCmp/a2b.conf ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: user/ngie/more-tests2/sbin/geom/core/tests/ConfCmp/a2c.conf =================================================================== --- user/ngie/more-tests2/sbin/geom/core/tests/ConfCmp/a2c.conf (revision 293822) +++ user/ngie/more-tests2/sbin/geom/core/tests/ConfCmp/a2c.conf (nonexistent) @@ -1,206 +0,0 @@ - - $FreeBSD$ - - DEV-class - - - wd0s1f - 4 - - - - r0w0e0 - - - - - wd0s1e - 4 - - - - r0w0e0 - - - - - wd0s1c - 4 - - - - r0w0e0 - - - - - wd0s1b - 4 - - - - - - - - wd0s1a - 4 - - - - r0w0e0 - - - - - wd0s1 - 3 - - - - r0w0e0 - - - - - wd0 - 2 - - - - r0w0e0 - - - - - PC98-class - - - wd0 - 2 - - 8704 - - - - - r0w0e0 - - - - - - r0w0e0 - wd0s1 - - 0 - 1626533888 - 3176824 - 69632 - 136 - - - - - - SUNLABEL-class - - - MBREXT-class - - - MBR-class - - - BSD-class - - - wd0s1 - 3 - - 512 - 8192 - - - - - r0w0e0 - - - - - - r0w0e0 - wd0s1f - - 5 - 1390673920 - 2716160 - 235929600 - 460800 - - - - - r0w0e0 - wd0s1e - - 4 - 52428800 - 102400 - 183500800 - 358400 - - - - - r0w0e0 - wd0s1c - - 2 - 1626603520 - 3176960 - 0 - 0 - - - - - r0w0e0 - wd0s1b - - 1 - 104857600 - 204800 - 78643200 - 153600 - - - - - r0w0e0 - wd0s1a - - 0 - 78643200 - 153600 - 0 - 0 - - - - - - SIMDISK-class - - - wd0 - 1 - - - r0w0e0 - wd0 - - - - Property changes on: user/ngie/more-tests2/sbin/geom/core/tests/ConfCmp/a2c.conf ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: user/ngie/more-tests2/sbin/geom/core/tests/ConfCmp/a1d.conf =================================================================== --- user/ngie/more-tests2/sbin/geom/core/tests/ConfCmp/a1d.conf (revision 293822) +++ user/ngie/more-tests2/sbin/geom/core/tests/ConfCmp/a1d.conf (nonexistent) @@ -1,414 +0,0 @@ - - $FreeBSD$ - - 0x80712c0 - DEV-method - - 0x80bfd00 - 0x80712c0 - ad0s3d - 4 - - 0x80b9500 - 0x80bfd00 - 0x80bf880 - r0w0e0 - - - - 0x80bfc80 - 0x80712c0 - ad0s3c - 4 - - 0x80b94c0 - 0x80bfc80 - 0x80bf800 - r0w0e0 - - - - 0x80bfc00 - 0x80712c0 - ad0s3a - 4 - - 0x80b9480 - 0x80bfc00 - 0x80bf780 - r0w0e0 - - - - 0x80bfb80 - 0x80712c0 - ad0s2c - 4 - - 0x80b9440 - 0x80bfb80 - 0x80bf600 - r0w0e0 - - - - 0x80bfb00 - 0x80712c0 - ad0s1f - 4 - - 0x80b9400 - 0x80bfb00 - 0x80bf480 - r0w0e0 - - - - 0x80bfa80 - 0x80712c0 - ad0s1e - 4 - - 0x80b93c0 - 0x80bfa80 - 0x80bf400 - r0w0e0 - - - - 0x80bfa00 - 0x80712c0 - ad0s1c - 4 - - 0x80b9380 - 0x80bfa00 - 0x80bf380 - r0w0e0 - - - - 0x80bf980 - 0x80712c0 - ad0s1b - 4 - - 0x80b9340 - 0x80bf980 - 0x80bf300 - r0w0e0 - - - - 0x80bf900 - 0x80712c0 - ad0s1a - 4 - - 0x80b9300 - 0x80bf900 - 0x80bf280 - r0w0e0 - - - - 0x80bf680 - 0x80712c0 - ad0s3 - 3 - - 0x80b9280 - 0x80bf680 - 0x80bf100 - r0w0e0 - - - - 0x80bf500 - 0x80712c0 - ad0s2 - 3 - - 0x80b9200 - 0x80bf500 - 0x80bf080 - r0w0e0 - - - - 0x80bf180 - 0x80712c0 - ad0s1 - 3 - - 0x80b9180 - 0x80bf180 - 0x80bf000 - r0w0e0 - - - - 0x80b9080 - 0x80712c0 - ad0 - 2 - - 0x80b90c0 - 0x80b9080 - 0x80b9040 - r0w0e0 - - - - - 0x8071280 - MBREXT-method - - - 0x8071260 - MBR-method - - 0x80b9100 - 0x8071260 - ad0 - 2 - - - - 0x80b9140 - 0x80b9100 - 0x80b9040 - r0w0e0 - - - - - 0x80bf100 - 0x80b9100 - r0w0e0 - ad0s3 - - 2 - 8585256960 - 16768080 - 8585256960 - 16768080 - 165 - - - - 0x80bf080 - 0x80b9100 - r0w0e0 - ad0s2 - - 1 - 5364817920 - 10478160 - 3220439040 - 6289920 - 165 - - - - 0x80bf000 - 0x80b9100 - r0w0e0 - ad0s1 - - 0 - 3220406784 - 6289857 - 32256 - 63 - 165 - - - - - - 0x80712a0 - BSD-method - - 0x80bf700 - 0x80712a0 - ad0s3 - 3 - - - - 0x80b92c0 - 0x80bf700 - 0x80bf100 - r0w0e0 - - - - - 0x80bf880 - 0x80bf700 - r0w0e0 - ad0s3d - - 3 - 6488104960 - 12672080 - 10682408960 - 20864080 - - - - 0x80bf800 - 0x80bf700 - r0w0e0 - ad0s3c - - 2 - 8585256960 - 16768080 - 8585256960 - 16768080 - - - - 0x80bf780 - 0x80bf700 - r0w0e0 - ad0s3a - - 0 - 2097152000 - 4096000 - 8585256960 - 16768080 - - - - - 0x80bf580 - 0x80712a0 - ad0s2 - 3 - - - - 0x80b9240 - 0x80bf580 - 0x80bf080 - r0w0e0 - - - - - 0x80bf600 - 0x80bf580 - r0w0e0 - ad0s2c - - 2 - 5364817920 - 10478160 - 3220439040 - 6289920 - - - - - 0x80bf200 - 0x80712a0 - ad0s1 - 3 - - - - 0x80b91c0 - 0x80bf200 - 0x80bf000 - r0w0e0 - - - - - 0x80bf480 - 0x80bf200 - r0w0e0 - ad0s1f - - 5 - 2066973184 - 4037057 - 1153465856 - 2252863 - - - - 0x80bf400 - 0x80bf200 - r0w0e0 - ad0s1e - - 4 - 524288000 - 1024000 - 629177856 - 1228863 - - - - 0x80bf380 - 0x80bf200 - r0w0e0 - ad0s1c - - 2 - 3220406784 - 6289857 - 32256 - 63 - - - - 0x80bf300 - 0x80bf200 - r0w0e0 - ad0s1b - - 1 - 524288000 - 1024000 - 104889856 - 204863 - - - - 0x80bf280 - 0x80bf200 - r0w0e0 - ad0s1a - - 0 - 104857600 - 204800 - 32256 - 63 - - - - - - 0x80711c0 - SIMDISK-method - - 0x80b9000 - 0x80711c0 - ad0 - 1 - - 0x80b9040 - 0x80b9000 - r0w0e0 - ad0 - - - - Property changes on: user/ngie/more-tests2/sbin/geom/core/tests/ConfCmp/a1d.conf ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: user/ngie/more-tests2/sbin/geom/core/tests/ConfCmp/a2d.conf =================================================================== --- user/ngie/more-tests2/sbin/geom/core/tests/ConfCmp/a2d.conf (revision 293822) +++ user/ngie/more-tests2/sbin/geom/core/tests/ConfCmp/a2d.conf (nonexistent) @@ -1,211 +0,0 @@ - - $FreeBSD$ - - DEV-class - - - wd0s1f - 4 - - - - r0w0e0 - - - - - wd0s1e - 4 - - - - r0w0e0 - - - - - wd0s1c - 4 - - - - r0w0e0 - - - - - wd0s1b - 4 - - - - r0w0e0 - - - - - wd0s1a - 4 - - - - r0w0e0 - - - - r0w0e0 - - - - - wd0s1 - 3 - - - - r0w0e0 - - - - - wd0 - 2 - - - - r0w0e0 - - - - - PC98-class - - - wd0 - 2 - - 8704 - - - - - r0w0e0 - - - - - - r0w0e0 - wd0s1 - - 0 - 1626533888 - 3176824 - 69632 - 136 - - - - - - SUNLABEL-class - - - MBREXT-class - - - MBR-class - - - BSD-class - - - wd0s1 - 3 - - 512 - 8192 - - - - - r0w0e0 - - - - - - r0w0e0 - wd0s1f - - 5 - 1390673920 - 2716160 - 235929600 - 460800 - - - - - r0w0e0 - wd0s1e - - 4 - 52428800 - 102400 - 183500800 - 358400 - - - - - r0w0e0 - wd0s1c - - 2 - 1626603520 - 3176960 - 0 - 0 - - - - - r0w0e0 - wd0s1b - - 1 - 104857600 - 204800 - 78643200 - 153600 - - - - - r0w0e0 - wd0s1a - - 0 - 78643200 - 153600 - 0 - 0 - - - - - - SIMDISK-class - - - wd0 - 1 - - - r0w0e0 - wd0 - - - - Property changes on: user/ngie/more-tests2/sbin/geom/core/tests/ConfCmp/a2d.conf ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: user/ngie/more-tests2/sbin/geom/core/tests/ConfCmp/Makefile =================================================================== --- user/ngie/more-tests2/sbin/geom/core/tests/ConfCmp/Makefile (revision 293822) +++ user/ngie/more-tests2/sbin/geom/core/tests/ConfCmp/Makefile (nonexistent) @@ -1,43 +0,0 @@ -# $FreeBSD$ - -BINDIR= ${TESTSBASE}/sbin/geom/core/ConfCmp - -PROG= ConfCmp -SRCS+= ConfCmp.c -SRCS+= subr_sbuf.c - -.PATH: ${SRCTOP}/sys/kern - -# Uncomment for ElectricFence -#LDADD+= -lefence -L/usr/local/lib - -DPADD+= ${LIBBSDXML} -LDADD+= -lbsdxml - -LDFLAGS+= -static - -MAN= -CLEANFILES+= _* - -# XXX: this should be in a test script -check: .PHONY -check: ${PROG} - cd ${.CURDIR} && env PATH="$$PATH:${.OBJDIR}" ${MAKE} _check - -_check: .PHONY -_check: ${PROG} - rm -f _* *.core - cd ${.CURDIR}; ${PROG} a1.conf a1.conf - cd ${.CURDIR}; ${PROG} a1.conf a1a.conf - cd ${.CURDIR}; if ${PROG} a1.conf a1b.conf > /dev/null 2>&1 ; then exit 1 ; fi - cd ${.CURDIR}; if ${PROG} a1.conf a1c.conf > /dev/null 2>&1 ; then exit 1 ; fi - cd ${.CURDIR}; if ${PROG} a1.conf a1d.conf > /dev/null 2>&1 ; then exit 1 ; fi - cd ${.CURDIR}; ${PROG} a2.conf a2.conf - cd ${.CURDIR}; ${PROG} a2.conf a2a.conf - cd ${.CURDIR}; if ${PROG} a2.conf a2b.conf > /dev/null 2>&1 ; then exit 1 ; fi - cd ${.CURDIR}; if ${PROG} a2.conf a2c.conf > /dev/null 2>&1 ; then exit 1 ; fi - cd ${.CURDIR}; if ${PROG} a2.conf a2d.conf > /dev/null 2>&1 ; then exit 1 ; fi - -WARNS?= 5 - -.include Property changes on: user/ngie/more-tests2/sbin/geom/core/tests/ConfCmp/Makefile ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: user/ngie/more-tests2/sbin/geom/core/tests/Ref/disk.flat.da1.xml =================================================================== --- user/ngie/more-tests2/sbin/geom/core/tests/Ref/disk.flat.da1.xml (revision 293822) +++ user/ngie/more-tests2/sbin/geom/core/tests/Ref/disk.flat.da1.xml (nonexistent) @@ -1,10 +0,0 @@ -$FreeBSD$ -/dev/md34 512 37888 74 0 0 -/dev/md34a 512 37748736 73728 0 0 -/dev/md34b 512 268435456 524288 0 0 -/dev/md34h 512 8115978240 15851520 0 0 -/dev/md34s1 512 18367017984 35873082 0 0 -/dev/md34s1b 512 419430400 819200 0 0 -/dev/md34s1e 512 419430400 819200 0 0 -/dev/md34s1f 512 1073741824 2097152 0 0 -/dev/md34s1g 512 16454415360 32137530 0 0 Property changes on: user/ngie/more-tests2/sbin/geom/core/tests/Ref/disk.flat.da1.xml ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: user/ngie/more-tests2/sbin/geom/core/tests/Ref/disk.pc98.wdc0.xml =================================================================== --- user/ngie/more-tests2/sbin/geom/core/tests/Ref/disk.pc98.wdc0.xml (revision 293822) +++ user/ngie/more-tests2/sbin/geom/core/tests/Ref/disk.pc98.wdc0.xml (nonexistent) @@ -1,7 +0,0 @@ -$FreeBSD$ -/dev/md34 512 75264 147 0 0 1 8 17 -/dev/md34s1 512 1626603520 3176960 23360 0 0 8 17 -/dev/md34s1a 512 78643200 153600 1129 0 0 8 17 -/dev/md34s1b 512 104857600 204800 1505 0 0 8 17 -/dev/md34s1e 512 52428800 102400 752 0 0 8 17 -/dev/md34s1f 512 1390673920 2716160 19971 0 0 8 17 Property changes on: user/ngie/more-tests2/sbin/geom/core/tests/Ref/disk.pc98.wdc0.xml ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: user/ngie/more-tests2/sbin/geom/core/tests/Ref/disk.msdos.flp.xml =================================================================== --- user/ngie/more-tests2/sbin/geom/core/tests/Ref/disk.msdos.flp.xml (revision 293822) +++ user/ngie/more-tests2/sbin/geom/core/tests/Ref/disk.msdos.flp.xml (nonexistent) @@ -1,2 +0,0 @@ -$FreeBSD$ -/dev/md34 512 5632 11 0 0 Property changes on: user/ngie/more-tests2/sbin/geom/core/tests/Ref/disk.msdos.flp.xml ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: user/ngie/more-tests2/sbin/geom/core/tests/Ref/disk.sun.da0.xml =================================================================== --- user/ngie/more-tests2/sbin/geom/core/tests/Ref/disk.sun.da0.xml (revision 293822) +++ user/ngie/more-tests2/sbin/geom/core/tests/Ref/disk.sun.da0.xml (nonexistent) @@ -1,5 +0,0 @@ -$FreeBSD$ -/dev/md34 512 5120 10 0 0 -/dev/md34a 512 1529708544 2987712 0 0 -/dev/md34b 512 539320320 1053360 0 0 -/dev/md34h 512 34629267456 67635288 0 0 Property changes on: user/ngie/more-tests2/sbin/geom/core/tests/Ref/disk.sun.da0.xml ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: user/ngie/more-tests2/sbin/geom/core/tests/Ref/disk.sun.da1.xml =================================================================== --- user/ngie/more-tests2/sbin/geom/core/tests/Ref/disk.sun.da1.xml (revision 293822) +++ user/ngie/more-tests2/sbin/geom/core/tests/Ref/disk.sun.da1.xml (nonexistent) @@ -1,8 +0,0 @@ -$FreeBSD$ -/dev/md34 512 5120 10 0 0 -/dev/md34a 512 262967296 513608 0 0 -/dev/md34b 512 1075994624 2101552 0 0 -/dev/md34d 512 11124240384 21727032 0 0 -/dev/md34f 512 2149576704 4198392 0 0 -/dev/md34g 512 2149576704 4198392 0 0 -/dev/md34h 512 1343787008 2624584 0 0 Property changes on: user/ngie/more-tests2/sbin/geom/core/tests/Ref/disk.sun.da1.xml ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: user/ngie/more-tests2/sbin/geom/core/tests/Ref/disk.empty.flp.xml =================================================================== --- user/ngie/more-tests2/sbin/geom/core/tests/Ref/disk.empty.flp.xml (revision 293822) +++ user/ngie/more-tests2/sbin/geom/core/tests/Ref/disk.empty.flp.xml (nonexistent) @@ -1,2 +0,0 @@ -$FreeBSD$ -/dev/md34 512 1474560 2880 0 0 80 2 18 Property changes on: user/ngie/more-tests2/sbin/geom/core/tests/Ref/disk.empty.flp.xml ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: user/ngie/more-tests2/sbin/geom/core/tests/Ref/disk.critter.ad0.xml =================================================================== --- user/ngie/more-tests2/sbin/geom/core/tests/Ref/disk.critter.ad0.xml (revision 293822) +++ user/ngie/more-tests2/sbin/geom/core/tests/Ref/disk.critter.ad0.xml (nonexistent) @@ -1,10 +0,0 @@ -$FreeBSD$ -/dev/md34 512 2671841280 5218440 0 0 -/dev/md34s1 512 20003848704 39070017 0 0 -/dev/md34s1a 512 1073741824 2097152 0 0 -/dev/md34s1b 512 1073741824 2097152 0 0 -/dev/md34s1d 512 4447175168 8685889 0 0 -/dev/md34s1e 512 524288000 1024000 0 0 -/dev/md34s1f 512 4294967296 8388608 0 0 -/dev/md34s1g 512 3221225472 6291456 0 0 -/dev/md34s1h 512 5368709120 10485760 0 0 Property changes on: user/ngie/more-tests2/sbin/geom/core/tests/Ref/disk.critter.ad0.xml ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: user/ngie/more-tests2/sbin/geom/core/tests/Ref/disk.alpha2.da0.xml =================================================================== --- user/ngie/more-tests2/sbin/geom/core/tests/Ref/disk.alpha2.da0.xml (revision 293822) +++ user/ngie/more-tests2/sbin/geom/core/tests/Ref/disk.alpha2.da0.xml (nonexistent) @@ -1,4 +0,0 @@ -$FreeBSD$ -/dev/md34 512 5120 10 0 0 -/dev/md34a 512 24675840 48195 0 0 -/dev/md34b 512 4178442240 8161020 0 0 Property changes on: user/ngie/more-tests2/sbin/geom/core/tests/Ref/disk.alpha2.da0.xml ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: user/ngie/more-tests2/sbin/geom/core/tests/Ref/disk.alpha.da0.xml =================================================================== --- user/ngie/more-tests2/sbin/geom/core/tests/Ref/disk.alpha.da0.xml (revision 293822) +++ user/ngie/more-tests2/sbin/geom/core/tests/Ref/disk.alpha.da0.xml (nonexistent) @@ -1,6 +0,0 @@ -$FreeBSD$ -/dev/md34 512 5120 10 0 0 -/dev/md34a 512 251658240 491520 0 0 -/dev/md34b 512 1086291968 2121664 0 0 -/dev/md34e 512 20971520 40960 0 0 -/dev/md34f 512 16951073792 33107566 0 0 Property changes on: user/ngie/more-tests2/sbin/geom/core/tests/Ref/disk.alpha.da0.xml ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: user/ngie/more-tests2/sbin/geom/core/tests/Ref/disk.msdos.ext.xml =================================================================== --- user/ngie/more-tests2/sbin/geom/core/tests/Ref/disk.msdos.ext.xml (revision 293822) +++ user/ngie/more-tests2/sbin/geom/core/tests/Ref/disk.msdos.ext.xml (nonexistent) @@ -1,27 +0,0 @@ -$FreeBSD$ -/dev/md34 512 2327759360 4546405 0 0 -/dev/md34s1 512 2146765824 4192902 0 0 -/dev/md34s10 512 8193024 16002 0 0 -/dev/md34s11 512 8193024 16002 0 0 -/dev/md34s12 512 8193024 16002 0 0 -/dev/md34s13 512 8193024 16002 0 0 -/dev/md34s14 512 8193024 16002 0 0 -/dev/md34s15 512 8193024 16002 0 0 -/dev/md34s16 512 8193024 16002 0 0 -/dev/md34s17 512 8193024 16002 0 0 -/dev/md34s18 512 8193024 16002 0 0 -/dev/md34s19 512 8193024 16002 0 0 -/dev/md34s2 512 427714560 835380 0 0 -/dev/md34s20 512 8193024 16002 0 0 -/dev/md34s21 512 8193024 16002 0 0 -/dev/md34s22 512 8193024 16002 0 0 -/dev/md34s23 512 8193024 16002 0 0 -/dev/md34s24 512 8193024 16002 0 0 -/dev/md34s25 512 8193024 16002 0 0 -/dev/md34s26 512 8193024 16002 0 0 -/dev/md34s27 512 8193024 16002 0 0 -/dev/md34s5 512 8193024 16002 0 0 -/dev/md34s6 512 8193024 16002 0 0 -/dev/md34s7 512 8193024 16002 0 0 -/dev/md34s8 512 8193024 16002 0 0 -/dev/md34s9 512 8193024 16002 0 0 Property changes on: user/ngie/more-tests2/sbin/geom/core/tests/Ref/disk.msdos.ext.xml ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: user/ngie/more-tests2/sbin/geom/core/tests/Ref/disk.kern.flp.xml =================================================================== --- user/ngie/more-tests2/sbin/geom/core/tests/Ref/disk.kern.flp.xml (revision 293822) +++ user/ngie/more-tests2/sbin/geom/core/tests/Ref/disk.kern.flp.xml (nonexistent) @@ -1,4 +0,0 @@ -$FreeBSD$ -/dev/md34 512 5632 11 0 0 -/dev/md34a 512 1474560 2880 0 0 -/dev/md34b 512 1474560 2880 0 0 Property changes on: user/ngie/more-tests2/sbin/geom/core/tests/Ref/disk.kern.flp.xml ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: user/ngie/more-tests2/sbin/geom/core/tests/Ref/disk.beast.da0.xml =================================================================== --- user/ngie/more-tests2/sbin/geom/core/tests/Ref/disk.beast.da0.xml (revision 293822) +++ user/ngie/more-tests2/sbin/geom/core/tests/Ref/disk.beast.da0.xml (nonexistent) @@ -1,4 +0,0 @@ -$FreeBSD$ -/dev/md34 512 5120 10 0 0 -/dev/md34a 512 4064280576 7938048 0 0 -/dev/md34b 512 270925824 529152 0 0 Property changes on: user/ngie/more-tests2/sbin/geom/core/tests/Ref/disk.beast.da0.xml ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: user/ngie/more-tests2/sbin/geom/core/tests/Ref/Makefile =================================================================== --- user/ngie/more-tests2/sbin/geom/core/tests/Ref/Makefile (revision 293822) +++ user/ngie/more-tests2/sbin/geom/core/tests/Ref/Makefile (nonexistent) @@ -1,21 +0,0 @@ -# $FreeBSD$ - -FILES+= disk.alpha.da0.xml -FILES+= disk.alpha2.da0.xml -FILES+= disk.apple.xml -FILES+= disk.beast.da0.xml -FILES+= disk.critter.ad0.xml -FILES+= disk.empty.flp.xml -FILES+= disk.far.ad0.xml -FILES+= disk.flat.da1.xml -FILES+= disk.kern.flp.xml -FILES+= disk.msdos.ext.xml -FILES+= disk.msdos.flp.xml -FILES+= disk.pc98.wdc0.xml -FILES+= disk.sun.da0.xml -FILES+= disk.sun.da1.xml -FILES+= disk.typo.ad0.xml - -FILESDIR= ${TESTSBASE}/sbin/geom/core/Ref - -.include Property changes on: user/ngie/more-tests2/sbin/geom/core/tests/Ref/Makefile ___________________________________________________________________ Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: user/ngie/more-tests2/sbin/geom/core/tests/Ref/disk.typo.ad0.xml =================================================================== --- user/ngie/more-tests2/sbin/geom/core/tests/Ref/disk.typo.ad0.xml (revision 293822) +++ user/ngie/more-tests2/sbin/geom/core/tests/Ref/disk.typo.ad0.xml (nonexistent) @@ -1,11 +0,0 @@ -$FreeBSD$ -/dev/md34 512 8585262592 16768091 0 0 -/dev/md34s1 512 3220406784 6289857 0 0 -/dev/md34s1a 512 104857600 204800 0 0 -/dev/md34s1b 512 524288000 1024000 0 0 -/dev/md34s1e 512 524288000 1024000 0 0 -/dev/md34s1f 512 2066973184 4037057 0 0 -/dev/md34s2 512 5364817920 10478160 0 0 -/dev/md34s3 512 8585256960 16768080 0 0 -/dev/md34s3a 512 2097152000 4096000 0 0 -/dev/md34s3d 512 6488104960 12672080 0 0 Property changes on: user/ngie/more-tests2/sbin/geom/core/tests/Ref/disk.typo.ad0.xml ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: user/ngie/more-tests2/sbin/geom/core/tests/Ref/disk.apple.xml =================================================================== --- user/ngie/more-tests2/sbin/geom/core/tests/Ref/disk.apple.xml (revision 293822) +++ user/ngie/more-tests2/sbin/geom/core/tests/Ref/disk.apple.xml (nonexistent) @@ -1,5 +0,0 @@ -$FreeBSD$ -/dev/md34 512 366530560 715880 0 0 -/dev/md34s1 512 366481408 715784 0 0 -/dev/md34s2 512 32256 63 0 0 -/dev/md34s3 512 16384 32 0 0 Property changes on: user/ngie/more-tests2/sbin/geom/core/tests/Ref/disk.apple.xml ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: user/ngie/more-tests2/sbin/geom/core/tests/Ref/disk.far.ad0.xml =================================================================== --- user/ngie/more-tests2/sbin/geom/core/tests/Ref/disk.far.ad0.xml (revision 293822) +++ user/ngie/more-tests2/sbin/geom/core/tests/Ref/disk.far.ad0.xml (nonexistent) @@ -1,4 +0,0 @@ -$FreeBSD$ -/dev/md34 512 5632 11 0 0 -/dev/md34s1 512 296821760 579730 0 0 -/dev/md34s2 512 4564740096 8915508 0 0 Property changes on: user/ngie/more-tests2/sbin/geom/core/tests/Ref/disk.far.ad0.xml ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: user/ngie/more-tests2/sbin/geom/core/tests/Data/disk.flat.da1.xml =================================================================== --- user/ngie/more-tests2/sbin/geom/core/tests/Data/disk.flat.da1.xml (revision 293822) +++ user/ngie/more-tests2/sbin/geom/core/tests/Data/disk.flat.da1.xml (nonexistent) @@ -1,97 +0,0 @@ - - - - $FreeBSD$ - This image contains an interesting setup: there is an MBR+BSD - but also another BSD at sector one which is valid but bogus. - - 512 - 0 - 0 - 0 - 0 - - 0 - - fc31c08ec08ed88ed0bc007cbe1a7cbf1a06b9e601f3a4e9008a31f6bbbe07b1 - 04382f74087f7885f6757489de80c310e2ef85f67502cd1880fa80720b8a3675 - 0480c68038f272028a1489e78a74018b4c02bb007c80feff753283f9ff752d51 - 53bbaa55b441cd13722081fb55aa751af6c10174155b666a0066ff740806536a - 016a1089e6b80042eb055b59b80102cd1389fc720f81bffe0155aa750cffe3be - bc06eb11bed406eb0cbef306eb07bb0700b40ecd10ac84c075f4ebfe496e7661 - 6c696420706172746974696f6e207461626c65004572726f72206c6f6164696e - 67206f7065726174696e672073797374656d004d697373696e67206f70657261 - 74696e672073797374656d000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000008001 - 0100a5feffff3f0000003a612302000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000000000000000000055aa - - - - 512 - - 5745568204000000534541474154452053543331383433360000000000000000 - 000000000000000000020000000800000100000072440000000800000004fb00 - 0000000000000000100e01000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000057455682e29908000020000000200000002001000000000000040000 - 07081000000008000020010000000000010000000004fb000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000e0f100002009000004000007081000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - - - - 32256 - - eb1b9090161f666a005150065331c088f0506a1089e5e8c7008d6610cbfc31c9 - 8ec18ed98ed1bc007c89e6bf0007fec5f3a5beee7d80fa80722cb601e86700b9 - 0100bebe8db601807c04a57507e319f60480751483c610fec680fe0572e949e3 - e1be8b7deb5231d289160009b610e83500bb00908b770a01debf00b0b900ac29 - f1f3a429f930c0f3aae80300e98113fae464a80275fab0d1e664e464a80275fa - b0dfe660fbc3bb008c8b44088b4c0a0ee853ff732abe867de81c00be907de816 - 0030e4cd16c70672043412ea0000ffffbb0700b40ecd10ac84c075f4b401f9c3 - 52b408cd1388f55a72f580e13f74edfa668b460852660fb6d96631d266f7f388 - eb88d54330d266f7f388d75a663dff030000fb774486c4c0c80208e8409188fe - 28e08a660238e0720288e0bf0500c45e0450b402cd135b730a4f741c30e4cd13 - 93ebeb0fb6c30146087303ff460ad0e3005e052846027788c32ef6069908800f - 8479ffbbaa5552b441cd135a0f826fff81fb55aa0f8564fff6c1010f845dff89 - eeb442cd13c35265616400426f6f7400206572726f720d0a0080909090909090 - 9090909090909090909090909090909090909090909090909090909090900000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000080000100a5ffffff0000000050c3000055aa - - - - 32768 - - 5745568204000000646131733100000000000000000000000000000000000000 - 0000000000000000000200003f000000ff000000b8080000c13e00003a612302 - 0000000000000000100e01000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000005745568233c408000020000000200000000000000000000000000000 - 0000000000800c003f800c0000000000010000003a6123023f00000000000000 - 000000000000000000000000000000000000000000800c003f00000000040000 - 07081600000020003f00190000040000070816003a61ea013f00390000040000 - 0708160000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - - - Property changes on: user/ngie/more-tests2/sbin/geom/core/tests/Data/disk.flat.da1.xml ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: user/ngie/more-tests2/sbin/geom/core/tests/Data/disk.pc98.wdc0.xml =================================================================== --- user/ngie/more-tests2/sbin/geom/core/tests/Data/disk.pc98.wdc0.xml (revision 293822) +++ user/ngie/more-tests2/sbin/geom/core/tests/Data/disk.pc98.wdc0.xml (nonexistent) @@ -1,75 +0,0 @@ - - - $FreeBSD$ - - A PC98 disklabel from Warner - - 512 - 0 - 17 - 8 - 0 - - 0 - - e9fd009049504c310000001ea08405b48ecd1ba820742232dbb414cd1b721a80 - fb847515e896007303eb6b90b424bb0004b93012ba4001cd1bbb0001b484cd1b - b40633c933d2508cc82dc0038ec05833edcd1b7241b406ba010081c50008cd1b - 7234ba0400f7c300aa7403ba0200b406bb001c81c50008cd1b721b508bc5b104 - d3e88cc103c18bf058e815002e89360a002eff1e0800e80800b40ecd1bb90100 - cb56a0840532dbb414cd1b720e80fb8475092ec606d40000e802005ec3b4b0be - d000ba06001e0e1fcd1bb4b0cd1b1fc31e000000010000000000000000000000 - 000000000000000000000000000000000000000000000000000000000d0055aa - fa601e066800d81f33f6b51e813c8b46750e817c0204eb7507817c05b4007405 - 46e2e9eb6032ff8a5c040358f18d7c03be9a012e015c03b00cba6104eeb002ba - 3d05ee68009807b95b00f32ea4b9ff0f33f633d226ad02f402d0e2f8f6def6da - 268914b416b3c2e4f0a840750680cc2080cb048ac3ba3f04ee8ac4ba3d05eeb0 - 08ba6104ee071f612ec7060000eb0a2ec70602009090fbe966fec390e8ebffb9 - 21007402b1118bc1f6660702460612e5912ef66703f7660403c183d200c3fec2 - 26881605205926880e0a20c390909090905191b81100502ef6670291f7f126a3 - 0220599233d2f7f12680260420f02608060420ebc9000000000080010d0055aa - - - - 512 - - 94c4000000000100000001000000405b46726565425344000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - - - - 70144 - - 5745568205000000776430733100000000000000000000000000000000000000 - 0000000000000000000200001100000008000000415b000088000000887a3000 - 0000000000000000100e01000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000005745568295f208000020000000200000005802008800000000000000 - 0700000000200300885802000000000001000000007a30008800000000000000 - 0000000000000000000000000000000000000000009001008878050000000000 - 0700000000722900880807000000000007000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - - - Property changes on: user/ngie/more-tests2/sbin/geom/core/tests/Data/disk.pc98.wdc0.xml ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: user/ngie/more-tests2/sbin/geom/core/tests/Data/disk.msdos.flp.xml =================================================================== --- user/ngie/more-tests2/sbin/geom/core/tests/Data/disk.msdos.flp.xml (revision 293822) +++ user/ngie/more-tests2/sbin/geom/core/tests/Data/disk.msdos.flp.xml (nonexistent) @@ -1,51 +0,0 @@ - - - - $FreeBSD$ - A MSDOS floppy image. - - 512 - 0 - - 0 - - eb3c904d53444f53352e30000201010002e000400bf009001200020000000000 - 0000000000002911053b114e4f204e414d45202020204641543132202020fa33 - c08ed0bc007c1607bb780036c5371e561653bf3e7cb90b00fcf3a4061fc645fe - 0f8b0e187c884df9894702c7073e7cfbcd13727933c03906137c74088b0e137c - 890e207ca0107cf726167c03061c7c13161e7c03060e7c83d200a3507c891652 - 7ca3497c89164b7cb82000f726117c8b1e0b7c03c348f7f30106497c83164b7c - 00bb00058b16527ca1507ce89200721db001e8ac0072168bfbb90b00bee67df3 - a6750a8d7f20b90b00f3a67418be9e7de85f0033c0cd165e1f8f048f4402cd19 - 585858ebe88b471a48488a1e0d7c32fff7e30306497c13164b7cbb0007b90300 - 505251e83a0072d8b001e85400595a5872bb05010083d200031e0b7ce2e28a2e - 157c8a16247c8b1e497ca14b7cea00007000ac0ac07429b40ebb0700cd10ebf2 - 3b16187c7319f736187cfec288164f7c33d2f7361a7c8816257ca34d7cf8c3f9 - c3b4028b164d7cb106d2e60a364f7c8bca86e98a16247c8a36257ccd13c30d0a - 4e6f6e2d53797374656d206469736b206f72206469736b206572726f720d0a52 - 65706c61636520616e6420707265737320616e79206b6579207768656e207265 - 6164790d0a00494f2020202020205359534d53444f53202020535953000055aa - - - - 512 - - f0ffff03400005600007800009a0000bc0000de0000f00011120011340011560 - 0117800119a0011bc0011de0011f000221200223400225600227800229a0022b - c0022de0022f000331200333400335600337800339a0033bc0033de0033f0004 - 41200443400445600447800449a0044bc0044de0044f000551f0ff5340055560 - 0557800559a0055bc0055de0055f000661200663400665600667800669a0066b - c0066de0066f000771200773400775600777800779a0077bc0077de0077f0008 - 81200883400885600887800889a0088bc0088de0088f00099120099340099560 - 0997800999a0099bc009ffef099f000aa1200aa3400aa5600aa7800aa9a00aab - c00aade00aaf000bb1200bb3400bb5600bb7800bb9a00bbbc00bbde00bbf000c - c1200cc3400cc5600cc7800cc9a00ccbc00ccde00ccf000dd1200dd3400dd560 - 0dd7800dd9a00ddbc00ddde00ddf000ee1200ee3400ee5600ee7800ee9a00eeb - c00eede00eef000ff1200ff3400ff5600ff7800ff9a00ffbc00ffde00fff0010 - 01211003411005611007f1ff09a1100bc1100de1100f01111121111341111561 - 1117811119a1111bc1111de1111f011221211223411225611227811229a1122b - c1122de1122f011331211333411335611337811339a1133bc1133de1133f0114 - 41211443411445611447811449a1144bc1144de1144f01155121155341155561 - - - Property changes on: user/ngie/more-tests2/sbin/geom/core/tests/Data/disk.msdos.flp.xml ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: user/ngie/more-tests2/sbin/geom/core/tests/Data/disk.sun.da0.xml =================================================================== --- user/ngie/more-tests2/sbin/geom/core/tests/Data/disk.sun.da0.xml (revision 293822) +++ user/ngie/more-tests2/sbin/geom/core/tests/Data/disk.sun.da0.xml (nonexistent) @@ -1,33 +0,0 @@ - - - - $FreeBSD$ - A Solaris 8 disklabel - - 512 - 0 - 0 - 0 - 0 - - 0 - - 49424d2d444459532d5433363935304d2d533936482063796c20313439373020 - 616c742032206864203132207365632033393900000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000100000000000000000008000200000003000100050000000000000000 - 0000000000000000000000080000003f000000000000000000000000600ddeee - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000027103a7c00000000000000013a7a0002000c018f00000000000000dc - 002d96c000000000001012b0000000000445b1c8000000000000000000000000 - 00000000000000000000000000000000000000000000034c04080858dabe5ec8 - - - Property changes on: user/ngie/more-tests2/sbin/geom/core/tests/Data/disk.sun.da0.xml ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: user/ngie/more-tests2/sbin/geom/core/tests/Data/disk.sun.da1.xml =================================================================== --- user/ngie/more-tests2/sbin/geom/core/tests/Data/disk.sun.da1.xml (revision 293822) +++ user/ngie/more-tests2/sbin/geom/core/tests/Data/disk.sun.da1.xml (nonexistent) @@ -1,33 +0,0 @@ - - - - $FreeBSD$ - A Solaris 8 disklabel - - 512 - 0 - 0 - 0 - 0 - - 0 - - 53554e3138472063796c203735303620616c7420322068642031392073656320 - 3234380000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000170686b00000000000008000200000003000100050000000800010000 - 00000007000000040000000800000000000000000000000000000000600ddeee - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000001c201d5400000000000000011d520002001300f80000000000000000 - 0007d6480000006d0020113000000000021bad5000000b4e014b873800000000 - 000000000000022b00400ff8000005a600400ff80000092100280c48dabe971e - - - Property changes on: user/ngie/more-tests2/sbin/geom/core/tests/Data/disk.sun.da1.xml ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: user/ngie/more-tests2/sbin/geom/core/tests/Data/disk.empty.flp.xml =================================================================== --- user/ngie/more-tests2/sbin/geom/core/tests/Data/disk.empty.flp.xml (revision 293822) +++ user/ngie/more-tests2/sbin/geom/core/tests/Data/disk.empty.flp.xml (nonexistent) @@ -1,12 +0,0 @@ - - - - $FreeBSD$ - An empty floppy disk - - 512 - 1474560 - 18 - 2 - 80 - Property changes on: user/ngie/more-tests2/sbin/geom/core/tests/Data/disk.empty.flp.xml ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: user/ngie/more-tests2/sbin/geom/core/tests/Data/disk.critter.ad0.xml =================================================================== --- user/ngie/more-tests2/sbin/geom/core/tests/Data/disk.critter.ad0.xml (revision 293822) +++ user/ngie/more-tests2/sbin/geom/core/tests/Data/disk.critter.ad0.xml (nonexistent) @@ -1,178 +0,0 @@ - - - - $FreeBSD$ - This image contains the MBR and disklabel sectors from my Asus M1300 - laptop. - - 512 - 0 - - 0 - - fc31c08ec08ed88ed0bc007cbe1a7cbf1a06b9e601f3a4e9008a31f6bbbe07b1 - 04382f74087f7885f6757489de80c310e2ef85f67502cd1880fa80720b8a3675 - 0480c68038f272028a1489e78a74018b4c02bb007c80feff753283f9ff752d51 - 53bbaa55b441cd13722081fb55aa751af6c10174155b666a0066ff740806536a - 016a1089e6b80042eb055b59b80102cd1389fc720f81bffe0155aa750cffe3be - bc06eb11bed406eb0cbef306eb07bb0700b40ecd10ac84c075f4ebfe496e7661 - 6c696420706172746974696f6e207461626c65004572726f72206c6f6164696e - 67206f7065726174696e672073797374656d004d697373696e67206f70657261 - 74696e672073797374656d000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000008001 - 0100a50fffff3f00000041295402000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000000000000000000055aa - - - - 512 - - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - - - - 32768 - - 5745568205000000616430733100000000000000000000000000000000000000 - 0000000000000000000200003f0000001000000067970000f003000041295402 - 0000000000000000100e01000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000574556824fa608000020000000200000000020003f00000000040000 - 07081600000020003f0020000000000001000000412954023f00000000000000 - 00000000418984003fa0cf01000400000708160000a00f003f00400000040000 - 07081600000080003fa04f000004000007081600000060003fa0cf0000040000 - 070816000000a0003fa02f010004000007081600000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - - - - 64512 - - ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff - ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff - ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff - ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff - ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff - ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff - ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff - ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff - ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff - ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff - ffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - - - - 1073806336 - - 4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f - 4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f - 4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f - 4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f - 4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f - 4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f - 4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f - 4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f - 4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f - 4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f - 4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f - 4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f - 4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f - 4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f - 4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f - 4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f - - - - 1598094336 - - 4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f - 4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f - 4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f - 4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f - 4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f - 4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f - 4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f - 4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f - 4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f - 4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f - 4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f - 4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f - 4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f - 4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f - 4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f - 4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f - - - - 2147548160 - - ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff - ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff - ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff - ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff - ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff - ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff - ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff - ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff - ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff - ffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - - - - 2671836160 - - ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff - ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff - ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff - ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff - ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff - ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff - ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff - ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff - ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff - ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff - ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff - ffffffffffffffffffffffffffffffff00000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - - - Property changes on: user/ngie/more-tests2/sbin/geom/core/tests/Data/disk.critter.ad0.xml ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: user/ngie/more-tests2/sbin/geom/core/tests/Data/disk.alpha2.da0.xml =================================================================== --- user/ngie/more-tests2/sbin/geom/core/tests/Data/disk.alpha2.da0.xml (revision 293822) +++ user/ngie/more-tests2/sbin/geom/core/tests/Data/disk.alpha2.da0.xml (nonexistent) @@ -1,33 +0,0 @@ - - - $FreeBSD$ - - alpha label which O'brien says blows up libdisk - - 512 - 0 - 0 - 0 - 0 - - 0 - - 5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a - 5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a - 5745568204000000000000000000000000000000000000000000000000000000 - 0000000000000000000200003f000000ff00000009020000c13e0000c9b67f00 - 0000000000000000100e01000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000005745568219cf0300002000000020000043bc0000c13e000000000000 - 08000000fc867c0004fb00000000000008000000c934020000827d0000000000 - 0100000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000005a5a5a5a5a5a5a5a5a5a5a5a - 5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a - 5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a - 5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a - 5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a - 9800000000000000020000000000000000000000000000007a13ad55a1c382b0 - - - Property changes on: user/ngie/more-tests2/sbin/geom/core/tests/Data/disk.alpha2.da0.xml ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: user/ngie/more-tests2/sbin/geom/core/tests/Data/disk.alpha.da0.xml =================================================================== --- user/ngie/more-tests2/sbin/geom/core/tests/Data/disk.alpha.da0.xml (revision 293822) +++ user/ngie/more-tests2/sbin/geom/core/tests/Data/disk.alpha.da0.xml (nonexistent) @@ -1,33 +0,0 @@ - - - $FreeBSD$ - - Yet an alpha disklabel. - - 512 - 0 - 0 - 0 - 0 - - 0 - - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 574556820400000057444947544c202000000000000000000000000000000000 - 0000000000000000000200003f000000ff000000b2080000c13e00002eae2102 - 0000000000000000100e01000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000057455682a22908000020000000200000008007000000000000040000 - 07081600c05f20000080070000000000010000002eae21020000000000000000 - 000000000000000000000000000000000000000000a00000c0df270000040000 - 070818006e2ef901c07f28000004000007081600000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0e0000000000000001000000000000000000000000000000c51a45ca2ad1dba8 - - - Property changes on: user/ngie/more-tests2/sbin/geom/core/tests/Data/disk.alpha.da0.xml ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: user/ngie/more-tests2/sbin/geom/core/tests/Data/disk.msdos.ext.xml =================================================================== --- user/ngie/more-tests2/sbin/geom/core/tests/Data/disk.msdos.ext.xml (revision 293822) +++ user/ngie/more-tests2/sbin/geom/core/tests/Data/disk.msdos.ext.xml (nonexistent) @@ -1,534 +0,0 @@ - - - - $FreeBSD$ - A MSDOS 6.22 disk with maximal number of extended partitions. - - 512 - 0 - - 0 - - fa33c08ed0bc007c8bf45007501ffbfcbf0006b90001f2a5ea1d060000bebe07 - b304803c80740e803c00751c83c610fecb75efcd188b148b4c028bee83c610fe - cb741a803c0074f4be8b06ac3c00740b56bb0700b40ecd105eebf0ebfebf0500 - bb007cb8010257cd135f730c33c0cd134f75edbea306ebd3bec206bffe7d813d - 55aa75c78bf5ea007c0000496e76616c696420706172746974696f6e20746162 - 6c65004572726f72206c6f6164696e67206f7065726174696e67207379737465 - 6d004d697373696e67206f7065726174696e672073797374656d000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000008001 - 010006fe7f043f00000086fa3f000000410505fe7f38c5fa3f0034bf0c000000 - 00000000000000000000000000000000000000000000000000000000000055aa - - - - 512 - - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - - - - 2146798080 - - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000001 - 410501fe7f053f000000823e00000000410605fe7f06c13e0000c13e00000000 - 00000000000000000000000000000000000000000000000000000000000055aa - - - - 2155023360 - - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000001 - 410601fe7f063f000000823e00000000410705fe7f07827d0000c13e00000000 - 00000000000000000000000000000000000000000000000000000000000055aa - - - - 2163248640 - - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000001 - 410701fe7f073f000000823e00000000410805fe7f0843bc0000c13e00000000 - 00000000000000000000000000000000000000000000000000000000000055aa - - - - 2171473920 - - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000001 - 410801fe7f083f000000823e00000000410905fe7f0904fb0000c13e00000000 - 00000000000000000000000000000000000000000000000000000000000055aa - - - - 2179699200 - - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000001 - 410901fe7f093f000000823e00000000410a05fe7f0ac5390100c13e00000000 - 00000000000000000000000000000000000000000000000000000000000055aa - - - - 2187924480 - - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000001 - 410a01fe7f0a3f000000823e00000000410b05fe7f0b86780100c13e00000000 - 00000000000000000000000000000000000000000000000000000000000055aa - - - - 2196149760 - - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000001 - 410b01fe7f0b3f000000823e00000000410c05fe7f0c47b70100c13e00000000 - 00000000000000000000000000000000000000000000000000000000000055aa - - - - 2204375040 - - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000001 - 410c01fe7f0c3f000000823e00000000410d05fe7f0d08f60100c13e00000000 - 00000000000000000000000000000000000000000000000000000000000055aa - - - - 2212600320 - - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000001 - 410d01fe7f0d3f000000823e00000000410e05fe7f0ec9340200c13e00000000 - 00000000000000000000000000000000000000000000000000000000000055aa - - - - 2220825600 - - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000001 - 410e01fe7f0e3f000000823e00000000410f05fe7f0f8a730200c13e00000000 - 00000000000000000000000000000000000000000000000000000000000055aa - - - - 2229050880 - - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000001 - 410f01fe7f0f3f000000823e00000000411005fe7f104bb20200c13e00000000 - 00000000000000000000000000000000000000000000000000000000000055aa - - - - 2237276160 - - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000001 - 411001fe7f103f000000823e00000000411105fe7f110cf10200c13e00000000 - 00000000000000000000000000000000000000000000000000000000000055aa - - - - 2245501440 - - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000001 - 411101fe7f113f000000823e00000000411205fe7f12cd2f0300c13e00000000 - 00000000000000000000000000000000000000000000000000000000000055aa - - - - 2253726720 - - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000001 - 411201fe7f123f000000823e00000000411305fe7f138e6e0300c13e00000000 - 00000000000000000000000000000000000000000000000000000000000055aa - - - - 2261952000 - - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000001 - 411301fe7f133f000000823e00000000411405fe7f144fad0300c13e00000000 - 00000000000000000000000000000000000000000000000000000000000055aa - - - - 2270177280 - - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000001 - 411401fe7f143f000000823e00000000411505fe7f1510ec0300c13e00000000 - 00000000000000000000000000000000000000000000000000000000000055aa - - - - 2278402560 - - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000001 - 411501fe7f153f000000823e00000000411605fe7f16d12a0400c13e00000000 - 00000000000000000000000000000000000000000000000000000000000055aa - - - - 2286627840 - - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000001 - 411601fe7f163f000000823e00000000411705fe7f1792690400c13e00000000 - 00000000000000000000000000000000000000000000000000000000000055aa - - - - 2294853120 - - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000001 - 411701fe7f173f000000823e00000000411805fe7f1853a80400c13e00000000 - 00000000000000000000000000000000000000000000000000000000000055aa - - - - 2303078400 - - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000001 - 411801fe7f183f000000823e00000000411905fe7f1914e70400c13e00000000 - 00000000000000000000000000000000000000000000000000000000000055aa - - - - 2311303680 - - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000001 - 411901fe7f193f000000823e00000000411a05fe7f1ad5250500c13e00000000 - 00000000000000000000000000000000000000000000000000000000000055aa - - - - 2319528960 - - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000001 - 411a01fe7f1a3f000000823e00000000411b05fe7f1b96640500c13e00000000 - 00000000000000000000000000000000000000000000000000000000000055aa - - - - 2327754240 - - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000001 - 411b01fe7f1b3f000000823e0000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000000000000000000055aa - - - Property changes on: user/ngie/more-tests2/sbin/geom/core/tests/Data/disk.msdos.ext.xml ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: user/ngie/more-tests2/sbin/geom/core/tests/Data/disk.kern.flp.xml =================================================================== --- user/ngie/more-tests2/sbin/geom/core/tests/Data/disk.kern.flp.xml (revision 293822) +++ user/ngie/more-tests2/sbin/geom/core/tests/Data/disk.kern.flp.xml (nonexistent) @@ -1,51 +0,0 @@ - - - - $FreeBSD$ - A FreeBSD kern.flp image. - - 512 - 0 - - 0 - - eb1b9090161f666a005150065331c088f0506a1089e5e8c7008d6610cbfc31c9 - 8ec18ed98ed1bc007c89e6bf0007fec5f3a5beee7d80fa80722cb601e86700b9 - 0100bebe8db601807c04a57507e319f60480751483c610fec680fe0572e949e3 - e1be8b7deb5231d289160009b610e83500bb00908b770a01debf00b0b900ac29 - f1f3a429f930c0f3aae80300e98113fae464a80275fab0d1e664e464a80275fa - b0dfe660fbc3bb008c8b44088b4c0a0ee853ff732abe867de81c00be907de816 - 0030e4cd16c70672043412ea0000ffffbb0700b40ecd10ac84c075f4b401f9c3 - 52b408cd1388f55a72f580e13f74edfa668b460852660fb6d96631d266f7f388 - eb88d54330d266f7f388d75a663dff030000fb774486c4c0c80208e8409188fe - 28e08a660238e0720288e0bf0500c45e0450b402cd135b730a4f741c30e4cd13 - 93ebeb0fb6c30146087303ff460ad0e3005e052846027788c32ef6069908800f - 8479ffbbaa5552b441cd135a0f826fff81fb55aa0f8564fff6c1010f845dff89 - eeb442cd13c35265616400426f6f7400206572726f720d0a0080909090909090 - 9090909090909090909090909090909090909090909090909090909090900000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000080000100a5ffffff0000000050c3000055aa - - - - 512 - - 5745568200000000666431343430000000000000000000000000000000000000 - 00000000000000000002000012000000020000005000000024000000400b0000 - 00000000000000002c0101000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000057455682286903000020000000200000400b00000000000000020000 - 00080000400b0000000000000002000000080000400b00000000000000020000 - 0708060000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - - - Property changes on: user/ngie/more-tests2/sbin/geom/core/tests/Data/disk.kern.flp.xml ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: user/ngie/more-tests2/sbin/geom/core/tests/Data/disk.beast.da0.xml =================================================================== --- user/ngie/more-tests2/sbin/geom/core/tests/Data/disk.beast.da0.xml (revision 293822) +++ user/ngie/more-tests2/sbin/geom/core/tests/Data/disk.beast.da0.xml (nonexistent) @@ -1,33 +0,0 @@ - - - - $FreeBSD$ - alpha BSD label from beast.freebsd.org - - 512 - 0 - 0 - 0 - 0 - - 0 - - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 5745568204000000646130000000000000000000000000000000000000000000 - 0000000000000000000200003f000000ff0000000f020000c13e000000338100 - 0000000000000000100e01000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000057455682594e08000020000000200000002079000000000000040000 - 0708100000130800002079000000000001000000003381000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0f0000000000000001000000000000000000000000000000fc8c1983a904da83 - - - Property changes on: user/ngie/more-tests2/sbin/geom/core/tests/Data/disk.beast.da0.xml ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: user/ngie/more-tests2/sbin/geom/core/tests/Data/Makefile =================================================================== --- user/ngie/more-tests2/sbin/geom/core/tests/Data/Makefile (revision 293822) +++ user/ngie/more-tests2/sbin/geom/core/tests/Data/Makefile (nonexistent) @@ -1,21 +0,0 @@ -# $FreeBSD$ - -FILES+= disk.alpha.da0.xml -FILES+= disk.alpha2.da0.xml -FILES+= disk.apple.xml -FILES+= disk.beast.da0.xml -FILES+= disk.critter.ad0.xml -FILES+= disk.empty.flp.xml -FILES+= disk.far.ad0.xml -FILES+= disk.flat.da1.xml -FILES+= disk.kern.flp.xml -FILES+= disk.msdos.ext.xml -FILES+= disk.msdos.flp.xml -FILES+= disk.pc98.wdc0.xml -FILES+= disk.sun.da0.xml -FILES+= disk.sun.da1.xml -FILES+= disk.typo.ad0.xml - -FILESDIR= ${TESTSBASE}/sbin/geom/core/Data - -.include Property changes on: user/ngie/more-tests2/sbin/geom/core/tests/Data/Makefile ___________________________________________________________________ Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: user/ngie/more-tests2/sbin/geom/core/tests/Data/disk.typo.ad0.xml =================================================================== --- user/ngie/more-tests2/sbin/geom/core/tests/Data/disk.typo.ad0.xml (revision 293822) +++ user/ngie/more-tests2/sbin/geom/core/tests/Data/disk.typo.ad0.xml (nonexistent) @@ -1,219 +0,0 @@ - - - - $FreeBSD$ - A multislice FreeBSD disk - - 512 - 0 - - 0 - - fc31c08ec08ed88ed0bc007cbd000a89efb108f3abfe45f252bb000689eeb802 - 02e82e015ae9008af686bbfd20750484d278048a96bafd885600e8fc0052bbc2 - 0731d2886ffc0fa396bbfd731c8a07bf0f08b103f2ae7411b10df2ae750481c7 - 0d008a0d01cfe8c1004280c31073d4582c7f3a067504720548740e30c004b088 - 86b8fdbfb207e8a100be0308e8ad008a96b9fd4ee8880030e4cd1a89d703bebc - fdb401cd16751330e4cd1a39fa72f28a86b9fdeb15b007e88e0030e4cd1688e0 - 3c1c74eb2c3b3c0477eb980fa3460c73e48886b9fdbe000a8a1489f33c049c74 - 0ac0e00405be0793c6078053f686bbfd407509bb0006b80103e856005e9d7507 - 8a96b8fd80ea30bb007cb80102e8420072a381bffe0155aa759be81c00ffe3b0 - 46e82400b03100d0eb170fab560cbe0008e8ebff89fee80300be0d08aca88075 - 05e80400ebf6247f53bb0700b40ecd105bc38a74018b4c025689e780feff7540 - 83f9ff753bf686bbfd8074345153bbaa5550b441cd1358720e81fb55aa7508f6 - c101740380cc405b59f6c4407412666a0066ff740806536a006a1089e6864402 - cd1389fc5ec39090909090909090909001014472697665200000808fb6008001 - 0100a5ef7f9f3f000000c1f95f00000041a0a5efffff00fa5f0050e29f0000ff - ffffa5efffff50dcff0050dcff000000000000000000000000000000000055aa - - - - 512 - - 2020a00a44656661756c743aa00d8a00050f010406070b0c0e6383a5a6a9b70e - 141312141d1c1b2124282e3439556e6b6e6f77ee444fd357696e646f7773204e - d457696e646f77f3554e49d84c696e75f8467265654253c44f70656e4253c44e - 65744253c44253442f4fd3000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - - - - 32768 - - 5745568205000000616430733100000000000000000000000000000000000000 - 0000000000000000000200003f000000f0000000180a0000103b000080295402 - 0000000000000000100e01000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000005745568204c108000020000000200000002003003f00000000000000 - 0700000000a00f003f2003000000000001000000c1f95f003f00000000000000 - 000000000000000000000000000000000000000000a00f003fc0120000000000 - 07000000c1993d003f6022000000000007000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - - - - 64512 - - 0000007c0000010002000400f8ff0000000400f8000000000000000000000004 - 0000004000000008000000000010007e00800000070000fe1f00000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - - - - 104922112 - - 3310f30d0350fbf66f44ebd906c9963d46b2bf609bb753131e7c24cf9ed194ce - a59117b612772b207ddcb753df72456f98d0cac567f60526c7b9308afd87e657 - dd45b3d1eb075b6820aa6ea5a0f10511f65a257f0d7d89d88e189bef43786ff5 - a0316511a7a07168f2ef001e71fbc56dd8ddc7866c4856dc979742be22f4badd - e1fcba7aebe4b5f4bb8b0c89e84de59f0ba48d7a8b00bb1797fc057e3d3d8058 - 4b1987ac49b74bed74cb4985850d5be64e8188d40ad0323165b355c512a91523 - 5d5211eeb021c754f552b160f9a73c4c5e59370163cf531ca0382cc462f9ac9d - 35612380f7a5d9d5e3bde129ef6fab02347088025d0937fb6c56dc68c283ce9d - 1cfc5b3c7ad1f52faeae05188386cb57cb88c5dccaa2db17a09420ae7d9f9d6e - 058370711f445cff4d4543ee9f0c3054400116304018f68d9c08d05b04680162 - 23172b8b1775157790fe5e5100c530e3377d383a0080468b0125e87e8d7dee5f - 46030a238dc8a0000cb4eafc6ad4735f2c16d1642e3834aefbb5bfc25fcc0062 - 3a89410ab88839e3ed151cd6bc2b5704c5db4c9fc39662bd3a41347212c664be - 04684e551c0a0362bb3139a460a7c8d178c349a47d724b7d456606b2f47a8d99 - d4af7998148ed93443a828ece96cdb7eb158a21189ed1527bdad7b18b74f168b - d01fcfde994977174e41ad8f6ea19fac8bb95e5d68643d0457d746cf32531639 - - - - 629210112 - - ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff - ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff - ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff - ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff - ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff - ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff - ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff - ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff - ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff - ffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - - - - 1153498112 - - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - - - - 3220439552 - - 5745568205000000616430733200000000000000000000000000000000000000 - 0000000000000000000200003f000000f0000000180a0000103b000080295402 - 0000000000000000100e01000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000057455682fc1908000020000000200000000000000000000000000000 - 000000000000000000000000000000000000000050e29f0000fa5f0000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - - - - 6440878080 - - 0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a - 0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a - 0a0a0a0a0a0a0a0a0a0a0a0a3c4120200a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a - 0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a - 0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a - 0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a - 0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a687265663d22687474703a2f2f777777 - 2e706c6179626f7973746f72652e636f6d2f70626c696e6b2e6367693f616666 - 696c696174653d4d4f3130303030303034353426736b753d4249303130362220 - 7461726765743d225f626c616e6b22206f6e6d6f7573656f7665723d22706172 - 656e742e77696e646f772e7374617475733d27506c6179626f792053746f7265 - 273b2072657475726e2074727565223e3c494d47207372633d22687474703a2f - 2f61313833322e672e616b2e706c6179626f792e636f6d2f372f313833322f32 - 332f3939303232313437302f7777772e706c6179626f792e636f6d2f6d616761 - 7a696e652f63757272656e742f696d782f636f7665725f696e6465782e6a7067 - 2220616c69676e3d72696768742077696474683d223135302220686569676874 - - - - 8585257472 - - 5745568205000000616430733300000000000000000000000000000000000000 - 0000000000000000000200003f000000f000000055040000103b000050dcff00 - 0000000000000000100e01000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000057455682bcbd0800002000000020000000803e0050dcff0000040000 - 070816000000000000000000000000000000000050dcff0050dcff0000000000 - 00000000505cc100505c3e010010000007049f00000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - - - Property changes on: user/ngie/more-tests2/sbin/geom/core/tests/Data/disk.typo.ad0.xml ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: user/ngie/more-tests2/sbin/geom/core/tests/Data/disk.apple.xml =================================================================== --- user/ngie/more-tests2/sbin/geom/core/tests/Data/disk.apple.xml (revision 293822) +++ user/ngie/more-tests2/sbin/geom/core/tests/Data/disk.apple.xml (nonexistent) @@ -1,93 +0,0 @@ - - - $FreeBSD$ - 512 - 366530560 - 0 - 0 - 0 - - 0 - - 45520200000aec68000100010000000000010000004000120001000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - - - - 512 - - 504d00000000000300000060000aec084d61634f530000000000000000000000 - 000000000000000000000000000000004170706c655f48465300000000000000 - 0000000000000000000000000000000000000000000aec08000000b700000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - - - - 1024 - - 504d000000000003000000010000003f4170706c650000000000000000000000 - 000000000000000000000000000000004170706c655f706172746974696f6e5f - 6d617000000000000000000000000000000000000000003f0000003700000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - - - - 1536 - - 504d00000000000300000040000000204d6163696e746f736800000000000000 - 000000000000000000000000000000004170706c655f44726976657234330000 - 0000000000000000000000000000000000000000000000200000007f00000000 - 000023ee0000000000000000000000000000000000007c083638303030000000 - 0000000000000000000106000000000000000001000700000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - - - Property changes on: user/ngie/more-tests2/sbin/geom/core/tests/Data/disk.apple.xml ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: user/ngie/more-tests2/sbin/geom/core/tests/Data/disk.far.ad0.xml =================================================================== --- user/ngie/more-tests2/sbin/geom/core/tests/Data/disk.far.ad0.xml (revision 293822) +++ user/ngie/more-tests2/sbin/geom/core/tests/Data/disk.far.ad0.xml (nonexistent) @@ -1,51 +0,0 @@ - - - - $FreeBSD$ - A Windows laptop. - - 512 - 0 - - 0 - - 33c08ed0bc007cfb5007501ffcbe1b7cbf1b065057b9e501f3a4cbbebe07b104 - 382c7c09751583c610e2f5cd188b148bee83c610497416382c74f6be10074eac - 3c0074fabb0700b40ecd10ebf2894625968a4604b4063c0e7411b40b3c0c7405 - 3ac4752b40c64625067524bbaa5550b441cd1358721681fb55aa7510f6c10174 - 0b8ae0885624c706a106eb1e886604bf0a00b801028bdc33c983ff057f038b4e - 25034e02cd137229be4607813efe7d55aa745a83ef057fda85f67583be2707eb - 8a9891529903460813560ae812005aebd54f74e433c0cd13ebb8000080093521 - 5633f656565250065351be1000568bf45052b800428a5624cd135a588d641072 - 0a4075014280c702e2f7f85ec3eb74496e76616c696420706172746974696f6e - 207461626c65004572726f72206c6f6164696e67206f7065726174696e672073 - 797374656d004d697373696e67206f7065726174696e672073797374656d0000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000008bfc1e578bf5cb00000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000001 - 0100a05304263f00000092d80800805401260befbf730cd90800340a88000000 - 00000000000000000000000000000000000000000000000000000000000055aa - - - - 512 - - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - - - Property changes on: user/ngie/more-tests2/sbin/geom/core/tests/Data/disk.far.ad0.xml ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: user/ngie/more-tests2/sbin/geom/core/tests/Makefile =================================================================== --- user/ngie/more-tests2/sbin/geom/core/tests/Makefile (revision 293822) +++ user/ngie/more-tests2/sbin/geom/core/tests/Makefile (nonexistent) @@ -1,12 +0,0 @@ -# $FreeBSD$ - -TESTSDIR= ${TESTSBASE}/sbin/geom/core - -TAP_TESTS_SH+= run_test - -SUBDIR+= ConfCmp -SUBDIR+= Data -SUBDIR+= MdLoad -SUBDIR+= Ref - -.include Property changes on: user/ngie/more-tests2/sbin/geom/core/tests/Makefile ___________________________________________________________________ Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: user/ngie/more-tests2/sbin/geom/core/tests/run_test.sh =================================================================== --- user/ngie/more-tests2/sbin/geom/core/tests/run_test.sh (revision 293822) +++ user/ngie/more-tests2/sbin/geom/core/tests/run_test.sh (nonexistent) @@ -1,61 +0,0 @@ -#!/bin/sh -# $FreeBSD$ - -MD=34 -: ${TMPDIR=/tmp} -TMP=$TMPDIR/$$ - -# The testcases seem to have been broken when the geom_sim provider was removed -echo "# these tests need to be rewritten; they were broken in r113434" -echo "1..0 # SKIP" -exit 0 - -set -e - -# Start from the right directory so we can find all our data files. -testsdir=$(realpath $(dirname $0)) - -# Print the test header -set -- $testsdir/Data/disk.*.xml -echo "1..$#" -data_files="$@" - -trap "rm -f $TMP; mdconfig -d -u $MD" EXIT INT TERM - -set +e - -refdir=$(realpath $(mktemp -d Ref.XXXXXX)) -for f in $data_files; do - b=`basename $f` - mdconfig -d -u $MD - - i=0 - while [ $i -lt 2 -a -c /dev/md$MD ]; do - sleep 1 - : $(( i += 1 )) - done - if [ -c /dev/md$MD ] ; then - echo "Bail out!" - echo "/dev/md$MD is busy" - exit 1 - fi - if ! $testsdir/MdLoad/MdLoad md${MD} $f; then - echo "not ok - $b # MdLoad failed" - continue - fi - if [ ! -f $refdir/$b ]; then - if [ -f $testsdir/Ref/$b ] ; then - grep -v '\$FreeBSD.*\$' $testsdir/Ref/$b > $refdir/$b - else - diskinfo /dev/md${MD}* > $refdir/$b - continue - fi - fi - diskinfo /dev/md${MD}* | diff -u $refdir/$b - > $TMP - if [ $? -eq 0 ]; then - echo "ok - $b" - else - echo "not ok - $b" - sed 's/^/# /' $TMP - fi -done Property changes on: user/ngie/more-tests2/sbin/geom/core/tests/run_test.sh ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: user/ngie/more-tests2/sys/dev/sfxge/common/efx.h =================================================================== --- user/ngie/more-tests2/sys/dev/sfxge/common/efx.h (revision 293822) +++ user/ngie/more-tests2/sys/dev/sfxge/common/efx.h (revision 293823) @@ -1,2299 +1,2299 @@ /*- * Copyright (c) 2006-2015 Solarflare Communications 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 THE COPYRIGHT HOLDERS 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 COPYRIGHT OWNER 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. * * The views and conclusions contained in the software and documentation are * those of the authors and should not be interpreted as representing official * policies, either expressed or implied, of the FreeBSD Project. * * $FreeBSD$ */ #ifndef _SYS_EFX_H #define _SYS_EFX_H #include "efsys.h" #include "efx_phy_ids.h" #ifdef __cplusplus extern "C" { #endif #define EFX_STATIC_ASSERT(_cond) \ ((void)sizeof(char[(_cond) ? 1 : -1])) #define EFX_ARRAY_SIZE(_array) \ (sizeof(_array) / sizeof((_array)[0])) #define EFX_FIELD_OFFSET(_type, _field) \ ((size_t) &(((_type *)0)->_field)) /* Return codes */ typedef __success(return == 0) int efx_rc_t; /* Chip families */ typedef enum efx_family_e { EFX_FAMILY_INVALID, EFX_FAMILY_FALCON, EFX_FAMILY_SIENA, EFX_FAMILY_HUNTINGTON, EFX_FAMILY_MEDFORD, EFX_FAMILY_NTYPES } efx_family_t; extern __checkReturn efx_rc_t efx_family( __in uint16_t venid, __in uint16_t devid, __out efx_family_t *efp); extern __checkReturn efx_rc_t efx_infer_family( __in efsys_bar_t *esbp, __out efx_family_t *efp); #define EFX_PCI_VENID_SFC 0x1924 #define EFX_PCI_DEVID_FALCON 0x0710 /* SFC4000 */ #define EFX_PCI_DEVID_BETHPAGE 0x0803 /* SFC9020 */ #define EFX_PCI_DEVID_SIENA 0x0813 /* SFL9021 */ #define EFX_PCI_DEVID_SIENA_F1_UNINIT 0x0810 #define EFX_PCI_DEVID_HUNTINGTON_PF_UNINIT 0x0901 #define EFX_PCI_DEVID_FARMINGDALE 0x0903 /* SFC9120 PF */ #define EFX_PCI_DEVID_GREENPORT 0x0923 /* SFC9140 PF */ #define EFX_PCI_DEVID_FARMINGDALE_VF 0x1903 /* SFC9120 VF */ #define EFX_PCI_DEVID_GREENPORT_VF 0x1923 /* SFC9140 VF */ #define EFX_PCI_DEVID_MEDFORD_PF_UNINIT 0x0913 #define EFX_PCI_DEVID_MEDFORD 0x0A03 /* SFC9240 PF */ #define EFX_PCI_DEVID_MEDFORD_VF 0x1A03 /* SFC9240 VF */ #define EFX_MEM_BAR 2 /* Error codes */ enum { EFX_ERR_INVALID, EFX_ERR_SRAM_OOB, EFX_ERR_BUFID_DC_OOB, EFX_ERR_MEM_PERR, EFX_ERR_RBUF_OWN, EFX_ERR_TBUF_OWN, EFX_ERR_RDESQ_OWN, EFX_ERR_TDESQ_OWN, EFX_ERR_EVQ_OWN, EFX_ERR_EVFF_OFLO, EFX_ERR_ILL_ADDR, EFX_ERR_SRAM_PERR, EFX_ERR_NCODES }; /* Calculate the IEEE 802.3 CRC32 of a MAC addr */ extern __checkReturn uint32_t efx_crc32_calculate( __in uint32_t crc_init, __in_ecount(length) uint8_t const *input, __in int length); /* Type prototypes */ typedef struct efx_rxq_s efx_rxq_t; /* NIC */ typedef struct efx_nic_s efx_nic_t; #define EFX_NIC_FUNC_PRIMARY 0x00000001 #define EFX_NIC_FUNC_LINKCTRL 0x00000002 #define EFX_NIC_FUNC_TRUSTED 0x00000004 extern __checkReturn efx_rc_t efx_nic_create( __in efx_family_t family, __in efsys_identifier_t *esip, __in efsys_bar_t *esbp, __in efsys_lock_t *eslp, __deref_out efx_nic_t **enpp); extern __checkReturn efx_rc_t efx_nic_probe( __in efx_nic_t *enp); #if EFSYS_OPT_PCIE_TUNE extern __checkReturn efx_rc_t efx_nic_pcie_tune( __in efx_nic_t *enp, unsigned int nlanes); extern __checkReturn efx_rc_t efx_nic_pcie_extended_sync( __in efx_nic_t *enp); #endif /* EFSYS_OPT_PCIE_TUNE */ extern __checkReturn efx_rc_t efx_nic_init( __in efx_nic_t *enp); extern __checkReturn efx_rc_t efx_nic_reset( __in efx_nic_t *enp); #if EFSYS_OPT_DIAG extern __checkReturn efx_rc_t efx_nic_register_test( __in efx_nic_t *enp); #endif /* EFSYS_OPT_DIAG */ extern void efx_nic_fini( __in efx_nic_t *enp); extern void efx_nic_unprobe( __in efx_nic_t *enp); extern void efx_nic_destroy( __in efx_nic_t *enp); #if EFSYS_OPT_MCDI #if EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD /* Huntington and Medford require MCDIv2 commands */ #define WITH_MCDI_V2 1 #endif typedef struct efx_mcdi_req_s efx_mcdi_req_t; typedef enum efx_mcdi_exception_e { EFX_MCDI_EXCEPTION_MC_REBOOT, EFX_MCDI_EXCEPTION_MC_BADASSERT, } efx_mcdi_exception_t; #if EFSYS_OPT_MCDI_LOGGING typedef enum efx_log_msg_e { EFX_LOG_INVALID, EFX_LOG_MCDI_REQUEST, EFX_LOG_MCDI_RESPONSE, } efx_log_msg_t; #endif /* EFSYS_OPT_MCDI_LOGGING */ typedef struct efx_mcdi_transport_s { void *emt_context; efsys_mem_t *emt_dma_mem; void (*emt_execute)(void *, efx_mcdi_req_t *); void (*emt_ev_cpl)(void *); void (*emt_exception)(void *, efx_mcdi_exception_t); #if EFSYS_OPT_MCDI_LOGGING void (*emt_logger)(void *, efx_log_msg_t, void *, size_t, void *, size_t); #endif /* EFSYS_OPT_MCDI_LOGGING */ #if EFSYS_OPT_MCDI_PROXY_AUTH void (*emt_ev_proxy_response)(void *, uint32_t, efx_rc_t); #endif /* EFSYS_OPT_MCDI_PROXY_AUTH */ } efx_mcdi_transport_t; extern __checkReturn efx_rc_t efx_mcdi_init( __in efx_nic_t *enp, __in const efx_mcdi_transport_t *mtp); extern __checkReturn efx_rc_t efx_mcdi_reboot( __in efx_nic_t *enp); void efx_mcdi_new_epoch( __in efx_nic_t *enp); extern void efx_mcdi_request_start( __in efx_nic_t *enp, __in efx_mcdi_req_t *emrp, __in boolean_t ev_cpl); extern __checkReturn boolean_t efx_mcdi_request_poll( __in efx_nic_t *enp); extern __checkReturn boolean_t efx_mcdi_request_abort( __in efx_nic_t *enp); extern void efx_mcdi_fini( __in efx_nic_t *enp); #endif /* EFSYS_OPT_MCDI */ /* INTR */ #define EFX_NINTR_FALCON 64 #define EFX_NINTR_SIENA 1024 typedef enum efx_intr_type_e { EFX_INTR_INVALID = 0, EFX_INTR_LINE, EFX_INTR_MESSAGE, EFX_INTR_NTYPES } efx_intr_type_t; #define EFX_INTR_SIZE (sizeof (efx_oword_t)) extern __checkReturn efx_rc_t efx_intr_init( __in efx_nic_t *enp, __in efx_intr_type_t type, __in efsys_mem_t *esmp); extern void efx_intr_enable( __in efx_nic_t *enp); extern void efx_intr_disable( __in efx_nic_t *enp); extern void efx_intr_disable_unlocked( __in efx_nic_t *enp); #define EFX_INTR_NEVQS 32 extern __checkReturn efx_rc_t efx_intr_trigger( __in efx_nic_t *enp, __in unsigned int level); extern void efx_intr_status_line( __in efx_nic_t *enp, __out boolean_t *fatalp, __out uint32_t *maskp); extern void efx_intr_status_message( __in efx_nic_t *enp, __in unsigned int message, __out boolean_t *fatalp); extern void efx_intr_fatal( __in efx_nic_t *enp); extern void efx_intr_fini( __in efx_nic_t *enp); /* MAC */ #if EFSYS_OPT_MAC_STATS /* START MKCONFIG GENERATED EfxHeaderMacBlock e323546097fd7c65 */ typedef enum efx_mac_stat_e { EFX_MAC_RX_OCTETS, EFX_MAC_RX_PKTS, EFX_MAC_RX_UNICST_PKTS, EFX_MAC_RX_MULTICST_PKTS, EFX_MAC_RX_BRDCST_PKTS, EFX_MAC_RX_PAUSE_PKTS, EFX_MAC_RX_LE_64_PKTS, EFX_MAC_RX_65_TO_127_PKTS, EFX_MAC_RX_128_TO_255_PKTS, EFX_MAC_RX_256_TO_511_PKTS, EFX_MAC_RX_512_TO_1023_PKTS, EFX_MAC_RX_1024_TO_15XX_PKTS, EFX_MAC_RX_GE_15XX_PKTS, EFX_MAC_RX_ERRORS, EFX_MAC_RX_FCS_ERRORS, EFX_MAC_RX_DROP_EVENTS, EFX_MAC_RX_FALSE_CARRIER_ERRORS, EFX_MAC_RX_SYMBOL_ERRORS, EFX_MAC_RX_ALIGN_ERRORS, EFX_MAC_RX_INTERNAL_ERRORS, EFX_MAC_RX_JABBER_PKTS, EFX_MAC_RX_LANE0_CHAR_ERR, EFX_MAC_RX_LANE1_CHAR_ERR, EFX_MAC_RX_LANE2_CHAR_ERR, EFX_MAC_RX_LANE3_CHAR_ERR, EFX_MAC_RX_LANE0_DISP_ERR, EFX_MAC_RX_LANE1_DISP_ERR, EFX_MAC_RX_LANE2_DISP_ERR, EFX_MAC_RX_LANE3_DISP_ERR, EFX_MAC_RX_MATCH_FAULT, EFX_MAC_RX_NODESC_DROP_CNT, EFX_MAC_TX_OCTETS, EFX_MAC_TX_PKTS, EFX_MAC_TX_UNICST_PKTS, EFX_MAC_TX_MULTICST_PKTS, EFX_MAC_TX_BRDCST_PKTS, EFX_MAC_TX_PAUSE_PKTS, EFX_MAC_TX_LE_64_PKTS, EFX_MAC_TX_65_TO_127_PKTS, EFX_MAC_TX_128_TO_255_PKTS, EFX_MAC_TX_256_TO_511_PKTS, EFX_MAC_TX_512_TO_1023_PKTS, EFX_MAC_TX_1024_TO_15XX_PKTS, EFX_MAC_TX_GE_15XX_PKTS, EFX_MAC_TX_ERRORS, EFX_MAC_TX_SGL_COL_PKTS, EFX_MAC_TX_MULT_COL_PKTS, EFX_MAC_TX_EX_COL_PKTS, EFX_MAC_TX_LATE_COL_PKTS, EFX_MAC_TX_DEF_PKTS, EFX_MAC_TX_EX_DEF_PKTS, EFX_MAC_PM_TRUNC_BB_OVERFLOW, EFX_MAC_PM_DISCARD_BB_OVERFLOW, EFX_MAC_PM_TRUNC_VFIFO_FULL, EFX_MAC_PM_DISCARD_VFIFO_FULL, EFX_MAC_PM_TRUNC_QBB, EFX_MAC_PM_DISCARD_QBB, EFX_MAC_PM_DISCARD_MAPPING, EFX_MAC_RXDP_Q_DISABLED_PKTS, EFX_MAC_RXDP_DI_DROPPED_PKTS, EFX_MAC_RXDP_STREAMING_PKTS, EFX_MAC_RXDP_HLB_FETCH, EFX_MAC_RXDP_HLB_WAIT, EFX_MAC_VADAPTER_RX_UNICAST_PACKETS, EFX_MAC_VADAPTER_RX_UNICAST_BYTES, EFX_MAC_VADAPTER_RX_MULTICAST_PACKETS, EFX_MAC_VADAPTER_RX_MULTICAST_BYTES, EFX_MAC_VADAPTER_RX_BROADCAST_PACKETS, EFX_MAC_VADAPTER_RX_BROADCAST_BYTES, EFX_MAC_VADAPTER_RX_BAD_PACKETS, EFX_MAC_VADAPTER_RX_BAD_BYTES, EFX_MAC_VADAPTER_RX_OVERFLOW, EFX_MAC_VADAPTER_TX_UNICAST_PACKETS, EFX_MAC_VADAPTER_TX_UNICAST_BYTES, EFX_MAC_VADAPTER_TX_MULTICAST_PACKETS, EFX_MAC_VADAPTER_TX_MULTICAST_BYTES, EFX_MAC_VADAPTER_TX_BROADCAST_PACKETS, EFX_MAC_VADAPTER_TX_BROADCAST_BYTES, EFX_MAC_VADAPTER_TX_BAD_PACKETS, EFX_MAC_VADAPTER_TX_BAD_BYTES, EFX_MAC_VADAPTER_TX_OVERFLOW, EFX_MAC_NSTATS } efx_mac_stat_t; /* END MKCONFIG GENERATED EfxHeaderMacBlock */ #endif /* EFSYS_OPT_MAC_STATS */ typedef enum efx_link_mode_e { EFX_LINK_UNKNOWN = 0, EFX_LINK_DOWN, EFX_LINK_10HDX, EFX_LINK_10FDX, EFX_LINK_100HDX, EFX_LINK_100FDX, EFX_LINK_1000HDX, EFX_LINK_1000FDX, EFX_LINK_10000FDX, EFX_LINK_40000FDX, EFX_LINK_NMODES } efx_link_mode_t; #define EFX_MAC_ADDR_LEN 6 #define EFX_MAC_ADDR_IS_MULTICAST(_address) (((uint8_t*)_address)[0] & 0x01) #define EFX_MAC_MULTICAST_LIST_MAX 256 #define EFX_MAC_SDU_MAX 9202 #define EFX_MAC_PDU(_sdu) \ P2ROUNDUP(((_sdu) \ + /* EtherII */ 14 \ + /* VLAN */ 4 \ + /* CRC */ 4 \ + /* bug16011 */ 16), \ (1 << 3)) #define EFX_MAC_PDU_MIN 60 #define EFX_MAC_PDU_MAX EFX_MAC_PDU(EFX_MAC_SDU_MAX) extern __checkReturn efx_rc_t efx_mac_pdu_set( __in efx_nic_t *enp, __in size_t pdu); extern __checkReturn efx_rc_t efx_mac_addr_set( __in efx_nic_t *enp, __in uint8_t *addr); extern __checkReturn efx_rc_t efx_mac_filter_set( __in efx_nic_t *enp, __in boolean_t all_unicst, __in boolean_t mulcst, __in boolean_t all_mulcst, __in boolean_t brdcst); extern __checkReturn efx_rc_t efx_mac_multicast_list_set( __in efx_nic_t *enp, __in_ecount(6*count) uint8_t const *addrs, __in int count); extern __checkReturn efx_rc_t efx_mac_filter_default_rxq_set( __in efx_nic_t *enp, __in efx_rxq_t *erp, __in boolean_t using_rss); extern void efx_mac_filter_default_rxq_clear( __in efx_nic_t *enp); extern __checkReturn efx_rc_t efx_mac_drain( __in efx_nic_t *enp, __in boolean_t enabled); extern __checkReturn efx_rc_t efx_mac_up( __in efx_nic_t *enp, __out boolean_t *mac_upp); #define EFX_FCNTL_RESPOND 0x00000001 #define EFX_FCNTL_GENERATE 0x00000002 extern __checkReturn efx_rc_t efx_mac_fcntl_set( __in efx_nic_t *enp, __in unsigned int fcntl, __in boolean_t autoneg); extern void efx_mac_fcntl_get( __in efx_nic_t *enp, __out unsigned int *fcntl_wantedp, __out unsigned int *fcntl_linkp); #if EFSYS_OPT_MAC_STATS #if EFSYS_OPT_NAMES extern __checkReturn const char * efx_mac_stat_name( __in efx_nic_t *enp, __in unsigned int id); #endif /* EFSYS_OPT_NAMES */ #define EFX_MAC_STATS_SIZE 0x400 /* * Upload mac statistics supported by the hardware into the given buffer. * * The reference buffer must be at least %EFX_MAC_STATS_SIZE bytes, * and page aligned. * * The hardware will only DMA statistics that it understands (of course). * Drivers should not make any assumptions about which statistics are * supported, especially when the statistics are generated by firmware. * * Thus, drivers should zero this buffer before use, so that not-understood * statistics read back as zero. */ extern __checkReturn efx_rc_t efx_mac_stats_upload( __in efx_nic_t *enp, __in efsys_mem_t *esmp); extern __checkReturn efx_rc_t efx_mac_stats_periodic( __in efx_nic_t *enp, __in efsys_mem_t *esmp, __in uint16_t period_ms, __in boolean_t events); extern __checkReturn efx_rc_t efx_mac_stats_update( __in efx_nic_t *enp, __in efsys_mem_t *esmp, __inout_ecount(EFX_MAC_NSTATS) efsys_stat_t *stat, __inout_opt uint32_t *generationp); #endif /* EFSYS_OPT_MAC_STATS */ /* MON */ typedef enum efx_mon_type_e { EFX_MON_INVALID = 0, EFX_MON_NULL, EFX_MON_LM87, EFX_MON_MAX6647, EFX_MON_SFC90X0, EFX_MON_SFC91X0, EFX_MON_SFC92X0, EFX_MON_NTYPES } efx_mon_type_t; #if EFSYS_OPT_NAMES extern const char * efx_mon_name( __in efx_nic_t *enp); #endif /* EFSYS_OPT_NAMES */ extern __checkReturn efx_rc_t efx_mon_init( __in efx_nic_t *enp); #if EFSYS_OPT_MON_STATS #define EFX_MON_STATS_PAGE_SIZE 0x100 #define EFX_MON_MASK_ELEMENT_SIZE 32 /* START MKCONFIG GENERATED MonitorHeaderStatsBlock c09b13f732431f23 */ typedef enum efx_mon_stat_e { EFX_MON_STAT_2_5V, EFX_MON_STAT_VCCP1, EFX_MON_STAT_VCC, EFX_MON_STAT_5V, EFX_MON_STAT_12V, EFX_MON_STAT_VCCP2, EFX_MON_STAT_EXT_TEMP, EFX_MON_STAT_INT_TEMP, EFX_MON_STAT_AIN1, EFX_MON_STAT_AIN2, EFX_MON_STAT_INT_COOLING, EFX_MON_STAT_EXT_COOLING, EFX_MON_STAT_1V, EFX_MON_STAT_1_2V, EFX_MON_STAT_1_8V, EFX_MON_STAT_3_3V, EFX_MON_STAT_1_2VA, EFX_MON_STAT_VREF, EFX_MON_STAT_VAOE, EFX_MON_STAT_AOE_TEMP, EFX_MON_STAT_PSU_AOE_TEMP, EFX_MON_STAT_PSU_TEMP, EFX_MON_STAT_FAN0, EFX_MON_STAT_FAN1, EFX_MON_STAT_FAN2, EFX_MON_STAT_FAN3, EFX_MON_STAT_FAN4, EFX_MON_STAT_VAOE_IN, EFX_MON_STAT_IAOE, EFX_MON_STAT_IAOE_IN, EFX_MON_STAT_NIC_POWER, EFX_MON_STAT_0_9V, EFX_MON_STAT_I0_9V, EFX_MON_STAT_I1_2V, EFX_MON_STAT_0_9V_ADC, EFX_MON_STAT_INT_TEMP2, EFX_MON_STAT_VREG_TEMP, EFX_MON_STAT_VREG_0_9V_TEMP, EFX_MON_STAT_VREG_1_2V_TEMP, EFX_MON_STAT_INT_VPTAT, EFX_MON_STAT_INT_ADC_TEMP, EFX_MON_STAT_EXT_VPTAT, EFX_MON_STAT_EXT_ADC_TEMP, EFX_MON_STAT_AMBIENT_TEMP, EFX_MON_STAT_AIRFLOW, EFX_MON_STAT_VDD08D_VSS08D_CSR, EFX_MON_STAT_VDD08D_VSS08D_CSR_EXTADC, EFX_MON_STAT_HOTPOINT_TEMP, EFX_MON_STAT_PHY_POWER_SWITCH_PORT0, EFX_MON_STAT_PHY_POWER_SWITCH_PORT1, EFX_MON_STAT_MUM_VCC, EFX_MON_STAT_0V9_A, EFX_MON_STAT_I0V9_A, EFX_MON_STAT_0V9_A_TEMP, EFX_MON_STAT_0V9_B, EFX_MON_STAT_I0V9_B, EFX_MON_STAT_0V9_B_TEMP, EFX_MON_STAT_CCOM_AVREG_1V2_SUPPLY, EFX_MON_STAT_CCOM_AVREG_1V2_SUPPLY_EXT_ADC, EFX_MON_STAT_CCOM_AVREG_1V8_SUPPLY, EFX_MON_STAT_CCOM_AVREG_1V8_SUPPLY_EXT_ADC, EFX_MON_STAT_CONTROLLER_MASTER_VPTAT, EFX_MON_STAT_CONTROLLER_MASTER_INTERNAL_TEMP, EFX_MON_STAT_CONTROLLER_MASTER_VPTAT_EXT_ADC, EFX_MON_STAT_CONTROLLER_MASTER_INTERNAL_TEMP_EXT_ADC, EFX_MON_STAT_CONTROLLER_SLAVE_VPTAT, EFX_MON_STAT_CONTROLLER_SLAVE_INTERNAL_TEMP, EFX_MON_STAT_CONTROLLER_SLAVE_VPTAT_EXT_ADC, EFX_MON_STAT_CONTROLLER_SLAVE_INTERNAL_TEMP_EXT_ADC, EFX_MON_STAT_SODIMM_VOUT, EFX_MON_STAT_SODIMM_0_TEMP, EFX_MON_STAT_SODIMM_1_TEMP, EFX_MON_STAT_PHY0_VCC, EFX_MON_STAT_PHY1_VCC, EFX_MON_STAT_CONTROLLER_TDIODE_TEMP, EFX_MON_NSTATS } efx_mon_stat_t; /* END MKCONFIG GENERATED MonitorHeaderStatsBlock */ typedef enum efx_mon_stat_state_e { EFX_MON_STAT_STATE_OK = 0, EFX_MON_STAT_STATE_WARNING = 1, EFX_MON_STAT_STATE_FATAL = 2, EFX_MON_STAT_STATE_BROKEN = 3, EFX_MON_STAT_STATE_NO_READING = 4, } efx_mon_stat_state_t; typedef struct efx_mon_stat_value_s { uint16_t emsv_value; uint16_t emsv_state; } efx_mon_stat_value_t; #if EFSYS_OPT_NAMES extern const char * efx_mon_stat_name( __in efx_nic_t *enp, __in efx_mon_stat_t id); #endif /* EFSYS_OPT_NAMES */ extern __checkReturn efx_rc_t efx_mon_stats_update( __in efx_nic_t *enp, __in efsys_mem_t *esmp, __inout_ecount(EFX_MON_NSTATS) efx_mon_stat_value_t *values); #endif /* EFSYS_OPT_MON_STATS */ extern void efx_mon_fini( __in efx_nic_t *enp); /* PHY */ #define PMA_PMD_MMD 1 #define PCS_MMD 3 #define PHY_XS_MMD 4 #define DTE_XS_MMD 5 #define AN_MMD 7 #define CL22EXT_MMD 29 #define MAXMMD ((1 << 5) - 1) extern __checkReturn efx_rc_t efx_phy_verify( __in efx_nic_t *enp); #if EFSYS_OPT_PHY_LED_CONTROL typedef enum efx_phy_led_mode_e { EFX_PHY_LED_DEFAULT = 0, EFX_PHY_LED_OFF, EFX_PHY_LED_ON, EFX_PHY_LED_FLASH, EFX_PHY_LED_NMODES } efx_phy_led_mode_t; extern __checkReturn efx_rc_t efx_phy_led_set( __in efx_nic_t *enp, __in efx_phy_led_mode_t mode); #endif /* EFSYS_OPT_PHY_LED_CONTROL */ extern __checkReturn efx_rc_t efx_port_init( __in efx_nic_t *enp); #if EFSYS_OPT_LOOPBACK typedef enum efx_loopback_type_e { EFX_LOOPBACK_OFF = 0, EFX_LOOPBACK_DATA = 1, EFX_LOOPBACK_GMAC = 2, EFX_LOOPBACK_XGMII = 3, EFX_LOOPBACK_XGXS = 4, EFX_LOOPBACK_XAUI = 5, EFX_LOOPBACK_GMII = 6, EFX_LOOPBACK_SGMII = 7, EFX_LOOPBACK_XGBR = 8, EFX_LOOPBACK_XFI = 9, EFX_LOOPBACK_XAUI_FAR = 10, EFX_LOOPBACK_GMII_FAR = 11, EFX_LOOPBACK_SGMII_FAR = 12, EFX_LOOPBACK_XFI_FAR = 13, EFX_LOOPBACK_GPHY = 14, EFX_LOOPBACK_PHY_XS = 15, EFX_LOOPBACK_PCS = 16, EFX_LOOPBACK_PMA_PMD = 17, EFX_LOOPBACK_XPORT = 18, EFX_LOOPBACK_XGMII_WS = 19, EFX_LOOPBACK_XAUI_WS = 20, EFX_LOOPBACK_XAUI_WS_FAR = 21, EFX_LOOPBACK_XAUI_WS_NEAR = 22, EFX_LOOPBACK_GMII_WS = 23, EFX_LOOPBACK_XFI_WS = 24, EFX_LOOPBACK_XFI_WS_FAR = 25, EFX_LOOPBACK_PHYXS_WS = 26, EFX_LOOPBACK_PMA_INT = 27, EFX_LOOPBACK_SD_NEAR = 28, EFX_LOOPBACK_SD_FAR = 29, EFX_LOOPBACK_PMA_INT_WS = 30, EFX_LOOPBACK_SD_FEP2_WS = 31, EFX_LOOPBACK_SD_FEP1_5_WS = 32, EFX_LOOPBACK_SD_FEP_WS = 33, EFX_LOOPBACK_SD_FES_WS = 34, EFX_LOOPBACK_NTYPES } efx_loopback_type_t; typedef enum efx_loopback_kind_e { EFX_LOOPBACK_KIND_OFF = 0, EFX_LOOPBACK_KIND_ALL, EFX_LOOPBACK_KIND_MAC, EFX_LOOPBACK_KIND_PHY, EFX_LOOPBACK_NKINDS } efx_loopback_kind_t; extern void efx_loopback_mask( __in efx_loopback_kind_t loopback_kind, __out efx_qword_t *maskp); extern __checkReturn efx_rc_t efx_port_loopback_set( __in efx_nic_t *enp, __in efx_link_mode_t link_mode, __in efx_loopback_type_t type); #if EFSYS_OPT_NAMES extern __checkReturn const char * efx_loopback_type_name( __in efx_nic_t *enp, __in efx_loopback_type_t type); #endif /* EFSYS_OPT_NAMES */ #endif /* EFSYS_OPT_LOOPBACK */ extern __checkReturn efx_rc_t efx_port_poll( __in efx_nic_t *enp, __out_opt efx_link_mode_t *link_modep); extern void efx_port_fini( __in efx_nic_t *enp); typedef enum efx_phy_cap_type_e { EFX_PHY_CAP_INVALID = 0, EFX_PHY_CAP_10HDX, EFX_PHY_CAP_10FDX, EFX_PHY_CAP_100HDX, EFX_PHY_CAP_100FDX, EFX_PHY_CAP_1000HDX, EFX_PHY_CAP_1000FDX, EFX_PHY_CAP_10000FDX, EFX_PHY_CAP_PAUSE, EFX_PHY_CAP_ASYM, EFX_PHY_CAP_AN, EFX_PHY_CAP_40000FDX, EFX_PHY_CAP_NTYPES } efx_phy_cap_type_t; #define EFX_PHY_CAP_CURRENT 0x00000000 #define EFX_PHY_CAP_DEFAULT 0x00000001 #define EFX_PHY_CAP_PERM 0x00000002 extern void efx_phy_adv_cap_get( __in efx_nic_t *enp, __in uint32_t flag, __out uint32_t *maskp); extern __checkReturn efx_rc_t efx_phy_adv_cap_set( __in efx_nic_t *enp, __in uint32_t mask); extern void efx_phy_lp_cap_get( __in efx_nic_t *enp, __out uint32_t *maskp); extern __checkReturn efx_rc_t efx_phy_oui_get( __in efx_nic_t *enp, __out uint32_t *ouip); typedef enum efx_phy_media_type_e { EFX_PHY_MEDIA_INVALID = 0, EFX_PHY_MEDIA_XAUI, EFX_PHY_MEDIA_CX4, EFX_PHY_MEDIA_KX4, EFX_PHY_MEDIA_XFP, EFX_PHY_MEDIA_SFP_PLUS, EFX_PHY_MEDIA_BASE_T, EFX_PHY_MEDIA_QSFP_PLUS, EFX_PHY_MEDIA_NTYPES } efx_phy_media_type_t; /* Get the type of medium currently used. If the board has ports for * modules, a module is present, and we recognise the media type of * the module, then this will be the media type of the module. * Otherwise it will be the media type of the port. */ extern void efx_phy_media_type_get( __in efx_nic_t *enp, __out efx_phy_media_type_t *typep); #if EFSYS_OPT_PHY_STATS /* START MKCONFIG GENERATED PhyHeaderStatsBlock 30ed56ad501f8e36 */ typedef enum efx_phy_stat_e { EFX_PHY_STAT_OUI, EFX_PHY_STAT_PMA_PMD_LINK_UP, EFX_PHY_STAT_PMA_PMD_RX_FAULT, EFX_PHY_STAT_PMA_PMD_TX_FAULT, EFX_PHY_STAT_PMA_PMD_REV_A, EFX_PHY_STAT_PMA_PMD_REV_B, EFX_PHY_STAT_PMA_PMD_REV_C, EFX_PHY_STAT_PMA_PMD_REV_D, EFX_PHY_STAT_PCS_LINK_UP, EFX_PHY_STAT_PCS_RX_FAULT, EFX_PHY_STAT_PCS_TX_FAULT, EFX_PHY_STAT_PCS_BER, EFX_PHY_STAT_PCS_BLOCK_ERRORS, EFX_PHY_STAT_PHY_XS_LINK_UP, EFX_PHY_STAT_PHY_XS_RX_FAULT, EFX_PHY_STAT_PHY_XS_TX_FAULT, EFX_PHY_STAT_PHY_XS_ALIGN, EFX_PHY_STAT_PHY_XS_SYNC_A, EFX_PHY_STAT_PHY_XS_SYNC_B, EFX_PHY_STAT_PHY_XS_SYNC_C, EFX_PHY_STAT_PHY_XS_SYNC_D, EFX_PHY_STAT_AN_LINK_UP, EFX_PHY_STAT_AN_MASTER, EFX_PHY_STAT_AN_LOCAL_RX_OK, EFX_PHY_STAT_AN_REMOTE_RX_OK, EFX_PHY_STAT_CL22EXT_LINK_UP, EFX_PHY_STAT_SNR_A, EFX_PHY_STAT_SNR_B, EFX_PHY_STAT_SNR_C, EFX_PHY_STAT_SNR_D, EFX_PHY_STAT_PMA_PMD_SIGNAL_A, EFX_PHY_STAT_PMA_PMD_SIGNAL_B, EFX_PHY_STAT_PMA_PMD_SIGNAL_C, EFX_PHY_STAT_PMA_PMD_SIGNAL_D, EFX_PHY_STAT_AN_COMPLETE, EFX_PHY_STAT_PMA_PMD_REV_MAJOR, EFX_PHY_STAT_PMA_PMD_REV_MINOR, EFX_PHY_STAT_PMA_PMD_REV_MICRO, EFX_PHY_STAT_PCS_FW_VERSION_0, EFX_PHY_STAT_PCS_FW_VERSION_1, EFX_PHY_STAT_PCS_FW_VERSION_2, EFX_PHY_STAT_PCS_FW_VERSION_3, EFX_PHY_STAT_PCS_FW_BUILD_YY, EFX_PHY_STAT_PCS_FW_BUILD_MM, EFX_PHY_STAT_PCS_FW_BUILD_DD, EFX_PHY_STAT_PCS_OP_MODE, EFX_PHY_NSTATS } efx_phy_stat_t; /* END MKCONFIG GENERATED PhyHeaderStatsBlock */ #if EFSYS_OPT_NAMES extern const char * efx_phy_stat_name( __in efx_nic_t *enp, __in efx_phy_stat_t stat); #endif /* EFSYS_OPT_NAMES */ #define EFX_PHY_STATS_SIZE 0x100 extern __checkReturn efx_rc_t efx_phy_stats_update( __in efx_nic_t *enp, __in efsys_mem_t *esmp, __inout_ecount(EFX_PHY_NSTATS) uint32_t *stat); #endif /* EFSYS_OPT_PHY_STATS */ #if EFSYS_OPT_PHY_PROPS #if EFSYS_OPT_NAMES extern const char * efx_phy_prop_name( __in efx_nic_t *enp, __in unsigned int id); #endif /* EFSYS_OPT_NAMES */ #define EFX_PHY_PROP_DEFAULT 0x00000001 extern __checkReturn efx_rc_t efx_phy_prop_get( __in efx_nic_t *enp, __in unsigned int id, __in uint32_t flags, __out uint32_t *valp); extern __checkReturn efx_rc_t efx_phy_prop_set( __in efx_nic_t *enp, __in unsigned int id, __in uint32_t val); #endif /* EFSYS_OPT_PHY_PROPS */ #if EFSYS_OPT_BIST typedef enum efx_bist_type_e { EFX_BIST_TYPE_UNKNOWN, EFX_BIST_TYPE_PHY_NORMAL, EFX_BIST_TYPE_PHY_CABLE_SHORT, EFX_BIST_TYPE_PHY_CABLE_LONG, EFX_BIST_TYPE_MC_MEM, /* Test the MC DMEM and IMEM */ EFX_BIST_TYPE_SAT_MEM, /* Test the DMEM and IMEM of satellite cpus*/ EFX_BIST_TYPE_REG, /* Test the register memories */ EFX_BIST_TYPE_NTYPES, } efx_bist_type_t; typedef enum efx_bist_result_e { EFX_BIST_RESULT_UNKNOWN, EFX_BIST_RESULT_RUNNING, EFX_BIST_RESULT_PASSED, EFX_BIST_RESULT_FAILED, } efx_bist_result_t; typedef enum efx_phy_cable_status_e { EFX_PHY_CABLE_STATUS_OK, EFX_PHY_CABLE_STATUS_INVALID, EFX_PHY_CABLE_STATUS_OPEN, EFX_PHY_CABLE_STATUS_INTRAPAIRSHORT, EFX_PHY_CABLE_STATUS_INTERPAIRSHORT, EFX_PHY_CABLE_STATUS_BUSY, } efx_phy_cable_status_t; typedef enum efx_bist_value_e { EFX_BIST_PHY_CABLE_LENGTH_A, EFX_BIST_PHY_CABLE_LENGTH_B, EFX_BIST_PHY_CABLE_LENGTH_C, EFX_BIST_PHY_CABLE_LENGTH_D, EFX_BIST_PHY_CABLE_STATUS_A, EFX_BIST_PHY_CABLE_STATUS_B, EFX_BIST_PHY_CABLE_STATUS_C, EFX_BIST_PHY_CABLE_STATUS_D, EFX_BIST_FAULT_CODE, /* Memory BIST specific values. These match to the MC_CMD_BIST_POLL * response. */ EFX_BIST_MEM_TEST, EFX_BIST_MEM_ADDR, EFX_BIST_MEM_BUS, EFX_BIST_MEM_EXPECT, EFX_BIST_MEM_ACTUAL, EFX_BIST_MEM_ECC, EFX_BIST_MEM_ECC_PARITY, EFX_BIST_MEM_ECC_FATAL, EFX_BIST_NVALUES, } efx_bist_value_t; extern __checkReturn efx_rc_t efx_bist_enable_offline( __in efx_nic_t *enp); extern __checkReturn efx_rc_t efx_bist_start( __in efx_nic_t *enp, __in efx_bist_type_t type); extern __checkReturn efx_rc_t efx_bist_poll( __in efx_nic_t *enp, __in efx_bist_type_t type, __out efx_bist_result_t *resultp, __out_opt uint32_t *value_maskp, __out_ecount_opt(count) unsigned long *valuesp, __in size_t count); extern void efx_bist_stop( __in efx_nic_t *enp, __in efx_bist_type_t type); #endif /* EFSYS_OPT_BIST */ #define EFX_FEATURE_IPV6 0x00000001 #define EFX_FEATURE_LFSR_HASH_INSERT 0x00000002 #define EFX_FEATURE_LINK_EVENTS 0x00000004 #define EFX_FEATURE_PERIODIC_MAC_STATS 0x00000008 #define EFX_FEATURE_WOL 0x00000010 #define EFX_FEATURE_MCDI 0x00000020 #define EFX_FEATURE_LOOKAHEAD_SPLIT 0x00000040 #define EFX_FEATURE_MAC_HEADER_FILTERS 0x00000080 #define EFX_FEATURE_TURBO 0x00000100 #define EFX_FEATURE_MCDI_DMA 0x00000200 #define EFX_FEATURE_TX_SRC_FILTERS 0x00000400 #define EFX_FEATURE_PIO_BUFFERS 0x00000800 #define EFX_FEATURE_FW_ASSISTED_TSO 0x00001000 typedef struct efx_nic_cfg_s { uint32_t enc_board_type; uint32_t enc_phy_type; #if EFSYS_OPT_NAMES char enc_phy_name[21]; #endif char enc_phy_revision[21]; efx_mon_type_t enc_mon_type; #if EFSYS_OPT_MON_STATS uint32_t enc_mon_stat_dma_buf_size; uint32_t enc_mon_stat_mask[(EFX_MON_NSTATS + 31) / 32]; #endif unsigned int enc_features; uint8_t enc_mac_addr[6]; uint8_t enc_port; /* PHY port number */ uint32_t enc_func_flags; uint32_t enc_intr_vec_base; uint32_t enc_intr_limit; uint32_t enc_evq_limit; uint32_t enc_txq_limit; uint32_t enc_rxq_limit; uint32_t enc_buftbl_limit; uint32_t enc_piobuf_limit; uint32_t enc_piobuf_size; uint32_t enc_piobuf_min_alloc_size; uint32_t enc_evq_timer_quantum_ns; uint32_t enc_evq_timer_max_us; uint32_t enc_clk_mult; uint32_t enc_rx_prefix_size; uint32_t enc_rx_buf_align_start; uint32_t enc_rx_buf_align_end; #if EFSYS_OPT_LOOPBACK efx_qword_t enc_loopback_types[EFX_LINK_NMODES]; #endif /* EFSYS_OPT_LOOPBACK */ #if EFSYS_OPT_PHY_FLAGS uint32_t enc_phy_flags_mask; #endif /* EFSYS_OPT_PHY_FLAGS */ #if EFSYS_OPT_PHY_LED_CONTROL uint32_t enc_led_mask; #endif /* EFSYS_OPT_PHY_LED_CONTROL */ #if EFSYS_OPT_PHY_STATS uint64_t enc_phy_stat_mask; #endif /* EFSYS_OPT_PHY_STATS */ #if EFSYS_OPT_PHY_PROPS unsigned int enc_phy_nprops; #endif /* EFSYS_OPT_PHY_PROPS */ #if EFSYS_OPT_SIENA uint8_t enc_mcdi_mdio_channel; #if EFSYS_OPT_PHY_STATS uint32_t enc_mcdi_phy_stat_mask; #endif /* EFSYS_OPT_PHY_STATS */ #endif /* EFSYS_OPT_SIENA */ #if (EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD) #if EFSYS_OPT_MON_STATS uint32_t *enc_mcdi_sensor_maskp; uint32_t enc_mcdi_sensor_mask_size; #endif /* EFSYS_OPT_MON_STATS */ #endif /* (EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD) */ #if EFSYS_OPT_BIST uint32_t enc_bist_mask; #endif /* EFSYS_OPT_BIST */ #if EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD uint32_t enc_pf; uint32_t enc_vf; uint32_t enc_privilege_mask; #endif /* EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD */ boolean_t enc_bug26807_workaround; boolean_t enc_bug35388_workaround; boolean_t enc_bug41750_workaround; boolean_t enc_rx_batching_enabled; /* Maximum number of descriptors completed in an rx event. */ uint32_t enc_rx_batch_max; /* Number of rx descriptors the hardware requires for a push. */ uint32_t enc_rx_push_align; /* * Maximum number of bytes into the packet the TCP header can start for * the hardware to apply TSO packet edits. */ uint32_t enc_tx_tso_tcp_header_offset_limit; boolean_t enc_fw_assisted_tso_enabled; boolean_t enc_hw_tx_insert_vlan_enabled; /* Datapath firmware vadapter/vport/vswitch support */ boolean_t enc_datapath_cap_evb; boolean_t enc_rx_disable_scatter_supported; boolean_t enc_allow_set_mac_with_installed_filters; /* External port identifier */ uint8_t enc_external_port; uint32_t enc_mcdi_max_payload_length; } efx_nic_cfg_t; #define EFX_PCI_FUNCTION_IS_PF(_encp) ((_encp)->enc_vf == 0xffff) #define EFX_PCI_FUNCTION_IS_VF(_encp) ((_encp)->enc_vf != 0xffff) #define EFX_PCI_FUNCTION(_encp) \ (EFX_PCI_FUNCTION_IS_PF(_encp) ? (_encp)->enc_pf : (_encp)->enc_vf) #define EFX_PCI_VF_PARENT(_encp) ((_encp)->enc_pf) extern const efx_nic_cfg_t * efx_nic_cfg_get( __in efx_nic_t *enp); /* Driver resource limits (minimum required/maximum usable). */ typedef struct efx_drv_limits_s { uint32_t edl_min_evq_count; uint32_t edl_max_evq_count; uint32_t edl_min_rxq_count; uint32_t edl_max_rxq_count; uint32_t edl_min_txq_count; uint32_t edl_max_txq_count; /* PIO blocks (sub-allocated from piobuf) */ uint32_t edl_min_pio_alloc_size; uint32_t edl_max_pio_alloc_count; } efx_drv_limits_t; extern __checkReturn efx_rc_t efx_nic_set_drv_limits( __inout efx_nic_t *enp, __in efx_drv_limits_t *edlp); typedef enum efx_nic_region_e { EFX_REGION_VI, /* Memory BAR UC mapping */ EFX_REGION_PIO_WRITE_VI, /* Memory BAR WC mapping */ } efx_nic_region_t; extern __checkReturn efx_rc_t efx_nic_get_bar_region( __in efx_nic_t *enp, __in efx_nic_region_t region, __out uint32_t *offsetp, __out size_t *sizep); extern __checkReturn efx_rc_t efx_nic_get_vi_pool( __in efx_nic_t *enp, __out uint32_t *evq_countp, __out uint32_t *rxq_countp, __out uint32_t *txq_countp); #if EFSYS_OPT_VPD typedef enum efx_vpd_tag_e { EFX_VPD_ID = 0x02, EFX_VPD_END = 0x0f, EFX_VPD_RO = 0x10, EFX_VPD_RW = 0x11, } efx_vpd_tag_t; typedef uint16_t efx_vpd_keyword_t; typedef struct efx_vpd_value_s { efx_vpd_tag_t evv_tag; efx_vpd_keyword_t evv_keyword; uint8_t evv_length; uint8_t evv_value[0x100]; } efx_vpd_value_t; #define EFX_VPD_KEYWORD(x, y) ((x) | ((y) << 8)) extern __checkReturn efx_rc_t efx_vpd_init( __in efx_nic_t *enp); extern __checkReturn efx_rc_t efx_vpd_size( __in efx_nic_t *enp, __out size_t *sizep); extern __checkReturn efx_rc_t efx_vpd_read( __in efx_nic_t *enp, __out_bcount(size) caddr_t data, __in size_t size); extern __checkReturn efx_rc_t efx_vpd_verify( __in efx_nic_t *enp, __in_bcount(size) caddr_t data, __in size_t size); extern __checkReturn efx_rc_t efx_vpd_reinit( __in efx_nic_t *enp, __in_bcount(size) caddr_t data, __in size_t size); extern __checkReturn efx_rc_t efx_vpd_get( __in efx_nic_t *enp, __in_bcount(size) caddr_t data, __in size_t size, __inout efx_vpd_value_t *evvp); extern __checkReturn efx_rc_t efx_vpd_set( __in efx_nic_t *enp, __inout_bcount(size) caddr_t data, __in size_t size, __in efx_vpd_value_t *evvp); extern __checkReturn efx_rc_t efx_vpd_next( __in efx_nic_t *enp, __inout_bcount(size) caddr_t data, __in size_t size, __out efx_vpd_value_t *evvp, __inout unsigned int *contp); extern __checkReturn efx_rc_t efx_vpd_write( __in efx_nic_t *enp, __in_bcount(size) caddr_t data, __in size_t size); extern void efx_vpd_fini( __in efx_nic_t *enp); #endif /* EFSYS_OPT_VPD */ /* NVRAM */ #if EFSYS_OPT_NVRAM typedef enum efx_nvram_type_e { EFX_NVRAM_INVALID = 0, EFX_NVRAM_BOOTROM, EFX_NVRAM_BOOTROM_CFG, EFX_NVRAM_MC_FIRMWARE, EFX_NVRAM_MC_GOLDEN, EFX_NVRAM_PHY, EFX_NVRAM_NULLPHY, EFX_NVRAM_FPGA, EFX_NVRAM_FCFW, EFX_NVRAM_CPLD, EFX_NVRAM_FPGA_BACKUP, EFX_NVRAM_DYNAMIC_CFG, EFX_NVRAM_NTYPES, } efx_nvram_type_t; extern __checkReturn efx_rc_t efx_nvram_init( __in efx_nic_t *enp); #if EFSYS_OPT_DIAG extern __checkReturn efx_rc_t efx_nvram_test( __in efx_nic_t *enp); #endif /* EFSYS_OPT_DIAG */ extern __checkReturn efx_rc_t efx_nvram_size( __in efx_nic_t *enp, __in efx_nvram_type_t type, __out size_t *sizep); extern __checkReturn efx_rc_t efx_nvram_rw_start( __in efx_nic_t *enp, __in efx_nvram_type_t type, __out_opt size_t *pref_chunkp); extern void efx_nvram_rw_finish( __in efx_nic_t *enp, __in efx_nvram_type_t type); extern __checkReturn efx_rc_t efx_nvram_get_version( __in efx_nic_t *enp, __in efx_nvram_type_t type, __out uint32_t *subtypep, __out_ecount(4) uint16_t version[4]); extern __checkReturn efx_rc_t efx_nvram_read_chunk( __in efx_nic_t *enp, __in efx_nvram_type_t type, __in unsigned int offset, __out_bcount(size) caddr_t data, __in size_t size); extern __checkReturn efx_rc_t efx_nvram_set_version( __in efx_nic_t *enp, __in efx_nvram_type_t type, __in_ecount(4) uint16_t version[4]); /* Validate contents of TLV formatted partition */ extern __checkReturn efx_rc_t efx_nvram_tlv_validate( __in efx_nic_t *enp, __in uint32_t partn, __in_bcount(partn_size) caddr_t partn_data, __in size_t partn_size); extern __checkReturn efx_rc_t efx_nvram_erase( __in efx_nic_t *enp, __in efx_nvram_type_t type); extern __checkReturn efx_rc_t efx_nvram_write_chunk( __in efx_nic_t *enp, __in efx_nvram_type_t type, __in unsigned int offset, __in_bcount(size) caddr_t data, __in size_t size); extern void efx_nvram_fini( __in efx_nic_t *enp); #endif /* EFSYS_OPT_NVRAM */ #if EFSYS_OPT_BOOTCFG extern efx_rc_t efx_bootcfg_read( __in efx_nic_t *enp, __out_bcount(size) caddr_t data, __in size_t size); extern efx_rc_t efx_bootcfg_write( __in efx_nic_t *enp, __in_bcount(size) caddr_t data, __in size_t size); #endif /* EFSYS_OPT_BOOTCFG */ #if EFSYS_OPT_WOL typedef enum efx_wol_type_e { EFX_WOL_TYPE_INVALID, EFX_WOL_TYPE_MAGIC, EFX_WOL_TYPE_BITMAP, EFX_WOL_TYPE_LINK, EFX_WOL_NTYPES, } efx_wol_type_t; typedef enum efx_lightsout_offload_type_e { EFX_LIGHTSOUT_OFFLOAD_TYPE_INVALID, EFX_LIGHTSOUT_OFFLOAD_TYPE_ARP, EFX_LIGHTSOUT_OFFLOAD_TYPE_NS, } efx_lightsout_offload_type_t; #define EFX_WOL_BITMAP_MASK_SIZE (48) #define EFX_WOL_BITMAP_VALUE_SIZE (128) typedef union efx_wol_param_u { struct { uint8_t mac_addr[6]; } ewp_magic; struct { uint8_t mask[EFX_WOL_BITMAP_MASK_SIZE]; /* 1 bit per byte */ uint8_t value[EFX_WOL_BITMAP_VALUE_SIZE]; /* value to match */ uint8_t value_len; } ewp_bitmap; } efx_wol_param_t; typedef union efx_lightsout_offload_param_u { struct { uint8_t mac_addr[6]; uint32_t ip; } elop_arp; struct { uint8_t mac_addr[6]; uint32_t solicited_node[4]; uint32_t ip[4]; } elop_ns; } efx_lightsout_offload_param_t; extern __checkReturn efx_rc_t efx_wol_init( __in efx_nic_t *enp); extern __checkReturn efx_rc_t efx_wol_filter_clear( __in efx_nic_t *enp); extern __checkReturn efx_rc_t efx_wol_filter_add( __in efx_nic_t *enp, __in efx_wol_type_t type, __in efx_wol_param_t *paramp, __out uint32_t *filter_idp); extern __checkReturn efx_rc_t efx_wol_filter_remove( __in efx_nic_t *enp, __in uint32_t filter_id); extern __checkReturn efx_rc_t efx_lightsout_offload_add( __in efx_nic_t *enp, __in efx_lightsout_offload_type_t type, __in efx_lightsout_offload_param_t *paramp, __out uint32_t *filter_idp); extern __checkReturn efx_rc_t efx_lightsout_offload_remove( __in efx_nic_t *enp, __in efx_lightsout_offload_type_t type, __in uint32_t filter_id); extern void efx_wol_fini( __in efx_nic_t *enp); #endif /* EFSYS_OPT_WOL */ #if EFSYS_OPT_DIAG typedef enum efx_pattern_type_t { EFX_PATTERN_BYTE_INCREMENT = 0, EFX_PATTERN_ALL_THE_SAME, EFX_PATTERN_BIT_ALTERNATE, EFX_PATTERN_BYTE_ALTERNATE, EFX_PATTERN_BYTE_CHANGING, EFX_PATTERN_BIT_SWEEP, EFX_PATTERN_NTYPES } efx_pattern_type_t; typedef void (*efx_sram_pattern_fn_t)( __in size_t row, __in boolean_t negate, __out efx_qword_t *eqp); extern __checkReturn efx_rc_t efx_sram_test( __in efx_nic_t *enp, __in efx_pattern_type_t type); #endif /* EFSYS_OPT_DIAG */ extern __checkReturn efx_rc_t efx_sram_buf_tbl_set( __in efx_nic_t *enp, __in uint32_t id, __in efsys_mem_t *esmp, __in size_t n); extern void efx_sram_buf_tbl_clear( __in efx_nic_t *enp, __in uint32_t id, __in size_t n); #define EFX_BUF_TBL_SIZE 0x20000 #define EFX_BUF_SIZE 4096 /* EV */ typedef struct efx_evq_s efx_evq_t; #if EFSYS_OPT_QSTATS /* START MKCONFIG GENERATED EfxHeaderEventQueueBlock 6f3843f5fe7cc843 */ typedef enum efx_ev_qstat_e { EV_ALL, EV_RX, EV_RX_OK, EV_RX_FRM_TRUNC, EV_RX_TOBE_DISC, EV_RX_PAUSE_FRM_ERR, EV_RX_BUF_OWNER_ID_ERR, EV_RX_IPV4_HDR_CHKSUM_ERR, EV_RX_TCP_UDP_CHKSUM_ERR, EV_RX_ETH_CRC_ERR, EV_RX_IP_FRAG_ERR, EV_RX_MCAST_PKT, EV_RX_MCAST_HASH_MATCH, EV_RX_TCP_IPV4, EV_RX_TCP_IPV6, EV_RX_UDP_IPV4, EV_RX_UDP_IPV6, EV_RX_OTHER_IPV4, EV_RX_OTHER_IPV6, EV_RX_NON_IP, EV_RX_BATCH, EV_TX, EV_TX_WQ_FF_FULL, EV_TX_PKT_ERR, EV_TX_PKT_TOO_BIG, EV_TX_UNEXPECTED, EV_GLOBAL, EV_GLOBAL_MNT, EV_DRIVER, EV_DRIVER_SRM_UPD_DONE, EV_DRIVER_TX_DESCQ_FLS_DONE, EV_DRIVER_RX_DESCQ_FLS_DONE, EV_DRIVER_RX_DESCQ_FLS_FAILED, EV_DRIVER_RX_DSC_ERROR, EV_DRIVER_TX_DSC_ERROR, EV_DRV_GEN, EV_MCDI_RESPONSE, EV_NQSTATS } efx_ev_qstat_t; /* END MKCONFIG GENERATED EfxHeaderEventQueueBlock */ #endif /* EFSYS_OPT_QSTATS */ extern __checkReturn efx_rc_t efx_ev_init( __in efx_nic_t *enp); extern void efx_ev_fini( __in efx_nic_t *enp); #define EFX_EVQ_MAXNEVS 32768 #define EFX_EVQ_MINNEVS 512 #define EFX_EVQ_SIZE(_nevs) ((_nevs) * sizeof (efx_qword_t)) #define EFX_EVQ_NBUFS(_nevs) (EFX_EVQ_SIZE(_nevs) / EFX_BUF_SIZE) extern __checkReturn efx_rc_t efx_ev_qcreate( __in efx_nic_t *enp, __in unsigned int index, __in efsys_mem_t *esmp, __in size_t n, __in uint32_t id, __deref_out efx_evq_t **eepp); extern void efx_ev_qpost( __in efx_evq_t *eep, __in uint16_t data); typedef __checkReturn boolean_t (*efx_initialized_ev_t)( __in_opt void *arg); #define EFX_PKT_UNICAST 0x0004 #define EFX_PKT_START 0x0008 #define EFX_PKT_VLAN_TAGGED 0x0010 #define EFX_CKSUM_TCPUDP 0x0020 #define EFX_CKSUM_IPV4 0x0040 #define EFX_PKT_CONT 0x0080 #define EFX_CHECK_VLAN 0x0100 #define EFX_PKT_TCP 0x0200 #define EFX_PKT_UDP 0x0400 #define EFX_PKT_IPV4 0x0800 #define EFX_PKT_IPV6 0x1000 #define EFX_PKT_PREFIX_LEN 0x2000 #define EFX_ADDR_MISMATCH 0x4000 #define EFX_DISCARD 0x8000 #define EFX_EV_RX_NLABELS 32 #define EFX_EV_TX_NLABELS 32 typedef __checkReturn boolean_t (*efx_rx_ev_t)( __in_opt void *arg, __in uint32_t label, __in uint32_t id, __in uint32_t size, __in uint16_t flags); typedef __checkReturn boolean_t (*efx_tx_ev_t)( __in_opt void *arg, __in uint32_t label, __in uint32_t id); #define EFX_EXCEPTION_RX_RECOVERY 0x00000001 #define EFX_EXCEPTION_RX_DSC_ERROR 0x00000002 #define EFX_EXCEPTION_TX_DSC_ERROR 0x00000003 #define EFX_EXCEPTION_UNKNOWN_SENSOREVT 0x00000004 #define EFX_EXCEPTION_FWALERT_SRAM 0x00000005 #define EFX_EXCEPTION_UNKNOWN_FWALERT 0x00000006 #define EFX_EXCEPTION_RX_ERROR 0x00000007 #define EFX_EXCEPTION_TX_ERROR 0x00000008 #define EFX_EXCEPTION_EV_ERROR 0x00000009 typedef __checkReturn boolean_t (*efx_exception_ev_t)( __in_opt void *arg, __in uint32_t label, __in uint32_t data); typedef __checkReturn boolean_t (*efx_rxq_flush_done_ev_t)( __in_opt void *arg, __in uint32_t rxq_index); typedef __checkReturn boolean_t (*efx_rxq_flush_failed_ev_t)( __in_opt void *arg, __in uint32_t rxq_index); typedef __checkReturn boolean_t (*efx_txq_flush_done_ev_t)( __in_opt void *arg, __in uint32_t txq_index); typedef __checkReturn boolean_t (*efx_software_ev_t)( __in_opt void *arg, __in uint16_t magic); typedef __checkReturn boolean_t (*efx_sram_ev_t)( __in_opt void *arg, __in uint32_t code); #define EFX_SRAM_CLEAR 0 #define EFX_SRAM_UPDATE 1 #define EFX_SRAM_ILLEGAL_CLEAR 2 typedef __checkReturn boolean_t (*efx_wake_up_ev_t)( __in_opt void *arg, __in uint32_t label); typedef __checkReturn boolean_t (*efx_timer_ev_t)( __in_opt void *arg, __in uint32_t label); typedef __checkReturn boolean_t (*efx_link_change_ev_t)( __in_opt void *arg, __in efx_link_mode_t link_mode); #if EFSYS_OPT_MON_STATS typedef __checkReturn boolean_t (*efx_monitor_ev_t)( __in_opt void *arg, __in efx_mon_stat_t id, __in efx_mon_stat_value_t value); #endif /* EFSYS_OPT_MON_STATS */ #if EFSYS_OPT_MAC_STATS typedef __checkReturn boolean_t (*efx_mac_stats_ev_t)( __in_opt void *arg, __in uint32_t generation ); #endif /* EFSYS_OPT_MAC_STATS */ typedef struct efx_ev_callbacks_s { efx_initialized_ev_t eec_initialized; efx_rx_ev_t eec_rx; efx_tx_ev_t eec_tx; efx_exception_ev_t eec_exception; efx_rxq_flush_done_ev_t eec_rxq_flush_done; efx_rxq_flush_failed_ev_t eec_rxq_flush_failed; efx_txq_flush_done_ev_t eec_txq_flush_done; efx_software_ev_t eec_software; efx_sram_ev_t eec_sram; efx_wake_up_ev_t eec_wake_up; efx_timer_ev_t eec_timer; efx_link_change_ev_t eec_link_change; #if EFSYS_OPT_MON_STATS efx_monitor_ev_t eec_monitor; #endif /* EFSYS_OPT_MON_STATS */ #if EFSYS_OPT_MAC_STATS efx_mac_stats_ev_t eec_mac_stats; #endif /* EFSYS_OPT_MAC_STATS */ } efx_ev_callbacks_t; extern __checkReturn boolean_t efx_ev_qpending( __in efx_evq_t *eep, __in unsigned int count); #if EFSYS_OPT_EV_PREFETCH extern void efx_ev_qprefetch( __in efx_evq_t *eep, __in unsigned int count); #endif /* EFSYS_OPT_EV_PREFETCH */ extern void efx_ev_qpoll( __in efx_evq_t *eep, __inout unsigned int *countp, __in const efx_ev_callbacks_t *eecp, __in_opt void *arg); extern __checkReturn efx_rc_t efx_ev_qmoderate( __in efx_evq_t *eep, __in unsigned int us); extern __checkReturn efx_rc_t efx_ev_qprime( __in efx_evq_t *eep, __in unsigned int count); #if EFSYS_OPT_QSTATS #if EFSYS_OPT_NAMES extern const char * efx_ev_qstat_name( __in efx_nic_t *enp, __in unsigned int id); #endif /* EFSYS_OPT_NAMES */ extern void efx_ev_qstats_update( __in efx_evq_t *eep, __inout_ecount(EV_NQSTATS) efsys_stat_t *stat); #endif /* EFSYS_OPT_QSTATS */ extern void efx_ev_qdestroy( __in efx_evq_t *eep); /* RX */ extern __checkReturn efx_rc_t efx_rx_init( __inout efx_nic_t *enp); extern void efx_rx_fini( __in efx_nic_t *enp); #if EFSYS_OPT_RX_SCATTER __checkReturn efx_rc_t efx_rx_scatter_enable( __in efx_nic_t *enp, __in unsigned int buf_size); #endif /* EFSYS_OPT_RX_SCATTER */ #if EFSYS_OPT_RX_SCALE typedef enum efx_rx_hash_alg_e { EFX_RX_HASHALG_LFSR = 0, EFX_RX_HASHALG_TOEPLITZ } efx_rx_hash_alg_t; typedef enum efx_rx_hash_type_e { EFX_RX_HASH_IPV4 = 0, EFX_RX_HASH_TCPIPV4, EFX_RX_HASH_IPV6, EFX_RX_HASH_TCPIPV6, } efx_rx_hash_type_t; typedef enum efx_rx_hash_support_e { EFX_RX_HASH_UNAVAILABLE = 0, /* Hardware hash not inserted */ EFX_RX_HASH_AVAILABLE /* Insert hash with/without RSS */ } efx_rx_hash_support_t; #define EFX_RSS_TBL_SIZE 128 /* Rows in RX indirection table */ #define EFX_MAXRSS 64 /* RX indirection entry range */ #define EFX_MAXRSS_LEGACY 16 /* See bug16611 and bug17213 */ typedef enum efx_rx_scale_support_e { EFX_RX_SCALE_UNAVAILABLE = 0, /* Not supported */ EFX_RX_SCALE_EXCLUSIVE, /* Writable key/indirection table */ EFX_RX_SCALE_SHARED /* Read-only key/indirection table */ } efx_rx_scale_support_t; extern __checkReturn efx_rc_t efx_rx_hash_support_get( __in efx_nic_t *enp, __out efx_rx_hash_support_t *supportp); extern __checkReturn efx_rc_t efx_rx_scale_support_get( __in efx_nic_t *enp, __out efx_rx_scale_support_t *supportp); extern __checkReturn efx_rc_t efx_rx_scale_mode_set( __in efx_nic_t *enp, __in efx_rx_hash_alg_t alg, __in efx_rx_hash_type_t type, __in boolean_t insert); extern __checkReturn efx_rc_t efx_rx_scale_tbl_set( __in efx_nic_t *enp, __in_ecount(n) unsigned int *table, __in size_t n); extern __checkReturn efx_rc_t efx_rx_scale_key_set( __in efx_nic_t *enp, __in_ecount(n) uint8_t *key, __in size_t n); extern __checkReturn uint32_t efx_psuedo_hdr_hash_get( __in efx_nic_t *enp, __in efx_rx_hash_alg_t func, __in uint8_t *buffer); #endif /* EFSYS_OPT_RX_SCALE */ extern __checkReturn efx_rc_t efx_psuedo_hdr_pkt_length_get( __in efx_nic_t *enp, __in uint8_t *buffer, __out uint16_t *pkt_lengthp); #define EFX_RXQ_MAXNDESCS 4096 #define EFX_RXQ_MINNDESCS 512 #define EFX_RXQ_SIZE(_ndescs) ((_ndescs) * sizeof (efx_qword_t)) #define EFX_RXQ_NBUFS(_ndescs) (EFX_RXQ_SIZE(_ndescs) / EFX_BUF_SIZE) #define EFX_RXQ_LIMIT(_ndescs) ((_ndescs) - 16) #define EFX_RXQ_DC_NDESCS(_dcsize) (8 << _dcsize) typedef enum efx_rxq_type_e { EFX_RXQ_TYPE_DEFAULT, EFX_RXQ_TYPE_SCATTER, EFX_RXQ_NTYPES } efx_rxq_type_t; extern __checkReturn efx_rc_t efx_rx_qcreate( __in efx_nic_t *enp, __in unsigned int index, __in unsigned int label, __in efx_rxq_type_t type, __in efsys_mem_t *esmp, __in size_t n, __in uint32_t id, __in efx_evq_t *eep, __deref_out efx_rxq_t **erpp); typedef struct efx_buffer_s { efsys_dma_addr_t eb_addr; size_t eb_size; boolean_t eb_eop; } efx_buffer_t; typedef struct efx_desc_s { efx_qword_t ed_eq; } efx_desc_t; extern void efx_rx_qpost( __in efx_rxq_t *erp, __in_ecount(n) efsys_dma_addr_t *addrp, __in size_t size, __in unsigned int n, __in unsigned int completed, __in unsigned int added); extern void efx_rx_qpush( __in efx_rxq_t *erp, __in unsigned int added, __inout unsigned int *pushedp); extern __checkReturn efx_rc_t efx_rx_qflush( __in efx_rxq_t *erp); extern void efx_rx_qenable( __in efx_rxq_t *erp); extern void efx_rx_qdestroy( __in efx_rxq_t *erp); /* TX */ typedef struct efx_txq_s efx_txq_t; #if EFSYS_OPT_QSTATS /* START MKCONFIG GENERATED EfxHeaderTransmitQueueBlock 12dff8778598b2db */ typedef enum efx_tx_qstat_e { TX_POST, TX_POST_PIO, TX_NQSTATS } efx_tx_qstat_t; /* END MKCONFIG GENERATED EfxHeaderTransmitQueueBlock */ #endif /* EFSYS_OPT_QSTATS */ extern __checkReturn efx_rc_t efx_tx_init( __in efx_nic_t *enp); extern void efx_tx_fini( __in efx_nic_t *enp); #define EFX_BUG35388_WORKAROUND(_encp) \ (((_encp) == NULL) ? 1 : ((_encp)->enc_bug35388_workaround != 0)) #define EFX_TXQ_MAXNDESCS(_encp) \ ((EFX_BUG35388_WORKAROUND(_encp)) ? 2048 : 4096) #define EFX_TXQ_MINNDESCS 512 #define EFX_TXQ_SIZE(_ndescs) ((_ndescs) * sizeof (efx_qword_t)) #define EFX_TXQ_NBUFS(_ndescs) (EFX_TXQ_SIZE(_ndescs) / EFX_BUF_SIZE) #define EFX_TXQ_LIMIT(_ndescs) ((_ndescs) - 16) #define EFX_TXQ_DC_NDESCS(_dcsize) (8 << _dcsize) #define EFX_TXQ_MAX_BUFS 8 /* Maximum independent of EFX_BUG35388_WORKAROUND. */ #define EFX_TXQ_CKSUM_IPV4 0x0001 #define EFX_TXQ_CKSUM_TCPUDP 0x0002 extern __checkReturn efx_rc_t efx_tx_qcreate( __in efx_nic_t *enp, __in unsigned int index, __in unsigned int label, __in efsys_mem_t *esmp, __in size_t n, __in uint32_t id, __in uint16_t flags, __in efx_evq_t *eep, __deref_out efx_txq_t **etpp, __out unsigned int *addedp); extern __checkReturn efx_rc_t efx_tx_qpost( __in efx_txq_t *etp, __in_ecount(n) efx_buffer_t *eb, __in unsigned int n, __in unsigned int completed, __inout unsigned int *addedp); extern __checkReturn efx_rc_t efx_tx_qpace( __in efx_txq_t *etp, __in unsigned int ns); extern void efx_tx_qpush( __in efx_txq_t *etp, __in unsigned int added, __in unsigned int pushed); extern __checkReturn efx_rc_t efx_tx_qflush( __in efx_txq_t *etp); extern void efx_tx_qenable( __in efx_txq_t *etp); extern __checkReturn efx_rc_t efx_tx_qpio_enable( __in efx_txq_t *etp); extern void efx_tx_qpio_disable( __in efx_txq_t *etp); extern __checkReturn efx_rc_t efx_tx_qpio_write( __in efx_txq_t *etp, __in_ecount(buf_length) uint8_t *buffer, __in size_t buf_length, __in size_t pio_buf_offset); extern __checkReturn efx_rc_t efx_tx_qpio_post( __in efx_txq_t *etp, __in size_t pkt_length, __in unsigned int completed, __inout unsigned int *addedp); extern __checkReturn efx_rc_t efx_tx_qdesc_post( __in efx_txq_t *etp, __in_ecount(n) efx_desc_t *ed, __in unsigned int n, __in unsigned int completed, __inout unsigned int *addedp); extern void efx_tx_qdesc_dma_create( __in efx_txq_t *etp, __in efsys_dma_addr_t addr, __in size_t size, __in boolean_t eop, __out efx_desc_t *edp); extern void efx_tx_qdesc_tso_create( __in efx_txq_t *etp, __in uint16_t ipv4_id, __in uint32_t tcp_seq, __in uint8_t tcp_flags, __out efx_desc_t *edp); extern void efx_tx_qdesc_vlantci_create( __in efx_txq_t *etp, __in uint16_t tci, __out efx_desc_t *edp); #if EFSYS_OPT_QSTATS #if EFSYS_OPT_NAMES extern const char * efx_tx_qstat_name( __in efx_nic_t *etp, __in unsigned int id); #endif /* EFSYS_OPT_NAMES */ extern void efx_tx_qstats_update( __in efx_txq_t *etp, __inout_ecount(TX_NQSTATS) efsys_stat_t *stat); #endif /* EFSYS_OPT_QSTATS */ extern void efx_tx_qdestroy( __in efx_txq_t *etp); /* FILTER */ #if EFSYS_OPT_FILTER #define EFX_ETHER_TYPE_IPV4 0x0800 #define EFX_ETHER_TYPE_IPV6 0x86DD #define EFX_IPPROTO_TCP 6 #define EFX_IPPROTO_UDP 17 typedef enum efx_filter_flag_e { EFX_FILTER_FLAG_RX_RSS = 0x01, /* use RSS to spread across * multiple queues */ EFX_FILTER_FLAG_RX_SCATTER = 0x02, /* enable RX scatter */ EFX_FILTER_FLAG_RX_OVER_AUTO = 0x04, /* Override an automatic filter * (priority EFX_FILTER_PRI_AUTO). * May only be set by the filter * implementation for each type. * A removal request will * restore the automatic filter * in its place. */ EFX_FILTER_FLAG_RX = 0x08, /* Filter is for RX */ EFX_FILTER_FLAG_TX = 0x10, /* Filter is for TX */ } efx_filter_flag_t; typedef enum efx_filter_match_flags_e { EFX_FILTER_MATCH_REM_HOST = 0x0001, /* Match by remote IP host * address */ EFX_FILTER_MATCH_LOC_HOST = 0x0002, /* Match by local IP host * address */ EFX_FILTER_MATCH_REM_MAC = 0x0004, /* Match by remote MAC address */ EFX_FILTER_MATCH_REM_PORT = 0x0008, /* Match by remote TCP/UDP port */ EFX_FILTER_MATCH_LOC_MAC = 0x0010, /* Match by remote TCP/UDP port */ EFX_FILTER_MATCH_LOC_PORT = 0x0020, /* Match by local TCP/UDP port */ EFX_FILTER_MATCH_ETHER_TYPE = 0x0040, /* Match by Ether-type */ EFX_FILTER_MATCH_INNER_VID = 0x0080, /* Match by inner VLAN ID */ EFX_FILTER_MATCH_OUTER_VID = 0x0100, /* Match by outer VLAN ID */ EFX_FILTER_MATCH_IP_PROTO = 0x0200, /* Match by IP transport * protocol */ EFX_FILTER_MATCH_LOC_MAC_IG = 0x0400, /* Match by local MAC address * I/G bit. Used for RX default * unicast and multicast/ * broadcast filters. */ } efx_filter_match_flags_t; typedef enum efx_filter_priority_s { EFX_FILTER_PRI_HINT = 0, /* Performance hint */ EFX_FILTER_PRI_AUTO, /* Automatic filter based on device * address list or hardware * requirements. This may only be used * by the filter implementation for * each NIC type. */ EFX_FILTER_PRI_MANUAL, /* Manually configured filter */ EFX_FILTER_PRI_REQUIRED, /* Required for correct behaviour of the * client (e.g. SR-IOV, HyperV VMQ etc.) */ } efx_filter_priority_t; /* * FIXME: All these fields are assumed to be in little-endian byte order. * It may be better for some to be big-endian. See bug42804. */ typedef struct efx_filter_spec_s { uint32_t efs_match_flags:12; uint32_t efs_priority:2; uint32_t efs_flags:6; uint32_t efs_dmaq_id:12; uint32_t efs_rss_context; uint16_t efs_outer_vid; uint16_t efs_inner_vid; uint8_t efs_loc_mac[EFX_MAC_ADDR_LEN]; uint8_t efs_rem_mac[EFX_MAC_ADDR_LEN]; uint16_t efs_ether_type; uint8_t efs_ip_proto; uint16_t efs_loc_port; uint16_t efs_rem_port; efx_oword_t efs_rem_host; efx_oword_t efs_loc_host; } efx_filter_spec_t; /* Default values for use in filter specifications */ #define EFX_FILTER_SPEC_RSS_CONTEXT_DEFAULT 0xffffffff #define EFX_FILTER_SPEC_RX_DMAQ_ID_DROP 0xfff #define EFX_FILTER_SPEC_VID_UNSPEC 0xffff extern __checkReturn efx_rc_t efx_filter_init( __in efx_nic_t *enp); extern void efx_filter_fini( __in efx_nic_t *enp); extern __checkReturn efx_rc_t efx_filter_insert( __in efx_nic_t *enp, __inout efx_filter_spec_t *spec); extern __checkReturn efx_rc_t efx_filter_remove( __in efx_nic_t *enp, __inout efx_filter_spec_t *spec); extern __checkReturn efx_rc_t efx_filter_restore( __in efx_nic_t *enp); extern __checkReturn efx_rc_t efx_filter_supported_filters( __in efx_nic_t *enp, __out uint32_t *list, __out size_t *length); extern void efx_filter_spec_init_rx( - __inout efx_filter_spec_t *spec, + __out efx_filter_spec_t *spec, __in efx_filter_priority_t priority, __in efx_filter_flag_t flags, __in efx_rxq_t *erp); extern void efx_filter_spec_init_tx( - __inout efx_filter_spec_t *spec, + __out efx_filter_spec_t *spec, __in efx_txq_t *etp); extern __checkReturn efx_rc_t efx_filter_spec_set_ipv4_local( __inout efx_filter_spec_t *spec, __in uint8_t proto, __in uint32_t host, __in uint16_t port); extern __checkReturn efx_rc_t efx_filter_spec_set_ipv4_full( __inout efx_filter_spec_t *spec, __in uint8_t proto, __in uint32_t lhost, __in uint16_t lport, __in uint32_t rhost, __in uint16_t rport); extern __checkReturn efx_rc_t efx_filter_spec_set_eth_local( __inout efx_filter_spec_t *spec, __in uint16_t vid, __in const uint8_t *addr); extern __checkReturn efx_rc_t efx_filter_spec_set_uc_def( __inout efx_filter_spec_t *spec); extern __checkReturn efx_rc_t efx_filter_spec_set_mc_def( __inout efx_filter_spec_t *spec); #endif /* EFSYS_OPT_FILTER */ /* HASH */ extern __checkReturn uint32_t efx_hash_dwords( __in_ecount(count) uint32_t const *input, __in size_t count, __in uint32_t init); extern __checkReturn uint32_t efx_hash_bytes( __in_ecount(length) uint8_t const *input, __in size_t length, __in uint32_t init); #ifdef __cplusplus } #endif #endif /* _SYS_EFX_H */ Index: user/ngie/more-tests2/sys/dev/sfxge/common/efx_filter.c =================================================================== --- user/ngie/more-tests2/sys/dev/sfxge/common/efx_filter.c (revision 293822) +++ user/ngie/more-tests2/sys/dev/sfxge/common/efx_filter.c (revision 293823) @@ -1,1439 +1,1439 @@ /*- * Copyright (c) 2007-2015 Solarflare Communications 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 THE COPYRIGHT HOLDERS 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 COPYRIGHT OWNER 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. * * The views and conclusions contained in the software and documentation are * those of the authors and should not be interpreted as representing official * policies, either expressed or implied, of the FreeBSD Project. */ #include __FBSDID("$FreeBSD$"); #include "efx.h" #include "efx_impl.h" #if EFSYS_OPT_FILTER #if EFSYS_OPT_FALCON || EFSYS_OPT_SIENA static __checkReturn efx_rc_t falconsiena_filter_init( __in efx_nic_t *enp); static void falconsiena_filter_fini( __in efx_nic_t *enp); static __checkReturn efx_rc_t falconsiena_filter_restore( __in efx_nic_t *enp); static __checkReturn efx_rc_t falconsiena_filter_add( __in efx_nic_t *enp, __inout efx_filter_spec_t *spec, __in boolean_t may_replace); static __checkReturn efx_rc_t falconsiena_filter_delete( __in efx_nic_t *enp, __inout efx_filter_spec_t *spec); static __checkReturn efx_rc_t falconsiena_filter_supported_filters( __in efx_nic_t *enp, __out uint32_t *list, __out size_t *length); #endif /* EFSYS_OPT_FALCON || EFSYS_OPT_SIENA */ #if EFSYS_OPT_FALCON static efx_filter_ops_t __efx_filter_falcon_ops = { falconsiena_filter_init, /* efo_init */ falconsiena_filter_fini, /* efo_fini */ falconsiena_filter_restore, /* efo_restore */ falconsiena_filter_add, /* efo_add */ falconsiena_filter_delete, /* efo_delete */ falconsiena_filter_supported_filters, /* efo_supported_filters */ NULL, /* efo_reconfigure */ }; #endif /* EFSYS_OPT_FALCON */ #if EFSYS_OPT_SIENA static efx_filter_ops_t __efx_filter_siena_ops = { falconsiena_filter_init, /* efo_init */ falconsiena_filter_fini, /* efo_fini */ falconsiena_filter_restore, /* efo_restore */ falconsiena_filter_add, /* efo_add */ falconsiena_filter_delete, /* efo_delete */ falconsiena_filter_supported_filters, /* efo_supported_filters */ NULL, /* efo_reconfigure */ }; #endif /* EFSYS_OPT_SIENA */ #if EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD static efx_filter_ops_t __efx_filter_ef10_ops = { ef10_filter_init, /* efo_init */ ef10_filter_fini, /* efo_fini */ ef10_filter_restore, /* efo_restore */ ef10_filter_add, /* efo_add */ ef10_filter_delete, /* efo_delete */ ef10_filter_supported_filters, /* efo_supported_filters */ ef10_filter_reconfigure, /* efo_reconfigure */ }; #endif /* EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD */ __checkReturn efx_rc_t efx_filter_insert( __in efx_nic_t *enp, __inout efx_filter_spec_t *spec) { efx_filter_ops_t *efop = enp->en_efop; EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_FILTER); EFSYS_ASSERT3P(spec, !=, NULL); EFSYS_ASSERT3U(spec->efs_flags, &, EFX_FILTER_FLAG_RX); return (efop->efo_add(enp, spec, B_FALSE)); } __checkReturn efx_rc_t efx_filter_remove( __in efx_nic_t *enp, __inout efx_filter_spec_t *spec) { efx_filter_ops_t *efop = enp->en_efop; EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_FILTER); EFSYS_ASSERT3P(spec, !=, NULL); EFSYS_ASSERT3U(spec->efs_flags, &, EFX_FILTER_FLAG_RX); #if EFSYS_OPT_RX_SCALE spec->efs_rss_context = enp->en_rss_context; #endif return (efop->efo_delete(enp, spec)); } __checkReturn efx_rc_t efx_filter_restore( __in efx_nic_t *enp) { efx_rc_t rc; EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_FILTER); if ((rc = enp->en_efop->efo_restore(enp)) != 0) goto fail1; return (0); fail1: EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } __checkReturn efx_rc_t efx_filter_init( __in efx_nic_t *enp) { efx_filter_ops_t *efop; efx_rc_t rc; /* Check that efx_filter_spec_t is 64 bytes. */ EFX_STATIC_ASSERT(sizeof (efx_filter_spec_t) == 64); EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PROBE); EFSYS_ASSERT(!(enp->en_mod_flags & EFX_MOD_FILTER)); switch (enp->en_family) { #if EFSYS_OPT_FALCON case EFX_FAMILY_FALCON: efop = (efx_filter_ops_t *)&__efx_filter_falcon_ops; break; #endif /* EFSYS_OPT_FALCON */ #if EFSYS_OPT_SIENA case EFX_FAMILY_SIENA: efop = (efx_filter_ops_t *)&__efx_filter_siena_ops; break; #endif /* EFSYS_OPT_SIENA */ #if EFSYS_OPT_HUNTINGTON case EFX_FAMILY_HUNTINGTON: efop = (efx_filter_ops_t *)&__efx_filter_ef10_ops; break; #endif /* EFSYS_OPT_HUNTINGTON */ #if EFSYS_OPT_MEDFORD case EFX_FAMILY_MEDFORD: efop = (efx_filter_ops_t *)&__efx_filter_ef10_ops; break; #endif /* EFSYS_OPT_MEDFORD */ default: EFSYS_ASSERT(0); rc = ENOTSUP; goto fail1; } if ((rc = efop->efo_init(enp)) != 0) goto fail2; enp->en_efop = efop; enp->en_mod_flags |= EFX_MOD_FILTER; return (0); fail2: EFSYS_PROBE(fail2); fail1: EFSYS_PROBE1(fail1, efx_rc_t, rc); enp->en_efop = NULL; enp->en_mod_flags &= ~EFX_MOD_FILTER; return (rc); } void efx_filter_fini( __in efx_nic_t *enp) { EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PROBE); EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_FILTER); enp->en_efop->efo_fini(enp); enp->en_efop = NULL; enp->en_mod_flags &= ~EFX_MOD_FILTER; } __checkReturn efx_rc_t efx_filter_supported_filters( __in efx_nic_t *enp, __out uint32_t *list, __out size_t *length) { efx_rc_t rc; EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PROBE); EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_FILTER); EFSYS_ASSERT(enp->en_efop->efo_supported_filters != NULL); if ((rc = enp->en_efop->efo_supported_filters(enp, list, length)) != 0) goto fail1; return (0); fail1: EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } __checkReturn efx_rc_t efx_filter_reconfigure( __in efx_nic_t *enp, __in_ecount(6) uint8_t const *mac_addr, __in boolean_t all_unicst, __in boolean_t mulcst, __in boolean_t all_mulcst, __in boolean_t brdcst, __in_ecount(6*count) uint8_t const *addrs, __in int count) { efx_rc_t rc; EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PROBE); EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_FILTER); if (enp->en_efop->efo_reconfigure != NULL) { if ((rc = enp->en_efop->efo_reconfigure(enp, mac_addr, all_unicst, mulcst, all_mulcst, brdcst, addrs, count)) != 0) goto fail1; } return (0); fail1: EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } void efx_filter_spec_init_rx( - __inout efx_filter_spec_t *spec, + __out efx_filter_spec_t *spec, __in efx_filter_priority_t priority, __in efx_filter_flag_t flags, __in efx_rxq_t *erp) { EFSYS_ASSERT3P(spec, !=, NULL); EFSYS_ASSERT3P(erp, !=, NULL); EFSYS_ASSERT((flags & ~(EFX_FILTER_FLAG_RX_RSS | EFX_FILTER_FLAG_RX_SCATTER)) == 0); memset(spec, 0, sizeof (*spec)); spec->efs_priority = priority; spec->efs_flags = EFX_FILTER_FLAG_RX | flags; spec->efs_rss_context = EFX_FILTER_SPEC_RSS_CONTEXT_DEFAULT; spec->efs_dmaq_id = (uint16_t)erp->er_index; } void efx_filter_spec_init_tx( - __inout efx_filter_spec_t *spec, + __out efx_filter_spec_t *spec, __in efx_txq_t *etp) { EFSYS_ASSERT3P(spec, !=, NULL); EFSYS_ASSERT3P(etp, !=, NULL); memset(spec, 0, sizeof (*spec)); spec->efs_priority = EFX_FILTER_PRI_REQUIRED; spec->efs_flags = EFX_FILTER_FLAG_TX; spec->efs_dmaq_id = (uint16_t)etp->et_index; } /* * Specify IPv4 host, transport protocol and port in a filter specification */ __checkReturn efx_rc_t efx_filter_spec_set_ipv4_local( __inout efx_filter_spec_t *spec, __in uint8_t proto, __in uint32_t host, __in uint16_t port) { EFSYS_ASSERT3P(spec, !=, NULL); spec->efs_match_flags |= EFX_FILTER_MATCH_ETHER_TYPE | EFX_FILTER_MATCH_IP_PROTO | EFX_FILTER_MATCH_LOC_HOST | EFX_FILTER_MATCH_LOC_PORT; spec->efs_ether_type = EFX_ETHER_TYPE_IPV4; spec->efs_ip_proto = proto; spec->efs_loc_host.eo_u32[0] = host; spec->efs_loc_port = port; return (0); } /* * Specify IPv4 hosts, transport protocol and ports in a filter specification */ __checkReturn efx_rc_t efx_filter_spec_set_ipv4_full( __inout efx_filter_spec_t *spec, __in uint8_t proto, __in uint32_t lhost, __in uint16_t lport, __in uint32_t rhost, __in uint16_t rport) { EFSYS_ASSERT3P(spec, !=, NULL); spec->efs_match_flags |= EFX_FILTER_MATCH_ETHER_TYPE | EFX_FILTER_MATCH_IP_PROTO | EFX_FILTER_MATCH_LOC_HOST | EFX_FILTER_MATCH_LOC_PORT | EFX_FILTER_MATCH_REM_HOST | EFX_FILTER_MATCH_REM_PORT; spec->efs_ether_type = EFX_ETHER_TYPE_IPV4; spec->efs_ip_proto = proto; spec->efs_loc_host.eo_u32[0] = lhost; spec->efs_loc_port = lport; spec->efs_rem_host.eo_u32[0] = rhost; spec->efs_rem_port = rport; return (0); } /* * Specify local Ethernet address and/or VID in filter specification */ __checkReturn efx_rc_t efx_filter_spec_set_eth_local( __inout efx_filter_spec_t *spec, __in uint16_t vid, __in const uint8_t *addr) { EFSYS_ASSERT3P(spec, !=, NULL); EFSYS_ASSERT3P(addr, !=, NULL); if (vid == EFX_FILTER_SPEC_VID_UNSPEC && addr == NULL) return (EINVAL); if (vid != EFX_FILTER_SPEC_VID_UNSPEC) { spec->efs_match_flags |= EFX_FILTER_MATCH_OUTER_VID; spec->efs_outer_vid = vid; } if (addr != NULL) { spec->efs_match_flags |= EFX_FILTER_MATCH_LOC_MAC; memcpy(spec->efs_loc_mac, addr, EFX_MAC_ADDR_LEN); } return (0); } /* * Specify matching otherwise-unmatched unicast in a filter specification */ __checkReturn efx_rc_t efx_filter_spec_set_uc_def( __inout efx_filter_spec_t *spec) { EFSYS_ASSERT3P(spec, !=, NULL); spec->efs_match_flags |= EFX_FILTER_MATCH_LOC_MAC_IG; return (0); } /* * Specify matching otherwise-unmatched multicast in a filter specification */ __checkReturn efx_rc_t efx_filter_spec_set_mc_def( __inout efx_filter_spec_t *spec) { EFSYS_ASSERT3P(spec, !=, NULL); spec->efs_match_flags |= EFX_FILTER_MATCH_LOC_MAC_IG; spec->efs_loc_mac[0] = 1; return (0); } #if EFSYS_OPT_FALCON || EFSYS_OPT_SIENA /* * "Fudge factors" - difference between programmed value and actual depth. * Due to pipelined implementation we need to program H/W with a value that * is larger than the hop limit we want. */ #define FILTER_CTL_SRCH_FUDGE_WILD 3 #define FILTER_CTL_SRCH_FUDGE_FULL 1 /* * Hard maximum hop limit. Hardware will time-out beyond 200-something. * We also need to avoid infinite loops in efx_filter_search() when the * table is full. */ #define FILTER_CTL_SRCH_MAX 200 static __checkReturn efx_rc_t falconsiena_filter_spec_from_gen_spec( __out falconsiena_filter_spec_t *fs_spec, __in efx_filter_spec_t *gen_spec) { efx_rc_t rc; boolean_t is_full = B_FALSE; if (gen_spec->efs_flags & EFX_FILTER_FLAG_TX) EFSYS_ASSERT3U(gen_spec->efs_flags, ==, EFX_FILTER_FLAG_TX); else EFSYS_ASSERT3U(gen_spec->efs_flags, &, EFX_FILTER_FLAG_RX); /* Falconsiena only has one RSS context */ if ((gen_spec->efs_flags & EFX_FILTER_FLAG_RX_RSS) && gen_spec->efs_rss_context != 0) { rc = EINVAL; goto fail1; } fs_spec->fsfs_flags = gen_spec->efs_flags; fs_spec->fsfs_dmaq_id = gen_spec->efs_dmaq_id; switch (gen_spec->efs_match_flags) { case EFX_FILTER_MATCH_ETHER_TYPE | EFX_FILTER_MATCH_IP_PROTO | EFX_FILTER_MATCH_LOC_HOST | EFX_FILTER_MATCH_LOC_PORT | EFX_FILTER_MATCH_REM_HOST | EFX_FILTER_MATCH_REM_PORT: is_full = B_TRUE; /* Fall through */ case EFX_FILTER_MATCH_ETHER_TYPE | EFX_FILTER_MATCH_IP_PROTO | EFX_FILTER_MATCH_LOC_HOST | EFX_FILTER_MATCH_LOC_PORT: { uint32_t rhost, host1, host2; uint16_t rport, port1, port2; if (gen_spec->efs_ether_type != EFX_ETHER_TYPE_IPV4) { rc = ENOTSUP; goto fail2; } if (gen_spec->efs_loc_port == 0 || (is_full && gen_spec->efs_rem_port == 0)) { rc = EINVAL; goto fail3; } switch (gen_spec->efs_ip_proto) { case EFX_IPPROTO_TCP: if (gen_spec->efs_flags & EFX_FILTER_FLAG_TX) { fs_spec->fsfs_type = (is_full ? EFX_FS_FILTER_TX_TCP_FULL : EFX_FS_FILTER_TX_TCP_WILD); } else { fs_spec->fsfs_type = (is_full ? EFX_FS_FILTER_RX_TCP_FULL : EFX_FS_FILTER_RX_TCP_WILD); } break; case EFX_IPPROTO_UDP: if (gen_spec->efs_flags & EFX_FILTER_FLAG_TX) { fs_spec->fsfs_type = (is_full ? EFX_FS_FILTER_TX_UDP_FULL : EFX_FS_FILTER_TX_UDP_WILD); } else { fs_spec->fsfs_type = (is_full ? EFX_FS_FILTER_RX_UDP_FULL : EFX_FS_FILTER_RX_UDP_WILD); } break; default: rc = ENOTSUP; goto fail4; } /* * The filter is constructed in terms of source and destination, * with the odd wrinkle that the ports are swapped in a UDP * wildcard filter. We need to convert from local and remote * addresses (zero for a wildcard). */ rhost = is_full ? gen_spec->efs_rem_host.eo_u32[0] : 0; rport = is_full ? gen_spec->efs_rem_port : 0; if (gen_spec->efs_flags & EFX_FILTER_FLAG_TX) { host1 = gen_spec->efs_loc_host.eo_u32[0]; host2 = rhost; } else { host1 = rhost; host2 = gen_spec->efs_loc_host.eo_u32[0]; } if (gen_spec->efs_flags & EFX_FILTER_FLAG_TX) { if (fs_spec->fsfs_type == EFX_FS_FILTER_TX_UDP_WILD) { port1 = rport; port2 = gen_spec->efs_loc_port; } else { port1 = gen_spec->efs_loc_port; port2 = rport; } } else { if (fs_spec->fsfs_type == EFX_FS_FILTER_RX_UDP_WILD) { port1 = gen_spec->efs_loc_port; port2 = rport; } else { port1 = rport; port2 = gen_spec->efs_loc_port; } } fs_spec->fsfs_dword[0] = (host1 << 16) | port1; fs_spec->fsfs_dword[1] = (port2 << 16) | (host1 >> 16); fs_spec->fsfs_dword[2] = host2; break; } case EFX_FILTER_MATCH_LOC_MAC | EFX_FILTER_MATCH_OUTER_VID: is_full = B_TRUE; /* Fall through */ case EFX_FILTER_MATCH_LOC_MAC: if (gen_spec->efs_flags & EFX_FILTER_FLAG_TX) { fs_spec->fsfs_type = (is_full ? EFX_FS_FILTER_TX_MAC_FULL : EFX_FS_FILTER_TX_MAC_WILD); } else { fs_spec->fsfs_type = (is_full ? EFX_FS_FILTER_RX_MAC_FULL : EFX_FS_FILTER_RX_MAC_WILD); } fs_spec->fsfs_dword[0] = is_full ? gen_spec->efs_outer_vid : 0; fs_spec->fsfs_dword[1] = gen_spec->efs_loc_mac[2] << 24 | gen_spec->efs_loc_mac[3] << 16 | gen_spec->efs_loc_mac[4] << 8 | gen_spec->efs_loc_mac[5]; fs_spec->fsfs_dword[2] = gen_spec->efs_loc_mac[0] << 8 | gen_spec->efs_loc_mac[1]; break; default: EFSYS_ASSERT(B_FALSE); rc = ENOTSUP; goto fail5; } return (0); fail5: EFSYS_PROBE(fail5); fail4: EFSYS_PROBE(fail4); fail3: EFSYS_PROBE(fail3); fail2: EFSYS_PROBE(fail2); fail1: EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } /* * The filter hash function is LFSR polynomial x^16 + x^3 + 1 of a 32-bit * key derived from the n-tuple. */ static uint16_t falconsiena_filter_tbl_hash( __in uint32_t key) { uint16_t tmp; /* First 16 rounds */ tmp = 0x1fff ^ (uint16_t)(key >> 16); tmp = tmp ^ tmp >> 3 ^ tmp >> 6; tmp = tmp ^ tmp >> 9; /* Last 16 rounds */ tmp = tmp ^ tmp << 13 ^ (uint16_t)(key & 0xffff); tmp = tmp ^ tmp >> 3 ^ tmp >> 6; tmp = tmp ^ tmp >> 9; return (tmp); } /* * To allow for hash collisions, filter search continues at these * increments from the first possible entry selected by the hash. */ static uint16_t falconsiena_filter_tbl_increment( __in uint32_t key) { return ((uint16_t)(key * 2 - 1)); } static __checkReturn boolean_t falconsiena_filter_test_used( __in falconsiena_filter_tbl_t *fsftp, __in unsigned int index) { EFSYS_ASSERT3P(fsftp->fsft_bitmap, !=, NULL); return ((fsftp->fsft_bitmap[index / 32] & (1 << (index % 32))) != 0); } static void falconsiena_filter_set_used( __in falconsiena_filter_tbl_t *fsftp, __in unsigned int index) { EFSYS_ASSERT3P(fsftp->fsft_bitmap, !=, NULL); fsftp->fsft_bitmap[index / 32] |= (1 << (index % 32)); ++fsftp->fsft_used; } static void falconsiena_filter_clear_used( __in falconsiena_filter_tbl_t *fsftp, __in unsigned int index) { EFSYS_ASSERT3P(fsftp->fsft_bitmap, !=, NULL); fsftp->fsft_bitmap[index / 32] &= ~(1 << (index % 32)); --fsftp->fsft_used; EFSYS_ASSERT3U(fsftp->fsft_used, >=, 0); } static falconsiena_filter_tbl_id_t falconsiena_filter_tbl_id( __in falconsiena_filter_type_t type) { falconsiena_filter_tbl_id_t tbl_id; switch (type) { case EFX_FS_FILTER_RX_TCP_FULL: case EFX_FS_FILTER_RX_TCP_WILD: case EFX_FS_FILTER_RX_UDP_FULL: case EFX_FS_FILTER_RX_UDP_WILD: tbl_id = EFX_FS_FILTER_TBL_RX_IP; break; #if EFSYS_OPT_SIENA case EFX_FS_FILTER_RX_MAC_FULL: case EFX_FS_FILTER_RX_MAC_WILD: tbl_id = EFX_FS_FILTER_TBL_RX_MAC; break; case EFX_FS_FILTER_TX_TCP_FULL: case EFX_FS_FILTER_TX_TCP_WILD: case EFX_FS_FILTER_TX_UDP_FULL: case EFX_FS_FILTER_TX_UDP_WILD: tbl_id = EFX_FS_FILTER_TBL_TX_IP; break; case EFX_FS_FILTER_TX_MAC_FULL: case EFX_FS_FILTER_TX_MAC_WILD: tbl_id = EFX_FS_FILTER_TBL_TX_MAC; break; #endif /* EFSYS_OPT_SIENA */ default: EFSYS_ASSERT(B_FALSE); tbl_id = EFX_FS_FILTER_NTBLS; break; } return (tbl_id); } static void falconsiena_filter_reset_search_depth( __inout falconsiena_filter_t *fsfp, __in falconsiena_filter_tbl_id_t tbl_id) { switch (tbl_id) { case EFX_FS_FILTER_TBL_RX_IP: fsfp->fsf_depth[EFX_FS_FILTER_RX_TCP_FULL] = 0; fsfp->fsf_depth[EFX_FS_FILTER_RX_TCP_WILD] = 0; fsfp->fsf_depth[EFX_FS_FILTER_RX_UDP_FULL] = 0; fsfp->fsf_depth[EFX_FS_FILTER_RX_UDP_WILD] = 0; break; #if EFSYS_OPT_SIENA case EFX_FS_FILTER_TBL_RX_MAC: fsfp->fsf_depth[EFX_FS_FILTER_RX_MAC_FULL] = 0; fsfp->fsf_depth[EFX_FS_FILTER_RX_MAC_WILD] = 0; break; case EFX_FS_FILTER_TBL_TX_IP: fsfp->fsf_depth[EFX_FS_FILTER_TX_TCP_FULL] = 0; fsfp->fsf_depth[EFX_FS_FILTER_TX_TCP_WILD] = 0; fsfp->fsf_depth[EFX_FS_FILTER_TX_UDP_FULL] = 0; fsfp->fsf_depth[EFX_FS_FILTER_TX_UDP_WILD] = 0; break; case EFX_FS_FILTER_TBL_TX_MAC: fsfp->fsf_depth[EFX_FS_FILTER_TX_MAC_FULL] = 0; fsfp->fsf_depth[EFX_FS_FILTER_TX_MAC_WILD] = 0; break; #endif /* EFSYS_OPT_SIENA */ default: EFSYS_ASSERT(B_FALSE); break; } } static void falconsiena_filter_push_rx_limits( __in efx_nic_t *enp) { falconsiena_filter_t *fsfp = enp->en_filter.ef_falconsiena_filter; efx_oword_t oword; EFX_BAR_READO(enp, FR_AZ_RX_FILTER_CTL_REG, &oword); EFX_SET_OWORD_FIELD(oword, FRF_AZ_TCP_FULL_SRCH_LIMIT, fsfp->fsf_depth[EFX_FS_FILTER_RX_TCP_FULL] + FILTER_CTL_SRCH_FUDGE_FULL); EFX_SET_OWORD_FIELD(oword, FRF_AZ_TCP_WILD_SRCH_LIMIT, fsfp->fsf_depth[EFX_FS_FILTER_RX_TCP_WILD] + FILTER_CTL_SRCH_FUDGE_WILD); EFX_SET_OWORD_FIELD(oword, FRF_AZ_UDP_FULL_SRCH_LIMIT, fsfp->fsf_depth[EFX_FS_FILTER_RX_UDP_FULL] + FILTER_CTL_SRCH_FUDGE_FULL); EFX_SET_OWORD_FIELD(oword, FRF_AZ_UDP_WILD_SRCH_LIMIT, fsfp->fsf_depth[EFX_FS_FILTER_RX_UDP_WILD] + FILTER_CTL_SRCH_FUDGE_WILD); #if EFSYS_OPT_SIENA if (fsfp->fsf_tbl[EFX_FS_FILTER_TBL_RX_MAC].fsft_size) { EFX_SET_OWORD_FIELD(oword, FRF_CZ_ETHERNET_FULL_SEARCH_LIMIT, fsfp->fsf_depth[EFX_FS_FILTER_RX_MAC_FULL] + FILTER_CTL_SRCH_FUDGE_FULL); EFX_SET_OWORD_FIELD(oword, FRF_CZ_ETHERNET_WILDCARD_SEARCH_LIMIT, fsfp->fsf_depth[EFX_FS_FILTER_RX_MAC_WILD] + FILTER_CTL_SRCH_FUDGE_WILD); } #endif /* EFSYS_OPT_SIENA */ EFX_BAR_WRITEO(enp, FR_AZ_RX_FILTER_CTL_REG, &oword); } static void falconsiena_filter_push_tx_limits( __in efx_nic_t *enp) { falconsiena_filter_t *fsfp = enp->en_filter.ef_falconsiena_filter; efx_oword_t oword; EFX_BAR_READO(enp, FR_AZ_TX_CFG_REG, &oword); if (fsfp->fsf_tbl[EFX_FS_FILTER_TBL_TX_IP].fsft_size != 0) { EFX_SET_OWORD_FIELD(oword, FRF_CZ_TX_TCPIP_FILTER_FULL_SEARCH_RANGE, fsfp->fsf_depth[EFX_FS_FILTER_TX_TCP_FULL] + FILTER_CTL_SRCH_FUDGE_FULL); EFX_SET_OWORD_FIELD(oword, FRF_CZ_TX_TCPIP_FILTER_WILD_SEARCH_RANGE, fsfp->fsf_depth[EFX_FS_FILTER_TX_TCP_WILD] + FILTER_CTL_SRCH_FUDGE_WILD); EFX_SET_OWORD_FIELD(oword, FRF_CZ_TX_UDPIP_FILTER_FULL_SEARCH_RANGE, fsfp->fsf_depth[EFX_FS_FILTER_TX_UDP_FULL] + FILTER_CTL_SRCH_FUDGE_FULL); EFX_SET_OWORD_FIELD(oword, FRF_CZ_TX_UDPIP_FILTER_WILD_SEARCH_RANGE, fsfp->fsf_depth[EFX_FS_FILTER_TX_UDP_WILD] + FILTER_CTL_SRCH_FUDGE_WILD); } if (fsfp->fsf_tbl[EFX_FS_FILTER_TBL_TX_MAC].fsft_size != 0) { EFX_SET_OWORD_FIELD( oword, FRF_CZ_TX_ETH_FILTER_FULL_SEARCH_RANGE, fsfp->fsf_depth[EFX_FS_FILTER_TX_MAC_FULL] + FILTER_CTL_SRCH_FUDGE_FULL); EFX_SET_OWORD_FIELD( oword, FRF_CZ_TX_ETH_FILTER_WILD_SEARCH_RANGE, fsfp->fsf_depth[EFX_FS_FILTER_TX_MAC_WILD] + FILTER_CTL_SRCH_FUDGE_WILD); } EFX_BAR_WRITEO(enp, FR_AZ_TX_CFG_REG, &oword); } /* Build a filter entry and return its n-tuple key. */ static __checkReturn uint32_t falconsiena_filter_build( __out efx_oword_t *filter, __in falconsiena_filter_spec_t *spec) { uint32_t dword3; uint32_t key; uint8_t type = spec->fsfs_type; uint32_t flags = spec->fsfs_flags; switch (falconsiena_filter_tbl_id(type)) { case EFX_FS_FILTER_TBL_RX_IP: { boolean_t is_udp = (type == EFX_FS_FILTER_RX_UDP_FULL || type == EFX_FS_FILTER_RX_UDP_WILD); EFX_POPULATE_OWORD_7(*filter, FRF_BZ_RSS_EN, (flags & EFX_FILTER_FLAG_RX_RSS) ? 1 : 0, FRF_BZ_SCATTER_EN, (flags & EFX_FILTER_FLAG_RX_SCATTER) ? 1 : 0, FRF_AZ_TCP_UDP, is_udp, FRF_AZ_RXQ_ID, spec->fsfs_dmaq_id, EFX_DWORD_2, spec->fsfs_dword[2], EFX_DWORD_1, spec->fsfs_dword[1], EFX_DWORD_0, spec->fsfs_dword[0]); dword3 = is_udp; break; } #if EFSYS_OPT_SIENA case EFX_FS_FILTER_TBL_RX_MAC: { boolean_t is_wild = (type == EFX_FS_FILTER_RX_MAC_WILD); EFX_POPULATE_OWORD_7(*filter, FRF_CZ_RMFT_RSS_EN, (flags & EFX_FILTER_FLAG_RX_RSS) ? 1 : 0, FRF_CZ_RMFT_SCATTER_EN, (flags & EFX_FILTER_FLAG_RX_SCATTER) ? 1 : 0, FRF_CZ_RMFT_RXQ_ID, spec->fsfs_dmaq_id, FRF_CZ_RMFT_WILDCARD_MATCH, is_wild, FRF_CZ_RMFT_DEST_MAC_DW1, spec->fsfs_dword[2], FRF_CZ_RMFT_DEST_MAC_DW0, spec->fsfs_dword[1], FRF_CZ_RMFT_VLAN_ID, spec->fsfs_dword[0]); dword3 = is_wild; break; } #endif /* EFSYS_OPT_SIENA */ case EFX_FS_FILTER_TBL_TX_IP: { boolean_t is_udp = (type == EFX_FS_FILTER_TX_UDP_FULL || type == EFX_FS_FILTER_TX_UDP_WILD); EFX_POPULATE_OWORD_5(*filter, FRF_CZ_TIFT_TCP_UDP, is_udp, FRF_CZ_TIFT_TXQ_ID, spec->fsfs_dmaq_id, EFX_DWORD_2, spec->fsfs_dword[2], EFX_DWORD_1, spec->fsfs_dword[1], EFX_DWORD_0, spec->fsfs_dword[0]); dword3 = is_udp | spec->fsfs_dmaq_id << 1; break; } #if EFSYS_OPT_SIENA case EFX_FS_FILTER_TBL_TX_MAC: { boolean_t is_wild = (type == EFX_FS_FILTER_TX_MAC_WILD); EFX_POPULATE_OWORD_5(*filter, FRF_CZ_TMFT_TXQ_ID, spec->fsfs_dmaq_id, FRF_CZ_TMFT_WILDCARD_MATCH, is_wild, FRF_CZ_TMFT_SRC_MAC_DW1, spec->fsfs_dword[2], FRF_CZ_TMFT_SRC_MAC_DW0, spec->fsfs_dword[1], FRF_CZ_TMFT_VLAN_ID, spec->fsfs_dword[0]); dword3 = is_wild | spec->fsfs_dmaq_id << 1; break; } #endif /* EFSYS_OPT_SIENA */ default: EFSYS_ASSERT(B_FALSE); return (0); } key = spec->fsfs_dword[0] ^ spec->fsfs_dword[1] ^ spec->fsfs_dword[2] ^ dword3; return (key); } static __checkReturn efx_rc_t falconsiena_filter_push_entry( __inout efx_nic_t *enp, __in falconsiena_filter_type_t type, __in int index, __in efx_oword_t *eop) { efx_rc_t rc; switch (type) { case EFX_FS_FILTER_RX_TCP_FULL: case EFX_FS_FILTER_RX_TCP_WILD: case EFX_FS_FILTER_RX_UDP_FULL: case EFX_FS_FILTER_RX_UDP_WILD: EFX_BAR_TBL_WRITEO(enp, FR_AZ_RX_FILTER_TBL0, index, eop, B_TRUE); break; #if EFSYS_OPT_SIENA case EFX_FS_FILTER_RX_MAC_FULL: case EFX_FS_FILTER_RX_MAC_WILD: EFX_BAR_TBL_WRITEO(enp, FR_CZ_RX_MAC_FILTER_TBL0, index, eop, B_TRUE); break; case EFX_FS_FILTER_TX_TCP_FULL: case EFX_FS_FILTER_TX_TCP_WILD: case EFX_FS_FILTER_TX_UDP_FULL: case EFX_FS_FILTER_TX_UDP_WILD: EFX_BAR_TBL_WRITEO(enp, FR_CZ_TX_FILTER_TBL0, index, eop, B_TRUE); break; case EFX_FS_FILTER_TX_MAC_FULL: case EFX_FS_FILTER_TX_MAC_WILD: EFX_BAR_TBL_WRITEO(enp, FR_CZ_TX_MAC_FILTER_TBL0, index, eop, B_TRUE); break; #endif /* EFSYS_OPT_SIENA */ default: EFSYS_ASSERT(B_FALSE); rc = ENOTSUP; goto fail1; } return (0); fail1: return (rc); } static __checkReturn boolean_t falconsiena_filter_equal( __in const falconsiena_filter_spec_t *left, __in const falconsiena_filter_spec_t *right) { falconsiena_filter_tbl_id_t tbl_id; tbl_id = falconsiena_filter_tbl_id(left->fsfs_type); if (left->fsfs_type != right->fsfs_type) return (B_FALSE); if (memcmp(left->fsfs_dword, right->fsfs_dword, sizeof (left->fsfs_dword))) return (B_FALSE); if ((tbl_id == EFX_FS_FILTER_TBL_TX_IP || tbl_id == EFX_FS_FILTER_TBL_TX_MAC) && left->fsfs_dmaq_id != right->fsfs_dmaq_id) return (B_FALSE); return (B_TRUE); } static __checkReturn efx_rc_t falconsiena_filter_search( __in falconsiena_filter_tbl_t *fsftp, __in falconsiena_filter_spec_t *spec, __in uint32_t key, __in boolean_t for_insert, __out int *filter_index, __out unsigned int *depth_required) { unsigned hash, incr, filter_idx, depth; hash = falconsiena_filter_tbl_hash(key); incr = falconsiena_filter_tbl_increment(key); filter_idx = hash & (fsftp->fsft_size - 1); depth = 1; for (;;) { /* * Return success if entry is used and matches this spec * or entry is unused and we are trying to insert. */ if (falconsiena_filter_test_used(fsftp, filter_idx) ? falconsiena_filter_equal(spec, &fsftp->fsft_spec[filter_idx]) : for_insert) { *filter_index = filter_idx; *depth_required = depth; return (0); } /* Return failure if we reached the maximum search depth */ if (depth == FILTER_CTL_SRCH_MAX) return (for_insert ? EBUSY : ENOENT); filter_idx = (filter_idx + incr) & (fsftp->fsft_size - 1); ++depth; } } static void falconsiena_filter_clear_entry( __in efx_nic_t *enp, __in falconsiena_filter_tbl_t *fsftp, __in int index) { efx_oword_t filter; if (falconsiena_filter_test_used(fsftp, index)) { falconsiena_filter_clear_used(fsftp, index); EFX_ZERO_OWORD(filter); falconsiena_filter_push_entry(enp, fsftp->fsft_spec[index].fsfs_type, index, &filter); memset(&fsftp->fsft_spec[index], 0, sizeof (fsftp->fsft_spec[0])); } } void falconsiena_filter_tbl_clear( __in efx_nic_t *enp, __in falconsiena_filter_tbl_id_t tbl_id) { falconsiena_filter_t *fsfp = enp->en_filter.ef_falconsiena_filter; falconsiena_filter_tbl_t *fsftp = &fsfp->fsf_tbl[tbl_id]; int index; int state; EFSYS_LOCK(enp->en_eslp, state); for (index = 0; index < fsftp->fsft_size; ++index) { falconsiena_filter_clear_entry(enp, fsftp, index); } if (fsftp->fsft_used == 0) falconsiena_filter_reset_search_depth(fsfp, tbl_id); EFSYS_UNLOCK(enp->en_eslp, state); } static __checkReturn efx_rc_t falconsiena_filter_init( __in efx_nic_t *enp) { falconsiena_filter_t *fsfp; falconsiena_filter_tbl_t *fsftp; int tbl_id; efx_rc_t rc; EFSYS_KMEM_ALLOC(enp->en_esip, sizeof (falconsiena_filter_t), fsfp); if (!fsfp) { rc = ENOMEM; goto fail1; } enp->en_filter.ef_falconsiena_filter = fsfp; switch (enp->en_family) { #if EFSYS_OPT_FALCON case EFX_FAMILY_FALCON: fsftp = &fsfp->fsf_tbl[EFX_FS_FILTER_TBL_RX_IP]; fsftp->fsft_size = FR_AZ_RX_FILTER_TBL0_ROWS; break; #endif /* EFSYS_OPT_FALCON */ #if EFSYS_OPT_SIENA case EFX_FAMILY_SIENA: fsftp = &fsfp->fsf_tbl[EFX_FS_FILTER_TBL_RX_IP]; fsftp->fsft_size = FR_AZ_RX_FILTER_TBL0_ROWS; fsftp = &fsfp->fsf_tbl[EFX_FS_FILTER_TBL_RX_MAC]; fsftp->fsft_size = FR_CZ_RX_MAC_FILTER_TBL0_ROWS; fsftp = &fsfp->fsf_tbl[EFX_FS_FILTER_TBL_TX_IP]; fsftp->fsft_size = FR_CZ_TX_FILTER_TBL0_ROWS; fsftp = &fsfp->fsf_tbl[EFX_FS_FILTER_TBL_TX_MAC]; fsftp->fsft_size = FR_CZ_TX_MAC_FILTER_TBL0_ROWS; break; #endif /* EFSYS_OPT_SIENA */ default: rc = ENOTSUP; goto fail2; } for (tbl_id = 0; tbl_id < EFX_FS_FILTER_NTBLS; tbl_id++) { unsigned int bitmap_size; fsftp = &fsfp->fsf_tbl[tbl_id]; if (fsftp->fsft_size == 0) continue; EFX_STATIC_ASSERT(sizeof (fsftp->fsft_bitmap[0]) == sizeof (uint32_t)); bitmap_size = (fsftp->fsft_size + (sizeof (uint32_t) * 8) - 1) / 8; EFSYS_KMEM_ALLOC(enp->en_esip, bitmap_size, fsftp->fsft_bitmap); if (!fsftp->fsft_bitmap) { rc = ENOMEM; goto fail3; } EFSYS_KMEM_ALLOC(enp->en_esip, fsftp->fsft_size * sizeof (*fsftp->fsft_spec), fsftp->fsft_spec); if (!fsftp->fsft_spec) { rc = ENOMEM; goto fail4; } memset(fsftp->fsft_spec, 0, fsftp->fsft_size * sizeof (*fsftp->fsft_spec)); } return (0); fail4: EFSYS_PROBE(fail4); fail3: EFSYS_PROBE(fail3); fail2: EFSYS_PROBE(fail2); falconsiena_filter_fini(enp); fail1: EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } static void falconsiena_filter_fini( __in efx_nic_t *enp) { falconsiena_filter_t *fsfp = enp->en_filter.ef_falconsiena_filter; falconsiena_filter_tbl_id_t tbl_id; EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PROBE); if (fsfp == NULL) return; for (tbl_id = 0; tbl_id < EFX_FS_FILTER_NTBLS; tbl_id++) { falconsiena_filter_tbl_t *fsftp = &fsfp->fsf_tbl[tbl_id]; unsigned int bitmap_size; EFX_STATIC_ASSERT(sizeof (fsftp->fsft_bitmap[0]) == sizeof (uint32_t)); bitmap_size = (fsftp->fsft_size + (sizeof (uint32_t) * 8) - 1) / 8; if (fsftp->fsft_bitmap != NULL) { EFSYS_KMEM_FREE(enp->en_esip, bitmap_size, fsftp->fsft_bitmap); fsftp->fsft_bitmap = NULL; } if (fsftp->fsft_spec != NULL) { EFSYS_KMEM_FREE(enp->en_esip, fsftp->fsft_size * sizeof (*fsftp->fsft_spec), fsftp->fsft_spec); fsftp->fsft_spec = NULL; } } EFSYS_KMEM_FREE(enp->en_esip, sizeof (falconsiena_filter_t), enp->en_filter.ef_falconsiena_filter); } /* Restore filter state after a reset */ static __checkReturn efx_rc_t falconsiena_filter_restore( __in efx_nic_t *enp) { falconsiena_filter_t *fsfp = enp->en_filter.ef_falconsiena_filter; falconsiena_filter_tbl_id_t tbl_id; falconsiena_filter_tbl_t *fsftp; falconsiena_filter_spec_t *spec; efx_oword_t filter; int filter_idx; int state; efx_rc_t rc; EFSYS_LOCK(enp->en_eslp, state); for (tbl_id = 0; tbl_id < EFX_FS_FILTER_NTBLS; tbl_id++) { fsftp = &fsfp->fsf_tbl[tbl_id]; for (filter_idx = 0; filter_idx < fsftp->fsft_size; filter_idx++) { if (!falconsiena_filter_test_used(fsftp, filter_idx)) continue; spec = &fsftp->fsft_spec[filter_idx]; if ((rc = falconsiena_filter_build(&filter, spec)) != 0) goto fail1; if ((rc = falconsiena_filter_push_entry(enp, spec->fsfs_type, filter_idx, &filter)) != 0) goto fail2; } } falconsiena_filter_push_rx_limits(enp); falconsiena_filter_push_tx_limits(enp); EFSYS_UNLOCK(enp->en_eslp, state); return (0); fail2: EFSYS_PROBE(fail2); fail1: EFSYS_PROBE1(fail1, efx_rc_t, rc); EFSYS_UNLOCK(enp->en_eslp, state); return (rc); } static __checkReturn efx_rc_t falconsiena_filter_add( __in efx_nic_t *enp, __inout efx_filter_spec_t *spec, __in boolean_t may_replace) { efx_rc_t rc; falconsiena_filter_spec_t fs_spec; falconsiena_filter_t *fsfp = enp->en_filter.ef_falconsiena_filter; falconsiena_filter_tbl_id_t tbl_id; falconsiena_filter_tbl_t *fsftp; falconsiena_filter_spec_t *saved_fs_spec; efx_oword_t filter; int filter_idx; unsigned int depth; int state; uint32_t key; EFSYS_ASSERT3P(spec, !=, NULL); if ((rc = falconsiena_filter_spec_from_gen_spec(&fs_spec, spec)) != 0) goto fail1; tbl_id = falconsiena_filter_tbl_id(fs_spec.fsfs_type); fsftp = &fsfp->fsf_tbl[tbl_id]; if (fsftp->fsft_size == 0) { rc = EINVAL; goto fail2; } key = falconsiena_filter_build(&filter, &fs_spec); EFSYS_LOCK(enp->en_eslp, state); rc = falconsiena_filter_search(fsftp, &fs_spec, key, B_TRUE, &filter_idx, &depth); if (rc != 0) goto fail3; EFSYS_ASSERT3U(filter_idx, <, fsftp->fsft_size); saved_fs_spec = &fsftp->fsft_spec[filter_idx]; if (falconsiena_filter_test_used(fsftp, filter_idx)) { if (may_replace == B_FALSE) { rc = EEXIST; goto fail4; } } falconsiena_filter_set_used(fsftp, filter_idx); *saved_fs_spec = fs_spec; if (fsfp->fsf_depth[fs_spec.fsfs_type] < depth) { fsfp->fsf_depth[fs_spec.fsfs_type] = depth; if (tbl_id == EFX_FS_FILTER_TBL_TX_IP || tbl_id == EFX_FS_FILTER_TBL_TX_MAC) falconsiena_filter_push_tx_limits(enp); else falconsiena_filter_push_rx_limits(enp); } falconsiena_filter_push_entry(enp, fs_spec.fsfs_type, filter_idx, &filter); EFSYS_UNLOCK(enp->en_eslp, state); return (0); fail4: EFSYS_PROBE(fail4); fail3: EFSYS_UNLOCK(enp->en_eslp, state); EFSYS_PROBE(fail3); fail2: EFSYS_PROBE(fail2); fail1: EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } static __checkReturn efx_rc_t falconsiena_filter_delete( __in efx_nic_t *enp, __inout efx_filter_spec_t *spec) { efx_rc_t rc; falconsiena_filter_spec_t fs_spec; falconsiena_filter_t *fsfp = enp->en_filter.ef_falconsiena_filter; falconsiena_filter_tbl_id_t tbl_id; falconsiena_filter_tbl_t *fsftp; efx_oword_t filter; int filter_idx; unsigned int depth; int state; uint32_t key; EFSYS_ASSERT3P(spec, !=, NULL); if ((rc = falconsiena_filter_spec_from_gen_spec(&fs_spec, spec)) != 0) goto fail1; tbl_id = falconsiena_filter_tbl_id(fs_spec.fsfs_type); fsftp = &fsfp->fsf_tbl[tbl_id]; key = falconsiena_filter_build(&filter, &fs_spec); EFSYS_LOCK(enp->en_eslp, state); rc = falconsiena_filter_search(fsftp, &fs_spec, key, B_FALSE, &filter_idx, &depth); if (rc != 0) goto fail2; falconsiena_filter_clear_entry(enp, fsftp, filter_idx); if (fsftp->fsft_used == 0) falconsiena_filter_reset_search_depth(fsfp, tbl_id); EFSYS_UNLOCK(enp->en_eslp, state); return (0); fail2: EFSYS_UNLOCK(enp->en_eslp, state); EFSYS_PROBE(fail2); fail1: EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } #define MAX_SUPPORTED 4 static __checkReturn efx_rc_t falconsiena_filter_supported_filters( __in efx_nic_t *enp, __out uint32_t *list, __out size_t *length) { int index = 0; uint32_t rx_matches[MAX_SUPPORTED]; efx_rc_t rc; if (list == NULL) { rc = EINVAL; goto fail1; } rx_matches[index++] = EFX_FILTER_MATCH_ETHER_TYPE | EFX_FILTER_MATCH_IP_PROTO | EFX_FILTER_MATCH_LOC_HOST | EFX_FILTER_MATCH_LOC_PORT | EFX_FILTER_MATCH_REM_HOST | EFX_FILTER_MATCH_REM_PORT; rx_matches[index++] = EFX_FILTER_MATCH_ETHER_TYPE | EFX_FILTER_MATCH_IP_PROTO | EFX_FILTER_MATCH_LOC_HOST | EFX_FILTER_MATCH_LOC_PORT; if (enp->en_features & EFX_FEATURE_MAC_HEADER_FILTERS) { rx_matches[index++] = EFX_FILTER_MATCH_OUTER_VID | EFX_FILTER_MATCH_LOC_MAC; rx_matches[index++] = EFX_FILTER_MATCH_LOC_MAC; } EFSYS_ASSERT3U(index, <=, MAX_SUPPORTED); *length = index; memcpy(list, rx_matches, *length); return (0); fail1: return (rc); } #undef MAX_SUPPORTED #endif /* EFSYS_OPT_FALCON || EFSYS_OPT_SIENA */ #endif /* EFSYS_OPT_FILTER */ Index: user/ngie/more-tests2/sys/dev/sfxge/common/efx_impl.h =================================================================== --- user/ngie/more-tests2/sys/dev/sfxge/common/efx_impl.h (revision 293822) +++ user/ngie/more-tests2/sys/dev/sfxge/common/efx_impl.h (revision 293823) @@ -1,1182 +1,1182 @@ /*- * Copyright (c) 2007-2015 Solarflare Communications 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 THE COPYRIGHT HOLDERS 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 COPYRIGHT OWNER 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. * * The views and conclusions contained in the software and documentation are * those of the authors and should not be interpreted as representing official * policies, either expressed or implied, of the FreeBSD Project. * * $FreeBSD$ */ #ifndef _SYS_EFX_IMPL_H #define _SYS_EFX_IMPL_H #include "efsys.h" #include "efx.h" #include "efx_regs.h" #include "efx_regs_ef10.h" /* FIXME: Add definition for driver generated software events */ #ifndef ESE_DZ_EV_CODE_DRV_GEN_EV #define ESE_DZ_EV_CODE_DRV_GEN_EV FSE_AZ_EV_CODE_DRV_GEN_EV #endif #include "efx_check.h" #if EFSYS_OPT_FALCON #include "falcon_impl.h" #endif /* EFSYS_OPT_FALCON */ #if EFSYS_OPT_SIENA #include "siena_impl.h" #endif /* EFSYS_OPT_SIENA */ #if EFSYS_OPT_HUNTINGTON #include "hunt_impl.h" #endif /* EFSYS_OPT_HUNTINGTON */ #if EFSYS_OPT_MEDFORD #include "medford_impl.h" #endif /* EFSYS_OPT_MEDFORD */ #if (EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD) #include "ef10_impl.h" #endif /* (EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD) */ #ifdef __cplusplus extern "C" { #endif #define EFX_MOD_MCDI 0x00000001 #define EFX_MOD_PROBE 0x00000002 #define EFX_MOD_NVRAM 0x00000004 #define EFX_MOD_VPD 0x00000008 #define EFX_MOD_NIC 0x00000010 #define EFX_MOD_INTR 0x00000020 #define EFX_MOD_EV 0x00000040 #define EFX_MOD_RX 0x00000080 #define EFX_MOD_TX 0x00000100 #define EFX_MOD_PORT 0x00000200 #define EFX_MOD_MON 0x00000400 #define EFX_MOD_WOL 0x00000800 #define EFX_MOD_FILTER 0x00001000 #define EFX_MOD_PKTFILTER 0x00002000 #define EFX_RESET_MAC 0x00000001 #define EFX_RESET_PHY 0x00000002 #define EFX_RESET_RXQ_ERR 0x00000004 #define EFX_RESET_TXQ_ERR 0x00000008 typedef enum efx_mac_type_e { EFX_MAC_INVALID = 0, EFX_MAC_FALCON_GMAC, EFX_MAC_FALCON_XMAC, EFX_MAC_SIENA, EFX_MAC_HUNTINGTON, EFX_MAC_NTYPES } efx_mac_type_t; typedef struct efx_ev_ops_s { efx_rc_t (*eevo_init)(efx_nic_t *); void (*eevo_fini)(efx_nic_t *); efx_rc_t (*eevo_qcreate)(efx_nic_t *, unsigned int, efsys_mem_t *, size_t, uint32_t, efx_evq_t *); void (*eevo_qdestroy)(efx_evq_t *); efx_rc_t (*eevo_qprime)(efx_evq_t *, unsigned int); void (*eevo_qpost)(efx_evq_t *, uint16_t); efx_rc_t (*eevo_qmoderate)(efx_evq_t *, unsigned int); #if EFSYS_OPT_QSTATS void (*eevo_qstats_update)(efx_evq_t *, efsys_stat_t *); #endif } efx_ev_ops_t; typedef struct efx_tx_ops_s { efx_rc_t (*etxo_init)(efx_nic_t *); void (*etxo_fini)(efx_nic_t *); efx_rc_t (*etxo_qcreate)(efx_nic_t *, unsigned int, unsigned int, efsys_mem_t *, size_t, uint32_t, uint16_t, efx_evq_t *, efx_txq_t *, unsigned int *); void (*etxo_qdestroy)(efx_txq_t *); efx_rc_t (*etxo_qpost)(efx_txq_t *, efx_buffer_t *, unsigned int, unsigned int, unsigned int *); void (*etxo_qpush)(efx_txq_t *, unsigned int, unsigned int); efx_rc_t (*etxo_qpace)(efx_txq_t *, unsigned int); efx_rc_t (*etxo_qflush)(efx_txq_t *); void (*etxo_qenable)(efx_txq_t *); efx_rc_t (*etxo_qpio_enable)(efx_txq_t *); void (*etxo_qpio_disable)(efx_txq_t *); efx_rc_t (*etxo_qpio_write)(efx_txq_t *,uint8_t *, size_t, size_t); efx_rc_t (*etxo_qpio_post)(efx_txq_t *, size_t, unsigned int, unsigned int *); efx_rc_t (*etxo_qdesc_post)(efx_txq_t *, efx_desc_t *, unsigned int, unsigned int, unsigned int *); void (*etxo_qdesc_dma_create)(efx_txq_t *, efsys_dma_addr_t, size_t, boolean_t, efx_desc_t *); void (*etxo_qdesc_tso_create)(efx_txq_t *, uint16_t, uint32_t, uint8_t, efx_desc_t *); void (*etxo_qdesc_vlantci_create)(efx_txq_t *, uint16_t, efx_desc_t *); #if EFSYS_OPT_QSTATS void (*etxo_qstats_update)(efx_txq_t *, efsys_stat_t *); #endif } efx_tx_ops_t; typedef struct efx_rx_ops_s { efx_rc_t (*erxo_init)(efx_nic_t *); void (*erxo_fini)(efx_nic_t *); #if EFSYS_OPT_RX_SCATTER efx_rc_t (*erxo_scatter_enable)(efx_nic_t *, unsigned int); #endif #if EFSYS_OPT_RX_SCALE efx_rc_t (*erxo_scale_mode_set)(efx_nic_t *, efx_rx_hash_alg_t, efx_rx_hash_type_t, boolean_t); efx_rc_t (*erxo_scale_key_set)(efx_nic_t *, uint8_t *, size_t); efx_rc_t (*erxo_scale_tbl_set)(efx_nic_t *, unsigned int *, size_t); uint32_t (*erxo_prefix_hash)(efx_nic_t *, efx_rx_hash_alg_t, uint8_t *); #endif /* EFSYS_OPT_RX_SCALE */ efx_rc_t (*erxo_prefix_pktlen)(efx_nic_t *, uint8_t *, uint16_t *); void (*erxo_qpost)(efx_rxq_t *, efsys_dma_addr_t *, size_t, unsigned int, unsigned int, unsigned int); void (*erxo_qpush)(efx_rxq_t *, unsigned int, unsigned int *); efx_rc_t (*erxo_qflush)(efx_rxq_t *); void (*erxo_qenable)(efx_rxq_t *); efx_rc_t (*erxo_qcreate)(efx_nic_t *enp, unsigned int, unsigned int, efx_rxq_type_t, efsys_mem_t *, size_t, uint32_t, efx_evq_t *, efx_rxq_t *); void (*erxo_qdestroy)(efx_rxq_t *); } efx_rx_ops_t; typedef struct efx_mac_ops_s { efx_rc_t (*emo_reset)(efx_nic_t *); /* optional */ efx_rc_t (*emo_poll)(efx_nic_t *, efx_link_mode_t *); efx_rc_t (*emo_up)(efx_nic_t *, boolean_t *); efx_rc_t (*emo_addr_set)(efx_nic_t *); efx_rc_t (*emo_reconfigure)(efx_nic_t *); efx_rc_t (*emo_multicast_list_set)(efx_nic_t *); efx_rc_t (*emo_filter_default_rxq_set)(efx_nic_t *, efx_rxq_t *, boolean_t); void (*emo_filter_default_rxq_clear)(efx_nic_t *); #if EFSYS_OPT_LOOPBACK efx_rc_t (*emo_loopback_set)(efx_nic_t *, efx_link_mode_t, efx_loopback_type_t); #endif /* EFSYS_OPT_LOOPBACK */ #if EFSYS_OPT_MAC_STATS efx_rc_t (*emo_stats_upload)(efx_nic_t *, efsys_mem_t *); efx_rc_t (*emo_stats_periodic)(efx_nic_t *, efsys_mem_t *, uint16_t, boolean_t); efx_rc_t (*emo_stats_update)(efx_nic_t *, efsys_mem_t *, efsys_stat_t *, uint32_t *); #endif /* EFSYS_OPT_MAC_STATS */ } efx_mac_ops_t; typedef struct efx_phy_ops_s { efx_rc_t (*epo_power)(efx_nic_t *, boolean_t); /* optional */ efx_rc_t (*epo_reset)(efx_nic_t *); efx_rc_t (*epo_reconfigure)(efx_nic_t *); efx_rc_t (*epo_verify)(efx_nic_t *); efx_rc_t (*epo_uplink_check)(efx_nic_t *, boolean_t *); /* optional */ efx_rc_t (*epo_downlink_check)(efx_nic_t *, efx_link_mode_t *, unsigned int *, uint32_t *); efx_rc_t (*epo_oui_get)(efx_nic_t *, uint32_t *); #if EFSYS_OPT_PHY_STATS efx_rc_t (*epo_stats_update)(efx_nic_t *, efsys_mem_t *, uint32_t *); #endif /* EFSYS_OPT_PHY_STATS */ #if EFSYS_OPT_PHY_PROPS #if EFSYS_OPT_NAMES const char *(*epo_prop_name)(efx_nic_t *, unsigned int); #endif /* EFSYS_OPT_PHY_PROPS */ efx_rc_t (*epo_prop_get)(efx_nic_t *, unsigned int, uint32_t, uint32_t *); efx_rc_t (*epo_prop_set)(efx_nic_t *, unsigned int, uint32_t); #endif /* EFSYS_OPT_PHY_PROPS */ #if EFSYS_OPT_BIST efx_rc_t (*epo_bist_enable_offline)(efx_nic_t *); efx_rc_t (*epo_bist_start)(efx_nic_t *, efx_bist_type_t); efx_rc_t (*epo_bist_poll)(efx_nic_t *, efx_bist_type_t, efx_bist_result_t *, uint32_t *, unsigned long *, size_t); void (*epo_bist_stop)(efx_nic_t *, efx_bist_type_t); #endif /* EFSYS_OPT_BIST */ } efx_phy_ops_t; #if EFSYS_OPT_FILTER typedef struct efx_filter_ops_s { efx_rc_t (*efo_init)(efx_nic_t *); void (*efo_fini)(efx_nic_t *); efx_rc_t (*efo_restore)(efx_nic_t *); efx_rc_t (*efo_add)(efx_nic_t *, efx_filter_spec_t *, boolean_t may_replace); efx_rc_t (*efo_delete)(efx_nic_t *, efx_filter_spec_t *); efx_rc_t (*efo_supported_filters)(efx_nic_t *, uint32_t *, size_t *); efx_rc_t (*efo_reconfigure)(efx_nic_t *, uint8_t const *, boolean_t, boolean_t, boolean_t, boolean_t, uint8_t const *, int); } efx_filter_ops_t; extern __checkReturn efx_rc_t efx_filter_reconfigure( __in efx_nic_t *enp, __in_ecount(6) uint8_t const *mac_addr, __in boolean_t all_unicst, __in boolean_t mulcst, __in boolean_t all_mulcst, __in boolean_t brdcst, __in_ecount(6*count) uint8_t const *addrs, __in int count); #endif /* EFSYS_OPT_FILTER */ typedef struct efx_port_s { efx_mac_type_t ep_mac_type; uint32_t ep_phy_type; uint8_t ep_port; uint32_t ep_mac_pdu; uint8_t ep_mac_addr[6]; efx_link_mode_t ep_link_mode; boolean_t ep_all_unicst; boolean_t ep_mulcst; boolean_t ep_all_mulcst; boolean_t ep_brdcst; unsigned int ep_fcntl; boolean_t ep_fcntl_autoneg; efx_oword_t ep_multicst_hash[2]; uint8_t ep_mulcst_addr_list[EFX_MAC_ADDR_LEN * EFX_MAC_MULTICAST_LIST_MAX]; uint32_t ep_mulcst_addr_count; #if EFSYS_OPT_LOOPBACK efx_loopback_type_t ep_loopback_type; efx_link_mode_t ep_loopback_link_mode; #endif /* EFSYS_OPT_LOOPBACK */ #if EFSYS_OPT_PHY_FLAGS uint32_t ep_phy_flags; #endif /* EFSYS_OPT_PHY_FLAGS */ #if EFSYS_OPT_PHY_LED_CONTROL efx_phy_led_mode_t ep_phy_led_mode; #endif /* EFSYS_OPT_PHY_LED_CONTROL */ efx_phy_media_type_t ep_fixed_port_type; efx_phy_media_type_t ep_module_type; uint32_t ep_adv_cap_mask; uint32_t ep_lp_cap_mask; uint32_t ep_default_adv_cap_mask; uint32_t ep_phy_cap_mask; #if EFSYS_OPT_PHY_TXC43128 || EFSYS_OPT_PHY_QT2025C union { struct { unsigned int bug10934_count; } ep_txc43128; struct { unsigned int bug17190_count; } ep_qt2025c; }; #endif boolean_t ep_mac_poll_needed; /* falcon only */ boolean_t ep_mac_up; /* falcon only */ uint32_t ep_fwver; /* falcon only */ boolean_t ep_mac_drain; boolean_t ep_mac_stats_pending; #if EFSYS_OPT_BIST efx_bist_type_t ep_current_bist; #endif efx_mac_ops_t *ep_emop; efx_phy_ops_t *ep_epop; } efx_port_t; typedef struct efx_mon_ops_s { efx_rc_t (*emo_reset)(efx_nic_t *); efx_rc_t (*emo_reconfigure)(efx_nic_t *); #if EFSYS_OPT_MON_STATS efx_rc_t (*emo_stats_update)(efx_nic_t *, efsys_mem_t *, efx_mon_stat_value_t *); #endif /* EFSYS_OPT_MON_STATS */ } efx_mon_ops_t; typedef struct efx_mon_s { efx_mon_type_t em_type; efx_mon_ops_t *em_emop; } efx_mon_t; typedef struct efx_intr_ops_s { efx_rc_t (*eio_init)(efx_nic_t *, efx_intr_type_t, efsys_mem_t *); void (*eio_enable)(efx_nic_t *); void (*eio_disable)(efx_nic_t *); void (*eio_disable_unlocked)(efx_nic_t *); efx_rc_t (*eio_trigger)(efx_nic_t *, unsigned int); void (*eio_status_line)(efx_nic_t *, boolean_t *, uint32_t *); void (*eio_status_message)(efx_nic_t *, unsigned int, boolean_t *); void (*eio_fatal)(efx_nic_t *); void (*eio_fini)(efx_nic_t *); } efx_intr_ops_t; typedef struct efx_intr_s { efx_intr_ops_t *ei_eiop; efsys_mem_t *ei_esmp; efx_intr_type_t ei_type; unsigned int ei_level; } efx_intr_t; typedef struct efx_nic_ops_s { efx_rc_t (*eno_probe)(efx_nic_t *); efx_rc_t (*eno_set_drv_limits)(efx_nic_t *, efx_drv_limits_t*); efx_rc_t (*eno_reset)(efx_nic_t *); efx_rc_t (*eno_init)(efx_nic_t *); efx_rc_t (*eno_get_vi_pool)(efx_nic_t *, uint32_t *); efx_rc_t (*eno_get_bar_region)(efx_nic_t *, efx_nic_region_t, uint32_t *, size_t *); #if EFSYS_OPT_DIAG efx_rc_t (*eno_sram_test)(efx_nic_t *, efx_sram_pattern_fn_t); efx_rc_t (*eno_register_test)(efx_nic_t *); #endif /* EFSYS_OPT_DIAG */ void (*eno_fini)(efx_nic_t *); void (*eno_unprobe)(efx_nic_t *); } efx_nic_ops_t; #ifndef EFX_TXQ_LIMIT_TARGET #define EFX_TXQ_LIMIT_TARGET 259 #endif #ifndef EFX_RXQ_LIMIT_TARGET #define EFX_RXQ_LIMIT_TARGET 512 #endif #ifndef EFX_TXQ_DC_SIZE #define EFX_TXQ_DC_SIZE 1 /* 16 descriptors */ #endif #ifndef EFX_RXQ_DC_SIZE #define EFX_RXQ_DC_SIZE 3 /* 64 descriptors */ #endif #if EFSYS_OPT_FILTER typedef struct falconsiena_filter_spec_s { uint8_t fsfs_type; uint32_t fsfs_flags; uint32_t fsfs_dmaq_id; uint32_t fsfs_dword[3]; } falconsiena_filter_spec_t; typedef enum falconsiena_filter_type_e { EFX_FS_FILTER_RX_TCP_FULL, /* TCP/IPv4 4-tuple {dIP,dTCP,sIP,sTCP} */ EFX_FS_FILTER_RX_TCP_WILD, /* TCP/IPv4 dest {dIP,dTCP, -, -} */ EFX_FS_FILTER_RX_UDP_FULL, /* UDP/IPv4 4-tuple {dIP,dUDP,sIP,sUDP} */ EFX_FS_FILTER_RX_UDP_WILD, /* UDP/IPv4 dest {dIP,dUDP, -, -} */ #if EFSYS_OPT_SIENA EFX_FS_FILTER_RX_MAC_FULL, /* Ethernet {dMAC,VLAN} */ EFX_FS_FILTER_RX_MAC_WILD, /* Ethernet {dMAC, -} */ EFX_FS_FILTER_TX_TCP_FULL, /* TCP/IPv4 {dIP,dTCP,sIP,sTCP} */ EFX_FS_FILTER_TX_TCP_WILD, /* TCP/IPv4 { -, -,sIP,sTCP} */ EFX_FS_FILTER_TX_UDP_FULL, /* UDP/IPv4 {dIP,dTCP,sIP,sTCP} */ EFX_FS_FILTER_TX_UDP_WILD, /* UDP/IPv4 source (host, port) */ EFX_FS_FILTER_TX_MAC_FULL, /* Ethernet source (MAC address, VLAN ID) */ EFX_FS_FILTER_TX_MAC_WILD, /* Ethernet source (MAC address) */ #endif /* EFSYS_OPT_SIENA */ EFX_FS_FILTER_NTYPES } falconsiena_filter_type_t; typedef enum falconsiena_filter_tbl_id_e { EFX_FS_FILTER_TBL_RX_IP = 0, EFX_FS_FILTER_TBL_RX_MAC, EFX_FS_FILTER_TBL_TX_IP, EFX_FS_FILTER_TBL_TX_MAC, EFX_FS_FILTER_NTBLS } falconsiena_filter_tbl_id_t; typedef struct falconsiena_filter_tbl_s { int fsft_size; /* number of entries */ int fsft_used; /* active count */ uint32_t *fsft_bitmap; /* active bitmap */ falconsiena_filter_spec_t *fsft_spec; /* array of saved specs */ } falconsiena_filter_tbl_t; typedef struct falconsiena_filter_s { falconsiena_filter_tbl_t fsf_tbl[EFX_FS_FILTER_NTBLS]; unsigned int fsf_depth[EFX_FS_FILTER_NTYPES]; } falconsiena_filter_t; typedef struct efx_filter_s { #if EFSYS_OPT_FALCON || EFSYS_OPT_SIENA falconsiena_filter_t *ef_falconsiena_filter; #endif /* EFSYS_OPT_FALCON || EFSYS_OPT_SIENA */ #if EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD ef10_filter_table_t *ef_ef10_filter_table; #endif /* EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD */ } efx_filter_t; extern void falconsiena_filter_tbl_clear( __in efx_nic_t *enp, __in falconsiena_filter_tbl_id_t tbl); #endif /* EFSYS_OPT_FILTER */ #if EFSYS_OPT_MCDI typedef struct efx_mcdi_ops_s { efx_rc_t (*emco_init)(efx_nic_t *, const efx_mcdi_transport_t *); void (*emco_request_copyin)(efx_nic_t *, efx_mcdi_req_t *, unsigned int, boolean_t, boolean_t); void (*emco_request_copyout)(efx_nic_t *, efx_mcdi_req_t *); efx_rc_t (*emco_poll_reboot)(efx_nic_t *); boolean_t (*emco_poll_response)(efx_nic_t *); void (*emco_read_response)(efx_nic_t *, void *, size_t, size_t); void (*emco_fini)(efx_nic_t *); efx_rc_t (*emco_feature_supported)(efx_nic_t *, efx_mcdi_feature_id_t, boolean_t *); } efx_mcdi_ops_t; typedef struct efx_mcdi_s { efx_mcdi_ops_t *em_emcop; const efx_mcdi_transport_t *em_emtp; efx_mcdi_iface_t em_emip; } efx_mcdi_t; #endif /* EFSYS_OPT_MCDI */ #if EFSYS_OPT_NVRAM typedef struct efx_nvram_ops_s { #if EFSYS_OPT_DIAG efx_rc_t (*envo_test)(efx_nic_t *); #endif /* EFSYS_OPT_DIAG */ efx_rc_t (*envo_size)(efx_nic_t *, efx_nvram_type_t, size_t *); efx_rc_t (*envo_get_version)(efx_nic_t *, efx_nvram_type_t, uint32_t *, uint16_t *); efx_rc_t (*envo_rw_start)(efx_nic_t *, efx_nvram_type_t, size_t *); efx_rc_t (*envo_read_chunk)(efx_nic_t *, efx_nvram_type_t, unsigned int, caddr_t, size_t); efx_rc_t (*envo_erase)(efx_nic_t *, efx_nvram_type_t); efx_rc_t (*envo_write_chunk)(efx_nic_t *, efx_nvram_type_t, unsigned int, caddr_t, size_t); void (*envo_rw_finish)(efx_nic_t *, efx_nvram_type_t); efx_rc_t (*envo_set_version)(efx_nic_t *, efx_nvram_type_t, uint16_t *); efx_rc_t (*envo_type_to_partn)(efx_nic_t *, efx_nvram_type_t, uint32_t *); } efx_nvram_ops_t; #endif /* EFSYS_OPT_NVRAM */ #if EFSYS_OPT_VPD typedef struct efx_vpd_ops_s { efx_rc_t (*evpdo_init)(efx_nic_t *); efx_rc_t (*evpdo_size)(efx_nic_t *, size_t *); efx_rc_t (*evpdo_read)(efx_nic_t *, caddr_t, size_t); efx_rc_t (*evpdo_verify)(efx_nic_t *, caddr_t, size_t); efx_rc_t (*evpdo_reinit)(efx_nic_t *, caddr_t, size_t); efx_rc_t (*evpdo_get)(efx_nic_t *, caddr_t, size_t, efx_vpd_value_t *); efx_rc_t (*evpdo_set)(efx_nic_t *, caddr_t, size_t, efx_vpd_value_t *); efx_rc_t (*evpdo_next)(efx_nic_t *, caddr_t, size_t, efx_vpd_value_t *, unsigned int *); efx_rc_t (*evpdo_write)(efx_nic_t *, caddr_t, size_t); void (*evpdo_fini)(efx_nic_t *); } efx_vpd_ops_t; #endif /* EFSYS_OPT_VPD */ #if EFSYS_OPT_VPD || EFSYS_OPT_NVRAM __checkReturn efx_rc_t efx_mcdi_nvram_partitions( __in efx_nic_t *enp, __out_bcount(size) caddr_t data, __in size_t size, __out unsigned int *npartnp); __checkReturn efx_rc_t efx_mcdi_nvram_metadata( __in efx_nic_t *enp, __in uint32_t partn, __out uint32_t *subtypep, __out_ecount(4) uint16_t version[4], __out_bcount_opt(size) char *descp, __in size_t size); __checkReturn efx_rc_t efx_mcdi_nvram_info( __in efx_nic_t *enp, __in uint32_t partn, __out_opt size_t *sizep, __out_opt uint32_t *addressp, __out_opt uint32_t *erase_sizep, __out_opt uint32_t *write_sizep); __checkReturn efx_rc_t efx_mcdi_nvram_update_start( __in efx_nic_t *enp, __in uint32_t partn); __checkReturn efx_rc_t efx_mcdi_nvram_read( __in efx_nic_t *enp, __in uint32_t partn, __in uint32_t offset, __out_bcount(size) caddr_t data, __in size_t size); __checkReturn efx_rc_t efx_mcdi_nvram_erase( __in efx_nic_t *enp, __in uint32_t partn, __in uint32_t offset, __in size_t size); __checkReturn efx_rc_t efx_mcdi_nvram_write( __in efx_nic_t *enp, __in uint32_t partn, __in uint32_t offset, __out_bcount(size) caddr_t data, __in size_t size); __checkReturn efx_rc_t efx_mcdi_nvram_update_finish( __in efx_nic_t *enp, __in uint32_t partn, __in boolean_t reboot); #if EFSYS_OPT_DIAG __checkReturn efx_rc_t efx_mcdi_nvram_test( __in efx_nic_t *enp, __in uint32_t partn); #endif /* EFSYS_OPT_DIAG */ #endif /* EFSYS_OPT_VPD || EFSYS_OPT_NVRAM */ typedef struct efx_drv_cfg_s { uint32_t edc_min_vi_count; uint32_t edc_max_vi_count; uint32_t edc_max_piobuf_count; uint32_t edc_pio_alloc_size; } efx_drv_cfg_t; struct efx_nic_s { uint32_t en_magic; efx_family_t en_family; uint32_t en_features; efsys_identifier_t *en_esip; efsys_lock_t *en_eslp; efsys_bar_t *en_esbp; unsigned int en_mod_flags; unsigned int en_reset_flags; efx_nic_cfg_t en_nic_cfg; efx_drv_cfg_t en_drv_cfg; efx_port_t en_port; efx_mon_t en_mon; efx_intr_t en_intr; uint32_t en_ev_qcount; uint32_t en_rx_qcount; uint32_t en_tx_qcount; efx_nic_ops_t *en_enop; efx_ev_ops_t *en_eevop; efx_tx_ops_t *en_etxop; efx_rx_ops_t *en_erxop; #if EFSYS_OPT_FILTER efx_filter_t en_filter; efx_filter_ops_t *en_efop; #endif /* EFSYS_OPT_FILTER */ #if EFSYS_OPT_MCDI efx_mcdi_t en_mcdi; #endif /* EFSYS_OPT_MCDI */ #if EFSYS_OPT_NVRAM efx_nvram_type_t en_nvram_locked; efx_nvram_ops_t *en_envop; #endif /* EFSYS_OPT_NVRAM */ #if EFSYS_OPT_VPD efx_vpd_ops_t *en_evpdop; #endif /* EFSYS_OPT_VPD */ #if EFSYS_OPT_RX_SCALE efx_rx_hash_support_t en_hash_support; efx_rx_scale_support_t en_rss_support; uint32_t en_rss_context; #endif /* EFSYS_OPT_RX_SCALE */ uint32_t en_vport_id; union { #if EFSYS_OPT_FALCON struct { falcon_spi_dev_t enu_fsd[FALCON_SPI_NTYPES]; falcon_i2c_t enu_fip; boolean_t enu_i2c_locked; #if EFSYS_OPT_FALCON_NIC_CFG_OVERRIDE const uint8_t *enu_forced_cfg; #endif /* EFSYS_OPT_FALCON_NIC_CFG_OVERRIDE */ uint8_t enu_mon_devid; #if EFSYS_OPT_PCIE_TUNE unsigned int enu_nlanes; #endif /* EFSYS_OPT_PCIE_TUNE */ uint16_t enu_board_rev; boolean_t enu_internal_sram; uint8_t enu_sram_num_bank; uint8_t enu_sram_bank_size; } falcon; #endif /* EFSYS_OPT_FALCON */ #if EFSYS_OPT_SIENA struct { #if EFSYS_OPT_NVRAM || EFSYS_OPT_VPD unsigned int enu_partn_mask; #endif /* EFSYS_OPT_NVRAM || EFSYS_OPT_VPD */ #if EFSYS_OPT_VPD caddr_t enu_svpd; size_t enu_svpd_length; #endif /* EFSYS_OPT_VPD */ int enu_unused; } siena; #endif /* EFSYS_OPT_SIENA */ int enu_unused; } en_u; #if (EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD) union en_arch { struct { int ena_vi_base; int ena_vi_count; int ena_vi_shift; #if EFSYS_OPT_VPD caddr_t ena_svpd; size_t ena_svpd_length; #endif /* EFSYS_OPT_VPD */ efx_piobuf_handle_t ena_piobuf_handle[EF10_MAX_PIOBUF_NBUFS]; uint32_t ena_piobuf_count; uint32_t ena_pio_alloc_map[EF10_MAX_PIOBUF_NBUFS]; uint32_t ena_pio_write_vi_base; /* Memory BAR mapping regions */ uint32_t ena_uc_mem_map_offset; size_t ena_uc_mem_map_size; uint32_t ena_wc_mem_map_offset; size_t ena_wc_mem_map_size; } ef10; } en_arch; #endif /* (EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD) */ }; #define EFX_NIC_MAGIC 0x02121996 typedef boolean_t (*efx_ev_handler_t)(efx_evq_t *, efx_qword_t *, const efx_ev_callbacks_t *, void *); typedef struct efx_evq_rxq_state_s { unsigned int eers_rx_read_ptr; unsigned int eers_rx_mask; } efx_evq_rxq_state_t; struct efx_evq_s { uint32_t ee_magic; efx_nic_t *ee_enp; unsigned int ee_index; unsigned int ee_mask; efsys_mem_t *ee_esmp; #if EFSYS_OPT_QSTATS uint32_t ee_stat[EV_NQSTATS]; #endif /* EFSYS_OPT_QSTATS */ efx_ev_handler_t ee_rx; efx_ev_handler_t ee_tx; efx_ev_handler_t ee_driver; efx_ev_handler_t ee_global; efx_ev_handler_t ee_drv_gen; #if EFSYS_OPT_MCDI efx_ev_handler_t ee_mcdi; #endif /* EFSYS_OPT_MCDI */ efx_evq_rxq_state_t ee_rxq_state[EFX_EV_RX_NLABELS]; }; #define EFX_EVQ_MAGIC 0x08081997 #define EFX_EVQ_FALCON_TIMER_QUANTUM_NS 4968 /* 621 cycles */ #define EFX_EVQ_SIENA_TIMER_QUANTUM_NS 6144 /* 768 cycles */ struct efx_rxq_s { uint32_t er_magic; efx_nic_t *er_enp; efx_evq_t *er_eep; unsigned int er_index; unsigned int er_label; unsigned int er_mask; efsys_mem_t *er_esmp; }; #define EFX_RXQ_MAGIC 0x15022005 struct efx_txq_s { uint32_t et_magic; efx_nic_t *et_enp; unsigned int et_index; unsigned int et_mask; efsys_mem_t *et_esmp; #if EFSYS_OPT_HUNTINGTON uint32_t et_pio_bufnum; uint32_t et_pio_blknum; uint32_t et_pio_write_offset; uint32_t et_pio_offset; size_t et_pio_size; #endif #if EFSYS_OPT_QSTATS uint32_t et_stat[TX_NQSTATS]; #endif /* EFSYS_OPT_QSTATS */ }; #define EFX_TXQ_MAGIC 0x05092005 #define EFX_MAC_ADDR_COPY(_dst, _src) \ do { \ (_dst)[0] = (_src)[0]; \ (_dst)[1] = (_src)[1]; \ (_dst)[2] = (_src)[2]; \ (_dst)[3] = (_src)[3]; \ (_dst)[4] = (_src)[4]; \ (_dst)[5] = (_src)[5]; \ _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) #define EFX_MAC_BROADCAST_ADDR_SET(_dst) \ do { \ uint16_t *_d = (uint16_t *)(_dst); \ _d[0] = 0xffff; \ _d[1] = 0xffff; \ _d[2] = 0xffff; \ _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) #if EFSYS_OPT_CHECK_REG #define EFX_CHECK_REG(_enp, _reg) \ do { \ const char *name = #_reg; \ char min = name[4]; \ char max = name[5]; \ char rev; \ \ switch ((_enp)->en_family) { \ case EFX_FAMILY_FALCON: \ rev = 'B'; \ break; \ \ case EFX_FAMILY_SIENA: \ rev = 'C'; \ break; \ \ case EFX_FAMILY_HUNTINGTON: \ rev = 'D'; \ break; \ \ case EFX_FAMILY_MEDFORD: \ rev = 'E'; \ break; \ \ default: \ rev = '?'; \ break; \ } \ \ EFSYS_ASSERT3S(rev, >=, min); \ EFSYS_ASSERT3S(rev, <=, max); \ \ _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) #else #define EFX_CHECK_REG(_enp, _reg) do { \ _NOTE(CONSTANTCONDITION) \ } while(B_FALSE) #endif #define EFX_BAR_READD(_enp, _reg, _edp, _lock) \ do { \ EFX_CHECK_REG((_enp), (_reg)); \ EFSYS_BAR_READD((_enp)->en_esbp, _reg ## _OFST, \ (_edp), (_lock)); \ EFSYS_PROBE3(efx_bar_readd, const char *, #_reg, \ uint32_t, _reg ## _OFST, \ uint32_t, (_edp)->ed_u32[0]); \ _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) #define EFX_BAR_WRITED(_enp, _reg, _edp, _lock) \ do { \ EFX_CHECK_REG((_enp), (_reg)); \ EFSYS_PROBE3(efx_bar_writed, const char *, #_reg, \ uint32_t, _reg ## _OFST, \ uint32_t, (_edp)->ed_u32[0]); \ EFSYS_BAR_WRITED((_enp)->en_esbp, _reg ## _OFST, \ (_edp), (_lock)); \ _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) #define EFX_BAR_READQ(_enp, _reg, _eqp) \ do { \ EFX_CHECK_REG((_enp), (_reg)); \ EFSYS_BAR_READQ((_enp)->en_esbp, _reg ## _OFST, \ (_eqp)); \ EFSYS_PROBE4(efx_bar_readq, const char *, #_reg, \ uint32_t, _reg ## _OFST, \ uint32_t, (_eqp)->eq_u32[1], \ uint32_t, (_eqp)->eq_u32[0]); \ _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) #define EFX_BAR_WRITEQ(_enp, _reg, _eqp) \ do { \ EFX_CHECK_REG((_enp), (_reg)); \ EFSYS_PROBE4(efx_bar_writeq, const char *, #_reg, \ uint32_t, _reg ## _OFST, \ uint32_t, (_eqp)->eq_u32[1], \ uint32_t, (_eqp)->eq_u32[0]); \ EFSYS_BAR_WRITEQ((_enp)->en_esbp, _reg ## _OFST, \ (_eqp)); \ _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) #define EFX_BAR_READO(_enp, _reg, _eop) \ do { \ EFX_CHECK_REG((_enp), (_reg)); \ EFSYS_BAR_READO((_enp)->en_esbp, _reg ## _OFST, \ (_eop), B_TRUE); \ EFSYS_PROBE6(efx_bar_reado, const char *, #_reg, \ uint32_t, _reg ## _OFST, \ uint32_t, (_eop)->eo_u32[3], \ uint32_t, (_eop)->eo_u32[2], \ uint32_t, (_eop)->eo_u32[1], \ uint32_t, (_eop)->eo_u32[0]); \ _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) #define EFX_BAR_WRITEO(_enp, _reg, _eop) \ do { \ EFX_CHECK_REG((_enp), (_reg)); \ EFSYS_PROBE6(efx_bar_writeo, const char *, #_reg, \ uint32_t, _reg ## _OFST, \ uint32_t, (_eop)->eo_u32[3], \ uint32_t, (_eop)->eo_u32[2], \ uint32_t, (_eop)->eo_u32[1], \ uint32_t, (_eop)->eo_u32[0]); \ EFSYS_BAR_WRITEO((_enp)->en_esbp, _reg ## _OFST, \ (_eop), B_TRUE); \ _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) #define EFX_BAR_TBL_READD(_enp, _reg, _index, _edp, _lock) \ do { \ EFX_CHECK_REG((_enp), (_reg)); \ EFSYS_BAR_READD((_enp)->en_esbp, \ (_reg ## _OFST + ((_index) * _reg ## _STEP)), \ (_edp), (_lock)); \ EFSYS_PROBE4(efx_bar_tbl_readd, const char *, #_reg, \ uint32_t, (_index), \ uint32_t, _reg ## _OFST, \ uint32_t, (_edp)->ed_u32[0]); \ _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) #define EFX_BAR_TBL_WRITED(_enp, _reg, _index, _edp, _lock) \ do { \ EFX_CHECK_REG((_enp), (_reg)); \ EFSYS_PROBE4(efx_bar_tbl_writed, const char *, #_reg, \ uint32_t, (_index), \ uint32_t, _reg ## _OFST, \ uint32_t, (_edp)->ed_u32[0]); \ EFSYS_BAR_WRITED((_enp)->en_esbp, \ (_reg ## _OFST + ((_index) * _reg ## _STEP)), \ (_edp), (_lock)); \ _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) #define EFX_BAR_TBL_WRITED2(_enp, _reg, _index, _edp, _lock) \ do { \ EFX_CHECK_REG((_enp), (_reg)); \ EFSYS_PROBE4(efx_bar_tbl_writed, const char *, #_reg, \ uint32_t, (_index), \ uint32_t, _reg ## _OFST, \ uint32_t, (_edp)->ed_u32[0]); \ EFSYS_BAR_WRITED((_enp)->en_esbp, \ (_reg ## _OFST + \ (2 * sizeof (efx_dword_t)) + \ ((_index) * _reg ## _STEP)), \ (_edp), (_lock)); \ _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) #define EFX_BAR_TBL_WRITED3(_enp, _reg, _index, _edp, _lock) \ do { \ EFX_CHECK_REG((_enp), (_reg)); \ EFSYS_PROBE4(efx_bar_tbl_writed, const char *, #_reg, \ uint32_t, (_index), \ uint32_t, _reg ## _OFST, \ uint32_t, (_edp)->ed_u32[0]); \ EFSYS_BAR_WRITED((_enp)->en_esbp, \ (_reg ## _OFST + \ (3 * sizeof (efx_dword_t)) + \ ((_index) * _reg ## _STEP)), \ (_edp), (_lock)); \ _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) #define EFX_BAR_TBL_READQ(_enp, _reg, _index, _eqp) \ do { \ EFX_CHECK_REG((_enp), (_reg)); \ EFSYS_BAR_READQ((_enp)->en_esbp, \ (_reg ## _OFST + ((_index) * _reg ## _STEP)), \ (_eqp)); \ EFSYS_PROBE5(efx_bar_tbl_readq, const char *, #_reg, \ uint32_t, (_index), \ uint32_t, _reg ## _OFST, \ uint32_t, (_eqp)->eq_u32[1], \ uint32_t, (_eqp)->eq_u32[0]); \ _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) #define EFX_BAR_TBL_WRITEQ(_enp, _reg, _index, _eqp) \ do { \ EFX_CHECK_REG((_enp), (_reg)); \ EFSYS_PROBE5(efx_bar_tbl_writeq, const char *, #_reg, \ uint32_t, (_index), \ uint32_t, _reg ## _OFST, \ uint32_t, (_eqp)->eq_u32[1], \ uint32_t, (_eqp)->eq_u32[0]); \ EFSYS_BAR_WRITEQ((_enp)->en_esbp, \ (_reg ## _OFST + ((_index) * _reg ## _STEP)), \ (_eqp)); \ _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) #define EFX_BAR_TBL_READO(_enp, _reg, _index, _eop, _lock) \ do { \ EFX_CHECK_REG((_enp), (_reg)); \ EFSYS_BAR_READO((_enp)->en_esbp, \ (_reg ## _OFST + ((_index) * _reg ## _STEP)), \ (_eop), (_lock)); \ EFSYS_PROBE7(efx_bar_tbl_reado, const char *, #_reg, \ uint32_t, (_index), \ uint32_t, _reg ## _OFST, \ uint32_t, (_eop)->eo_u32[3], \ uint32_t, (_eop)->eo_u32[2], \ uint32_t, (_eop)->eo_u32[1], \ uint32_t, (_eop)->eo_u32[0]); \ _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) #define EFX_BAR_TBL_WRITEO(_enp, _reg, _index, _eop, _lock) \ do { \ EFX_CHECK_REG((_enp), (_reg)); \ EFSYS_PROBE7(efx_bar_tbl_writeo, const char *, #_reg, \ uint32_t, (_index), \ uint32_t, _reg ## _OFST, \ uint32_t, (_eop)->eo_u32[3], \ uint32_t, (_eop)->eo_u32[2], \ uint32_t, (_eop)->eo_u32[1], \ uint32_t, (_eop)->eo_u32[0]); \ EFSYS_BAR_WRITEO((_enp)->en_esbp, \ (_reg ## _OFST + ((_index) * _reg ## _STEP)), \ (_eop), (_lock)); \ _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) /* * Allow drivers to perform optimised 128-bit doorbell writes. * The DMA descriptor pointers (RX_DESC_UPD and TX_DESC_UPD) are * special-cased in the BIU on the Falcon/Siena and EF10 architectures to avoid * the need for locking in the host, and are the only ones known to be safe to * use 128-bites write with. */ #define EFX_BAR_TBL_DOORBELL_WRITEO(_enp, _reg, _index, _eop) \ do { \ EFX_CHECK_REG((_enp), (_reg)); \ EFSYS_PROBE7(efx_bar_tbl_doorbell_writeo, \ const char *, \ #_reg, \ uint32_t, (_index), \ uint32_t, _reg ## _OFST, \ uint32_t, (_eop)->eo_u32[3], \ uint32_t, (_eop)->eo_u32[2], \ uint32_t, (_eop)->eo_u32[1], \ uint32_t, (_eop)->eo_u32[0]); \ EFSYS_BAR_DOORBELL_WRITEO((_enp)->en_esbp, \ (_reg ## _OFST + ((_index) * _reg ## _STEP)), \ (_eop)); \ _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) #define EFX_DMA_SYNC_QUEUE_FOR_DEVICE(_esmp, _entries, _wptr, _owptr) \ do { \ unsigned int _new = (_wptr); \ unsigned int _old = (_owptr); \ \ if ((_new) >= (_old)) \ EFSYS_DMA_SYNC_FOR_DEVICE((_esmp), \ (_old) * sizeof (efx_desc_t), \ ((_new) - (_old)) * sizeof (efx_desc_t)); \ else \ /* \ * It is cheaper to sync entire map than sync \ * two parts especially when offset/size are \ * ignored and entire map is synced in any case.\ */ \ EFSYS_DMA_SYNC_FOR_DEVICE((_esmp), \ 0, \ (_entries) * sizeof (efx_desc_t)); \ _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) extern __checkReturn efx_rc_t efx_nic_biu_test( __in efx_nic_t *enp); extern __checkReturn efx_rc_t efx_mac_select( __in efx_nic_t *enp); extern void efx_mac_multicast_hash_compute( __in_ecount(6*count) uint8_t const *addrs, __in int count, __out efx_oword_t *hash_low, __out efx_oword_t *hash_high); extern __checkReturn efx_rc_t efx_phy_probe( __in efx_nic_t *enp); extern void efx_phy_unprobe( __in efx_nic_t *enp); #if EFSYS_OPT_VPD /* VPD utility functions */ extern __checkReturn efx_rc_t efx_vpd_hunk_length( __in_bcount(size) caddr_t data, __in size_t size, __out size_t *lengthp); extern __checkReturn efx_rc_t efx_vpd_hunk_verify( __in_bcount(size) caddr_t data, __in size_t size, __out_opt boolean_t *cksummedp); extern __checkReturn efx_rc_t efx_vpd_hunk_reinit( __in_bcount(size) caddr_t data, __in size_t size, __in boolean_t wantpid); extern __checkReturn efx_rc_t efx_vpd_hunk_get( __in_bcount(size) caddr_t data, __in size_t size, __in efx_vpd_tag_t tag, __in efx_vpd_keyword_t keyword, __out unsigned int *payloadp, __out uint8_t *paylenp); extern __checkReturn efx_rc_t efx_vpd_hunk_next( __in_bcount(size) caddr_t data, __in size_t size, __out efx_vpd_tag_t *tagp, __out efx_vpd_keyword_t *keyword, - __out_bcount_opt(*paylenp) unsigned int *payloadp, + __out_opt unsigned int *payloadp, __out_opt uint8_t *paylenp, __inout unsigned int *contp); extern __checkReturn efx_rc_t efx_vpd_hunk_set( __in_bcount(size) caddr_t data, __in size_t size, __in efx_vpd_value_t *evvp); #endif /* EFSYS_OPT_VPD */ #if EFSYS_OPT_DIAG extern efx_sram_pattern_fn_t __efx_sram_pattern_fns[]; typedef struct efx_register_set_s { unsigned int address; unsigned int step; unsigned int rows; efx_oword_t mask; } efx_register_set_t; extern __checkReturn efx_rc_t efx_nic_test_registers( __in efx_nic_t *enp, __in efx_register_set_t *rsp, __in size_t count); extern __checkReturn efx_rc_t efx_nic_test_tables( __in efx_nic_t *enp, __in efx_register_set_t *rsp, __in efx_pattern_type_t pattern, __in size_t count); #endif /* EFSYS_OPT_DIAG */ #if EFSYS_OPT_MCDI extern __checkReturn efx_rc_t efx_mcdi_set_workaround( __in efx_nic_t *enp, __in uint32_t type, __in boolean_t enabled, __out_opt uint32_t *flagsp); extern __checkReturn efx_rc_t efx_mcdi_get_workarounds( __in efx_nic_t *enp, __out_opt uint32_t *implementedp, __out_opt uint32_t *enabledp); #endif /* EFSYS_OPT_MCDI */ #ifdef __cplusplus } #endif #endif /* _SYS_EFX_IMPL_H */ Index: user/ngie/more-tests2/sys/dev/sfxge/common/efx_mcdi.h =================================================================== --- user/ngie/more-tests2/sys/dev/sfxge/common/efx_mcdi.h (revision 293822) +++ user/ngie/more-tests2/sys/dev/sfxge/common/efx_mcdi.h (revision 293823) @@ -1,405 +1,405 @@ /*- * Copyright (c) 2009-2015 Solarflare Communications 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 THE COPYRIGHT HOLDERS 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 COPYRIGHT OWNER 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. * * The views and conclusions contained in the software and documentation are * those of the authors and should not be interpreted as representing official * policies, either expressed or implied, of the FreeBSD Project. * * $FreeBSD$ */ #ifndef _SYS_EFX_MCDI_H #define _SYS_EFX_MCDI_H #include "efx.h" #include "efx_regs_mcdi.h" #ifdef __cplusplus extern "C" { #endif /* * A reboot/assertion causes the MCDI status word to be set after the * command word is set or a REBOOT event is sent. If we notice a reboot * via these mechanisms then wait 10ms for the status word to be set. */ #define EFX_MCDI_STATUS_SLEEP_US 10000 struct efx_mcdi_req_s { boolean_t emr_quiet; /* Inputs: Command #, input buffer and length */ unsigned int emr_cmd; uint8_t *emr_in_buf; size_t emr_in_length; /* Outputs: retcode, buffer, length, and length used*/ - int emr_rc; + efx_rc_t emr_rc; uint8_t *emr_out_buf; size_t emr_out_length; size_t emr_out_length_used; /* Internals: low level transport details */ unsigned int emr_err_code; unsigned int emr_err_arg; #if EFSYS_OPT_MCDI_PROXY_AUTH uint32_t emr_proxy_handle; #endif }; typedef struct efx_mcdi_iface_s { unsigned int emi_port; unsigned int emi_max_version; unsigned int emi_seq; efx_mcdi_req_t *emi_pending_req; boolean_t emi_ev_cpl; boolean_t emi_new_epoch; int emi_aborted; uint32_t emi_poll_cnt; uint32_t emi_mc_reboot_status; } efx_mcdi_iface_t; extern void efx_mcdi_execute( __in efx_nic_t *enp, __inout efx_mcdi_req_t *emrp); extern void efx_mcdi_execute_quiet( __in efx_nic_t *enp, __inout efx_mcdi_req_t *emrp); extern void efx_mcdi_read_response_header( __in efx_nic_t *enp, __inout efx_mcdi_req_t *emrp); extern void efx_mcdi_ev_cpl( __in efx_nic_t *enp, __in unsigned int seq, __in unsigned int outlen, __in int errcode); #if EFSYS_OPT_MCDI_PROXY_AUTH extern __checkReturn efx_rc_t efx_mcdi_get_proxy_handle( __in efx_nic_t *enp, __in efx_mcdi_req_t *emrp, __out uint32_t *handlep); extern void efx_mcdi_ev_proxy_response( __in efx_nic_t *enp, __in unsigned int handle, __in unsigned int status); #endif extern void efx_mcdi_ev_death( __in efx_nic_t *enp, __in int rc); extern __checkReturn efx_rc_t efx_mcdi_request_errcode( __in unsigned int err); extern void efx_mcdi_raise_exception( __in efx_nic_t *enp, __in_opt efx_mcdi_req_t *emrp, __in int rc); typedef enum efx_mcdi_boot_e { EFX_MCDI_BOOT_PRIMARY, EFX_MCDI_BOOT_SECONDARY, EFX_MCDI_BOOT_ROM, } efx_mcdi_boot_t; extern __checkReturn efx_rc_t efx_mcdi_version( __in efx_nic_t *enp, __out_ecount_opt(4) uint16_t versionp[4], __out_opt uint32_t *buildp, __out_opt efx_mcdi_boot_t *statusp); extern __checkReturn efx_rc_t efx_mcdi_read_assertion( __in efx_nic_t *enp); extern __checkReturn efx_rc_t efx_mcdi_exit_assertion_handler( __in efx_nic_t *enp); extern __checkReturn efx_rc_t efx_mcdi_drv_attach( __in efx_nic_t *enp, __in boolean_t attach); extern __checkReturn efx_rc_t efx_mcdi_get_board_cfg( __in efx_nic_t *enp, __out_opt uint32_t *board_typep, __out_opt efx_dword_t *capabilitiesp, __out_ecount_opt(6) uint8_t mac_addrp[6]); extern __checkReturn efx_rc_t efx_mcdi_get_phy_cfg( __in efx_nic_t *enp); extern __checkReturn efx_rc_t efx_mcdi_firmware_update_supported( __in efx_nic_t *enp, __out boolean_t *supportedp); extern __checkReturn efx_rc_t efx_mcdi_macaddr_change_supported( __in efx_nic_t *enp, __out boolean_t *supportedp); extern __checkReturn efx_rc_t efx_mcdi_link_control_supported( __in efx_nic_t *enp, __out boolean_t *supportedp); extern __checkReturn efx_rc_t efx_mcdi_mac_spoofing_supported( __in efx_nic_t *enp, __out boolean_t *supportedp); #if EFSYS_OPT_BIST #if EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD extern __checkReturn efx_rc_t efx_mcdi_bist_enable_offline( __in efx_nic_t *enp); #endif /* EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD */ extern __checkReturn efx_rc_t efx_mcdi_bist_start( __in efx_nic_t *enp, __in efx_bist_type_t type); #endif /* EFSYS_OPT_BIST */ extern __checkReturn efx_rc_t efx_mcdi_get_resource_limits( __in efx_nic_t *enp, __out_opt uint32_t *nevqp, __out_opt uint32_t *nrxqp, __out_opt uint32_t *ntxqp); extern __checkReturn efx_rc_t efx_mcdi_log_ctrl( __in efx_nic_t *enp); extern __checkReturn efx_rc_t efx_mcdi_mac_stats_clear( __in efx_nic_t *enp); extern __checkReturn efx_rc_t efx_mcdi_mac_stats_upload( __in efx_nic_t *enp, __in efsys_mem_t *esmp); extern __checkReturn efx_rc_t efx_mcdi_mac_stats_periodic( __in efx_nic_t *enp, __in efsys_mem_t *esmp, __in uint16_t period, __in boolean_t events); #if EFSYS_OPT_LOOPBACK extern __checkReturn efx_rc_t efx_mcdi_get_loopback_modes( __in efx_nic_t *enp); #endif /* EFSYS_OPT_LOOPBACK */ #define MCDI_IN(_emr, _type, _ofst) \ ((_type *)((_emr).emr_in_buf + (_ofst))) #define MCDI_IN2(_emr, _type, _ofst) \ MCDI_IN(_emr, _type, MC_CMD_ ## _ofst ## _OFST) #define MCDI_IN_SET_BYTE(_emr, _ofst, _value) \ EFX_POPULATE_BYTE_1(*MCDI_IN2(_emr, efx_byte_t, _ofst), \ EFX_BYTE_0, _value) #define MCDI_IN_SET_WORD(_emr, _ofst, _value) \ EFX_POPULATE_WORD_1(*MCDI_IN2(_emr, efx_word_t, _ofst), \ EFX_WORD_0, _value) #define MCDI_IN_SET_DWORD(_emr, _ofst, _value) \ EFX_POPULATE_DWORD_1(*MCDI_IN2(_emr, efx_dword_t, _ofst), \ EFX_DWORD_0, _value) #define MCDI_IN_SET_DWORD_FIELD(_emr, _ofst, _field, _value) \ EFX_SET_DWORD_FIELD(*MCDI_IN2(_emr, efx_dword_t, _ofst), \ MC_CMD_ ## _field, _value) #define MCDI_IN_POPULATE_DWORD_1(_emr, _ofst, _field1, _value1) \ EFX_POPULATE_DWORD_1(*MCDI_IN2(_emr, efx_dword_t, _ofst), \ MC_CMD_ ## _field1, _value1) #define MCDI_IN_POPULATE_DWORD_2(_emr, _ofst, _field1, _value1, \ _field2, _value2) \ EFX_POPULATE_DWORD_2(*MCDI_IN2(_emr, efx_dword_t, _ofst), \ MC_CMD_ ## _field1, _value1, \ MC_CMD_ ## _field2, _value2) #define MCDI_IN_POPULATE_DWORD_3(_emr, _ofst, _field1, _value1, \ _field2, _value2, _field3, _value3) \ EFX_POPULATE_DWORD_3(*MCDI_IN2(_emr, efx_dword_t, _ofst), \ MC_CMD_ ## _field1, _value1, \ MC_CMD_ ## _field2, _value2, \ MC_CMD_ ## _field3, _value3) #define MCDI_IN_POPULATE_DWORD_4(_emr, _ofst, _field1, _value1, \ _field2, _value2, _field3, _value3, _field4, _value4) \ EFX_POPULATE_DWORD_4(*MCDI_IN2(_emr, efx_dword_t, _ofst), \ MC_CMD_ ## _field1, _value1, \ MC_CMD_ ## _field2, _value2, \ MC_CMD_ ## _field3, _value3, \ MC_CMD_ ## _field4, _value4) #define MCDI_IN_POPULATE_DWORD_5(_emr, _ofst, _field1, _value1, \ _field2, _value2, _field3, _value3, _field4, _value4, \ _field5, _value5) \ EFX_POPULATE_DWORD_5(*MCDI_IN2(_emr, efx_dword_t, _ofst), \ MC_CMD_ ## _field1, _value1, \ MC_CMD_ ## _field2, _value2, \ MC_CMD_ ## _field3, _value3, \ MC_CMD_ ## _field4, _value4, \ MC_CMD_ ## _field5, _value5) #define MCDI_IN_POPULATE_DWORD_6(_emr, _ofst, _field1, _value1, \ _field2, _value2, _field3, _value3, _field4, _value4, \ _field5, _value5, _field6, _value6) \ EFX_POPULATE_DWORD_6(*MCDI_IN2(_emr, efx_dword_t, _ofst), \ MC_CMD_ ## _field1, _value1, \ MC_CMD_ ## _field2, _value2, \ MC_CMD_ ## _field3, _value3, \ MC_CMD_ ## _field4, _value4, \ MC_CMD_ ## _field5, _value5, \ MC_CMD_ ## _field6, _value6) #define MCDI_IN_POPULATE_DWORD_7(_emr, _ofst, _field1, _value1, \ _field2, _value2, _field3, _value3, _field4, _value4, \ _field5, _value5, _field6, _value6, _field7, _value7) \ EFX_POPULATE_DWORD_7(*MCDI_IN2(_emr, efx_dword_t, _ofst), \ MC_CMD_ ## _field1, _value1, \ MC_CMD_ ## _field2, _value2, \ MC_CMD_ ## _field3, _value3, \ MC_CMD_ ## _field4, _value4, \ MC_CMD_ ## _field5, _value5, \ MC_CMD_ ## _field6, _value6, \ MC_CMD_ ## _field7, _value7) #define MCDI_IN_POPULATE_DWORD_8(_emr, _ofst, _field1, _value1, \ _field2, _value2, _field3, _value3, _field4, _value4, \ _field5, _value5, _field6, _value6, _field7, _value7, \ _field8, _value8) \ EFX_POPULATE_DWORD_8(*MCDI_IN2(_emr, efx_dword_t, _ofst), \ MC_CMD_ ## _field1, _value1, \ MC_CMD_ ## _field2, _value2, \ MC_CMD_ ## _field3, _value3, \ MC_CMD_ ## _field4, _value4, \ MC_CMD_ ## _field5, _value5, \ MC_CMD_ ## _field6, _value6, \ MC_CMD_ ## _field7, _value7, \ MC_CMD_ ## _field8, _value8) #define MCDI_IN_POPULATE_DWORD_9(_emr, _ofst, _field1, _value1, \ _field2, _value2, _field3, _value3, _field4, _value4, \ _field5, _value5, _field6, _value6, _field7, _value7, \ _field8, _value8, _field9, _value9) \ EFX_POPULATE_DWORD_9(*MCDI_IN2(_emr, efx_dword_t, _ofst), \ MC_CMD_ ## _field1, _value1, \ MC_CMD_ ## _field2, _value2, \ MC_CMD_ ## _field3, _value3, \ MC_CMD_ ## _field4, _value4, \ MC_CMD_ ## _field5, _value5, \ MC_CMD_ ## _field6, _value6, \ MC_CMD_ ## _field7, _value7, \ MC_CMD_ ## _field8, _value8, \ MC_CMD_ ## _field9, _value9) #define MCDI_IN_POPULATE_DWORD_10(_emr, _ofst, _field1, _value1, \ _field2, _value2, _field3, _value3, _field4, _value4, \ _field5, _value5, _field6, _value6, _field7, _value7, \ _field8, _value8, _field9, _value9, _field10, _value10) \ EFX_POPULATE_DWORD_10(*MCDI_IN2(_emr, efx_dword_t, _ofst), \ MC_CMD_ ## _field1, _value1, \ MC_CMD_ ## _field2, _value2, \ MC_CMD_ ## _field3, _value3, \ MC_CMD_ ## _field4, _value4, \ MC_CMD_ ## _field5, _value5, \ MC_CMD_ ## _field6, _value6, \ MC_CMD_ ## _field7, _value7, \ MC_CMD_ ## _field8, _value8, \ MC_CMD_ ## _field9, _value9, \ MC_CMD_ ## _field10, _value10) #define MCDI_OUT(_emr, _type, _ofst) \ ((_type *)((_emr).emr_out_buf + (_ofst))) #define MCDI_OUT2(_emr, _type, _ofst) \ MCDI_OUT(_emr, _type, MC_CMD_ ## _ofst ## _OFST) #define MCDI_OUT_BYTE(_emr, _ofst) \ EFX_BYTE_FIELD(*MCDI_OUT2(_emr, efx_byte_t, _ofst), \ EFX_BYTE_0) #define MCDI_OUT_WORD(_emr, _ofst) \ EFX_WORD_FIELD(*MCDI_OUT2(_emr, efx_word_t, _ofst), \ EFX_WORD_0) #define MCDI_OUT_DWORD(_emr, _ofst) \ EFX_DWORD_FIELD(*MCDI_OUT2(_emr, efx_dword_t, _ofst), \ EFX_DWORD_0) #define MCDI_OUT_DWORD_FIELD(_emr, _ofst, _field) \ EFX_DWORD_FIELD(*MCDI_OUT2(_emr, efx_dword_t, _ofst), \ MC_CMD_ ## _field) #define MCDI_EV_FIELD(_eqp, _field) \ EFX_QWORD_FIELD(*_eqp, MCDI_EVENT_ ## _field) #define MCDI_CMD_DWORD_FIELD(_edp, _field) \ EFX_DWORD_FIELD(*_edp, MC_CMD_ ## _field) #define EFX_MCDI_HAVE_PRIVILEGE(mask, priv) \ (((mask) & (MC_CMD_PRIVILEGE_MASK_IN_GRP_ ## priv)) == \ (MC_CMD_PRIVILEGE_MASK_IN_GRP_ ## priv)) typedef enum efx_mcdi_feature_id_e { EFX_MCDI_FEATURE_FW_UPDATE = 0, EFX_MCDI_FEATURE_LINK_CONTROL, EFX_MCDI_FEATURE_MACADDR_CHANGE, EFX_MCDI_FEATURE_MAC_SPOOFING, EFX_MCDI_FEATURE_NIDS } efx_mcdi_feature_id_t; #ifdef __cplusplus } #endif #endif /* _SYS_EFX_MCDI_H */ Index: user/ngie/more-tests2/sys/dev/sfxge/common/efx_types.h =================================================================== --- user/ngie/more-tests2/sys/dev/sfxge/common/efx_types.h (revision 293822) +++ user/ngie/more-tests2/sys/dev/sfxge/common/efx_types.h (revision 293823) @@ -1,1649 +1,1649 @@ /*- * Copyright (c) 2007-2015 Solarflare Communications 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 THE COPYRIGHT HOLDERS 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 COPYRIGHT OWNER 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. * * The views and conclusions contained in the software and documentation are * those of the authors and should not be interpreted as representing official * policies, either expressed or implied, of the FreeBSD Project. * * Ackowledgement to Fen Systems Ltd. * * $FreeBSD$ */ #ifndef _SYS_EFX_TYPES_H #define _SYS_EFX_TYPES_H #include "efsys.h" #ifdef __cplusplus extern "C" { #endif /* * Bitfield access * * Solarflare NICs make extensive use of bitfields up to 128 bits * wide. Since there is no native 128-bit datatype on most systems, * and since 64-bit datatypes are inefficient on 32-bit systems and * vice versa, we wrap accesses in a way that uses the most efficient * datatype. * * The NICs are PCI devices and therefore little-endian. Since most * of the quantities that we deal with are DMAed to/from host memory, * we define our datatypes (efx_oword_t, efx_qword_t and efx_dword_t) * to be little-endian. * * In the less common case of using PIO for individual register * writes, we construct the little-endian datatype in host memory and * then use non-swapping register access primitives, rather than * constructing a native-endian datatype and relying on implicit * byte-swapping. (We use a similar strategy for register reads.) */ /* * NOTE: Field definitions here and elsewhere are done in terms of a lowest * bit number (LBN) and a width. */ #define EFX_DUMMY_FIELD_LBN 0 #define EFX_DUMMY_FIELD_WIDTH 0 #define EFX_BYTE_0_LBN 0 #define EFX_BYTE_0_WIDTH 8 #define EFX_BYTE_1_LBN 8 #define EFX_BYTE_1_WIDTH 8 #define EFX_BYTE_2_LBN 16 #define EFX_BYTE_2_WIDTH 8 #define EFX_BYTE_3_LBN 24 #define EFX_BYTE_3_WIDTH 8 #define EFX_BYTE_4_LBN 32 #define EFX_BYTE_4_WIDTH 8 #define EFX_BYTE_5_LBN 40 #define EFX_BYTE_5_WIDTH 8 #define EFX_BYTE_6_LBN 48 #define EFX_BYTE_6_WIDTH 8 #define EFX_BYTE_7_LBN 56 #define EFX_BYTE_7_WIDTH 8 #define EFX_WORD_0_LBN 0 #define EFX_WORD_0_WIDTH 16 #define EFX_WORD_1_LBN 16 #define EFX_WORD_1_WIDTH 16 #define EFX_WORD_2_LBN 32 #define EFX_WORD_2_WIDTH 16 #define EFX_WORD_3_LBN 48 #define EFX_WORD_3_WIDTH 16 #define EFX_DWORD_0_LBN 0 #define EFX_DWORD_0_WIDTH 32 #define EFX_DWORD_1_LBN 32 #define EFX_DWORD_1_WIDTH 32 #define EFX_DWORD_2_LBN 64 #define EFX_DWORD_2_WIDTH 32 #define EFX_DWORD_3_LBN 96 #define EFX_DWORD_3_WIDTH 32 /* There are intentionally no EFX_QWORD_0 or EFX_QWORD_1 field definitions * here as the implementaion of EFX_QWORD_FIELD and EFX_OWORD_FIELD do not * support field widths larger than 32 bits. */ /* Specified attribute (i.e. LBN ow WIDTH) of the specified field */ #define EFX_VAL(_field, _attribute) \ _field ## _ ## _attribute /* Lowest bit number of the specified field */ #define EFX_LOW_BIT(_field) \ EFX_VAL(_field, LBN) /* Width of the specified field */ #define EFX_WIDTH(_field) \ EFX_VAL(_field, WIDTH) /* Highest bit number of the specified field */ #define EFX_HIGH_BIT(_field) \ (EFX_LOW_BIT(_field) + EFX_WIDTH(_field) - 1) /* * 64-bit mask equal in width to the specified field. * * For example, a field with width 5 would have a mask of 0x000000000000001f. */ #define EFX_MASK64(_field) \ ((EFX_WIDTH(_field) == 64) ? ~((uint64_t)0) : \ (((((uint64_t)1) << EFX_WIDTH(_field))) - 1)) /* * 32-bit mask equal in width to the specified field. * * For example, a field with width 5 would have a mask of 0x0000001f. */ #define EFX_MASK32(_field) \ ((EFX_WIDTH(_field) == 32) ? ~((uint32_t)0) : \ (((((uint32_t)1) << EFX_WIDTH(_field))) - 1)) /* * 16-bit mask equal in width to the specified field. * * For example, a field with width 5 would have a mask of 0x001f. */ #define EFX_MASK16(_field) \ ((EFX_WIDTH(_field) == 16) ? 0xffffu : \ (uint16_t)((1 << EFX_WIDTH(_field)) - 1)) /* * 8-bit mask equal in width to the specified field. * * For example, a field with width 5 would have a mask of 0x1f. */ #define EFX_MASK8(_field) \ ((uint8_t)((1 << EFX_WIDTH(_field)) - 1)) #pragma pack(1) /* * A byte (i.e. 8-bit) datatype */ typedef union efx_byte_u { uint8_t eb_u8[1]; } efx_byte_t; /* * A word (i.e. 16-bit) datatype * * This datatype is defined to be little-endian. */ typedef union efx_word_u { efx_byte_t ew_byte[2]; uint16_t ew_u16[1]; uint8_t ew_u8[2]; } efx_word_t; /* * A doubleword (i.e. 32-bit) datatype * * This datatype is defined to be little-endian. */ typedef union efx_dword_u { efx_byte_t ed_byte[4]; efx_word_t ed_word[2]; uint32_t ed_u32[1]; uint16_t ed_u16[2]; uint8_t ed_u8[4]; } efx_dword_t; /* * A quadword (i.e. 64-bit) datatype * * This datatype is defined to be little-endian. */ typedef union efx_qword_u { efx_byte_t eq_byte[8]; efx_word_t eq_word[4]; efx_dword_t eq_dword[2]; #if EFSYS_HAS_UINT64 uint64_t eq_u64[1]; #endif uint32_t eq_u32[2]; uint16_t eq_u16[4]; uint8_t eq_u8[8]; } efx_qword_t; /* * An octword (i.e. 128-bit) datatype * * This datatype is defined to be little-endian. */ typedef union efx_oword_u { efx_byte_t eo_byte[16]; efx_word_t eo_word[8]; efx_dword_t eo_dword[4]; efx_qword_t eo_qword[2]; #if EFSYS_HAS_SSE2_M128 __m128i eo_u128[1]; #endif #if EFSYS_HAS_UINT64 uint64_t eo_u64[2]; #endif uint32_t eo_u32[4]; uint16_t eo_u16[8]; uint8_t eo_u8[16]; } efx_oword_t; #pragma pack() #define __SWAP16(_x) \ ((((_x) & 0xff) << 8) | \ (((_x) >> 8) & 0xff)) #define __SWAP32(_x) \ ((__SWAP16((_x) & 0xffff) << 16) | \ __SWAP16(((_x) >> 16) & 0xffff)) #define __SWAP64(_x) \ ((__SWAP32((_x) & 0xffffffff) << 32) | \ __SWAP32(((_x) >> 32) & 0xffffffff)) #define __NOSWAP16(_x) (_x) #define __NOSWAP32(_x) (_x) #define __NOSWAP64(_x) (_x) #if EFSYS_IS_BIG_ENDIAN #define __CPU_TO_LE_16(_x) (uint16_t)__SWAP16(_x) #define __LE_TO_CPU_16(_x) (uint16_t)__SWAP16(_x) #define __CPU_TO_BE_16(_x) (uint16_t)__NOSWAP16(_x) #define __BE_TO_CPU_16(_x) (uint16_t)__NOSWAP16(_x) #define __CPU_TO_LE_32(_x) (uint32_t)__SWAP32(_x) #define __LE_TO_CPU_32(_x) (uint32_t)__SWAP32(_x) #define __CPU_TO_BE_32(_x) (uint32_t)__NOSWAP32(_x) #define __BE_TO_CPU_32(_x) (uint32_t)__NOSWAP32(_x) #define __CPU_TO_LE_64(_x) (uint64_t)__SWAP64(_x) #define __LE_TO_CPU_64(_x) (uint64_t)__SWAP64(_x) #define __CPU_TO_BE_64(_x) (uint64_t)__NOSWAP64(_x) #define __BE_TO_CPU_64(_x) (uint64_t)__NOSWAP64(_x) #elif EFSYS_IS_LITTLE_ENDIAN #define __CPU_TO_LE_16(_x) (uint16_t)__NOSWAP16(_x) #define __LE_TO_CPU_16(_x) (uint16_t)__NOSWAP16(_x) #define __CPU_TO_BE_16(_x) (uint16_t)__SWAP16(_x) #define __BE_TO_CPU_16(_x) (uint16_t)__SWAP16(_x) #define __CPU_TO_LE_32(_x) (uint32_t)__NOSWAP32(_x) #define __LE_TO_CPU_32(_x) (uint32_t)__NOSWAP32(_x) #define __CPU_TO_BE_32(_x) (uint32_t)__SWAP32(_x) #define __BE_TO_CPU_32(_x) (uint32_t)__SWAP32(_x) #define __CPU_TO_LE_64(_x) (uint64_t)__NOSWAP64(_x) #define __LE_TO_CPU_64(_x) (uint64_t)__NOSWAP64(_x) #define __CPU_TO_BE_64(_x) (uint64_t)__SWAP64(_x) #define __BE_TO_CPU_64(_x) (uint64_t)__SWAP64(_x) #else #error "Neither of EFSYS_IS_{BIG,LITTLE}_ENDIAN is set" #endif #define __NATIVE_8(_x) (uint8_t)(_x) /* Format string for printing an efx_byte_t */ #define EFX_BYTE_FMT "0x%02x" /* Format string for printing an efx_word_t */ #define EFX_WORD_FMT "0x%04x" /* Format string for printing an efx_dword_t */ #define EFX_DWORD_FMT "0x%08x" /* Format string for printing an efx_qword_t */ #define EFX_QWORD_FMT "0x%08x:%08x" /* Format string for printing an efx_oword_t */ #define EFX_OWORD_FMT "0x%08x:%08x:%08x:%08x" /* Parameters for printing an efx_byte_t */ #define EFX_BYTE_VAL(_byte) \ ((unsigned int)__NATIVE_8((_byte).eb_u8[0])) /* Parameters for printing an efx_word_t */ #define EFX_WORD_VAL(_word) \ ((unsigned int)__LE_TO_CPU_16((_word).ew_u16[0])) /* Parameters for printing an efx_dword_t */ #define EFX_DWORD_VAL(_dword) \ ((unsigned int)__LE_TO_CPU_32((_dword).ed_u32[0])) /* Parameters for printing an efx_qword_t */ #define EFX_QWORD_VAL(_qword) \ ((unsigned int)__LE_TO_CPU_32((_qword).eq_u32[1])), \ ((unsigned int)__LE_TO_CPU_32((_qword).eq_u32[0])) /* Parameters for printing an efx_oword_t */ #define EFX_OWORD_VAL(_oword) \ ((unsigned int)__LE_TO_CPU_32((_oword).eo_u32[3])), \ ((unsigned int)__LE_TO_CPU_32((_oword).eo_u32[2])), \ ((unsigned int)__LE_TO_CPU_32((_oword).eo_u32[1])), \ ((unsigned int)__LE_TO_CPU_32((_oword).eo_u32[0])) /* * Stop lint complaining about some shifts. */ #ifdef __lint extern int fix_lint; #define FIX_LINT(_x) (_x + fix_lint) #else #define FIX_LINT(_x) (_x) #endif /* * Extract bit field portion [low,high) from the native-endian element * which contains bits [min,max). * * For example, suppose "element" represents the high 32 bits of a * 64-bit value, and we wish to extract the bits belonging to the bit * field occupying bits 28-45 of this 64-bit value. * * Then EFX_EXTRACT(_element, 32, 63, 28, 45) would give * * (_element) << 4 * * The result will contain the relevant bits filled in in the range * [0,high-low), with garbage in bits [high-low+1,...). */ #define EFX_EXTRACT_NATIVE(_element, _min, _max, _low, _high) \ ((FIX_LINT(_low > _max) || FIX_LINT(_high < _min)) ? \ 0U : \ ((_low > _min) ? \ ((_element) >> (_low - _min)) : \ ((_element) << (_min - _low)))) /* * Extract bit field portion [low,high) from the 64-bit little-endian * element which contains bits [min,max) */ #define EFX_EXTRACT64(_element, _min, _max, _low, _high) \ EFX_EXTRACT_NATIVE(__LE_TO_CPU_64(_element), _min, _max, _low, _high) /* * Extract bit field portion [low,high) from the 32-bit little-endian * element which contains bits [min,max) */ #define EFX_EXTRACT32(_element, _min, _max, _low, _high) \ EFX_EXTRACT_NATIVE(__LE_TO_CPU_32(_element), _min, _max, _low, _high) /* * Extract bit field portion [low,high) from the 16-bit little-endian * element which contains bits [min,max) */ #define EFX_EXTRACT16(_element, _min, _max, _low, _high) \ EFX_EXTRACT_NATIVE(__LE_TO_CPU_16(_element), _min, _max, _low, _high) /* * Extract bit field portion [low,high) from the 8-bit * element which contains bits [min,max) */ #define EFX_EXTRACT8(_element, _min, _max, _low, _high) \ EFX_EXTRACT_NATIVE(__NATIVE_8(_element), _min, _max, _low, _high) #define EFX_EXTRACT_OWORD64(_oword, _low, _high) \ (EFX_EXTRACT64((_oword).eo_u64[0], FIX_LINT(0), FIX_LINT(63), \ _low, _high) | \ EFX_EXTRACT64((_oword).eo_u64[1], FIX_LINT(64), FIX_LINT(127), \ _low, _high)) #define EFX_EXTRACT_OWORD32(_oword, _low, _high) \ (EFX_EXTRACT32((_oword).eo_u32[0], FIX_LINT(0), FIX_LINT(31), \ _low, _high) | \ EFX_EXTRACT32((_oword).eo_u32[1], FIX_LINT(32), FIX_LINT(63), \ _low, _high) | \ EFX_EXTRACT32((_oword).eo_u32[2], FIX_LINT(64), FIX_LINT(95), \ _low, _high) | \ EFX_EXTRACT32((_oword).eo_u32[3], FIX_LINT(96), FIX_LINT(127), \ _low, _high)) #define EFX_EXTRACT_QWORD64(_qword, _low, _high) \ (EFX_EXTRACT64((_qword).eq_u64[0], FIX_LINT(0), FIX_LINT(63), \ _low, _high)) #define EFX_EXTRACT_QWORD32(_qword, _low, _high) \ (EFX_EXTRACT32((_qword).eq_u32[0], FIX_LINT(0), FIX_LINT(31), \ _low, _high) | \ EFX_EXTRACT32((_qword).eq_u32[1], FIX_LINT(32), FIX_LINT(63), \ _low, _high)) #define EFX_EXTRACT_DWORD(_dword, _low, _high) \ (EFX_EXTRACT32((_dword).ed_u32[0], FIX_LINT(0), FIX_LINT(31), \ _low, _high)) #define EFX_EXTRACT_WORD(_word, _low, _high) \ (EFX_EXTRACT16((_word).ew_u16[0], FIX_LINT(0), FIX_LINT(15), \ _low, _high)) #define EFX_EXTRACT_BYTE(_byte, _low, _high) \ (EFX_EXTRACT8((_byte).eb_u8[0], FIX_LINT(0), FIX_LINT(7), \ _low, _high)) #define EFX_OWORD_FIELD64(_oword, _field) \ ((uint32_t)EFX_EXTRACT_OWORD64(_oword, EFX_LOW_BIT(_field), \ EFX_HIGH_BIT(_field)) & EFX_MASK32(_field)) #define EFX_OWORD_FIELD32(_oword, _field) \ (EFX_EXTRACT_OWORD32(_oword, EFX_LOW_BIT(_field), \ EFX_HIGH_BIT(_field)) & EFX_MASK32(_field)) #define EFX_QWORD_FIELD64(_qword, _field) \ ((uint32_t)EFX_EXTRACT_QWORD64(_qword, EFX_LOW_BIT(_field), \ EFX_HIGH_BIT(_field)) & EFX_MASK32(_field)) #define EFX_QWORD_FIELD32(_qword, _field) \ (EFX_EXTRACT_QWORD32(_qword, EFX_LOW_BIT(_field), \ EFX_HIGH_BIT(_field)) & EFX_MASK32(_field)) #define EFX_DWORD_FIELD(_dword, _field) \ (EFX_EXTRACT_DWORD(_dword, EFX_LOW_BIT(_field), \ EFX_HIGH_BIT(_field)) & EFX_MASK32(_field)) #define EFX_WORD_FIELD(_word, _field) \ (EFX_EXTRACT_WORD(_word, EFX_LOW_BIT(_field), \ EFX_HIGH_BIT(_field)) & EFX_MASK16(_field)) #define EFX_BYTE_FIELD(_byte, _field) \ (EFX_EXTRACT_BYTE(_byte, EFX_LOW_BIT(_field), \ EFX_HIGH_BIT(_field)) & EFX_MASK8(_field)) #define EFX_OWORD_IS_EQUAL64(_oword_a, _oword_b) \ ((_oword_a).eo_u64[0] == (_oword_b).eo_u64[0] && \ (_oword_a).eo_u64[1] == (_oword_b).eo_u64[1]) #define EFX_OWORD_IS_EQUAL32(_oword_a, _oword_b) \ ((_oword_a).eo_u32[0] == (_oword_b).eo_u32[0] && \ (_oword_a).eo_u32[1] == (_oword_b).eo_u32[1] && \ (_oword_a).eo_u32[2] == (_oword_b).eo_u32[2] && \ (_oword_a).eo_u32[3] == (_oword_b).eo_u32[3]) #define EFX_QWORD_IS_EQUAL64(_qword_a, _qword_b) \ ((_qword_a).eq_u64[0] == (_qword_b).eq_u64[0]) #define EFX_QWORD_IS_EQUAL32(_qword_a, _qword_b) \ ((_qword_a).eq_u32[0] == (_qword_b).eq_u32[0] && \ (_qword_a).eq_u32[1] == (_qword_b).eq_u32[1]) #define EFX_DWORD_IS_EQUAL(_dword_a, _dword_b) \ ((_dword_a).ed_u32[0] == (_dword_b).ed_u32[0]) #define EFX_WORD_IS_EQUAL(_word_a, _word_b) \ ((_word_a).ew_u16[0] == (_word_b).ew_u16[0]) #define EFX_BYTE_IS_EQUAL(_byte_a, _byte_b) \ ((_byte_a).eb_u8[0] == (_byte_b).eb_u8[0]) #define EFX_OWORD_IS_ZERO64(_oword) \ (((_oword).eo_u64[0] | \ (_oword).eo_u64[1]) == 0) #define EFX_OWORD_IS_ZERO32(_oword) \ (((_oword).eo_u32[0] | \ (_oword).eo_u32[1] | \ (_oword).eo_u32[2] | \ (_oword).eo_u32[3]) == 0) #define EFX_QWORD_IS_ZERO64(_qword) \ (((_qword).eq_u64[0]) == 0) #define EFX_QWORD_IS_ZERO32(_qword) \ (((_qword).eq_u32[0] | \ (_qword).eq_u32[1]) == 0) #define EFX_DWORD_IS_ZERO(_dword) \ (((_dword).ed_u32[0]) == 0) #define EFX_WORD_IS_ZERO(_word) \ (((_word).ew_u16[0]) == 0) #define EFX_BYTE_IS_ZERO(_byte) \ (((_byte).eb_u8[0]) == 0) #define EFX_OWORD_IS_SET64(_oword) \ (((_oword).eo_u64[0] & \ (_oword).eo_u64[1]) == ~((uint64_t)0)) #define EFX_OWORD_IS_SET32(_oword) \ (((_oword).eo_u32[0] & \ (_oword).eo_u32[1] & \ (_oword).eo_u32[2] & \ (_oword).eo_u32[3]) == ~((uint32_t)0)) #define EFX_QWORD_IS_SET64(_qword) \ - (((_qword).eq_u64[0]) == ~((uint32_t)0)) + (((_qword).eq_u64[0]) == ~((uint64_t)0)) #define EFX_QWORD_IS_SET32(_qword) \ (((_qword).eq_u32[0] & \ (_qword).eq_u32[1]) == ~((uint32_t)0)) #define EFX_DWORD_IS_SET(_dword) \ ((_dword).ed_u32[0] == ~((uint32_t)0)) #define EFX_WORD_IS_SET(_word) \ ((_word).ew_u16[0] == ~((uint16_t)0)) #define EFX_BYTE_IS_SET(_byte) \ ((_byte).eb_u8[0] == ~((uint8_t)0)) /* * Construct bit field portion * * Creates the portion of the bit field [low,high) that lies within * the range [min,max). */ #define EFX_INSERT_NATIVE64(_min, _max, _low, _high, _value) \ (((_low > _max) || (_high < _min)) ? \ 0U : \ ((_low > _min) ? \ (((uint64_t)(_value)) << (_low - _min)) : \ (((uint64_t)(_value)) >> (_min - _low)))) #define EFX_INSERT_NATIVE32(_min, _max, _low, _high, _value) \ (((_low > _max) || (_high < _min)) ? \ 0U : \ ((_low > _min) ? \ (((uint32_t)(_value)) << (_low - _min)) : \ (((uint32_t)(_value)) >> (_min - _low)))) #define EFX_INSERT_NATIVE16(_min, _max, _low, _high, _value) \ (((_low > _max) || (_high < _min)) ? \ 0U : \ (uint16_t)((_low > _min) ? \ ((_value) << (_low - _min)) : \ ((_value) >> (_min - _low)))) #define EFX_INSERT_NATIVE8(_min, _max, _low, _high, _value) \ (((_low > _max) || (_high < _min)) ? \ 0U : \ (uint8_t)((_low > _min) ? \ ((_value) << (_low - _min)) : \ ((_value) >> (_min - _low)))) /* * Construct bit field portion * * Creates the portion of the named bit field that lies within the * range [min,max). */ #define EFX_INSERT_FIELD_NATIVE64(_min, _max, _field, _value) \ EFX_INSERT_NATIVE64(_min, _max, EFX_LOW_BIT(_field), \ EFX_HIGH_BIT(_field), _value) #define EFX_INSERT_FIELD_NATIVE32(_min, _max, _field, _value) \ EFX_INSERT_NATIVE32(_min, _max, EFX_LOW_BIT(_field), \ EFX_HIGH_BIT(_field), _value) #define EFX_INSERT_FIELD_NATIVE16(_min, _max, _field, _value) \ EFX_INSERT_NATIVE16(_min, _max, EFX_LOW_BIT(_field), \ EFX_HIGH_BIT(_field), _value) #define EFX_INSERT_FIELD_NATIVE8(_min, _max, _field, _value) \ EFX_INSERT_NATIVE8(_min, _max, EFX_LOW_BIT(_field), \ EFX_HIGH_BIT(_field), _value) /* * Construct bit field * * Creates the portion of the named bit fields that lie within the * range [min,max). */ #define EFX_INSERT_FIELDS64(_min, _max, \ _field1, _value1, _field2, _value2, _field3, _value3, \ _field4, _value4, _field5, _value5, _field6, _value6, \ _field7, _value7, _field8, _value8, _field9, _value9, \ _field10, _value10) \ __CPU_TO_LE_64( \ EFX_INSERT_FIELD_NATIVE64(_min, _max, _field1, _value1) | \ EFX_INSERT_FIELD_NATIVE64(_min, _max, _field2, _value2) | \ EFX_INSERT_FIELD_NATIVE64(_min, _max, _field3, _value3) | \ EFX_INSERT_FIELD_NATIVE64(_min, _max, _field4, _value4) | \ EFX_INSERT_FIELD_NATIVE64(_min, _max, _field5, _value5) | \ EFX_INSERT_FIELD_NATIVE64(_min, _max, _field6, _value6) | \ EFX_INSERT_FIELD_NATIVE64(_min, _max, _field7, _value7) | \ EFX_INSERT_FIELD_NATIVE64(_min, _max, _field8, _value8) | \ EFX_INSERT_FIELD_NATIVE64(_min, _max, _field9, _value9) | \ EFX_INSERT_FIELD_NATIVE64(_min, _max, _field10, _value10)) #define EFX_INSERT_FIELDS32(_min, _max, \ _field1, _value1, _field2, _value2, _field3, _value3, \ _field4, _value4, _field5, _value5, _field6, _value6, \ _field7, _value7, _field8, _value8, _field9, _value9, \ _field10, _value10) \ __CPU_TO_LE_32( \ EFX_INSERT_FIELD_NATIVE32(_min, _max, _field1, _value1) | \ EFX_INSERT_FIELD_NATIVE32(_min, _max, _field2, _value2) | \ EFX_INSERT_FIELD_NATIVE32(_min, _max, _field3, _value3) | \ EFX_INSERT_FIELD_NATIVE32(_min, _max, _field4, _value4) | \ EFX_INSERT_FIELD_NATIVE32(_min, _max, _field5, _value5) | \ EFX_INSERT_FIELD_NATIVE32(_min, _max, _field6, _value6) | \ EFX_INSERT_FIELD_NATIVE32(_min, _max, _field7, _value7) | \ EFX_INSERT_FIELD_NATIVE32(_min, _max, _field8, _value8) | \ EFX_INSERT_FIELD_NATIVE32(_min, _max, _field9, _value9) | \ EFX_INSERT_FIELD_NATIVE32(_min, _max, _field10, _value10)) #define EFX_INSERT_FIELDS16(_min, _max, \ _field1, _value1, _field2, _value2, _field3, _value3, \ _field4, _value4, _field5, _value5, _field6, _value6, \ _field7, _value7, _field8, _value8, _field9, _value9, \ _field10, _value10) \ __CPU_TO_LE_16( \ EFX_INSERT_FIELD_NATIVE16(_min, _max, _field1, _value1) | \ EFX_INSERT_FIELD_NATIVE16(_min, _max, _field2, _value2) | \ EFX_INSERT_FIELD_NATIVE16(_min, _max, _field3, _value3) | \ EFX_INSERT_FIELD_NATIVE16(_min, _max, _field4, _value4) | \ EFX_INSERT_FIELD_NATIVE16(_min, _max, _field5, _value5) | \ EFX_INSERT_FIELD_NATIVE16(_min, _max, _field6, _value6) | \ EFX_INSERT_FIELD_NATIVE16(_min, _max, _field7, _value7) | \ EFX_INSERT_FIELD_NATIVE16(_min, _max, _field8, _value8) | \ EFX_INSERT_FIELD_NATIVE16(_min, _max, _field9, _value9) | \ EFX_INSERT_FIELD_NATIVE16(_min, _max, _field10, _value10)) #define EFX_INSERT_FIELDS8(_min, _max, \ _field1, _value1, _field2, _value2, _field3, _value3, \ _field4, _value4, _field5, _value5, _field6, _value6, \ _field7, _value7, _field8, _value8, _field9, _value9, \ _field10, _value10) \ __NATIVE_8( \ EFX_INSERT_FIELD_NATIVE8(_min, _max, _field1, _value1) | \ EFX_INSERT_FIELD_NATIVE8(_min, _max, _field2, _value2) | \ EFX_INSERT_FIELD_NATIVE8(_min, _max, _field3, _value3) | \ EFX_INSERT_FIELD_NATIVE8(_min, _max, _field4, _value4) | \ EFX_INSERT_FIELD_NATIVE8(_min, _max, _field5, _value5) | \ EFX_INSERT_FIELD_NATIVE8(_min, _max, _field6, _value6) | \ EFX_INSERT_FIELD_NATIVE8(_min, _max, _field7, _value7) | \ EFX_INSERT_FIELD_NATIVE8(_min, _max, _field8, _value8) | \ EFX_INSERT_FIELD_NATIVE8(_min, _max, _field9, _value9) | \ EFX_INSERT_FIELD_NATIVE8(_min, _max, _field10, _value10)) #define EFX_POPULATE_OWORD64(_oword, \ _field1, _value1, _field2, _value2, _field3, _value3, \ _field4, _value4, _field5, _value5, _field6, _value6, \ _field7, _value7, _field8, _value8, _field9, _value9, \ _field10, _value10) \ do { \ _NOTE(CONSTANTCONDITION) \ (_oword).eo_u64[0] = EFX_INSERT_FIELDS64(0, 63, \ _field1, _value1, _field2, _value2, \ _field3, _value3, _field4, _value4, \ _field5, _value5, _field6, _value6, \ _field7, _value7, _field8, _value8, \ _field9, _value9, _field10, _value10); \ _NOTE(CONSTANTCONDITION) \ (_oword).eo_u64[1] = EFX_INSERT_FIELDS64(64, 127, \ _field1, _value1, _field2, _value2, \ _field3, _value3, _field4, _value4, \ _field5, _value5, _field6, _value6, \ _field7, _value7, _field8, _value8, \ _field9, _value9, _field10, _value10); \ _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) #define EFX_POPULATE_OWORD32(_oword, \ _field1, _value1, _field2, _value2, _field3, _value3, \ _field4, _value4, _field5, _value5, _field6, _value6, \ _field7, _value7, _field8, _value8, _field9, _value9, \ _field10, _value10) \ do { \ _NOTE(CONSTANTCONDITION) \ (_oword).eo_u32[0] = EFX_INSERT_FIELDS32(0, 31, \ _field1, _value1, _field2, _value2, \ _field3, _value3, _field4, _value4, \ _field5, _value5, _field6, _value6, \ _field7, _value7, _field8, _value8, \ _field9, _value9, _field10, _value10); \ _NOTE(CONSTANTCONDITION) \ (_oword).eo_u32[1] = EFX_INSERT_FIELDS32(32, 63, \ _field1, _value1, _field2, _value2, \ _field3, _value3, _field4, _value4, \ _field5, _value5, _field6, _value6, \ _field7, _value7, _field8, _value8, \ _field9, _value9, _field10, _value10); \ _NOTE(CONSTANTCONDITION) \ (_oword).eo_u32[2] = EFX_INSERT_FIELDS32(64, 95, \ _field1, _value1, _field2, _value2, \ _field3, _value3, _field4, _value4, \ _field5, _value5, _field6, _value6, \ _field7, _value7, _field8, _value8, \ _field9, _value9, _field10, _value10); \ _NOTE(CONSTANTCONDITION) \ (_oword).eo_u32[3] = EFX_INSERT_FIELDS32(96, 127, \ _field1, _value1, _field2, _value2, \ _field3, _value3, _field4, _value4, \ _field5, _value5, _field6, _value6, \ _field7, _value7, _field8, _value8, \ _field9, _value9, _field10, _value10); \ _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) #define EFX_POPULATE_QWORD64(_qword, \ _field1, _value1, _field2, _value2, _field3, _value3, \ _field4, _value4, _field5, _value5, _field6, _value6, \ _field7, _value7, _field8, _value8, _field9, _value9, \ _field10, _value10) \ do { \ _NOTE(CONSTANTCONDITION) \ (_qword).eq_u64[0] = EFX_INSERT_FIELDS64(0, 63, \ _field1, _value1, _field2, _value2, \ _field3, _value3, _field4, _value4, \ _field5, _value5, _field6, _value6, \ _field7, _value7, _field8, _value8, \ _field9, _value9, _field10, _value10); \ _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) #define EFX_POPULATE_QWORD32(_qword, \ _field1, _value1, _field2, _value2, _field3, _value3, \ _field4, _value4, _field5, _value5, _field6, _value6, \ _field7, _value7, _field8, _value8, _field9, _value9, \ _field10, _value10) \ do { \ _NOTE(CONSTANTCONDITION) \ (_qword).eq_u32[0] = EFX_INSERT_FIELDS32(0, 31, \ _field1, _value1, _field2, _value2, \ _field3, _value3, _field4, _value4, \ _field5, _value5, _field6, _value6, \ _field7, _value7, _field8, _value8, \ _field9, _value9, _field10, _value10); \ _NOTE(CONSTANTCONDITION) \ (_qword).eq_u32[1] = EFX_INSERT_FIELDS32(32, 63, \ _field1, _value1, _field2, _value2, \ _field3, _value3, _field4, _value4, \ _field5, _value5, _field6, _value6, \ _field7, _value7, _field8, _value8, \ _field9, _value9, _field10, _value10); \ _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) #define EFX_POPULATE_DWORD(_dword, \ _field1, _value1, _field2, _value2, _field3, _value3, \ _field4, _value4, _field5, _value5, _field6, _value6, \ _field7, _value7, _field8, _value8, _field9, _value9, \ _field10, _value10) \ do { \ _NOTE(CONSTANTCONDITION) \ (_dword).ed_u32[0] = EFX_INSERT_FIELDS32(0, 31, \ _field1, _value1, _field2, _value2, \ _field3, _value3, _field4, _value4, \ _field5, _value5, _field6, _value6, \ _field7, _value7, _field8, _value8, \ _field9, _value9, _field10, _value10); \ _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) #define EFX_POPULATE_WORD(_word, \ _field1, _value1, _field2, _value2, _field3, _value3, \ _field4, _value4, _field5, _value5, _field6, _value6, \ _field7, _value7, _field8, _value8, _field9, _value9, \ _field10, _value10) \ do { \ _NOTE(CONSTANTCONDITION) \ (_word).ew_u16[0] = EFX_INSERT_FIELDS16(0, 15, \ _field1, _value1, _field2, _value2, \ _field3, _value3, _field4, _value4, \ _field5, _value5, _field6, _value6, \ _field7, _value7, _field8, _value8, \ _field9, _value9, _field10, _value10); \ _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) #define EFX_POPULATE_BYTE(_byte, \ _field1, _value1, _field2, _value2, _field3, _value3, \ _field4, _value4, _field5, _value5, _field6, _value6, \ _field7, _value7, _field8, _value8, _field9, _value9, \ _field10, _value10) \ do { \ _NOTE(CONSTANTCONDITION) \ (_byte).eb_u8[0] = EFX_INSERT_FIELDS8(0, 7, \ _field1, _value1, _field2, _value2, \ _field3, _value3, _field4, _value4, \ _field5, _value5, _field6, _value6, \ _field7, _value7, _field8, _value8, \ _field9, _value9, _field10, _value10); \ _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) /* Populate an octword field with various numbers of arguments */ #define EFX_POPULATE_OWORD_10 EFX_POPULATE_OWORD #define EFX_POPULATE_OWORD_9(_oword, \ _field1, _value1, _field2, _value2, _field3, _value3, \ _field4, _value4, _field5, _value5, _field6, _value6, \ _field7, _value7, _field8, _value8, _field9, _value9) \ EFX_POPULATE_OWORD_10(_oword, EFX_DUMMY_FIELD, 0, \ _field1, _value1, _field2, _value2, _field3, _value3, \ _field4, _value4, _field5, _value5, _field6, _value6, \ _field7, _value7, _field8, _value8, _field9, _value9) #define EFX_POPULATE_OWORD_8(_oword, \ _field1, _value1, _field2, _value2, _field3, _value3, \ _field4, _value4, _field5, _value5, _field6, _value6, \ _field7, _value7, _field8, _value8) \ EFX_POPULATE_OWORD_9(_oword, EFX_DUMMY_FIELD, 0, \ _field1, _value1, _field2, _value2, _field3, _value3, \ _field4, _value4, _field5, _value5, _field6, _value6, \ _field7, _value7, _field8, _value8) #define EFX_POPULATE_OWORD_7(_oword, \ _field1, _value1, _field2, _value2, _field3, _value3, \ _field4, _value4, _field5, _value5, _field6, _value6, \ _field7, _value7) \ EFX_POPULATE_OWORD_8(_oword, EFX_DUMMY_FIELD, 0, \ _field1, _value1, _field2, _value2, _field3, _value3, \ _field4, _value4, _field5, _value5, _field6, _value6, \ _field7, _value7) #define EFX_POPULATE_OWORD_6(_oword, \ _field1, _value1, _field2, _value2, _field3, _value3, \ _field4, _value4, _field5, _value5, _field6, _value6) \ EFX_POPULATE_OWORD_7(_oword, EFX_DUMMY_FIELD, 0, \ _field1, _value1, _field2, _value2, _field3, _value3, \ _field4, _value4, _field5, _value5, _field6, _value6) #define EFX_POPULATE_OWORD_5(_oword, \ _field1, _value1, _field2, _value2, _field3, _value3, \ _field4, _value4, _field5, _value5) \ EFX_POPULATE_OWORD_6(_oword, EFX_DUMMY_FIELD, 0, \ _field1, _value1, _field2, _value2, _field3, _value3, \ _field4, _value4, _field5, _value5) #define EFX_POPULATE_OWORD_4(_oword, \ _field1, _value1, _field2, _value2, _field3, _value3, \ _field4, _value4) \ EFX_POPULATE_OWORD_5(_oword, EFX_DUMMY_FIELD, 0, \ _field1, _value1, _field2, _value2, _field3, _value3, \ _field4, _value4) #define EFX_POPULATE_OWORD_3(_oword, \ _field1, _value1, _field2, _value2, _field3, _value3) \ EFX_POPULATE_OWORD_4(_oword, EFX_DUMMY_FIELD, 0, \ _field1, _value1, _field2, _value2, _field3, _value3) #define EFX_POPULATE_OWORD_2(_oword, \ _field1, _value1, _field2, _value2) \ EFX_POPULATE_OWORD_3(_oword, EFX_DUMMY_FIELD, 0, \ _field1, _value1, _field2, _value2) #define EFX_POPULATE_OWORD_1(_oword, \ _field1, _value1) \ EFX_POPULATE_OWORD_2(_oword, EFX_DUMMY_FIELD, 0, \ _field1, _value1) #define EFX_ZERO_OWORD(_oword) \ EFX_POPULATE_OWORD_1(_oword, EFX_DUMMY_FIELD, 0) #define EFX_SET_OWORD(_oword) \ EFX_POPULATE_OWORD_4(_oword, \ EFX_DWORD_0, 0xffffffff, EFX_DWORD_1, 0xffffffff, \ EFX_DWORD_2, 0xffffffff, EFX_DWORD_3, 0xffffffff) /* Populate a quadword field with various numbers of arguments */ #define EFX_POPULATE_QWORD_10 EFX_POPULATE_QWORD #define EFX_POPULATE_QWORD_9(_qword, \ _field1, _value1, _field2, _value2, _field3, _value3, \ _field4, _value4, _field5, _value5, _field6, _value6, \ _field7, _value7, _field8, _value8, _field9, _value9) \ EFX_POPULATE_QWORD_10(_qword, EFX_DUMMY_FIELD, 0, \ _field1, _value1, _field2, _value2, _field3, _value3, \ _field4, _value4, _field5, _value5, _field6, _value6, \ _field7, _value7, _field8, _value8, _field9, _value9) #define EFX_POPULATE_QWORD_8(_qword, \ _field1, _value1, _field2, _value2, _field3, _value3, \ _field4, _value4, _field5, _value5, _field6, _value6, \ _field7, _value7, _field8, _value8) \ EFX_POPULATE_QWORD_9(_qword, EFX_DUMMY_FIELD, 0, \ _field1, _value1, _field2, _value2, _field3, _value3, \ _field4, _value4, _field5, _value5, _field6, _value6, \ _field7, _value7, _field8, _value8) #define EFX_POPULATE_QWORD_7(_qword, \ _field1, _value1, _field2, _value2, _field3, _value3, \ _field4, _value4, _field5, _value5, _field6, _value6, \ _field7, _value7) \ EFX_POPULATE_QWORD_8(_qword, EFX_DUMMY_FIELD, 0, \ _field1, _value1, _field2, _value2, _field3, _value3, \ _field4, _value4, _field5, _value5, _field6, _value6, \ _field7, _value7) #define EFX_POPULATE_QWORD_6(_qword, \ _field1, _value1, _field2, _value2, _field3, _value3, \ _field4, _value4, _field5, _value5, _field6, _value6) \ EFX_POPULATE_QWORD_7(_qword, EFX_DUMMY_FIELD, 0, \ _field1, _value1, _field2, _value2, _field3, _value3, \ _field4, _value4, _field5, _value5, _field6, _value6) #define EFX_POPULATE_QWORD_5(_qword, \ _field1, _value1, _field2, _value2, _field3, _value3, \ _field4, _value4, _field5, _value5) \ EFX_POPULATE_QWORD_6(_qword, EFX_DUMMY_FIELD, 0, \ _field1, _value1, _field2, _value2, _field3, _value3, \ _field4, _value4, _field5, _value5) #define EFX_POPULATE_QWORD_4(_qword, \ _field1, _value1, _field2, _value2, _field3, _value3, \ _field4, _value4) \ EFX_POPULATE_QWORD_5(_qword, EFX_DUMMY_FIELD, 0, \ _field1, _value1, _field2, _value2, _field3, _value3, \ _field4, _value4) #define EFX_POPULATE_QWORD_3(_qword, \ _field1, _value1, _field2, _value2, _field3, _value3) \ EFX_POPULATE_QWORD_4(_qword, EFX_DUMMY_FIELD, 0, \ _field1, _value1, _field2, _value2, _field3, _value3) #define EFX_POPULATE_QWORD_2(_qword, \ _field1, _value1, _field2, _value2) \ EFX_POPULATE_QWORD_3(_qword, EFX_DUMMY_FIELD, 0, \ _field1, _value1, _field2, _value2) #define EFX_POPULATE_QWORD_1(_qword, \ _field1, _value1) \ EFX_POPULATE_QWORD_2(_qword, EFX_DUMMY_FIELD, 0, \ _field1, _value1) #define EFX_ZERO_QWORD(_qword) \ EFX_POPULATE_QWORD_1(_qword, EFX_DUMMY_FIELD, 0) #define EFX_SET_QWORD(_qword) \ EFX_POPULATE_QWORD_2(_qword, \ EFX_DWORD_0, 0xffffffff, EFX_DWORD_1, 0xffffffff) /* Populate a dword field with various numbers of arguments */ #define EFX_POPULATE_DWORD_10 EFX_POPULATE_DWORD #define EFX_POPULATE_DWORD_9(_dword, \ _field1, _value1, _field2, _value2, _field3, _value3, \ _field4, _value4, _field5, _value5, _field6, _value6, \ _field7, _value7, _field8, _value8, _field9, _value9) \ EFX_POPULATE_DWORD_10(_dword, EFX_DUMMY_FIELD, 0, \ _field1, _value1, _field2, _value2, _field3, _value3, \ _field4, _value4, _field5, _value5, _field6, _value6, \ _field7, _value7, _field8, _value8, _field9, _value9) #define EFX_POPULATE_DWORD_8(_dword, \ _field1, _value1, _field2, _value2, _field3, _value3, \ _field4, _value4, _field5, _value5, _field6, _value6, \ _field7, _value7, _field8, _value8) \ EFX_POPULATE_DWORD_9(_dword, EFX_DUMMY_FIELD, 0, \ _field1, _value1, _field2, _value2, _field3, _value3, \ _field4, _value4, _field5, _value5, _field6, _value6, \ _field7, _value7, _field8, _value8) #define EFX_POPULATE_DWORD_7(_dword, \ _field1, _value1, _field2, _value2, _field3, _value3, \ _field4, _value4, _field5, _value5, _field6, _value6, \ _field7, _value7) \ EFX_POPULATE_DWORD_8(_dword, EFX_DUMMY_FIELD, 0, \ _field1, _value1, _field2, _value2, _field3, _value3, \ _field4, _value4, _field5, _value5, _field6, _value6, \ _field7, _value7) #define EFX_POPULATE_DWORD_6(_dword, \ _field1, _value1, _field2, _value2, _field3, _value3, \ _field4, _value4, _field5, _value5, _field6, _value6) \ EFX_POPULATE_DWORD_7(_dword, EFX_DUMMY_FIELD, 0, \ _field1, _value1, _field2, _value2, _field3, _value3, \ _field4, _value4, _field5, _value5, _field6, _value6) #define EFX_POPULATE_DWORD_5(_dword, \ _field1, _value1, _field2, _value2, _field3, _value3, \ _field4, _value4, _field5, _value5) \ EFX_POPULATE_DWORD_6(_dword, EFX_DUMMY_FIELD, 0, \ _field1, _value1, _field2, _value2, _field3, _value3, \ _field4, _value4, _field5, _value5) #define EFX_POPULATE_DWORD_4(_dword, \ _field1, _value1, _field2, _value2, _field3, _value3, \ _field4, _value4) \ EFX_POPULATE_DWORD_5(_dword, EFX_DUMMY_FIELD, 0, \ _field1, _value1, _field2, _value2, _field3, _value3, \ _field4, _value4) #define EFX_POPULATE_DWORD_3(_dword, \ _field1, _value1, _field2, _value2, _field3, _value3) \ EFX_POPULATE_DWORD_4(_dword, EFX_DUMMY_FIELD, 0, \ _field1, _value1, _field2, _value2, _field3, _value3) #define EFX_POPULATE_DWORD_2(_dword, \ _field1, _value1, _field2, _value2) \ EFX_POPULATE_DWORD_3(_dword, EFX_DUMMY_FIELD, 0, \ _field1, _value1, _field2, _value2) #define EFX_POPULATE_DWORD_1(_dword, \ _field1, _value1) \ EFX_POPULATE_DWORD_2(_dword, EFX_DUMMY_FIELD, 0, \ _field1, _value1) #define EFX_ZERO_DWORD(_dword) \ EFX_POPULATE_DWORD_1(_dword, EFX_DUMMY_FIELD, 0) #define EFX_SET_DWORD(_dword) \ EFX_POPULATE_DWORD_1(_dword, \ EFX_DWORD_0, 0xffffffff) /* Populate a word field with various numbers of arguments */ #define EFX_POPULATE_WORD_10 EFX_POPULATE_WORD #define EFX_POPULATE_WORD_9(_word, \ _field1, _value1, _field2, _value2, _field3, _value3, \ _field4, _value4, _field5, _value5, _field6, _value6, \ _field7, _value7, _field8, _value8, _field9, _value9) \ EFX_POPULATE_WORD_10(_word, EFX_DUMMY_FIELD, 0, \ _field1, _value1, _field2, _value2, _field3, _value3, \ _field4, _value4, _field5, _value5, _field6, _value6, \ _field7, _value7, _field8, _value8, _field9, _value9) #define EFX_POPULATE_WORD_8(_word, \ _field1, _value1, _field2, _value2, _field3, _value3, \ _field4, _value4, _field5, _value5, _field6, _value6, \ _field7, _value7, _field8, _value8) \ EFX_POPULATE_WORD_9(_word, EFX_DUMMY_FIELD, 0, \ _field1, _value1, _field2, _value2, _field3, _value3, \ _field4, _value4, _field5, _value5, _field6, _value6, \ _field7, _value7, _field8, _value8) #define EFX_POPULATE_WORD_7(_word, \ _field1, _value1, _field2, _value2, _field3, _value3, \ _field4, _value4, _field5, _value5, _field6, _value6, \ _field7, _value7) \ EFX_POPULATE_WORD_8(_word, EFX_DUMMY_FIELD, 0, \ _field1, _value1, _field2, _value2, _field3, _value3, \ _field4, _value4, _field5, _value5, _field6, _value6, \ _field7, _value7) #define EFX_POPULATE_WORD_6(_word, \ _field1, _value1, _field2, _value2, _field3, _value3, \ _field4, _value4, _field5, _value5, _field6, _value6) \ EFX_POPULATE_WORD_7(_word, EFX_DUMMY_FIELD, 0, \ _field1, _value1, _field2, _value2, _field3, _value3, \ _field4, _value4, _field5, _value5, _field6, _value6) #define EFX_POPULATE_WORD_5(_word, \ _field1, _value1, _field2, _value2, _field3, _value3, \ _field4, _value4, _field5, _value5) \ EFX_POPULATE_WORD_6(_word, EFX_DUMMY_FIELD, 0, \ _field1, _value1, _field2, _value2, _field3, _value3, \ _field4, _value4, _field5, _value5) #define EFX_POPULATE_WORD_4(_word, \ _field1, _value1, _field2, _value2, _field3, _value3, \ _field4, _value4) \ EFX_POPULATE_WORD_5(_word, EFX_DUMMY_FIELD, 0, \ _field1, _value1, _field2, _value2, _field3, _value3, \ _field4, _value4) #define EFX_POPULATE_WORD_3(_word, \ _field1, _value1, _field2, _value2, _field3, _value3) \ EFX_POPULATE_WORD_4(_word, EFX_DUMMY_FIELD, 0, \ _field1, _value1, _field2, _value2, _field3, _value3) #define EFX_POPULATE_WORD_2(_word, \ _field1, _value1, _field2, _value2) \ EFX_POPULATE_WORD_3(_word, EFX_DUMMY_FIELD, 0, \ _field1, _value1, _field2, _value2) #define EFX_POPULATE_WORD_1(_word, \ _field1, _value1) \ EFX_POPULATE_WORD_2(_word, EFX_DUMMY_FIELD, 0, \ _field1, _value1) #define EFX_ZERO_WORD(_word) \ EFX_POPULATE_WORD_1(_word, EFX_DUMMY_FIELD, 0) #define EFX_SET_WORD(_word) \ EFX_POPULATE_WORD_1(_word, \ EFX_WORD_0, 0xffff) /* Populate a byte field with various numbers of arguments */ #define EFX_POPULATE_BYTE_10 EFX_POPULATE_BYTE #define EFX_POPULATE_BYTE_9(_byte, \ _field1, _value1, _field2, _value2, _field3, _value3, \ _field4, _value4, _field5, _value5, _field6, _value6, \ _field7, _value7, _field8, _value8, _field9, _value9) \ EFX_POPULATE_BYTE_10(_byte, EFX_DUMMY_FIELD, 0, \ _field1, _value1, _field2, _value2, _field3, _value3, \ _field4, _value4, _field5, _value5, _field6, _value6, \ _field7, _value7, _field8, _value8, _field9, _value9) #define EFX_POPULATE_BYTE_8(_byte, \ _field1, _value1, _field2, _value2, _field3, _value3, \ _field4, _value4, _field5, _value5, _field6, _value6, \ _field7, _value7, _field8, _value8) \ EFX_POPULATE_BYTE_9(_byte, EFX_DUMMY_FIELD, 0, \ _field1, _value1, _field2, _value2, _field3, _value3, \ _field4, _value4, _field5, _value5, _field6, _value6, \ _field7, _value7, _field8, _value8) #define EFX_POPULATE_BYTE_7(_byte, \ _field1, _value1, _field2, _value2, _field3, _value3, \ _field4, _value4, _field5, _value5, _field6, _value6, \ _field7, _value7) \ EFX_POPULATE_BYTE_8(_byte, EFX_DUMMY_FIELD, 0, \ _field1, _value1, _field2, _value2, _field3, _value3, \ _field4, _value4, _field5, _value5, _field6, _value6, \ _field7, _value7) #define EFX_POPULATE_BYTE_6(_byte, \ _field1, _value1, _field2, _value2, _field3, _value3, \ _field4, _value4, _field5, _value5, _field6, _value6) \ EFX_POPULATE_BYTE_7(_byte, EFX_DUMMY_FIELD, 0, \ _field1, _value1, _field2, _value2, _field3, _value3, \ _field4, _value4, _field5, _value5, _field6, _value6) #define EFX_POPULATE_BYTE_5(_byte, \ _field1, _value1, _field2, _value2, _field3, _value3, \ _field4, _value4, _field5, _value5) \ EFX_POPULATE_BYTE_6(_byte, EFX_DUMMY_FIELD, 0, \ _field1, _value1, _field2, _value2, _field3, _value3, \ _field4, _value4, _field5, _value5) #define EFX_POPULATE_BYTE_4(_byte, \ _field1, _value1, _field2, _value2, _field3, _value3, \ _field4, _value4) \ EFX_POPULATE_BYTE_5(_byte, EFX_DUMMY_FIELD, 0, \ _field1, _value1, _field2, _value2, _field3, _value3, \ _field4, _value4) #define EFX_POPULATE_BYTE_3(_byte, \ _field1, _value1, _field2, _value2, _field3, _value3) \ EFX_POPULATE_BYTE_4(_byte, EFX_DUMMY_FIELD, 0, \ _field1, _value1, _field2, _value2, _field3, _value3) #define EFX_POPULATE_BYTE_2(_byte, \ _field1, _value1, _field2, _value2) \ EFX_POPULATE_BYTE_3(_byte, EFX_DUMMY_FIELD, 0, \ _field1, _value1, _field2, _value2) #define EFX_POPULATE_BYTE_1(_byte, \ _field1, _value1) \ EFX_POPULATE_BYTE_2(_byte, EFX_DUMMY_FIELD, 0, \ _field1, _value1) #define EFX_ZERO_BYTE(_byte) \ EFX_POPULATE_BYTE_1(_byte, EFX_DUMMY_FIELD, 0) #define EFX_SET_BYTE(_byte) \ EFX_POPULATE_BYTE_1(_byte, \ EFX_BYTE_0, 0xff) /* * Modify a named field within an already-populated structure. Used * for read-modify-write operations. */ #define EFX_INSERT_FIELD64(_min, _max, _field, _value) \ __CPU_TO_LE_64(EFX_INSERT_FIELD_NATIVE64(_min, _max, _field, _value)) #define EFX_INSERT_FIELD32(_min, _max, _field, _value) \ __CPU_TO_LE_32(EFX_INSERT_FIELD_NATIVE32(_min, _max, _field, _value)) #define EFX_INSERT_FIELD16(_min, _max, _field, _value) \ __CPU_TO_LE_16(EFX_INSERT_FIELD_NATIVE16(_min, _max, _field, _value)) #define EFX_INSERT_FIELD8(_min, _max, _field, _value) \ __NATIVE_8(EFX_INSERT_FIELD_NATIVE8(_min, _max, _field, _value)) #define EFX_INPLACE_MASK64(_min, _max, _field) \ EFX_INSERT_FIELD64(_min, _max, _field, EFX_MASK64(_field)) #define EFX_INPLACE_MASK32(_min, _max, _field) \ EFX_INSERT_FIELD32(_min, _max, _field, EFX_MASK32(_field)) #define EFX_INPLACE_MASK16(_min, _max, _field) \ EFX_INSERT_FIELD16(_min, _max, _field, EFX_MASK16(_field)) #define EFX_INPLACE_MASK8(_min, _max, _field) \ EFX_INSERT_FIELD8(_min, _max, _field, EFX_MASK8(_field)) #define EFX_SET_OWORD_FIELD64(_oword, _field, _value) \ do { \ _NOTE(CONSTANTCONDITION) \ (_oword).eo_u64[0] = (((_oword).eo_u64[0] & \ ~EFX_INPLACE_MASK64(0, 63, _field)) | \ EFX_INSERT_FIELD64(0, 63, _field, _value)); \ _NOTE(CONSTANTCONDITION) \ (_oword).eo_u64[1] = (((_oword).eo_u64[1] & \ ~EFX_INPLACE_MASK64(64, 127, _field)) | \ EFX_INSERT_FIELD64(64, 127, _field, _value)); \ _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) #define EFX_SET_OWORD_FIELD32(_oword, _field, _value) \ do { \ _NOTE(CONSTANTCONDITION) \ (_oword).eo_u32[0] = (((_oword).eo_u32[0] & \ ~EFX_INPLACE_MASK32(0, 31, _field)) | \ EFX_INSERT_FIELD32(0, 31, _field, _value)); \ _NOTE(CONSTANTCONDITION) \ (_oword).eo_u32[1] = (((_oword).eo_u32[1] & \ ~EFX_INPLACE_MASK32(32, 63, _field)) | \ EFX_INSERT_FIELD32(32, 63, _field, _value)); \ _NOTE(CONSTANTCONDITION) \ (_oword).eo_u32[2] = (((_oword).eo_u32[2] & \ ~EFX_INPLACE_MASK32(64, 95, _field)) | \ EFX_INSERT_FIELD32(64, 95, _field, _value)); \ _NOTE(CONSTANTCONDITION) \ (_oword).eo_u32[3] = (((_oword).eo_u32[3] & \ ~EFX_INPLACE_MASK32(96, 127, _field)) | \ EFX_INSERT_FIELD32(96, 127, _field, _value)); \ _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) #define EFX_SET_QWORD_FIELD64(_qword, _field, _value) \ do { \ _NOTE(CONSTANTCONDITION) \ (_qword).eq_u64[0] = (((_qword).eq_u64[0] & \ ~EFX_INPLACE_MASK64(0, 63, _field)) | \ EFX_INSERT_FIELD64(0, 63, _field, _value)); \ _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) #define EFX_SET_QWORD_FIELD32(_qword, _field, _value) \ do { \ _NOTE(CONSTANTCONDITION) \ (_qword).eq_u32[0] = (((_qword).eq_u32[0] & \ ~EFX_INPLACE_MASK32(0, 31, _field)) | \ EFX_INSERT_FIELD32(0, 31, _field, _value)); \ _NOTE(CONSTANTCONDITION) \ (_qword).eq_u32[1] = (((_qword).eq_u32[1] & \ ~EFX_INPLACE_MASK32(32, 63, _field)) | \ EFX_INSERT_FIELD32(32, 63, _field, _value)); \ _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) #define EFX_SET_DWORD_FIELD(_dword, _field, _value) \ do { \ _NOTE(CONSTANTCONDITION) \ (_dword).ed_u32[0] = (((_dword).ed_u32[0] & \ ~EFX_INPLACE_MASK32(0, 31, _field)) | \ EFX_INSERT_FIELD32(0, 31, _field, _value)); \ _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) #define EFX_SET_WORD_FIELD(_word, _field, _value) \ do { \ _NOTE(CONSTANTCONDITION) \ (_word).ew_u16[0] = (((_word).ew_u16[0] & \ ~EFX_INPLACE_MASK16(0, 15, _field)) | \ EFX_INSERT_FIELD16(0, 15, _field, _value)); \ _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) #define EFX_SET_BYTE_FIELD(_byte, _field, _value) \ do { \ _NOTE(CONSTANTCONDITION) \ (_byte).eb_u8[0] = (((_byte).eb_u8[0] & \ ~EFX_INPLACE_MASK8(0, 7, _field)) | \ EFX_INSERT_FIELD8(0, 7, _field, _value)); \ _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) /* * Set or clear a numbered bit within an octword. */ #define EFX_SHIFT64(_bit, _base) \ (((_bit) >= (_base) && (_bit) < (_base) + 64) ? \ ((uint64_t)1 << ((_bit) - (_base))) : \ 0U) #define EFX_SHIFT32(_bit, _base) \ (((_bit) >= (_base) && (_bit) < (_base) + 32) ? \ ((uint32_t)1 << ((_bit) - (_base))) : \ 0U) #define EFX_SHIFT16(_bit, _base) \ (((_bit) >= (_base) && (_bit) < (_base) + 16) ? \ (uint16_t)(1 << ((_bit) - (_base))) : \ 0U) #define EFX_SHIFT8(_bit, _base) \ (((_bit) >= (_base) && (_bit) < (_base) + 8) ? \ (uint8_t)(1 << ((_bit) - (_base))) : \ 0U) #define EFX_SET_OWORD_BIT64(_oword, _bit) \ do { \ _NOTE(CONSTANTCONDITION) \ (_oword).eo_u64[0] |= \ __CPU_TO_LE_64(EFX_SHIFT64(_bit, FIX_LINT(0))); \ (_oword).eo_u64[1] |= \ __CPU_TO_LE_64(EFX_SHIFT64(_bit, FIX_LINT(64))); \ _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) #define EFX_SET_OWORD_BIT32(_oword, _bit) \ do { \ _NOTE(CONSTANTCONDITION) \ (_oword).eo_u32[0] |= \ __CPU_TO_LE_32(EFX_SHIFT32(_bit, FIX_LINT(0))); \ (_oword).eo_u32[1] |= \ __CPU_TO_LE_32(EFX_SHIFT32(_bit, FIX_LINT(32))); \ (_oword).eo_u32[2] |= \ __CPU_TO_LE_32(EFX_SHIFT32(_bit, FIX_LINT(64))); \ (_oword).eo_u32[3] |= \ __CPU_TO_LE_32(EFX_SHIFT32(_bit, FIX_LINT(96))); \ _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) #define EFX_CLEAR_OWORD_BIT64(_oword, _bit) \ do { \ _NOTE(CONSTANTCONDITION) \ (_oword).eo_u64[0] &= \ __CPU_TO_LE_64(~EFX_SHIFT64(_bit, FIX_LINT(0))); \ (_oword).eo_u64[1] &= \ __CPU_TO_LE_64(~EFX_SHIFT64(_bit, FIX_LINT(64))); \ _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) #define EFX_CLEAR_OWORD_BIT32(_oword, _bit) \ do { \ _NOTE(CONSTANTCONDITION) \ (_oword).eo_u32[0] &= \ __CPU_TO_LE_32(~EFX_SHIFT32(_bit, FIX_LINT(0))); \ (_oword).eo_u32[1] &= \ __CPU_TO_LE_32(~EFX_SHIFT32(_bit, FIX_LINT(32))); \ (_oword).eo_u32[2] &= \ __CPU_TO_LE_32(~EFX_SHIFT32(_bit, FIX_LINT(64))); \ (_oword).eo_u32[3] &= \ __CPU_TO_LE_32(~EFX_SHIFT32(_bit, FIX_LINT(96))); \ _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) #define EFX_TEST_OWORD_BIT64(_oword, _bit) \ (((_oword).eo_u64[0] & \ __CPU_TO_LE_64(EFX_SHIFT64(_bit, FIX_LINT(0)))) || \ ((_oword).eo_u64[1] & \ __CPU_TO_LE_64(EFX_SHIFT64(_bit, FIX_LINT(64))))) #define EFX_TEST_OWORD_BIT32(_oword, _bit) \ (((_oword).eo_u32[0] & \ __CPU_TO_LE_32(EFX_SHIFT32(_bit, FIX_LINT(0)))) || \ ((_oword).eo_u32[1] & \ __CPU_TO_LE_32(EFX_SHIFT32(_bit, FIX_LINT(32)))) || \ ((_oword).eo_u32[2] & \ __CPU_TO_LE_32(EFX_SHIFT32(_bit, FIX_LINT(64)))) || \ ((_oword).eo_u32[3] & \ __CPU_TO_LE_32(EFX_SHIFT32(_bit, FIX_LINT(96))))) #define EFX_SET_QWORD_BIT64(_qword, _bit) \ do { \ _NOTE(CONSTANTCONDITION) \ (_qword).eq_u64[0] |= \ __CPU_TO_LE_64(EFX_SHIFT64(_bit, FIX_LINT(0))); \ _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) #define EFX_SET_QWORD_BIT32(_qword, _bit) \ do { \ _NOTE(CONSTANTCONDITION) \ (_qword).eq_u32[0] |= \ __CPU_TO_LE_32(EFX_SHIFT32(_bit, FIX_LINT(0))); \ (_qword).eq_u32[1] |= \ __CPU_TO_LE_32(EFX_SHIFT32(_bit, FIX_LINT(32))); \ _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) #define EFX_CLEAR_QWORD_BIT64(_qword, _bit) \ do { \ _NOTE(CONSTANTCONDITION) \ (_qword).eq_u64[0] &= \ __CPU_TO_LE_64(~EFX_SHIFT64(_bit, FIX_LINT(0))); \ _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) #define EFX_CLEAR_QWORD_BIT32(_qword, _bit) \ do { \ _NOTE(CONSTANTCONDITION) \ (_qword).eq_u32[0] &= \ __CPU_TO_LE_32(~EFX_SHIFT32(_bit, FIX_LINT(0))); \ (_qword).eq_u32[1] &= \ __CPU_TO_LE_32(~EFX_SHIFT32(_bit, FIX_LINT(32))); \ _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) #define EFX_TEST_QWORD_BIT64(_qword, _bit) \ (((_qword).eq_u64[0] & \ __CPU_TO_LE_64(EFX_SHIFT64(_bit, FIX_LINT(0)))) != 0) #define EFX_TEST_QWORD_BIT32(_qword, _bit) \ (((_qword).eq_u32[0] & \ __CPU_TO_LE_32(EFX_SHIFT32(_bit, FIX_LINT(0)))) || \ ((_qword).eq_u32[1] & \ __CPU_TO_LE_32(EFX_SHIFT32(_bit, FIX_LINT(32))))) #define EFX_SET_DWORD_BIT(_dword, _bit) \ do { \ (_dword).ed_u32[0] |= \ __CPU_TO_LE_32(EFX_SHIFT32(_bit, FIX_LINT(0))); \ _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) #define EFX_CLEAR_DWORD_BIT(_dword, _bit) \ do { \ (_dword).ed_u32[0] &= \ __CPU_TO_LE_32(~EFX_SHIFT32(_bit, FIX_LINT(0))); \ _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) #define EFX_TEST_DWORD_BIT(_dword, _bit) \ (((_dword).ed_u32[0] & \ __CPU_TO_LE_32(EFX_SHIFT32(_bit, FIX_LINT(0)))) != 0) #define EFX_SET_WORD_BIT(_word, _bit) \ do { \ (_word).ew_u16[0] |= \ __CPU_TO_LE_16(EFX_SHIFT16(_bit, FIX_LINT(0))); \ _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) #define EFX_CLEAR_WORD_BIT(_word, _bit) \ do { \ (_word).ew_u32[0] &= \ __CPU_TO_LE_16(~EFX_SHIFT16(_bit, FIX_LINT(0))); \ _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) #define EFX_TEST_WORD_BIT(_word, _bit) \ (((_word).ew_u16[0] & \ __CPU_TO_LE_16(EFX_SHIFT16(_bit, FIX_LINT(0)))) != 0) #define EFX_SET_BYTE_BIT(_byte, _bit) \ do { \ (_byte).eb_u8[0] |= \ __NATIVE_8(EFX_SHIFT8(_bit, FIX_LINT(0))); \ _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) #define EFX_CLEAR_BYTE_BIT(_byte, _bit) \ do { \ (_byte).eb_u8[0] &= \ __NATIVE_8(~EFX_SHIFT8(_bit, FIX_LINT(0))); \ _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) #define EFX_TEST_BYTE_BIT(_byte, _bit) \ (((_byte).eb_u8[0] & \ __NATIVE_8(EFX_SHIFT8(_bit, FIX_LINT(0)))) != 0) #define EFX_OR_OWORD64(_oword1, _oword2) \ do { \ (_oword1).eo_u64[0] |= (_oword2).eo_u64[0]; \ (_oword1).eo_u64[1] |= (_oword2).eo_u64[1]; \ _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) #define EFX_OR_OWORD32(_oword1, _oword2) \ do { \ (_oword1).eo_u32[0] |= (_oword2).eo_u32[0]; \ (_oword1).eo_u32[1] |= (_oword2).eo_u32[1]; \ (_oword1).eo_u32[2] |= (_oword2).eo_u32[2]; \ (_oword1).eo_u32[3] |= (_oword2).eo_u32[3]; \ _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) #define EFX_AND_OWORD64(_oword1, _oword2) \ do { \ (_oword1).eo_u64[0] &= (_oword2).eo_u64[0]; \ (_oword1).eo_u64[1] &= (_oword2).eo_u64[1]; \ _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) #define EFX_AND_OWORD32(_oword1, _oword2) \ do { \ (_oword1).eo_u32[0] &= (_oword2).eo_u32[0]; \ (_oword1).eo_u32[1] &= (_oword2).eo_u32[1]; \ (_oword1).eo_u32[2] &= (_oword2).eo_u32[2]; \ (_oword1).eo_u32[3] &= (_oword2).eo_u32[3]; \ _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) #define EFX_OR_QWORD64(_qword1, _qword2) \ do { \ (_qword1).eq_u64[0] |= (_qword2).eq_u64[0]; \ _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) #define EFX_OR_QWORD32(_qword1, _qword2) \ do { \ (_qword1).eq_u32[0] |= (_qword2).eq_u32[0]; \ (_qword1).eq_u32[1] |= (_qword2).eq_u32[1]; \ _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) #define EFX_AND_QWORD64(_qword1, _qword2) \ do { \ (_qword1).eq_u64[0] &= (_qword2).eq_u64[0]; \ _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) #define EFX_AND_QWORD32(_qword1, _qword2) \ do { \ (_qword1).eq_u32[0] &= (_qword2).eq_u32[0]; \ (_qword1).eq_u32[1] &= (_qword2).eq_u32[1]; \ _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) #define EFX_OR_DWORD(_dword1, _dword2) \ do { \ (_dword1).ed_u32[0] |= (_dword2).ed_u32[0]; \ _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) #define EFX_AND_DWORD(_dword1, _dword2) \ do { \ (_dword1).ed_u32[0] &= (_dword2).ed_u32[0]; \ _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) #define EFX_OR_WORD(_word1, _word2) \ do { \ (_word1).ew_u16[0] |= (_word2).ew_u16[0]; \ _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) #define EFX_AND_WORD(_word1, _word2) \ do { \ (_word1).ew_u16[0] &= (_word2).ew_u16[0]; \ _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) #define EFX_OR_BYTE(_byte1, _byte2) \ do { \ (_byte1).eb_u8[0] |= (_byte2).eb_u8[0]; \ _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) #define EFX_AND_BYTE(_byte1, _byte2) \ do { \ (_byte1).eb_u8[0] &= (_byte2).eb_u8[0]; \ _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) #if EFSYS_USE_UINT64 #define EFX_OWORD_FIELD EFX_OWORD_FIELD64 #define EFX_QWORD_FIELD EFX_QWORD_FIELD64 #define EFX_OWORD_IS_EQUAL EFX_OWORD_IS_EQUAL64 #define EFX_QWORD_IS_EQUAL EFX_QWORD_IS_EQUAL64 #define EFX_OWORD_IS_ZERO EFX_OWORD_IS_ZERO64 #define EFX_QWORD_IS_ZERO EFX_QWORD_IS_ZERO64 #define EFX_OWORD_IS_SET EFX_OWORD_IS_SET64 #define EFX_QWORD_IS_SET EFX_QWORD_IS_SET64 #define EFX_POPULATE_OWORD EFX_POPULATE_OWORD64 #define EFX_POPULATE_QWORD EFX_POPULATE_QWORD64 #define EFX_SET_OWORD_FIELD EFX_SET_OWORD_FIELD64 #define EFX_SET_QWORD_FIELD EFX_SET_QWORD_FIELD64 #define EFX_SET_OWORD_BIT EFX_SET_OWORD_BIT64 #define EFX_CLEAR_OWORD_BIT EFX_CLEAR_OWORD_BIT64 #define EFX_TEST_OWORD_BIT EFX_TEST_OWORD_BIT64 #define EFX_SET_QWORD_BIT EFX_SET_QWORD_BIT64 #define EFX_CLEAR_QWORD_BIT EFX_CLEAR_QWORD_BIT64 #define EFX_TEST_QWORD_BIT EFX_TEST_QWORD_BIT64 #define EFX_OR_OWORD EFX_OR_OWORD64 #define EFX_AND_OWORD EFX_AND_OWORD64 #define EFX_OR_QWORD EFX_OR_QWORD64 #define EFX_AND_QWORD EFX_AND_QWORD64 #else #define EFX_OWORD_FIELD EFX_OWORD_FIELD32 #define EFX_QWORD_FIELD EFX_QWORD_FIELD32 #define EFX_OWORD_IS_EQUAL EFX_OWORD_IS_EQUAL32 #define EFX_QWORD_IS_EQUAL EFX_QWORD_IS_EQUAL32 #define EFX_OWORD_IS_ZERO EFX_OWORD_IS_ZERO32 #define EFX_QWORD_IS_ZERO EFX_QWORD_IS_ZERO32 #define EFX_OWORD_IS_SET EFX_OWORD_IS_SET32 #define EFX_QWORD_IS_SET EFX_QWORD_IS_SET32 #define EFX_POPULATE_OWORD EFX_POPULATE_OWORD32 #define EFX_POPULATE_QWORD EFX_POPULATE_QWORD32 #define EFX_SET_OWORD_FIELD EFX_SET_OWORD_FIELD32 #define EFX_SET_QWORD_FIELD EFX_SET_QWORD_FIELD32 #define EFX_SET_OWORD_BIT EFX_SET_OWORD_BIT32 #define EFX_CLEAR_OWORD_BIT EFX_CLEAR_OWORD_BIT32 #define EFX_TEST_OWORD_BIT EFX_TEST_OWORD_BIT32 #define EFX_SET_QWORD_BIT EFX_SET_QWORD_BIT32 #define EFX_CLEAR_QWORD_BIT EFX_CLEAR_QWORD_BIT32 #define EFX_TEST_QWORD_BIT EFX_TEST_QWORD_BIT32 #define EFX_OR_OWORD EFX_OR_OWORD32 #define EFX_AND_OWORD EFX_AND_OWORD32 #define EFX_OR_QWORD EFX_OR_QWORD32 #define EFX_AND_QWORD EFX_AND_QWORD32 #endif #ifdef __cplusplus } #endif #endif /* _SYS_EFX_TYPES_H */ Index: user/ngie/more-tests2/sys/dev/sfxge/common/hunt_impl.h =================================================================== --- user/ngie/more-tests2/sys/dev/sfxge/common/hunt_impl.h (revision 293822) +++ user/ngie/more-tests2/sys/dev/sfxge/common/hunt_impl.h (revision 293823) @@ -1,1056 +1,1056 @@ /*- * Copyright (c) 2012-2015 Solarflare Communications 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 THE COPYRIGHT HOLDERS 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 COPYRIGHT OWNER 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. * * The views and conclusions contained in the software and documentation are * those of the authors and should not be interpreted as representing official * policies, either expressed or implied, of the FreeBSD Project. * * $FreeBSD$ */ #ifndef _SYS_HUNT_IMPL_H #define _SYS_HUNT_IMPL_H #include "efx.h" #include "efx_regs.h" #include "efx_regs_ef10.h" #include "efx_mcdi.h" #ifdef __cplusplus extern "C" { #endif /* * FIXME: This is just a power of 2 which fits in an MCDI v1 message, and could * possibly be increased, or the write size reported by newer firmware used * instead. */ #define EF10_NVRAM_CHUNK 0x80 /* Alignment requirement for value written to RX WPTR: * the WPTR must be aligned to an 8 descriptor boundary */ #define EF10_RX_WPTR_ALIGN 8 /* Invalid RSS context handle */ #define EF10_RSS_CONTEXT_INVALID (0xffffffff) /* EV */ __checkReturn efx_rc_t ef10_ev_init( __in efx_nic_t *enp); void ef10_ev_fini( __in efx_nic_t *enp); __checkReturn efx_rc_t ef10_ev_qcreate( __in efx_nic_t *enp, __in unsigned int index, __in efsys_mem_t *esmp, __in size_t n, __in uint32_t id, __in efx_evq_t *eep); void ef10_ev_qdestroy( __in efx_evq_t *eep); __checkReturn efx_rc_t ef10_ev_qprime( __in efx_evq_t *eep, __in unsigned int count); void ef10_ev_qpost( __in efx_evq_t *eep, __in uint16_t data); __checkReturn efx_rc_t ef10_ev_qmoderate( __in efx_evq_t *eep, __in unsigned int us); #if EFSYS_OPT_QSTATS void ef10_ev_qstats_update( __in efx_evq_t *eep, __inout_ecount(EV_NQSTATS) efsys_stat_t *stat); #endif /* EFSYS_OPT_QSTATS */ void ef10_ev_rxlabel_init( __in efx_evq_t *eep, __in efx_rxq_t *erp, __in unsigned int label); void ef10_ev_rxlabel_fini( __in efx_evq_t *eep, __in unsigned int label); /* INTR */ __checkReturn efx_rc_t ef10_intr_init( __in efx_nic_t *enp, __in efx_intr_type_t type, __in efsys_mem_t *esmp); void ef10_intr_enable( __in efx_nic_t *enp); void ef10_intr_disable( __in efx_nic_t *enp); void ef10_intr_disable_unlocked( __in efx_nic_t *enp); __checkReturn efx_rc_t ef10_intr_trigger( __in efx_nic_t *enp, __in unsigned int level); void ef10_intr_status_line( __in efx_nic_t *enp, __out boolean_t *fatalp, __out uint32_t *qmaskp); void ef10_intr_status_message( __in efx_nic_t *enp, __in unsigned int message, __out boolean_t *fatalp); void ef10_intr_fatal( __in efx_nic_t *enp); void ef10_intr_fini( __in efx_nic_t *enp); /* NIC */ extern __checkReturn efx_rc_t ef10_nic_probe( __in efx_nic_t *enp); extern __checkReturn efx_rc_t ef10_nic_set_drv_limits( __inout efx_nic_t *enp, __in efx_drv_limits_t *edlp); extern __checkReturn efx_rc_t ef10_nic_get_vi_pool( __in efx_nic_t *enp, __out uint32_t *vi_countp); extern __checkReturn efx_rc_t ef10_nic_get_bar_region( __in efx_nic_t *enp, __in efx_nic_region_t region, __out uint32_t *offsetp, __out size_t *sizep); extern __checkReturn efx_rc_t ef10_nic_reset( __in efx_nic_t *enp); extern __checkReturn efx_rc_t ef10_nic_init( __in efx_nic_t *enp); #if EFSYS_OPT_DIAG extern __checkReturn efx_rc_t ef10_nic_register_test( __in efx_nic_t *enp); #endif /* EFSYS_OPT_DIAG */ extern void ef10_nic_fini( __in efx_nic_t *enp); extern void ef10_nic_unprobe( __in efx_nic_t *enp); /* MAC */ extern __checkReturn efx_rc_t hunt_mac_poll( __in efx_nic_t *enp, __out efx_link_mode_t *link_modep); extern __checkReturn efx_rc_t hunt_mac_up( __in efx_nic_t *enp, __out boolean_t *mac_upp); extern __checkReturn efx_rc_t hunt_mac_addr_set( __in efx_nic_t *enp); extern __checkReturn efx_rc_t hunt_mac_reconfigure( __in efx_nic_t *enp); extern __checkReturn efx_rc_t hunt_mac_multicast_list_set( __in efx_nic_t *enp); extern __checkReturn efx_rc_t hunt_mac_filter_default_rxq_set( __in efx_nic_t *enp, __in efx_rxq_t *erp, __in boolean_t using_rss); extern void hunt_mac_filter_default_rxq_clear( __in efx_nic_t *enp); #if EFSYS_OPT_LOOPBACK extern __checkReturn efx_rc_t hunt_mac_loopback_set( __in efx_nic_t *enp, __in efx_link_mode_t link_mode, __in efx_loopback_type_t loopback_type); #endif /* EFSYS_OPT_LOOPBACK */ #if EFSYS_OPT_MAC_STATS extern __checkReturn efx_rc_t hunt_mac_stats_update( __in efx_nic_t *enp, __in efsys_mem_t *esmp, __inout_ecount(EFX_MAC_NSTATS) efsys_stat_t *stat, __inout_opt uint32_t *generationp); #endif /* EFSYS_OPT_MAC_STATS */ /* MCDI */ #if EFSYS_OPT_MCDI extern __checkReturn efx_rc_t ef10_mcdi_init( __in efx_nic_t *enp, __in const efx_mcdi_transport_t *mtp); extern void ef10_mcdi_fini( __in efx_nic_t *enp); extern void ef10_mcdi_request_copyin( __in efx_nic_t *enp, __in efx_mcdi_req_t *emrp, __in unsigned int seq, __in boolean_t ev_cpl, __in boolean_t new_epoch); extern __checkReturn boolean_t ef10_mcdi_poll_response( __in efx_nic_t *enp); extern void ef10_mcdi_read_response( - __in efx_nic_t *enp, - __out void *bufferp, - __in size_t offset, - __in size_t length); + __in efx_nic_t *enp, + __out_bcount(length) void *bufferp, + __in size_t offset, + __in size_t length); extern void ef10_mcdi_request_copyout( __in efx_nic_t *enp, __in efx_mcdi_req_t *emrp); extern efx_rc_t ef10_mcdi_poll_reboot( __in efx_nic_t *enp); extern __checkReturn efx_rc_t ef10_mcdi_feature_supported( __in efx_nic_t *enp, __in efx_mcdi_feature_id_t id, __out boolean_t *supportedp); #endif /* EFSYS_OPT_MCDI */ /* NVRAM */ #if EFSYS_OPT_NVRAM || EFSYS_OPT_VPD extern __checkReturn efx_rc_t ef10_nvram_buf_read_tlv( __in efx_nic_t *enp, __in_bcount(max_seg_size) caddr_t seg_data, __in size_t max_seg_size, __in uint32_t tag, __deref_out_bcount_opt(*sizep) caddr_t *datap, __out size_t *sizep); extern __checkReturn efx_rc_t ef10_nvram_buf_write_tlv( __inout_bcount(partn_size) caddr_t partn_data, __in size_t partn_size, __in uint32_t tag, __in_bcount(tag_size) caddr_t tag_data, __in size_t tag_size, __out size_t *total_lengthp); extern __checkReturn efx_rc_t ef10_nvram_partn_read_tlv( __in efx_nic_t *enp, __in uint32_t partn, __in uint32_t tag, __deref_out_bcount_opt(*sizep) caddr_t *datap, __out size_t *sizep); extern __checkReturn efx_rc_t ef10_nvram_partn_write_tlv( __in efx_nic_t *enp, __in uint32_t partn, __in uint32_t tag, __in_bcount(size) caddr_t data, __in size_t size); extern __checkReturn efx_rc_t ef10_nvram_partn_write_segment_tlv( __in efx_nic_t *enp, __in uint32_t partn, __in uint32_t tag, __in_bcount(size) caddr_t data, __in size_t size, __in boolean_t all_segments); extern __checkReturn efx_rc_t ef10_nvram_partn_size( __in efx_nic_t *enp, __in uint32_t partn, __out size_t *sizep); extern __checkReturn efx_rc_t ef10_nvram_partn_lock( __in efx_nic_t *enp, __in uint32_t partn); extern __checkReturn efx_rc_t ef10_nvram_partn_read( __in efx_nic_t *enp, __in uint32_t partn, __in unsigned int offset, __out_bcount(size) caddr_t data, __in size_t size); extern __checkReturn efx_rc_t ef10_nvram_partn_erase( __in efx_nic_t *enp, __in uint32_t partn, __in unsigned int offset, __in size_t size); extern __checkReturn efx_rc_t ef10_nvram_partn_write( __in efx_nic_t *enp, __in uint32_t partn, __in unsigned int offset, __out_bcount(size) caddr_t data, __in size_t size); extern void ef10_nvram_partn_unlock( __in efx_nic_t *enp, __in uint32_t partn); #endif /* EFSYS_OPT_NVRAM || EFSYS_OPT_VPD */ #if EFSYS_OPT_NVRAM #if EFSYS_OPT_DIAG extern __checkReturn efx_rc_t ef10_nvram_test( __in efx_nic_t *enp); #endif /* EFSYS_OPT_DIAG */ extern __checkReturn efx_rc_t ef10_nvram_size( __in efx_nic_t *enp, __in efx_nvram_type_t type, __out size_t *sizep); extern __checkReturn efx_rc_t ef10_nvram_get_version( __in efx_nic_t *enp, __in efx_nvram_type_t type, __out uint32_t *subtypep, __out_ecount(4) uint16_t version[4]); extern __checkReturn efx_rc_t ef10_nvram_rw_start( __in efx_nic_t *enp, __in efx_nvram_type_t type, __out size_t *pref_chunkp); extern __checkReturn efx_rc_t ef10_nvram_read_chunk( __in efx_nic_t *enp, __in efx_nvram_type_t type, __in unsigned int offset, __out_bcount(size) caddr_t data, __in size_t size); extern __checkReturn efx_rc_t ef10_nvram_erase( __in efx_nic_t *enp, __in efx_nvram_type_t type); extern __checkReturn efx_rc_t ef10_nvram_write_chunk( __in efx_nic_t *enp, __in efx_nvram_type_t type, __in unsigned int offset, __in_bcount(size) caddr_t data, __in size_t size); extern void ef10_nvram_rw_finish( __in efx_nic_t *enp, __in efx_nvram_type_t type); extern __checkReturn efx_rc_t ef10_nvram_partn_set_version( __in efx_nic_t *enp, __in uint32_t partn, __in_ecount(4) uint16_t version[4]); extern __checkReturn efx_rc_t ef10_nvram_set_version( __in efx_nic_t *enp, __in efx_nvram_type_t type, __in_ecount(4) uint16_t version[4]); extern __checkReturn efx_rc_t ef10_nvram_type_to_partn( __in efx_nic_t *enp, __in efx_nvram_type_t type, __out uint32_t *partnp); #endif /* EFSYS_OPT_NVRAM */ /* PHY */ typedef struct hunt_link_state_s { uint32_t hls_adv_cap_mask; uint32_t hls_lp_cap_mask; unsigned int hls_fcntl; efx_link_mode_t hls_link_mode; #if EFSYS_OPT_LOOPBACK efx_loopback_type_t hls_loopback; #endif boolean_t hls_mac_up; } hunt_link_state_t; extern void hunt_phy_link_ev( __in efx_nic_t *enp, __in efx_qword_t *eqp, __out efx_link_mode_t *link_modep); extern __checkReturn efx_rc_t hunt_phy_get_link( __in efx_nic_t *enp, __out hunt_link_state_t *hlsp); extern __checkReturn efx_rc_t hunt_phy_power( __in efx_nic_t *enp, __in boolean_t on); extern __checkReturn efx_rc_t hunt_phy_reconfigure( __in efx_nic_t *enp); extern __checkReturn efx_rc_t hunt_phy_verify( __in efx_nic_t *enp); extern __checkReturn efx_rc_t hunt_phy_oui_get( __in efx_nic_t *enp, __out uint32_t *ouip); #if EFSYS_OPT_PHY_STATS extern __checkReturn efx_rc_t hunt_phy_stats_update( __in efx_nic_t *enp, __in efsys_mem_t *esmp, __inout_ecount(EFX_PHY_NSTATS) uint32_t *stat); #endif /* EFSYS_OPT_PHY_STATS */ #if EFSYS_OPT_PHY_PROPS #if EFSYS_OPT_NAMES extern const char * hunt_phy_prop_name( __in efx_nic_t *enp, __in unsigned int id); #endif /* EFSYS_OPT_NAMES */ extern __checkReturn efx_rc_t hunt_phy_prop_get( __in efx_nic_t *enp, __in unsigned int id, __in uint32_t flags, __out uint32_t *valp); extern __checkReturn efx_rc_t hunt_phy_prop_set( __in efx_nic_t *enp, __in unsigned int id, __in uint32_t val); #endif /* EFSYS_OPT_PHY_PROPS */ #if EFSYS_OPT_BIST extern __checkReturn efx_rc_t hunt_bist_enable_offline( __in efx_nic_t *enp); extern __checkReturn efx_rc_t hunt_bist_start( __in efx_nic_t *enp, __in efx_bist_type_t type); extern __checkReturn efx_rc_t hunt_bist_poll( __in efx_nic_t *enp, __in efx_bist_type_t type, __out efx_bist_result_t *resultp, __out_opt __drv_when(count > 0, __notnull) uint32_t *value_maskp, __out_ecount_opt(count) __drv_when(count > 0, __notnull) unsigned long *valuesp, __in size_t count); extern void hunt_bist_stop( __in efx_nic_t *enp, __in efx_bist_type_t type); #endif /* EFSYS_OPT_BIST */ /* SRAM */ #if EFSYS_OPT_DIAG extern __checkReturn efx_rc_t ef10_sram_test( __in efx_nic_t *enp, __in efx_sram_pattern_fn_t func); #endif /* EFSYS_OPT_DIAG */ /* TX */ extern __checkReturn efx_rc_t ef10_tx_init( __in efx_nic_t *enp); extern void ef10_tx_fini( __in efx_nic_t *enp); extern __checkReturn efx_rc_t ef10_tx_qcreate( __in efx_nic_t *enp, __in unsigned int index, __in unsigned int label, __in efsys_mem_t *esmp, __in size_t n, __in uint32_t id, __in uint16_t flags, __in efx_evq_t *eep, __in efx_txq_t *etp, __out unsigned int *addedp); extern void ef10_tx_qdestroy( __in efx_txq_t *etp); extern __checkReturn efx_rc_t ef10_tx_qpost( __in efx_txq_t *etp, __in_ecount(n) efx_buffer_t *eb, __in unsigned int n, __in unsigned int completed, __inout unsigned int *addedp); extern void ef10_tx_qpush( __in efx_txq_t *etp, __in unsigned int added, __in unsigned int pushed); extern __checkReturn efx_rc_t ef10_tx_qpace( __in efx_txq_t *etp, __in unsigned int ns); extern __checkReturn efx_rc_t ef10_tx_qflush( __in efx_txq_t *etp); extern void ef10_tx_qenable( __in efx_txq_t *etp); extern __checkReturn efx_rc_t ef10_tx_qpio_enable( __in efx_txq_t *etp); extern void ef10_tx_qpio_disable( __in efx_txq_t *etp); extern __checkReturn efx_rc_t ef10_tx_qpio_write( __in efx_txq_t *etp, __in_ecount(buf_length) uint8_t *buffer, __in size_t buf_length, __in size_t pio_buf_offset); extern __checkReturn efx_rc_t ef10_tx_qpio_post( __in efx_txq_t *etp, __in size_t pkt_length, __in unsigned int completed, __inout unsigned int *addedp); extern __checkReturn efx_rc_t ef10_tx_qdesc_post( __in efx_txq_t *etp, __in_ecount(n) efx_desc_t *ed, __in unsigned int n, __in unsigned int completed, __inout unsigned int *addedp); extern void ef10_tx_qdesc_dma_create( __in efx_txq_t *etp, __in efsys_dma_addr_t addr, __in size_t size, __in boolean_t eop, __out efx_desc_t *edp); extern void hunt_tx_qdesc_tso_create( __in efx_txq_t *etp, __in uint16_t ipv4_id, __in uint32_t tcp_seq, __in uint8_t tcp_flags, __out efx_desc_t *edp); extern void ef10_tx_qdesc_vlantci_create( __in efx_txq_t *etp, __in uint16_t vlan_tci, __out efx_desc_t *edp); #if EFSYS_OPT_QSTATS extern void ef10_tx_qstats_update( __in efx_txq_t *etp, __inout_ecount(TX_NQSTATS) efsys_stat_t *stat); #endif /* EFSYS_OPT_QSTATS */ /* PIO */ /* Missing register definitions */ #ifndef ER_DZ_TX_PIOBUF_OFST #define ER_DZ_TX_PIOBUF_OFST 0x00001000 #endif #ifndef ER_DZ_TX_PIOBUF_STEP #define ER_DZ_TX_PIOBUF_STEP 8192 #endif #ifndef ER_DZ_TX_PIOBUF_ROWS #define ER_DZ_TX_PIOBUF_ROWS 2048 #endif #ifndef ER_DZ_TX_PIOBUF_SIZE #define ER_DZ_TX_PIOBUF_SIZE 2048 #endif #define HUNT_PIOBUF_NBUFS (16) #define HUNT_PIOBUF_SIZE (ER_DZ_TX_PIOBUF_SIZE) #define HUNT_MIN_PIO_ALLOC_SIZE (HUNT_PIOBUF_SIZE / 32) #define HUNT_LEGACY_PF_PRIVILEGE_MASK \ (MC_CMD_PRIVILEGE_MASK_IN_GRP_ADMIN | \ MC_CMD_PRIVILEGE_MASK_IN_GRP_LINK | \ MC_CMD_PRIVILEGE_MASK_IN_GRP_ONLOAD | \ MC_CMD_PRIVILEGE_MASK_IN_GRP_PTP | \ MC_CMD_PRIVILEGE_MASK_IN_GRP_INSECURE_FILTERS | \ MC_CMD_PRIVILEGE_MASK_IN_GRP_MAC_SPOOFING | \ MC_CMD_PRIVILEGE_MASK_IN_GRP_UNICAST | \ MC_CMD_PRIVILEGE_MASK_IN_GRP_MULTICAST | \ MC_CMD_PRIVILEGE_MASK_IN_GRP_BROADCAST | \ MC_CMD_PRIVILEGE_MASK_IN_GRP_ALL_MULTICAST | \ MC_CMD_PRIVILEGE_MASK_IN_GRP_PROMISCUOUS) #define HUNT_LEGACY_VF_PRIVILEGE_MASK 0 typedef uint32_t efx_piobuf_handle_t; #define EFX_PIOBUF_HANDLE_INVALID ((efx_piobuf_handle_t) -1) extern __checkReturn efx_rc_t ef10_nic_pio_alloc( __inout efx_nic_t *enp, __out uint32_t *bufnump, __out efx_piobuf_handle_t *handlep, __out uint32_t *blknump, __out uint32_t *offsetp, __out size_t *sizep); extern __checkReturn efx_rc_t ef10_nic_pio_free( __inout efx_nic_t *enp, __in uint32_t bufnum, __in uint32_t blknum); extern __checkReturn efx_rc_t ef10_nic_pio_link( __inout efx_nic_t *enp, __in uint32_t vi_index, __in efx_piobuf_handle_t handle); extern __checkReturn efx_rc_t ef10_nic_pio_unlink( __inout efx_nic_t *enp, __in uint32_t vi_index); /* VPD */ #if EFSYS_OPT_VPD extern __checkReturn efx_rc_t ef10_vpd_init( __in efx_nic_t *enp); extern __checkReturn efx_rc_t ef10_vpd_size( __in efx_nic_t *enp, __out size_t *sizep); extern __checkReturn efx_rc_t ef10_vpd_read( __in efx_nic_t *enp, __out_bcount(size) caddr_t data, __in size_t size); extern __checkReturn efx_rc_t ef10_vpd_verify( __in efx_nic_t *enp, __in_bcount(size) caddr_t data, __in size_t size); extern __checkReturn efx_rc_t ef10_vpd_reinit( __in efx_nic_t *enp, __in_bcount(size) caddr_t data, __in size_t size); extern __checkReturn efx_rc_t ef10_vpd_get( __in efx_nic_t *enp, __in_bcount(size) caddr_t data, __in size_t size, __inout efx_vpd_value_t *evvp); extern __checkReturn efx_rc_t ef10_vpd_set( __in efx_nic_t *enp, __in_bcount(size) caddr_t data, __in size_t size, __in efx_vpd_value_t *evvp); extern __checkReturn efx_rc_t ef10_vpd_next( __in efx_nic_t *enp, __in_bcount(size) caddr_t data, __in size_t size, __out efx_vpd_value_t *evvp, __inout unsigned int *contp); extern __checkReturn efx_rc_t ef10_vpd_write( __in efx_nic_t *enp, __in_bcount(size) caddr_t data, __in size_t size); extern void ef10_vpd_fini( __in efx_nic_t *enp); #endif /* EFSYS_OPT_VPD */ /* RX */ extern __checkReturn efx_rc_t ef10_rx_init( __in efx_nic_t *enp); #if EFSYS_OPT_RX_SCATTER extern __checkReturn efx_rc_t ef10_rx_scatter_enable( __in efx_nic_t *enp, __in unsigned int buf_size); #endif /* EFSYS_OPT_RX_SCATTER */ #if EFSYS_OPT_RX_SCALE extern __checkReturn efx_rc_t ef10_rx_scale_mode_set( __in efx_nic_t *enp, __in efx_rx_hash_alg_t alg, __in efx_rx_hash_type_t type, __in boolean_t insert); extern __checkReturn efx_rc_t ef10_rx_scale_key_set( __in efx_nic_t *enp, __in_ecount(n) uint8_t *key, __in size_t n); extern __checkReturn efx_rc_t ef10_rx_scale_tbl_set( __in efx_nic_t *enp, __in_ecount(n) unsigned int *table, __in size_t n); extern __checkReturn uint32_t ef10_rx_prefix_hash( __in efx_nic_t *enp, __in efx_rx_hash_alg_t func, __in uint8_t *buffer); extern __checkReturn efx_rc_t ef10_rx_prefix_pktlen( __in efx_nic_t *enp, __in uint8_t *buffer, __out uint16_t *lengthp); #endif /* EFSYS_OPT_RX_SCALE */ extern void ef10_rx_qpost( __in efx_rxq_t *erp, __in_ecount(n) efsys_dma_addr_t *addrp, __in size_t size, __in unsigned int n, __in unsigned int completed, __in unsigned int added); extern void ef10_rx_qpush( __in efx_rxq_t *erp, __in unsigned int added, __inout unsigned int *pushedp); extern __checkReturn efx_rc_t ef10_rx_qflush( __in efx_rxq_t *erp); extern void ef10_rx_qenable( __in efx_rxq_t *erp); extern __checkReturn efx_rc_t ef10_rx_qcreate( __in efx_nic_t *enp, __in unsigned int index, __in unsigned int label, __in efx_rxq_type_t type, __in efsys_mem_t *esmp, __in size_t n, __in uint32_t id, __in efx_evq_t *eep, __in efx_rxq_t *erp); extern void ef10_rx_qdestroy( __in efx_rxq_t *erp); extern void ef10_rx_fini( __in efx_nic_t *enp); #if EFSYS_OPT_FILTER typedef struct ef10_filter_handle_s { uint32_t efh_lo; uint32_t efh_hi; } ef10_filter_handle_t; typedef struct ef10_filter_entry_s { uintptr_t efe_spec; /* pointer to filter spec plus busy bit */ ef10_filter_handle_t efe_handle; } ef10_filter_entry_t; /* * BUSY flag indicates that an update is in progress. * AUTO_OLD flag is used to mark and sweep MAC packet filters. */ #define EFX_EF10_FILTER_FLAG_BUSY 1U #define EFX_EF10_FILTER_FLAG_AUTO_OLD 2U #define EFX_EF10_FILTER_FLAGS 3U /* * Size of the hash table used by the driver. Doesn't need to be the * same size as the hardware's table. */ #define EFX_EF10_FILTER_TBL_ROWS 8192 /* Allow for the broadcast address to be added to the multicast list */ #define EFX_EF10_FILTER_MULTICAST_FILTERS_MAX (EFX_MAC_MULTICAST_LIST_MAX + 1) typedef struct ef10_filter_table_s { ef10_filter_entry_t eft_entry[EFX_EF10_FILTER_TBL_ROWS]; efx_rxq_t * eft_default_rxq; boolean_t eft_using_rss; uint32_t eft_unicst_filter_index; boolean_t eft_unicst_filter_set; uint32_t eft_mulcst_filter_indexes[ EFX_EF10_FILTER_MULTICAST_FILTERS_MAX]; uint32_t eft_mulcst_filter_count; } ef10_filter_table_t; __checkReturn efx_rc_t ef10_filter_init( __in efx_nic_t *enp); void ef10_filter_fini( __in efx_nic_t *enp); __checkReturn efx_rc_t ef10_filter_restore( __in efx_nic_t *enp); __checkReturn efx_rc_t ef10_filter_add( __in efx_nic_t *enp, __inout efx_filter_spec_t *spec, __in boolean_t may_replace); __checkReturn efx_rc_t ef10_filter_delete( __in efx_nic_t *enp, __inout efx_filter_spec_t *spec); extern __checkReturn efx_rc_t ef10_filter_supported_filters( __in efx_nic_t *enp, __out uint32_t *list, __out size_t *length); extern __checkReturn efx_rc_t ef10_filter_reconfigure( __in efx_nic_t *enp, __in_ecount(6) uint8_t const *mac_addr, __in boolean_t all_unicst, __in boolean_t mulcst, __in boolean_t all_mulcst, __in boolean_t brdcst, __in_ecount(6*count) uint8_t const *addrs, __in int count); extern void ef10_filter_get_default_rxq( __in efx_nic_t *enp, __out efx_rxq_t **erpp, __out boolean_t *using_rss); extern void ef10_filter_default_rxq_set( __in efx_nic_t *enp, __in efx_rxq_t *erp, __in boolean_t using_rss); extern void ef10_filter_default_rxq_clear( __in efx_nic_t *enp); #endif /* EFSYS_OPT_FILTER */ extern __checkReturn efx_rc_t efx_mcdi_get_function_info( __in efx_nic_t *enp, __out uint32_t *pfp, __out_opt uint32_t *vfp); extern __checkReturn efx_rc_t efx_mcdi_privilege_mask( __in efx_nic_t *enp, __in uint32_t pf, __in uint32_t vf, __out uint32_t *maskp); #ifdef __cplusplus } #endif #endif /* _SYS_HUNT_IMPL_H */ Index: user/ngie/more-tests2/sys/dev/sfxge/common/hunt_mcdi.c =================================================================== --- user/ngie/more-tests2/sys/dev/sfxge/common/hunt_mcdi.c (revision 293822) +++ user/ngie/more-tests2/sys/dev/sfxge/common/hunt_mcdi.c (revision 293823) @@ -1,446 +1,446 @@ /*- * Copyright (c) 2012-2015 Solarflare Communications 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 THE COPYRIGHT HOLDERS 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 COPYRIGHT OWNER 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. * * The views and conclusions contained in the software and documentation are * those of the authors and should not be interpreted as representing official * policies, either expressed or implied, of the FreeBSD Project. */ #include __FBSDID("$FreeBSD$"); #include "efx.h" #include "efx_impl.h" #if EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD #if EFSYS_OPT_MCDI #ifndef WITH_MCDI_V2 #error "WITH_MCDI_V2 required for EF10 MCDIv2 commands." #endif typedef enum efx_mcdi_header_type_e { EFX_MCDI_HEADER_TYPE_V1, /* MCDIv0 (BootROM), MCDIv1 commands */ EFX_MCDI_HEADER_TYPE_V2, /* MCDIv2 commands */ } efx_mcdi_header_type_t; /* * Return the header format to use for sending an MCDI request. * * An MCDIv1 (Siena compatible) command should use MCDIv2 encapsulation if the * request input buffer or response output buffer are too large for the MCDIv1 * format. An MCDIv2 command must always be sent using MCDIv2 encapsulation. */ #define EFX_MCDI_HEADER_TYPE(_cmd, _length) \ ((((_cmd) & ~EFX_MASK32(MCDI_HEADER_CODE)) || \ ((_length) & ~EFX_MASK32(MCDI_HEADER_DATALEN))) ? \ EFX_MCDI_HEADER_TYPE_V2 : EFX_MCDI_HEADER_TYPE_V1) /* * MCDI Header NOT_EPOCH flag * ========================== * A new epoch begins at initial startup or after an MC reboot, and defines when * the MC should reject stale MCDI requests. * * The first MCDI request sent by the host should contain NOT_EPOCH=0, and all * subsequent requests (until the next MC reboot) should contain NOT_EPOCH=1. * * After rebooting the MC will fail all requests with NOT_EPOCH=1 by writing a * response with ERROR=1 and DATALEN=0 until a request is seen with NOT_EPOCH=0. */ __checkReturn efx_rc_t ef10_mcdi_init( __in efx_nic_t *enp, __in const efx_mcdi_transport_t *emtp) { efx_mcdi_iface_t *emip = &(enp->en_mcdi.em_emip); efsys_mem_t *esmp = emtp->emt_dma_mem; efx_dword_t dword; efx_rc_t rc; EFSYS_ASSERT(enp->en_family == EFX_FAMILY_HUNTINGTON || enp->en_family == EFX_FAMILY_MEDFORD); EFSYS_ASSERT(enp->en_features & EFX_FEATURE_MCDI_DMA); /* * All EF10 firmware supports MCDIv2 and MCDIv1. * Medford BootROM supports MCDIv2 and MCDIv1. * Huntington BootROM supports MCDIv1 only. */ emip->emi_max_version = 2; /* A host DMA buffer is required for EF10 MCDI */ if (esmp == NULL) { rc = EINVAL; goto fail1; } /* * Ensure that the MC doorbell is in a known state before issuing MCDI * commands. The recovery algorithm requires that the MC command buffer * must be 256 byte aligned. See bug24769. */ if ((EFSYS_MEM_ADDR(esmp) & 0xFF) != 0) { rc = EINVAL; goto fail2; } EFX_POPULATE_DWORD_1(dword, EFX_DWORD_0, 1); EFX_BAR_WRITED(enp, ER_DZ_MC_DB_HWRD_REG, &dword, B_FALSE); /* Save initial MC reboot status */ (void) ef10_mcdi_poll_reboot(enp); /* Start a new epoch (allow fresh MCDI requests to succeed) */ efx_mcdi_new_epoch(enp); return (0); fail2: EFSYS_PROBE(fail2); fail1: EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } void ef10_mcdi_fini( __in efx_nic_t *enp) { efx_mcdi_iface_t *emip = &(enp->en_mcdi.em_emip); emip->emi_new_epoch = B_FALSE; } static void ef10_mcdi_send_request( __in efx_nic_t *enp, __in void *hdrp, __in size_t hdr_len, __in void *sdup, __in size_t sdu_len) { const efx_mcdi_transport_t *emtp = enp->en_mcdi.em_emtp; efsys_mem_t *esmp = emtp->emt_dma_mem; efx_dword_t dword; unsigned int pos; EFSYS_ASSERT(enp->en_family == EFX_FAMILY_HUNTINGTON || enp->en_family == EFX_FAMILY_MEDFORD); /* Write the header */ for (pos = 0; pos < hdr_len; pos += sizeof (efx_dword_t)) { dword = *(efx_dword_t *)((uint8_t *)hdrp + pos); EFSYS_MEM_WRITED(esmp, pos, &dword); } /* Write the payload */ for (pos = 0; pos < sdu_len; pos += sizeof (efx_dword_t)) { dword = *(efx_dword_t *)((uint8_t *)sdup + pos); EFSYS_MEM_WRITED(esmp, hdr_len + pos, &dword); } /* Guarantee ordering of memory (MCDI request) and PIO (MC doorbell) */ EFSYS_DMA_SYNC_FOR_DEVICE(esmp, 0, hdr_len + sdu_len); EFSYS_PIO_WRITE_BARRIER(); /* Ring the doorbell to post the command DMA address to the MC */ EFX_POPULATE_DWORD_1(dword, EFX_DWORD_0, EFSYS_MEM_ADDR(esmp) >> 32); EFX_BAR_WRITED(enp, ER_DZ_MC_DB_LWRD_REG, &dword, B_FALSE); EFX_POPULATE_DWORD_1(dword, EFX_DWORD_0, EFSYS_MEM_ADDR(esmp) & 0xffffffff); EFX_BAR_WRITED(enp, ER_DZ_MC_DB_HWRD_REG, &dword, B_FALSE); } void ef10_mcdi_request_copyin( __in efx_nic_t *enp, __in efx_mcdi_req_t *emrp, __in unsigned int seq, __in boolean_t ev_cpl, __in boolean_t new_epoch) { #if EFSYS_OPT_MCDI_LOGGING const efx_mcdi_transport_t *emtp = enp->en_mcdi.em_emtp; #endif /* EFSYS_OPT_MCDI_LOGGING */ efx_mcdi_header_type_t hdr_type; efx_dword_t hdr[2]; size_t hdr_len; unsigned int xflags; EFSYS_ASSERT(enp->en_family == EFX_FAMILY_HUNTINGTON || enp->en_family == EFX_FAMILY_MEDFORD); xflags = 0; if (ev_cpl) xflags |= MCDI_HEADER_XFLAGS_EVREQ; hdr_type = EFX_MCDI_HEADER_TYPE(emrp->emr_cmd, MAX(emrp->emr_in_length, emrp->emr_out_length)); if (hdr_type == EFX_MCDI_HEADER_TYPE_V2) { /* Construct MCDI v2 header */ hdr_len = sizeof (hdr); EFX_POPULATE_DWORD_8(hdr[0], MCDI_HEADER_CODE, MC_CMD_V2_EXTN, MCDI_HEADER_RESYNC, 1, MCDI_HEADER_DATALEN, 0, MCDI_HEADER_SEQ, seq, MCDI_HEADER_NOT_EPOCH, new_epoch ? 0 : 1, MCDI_HEADER_ERROR, 0, MCDI_HEADER_RESPONSE, 0, MCDI_HEADER_XFLAGS, xflags); EFX_POPULATE_DWORD_2(hdr[1], MC_CMD_V2_EXTN_IN_EXTENDED_CMD, emrp->emr_cmd, MC_CMD_V2_EXTN_IN_ACTUAL_LEN, emrp->emr_in_length); } else { /* Construct MCDI v1 header */ hdr_len = sizeof (hdr[0]); EFX_POPULATE_DWORD_8(hdr[0], MCDI_HEADER_CODE, emrp->emr_cmd, MCDI_HEADER_RESYNC, 1, MCDI_HEADER_DATALEN, emrp->emr_in_length, MCDI_HEADER_SEQ, seq, MCDI_HEADER_NOT_EPOCH, new_epoch ? 0 : 1, MCDI_HEADER_ERROR, 0, MCDI_HEADER_RESPONSE, 0, MCDI_HEADER_XFLAGS, xflags); } #if EFSYS_OPT_MCDI_LOGGING if (emtp->emt_logger != NULL) { emtp->emt_logger(emtp->emt_context, EFX_LOG_MCDI_REQUEST, &hdr, hdr_len, emrp->emr_in_buf, emrp->emr_in_length); } #endif /* EFSYS_OPT_MCDI_LOGGING */ ef10_mcdi_send_request(enp, &hdr[0], hdr_len, emrp->emr_in_buf, emrp->emr_in_length); } void ef10_mcdi_request_copyout( __in efx_nic_t *enp, __in efx_mcdi_req_t *emrp) { #if EFSYS_OPT_MCDI_LOGGING const efx_mcdi_transport_t *emtp = enp->en_mcdi.em_emtp; #endif /* EFSYS_OPT_MCDI_LOGGING */ efx_dword_t hdr[2]; unsigned int hdr_len; size_t bytes; if (emrp->emr_out_buf == NULL) return; /* Read the command header to detect MCDI response format */ hdr_len = sizeof (hdr[0]); ef10_mcdi_read_response(enp, &hdr[0], 0, hdr_len); if (EFX_DWORD_FIELD(hdr[0], MCDI_HEADER_CODE) == MC_CMD_V2_EXTN) { /* * Read the actual payload length. The length given in the event * is only correct for responses with the V1 format. */ ef10_mcdi_read_response(enp, &hdr[1], hdr_len, sizeof (hdr[1])); hdr_len += sizeof (hdr[1]); emrp->emr_out_length_used = EFX_DWORD_FIELD(hdr[1], MC_CMD_V2_EXTN_IN_ACTUAL_LEN); } /* Copy payload out into caller supplied buffer */ bytes = MIN(emrp->emr_out_length_used, emrp->emr_out_length); ef10_mcdi_read_response(enp, emrp->emr_out_buf, hdr_len, bytes); #if EFSYS_OPT_MCDI_LOGGING if (emtp->emt_logger != NULL) { emtp->emt_logger(emtp->emt_context, EFX_LOG_MCDI_RESPONSE, &hdr, hdr_len, emrp->emr_out_buf, bytes); } #endif /* EFSYS_OPT_MCDI_LOGGING */ } __checkReturn boolean_t ef10_mcdi_poll_response( __in efx_nic_t *enp) { const efx_mcdi_transport_t *emtp = enp->en_mcdi.em_emtp; efsys_mem_t *esmp = emtp->emt_dma_mem; efx_dword_t hdr; EFSYS_MEM_READD(esmp, 0, &hdr); return (EFX_DWORD_FIELD(hdr, MCDI_HEADER_RESPONSE) ? B_TRUE : B_FALSE); } void ef10_mcdi_read_response( - __in efx_nic_t *enp, - __out void *bufferp, - __in size_t offset, - __in size_t length) + __in efx_nic_t *enp, + __out_bcount(length) void *bufferp, + __in size_t offset, + __in size_t length) { const efx_mcdi_transport_t *emtp = enp->en_mcdi.em_emtp; efsys_mem_t *esmp = emtp->emt_dma_mem; unsigned int pos; efx_dword_t data; for (pos = 0; pos < length; pos += sizeof (efx_dword_t)) { EFSYS_MEM_READD(esmp, offset + pos, &data); memcpy((uint8_t *)bufferp + pos, &data, MIN(sizeof (data), length - pos)); } } efx_rc_t ef10_mcdi_poll_reboot( __in efx_nic_t *enp) { efx_mcdi_iface_t *emip = &(enp->en_mcdi.em_emip); efx_dword_t dword; uint32_t old_status; uint32_t new_status; efx_rc_t rc; old_status = emip->emi_mc_reboot_status; /* Update MC reboot status word */ EFX_BAR_TBL_READD(enp, ER_DZ_BIU_MC_SFT_STATUS_REG, 0, &dword, B_FALSE); new_status = dword.ed_u32[0]; /* MC has rebooted if the value has changed */ if (new_status != old_status) { emip->emi_mc_reboot_status = new_status; /* * FIXME: Ignore detected MC REBOOT for now. * * The Siena support for checking for MC reboot from status * flags is broken - see comments in siena_mcdi_poll_reboot(). * As the generic MCDI code is shared the EF10 reboot * detection suffers similar problems. * * Do not report an error when the boot status changes until * this can be handled by common code drivers (and reworked to * support Siena too). */ if (B_FALSE) { rc = EIO; goto fail1; } } return (0); fail1: EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } __checkReturn efx_rc_t ef10_mcdi_feature_supported( __in efx_nic_t *enp, __in efx_mcdi_feature_id_t id, __out boolean_t *supportedp) { efx_nic_cfg_t *encp = &(enp->en_nic_cfg); uint32_t privilege_mask = encp->enc_privilege_mask; efx_rc_t rc; EFSYS_ASSERT(enp->en_family == EFX_FAMILY_HUNTINGTON || enp->en_family == EFX_FAMILY_MEDFORD); /* * Use privilege mask state at MCDI attach. */ switch (id) { case EFX_MCDI_FEATURE_FW_UPDATE: /* * Admin privilege must be used prior to introduction of * specific flag. */ *supportedp = EFX_MCDI_HAVE_PRIVILEGE(privilege_mask, ADMIN); break; case EFX_MCDI_FEATURE_LINK_CONTROL: /* * Admin privilege used prior to introduction of * specific flag. */ *supportedp = EFX_MCDI_HAVE_PRIVILEGE(privilege_mask, LINK) || EFX_MCDI_HAVE_PRIVILEGE(privilege_mask, ADMIN); break; case EFX_MCDI_FEATURE_MACADDR_CHANGE: /* * Admin privilege must be used prior to introduction of * mac spoofing privilege (at v4.6), which is used up to * introduction of change mac spoofing privilege (at v4.7) */ *supportedp = EFX_MCDI_HAVE_PRIVILEGE(privilege_mask, CHANGE_MAC) || EFX_MCDI_HAVE_PRIVILEGE(privilege_mask, MAC_SPOOFING) || EFX_MCDI_HAVE_PRIVILEGE(privilege_mask, ADMIN); break; case EFX_MCDI_FEATURE_MAC_SPOOFING: /* * Admin privilege must be used prior to introduction of * mac spoofing privilege (at v4.6), which is used up to * introduction of mac spoofing TX privilege (at v4.7) */ *supportedp = EFX_MCDI_HAVE_PRIVILEGE(privilege_mask, MAC_SPOOFING_TX) || EFX_MCDI_HAVE_PRIVILEGE(privilege_mask, MAC_SPOOFING) || EFX_MCDI_HAVE_PRIVILEGE(privilege_mask, ADMIN); break; default: rc = ENOTSUP; goto fail1; break; } return (0); fail1: EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } #endif /* EFSYS_OPT_MCDI */ #endif /* EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD */ Index: user/ngie/more-tests2/sys/dev/sfxge/common/hunt_nvram.c =================================================================== --- user/ngie/more-tests2/sys/dev/sfxge/common/hunt_nvram.c (revision 293822) +++ user/ngie/more-tests2/sys/dev/sfxge/common/hunt_nvram.c (revision 293823) @@ -1,1919 +1,1919 @@ /*- * Copyright (c) 2012-2015 Solarflare Communications 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 THE COPYRIGHT HOLDERS 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 COPYRIGHT OWNER 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. * * The views and conclusions contained in the software and documentation are * those of the authors and should not be interpreted as representing official * policies, either expressed or implied, of the FreeBSD Project. */ #include __FBSDID("$FreeBSD$"); #include "efx.h" #include "efx_impl.h" #if EFSYS_OPT_HUNTINGTON #if EFSYS_OPT_VPD || EFSYS_OPT_NVRAM #include "ef10_tlv_layout.h" /* Cursor for TLV partition format */ typedef struct tlv_cursor_s { uint32_t *block; /* Base of data block */ uint32_t *current; /* Cursor position */ uint32_t *end; /* End tag position */ uint32_t *limit; /* Last dword of data block */ } tlv_cursor_t; static __checkReturn efx_rc_t tlv_validate_state( __in tlv_cursor_t *cursor); /* * Operations on TLV formatted partition data. */ static uint32_t tlv_tag( __in tlv_cursor_t *cursor) { uint32_t dword, tag; dword = cursor->current[0]; tag = __LE_TO_CPU_32(dword); return (tag); } static size_t tlv_length( __in tlv_cursor_t *cursor) { uint32_t dword, length; if (tlv_tag(cursor) == TLV_TAG_END) return (0); dword = cursor->current[1]; length = __LE_TO_CPU_32(dword); return ((size_t)length); } static uint8_t * tlv_value( __in tlv_cursor_t *cursor) { if (tlv_tag(cursor) == TLV_TAG_END) return (NULL); return ((uint8_t *)(&cursor->current[2])); } static uint8_t * tlv_item( __in tlv_cursor_t *cursor) { if (tlv_tag(cursor) == TLV_TAG_END) return (NULL); return ((uint8_t *)cursor->current); } /* * TLV item DWORD length is tag + length + value (rounded up to DWORD) * equivalent to tlv_n_words_for_len in mc-comms tlv.c */ #define TLV_DWORD_COUNT(length) \ (1 + 1 + (((length) + sizeof (uint32_t) - 1) / sizeof (uint32_t))) static uint32_t * tlv_next_item_ptr( __in tlv_cursor_t *cursor) { uint32_t length; length = tlv_length(cursor); return (cursor->current + TLV_DWORD_COUNT(length)); } static efx_rc_t tlv_advance( __in tlv_cursor_t *cursor) { efx_rc_t rc; if ((rc = tlv_validate_state(cursor)) != 0) goto fail1; if (cursor->current == cursor->end) { /* No more tags after END tag */ cursor->current = NULL; rc = ENOENT; goto fail2; } /* Advance to next item and validate */ cursor->current = tlv_next_item_ptr(cursor); if ((rc = tlv_validate_state(cursor)) != 0) goto fail3; return (0); fail3: EFSYS_PROBE(fail3); fail2: EFSYS_PROBE(fail2); fail1: EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } static efx_rc_t tlv_rewind( __in tlv_cursor_t *cursor) { efx_rc_t rc; cursor->current = cursor->block; if ((rc = tlv_validate_state(cursor)) != 0) goto fail1; return (0); fail1: EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } static efx_rc_t tlv_find( __in tlv_cursor_t *cursor, __in uint32_t tag) { efx_rc_t rc; rc = tlv_rewind(cursor); while (rc == 0) { if (tlv_tag(cursor) == tag) break; rc = tlv_advance(cursor); } return (rc); } static __checkReturn efx_rc_t tlv_validate_state( __in tlv_cursor_t *cursor) { efx_rc_t rc; /* Check cursor position */ if (cursor->current < cursor->block) { rc = EINVAL; goto fail1; } if (cursor->current > cursor->limit) { rc = EINVAL; goto fail2; } if (tlv_tag(cursor) != TLV_TAG_END) { /* Check current item has space for tag and length */ if (cursor->current > (cursor->limit - 2)) { cursor->current = NULL; rc = EFAULT; goto fail3; } /* Check we have value data for current item and another tag */ if (tlv_next_item_ptr(cursor) > (cursor->limit - 1)) { cursor->current = NULL; rc = EFAULT; goto fail4; } } return (0); fail4: EFSYS_PROBE(fail4); fail3: EFSYS_PROBE(fail3); fail2: EFSYS_PROBE(fail2); fail1: EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } static efx_rc_t tlv_init_cursor( - __in tlv_cursor_t *cursor, + __out tlv_cursor_t *cursor, __in uint32_t *block, __in uint32_t *limit) { cursor->block = block; cursor->limit = limit; cursor->current = cursor->block; cursor->end = NULL; return (tlv_validate_state(cursor)); } static efx_rc_t tlv_init_cursor_from_size( - __in tlv_cursor_t *cursor, + __out tlv_cursor_t *cursor, __in uint8_t *block, __in size_t size) { uint32_t *limit; limit = (uint32_t *)(block + size - sizeof (uint32_t)); return (tlv_init_cursor(cursor, (uint32_t *)block, limit)); } static efx_rc_t tlv_require_end( __in tlv_cursor_t *cursor) { uint32_t *pos; efx_rc_t rc; if (cursor->end == NULL) { pos = cursor->current; if ((rc = tlv_find(cursor, TLV_TAG_END)) != 0) goto fail1; cursor->end = cursor->current; cursor->current = pos; } return (0); fail1: EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } static size_t tlv_block_length_used( __in tlv_cursor_t *cursor) { efx_rc_t rc; if ((rc = tlv_validate_state(cursor)) != 0) goto fail1; if ((rc = tlv_require_end(cursor)) != 0) goto fail2; /* Return space used (including the END tag) */ return (cursor->end + 1 - cursor->block) * sizeof (uint32_t); fail2: EFSYS_PROBE(fail2); fail1: EFSYS_PROBE1(fail1, efx_rc_t, rc); return (0); } static __checkReturn uint32_t * tlv_write( __in tlv_cursor_t *cursor, __in uint32_t tag, __in_bcount(size) uint8_t *data, __in size_t size) { uint32_t len = size; uint32_t *ptr; ptr = cursor->current; *ptr++ = __CPU_TO_LE_32(tag); *ptr++ = __CPU_TO_LE_32(len); if (len > 0) { ptr[(len - 1) / sizeof (uint32_t)] = 0; memcpy(ptr, data, len); ptr += P2ROUNDUP(len, sizeof (uint32_t)) / sizeof (*ptr); } return (ptr); } static __checkReturn efx_rc_t tlv_insert( __in tlv_cursor_t *cursor, __in uint32_t tag, __in uint8_t *data, __in size_t size) { unsigned int delta; efx_rc_t rc; if ((rc = tlv_validate_state(cursor)) != 0) goto fail1; if ((rc = tlv_require_end(cursor)) != 0) goto fail2; if (tag == TLV_TAG_END) { rc = EINVAL; goto fail3; } delta = TLV_DWORD_COUNT(size); if (cursor->end + 1 + delta > cursor->limit) { rc = ENOSPC; goto fail4; } /* Move data up: new space at cursor->current */ memmove(cursor->current + delta, cursor->current, (cursor->end + 1 - cursor->current) * sizeof (uint32_t)); /* Adjust the end pointer */ cursor->end += delta; /* Write new TLV item */ tlv_write(cursor, tag, data, size); return (0); fail4: EFSYS_PROBE(fail4); fail3: EFSYS_PROBE(fail3); fail2: EFSYS_PROBE(fail2); fail1: EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } static __checkReturn efx_rc_t tlv_modify( __in tlv_cursor_t *cursor, __in uint32_t tag, __in uint8_t *data, __in size_t size) { uint32_t *pos; unsigned int old_ndwords; unsigned int new_ndwords; unsigned int delta; efx_rc_t rc; if ((rc = tlv_validate_state(cursor)) != 0) goto fail1; if (tlv_tag(cursor) == TLV_TAG_END) { rc = EINVAL; goto fail2; } if (tlv_tag(cursor) != tag) { rc = EINVAL; goto fail3; } old_ndwords = TLV_DWORD_COUNT(tlv_length(cursor)); new_ndwords = TLV_DWORD_COUNT(size); if ((rc = tlv_require_end(cursor)) != 0) goto fail4; if (new_ndwords > old_ndwords) { /* Expand space used for TLV item */ delta = new_ndwords - old_ndwords; pos = cursor->current + old_ndwords; if (cursor->end + 1 + delta > cursor->limit) { rc = ENOSPC; goto fail5; } /* Move up: new space at (cursor->current + old_ndwords) */ memmove(pos + delta, pos, (cursor->end + 1 - pos) * sizeof (uint32_t)); /* Adjust the end pointer */ cursor->end += delta; } else if (new_ndwords < old_ndwords) { /* Shrink space used for TLV item */ delta = old_ndwords - new_ndwords; pos = cursor->current + new_ndwords; /* Move down: remove words at (cursor->current + new_ndwords) */ memmove(pos, pos + delta, (cursor->end + 1 - pos) * sizeof (uint32_t)); /* Zero the new space at the end of the TLV chain */ memset(cursor->end + 1 - delta, 0, delta * sizeof (uint32_t)); /* Adjust the end pointer */ cursor->end -= delta; } /* Write new data */ tlv_write(cursor, tag, data, size); return (0); fail5: EFSYS_PROBE(fail5); fail4: EFSYS_PROBE(fail4); fail3: EFSYS_PROBE(fail3); fail2: EFSYS_PROBE(fail2); fail1: EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } /* Validate TLV formatted partition contents (before writing to flash) */ __checkReturn efx_rc_t efx_nvram_tlv_validate( __in efx_nic_t *enp, __in uint32_t partn, __in_bcount(partn_size) caddr_t partn_data, __in size_t partn_size) { tlv_cursor_t cursor; struct tlv_partition_header *header; struct tlv_partition_trailer *trailer; size_t total_length; uint32_t cksum; int pos; efx_rc_t rc; EFX_STATIC_ASSERT(sizeof (*header) <= EF10_NVRAM_CHUNK); if ((partn_data == NULL) || (partn_size == 0)) { rc = EINVAL; goto fail1; } /* The partition header must be the first item (at offset zero) */ if ((rc = tlv_init_cursor_from_size(&cursor, (uint8_t *)partn_data, partn_size)) != 0) { rc = EFAULT; goto fail2; } if (tlv_tag(&cursor) != TLV_TAG_PARTITION_HEADER) { rc = EINVAL; goto fail3; } header = (struct tlv_partition_header *)tlv_item(&cursor); /* Check TLV partition length (includes the END tag) */ total_length = __LE_TO_CPU_32(header->total_length); if (total_length > partn_size) { rc = EFBIG; goto fail4; } /* Check partition ends with PARTITION_TRAILER and END tags */ if ((rc = tlv_find(&cursor, TLV_TAG_PARTITION_TRAILER)) != 0) { rc = EINVAL; goto fail5; } trailer = (struct tlv_partition_trailer *)tlv_item(&cursor); if ((rc = tlv_advance(&cursor)) != 0) { rc = EINVAL; goto fail6; } if (tlv_tag(&cursor) != TLV_TAG_END) { rc = EINVAL; goto fail7; } /* Check generation counts are consistent */ if (trailer->generation != header->generation) { rc = EINVAL; goto fail8; } /* Verify partition checksum */ cksum = 0; for (pos = 0; (size_t)pos < total_length; pos += sizeof (uint32_t)) { cksum += *((uint32_t *)(partn_data + pos)); } if (cksum != 0) { rc = EINVAL; goto fail9; } return (0); fail9: EFSYS_PROBE(fail9); fail8: EFSYS_PROBE(fail8); fail7: EFSYS_PROBE(fail7); fail6: EFSYS_PROBE(fail6); fail5: EFSYS_PROBE(fail5); fail4: EFSYS_PROBE(fail4); fail3: EFSYS_PROBE(fail3); fail2: EFSYS_PROBE(fail2); fail1: EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } /* * Read and validate a segment from a partition. A segment is a complete * tlv chain between PARTITION_HEADER and PARTITION_END tags. There may * be multiple segments in a partition, so seg_offset allows segments * beyond the first to be read. */ static __checkReturn efx_rc_t ef10_nvram_read_tlv_segment( __in efx_nic_t *enp, __in uint32_t partn, __in size_t seg_offset, __in_bcount(max_seg_size) caddr_t seg_data, __in size_t max_seg_size) { tlv_cursor_t cursor; struct tlv_partition_header *header; struct tlv_partition_trailer *trailer; size_t total_length; uint32_t cksum; int pos; efx_rc_t rc; EFX_STATIC_ASSERT(sizeof (*header) <= EF10_NVRAM_CHUNK); if ((seg_data == NULL) || (max_seg_size == 0)) { rc = EINVAL; goto fail1; } /* Read initial chunk of the segment, starting at offset */ if ((rc = ef10_nvram_partn_read(enp, partn, seg_offset, seg_data, EF10_NVRAM_CHUNK)) != 0) { goto fail2; } /* A PARTITION_HEADER tag must be the first item at the given offset */ if ((rc = tlv_init_cursor_from_size(&cursor, (uint8_t *)seg_data, max_seg_size)) != 0) { rc = EFAULT; goto fail3; } if (tlv_tag(&cursor) != TLV_TAG_PARTITION_HEADER) { rc = EINVAL; goto fail4; } header = (struct tlv_partition_header *)tlv_item(&cursor); /* Check TLV segment length (includes the END tag) */ total_length = __LE_TO_CPU_32(header->total_length); if (total_length > max_seg_size) { rc = EFBIG; goto fail5; } /* Read the remaining segment content */ if (total_length > EF10_NVRAM_CHUNK) { if ((rc = ef10_nvram_partn_read(enp, partn, seg_offset + EF10_NVRAM_CHUNK, seg_data + EF10_NVRAM_CHUNK, total_length - EF10_NVRAM_CHUNK)) != 0) goto fail6; } /* Check segment ends with PARTITION_TRAILER and END tags */ if ((rc = tlv_find(&cursor, TLV_TAG_PARTITION_TRAILER)) != 0) { rc = EINVAL; goto fail7; } trailer = (struct tlv_partition_trailer *)tlv_item(&cursor); if ((rc = tlv_advance(&cursor)) != 0) { rc = EINVAL; goto fail8; } if (tlv_tag(&cursor) != TLV_TAG_END) { rc = EINVAL; goto fail9; } /* Check data read from segment is consistent */ if (trailer->generation != header->generation) { /* * The partition data may have been modified between successive * MCDI NVRAM_READ requests by the MC or another PCI function. * * The caller must retry to obtain consistent partition data. */ rc = EAGAIN; goto fail10; } /* Verify segment checksum */ cksum = 0; for (pos = 0; (size_t)pos < total_length; pos += sizeof (uint32_t)) { cksum += *((uint32_t *)(seg_data + pos)); } if (cksum != 0) { rc = EINVAL; goto fail11; } return (0); fail11: EFSYS_PROBE(fail11); fail10: EFSYS_PROBE(fail10); fail9: EFSYS_PROBE(fail9); fail8: EFSYS_PROBE(fail8); fail7: EFSYS_PROBE(fail7); fail6: EFSYS_PROBE(fail6); fail5: EFSYS_PROBE(fail5); fail4: EFSYS_PROBE(fail4); fail3: EFSYS_PROBE(fail3); fail2: EFSYS_PROBE(fail2); fail1: EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } /* * Read a single TLV item from a host memory * buffer containing a TLV formatted segment. */ __checkReturn efx_rc_t ef10_nvram_buf_read_tlv( __in efx_nic_t *enp, __in_bcount(max_seg_size) caddr_t seg_data, __in size_t max_seg_size, __in uint32_t tag, __deref_out_bcount_opt(*sizep) caddr_t *datap, __out size_t *sizep) { tlv_cursor_t cursor; caddr_t data; size_t length; caddr_t value; efx_rc_t rc; if ((seg_data == NULL) || (max_seg_size == 0)) { rc = EINVAL; goto fail1; } /* Find requested TLV tag in segment data */ if ((rc = tlv_init_cursor_from_size(&cursor, (uint8_t *)seg_data, max_seg_size)) != 0) { rc = EFAULT; goto fail2; } if ((rc = tlv_find(&cursor, tag)) != 0) { rc = ENOENT; goto fail3; } value = (caddr_t)tlv_value(&cursor); length = tlv_length(&cursor); if (length == 0) data = NULL; else { /* Copy out data from TLV item */ EFSYS_KMEM_ALLOC(enp->en_esip, length, data); if (data == NULL) { rc = ENOMEM; goto fail4; } memcpy(data, value, length); } *datap = data; *sizep = length; return (0); fail4: EFSYS_PROBE(fail4); fail3: EFSYS_PROBE(fail3); fail2: EFSYS_PROBE(fail2); fail1: EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } /* Read a single TLV item from the first segment in a TLV formatted partition */ __checkReturn efx_rc_t ef10_nvram_partn_read_tlv( __in efx_nic_t *enp, __in uint32_t partn, __in uint32_t tag, __deref_out_bcount_opt(*seg_sizep) caddr_t *seg_datap, __out size_t *seg_sizep) { caddr_t seg_data = NULL; size_t partn_size = 0; size_t length; caddr_t data; int retry; efx_rc_t rc; /* Allocate sufficient memory for the entire partition */ if ((rc = ef10_nvram_partn_size(enp, partn, &partn_size)) != 0) goto fail1; if (partn_size == 0) { rc = ENOENT; goto fail2; } EFSYS_KMEM_ALLOC(enp->en_esip, partn_size, seg_data); if (seg_data == NULL) { rc = ENOMEM; goto fail3; } /* * Read the first segment in a TLV partition. Retry until consistent * segment contents are returned. Inconsistent data may be read if: * a) the segment contents are invalid * b) the MC has rebooted while we were reading the partition * c) the partition has been modified while we were reading it * Limit retry attempts to ensure forward progress. */ retry = 10; do { rc = ef10_nvram_read_tlv_segment(enp, partn, 0, seg_data, partn_size); } while ((rc == EAGAIN) && (--retry > 0)); if (rc != 0) { /* Failed to obtain consistent segment data */ goto fail4; } if ((rc = ef10_nvram_buf_read_tlv(enp, seg_data, partn_size, tag, &data, &length)) != 0) goto fail5; EFSYS_KMEM_FREE(enp->en_esip, partn_size, seg_data); *seg_datap = data; *seg_sizep = length; return (0); fail5: EFSYS_PROBE(fail5); fail4: EFSYS_PROBE(fail4); EFSYS_KMEM_FREE(enp->en_esip, partn_size, seg_data); fail3: EFSYS_PROBE(fail3); fail2: EFSYS_PROBE(fail2); fail1: EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } /* Compute the size of a segment. */ static __checkReturn efx_rc_t ef10_nvram_buf_segment_size( __in caddr_t seg_data, __in size_t max_seg_size, __out size_t *seg_sizep) { efx_rc_t rc; tlv_cursor_t cursor; struct tlv_partition_header *header; uint32_t cksum; int pos; uint32_t *end_tag_position; uint32_t segment_length; /* A PARTITION_HEADER tag must be the first item at the given offset */ if ((rc = tlv_init_cursor_from_size(&cursor, (uint8_t *)seg_data, max_seg_size)) != 0) { rc = EFAULT; goto fail1; } if (tlv_tag(&cursor) != TLV_TAG_PARTITION_HEADER) { rc = EINVAL; goto fail2; } header = (struct tlv_partition_header *)tlv_item(&cursor); /* Check TLV segment length (includes the END tag) */ *seg_sizep = __LE_TO_CPU_32(header->total_length); if (*seg_sizep > max_seg_size) { rc = EFBIG; goto fail3; } /* Check segment ends with PARTITION_TRAILER and END tags */ if ((rc = tlv_find(&cursor, TLV_TAG_PARTITION_TRAILER)) != 0) { rc = EINVAL; goto fail4; } if ((rc = tlv_advance(&cursor)) != 0) { rc = EINVAL; goto fail5; } if (tlv_tag(&cursor) != TLV_TAG_END) { rc = EINVAL; goto fail6; } end_tag_position = cursor.current; /* Verify segment checksum */ cksum = 0; for (pos = 0; (size_t)pos < *seg_sizep; pos += sizeof (uint32_t)) { cksum += *((uint32_t *)(seg_data + pos)); } if (cksum != 0) { rc = EINVAL; goto fail7; } /* * Calculate total length from HEADER to END tags and compare to * max_seg_size and the total_length field in the HEADER tag. */ segment_length = tlv_block_length_used(&cursor); if (segment_length > max_seg_size) { rc = EINVAL; goto fail8; } if (segment_length != *seg_sizep) { rc = EINVAL; goto fail9; } /* Skip over the first HEADER tag. */ rc = tlv_rewind(&cursor); rc = tlv_advance(&cursor); while (rc == 0) { if (tlv_tag(&cursor) == TLV_TAG_END) { /* Check that the END tag is the one found earlier. */ if (cursor.current != end_tag_position) goto fail10; break; } /* Check for duplicate HEADER tags before the END tag. */ if (tlv_tag(&cursor) == TLV_TAG_PARTITION_HEADER) { rc = EINVAL; goto fail11; } rc = tlv_advance(&cursor); } if (rc != 0) goto fail12; return (0); fail12: EFSYS_PROBE(fail12); fail11: EFSYS_PROBE(fail11); fail10: EFSYS_PROBE(fail10); fail9: EFSYS_PROBE(fail9); fail8: EFSYS_PROBE(fail8); fail7: EFSYS_PROBE(fail7); fail6: EFSYS_PROBE(fail6); fail5: EFSYS_PROBE(fail5); fail4: EFSYS_PROBE(fail4); fail3: EFSYS_PROBE(fail3); fail2: EFSYS_PROBE(fail2); fail1: EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } /* * Add or update a single TLV item in a host memory buffer containing a TLV * formatted segment. Historically partitions consisted of only one segment. */ __checkReturn efx_rc_t ef10_nvram_buf_write_tlv( __inout_bcount(max_seg_size) caddr_t seg_data, __in size_t max_seg_size, __in uint32_t tag, __in_bcount(tag_size) caddr_t tag_data, __in size_t tag_size, __out size_t *total_lengthp) { tlv_cursor_t cursor; struct tlv_partition_header *header; struct tlv_partition_trailer *trailer; uint32_t generation; uint32_t cksum; int pos; efx_rc_t rc; /* A PARTITION_HEADER tag must be the first item (at offset zero) */ if ((rc = tlv_init_cursor_from_size(&cursor, (uint8_t *)seg_data, max_seg_size)) != 0) { rc = EFAULT; goto fail1; } if (tlv_tag(&cursor) != TLV_TAG_PARTITION_HEADER) { rc = EINVAL; goto fail2; } header = (struct tlv_partition_header *)tlv_item(&cursor); /* Update the TLV chain to contain the new data */ if ((rc = tlv_find(&cursor, tag)) == 0) { /* Modify existing TLV item */ if ((rc = tlv_modify(&cursor, tag, (uint8_t *)tag_data, tag_size)) != 0) goto fail3; } else { /* Insert a new TLV item before the PARTITION_TRAILER */ rc = tlv_find(&cursor, TLV_TAG_PARTITION_TRAILER); if (rc != 0) { rc = EINVAL; goto fail4; } if ((rc = tlv_insert(&cursor, tag, (uint8_t *)tag_data, tag_size)) != 0) { rc = EINVAL; goto fail5; } } /* Find the trailer tag */ if ((rc = tlv_find(&cursor, TLV_TAG_PARTITION_TRAILER)) != 0) { rc = EINVAL; goto fail6; } trailer = (struct tlv_partition_trailer *)tlv_item(&cursor); /* Update PARTITION_HEADER and PARTITION_TRAILER fields */ *total_lengthp = tlv_block_length_used(&cursor); if (*total_lengthp > max_seg_size) { rc = ENOSPC; goto fail7; } generation = __LE_TO_CPU_32(header->generation) + 1; header->total_length = __CPU_TO_LE_32(*total_lengthp); header->generation = __CPU_TO_LE_32(generation); trailer->generation = __CPU_TO_LE_32(generation); /* Recompute PARTITION_TRAILER checksum */ trailer->checksum = 0; cksum = 0; for (pos = 0; (size_t)pos < *total_lengthp; pos += sizeof (uint32_t)) { cksum += *((uint32_t *)(seg_data + pos)); } trailer->checksum = ~cksum + 1; return (0); fail7: EFSYS_PROBE(fail7); fail6: EFSYS_PROBE(fail6); fail5: EFSYS_PROBE(fail5); fail4: EFSYS_PROBE(fail4); fail3: EFSYS_PROBE(fail3); fail2: EFSYS_PROBE(fail2); fail1: EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } /* * Add or update a single TLV item in the first segment of a TLV formatted * dynamic config partition. The first segment is the current active * configuration. */ __checkReturn efx_rc_t ef10_nvram_partn_write_tlv( __in efx_nic_t *enp, __in uint32_t partn, __in uint32_t tag, __in_bcount(size) caddr_t data, __in size_t size) { return ef10_nvram_partn_write_segment_tlv(enp, partn, tag, data, size, B_FALSE); } /* * Read a segment from nvram at the given offset into a buffer (segment_data) * and optionally write a new tag to it. */ static __checkReturn efx_rc_t ef10_nvram_segment_write_tlv( __in efx_nic_t *enp, __in uint32_t partn, __in uint32_t tag, __in_bcount(size) caddr_t data, __in size_t size, __inout caddr_t *seg_datap, __inout size_t *partn_offsetp, __inout size_t *src_remain_lenp, __inout size_t *dest_remain_lenp, __in boolean_t write) { efx_rc_t rc; - int status; + efx_rc_t status; size_t original_segment_size; size_t modified_segment_size; /* * Read the segment from NVRAM into the segment_data buffer and validate * it, returning if it does not validate. This is not a failure unless * this is the first segment in a partition. In this case the caller * must propogate the error. */ status = ef10_nvram_read_tlv_segment(enp, partn, *partn_offsetp, *seg_datap, *src_remain_lenp); if (status != 0) return (EINVAL); status = ef10_nvram_buf_segment_size(*seg_datap, *src_remain_lenp, &original_segment_size); if (status != 0) return (EINVAL); if (write) { /* Update the contents of the segment in the buffer */ if ((rc = ef10_nvram_buf_write_tlv(*seg_datap, *dest_remain_lenp, tag, data, size, &modified_segment_size)) != 0) goto fail1; *dest_remain_lenp -= modified_segment_size; *seg_datap += modified_segment_size; } else { /* * We won't modify this segment, but still need to update the * remaining lengths and pointers. */ *dest_remain_lenp -= original_segment_size; *seg_datap += original_segment_size; } *partn_offsetp += original_segment_size; *src_remain_lenp -= original_segment_size; return (0); fail1: EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } /* * Add or update a single TLV item in either the first segment or in all * segments in a TLV formatted dynamic config partition. Dynamic config * partitions on boards that support RFID are divided into a number of segments, * each formatted like a partition, with header, trailer and end tags. The first * segment is the current active configuration. * * The segments are initialised by manftest and each contain a different * configuration e.g. firmware variant. The firmware can be instructed * via RFID to copy a segment to replace the first segment, hence changing the * active configuration. This allows ops to change the configuration of a board * prior to shipment using RFID. * * Changes to the dynamic config may need to be written to all segments (e.g. * firmware versions) or just the first segment (changes to the active * configuration). See SF-111324-SW "The use of RFID in Solarflare Products". * If only the first segment is written the code still needs to be aware of the * possible presence of subsequent segments as writing to a segment may cause * its size to increase, which would overwrite the subsequent segments and * invalidate them. */ __checkReturn efx_rc_t ef10_nvram_partn_write_segment_tlv( __in efx_nic_t *enp, __in uint32_t partn, __in uint32_t tag, __in_bcount(size) caddr_t data, __in size_t size, __in boolean_t all_segments) { size_t partn_size = 0; caddr_t partn_data; size_t total_length = 0; efx_rc_t rc; size_t current_offset = 0; size_t remaining_original_length; size_t remaining_modified_length; caddr_t segment_data; EFSYS_ASSERT3U(partn, ==, NVRAM_PARTITION_TYPE_DYNAMIC_CONFIG); /* Allocate sufficient memory for the entire partition */ if ((rc = ef10_nvram_partn_size(enp, partn, &partn_size)) != 0) goto fail1; EFSYS_KMEM_ALLOC(enp->en_esip, partn_size, partn_data); if (partn_data == NULL) { rc = ENOMEM; goto fail2; } remaining_original_length = partn_size; remaining_modified_length = partn_size; segment_data = partn_data; /* Lock the partition */ if ((rc = ef10_nvram_partn_lock(enp, partn)) != 0) goto fail3; /* Iterate over each (potential) segment to update it. */ do { boolean_t write = all_segments || current_offset == 0; rc = ef10_nvram_segment_write_tlv(enp, partn, tag, data, size, &segment_data, ¤t_offset, &remaining_original_length, &remaining_modified_length, write); if (rc != 0) { if (current_offset == 0) { /* * If no data has been read then the first * segment is invalid, which is an error. */ goto fail4; } break; } } while (current_offset < partn_size); total_length = segment_data - partn_data; /* * We've run out of space. This should actually be dealt with by * ef10_nvram_buf_write_tlv returning ENOSPC. */ if (total_length > partn_size) { rc = ENOSPC; goto fail5; } /* Erase the whole partition in NVRAM */ if ((rc = ef10_nvram_partn_erase(enp, partn, 0, partn_size)) != 0) goto fail6; /* Write new partition contents from the buffer to NVRAM */ if ((rc = ef10_nvram_partn_write(enp, partn, 0, partn_data, total_length)) != 0) goto fail7; /* Unlock the partition */ ef10_nvram_partn_unlock(enp, partn); EFSYS_KMEM_FREE(enp->en_esip, partn_size, partn_data); return (0); fail7: EFSYS_PROBE(fail7); fail6: EFSYS_PROBE(fail6); fail5: EFSYS_PROBE(fail5); fail4: EFSYS_PROBE(fail4); ef10_nvram_partn_unlock(enp, partn); fail3: EFSYS_PROBE(fail3); EFSYS_KMEM_FREE(enp->en_esip, partn_size, partn_data); fail2: EFSYS_PROBE(fail2); fail1: EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } /* * Get the size of a NVRAM partition. This is the total size allocated in nvram, * not the data used by the segments in the partition. */ __checkReturn efx_rc_t ef10_nvram_partn_size( __in efx_nic_t *enp, __in uint32_t partn, __out size_t *sizep) { efx_rc_t rc; if ((rc = efx_mcdi_nvram_info(enp, partn, sizep, NULL, NULL, NULL)) != 0) goto fail1; return (0); fail1: EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } __checkReturn efx_rc_t ef10_nvram_partn_lock( __in efx_nic_t *enp, __in uint32_t partn) { efx_rc_t rc; if ((rc = efx_mcdi_nvram_update_start(enp, partn)) != 0) goto fail1; return (0); fail1: EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } __checkReturn efx_rc_t ef10_nvram_partn_read( __in efx_nic_t *enp, __in uint32_t partn, __in unsigned int offset, __out_bcount(size) caddr_t data, __in size_t size) { size_t chunk; efx_rc_t rc; while (size > 0) { chunk = MIN(size, EF10_NVRAM_CHUNK); if ((rc = efx_mcdi_nvram_read(enp, partn, offset, data, chunk)) != 0) { goto fail1; } size -= chunk; data += chunk; offset += chunk; } return (0); fail1: EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } __checkReturn efx_rc_t ef10_nvram_partn_erase( __in efx_nic_t *enp, __in uint32_t partn, __in unsigned int offset, __in size_t size) { efx_rc_t rc; uint32_t erase_size; if ((rc = efx_mcdi_nvram_info(enp, partn, NULL, NULL, &erase_size, NULL)) != 0) goto fail1; if (erase_size == 0) { if ((rc = efx_mcdi_nvram_erase(enp, partn, offset, size)) != 0) goto fail2; } else { if (size % erase_size != 0) { rc = EINVAL; goto fail3; } while (size > 0) { if ((rc = efx_mcdi_nvram_erase(enp, partn, offset, erase_size)) != 0) goto fail4; offset += erase_size; size -= erase_size; } } return (0); fail4: EFSYS_PROBE(fail4); fail3: EFSYS_PROBE(fail3); fail2: EFSYS_PROBE(fail2); fail1: EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } __checkReturn efx_rc_t ef10_nvram_partn_write( __in efx_nic_t *enp, __in uint32_t partn, __in unsigned int offset, __out_bcount(size) caddr_t data, __in size_t size) { size_t chunk; uint32_t write_size; efx_rc_t rc; if ((rc = efx_mcdi_nvram_info(enp, partn, NULL, NULL, NULL, &write_size)) != 0) goto fail1; if (write_size != 0) { /* * Check that the size is a multiple of the write chunk size if * the write chunk size is available. */ if (size % write_size != 0) { rc = EINVAL; goto fail2; } } else { write_size = EF10_NVRAM_CHUNK; } while (size > 0) { chunk = MIN(size, write_size); if ((rc = efx_mcdi_nvram_write(enp, partn, offset, data, chunk)) != 0) { goto fail3; } size -= chunk; data += chunk; offset += chunk; } return (0); fail3: EFSYS_PROBE(fail3); fail2: EFSYS_PROBE(fail2); fail1: EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } void ef10_nvram_partn_unlock( __in efx_nic_t *enp, __in uint32_t partn) { boolean_t reboot; efx_rc_t rc; reboot = B_FALSE; if ((rc = efx_mcdi_nvram_update_finish(enp, partn, reboot)) != 0) goto fail1; return; fail1: EFSYS_PROBE1(fail1, efx_rc_t, rc); } __checkReturn efx_rc_t ef10_nvram_partn_set_version( __in efx_nic_t *enp, __in uint32_t partn, __in_ecount(4) uint16_t version[4]) { struct tlv_partition_version partn_version; size_t size; efx_rc_t rc; /* Add or modify partition version TLV item */ partn_version.version_w = __CPU_TO_LE_16(version[0]); partn_version.version_x = __CPU_TO_LE_16(version[1]); partn_version.version_y = __CPU_TO_LE_16(version[2]); partn_version.version_z = __CPU_TO_LE_16(version[3]); size = sizeof (partn_version) - (2 * sizeof (uint32_t)); /* Write the version number to all segments in the partition */ if ((rc = ef10_nvram_partn_write_segment_tlv(enp, NVRAM_PARTITION_TYPE_DYNAMIC_CONFIG, TLV_TAG_PARTITION_VERSION(partn), (caddr_t)&partn_version.version_w, size, B_TRUE)) != 0) goto fail1; return (0); fail1: EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } #endif /* EFSYS_OPT_VPD || EFSYS_OPT_NVRAM */ #if EFSYS_OPT_NVRAM typedef struct ef10_parttbl_entry_s { unsigned int partn; unsigned int port; efx_nvram_type_t nvtype; } ef10_parttbl_entry_t; /* Translate EFX NVRAM types to firmware partition types */ static ef10_parttbl_entry_t hunt_parttbl[] = { {NVRAM_PARTITION_TYPE_MC_FIRMWARE, 1, EFX_NVRAM_MC_FIRMWARE}, {NVRAM_PARTITION_TYPE_MC_FIRMWARE, 2, EFX_NVRAM_MC_FIRMWARE}, {NVRAM_PARTITION_TYPE_MC_FIRMWARE, 3, EFX_NVRAM_MC_FIRMWARE}, {NVRAM_PARTITION_TYPE_MC_FIRMWARE, 4, EFX_NVRAM_MC_FIRMWARE}, {NVRAM_PARTITION_TYPE_MC_FIRMWARE_BACKUP, 1, EFX_NVRAM_MC_GOLDEN}, {NVRAM_PARTITION_TYPE_MC_FIRMWARE_BACKUP, 2, EFX_NVRAM_MC_GOLDEN}, {NVRAM_PARTITION_TYPE_MC_FIRMWARE_BACKUP, 3, EFX_NVRAM_MC_GOLDEN}, {NVRAM_PARTITION_TYPE_MC_FIRMWARE_BACKUP, 4, EFX_NVRAM_MC_GOLDEN}, {NVRAM_PARTITION_TYPE_EXPANSION_ROM, 1, EFX_NVRAM_BOOTROM}, {NVRAM_PARTITION_TYPE_EXPANSION_ROM, 2, EFX_NVRAM_BOOTROM}, {NVRAM_PARTITION_TYPE_EXPANSION_ROM, 3, EFX_NVRAM_BOOTROM}, {NVRAM_PARTITION_TYPE_EXPANSION_ROM, 4, EFX_NVRAM_BOOTROM}, {NVRAM_PARTITION_TYPE_EXPROM_CONFIG_PORT0, 1, EFX_NVRAM_BOOTROM_CFG}, {NVRAM_PARTITION_TYPE_EXPROM_CONFIG_PORT1, 2, EFX_NVRAM_BOOTROM_CFG}, {NVRAM_PARTITION_TYPE_EXPROM_CONFIG_PORT2, 3, EFX_NVRAM_BOOTROM_CFG}, {NVRAM_PARTITION_TYPE_EXPROM_CONFIG_PORT3, 4, EFX_NVRAM_BOOTROM_CFG}, {NVRAM_PARTITION_TYPE_DYNAMIC_CONFIG, 1, EFX_NVRAM_DYNAMIC_CFG}, {NVRAM_PARTITION_TYPE_DYNAMIC_CONFIG, 2, EFX_NVRAM_DYNAMIC_CFG}, {NVRAM_PARTITION_TYPE_DYNAMIC_CONFIG, 3, EFX_NVRAM_DYNAMIC_CFG}, {NVRAM_PARTITION_TYPE_DYNAMIC_CONFIG, 4, EFX_NVRAM_DYNAMIC_CFG}, {NVRAM_PARTITION_TYPE_FPGA, 1, EFX_NVRAM_FPGA}, {NVRAM_PARTITION_TYPE_FPGA, 2, EFX_NVRAM_FPGA}, {NVRAM_PARTITION_TYPE_FPGA, 3, EFX_NVRAM_FPGA}, {NVRAM_PARTITION_TYPE_FPGA, 4, EFX_NVRAM_FPGA}, {NVRAM_PARTITION_TYPE_FPGA_BACKUP, 1, EFX_NVRAM_FPGA_BACKUP}, {NVRAM_PARTITION_TYPE_FPGA_BACKUP, 2, EFX_NVRAM_FPGA_BACKUP}, {NVRAM_PARTITION_TYPE_FPGA_BACKUP, 3, EFX_NVRAM_FPGA_BACKUP}, {NVRAM_PARTITION_TYPE_FPGA_BACKUP, 4, EFX_NVRAM_FPGA_BACKUP} }; static ef10_parttbl_entry_t medford_parttbl[] = { {NVRAM_PARTITION_TYPE_MC_FIRMWARE, 1, EFX_NVRAM_MC_FIRMWARE}, {NVRAM_PARTITION_TYPE_MC_FIRMWARE, 2, EFX_NVRAM_MC_FIRMWARE}, {NVRAM_PARTITION_TYPE_MC_FIRMWARE, 3, EFX_NVRAM_MC_FIRMWARE}, {NVRAM_PARTITION_TYPE_MC_FIRMWARE, 4, EFX_NVRAM_MC_FIRMWARE}, {NVRAM_PARTITION_TYPE_MC_FIRMWARE_BACKUP, 1, EFX_NVRAM_MC_GOLDEN}, {NVRAM_PARTITION_TYPE_MC_FIRMWARE_BACKUP, 2, EFX_NVRAM_MC_GOLDEN}, {NVRAM_PARTITION_TYPE_MC_FIRMWARE_BACKUP, 3, EFX_NVRAM_MC_GOLDEN}, {NVRAM_PARTITION_TYPE_MC_FIRMWARE_BACKUP, 4, EFX_NVRAM_MC_GOLDEN}, {NVRAM_PARTITION_TYPE_EXPANSION_ROM, 1, EFX_NVRAM_BOOTROM}, {NVRAM_PARTITION_TYPE_EXPANSION_ROM, 2, EFX_NVRAM_BOOTROM}, {NVRAM_PARTITION_TYPE_EXPANSION_ROM, 3, EFX_NVRAM_BOOTROM}, {NVRAM_PARTITION_TYPE_EXPANSION_ROM, 4, EFX_NVRAM_BOOTROM}, {NVRAM_PARTITION_TYPE_EXPROM_CONFIG_PORT0, 1, EFX_NVRAM_BOOTROM_CFG}, {NVRAM_PARTITION_TYPE_EXPROM_CONFIG_PORT0, 2, EFX_NVRAM_BOOTROM_CFG}, {NVRAM_PARTITION_TYPE_EXPROM_CONFIG_PORT0, 3, EFX_NVRAM_BOOTROM_CFG}, {NVRAM_PARTITION_TYPE_EXPROM_CONFIG_PORT0, 4, EFX_NVRAM_BOOTROM_CFG}, {NVRAM_PARTITION_TYPE_DYNAMIC_CONFIG, 1, EFX_NVRAM_DYNAMIC_CFG}, {NVRAM_PARTITION_TYPE_DYNAMIC_CONFIG, 2, EFX_NVRAM_DYNAMIC_CFG}, {NVRAM_PARTITION_TYPE_DYNAMIC_CONFIG, 3, EFX_NVRAM_DYNAMIC_CFG}, {NVRAM_PARTITION_TYPE_DYNAMIC_CONFIG, 4, EFX_NVRAM_DYNAMIC_CFG}, {NVRAM_PARTITION_TYPE_FPGA, 1, EFX_NVRAM_FPGA}, {NVRAM_PARTITION_TYPE_FPGA, 2, EFX_NVRAM_FPGA}, {NVRAM_PARTITION_TYPE_FPGA, 3, EFX_NVRAM_FPGA}, {NVRAM_PARTITION_TYPE_FPGA, 4, EFX_NVRAM_FPGA}, {NVRAM_PARTITION_TYPE_FPGA_BACKUP, 1, EFX_NVRAM_FPGA_BACKUP}, {NVRAM_PARTITION_TYPE_FPGA_BACKUP, 2, EFX_NVRAM_FPGA_BACKUP}, {NVRAM_PARTITION_TYPE_FPGA_BACKUP, 3, EFX_NVRAM_FPGA_BACKUP}, {NVRAM_PARTITION_TYPE_FPGA_BACKUP, 4, EFX_NVRAM_FPGA_BACKUP} }; static __checkReturn efx_rc_t ef10_parttbl_get( __in efx_nic_t *enp, __out ef10_parttbl_entry_t **parttblp, __out size_t *parttbl_rowsp) { switch (enp->en_family) { case EFX_FAMILY_HUNTINGTON: *parttblp = hunt_parttbl; *parttbl_rowsp = EFX_ARRAY_SIZE(hunt_parttbl); break; case EFX_FAMILY_MEDFORD: *parttblp = medford_parttbl; *parttbl_rowsp = EFX_ARRAY_SIZE(medford_parttbl); break; default: EFSYS_ASSERT(B_FALSE); return (EINVAL); } return (0); } __checkReturn efx_rc_t ef10_nvram_type_to_partn( __in efx_nic_t *enp, __in efx_nvram_type_t type, __out uint32_t *partnp) { efx_mcdi_iface_t *emip = &(enp->en_mcdi.em_emip); ef10_parttbl_entry_t *parttbl = NULL; size_t parttbl_rows = 0; unsigned int i; EFSYS_ASSERT3U(type, <, EFX_NVRAM_NTYPES); EFSYS_ASSERT(partnp != NULL); if (ef10_parttbl_get(enp, &parttbl, &parttbl_rows) == 0) { for (i = 0; i < parttbl_rows; i++) { ef10_parttbl_entry_t *entry = &parttbl[i]; if (entry->nvtype == type && entry->port == emip->emi_port) { *partnp = entry->partn; return (0); } } } return (ENOTSUP); } static __checkReturn efx_rc_t ef10_nvram_partn_to_type( __in efx_nic_t *enp, __in uint32_t partn, __out efx_nvram_type_t *typep) { efx_mcdi_iface_t *emip = &(enp->en_mcdi.em_emip); ef10_parttbl_entry_t *parttbl = NULL; size_t parttbl_rows = 0; unsigned int i; EFSYS_ASSERT(typep != NULL); if (ef10_parttbl_get(enp, &parttbl, &parttbl_rows) == 0) { for (i = 0; i < parttbl_rows; i++) { ef10_parttbl_entry_t *entry = &parttbl[i]; if (entry->partn == partn && entry->port == emip->emi_port) { *typep = entry->nvtype; return (0); } } } return (ENOTSUP); } #if EFSYS_OPT_DIAG __checkReturn efx_rc_t ef10_nvram_test( __in efx_nic_t *enp) { efx_nvram_type_t type; unsigned int npartns = 0; uint32_t *partns = NULL; size_t size; unsigned int i; efx_rc_t rc; /* Read available partitions from NVRAM partition map */ size = MC_CMD_NVRAM_PARTITIONS_OUT_TYPE_ID_MAXNUM * sizeof (uint32_t); EFSYS_KMEM_ALLOC(enp->en_esip, size, partns); if (partns == NULL) { rc = ENOMEM; goto fail1; } if ((rc = efx_mcdi_nvram_partitions(enp, (caddr_t)partns, size, &npartns)) != 0) { goto fail2; } for (i = 0; i < npartns; i++) { /* Check if the partition is supported for this port */ if ((rc = ef10_nvram_partn_to_type(enp, partns[i], &type)) != 0) continue; if ((rc = efx_mcdi_nvram_test(enp, partns[i])) != 0) goto fail3; } EFSYS_KMEM_FREE(enp->en_esip, size, partns); return (0); fail3: EFSYS_PROBE(fail3); fail2: EFSYS_PROBE(fail2); EFSYS_KMEM_FREE(enp->en_esip, size, partns); fail1: EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } #endif /* EFSYS_OPT_DIAG */ __checkReturn efx_rc_t ef10_nvram_size( __in efx_nic_t *enp, __in efx_nvram_type_t type, __out size_t *sizep) { uint32_t partn; efx_rc_t rc; if ((rc = ef10_nvram_type_to_partn(enp, type, &partn)) != 0) goto fail1; if ((rc = ef10_nvram_partn_size(enp, partn, sizep)) != 0) goto fail2; return (0); fail2: EFSYS_PROBE(fail2); fail1: EFSYS_PROBE1(fail1, efx_rc_t, rc); *sizep = 0; return (rc); } __checkReturn efx_rc_t ef10_nvram_get_version( __in efx_nic_t *enp, __in efx_nvram_type_t type, __out uint32_t *subtypep, __out_ecount(4) uint16_t version[4]) { uint32_t partn; efx_rc_t rc; if ((rc = ef10_nvram_type_to_partn(enp, type, &partn)) != 0) goto fail1; /* FIXME: get highest partn version from all ports */ /* FIXME: return partn description if available */ if ((rc = efx_mcdi_nvram_metadata(enp, partn, subtypep, version, NULL, 0)) != 0) goto fail2; return (0); fail2: EFSYS_PROBE(fail2); fail1: EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } __checkReturn efx_rc_t ef10_nvram_rw_start( __in efx_nic_t *enp, __in efx_nvram_type_t type, __out size_t *chunk_sizep) { uint32_t partn; efx_rc_t rc; if ((rc = ef10_nvram_type_to_partn(enp, type, &partn)) != 0) goto fail1; if ((rc = ef10_nvram_partn_lock(enp, partn)) != 0) goto fail2; if (chunk_sizep != NULL) *chunk_sizep = EF10_NVRAM_CHUNK; return (0); fail2: EFSYS_PROBE(fail2); fail1: EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } __checkReturn efx_rc_t ef10_nvram_read_chunk( __in efx_nic_t *enp, __in efx_nvram_type_t type, __in unsigned int offset, __out_bcount(size) caddr_t data, __in size_t size) { uint32_t partn; efx_rc_t rc; if ((rc = ef10_nvram_type_to_partn(enp, type, &partn)) != 0) goto fail1; if ((rc = ef10_nvram_partn_read(enp, partn, offset, data, size)) != 0) goto fail2; return (0); fail2: EFSYS_PROBE(fail2); fail1: EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } __checkReturn efx_rc_t ef10_nvram_erase( __in efx_nic_t *enp, __in efx_nvram_type_t type) { uint32_t partn; size_t size; efx_rc_t rc; if ((rc = ef10_nvram_type_to_partn(enp, type, &partn)) != 0) goto fail1; if ((rc = ef10_nvram_partn_size(enp, partn, &size)) != 0) goto fail2; if ((rc = ef10_nvram_partn_erase(enp, partn, 0, size)) != 0) goto fail3; return (0); fail3: EFSYS_PROBE(fail3); fail2: EFSYS_PROBE(fail2); fail1: EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } __checkReturn efx_rc_t ef10_nvram_write_chunk( __in efx_nic_t *enp, __in efx_nvram_type_t type, __in unsigned int offset, __in_bcount(size) caddr_t data, __in size_t size) { uint32_t partn; efx_rc_t rc; if ((rc = ef10_nvram_type_to_partn(enp, type, &partn)) != 0) goto fail1; if ((rc = ef10_nvram_partn_write(enp, partn, offset, data, size)) != 0) goto fail2; return (0); fail2: EFSYS_PROBE(fail2); fail1: EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } void ef10_nvram_rw_finish( __in efx_nic_t *enp, __in efx_nvram_type_t type) { uint32_t partn; efx_rc_t rc; if ((rc = ef10_nvram_type_to_partn(enp, type, &partn)) == 0) ef10_nvram_partn_unlock(enp, partn); } __checkReturn efx_rc_t ef10_nvram_set_version( __in efx_nic_t *enp, __in efx_nvram_type_t type, __in_ecount(4) uint16_t version[4]) { uint32_t partn; efx_rc_t rc; if ((rc = ef10_nvram_type_to_partn(enp, type, &partn)) != 0) goto fail1; if ((rc = ef10_nvram_partn_set_version(enp, partn, version)) != 0) goto fail2; return (0); fail2: EFSYS_PROBE(fail2); fail1: EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } #endif /* EFSYS_OPT_NVRAM */ #endif /* EFSYS_OPT_HUNTINGTON */ Index: user/ngie/more-tests2/sys/dev/sfxge/common/siena_impl.h =================================================================== --- user/ngie/more-tests2/sys/dev/sfxge/common/siena_impl.h (revision 293822) +++ user/ngie/more-tests2/sys/dev/sfxge/common/siena_impl.h (revision 293823) @@ -1,493 +1,493 @@ /*- * Copyright (c) 2009-2015 Solarflare Communications 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 THE COPYRIGHT HOLDERS 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 COPYRIGHT OWNER 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. * * The views and conclusions contained in the software and documentation are * those of the authors and should not be interpreted as representing official * policies, either expressed or implied, of the FreeBSD Project. * * $FreeBSD$ */ #ifndef _SYS_SIENA_IMPL_H #define _SYS_SIENA_IMPL_H #include "efx.h" #include "efx_regs.h" #include "efx_mcdi.h" #include "siena_flash.h" #ifdef __cplusplus extern "C" { #endif #if EFSYS_OPT_PHY_PROPS /* START MKCONFIG GENERATED SienaPhyHeaderPropsBlock a8db1f8eb5106efd */ typedef enum siena_phy_prop_e { SIENA_PHY_NPROPS } siena_phy_prop_t; /* END MKCONFIG GENERATED SienaPhyHeaderPropsBlock */ #endif /* EFSYS_OPT_PHY_PROPS */ #define SIENA_NVRAM_CHUNK 0x80 extern __checkReturn efx_rc_t siena_nic_probe( __in efx_nic_t *enp); #if EFSYS_OPT_PCIE_TUNE extern __checkReturn efx_rc_t siena_nic_pcie_extended_sync( __in efx_nic_t *enp); #endif extern __checkReturn efx_rc_t siena_nic_reset( __in efx_nic_t *enp); extern __checkReturn efx_rc_t siena_nic_init( __in efx_nic_t *enp); #if EFSYS_OPT_DIAG extern __checkReturn efx_rc_t siena_nic_register_test( __in efx_nic_t *enp); #endif /* EFSYS_OPT_DIAG */ extern void siena_nic_fini( __in efx_nic_t *enp); extern void siena_nic_unprobe( __in efx_nic_t *enp); #define SIENA_SRAM_ROWS 0x12000 extern void siena_sram_init( __in efx_nic_t *enp); #if EFSYS_OPT_DIAG extern __checkReturn efx_rc_t siena_sram_test( __in efx_nic_t *enp, __in efx_sram_pattern_fn_t func); #endif /* EFSYS_OPT_DIAG */ #if EFSYS_OPT_MCDI extern __checkReturn efx_rc_t siena_mcdi_init( __in efx_nic_t *enp, __in const efx_mcdi_transport_t *mtp); extern void siena_mcdi_request_copyin( __in efx_nic_t *enp, __in efx_mcdi_req_t *emrp, __in unsigned int seq, __in boolean_t ev_cpl, __in boolean_t new_epoch); extern __checkReturn boolean_t siena_mcdi_poll_response( __in efx_nic_t *enp); extern void siena_mcdi_read_response( - __in efx_nic_t *enp, - __out void *bufferp, - __in size_t offset, - __in size_t length); + __in efx_nic_t *enp, + __out_bcount(length) void *bufferp, + __in size_t offset, + __in size_t length); extern void siena_mcdi_request_copyout( __in efx_nic_t *enp, __in efx_mcdi_req_t *emrp); extern efx_rc_t siena_mcdi_poll_reboot( __in efx_nic_t *enp); extern void siena_mcdi_fini( __in efx_nic_t *enp); extern __checkReturn efx_rc_t siena_mcdi_feature_supported( __in efx_nic_t *enp, __in efx_mcdi_feature_id_t id, __out boolean_t *supportedp); #endif /* EFSYS_OPT_MCDI */ #if EFSYS_OPT_NVRAM || EFSYS_OPT_VPD extern __checkReturn efx_rc_t siena_nvram_partn_size( __in efx_nic_t *enp, __in uint32_t partn, __out size_t *sizep); extern __checkReturn efx_rc_t siena_nvram_partn_lock( __in efx_nic_t *enp, __in uint32_t partn); extern __checkReturn efx_rc_t siena_nvram_partn_read( __in efx_nic_t *enp, __in uint32_t partn, __in unsigned int offset, __out_bcount(size) caddr_t data, __in size_t size); extern __checkReturn efx_rc_t siena_nvram_partn_erase( __in efx_nic_t *enp, __in uint32_t partn, __in unsigned int offset, __in size_t size); extern __checkReturn efx_rc_t siena_nvram_partn_write( __in efx_nic_t *enp, __in uint32_t partn, __in unsigned int offset, __out_bcount(size) caddr_t data, __in size_t size); extern void siena_nvram_partn_unlock( __in efx_nic_t *enp, __in uint32_t partn); extern __checkReturn efx_rc_t siena_nvram_get_dynamic_cfg( __in efx_nic_t *enp, __in uint32_t partn, __in boolean_t vpd, __out siena_mc_dynamic_config_hdr_t **dcfgp, __out size_t *sizep); #endif /* EFSYS_OPT_VPD || EFSYS_OPT_NVRAM */ #if EFSYS_OPT_NVRAM #if EFSYS_OPT_DIAG extern __checkReturn efx_rc_t siena_nvram_test( __in efx_nic_t *enp); #endif /* EFSYS_OPT_DIAG */ extern __checkReturn efx_rc_t siena_nvram_size( __in efx_nic_t *enp, __in efx_nvram_type_t type, __out size_t *sizep); extern __checkReturn efx_rc_t siena_nvram_get_subtype( __in efx_nic_t *enp, __in uint32_t partn, __out uint32_t *subtypep); extern __checkReturn efx_rc_t siena_nvram_get_version( __in efx_nic_t *enp, __in efx_nvram_type_t type, __out uint32_t *subtypep, __out_ecount(4) uint16_t version[4]); extern __checkReturn efx_rc_t siena_nvram_rw_start( __in efx_nic_t *enp, __in efx_nvram_type_t type, __out size_t *pref_chunkp); extern __checkReturn efx_rc_t siena_nvram_read_chunk( __in efx_nic_t *enp, __in efx_nvram_type_t type, __in unsigned int offset, __out_bcount(size) caddr_t data, __in size_t size); extern __checkReturn efx_rc_t siena_nvram_erase( __in efx_nic_t *enp, __in efx_nvram_type_t type); extern __checkReturn efx_rc_t siena_nvram_write_chunk( __in efx_nic_t *enp, __in efx_nvram_type_t type, __in unsigned int offset, __in_bcount(size) caddr_t data, __in size_t size); extern void siena_nvram_rw_finish( __in efx_nic_t *enp, __in efx_nvram_type_t type); extern __checkReturn efx_rc_t siena_nvram_set_version( __in efx_nic_t *enp, __in efx_nvram_type_t type, __in_ecount(4) uint16_t version[4]); extern __checkReturn efx_rc_t siena_nvram_type_to_partn( __in efx_nic_t *enp, __in efx_nvram_type_t type, __out uint32_t *partnp); #endif /* EFSYS_OPT_NVRAM */ #if EFSYS_OPT_VPD extern __checkReturn efx_rc_t siena_vpd_init( __in efx_nic_t *enp); extern __checkReturn efx_rc_t siena_vpd_size( __in efx_nic_t *enp, __out size_t *sizep); extern __checkReturn efx_rc_t siena_vpd_read( __in efx_nic_t *enp, __out_bcount(size) caddr_t data, __in size_t size); extern __checkReturn efx_rc_t siena_vpd_verify( __in efx_nic_t *enp, __in_bcount(size) caddr_t data, __in size_t size); extern __checkReturn efx_rc_t siena_vpd_reinit( __in efx_nic_t *enp, __in_bcount(size) caddr_t data, __in size_t size); extern __checkReturn efx_rc_t siena_vpd_get( __in efx_nic_t *enp, __in_bcount(size) caddr_t data, __in size_t size, __inout efx_vpd_value_t *evvp); extern __checkReturn efx_rc_t siena_vpd_set( __in efx_nic_t *enp, __in_bcount(size) caddr_t data, __in size_t size, __in efx_vpd_value_t *evvp); extern __checkReturn efx_rc_t siena_vpd_next( __in efx_nic_t *enp, __in_bcount(size) caddr_t data, __in size_t size, __out efx_vpd_value_t *evvp, __inout unsigned int *contp); extern __checkReturn efx_rc_t siena_vpd_write( __in efx_nic_t *enp, __in_bcount(size) caddr_t data, __in size_t size); extern void siena_vpd_fini( __in efx_nic_t *enp); #endif /* EFSYS_OPT_VPD */ typedef struct siena_link_state_s { uint32_t sls_adv_cap_mask; uint32_t sls_lp_cap_mask; unsigned int sls_fcntl; efx_link_mode_t sls_link_mode; #if EFSYS_OPT_LOOPBACK efx_loopback_type_t sls_loopback; #endif boolean_t sls_mac_up; } siena_link_state_t; extern void siena_phy_link_ev( __in efx_nic_t *enp, __in efx_qword_t *eqp, __out efx_link_mode_t *link_modep); extern __checkReturn efx_rc_t siena_phy_get_link( __in efx_nic_t *enp, __out siena_link_state_t *slsp); extern __checkReturn efx_rc_t siena_phy_power( __in efx_nic_t *enp, __in boolean_t on); extern __checkReturn efx_rc_t siena_phy_reconfigure( __in efx_nic_t *enp); extern __checkReturn efx_rc_t siena_phy_verify( __in efx_nic_t *enp); extern __checkReturn efx_rc_t siena_phy_oui_get( __in efx_nic_t *enp, __out uint32_t *ouip); #if EFSYS_OPT_PHY_STATS extern void siena_phy_decode_stats( __in efx_nic_t *enp, __in uint32_t vmask, __in_opt efsys_mem_t *esmp, __out_opt uint64_t *smaskp, __inout_ecount_opt(EFX_PHY_NSTATS) uint32_t *stat); extern __checkReturn efx_rc_t siena_phy_stats_update( __in efx_nic_t *enp, __in efsys_mem_t *esmp, __inout_ecount(EFX_PHY_NSTATS) uint32_t *stat); #endif /* EFSYS_OPT_PHY_STATS */ #if EFSYS_OPT_PHY_PROPS #if EFSYS_OPT_NAMES extern const char * siena_phy_prop_name( __in efx_nic_t *enp, __in unsigned int id); #endif /* EFSYS_OPT_NAMES */ extern __checkReturn efx_rc_t siena_phy_prop_get( __in efx_nic_t *enp, __in unsigned int id, __in uint32_t flags, __out uint32_t *valp); extern __checkReturn efx_rc_t siena_phy_prop_set( __in efx_nic_t *enp, __in unsigned int id, __in uint32_t val); #endif /* EFSYS_OPT_PHY_PROPS */ #if EFSYS_OPT_BIST extern __checkReturn efx_rc_t siena_phy_bist_start( __in efx_nic_t *enp, __in efx_bist_type_t type); extern __checkReturn efx_rc_t siena_phy_bist_poll( __in efx_nic_t *enp, __in efx_bist_type_t type, __out efx_bist_result_t *resultp, __out_opt __drv_when(count > 0, __notnull) uint32_t *value_maskp, __out_ecount_opt(count) __drv_when(count > 0, __notnull) unsigned long *valuesp, __in size_t count); extern void siena_phy_bist_stop( __in efx_nic_t *enp, __in efx_bist_type_t type); #endif /* EFSYS_OPT_BIST */ extern __checkReturn efx_rc_t siena_mac_poll( __in efx_nic_t *enp, __out efx_link_mode_t *link_modep); extern __checkReturn efx_rc_t siena_mac_up( __in efx_nic_t *enp, __out boolean_t *mac_upp); extern __checkReturn efx_rc_t siena_mac_reconfigure( __in efx_nic_t *enp); #if EFSYS_OPT_LOOPBACK extern __checkReturn efx_rc_t siena_mac_loopback_set( __in efx_nic_t *enp, __in efx_link_mode_t link_mode, __in efx_loopback_type_t loopback_type); #endif /* EFSYS_OPT_LOOPBACK */ #if EFSYS_OPT_MAC_STATS extern __checkReturn efx_rc_t siena_mac_stats_update( __in efx_nic_t *enp, __in efsys_mem_t *esmp, __inout_ecount(EFX_MAC_NSTATS) efsys_stat_t *stat, __inout_opt uint32_t *generationp); #endif /* EFSYS_OPT_MAC_STATS */ #ifdef __cplusplus } #endif #endif /* _SYS_SIENA_IMPL_H */ Index: user/ngie/more-tests2/sys/dev/sfxge/common/siena_mcdi.c =================================================================== --- user/ngie/more-tests2/sys/dev/sfxge/common/siena_mcdi.c (revision 293822) +++ user/ngie/more-tests2/sys/dev/sfxge/common/siena_mcdi.c (revision 293823) @@ -1,321 +1,321 @@ /*- * Copyright (c) 2012-2015 Solarflare Communications 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 THE COPYRIGHT HOLDERS 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 COPYRIGHT OWNER 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. * * The views and conclusions contained in the software and documentation are * those of the authors and should not be interpreted as representing official * policies, either expressed or implied, of the FreeBSD Project. */ #include __FBSDID("$FreeBSD$"); #include "efx.h" #include "efx_impl.h" #if EFSYS_OPT_SIENA && EFSYS_OPT_MCDI #define SIENA_MCDI_PDU(_emip) \ (((emip)->emi_port == 1) \ ? MC_SMEM_P0_PDU_OFST >> 2 \ : MC_SMEM_P1_PDU_OFST >> 2) #define SIENA_MCDI_DOORBELL(_emip) \ (((emip)->emi_port == 1) \ ? MC_SMEM_P0_DOORBELL_OFST >> 2 \ : MC_SMEM_P1_DOORBELL_OFST >> 2) #define SIENA_MCDI_STATUS(_emip) \ (((emip)->emi_port == 1) \ ? MC_SMEM_P0_STATUS_OFST >> 2 \ : MC_SMEM_P1_STATUS_OFST >> 2) static void siena_mcdi_send_request( __in efx_nic_t *enp, __in void *hdrp, __in size_t hdr_len, __in void *sdup, __in size_t sdu_len) { efx_mcdi_iface_t *emip = &(enp->en_mcdi.em_emip); efx_dword_t dword; unsigned int pdur; unsigned int dbr; unsigned int pos; EFSYS_ASSERT(enp->en_family == EFX_FAMILY_SIENA); EFSYS_ASSERT(emip->emi_port == 1 || emip->emi_port == 2); pdur = SIENA_MCDI_PDU(emip); dbr = SIENA_MCDI_DOORBELL(emip); /* Write the header */ EFSYS_ASSERT3U(hdr_len, ==, sizeof (efx_dword_t)); dword = *(efx_dword_t *)hdrp; EFX_BAR_TBL_WRITED(enp, FR_CZ_MC_TREG_SMEM, pdur, &dword, B_TRUE); /* Write the payload */ for (pos = 0; pos < sdu_len; pos += sizeof (efx_dword_t)) { dword = *(efx_dword_t *)((uint8_t *)sdup + pos); EFX_BAR_TBL_WRITED(enp, FR_CZ_MC_TREG_SMEM, pdur + 1 + (pos >> 2), &dword, B_FALSE); } /* Ring the doorbell */ EFX_POPULATE_DWORD_1(dword, EFX_DWORD_0, 0xd004be11); EFX_BAR_TBL_WRITED(enp, FR_CZ_MC_TREG_SMEM, dbr, &dword, B_FALSE); } void siena_mcdi_request_copyin( __in efx_nic_t *enp, __in efx_mcdi_req_t *emrp, __in unsigned int seq, __in boolean_t ev_cpl, __in boolean_t new_epoch) { #if EFSYS_OPT_MCDI_LOGGING const efx_mcdi_transport_t *emtp = enp->en_mcdi.em_emtp; #endif efx_dword_t hdr; size_t hdr_len; unsigned int xflags; EFSYS_ASSERT(enp->en_family == EFX_FAMILY_SIENA); _NOTE(ARGUNUSED(new_epoch)) xflags = 0; if (ev_cpl) xflags |= MCDI_HEADER_XFLAGS_EVREQ; /* Construct the header */ hdr_len = sizeof (hdr); EFX_POPULATE_DWORD_6(hdr, MCDI_HEADER_CODE, emrp->emr_cmd, MCDI_HEADER_RESYNC, 1, MCDI_HEADER_DATALEN, emrp->emr_in_length, MCDI_HEADER_SEQ, seq, MCDI_HEADER_RESPONSE, 0, MCDI_HEADER_XFLAGS, xflags); #if EFSYS_OPT_MCDI_LOGGING if (emtp->emt_logger != NULL) { emtp->emt_logger(emtp->emt_context, EFX_LOG_MCDI_REQUEST, &hdr, sizeof (hdr), emrp->emr_in_buf, emrp->emr_in_length); } #endif /* EFSYS_OPT_MCDI_LOGGING */ siena_mcdi_send_request(enp, &hdr, hdr_len, emrp->emr_in_buf, emrp->emr_in_length); } void siena_mcdi_request_copyout( __in efx_nic_t *enp, __in efx_mcdi_req_t *emrp) { #if EFSYS_OPT_MCDI_LOGGING const efx_mcdi_transport_t *emtp = enp->en_mcdi.em_emtp; efx_dword_t hdr; #endif size_t bytes = MIN(emrp->emr_out_length_used, emrp->emr_out_length); /* Copy payload out if caller supplied buffer */ if (emrp->emr_out_buf != NULL) { siena_mcdi_read_response(enp, emrp->emr_out_buf, sizeof (efx_dword_t), bytes); } #if EFSYS_OPT_MCDI_LOGGING if (emtp->emt_logger != NULL) { siena_mcdi_read_response(enp, &hdr, 0, sizeof (hdr)); emtp->emt_logger(emtp->emt_context, EFX_LOG_MCDI_RESPONSE, &hdr, sizeof (hdr), emrp->emr_out_buf, bytes); } #endif /* EFSYS_OPT_MCDI_LOGGING */ } efx_rc_t siena_mcdi_poll_reboot( __in efx_nic_t *enp) { #ifndef EFX_GRACEFUL_MC_REBOOT /* * This function is not being used properly. * Until its callers are fixed, it should always return 0. */ _NOTE(ARGUNUSED(enp)) return (0); #else efx_mcdi_iface_t *emip = &(enp->en_mcdi.em_emip); unsigned int rebootr; efx_dword_t dword; uint32_t value; EFSYS_ASSERT(enp->en_family == EFX_FAMILY_SIENA); EFSYS_ASSERT(emip->emi_port == 1 || emip->emi_port == 2); rebootr = SIENA_MCDI_STATUS(emip); EFX_BAR_TBL_READD(enp, FR_CZ_MC_TREG_SMEM, rebootr, &dword, B_FALSE); value = EFX_DWORD_FIELD(dword, EFX_DWORD_0); if (value == 0) return (0); EFX_ZERO_DWORD(dword); EFX_BAR_TBL_WRITED(enp, FR_CZ_MC_TREG_SMEM, rebootr, &dword, B_FALSE); if (value == MC_STATUS_DWORD_ASSERT) return (EINTR); else return (EIO); #endif } extern __checkReturn boolean_t siena_mcdi_poll_response( __in efx_nic_t *enp) { efx_mcdi_iface_t *emip = &(enp->en_mcdi.em_emip); efx_dword_t hdr; unsigned int pdur; EFSYS_ASSERT(emip->emi_port == 1 || emip->emi_port == 2); pdur = SIENA_MCDI_PDU(emip); EFX_BAR_TBL_READD(enp, FR_CZ_MC_TREG_SMEM, pdur, &hdr, B_FALSE); return (EFX_DWORD_FIELD(hdr, MCDI_HEADER_RESPONSE) ? B_TRUE : B_FALSE); } void siena_mcdi_read_response( - __in efx_nic_t *enp, - __out void *bufferp, - __in size_t offset, - __in size_t length) + __in efx_nic_t *enp, + __out_bcount(length) void *bufferp, + __in size_t offset, + __in size_t length) { efx_mcdi_iface_t *emip = &(enp->en_mcdi.em_emip); unsigned int pdur; unsigned int pos; efx_dword_t data; EFSYS_ASSERT(emip->emi_port == 1 || emip->emi_port == 2); pdur = SIENA_MCDI_PDU(emip); for (pos = 0; pos < length; pos += sizeof (efx_dword_t)) { EFX_BAR_TBL_READD(enp, FR_CZ_MC_TREG_SMEM, pdur + ((offset + pos) >> 2), &data, B_FALSE); memcpy((uint8_t *)bufferp + pos, &data, MIN(sizeof (data), length - pos)); } } __checkReturn efx_rc_t siena_mcdi_init( __in efx_nic_t *enp, __in const efx_mcdi_transport_t *mtp) { efx_mcdi_iface_t *emip = &(enp->en_mcdi.em_emip); efx_oword_t oword; unsigned int portnum; efx_rc_t rc; EFSYS_ASSERT(enp->en_family == EFX_FAMILY_SIENA); /* Determine the port number to use for MCDI */ EFX_BAR_READO(enp, FR_AZ_CS_DEBUG_REG, &oword); portnum = EFX_OWORD_FIELD(oword, FRF_CZ_CS_PORT_NUM); if (portnum == 0) { /* Presumably booted from ROM; only MCDI port 1 will work */ emip->emi_port = 1; } else if (portnum <= 2) { emip->emi_port = portnum; } else { rc = EINVAL; goto fail1; } /* Siena BootROM and firmware only support MCDIv1 */ emip->emi_max_version = 1; /* * Wipe the atomic reboot status so subsequent MCDI requests succeed. * BOOT_STATUS is preserved so eno_nic_probe() can boot out of the * assertion handler. */ (void) siena_mcdi_poll_reboot(enp); return (0); fail1: EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } void siena_mcdi_fini( __in efx_nic_t *enp) { } __checkReturn efx_rc_t siena_mcdi_feature_supported( __in efx_nic_t *enp, __in efx_mcdi_feature_id_t id, __out boolean_t *supportedp) { efx_rc_t rc; EFSYS_ASSERT3U(enp->en_family, ==, EFX_FAMILY_SIENA); switch (id) { case EFX_MCDI_FEATURE_FW_UPDATE: case EFX_MCDI_FEATURE_LINK_CONTROL: case EFX_MCDI_FEATURE_MACADDR_CHANGE: case EFX_MCDI_FEATURE_MAC_SPOOFING: *supportedp = B_TRUE; break; default: rc = ENOTSUP; goto fail1; break; } return (0); fail1: EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } #endif /* EFSYS_OPT_SIENA && EFSYS_OPT_MCDI */ Index: user/ngie/more-tests2/sys =================================================================== --- user/ngie/more-tests2/sys (revision 293822) +++ user/ngie/more-tests2/sys (revision 293823) Property changes on: user/ngie/more-tests2/sys ___________________________________________________________________ Modified: svn:mergeinfo ## -0,0 +0,1 ## Merged /head/sys:r293816-293822 Index: user/ngie/more-tests2/tools/regression/geom/ConfCmp/Makefile =================================================================== --- user/ngie/more-tests2/tools/regression/geom/ConfCmp/Makefile (nonexistent) +++ user/ngie/more-tests2/tools/regression/geom/ConfCmp/Makefile (revision 293823) @@ -0,0 +1,34 @@ +# $FreeBSD$ + +PROG= ConfCmp +SRCS+= ConfCmp.c +SRCS+= subr_sbuf.c + +.PATH: ../../../../sys/kern + +NO_OBJ= +WARNS?= 5 +CFLAGS+= -g -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -static +# Uncomment for ElectricFence +#LDADD += -lefence -L/usr/local/lib + +LIBADD= bsdxml + +MAN= +CLEANFILES += _* + +.include + +test: ${PROG} + rm -f _* *.core + ./${PROG} a1.conf a1.conf + ./${PROG} a1.conf a1a.conf + if ./${PROG} a1.conf a1b.conf > /dev/null 2>&1 ; then exit 1 ; fi + if ./${PROG} a1.conf a1c.conf > /dev/null 2>&1 ; then exit 1 ; fi + if ./${PROG} a1.conf a1d.conf > /dev/null 2>&1 ; then exit 1 ; fi + ./${PROG} a2.conf a2.conf + ./${PROG} a2.conf a2a.conf + if ./${PROG} a2.conf a2b.conf > /dev/null 2>&1 ; then exit 1 ; fi + if ./${PROG} a2.conf a2c.conf > /dev/null 2>&1 ; then exit 1 ; fi + if ./${PROG} a2.conf a2d.conf > /dev/null 2>&1 ; then exit 1 ; fi + Property changes on: user/ngie/more-tests2/tools/regression/geom/ConfCmp/Makefile ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: user/ngie/more-tests2/tools/regression/geom/ConfCmp/ConfCmp.c =================================================================== --- user/ngie/more-tests2/tools/regression/geom/ConfCmp/ConfCmp.c (nonexistent) +++ user/ngie/more-tests2/tools/regression/geom/ConfCmp/ConfCmp.c (revision 293823) @@ -0,0 +1,377 @@ +/*- + * Copyright (c) 2002 Poul-Henning Kamp + * Copyright (c) 2002 Networks Associates Technology, Inc. + * All rights reserved. + * + * This software was developed for the FreeBSD Project by Poul-Henning Kamp + * and NAI Labs, the Security Research Division of Network Associates, Inc. + * under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the + * DARPA CHATS research program. + * + * 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. The names of the authors may not be used to endorse or promote + * products derived from this software without specific prior written + * permission. + * + * 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$ + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +FILE *fsubs; + +struct node { + LIST_HEAD(, node) children; + LIST_ENTRY(node) siblings; + struct node *parent; + const char *name; + struct sbuf *cont; + struct sbuf *key; + char *id; + char *ref; +}; + +struct mytree { + struct node *top; + struct node *cur; + int indent; + int ignore; +}; + +struct ref { + LIST_ENTRY(ref) next; + char *k1; + char *k2; +}; + +LIST_HEAD(, ref) refs = LIST_HEAD_INITIALIZER(refs); + +static struct node * +new_node(void) +{ + struct node *np; + + np = calloc(1, sizeof *np); + np->cont = sbuf_new_auto(); + sbuf_clear(np->cont); + np->key = sbuf_new_auto(); + sbuf_clear(np->key); + LIST_INIT(&np->children); + return (np); +} + +static void +indent(int n) +{ + + printf("%*.*s", n, n, ""); +} + +static void +StartElement(void *userData, const char *name, const char **attr) +{ + struct mytree *mt; + struct node *np; + int i; + + mt = userData; + if (!strcmp(name, "FreeBSD")) { + mt->ignore = 1; + return; + } + mt->ignore = 0; + mt->indent += 2; + np = new_node(); + for (i = 0; attr[i]; i += 2) { + if (!strcmp(attr[i], "id")) + np->id = strdup(attr[i+1]); + else if (!strcmp(attr[i], "ref")) + np->ref = strdup(attr[i+1]); + } + np->name = strdup(name); + sbuf_cat(np->key, name); + sbuf_cat(np->key, "::"); + np->parent = mt->cur; + LIST_INSERT_HEAD(&mt->cur->children, np, siblings); + mt->cur = np; +} + +static void +EndElement(void *userData, const char *name __unused) +{ + struct mytree *mt; + struct node *np; + + mt = userData; + if (mt->ignore) + return; + + mt->indent -= 2; + sbuf_finish(mt->cur->cont); + LIST_FOREACH(np, &mt->cur->children, siblings) { + if (strcmp(np->name, "name")) + continue; + sbuf_cat(mt->cur->key, sbuf_data(np->cont)); + break; + } + sbuf_finish(mt->cur->key); + mt->cur = mt->cur->parent; +} + +static void +CharData(void *userData , const XML_Char *s , int len) +{ + struct mytree *mt; + const char *b, *e; + + mt = userData; + if (mt->ignore) + return; + b = s; + e = s + len - 1; + while (isspace(*b) && b < e) + b++; + while (isspace(*e) && e > b) + e--; + if (e != b || *b) + sbuf_bcat(mt->cur->cont, b, e - b + 1); +} + +static struct mytree * +dofile(char *filename) +{ + XML_Parser parser; + struct mytree *mt; + struct stat st; + int fd; + char *p; + int i; + + parser = XML_ParserCreate(NULL); + mt = calloc(1, sizeof *mt); + mt->top = new_node(); + mt->top->name = "(top)"; + mt->top->parent = mt->top; + mt->cur = mt->top; + sbuf_finish(mt->top->key); + sbuf_finish(mt->top->cont); + XML_SetUserData(parser, mt); + XML_SetElementHandler(parser, StartElement, EndElement); + XML_SetCharacterDataHandler(parser, CharData); + fd = open(filename, O_RDONLY); + if (fd < 0) + err(1, filename); + fstat(fd, &st); + p = mmap(NULL, st.st_size, PROT_READ, MAP_NOCORE|MAP_PRIVATE, fd, 0); + i = XML_Parse(parser, p, st.st_size, 1); + if (i != 1) + errx(1, "XML_Parse complained -> %d", i); + munmap(p, st.st_size); + close(fd); + XML_ParserFree(parser); + sbuf_finish(mt->top->cont); + if (i) + return (mt); + else + return (NULL); +} + +static void +print_node(struct node *np) +{ + printf("\"%s\" -- \"%s\" -- \"%s\"", np->name, sbuf_data(np->cont), sbuf_data(np->key)); + if (np->id) + printf(" id=\"%s\"", np->id); + if (np->ref) + printf(" ref=\"%s\"", np->ref); + printf("\n"); +} + +static void +print_tree(struct node *np, int n) +{ + struct node *np1; + + indent(n); printf("%s id=%s ref=%s\n", np->name, np->id, np->ref); + LIST_FOREACH(np1, &np->children, siblings) + print_tree(np1, n + 2); +} + +static void +sort_node(struct node *np) +{ + struct node *np1, *np2; + int n; + + LIST_FOREACH(np1, &np->children, siblings) + sort_node(np1); + do { + np1 = LIST_FIRST(&np->children); + n = 0; + for (;;) { + if (np1 == NULL) + return; + np2 = LIST_NEXT(np1, siblings); + if (np2 == NULL) + return; + if (strcmp(sbuf_data(np1->key), sbuf_data(np2->key)) > 0) { + LIST_REMOVE(np2, siblings); + LIST_INSERT_BEFORE(np1, np2, siblings); + n++; + break; + } + np1 = np2; + } + } while (n); +} + +static int +refcmp(char *r1, char *r2) +{ + struct ref *r; + + LIST_FOREACH(r, &refs, next) { + if (!strcmp(r1, r->k1)) + return (strcmp(r2, r->k2)); + } + r = calloc(1, sizeof(*r)); + r->k1 = strdup(r1); + r->k2 = strdup(r2); + LIST_INSERT_HEAD(&refs, r, next); + if (fsubs != NULL) { + fprintf(fsubs, "s/%s/%s/g\n", r1, r2); + fflush(fsubs); + } + return (0); +} + +static int compare_node2(struct node *n1, struct node *n2, int in); + +static int +compare_node(struct node *n1, struct node *n2, int in) +{ + int i; + struct node *n1a, *n2a; + + i = strcmp(n1->name, n2->name); + if (i) + return (i); + if (n1->id && n2->id) + i = refcmp(n1->id, n2->id); + else if (n1->id || n2->id) + i = -1; + if (i) + return (i); + if (n1->ref && n2->ref) + i = refcmp(n1->ref, n2->ref); + else if (n1->ref || n2->ref) + i = -1; + if (i) + return (i); + if (!strcmp(n1->name, "ref")) + i = refcmp(sbuf_data(n1->cont), sbuf_data(n2->cont)); + else + i = strcmp(sbuf_data(n1->cont), sbuf_data(n2->cont)); + if (i) + return (1); + n1a = LIST_FIRST(&n1->children); + n2a = LIST_FIRST(&n2->children); + for (;;) { + if (n1a == NULL && n2a == NULL) + return (0); + if (n1a != NULL && n2a == NULL) { + printf("1>"); + indent(in); + print_node(n1a); + printf("2>\n"); + return (1); + } + if (n1a == NULL && n2a != NULL) { + printf("1>\n"); + printf("2>"); + indent(in); + print_node(n2a); + return (1); + } + i = compare_node2(n1a, n2a, in + 2); + if (i) + return (1); + n1a = LIST_NEXT(n1a, siblings); + n2a = LIST_NEXT(n2a, siblings); + } + return (0); +} + +static int +compare_node2(struct node *n1, struct node *n2, int in) +{ + int i; + + i = compare_node(n1, n2, in); + if (i) { + printf("1>"); + indent(in); + print_node(n1); + printf("2>"); + indent(in); + print_node(n2); + } + return (i); +} + + + +int +main(int argc, char **argv) +{ + struct mytree *t1, *t2; + int i; + + fsubs = fopen("_.subs", "w"); + setbuf(stdout, NULL); + setbuf(stderr, NULL); + if (argc != 3) + errx(1, "usage: %s file1 file2", argv[0]); + + t1 = dofile(argv[1]); + if (t1 == NULL) + errx(2, "XML parser error on file %s", argv[1]); + sort_node(t1->top); + t2 = dofile(argv[2]); + if (t2 == NULL) + errx(2, "XML parser error on file %s", argv[2]); + sort_node(t2->top); + i = compare_node(t1->top, t2->top, 0); + return (i); +} + Property changes on: user/ngie/more-tests2/tools/regression/geom/ConfCmp/ConfCmp.c ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: user/ngie/more-tests2/tools/regression/geom/ConfCmp/a2.conf =================================================================== --- user/ngie/more-tests2/tools/regression/geom/ConfCmp/a2.conf (nonexistent) +++ user/ngie/more-tests2/tools/regression/geom/ConfCmp/a2.conf (revision 293823) @@ -0,0 +1,207 @@ + + $FreeBSD$ + + DEV-class + + + wd0s1f + 4 + + + + r0w0e0 + + + + + wd0s1e + 4 + + + + r0w0e0 + + + + + wd0s1c + 4 + + + + r0w0e0 + + + + + wd0s1b + 4 + + + + r0w0e0 + + + + + wd0s1a + 4 + + + + r0w0e0 + + + + + wd0s1 + 3 + + + + r0w0e0 + + + + + wd0 + 2 + + + + r0w0e0 + + + + + PC98-class + + + wd0 + 2 + + 8704 + + + + + r0w0e0 + + + + + + r0w0e0 + wd0s1 + + 0 + 1626533888 + 3176824 + 69632 + 136 + + + + + + SUNLABEL-class + + + MBREXT-class + + + MBR-class + + + BSD-class + + + wd0s1 + 3 + + 512 + 8192 + + + + + r0w0e0 + + + + + + r0w0e0 + wd0s1f + + 5 + 1390673920 + 2716160 + 235929600 + 460800 + + + + + r0w0e0 + wd0s1e + + 4 + 52428800 + 102400 + 183500800 + 358400 + + + + + r0w0e0 + wd0s1c + + 2 + 1626603520 + 3176960 + 0 + 0 + + + + + r0w0e0 + wd0s1b + + 1 + 104857600 + 204800 + 78643200 + 153600 + + + + + r0w0e0 + wd0s1a + + 0 + 78643200 + 153600 + 0 + 0 + + + + + + SIMDISK-class + + + wd0 + 1 + + + r0w0e0 + wd0 + + + + Property changes on: user/ngie/more-tests2/tools/regression/geom/ConfCmp/a2.conf ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: user/ngie/more-tests2/tools/regression/geom/ConfCmp/a2a.conf =================================================================== --- user/ngie/more-tests2/tools/regression/geom/ConfCmp/a2a.conf (nonexistent) +++ user/ngie/more-tests2/tools/regression/geom/ConfCmp/a2a.conf (revision 293823) @@ -0,0 +1,207 @@ + + $FreeBSD$ + + DEV-class + + + wd0s1f + 4 + + + + r0w0e0 + + + + + wd0s1e + 4 + + + + r0w0e0 + + + + + wd0s1c + 4 + + + + r0w0e0 + + + + + wd0s1b + 4 + + + + r0w0e0 + + + + + wd0s1a + 4 + + + + r0w0e0 + + + + + wd0s1 + 3 + + + + r0w0e0 + + + + + wd0 + 2 + + + + r0w0e0 + + + + + PC98-class + + + wd0 + 2 + + 8704 + + + + + r0w0e0 + + + + + + r0w0e0 + wd0s1 + + 0 + 1626533888 + 3176824 + 69632 + 136 + + + + + + SUNLABEL-class + + + MBREXT-class + + + MBR-class + + + BSD-class + + + wd0s1 + 3 + + 512 + 8192 + + + + + r0w0e0 + + + + + + r0w0e0 + wd0s1f + + 5 + 1390673920 + 2716160 + 235929600 + 460800 + + + + + r0w0e0 + wd0s1e + + 4 + 52428800 + 102400 + 183500800 + 358400 + + + + + r0w0e0 + wd0s1c + + 2 + 1626603520 + 3176960 + 0 + 0 + + + + + r0w0e0 + wd0s1b + + 1 + 104857600 + 204800 + 78643200 + 153600 + + + + + r0w0e0 + wd0s1a + + 0 + 78643200 + 153600 + 0 + 0 + + + + + + SIMDISK-class + + + wd0 + 1 + + + r0w0e0 + wd0 + + + + Property changes on: user/ngie/more-tests2/tools/regression/geom/ConfCmp/a2a.conf ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: user/ngie/more-tests2/tools/regression/geom/ConfCmp/a2b.conf =================================================================== --- user/ngie/more-tests2/tools/regression/geom/ConfCmp/a2b.conf (nonexistent) +++ user/ngie/more-tests2/tools/regression/geom/ConfCmp/a2b.conf (revision 293823) @@ -0,0 +1,207 @@ + + $FreeBSD$ + + DEV-class + + + wd0s1f + 4 + + + + r0w0e0 + + + + + wd0s1e + 4 + + + + r0w0e0 + + + + + wd0s1c + 4 + + + + r0w0e0 + + + + + wd0s1b + 4 + + + + r0w0e0 + + + + + wd0s1a + 4 + + + + r0w0e0 + + + + + wd0s1 + 3 + + + + r0w0e0 + + + + + wd0 + 2 + + + + r0w0e0 + + + + + PC98-class + + + wd0 + 2 + + 8704 + + + + + r0w0e0 + + + + + + r0w0e0 + wd0s1 + + 0 + 1626533888 + 3176824 + 69632 + 136 + + + + + + SUNLABEL-class + + + MBREXT-class + + + MBR-class + + + BSD-class + + + wd0s1 + 3 + + 512 + 8192 + + + + + r0w0e0 + + + + + + r0w0e0 + wd0s1f + + 5 + 1390673920 + 2716160 + 235929600 + 460800 + + + + + r0w0e0 + wd0s1e + + 4 + 52428800 + 102400 + 183500800 + 358400 + + + + + r0w0e0 + wd0s1c + + 2 + 1626603520 + 3176960 + 0 + 0 + + + + + r0w0e0 + wd0s1b + + 1 + 104857600 + 204800 + 78643200 + 153600 + + + + + r0w0e0 + wd0s1a + + 0 + 78643200 + 153600 + 0 + 0 + + + + + + SIMDISK-class + + + wd0 + 1 + + + r0w0e0 + wd0 + + + + Property changes on: user/ngie/more-tests2/tools/regression/geom/ConfCmp/a2b.conf ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: user/ngie/more-tests2/tools/regression/geom/ConfCmp/a2c.conf =================================================================== --- user/ngie/more-tests2/tools/regression/geom/ConfCmp/a2c.conf (nonexistent) +++ user/ngie/more-tests2/tools/regression/geom/ConfCmp/a2c.conf (revision 293823) @@ -0,0 +1,206 @@ + + $FreeBSD$ + + DEV-class + + + wd0s1f + 4 + + + + r0w0e0 + + + + + wd0s1e + 4 + + + + r0w0e0 + + + + + wd0s1c + 4 + + + + r0w0e0 + + + + + wd0s1b + 4 + + + + + + + + wd0s1a + 4 + + + + r0w0e0 + + + + + wd0s1 + 3 + + + + r0w0e0 + + + + + wd0 + 2 + + + + r0w0e0 + + + + + PC98-class + + + wd0 + 2 + + 8704 + + + + + r0w0e0 + + + + + + r0w0e0 + wd0s1 + + 0 + 1626533888 + 3176824 + 69632 + 136 + + + + + + SUNLABEL-class + + + MBREXT-class + + + MBR-class + + + BSD-class + + + wd0s1 + 3 + + 512 + 8192 + + + + + r0w0e0 + + + + + + r0w0e0 + wd0s1f + + 5 + 1390673920 + 2716160 + 235929600 + 460800 + + + + + r0w0e0 + wd0s1e + + 4 + 52428800 + 102400 + 183500800 + 358400 + + + + + r0w0e0 + wd0s1c + + 2 + 1626603520 + 3176960 + 0 + 0 + + + + + r0w0e0 + wd0s1b + + 1 + 104857600 + 204800 + 78643200 + 153600 + + + + + r0w0e0 + wd0s1a + + 0 + 78643200 + 153600 + 0 + 0 + + + + + + SIMDISK-class + + + wd0 + 1 + + + r0w0e0 + wd0 + + + + Property changes on: user/ngie/more-tests2/tools/regression/geom/ConfCmp/a2c.conf ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: user/ngie/more-tests2/tools/regression/geom/ConfCmp/a2d.conf =================================================================== --- user/ngie/more-tests2/tools/regression/geom/ConfCmp/a2d.conf (nonexistent) +++ user/ngie/more-tests2/tools/regression/geom/ConfCmp/a2d.conf (revision 293823) @@ -0,0 +1,211 @@ + + $FreeBSD$ + + DEV-class + + + wd0s1f + 4 + + + + r0w0e0 + + + + + wd0s1e + 4 + + + + r0w0e0 + + + + + wd0s1c + 4 + + + + r0w0e0 + + + + + wd0s1b + 4 + + + + r0w0e0 + + + + + wd0s1a + 4 + + + + r0w0e0 + + + + r0w0e0 + + + + + wd0s1 + 3 + + + + r0w0e0 + + + + + wd0 + 2 + + + + r0w0e0 + + + + + PC98-class + + + wd0 + 2 + + 8704 + + + + + r0w0e0 + + + + + + r0w0e0 + wd0s1 + + 0 + 1626533888 + 3176824 + 69632 + 136 + + + + + + SUNLABEL-class + + + MBREXT-class + + + MBR-class + + + BSD-class + + + wd0s1 + 3 + + 512 + 8192 + + + + + r0w0e0 + + + + + + r0w0e0 + wd0s1f + + 5 + 1390673920 + 2716160 + 235929600 + 460800 + + + + + r0w0e0 + wd0s1e + + 4 + 52428800 + 102400 + 183500800 + 358400 + + + + + r0w0e0 + wd0s1c + + 2 + 1626603520 + 3176960 + 0 + 0 + + + + + r0w0e0 + wd0s1b + + 1 + 104857600 + 204800 + 78643200 + 153600 + + + + + r0w0e0 + wd0s1a + + 0 + 78643200 + 153600 + 0 + 0 + + + + + + SIMDISK-class + + + wd0 + 1 + + + r0w0e0 + wd0 + + + + Property changes on: user/ngie/more-tests2/tools/regression/geom/ConfCmp/a2d.conf ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: user/ngie/more-tests2/tools/regression/geom/ConfCmp/a1.conf =================================================================== --- user/ngie/more-tests2/tools/regression/geom/ConfCmp/a1.conf (nonexistent) +++ user/ngie/more-tests2/tools/regression/geom/ConfCmp/a1.conf (revision 293823) @@ -0,0 +1,414 @@ + + $FreeBSD$ + + 0x80712c0 + DEV-method + + 0x80bfd00 + 0x80712c0 + ad0s3d + 4 + + 0x80b9500 + 0x80bfd00 + 0x80bf880 + r0w0e0 + + + + 0x80bfc80 + 0x80712c0 + ad0s3c + 4 + + 0x80b94c0 + 0x80bfc80 + 0x80bf800 + r0w0e0 + + + + 0x80bfc00 + 0x80712c0 + ad0s3a + 4 + + 0x80b9480 + 0x80bfc00 + 0x80bf780 + r0w0e0 + + + + 0x80bfb80 + 0x80712c0 + ad0s2c + 4 + + 0x80b9440 + 0x80bfb80 + 0x80bf600 + r0w0e0 + + + + 0x80bfb00 + 0x80712c0 + ad0s1f + 4 + + 0x80b9400 + 0x80bfb00 + 0x80bf480 + r0w0e0 + + + + 0x80bfa80 + 0x80712c0 + ad0s1e + 4 + + 0x80b93c0 + 0x80bfa80 + 0x80bf400 + r0w0e0 + + + + 0x80bfa00 + 0x80712c0 + ad0s1c + 4 + + 0x80b9380 + 0x80bfa00 + 0x80bf380 + r0w0e0 + + + + 0x80bf980 + 0x80712c0 + ad0s1b + 4 + + 0x80b9340 + 0x80bf980 + 0x80bf300 + r0w0e0 + + + + 0x80bf900 + 0x80712c0 + ad0s1a + 4 + + 0x80b9300 + 0x80bf900 + 0x80bf280 + r0w0e0 + + + + 0x80bf680 + 0x80712c0 + ad0s3 + 3 + + 0x80b9280 + 0x80bf680 + 0x80bf100 + r0w0e0 + + + + 0x80bf500 + 0x80712c0 + ad0s2 + 3 + + 0x80b9200 + 0x80bf500 + 0x80bf080 + r0w0e0 + + + + 0x80bf180 + 0x80712c0 + ad0s1 + 3 + + 0x80b9180 + 0x80bf180 + 0x80bf000 + r0w0e0 + + + + 0x80b9080 + 0x80712c0 + ad0 + 2 + + 0x80b90c0 + 0x80b9080 + 0x80b9040 + r0w0e0 + + + + + 0x8071280 + MBREXT-method + + + 0x8071260 + MBR-method + + 0x80b9100 + 0x8071260 + ad0 + 2 + + + + 0x80b9140 + 0x80b9100 + 0x80b9040 + r0w0e0 + + + + + 0x80bf100 + 0x80b9100 + r0w0e0 + ad0s3 + + 2 + 8585256960 + 16768080 + 8585256960 + 16768080 + 165 + + + + 0x80bf080 + 0x80b9100 + r0w0e0 + ad0s2 + + 1 + 5364817920 + 10478160 + 3220439040 + 6289920 + 165 + + + + 0x80bf000 + 0x80b9100 + r0w0e0 + ad0s1 + + 0 + 3220406784 + 6289857 + 32256 + 63 + 165 + + + + + + 0x80712a0 + BSD-method + + 0x80bf700 + 0x80712a0 + ad0s3 + 3 + + + + 0x80b92c0 + 0x80bf700 + 0x80bf100 + r0w0e0 + + + + + 0x80bf880 + 0x80bf700 + r0w0e0 + ad0s3d + + 3 + 6488104960 + 12672080 + 10682408960 + 20864080 + + + + 0x80bf800 + 0x80bf700 + r0w0e0 + ad0s3c + + 2 + 8585256960 + 16768080 + 8585256960 + 16768080 + + + + 0x80bf780 + 0x80bf700 + r0w0e0 + ad0s3a + + 0 + 2097152000 + 4096000 + 8585256960 + 16768080 + + + + + 0x80bf580 + 0x80712a0 + ad0s2 + 3 + + + + 0x80b9240 + 0x80bf580 + 0x80bf080 + r0w0e0 + + + + + 0x80bf600 + 0x80bf580 + r0w0e0 + ad0s2c + + 2 + 5364817920 + 10478160 + 3220439040 + 6289920 + + + + + 0x80bf200 + 0x80712a0 + ad0s1 + 3 + + + + 0x80b91c0 + 0x80bf200 + 0x80bf000 + r0w0e0 + + + + + 0x80bf480 + 0x80bf200 + r0w0e0 + ad0s1f + + 5 + 2066973184 + 4037057 + 1153465856 + 2252863 + + + + 0x80bf400 + 0x80bf200 + r0w0e0 + ad0s1e + + 4 + 524288000 + 1024000 + 629177856 + 1228863 + + + + 0x80bf380 + 0x80bf200 + r0w0e0 + ad0s1c + + 2 + 3220406784 + 6289857 + 32256 + 63 + + + + 0x80bf300 + 0x80bf200 + r0w0e0 + ad0s1b + + 1 + 524288000 + 1024000 + 104889856 + 204863 + + + + 0x80bf280 + 0x80bf200 + r0w0e0 + ad0s1a + + 0 + 104857600 + 204800 + 32256 + 63 + + + + + + 0x80711c0 + SIMDISK-method + + 0x80b9000 + 0x80711c0 + ad0 + 1 + + 0x80b9040 + 0x80b9000 + r0w0e0 + ad0 + + + + Property changes on: user/ngie/more-tests2/tools/regression/geom/ConfCmp/a1.conf ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: user/ngie/more-tests2/tools/regression/geom/ConfCmp/a1a.conf =================================================================== --- user/ngie/more-tests2/tools/regression/geom/ConfCmp/a1a.conf (nonexistent) +++ user/ngie/more-tests2/tools/regression/geom/ConfCmp/a1a.conf (revision 293823) @@ -0,0 +1,414 @@ + + $FreeBSD$ + + 0x90712c0 + DEV-method + + 0x90bfd00 + 0x90712c0 + ad0s3d + 4 + + 0x90b9500 + 0x90bfd00 + 0x90bf880 + r0w0e0 + + + + 0x90bfc80 + 0x90712c0 + ad0s3c + 4 + + 0x90b94c0 + 0x90bfc80 + 0x90bf800 + r0w0e0 + + + + 0x90bfc00 + 0x90712c0 + ad0s3a + 4 + + 0x90b9480 + 0x90bfc00 + 0x90bf780 + r0w0e0 + + + + 0x90bfb80 + 0x90712c0 + ad0s2c + 4 + + 0x90b9440 + 0x90bfb80 + 0x90bf600 + r0w0e0 + + + + 0x90bfb00 + 0x90712c0 + ad0s1f + 4 + + 0x90b9400 + 0x90bfb00 + 0x90bf480 + r0w0e0 + + + + 0x90bfa80 + 0x90712c0 + ad0s1e + 4 + + 0x90b93c0 + 0x90bfa80 + 0x90bf400 + r0w0e0 + + + + 0x90bfa00 + 0x90712c0 + ad0s1c + 4 + + 0x90b9380 + 0x90bfa00 + 0x90bf380 + r0w0e0 + + + + 0x90bf980 + 0x90712c0 + ad0s1b + 4 + + 0x90b9340 + 0x90bf980 + 0x90bf300 + r0w0e0 + + + + 0x90bf900 + 0x90712c0 + ad0s1a + 4 + + 0x90b9300 + 0x90bf900 + 0x90bf280 + r0w0e0 + + + + 0x90bf680 + 0x90712c0 + ad0s3 + 3 + + 0x90b9280 + 0x90bf680 + 0x90bf100 + r0w0e0 + + + + 0x90bf500 + 0x90712c0 + ad0s2 + 3 + + 0x90b9200 + 0x90bf500 + 0x90bf080 + r0w0e0 + + + + 0x90bf180 + 0x90712c0 + ad0s1 + 3 + + 0x90b9180 + 0x90bf180 + 0x90bf000 + r0w0e0 + + + + 0x90b9080 + 0x90712c0 + ad0 + 2 + + 0x90b90c0 + 0x90b9080 + 0x90b9040 + r0w0e0 + + + + + 0x9071280 + MBREXT-method + + + 0x9071260 + MBR-method + + 0x90b9100 + 0x9071260 + ad0 + 2 + + + + 0x90b9140 + 0x90b9100 + 0x90b9040 + r0w0e0 + + + + + 0x90bf100 + 0x90b9100 + r0w0e0 + ad0s3 + + 2 + 8585256960 + 16768080 + 8585256960 + 16768080 + 165 + + + + 0x90bf080 + 0x90b9100 + r0w0e0 + ad0s2 + + 1 + 5364817920 + 10478160 + 3220439040 + 6289920 + 165 + + + + 0x90bf000 + 0x90b9100 + r0w0e0 + ad0s1 + + 0 + 3220406784 + 6289857 + 32256 + 63 + 165 + + + + + + 0x90712a0 + BSD-method + + 0x90bf700 + 0x90712a0 + ad0s3 + 3 + + + + 0x90b92c0 + 0x90bf700 + 0x90bf100 + r0w0e0 + + + + + 0x90bf880 + 0x90bf700 + r0w0e0 + ad0s3d + + 3 + 6488104960 + 12672080 + 10682408960 + 20864080 + + + + 0x90bf800 + 0x90bf700 + r0w0e0 + ad0s3c + + 2 + 8585256960 + 16768080 + 8585256960 + 16768080 + + + + 0x90bf780 + 0x90bf700 + r0w0e0 + ad0s3a + + 0 + 2097152000 + 4096000 + 8585256960 + 16768080 + + + + + 0x90bf580 + 0x90712a0 + ad0s2 + 3 + + + + 0x90b9240 + 0x90bf580 + 0x90bf080 + r0w0e0 + + + + + 0x90bf600 + 0x90bf580 + r0w0e0 + ad0s2c + + 2 + 5364817920 + 10478160 + 3220439040 + 6289920 + + + + + 0x90bf200 + 0x90712a0 + ad0s1 + 3 + + + + 0x90b91c0 + 0x90bf200 + 0x90bf000 + r0w0e0 + + + + + 0x90bf480 + 0x90bf200 + r0w0e0 + ad0s1f + + 5 + 2066973184 + 4037057 + 1153465856 + 2252863 + + + + 0x90bf400 + 0x90bf200 + r0w0e0 + ad0s1e + + 4 + 524288000 + 1024000 + 629177856 + 1228863 + + + + 0x90bf380 + 0x90bf200 + r0w0e0 + ad0s1c + + 2 + 3220406784 + 6289857 + 32256 + 63 + + + + 0x90bf300 + 0x90bf200 + r0w0e0 + ad0s1b + + 1 + 524288000 + 1024000 + 104889856 + 204863 + + + + 0x90bf280 + 0x90bf200 + r0w0e0 + ad0s1a + + 0 + 104857600 + 204800 + 32256 + 63 + + + + + + 0x90711c0 + SIMDISK-method + + 0x90b9000 + 0x90711c0 + ad0 + 1 + + 0x90b9040 + 0x90b9000 + r0w0e0 + ad0 + + + + Property changes on: user/ngie/more-tests2/tools/regression/geom/ConfCmp/a1a.conf ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: user/ngie/more-tests2/tools/regression/geom/ConfCmp/a1b.conf =================================================================== --- user/ngie/more-tests2/tools/regression/geom/ConfCmp/a1b.conf (nonexistent) +++ user/ngie/more-tests2/tools/regression/geom/ConfCmp/a1b.conf (revision 293823) @@ -0,0 +1,414 @@ + + $FreeBSD$ + + 0x80712c0 + DEV-method + + 0x80bfd00 + 0x80712c0 + ad0s3d + 4 + + 0x80b9500 + 0x80bfd00 + 0x80bf880 + r0w0e0 + + + + 0x80bfc80 + 0x80712c0 + ad0s3c + 4 + + 0x80b94c0 + 0x80bfc80 + 0x80bf800 + r0w0e0 + + + + 0x80bfc00 + 0x80712c0 + ad0s3a + 4 + + 0x80b9480 + 0x80bfc00 + 0x80bf780 + r0w0e0 + + + + 0x80bfb80 + 0x80712c0 + ad0s2c + 4 + + 0x80b9440 + 0x80bfb80 + 0x80bf600 + r0w0e0 + + + + 0x80bfb00 + 0x80712c0 + ad0s1f + 4 + + 0x80b9400 + 0x80bfb00 + 0x80bf480 + r0w0e0 + + + + 0x80bfa80 + 0x80712c0 + ad0s1e + 4 + + 0x80b93c0 + 0x80bfa80 + 0x80bf400 + r0w0e0 + + + + 0x80bfa00 + 0x80712c0 + ad0s1c + 4 + + 0x80b9380 + 0x80bfa00 + 0x80bf380 + r0w0e0 + + + + 0x80bf980 + 0x80712c0 + ad0s1b + 4 + + 0x80b9340 + 0x80bf980 + 0x80bf300 + r0w0e0 + + + + 0x80bf900 + 0x80712c0 + ad0s1a + 4 + + 0x80b9300 + 0x80bf900 + 0x80bf280 + r0w0e0 + + + + 0x80bf680 + 0x80712c0 + ad0s3 + 3 + + 0x80b9280 + 0x80bf680 + 0x80bf100 + r0w0e0 + + + + 0x80bf500 + 0x80712c0 + ad0s2 + 3 + + 0x80b9200 + 0x80bf500 + 0x80bf080 + r0w0e0 + + + + 0x80bf180 + 0x80712c0 + ad0s1 + 3 + + 0x80b9180 + 0x80bf180 + 0x80bf000 + r0w0e0 + + + + 0x80b9080 + 0x80712c0 + ad0 + 2 + + 0x80b90c0 + 0x80b9080 + 0x80b9040 + r0w0e0 + + + + + 0x8071280 + MBREXT-method + + + 0x8071260 + MBR-method + + 0x80b9100 + 0x8071260 + ad0 + 2 + + + + 0x80b9140 + 0x80b9100 + 0x80b9040 + r0w0e0 + + + + + 0x80bf100 + 0x80b9100 + r0w0e0 + ad0s3 + + 2 + 8585256960 + 16768080 + 8585256960 + 16768080 + 165 + + + + 0x80bf080 + 0x80b9100 + r0w0e0 + ad0s2 + + 1 + 5364817920 + 10478160 + 3220439040 + 6289920 + 165 + + + + 0x80bf000 + 0x80b9100 + r0w0e0 + ad0s1 + + 0 + 3220406784 + 6289857 + 32256 + 63 + 165 + + + + + + 0x80712a0 + BSD-method + + 0x80bf700 + 0x80712a0 + ad0s3 + 3 + + + + 0x80b92c0 + 0x80bf700 + 0x80bf100 + r0w0e0 + + + + + 0x80bf880 + 0x80bf700 + r0w0e0 + ad0s3d + + 3 + 6488104960 + 12672080 + 10682408960 + 20864080 + + + + 0x80bf800 + 0x80bf700 + r0w0e0 + ad0s3c + + 2 + 8585256960 + 16768080 + 8585256960 + 16768080 + + + + 0x80bf780 + 0x80bf700 + r0w0e0 + ad0s3a + + 0 + 2097152000 + 4096000 + 8585256960 + 16768080 + + + + + 0x80bf580 + 0x80712a0 + ad0s2 + 3 + + + + 0x80b9240 + 0x80bf580 + 0x80bf080 + r0w0e0 + + + + + 0x80bf600 + 0x80bf580 + r0w0e0 + ad0s2c + + 2 + 5364817920 + 10478160 + 3220439040 + 6289920 + + + + + 0x80bf200 + 0x80712a0 + ad0s1 + 3 + + + + 0x80b91c0 + 0x80bf200 + 0x80bf000 + r0w0e0 + + + + + 0x80bf480 + 0x80bf200 + r0w0e0 + ad0s1f + + 5 + 2066973184 + 4037057 + 1153465856 + 2252863 + + + + 0x80bf400 + 0x80bf200 + r0w0e0 + ad0s1e + + 4 + 524288000 + 1024000 + 629177856 + 1228863 + + + + 0x80bf380 + 0x80bf200 + r0w0e0 + ad0s1c + + 2 + 3220406784 + 6289857 + 32256 + 63 + + + + 0x80bf300 + 0x80bf200 + r0w0e0 + ad0s1b + + 1 + 524288000 + 1024000 + 104889856 + 204863 + + + + 0x80bf280 + 0x80bf200 + r0w0e0 + ad0s1a + + 0 + 104857600 + 204800 + 32256 + 63 + + + + + + 0x80711c0 + SIMDISK-method + + 0x80b9000 + 0x80711c0 + ad0 + 1 + + 0x80b9041 + 0x80b9000 + r0w0e0 + ad0 + + + + Property changes on: user/ngie/more-tests2/tools/regression/geom/ConfCmp/a1b.conf ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: user/ngie/more-tests2/tools/regression/geom/ConfCmp/a1c.conf =================================================================== --- user/ngie/more-tests2/tools/regression/geom/ConfCmp/a1c.conf (nonexistent) +++ user/ngie/more-tests2/tools/regression/geom/ConfCmp/a1c.conf (revision 293823) @@ -0,0 +1,414 @@ + + $FreeBSD$ + + 0x80712c0 + DEV-method + + 0x80bfd00 + 0x80712c0 + ad0s3d + 4 + + 0x80b9500 + 0x80bfd00 + 0x80bf880 + r0w0e0 + + + + 0x80bfc80 + 0x80712c0 + ad0s3c + 4 + + 0x80b94c0 + 0x80bfc80 + 0x80bf800 + r0w0e0 + + + + 0x80bfc00 + 0x80712c0 + ad0s3a + 4 + + 0x80b9480 + 0x80bfc00 + 0x80bf780 + r0w0e0 + + + + 0x80bfb80 + 0x80712c0 + ad0s2c + 4 + + 0x80b9440 + 0x80bfb80 + 0x80bf600 + r0w0e0 + + + + 0x80bfb00 + 0x80712c0 + ad0s1f + 4 + + 0x80b9400 + 0x80bfb00 + 0x80bf480 + r0w0e0 + + + + 0x80bfa80 + 0x80712c0 + ad0s1e + 4 + + 0x80b93c0 + 0x80bfa80 + 0x80bf400 + r0w0e0 + + + + 0x80bfa00 + 0x80712c0 + ad0s1c + 4 + + 0x80b9380 + 0x80bfa00 + 0x80bf380 + r0w0e0 + + + + 0x80bf980 + 0x80712c0 + ad0s1b + 4 + + 0x80b9340 + 0x80bf980 + 0x80bf300 + r0w0e0 + + + + 0x80bf900 + 0x80712c0 + ad0s1a + 4 + + 0x80b9300 + 0x80bf900 + 0x80bf280 + r0w0e0 + + + + 0x80bf680 + 0x80712c0 + ad0s3 + 3 + + 0x80b9280 + 0x80bf680 + 0x80bf100 + r0w0e0 + + + + 0x80bf500 + 0x80712c0 + ad0s2 + 3 + + 0x80b9200 + 0x80bf500 + 0x80bf080 + r0w0e0 + + + + 0x80bf180 + 0x80712c0 + ad0s1 + 3 + + 0x80b9180 + 0x80bf180 + 0x80bf000 + r0w0e0 + + + + 0x80b9080 + 0x80712c0 + ad0 + 2 + + 0x80b90c0 + 0x80b9080 + 0x80b9040 + r0w0e0 + + + + + 0x8071280 + MBREXT-method + + + 0x8071260 + MBR-method + + 0x80b9100 + 0x8071260 + ad0 + 2 + + + + 0x80b9140 + 0x80b9100 + 0x80b9040 + r0w0e0 + + + + + 0x80bf100 + 0x80b9100 + r0w0e0 + ad0s3 + + 2 + 8585256960 + 16768080 + 8585256960 + 16768080 + 165 + + + + 0x80bf080 + 0x80b9100 + r0w0e0 + ad0s2 + + 1 + 5364817920 + 10478160 + 3220439040 + 6289920 + 165 + + + + 0x80bf000 + 0x80b9100 + r0w0e0 + ad0s1 + + 0 + 3220406784 + 6289857 + 32256 + 63 + 165 + + + + + + 0x80712a0 + BSD-method + + 0x80bf700 + 0x80712a0 + ad0s3 + 3 + + + + 0x80b92c0 + 0x80bf700 + 0x80bf100 + r0w0e0 + + + + + 0x80bf880 + 0x80bf700 + r0w0e0 + ad0s3d + + 3 + 6488104960 + 12672080 + 10682408960 + 20864080 + + + + 0x80bf800 + 0x80bf700 + r0w0e0 + ad0s3c + + 2 + 8585256960 + 16768080 + 8585256960 + 16768080 + + + + 0x80bf780 + 0x80bf700 + r0w0e0 + ad0s3a + + 0 + 2097152000 + 4096000 + 8585256960 + 16768080 + + + + + 0x80bf580 + 0x80712a0 + ad0s2 + 3 + + + + 0x80b9240 + 0x80bf580 + 0x80bf080 + r0w0e0 + + + + + 0x80bf600 + 0x80bf580 + r0w0e0 + ad0s2c + + 2 + 5364817920 + 10478160 + 3220439040 + 6289920 + + + + + 0x80bf200 + 0x80712a0 + ad0s1 + 3 + + + + 0x80b91c0 + 0x80bf200 + 0x80bf000 + r0w0e0 + + + + + 0x80bf480 + 0x80bf200 + r0w0e0 + ad0s1f + + 5 + 2066973184 + 4037057 + 1153465856 + 2252863 + + + + 0x80bf400 + 0x80bf200 + r0w0e0 + ad0s1e + + 4 + 524288000 + 1024000 + 629177856 + 1228863 + + + + 0x80bf380 + 0x80bf200 + r0w0e0 + ad0s1c + + 2 + 3220406784 + 6289857 + 32256 + 63 + + + + 0x80bf300 + 0x80bf200 + r0w0e0 + ad0s1b + + 1 + 524288000 + 1024000 + 104889856 + 204863 + + + + 0x80bf280 + 0x80bf200 + r0w0e0 + ad0s1a + + 0 + 104857600 + 204800 + 32256 + 63 + + + + + + 0x80711c0 + SIMDISK-method + + 0x80b9000 + 0x80711c0 + ad0 + 1 + + 0x80b9040 + 0x80b9000 + r0w0e1 + ad0 + + + + Property changes on: user/ngie/more-tests2/tools/regression/geom/ConfCmp/a1c.conf ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: user/ngie/more-tests2/tools/regression/geom/ConfCmp/a1d.conf =================================================================== --- user/ngie/more-tests2/tools/regression/geom/ConfCmp/a1d.conf (nonexistent) +++ user/ngie/more-tests2/tools/regression/geom/ConfCmp/a1d.conf (revision 293823) @@ -0,0 +1,414 @@ + + $FreeBSD$ + + 0x80712c0 + DEV-method + + 0x80bfd00 + 0x80712c0 + ad0s3d + 4 + + 0x80b9500 + 0x80bfd00 + 0x80bf880 + r0w0e0 + + + + 0x80bfc80 + 0x80712c0 + ad0s3c + 4 + + 0x80b94c0 + 0x80bfc80 + 0x80bf800 + r0w0e0 + + + + 0x80bfc00 + 0x80712c0 + ad0s3a + 4 + + 0x80b9480 + 0x80bfc00 + 0x80bf780 + r0w0e0 + + + + 0x80bfb80 + 0x80712c0 + ad0s2c + 4 + + 0x80b9440 + 0x80bfb80 + 0x80bf600 + r0w0e0 + + + + 0x80bfb00 + 0x80712c0 + ad0s1f + 4 + + 0x80b9400 + 0x80bfb00 + 0x80bf480 + r0w0e0 + + + + 0x80bfa80 + 0x80712c0 + ad0s1e + 4 + + 0x80b93c0 + 0x80bfa80 + 0x80bf400 + r0w0e0 + + + + 0x80bfa00 + 0x80712c0 + ad0s1c + 4 + + 0x80b9380 + 0x80bfa00 + 0x80bf380 + r0w0e0 + + + + 0x80bf980 + 0x80712c0 + ad0s1b + 4 + + 0x80b9340 + 0x80bf980 + 0x80bf300 + r0w0e0 + + + + 0x80bf900 + 0x80712c0 + ad0s1a + 4 + + 0x80b9300 + 0x80bf900 + 0x80bf280 + r0w0e0 + + + + 0x80bf680 + 0x80712c0 + ad0s3 + 3 + + 0x80b9280 + 0x80bf680 + 0x80bf100 + r0w0e0 + + + + 0x80bf500 + 0x80712c0 + ad0s2 + 3 + + 0x80b9200 + 0x80bf500 + 0x80bf080 + r0w0e0 + + + + 0x80bf180 + 0x80712c0 + ad0s1 + 3 + + 0x80b9180 + 0x80bf180 + 0x80bf000 + r0w0e0 + + + + 0x80b9080 + 0x80712c0 + ad0 + 2 + + 0x80b90c0 + 0x80b9080 + 0x80b9040 + r0w0e0 + + + + + 0x8071280 + MBREXT-method + + + 0x8071260 + MBR-method + + 0x80b9100 + 0x8071260 + ad0 + 2 + + + + 0x80b9140 + 0x80b9100 + 0x80b9040 + r0w0e0 + + + + + 0x80bf100 + 0x80b9100 + r0w0e0 + ad0s3 + + 2 + 8585256960 + 16768080 + 8585256960 + 16768080 + 165 + + + + 0x80bf080 + 0x80b9100 + r0w0e0 + ad0s2 + + 1 + 5364817920 + 10478160 + 3220439040 + 6289920 + 165 + + + + 0x80bf000 + 0x80b9100 + r0w0e0 + ad0s1 + + 0 + 3220406784 + 6289857 + 32256 + 63 + 165 + + + + + + 0x80712a0 + BSD-method + + 0x80bf700 + 0x80712a0 + ad0s3 + 3 + + + + 0x80b92c0 + 0x80bf700 + 0x80bf100 + r0w0e0 + + + + + 0x80bf880 + 0x80bf700 + r0w0e0 + ad0s3d + + 3 + 6488104960 + 12672080 + 10682408960 + 20864080 + + + + 0x80bf800 + 0x80bf700 + r0w0e0 + ad0s3c + + 2 + 8585256960 + 16768080 + 8585256960 + 16768080 + + + + 0x80bf780 + 0x80bf700 + r0w0e0 + ad0s3a + + 0 + 2097152000 + 4096000 + 8585256960 + 16768080 + + + + + 0x80bf580 + 0x80712a0 + ad0s2 + 3 + + + + 0x80b9240 + 0x80bf580 + 0x80bf080 + r0w0e0 + + + + + 0x80bf600 + 0x80bf580 + r0w0e0 + ad0s2c + + 2 + 5364817920 + 10478160 + 3220439040 + 6289920 + + + + + 0x80bf200 + 0x80712a0 + ad0s1 + 3 + + + + 0x80b91c0 + 0x80bf200 + 0x80bf000 + r0w0e0 + + + + + 0x80bf480 + 0x80bf200 + r0w0e0 + ad0s1f + + 5 + 2066973184 + 4037057 + 1153465856 + 2252863 + + + + 0x80bf400 + 0x80bf200 + r0w0e0 + ad0s1e + + 4 + 524288000 + 1024000 + 629177856 + 1228863 + + + + 0x80bf380 + 0x80bf200 + r0w0e0 + ad0s1c + + 2 + 3220406784 + 6289857 + 32256 + 63 + + + + 0x80bf300 + 0x80bf200 + r0w0e0 + ad0s1b + + 1 + 524288000 + 1024000 + 104889856 + 204863 + + + + 0x80bf280 + 0x80bf200 + r0w0e0 + ad0s1a + + 0 + 104857600 + 204800 + 32256 + 63 + + + + + + 0x80711c0 + SIMDISK-method + + 0x80b9000 + 0x80711c0 + ad0 + 1 + + 0x80b9040 + 0x80b9000 + r0w0e0 + ad0 + + + + Property changes on: user/ngie/more-tests2/tools/regression/geom/ConfCmp/a1d.conf ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: user/ngie/more-tests2/tools/regression/geom/MdLoad/Makefile =================================================================== --- user/ngie/more-tests2/tools/regression/geom/MdLoad/Makefile (nonexistent) +++ user/ngie/more-tests2/tools/regression/geom/MdLoad/Makefile (revision 293823) @@ -0,0 +1,13 @@ +# $FreeBSD$ + +PROG= MdLoad +LIBADD= sbuf bsdxml + +MAN= + + +WARNS?= 4 +.include "bsd.prog.mk" + +test: ${PROG} + ./${PROG} md34 ../Data/disk.critter.ad0.xml Property changes on: user/ngie/more-tests2/tools/regression/geom/MdLoad/Makefile ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: user/ngie/more-tests2/tools/regression/geom/MdLoad/MdLoad.c =================================================================== --- user/ngie/more-tests2/tools/regression/geom/MdLoad/MdLoad.c (nonexistent) +++ user/ngie/more-tests2/tools/regression/geom/MdLoad/MdLoad.c (revision 293823) @@ -0,0 +1,271 @@ +/*- + * Copyright (c) 2003 Poul-Henning Kamp + * Copyright (c) 2002 Networks Associates Technology, Inc. + * All rights reserved. + * + * This software was developed for the FreeBSD Project by Poul-Henning Kamp + * and NAI Labs, the Security Research Division of Network Associates, Inc. + * under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the + * DARPA CHATS research program. + * + * 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. The names of the authors may not be used to endorse or promote + * products derived from this software without specific prior written + * permission. + * + * 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$ + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +struct sector { + LIST_ENTRY(sector) sectors; + off_t offset; + unsigned char *data; +}; + +struct simdisk_softc { + int sectorsize; + off_t mediasize; + off_t lastsector; + LIST_HEAD(,sector) sectors; + struct sbuf *sbuf; + struct sector *sp; + u_int fwsectors; + u_int fwheads; + u_int fwcylinders; +}; + +static void +g_simdisk_insertsector(struct simdisk_softc *sc, struct sector *dsp) +{ + struct sector *dsp2, *dsp3; + + if (sc->lastsector < dsp->offset) + sc->lastsector = dsp->offset; + if (LIST_EMPTY(&sc->sectors)) { + LIST_INSERT_HEAD(&sc->sectors, dsp, sectors); + return; + } + dsp3 = NULL; + LIST_FOREACH(dsp2, &sc->sectors, sectors) { + dsp3 = dsp2; + if (dsp2->offset > dsp->offset) { + LIST_INSERT_BEFORE(dsp2, dsp, sectors); + return; + } + } + LIST_INSERT_AFTER(dsp3, dsp, sectors); +} + +static void +startElement(void *userData, const char *name, const char **atts __unused) +{ + struct simdisk_softc *sc; + + sc = userData; + if (!strcasecmp(name, "sector")) { + sc->sp = calloc(1, sizeof(*sc->sp) + sc->sectorsize); + sc->sp->data = (u_char *)(sc->sp + 1); + } + sbuf_clear(sc->sbuf); +} + +static void +endElement(void *userData, const char *name) +{ + struct simdisk_softc *sc; + char *p; + u_char *q; + int i, j; + off_t o; + + sc = userData; + + if (!strcasecmp(name, "comment")) { + sbuf_clear(sc->sbuf); + return; + } + sbuf_finish(sc->sbuf); + if (!strcasecmp(name, "sectorsize")) { + sc->sectorsize = strtoul(sbuf_data(sc->sbuf), &p, 0); + if (*p != '\0') + errx(1, "strtoul croaked on sectorsize"); + } else if (!strcasecmp(name, "mediasize")) { + o = strtoull(sbuf_data(sc->sbuf), &p, 0); + if (*p != '\0') + errx(1, "strtoul croaked on mediasize"); + if (o > 0) + sc->mediasize = o; + } else if (!strcasecmp(name, "fwsectors")) { + sc->fwsectors = strtoul(sbuf_data(sc->sbuf), &p, 0); + if (*p != '\0') + errx(1, "strtoul croaked on fwsectors"); + } else if (!strcasecmp(name, "fwheads")) { + sc->fwheads = strtoul(sbuf_data(sc->sbuf), &p, 0); + if (*p != '\0') + errx(1, "strtoul croaked on fwheads"); + } else if (!strcasecmp(name, "fwcylinders")) { + sc->fwcylinders = strtoul(sbuf_data(sc->sbuf), &p, 0); + if (*p != '\0') + errx(1, "strtoul croaked on fwcylinders"); + } else if (!strcasecmp(name, "offset")) { + sc->sp->offset= strtoull(sbuf_data(sc->sbuf), &p, 0); + if (*p != '\0') + errx(1, "strtoul croaked on offset"); + } else if (!strcasecmp(name, "fill")) { + j = strtoul(sbuf_data(sc->sbuf), NULL, 16); + memset(sc->sp->data, j, sc->sectorsize); + } else if (!strcasecmp(name, "hexdata")) { + q = sc->sp->data; + p = sbuf_data(sc->sbuf); + for (i = 0; i < sc->sectorsize; i++) { + if (!isxdigit(*p)) + errx(1, "I croaked on hexdata %d:(%02x)", i, *p); + if (isdigit(*p)) + j = (*p - '0') << 4; + else + j = (tolower(*p) - 'a' + 10) << 4; + p++; + if (!isxdigit(*p)) + errx(1, "I croaked on hexdata %d:(%02x)", i, *p); + if (isdigit(*p)) + j |= *p - '0'; + else + j |= tolower(*p) - 'a' + 10; + p++; + *q++ = j; + } + } else if (!strcasecmp(name, "sector")) { + g_simdisk_insertsector(sc, sc->sp); + sc->sp = NULL; + } else if (!strcasecmp(name, "diskimage")) { + } else if (!strcasecmp(name, "FreeBSD")) { + } else { + printf("<%s>[[%s]]\n", name, sbuf_data(sc->sbuf)); + } + sbuf_clear(sc->sbuf); +} + +static void +characterData(void *userData, const XML_Char *s, int len) +{ + const char *b, *e; + struct simdisk_softc *sc; + + sc = userData; + b = s; + e = s + len - 1; + while (isspace(*b) && b < e) + b++; + while (isspace(*e) && e > b) + e--; + if (e != b || !isspace(*b)) + sbuf_bcat(sc->sbuf, b, e - b + 1); +} + +static struct simdisk_softc * +g_simdisk_xml_load(const char *file) +{ + XML_Parser parser = XML_ParserCreate(NULL); + struct stat st; + char *p; + struct simdisk_softc *sc; + int fd, i; + + sc = calloc(1, sizeof *sc); + sc->sbuf = sbuf_new_auto(); + LIST_INIT(&sc->sectors); + XML_SetUserData(parser, sc); + XML_SetElementHandler(parser, startElement, endElement); + XML_SetCharacterDataHandler(parser, characterData); + + fd = open(file, O_RDONLY); + if (fd < 0) + err(1, file); + fstat(fd, &st); + p = mmap(NULL, st.st_size, PROT_READ, MAP_NOCORE|MAP_PRIVATE, fd, 0); + i = XML_Parse(parser, p, st.st_size, 1); + if (i != 1) + errx(1, "XML_Parse complains: return %d", i); + munmap(p, st.st_size); + close(fd); + XML_ParserFree(parser); + return (sc); +} + +int +main(int argc, char **argv) +{ + struct simdisk_softc *sc; + char buf[BUFSIZ]; + int error, fd; + struct sector *dsp; + + if (argc != 3) + errx(1, "Usage: %s mddevice xmlfile", argv[0]); + + sc = g_simdisk_xml_load(argv[2]); + if (sc->mediasize == 0) + sc->mediasize = sc->lastsector + sc->sectorsize * 10; + if (sc->sectorsize == 0) + sc->sectorsize = 512; + sprintf(buf, "mdconfig -a -t malloc -s %jd -S %d", + (intmax_t)sc->mediasize / sc->sectorsize, sc->sectorsize); + if (sc->fwsectors && sc->fwheads) + sprintf(buf + strlen(buf), " -x %d -y %d", + sc->fwsectors, sc->fwheads); + sprintf(buf + strlen(buf), " -u %s", argv[1]); + error = system(buf); + if (error) + return (error); + fd = open(argv[1], O_RDWR); + if (fd < 0 && errno == ENOENT) { + sprintf(buf, "%s%s", _PATH_DEV, argv[1]); + fd = open(buf, O_RDWR); + } + if (fd < 0) + err(1, "Could not open %s", argv[1]); + LIST_FOREACH(dsp, &sc->sectors, sectors) { + lseek(fd, dsp->offset, SEEK_SET); + error = write(fd, dsp->data, sc->sectorsize); + if (error != sc->sectorsize) + err(1, "write sectordata failed"); + } + close(fd); + exit (0); +} Property changes on: user/ngie/more-tests2/tools/regression/geom/MdLoad/MdLoad.c ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: user/ngie/more-tests2/tools/regression/geom/RunTest.t =================================================================== --- user/ngie/more-tests2/tools/regression/geom/RunTest.t (nonexistent) +++ user/ngie/more-tests2/tools/regression/geom/RunTest.t (revision 293823) @@ -0,0 +1,50 @@ +#!/bin/sh +# $FreeBSD$ + +MD=34 +TMP=/tmp/$$ + +set -e + +# Start from the right directory so we can find all our data files. +cd `dirname $0` + +(cd MdLoad && make) > /dev/null 2>&1 + +# Print the test header +echo -n '1..' +echo `ls -1 Data/disk.*.xml | wc -l` + +for f in Data/disk.*.xml +do + b=`basename $f` + mdconfig -d -u $MD > /dev/null 2>&1 || true + if [ -c /dev/md$MD ] ; then + sleep 1 + fi + if [ -c /dev/md$MD ] ; then + sleep 1 + fi + if [ -c /dev/md$MD ] ; then + echo "Bail out!" + echo "/dev/md$MD is busy" + exit 1 + fi + MdLoad/MdLoad md${MD} $f + if [ -f Ref/$b ] ; then + if diskinfo /dev/md${MD}* | + diff -I '$FreeBSD' -u Ref/$b - > $TMP; then + echo "ok - $b" + else + echo "not ok - $b" + sed 's/^/# /' $TMP + fi + else + diskinfo /dev/md${MD}* > Ref/`basename $f` + fi +done + +mdconfig -d -u $MD > /dev/null 2>&1 || true +rm -f $TMP + +exit 0 Property changes on: user/ngie/more-tests2/tools/regression/geom/RunTest.t ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: user/ngie/more-tests2/tools/regression/geom/RunTest.sh =================================================================== --- user/ngie/more-tests2/tools/regression/geom/RunTest.sh (nonexistent) +++ user/ngie/more-tests2/tools/regression/geom/RunTest.sh (revision 293823) @@ -0,0 +1,44 @@ +#!/bin/sh +# $FreeBSD$ + +MD=34 +TMP=/tmp/$$ + +set -e + +r=0 + +(cd MdLoad && make) > /dev/null 2>&1 + +for f in Data/disk.*.xml +do + b=`basename $f` + mdconfig -d -u $MD > /dev/null 2>&1 || true + if [ -c /dev/md$MD ] ; then + sleep 1 + fi + if [ -c /dev/md$MD ] ; then + sleep 1 + fi + if [ -c /dev/md$MD ] ; then + echo "/dev/md$MD is busy" 1>&2 + exit 1 + fi + MdLoad/MdLoad md${MD} $f + if [ -f Ref/$b ] ; then + if diskinfo /dev/md${MD}* | + diff -I '$FreeBSD' -u Ref/$b - > $TMP; then + echo "PASSED: $b" + else + echo "FAILED: $b" + sed 's/^/ /' $TMP + r=2; + fi + else + diskinfo /dev/md${MD}* > Ref/`basename $f` + fi +done + +mdconfig -d -u $MD > /dev/null 2>&1 || true +rm -f $TMP +exit $r Property changes on: user/ngie/more-tests2/tools/regression/geom/RunTest.sh ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: user/ngie/more-tests2/tools/regression/geom/Ref/disk.apple.xml =================================================================== --- user/ngie/more-tests2/tools/regression/geom/Ref/disk.apple.xml (nonexistent) +++ user/ngie/more-tests2/tools/regression/geom/Ref/disk.apple.xml (revision 293823) @@ -0,0 +1,5 @@ +$FreeBSD$ +/dev/md34 512 366530560 715880 +/dev/md34s1 512 366481408 715784 +/dev/md34s2 512 32256 63 +/dev/md34s3 512 16384 32 Property changes on: user/ngie/more-tests2/tools/regression/geom/Ref/disk.apple.xml ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: user/ngie/more-tests2/tools/regression/geom/Ref/disk.pc98.wdc0.xml =================================================================== --- user/ngie/more-tests2/tools/regression/geom/Ref/disk.pc98.wdc0.xml (nonexistent) +++ user/ngie/more-tests2/tools/regression/geom/Ref/disk.pc98.wdc0.xml (revision 293823) @@ -0,0 +1,8 @@ +$FreeBSD$ +/dev/md34 512 75264 147 1 8 17 +/dev/md34s1 512 1626603520 3176960 23360 8 17 +/dev/md34s1a 512 78643200 153600 1129 8 17 +/dev/md34s1b 512 104857600 204800 1505 8 17 +/dev/md34s1c 512 1626603520 3176960 23360 8 17 +/dev/md34s1e 512 52428800 102400 752 8 17 +/dev/md34s1f 512 1390673920 2716160 19971 8 17 Property changes on: user/ngie/more-tests2/tools/regression/geom/Ref/disk.pc98.wdc0.xml ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: user/ngie/more-tests2/tools/regression/geom/Ref/disk.alpha.da0.xml =================================================================== --- user/ngie/more-tests2/tools/regression/geom/Ref/disk.alpha.da0.xml (nonexistent) +++ user/ngie/more-tests2/tools/regression/geom/Ref/disk.alpha.da0.xml (revision 293823) @@ -0,0 +1,7 @@ +$FreeBSD$ +/dev/md34 512 5120 10 +/dev/md34a 512 251658240 491520 +/dev/md34b 512 1086291968 2121664 +/dev/md34c 512 18309995520 35761710 +/dev/md34e 512 20971520 40960 +/dev/md34f 512 16951073792 33107566 Property changes on: user/ngie/more-tests2/tools/regression/geom/Ref/disk.alpha.da0.xml ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: user/ngie/more-tests2/tools/regression/geom/Ref/disk.alpha2.da0.xml =================================================================== --- user/ngie/more-tests2/tools/regression/geom/Ref/disk.alpha2.da0.xml (nonexistent) +++ user/ngie/more-tests2/tools/regression/geom/Ref/disk.alpha2.da0.xml (revision 293823) @@ -0,0 +1,5 @@ +$FreeBSD$ +/dev/md34 512 5120 10 +/dev/md34a 512 24675840 48195 +/dev/md34b 512 4178442240 8161020 +/dev/md34c 512 74027520 144585 Property changes on: user/ngie/more-tests2/tools/regression/geom/Ref/disk.alpha2.da0.xml ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: user/ngie/more-tests2/tools/regression/geom/Ref/disk.beast.da0.xml =================================================================== --- user/ngie/more-tests2/tools/regression/geom/Ref/disk.beast.da0.xml (nonexistent) +++ user/ngie/more-tests2/tools/regression/geom/Ref/disk.beast.da0.xml (revision 293823) @@ -0,0 +1,5 @@ +$FreeBSD$ +/dev/md34 512 5120 10 +/dev/md34a 512 4064280576 7938048 +/dev/md34b 512 270925824 529152 +/dev/md34c 512 4335206400 8467200 Property changes on: user/ngie/more-tests2/tools/regression/geom/Ref/disk.beast.da0.xml ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: user/ngie/more-tests2/tools/regression/geom/Ref/disk.critter.ad0.xml =================================================================== --- user/ngie/more-tests2/tools/regression/geom/Ref/disk.critter.ad0.xml (nonexistent) +++ user/ngie/more-tests2/tools/regression/geom/Ref/disk.critter.ad0.xml (revision 293823) @@ -0,0 +1,11 @@ +$FreeBSD$ +/dev/md34 512 2671841280 5218440 +/dev/md34s1 512 20003848704 39070017 +/dev/md34s1a 512 1073741824 2097152 +/dev/md34s1b 512 1073741824 2097152 +/dev/md34s1c 512 20003848704 39070017 +/dev/md34s1d 512 4447175168 8685889 +/dev/md34s1e 512 524288000 1024000 +/dev/md34s1f 512 4294967296 8388608 +/dev/md34s1g 512 3221225472 6291456 +/dev/md34s1h 512 5368709120 10485760 Property changes on: user/ngie/more-tests2/tools/regression/geom/Ref/disk.critter.ad0.xml ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: user/ngie/more-tests2/tools/regression/geom/Ref/disk.empty.flp.xml =================================================================== --- user/ngie/more-tests2/tools/regression/geom/Ref/disk.empty.flp.xml (nonexistent) +++ user/ngie/more-tests2/tools/regression/geom/Ref/disk.empty.flp.xml (revision 293823) @@ -0,0 +1,2 @@ +$FreeBSD$ +/dev/md34 512 1474560 2880 80 2 18 Property changes on: user/ngie/more-tests2/tools/regression/geom/Ref/disk.empty.flp.xml ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: user/ngie/more-tests2/tools/regression/geom/Ref/disk.far.ad0.xml =================================================================== --- user/ngie/more-tests2/tools/regression/geom/Ref/disk.far.ad0.xml (nonexistent) +++ user/ngie/more-tests2/tools/regression/geom/Ref/disk.far.ad0.xml (revision 293823) @@ -0,0 +1,4 @@ +$FreeBSD$ +/dev/md34 512 5632 11 +/dev/md34s1 512 296821760 579730 +/dev/md34s2 512 4564740096 8915508 Property changes on: user/ngie/more-tests2/tools/regression/geom/Ref/disk.far.ad0.xml ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: user/ngie/more-tests2/tools/regression/geom/Ref/disk.flat.da1.xml =================================================================== --- user/ngie/more-tests2/tools/regression/geom/Ref/disk.flat.da1.xml (nonexistent) +++ user/ngie/more-tests2/tools/regression/geom/Ref/disk.flat.da1.xml (revision 293823) @@ -0,0 +1,12 @@ +$FreeBSD$ +/dev/md34 512 37888 74 +/dev/md34a 512 37748736 73728 +/dev/md34b 512 268435456 524288 +/dev/md34c 512 8422686720 16450560 +/dev/md34h 512 8115978240 15851520 +/dev/md34s1 512 18367017984 35873082 +/dev/md34s1b 512 419430400 819200 +/dev/md34s1c 512 18367017984 35873082 +/dev/md34s1e 512 419430400 819200 +/dev/md34s1f 512 1073741824 2097152 +/dev/md34s1g 512 16454415360 32137530 Property changes on: user/ngie/more-tests2/tools/regression/geom/Ref/disk.flat.da1.xml ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: user/ngie/more-tests2/tools/regression/geom/Ref/disk.kern.flp.xml =================================================================== --- user/ngie/more-tests2/tools/regression/geom/Ref/disk.kern.flp.xml (nonexistent) +++ user/ngie/more-tests2/tools/regression/geom/Ref/disk.kern.flp.xml (revision 293823) @@ -0,0 +1,5 @@ +$FreeBSD$ +/dev/md34 512 5632 11 +/dev/md34a 512 1474560 2880 +/dev/md34b 512 1474560 2880 +/dev/md34c 512 1474560 2880 Property changes on: user/ngie/more-tests2/tools/regression/geom/Ref/disk.kern.flp.xml ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: user/ngie/more-tests2/tools/regression/geom/Ref/disk.msdos.ext.xml =================================================================== --- user/ngie/more-tests2/tools/regression/geom/Ref/disk.msdos.ext.xml (nonexistent) +++ user/ngie/more-tests2/tools/regression/geom/Ref/disk.msdos.ext.xml (revision 293823) @@ -0,0 +1,27 @@ +$FreeBSD$ +/dev/md34 512 2327759360 4546405 +/dev/md34s1 512 2146765824 4192902 +/dev/md34s10 512 8193024 16002 +/dev/md34s11 512 8193024 16002 +/dev/md34s12 512 8193024 16002 +/dev/md34s13 512 8193024 16002 +/dev/md34s14 512 8193024 16002 +/dev/md34s15 512 8193024 16002 +/dev/md34s16 512 8193024 16002 +/dev/md34s17 512 8193024 16002 +/dev/md34s18 512 8193024 16002 +/dev/md34s19 512 8193024 16002 +/dev/md34s2 512 427714560 835380 +/dev/md34s20 512 8193024 16002 +/dev/md34s21 512 8193024 16002 +/dev/md34s22 512 8193024 16002 +/dev/md34s23 512 8193024 16002 +/dev/md34s24 512 8193024 16002 +/dev/md34s25 512 8193024 16002 +/dev/md34s26 512 8193024 16002 +/dev/md34s27 512 8193024 16002 +/dev/md34s5 512 8193024 16002 +/dev/md34s6 512 8193024 16002 +/dev/md34s7 512 8193024 16002 +/dev/md34s8 512 8193024 16002 +/dev/md34s9 512 8193024 16002 Property changes on: user/ngie/more-tests2/tools/regression/geom/Ref/disk.msdos.ext.xml ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: user/ngie/more-tests2/tools/regression/geom/Ref/disk.msdos.flp.xml =================================================================== --- user/ngie/more-tests2/tools/regression/geom/Ref/disk.msdos.flp.xml (nonexistent) +++ user/ngie/more-tests2/tools/regression/geom/Ref/disk.msdos.flp.xml (revision 293823) @@ -0,0 +1,2 @@ +$FreeBSD$ +/dev/md34 512 5632 11 Property changes on: user/ngie/more-tests2/tools/regression/geom/Ref/disk.msdos.flp.xml ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: user/ngie/more-tests2/tools/regression/geom/Ref/disk.sun.da0.xml =================================================================== --- user/ngie/more-tests2/tools/regression/geom/Ref/disk.sun.da0.xml (nonexistent) +++ user/ngie/more-tests2/tools/regression/geom/Ref/disk.sun.da0.xml (revision 293823) @@ -0,0 +1,6 @@ +$FreeBSD$ +/dev/md34 512 5120 10 +/dev/md34a 512 1529708544 2987712 +/dev/md34b 512 539320320 1053360 +/dev/md34c 512 36698296320 71676360 +/dev/md34h 512 34629267456 67635288 Property changes on: user/ngie/more-tests2/tools/regression/geom/Ref/disk.sun.da0.xml ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: user/ngie/more-tests2/tools/regression/geom/Ref/disk.sun.da1.xml =================================================================== --- user/ngie/more-tests2/tools/regression/geom/Ref/disk.sun.da1.xml (nonexistent) +++ user/ngie/more-tests2/tools/regression/geom/Ref/disk.sun.da1.xml (revision 293823) @@ -0,0 +1,9 @@ +$FreeBSD$ +/dev/md34 512 5120 10 +/dev/md34a 512 262967296 513608 +/dev/md34b 512 1075994624 2101552 +/dev/md34c 512 18108555264 35368272 +/dev/md34d 512 11124240384 21727032 +/dev/md34f 512 2149576704 4198392 +/dev/md34g 512 2149576704 4198392 +/dev/md34h 512 1343787008 2624584 Property changes on: user/ngie/more-tests2/tools/regression/geom/Ref/disk.sun.da1.xml ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: user/ngie/more-tests2/tools/regression/geom/Ref/disk.typo.ad0.xml =================================================================== --- user/ngie/more-tests2/tools/regression/geom/Ref/disk.typo.ad0.xml (nonexistent) +++ user/ngie/more-tests2/tools/regression/geom/Ref/disk.typo.ad0.xml (revision 293823) @@ -0,0 +1,14 @@ +$FreeBSD$ +/dev/md34 512 8585262592 16768091 +/dev/md34s1 512 3220406784 6289857 +/dev/md34s1a 512 104857600 204800 +/dev/md34s1b 512 524288000 1024000 +/dev/md34s1c 512 3220406784 6289857 +/dev/md34s1e 512 524288000 1024000 +/dev/md34s1f 512 2066973184 4037057 +/dev/md34s2 512 5364817920 10478160 +/dev/md34s2c 512 5364817920 10478160 +/dev/md34s3 512 8585256960 16768080 +/dev/md34s3a 512 2097152000 4096000 +/dev/md34s3c 512 8585256960 16768080 +/dev/md34s3d 512 6488104960 12672080 Property changes on: user/ngie/more-tests2/tools/regression/geom/Ref/disk.typo.ad0.xml ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: user/ngie/more-tests2/tools/regression/geom/Data/disk.apple.xml =================================================================== --- user/ngie/more-tests2/tools/regression/geom/Data/disk.apple.xml (nonexistent) +++ user/ngie/more-tests2/tools/regression/geom/Data/disk.apple.xml (revision 293823) @@ -0,0 +1,93 @@ + + + $FreeBSD$ + 512 + 366530560 + 0 + 0 + 0 + + 0 + + 45520200000aec68000100010000000000010000004000120001000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + + + + 512 + + 504d00000000000300000060000aec084d61634f530000000000000000000000 + 000000000000000000000000000000004170706c655f48465300000000000000 + 0000000000000000000000000000000000000000000aec08000000b700000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + + + + 1024 + + 504d000000000003000000010000003f4170706c650000000000000000000000 + 000000000000000000000000000000004170706c655f706172746974696f6e5f + 6d617000000000000000000000000000000000000000003f0000003700000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + + + + 1536 + + 504d00000000000300000040000000204d6163696e746f736800000000000000 + 000000000000000000000000000000004170706c655f44726976657234330000 + 0000000000000000000000000000000000000000000000200000007f00000000 + 000023ee0000000000000000000000000000000000007c083638303030000000 + 0000000000000000000106000000000000000001000700000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + + + Property changes on: user/ngie/more-tests2/tools/regression/geom/Data/disk.apple.xml ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: user/ngie/more-tests2/tools/regression/geom/Data/disk.msdos.ext.xml =================================================================== --- user/ngie/more-tests2/tools/regression/geom/Data/disk.msdos.ext.xml (nonexistent) +++ user/ngie/more-tests2/tools/regression/geom/Data/disk.msdos.ext.xml (revision 293823) @@ -0,0 +1,534 @@ + + + + $FreeBSD$ + A MSDOS 6.22 disk with maximal number of extended partitions. + + 512 + 0 + + 0 + + fa33c08ed0bc007c8bf45007501ffbfcbf0006b90001f2a5ea1d060000bebe07 + b304803c80740e803c00751c83c610fecb75efcd188b148b4c028bee83c610fe + cb741a803c0074f4be8b06ac3c00740b56bb0700b40ecd105eebf0ebfebf0500 + bb007cb8010257cd135f730c33c0cd134f75edbea306ebd3bec206bffe7d813d + 55aa75c78bf5ea007c0000496e76616c696420706172746974696f6e20746162 + 6c65004572726f72206c6f6164696e67206f7065726174696e67207379737465 + 6d004d697373696e67206f7065726174696e672073797374656d000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000008001 + 010006fe7f043f00000086fa3f000000410505fe7f38c5fa3f0034bf0c000000 + 00000000000000000000000000000000000000000000000000000000000055aa + + + + 512 + + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + + + + 2146798080 + + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000001 + 410501fe7f053f000000823e00000000410605fe7f06c13e0000c13e00000000 + 00000000000000000000000000000000000000000000000000000000000055aa + + + + 2155023360 + + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000001 + 410601fe7f063f000000823e00000000410705fe7f07827d0000c13e00000000 + 00000000000000000000000000000000000000000000000000000000000055aa + + + + 2163248640 + + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000001 + 410701fe7f073f000000823e00000000410805fe7f0843bc0000c13e00000000 + 00000000000000000000000000000000000000000000000000000000000055aa + + + + 2171473920 + + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000001 + 410801fe7f083f000000823e00000000410905fe7f0904fb0000c13e00000000 + 00000000000000000000000000000000000000000000000000000000000055aa + + + + 2179699200 + + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000001 + 410901fe7f093f000000823e00000000410a05fe7f0ac5390100c13e00000000 + 00000000000000000000000000000000000000000000000000000000000055aa + + + + 2187924480 + + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000001 + 410a01fe7f0a3f000000823e00000000410b05fe7f0b86780100c13e00000000 + 00000000000000000000000000000000000000000000000000000000000055aa + + + + 2196149760 + + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000001 + 410b01fe7f0b3f000000823e00000000410c05fe7f0c47b70100c13e00000000 + 00000000000000000000000000000000000000000000000000000000000055aa + + + + 2204375040 + + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000001 + 410c01fe7f0c3f000000823e00000000410d05fe7f0d08f60100c13e00000000 + 00000000000000000000000000000000000000000000000000000000000055aa + + + + 2212600320 + + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000001 + 410d01fe7f0d3f000000823e00000000410e05fe7f0ec9340200c13e00000000 + 00000000000000000000000000000000000000000000000000000000000055aa + + + + 2220825600 + + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000001 + 410e01fe7f0e3f000000823e00000000410f05fe7f0f8a730200c13e00000000 + 00000000000000000000000000000000000000000000000000000000000055aa + + + + 2229050880 + + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000001 + 410f01fe7f0f3f000000823e00000000411005fe7f104bb20200c13e00000000 + 00000000000000000000000000000000000000000000000000000000000055aa + + + + 2237276160 + + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000001 + 411001fe7f103f000000823e00000000411105fe7f110cf10200c13e00000000 + 00000000000000000000000000000000000000000000000000000000000055aa + + + + 2245501440 + + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000001 + 411101fe7f113f000000823e00000000411205fe7f12cd2f0300c13e00000000 + 00000000000000000000000000000000000000000000000000000000000055aa + + + + 2253726720 + + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000001 + 411201fe7f123f000000823e00000000411305fe7f138e6e0300c13e00000000 + 00000000000000000000000000000000000000000000000000000000000055aa + + + + 2261952000 + + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000001 + 411301fe7f133f000000823e00000000411405fe7f144fad0300c13e00000000 + 00000000000000000000000000000000000000000000000000000000000055aa + + + + 2270177280 + + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000001 + 411401fe7f143f000000823e00000000411505fe7f1510ec0300c13e00000000 + 00000000000000000000000000000000000000000000000000000000000055aa + + + + 2278402560 + + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000001 + 411501fe7f153f000000823e00000000411605fe7f16d12a0400c13e00000000 + 00000000000000000000000000000000000000000000000000000000000055aa + + + + 2286627840 + + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000001 + 411601fe7f163f000000823e00000000411705fe7f1792690400c13e00000000 + 00000000000000000000000000000000000000000000000000000000000055aa + + + + 2294853120 + + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000001 + 411701fe7f173f000000823e00000000411805fe7f1853a80400c13e00000000 + 00000000000000000000000000000000000000000000000000000000000055aa + + + + 2303078400 + + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000001 + 411801fe7f183f000000823e00000000411905fe7f1914e70400c13e00000000 + 00000000000000000000000000000000000000000000000000000000000055aa + + + + 2311303680 + + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000001 + 411901fe7f193f000000823e00000000411a05fe7f1ad5250500c13e00000000 + 00000000000000000000000000000000000000000000000000000000000055aa + + + + 2319528960 + + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000001 + 411a01fe7f1a3f000000823e00000000411b05fe7f1b96640500c13e00000000 + 00000000000000000000000000000000000000000000000000000000000055aa + + + + 2327754240 + + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000001 + 411b01fe7f1b3f000000823e0000000000000000000000000000000000000000 + 00000000000000000000000000000000000000000000000000000000000055aa + + + Property changes on: user/ngie/more-tests2/tools/regression/geom/Data/disk.msdos.ext.xml ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: user/ngie/more-tests2/tools/regression/geom/Data/disk.pc98.wdc0.xml =================================================================== --- user/ngie/more-tests2/tools/regression/geom/Data/disk.pc98.wdc0.xml (nonexistent) +++ user/ngie/more-tests2/tools/regression/geom/Data/disk.pc98.wdc0.xml (revision 293823) @@ -0,0 +1,75 @@ + + + $FreeBSD$ + + A PC98 disklabel from Warner + + 512 + 0 + 17 + 8 + 0 + + 0 + + e9fd009049504c310000001ea08405b48ecd1ba820742232dbb414cd1b721a80 + fb847515e896007303eb6b90b424bb0004b93012ba4001cd1bbb0001b484cd1b + b40633c933d2508cc82dc0038ec05833edcd1b7241b406ba010081c50008cd1b + 7234ba0400f7c300aa7403ba0200b406bb001c81c50008cd1b721b508bc5b104 + d3e88cc103c18bf058e815002e89360a002eff1e0800e80800b40ecd1bb90100 + cb56a0840532dbb414cd1b720e80fb8475092ec606d40000e802005ec3b4b0be + d000ba06001e0e1fcd1bb4b0cd1b1fc31e000000010000000000000000000000 + 000000000000000000000000000000000000000000000000000000000d0055aa + fa601e066800d81f33f6b51e813c8b46750e817c0204eb7507817c05b4007405 + 46e2e9eb6032ff8a5c040358f18d7c03be9a012e015c03b00cba6104eeb002ba + 3d05ee68009807b95b00f32ea4b9ff0f33f633d226ad02f402d0e2f8f6def6da + 268914b416b3c2e4f0a840750680cc2080cb048ac3ba3f04ee8ac4ba3d05eeb0 + 08ba6104ee071f612ec7060000eb0a2ec70602009090fbe966fec390e8ebffb9 + 21007402b1118bc1f6660702460612e5912ef66703f7660403c183d200c3fec2 + 26881605205926880e0a20c390909090905191b81100502ef6670291f7f126a3 + 0220599233d2f7f12680260420f02608060420ebc9000000000080010d0055aa + + + + 512 + + 94c4000000000100000001000000405b46726565425344000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + + + + 70144 + + 5745568205000000776430733100000000000000000000000000000000000000 + 0000000000000000000200001100000008000000415b000088000000887a3000 + 0000000000000000100e01000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000005745568295f208000020000000200000005802008800000000000000 + 0700000000200300885802000000000001000000007a30008800000000000000 + 0000000000000000000000000000000000000000009001008878050000000000 + 0700000000722900880807000000000007000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + + + Property changes on: user/ngie/more-tests2/tools/regression/geom/Data/disk.pc98.wdc0.xml ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: user/ngie/more-tests2/tools/regression/geom/Data/disk.alpha.da0.xml =================================================================== --- user/ngie/more-tests2/tools/regression/geom/Data/disk.alpha.da0.xml (nonexistent) +++ user/ngie/more-tests2/tools/regression/geom/Data/disk.alpha.da0.xml (revision 293823) @@ -0,0 +1,33 @@ + + + $FreeBSD$ + + Yet an alpha disklabel. + + 512 + 0 + 0 + 0 + 0 + + 0 + + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 574556820400000057444947544c202000000000000000000000000000000000 + 0000000000000000000200003f000000ff000000b2080000c13e00002eae2102 + 0000000000000000100e01000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000057455682a22908000020000000200000008007000000000000040000 + 07081600c05f20000080070000000000010000002eae21020000000000000000 + 000000000000000000000000000000000000000000a00000c0df270000040000 + 070818006e2ef901c07f28000004000007081600000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0e0000000000000001000000000000000000000000000000c51a45ca2ad1dba8 + + + Property changes on: user/ngie/more-tests2/tools/regression/geom/Data/disk.alpha.da0.xml ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: user/ngie/more-tests2/tools/regression/geom/Data/disk.alpha2.da0.xml =================================================================== --- user/ngie/more-tests2/tools/regression/geom/Data/disk.alpha2.da0.xml (nonexistent) +++ user/ngie/more-tests2/tools/regression/geom/Data/disk.alpha2.da0.xml (revision 293823) @@ -0,0 +1,33 @@ + + + $FreeBSD$ + + alpha label which O'brien says blows up libdisk + + 512 + 0 + 0 + 0 + 0 + + 0 + + 5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a + 5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a + 5745568204000000000000000000000000000000000000000000000000000000 + 0000000000000000000200003f000000ff00000009020000c13e0000c9b67f00 + 0000000000000000100e01000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000005745568219cf0300002000000020000043bc0000c13e000000000000 + 08000000fc867c0004fb00000000000008000000c934020000827d0000000000 + 0100000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000000005a5a5a5a5a5a5a5a5a5a5a5a + 5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a + 5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a + 5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a + 5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a + 9800000000000000020000000000000000000000000000007a13ad55a1c382b0 + + + Property changes on: user/ngie/more-tests2/tools/regression/geom/Data/disk.alpha2.da0.xml ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: user/ngie/more-tests2/tools/regression/geom/Data/disk.beast.da0.xml =================================================================== --- user/ngie/more-tests2/tools/regression/geom/Data/disk.beast.da0.xml (nonexistent) +++ user/ngie/more-tests2/tools/regression/geom/Data/disk.beast.da0.xml (revision 293823) @@ -0,0 +1,33 @@ + + + + $FreeBSD$ + alpha BSD label from beast.freebsd.org + + 512 + 0 + 0 + 0 + 0 + + 0 + + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 5745568204000000646130000000000000000000000000000000000000000000 + 0000000000000000000200003f000000ff0000000f020000c13e000000338100 + 0000000000000000100e01000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000057455682594e08000020000000200000002079000000000000040000 + 0708100000130800002079000000000001000000003381000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0f0000000000000001000000000000000000000000000000fc8c1983a904da83 + + + Property changes on: user/ngie/more-tests2/tools/regression/geom/Data/disk.beast.da0.xml ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: user/ngie/more-tests2/tools/regression/geom/Data/disk.critter.ad0.xml =================================================================== --- user/ngie/more-tests2/tools/regression/geom/Data/disk.critter.ad0.xml (nonexistent) +++ user/ngie/more-tests2/tools/regression/geom/Data/disk.critter.ad0.xml (revision 293823) @@ -0,0 +1,178 @@ + + + + $FreeBSD$ + This image contains the MBR and disklabel sectors from my Asus M1300 + laptop. + + 512 + 0 + + 0 + + fc31c08ec08ed88ed0bc007cbe1a7cbf1a06b9e601f3a4e9008a31f6bbbe07b1 + 04382f74087f7885f6757489de80c310e2ef85f67502cd1880fa80720b8a3675 + 0480c68038f272028a1489e78a74018b4c02bb007c80feff753283f9ff752d51 + 53bbaa55b441cd13722081fb55aa751af6c10174155b666a0066ff740806536a + 016a1089e6b80042eb055b59b80102cd1389fc720f81bffe0155aa750cffe3be + bc06eb11bed406eb0cbef306eb07bb0700b40ecd10ac84c075f4ebfe496e7661 + 6c696420706172746974696f6e207461626c65004572726f72206c6f6164696e + 67206f7065726174696e672073797374656d004d697373696e67206f70657261 + 74696e672073797374656d000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000008001 + 0100a50fffff3f00000041295402000000000000000000000000000000000000 + 00000000000000000000000000000000000000000000000000000000000055aa + + + + 512 + + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + + + + 32768 + + 5745568205000000616430733100000000000000000000000000000000000000 + 0000000000000000000200003f0000001000000067970000f003000041295402 + 0000000000000000100e01000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000574556824fa608000020000000200000000020003f00000000040000 + 07081600000020003f0020000000000001000000412954023f00000000000000 + 00000000418984003fa0cf01000400000708160000a00f003f00400000040000 + 07081600000080003fa04f000004000007081600000060003fa0cf0000040000 + 070816000000a0003fa02f010004000007081600000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + + + + 64512 + + ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff + ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff + ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff + ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff + ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff + ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff + ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff + ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff + ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff + ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff + ffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + + + + 1073806336 + + 4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f + 4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f + 4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f + 4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f + 4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f + 4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f + 4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f + 4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f + 4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f + 4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f + 4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f + 4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f + 4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f + 4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f + 4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f + 4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f + + + + 1598094336 + + 4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f + 4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f + 4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f + 4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f + 4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f + 4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f + 4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f + 4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f + 4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f + 4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f + 4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f + 4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f + 4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f + 4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f + 4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f + 4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f4f + + + + 2147548160 + + ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff + ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff + ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff + ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff + ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff + ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff + ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff + ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff + ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff + ffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + + + + 2671836160 + + ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff + ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff + ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff + ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff + ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff + ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff + ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff + ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff + ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff + ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff + ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff + ffffffffffffffffffffffffffffffff00000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + + + Property changes on: user/ngie/more-tests2/tools/regression/geom/Data/disk.critter.ad0.xml ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: user/ngie/more-tests2/tools/regression/geom/Data/disk.empty.flp.xml =================================================================== --- user/ngie/more-tests2/tools/regression/geom/Data/disk.empty.flp.xml (nonexistent) +++ user/ngie/more-tests2/tools/regression/geom/Data/disk.empty.flp.xml (revision 293823) @@ -0,0 +1,12 @@ + + + + $FreeBSD$ + An empty floppy disk + + 512 + 1474560 + 18 + 2 + 80 + Property changes on: user/ngie/more-tests2/tools/regression/geom/Data/disk.empty.flp.xml ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: user/ngie/more-tests2/tools/regression/geom/Data/disk.far.ad0.xml =================================================================== --- user/ngie/more-tests2/tools/regression/geom/Data/disk.far.ad0.xml (nonexistent) +++ user/ngie/more-tests2/tools/regression/geom/Data/disk.far.ad0.xml (revision 293823) @@ -0,0 +1,51 @@ + + + + $FreeBSD$ + A Windows laptop. + + 512 + 0 + + 0 + + 33c08ed0bc007cfb5007501ffcbe1b7cbf1b065057b9e501f3a4cbbebe07b104 + 382c7c09751583c610e2f5cd188b148bee83c610497416382c74f6be10074eac + 3c0074fabb0700b40ecd10ebf2894625968a4604b4063c0e7411b40b3c0c7405 + 3ac4752b40c64625067524bbaa5550b441cd1358721681fb55aa7510f6c10174 + 0b8ae0885624c706a106eb1e886604bf0a00b801028bdc33c983ff057f038b4e + 25034e02cd137229be4607813efe7d55aa745a83ef057fda85f67583be2707eb + 8a9891529903460813560ae812005aebd54f74e433c0cd13ebb8000080093521 + 5633f656565250065351be1000568bf45052b800428a5624cd135a588d641072 + 0a4075014280c702e2f7f85ec3eb74496e76616c696420706172746974696f6e + 207461626c65004572726f72206c6f6164696e67206f7065726174696e672073 + 797374656d004d697373696e67206f7065726174696e672073797374656d0000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000008bfc1e578bf5cb00000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000001 + 0100a05304263f00000092d80800805401260befbf730cd90800340a88000000 + 00000000000000000000000000000000000000000000000000000000000055aa + + + + 512 + + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + + + Property changes on: user/ngie/more-tests2/tools/regression/geom/Data/disk.far.ad0.xml ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: user/ngie/more-tests2/tools/regression/geom/Data/disk.flat.da1.xml =================================================================== --- user/ngie/more-tests2/tools/regression/geom/Data/disk.flat.da1.xml (nonexistent) +++ user/ngie/more-tests2/tools/regression/geom/Data/disk.flat.da1.xml (revision 293823) @@ -0,0 +1,97 @@ + + + + $FreeBSD$ + This image contains an interesting setup: there is an MBR+BSD + but also another BSD at sector one which is valid but bogus. + + 512 + 0 + 0 + 0 + 0 + + 0 + + fc31c08ec08ed88ed0bc007cbe1a7cbf1a06b9e601f3a4e9008a31f6bbbe07b1 + 04382f74087f7885f6757489de80c310e2ef85f67502cd1880fa80720b8a3675 + 0480c68038f272028a1489e78a74018b4c02bb007c80feff753283f9ff752d51 + 53bbaa55b441cd13722081fb55aa751af6c10174155b666a0066ff740806536a + 016a1089e6b80042eb055b59b80102cd1389fc720f81bffe0155aa750cffe3be + bc06eb11bed406eb0cbef306eb07bb0700b40ecd10ac84c075f4ebfe496e7661 + 6c696420706172746974696f6e207461626c65004572726f72206c6f6164696e + 67206f7065726174696e672073797374656d004d697373696e67206f70657261 + 74696e672073797374656d000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000008001 + 0100a5feffff3f0000003a612302000000000000000000000000000000000000 + 00000000000000000000000000000000000000000000000000000000000055aa + + + + 512 + + 5745568204000000534541474154452053543331383433360000000000000000 + 000000000000000000020000000800000100000072440000000800000004fb00 + 0000000000000000100e01000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000057455682e29908000020000000200000002001000000000000040000 + 07081000000008000020010000000000010000000004fb000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000e0f100002009000004000007081000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + + + + 32256 + + eb1b9090161f666a005150065331c088f0506a1089e5e8c7008d6610cbfc31c9 + 8ec18ed98ed1bc007c89e6bf0007fec5f3a5beee7d80fa80722cb601e86700b9 + 0100bebe8db601807c04a57507e319f60480751483c610fec680fe0572e949e3 + e1be8b7deb5231d289160009b610e83500bb00908b770a01debf00b0b900ac29 + f1f3a429f930c0f3aae80300e98113fae464a80275fab0d1e664e464a80275fa + b0dfe660fbc3bb008c8b44088b4c0a0ee853ff732abe867de81c00be907de816 + 0030e4cd16c70672043412ea0000ffffbb0700b40ecd10ac84c075f4b401f9c3 + 52b408cd1388f55a72f580e13f74edfa668b460852660fb6d96631d266f7f388 + eb88d54330d266f7f388d75a663dff030000fb774486c4c0c80208e8409188fe + 28e08a660238e0720288e0bf0500c45e0450b402cd135b730a4f741c30e4cd13 + 93ebeb0fb6c30146087303ff460ad0e3005e052846027788c32ef6069908800f + 8479ffbbaa5552b441cd135a0f826fff81fb55aa0f8564fff6c1010f845dff89 + eeb442cd13c35265616400426f6f7400206572726f720d0a0080909090909090 + 9090909090909090909090909090909090909090909090909090909090900000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000080000100a5ffffff0000000050c3000055aa + + + + 32768 + + 5745568204000000646131733100000000000000000000000000000000000000 + 0000000000000000000200003f000000ff000000b8080000c13e00003a612302 + 0000000000000000100e01000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000005745568233c408000020000000200000000000000000000000000000 + 0000000000800c003f800c0000000000010000003a6123023f00000000000000 + 000000000000000000000000000000000000000000800c003f00000000040000 + 07081600000020003f00190000040000070816003a61ea013f00390000040000 + 0708160000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + + + Property changes on: user/ngie/more-tests2/tools/regression/geom/Data/disk.flat.da1.xml ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: user/ngie/more-tests2/tools/regression/geom/Data/disk.kern.flp.xml =================================================================== --- user/ngie/more-tests2/tools/regression/geom/Data/disk.kern.flp.xml (nonexistent) +++ user/ngie/more-tests2/tools/regression/geom/Data/disk.kern.flp.xml (revision 293823) @@ -0,0 +1,51 @@ + + + + $FreeBSD$ + A FreeBSD kern.flp image. + + 512 + 0 + + 0 + + eb1b9090161f666a005150065331c088f0506a1089e5e8c7008d6610cbfc31c9 + 8ec18ed98ed1bc007c89e6bf0007fec5f3a5beee7d80fa80722cb601e86700b9 + 0100bebe8db601807c04a57507e319f60480751483c610fec680fe0572e949e3 + e1be8b7deb5231d289160009b610e83500bb00908b770a01debf00b0b900ac29 + f1f3a429f930c0f3aae80300e98113fae464a80275fab0d1e664e464a80275fa + b0dfe660fbc3bb008c8b44088b4c0a0ee853ff732abe867de81c00be907de816 + 0030e4cd16c70672043412ea0000ffffbb0700b40ecd10ac84c075f4b401f9c3 + 52b408cd1388f55a72f580e13f74edfa668b460852660fb6d96631d266f7f388 + eb88d54330d266f7f388d75a663dff030000fb774486c4c0c80208e8409188fe + 28e08a660238e0720288e0bf0500c45e0450b402cd135b730a4f741c30e4cd13 + 93ebeb0fb6c30146087303ff460ad0e3005e052846027788c32ef6069908800f + 8479ffbbaa5552b441cd135a0f826fff81fb55aa0f8564fff6c1010f845dff89 + eeb442cd13c35265616400426f6f7400206572726f720d0a0080909090909090 + 9090909090909090909090909090909090909090909090909090909090900000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000080000100a5ffffff0000000050c3000055aa + + + + 512 + + 5745568200000000666431343430000000000000000000000000000000000000 + 00000000000000000002000012000000020000005000000024000000400b0000 + 00000000000000002c0101000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000057455682286903000020000000200000400b00000000000000020000 + 00080000400b0000000000000002000000080000400b00000000000000020000 + 0708060000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + + + Property changes on: user/ngie/more-tests2/tools/regression/geom/Data/disk.kern.flp.xml ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: user/ngie/more-tests2/tools/regression/geom/Data/disk.msdos.flp.xml =================================================================== --- user/ngie/more-tests2/tools/regression/geom/Data/disk.msdos.flp.xml (nonexistent) +++ user/ngie/more-tests2/tools/regression/geom/Data/disk.msdos.flp.xml (revision 293823) @@ -0,0 +1,51 @@ + + + + $FreeBSD$ + A MSDOS floppy image. + + 512 + 0 + + 0 + + eb3c904d53444f53352e30000201010002e000400bf009001200020000000000 + 0000000000002911053b114e4f204e414d45202020204641543132202020fa33 + c08ed0bc007c1607bb780036c5371e561653bf3e7cb90b00fcf3a4061fc645fe + 0f8b0e187c884df9894702c7073e7cfbcd13727933c03906137c74088b0e137c + 890e207ca0107cf726167c03061c7c13161e7c03060e7c83d200a3507c891652 + 7ca3497c89164b7cb82000f726117c8b1e0b7c03c348f7f30106497c83164b7c + 00bb00058b16527ca1507ce89200721db001e8ac0072168bfbb90b00bee67df3 + a6750a8d7f20b90b00f3a67418be9e7de85f0033c0cd165e1f8f048f4402cd19 + 585858ebe88b471a48488a1e0d7c32fff7e30306497c13164b7cbb0007b90300 + 505251e83a0072d8b001e85400595a5872bb05010083d200031e0b7ce2e28a2e + 157c8a16247c8b1e497ca14b7cea00007000ac0ac07429b40ebb0700cd10ebf2 + 3b16187c7319f736187cfec288164f7c33d2f7361a7c8816257ca34d7cf8c3f9 + c3b4028b164d7cb106d2e60a364f7c8bca86e98a16247c8a36257ccd13c30d0a + 4e6f6e2d53797374656d206469736b206f72206469736b206572726f720d0a52 + 65706c61636520616e6420707265737320616e79206b6579207768656e207265 + 6164790d0a00494f2020202020205359534d53444f53202020535953000055aa + + + + 512 + + f0ffff03400005600007800009a0000bc0000de0000f00011120011340011560 + 0117800119a0011bc0011de0011f000221200223400225600227800229a0022b + c0022de0022f000331200333400335600337800339a0033bc0033de0033f0004 + 41200443400445600447800449a0044bc0044de0044f000551f0ff5340055560 + 0557800559a0055bc0055de0055f000661200663400665600667800669a0066b + c0066de0066f000771200773400775600777800779a0077bc0077de0077f0008 + 81200883400885600887800889a0088bc0088de0088f00099120099340099560 + 0997800999a0099bc009ffef099f000aa1200aa3400aa5600aa7800aa9a00aab + c00aade00aaf000bb1200bb3400bb5600bb7800bb9a00bbbc00bbde00bbf000c + c1200cc3400cc5600cc7800cc9a00ccbc00ccde00ccf000dd1200dd3400dd560 + 0dd7800dd9a00ddbc00ddde00ddf000ee1200ee3400ee5600ee7800ee9a00eeb + c00eede00eef000ff1200ff3400ff5600ff7800ff9a00ffbc00ffde00fff0010 + 01211003411005611007f1ff09a1100bc1100de1100f01111121111341111561 + 1117811119a1111bc1111de1111f011221211223411225611227811229a1122b + c1122de1122f011331211333411335611337811339a1133bc1133de1133f0114 + 41211443411445611447811449a1144bc1144de1144f01155121155341155561 + + + Property changes on: user/ngie/more-tests2/tools/regression/geom/Data/disk.msdos.flp.xml ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: user/ngie/more-tests2/tools/regression/geom/Data/disk.sun.da0.xml =================================================================== --- user/ngie/more-tests2/tools/regression/geom/Data/disk.sun.da0.xml (nonexistent) +++ user/ngie/more-tests2/tools/regression/geom/Data/disk.sun.da0.xml (revision 293823) @@ -0,0 +1,33 @@ + + + + $FreeBSD$ + A Solaris 8 disklabel + + 512 + 0 + 0 + 0 + 0 + + 0 + + 49424d2d444459532d5433363935304d2d533936482063796c20313439373020 + 616c742032206864203132207365632033393900000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000100000000000000000008000200000003000100050000000000000000 + 0000000000000000000000080000003f000000000000000000000000600ddeee + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000027103a7c00000000000000013a7a0002000c018f00000000000000dc + 002d96c000000000001012b0000000000445b1c8000000000000000000000000 + 00000000000000000000000000000000000000000000034c04080858dabe5ec8 + + + Property changes on: user/ngie/more-tests2/tools/regression/geom/Data/disk.sun.da0.xml ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: user/ngie/more-tests2/tools/regression/geom/Data/disk.sun.da1.xml =================================================================== --- user/ngie/more-tests2/tools/regression/geom/Data/disk.sun.da1.xml (nonexistent) +++ user/ngie/more-tests2/tools/regression/geom/Data/disk.sun.da1.xml (revision 293823) @@ -0,0 +1,33 @@ + + + + $FreeBSD$ + A Solaris 8 disklabel + + 512 + 0 + 0 + 0 + 0 + + 0 + + 53554e3138472063796c203735303620616c7420322068642031392073656320 + 3234380000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000170686b00000000000008000200000003000100050000000800010000 + 00000007000000040000000800000000000000000000000000000000600ddeee + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000001c201d5400000000000000011d520002001300f80000000000000000 + 0007d6480000006d0020113000000000021bad5000000b4e014b873800000000 + 000000000000022b00400ff8000005a600400ff80000092100280c48dabe971e + + + Property changes on: user/ngie/more-tests2/tools/regression/geom/Data/disk.sun.da1.xml ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: user/ngie/more-tests2/tools/regression/geom/Data/disk.typo.ad0.xml =================================================================== --- user/ngie/more-tests2/tools/regression/geom/Data/disk.typo.ad0.xml (nonexistent) +++ user/ngie/more-tests2/tools/regression/geom/Data/disk.typo.ad0.xml (revision 293823) @@ -0,0 +1,219 @@ + + + + $FreeBSD$ + A multislice FreeBSD disk + + 512 + 0 + + 0 + + fc31c08ec08ed88ed0bc007cbd000a89efb108f3abfe45f252bb000689eeb802 + 02e82e015ae9008af686bbfd20750484d278048a96bafd885600e8fc0052bbc2 + 0731d2886ffc0fa396bbfd731c8a07bf0f08b103f2ae7411b10df2ae750481c7 + 0d008a0d01cfe8c1004280c31073d4582c7f3a067504720548740e30c004b088 + 86b8fdbfb207e8a100be0308e8ad008a96b9fd4ee8880030e4cd1a89d703bebc + fdb401cd16751330e4cd1a39fa72f28a86b9fdeb15b007e88e0030e4cd1688e0 + 3c1c74eb2c3b3c0477eb980fa3460c73e48886b9fdbe000a8a1489f33c049c74 + 0ac0e00405be0793c6078053f686bbfd407509bb0006b80103e856005e9d7507 + 8a96b8fd80ea30bb007cb80102e8420072a381bffe0155aa759be81c00ffe3b0 + 46e82400b03100d0eb170fab560cbe0008e8ebff89fee80300be0d08aca88075 + 05e80400ebf6247f53bb0700b40ecd105bc38a74018b4c025689e780feff7540 + 83f9ff753bf686bbfd8074345153bbaa5550b441cd1358720e81fb55aa7508f6 + c101740380cc405b59f6c4407412666a0066ff740806536a006a1089e6864402 + cd1389fc5ec39090909090909090909001014472697665200000808fb6008001 + 0100a5ef7f9f3f000000c1f95f00000041a0a5efffff00fa5f0050e29f0000ff + ffffa5efffff50dcff0050dcff000000000000000000000000000000000055aa + + + + 512 + + 2020a00a44656661756c743aa00d8a00050f010406070b0c0e6383a5a6a9b70e + 141312141d1c1b2124282e3439556e6b6e6f77ee444fd357696e646f7773204e + d457696e646f77f3554e49d84c696e75f8467265654253c44f70656e4253c44e + 65744253c44253442f4fd3000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + + + + 32768 + + 5745568205000000616430733100000000000000000000000000000000000000 + 0000000000000000000200003f000000f0000000180a0000103b000080295402 + 0000000000000000100e01000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000005745568204c108000020000000200000002003003f00000000000000 + 0700000000a00f003f2003000000000001000000c1f95f003f00000000000000 + 000000000000000000000000000000000000000000a00f003fc0120000000000 + 07000000c1993d003f6022000000000007000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + + + + 64512 + + 0000007c0000010002000400f8ff0000000400f8000000000000000000000004 + 0000004000000008000000000010007e00800000070000fe1f00000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + + + + 104922112 + + 3310f30d0350fbf66f44ebd906c9963d46b2bf609bb753131e7c24cf9ed194ce + a59117b612772b207ddcb753df72456f98d0cac567f60526c7b9308afd87e657 + dd45b3d1eb075b6820aa6ea5a0f10511f65a257f0d7d89d88e189bef43786ff5 + a0316511a7a07168f2ef001e71fbc56dd8ddc7866c4856dc979742be22f4badd + e1fcba7aebe4b5f4bb8b0c89e84de59f0ba48d7a8b00bb1797fc057e3d3d8058 + 4b1987ac49b74bed74cb4985850d5be64e8188d40ad0323165b355c512a91523 + 5d5211eeb021c754f552b160f9a73c4c5e59370163cf531ca0382cc462f9ac9d + 35612380f7a5d9d5e3bde129ef6fab02347088025d0937fb6c56dc68c283ce9d + 1cfc5b3c7ad1f52faeae05188386cb57cb88c5dccaa2db17a09420ae7d9f9d6e + 058370711f445cff4d4543ee9f0c3054400116304018f68d9c08d05b04680162 + 23172b8b1775157790fe5e5100c530e3377d383a0080468b0125e87e8d7dee5f + 46030a238dc8a0000cb4eafc6ad4735f2c16d1642e3834aefbb5bfc25fcc0062 + 3a89410ab88839e3ed151cd6bc2b5704c5db4c9fc39662bd3a41347212c664be + 04684e551c0a0362bb3139a460a7c8d178c349a47d724b7d456606b2f47a8d99 + d4af7998148ed93443a828ece96cdb7eb158a21189ed1527bdad7b18b74f168b + d01fcfde994977174e41ad8f6ea19fac8bb95e5d68643d0457d746cf32531639 + + + + 629210112 + + ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff + ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff + ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff + ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff + ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff + ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff + ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff + ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff + ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff + ffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + + + + 1153498112 + + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + + + + 3220439552 + + 5745568205000000616430733200000000000000000000000000000000000000 + 0000000000000000000200003f000000f0000000180a0000103b000080295402 + 0000000000000000100e01000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000057455682fc1908000020000000200000000000000000000000000000 + 000000000000000000000000000000000000000050e29f0000fa5f0000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + + + + 6440878080 + + 0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a + 0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a + 0a0a0a0a0a0a0a0a0a0a0a0a3c4120200a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a + 0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a + 0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a + 0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a + 0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a687265663d22687474703a2f2f777777 + 2e706c6179626f7973746f72652e636f6d2f70626c696e6b2e6367693f616666 + 696c696174653d4d4f3130303030303034353426736b753d4249303130362220 + 7461726765743d225f626c616e6b22206f6e6d6f7573656f7665723d22706172 + 656e742e77696e646f772e7374617475733d27506c6179626f792053746f7265 + 273b2072657475726e2074727565223e3c494d47207372633d22687474703a2f + 2f61313833322e672e616b2e706c6179626f792e636f6d2f372f313833322f32 + 332f3939303232313437302f7777772e706c6179626f792e636f6d2f6d616761 + 7a696e652f63757272656e742f696d782f636f7665725f696e6465782e6a7067 + 2220616c69676e3d72696768742077696474683d223135302220686569676874 + + + + 8585257472 + + 5745568205000000616430733300000000000000000000000000000000000000 + 0000000000000000000200003f000000f000000055040000103b000050dcff00 + 0000000000000000100e01000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000057455682bcbd0800002000000020000000803e0050dcff0000040000 + 070816000000000000000000000000000000000050dcff0050dcff0000000000 + 00000000505cc100505c3e010010000007049f00000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + + + Property changes on: user/ngie/more-tests2/tools/regression/geom/Data/disk.typo.ad0.xml ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: user/ngie/more-tests2/tools/regression/geom_gpt/gctl.t =================================================================== --- user/ngie/more-tests2/tools/regression/geom_gpt/gctl.t (nonexistent) +++ user/ngie/more-tests2/tools/regression/geom_gpt/gctl.t (revision 293823) @@ -0,0 +1,207 @@ +#!/usr/bin/env perl -w +# +# Copyright (c) 2005, 2006 Marcel Moolenaar +# 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 ``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 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$ + +my $srcdir = `dirname $0`; +chomp $srcdir; + +my $cmd = "/tmp/gctl-$$"; +my $out = "$cmd.out"; +my $disk = "/tmp/disk-$$"; +my $mntpt = "/tmp/mount-$$"; + +my %steps = ( + "000" => "gctl", + "001" => "gctl verb=bogus", + "010" => "gctl verb=create", + "011" => "gctl verb=create provider=bogus", + "020" => "mdcfg create pristine", + "021" => "gctl verb=create provider=%dev% entries=-1", + "022" => "gctl verb=create provider=%dev% entries=128", + "023" => "gctl verb=create provider=%dev%", + "024" => "gctl verb=modify geom=%dev%", + "025" => "conf", + "030" => "gctl verb=add", + "031" => "gctl verb=add geom=bogus", + "032" => "gctl verb=add geom=%dev%", + "033" => "gctl verb=add geom=%dev% type=bogus", + "034" => "gctl verb=add geom=%dev% type=ed0101b0-2a71-11da-ba81-003048416ace", + "035" => "gctl verb=add geom=%dev% type=ed0101b0-2a71-11da-ba81-003048416ace start=1", + "036" => "gctl verb=add geom=%dev% type=ed0101b0-2a71-11da-ba81-003048416ace start=34", + "037" => "gctl verb=add geom=%dev% type=ed0101b0-2a71-11da-ba81-003048416ace start=34 end=12345678", + "038" => "gctl verb=add geom=%dev% type=ed0101b0-2a71-11da-ba81-003048416ace start=162 end=417 entry=129", + "039" => "gctl verb=add geom=%dev% type=ed0101b0-2a71-11da-ba81-003048416ace start=162 end=417 entry:8=5", + "040" => "gctl verb=add geom=%dev% type=83d34ed5-c4ff-11da-b65b-000347c5d7f3 start=34 end=161 entry=5", + "041" => "gctl verb=add geom=%dev% type=83d34ed5-c4ff-11da-b65b-000347c5d7f3 start=34 end=546", + "042" => "gctl verb=add geom=%dev% type=83d34ed5-c4ff-11da-b65b-000347c5d7f3 start=162 end=417", + "043" => "gctl verb=add geom=%dev% type=83d34ed5-c4ff-11da-b65b-000347c5d7f3 start=100 end=300", + "044" => "gctl verb=add geom=%dev% type=83d34ed5-c4ff-11da-b65b-000347c5d7f3 start=300 end=500", + "045" => "gctl verb=add geom=%dev% type=83d34ed5-c4ff-11da-b65b-000347c5d7f3 start=34 end=161 entry:8", + "046" => "gctl verb=add geom=%dev% type=d2bd4509-c4ff-11da-b4cc-00306e39b62f start=418 end=546 entry:8", + "047" => "conf", + "050" => "gctl verb=remove geom=%dev% entry=5", + "051" => "gctl verb=remove geom=%dev% entry=2", + "052" => "gctl verb=remove geom=%dev% entry=1", + "053" => "gctl verb=remove geom=%dev% entry=1", + "054" => "conf", + "060" => "gctl verb=add geom=%dev% type=516e7cb6-6ecf-11d6-8ff8-00022d09712b start=34 end=546 entry:8=1", + "061" => "mount %dev%p1", + "062" => "gctl verb=remove geom=%dev% entry=1", + "063" => "umount %dev%p1", + "064" => "gctl verb=remove geom=%dev% entry=1", + "065" => "conf", + "100" => "mdcfg destroy", + "110" => "mdcfg create corrupted", + "111" => "gctl verb=add geom=%dev%", + "120" => "mdcfg destroy", +); + +my %result = ( + "000" => "FAIL Verb missing", + "001" => "FAIL 22 verb 'bogus'", + "010" => "FAIL 87 provider", + "011" => "FAIL 22 provider 'bogus'", + "020" => "", + "021" => "FAIL 22 entries -1", + "022" => "PASS", + "023" => "FAIL 17 geom '%dev%'", + "024" => "FAIL 87 entry", + "025" => "b1856477950e5786898c8f01361196cf", + "030" => "FAIL 87 geom", + "031" => "FAIL 22 geom 'bogus'", + "032" => "FAIL 87 type", + "033" => "FAIL 22 type 'bogus'", + "034" => "FAIL 87 start", + "035" => "FAIL 22 start 1", + "036" => "FAIL 87 end", + "037" => "FAIL 22 end 12345678", + "038" => "FAIL 22 entry 129", + "039" => "PASS entry=5", + "040" => "FAIL 17 entry 5", + "041" => "FAIL 28 start/end 34/546", + "042" => "FAIL 28 start/end 162/417", + "043" => "FAIL 28 start/end 100/300", + "044" => "FAIL 28 start/end 300/500", + "045" => "PASS entry=1", + "046" => "PASS entry=2", + "047" => "50783a39eecfc62a29db24381e12b9d8", + "050" => "PASS", + "051" => "PASS", + "052" => "PASS", + "053" => "FAIL 2 entry 1", + "054" => "b1856477950e5786898c8f01361196cf", + "060" => "PASS", + "061" => "PASS", + "062" => "FAIL 16", + "063" => "PASS", + "064" => "PASS", + "065" => "b1856477950e5786898c8f01361196cf", + "100" => "", + "110" => "", + "111" => "FAIL 6 geom '%dev%'", + "120" => "", +); + +my $verbose = ""; +if (exists $ENV{'TEST_VERBOSE'}) { + $verbose = "-v"; +} + +# Compile the driver... +my $st = system("cc -o $cmd -g $srcdir/test.c -lgeom"); +if ($st != 0) { + print "1..0 # SKIP error compiling test.c\n"; + exit 0; +} + +# Make sure we have permission to use gctl... +if (`$cmd` =~ "^FAIL Permission denied") { + print "1..0 # SKIP not enough permission\n"; + unlink $cmd; + exit 0; +} + +$count = keys (%steps); +print "1..$count\n"; + +my $nr = 1; +my $dev = "n/a"; +foreach my $key (sort keys %steps) { + my ($action, $args) = split(/ /, $steps{$key}, 2); + my $res = $result{$key}; + $args = "" if (not defined $args); + $args =~ s/%dev%/$dev/g; + $res =~ s/%dev%/$dev/g; + + if ($action =~ "^gctl") { + system("$cmd $verbose $args | tee $out 2>&1"); + $st = `tail -1 $out`; + if ($st =~ "^$res") { + print "ok $nr \# gctl($key)\n"; + } else { + print "not ok $nr \# gctl($key) - $st\n"; + } + unlink $out; + } elsif ($action =~ "^mdcfg") { + if ($args =~ "^create") { + system("dd if=/dev/zero of=$disk count=1024 2>&1"); + if ($args =~ "corrupted") { + system("gpt create -p $disk"); + } + $dev = `mdconfig -a -t vnode -f $disk`; + chomp $dev; + } elsif ($args =~ "^destroy") { + $dev =~ s/md/-u /g; + system("mdconfig -d $dev"); + unlink $disk; + $dev = "n/a"; + } + print "ok $nr \# mdcfg($key)\n"; + } elsif ($action =~ "^conf") { + system("sysctl -b kern.geom.conftxt | grep -a $dev | sed -e s:$disk:DISK:g -e s:$dev:DEV:g | sort | md5 -p | tee $out 2>&1"); + $st = `tail -1 $out`; + if ($st =~ "^$res") { + print "ok $nr \# conf($key)\n"; + } else { + print "not ok $nr \# conf($key) - $st\n"; + } + unlink $out; + } elsif ($action =~ "^mount") { + system("mkdir $mntpt-$args"); + system("newfs $args"); + system("mount -t ufs /dev/$args $mntpt-$args"); + print "ok $nr \# mount($key)\n"; + } elsif ($action =~ "^umount") { + system("umount $mntpt-$args"); + system("rmdir $mntpt-$args"); + print "ok $nr \# umount($key)\n"; + } + $nr += 1; +} + +unlink $cmd; +exit 0; Property changes on: user/ngie/more-tests2/tools/regression/geom_gpt/gctl.t ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: user/ngie/more-tests2/tools/regression/geom_gpt/test.c =================================================================== --- user/ngie/more-tests2/tools/regression/geom_gpt/test.c (nonexistent) +++ user/ngie/more-tests2/tools/regression/geom_gpt/test.c (revision 293823) @@ -0,0 +1,165 @@ +/*- + * Copyright (c) 2005, 2006 Marcel Moolenaar + * 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 ``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 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 +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include + +struct retval { + struct retval *retval; + const char *param; + char *value; +}; + +struct retval *retval; +int verbose; + +static void +usage() +{ + fprintf(stdout, "usage: %s [-v] param[:len][=value] ...\n", + getprogname()); + exit(1); +} + +static int +parse(char *arg, char **param, char **value, int *len) +{ + char *e, *colon, *equal; + + if (*arg == '\0') + return (EINVAL); + + colon = strchr(arg, ':'); + equal = strchr(arg, '='); + if (colon == NULL && equal == NULL) + return (EINVAL); + if (colon == arg || equal == arg) + return (EINVAL); + if (colon != NULL && equal != NULL && equal < colon) + return (EINVAL); + + if (colon != NULL) + *colon++ = '\0'; + if (equal != NULL) + *equal++ = '\0'; + + *param = arg; + if (colon != NULL) { + /* Length specification. This parameter is RW. */ + if (*colon == '\0') + return (EINVAL); + *len = strtol(colon, &e, 0); + if (*e != '\0') + return (EINVAL); + if (*len <= 0 || *len > PATH_MAX) + return (EINVAL); + *value = malloc(*len); + if (*value == NULL) + return (ENOMEM); + memset(*value, 0, *len); + if (equal != NULL) { + if (strlen(equal) >= PATH_MAX) + return (ENOMEM); + strcpy(*value, equal); + } + } else { + /* This parameter is RO. */ + *len = -1; + if (*equal == '\0') + return (EINVAL); + *value = equal; + } + + return (0); +} + +int main(int argc, char *argv[]) +{ + struct retval *rv; + struct gctl_req *req; + char *param, *value; + const char *s; + int c, len; + + req = gctl_get_handle(); + gctl_ro_param(req, "class", -1, "GPT"); + + while ((c = getopt(argc, argv, "v")) != -1) { + switch (c) { + case 'v': + verbose = 1; + break; + case '?': + default: + usage(); + /* NOTREACHED */ + break; + } + } + + while (optind < argc) { + if (!parse(argv[optind++], ¶m, &value, &len)) { + if (len > 0) { + rv = malloc(sizeof(struct retval)); + rv->param = param; + rv->value = value; + rv->retval = retval; + retval = rv; + gctl_rw_param(req, param, len, value); + } else + gctl_ro_param(req, param, -1, value); + } + } + + if (verbose) + gctl_dump(req, stdout); + + s = gctl_issue(req); + if (s == NULL) { + printf("PASS"); + while (retval != NULL) { + rv = retval->retval; + printf(" %s=%s", retval->param, retval->value); + free(retval->value); + free(retval); + retval = rv; + } + printf("\n"); + } else + printf("FAIL %s\n", s); + + gctl_free(req); + return (0); +} Property changes on: user/ngie/more-tests2/tools/regression/geom_gpt/test.c ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: user/ngie/more-tests2 =================================================================== --- user/ngie/more-tests2 (revision 293822) +++ user/ngie/more-tests2 (revision 293823) Property changes on: user/ngie/more-tests2 ___________________________________________________________________ Modified: svn:mergeinfo ## -0,0 +0,1 ## Merged /head:r293816-293822