1. 13 Dec, 2016 1 commit
    • dp-arm's avatar
      stdlib: Fix signedness issue in memcmp() · afc03aeb
      dp-arm authored
      
      
      There is no guarantee on the signedness of char.  It can be either
      signed or unsigned.  On ARM it is unsigned and hence this memcmp()
      implementation works as intended.
      
      On other machines, char can be signed (x86 for example).  In that case
      (and assuming a 2's complement implementation), interpreting a
      bit-pattern of 0xFF as signed char can yield -1.  If *s1 is 0 and *s2
      is 255 then the difference *s1 - *s2 should be negative.  The C
      integer promotion rules guarantee that the unsigned chars will be
      converted to int before the operation takes place.  The current
      implementation will return a positive value (0 - (-1)) instead, which
      is wrong.
      
      Fix it by changing the signedness to unsigned to avoid surprises for
      anyone using this code on non-ARM systems.
      
      Change-Id: Ie222fcaa7c0c4272d7a521a6f2f51995fd5130cc
      Signed-off-by: default avatardp-arm <dimitris.papastamos@arm.com>
      afc03aeb
  2. 30 Jan, 2014 1 commit
    • Jon Medhurst's avatar
      Fix memmove and memcpy · c3810c83
      Jon Medhurst authored
      
      
      memmove needs to allow for overlapping memory regions and, together
      with memcpy, should return the input destination pointer, not the
      address after the end of the copied data.
      
      fixes ARM-software/tf-issues#18
      Signed-off-by: default avatarJon Medhurst <tixy@linaro.org>
      c3810c83
  3. 17 Jan, 2014 1 commit
  4. 20 Dec, 2013 1 commit
    • Harry Liebel's avatar
      Create local C library implementation (1/2) · c81b1d0f
      Harry Liebel authored
      - This change is split into two separate patches in order to
        simplify the history as interpreted by 'git'. The split is
        between the move/rename and addition of new files.
      - Remove dependency on toolchain C library headers and functions in
        order to ensure behavioural compatibility between toolchains.
      - Use FreeBSD as reference for C library implementation.
      - Do not let GCC use default library include paths.
      - Remove unused definitions in modified headers and implementations.
      - Move C library files to 'lib/stdlib' and 'include/stdlib'.
      - Break std.c functions out into separate files.
      
      Change-Id: I91cddfb3229775f770ad781589670c57d347a154
      c81b1d0f
  5. 05 Dec, 2013 1 commit
    • Dan Handley's avatar
      Enable third party contributions · ab2d31ed
      Dan Handley authored
      - Add instructions for contributing to ARM Trusted Firmware.
      
      - Update copyright text in all files to acknowledge contributors.
      
      Change-Id: I9311aac81b00c6c167d2f8c889aea403b84450e5
      ab2d31ed
  6. 25 Oct, 2013 1 commit