Commit Graph

278280 Commits

Author SHA1 Message Date
martin b83e3fc8ed Initialize ci_kfpu_spl earlier for secondary CPUs. From riastradh 2020-07-02 11:49:48 +00:00
jmcneill 336dbb3e65 Add ddb "mach reset" command for Arm ports. 2020-07-02 11:10:47 +00:00
jdolecek 8c4f01a8e3 fix incomplete gnu/ deletion - PR misc/55444 by Jim Bernard 2020-07-02 11:08:55 +00:00
rillig 84868c179c make(1): demonstrate another unnecessary condition evaluation 2020-07-02 10:36:58 +00:00
rin 4db2f9236b Fix typo; PMAP_OEA64_BRIDGE not PMAP_OEA_BRIDGE.
Tested on Power Mac G5.
2020-07-02 10:28:11 +00:00
jmcneill 891b1559b6 Document OBJMACHINE_ARCH 2020-07-02 10:22:28 +00:00
rillig 947fa718d0 make(1): document the actual cause for "recursive variable"
That wrong error message had nothing to do with the .for loop, it was
only caused because the .for loop uses the :U modifier internally.
2020-07-02 09:44:51 +00:00
lukem 2c4fb72252 loader.efi doesn't have source
(Untested fix)
2020-07-02 09:07:24 +00:00
msaitoh 4af81626f6 prop_data_data_nocopy -> prop_data_value 2020-07-02 09:02:04 +00:00
lukem 08fb4e9235 Makefile.minirootkmod don't have SRCS 2020-07-02 08:48:10 +00:00
rin 4acff240b3 Remove pointless cast; dp is already uint32_t *.
No functional changes intended.
2020-07-02 07:49:44 +00:00
rin 8f480339f5 Correct SRCS; bsdstart.S not bsdstart.s.
Fix build with bsd.dep.mk rev 1.87, which requires more strict
filename matching.

Found by martin.
2020-07-01 23:37:10 +00:00
sjg 767817a641 Fix parsing of nested variables during .for loop
Recent change to cond.c to avoid eval of unnecessary
terms had side effect on constructs like:

.for s in 1 2
.if defined(MAN$s) && !empty(MAN$s)
MAN+= ${MAN$s}
.endif
.endfor

resulting in MAN being flagged as recursive.

When Var_Parse encounters a variable within a variable name
we want to force it to be expanded.
But given the way get_mpt_arg calls Var_Parse we need to check
whether we actually started parsing a variable yet.
2020-07-01 18:02:26 +00:00
jdolecek 87e5223f68 revert, not working 2020-07-01 17:57:14 +00:00
jdolecek 2cd6ed210c ignore interrupt when not expecting one, particularly don't invoke
the irqack in this case

seems cmdide doesn't honour WDCTL_IDS when executing polled commands,
and there is a race where the irqack call interferes with polled
command and causes a lockup

reported by Martin Husemann
2020-07-01 15:10:01 +00:00
jruoho 4704e28c3f Add basic checks for magic symlink(7)'s. These include a case for PR lib/55361,
although it seems that realpath(3) has bigger problems with these symlinks.
2020-07-01 13:49:26 +00:00
sborrill ce6ed78858 When using show subcommand, display node ID (nid) in hexadecimal to match
the HD audio documentation. Diverge slightly by using 0xXX instead of XXh
format for consistency with the list subcommand.
2020-07-01 12:19:45 +00:00
riastradh 341c574011 Pass the requisite -msse options for i386. 2020-07-01 09:58:29 +00:00
lukem 7115637964 Fix addition of C++ .cc source to SRCS
Fix assumption that all of the source files are .c, as some are .cc.

Not tested, based on similar change to
  external/gpl3/gcc/usr.bin/cc1plus/Makefile
2020-07-01 08:25:44 +00:00
ryo 1b74214774 show clidr_el1 and ctr_el0. 2020-07-01 08:03:10 +00:00
ryo 697eec1bf5 add workaround for Neoverse N1 erratum 1542419 2020-07-01 08:02:13 +00:00
ryo 0c7bdc13f0 - On some systems with a different cache line size (and DIC,IDC) per CPU, trap "mrs Xt,ctr_el0" instruction
to return the minimum cache line size of the system to userland.
- add CLIDR_EL1 and CTR_EL0 to struct aarch64_sysctl_cpu_id.

On most systems, cache line size is the same for all CPUs, so this mechanism won't be required.
Rather, this is primarily for errata support, which will be committed later.
2020-07-01 08:01:07 +00:00
ryo 561087550e Switch the Icache sync operation to the necessary and sufficient one according to the CTR_EL0.DIC and CTR_EL0.IDC flags.
If CTR_EL0.DIC=1, Icache invalidation is not required.
If CTR_EL0.IDC=1, Dcache clean before Icache invalidation is not required.
CLIDR_EL1.LoC is 0, or CLIDR_EL1.LoUIS and CLIDR_EL1.LoUU are 0, Dcache clean is not required as well.

SEE ALSO ARMARM, "CTR_EL0 Cache Type Register", and "CLIDR_EL1 Cache Level ID Register"
2020-07-01 07:59:16 +00:00
lukem b252a0e204 use ggc-none.c not ggc-none.o in SRCS
not tested, based on similar change to
 external/gpl3/gcc/usr.bin/lto-wrapper/Makefile
2020-07-01 07:54:24 +00:00
lukem 1defdf0961 bsd.dep.mk: fix "make tags" (again)
[repeat revision 1.85]

Fix "make tags" to actually build a tags file:
- Use !commands() instead of !target(), so that the rule actually works
- Write to ${.OBJDIR}/tags for read-only source (don't know why ${.TARGET}
  isn't sufficient).
- Only match *.[cly] from ${.ALLSRCS} - just excluding *.h causes failures
  because of ${targ}: subdir-${targ} in bsd.subdir.mk.

Thanks to uwe@ for assistance.
2020-07-01 07:38:29 +00:00
jruoho 55abcd082f Add basic checks for a64l(3), l64a(3), and l64a_r(3). 2020-07-01 07:16:37 +00:00
martin bf0d51809d Forbid gcc to whine about intended format truncation 2020-07-01 06:31:18 +00:00
jruoho 7fed543511 Add basic tests for the rest of the mktemp(3) family of functions, including
a case for PR lib/55441.
2020-07-01 05:37:25 +00:00
uwe 1765a45b05 hline, vline - don't lose attributes when using default character.
Make default (wide) and non-wide behavior match.  If the character
argument has (only) attributes set, use them with the default line
character.

In the wide case don't do the fallback in hline - it just calls
hline_set that needs to do it anyway.  Fix the latter to check the
wcwidth of the right character and avoid division by zero.
2020-07-01 02:57:01 +00:00
uwe 4eb5fad78b Oops. Fix y/x typo in the previous whline() fix for !HAVE_WCHAR. 2020-07-01 02:14:41 +00:00
riastradh 8747f41571 copystr is now in libkern; don't redefine it in rumpcopy.c.
Should fix build breakage from the copystr changes.
2020-07-01 00:42:13 +00:00
lukem 41b765e18c fix sets for MKKYUA 2020-06-30 23:51:47 +00:00
riastradh aac1a7e566 Reallocate registers to avoid abusing callee-saves registers, v8-v15.
Forgot to consult the AAPCS before committing this before -- oops!

While here, take advantage of the 32 aarch64 simd registers to avoid
all stack spills.
2020-06-30 23:06:02 +00:00
riastradh 6d5a7eed7d Use `.arch_extension aes' for aese/aesmc/aesd/aesimc.
Unlike `.arch_extension crypto', this works with clang; both work
with gas, so we'll go with this.

Clang still can't handle aes_armv8_64.S yet -- it gets confused by
dup and mov on lanes, but this makes progress.
2020-06-30 21:53:39 +00:00
riastradh b54ccdd478 Use .p2align rather than .align.
Apparently on arm, .align is actually an alias for .p2align, taking a
power of two rather than a number of bytes, so aes_armv8_64.o was
bloated to 32KB with obscene alignment when it only needed to be
barely past 4KB.

Do the same for the x86 aes_ni_64.S -- even though .align takes a
number of bytes rather than a power of two on x86, let's just stay
away from the temptations of the evil .align directive.
2020-06-30 21:41:03 +00:00
uwe d9a8ae84b1 Fix indentation in the copyright.
Make it match its siblings in other files.
2020-06-30 21:27:18 +00:00
riastradh aedb0d4e40 Tweak clang neon intrinsics so they build.
(this file is still a kludge)
2020-06-30 21:24:00 +00:00
riastradh 8039b48b5b New build.sh option: -c <compiler>
Could never remember what the incantation is to do a clang build, so
now it's just `build.sh -c clang'.
2020-06-30 21:22:19 +00:00
uwe 9c6a61e7ae whline - save/restore the y coordinate too.
Reaching the right side of the screen can cause a line wrap.
Forgot to apply the fix to the !HAVE_WCHAR case.
PR lib/55434
2020-06-30 21:10:13 +00:00
uwe 1eecb61d77 whline_set - save/restore the y coordinate too.
Reaching the right side of the screen can cause a line wrap.
PR lib/55434
2020-06-30 21:02:24 +00:00
riastradh bd9707e06e New test sys/crypto/aes/t_aes.
Runs aes_selftest on all kernel AES implementations supported on the
current hardware, not just the preferred one.
2020-06-30 20:32:10 +00:00
msaitoh 24cca43843 If an error occurred in sme_refresh function, pass ENVSYS_SINVALID.
OK'd by pgoyette.
2020-06-30 19:02:42 +00:00
riastradh c8c5c422ac Limit aes_neon to cpu_cortex | aarch64.
We won't use it on any other systems, and it doesn't build without
NEON anyway.  Verified earmv7hf GENERIC, aarch64 GENERIC64, and
earmv6 RPI2 all build with this.
2020-06-30 17:03:13 +00:00
maxv 82287798e3 be one-shot by default, with room for circular 2020-06-30 16:28:17 +00:00
maxv 64f849a4c1 fix file path 2020-06-30 16:22:55 +00:00
riastradh 1c86761fac New sysctl node hw.aes_impl for selected AES implementation. 2020-06-30 16:21:17 +00:00
maxv ca08b3e761 Make copystr() a MI C function, part of libkern and shared on all
architectures.

Notes:

 - On alpha and ia64 the function is kept but gets renamed locally to avoid
   symbol collision. This is because on these two arches, I am not sure
   whether the ASM callers do not rely on fixed registers, so I prefer to
   keep the ASM body for now.
 - On Vax, only the symbol is removed, because the body is used from other
   functions.
 - On RISC-V, this change fixes a bug: copystr() was just a wrapper around
   strlcpy(), but strlcpy() makes the operation less safe (strlen on the
   source beyond its size).
 - The kASan, kCSan and kMSan wrappers are removed, because now that
   copystr() is in C, the compiler transformations are applied to it,
   without the need for manual wrappers.

Could test on amd64 only, but should be fine.
2020-06-30 16:20:00 +00:00
jruoho 2ba250a115 After a comedy of errors, move t_mbtowc to its final resting place. 2020-06-30 16:09:40 +00:00
kim f61899471d Remove local domain always, not just when looking up addresses 2020-06-30 15:02:55 +00:00
kim 98df278e6f Compute a value for domain before comparing against it 2020-06-30 14:57:25 +00:00