Commit Graph

1221 Commits

Author SHA1 Message Date
Andrew Turner
2c0d026b52 Move the point we attach the ofw driver on arm64 to nexus.c. This will
allow us to have a single place to decide to use ofw or acpi.
2015-05-05 11:13:16 +00:00
Andrew Turner
85ffc58684 Add pmap_mapbios and pmap_unmapbios. These will be needed to support acpi.
Sponsored by:	The FreeBSD Foundation
2015-04-29 15:00:43 +00:00
Ruslan Bukin
a74af3dc69 o Fix bus_space_read_multi functions: correct increment value
o Use these functions for streaming

Tested with ATA (PCI bus) / Gem5 simulator

Reviewed by:	andrew
Sponsored by:	HEIF5
2015-04-28 20:33:31 +00:00
Andrew Turner
1381f830a5 Return NULL on failure from nexus_alloc_resource as it reutrns a pointer. 2015-04-27 15:16:51 +00:00
Zbigniew Bodek
a364e1cf26 Fix wrong cast of pointer to u_int in db_interface.c on ARM64
Fix to commit introduced in: r282078

Pointed out by: andrew
Obtained from:  Semihalf
Sponsored by:   The FreeBSD Foundation
2015-04-27 14:18:07 +00:00
Zbigniew Bodek
988b7f6045 Introduce ddb(4) support for ARM64
Obtained from: Semihalf
Reviewed by:   emaste
Sponsored by:  The FreeBSD Foundation
2015-04-27 09:12:54 +00:00
Andrew Turner
6c2d9cea22 Add the null implementation of stack_save and stack_save_td.
Sponsored by:	The FreeBSD Foundation
2015-04-22 12:24:38 +00:00
Andrew Turner
6dd719a463 Remove the calls to panic from pmap_object_init_pt and pmap_clear_modify.
Sponsored by:	The FreeBSD Foundation
2015-04-22 09:52:51 +00:00
Andrew Turner
9d77aa2a87 Use the address of fsu_intr_fault, not the first two instructions in it as
the address to check if we are handling a trap for fuswintr or suswintr.

Sponsored by:	The FreeBSD Foundation
2015-04-17 12:58:09 +00:00
Ed Maste
8b25059d94 Set MACHINE_ARCH to aarch64 for arm64
Reviewed by:	imp
Sponsored by:	The FreeBSD Foundation
2015-04-16 19:23:08 +00:00
Andrew Turner
731b28fb31 Enter a critical section when storing the vfp registers, we don't want to
be preempted here as this will enter back into this function, but the
hardware could be in an inconsistant state, and the vfp unit will be off
when switced back to this function.

Sponsored by:	The FreeBSD Foundation
2015-04-15 14:30:07 +00:00
Andrew Turner
2db317ca85 Ensure the userland thread and floating-point state has been saved before
copying the pcb. These values may have been changed just before the call
to fork and without a call to cpu_switch, where they would have been saved.

Sponsored by:	The FreeBSD Foundation
2015-04-15 14:18:25 +00:00
Andrew Turner
0cafabf97f Add support for arm64 to loader.efi and boot1.efi
Reviewed by:	emaste
Sponsored by:	The FreeBSD Foundation
2015-04-14 13:55:01 +00:00
Andrew Turner
7d9cff3d23 Add psci for arm64. This is currently used when rebooting and powering off
in qemu.

Sponsored by:	The FreeBSD Foundation
2015-04-13 16:41:33 +00:00
Andrew Turner
e5acd89c78 Bring in the start of the arm64 kernel.
This is only the minimum set of files needed to boot in qemu. As such it is
missing a few things.

The bus_dma code is currently only stub functions with a full implementation
from the development tree to follow.

The gic driver has been copied as the interrupt framework is different. It
is expected the two drivers will be merged by the arm intrng project,
however this will need to be imported into the tree and support for arm64
would need to be added.

This includes code developed by myself, SemiHalf, Ed Maste, and Robin
Randhawa from ARM. This has been funded by the FreeBSD Foundation, with
early development by myself in my spare time with assistance from Robin.

Differential Revision:	https://reviews.freebsd.org/D2199
Reviewed by:	emaste, imp
Relnotes:	yes
Sponsored by:	The FreeBSD Foundation
2015-04-13 14:43:10 +00:00
Andrew Turner
8c9db319f6 We will have fueword on arm64, mark as such in machine/param.h.
Sponsored by:	The FreeBSD Foundation
2015-04-07 13:17:28 +00:00
Andrew Turner
46f52b028f Split out the _acq and _rel functions. These were the same, but there is
no need for them to be this strong, we only need to provide one or the
other.

While here replace atomic_load_acq_* and atomic_store_rel_* with a single
instruction version, and fix the definition of atomic_clear_* to point to
the correct functions.

Sponsored by:	The FreeBSD Foundation
2015-04-06 16:27:22 +00:00
Andrew Turner
23f518054b Add space for future expansion [1]. While here clean up a little, spsr is
only 32-bits, and mark the holes in the struct with a pad member.

Suggested by:	kib [1]
Sponsored by:	The FreeBSD Foundation
2015-04-03 10:56:42 +00:00
Andrew Turner
147b9d0418 Add more arm64 machine dependent headers. With this we now have the minimum
set of machine headers needed to build the userland toolchain.

Differential Revision:	https://reviews.freebsd.org/D2148
Reviewed by:	imp
Sponsored by:	The FreeBSD Foundation
2015-03-26 21:10:42 +00:00
Ed Maste
f72c920c5f Renumber clauses to avoid missing 3 2015-03-23 16:04:04 +00:00
Andrew Turner
412042e2ae Add the start of the arm64 machine headers. This is the subset needed to
start getting userland libraries building.

Reviewed by:	imp
Sponsored by:	The FreeBSD Foundation
2015-03-23 11:54:56 +00:00