Commit Graph

20 Commits

Author SHA1 Message Date
ian
f1d49f684d MFC r257669, r257672, r257673, r257676, r257678:
Call initarm_lastaddr() later in the init sequence, after establishing
  static device mappings, rather than as the first of the initializations
  that a platform can hook into.  This allows a platform to allocate KVA
  from the top of the address space downwards for things like static device
  mapping, and return the final "last usable address" result after that and
  other early init work is done.

  Because some platforms were doing work in initarm_lastaddr() that needs to
  be done early, add a new initarm_early_init() routine and move the early
  init code to that routine on those platforms.

  Make PTE_DEVICE a synonym for PTE_NOCACHE on armv4, to make it easier to
  share the same code on both architectures.

  Add new helper routines for arm static device mapping.  The new code
  allocates kva space from the top down for the device mappings and builds
  entries in an internal table which is automatically used later by
  arm_devmap_bootstrap().  The platform code just calls the new
  arm_devmap_add_entry() function as many times as it needs to (up to 32
  entries allowed; most platforms use 2 or 3 at most).

  Remove imx local devmap code and use the essentially identical common
  code that got moved from imx_machdep.c to arm/devmap.c.
2013-12-14 00:16:08 +00:00
ian
eae48ec05e MFC r257648, r257649, r257660:
Begin reducing code duplication in arm pmap.c and pmap-v6.c by factoring
  out common code related to mapping device memory into a new devmap.c file.

  Remove the growing duplication of code that used pmap_devmap_find_pa() and
  then did some math with the returned results to generate a virtual address,
  and likewise in reverse to get a physical address.  Now there are a pair
  of functions, arm_devmap_vtop() and arm_devmap_ptov(), to do that.  The
  bus_space_map() implementations are rewritten in terms of these.

  Move remaining code and data related to static device mapping into the
  new devmap.[ch] files.  Emphasize the MD nature of these things by using
  the prefix arm_devmap_ on the function and type names (already a few of
  these things found their way into MI code, hopefully it will be harder to
  do by accident in the future).
2013-12-13 23:56:53 +00:00
ian
7de85345e2 MFC r257258, r257265: Include headers (if_var.h and others) where needed.
The change that triggered the need for this on head was r257244.  That
hasn't been MFC'd yet, but there's no harm in paving the way for it with
this MFC.
2013-12-13 22:08:31 +00:00
ian
dc79f485d8 MFC r257201, r257202
Retire arm_remap_nocache() and the data and constants associated with it.
2013-12-13 21:40:12 +00:00
ian
c44e255e08 MFC r257199, r257200, r257217:
Remove all #include <machine/pmap.h> from arm code.  It's already
  included by vm/pmap.h, which is a prerequisite for arm/machine/pmap.h
  so there's no reason to ever include it directly.

  Remove #include <machine/frame.h> from all the arm code that doesn't
  really need it.  That would be almost everywhere it was included.  Add
  it in a couple files that really do need it and were previously getting
  it by accident via another header.

  Remove the last dregs of trapframe_t.  It turns out only arm was using
  this type, so remove it to make arm code more consistant with other
  platforms.
2013-12-13 20:43:11 +00:00
mav
6cf7cc6e4d MFcalloutng:
Switch eventtimers(9) from using struct bintime to sbintime_t.
Even before this not a single driver really supported full dynamic range of
struct bintime even in theory, not speaking about practical inexpediency.
This change legitimates the status quo and cleans up the code.
2013-02-28 13:46:03 +00:00
glebius
8e20fa5ae9 Mechanically substitute flags from historic mbuf allocator with
malloc(9) flags within sys.

Exceptions:

- sys/contrib not touched
- sys/mbuf.h edited manually
2012-12-05 08:04:20 +00:00
kevlo
25611f9cf9 Fix typo; s/ouput/output 2012-11-07 07:00:59 +00:00
andrew
94003fea26 Merge the FDT versions of initarm.
The copies of initarm used on platforms with FDT support were almost
identical. The differences were pulled out into separate functions that
were called by initarm.

This change merges the, now identical, copies of initarm and a few of it's
support functions. This is a step towards a common kernel on ARMv6.
2012-11-03 22:39:07 +00:00
andrew
245c75ddd9 Merge r242125 into the other ARMv6 copies of initarm. 2012-10-31 08:25:45 +00:00
andrew
189dafad03 Move the call to platform_gpio_init() into initarm_gpio_init() to reduce
the diff to the other FDT versions of initarm.
2012-10-30 06:11:09 +00:00
andrew
c9cd6f0dff Create the new initarm_ functions to reduce the diff to the other FDT
versions of initarm
2012-09-26 10:07:53 +00:00
andrew
55574dacdc Use arm_dump_avail_init to build the dump_avail array 2012-09-26 09:27:38 +00:00
andrew
afcbb47a63 Start to clean up the lpc initarm as it also uses FDT. 2012-09-26 09:25:31 +00:00
andrew
d9ebf06192 Update different versions of physmap_init to be identical in preparation
for merging them.
2012-09-23 02:01:59 +00:00
andrew
32eb506f22 Reduce the diff between the FDT implementations of initarm.
This only touches whitespace and comments.
2012-09-22 22:41:38 +00:00
andrew
cd998f5e4e Create a common set_stackptrs in sys/arm/machdep.c.
On single core devices set_stackptrs is only ever called with cpu = 0 in
initarm and will be identical to the existing function. On SMP this needs
to be implemented for sys/arm/mp_machdep.c, but the implementations are
identical for each SoC.
2012-09-22 06:41:56 +00:00
andrew
ebd36ca42d Set machine correctly on ARM. This allows universe to use the correct world
when building each kernel.

Reviewed by:	imp
2012-08-18 05:48:19 +00:00
jceel
9821bfb344 Switch lpc initarm() to use struct arm_boot_params and therefore fix
EA3250 kernel build.

Approved by:	gonzo
2012-08-15 18:18:29 +00:00
gonzo
50e55c591e Merging of projects/armv6, part 8
r235162:

  Initial LPC32x0 support. Includes DTS file for Embedded Artists EA3250
  board.

  Peripherals currently supported:
  - Serial ports
  - Interrupt controller
  - Timers
  - Ethernet
  - USB host
  - Framebuffer (in conjunction with SSD1289 LCD controller)
  - RTC
  - SPI
  - GPIO

Submitted by:	Jakub Wojciech Klama <jceel@freebsd.org>
2012-08-15 05:37:10 +00:00