1. 09 Mar, 2017 4 commits
    • Michael Zoran's avatar
      staging: vchiq_arm: Disable ability to dump memory by default · 12ab1659
      Michael Zoran authored
      vc04_services has an ioctl interface to dump arbitrary memory
      to a custom debug log.  This is typically only needed by
      diagnostic tools, and can potentially be a security issue
      if the devtmpfs node doesn't have adequate permissions set.
      
      Since the ability to dump memory still has debugging value,
      create a new build configuration and disable the feature
      by default.
      Signed-off-by: default avatarMichael Zoran <mzoran@crowfest.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      12ab1659
    • Michael Zoran's avatar
      staging: vchiq_arm: Add compatibility wrappers for ioctls · 5569a126
      Michael Zoran authored
      This patch adds compatibility wrappers for the ioctls
      exposed by vchiq/vc04_services.  The compat ioctls are
      completely implemented on top of the native ioctls.  No
      existing lines are modified.
      
      While the ideal approach would be to cleanup the existing
      code, this path is simplier and easier to review. While
      it does have a small runtime performance penality vs
      seperating the existing code into wrapper+worker functions,
      the penality is small since only the metadata is copied
      back onto the 32 bit user mode stack.
      
      The on top of approach is the approach used by several
      existing performance critical subsystems of Linux such
      as the DRM 3D graphics subsystem.
      
      Testing:
      
      1. A 32 bit chroot was created on a RPI 3 and vchiq_test
      was built for armhf.  The usual tests were run such as
      vchiq_test -f 10 and vchiq_test -p.
      
      2. This patch was copied onto the shipping version of
      the Linux kernel used for the RPI and that kernel was
      built for arm64. That kernel was used to boot Raspbian.
      Many of the builtin features are now functional such
      as the "hello_pi" examples, and minecraft_pi.
      Signed-off-by: default avatarMichael Zoran <mzoran@crowfest.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      5569a126
    • Michael Zoran's avatar
      staging: bcm2835_camera: Use a mapping table for context field of mmal_msg_header · 4e6bafdf
      Michael Zoran authored
      The camera driver passes messages back and forth between the firmware with
      requests and replies.  One of the fields of the message header called
      context is a pointer so the size changes between 32 bit and 64 bit.
      
      The context field is used to pair reply messages from the firmware with
      request messages from the kernel.  The simple solution would be
      to use the padding field for the upper 32 bits of pointers, but this
      would rely on the firmware always copying the pad field.
      
      So instead handles are generated that are 32 bit numbers and a mapping
      stored in a btree as implemented by the btree library in the kernel lib
      directory.  The mapping pairs the handle with the pointer to the actual
      data. The btree library was chosen since it's very easy to use and
      red black trees would be overkill.
      
      The camera driver also now forces in the btree library if the camera is
      included in the build.  The btree library is a hidden configuration
      option.
      Signed-off-by: default avatarMichael Zoran <mzoran@crowfest.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      4e6bafdf
    • Michael Zoran's avatar
      staging: bcm2835_camera: Convert control_service field of mmal_msg_header to u32 · 81b2cbdb
      Michael Zoran authored
      The camera driver passes messages back and forth between the firmware with
      requests and replies.  One of the fields of the message header called
      control_service is a pointer so the size changes between 32 bit and 64 bit.
      
      Luckly, the field is not interperated by the driver, so it can be changed
      to a u32 which has a fixed size.
      Signed-off-by: default avatarMichael Zoran <mzoran@crowfest.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      81b2cbdb
  2. 08 Mar, 2017 7 commits
  3. 07 Mar, 2017 20 commits
  4. 06 Mar, 2017 9 commits