CVS commit: src/tools/arm-elf2aout/sys
Module Name:src Committed By: christos Date: Sun May 19 04:09:23 UTC 2019 Modified Files: src/tools/arm-elf2aout/sys: aout_mids.h exec_elf.h Log Message: sync with latest. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tools/arm-elf2aout/sys/aout_mids.h \ src/tools/arm-elf2aout/sys/exec_elf.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tools/arm-elf2aout/sys/aout_mids.h diff -u src/tools/arm-elf2aout/sys/aout_mids.h:1.1 src/tools/arm-elf2aout/sys/aout_mids.h:1.2 --- src/tools/arm-elf2aout/sys/aout_mids.h:1.1 Mon Dec 31 08:35:16 2018 +++ src/tools/arm-elf2aout/sys/aout_mids.h Sun May 19 00:09:22 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: aout_mids.h,v 1.1 2018/12/31 13:35:16 christos Exp $ */ +/* $NetBSD: aout_mids.h,v 1.2 2019/05/19 04:09:22 christos Exp $ */ /* * Copyright (c) 2009, The NetBSD Foundation, Inc. @@ -25,44 +25,56 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef _SYS_MACHINE_IDS_H_ -#define _SYS_MACHINE_IDS_H_ - +#ifndef _SYS_AOUT_MIDS_H_ +#define _SYS_AOUT_MIDS_H_ /* * a_mid - keep sorted in numerical order for sanity's sake * ensure that: 0 < mid < 0x3ff + * + * NB: These are still being used in kernel core files. */ -#define MID_ZERO 0 /* unknown - implementation dependent */ -#define MID_SUN010 1 /* sun 68010/68020 binary */ -#define MID_SUN020 2 /* sun 68020-only binary */ -#define MID_PC386 100 /* 386 PC binary. (so quoth BFD) */ -#define MID_HP200 200 /* hp200 (68010) BSD binary */ -#define MID_I386 134 /* i386 BSD binary */ -#define MID_M68K 135 /* m68k BSD binary with 8K page sizes */ -#define MID_M68K4K 136 /* m68k BSD binary with 4K page sizes */ -#define MID_NS32532 137 /* ns32532 */ -#define MID_SPARC 138 /* sparc */ -#define MID_PMAX 139 /* pmax */ -#define MID_VAX1K 140 /* VAX 1K page size binaries */ -#define MID_ALPHA 141 /* Alpha BSD binary */ -#define MID_MIPS 142 /* big-endian MIPS */ -#define MID_ARM6 143 /* ARM6 */ -#define MID_M680002K 144 /* m68000 with 2K page sizes */ -#define MID_SH3 145 /* SH3 */ -#define MID_POWERPC 149 /* big-endian PowerPC */ -#define MID_VAX 150 /* VAX */ -/* 151 - MIPS1 */ -/* 152 - MIPS2 */ -#define MID_M88K 153 /* m88k BSD */ -#define MID_HPPA 154 /* HP PARISC */ -#define MID_SH5_64 155 /* LP64 SH5 */ -#define MID_SPARC64 156 /* LP64 sparc */ -#define MID_X86_64 157 /* AMD x86-64 */ -#define MID_SH5_32 158 /* ILP32 SH5 */ -#define MID_HP200 200 /* hp200 (68010) BSD binary */ -#define MID_HP300 300 /* hp300 (68020+68881) BSD binary */ -#define MID_HPUX 0x20C /* hp200/300 HP-UX binary */ -#define MID_HPUX800 0x20B /* hp800 HP-UX binary */ +#define MID_ZERO 0x000 /* unknown - implementation dependent */ +#define MID_SUN010 0x001 /* sun 68010/68020 binary */ +#define MID_SUN020 0x002 /* sun 68020-only binary */ + +#define MID_PC386 0x064 /* 386 PC binary. (so quoth BFD) */ + +#define MID_I386 0x086 /* i386 BSD binary */ +#define MID_M68K 0x087 /* m68k BSD binary with 8K page sizes */ +#define MID_M68K4K 0x088 /* m68k BSD binary with 4K page sizes */ +#define MID_NS32532 0x089 /* ns32532 */ +#define MID_SPARC 0x08a /* sparc */ +#define MID_PMAX 0x08b /* pmax */ +#define MID_VAX1K 0x08c /* VAX 1K page size binaries */ +#define MID_ALPHA 0x08d /* Alpha BSD binary */ +#define MID_MIPS 0x08e /* big-endian MIPS */ +#define MID_ARM6 0x08f /* ARM6 */ +#define MID_M680002K 0x090 /* m68000 with 2K page sizes */ +#define MID_SH3 0x091 /* SH3 */ + +#define MID_POWERPC64 0x094 /* big-endian PowerPC 64 */ +#define MID_POWERPC 0x095 /* big-endian PowerPC */ +#define MID_VAX 0x096 /* VAX */ +#define MID_MIPS1 0x097 /* MIPS1 */ +#define MID_MIPS2 0x098 /* MIPS2 */ +#define MID_M88K 0x099 /* m88k BSD */ +#define MID_HPPA 0x09a /* HP PARISC */ +#define MID_SH5_64 0x09b /* LP64 SH5 */ +#define MID_SPARC64 0x09c /* LP64 sparc */ +#define MID_X86_64 0x09d /* AMD x86-64 */ +#define MID_SH5_32 0x09e /* ILP32 SH5 */ +#define MID_IA64 0x09f /* Itanium */ + +#define MID_AARCH64 0x0b7 /* ARM AARCH64 */ +#define MID_OR1K 0x0b8 /* OpenRISC 1000 */ +#define MID_RISCV 0x0b9 /* Risc-V */ + +#define MID_HP200 0x0c8 /* hp200 (68010) BSD binary */ + +#define MID_HP300 0x12c /* hp300 (68020+68881) BSD binary */ + +#define MID_HPUX800 0x20b /* hp800 HP-UX binary */ +#define MID_HPUX 0x20c /* hp200/300 HP-UX binary */ -#endif /* _SYS_MACHINE_IDS_H_ */ +#endif /* _SYS_AOUT_MIDS_H_ */ Index: src/tools/arm-elf2aout/sys/exec_elf.h diff -u src/tools/arm-elf2aout/sys/exec_elf.h:1.1 src/tools/arm-elf2aout/sys/exec_elf.h:1.2 --- src/tools/arm-elf2aout/sys/exec_elf.h:1.1 Mon Dec 31 08:35:16 2018 +++ src/tools/arm-elf2aout/sys/exec_elf.h Sun May 19 00:09:22 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: exec_elf.h,v 1.1 2018/12/31 13:35:16 christos Exp $ */ +/* $NetBSD: exec_elf.h,v 1.2 2019/05/19 04:09:22 christos Exp $ */ /*- * Copyright (c) 1994 The NetBSD Foundation, Inc. @@ -30,60
CVS commit: src/tools/arm-elf2aout/sys
Module Name:src Committed By: christos Date: Sun May 19 04:09:23 UTC 2019 Modified Files: src/tools/arm-elf2aout/sys: aout_mids.h exec_elf.h Log Message: sync with latest. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tools/arm-elf2aout/sys/aout_mids.h \ src/tools/arm-elf2aout/sys/exec_elf.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Re: CVS commit: src/usr.bin/elf2aout
No we should not be checking new mid numbers. Let a.out rest :-). I will fix it, but I wonder why it built for me. Ah you are building the tool version that has old headers! I will update them! christos On May 18, 2019, at 7:45 PM, Izumi Tsutsui wrote: >> Modified Files: >>src/usr.bin/elf2aout: elf2aout.1 elf2aout.c >> >> Log Message: >> - add flag to produce OMAGIC >> - factor out complicated inline code into simpler functions >> - add options parsing > > Thank you for your changes. > > But you also put more functional changes not in the log, > i.e. you added new MID values: > - EM_AARCH64(in #ifdef notyet) > - EM_ALPHA(in #ifdef notyet) > - EM_PARISC(in #ifdef notyet) > - EM_OR1K > - EM_PPC64(in #ifdef notyet) > - EM_RISCV > - EM_SH > - EM_X86_64(in #ifdef notyet) > and it causes build failure: > --- > /usr/src/tools/m68k-elf2aout/../../usr.bin/elf2aout/elf2aout.c: In function > 'get_mid': > /usr/src/tools/m68k-elf2aout/../../usr.bin/elf2aout/elf2aout.c:134:7: error: > 'EM_OR1K' undeclared (first use in this function) > case EM_OR1K: > ^ > /usr/src/tools/m68k-elf2aout/../../usr.bin/elf2aout/elf2aout.c:134:7: note: > each undeclared identifier is reported only once for each function it appears > in > /usr/src/tools/m68k-elf2aout/../../usr.bin/elf2aout/elf2aout.c:135:10: error: > 'MID_OR1K' undeclared (first use in this function) > return MID_OR1K; > ^ > /usr/src/tools/m68k-elf2aout/../../usr.bin/elf2aout/elf2aout.c:148:7: error: > 'EM_RISCV' undeclared (first use in this function) > case EM_RISCV: > ^ > /usr/src/tools/m68k-elf2aout/../../usr.bin/elf2aout/elf2aout.c:149:10: error: > 'MID_RISCV' undeclared (first use in this function) > return MID_RISCV; > ^ > --- > > If we need to check such new MID values, we have to sync aout_mids.h > and exec_aout.h in src/tools/arm-elf2aout/sys > and src/tools/m68k-elf2aout/sys dirs with -current ones. > But I doubt such newer CPUs actually had a.out binaries.. > > Furthermore, you also add a new reference of "PT_TLS": > --- > +if (ph[i].p_type == PT_TLS) { > +if (debug) > +warnx("Can't handle TLS section"); > +continue; > +} > --- > and it also causes an error, at least in src/tools/m68k-elf2aout: > --- > /usr/src/tools/m68k-elf2aout/../../usr.bin/elf2aout/elf2aout.c: In function > 'main': > /usr/src/tools/m68k-elf2aout/../../usr.bin/elf2aout/elf2aout.c:318:23: error: > 'PT_TLS' undeclared (first use in this function) > if (ph[i].p_type == PT_TLS) { > ^ > --- > If we need to check it, we also have to prepare host tool version. > > Thanks, > > --- > Izumi Tsutsui
CVS commit: src/usr.bin/elf2aout
Module Name:src Committed By: christos Date: Sat May 18 21:16:12 UTC 2019 Modified Files: src/usr.bin/elf2aout: elf2aout.1 elf2aout.c Log Message: - add flag to produce OMAGIC - factor out complicated inline code into simpler functions - add options parsing To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/usr.bin/elf2aout/elf2aout.1 cvs rdiff -u -r1.21 -r1.22 src/usr.bin/elf2aout/elf2aout.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/elf2aout/elf2aout.1 diff -u src/usr.bin/elf2aout/elf2aout.1:1.10 src/usr.bin/elf2aout/elf2aout.1:1.11 --- src/usr.bin/elf2aout/elf2aout.1:1.10 Mon Mar 5 05:57:18 2012 +++ src/usr.bin/elf2aout/elf2aout.1 Sat May 18 17:16:12 2019 @@ -1,4 +1,4 @@ -.\" $NetBSD: elf2aout.1,v 1.10 2012/03/05 10:57:18 njoly Exp $ +.\" $NetBSD: elf2aout.1,v 1.11 2019/05/18 21:16:12 christos Exp $ .\" .\" Copyright 1996 The Board of Trustees of The Leland Stanford .\" Junior University. All Rights Reserved. @@ -19,7 +19,8 @@ .Nm elf2aout .Nd convert a NetBSD ELF-format executable to NetBSD a.out format .Sh SYNOPSIS -.Nm elf2aout +.Nm +.Op Fl \ .Ar elf-file .Ar aout-file .Sh DESCRIPTION @@ -35,6 +36,18 @@ to a.out format, for compatibility with utilities like .Xr kvm 3 , which currently expect an a.out format kernel. +.Pp +The following options are available: +.Bl -tag -width flag +.It Fl O +Produce +.Dv OMAGIC +instead of +.Dv ZMAGIC +binaries which is the default. +.It Fl s +Preserve the symbol table. +.El .\" .Sh DIAGNOSTICS .Sh SEE ALSO .Xr elf2ecoff 1 , Index: src/usr.bin/elf2aout/elf2aout.c diff -u src/usr.bin/elf2aout/elf2aout.c:1.21 src/usr.bin/elf2aout/elf2aout.c:1.22 --- src/usr.bin/elf2aout/elf2aout.c:1.21 Sat Apr 27 11:43:09 2019 +++ src/usr.bin/elf2aout/elf2aout.c Sat May 18 17:16:12 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: elf2aout.c,v 1.21 2019/04/27 15:43:09 skrll Exp $ */ +/* $NetBSD: elf2aout.c,v 1.22 2019/05/18 21:16:12 christos Exp $ */ /* * Copyright (c) 1995 @@ -63,17 +63,131 @@ struct sect { uint32_t len; }; -void combine(struct sect *, struct sect *, int); -int phcmp(const void *, const void *); -void *saveRead(int file, off_t offset, size_t len, const char *name); -void copy(int, int, off_t, off_t); -void translate_syms(int, int, off_t, off_t, off_t, off_t); +static void combine(struct sect *, struct sect *, int); +static int phcmp(const void *, const void *); +static void *saveRead(int file, off_t offset, size_t len, const char *name); +static void copy(int, int, off_t, off_t); +static void translate_syms(int, int, off_t, off_t, off_t, off_t); #if TARGET_BYTE_ORDER != BYTE_ORDER -void bswap32_region(int32_t* , int); +static void bswap32_region(int32_t* , int); #endif -int*symTypeTable; +static int*symTypeTable; +static int debug; + +static __dead void +usage(void) +{ + fprintf(stderr, "Usage: %s [-sO] \n", + getprogname()); + exit(EXIT_FAILURE); +} + +static const struct { + const char *n; + int v; +} nv[] = { + { ".text", N_TEXT }, + { ".rodata", N_TEXT }, + { ".data", N_DATA }, + { ".sdata", N_DATA }, + { ".lit4", N_DATA }, + { ".lit8", N_DATA }, + { ".bss", N_BSS }, + { ".sbss", N_BSS }, +}; + +static int +get_symtab_type(const char *name) +{ + size_t i; + for (i = 0; i < __arraycount(nv); i++) { + if (strcmp(name, nv[i].n) == 0) + return nv[i].v; + } + if (debug) + warnx("section `%s' is not handled\n", name); + return 0; +} + +static uint32_t +get_mid(const Elf32_Ehdr *ex) +{ + switch (ex->e_machine) { +#ifdef notyet + case EM_AARCH64: + return MID_AARCH64; + case EM_ALPHA: + return MID_ALPHA; +#endif + case EM_ARM: + return MID_ARM6; +#ifdef notyet + case EM_PARISC: + return MID_HPPA; +#endif + case EM_386: + return MID_I386; + case EM_68K: + return MID_M68K; + case EM_OR1K: + return MID_OR1K; + case EM_MIPS: + if (ex->e_ident[EI_DATA] == ELFDATA2LSB) + return MID_PMAX; + else + return MID_MIPS; + case EM_PPC: + return MID_POWERPC; +#ifdef notyet + case EM_PPC64: + return MID_POWERPC64; + break; +#endif + case EM_RISCV: + return MID_RISCV; + case EM_SH: + return MID_SH3; + case EM_SPARC: + case EM_SPARC32PLUS: + case EM_SPARCV9: + if (ex->e_ident[EI_CLASS] == ELFCLASS32) + return MID_SPARC; +#ifdef notyet + return MID_SPARC64; + case EM_X86_64: + return MID_X86_64; +#else + break; +#endif + case EM_VAX: + return MID_VAX; + case EM_NONE: + return MID_ZERO; + default: + break; + } + if (debug) + warnx("Unsupported machine `%d'", ex->e_machine); + return MID_ZERO; +} + +static unsigned char +get_type(Elf32_Half shndx) +{ + switch (shndx) { + case SHN_UNDEF: + return N_UNDF; + case SHN_ABS: + return N_ABS; + case SHN_COMMON: + case SHN_MIPS_ACOMMON: + return N_COMM; + default: + return (unsigned char)symTypeTable[shndx]; + } +} int main(int argc, char **argv) @@ -88,28 +202,42 @@ main(int argc, char **argv) int infile, outfile;
CVS commit: src/usr.bin/elf2aout
Module Name:src Committed By: christos Date: Sat May 18 21:16:12 UTC 2019 Modified Files: src/usr.bin/elf2aout: elf2aout.1 elf2aout.c Log Message: - add flag to produce OMAGIC - factor out complicated inline code into simpler functions - add options parsing To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/usr.bin/elf2aout/elf2aout.1 cvs rdiff -u -r1.21 -r1.22 src/usr.bin/elf2aout/elf2aout.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/i386/include
Module Name:src Committed By: christos Date: Sat May 18 17:41:34 UTC 2019 Modified Files: src/sys/arch/i386/include: reg.h Log Message: lint gets the wrong size. To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/sys/arch/i386/include/reg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/i386/include/reg.h diff -u src/sys/arch/i386/include/reg.h:1.21 src/sys/arch/i386/include/reg.h:1.22 --- src/sys/arch/i386/include/reg.h:1.21 Fri May 10 12:27:03 2019 +++ src/sys/arch/i386/include/reg.h Sat May 18 13:41:34 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: reg.h,v 1.21 2019/05/10 16:27:03 mgorny Exp $ */ +/* $NetBSD: reg.h,v 1.22 2019/05/18 17:41:34 christos Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -95,7 +95,7 @@ struct reg { struct fpreg { struct save87 fstate; }; -__CTASSERT(sizeof(struct fpreg) == 108); +__CTASSERT_NOLINT(sizeof(struct fpreg) == 108); struct xmmregs { struct fxsave fxstate;
CVS commit: src/sys/arch/x86/x86
Module Name:src Committed By: maxv Date: Sat May 18 13:44:57 UTC 2019 Modified Files: src/sys/arch/x86/x86: identcpu.c Log Message: Enable EagerFPU by default. Sent on port-amd64@. To generate a diff of this commit: cvs rdiff -u -r1.89 -r1.90 src/sys/arch/x86/x86/identcpu.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/amd64
Module Name:src Committed By: maxv Date: Sat May 18 13:32:12 UTC 2019 Modified Files: src/sys/arch/amd64/amd64: amd64_trap.S locore.S src/sys/arch/amd64/include: frameasm.h Log Message: Two changes in the CPU mitigations: * Micro-optimize: put every mitigation in the same branch. This removes two branches in each exc/int return path, and removes all branches in the syscall return path. * Modify the SpectreV2 mitigation to be compatible with SpectreV4. I recently realized that both couldn't be enabled at the same time on Intel. This is because initially, when there was just SpectreV2, we could reset the whole IA32_SPEC_CTRL MSR. But then Intel added another bit in it for SpectreV4, so it isn't right to reset it entirely anymore. SSBD needs to stay. To generate a diff of this commit: cvs rdiff -u -r1.47 -r1.48 src/sys/arch/amd64/amd64/amd64_trap.S cvs rdiff -u -r1.184 -r1.185 src/sys/arch/amd64/amd64/locore.S cvs rdiff -u -r1.43 -r1.44 src/sys/arch/amd64/include/frameasm.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/makemandb
Module Name:src Committed By: leot Date: Sat May 18 10:38:04 UTC 2019 Modified Files: src/usr.sbin/makemandb: DBSCHEMA Log Message: Document name_desc attribute of mandb_links. Discussed with via PR misc/54213, thanks! To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/usr.sbin/makemandb/DBSCHEMA Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/makemandb
Module Name:src Committed By: leot Date: Sat May 18 10:28:57 UTC 2019 Modified Files: src/usr.sbin/makemandb: whatis.c Log Message: Reintroduce case insensitive comparison of name accidentally lost in last revision. Discussed with via PR misc/54213, thanks! To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/usr.sbin/makemandb/whatis.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/makemandb
Module Name:src Committed By: leot Date: Sat May 18 10:28:57 UTC 2019 Modified Files: src/usr.sbin/makemandb: whatis.c Log Message: Reintroduce case insensitive comparison of name accidentally lost in last revision. Discussed with via PR misc/54213, thanks! To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/usr.sbin/makemandb/whatis.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/makemandb/whatis.c diff -u src/usr.sbin/makemandb/whatis.c:1.8 src/usr.sbin/makemandb/whatis.c:1.9 --- src/usr.sbin/makemandb/whatis.c:1.8 Sat May 18 07:56:43 2019 +++ src/usr.sbin/makemandb/whatis.c Sat May 18 10:28:57 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: whatis.c,v 1.8 2019/05/18 07:56:43 abhinav Exp $ */ +/* $NetBSD: whatis.c,v 1.9 2019/05/18 10:28:57 leot Exp $ */ /*- * Copyright (c) 2012 Joerg Sonnenberger * All rights reserved. @@ -29,7 +29,7 @@ */ #include -__RCSID("$NetBSD: whatis.c,v 1.8 2019/05/18 07:56:43 abhinav Exp $"); +__RCSID("$NetBSD: whatis.c,v 1.9 2019/05/18 10:28:57 leot Exp $"); #include #include @@ -49,8 +49,11 @@ static int whatis(sqlite3 *db, const char *cmd) { static const char sqlstr[] = "SELECT link AS name, section, name_desc" - " FROM mandb_links WHERE link=? UNION SELECT name, section, name_desc" - " FROM mandb WHERE name MATCH ? AND name=? ORDER BY section"; + " FROM mandb_links WHERE link=?" + " UNION" + " SELECT name, section, name_desc" + " FROM mandb WHERE name MATCH ? AND name=? COLLATE NOCASE" + " ORDER BY section"; sqlite3_stmt *stmt = NULL; int retval; int i;
CVS commit: src/share/man/man9
Module Name:src Committed By: alnsn Date: Sat May 18 10:21:03 UTC 2019 Modified Files: src/share/man/man9: secmodel_securelevel.9 Log Message: Don't mention SVS because it can't be changed anymore. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/share/man/man9/secmodel_securelevel.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man9
Module Name:src Committed By: alnsn Date: Sat May 18 10:21:03 UTC 2019 Modified Files: src/share/man/man9: secmodel_securelevel.9 Log Message: Don't mention SVS because it can't be changed anymore. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/share/man/man9/secmodel_securelevel.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/secmodel_securelevel.9 diff -u src/share/man/man9/secmodel_securelevel.9:1.18 src/share/man/man9/secmodel_securelevel.9:1.19 --- src/share/man/man9/secmodel_securelevel.9:1.18 Sun Jul 15 05:16:41 2018 +++ src/share/man/man9/secmodel_securelevel.9 Sat May 18 10:21:03 2019 @@ -1,4 +1,4 @@ -.\" $NetBSD: secmodel_securelevel.9,v 1.18 2018/07/15 05:16:41 maxv Exp $ +.\" $NetBSD: secmodel_securelevel.9,v 1.19 2019/05/18 10:21:03 alnsn Exp $ .\" .\" Copyright (c) 2006 Elad Efrat .\" Copyright (c) 2000 Hugh Graham @@ -26,7 +26,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd July 14, 2018 +.Dd May 18, 2019 .Dt SECMODEL_SECURELEVEL 9 .Os .Sh NAME @@ -132,8 +132,6 @@ Access to unmanaged memory is denied. Only GPIO pins that have been set at .Em securelevel 0 can be accessed. -.It -SVS (Separate Virtual Space) may not be disabled on platforms that support it. .El .It \ 2 Em Highly secure mode .Bl -bullet
CVS commit: src/sys/dev/nvmm/x86
Module Name:src Committed By: maxv Date: Sat May 18 08:55:59 UTC 2019 Modified Files: src/sys/dev/nvmm/x86: nvmm_x86_vmx.c Log Message: Now that SVS cannot be disabled at run time, MSR_LSTAR is static, so no need to save it on each VM enter. To generate a diff of this commit: cvs rdiff -u -r1.34 -r1.35 src/sys/dev/nvmm/x86/nvmm_x86_vmx.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/nvmm/x86
Module Name:src Committed By: maxv Date: Sat May 18 08:55:59 UTC 2019 Modified Files: src/sys/dev/nvmm/x86: nvmm_x86_vmx.c Log Message: Now that SVS cannot be disabled at run time, MSR_LSTAR is static, so no need to save it on each VM enter. To generate a diff of this commit: cvs rdiff -u -r1.34 -r1.35 src/sys/dev/nvmm/x86/nvmm_x86_vmx.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/nvmm/x86/nvmm_x86_vmx.c diff -u src/sys/dev/nvmm/x86/nvmm_x86_vmx.c:1.34 src/sys/dev/nvmm/x86/nvmm_x86_vmx.c:1.35 --- src/sys/dev/nvmm/x86/nvmm_x86_vmx.c:1.34 Sat May 11 07:31:56 2019 +++ src/sys/dev/nvmm/x86/nvmm_x86_vmx.c Sat May 18 08:55:59 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: nvmm_x86_vmx.c,v 1.34 2019/05/11 07:31:56 maxv Exp $ */ +/* $NetBSD: nvmm_x86_vmx.c,v 1.35 2019/05/18 08:55:59 maxv Exp $ */ /* * Copyright (c) 2018 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nvmm_x86_vmx.c,v 1.34 2019/05/11 07:31:56 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nvmm_x86_vmx.c,v 1.35 2019/05/18 08:55:59 maxv Exp $"); #include #include @@ -1772,8 +1772,6 @@ vmx_vcpu_guest_misc_enter(struct nvmm_cp vmx_vmwrite(VMCS_HOST_CR3, rcr3()); vmx_vmwrite(VMCS_HOST_CR4, rcr4()); - /* Note: MSR_LSTAR is not static, because of SVS. */ - cpudata->lstar = rdmsr(MSR_LSTAR); cpudata->kernelgsbase = rdmsr(MSR_KERNELGSBASE); } @@ -2655,6 +2653,7 @@ vmx_vcpu_init(struct nvmm_machine *mach, /* These MSRs are static. */ cpudata->star = rdmsr(MSR_STAR); + cpudata->lstar = rdmsr(MSR_LSTAR); cpudata->cstar = rdmsr(MSR_CSTAR); cpudata->sfmask = rdmsr(MSR_SFMASK);
CVS commit: src/sys/arch/x86/x86
Module Name:src Committed By: maxv Date: Sat May 18 08:54:38 UTC 2019 Modified Files: src/sys/arch/x86/x86: spectre.c Log Message: Use XC_HIGHPRI for SpectreV2 to reduce the CPU downtime. We already do this for MDS. To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/sys/arch/x86/x86/spectre.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/x86/x86
Module Name:src Committed By: maxv Date: Sat May 18 08:54:38 UTC 2019 Modified Files: src/sys/arch/x86/x86: spectre.c Log Message: Use XC_HIGHPRI for SpectreV2 to reduce the CPU downtime. We already do this for MDS. To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/sys/arch/x86/x86/spectre.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/x86/x86/spectre.c diff -u src/sys/arch/x86/x86/spectre.c:1.27 src/sys/arch/x86/x86/spectre.c:1.28 --- src/sys/arch/x86/x86/spectre.c:1.27 Tue May 14 16:59:26 2019 +++ src/sys/arch/x86/x86/spectre.c Sat May 18 08:54:38 2019 @@ -1,7 +1,7 @@ -/* $NetBSD: spectre.c,v 1.27 2019/05/14 16:59:26 maxv Exp $ */ +/* $NetBSD: spectre.c,v 1.28 2019/05/18 08:54:38 maxv Exp $ */ /* - * Copyright (c) 2018 NetBSD Foundation, Inc. + * Copyright (c) 2018-2019 NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation @@ -30,11 +30,11 @@ */ /* - * Mitigations for the SpectreV2 and SpectreV4 CPU flaws. + * Mitigations for the SpectreV2, SpectreV4 and MDS CPU flaws. */ #include -__KERNEL_RCSID(0, "$NetBSD: spectre.c,v 1.27 2019/05/14 16:59:26 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: spectre.c,v 1.28 2019/05/18 08:54:38 maxv Exp $"); #include "opt_spectre.h" @@ -328,7 +328,7 @@ mitigation_v2_change(bool enabled) printf("[+] %s SpectreV2 Mitigation...", enabled ? "Enabling" : "Disabling"); - xc = xc_broadcast(0, mitigation_v2_change_cpu, + xc = xc_broadcast(XC_HIGHPRI, mitigation_v2_change_cpu, (void *)enabled, NULL); xc_wait(xc); printf(" done!\n");
CVS commit: src/sys/arch
Module Name:src Committed By: skrll Date: Sat May 18 08:49:24 UTC 2019 Modified Files: src/sys/arch/arm/broadcom: bcm53xx_reg.h src/sys/arch/arm/omap: omap2_reg.h src/sys/arch/evbarm/bcm53xx: bcm53xx_machdep.c platform.h src/sys/arch/evbarm/beagle: beagle_machdep.c src/sys/arch/evbarm/conf: ARMADILLO-IOT-G3 BEAGLEBONE IGEPV2 N900 OMAP5EVM PANDABOARD VTC100 mk.beagle mk.gumstix mk.imx7 mk.kobo mk.nitrogen6 std.bcm53xx std.beagle std.gumstix std.imx7 std.kobo std.nitrogen6 std.overo src/sys/arch/evbarm/gumstix: gumstix_machdep.c gumstix_start.S gumstixreg.h src/sys/arch/evbarm/imx7: imx7_machdep.c src/sys/arch/evbarm/kobo: kobo_machdep.c src/sys/arch/evbarm/netwalker: netwalker_start.S Removed Files: src/sys/arch/arm/cortex: a9_mpsubr.S src/sys/arch/evbarm/bcm53xx: bcm53xx_start.S src/sys/arch/evbarm/beagle: beagle_start.S genassym.cf src/sys/arch/evbarm/imx7: genassym.cf imx7_start.S src/sys/arch/evbarm/kobo: kobo_start.S Log Message: Convert remaining armv7 kernels to generic start and remove a bunch of code including a9_mpsubr.S. Thanks to Lwazi Dube for testing PANDABOARD and BEAGLEBONE. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/sys/arch/arm/broadcom/bcm53xx_reg.h cvs rdiff -u -r1.58 -r0 src/sys/arch/arm/cortex/a9_mpsubr.S cvs rdiff -u -r1.34 -r1.35 src/sys/arch/arm/omap/omap2_reg.h cvs rdiff -u -r1.19 -r1.20 src/sys/arch/evbarm/bcm53xx/bcm53xx_machdep.c cvs rdiff -u -r1.13 -r0 src/sys/arch/evbarm/bcm53xx/bcm53xx_start.S cvs rdiff -u -r1.2 -r1.3 src/sys/arch/evbarm/bcm53xx/platform.h cvs rdiff -u -r1.76 -r1.77 src/sys/arch/evbarm/beagle/beagle_machdep.c cvs rdiff -u -r1.20 -r0 src/sys/arch/evbarm/beagle/beagle_start.S cvs rdiff -u -r1.1 -r0 src/sys/arch/evbarm/beagle/genassym.cf cvs rdiff -u -r1.17 -r1.18 src/sys/arch/evbarm/conf/ARMADILLO-IOT-G3 \ src/sys/arch/evbarm/conf/std.beagle cvs rdiff -u -r1.47 -r1.48 src/sys/arch/evbarm/conf/BEAGLEBONE cvs rdiff -u -r1.34 -r1.35 src/sys/arch/evbarm/conf/IGEPV2 cvs rdiff -u -r1.30 -r1.31 src/sys/arch/evbarm/conf/N900 cvs rdiff -u -r1.15 -r1.16 src/sys/arch/evbarm/conf/OMAP5EVM cvs rdiff -u -r1.28 -r1.29 src/sys/arch/evbarm/conf/PANDABOARD cvs rdiff -u -r1.20 -r1.21 src/sys/arch/evbarm/conf/VTC100 cvs rdiff -u -r1.11 -r1.12 src/sys/arch/evbarm/conf/mk.beagle cvs rdiff -u -r1.6 -r1.7 src/sys/arch/evbarm/conf/mk.gumstix cvs rdiff -u -r1.1 -r1.2 src/sys/arch/evbarm/conf/mk.imx7 \ src/sys/arch/evbarm/conf/mk.kobo cvs rdiff -u -r1.3 -r1.4 src/sys/arch/evbarm/conf/mk.nitrogen6 cvs rdiff -u -r1.19 -r1.20 src/sys/arch/evbarm/conf/std.bcm53xx cvs rdiff -u -r1.10 -r1.11 src/sys/arch/evbarm/conf/std.gumstix \ src/sys/arch/evbarm/conf/std.overo cvs rdiff -u -r1.4 -r1.5 src/sys/arch/evbarm/conf/std.imx7 \ src/sys/arch/evbarm/conf/std.kobo cvs rdiff -u -r1.9 -r1.10 src/sys/arch/evbarm/conf/std.nitrogen6 cvs rdiff -u -r1.61 -r1.62 src/sys/arch/evbarm/gumstix/gumstix_machdep.c cvs rdiff -u -r1.15 -r1.16 src/sys/arch/evbarm/gumstix/gumstix_start.S cvs rdiff -u -r1.9 -r1.10 src/sys/arch/evbarm/gumstix/gumstixreg.h cvs rdiff -u -r1.1 -r0 src/sys/arch/evbarm/imx7/genassym.cf cvs rdiff -u -r1.9 -r1.10 src/sys/arch/evbarm/imx7/imx7_machdep.c cvs rdiff -u -r1.2 -r0 src/sys/arch/evbarm/imx7/imx7_start.S cvs rdiff -u -r1.5 -r1.6 src/sys/arch/evbarm/kobo/kobo_machdep.c cvs rdiff -u -r1.1 -r0 src/sys/arch/evbarm/kobo/kobo_start.S cvs rdiff -u -r1.5 -r1.6 src/sys/arch/evbarm/netwalker/netwalker_start.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch
Module Name:src Committed By: skrll Date: Sat May 18 08:49:24 UTC 2019 Modified Files: src/sys/arch/arm/broadcom: bcm53xx_reg.h src/sys/arch/arm/omap: omap2_reg.h src/sys/arch/evbarm/bcm53xx: bcm53xx_machdep.c platform.h src/sys/arch/evbarm/beagle: beagle_machdep.c src/sys/arch/evbarm/conf: ARMADILLO-IOT-G3 BEAGLEBONE IGEPV2 N900 OMAP5EVM PANDABOARD VTC100 mk.beagle mk.gumstix mk.imx7 mk.kobo mk.nitrogen6 std.bcm53xx std.beagle std.gumstix std.imx7 std.kobo std.nitrogen6 std.overo src/sys/arch/evbarm/gumstix: gumstix_machdep.c gumstix_start.S gumstixreg.h src/sys/arch/evbarm/imx7: imx7_machdep.c src/sys/arch/evbarm/kobo: kobo_machdep.c src/sys/arch/evbarm/netwalker: netwalker_start.S Removed Files: src/sys/arch/arm/cortex: a9_mpsubr.S src/sys/arch/evbarm/bcm53xx: bcm53xx_start.S src/sys/arch/evbarm/beagle: beagle_start.S genassym.cf src/sys/arch/evbarm/imx7: genassym.cf imx7_start.S src/sys/arch/evbarm/kobo: kobo_start.S Log Message: Convert remaining armv7 kernels to generic start and remove a bunch of code including a9_mpsubr.S. Thanks to Lwazi Dube for testing PANDABOARD and BEAGLEBONE. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/sys/arch/arm/broadcom/bcm53xx_reg.h cvs rdiff -u -r1.58 -r0 src/sys/arch/arm/cortex/a9_mpsubr.S cvs rdiff -u -r1.34 -r1.35 src/sys/arch/arm/omap/omap2_reg.h cvs rdiff -u -r1.19 -r1.20 src/sys/arch/evbarm/bcm53xx/bcm53xx_machdep.c cvs rdiff -u -r1.13 -r0 src/sys/arch/evbarm/bcm53xx/bcm53xx_start.S cvs rdiff -u -r1.2 -r1.3 src/sys/arch/evbarm/bcm53xx/platform.h cvs rdiff -u -r1.76 -r1.77 src/sys/arch/evbarm/beagle/beagle_machdep.c cvs rdiff -u -r1.20 -r0 src/sys/arch/evbarm/beagle/beagle_start.S cvs rdiff -u -r1.1 -r0 src/sys/arch/evbarm/beagle/genassym.cf cvs rdiff -u -r1.17 -r1.18 src/sys/arch/evbarm/conf/ARMADILLO-IOT-G3 \ src/sys/arch/evbarm/conf/std.beagle cvs rdiff -u -r1.47 -r1.48 src/sys/arch/evbarm/conf/BEAGLEBONE cvs rdiff -u -r1.34 -r1.35 src/sys/arch/evbarm/conf/IGEPV2 cvs rdiff -u -r1.30 -r1.31 src/sys/arch/evbarm/conf/N900 cvs rdiff -u -r1.15 -r1.16 src/sys/arch/evbarm/conf/OMAP5EVM cvs rdiff -u -r1.28 -r1.29 src/sys/arch/evbarm/conf/PANDABOARD cvs rdiff -u -r1.20 -r1.21 src/sys/arch/evbarm/conf/VTC100 cvs rdiff -u -r1.11 -r1.12 src/sys/arch/evbarm/conf/mk.beagle cvs rdiff -u -r1.6 -r1.7 src/sys/arch/evbarm/conf/mk.gumstix cvs rdiff -u -r1.1 -r1.2 src/sys/arch/evbarm/conf/mk.imx7 \ src/sys/arch/evbarm/conf/mk.kobo cvs rdiff -u -r1.3 -r1.4 src/sys/arch/evbarm/conf/mk.nitrogen6 cvs rdiff -u -r1.19 -r1.20 src/sys/arch/evbarm/conf/std.bcm53xx cvs rdiff -u -r1.10 -r1.11 src/sys/arch/evbarm/conf/std.gumstix \ src/sys/arch/evbarm/conf/std.overo cvs rdiff -u -r1.4 -r1.5 src/sys/arch/evbarm/conf/std.imx7 \ src/sys/arch/evbarm/conf/std.kobo cvs rdiff -u -r1.9 -r1.10 src/sys/arch/evbarm/conf/std.nitrogen6 cvs rdiff -u -r1.61 -r1.62 src/sys/arch/evbarm/gumstix/gumstix_machdep.c cvs rdiff -u -r1.15 -r1.16 src/sys/arch/evbarm/gumstix/gumstix_start.S cvs rdiff -u -r1.9 -r1.10 src/sys/arch/evbarm/gumstix/gumstixreg.h cvs rdiff -u -r1.1 -r0 src/sys/arch/evbarm/imx7/genassym.cf cvs rdiff -u -r1.9 -r1.10 src/sys/arch/evbarm/imx7/imx7_machdep.c cvs rdiff -u -r1.2 -r0 src/sys/arch/evbarm/imx7/imx7_start.S cvs rdiff -u -r1.5 -r1.6 src/sys/arch/evbarm/kobo/kobo_machdep.c cvs rdiff -u -r1.1 -r0 src/sys/arch/evbarm/kobo/kobo_start.S cvs rdiff -u -r1.5 -r1.6 src/sys/arch/evbarm/netwalker/netwalker_start.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/broadcom/bcm53xx_reg.h diff -u src/sys/arch/arm/broadcom/bcm53xx_reg.h:1.17 src/sys/arch/arm/broadcom/bcm53xx_reg.h:1.18 --- src/sys/arch/arm/broadcom/bcm53xx_reg.h:1.17 Sun Sep 16 09:25:46 2018 +++ src/sys/arch/arm/broadcom/bcm53xx_reg.h Sat May 18 08:49:23 2019 @@ -69,11 +69,15 @@ #define BCM53XX_PCIE2_OWIN_SIZE 0x0400 #define BCM53XX_PCIE2_OWIN_MAX 0x0800 +#define BCM53XX_ROM_REGION_PBASE 0xfff0 +#define BCM53XX_ROM_REGION_SIZE 0x0010 + #define BCM53XX_IO_SIZE (BCM53XX_IOREG_SIZE \ + BCM53XX_ARMCORE_SIZE \ + BCM53XX_PCIE0_OWIN_SIZE \ + BCM53XX_PCIE1_OWIN_SIZE \ - + BCM53XX_PCIE2_OWIN_SIZE) + + BCM53XX_PCIE2_OWIN_SIZE \ + + BCM53XX_ROM_REGION_SIZE) #define BCM53XX_REF_CLK (25*1000*1000) Index: src/sys/arch/arm/omap/omap2_reg.h diff -u src/sys/arch/arm/omap/omap2_reg.h:1.34 src/sys/arch/arm/omap/omap2_reg.h:1.35 --- src/sys/arch/arm/omap/omap2_reg.h:1.34 Tue Oct 4 16:03:39 2016 +++ src/sys/arch/arm/omap/omap2_reg.h Sat May 18 08:49:23 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: omap2_reg.h,v 1.34 2016/10/04 16:03:39 kiyohara Exp $ */ +/* $NetBSD: omap2_reg.h,v 1.35 2019/05/18 08:49:23 skrll Exp $ */ /* * Copyright (c) 2007 Microsoft @@ -93,6 +93,9 @@ #define
CVS commit: src
Module Name:src Committed By: mlelstv Date: Sat May 18 08:38:00 UTC 2019 Modified Files: src/distrib/sets/lists/comp: mi src/etc: MAKEDEV.tmpl src/sys/conf: majors src/sys/dev: ipmi.c ipmivar.h src/sys/sys: Makefile Added Files: src/sys/sys: ipmi.h Log Message: Add experimental userland interface to IPMI driver. Currently, transactions (like sensor readout) are locked, so that a userland program may interfere with envsys operation. To use this you need a program like ipmitool built with OpenIPMI support. To generate a diff of this commit: cvs rdiff -u -r1.2273 -r1.2274 src/distrib/sets/lists/comp/mi cvs rdiff -u -r1.202 -r1.203 src/etc/MAKEDEV.tmpl cvs rdiff -u -r1.86 -r1.87 src/sys/conf/majors cvs rdiff -u -r1.3 -r1.4 src/sys/dev/ipmi.c cvs rdiff -u -r1.2 -r1.3 src/sys/dev/ipmivar.h cvs rdiff -u -r1.169 -r1.170 src/sys/sys/Makefile cvs rdiff -u -r0 -r1.1 src/sys/sys/ipmi.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/comp/mi diff -u src/distrib/sets/lists/comp/mi:1.2273 src/distrib/sets/lists/comp/mi:1.2274 --- src/distrib/sets/lists/comp/mi:1.2273 Wed May 8 14:25:38 2019 +++ src/distrib/sets/lists/comp/mi Sat May 18 08:38:00 2019 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.2273 2019/05/08 14:25:38 isaki Exp $ +# $NetBSD: mi,v 1.2274 2019/05/18 08:38:00 mlelstv Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. ./etc/mtree/set.compcomp-sys-root @@ -3016,6 +3016,7 @@ ./usr/include/sys/ioctl_compat.h comp-c-include ./usr/include/sys/iostat.h comp-c-include ./usr/include/sys/ipc.hcomp-c-include +./usr/include/sys/ipmi.h comp-c-include ./usr/include/sys/joystick.h comp-c-include ./usr/include/sys/kcore.h comp-c-include ./usr/include/sys/kcov.h comp-c-include Index: src/etc/MAKEDEV.tmpl diff -u src/etc/MAKEDEV.tmpl:1.202 src/etc/MAKEDEV.tmpl:1.203 --- src/etc/MAKEDEV.tmpl:1.202 Mon Apr 1 13:08:24 2019 +++ src/etc/MAKEDEV.tmpl Sat May 18 08:38:00 2019 @@ -1,5 +1,5 @@ #!/bin/sh - -# $NetBSD: MAKEDEV.tmpl,v 1.202 2019/04/01 13:08:24 martin Exp $ +# $NetBSD: MAKEDEV.tmpl,v 1.203 2019/05/18 08:38:00 mlelstv Exp $ # # Copyright (c) 2003,2007,2008 The NetBSD Foundation, Inc. # All rights reserved. @@ -242,6 +242,7 @@ # iic* IIC bus device # io x86 IOPL access for COMPAT_10, COMPAT_FREEBSD # iop* I2O IOP control interface +# ipmi* OpenIPMI compatible interface # ipl IP Filter # irframe* IrDA physical frame # ite* terminal emulator interface to HP300 graphics devices @@ -2228,6 +2229,11 @@ kcov) mkdev kcov c %kcov_chr% 0 ;; +ipmi[0-9]*) + unit=${i#ipmi} + mkdev ipmi${unit} c %ipmi_chr% $unit 600 + ;; + midevend) %MI_DEVICES_END% local) Index: src/sys/conf/majors diff -u src/sys/conf/majors:1.86 src/sys/conf/majors:1.87 --- src/sys/conf/majors:1.86 Sun May 5 17:24:00 2019 +++ src/sys/conf/majors Sat May 18 08:38:00 2019 @@ -1,4 +1,4 @@ -# $NetBSD: majors,v 1.86 2019/05/05 17:24:00 mlelstv Exp $ +# $NetBSD: majors,v 1.87 2019/05/18 08:38:00 mlelstv Exp $ # # Device majors for Machine-Independent drivers. # @@ -85,4 +85,4 @@ device-major spi char 347 spi # Major 351 is reserved for sys/modules/examples # Major 352 is reserved for external/cddl/osnet/dev/fbt/fbt.c # Major 353 is reserved for external/cddl/osnet/dev/sdt/sdt.c -# Major 354 is reserved for IPMI userland driver +device-major ipmi char 354 ipmi Index: src/sys/dev/ipmi.c diff -u src/sys/dev/ipmi.c:1.3 src/sys/dev/ipmi.c:1.4 --- src/sys/dev/ipmi.c:1.3 Fri Dec 28 12:44:15 2018 +++ src/sys/dev/ipmi.c Sat May 18 08:38:00 2019 @@ -1,6 +1,30 @@ -/* $NetBSD: ipmi.c,v 1.3 2018/12/28 12:44:15 mlelstv Exp $ */ +/* $NetBSD: ipmi.c,v 1.4 2019/05/18 08:38:00 mlelstv Exp $ */ /* + * Copyright (c) 2019 Michael van Elst + * + * 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,
CVS commit: src/sys/arch/x86/include
Module Name:src Committed By: maxv Date: Sat May 18 08:17:39 UTC 2019 Modified Files: src/sys/arch/x86/include: specialreg.h Log Message: Clean up a little, add new XCR0 bits, remove a few unused MSRs, and fix typos. To generate a diff of this commit: cvs rdiff -u -r1.145 -r1.146 src/sys/arch/x86/include/specialreg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/x86/include/specialreg.h diff -u src/sys/arch/x86/include/specialreg.h:1.145 src/sys/arch/x86/include/specialreg.h:1.146 --- src/sys/arch/x86/include/specialreg.h:1.145 Tue May 14 18:11:34 2019 +++ src/sys/arch/x86/include/specialreg.h Sat May 18 08:17:39 2019 @@ -1,6 +1,32 @@ -/* $NetBSD: specialreg.h,v 1.145 2019/05/14 18:11:34 msaitoh Exp $ */ +/* $NetBSD: specialreg.h,v 1.146 2019/05/18 08:17:39 maxv Exp $ */ -/*- +/* + * Copyright (c) 2014-2019 The NetBSD Foundation, 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 NETBSD FOUNDATION, INC. 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 FOUNDATION 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. + */ + +/* * Copyright (c) 1991 The Regents of the University of California. * All rights reserved. * @@ -32,28 +58,24 @@ */ /* - * Bits in 386 special registers: + * CR0 */ #define CR0_PE 0x0001 /* Protected mode Enable */ #define CR0_MP 0x0002 /* "Math" Present (NPX or NPX emulator) */ #define CR0_EM 0x0004 /* EMulate non-NPX coproc. (trap ESC only) */ #define CR0_TS 0x0008 /* Task Switched (if MP, trap ESC and WAIT) */ #define CR0_ET 0x0010 /* Extension Type (387 (if set) vs 287) */ -#define CR0_PG 0x8000 /* PaGing enable */ - -/* - * Bits in 486 special registers: - */ #define CR0_NE 0x0020 /* Numeric Error enable (EX16 vs IRQ13) */ #define CR0_WP 0x0001 /* Write Protect (honor PTE_W in all modes) */ #define CR0_AM 0x0004 /* Alignment Mask (set to enable AC flag) */ #define CR0_NW 0x2000 /* Not Write-through */ #define CR0_CD 0x4000 /* Cache Disable */ +#define CR0_PG 0x8000 /* PaGing enable */ /* - * Cyrix 486 DLC special registers, accessible as IO ports. + * Cyrix 486 DLC special registers, accessible as IO ports */ -#define CCR0 0xc0 /* configuration control register 0 */ +#define CCR0 0xc0 /* configuration control register 0 */ #define CCR0_NC0 0x01 /* first 64K of each 1M memory region is non-cacheable */ #define CCR0_NC1 0x02 /* 640K-1M region is non-cacheable */ #define CCR0_A20M 0x04 /* enables A20M# input pin */ @@ -62,13 +84,11 @@ #define CCR0_BARB 0x20 /* flushes internal cache when entering hold state */ #define CCR0_CO 0x40 /* cache org: 1=direct mapped, 0=2x set assoc */ #define CCR0_SUSPEND 0x80 /* enables SUSP# and SUSPA# pins */ - -#define CCR1 0xc1 /* configuration control register 1 */ +#define CCR1 0xc1 /* configuration control register 1 */ #define CCR1_RPL 0x01 /* enables RPLSET and RPLVAL# pins */ -/* the remaining 7 bits of this register are reserved */ /* - * bits in the %cr4 control register: + * CR4 */ #define CR4_VME 0x0001 /* virtual 8086 mode extension enable */ #define CR4_PVI 0x0002 /* protected mode virtual interrupt enable */ @@ -102,21 +122,22 @@ #define XCR0_Opmask 0x0020 /* AVX-512 Opmask */ #define XCR0_ZMM_Hi256 0x0040 /* AVX-512 upper 256 bits low regs */ #define XCR0_Hi16_ZMM 0x0080 /* AVX-512 512 bits upper registers */ +#define XCR0_PT 0x0100 /* Processor Trace state */ +#define XCR0_PKRU 0x0200 /* Protection Key state */ +#define XCR0_HDC 0x2000 /* Hardware Duty Cycle state */ + +#define XCR0_FLAGS1 "\20" \ + "\1" "x87" "\2" "SSE" "\3" "AVX" \ + "\4" "BNDREGS" "\5" "BNDCSR" "\6" "Opmask" \ + "\7" "ZMM_Hi256" "\10" "Hi16_ZMM" "\11"
CVS commit: src/sys/arch/x86/include
Module Name:src Committed By: maxv Date: Sat May 18 08:17:39 UTC 2019 Modified Files: src/sys/arch/x86/include: specialreg.h Log Message: Clean up a little, add new XCR0 bits, remove a few unused MSRs, and fix typos. To generate a diff of this commit: cvs rdiff -u -r1.145 -r1.146 src/sys/arch/x86/include/specialreg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/amd64/amd64
Module Name:src Committed By: maxv Date: Sat May 18 07:58:58 UTC 2019 Modified Files: src/sys/arch/amd64/amd64: locore.S Log Message: Set the symbol type for intrfastexit, so that tools like tprof can find the symbol name. To generate a diff of this commit: cvs rdiff -u -r1.183 -r1.184 src/sys/arch/amd64/amd64/locore.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/amd64/amd64/locore.S diff -u src/sys/arch/amd64/amd64/locore.S:1.183 src/sys/arch/amd64/amd64/locore.S:1.184 --- src/sys/arch/amd64/amd64/locore.S:1.183 Wed May 15 18:27:51 2019 +++ src/sys/arch/amd64/amd64/locore.S Sat May 18 07:58:58 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.S,v 1.183 2019/05/15 18:27:51 maxv Exp $ */ +/* $NetBSD: locore.S,v 1.184 2019/05/18 07:58:58 maxv Exp $ */ /* * Copyright-o-rama! @@ -1571,6 +1571,7 @@ END(pagezero) #define TF_BACKW(val, reg) (val - (TF_REGSIZE+16))(reg) _ALIGN_TEXT + .type intrfastexit,@function LABEL(intrfastexit) NOT_XEN(cli;) MDS_LEAVE
CVS commit: src/usr.sbin/makemandb
Module Name:src Committed By: abhinav Date: Sat May 18 07:56:43 UTC 2019 Modified Files: src/usr.sbin/makemandb: apropos-utils.c apropos-utils.h makemandb.c whatis.c Log Message: PR misc/54213: Fix performance of whatis(1) when no matches are found In revision 1.6 of whatis.c the query was modified to return matches for names found in MLINKS of the man pages as well. However it was slow. The reason probably being that it required a join. But more importantly the where condition on an FTS virtual table column is very slow. To avoid the join and the expensive where condition on the virtual table, add the name_desc column to the mandb_links table as well. This improves the performance of whatis(1) to the original level at the expense of slight data duplication. Bump the schema to force database rebuild to take account for the new column addition To generate a diff of this commit: cvs rdiff -u -r1.43 -r1.44 src/usr.sbin/makemandb/apropos-utils.c cvs rdiff -u -r1.14 -r1.15 src/usr.sbin/makemandb/apropos-utils.h cvs rdiff -u -r1.59 -r1.60 src/usr.sbin/makemandb/makemandb.c cvs rdiff -u -r1.7 -r1.8 src/usr.sbin/makemandb/whatis.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/makemandb/apropos-utils.c diff -u src/usr.sbin/makemandb/apropos-utils.c:1.43 src/usr.sbin/makemandb/apropos-utils.c:1.44 --- src/usr.sbin/makemandb/apropos-utils.c:1.43 Fri Apr 19 20:35:13 2019 +++ src/usr.sbin/makemandb/apropos-utils.c Sat May 18 07:56:43 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: apropos-utils.c,v 1.43 2019/04/19 20:35:13 abhinav Exp $ */ +/* $NetBSD: apropos-utils.c,v 1.44 2019/05/18 07:56:43 abhinav Exp $ */ /*- * Copyright (c) 2011 Abhinav Upadhyay * All rights reserved. @@ -31,7 +31,7 @@ */ #include -__RCSID("$NetBSD: apropos-utils.c,v 1.43 2019/04/19 20:35:13 abhinav Exp $"); +__RCSID("$NetBSD: apropos-utils.c,v 1.44 2019/05/18 07:56:43 abhinav Exp $"); #include #include @@ -213,7 +213,7 @@ create_db(sqlite3 *db) "file UNIQUE, md5_hash UNIQUE, id INTEGER PRIMARY KEY); " //mandb_links "CREATE TABLE IF NOT EXISTS mandb_links(link COLLATE NOCASE, target, section, " - "machine, md5_hash); "; + "machine, md5_hash, name_desc); "; sqlite3_exec(db, sqlstr, NULL, NULL, ); if (errmsg != NULL) Index: src/usr.sbin/makemandb/apropos-utils.h diff -u src/usr.sbin/makemandb/apropos-utils.h:1.14 src/usr.sbin/makemandb/apropos-utils.h:1.15 --- src/usr.sbin/makemandb/apropos-utils.h:1.14 Sat Nov 25 14:29:38 2017 +++ src/usr.sbin/makemandb/apropos-utils.h Sat May 18 07:56:43 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: apropos-utils.h,v 1.14 2017/11/25 14:29:38 abhinav Exp $ */ +/* $NetBSD: apropos-utils.h,v 1.15 2019/05/18 07:56:43 abhinav Exp $ */ /*- * Copyright (c) 2011 Abhinav Upadhyay * All rights reserved. @@ -45,7 +45,7 @@ typedef enum mandb_access_mode { } mandb_access_mode; -#define APROPOS_SCHEMA_VERSION 20170618 +#define APROPOS_SCHEMA_VERSION 20190518 /* * Used to identify the section of a man(7) page. Index: src/usr.sbin/makemandb/makemandb.c diff -u src/usr.sbin/makemandb/makemandb.c:1.59 src/usr.sbin/makemandb/makemandb.c:1.60 --- src/usr.sbin/makemandb/makemandb.c:1.59 Mon Mar 11 00:31:36 2019 +++ src/usr.sbin/makemandb/makemandb.c Sat May 18 07:56:43 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: makemandb.c,v 1.59 2019/03/11 00:31:36 christos Exp $ */ +/* $NetBSD: makemandb.c,v 1.60 2019/05/18 07:56:43 abhinav Exp $ */ /* * Copyright (c) 2011 Abhinav Upadhyay * Copyright (c) 2011 Kristaps Dzonsons @@ -17,7 +17,7 @@ */ #include -__RCSID("$NetBSD: makemandb.c,v 1.59 2019/03/11 00:31:36 christos Exp $"); +__RCSID("$NetBSD: makemandb.c,v 1.60 2019/05/18 07:56:43 abhinav Exp $"); #include #include @@ -1767,9 +1767,9 @@ insert_into_db(sqlite3 *db, mandb_rec *r ln[strlen(ln) - 1] = 0; str = sqlite3_mprintf("INSERT INTO mandb_links" - " VALUES (%Q, %Q, %Q, %Q, %Q)", + " VALUES (%Q, %Q, %Q, %Q, %Q, %Q)", ln, rec->name, rec->section, - rec->machine, rec->md5_hash); + rec->machine, rec->md5_hash, rec->name_desc); sqlite3_exec(db, str, NULL, NULL, ); sqlite3_free(str); if (errmsg != NULL) { Index: src/usr.sbin/makemandb/whatis.c diff -u src/usr.sbin/makemandb/whatis.c:1.7 src/usr.sbin/makemandb/whatis.c:1.8 --- src/usr.sbin/makemandb/whatis.c:1.7 Tue May 23 15:27:54 2017 +++ src/usr.sbin/makemandb/whatis.c Sat May 18 07:56:43 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: whatis.c,v 1.7 2017/05/23 15:27:54 abhinav Exp $ */ +/* $NetBSD: whatis.c,v 1.8 2019/05/18 07:56:43 abhinav Exp $ */ /*- * Copyright (c) 2012 Joerg Sonnenberger * All rights reserved. @@ -29,7 +29,7 @@ */ #include -__RCSID("$NetBSD: whatis.c,v 1.7 2017/05/23 1
CVS commit: src/usr.sbin/makemandb
Module Name:src Committed By: abhinav Date: Sat May 18 07:56:43 UTC 2019 Modified Files: src/usr.sbin/makemandb: apropos-utils.c apropos-utils.h makemandb.c whatis.c Log Message: PR misc/54213: Fix performance of whatis(1) when no matches are found In revision 1.6 of whatis.c the query was modified to return matches for names found in MLINKS of the man pages as well. However it was slow. The reason probably being that it required a join. But more importantly the where condition on an FTS virtual table column is very slow. To avoid the join and the expensive where condition on the virtual table, add the name_desc column to the mandb_links table as well. This improves the performance of whatis(1) to the original level at the expense of slight data duplication. Bump the schema to force database rebuild to take account for the new column addition To generate a diff of this commit: cvs rdiff -u -r1.43 -r1.44 src/usr.sbin/makemandb/apropos-utils.c cvs rdiff -u -r1.14 -r1.15 src/usr.sbin/makemandb/apropos-utils.h cvs rdiff -u -r1.59 -r1.60 src/usr.sbin/makemandb/makemandb.c cvs rdiff -u -r1.7 -r1.8 src/usr.sbin/makemandb/whatis.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/x86/x86
Module Name:src Committed By: maxv Date: Sat May 18 07:49:31 UTC 2019 Modified Files: src/sys/arch/x86/x86: errata.c Log Message: Disable errata #1091. We are the only OS to apply it, and it seems to be causing trouble to VirtualBox (PR/54143). To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/sys/arch/x86/x86/errata.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/x86/x86
Module Name:src Committed By: maxv Date: Sat May 18 07:49:31 UTC 2019 Modified Files: src/sys/arch/x86/x86: errata.c Log Message: Disable errata #1091. We are the only OS to apply it, and it seems to be causing trouble to VirtualBox (PR/54143). To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/sys/arch/x86/x86/errata.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/x86/x86/errata.c diff -u src/sys/arch/x86/x86/errata.c:1.25 src/sys/arch/x86/x86/errata.c:1.26 --- src/sys/arch/x86/x86/errata.c:1.25 Sun Aug 12 05:43:42 2018 +++ src/sys/arch/x86/x86/errata.c Sat May 18 07:49:31 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: errata.c,v 1.25 2018/08/12 05:43:42 maxv Exp $ */ +/* $NetBSD: errata.c,v 1.26 2019/05/18 07:49:31 maxv Exp $ */ /*- * Copyright (c) 2007 The NetBSD Foundation, Inc. @@ -45,7 +45,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: errata.c,v 1.25 2018/08/12 05:43:42 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: errata.c,v 1.26 2019/05/18 07:49:31 maxv Exp $"); #include #include @@ -341,6 +341,7 @@ static errata_t errata[] = { 1049, FALSE, MSR_FP_CFG, x86_errata_set13, x86_errata_setmsr, FP_CFG_ERRATA_1049 }, +#if 0 /* Should we apply this errata? The other OSes don't. */ /* * 1091: Address Boundary Crossing Load Operation May Receive * Stale Data @@ -349,6 +350,7 @@ static errata_t errata[] = { 1091, FALSE, MSR_LS_CFG2, x86_errata_set13, x86_errata_setmsr, LS_CFG2_ERRATA_1091 }, +#endif /* * 1095: Potential Violation of Read Ordering In Lock Operation * In SMT (Simultaneous Multithreading) Mode
CVS commit: src
Module Name:src Committed By: skrll Date: Sat May 18 07:33:11 UTC 2019 Modified Files: src/distrib/evbarm/instkernel/instkernel: Makefile src/distrib/utils/embedded/conf: armv7.conf src/etc/etc.evbarm: Makefile.inc Log Message: Switch the kernel7.img RaspberryPi kernel in the armv7 image to GENERIC and thus reducing the number of kernels built in an evbarmv7 release. To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/distrib/evbarm/instkernel/instkernel/Makefile cvs rdiff -u -r1.33 -r1.34 src/distrib/utils/embedded/conf/armv7.conf cvs rdiff -u -r1.105 -r1.106 src/etc/etc.evbarm/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src
Module Name:src Committed By: skrll Date: Sat May 18 07:33:11 UTC 2019 Modified Files: src/distrib/evbarm/instkernel/instkernel: Makefile src/distrib/utils/embedded/conf: armv7.conf src/etc/etc.evbarm: Makefile.inc Log Message: Switch the kernel7.img RaspberryPi kernel in the armv7 image to GENERIC and thus reducing the number of kernels built in an evbarmv7 release. To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/distrib/evbarm/instkernel/instkernel/Makefile cvs rdiff -u -r1.33 -r1.34 src/distrib/utils/embedded/conf/armv7.conf cvs rdiff -u -r1.105 -r1.106 src/etc/etc.evbarm/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/evbarm/instkernel/instkernel/Makefile diff -u src/distrib/evbarm/instkernel/instkernel/Makefile:1.30 src/distrib/evbarm/instkernel/instkernel/Makefile:1.31 --- src/distrib/evbarm/instkernel/instkernel/Makefile:1.30 Thu Dec 14 06:29:15 2017 +++ src/distrib/evbarm/instkernel/instkernel/Makefile Sat May 18 07:33:10 2019 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.30 2017/12/14 06:29:15 skrll Exp $ +# $NetBSD: Makefile,v 1.31 2019/05/18 07:33:10 skrll Exp $ .include .include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib" @@ -12,7 +12,7 @@ SSHRAMDISK= ${SSHRAMDISKDIR}/sshramdisk. MDSETTARGETS= .for i in ${BUILD_KERNELS:M*_INSTALL} -.if ${i} == "RPI_INSTALL" || ${i} == "RPI2_INSTALL" +.if ${i} == "RPI_INSTALL" MDSETTARGETS+= ${i} ${SSHRAMDISK} netbsd-${i} MDSET_SUFFIXES.netbsd-${i}= bin create-bin img create-img .else Index: src/distrib/utils/embedded/conf/armv7.conf diff -u src/distrib/utils/embedded/conf/armv7.conf:1.33 src/distrib/utils/embedded/conf/armv7.conf:1.34 --- src/distrib/utils/embedded/conf/armv7.conf:1.33 Sat Apr 13 10:58:11 2019 +++ src/distrib/utils/embedded/conf/armv7.conf Sat May 18 07:33:10 2019 @@ -1,4 +1,4 @@ -# $NetBSD: armv7.conf,v 1.33 2019/04/13 10:58:11 jmcneill Exp $ +# $NetBSD: armv7.conf,v 1.34 2019/05/18 07:33:10 skrll Exp $ # ARMv7 customization script used by mkimage # board=armv7 @@ -11,7 +11,6 @@ resize=true kernels_generic="GENERIC" # non-FDTised / special kernels kernels_beagle="BEAGLEBOARD BEAGLEBONE" -kernels_rpi="RPI2" make_label() { make_label_evbarm @@ -55,10 +54,10 @@ populate_rpi() { firmwaredir="${src}/external/broadcom/rpi-firmware/dist" firmwarefiles="LICENCE.broadcom bootcode.bin fixup.dat fixup_cd.dat start.elf start_cd.elf" - # RPI2 kernel needs to be installed as kernel7.img - if [ -f "${mnt}/boot/netbsd-RPI2.img" ]; then - echo "${bar} renaming netbsd-RPI2.img to kernel7.img ${bar}" - mv "${mnt}/boot/netbsd-RPI2.img" "${mnt}/boot/kernel7.img" + # The GENERIC .img kernel needs to be installed as kernel7.img for RPI2 + if [ -f "${mnt}/boot/netbsd-GENERIC.img" ]; then + echo "${bar} renaming netbsd-GENERIC.img to kernel7.img ${bar}" + mv "${mnt}/boot/netbsd-GENERIC.img" "${mnt}/boot/kernel7.img" cat > "${mnt}/boot/cmdline.txt" << EOF root=ld0a console=${console} @@ -67,6 +66,8 @@ root=ld0a console=${console} EOF cat > ${mnt}/boot/config.txt << EOF +# Boot options, see https://www.raspberrypi.org/documentation/configuration/config-txt/boot.md +kernel_address=0x0140 # UART settings, see https://www.raspberrypi.org/documentation/configuration/uart.md enable_uart=1 force_turbo=0 @@ -134,12 +135,12 @@ populate() { test -f "${f}" && kernels="${kernels} ${f}" done # .img kernels - for k in $kernels_rpi; do + for k in $kernels_generic; do f="${kernel}/netbsd-${k}.img.gz" test -f "${f}" && kernels="${kernels} ${f}" done # .dtb files - for k in $kernels_generic $kernels_rpi $; do + for k in $kernels_generic $; do test -d "${KERNOBJDIR}/${k}" && \ dtbs="$(${MAKE} -C ${KERNOBJDIR}/${k} -v DTB)" || \ dtbs= Index: src/etc/etc.evbarm/Makefile.inc diff -u src/etc/etc.evbarm/Makefile.inc:1.105 src/etc/etc.evbarm/Makefile.inc:1.106 --- src/etc/etc.evbarm/Makefile.inc:1.105 Sun Mar 31 13:04:54 2019 +++ src/etc/etc.evbarm/Makefile.inc Sat May 18 07:33:10 2019 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.105 2019/03/31 13:04:54 jmcneill Exp $ +# $NetBSD: Makefile.inc,v 1.106 2019/05/18 07:33:10 skrll Exp $ # # etc.evbarm/Makefile.inc -- evbarm-specific etc Makefile targets # @@ -108,8 +108,6 @@ EVBARM_BOARDS.armv7+= OVERO EVBARM_BOARDS.armv7hf+= OVERO EVBARM_BOARDS.armv7+= PANDABOARD EVBARM_BOARDS.armv7hf+= PANDABOARD -EVBARM_BOARDS.armv7+= RPI2 -EVBARM_BOARDS.armv7hf+= RPI2 KERNEL_SETS.arm64+= GENERIC64 .endif