Commit Graph

127231 Commits

Author SHA1 Message Date
riastradh
445478ce67 MD rnd.h cleanups. Please let me know if I broke anything! 2015-04-13 21:18:40 +00:00
christos
6252065cbb sync with new acpica struct shuffling. 2015-04-13 18:32:50 +00:00
christos
33592402d1 update for new acpica 2015-04-13 17:23:39 +00:00
christos
cb2bd8f0cd resolve conflicts. 2015-04-13 17:23:15 +00:00
christos
679c17fd50 ----------------------------------------
10 April 2015. Summary of changes for version 20150410:

Reverted a change introduced in version 20150408 that caused
a regression in the disassembler where incorrect operator
symbols could be emitted.

----------------------------------------
08 April 2015. Summary of changes for version 20150408:


1) ACPICA kernel-resident subsystem:

Permanently set the return value for the _REV predefined name. It now
returns 2 (was 5). This matches other ACPI implementations. _REV will be
deprecated in the future, and is now defined to be 1 for ACPI 1.0, and 2
for ACPI 2.0 and later. It should never be used to differentiate or
identify operating systems.

Added the "Windows 2015" string to the _OSI support. ACPICA will now
return TRUE to a query with this string.

Fixed several issues with the local version of the printf function.

Added the C99 compiler option (-std=c99) to the Unix makefiles.

  Current Release:
    Non-Debug Version:  99.9K Code, 27.4K Data, 127.3K Total
    Debug Version:     195.2K Code, 80.7K Data, 275.9K Total
  Previous Release:
    Non-Debug Version:  98.8K Code, 27.3K Data, 126.1K Total
    Debug Version:     192.1K Code, 79.8K Data, 271.9K Total


2) iASL Compiler/Disassembler and Tools:

iASL: Implemented an enhancement to the constant folding feature to
transform the parse tree to a simple Store operation whenever possible:
    Add (2, 3, X) ==> is converted to: Store (5, X)
    X = 2 + 3     ==> is converted to: Store (5, X)

Updated support for the SLIC table (Software Licensing Description Table)
in both the Data Table compiler and the disassembler. The SLIC table
support now conforms to "Microsoft Software Licensing Tables (SLIC and
MSDM). November 29, 2011. Copyright 2011 Microsoft". Note: Any SLIC data
following the ACPI header is now defined to be "Proprietary Data", and as
such, can only be entered or displayed as a hex data block.

Implemented full support for the MSDM table as described in the document
above. Note: The format of MSDM is similar to SLIC. Any MSDM data
following the ACPI header is defined to be "Proprietary Data", and can
only be entered or displayed as a hex data block.

Implemented the -Pn option for the iASL Table Compiler (was only
implemented for the ASL compiler). This option disables the iASL
preprocessor.

Disassembler: For disassembly of Data Tables, added a comment field
around the Ascii equivalent data that is emitted as part of the "Raw
Table Data" block. This prevents the iASL Preprocessor from possible
confusion if/when the table is compiled.

Disassembler: Added an option (-df) to force the disassembler to assume
that the table being disassembled contains valid AML. This feature is
useful for disassembling AML files that contain ACPI signatures other
than DSDT or SSDT (such as OEMx or other signatures).

Changes for the EFI version of the tools:
1) Fixed a build error/issue
2) Fixed a cast warning

iASL: Fixed a path issue with the __FILE__ operator by making the
directory prefix optional within the internal SplitInputFilename
function.

Debugger: Removed some unused global variables.

Tests: Updated the makefile for proper generation of the AAPITS suite.

----------------------------------------
04 February 2015. Summary of changes for version 20150204:

ACPICA kernel-resident subsystem:

Updated all ACPICA copyrights and signons to 2014. Added the 2014
copyright to all module headers and signons, including the standard Linux
header. This affects virtually every file in the ACPICA core subsystem,
iASL compiler, all ACPICA utilities, and the test suites.

Events: Introduce ACPI_GPE_DISPATCH_RAW_HANDLER to fix GPE storm issues.
A raw gpe handling mechanism was created to allow better handling of GPE
storms that aren't easily managed by the normal handler. The raw handler
allows disabling/renabling of the the GPE so that interrupt storms can be
avoided in cases where events cannot be timely serviced. In this
scenario, handlers should use the AcpiSetGpe() API to disable/enable the
GPE. This API will leave the reference counts undisturbed, thereby
preventing unintentional clearing of the GPE when the intent in only to
temporarily disable it. Raw handlers allow enabling and disabling of a
GPE by removing GPE register locking. As such, raw handlers much provide
their own locks while using GPE API's to protect access to GPE data
structures.
Lv Zheng

Events: Always modify GPE registers under the GPE lock.
Applies GPE lock around AcpiFinishGpe() to protect access to GPE register
values. Reported as bug by joe.liu@apple.com.

Unix makefiles: Separate option to disable optimizations and
_FORTIFY_SOURCE. This change removes the _FORTIFY_SOURCE flag from the
NOOPT disable option and creates a separate flag (NOFORTIFY) for this
purpose. Some toolchains may define _FORTIFY_SOURCE which leads redefined
errors when building ACPICA. This allows disabling the option without
also having to disable optimazations.
David Box

  Current Release:
    Non-Debug Version: 101.7K Code, 27.9K Data, 129.6K Total
    Debug Version:     199.2K Code, 82.4K Data, 281.6K Total

----------------------------------------
07 November 2014. Summary of changes for version 20141107:

This release is available at https://acpica.org/downloads

This release introduces and implements language extensions to ASL that
provide support for symbolic ("C-style") operators and expressions. These
language extensions are known collectively as ASL+.


1) iASL Compiler/Disassembler and Tools:

Disassembler: Fixed a problem with disassembly of the UartSerialBus
macro. Changed "StopBitsNone" to the correct "StopBitsZero". David E.
Box.

Disassembler: Fixed the Unicode macro support to add escape sequences.
All non-printable ASCII values are emitted as escape sequences, as well
as the standard escapes for quote and backslash. Ensures that the
disassembled macro can be correctly recompiled.

iASL: Added Printf/Fprintf macros for formatted output. These macros are
translated to existing AML Concatenate and Store operations. Printf
writes to the ASL Debug object. Fprintf allows the specification of an
ASL name as the target. Only a single format specifier is required, %o,
since the AML interpreter dynamically converts objects to the required
type. David E. Box.

    (old)    Store (Concatenate (Concatenate (Concatenate (Concatenate
                 (Concatenate (Concatenate (Concatenate ("", Arg0),
                 ": Unexpected value for "), Arg1), ", "), Arg2),
                 " at line "), Arg3), Debug)

    (new)    Printf ("%o: Unexpected value for %o, %o at line %o",
                 Arg0, Arg1, Arg2, Arg3)

    (old)    Store (Concatenate (Concatenate (Concatenate (Concatenate
                 ("", Arg1), ": "), Arg0), " Successful"), STR1)

    (new)    Fprintf (STR1, "%o: %o Successful", Arg1, Arg0)

iASL: Added debug options (-bp, -bt) to dynamically prune levels of the
ASL parse tree before the AML code is generated. This allows blocks of
ASL code to be removed in order to help locate and identify problem
devices and/or code. David E. Box.

AcpiExec: Added support (-fi) for an optional namespace object
initialization file. This file specifies initial values for namespace
objects as necessary for debugging and testing different ASL code paths
that may be taken as a result of BIOS options.


2) Overview of symbolic operator support for ASL (ASL+)
-------------------------------------------------------

As an extension to the ASL language, iASL implements support for symbolic
(C-style) operators for math and logical expressions. This can greatly
simplify ASL code as well as improve both readability and
maintainability. These language extensions can exist concurrently with
all legacy ASL code and expressions.

The symbolic extensions are 100% compatible with existing AML
interpreters, since no new AML opcodes are created. To implement the
extensions, the iASL compiler transforms the symbolic expressions into
the legacy ASL/AML equivalents at compile time.

Full symbolic expressions are supported, along with the standard C
precedence and associativity rules.

Full disassembler support for the symbolic expressions is provided, and
creates an automatic migration path for existing ASL code to ASL+ code
via the disassembly process. By default, the disassembler now emits ASL+
code with symbolic expressions. An option (-dl) is provided to force the
disassembler to emit legacy ASL code if desired.

Below is the complete list of the currently supported symbolic operators
with examples. See the iASL User Guide for additional information.


ASL+ Syntax      Legacy ASL Equivalent
-----------      ---------------------

    // Math operators

Z = X + Y        Add (X, Y, Z)
Z = X - Y        Subtract (X, Y, Z)
Z = X * Y        Multiply (X, Y, Z)
Z = X / Y        Divide (X, Y, , Z)
Z = X % Y        Mod (X, Y, Z)
Z = X << Y       ShiftLeft (X, Y, Z)
Z = X >> Y       ShiftRight (X, Y, Z)
Z = X & Y        And (X, Y, Z)
Z = X | Y        Or (X, Y, Z)
Z = X ^ Y        Xor (X, Y, Z)
Z = ~X           Not (X, Z)
X++              Increment (X)
X--              Decrement (X)

    // Logical operators

(X == Y)         LEqual (X, Y)
(X != Y)         LNotEqual (X, Y)
(X < Y)          LLess (X, Y)
(X > Y)          LGreater (X, Y)
(X <= Y)         LLessEqual (X, Y)
(X >= Y)         LGreaterEqual (X, Y)
(X && Y)         LAnd (X, Y)
(X || Y)         LOr (X, Y)
(!X)             LNot (X)

    // Assignment and compound assignment operations

X = Y           Store (Y, X)
X += Y          Add (X, Y, X)
X -= Y          Subtract (X, Y, X)
X *= Y          Multiply (X, Y, X)
X /= Y          Divide (X, Y, , X)
X %= Y          Mod (X, Y, X)
X <<= Y         ShiftLeft (X, Y, X)
X >>= Y         ShiftRight (X, Y, X)
X &= Y          And (X, Y, X)
X |= Y          Or (X, Y, X)
X ^= Y          Xor (X, Y, X)


3) ASL+ Examples:
-----------------

Legacy ASL:
        If (LOr (LOr (LEqual (And (R510, 0x03FB), 0x02E0), LEqual (
            And (R520, 0x03FB), 0x02E0)), LOr (LEqual (And (R530,
0x03FB),
            0x02E0), LEqual (And (R540, 0x03FB), 0x02E0))))
        {
            And (MEMB, 0xFFFFFFF0, SRMB)
            Store (MEMB, Local2)
            Store (PDBM, Local1)
            And (PDBM, 0xFFFFFFFFFFFFFFF9, PDBM)
            Store (SRMB, MEMB)
            Or (PDBM, 0x02, PDBM)
        }

ASL+ version:
        If (((R510 & 0x03FB) == 0x02E0) ||
            ((R520 & 0x03FB) == 0x02E0) ||
            ((R530 & 0x03FB) == 0x02E0) ||
            ((R540 & 0x03FB) == 0x02E0))
        {
            SRMB = (MEMB & 0xFFFFFFF0)
            Local2 = MEMB
            Local1 = PDBM
            PDBM &= 0xFFFFFFFFFFFFFFF9
            MEMB = SRMB
            PDBM |= 0x02
        }

Legacy ASL:
        Store (0x1234, Local1)
        Multiply (Add (Add (Local1, TEST), 0x20), Local2, Local3)
        Multiply (Local2, Add (Add (Local1, TEST), 0x20), Local3)
        Add (Local1, Add (TEST, Multiply (0x20, Local2)), Local3)
        Store (Index (PKG1, 0x03), Local6)
        Store (Add (Local3, Local2), Debug)
        Add (Local1, 0x0F, Local2)
        Add (Local1, Multiply (Local2, Local3), Local2)
        Multiply (Add (Add (Local1, TEST), 0x20), ToBCD (Local1), Local3)

ASL+ version:
        Local1 = 0x1234
        Local3 = (((Local1 + TEST) + 0x20) * Local2)
        Local3 = (Local2 * ((Local1 + TEST) + 0x20))
        Local3 = (Local1 + (TEST + (0x20 * Local2)))
        Local6 = Index (PKG1, 0x03)
        Debug = (Local3 + Local2)
        Local2 = (Local1 + 0x0F)
        Local2 = (Local1 + (Local2 * Local3))
        Local3 = (((Local1 + TEST) + 0x20) * ToBCD (Local1))
2015-04-13 17:21:01 +00:00
riastradh
361a56e33b Omit needless <sys/rnd.h>. 2015-04-13 16:51:40 +00:00
riastradh
67d6ba47fb Convert remaining MI <sys/rnd.h> stragglers. Many MD ones left. 2015-04-13 16:46:33 +00:00
riastradh
d466a2e7ea <sys/rnd.h> -> <sys/rndsource.h> in kern_todr.c. 2015-04-13 16:36:54 +00:00
riastradh
480305b5e5 <sys/rnd.h> not needed for kern_pax.c. 2015-04-13 16:36:12 +00:00
riastradh
6c3a21ccc3 <sys/rnd.h> not needed for pf_norm.c. 2015-04-13 16:35:33 +00:00
riastradh
6a85c2eb85 Missed a spot: <sys/rndsource.h> for if_cdcereg.h. 2015-04-13 16:34:43 +00:00
riastradh
233f556c2e Convert sys/dev to use <sys/rndsource.h>. 2015-04-13 16:33:23 +00:00
riastradh
d7efbbaf54 Need <sys/rndsource.h>, not <sys/cprng.h>, for rnd source stuff. 2015-04-13 16:21:54 +00:00
matt
4453391620 Add pmap locking to pmap_kenter_pa/kremove 2015-04-13 16:19:42 +00:00
riastradh
4151ea6652 Convert arch/x86 to use <sys/rnd*.h>. Omit needless includes. 2015-04-13 16:03:51 +00:00
riastradh
0eab02b47b <sys/rndsource.h> needs <sys/rndio.h> for RND_TYPE_*, RND_FLAG_*. 2015-04-13 16:02:48 +00:00
riastradh
66174a5fdf Omit needless include of <sys/fcntl.h> from <sys/cprng.h>. 2015-04-13 15:51:30 +00:00
riastradh
556fc62b15 cprng_strong(kern_cprng, ...) never blocks, pass 0 for flags.
FASYNC was wrong anyway!  It's FNONBLOCK.
2015-04-13 15:51:00 +00:00
riastradh
4ab6da1678 Remove bogus #include <sys/rnd.h> from <sys/cprng.h>. 2015-04-13 15:44:03 +00:00
riastradh
1e1b01fbf8 Add header guards and necessary includes. 2015-04-13 15:43:43 +00:00
riastradh
0e2b6ca9f6 Split <sys/rnd.h> into several header files.
It is silly that changing it causes ~the whole kernel to rebuild.
New header files:

- <sys/rndio.h> (user/kernel) for the ioctl interface.
- <sys/rndsource.h> (kernel-only) for the entropy source API.
- <sys/rndpool.h> (kernel-only) for the entropy pool algorithm.

(We already had <sys/rndsink.h> for the asynchronous reseed API.)

For now, <sys/rnd.h> includes all of these, until all users are
converted to include what they actually need.
2015-04-13 15:39:19 +00:00
riastradh
cff1e35637 Little rnd.h cleanup.
- Make rnd_printing static in kern_rndq.c.
- Merge some #ifdef _KERNEL blocks.
- Fix comments about RND_DEV_(U)RANDOM.
- Move rnd_ready to rnd_private.h.
2015-04-13 15:23:00 +00:00
riastradh
6f03865532 Gather rnd-private declarations into <dev/rnd_private.h>.
Let's try to avoid putting externs in .c files where the compiler
can't check them.
2015-04-13 15:13:50 +00:00
riastradh
45acba1c8a If we're going to use the queue macros, use them as intended. 2015-04-13 14:56:22 +00:00
riastradh
2a2eccb11d Move rndpool_(maybe_)extract to rndq, rename to rnd_(try)extract.
Make rnd_extract_data static.
2015-04-13 14:41:06 +00:00
riastradh
9a5673d211 Omit needless define. 2015-04-13 14:30:05 +00:00
jmcneill
ccbb57972b Use a bit per IPI type in local mailbox 0 registers. Ok matt@ 2015-04-12 23:25:57 +00:00
riastradh
adada8d6d4 Strip IO_JOURNALLOCKED, PGO_JOURNALLOCKED out of ulfs_readwrite.c.
These are vestigial from ufs_readwrite.c with wapbl -- lfs does not
have a journal but only the explicit wapbl calls, not these flags,
got ripped out in the transition to ulfs_readwrite.c.
2015-04-12 22:51:23 +00:00
riastradh
edcd087bc1 Same putpages->kassert in ulfs_readwrite.c 2015-04-12 22:49:55 +00:00
riastradh
0e4f519ef4 Omit now-unused variable. rump build didn't catch this... 2015-04-12 22:48:38 +00:00
riastradh
3124f8f989 Don't putpages in ufs buffercached writes: kassert there are none. 2015-04-12 22:41:28 +00:00
riastradh
e2706ecca9 Don't break when hardclock_ticks wraps around.
Since we now only count time spent in wait, rather than determining
the end time and checking whether we've passed it, timeouts might be
marginally longer in effect.  Unlikely to be an issue.
2015-04-12 20:55:02 +00:00
bouyer
29693e7151 flushing the framebuffer from interrupt has several problems:
- As pointed out by Jared McNeill, this doesn't work for cold
  or ddb. Some specific handing for these cases would be needed,
  but there's no easy way to know if we're in ddb or not.
- periodic bus_dmamap_sync() of the whole framebuffer isn't cheap (about
  3% CPU constant on the beaglebone back).

instead map the framebuffer BUS_DMA_PREFETCHABLE (undocumented flag, but
is MI and properly handled by arm). This allows write-combining,
which, in addition with a shadow framebuffer for rasops(9) gives
a good performance boost too (difference with the cached+sync from intr
isn't noticeable on a boot sequence).
For X11, the framebuffer was already mapped BUS_DMA_PREFETCHABLE.
A few tests shows that mapping it fully cached doesn't make a noticeable
difference either (with or without xorg's shadow framebuffer).
2015-04-12 20:00:42 +00:00
skrll
3d5eb3e43c RPI2 MP support.
Thanks to Matt Thomas for making this possible with his changes to pic.c
2015-04-12 17:32:39 +00:00
matt
ae5ac4a736 Don't adjust interval if we are too far into the next tick. 2015-04-12 17:08:25 +00:00
matt
d791b18161 Don't send IPIs to ourselves if sending to everyone. 2015-04-12 15:32:19 +00:00
jmcneill
eec2712ffd replace NFS_BOOT_BOOTP with NFS_BOOT_DHCP 2015-04-12 14:55:30 +00:00
joerg
26849cc0f9 ISCSI_DEBUG needs a value, so make it a param. 2015-04-12 14:48:32 +00:00
skrll
61497d42a7 Fix UVMHIST build. 2015-04-12 14:44:06 +00:00
joerg
7946130d68 UVM_RESERVED_PAGES_PER_CPU must be a param, not a flag. 2015-04-12 12:44:13 +00:00
matt
6cc84266d4 Don't need pic_ipi_sender anymore. 2015-04-12 08:55:14 +00:00
matt
7f93edc947 Use right kcpuset call. 2015-04-12 08:52:54 +00:00
joerg
634a4e4c66 Always use polling mode for now, hummingbird doesn't work otherwise. 2015-04-11 20:05:44 +00:00
matt
319babb719 Adapt pic to deal with the BCM2836 interrupts.
Move pic_pending_pics, pic_pending_ipls, and pic_blocked_irqs into a
structure and make then per-cpu.  There is no global interrupt state anymore.
2015-04-11 19:39:09 +00:00
joerg
3350a13f64 Allow changing the per-cpu emergency page reservation via kernel config. 2015-04-11 19:24:13 +00:00
matt
f4897efe88 Add a pic_cpus to the softc which specifies which cpus the pic can send
IPIs to.  For GIC, initialize pic_cpus to kcpuset_running since it can handle
all the cpus.
2015-04-11 16:47:47 +00:00
skrll
0802cfce6f Tweak cpu start up slightly and print TTBR for cortex_mmuinfo when
VERBOSE_INIT_ARM
2015-04-11 15:29:58 +00:00
skrll
54e226a9c0 Trailing whitespace 2015-04-11 15:24:25 +00:00
skrll
0b03f807f3 Allow sleeping in the idle lwp if the cpu isn't running yet.
OK'ed by rmind a while ago.
2015-04-11 15:23:56 +00:00
skrll
dd7ebe7d65 #include "opt_arm_debug.h" for VERBOSE_INIT_ARM 2015-04-11 15:21:33 +00:00