296265 |
01-Mar-2016 |
andrew |
Make the memory size returned from fdt_get_mem_regions a 64-bit type. This is the physical memory size so may be larger than a u_long can hold, e.g. on ARM with LPAE we could see an address space of up to 40 bits. On ARM u_long is only 32 bits so the memory size will be truncated, possibly to zero.
Reported by: bz Sponsored by: ABT Systems Ltd
|
296189 |
29-Feb-2016 |
wma |
Fix fdt_get_mem_regions() to work with 64-bit addresses
Use u_long instead of uint32_t variables to avoid overflow in case of PA space bigger than 32-bit.
Obtained from: Semihalf Submitted by: Michal Stanek <mst@semihalf.com> Sponsored by: Annapurna Labs Approved by: cognet (mentor) Reviewed by: andrew, br, wma Differential revision: https://reviews.freebsd.org/D5393
|
295832 |
20-Feb-2016 |
jhibbits |
Introduce a RMAN_IS_DEFAULT_RANGE() macro, and use it.
This simplifies checking for default resource range for bus_alloc_resource(), and improves readability.
This is part of, and related to, the migration of rman_res_t from u_long to uintmax_t.
Discussed with: jhb Suggested by: marcel
|
294883 |
27-Jan-2016 |
jhibbits |
Convert rman to use rman_res_t instead of u_long
Summary: Migrate to using the semi-opaque type rman_res_t to specify rman resources. For now, this is still compatible with u_long.
This is step one in migrating rman to use uintmax_t for resources instead of u_long.
Going forward, this could feasibly be used to specify architecture-specific definitions of resource ranges, rather than baking a specific integer type into the API.
This change has been broken out to facilitate MFC'ing drivers back to 10 without breaking ABI.
Reviewed By: jhb Sponsored by: Alex Perez/Inertial Computing Differential Revision: https://reviews.freebsd.org/D5075
|
293045 |
02-Jan-2016 |
ian |
Make the 'env' directive described in config(5) work on all architectures, providing compiled-in static environment data that is used instead of any data passed in from a boot loader.
Previously 'env' worked only on i386 and arm xscale systems, because it required the MD startup code to examine the global envmode variable and decide whether to use static_env or an environment obtained from the boot loader, and set the global kern_envp accordingly. Most startup code wasn't doing so. Making things even more complex, some mips startup code uses an alternate scheme that involves calling init_static_kenv() to pass an empty buffer and its size, then uses a series of kern_setenv() calls to populate that buffer.
Now all MD startup code calls init_static_kenv(), and that routine provides a single point where envmode is checked and the decision is made whether to use the compiled-in static_kenv or the values provided by the MD code.
The routine also continues to serve its original purpose for mips; if a non-zero buffer size is passed the routine installs the empty buffer ready to accept kern_setenv() values. Now if the size is zero, the provided buffer full of existing env data is installed. A NULL pointer can be passed if the boot loader provides no env data; this allows the static env to be installed if envmode is set to do so.
Most of the work here is a near-mechanical change to call the init function instead of directly setting kern_envp. A notable exception is in xen/pv.c; that code was originally installing a buffer full of preformatted env data along with its non-zero size (like mips code does), which would have allowed kern_setenv() calls to wipe out the preformatted data. Now it passes a zero for the size so that the buffer of data it installs is treated as non-writeable.
|
287000 |
21-Aug-2015 |
royger |
preload_search_info: make sure mod is set
Add a check to preload_search_info to make sure mod is set. Most of the callers of preload_search_info don't check that the mod parameter is set, which can cause page faults. While at it, remove some now unnecessary checks before calling preload_search_info.
Sponsored by: Citrix Systems R&D Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D3440
|
276479 |
31-Dec-2014 |
dim |
Upgrade our copy of clang, llvm and lldb to 3.5.0 release.
Please note that this version now requires C++11 support to build; see UPDATING for more information.
Release notes for llvm and clang can be found here: <http://llvm.org/releases/3.5.0/docs/ReleaseNotes.html> <http://llvm.org/releases/3.5.0/tools/clang/docs/ReleaseNotes.html>
Thanks to Ed Maste, Roman Divacky, Andrew Turner, Justin Hibbits and Antoine Brodin for their invaluable help with this import.
Approved by: portmgr (antoine) MFC after: 1 month
|
274823 |
21-Nov-2014 |
brooks |
Merge from CheriBSD:
commit 6d3c4c09226ad6bdd662e3e52489ef294a6ce298 Add terasic_mtl vt(4) framebuffer driver
terasic_mtl can be built with syscons(4) and vt(4) attachments, selected at compile time.
commit 33240259b47a7c990a5a88a19f133a5600432a4c Clear terasic_mtl text buffer on attach
commit d188c2d2412953f949624aa35cd07082830943c9 Update terasic vt(4) driver for FreeBSD r269783
commit d1cc54eee852fa4fc9d359d5bb2171d24ec73369 Safety belt to ensure vt(4) fb parameters are correct
commit 76e6d468ef45711d7952786095fc4791289ebb4b Improve terasic_mtl_vt fdt parsing
- Use OF_getencprop to avoid need for explicit endian handling (submitted by ray@freebsd.org) - Check for expected length and correct pointer type
commit 3e2524b8995ab66e8a9295e4c87cbc7126eeddf4 Correct device_printf usage
commit 9e53e3c8e0766414e25662c95b09cc51c92443b0 Switch framebuffer to match host endianness
Xorg and xf86-video-scfb work much better with a native-endian framebuffer.
commit 0f49259d596321ed85288ac0e1fb4ee1c966df48 Switch DE4 to vt(4) and enable kbdmux
commit 5bc96ebc89db7d134ad478335090c8477c1677c7 Add missing \n in device_printf calls
Submitted by: emaste Sponsored by: DARPA, AFRL
|
264897 |
24-Apr-2014 |
brooks |
Merge from CheriBSD:
commit 003649d9622ce252a2794ae5891ee7e7c209caca Author: Robert N. M. Watson <robert.watson@cl.cam.ac.uk> Date: Wed Feb 5 18:32:09 2014 +0000
Teach the FreeBSD/beri boot to "auto-detect" whether argument 4 (a3) is a memory size of pointer to a struct bootinfo * by looking at its value and seeing whether it is pointer-like. If a pointer, assume it's a bootinfo and extract memsize from it instead; otherwise, use it as memsize directly. This allows kernels to support bootinfo being passed by loader (and boot2) while still supporting older Miniboot setups.
commit f7045af9a1e92b6bd92541fe5d25abf66d824e8f Author: Robert N. M. Watson <robert.watson@cl.cam.ac.uk> Date: Thu Feb 6 13:45:34 2014 +0000
When the module metadata pointer is available from loader, use it in the kernel.
commit 52e0e1ff2cba9dfcfab9e1d0a31fb7fdf7317450 Author: Robert N. M. Watson <robert.watson@cl.cam.ac.uk> Date: Thu Feb 6 19:57:48 2014 +0000
In the BERI kernel boot code, extract 'boothowto' (which includes boot flags such as '-s') and 'envp' from passed module data. Booting to single-user mode using boot flags now works.
Sponsored by: DARPA, AFRL
|
264601 |
17-Apr-2014 |
bz |
Add the initial version of if_nf10bmac(4), a driver to support an NetFPGA-10G Embedded CPU Ethernet Core.
The current version operates on a simple PIO based interface connected to a NetFPGA-10G port.
To avoid confusion: this driver operates on a CPU running on the FPGA, e.g. BERI/mips, and is not suited for the PCI host interface.
MFC after: 1 week Relnotes: yes Sponsored by: DARPA/AFRL
|
261513 |
05-Feb-2014 |
nwhitehorn |
Move Open Firmware device root on PowerPC, ARM, and MIPS systems to a sub-node of nexus (ofwbus) rather than direct attach under nexus. This fixes FDT on x86 and will make coexistence with ACPI on ARM systems easier. SPARC is unchanged.
Reviewed by: imp, ian
|
261410 |
02-Feb-2014 |
ian |
Follow r261352 by updating all drivers which are children of simplebus to check the status property in their probe routines.
Simplebus used to only instantiate its children whose status="okay" but that was improper behavior, fixed in r261352. Now that it doesn't check anymore and probes all its children; the children all have to do the check because really only the children know how to properly interpret their status property strings.
Right now all existing drivers only understand "okay" versus something- that's-not-okay, so they all use the new ofw_bus_status_okay() helper.
|
261352 |
01-Feb-2014 |
nwhitehorn |
Provide a simpler and more standards-compliant simplebus implementation to get the Routerboard 800 up and running with the vendor device tree. This does not implement some BERI-specific features (which hopefully won't be necessary soon), so move the old code to mips/beri, with a higher attach priority when built, until MIPS interrupt domain support is rearranged.
|
256911 |
22-Oct-2013 |
brooks |
MFP4: 223121 (PIC portion), 225861, 227822, 229692 (PIC only), 229693, 230523, 1123614
Implement a driver for Robert Norton's PIC as an FDT interrupt controller. Devices whose interrupt-parent property points to a beripic device will have their interrupt allocation, activation , and setup operations routed through the IC rather than down the traditional bus hierarchy.
This driver largely abstracts the underlying CPU away allowing the PIC to be implemented on CPU's other than BERI. Due to insufficient abstractions a small amount of MIPS specific code is currently required in fdt_mips.c and to implement counters.
MFC after: 3 days Sponsored by: DARPA/AFRL
|
256752 |
18-Oct-2013 |
brooks |
MFP4: 221483, 221567, 221568, 221670, 221677, 221678, 221800, 221801, 221804, 221805, 222004, 222006, 222055, 222820, 1135077, 1135118, 1136259
Add atse(4), a driver for the Altera Triple Speed Ethernet MegaCore.
The current driver support gigabit Ethernet speeds only and works with the MegaCore only in the internal FIFO configuration in the soon to be open sourced BERI CPU configuration.
Submitted by: bz MFC after: 3 days Sponsored by: DARPA/AFRL
|
245373 |
13-Jan-2013 |
rwatson |
Partially merge Perforce changeset 219938 to head:
Write FDT attachment for the Terasic MTL (multitouch LCD) driver. Exploit the fact that FDT allows multiple memory ranges to be assigned to a device, giving us a cleaner description than device.hints does.
Portions of this changeset that remove mtl from BERI device.hints and add to DTS will be merged separately.
Sponsored by: DARPA, AFRL
|
245330 |
12-Jan-2013 |
rwatson |
Merge Perforce change @219948 to head:
Add code so that the BERI boot process can ask the kernel linker for DTB blobs that may have been left for it by the boot loader, as done on PowerPC and ARM. This will require both a more mature boot loader, and more mature boot loader argument passing mechanism, than currently supported on BERI.
Sponsored by: DARPA, AFRL
|
239709 |
26-Aug-2012 |
rwatson |
Add terasic_de4led, a led(4) driver for the on-board 8-element LED on the Terasic DE-4 board. Allow LED configuration to be set using loader tunables, not just from userspace, and preconfigure LED 8 as a kernel heartbeat. For now, this is a Nexus-attached, BERI-only driver, but it could be used with other hard and soft cores on Altera FPGAs as well, in principle.
Sponsored by: DARPA, AFRL
|
239691 |
25-Aug-2012 |
rwatson |
Add terasic_mtl(4), a device driver for the Terasic Multi-Touch LCD, used with Terasic's DE-4 and other similar FPGA boards. This display is 800x480 and includes a capacitive touch screen, multi-touch gesture recognition, etc. This device driver depends on a Cambridge- provided IP core that allows the MTL device to be hooked up to the Altera Avalon SoC bus, and also provides a VGA-like text frame buffer.
Although it is compiled as a single device driver, it actually implements a number of different device nodes exporting various aspects of this multi-function device to userspace:
- Simple memory-mapped driver for the MTL 24-bit pixel frame buffer. - Simple memory-mapped driver for the MTL control register set. - Simple memory-mapped driver for the MTL text frame buffer. - syscons attachment for the MTL text frame buffer.
This driver attaches directly to Nexus as is common for SoC device drivers, and for the time being is considered BERI-specific, although in principle it might be used with other hard and soft cores on Altera FPGAs.
Control registers, including touchscreen input, are simply memory mapped; in the future it would be desirable to hook up a more conventional device node that can stream events, support kqueue(2)/ poll(2)/select(2), etc.
This is the first use of syscons on MIPS, as far as I can tell, and there are some loose ends, such as an inability to use the hardware cursor. More fundamentally, it appears that syscons(4) assumes that either a host is PC-like (i386, amd64) *or* it must be using a graphical frame buffer. While the MTL supports a graphical frame buffer, using the text frame buffer is preferable for console use. Fixing this issue in syscons(4) requires non-trivial changes, as the text frame buffer support assumes that direct memory access can be done to the text frame buffer without using bus accessor methods, which is not the case on MIPS. As a workaround for this, we instead double-buffer and pretend to be a graphical frame buffer exposing text accessor methods, leading to some quirks in syscons behaviour.
Sponsored by: DARPA, AFRL
|
239676 |
25-Aug-2012 |
rwatson |
Add altera_jtag_uart(4), a device driver for Altera's JTAG UART soft core, which presents a UART-like interface over the Avalon bus that can be addressed over JTAG. This IP core proves extremely useful, allowing us to connect trivially to the FreeBSD console over JTAG for FPGA-embedded hard and soft cores. As interrupts are optionally configured for this soft core, we support both interrupt-driven and polled modes of operation, which must be selected using device.hints. UART instances appear in /dev as ttyu0, ttyu1, etc.
However, it also contains a number of quirks, which make it difficult to tell when JTAG is connected, and some buffering issues. We work around these as best we can, using various heuristics.
While the majority of this device driver is not only not BERI-specific, but also not MIPS-specific, for now add its defines in the BERI files list, as the console-level parts are aware of where the first JTAG UART is mapped on Avalon, and contain MIPS-specific address translation, to use before Newbus and device.hints are available.
Sponsored by: DARPA, AFRL
|
239671 |
25-Aug-2012 |
rwatson |
Add preliminary support for the SRI International / University of Cambridge Bluespec Extensible RISC Implementation (BERI) processor. BERI is a 64-bit MIPS ISA soft CPU core that can be synthesised to Altera and Xilinx FPGAs, and is being used for CPU and OS research at several institutions.
Sponsored by: DARPA, AFRL
|