Commit Graph

259935 Commits

Author SHA1 Message Date
jdolecek f83c97da6a sync OpenBSD if_msk.c revs 1.66-1.79 skipping framework changes and already
present changes:
- Make Yukon-2 FE+ (88E8040, 88E8042) work
- 88E8057 is a Yukon 2 Ultra 2, and this might make it work on a little
  shiny green box in Japan
- Prevent null pointer dereference that could happen when we process an RX
  interrupt that was queued while stopping the interface.
- Remove holdover XMAC II writes/reads inherited from sk as
  they aren't required and cause problems like the 88E8072
  hard locking a system when enabling macsec bypass.
- Bypass macsec on extreme/supreme based chips.
  Makes my 88E8072 work.
- Add detach support to a few more drivers, and in others do the neccessary
  operations in the detach function in the right order.

towards resolution of PR kern/53301 but will need more work

tested by John Halfpenny on another 8040/Yukon-2 FE+ and reported
improving behaviour (system hang to stall) so committing as stopgap; also
tested on my SK-9E22 (Yukon-2 XL), there works without any issues both before
and after
2018-07-02 06:03:13 +00:00
msaitoh f4f1eb7251 VGA 16 bit decode bit is not bit 3 but bit 4. 2018-07-02 03:52:32 +00:00
jmcneill d9ac7d225d add options __HAVE_GENERIC_CPU_INITCLOCKS 2018-07-01 23:41:37 +00:00
jmcneill c0cb25e7d2 Delete chipid and sysmmu drivers, they don't do anything but print that
they are not implemented at attach time.
2018-07-01 23:28:40 +00:00
jmcneill 6ea79a5f0b Remove chipid and sysmmu drivers 2018-07-01 23:27:43 +00:00
jmcneill 0db9feede5 Add missing call to arm_fdt_timer_register 2018-07-01 23:21:43 +00:00
christos 2782075ff9 Add more message types.
XXX: Need more updates to the doc
2018-07-01 22:27:43 +00:00
jmcneill c5030e6616 Use fdtbus_attach_i2cbus 2018-07-01 21:22:16 +00:00
jmcneill 7bf47000d2 Fix 32-bit build 2018-07-01 21:21:56 +00:00
jmcneill 7d854132ba Use fdtbus_attach_i2cbus 2018-07-01 21:15:02 +00:00
jmcneill c24a9bd0b5 Add rkiic 2018-07-01 18:18:18 +00:00
jmcneill 6fb98cc4dd Add driver for Rockchip I2C controller. 2018-07-01 18:16:58 +00:00
jmcneill 2ed90eab7d Add fdtbus_attach_i2cbus, used to attach an i2cbus to an fdt device node. 2018-07-01 18:16:40 +00:00
jmcneill e0b17c6e38 Add i2c clocks. 2018-07-01 18:15:19 +00:00
christos 9951f8b9e4 vaxinate the sanitizer build. 2018-07-01 17:41:49 +00:00
skrll b207fdcdd6 Add bcm2835-rpi-zero-w.dts and bcm2837-rpi-3-b-plus.dts as appropriate
PR/53284 -  Support RPI3B+,RPI0W,RPI2-1.2
2018-07-01 15:33:29 +00:00
riastradh 92e1684438 Revert "Sprinkle cold conditionals to make tc_ticktock before inittimecounter."
Not needed if we're no longer doing tc_ticktock in printf.
2018-07-01 15:12:06 +00:00
christos 46e5459c53 disable one more size check for _LP32 to make pcc build. 2018-07-01 14:20:23 +00:00
jmcneill a5d63f15fe Build fix 2018-07-01 10:46:02 +00:00
mbalmer 62e2d99666 Apply bugfix #7 from lua.org/bugs.html: Memory-allocation error when resizing
a table can leave it in an inconsistent state.
2018-07-01 10:08:38 +00:00
jmcneill aeec0e9736 Revert previous 2018-07-01 09:53:54 +00:00
maxv 053a9f2f94 Use a variable-sized memcpy, instead of copying the PCB and then adding
the extra bytes. The PCB embeds the biggest static FPU state, but our
real FPU state may be smaller (FNSAVE), so we don't need to memcpy the
extra unused bytes.
2018-07-01 08:32:41 +00:00
maxv 337a599b92 Optimize FNSAVE. The size of its save area is 108 bytes, so don't set
x86_fpu_save_size = 512, because otherwise we uselessly memset extra
bytes at execve time.

While here use sizeof instead of hardcoded values.
2018-07-01 07:59:30 +00:00
maxv 922eadabce Use a switch, we can (and will) optimize each case separately. No
functional change.
2018-07-01 07:18:56 +00:00
riastradh 79ad738888 Sprinkle cold conditionals to make tc_ticktock before inittimecounter.
Enables Xen to boot again.

XXX Maybe we should have a tc_ticktock_cold instead or something so we
don't have to reach this far into the call graph.
2018-06-30 22:47:51 +00:00
kre e2a662b2a9 Build fix bandaid.
This allows the builds including XEN to complete, but XEN kernels
built from these sources (at least, DomU) do not boot successfully.
2018-06-30 20:53:30 +00:00
jmcneill 233c5d85ef Use queue(3) API to manage lists. NFCI. 2018-06-30 20:34:43 +00:00
jmcneill 5375fcbde9 Simplify list initialization 2018-06-30 20:16:56 +00:00
jmcneill 9ba9b3fa04 Rock64 needs more time for the PHY to reset. Add a delay. 2018-06-30 18:27:10 +00:00
jmcneill a3657ce00a Use syscon API 2018-06-30 18:20:35 +00:00
jmcneill 5403e5e50e Use syscon API 2018-06-30 18:07:32 +00:00
jmcneill 1ca6c5c5ec Add helper to lookup syscon by phandle 2018-06-30 18:07:12 +00:00
jmcneill a515ac423f Use syscon API. 2018-06-30 17:54:07 +00:00
jmcneill e335e77a65 ARM ARM refers to this as "ARM Generic Timer", so adjust printf at attach
to match.
2018-06-30 17:30:37 +00:00
jmcneill 30e8ea9402 Store node path in device properties "fdt-path" property:
# drvctl -p ehci0 fdt-path
    /soc/usb@5101000

While here, remove fdt_scan_bus (no longer required) and some debug printfs.
2018-06-30 17:28:09 +00:00
jmcneill ca5cdadb4c When cold, manually update timecounters before calling getnanouptime. Now
kernel printf timestamps are updated properly before interrupts are
enabled.
2018-06-30 17:15:01 +00:00
jmcneill 012aca1c0a Attach simplebus on pass 0 2018-06-30 16:48:49 +00:00
jmcneill 7c5742513d cpus: use fdt_add_bus 2018-06-30 16:30:35 +00:00
jmcneill 61fd5480b9 Only install interrupt handler if dwc_gmac_attach succeeds. 2018-06-30 16:28:14 +00:00
jmcneill 89fbd4980d dwc_gmac_attach: return non-zero on failure 2018-06-30 16:27:48 +00:00
jmcneill 78c7f9844a Allow nodes to attach child devices using the same sorting rules as used
by the simplebus driver.
2018-06-30 16:22:56 +00:00
christos a17e2f9d4b use a switch. 2018-06-30 16:05:44 +00:00
christos 57f6f93a3e Provide an inline to return the data part of the arp packet instead of
open-coding it in multiple places.
2018-06-30 15:08:04 +00:00
riastradh 1cf40ee15d Rearm the Xen timer on resume.
This just moves the timer-arming logic from xen_initclocks into
xen_resumeclocks so that it runs on resume too.

I hypothesize that this is necessary for Xen to resume.  Otherwise,
how could the one-shot timer possibly by rearmed?  On the other hand,
it is conceivable that something automatically rearms it.

This also reorders the initialization so that we establish a timer
interrupt handler first, and _then_ arm the timer.  If the order
matters, it is hard to imagine that the other way is correct:
conceivably, the interrupt could arrive before we've established the
handler, and then there's nothing to rearm it.

Whether this is _sufficient_ for Xen to resume, I don't know.
Symptoms recently reported in
<https://mail-index.netbsd.org/port-xen/2018/06/15/msg009207.html>
look different from how I would expect this to manifest, which is as
a system wedged because there's no no hardclock activity.

ok cherry
2018-06-30 14:59:38 +00:00
riastradh ec94896e30 Use xcall to suspend/resume clocks on _all_ CPUs, not just current.
Compile-tested only -- kernel still runs but I haven't exercised this
code path.

By code inspection, this change or something like it is obviously
_necessary_ for Xen MP suspend/resume -- otherwise there's no logic
to suspend/resume the clocks on any CPU except the one that actually
triggers sysctl -w machdep.xen.suspend=1.

Whether this change is _sufficient_ for Xen MP suspend/resume to
work, I don't know.

ok cherry
2018-06-30 14:55:13 +00:00
riastradh a9aa080355 Just use struct cpu_info members for the Xen clock state.
Silly to use percpu(9) for some things and struct cpu_info for
others.
2018-06-30 14:21:19 +00:00
jmcneill 8d4a1027a6 When attaching child devices, consider the best match for all passes
instead of just the current pass. Fixes an issue where a driver with a
lower match number and early pass number will attach instead of a better
match on a later pass.
2018-06-30 13:44:50 +00:00
jmcneill fec1439d5f add syscon 2018-06-30 12:42:42 +00:00
jmcneill 87578108fb Use syscon API instead of mapping syscon registers ourselves. 2018-06-30 12:36:13 +00:00
jmcneill 5b0333eb17 Add support for system controller nodes. 2018-06-30 12:35:18 +00:00