Commit Graph

1717 Commits

Author SHA1 Message Date
gonzo
6274b9f3de Add custom renderer for poor man's cursor support for framebuffer console 2012-12-28 00:55:43 +00:00
cognet
25bbadc6fa The manpage states that bus_dmamap_create(9) returns ENOMEM if it can't
allocate a map or mapping resources.  That seems to imply that any memory
allocations it does must use M_NOWAIT and check for NULL.

Submitted by:	Ian Lepore <freebsd@damnhippie.dyndns.org>
2012-12-22 01:04:29 +00:00
cognet
c4f3118502 The VM_MEMATTR_ constants are enumerated, not a bitset. Compare accordingly.
Submitted by:	Ian Lepore <freebsd@damnhippie.dyndns.org>
2012-12-22 01:03:23 +00:00
gonzo
809ad0530a Replace generic ARM11 option with more specific
support for ARM1136 and ARM1176

Submitted by:	Daisuke Aoyama <aoyama at peach.ne.jp>
Obtained from:	NetBSD
2012-12-20 04:32:02 +00:00
gonzo
1fa6530f64 Fix misleading comment 2012-12-20 03:33:33 +00:00
cognet
450d909b25 Use C comments instead of C++ comments.
Spotted out by:	gonzo (thanks, man)
2012-12-20 00:50:04 +00:00
cognet
5c7a1afd08 Busdma enhancements, especially for managing small uncacheable buffers.
- Use the new architecture-agnostic buffer pool manager that uses uma(9)
  to manage a set of power-of-2 sized buffers for bus_dmamem_alloc().

- Create pools of buffers backed by both regular and uncacheable memory,
  and use them to handle regular versus BUS_DMA_COHERENT allocations.

- Use uma(9) to manage a pool of bus_dmamap structs instead of local code
  to manage a static list of 500 items (it took 3300 maps to get to
  multi-user mode, so the static pool wasn't much of an optimization).

- Small BUS_DMA_COHERENT allocations no longer waste an entire page per
  allocation, or set pages to uncached when they contain data other than
  DMA buffers.  There's no longer a need for drivers to work around the
  inefficiency by allocing large buffers then sub-dividing them.

- Because we know the alignment and padding of buffers allocated by
  bus_dmamem_alloc() (whether coherent or regular memory, and whether
  obtained from the pool allocator or directly from the kernel) we
  can avoid doing partial cacheline flushes on them.

- Add a fast-out to _bus_dma_could_bounce() (and some comments about
  what the routine really does because the old misplaced comment was wrong).

- Everywhere the dma tag alignment is used, the interpretation is that
  an alignment of 1 means no special alignment.  If the tag is created
  with an alignment argument of zero, store it in the tag as one, and
  remove all the code scattered around that changed 0->1 at point of use.

- Remove stack-allocated arrays of segments, use a local array of two
  segments within the tag struct, or dynamically allocate an array at first
  use if nsegments > 2.  On an arm system I tested, only 5 of 97 tags used
  more than two segments.  On my x86 desktop it was only 7 of 111 tags.

Submitted by:	Ian Lepore <freebsd@damnhippie.dyndns.org>
2012-12-20 00:38:08 +00:00
cognet
f6b29e6be5 Use the new allocator in bus_dmamem_alloc(). 2012-12-20 00:35:26 +00:00
gonzo
00ad91b529 Use NFSCL since NFSCLIENT build is broken at the moment 2012-12-19 20:33:16 +00:00
cognet
58faac84ca Properly implement pmap_[get|set]_memattr
Submitted by:	Ian Lepore <freebsd@damnhippie.dyndns.org>
2012-12-19 00:24:31 +00:00
gonzo
8807e65d8f Add sysctls for changing GPIO pins function
Submitted by:	Luiz Otavio O Souza
2012-12-18 22:18:54 +00:00
gonzo
e485df6d69 Fix comment to represent actual file purpose
Spotted by: gavin@
2012-12-16 00:20:16 +00:00
gonzo
52a49d4576 Add support for QEMU's version of Versatile Platform Board 2012-12-13 23:19:13 +00:00
gonzo
0055123fda Add driver for PrimeCell Vectored Interrupt Controller (PL190) 2012-12-13 23:03:37 +00:00
cognet
61d867003f Don't write-back the cachelines if we really just want to invalidate them.
Spotted out by:	Ian Lepore <freebsd at damnhippie DOT dyndns dot org>
2012-12-05 21:07:27 +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
gonzo
75299ed24f - Enable syscons/framebuffer by default
- Enable NFS client by default. Might be useful for building ports
2012-11-30 04:56:39 +00:00
gonzo
df6a0a2978 Get reserved memory regions and exclude them from available memory map 2012-11-30 03:11:03 +00:00
gonzo
e7bfe2f92c Get frequency from "clock-frequency" property of "/axi/sdhci" FDT node 2012-11-30 02:32:37 +00:00
gonzo
c1fa64e79e Fix RGB565 case 2012-11-30 02:31:08 +00:00
gonzo
4e7a33716c Fix hardcoded bpp value 2012-11-29 05:46:46 +00:00
gonzo
ed870aa12f Do not enable data cache until later in kernel init. Stale bits in
cache might cause erroneus behavior on early stage.

Submitted by:	Ian Lepore
Tested on:	Atmel, Marvell, and Eyxnos
2012-11-27 06:39:32 +00:00
marcel
35a10ad41d Add NOTES and Makefile in order to generate LINT. NOTES contains pretty
much all the union of all the kernel configuration files, including all
the CPU types, Marvell SOC types and at91 board types. Any device not
supported (read: does not compile) has been removed, which is a fairly
small set actually. As such, LINT gives us very good coverage without
having to build a zillion kernels.
2012-11-27 01:17:50 +00:00
marcel
ba46bc2527 Allow building LINT by defining both SAMPLE_AT_RESET on the one hand
and SAMPLE_AT_RESET_{LO|HI} on the other. It doesn't matter which
values they take, as long as they are defined.
2012-11-27 01:10:58 +00:00
marcel
d5cc776451 Don't include arm/xscale/i8134x/i81342reg.h when we're compiling LINT.
The definitions in i81342reg.h clash with those in i80321reg.h.
2012-11-27 01:08:05 +00:00
marcel
b0982c796a Remove print_kernel_section_addr(). All statements in that function
expand to uncompilable code when the kernel configuration contains
"options DEBUG", such as it is for LINT. The toolchain is often a
better approach to figure this out, as it doesn't require one to
boot the kernel.
2012-11-27 01:05:07 +00:00
marcel
2749496c99 Don't define intr_disable and intr_restore as macros. The macros
interfere with structure fields of the same name in drivers, like
the intr_disable function pointer in struct cphy_ops in cxgb(4).
Instead define intr_disable and intr_restore as inline functions.

With intr_disable() an inline function, the I32_bit and F32_bit
macros now need to be visible in MI code and given the rather
poor names, this is not at all good. Define ARM_CPSR_F32 and
ARM_CPSR_I32 and use that instead of F32_bit and I32_bit (resp)
for now.
2012-11-27 00:41:39 +00:00
marcel
54f8a4b147 Unbreak building a kernel with EHCI: there's no ehci_atmelarm.c. 2012-11-26 23:30:47 +00:00
kientzle
081fe7e283 Fix spelling. 2012-11-25 16:19:12 +00:00
gonzo
fd1a7a0cc8 Add Raspberry Pi GPIO driver
Submitted by:	Luiz Otavio O Souza
2012-11-23 20:04:39 +00:00
imp
8f833b6bbd Strip trailing newline. 2012-11-23 17:22:38 +00:00
gonzo
1be6a30bf9 Now that we have working USB keyboard add ukbd to the syscons-enabling
part of config
2012-11-23 07:58:12 +00:00
gonzo
0f275f4278 Multiple fixes for BCM2835 framebuffer
- Get resolution settings from FDT blob
- Properly handle 24 and 16 bits per pixel
- Add colors support for text console
2012-11-23 04:30:54 +00:00
cognet
79f863d433 Make sure the address starts on a cache line boundary. 2012-11-21 01:38:40 +00:00
adrian
37c894e23c Correctly use spaces here.
Pointed out by:	pjd
2012-11-18 14:05:28 +00:00
andrew
4002468097 Clean up the two i80321 copies of initarm to be closer to one another. 2012-11-17 23:06:00 +00:00
adrian
a44b656781 Just compile the whole ath chipset support in. 2012-11-17 21:55:49 +00:00
kib
bc5bfde14d Move the declaration of vm_phys_paddr_to_vm_page() from vm/vm_page.h
to vm/vm_phys.h, where it belongs.

Requested and reviewed by:	alc
MFC after:	2 weeks
2012-11-16 05:55:56 +00:00
cognet
6092625490 Don't forget to unlock the pmap lock on failure. 2012-11-16 00:14:02 +00:00
cognet
de6d0cfc51 Remove a useless printf 2012-11-15 23:49:07 +00:00
cognet
a2b364e40c Use the "inner shareable" variations of flush/invalidate functions for SMP.
Submitted by:	Giovanni Trematerra <gianni at freebsd DOT org>
2012-11-15 22:31:23 +00:00
kib
e8ae50d444 Flip the semantic of M_NOWAIT to only require the allocation to not
sleep, and perform the page allocations with VM_ALLOC_SYSTEM
class. Previously, the allocation was also allowed to completely drain
the reserve of the free pages, being translated to VM_ALLOC_INTERRUPT
request class for vm_page_alloc() and similar functions.

Allow the caller of malloc* to request the 'deep drain' semantic by
providing M_USE_RESERVE flag, now translated to VM_ALLOC_INTERRUPT
class. Previously, it resulted in less aggressive VM_ALLOC_SYSTEM
allocation class.

Centralize the translation of the M_* malloc(9) flags in the single
inline function malloc2vm_flags().

Discussion started by:	"Sears, Steven" <Steven.Sears@netapp.com>
Reviewed by:	alc, mdf (previous version)
Tested by:	pho (previous version)
MFC after:	2 weeks
2012-11-14 20:01:40 +00:00
cognet
f56ade0026 Make it clear the L2 ops are filled for any cpu using a PL310 cache, not just
the omap4.

Spotted out by:	Giovanni Trematerra <gianni at freebsd DOT org>
2012-11-14 12:11:23 +00:00
cognet
f3878af120 Use the arrmv7 version for flushID too, as it does something different for SMP.
Submitted by:	Giovanni Trematerra <gianni at freebsd DOT org>
2012-11-14 10:59:42 +00:00
imp
b19f8ebcdc Reduce differences between these two initarms a bit more. 2012-11-08 04:02:36 +00:00
imp
144b70190e Minor cosmetic changes to bring atmel's initarm and the default
initarm for FDT closer together.  More to follow.
2012-11-07 16:59:12 +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
cognet
38ef031b56 Fix build for SMP.
Submitted by:	Giovanni Trematerra <gianni at freebsd DOT org>
2012-11-01 12:26:31 +00:00
andrew
245c75ddd9 Merge r242125 into the other ARMv6 copies of initarm. 2012-10-31 08:25:45 +00:00