Commit Graph

4672 Commits

Author SHA1 Message Date
Emmanuel Vadot
c204112317 arm: allwinner: Remove old unused clocks
Remove the old clocks for allwinner as now all the SoCs have been converted
to clkng.
The only old clock now is the gmac clock which still lives under the /clocks
dts node.
2018-08-05 06:08:23 +00:00
Emmanuel Vadot
82533b026a arm: Remove ALLWINNER_UP kernel config
This was needed when we GENERIC couldn't boot on UP system.
2018-08-03 22:15:58 +00:00
Konstantin Belousov
e45b89d23d Add pmap_is_valid_memattr(9).
Discussed with:	alc
Sponsored by:	The FreeBSD Foundation, Mellanox Technologies
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D15583
2018-08-01 18:45:51 +00:00
Emmanuel Vadot
cfe196fbed nvmem: Add nvmem interface and helpers
The nvmem interface helps provider of nvmem data to expose themselves to consumer.
NVMEM is generally present on some embedded board in a form of eeprom or fuses.
The nvmem api are helpers for consumer to read/write the cell data from a provider.

Differential Revision:	https://reviews.freebsd.org/D16419
2018-07-31 19:08:24 +00:00
Andrew Turner
011dc75d9c Remove teh non-INTRNG code from the ARM GIC interrupt controller driver.
We don't build for the non-INTRNG case and it was makeing the code harder
to read.
2018-07-30 10:55:02 +00:00
Andrew Turner
3810edcf6b Require ARMv5 for arm. All current kernels are for ARMv5 or later, and it
will allow us to clean out old ARMv4 (and earlier) specific assembly.

Relnotes:	yes
2018-07-30 09:50:26 +00:00
Alan Cox
cd914c2fc2 Prepare for adding psind == 1 support to armv6's pmap_enter().
Precompute the new PTE before entering the critical section.

Eliminate duplication of the pmap and pv list unlock operations in
pmap_enter() by implementing a single return path.  Otherwise, the
duplication will only increase with the upcoming support for psind == 1.

Reviewed by:	mmel
Tested by:	mmel
Discussed with:	kib, markj
MFC after:	3 weeks
Differential Revision:	https://reviews.freebsd.org/D16443
2018-07-30 01:54:25 +00:00
Andrew Turner
cb5ce014d4 Use the cp15 functions to read cp15 registers rather than using assembly
functions. The former are static inline functions so will compile to a
single instruction.
2018-07-28 17:21:34 +00:00
Andrew Turner
59c9a22424 Remove an unneeded cpu_ident() prototype. 2018-07-28 16:56:46 +00:00
Andrew Turner
a0e00905f0 Remove some write only global values from the arm cpufunc code. 2018-07-28 12:53:10 +00:00
Andrew Turner
836108c21e Remove an unused function from the arm ELF trampoline. It tries to find
properties about the CPU caches, however we never use these values.
2018-07-28 12:52:03 +00:00
Andrew Turner
5b50a73ffb Only build the cache handling code we need when building the arm ELF
trampoline.
2018-07-28 12:50:09 +00:00
Andrew Turner
90e9f8828e Make the arm cpu setup functions static. Any other place that needs these
functions will use the function pointer we create for them.
2018-07-28 12:20:42 +00:00
Andrew Turner
f3157bf07d Remove an unneeded check for CPU_XSCALE_81342 2018-07-28 12:16:57 +00:00
Andrew Turner
0faf121391 Remove old CPU_ values from the arm cpufunc code. These have been removed. 2018-07-28 12:00:32 +00:00
Andrew Turner
96690e0dc4 Remove the old CPU_ values from the arm kernel trampoline. These options
are gone so we can remove them from the code.
2018-07-28 11:58:43 +00:00
Andrew Turner
e57edd3580 Remove now the cow unused CPU_ARM9 and CPU_FA526 options. These are for
ARMv4 CPUs that are no longer supported.
2018-07-28 11:00:45 +00:00
Andrew Turner
560a8e6ccc The RT1310 is an ARM926EJ-S, fix the config to mark it as such. 2018-07-28 10:48:41 +00:00
Andrew Turner
15bff09749 Only support INTRNG in the SMP code on arm. We already require INTRNG on
anything that could be multicore on arm.
2018-07-28 07:54:21 +00:00
Andrew Turner
e4c66ddabd Remove IPI_IRQ_START and IPI_IRQ_END from the arm kernel config files.
These are unneeded with INTRNG.
2018-07-28 06:46:10 +00:00
Warner Losh
7eb20343b3 This builds now, so aadd it back to Universe. 2018-07-27 21:26:32 +00:00
Warner Losh
888a313927 Remove xscale support.
As discussed in arm@.  This is a scaled back version of the prior
commit because xscale is overlaoded in places to mean armv5 or
similar.  The OLD XSCALE stuff hasn't been useful in a while. The
original committer (cognet@) was the only one that had boards for
it. He's blessed this removal. Newer XSCALE (GUMSTIX) is for hardware
that's quite old. After discussion on arm@, it was clear there was no
support for keeping it.

Noticed by: andrew@
2018-07-27 21:25:07 +00:00
Warner Losh
c81b12e0d7 Revert r336773: it removed too much.
r336773 removed all things xscale. However, some things xscale are
really armv5. Revert that entirely. A more modest removal will follow.

Noticed by: andrew@
2018-07-27 21:25:01 +00:00
Warner Losh
626930c2fd Remove xscale support
The OLD XSCALE stuff hasn't been useful in a while. The original
committer (cognet@) was the only one that had boards for it. He's
blessed this removal. Newer XSCALE (GUMSTIX) is for hardware that's
quite old. After discussion on arm@, it was clear there was no support
for keeping it.

Differential Review: https://reviews.freebsd.org/D16313
2018-07-27 18:33:09 +00:00
Warner Losh
fb3f4b7549 Make ralink compile again.
Add std.ralink to define common things across all ralink configs.
Add cpu, machine and options INTRNG to this file.
Remove RT1310.hints file reference: that file isn't in our tree.
2018-07-27 18:31:30 +00:00
Warner Losh
848c22d7b1 Remove Cavium/Econa CNS11xx support.
This port hasn't been updated since it was committed, apart from
housekeeping. There's no known users, and the known hardware for
this port is too thin to run FreeBSD/arm these days well.

This also removes the last armv4 port. We've had no reports of armv4
systems working since FreeBSD 8. All the kernel support for armv4 has
not been removed since it's too intertwined with armv5 support (which
remains in the tree).

RelNotes: Yes
No objection from: arm@
2018-07-27 18:30:01 +00:00
Warner Losh
58d5c51106 Remove Atmel AT91RM9200 and AT91SAM9 support.
The last known robust version of this code base was FreeBSD 8.2. There
are no users of this on current, and all users of it have abandoned
this platform or are in legacy mode with a prior version of FreeBSD.

All known users on arm@ approved this removal, and there were no
objections.

Differential Revision: https://reviews.freebsd.org/D16312
2018-07-27 18:28:22 +00:00
John Baldwin
433390a0ca Raise a proper SIGTRAP / TRAP_TRACE signal for a PT_STEP step on arm.
Previously, a step by PT_STEP resulted in no signal being raised to
the debugger so that a step was silently completed with the program
continuing to execute after the step.  Fix by raising a SIGTRAP
signal with TRAP_TRACE as the signal code.

To simplify the error handling cases (if ptrace_clear_single_step()
fails, etc.) move the handling of PTRACE_BREAKPOINT into the
gdb_trapper() function.  If ptrace_clear_single_step() fails,
gdb_trapper() won't claim the fault, and the default case of
SIGILL / ILL_OPC will be used.

Differential Revision:	https://reviews.freebsd.org/D16100
2018-07-25 18:11:37 +00:00
Andriy Gapon
2559473944 follow-up to r336635, update TAILQ to CK_SLIST for ie_handlers
arm, mips and sparc64 were affected.
2018-07-23 15:36:55 +00:00
Ian Lepore
b89ff96c7d Add option MAC to armv6 and armv7 kernels by default, it needs to be
compiled-in to allow loading policy modules at runtime.
2018-07-21 18:54:24 +00:00
Emmanuel Vadot
6185fb0f81 arm: Implement cpu_est_clockrate for armv[67] 2018-07-19 11:27:11 +00:00
Michal Meloun
cc28ae0479 Remove the dead code from ARM cpufunc_* files.
The elf trampoline was never been supported for ARMv6 and ARMv7 and was
disconnected from kernel build many months ago.

MFC after:	2 weeks
2018-07-18 10:33:07 +00:00
Andrew Turner
b04e143189 Also check if __ARM_ARCH_6KZ__ is defined when detecting when to use ARMv6
instructions. There is some code that still uses the _ARM_ARCH_* macros.

Sponsored by:	DARPA, AFRL
2018-07-18 09:17:37 +00:00
Warner Losh
ff9452772d Remove kernel support for armeb
Remove all the big-endian arm architectures (ixp425 and ixp435)
support in the kernel and associated drivers.

Differential Revision:  https://reviews.freebsd.org/D16257
2018-07-17 23:23:45 +00:00
Emmanuel Vadot
75e7ec65d6 allwinner: a83t: Fix PLL_CPU clocks
The PLL_CPU clocks formula is 24Mhz * N and not 24Mhz / N
Fix it by using a NKMP clock with fixed factor values for the one
unused.
2018-07-16 13:38:16 +00:00
Oleksandr Tymoshenko
e06262c163 Remove two checks that are always false
Outer loop condition contradicts inner check so code under inner condition
is not reachable. Remove it.

PR:		229722
Reported by:	David Binderman
2018-07-16 01:07:28 +00:00
Ian Lepore
ffd4bf82de Eliminate an unused var warning-error; the var is used only when parsing
linux-style boot args, so wrap it in the appropriate ifdef.
2018-07-14 16:33:11 +00:00
Warner Losh
a20946b5d1 Fix machdep_boot.c
A last minute change made this no longer compile. Pass the right arg
and eliminate now-unused variables from the code.
2018-07-13 20:33:10 +00:00
Marcin Wojtas
ab53b2929f Enable UART support for Xilinx Ultrascale+ SoCs
Xilinx Ultrascale+ are based on Cortex-A53 and use existing
UART driver (uart_dev_cdnc). Enable it in arm64 GENERIC config.

Submitted by: Michal Stanek <mst@semihalf.com>
Obtained from: Semihalf
2018-07-13 19:54:22 +00:00
Warner Losh
52379d36a9 Create helper functions for parsing boot args.
boot_parse_arg		to parse a single arg
boot_parse_cmdline	to parse a command line string
boot_parse_args		to parse all the args in a vector
boot_howto_to_env	Convert howto bits to env vars
boot_env_to_howto	Return howto mask mased on what's set in the environment.

All these routines return an int that's the bitmask of the args
translated to RB_* flags. As a special case, the 'S' flag sets the
comconsole_speed env var. Any arg that looks like a=b will set the env
key 'a' to value 'b'. If =b is omitted, 'a' is set to '1'.  This
should help us reduce the number of redundant copies of these routines
in the tree.  It should also give a more uniform experience between
platforms.

Also, invent a new flag RB_PROBE that's set when 'P' is parsed.  On
x86 + BIOS, this means 'probe for the keyboard, and if it's not there
set both RB_MULTIPLE and RB_SERIAL (which means show the output on
both video and serial consoles, but make serial primary).  Others it
may be some similar concept of probing, but it's loader dependent
what, exactly, it means.

These routines are suitable for /boot/loader and/or the kernel,
though they may not be suitable for the tightly hand-rolled-for-space
environments like boot2.

Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D16205
2018-07-13 16:43:05 +00:00
Ian Lepore
4c2b439617 Add pnp info to the imx_spi driver. 2018-07-09 19:00:39 +00:00
Ian Lepore
0592ad0252 Oops, fix a typo: imx_snvs should be imx6_snvs. 2018-07-08 21:14:43 +00:00
Ian Lepore
638a5afda9 Move device statements out of std.imx* and into kernel config files.
In the armv4/5 world device statements in these files were common, but in
the v6/7 world, other socs don't put device statements into those files, so
this just brings imx5 and imx6 into line with the current conventions.
2018-07-08 21:09:52 +00:00
Ian Lepore
9b4738cf7b Make the imx6_snvs driver usable as a module, add pnp info. Add a manpage. 2018-07-08 19:35:41 +00:00
Ian Lepore
952dd10db4 Catch up with improvements in RTC handling... It's no longer necessary to
ignore the timestamp passed in to settime() due to inaccuracy, the core
routines now pass in a nanosecond-accurate time freshly-obtained before
calling each driver's settime() method.  Also, add calls to the new
debugging output helpers.
2018-07-08 18:44:42 +00:00
Ian Lepore
cf2cec68bd Add pnp info to imx6_ahci, and add a module makefile, and a manpage for it. 2018-07-08 00:27:28 +00:00
Ian Lepore
31ff8defe3 Add support to the imx watchdog for the FDT "timeout-sec" property, by
automatically initializing the watchdog using the given value.  Also,
attach at BUS_PASS_TIMER to extend watchdog protection to more of the
kernel init process.
2018-07-07 19:10:00 +00:00
Ian Lepore
a4db01f7c6 Correctly calculate the value to put in the imx wdog countdown register.
The correct value is seconds*2-1.  The code was using just seconds*2, which
led to being off by a half-second -- usually not a big deal, except when the
value was the max (128) it overflowed so zero would get written to the
countdown register, which equates to a timeout of a half second.
2018-07-07 19:03:38 +00:00
Ian Lepore
2b352b736d Add pnp info and a module makefile for the imx_wdog watchdog driver. 2018-07-07 17:25:09 +00:00
John Baldwin
a9c91abd3b Export a breakpoint() function to userland for arm and arm64.
Enable ptrace() tests using breakpoint() on these architectures.

Reviewed by:	andrew
Differential Revision:	https://reviews.freebsd.org/D15191
2018-07-06 23:49:17 +00:00