summaryrefslogtreecommitdiff
path: root/sys/arch
AgeCommit message (Collapse)Author
2016-07-27ansify mem.c to the latest fashion. with a fix from mike burns. ok deraadtTed Unangst
2016-07-27Instead of passing the raw reg property to simplebus nodes,Patrick Wildt
pass a pre-processed array of fdt_reg structs. This means that the drivers don't have to understand the cell properties themselves but can rely on the 64-bit addr/size pairs. ok kettenis@
2016-07-27Remove unnecessary remapping of registers.Visa Hankala
ok jasper@
2016-07-26Rename struct fdt_memory to fdt_reg to match the member namePatrick Wildt
used in the fdt attach args and the device tree. ok kettenis@
2016-07-26Remove the restriction that the kernel needs to be loaded at the bottom ofMark Kettenis
physical memory. This makes it possible to boot OpenBSD on platforms that have physical memory start at address 0x00000000 as the EFI bootloader will only attempt to load kernels at address 0x10000000 and above to work around a bug in the u-boot EFI API layer. ok patrick@
2016-07-23Previously the uarts attached in order, so that the first attached uartPatrick Wildt
is always the serial console. With device tree enumeration, this order is not given anymore. The serial console might now attach with a different minor and has to be updated, otherwise there will be no further output on the serial. Thus, re-create the i.MX6 console with the correct minor number on attach. ok jsg@, kettenis@
2016-07-23The linux kernel treated the "phy-reset-gpio" as active-low regardless of whatMark Kettenis
the device tree says. As a result many device trees encode it as active-high when active-low is needed. For now just override the device tree. ok jsg@, patrick@
2016-07-23Fix a few CPUID emulation issues:Mike Larkin
Don't advertise a hyperthreaded CPU. This doesn't make a lot of sense now as we only provide UP guest support. This, combined with the other CPUID issues fixed, fooled NetBSD's topology enumeration code into thinking we had an unsupportable core/thread/package configuration. Also fixed the unsupported CPUID functions by returning 0 in the return registers instead of leaving whatever trash happened to be there before the call was made.
2016-07-23Dump vcpu state on unknown exit type, and add a diagnostic messageMike Larkin
(including vcpu state dump) on failure to enter due to an incorrect guest state. Added as a debug facility when diagnosing interruptibility state problems seen while testing NetBSD guest VMs.
2016-07-23Ensure some undesirable entry controls are cleared, instead of relyingMike Larkin
on the default settings. Noticed when booting a NetBSD guest VM.
2016-07-22Attach imx(4) on i.mx6 quad plus which appears to be largely compatibleJonathan Gray
with i.mx6 quad but with more memory bandwidth and some graphics tweaks. ok kettenis@
2016-07-22Fallback to the known fec irq number on imx.6 if the fdtJonathan Gray
interrupts-extended property is missing or not the size we expect. Some dtbs implement a workaround for "ERR006687 ENET: Only the ENET wake-up interrupt request can wake the system from Wait mode" suggested by the IMX6DQCE errata document to set an undocumented gpio mux mode and handle the interrupt via gpio. We don't support gpio interrupts yet, hopefully this change is enough to make interrupts work on wandboard and sabre lite again till we do. Discussed with kettenis and patrick, tested on sabre lite by patrick.
2016-07-21set and clear the 10baseT bit in statchgJonathan Gray
ok patrick@
2016-07-19Remove what appears to be a copy-paste error setting cur_ttbTom Cosgrove
in pmap_free_l1(). from aalm@ - thanks ok patrick@
2016-07-18Apparently we need to explicitly stop the timers before reloading them. AtMark Kettenis
least this is what Linux does and it fixes a hang on the Olimex A10s boards. While there, also preserve the clock selection when reloading the timer. ok patrick@, jsg@, tom@
2016-07-18Add additional i2c and mmc prcm module enum values for devices thatJonathan Gray
didn't attach previously on OMAP4 with the static device configuration and now do with the fdt. Like most of the other OMAP4 prcm cases these don't do anything, hopefully we'll properly configure clocks with data from the fdt at some point in the future. Tested by abieber@ on PandaBoard-ES.
2016-07-18Don't need a separate flags variable in armv7 pmap_clean_page() -Tom Cosgrove
just use the pv_flags. ('Twas a copy-paste from arm's pmap_clean_page(), which did need it.) Also remove even less used flags variable from pmap_page_remove(). First part from a diff from aalm@ - thanks ok kettenis@ "looks good" patrick@
2016-07-18Some SoCs have a ranges property set in their device trees. This canPatrick Wildt
be used to translate one memory address to another. Currently we just pass the child's memory address to bus space map. If one of the parent busses implements a ranges property, the child's address property is not the real address. This change hooks up a bus space map function that is aware of the ranges property and translates the addresses if needed. ok kettenis@ looks fine jsg@
2016-07-17Attach sunxi(4) based on the compatible property of the root node of theMark Kettenis
device tree like we do on omap. Add preliminary support for the sun5i variant which corresponds to the A13 and A10s SoCs. ok patrick@
2016-07-17Adapt kettenis' pinctrl changes in imx to sitaracm andJonathan Gray
pinctrl-single,pins to handle mux settings and pad configuration. The fdt data has offsets from the start of the pinmux address range so the am335x specific pinmux offset from the scm base is added to the offsets. This as not a new driver as sitaracm does manual table driven pad configuration for gpio. If all the offsets in the ti_padconf_devmap table were reduced by the am335x pinmux offset (0x800) it may make sense to map only the pinmux memory region and not the scm superset. looks good kettenis@
2016-07-17use the fdt root node instead of board ids to test for am335xJonathan Gray
2016-07-17Set function pointers based on the fdt root node instead of board ids.Jonathan Gray
ok kettenis@ on an earlier version
2016-07-17Set function pointers based on the fdt root node instead of board ids.Jonathan Gray
ok kettenis@
2016-07-16remove an unused parameter that wasn't handled during a previous refactorMike Larkin
(reducing the number of XXXs in vmm)
2016-07-16Add $OpenBSD$ / replace $Id$ with $OpenBSD$.Visa Hankala
2016-07-16Remove octeon_disable_interrupt() and octeon_restore_status().Visa Hankala
They are unused and equivalent to disableintr() and setsr(). While here, clean up a few other leftovers.
2016-07-16Fix typo in comment in three machdep.c files:Tom Cosgrove
s/names are this level/names at this level/ from aalm@ - thanks
2016-07-16Remove unused function process_frame() from arm_machdep.cTom Cosgrove
ok jsg@
2016-07-16remove unused vmm_activate function. all vmm-specific suspend/resume needsMike Larkin
are handled during cpu hatch.
2016-07-16Fix an incorrect shift value when calculating the mask for the VMCS MSRMike Larkin
list storage size. Noticed when attempting to get vmm(4) to nest under Hyper-V.
2016-07-16remove some 12 year old code that was never correct, and never compiledMike Larkin
anyway due to a missing #include. the code was originally intended to handle i386 SMP EISA machines with an IOAPIC. Since the code never was compiled, and nobody has noticed or complained for 12 years, I think things are probably fine.
2016-07-16remove some unused #includesMike Larkin
2016-07-15Remove duplicated line in omap mmc driver, which would causeTom Cosgrove
clkbase to be set to 0 (if it wasn't all commented out anyway). ok patrick@
2016-07-15Remove duplicate line in amd64/acpi_machdep.cTom Cosgrove
ok krw@
2016-07-15disable acpicbkbd by default until after the release when acpi ecJoshua Stein
issues can be worked out, otherwise this driver will cause the kernel to spin forever on certain chromebooks
2016-07-14Do board-specific delay/skew corrections for the Micrel KSZ9021 and KSZ9031Mark Kettenis
PHYs based on device tree properties instead of the board ID. Untested as I don't have the hardware. ok jsg@, patrick@
2016-07-14virtio: Move interrupt handler into transport specific codeStefan Fritsch
For MSI-X (and also possibly for other transports), the interrupt handler must do different things. Move it out of virtio.c and into virtio_pci. ARM part tested by patrick@
2016-07-13A work-in-progress driver for the Hyper-V NetVSCMike Belopuhov
Network VSC is an RNDIS device using NVSP protocol to communicate with the Hyper-V VMBus via VMBus channels and/or shared memory. The code was ported from FreeBSD with some API changes and simplifications. While the Rx path is nearly complete, packet transmition is not implemented yet. ok deraadt, mlarkin
2016-07-13The "#address-cells" and "#size-cells" properties define the sizePatrick Wildt
of the memory address and length information. The root node passes this information down to the children and it can be overwritten by other nodes inbetween. Pass these properties as part of the fdt attach args, so that we can grab that information quickly inside the drivers. ok kettenis@
2016-07-13Use the device tree voltage regulator information to supply power to the USBMark Kettenis
bus. For this only supports "fixed" regulators that are controlled through a gpio. But this covers all the case we currently handle with board ID specific code. Note that the old code did explicitly remove power first on some boards, which would reset bus-powered devices/hubs on the bus. The new code doesn't do this. If that causes problems we can revisit the issue. The boards that would be affected are sabrelight/nitrogen6x and utilite. The plan is to evolve this into a generic regulator framework that supports more complex regulator types as well. ok jsg@, patrick@
2016-07-13CPUID vendor ID was already register-swapped during initial query, so noMike Larkin
need to do it again.
2016-07-12Turn ahci(4) glue code for the i.MX6 platform into its own imxahci(4) driverMark Kettenis
such that we can don't end up with conflicting attachments of other SoC-specific glue code.
2016-07-12Change over to imxehci(4) here as well.Mark Kettenis
2016-07-12Turn ehci(4) glue code for the i.MX6 platform into its own imxehci(4) driverMark Kettenis
such that we can don't end up with conflicting attachments of other SoC-specific glue code. ok jsg@, patrick@
2016-07-11Use gpio framework to implement hardware reset of the PHY instead ofMark Kettenis
hardcoding particular gpios based on board IDs. ok visa@, jsg@
2016-07-11Use gpio framework to implement card detect instead of hardcoding particularMark Kettenis
gpios based on board IDs. ok visa@, jsg@
2016-07-11Hook up imxgpio(4) to the FDT gpio framework.Mark Kettenis
ok visa@, jsg@
2016-07-10Not all i.MX6 devices have a pinctrl property in their device nodes.Patrick Wildt
In that case, soft fail and return instead of allocating buffer with a bogus size. ok kettenis@
2016-07-10Fix typo. Pointed out by patrick@Mark Kettenis
2016-07-10Dynamically attach imxgpio(4) using the FDT.Mark Kettenis