26 Mar, 2015

2 commits

  • One more documentation file are also being added:

    A section by section review of the ACPI spec (acpi_object_usage.txt)
    to note recommendations and prohibitions on the use of the numerous
    ACPI tables and objects. This sets out the current expectations of
    the firmware by Linux very explicitly (or as explicitly as I can, for
    now).

    CC: Suravee Suthikulpanit
    CC: Yi Li
    CC: Mark Langsdorf
    CC: Ashwin Chaugule
    Acked-by: Robert Richter
    Signed-off-by: Al Stone
    Signed-off-by: Hanjun Guo
    Signed-off-by: Will Deacon

    Al Stone
     
  • Add documentation for the guidelines of how to use ACPI
    on ARM64.

    Reviewed-by: Suravee Suthikulpanit
    Reviewed-by: Yi Li
    Reviewed-by: Mark Langsdorf
    Reviewed-by: Ashwin Chaugule
    Acked-by: Robert Richter
    Signed-off-by: Graeme Gregory
    Signed-off-by: Al Stone
    Signed-off-by: Hanjun Guo
    Signed-off-by: Will Deacon

    Graeme Gregory
     

24 Jan, 2015

1 commit

  • Emulate deprecated 'setend' instruction for AArch32 bit tasks.

    setend [le/be] - Sets the endianness of EL0

    On systems with CPUs which support mixed endian at EL0, the hardware
    support for the instruction can be enabled by setting the SCTLR_EL1.SED
    bit. Like the other emulated instructions it is controlled by an entry in
    /proc/sys/abi/. For more information see :
    Documentation/arm64/legacy_instructions.txt

    The instruction is emulated by setting/clearing the SPSR_EL1.E bit, which
    will be reflected in the PSTATE.E in AArch32 context.

    This patch also restores the native endianness for the execution of signal
    handlers, since the process could have changed the endianness.

    Note: All CPUs on the system must have mixed endian support at EL0. Once the
    handler is registered, hotplugging a CPU which doesn't support mixed endian,
    could lead to unexpected results/behavior in applications.

    Signed-off-by: Suzuki K. Poulose
    Cc: Will Deacon
    Cc: Punit Agrawal
    Signed-off-by: Catalin Marinas

    Suzuki K. Poulose
     

21 Nov, 2014

3 commits

  • The CP15 barrier instructions (CP15ISB, CP15DSB and CP15DMB) are
    deprecated in the ARMv7 architecture, superseded by ISB, DSB and DMB
    instructions respectively. Some implementations may provide the
    ability to disable the CP15 barriers by disabling the CP15BEN bit in
    SCTLR_EL1. If not enabled, the encodings for these instructions become
    undefined.

    To support legacy software using these instructions, this patch
    register hooks to -
    * emulate CP15 barriers and warn the user about their use
    * toggle CP15BEN in SCTLR_EL1

    Signed-off-by: Punit Agrawal
    Reviewed-by: Catalin Marinas
    Signed-off-by: Will Deacon

    Punit Agrawal
     
  • The SWP instruction was deprecated in the ARMv6 architecture. The
    ARMv7 multiprocessing extensions mandate that SWP/SWPB instructions
    are treated as undefined from reset, with the ability to enable them
    through the System Control Register SW bit. With ARMv8, the option to
    enable these instructions through System Control Register was dropped
    as well.

    To support legacy applications using these instructions, port the
    emulation of the SWP and SWPB instructions from the arm port to arm64.

    Reviewed-by: Catalin Marinas
    Signed-off-by: Punit Agrawal
    Signed-off-by: Will Deacon

    Punit Agrawal
     
  • Typically, providing support for legacy instructions requires
    emulating the behaviour of instructions whose encodings have become
    undefined. If the instructions haven't been removed from the
    architecture, there maybe an option in the implementation to turn
    on/off the support for these instructions.

    Create common infrastructure to support legacy instruction
    emulation. In addition to emulation, also provide an option to support
    hardware execution when supported. The default execution mode (one of
    undef, emulate, hw exeuction) is dependent on the state of the
    instruction (deprecated or obsolete) in the architecture and
    can specified at the time of registering the instruction handlers. The
    runtime state of the emulation can be controlled by writing to
    individual nodes in sysctl. The expected default behaviour is
    documented as part of this patch.

    Reviewed-by: Catalin Marinas
    Signed-off-by: Punit Agrawal
    Signed-off-by: Will Deacon

    Punit Agrawal
     

21 Oct, 2014

1 commit


05 Aug, 2014

1 commit


23 Jul, 2014

3 commits

  • This patch allows support for 3 levels of page tables with 64KB page
    configuration allowing 48-bit VA space. The pgd is no longer a full
    PAGE_SIZE (PTRS_PER_PGD is 64) and (swapper|idmap)_pg_dir are not fully
    populated (pgd_alloc falls back to kzalloc).

    Signed-off-by: Catalin Marinas
    Tested-by: Jungseok Lee

    Catalin Marinas
     
  • Rather than guessing what the maximum vmmemap space should be, this
    patch allows the calculation based on the VA_BITS and sizeof(struct
    page). The vmalloc space extends to the beginning of the vmemmap space.

    Since the virtual kernel memory layout now depends on the build
    configuration, this patch removes the detailed description in
    Documentation/arm64/memory.txt in favour of information printed during
    kernel booting.

    Signed-off-by: Catalin Marinas
    Tested-by: Jungseok Lee

    Catalin Marinas
     
  • This patch adds memory layout and translation lookup information
    about 48-bit address space with 4K pages. The description is based
    on 4 levels of translation tables.

    Signed-off-by: Jungseok Lee
    Reviewed-by: Sungjinn Chung
    Acked-by: Kukjin Kim
    Acked-by: Christoffer Dall
    Signed-off-by: Catalin Marinas
    Tested-by: Jungseok Lee

    Jungseok Lee
     

11 Jul, 2014

1 commit


10 Jul, 2014

1 commit

  • Currently the kernel Image is stripped of everything past the initial
    stack, and at runtime the memory is initialised and used by the kernel.
    This makes the effective minimum memory footprint of the kernel larger
    than the size of the loaded binary, though bootloaders have no mechanism
    to identify how large this minimum memory footprint is. This makes it
    difficult to choose safe locations to place both the kernel and other
    binaries required at boot (DTB, initrd, etc), such that the kernel won't
    clobber said binaries or other reserved memory during initialisation.

    Additionally when big endian support was added the image load offset was
    overlooked, and is currently of an arbitrary endianness, which makes it
    difficult for bootloaders to make use of it. It seems that bootloaders
    aren't respecting the image load offset at present anyway, and are
    assuming that offset 0x80000 will always be correct.

    This patch adds an effective image size to the kernel header which
    describes the amount of memory from the start of the kernel Image binary
    which the kernel expects to use before detecting memory and handling any
    memory reservations. This can be used by bootloaders to choose suitable
    locations to load the kernel and/or other binaries such that the kernel
    will not clobber any memory unexpectedly. As before, memory reservations
    are required to prevent the kernel from clobbering these locations
    later.

    Both the image load offset and the effective image size are forced to be
    little-endian regardless of the native endianness of the kernel to
    enable bootloaders to load a kernel of arbitrary endianness. Bootloaders
    which wish to make use of the load offset can inspect the effective
    image size field for a non-zero value to determine if the offset is of a
    known endianness. To enable software to determine the endinanness of the
    kernel as may be required for certain use-cases, a new flags field (also
    little-endian) is added to the kernel header to export this information.

    The documentation is updated to clarify these details. To discourage
    future assumptions regarding the value of text_offset, the value at this
    point in time is removed from the main flow of the documentation (though
    kept as a compatibility note). Some minor formatting issues in the
    documentation are also corrected.

    Signed-off-by: Mark Rutland
    Acked-by: Tom Rini
    Cc: Geoff Levand
    Cc: Kevin Hilman
    Acked-by: Will Deacon
    Signed-off-by: Catalin Marinas

    Mark Rutland
     

01 May, 2014

1 commit


09 Apr, 2014

1 commit

  • Pull second set of arm64 updates from Catalin Marinas:
    "A second pull request for this merging window, mainly with fixes and
    docs clarification:

    - Documentation clarification on CPU topology and booting
    requirements
    - Additional cache flushing during boot (needed in the presence of
    external caches or under virtualisation)
    - DMA range invalidation fix for non cache line aligned buffers
    - Build failure fix with !COMPAT
    - Kconfig update for STRICT_DEVMEM"

    * tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
    arm64: Fix DMA range invalidation for cache line unaligned buffers
    arm64: Add missing Kconfig for CONFIG_STRICT_DEVMEM
    arm64: fix !CONFIG_COMPAT build failures
    Revert "arm64: virt: ensure visibility of __boot_cpu_mode"
    arm64: Relax the kernel cache requirements for boot
    arm64: Update the TCR_EL1 translation granule definitions for 16K pages
    ARM: topology: Make it clear that all CPUs need to be described

    Linus Torvalds
     

08 Apr, 2014

1 commit

  • Add support for early IO or memory mappings which are needed before the
    normal ioremap() is usable. This also adds fixmap support for permanent
    fixed mappings such as that used by the earlyprintk device register
    region.

    Signed-off-by: Mark Salter
    Acked-by: Catalin Marinas
    Cc: Borislav Petkov
    Cc: Dave Young
    Cc: H. Peter Anvin
    Cc: Will Deacon
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mark Salter
     

05 Apr, 2014

1 commit

  • With system caches for the host OS or architected caches for guest OS we
    cannot easily guarantee that there are no dirty or stale cache lines for
    the areas of memory written by the kernel during boot with the MMU off
    (therefore non-cacheable accesses).

    This patch adds the necessary cache maintenance during boot and relaxes
    the booting requirements.

    Signed-off-by: Catalin Marinas

    Catalin Marinas
     

26 Feb, 2014

1 commit


06 Nov, 2013

1 commit

  • This patch expands the VA_BITS to 42 when the 64K page configuration is
    enabled allowing 2TB kernel linear mapping. Linux still uses 2 levels of
    page tables in this configuration with pgd now being a full page.

    Signed-off-by: Catalin Marinas
    Acked-by: Will Deacon
    Acked-by: Marc Zyngier

    Catalin Marinas
     

24 Oct, 2013

2 commits

  • There are a few points in the arm64 booting document which are unclear
    (such as the initial state of secondary CPUs), and/or have not been
    documented (PSCI is a supported mechanism for booting secondary CPUs).

    This patch amends the arm64 boot document to better express the
    (existing) requirements, and to describe PSCI as a supported booting
    mechanism.

    Signed-off-by: Mark Rutland
    Reviewed-by: Will Deacon
    Cc: Catalin Marinas
    Cc: Dave Martin
    Cc: Marc Zyngier
    Cc: Fu Wei
    Signed-off-by: Catalin Marinas

    Mark Rutland
     
  • Signed-off-by: Catalin Marinas

    Catalin Marinas
     

20 Sep, 2013

1 commit

  • Commit d50240a5f6ce ("arm64: mm: permit use of tagged pointers at EL0")
    added support for tagged pointers in userspace, but the corresponding
    update to Documentation/ contained some imprecise statements.

    This patch fixes up some minor ambiguities in the text, hopefully making
    it more clear about exactly what the kernel expects from user virtual
    addresses.

    Signed-off-by: Will Deacon
    Signed-off-by: Catalin Marinas

    Will Deacon
     

06 Sep, 2013

1 commit


03 Sep, 2013

1 commit

  • TCR.TBI0 can be used to cause hardware address translation to ignore the
    top byte of userspace virtual addresses. Whilst not especially useful in
    standard C programs, this can be used by JITs to `tag' pointers with
    various pieces of metadata.

    This patch enables this bit for AArch64 Linux, and adds a new file to
    Documentation/arm64/ which describes some potential caveats when using
    tagged virtual addresses.

    Signed-off-by: Will Deacon
    Signed-off-by: Catalin Marinas

    Will Deacon
     

22 Aug, 2013

1 commit

  • Expand the arm64 image header to allow for co-existance with
    PE/COFF header required by the EFI stub. The PE/COFF format
    requires the "MZ" header to be at offset 0, and the offset
    to the PE/COFF header to be at offset 0x3c. The image
    header is expanded to allow 2 instructions at the beginning
    to accommodate a benign intruction at offset 0 that includes
    the "MZ" header, a magic number, and the offset to the PE/COFF
    header.

    Signed-off-by: Roy Franz
    Signed-off-by: Catalin Marinas

    Roy Franz
     

12 Jun, 2013

1 commit


23 Jan, 2013

1 commit

  • This patch adds support for "earlyprintk=" parameter on the kernel
    command line. The format is:

    earlyprintk=[,][,]

    where is the name of the (UART) device, e.g. "pl011", is
    the I/O address. The aren't currently used.

    The mapping of the earlyprintk device is done very early during kernel
    boot and there are restrictions on which functions it can call. A
    special early_io_map() function is added which creates the mapping from
    the pre-defined EARLY_IOBASE to the device I/O address passed via the
    kernel parameter. The pgd entry corresponding to EARLY_IOBASE is
    pre-populated in head.S during kernel boot.

    Only PL011 is currently supported and it is assumed that the interface
    is already initialised by the boot loader before the kernel is started.

    Signed-off-by: Catalin Marinas
    Acked-by: Arnd Bergmann

    Catalin Marinas
     

30 Nov, 2012

1 commit


23 Oct, 2012

1 commit


17 Sep, 2012

2 commits

  • The virtual memory layout is described in
    Documentation/arm64/memory.txt. This patch adds the MMU definitions for
    the 4KB and 64KB translation table configurations. The SECTION_SIZE is
    2MB with 4KB page and 512MB with 64KB page configuration.

    PHYS_OFFSET is calculated at run-time and stored in a variable (no
    run-time code patching at this stage).

    On the current implementation, both user and kernel address spaces are
    512G (39-bit) each with a maximum of 256G for the RAM linear mapping.
    Linux uses 3 levels of translation tables with the 4K page configuration
    and 2 levels with the 64K configuration. Extending the memory space
    beyond 39-bit with the 4K pages or 42-bit with 64K pages requires an
    additional level of translation tables.

    The SPARSEMEM configuration is global to all AArch64 platforms and
    allows for 1GB sections with SPARSEMEM_VMEMMAP enabled by default.

    Signed-off-by: Will Deacon
    Signed-off-by: Catalin Marinas
    Acked-by: Tony Lindgren
    Acked-by: Nicolas Pitre
    Acked-by: Olof Johansson
    Acked-by: Santosh Shilimkar
    Acked-by: Arnd Bergmann

    Catalin Marinas
     
  • The patch adds the kernel booting and the initial setup code.
    Documentation/arm64/booting.txt describes the booting protocol on the
    AArch64 Linux kernel. This is subject to change following the work on
    boot standardisation, ACPI.

    Signed-off-by: Will Deacon
    Signed-off-by: Catalin Marinas
    Acked-by: Nicolas Pitre
    Acked-by: Tony Lindgren
    Acked-by: Olof Johansson
    Acked-by: Santosh Shilimkar
    Acked-by: Arnd Bergmann

    Catalin Marinas