Commit Graph

279658 Commits

Author SHA1 Message Date
isaki
76c2ed7cdd Replace boot_ustar with xxboot_ustarfs.
The old boot_ustar had many hard coding and was small(<1KB).
The new xxboot_ustarfs is a part of integrated larger(<8KB) xxboot.
We had to maintain three similar but not the same bootloaders, but
now we have two!
2020-08-16 07:03:45 +00:00
isaki
7e73c3a86c Overhaul xxboot. And merge floppy boot, taken from boot_ustar.
- Rewrite boot.S completely.
  boot.S now supports boot from SCSI HD/CD and floppy.
- Use IOCS call to identify the floppy format, instead of chkfmt.s which
  accesses hardware directly.
- Import print_hex() debug function from boot_ufs.
- Import a feature that displays initial registers (for debug) from boot_ufs,
  and restore it (this in boot_ufs has been broken).
- Add size optimized alternatives for some libkern routines.
- Stop linking libsa to prevent to link unexpected objects.
- Bump version to 2.0.
2020-08-16 06:43:43 +00:00
mrg
16596b51e5 switch netbsd/m68k to GCC 8.
special thanks to rin@ for fixing many things and figuring out
what was the major issue (STACK_BOUNDARY.)
2020-08-16 06:43:05 +00:00
riastradh
ae3eedf331 Fix sloppy mistakes in previous.
1. Give the offset of the rbnode, not some other random members to
   overwrite with garbage.

2. Don't try to unlock a mutex at NULL.

3. Make sure all paths out after ugenif_acquire go via
   ugenif_release.
2020-08-16 06:17:31 +00:00
riastradh
c107c49a73 Initialize the i2c controller before using it.
Fixes mutex uninitialized panic in LOCKDEBUG.
2020-08-16 03:48:59 +00:00
riastradh
d21e522e87 Expose Yubikey CCID interface to userland via ugenif. 2020-08-16 02:38:06 +00:00
riastradh
ee406c527b Share unit numbering for ugen and ugenif.
This way putting ugenif in kernel config actually works to wire it to
the /dev/ugenN.MM device nodes in userland.

Not a fully fleshed out solution to the ugen problem -- there's no
way for a userland driver to kick out a kernel driver and take over,
but this will let us, e.g., use uhidev(4) for Yubikey OTP/U2F/FIDO2
but ugen(4), with pcscd(8), for Yubikey CCID.

Fix various MP-safety issues while here (still not MPSAFE, but more
progress).
2020-08-16 02:37:19 +00:00
riastradh
6269170c9d Convert DIAGNOSTIC prints to KASSERTs. 2020-08-16 02:34:54 +00:00
riastradh
b663bb53fc Hold the lock over access to the data structures it covers.
Still not MPSAFE, but progress.
2020-08-16 02:34:20 +00:00
riastradh
a2da0435ef Remove UGEN_ASLP microoptimization.
cv_signal already has this microoptimization.

While here, make the lock cover the relevant things we're issuing
cv_signal about -- progress toward real MP-safety.
2020-08-16 02:33:17 +00:00
chs
0d0b0c4dc4 in uvm_findpage(), when uvm_page_array_fill_and_peek() returns a page
that is not the one we want and we make an assertion about dirtiness,
check the dirty status of the page we wanted rather than the page we got.
2020-08-16 00:24:41 +00:00
thorpej
f61f342c10 Convert some #ifdef DIAGNOSTIC checks to KASSERTs. NFCI. 2020-08-15 16:09:07 +00:00
nia
9fa431f295 Use sysctl -n hw.machine_arch so this works on e.g. aarch64
Ues HTTPS
2020-08-15 14:47:28 +00:00
nia
a39c900319 afterboot.8: Correct URL directory order 2020-08-15 14:45:31 +00:00
nia
aec9844dc5 afterboot.8: Use cdn. Don't be arch specific. Requested by leot. 2020-08-15 14:42:02 +00:00
nia
5d8c072424 afterboot.8: Mention mdnsd 2020-08-15 13:49:09 +00:00
nia
75bbbb9826 afterboot.8: Explain devpubd 2020-08-15 13:44:14 +00:00
nia
e33fbdfad9 afterboot.8: Be clearer about exactly when you might need to login as root 2020-08-15 13:35:12 +00:00
skrll
317fb4dd44 #ifdef _ARM_ARCH_7 the dmbs 2020-08-15 13:33:54 +00:00
nia
857376a344 afterboot.8: Explain how to install pkgin on a fresh system 2020-08-15 13:32:26 +00:00
nia
21521a3c01 afterboot.8: Explain how connecting to open WiFi works with wpa_supplicant 2020-08-15 13:25:14 +00:00
mlelstv
8f599c8a78 Plaintext buffers are used directly for write() operations to the raw device.
Align them to the needs of cgd(4).
2020-08-15 10:03:10 +00:00
mrg
fc8474c3ed move stacktrace_subr() from trap.c into new mips_stacktrace.c so
it can be shared between ddb, other mips kernel components (see
locore), and an upcoming crash(8) port.

remove second copy of kdbpeek() (hidden by old DDB_TRACE
option, but they're functionally equivalent.)

tested on octeon.

ok simonb@
2020-08-15 07:42:07 +00:00
chs
b0597d5997 use uint64_t rather than int for storing the index of a page within an object. 2020-08-15 07:24:09 +00:00
mrg
073d3fd154 there was no MIPS{32,64} release 4.
XXX: missing lots and lots of evbmips CPUs.
2020-08-15 05:41:57 +00:00
simonb
389e112e68 Remove a misleading space in a ".elif". 2020-08-15 05:03:06 +00:00
simonb
9f936cf095 Fix value for SCE/SWE instructions.
Problem noticed by mrg@.
2020-08-15 04:27:28 +00:00
rillig
edce479061 make(1): mark tests impsrc and phony-end as no longer failing
These tests have been adjusted to demonstrate the current behavior,
mentioning the expected behavior in comments.
2020-08-15 01:50:54 +00:00
rillig
a0145b6eae make(1): fix archive test
Even though it is commented out in this Makefile, it is still run by
atf, on purpose.  This test is broken on FreeBSD, but on NetBSD it
should still be run.

Without removing the archive first, it could be left over from a
previous test failure and thus be newer than all its members, leading to
${.OODATE} being empty.
2020-08-15 01:49:07 +00:00
tnn
68cb89e9f3 add a __diagused to fix non-DIAGNOSTIC kernel 2020-08-15 01:27:22 +00:00
tkusumi
ae112b0a4f fstyp: Fix incorrect pfs_type test for HAMMER2 inode
taken-from: DragonFly BSD
2020-08-14 18:35:57 +00:00
skrll
1e12472c15 Fix build by splitting large amount of inline assembling into a seperate
.S file.  Same stub (/trampoline) code before and after this change.
2020-08-14 16:53:06 +00:00
skrll
3565af6daa Mirror the changes to aarch64 and
- Switch to TPIDRPRW_IS_CURLWP, because curlwp is accessed much more often
  by MI code.  It also makes curlwp preemption safe,

- Make ASTs operate per-LWP rather than per-CPU, otherwise sometimes LWPs
  can see spurious ASTs (which doesn't cause a problem, it just means some
  time may be wasted).

- Make sure ASTs are always set on the same CPU as the target LWP, and
  delivered via IPI if posted from a remote CPU so that they are resolved
  quickly.

- Add some cache line padding to struct cpu_info.

- Add a memory barrier in a couple of places where ci_curlwp is set.  This
  is needed whenever an LWP that is resuming on the CPU could hold an
  adaptive mutex.  The barrier needs to drain the CPU's store buffer, so
  that the update to ci_curlwp becomes globally visible before the LWP can
  resume and call mutex_exit().
2020-08-14 16:18:36 +00:00
christos
d736d495d9 PR/55568: Andreas Gustafsson: Set the error when failing to create a temp file. 2020-08-14 14:42:44 +00:00
martin
8301aeac11 PR port-sparc/55573: remove kernel message about disabled coprocessor
instructions - it is triggered by userland trying to detect availability
of sparcv9 VIS instructions.
2020-08-14 13:45:44 +00:00
christos
41f9170c74 Use fout, fin (Mustafa Dogan) 2020-08-14 13:40:25 +00:00
martin
284686b53f Adapt to new proplib api 2020-08-14 10:31:40 +00:00
chs
43e6f9fd5f fix a bit that I missed in the device_t/softc split 8 years ago. 2020-08-14 09:28:29 +00:00
chs
b7082a1c8a restore the initialization of icp->icp_ccbs that I removed by mistake. 2020-08-14 09:26:40 +00:00
chs
19303cecfc centralize calls from UVM to radixtree into a few functions.
in those functions, assert that the object lock is held in
the correct mode.
2020-08-14 09:06:14 +00:00
martin
909a0d73c8 PR 55572: avoid crash when answering the mount point prompt for a previously
empty mount point with an emptry sting.
2020-08-14 08:46:54 +00:00
skrll
aa1b82d61b Whitespace 2020-08-14 08:19:26 +00:00
martin
41db1294c8 Fix C++ file suffix (.cpp -> .cc) 2020-08-14 06:23:49 +00:00
martin
b220268543 Fix a few copy + pastos, simplify shell arithmetic 2020-08-14 05:22:25 +00:00
isaki
19f4b030c4 Reduce binary size as possible. These reduce filesize about 20 words.
- Use word alignment (rather than longword alignment) for text/data section.
- Use short reference.  In the bootloader, all symbols can be expressed in
  short.
2020-08-14 03:54:46 +00:00
isaki
07df2c5297 Use DEV_OPEN() macro. 2020-08-14 03:43:28 +00:00
isaki
d21129ac66 Use fixed 'xx' instead of DEV and DEVDRV for simplicity.
There is no choice other than xx for now.
2020-08-14 03:40:47 +00:00
isaki
d32126162a Add xxboot.h common header to share prototype definitions. 2020-08-14 03:34:22 +00:00
isaki
c2b719cf8b Style fixes. One entry per line for some parts. 2020-08-14 03:29:23 +00:00
isaki
b45ed32da3 - Restore display of first_kbyte. This is helpful for development.
- Check the filesize of resulting file instead of section sizes.
  If there is a gap between sections, the filesize may be exceeded even
  though the section total is not exceeded.  Of course that doesn't
  usually happen but I've experienced this during development.
2020-08-14 03:25:39 +00:00