1. 14 2月, 2016 12 次提交
  2. 12 2月, 2016 3 次提交
  3. 10 2月, 2016 7 次提交
    • H
      Revert "common/memsize.c: Simplify RAM size detection" · cc8d698f
      Hans de Goede 提交于
      This commit breaks bootup on sunxi boards, the get stuck
      when running the main u-boot binary at:
      
      CPU:   Allwinner H3 (SUN8I)
      I2C:   ready
      DRAM:
      
      This reverts commit 8e7cba04.
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      cc8d698f
    • S
      test/py: capture the entire U-Boot version at boot · c82ce04a
      Stephen Warren 提交于
      The existing regex simply ensures that the captured version string doesn't
      go past the end of a line. We really want to grab as much as possible. Do
      this by explicitly including a ) character at the end of the regex to
      match the last character of the version test.
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      c82ce04a
    • S
      test/py: fix off-by-one error in spawn matching code · d8926811
      Stephen Warren 提交于
      A regex match object's .end() value is already the index after the match,
      not the index of the last character in the match, so there's no need to
      add 1 to point past the match.
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      d8926811
    • S
      test/py: HTML awesome! · 83357fd5
      Stephen Warren 提交于
      Implement three improvements to the HTML log file:
      - Ability to expand/contract sections. All passing sections are contracted
        at file load time so the user can concentrate on issues requiring
        action.
      - The overall status report is copied to the top of the log for easy
        access.
      - Add links from the status report to the test logs, for easy navigation.
      
      This all relies on Javascript and the jquery library. If the user doesn't
      have Javascript enabled, or jquery can't be downloaded, the log should
      look and behave identically to how it did before this patch.
      
      A few notes on the diff:
      
      - A few more 'with log.section("xxx")' were added, so that all stream
        blocks are kept within a section block for consistent HTML entity
        nesting structure. This changed indentation in a few places, making
        the diff look slightly larger.
      - HTML entity IDs are cleaned up. We assign simple incrementing integer
        IDs now, rather than using mangled test names which were possibly
        invalid.
      - Sections and streams now use common CSS class names (in addition to the
        current separate class names) to more easily share the new behaviour.
        This also reduces the CSS file size since rules don't need to be
        duplicated.
      - An "OK" status is logged after some external command executions so that
        make and flash steps are auto-contracted at log file load time, assuming
        they passed.
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      83357fd5
    • S
      test/py: exit(1) if there are problems running py.test · ac99831b
      Stephen Warren 提交于
      The test/py/test.py wrapper script catches exceptions thrown when
      exec()ing py.test in order to print a helpful error message. However,
      the exception handling code squashes the exception and so the script
      exits with a non-zero exit code, leading callers to believe that it
      passed. Fix this.
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      ac99831b
    • S
      itest: allow map_physmem to return 0 in limited cases · 986fe378
      Stephen Warren 提交于
      On some systems, RAM starts at address 0. If the user executes itest
      against address 0 on such a system, it will call map_physmem(0, ...)
      which will return 0 back; mapping only changes the address on sandbox.
      This causes itest to believe map_physmem() has failed, and hence fails
      the comparison.
      
      Fix itest so that it allows map_physmem() to return 0 /if/ the orignal
      address passed to it was also 0.
      
      This fixes "tegra-uboot-flasher flash" on Tegra20.
      
      This has the disadvantage that on sandbox, failed mapping attempts for
      address 0 are not detected. Instead, should the code only call
      map_physmem() on sandbox? Or, should map_physmem() return its error status
      some other way. Or, should the special case only be allowed on systems
      where the base of RAM is 0 somehow?
      
      Fixes: 7861204c ("itest: make memory access work under sandbox")
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      986fe378
    • S
      gunzip: remove avail_in recalculation · 19346657
      Stephen Warren 提交于
      Current, the following passes:
          ./u-boot -d arch/sandbox/dts/test.dtb -c 'ut_image_decomp'
      but the following fails:
          ./u-boot -d arch/sandbox/dts/test.dtb -c 'ut dm; ut_image_decomp'
      
      This is because the gunzip code reads input data beyond the end of its
      input buffer. In the first case above, this data just happens to be 0,
      which just happens to trigger gzip to signal the error the decompression
      unit test expects. In the second case above, the "ut dm" test has written
      data to the accidentally-read memory, which causes the gzip code to take a
      different path and so return a different value, which triggers the test
      failure.
      
      The cause of gunzip reading past its input buffer is the re-calculation of
      s.avail_in in zunzip(), since it can underflow. Not only is the formula
      non-sensical (it uses the delta between two output buffer pointers to
      calculate available input buffer size), it also appears to be unnecessary,
      since the gunzip code already maintains this value itself. This patch
      removes this re-calculation to avoid the underflow and redundant work.
      
      The loop exit condition is also adjusted so that if inflate() has consumed
      the entire input buffer, without indicating returning Z_STREAM_END (i.e.
      decompression complete without error), an error is raised. There is still
      opportunity to simplify the code here by splitting up the loop exit
      condition into separate tests. However, this patch makes the minimum
      modifications required to solve the problem at hand, in order to keep the
      Acked-by: NKees Cook <keescook@chromium.org>
      
      diff simple.
      
      I am not entirely convinced that the loop in zunzip() is necessary at all.
      It could only be useful if inflate() can return Z_BUF_ERROR (which
      typically means that it needs more data in the input buffer, or more space
      in the output buffer), even though Z_FINISH is set /and/ the full input is
      available in the input buffer /and/ there is enough space to store the
      decompressed output in the output buffer. The comment in zlib.h after the
      prototype of inflate() implies this is never the case. However, I assume
      there must have been some reason for introducing this loop in the first
      place, as part of commit "Fix gunzip to work for any gziped uImage size".
      
      This patch is similar to the earlier b75650d8 "gzip: correctly
      bounds-check output buffer", which corrected a similar issue for
      s.avail_out.
      
      Cc: Catalin Radu <Catalin@VirtualMetrix.com>
      Cc: Kees Cook <keescook@chromium.org>
      Fixes: f039ada5 ("Fix gunzip to work for any gziped uImage size")
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      19346657
  4. 08 2月, 2016 18 次提交