marcel [Tue, 4 Mar 2014 03:19:36 +0000 (03:19 +0000)]
When reading physical memory, make sure to access it using the right
memory attributes. The same applies to the mmap(2) interface. Not
doing so results in machine checks.
We find the memory attributes in the EFI memory map, as queried by
mem_phys2virt().
marcel [Tue, 4 Mar 2014 02:19:39 +0000 (02:19 +0000)]
Replace use of ${.CURDIR} by ${LIBC_SRCTOP} and define ${LIBC_SRCTOP}
if not already defined. This allows building libc from outside of
lib/libc using a reach-over makefile.
A typical use-case is to build a standard ILP32 version and a COMPAT32
version in a single iteration by building the COMPAT32 version using a
reach-over makefile.
delphij [Mon, 3 Mar 2014 23:26:48 +0000 (23:26 +0000)]
Document the fact that OpenSSH default configuration requires Capsicum
capability mode support in kernel, which have been worked around later
but it's still recommended to have it enabled.
ganbold [Mon, 3 Mar 2014 11:32:55 +0000 (11:32 +0000)]
Add EMAC 10/100 Ethernet controller driver for A10/A20.
It is available mostly in A10 devices like Hackberry, Marsboard,
Mele A1000, A2000, A100 HTPC, cubieboard1 and A20 device
like cubieboard2.
TX performance can be improved using both channels 0 and 1.
RX performance is poor and needs improvement with the assistance of
external DMA controller in case there is bulk TCP receiver.
ganbold [Mon, 3 Mar 2014 11:24:47 +0000 (11:24 +0000)]
Add Static Random Access Memory controller driver for A10/A20.
A10/A20's SRAM is used by devices, such as CPU, EMAC,
for extra fast memory or as cache.
gjb [Sun, 2 Mar 2014 23:51:03 +0000 (23:51 +0000)]
Explicitly request review/regression testing on the
release/release.sh script, as it is heavily used on
a regular basis, not just during a release cycle.
jilles [Sun, 2 Mar 2014 22:59:34 +0000 (22:59 +0000)]
sh: Simplify expari().
Redo expari() like evalvar(). This makes the logic more understandable and
avoids possible problems if arithmetic expansion occurs if CTLESC characters
are not generated (looking backwards for CTLARI is not generally possible in
that case but the old code tried anyway).
ian [Sun, 2 Mar 2014 21:25:32 +0000 (21:25 +0000)]
Add __attribute__((used)) so that the delay implementation doesn't get
optimized away as unreferenced, causing linker errors when trying to
resolve the weak reference to the missing function.
rwatson [Sun, 2 Mar 2014 13:26:08 +0000 (13:26 +0000)]
When querying a process's umask via sysctl in libprocstat(), don't
print a warning if EPERM is returned as this is an expected failure
mode rather than error -- similar to current handling of ESRCH.
This makes the output of 'procstat -as' vastly more palatable.
ache [Sun, 2 Mar 2014 13:12:06 +0000 (13:12 +0000)]
Add fetch and patch to .PHONY and .NOTMAIN only if PORTNAME is defined.
Unconditional addition cause real fetch(1) and patch(1) programs are
builded every time.
adrian [Sun, 2 Mar 2014 07:10:43 +0000 (07:10 +0000)]
Set all of the ports into the same vlangroup; there's only one vlangroup
(pvid=1) and we already configure them to send to other ports.
Setting pvid=portnum would mean that there were separate vlangroups
for each ports, but 'leaking' into other ports. The result? All port
traffic flooded to all other port traffic.
adrian [Sun, 2 Mar 2014 05:48:56 +0000 (05:48 +0000)]
Add ATU flush support.
The OpenWRT AR8xxx switch support flushes the ATU (address translation
unit) after each port link 'up' status change. I've modified this to
just flush on any port transition.
Whilst here, bump the number of ports on the AR8327 to 6, rather than
the default of 5. It's DB120 specific; I'll go and make this configurable
later.
There's some debugging code in here still; I am still debugging whether
this is or isn't working fully.
delphij [Sun, 2 Mar 2014 02:41:33 +0000 (02:41 +0000)]
All callers of static method load_nvlist() in spa.c handles error case,
so there is no reason to assert that we won't hit an error. Instead,
just return that error to caller and have the upper layer handle it.
markj [Sat, 1 Mar 2014 23:09:07 +0000 (23:09 +0000)]
When our linker merges .SUNW_dof sections from multiple files, it simply
concatenates the DOF tables into one section. Previously, the USDT init
code in drti.o would only look at the first table in the DOF section; with
this change, it iterates over all the tables, passing each DOF table to
the kernel.
ian [Sat, 1 Mar 2014 19:25:23 +0000 (19:25 +0000)]
If we can't find the u-boot api signature, exit with an error status that
includes "badab1"; u-boot displays the status in hex, so this may help
give some clue about why ubldr isn't working (more than -1 does anyway).
ian [Sat, 1 Mar 2014 19:02:00 +0000 (19:02 +0000)]
Prevent fdt data loaded from a file from overwriting the kernel environment,
by having uboot_autoload() do the fdt setup (which may load a file) rather
than waiting until we're actually in the process of launching the kernel.
As part of making this happen...
- Define LOADER_FDT_SUPPORT on the uboot/lib compile command line when
MK_FDT is set.
- Make fdt_setup_fdtb() public.
- Declare public fdt_whatever() functions in a header instead of using
scattered extern decls in .c files.
adrian [Sat, 1 Mar 2014 10:04:31 +0000 (10:04 +0000)]
(I think!) make the AR8327 switch correctly handle traffic.
This patch does four things:
* it globally disables mirroring;
* it globally sets the mirroring on each port to be disabled;
* the initial port setup now programs a portmask for the port to allow
transmission (forwarding) to all other ports bar itself;
* the vlan setup path now programs the portmask for the port to
allow transmission (forwarding) to all other ports bar itself.
Before this, I hard-coded the portmask to 0x3f which would mean all
ports (bar port 6, which currently isn't hooked up to anything.)
This means that traffic would be duplicated back out the port it
received it. I bet this wasn't .. optimal.
In any case, this _seems_ to make DHCP from my macosx laptop
work through this access point. I'll do some further testing
to ensure it's actually working correctly on all my devices.
eadler [Sat, 1 Mar 2014 03:36:46 +0000 (03:36 +0000)]
ssh-copy-id: add restorecon call
In certain situations when creating an authorized_key file on a Linux machine
restorecon(1) may need to be called. Therefore, attempt to run it if it exists.
MFC After: 1 week
Idea from: https://bugzilla.redhat.com/show_bug.cgi?id=739989
neel [Sat, 1 Mar 2014 03:17:58 +0000 (03:17 +0000)]
Fix a race between VMRUN() and vcpu_notify_event() due to 'vcpu->hostcpu'
being updated outside of the vcpu_lock(). The race is benign and could
potentially result in a missed notification about a pending interrupt to
a vcpu. The interrupt would not be lost but rather delayed until the next
VM exit.
The vcpu's hostcpu is now updated concurrently with the vcpu state change.
When the vcpu transitions to the RUNNING state the hostcpu is set to 'curcpu'.
It is set to 'NOCPU' in all other cases.
To help avoid confusion: when attempting to send a key file check to see if a
file of the same name exists with a '.pub' suffix and send that instead. This
mimics the behavior of other ssh-copy-id scripts.
adrian [Sat, 1 Mar 2014 02:57:22 +0000 (02:57 +0000)]
Add the bluetooth information structs to the firmware RX statistics message.
It turns out that there's a variant format of the RX statisitcs notification
from the intel firmware. It's even more whacked - the non-BT variant has
bluetooth fields; apparently some later NICs return even _more_ bluetooth
related fields.
I'll commit the statistics structure changes here - it's a no-op for the
driver. I'll later teach the driver code to populate a statistics structure
from the received message after reformatting things correctly.
I don't _think_ it's going to fix anything related to sensitivity programming
as the CCK/OFDM (non-11n) fields are in the same place for both formats.
But the HT structure and the general statistics aren't in the same place.
I'll go find some NIC(s) that spit out the other format and when I find one,
I'll go and update the driver to handle things correctly.
Tested:
* Intel 5100 (which returns the legacy, non-BT format)
jhb [Fri, 28 Feb 2014 19:07:55 +0000 (19:07 +0000)]
Workaround an apparent bug in VMWare Fusion's nested VT support where it
triggers a VM exit with the exit reason of an external interrupt but
without a valid interrupt set in the exit interrupt information.
imp [Fri, 28 Feb 2014 18:29:09 +0000 (18:29 +0000)]
Integrate device-tree upstream files into the build process:
(1) Invoke cpp to bring in files via #include (although the old
/include/ stuff is supported still).
(2) bring in files from either vendor tree or freebsd-custom files
when building.
(3) move all dts* files from sys/boot/fdt/dts to
sys/boot/fdt/dts/${MACHINE} as appropriate.
(4) encode all the magic to do the build in sys/tools/fdt/make_dtb.sh
so that the different places in the tree use the exact same logic.
(5) switch back to gpl dtc by default. the bsdl one in the tree has
significant issues not easily addressed by those unfamiliar with
the code.
dim [Fri, 28 Feb 2014 18:06:00 +0000 (18:06 +0000)]
Merge the projects/clang-sparc64 branch back to head. This brings in
several updates from the llvm and clang trunks to make the sparc64
backend fully functional.
Apart from one patch to sys/sparc64/include/pcpu.h which is still under
discussion, this makes it possible to let clang fully build world and
kernel for sparc64.
Any assistance with testing this on actual sparc64 hardware is greatly
appreciated, as there will unavoidably be bugs left.
Many thanks go to Roman Divacky for his upstream work on getting the
sparc64 backend into shape.
dim [Fri, 28 Feb 2014 17:12:31 +0000 (17:12 +0000)]
Pull in r196874 from upstream llvm trunk:
Fix a crash that occurs when PWD is invalid.
MCJIT needs to be able to run in hostile environments, even when PWD
is invalid. There's no need to crash MCJIT in this case.
The obvious fix is to simply leave MCContext's CompilationDir empty
when PWD can't be determined. This way, MCJIT clients,
and other clients that link with LLVM don't need a valid working directory.
If we do want to guarantee valid CompilationDir, that should be done
only for clients of getCompilationDir(). This is as simple as checking
for an empty string.
The only current use of getCompilationDir is EmitGenDwarfInfo, which
won't conceivably run with an invalid working dir. However, in the
purely hypothetically and untestable case that this happens, the
AT_comp_dir will be omitted from the compilation_unit DIE.
This should help fix assertions occurring with ports-mgmt/tinderbox,
when it is using jails, and sometimes invalidates clang's current
working directory.
imp [Fri, 28 Feb 2014 02:38:04 +0000 (02:38 +0000)]
Add fdt binding for nand for Atmel parts. This does little more than
match the device. Pinctrl will need to be added before this will work,
in addition to migrating the current board_foo.c method of configuring
these pins to something else. Non-FDT systems won't be affected, yet.
ian [Fri, 28 Feb 2014 00:41:55 +0000 (00:41 +0000)]
Add an armv7 implementation of cpu_sleep(). The arm11/armv6 implementation
we've been using was actually just spinning due to ARM having redefined
the old 'wait for interrupt' operation via the system coprocessor as a nop
and replacing it with a WFI instruction.
ian [Fri, 28 Feb 2014 00:26:57 +0000 (00:26 +0000)]
Add some rudimentary voltage control to go with the rudimentary frequency
control. If we have to scale back the frequency due to temperature, it
will help to lower the voltage as well.
ian [Fri, 28 Feb 2014 00:23:04 +0000 (00:23 +0000)]
Supply a DELAY() implementation via weak linkage, so that SoC-specific
code can supply a better implementation. A SoC with variable CPU frequency
is likely to use a fixed-frequency timer for DELAY() (but still use the
mpcore private timers as eventtimers).
Also remove spaces from the eventtimer and timecounter names.
dim [Thu, 27 Feb 2014 23:17:00 +0000 (23:17 +0000)]
Pull in r202422 from upstream llvm trunk (by Roman Divacky):
Lower FNEG just like FABS to fneg[ds] and fmov[ds], thus avoiding
expensive libcall. Also, Qp_neg is not implemented on at least
FreeBSD. This is also what gcc is doing.