Commit Graph

262872 Commits

Author SHA1 Message Date
skrll
d71785d000 Add GENERIC to big-endian KERNEL_SETS 2018-11-01 18:23:25 +00:00
skrll
16ef8eff9d Fix non-DIAGNOSTIC build 2018-11-01 16:14:54 +00:00
jmcneill
453e6ce9bc Support for "opp-microvolt" with more than one cell 2018-11-01 14:47:36 +00:00
martin
e6adeb2500 Add bwfm at pci 2018-11-01 13:11:11 +00:00
martin
11b42c22e2 Make this compilable with 32bit paddr_t. 2018-11-01 13:09:35 +00:00
skrll
76478902d7 Use the GENERIC kernel where possible in armv7.img and remove the old
kernels from the bulid for SUNXI and TEGRA.

While I'm here disable *_INSTALL kernel builds for boards supported by
armv7.img
2018-11-01 11:05:24 +00:00
jmcneill
32eec71f56 Fix previous 2018-11-01 10:48:48 +00:00
jmcneill
8e63a218ff Fix partial overlap logic. PR# port-evbarm/53693 2018-11-01 10:21:41 +00:00
mrg
d89d4475a3 compare matching TG1 bits.
aarch64 crash dump kvtop now less broken, but still not stable.
2018-11-01 05:37:11 +00:00
msaitoh
055f8b85fb Decode CSRT (Core System Resources Table). 2018-11-01 03:08:46 +00:00
jmcneill
f283cd5eac Add support for auto-selection of GPT root devices 2018-11-01 00:44:06 +00:00
jmcneill
92efcce76c Add GPT support. 2018-11-01 00:43:38 +00:00
jmcneill
be34f078ca No need to re-print the countdown timer if the number of seconds hasn't changed. 2018-10-31 23:49:34 +00:00
mrg
ca08a0c2e1 extend "smart status" command to "smart status [vendor]", and supply a
"Micron" (for Micron/Crucial) list with their documented values.

this allows the vendor-specific data to be used.

there appears to be no simple way to automatically determine the right
vendor to use -- identify data seems to be the only obvious way and
that data can be and is changed by OEMs.  (eg, a disk may be listed as
being "dell", but dell don't make disks.)  as such, no attempt is made
to automatically determine if a vendor list should be used.
2018-10-31 20:00:56 +00:00
maxv
9410d7cf18 Revert my kasan addition in this makefile, it looks like it causes
asan.h to be installed, while we don't want it to be.
2018-10-31 18:35:04 +00:00
jmcneill
469d7fa1bc Add MSI-X support. 2018-10-31 16:11:29 +00:00
jmcneill
3dd998f940 Add MSI-X support. 2018-10-31 15:43:19 +00:00
jmcneill
8537f7783f Add MSI-X support 2018-10-31 15:42:36 +00:00
jmcneill
1ddc0ea041 Add MSI-X support. 2018-10-31 15:42:17 +00:00
jmcneill
86955039b0 EFI runtime code section needs to be writable, otherwise we fail with a permission fault at shutdown on QEMU when writing to the RTC 2018-10-31 14:15:12 +00:00
jmcneill
77af45ad47 Implement parse_mi_bootargs for aarch64 2018-10-31 13:42:24 +00:00
jmcneill
97044f64fa Use PRIx64 to print uint64_t 2018-10-31 13:37:35 +00:00
jmcneill
77a6cf4b9b Setup mappings for EFI runtime mmio ranges. 2018-10-31 13:01:48 +00:00
jmcneill
1cd5b4302b Assign VAs for EFI runtime mmio ranges 2018-10-31 13:00:35 +00:00
jmcneill
33c6bbfd0f When building /memory, skip EFI runtime memory ranges 2018-10-31 12:59:43 +00:00
skrll
44c3537404 Tidyup VERBOSE_INIT_ARM output 2018-10-31 09:31:01 +00:00
skrll
1f664ade34 Fix VERBOSE_INIT_ARM build 2018-10-31 09:15:25 +00:00
jmcneill
a6043900cb No longer need to delete reserved memory ranges. 2018-10-31 09:13:32 +00:00
skrll
06d47151af Fix non-DIGNOSTIC builds 2018-10-31 08:41:47 +00:00
skrll
dcb7cd7c66 Turn off DIAGNOSTIC and DEBUG by default 2018-10-31 08:10:01 +00:00
ryo
3abdc6b2fd invalidate icache correctly.
l3pte_executable() should be used for only valid pte.
2018-10-31 06:36:19 +00:00
maxv
790d0b797c Move the MI parts of KASAN into kern/subr_asan.c. This file includes
machine/asan.h, which contains the MD functions. We use an include rather
than a plain C file, because we want GCC to optimize/inline some functions
into one single block.

The amd64 MD parts of KASAN are moved accordingly.

The naming convention we use is:

	kasan_*
		a generic kasan object, declared in subr_asan.c
	kasan_md_*
		an MD kasan object, declared in machine/asan.h, and used
		in subr_asan.c
	__md_*
		an MD object, declared in machine/asan.h, and not used
		outside

Overall this makes it easier to add KASAN support on more architectures.

Discussed with several people.
2018-10-31 06:26:25 +00:00
msaitoh
c893fecee0 - 82574 and newer's document says the status field has neither EC
(Excessive Collision) bit nor LC (Late Collision) bit (reserved).
  Refer "PCIe GbE Controller Open Source Software Developer's Manual",
  82574 datasheet and newer.

  XXX I saw the LC bit was set on I218 even though the media was full duplex,
  so the bit might be used for other meaning ...(I have no document).
- Use macro.
2018-10-31 06:04:48 +00:00
jmcneill
6867029f18 Fail gracefully when an attempt to allocate MSI vectors is made on a device
without MSI capabilities.
2018-10-30 23:59:47 +00:00
jmcneill
26bbc56f09 build fdt_memory.c 2018-10-30 22:32:33 +00:00
jmcneill
d377d504e4 Replace extent(9) with our own code to deal with adding and reserving
memory ranges.
2018-10-30 21:32:35 +00:00
kre
3e9d705017 sysctl(KERN_BOOTTIME) is a struct timespec, not struct timeval
and has eben since 2009.    Adapt.

NFCI - while the tv_usec (now tv_nsec) field is used, we will
keep its uses to microsecond precision to avoid any compat issues.
2018-10-30 21:18:39 +00:00
kre
d4305dc776 sysctl(KERN_BOPOTIME) started returning a struct timespec in 2009.
Update to match....    We're slow but we get there eventually!

NFC for any of these programs, struct timeval and struct timespec
are the same size, and only the tv_sec field of boottime is used,
and that's unchanged.
2018-10-30 21:15:09 +00:00
christos
7fe1831b09 no param names in prototype. 2018-10-30 20:23:29 +00:00
christos
91e3572e8f bump for clang 2018-10-30 20:18:30 +00:00
christos
57ce79706b provide a main prototype (this is standalone) 2018-10-30 20:15:57 +00:00
kre
7c12c3f28f Minor update. This already knew that boottime is a timespec.
Just a minor wording change to avoid pretending that time_t
variables contain nanoseconds, and that the base time is UTC.
2018-10-30 20:10:23 +00:00
kre
c576beb79a kern.boottime was changed from a struct timeval to a struct timespec
in January 2009 (the Christos' time merge, when time_t went to 64 bits).

sysctl needs to catch up.   (So do other progs, which will happen, eventually,
but most of them are unaffected in any practical way.)

If you are running a system (NetBSD 6 or later) without this change, try
	sysctl -nn kern.boottime
and marvel at the result (in theory, seconds.microseconds) most
probably being something like:
	jinx$ sysctl -nn kern.boottime
	1540801874.999995564
(There is a 1 in 1000 chance your system will have booted
in the interval [0 , 999999] nanoseconds after some second,
in which case this will not be observed.   You should get
(almost) the same value after this change - just now it is as
it should be (there should now always be 9 digits after the '.').

On the other hand, if you're on a big-endian 64 bit host (running
64 bit sysctl) you would have always seen 0 for the microseconds field.
That should be fixed by this.

In sysctl(7) also document what we mean by "the time the system booted".

XXX Pullup -8
XXX Pullup -7
XXX Pullup -6 (oops, missed that one...)
2018-10-30 19:41:21 +00:00
kre
7008793d77 Correct the 6 second offset issue between the time reported by
dmesg -T and the actual time a message was produced, noted on
current-users by Geoff Wing (Oct 27, 2018).

The size of the offset would depend upon architecture, and processor,
but was the delay from starting the clocks to initialising the time
of day (after mounting root, in case that is needed).

Change the kernel to set boottime to be the time at which the
clocks were started, rather than the time at which it is init'd
(by subtracting the interval between).

Correct dmesg to properly compute the ToD based upon the
boottime (which is a timespec, not a timeval, and has been
since Jan 2009) and the time logged in the message.

Note that this can (rarely) be 1 second earlier than date reports.
This occurs  when the time when the message was logged was actually
in the next second, but the timecounters have not yet processed
the tick, and so the time of the last tick, near the end of the
previous second, is reported instead.   Since times are always
truncated, rather than rounded, it is occasionally possible to
observe that disparity (if you try hard enough).

IOW: sys/kern/subr_prf.c:addtstamp() uses getnanouptime() rather
than nanouptime().

Note in dmesg(8) that -T conversions are gibberish other than
when the message comes from current the running kernel.  (It
could be fixed when -M is used, for messages generated by the
kernel whose corpse is being observed.   But hasn't been...)
2018-10-30 19:40:35 +00:00
skrll
d903176946 Retire fdt_putchar and ap_early_put_char in favour of uartputc. 2018-10-30 16:41:51 +00:00
riastradh
1c1a78241c Paranoia: zero COMPAT_30 ntptimeval and 32-bit ntptimeval too.
These structs don't have padding but safer to keep the code
structured the same way between the various ntp_gettimes in case
anyone makes more copypasta of it for future updates.
2018-10-30 14:43:38 +00:00
riastradh
cc8a85962e Zero ntptimeval50 too to prevent 4-byte kernel stack disclosure.
From Thomas Barabosch of Fraunhofer FKIE.

XXX pullup-7, pullup-8 (along with rev. 1.60 of kern_ntptime.c)
2018-10-30 14:35:16 +00:00
jmcneill
d442e9f083 Disable diagnostic assertions around timer jitter on Allwinner A64. It
seems the instability of CNTVCT can cause issues with the compare value,
and rather than applying a heavy workaround just skip the panics.
2018-10-30 10:38:11 +00:00
martin
15ea57e01c When BOARDTYPE is not set, use MACHINE_ARCH for the image name. 2018-10-30 09:06:07 +00:00
skrll
ee648c4e05 Allow setend be decode 2018-10-30 09:05:51 +00:00