Skip to content
Snippets Groups Projects
  1. Dec 20, 2018
    • Doug Evans's avatar
      [devhost] Change default of driver.tracing.enable to 1 · 287356a3
      Doug Evans authored
      ZX-2468 #comment patch
      
      Tested: Turn on verbosity in trace_manager, then
      fx shell trace record trace --help
      and verify all devhosts are participating in the trace.
      Then boot with driver.tracing.enable=0, rerun, and verify devhosts are absent.
      
      Change-Id: I5cd56133f12331aa604e6a857ffb5fef4eb40c0e
      287356a3
    • Jocelyn Dang's avatar
      [dev][usb] Add usb_reset_device and XHCI changes. · d9cc3bda
      Jocelyn Dang authored
      After usb-hub does the port reset, XHCI sends TRB_CMD_RESET_DEVICE.
      We also need to address the device again.
      
      I extracted part of xhci_handle_enumerate_device into a new
      function xhci_setup_slot, as it is the same thing as xhci_reset_device
      has to do after the reset.
      
      This is so we can load new firmware on the USB ML device.
      
      ZX-3155 #comment
      
      TEST= plugged in USB ML device, ran usb-fwloader -d -f firmware and
      verified the device descriptor changed.
      
      Also tried resetting in the usb audio driver and running audio -d 1 tone
      
      Change-Id: Id3bd748c0d40838d98e233ad1f01589cb1042021
      d9cc3bda
    • Gianfranco Valentino's avatar
      [zxtest]: Lifecycle Observer. · dfa2a3fa
      Gianfranco Valentino authored
      Adds interface for listening to the test lifecycle.
      EventBroadcaster so we there is one entity in charge
      of propagating all events.
      
      Moved TestInfo and TestCase out of internal namespace.
      
      TEST=zxtest-test
      
      Change-Id: I4586571349cdfd5e523bde98e9eb6951a25c6dce
      dfa2a3fa
    • Jocelyn Dang's avatar
      [dev][usb-bus] Add out_actual to util functions. · 949a2f5a
      Jocelyn Dang authored
      TEST= lsusb and verify string descriptors show correctly.
      
      Change-Id: Ibe70381e858a8eba93d3985344e8be17b42cbef3
      949a2f5a
    • Gianfranco Valentino's avatar
      [zxtest]: Add TestCase. · 87bc4b6f
      Gianfranco Valentino authored
      Test registering, filtering and shuffling.
      
      TEST=boot/test/sys/zxtest-test
      
      Change-Id: Iafe0dc6d542eee3a43fbf5ed0ccb5479978614c4
      87bc4b6f
    • David Gilhooley's avatar
      [utest][hid-parser] Fully implement eve v2 touchpad test · c84fbeae
      David Gilhooley authored
      Test each of the report fields for the eve v2
      touchpad.
      
      ZX-3205
      
      TEST: runtests -a -t hidparse-test
      
      Change-Id: I33c49635fa6f7f5e85eb6535f0ca4804e84eafda
      c84fbeae
    • Suraj Malhotra's avatar
      [banjo] Remove *Proxy from being emitted. · 695a9168
      Suraj Malhotra authored
      All clients have been transitioned over.
      
      Tested: Compiles.
      Change-Id: I5ad90421ee6a75ba17a5bebb62b99c5d5e539f1e
      695a9168
    • Gianfranco Valentino's avatar
      [zxtest]: Add TestInfo. · 280318a3
      Gianfranco Valentino authored
      This class provides mechanism for instantiating registered tests.
      Test only validate minimal correctness.
      
      Tests are added into an array instead of being directly referenced in
      main.
      
      TEST=zxtest-tests
      
      Change-Id: I3c7eca40f720c3b8eb52e68037f005ee9e6f2331
      280318a3
    • David Gilhooley's avatar
      [utest][hid-parser] Add eve v2 touchpad data · 9219035c
      David Gilhooley authored
      Add eve v2 touchpad data and a simple test to
      ensure the parser works correctly
      
      ZX-3205
      
      TEST: runtests -a -t hidparse-test
      
      Change-Id: Ic9ad19a3711a9b9ed3623b0193218eeb8d0ae345
      9219035c
    • Mike Voydanoff's avatar
      [dev][mt8167] Clean up binding for mt8167 drivers · 0dde997c
      Mike Voydanoff authored
      SOC specific drivers should bind only against the VID and DID.
      PID should not be used unless the driver only works on a specific board.
      
      TEST: boot on eagle
      
      Change-Id: Ic2a8140c09e7e4d8bdd7ed9b419e2612a50c7781
      0dde997c
    • Mike Voydanoff's avatar
      [dev][mt-sdmmc] Fix problem with driver test breaking running on real hardware · aef0f8e5
      Mike Voydanoff authored
      TEST: lsblk shows eMMC partitions on eagle
      Change-Id: Idc492b50aa38978e09736eccc55877c4a076e04b
      aef0f8e5
    • John Grossman's avatar
      [kernel][locks] Add annontations for dump_thread* routines. · 931ecc4e
      John Grossman authored
      Add thread annotations for the following debug routines...
      ++ dump_thread
      ++ dump_all_threads
      ++ dump_thread_user_tid
      
      Specifically, for each of these routines, make sure there are three
      versions of the routine.  The base version (which demands that the
      thread lock not be held, and will automatically obtain the lock), a
      _locked version (which demands that the lock be held), and a
      _during_panic version (which obtains no locks by going directly to the
      _locked verion and skipping the compile time analysis)
      
      Also, clean up the users in debug.cpp and x86/faults.cpp to use the
      proper versions of each.
      
      Test: Build and k thread (list|list_full) on QEMU
      Change-Id: I88e3656e0ec64faf052a9efa32c1a20848456844
      931ecc4e
    • Jocelyn Dang's avatar
      [dev][usb-bus] Add missing set of out_device. · 90e27612
      Jocelyn Dang authored
      TEST= Plug in and remove USB device and checked lsusb.
      
      Change-Id: I05d19b084924e5c2fee8235b66ceea640720b378
      90e27612
    • Mike Voydanoff's avatar
      [scripts][flash] Add support for passing kernel command line options to flashing scripts · d945fc16
      Mike Voydanoff authored
      flash-cleo, flash-eagle, flash-imx8mevk, flash-imx8mmevk flash-imx8mmevk and flash-mt8167s_ref
      now take -c option to add command line to the ZBI.
      
      TEST: flash-cleo -c devmgr.suspend-timeout-debug=true
      Change-Id: I9b6dfad3fff1c19eff44bfbecdb277ad91db6922
      d945fc16
    • Mike Voydanoff's avatar
      [dev][input] Remove new lines from device names · 9a09e593
      Mike Voydanoff authored
      In order not to inappropriately line break in the "dm dump" output.
      
      TEST: dm dump on cleo
      Change-Id: If42757a84726a638b9a49433f93bd39afc6da2eb
      9a09e593
    • Roland McGrath's avatar
      [build] Make the banjo name warning a hard error · fb82b636
      Roland McGrath authored
      This should prevent any regressions on the naming rules.
      
      Test: CQ
      Change-Id: I2fb21a131ad84d965c6cb198879ef3a4e0816d8c
      fb82b636
    • Todd Eisenberger's avatar
      [banjo] Remove old versions of renamed libraries · a7558623
      Todd Eisenberger authored
      Test: compiled
      Change-Id: Id5260858bf54b4bd89a28e1120b8fafd0b327b8f
      a7558623
    • Suraj Malhotra's avatar
      [banjo] Fix output string emitting. · 4610c150
      Suraj Malhotra authored
      No longer allowed to be returned first. Assuming null terminated, so
      output is (char*, size_t)
      
      Tested: Manually checked protocol with string in output.
      Change-Id: I1e23ff6e5a7e896a8d4109abadfa642eb579c65a
      4610c150
    • Suraj Malhotra's avatar
      [ddktl] Migrate Foo{Protocol|Interface}Proxy to Foo{Protocol|Interface}Client. · e0ba862e
      Suraj Malhotra authored
      Tested: Compiles
      Change-Id: I891e885d6b63862d39d625e2963d17561954a1cd
      e0ba862e
    • Devon H. O'Dell's avatar
      [ngunwind] Don't use the last words of EH frame header as table · befb0d48
      Devon H. O'Dell authored
      Both `dwarf_find_unwind_table` and `dwarf_as_find_unwind_table` have an
      offsetting bug that causes them to set di.u.rti.table_data to point into
      the EH frame header, rather than to the entries. This results in two
      different bugs:
      
      1) Because the table is pointing to the eh_frame_ptr word in the header,
      a small value, basically any PC will always appear to be found. However,
      no FDE actually exists for that PC and so we fail to unwind PCs that
      aren't described by any FDEs instead of failing to find the PC and
      falling back to frame-pointer-based unwinding.
      
      2) Because the table is pointing into eh_frame_ptr, but the table_len is
      correct, the final FDE cannot be resolved for PCs that are valid, but
      are described by the final FDE. Instead, the penultimate FDE will be
      chosen, leading to erroneous results.
      
      The calls to `dwarf_read_encoded_pointer` have the side-effect of
      advancing the `addr` argument, however this lives in a different address
      space. The table data is indeed located at the load_base + section
      offset + header length -- only, the dwarf_eh_frame_hdr struct doesn't
      include the `eh_frame_ptr` and `fde_count` fields. So we end up with the
      table_data pointing to `eh_frame_ptr` instead of the first table entry.
      
      This patch solves the problem by using the last read address (which
      should be at the end of the optional `eh_frame_ptr` and `fde_count`)
      minus the address of the header as the offset.
      
      Bug: TC-306 #done
      
      Test: manual
      Change-Id: Iaf4f0c45b02a2c7f4bacd9863887038401745c8e
      befb0d48
    • Doug Evans's avatar
      [trace-provider] Remove libtrace dependency, there is none · 73eb36a7
      Doug Evans authored
      ... at least not currently.
      
      Tested: CQ
      Change-Id: I756bab3c1861bac3ab0799060d69bedb26959b69
      73eb36a7
    • Suraj Malhotra's avatar
      [banjo] Emit FooProtocolClient in addition to FooProtocolProxy. · d7d1b601
      Suraj Malhotra authored
      Renaming all *Proxy to *Client. Once *Proxy is removed from drivers, we
      will remove *Proxy generation code.
      
      Tested: Builds
      Change-Id: I923c90365d23d7d28d7edf82230dc6b3800e1750
      d7d1b601
  2. Dec 19, 2018
    • Taylor Cramer's avatar
      Revert "[cobalt-fidl] Add new CobaltEvent methods" · 61f85391
      Taylor Cramer authored
      This reverts commit 95288e7e.
      
      Reason for revert: causing build failure in higher layers, see
      e.g. https://logs.chromium.org/logs/fuchsia/buildbucket/cr-buildbucket.appspot.com/8926667935749990112/+/steps/build/0/steps/build_fuchsia/0/steps/ninja/0/stdout
      
      Original change's description:
      > [cobalt-fidl] Add new CobaltEvent methods
      > 
      > This will alow us to support multiple events at once as well as
      > multiple event codes per event.
      > 
      > CB-197
      > 
      > Test: No functional changes, CQ
      > Change-Id: Ifaf2f1ddf19a9f87299deff88692413208daafee
      
      TBR=rudominer@google.com,azani@google.com,zmbush@google.com
      
      Change-Id: I60cad9e595abe3ec4de7ee59fe2600c934a7cdb8
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      61f85391
    • David Gilhooley's avatar
      [zircon][hid-parser] Use the HID library parser · 0e3d1717
      David Gilhooley authored
      Now that the parser is tested we can replace it
      with the better HID library parser and it should
      work the same
      
      TEST: runtests -a -t hid-test
      
      ZX-3148 #done
      
      Change-Id: Icd3f6a8ed42b2167f28cd1d7319e21de4f25cf95
      0e3d1717
    • David Gilhooley's avatar
      [zircon][hid-parser] Fix HID wrapper casts · f4fb5438
      David Gilhooley authored
      We accidentally cast to input_report_id_t instead of
      input_report_size_t, which means that any values above
      255 were being truncated.
      
      TEST: runtests -a -t hid-test
      
      ZX-3148
      
      Change-Id: I0c79c5773e2f08d93221c9460c4c08975602fb8b
      f4fb5438
    • Doug Evans's avatar
      [trace-engine] Work around a missed opimization in gcc · 36d22dc2
      Doug Evans authored
      GCC doesn't do the desired optimization of the early exit test
      in trace_acquire_context_for_category_cached(). This causes a stack
      frame to be unnecessarily set up for the common case of tracing off.
      Work around this by moving the tail of the function to a separate
      no-inline function. GCC then does the desired optimization of
      no stack frame for the early-exit test, and the tail call is just a branch.
      
      Benchmark timings on a vim2 (little cores disabled):
      
      TRACE_DURATION_BEGIN macro with 0 arguments (time per call):
       Before:
        Tracing off: 28ns
        Tracing on, category disabled: 28ns
        Tracing on, category enabled: 478ns
       After:
        Tracing off: 26ns
        Tracing on, category disabled: 26ns
        Tracing on, category enabled: 478ns
      
      Note that while the speed improvement is measurable, another reason for
      doing this is to remove the noise when trying to visualize how efficient
      the tracing=off test is.
      
      PT-84 #comment patch
      
      Tested: CQ
      Change-Id: I66753b3ad36a4fe50edb4926f85d571e3b0c9384
      36d22dc2
    • Mike Voydanoff's avatar
      [usb] Remove old USB protocol · d3cb1e1d
      Mike Voydanoff authored
      All drivers are using the new banjo USB protocol now.
      Also removed unused usb_control(), which has been replaced by
      usb_control_out() and usb_control_in().
      
      TEST: paved garnet to Pixelbook, USB works.
      
      Change-Id: I4247b53f9607111784c65e7b5db9046c6188f4e8
      d3cb1e1d
    • Suraj Malhotra's avatar
      [eth][dwmac] Use ddktl for EthMac protocol. · 3046d000
      Suraj Malhotra authored
      Tested: paved vim2
      Change-Id: I8bd157aad195a61ee48f0b7c2a78e070664ea5d5
      3046d000
    • Suraj Malhotra's avatar
      [eth] Convert realtek-8211f to ddktl. · 8e68e4b2
      Suraj Malhotra authored
      Tested: Paved vim2.
      Change-Id: I4f32790d465cef96e1a93f87a87df37c1a668c87
      8e68e4b2
    • Zach Bush's avatar
      [cobalt-fidl] Add new CobaltEvent methods · 95288e7e
      Zach Bush authored
      This will alow us to support multiple events at once as well as
      multiple event codes per event.
      
      CB-197
      
      Test: No functional changes, CQ
      Change-Id: Ifaf2f1ddf19a9f87299deff88692413208daafee
      95288e7e
    • rvargas's avatar
      [fake-ddk] Add support for get_protocol and get_name. · f4bafa04
      rvargas authored
      Now the fake ddk can return protocols and a name from the parent device.
      It also supports testing drivers that use zxlog() calls.
      
      Test: manual
      
      Change-Id: Iafecf51f42285ee47c5028b171c5162647df0b8f
      f4bafa04
    • Nick Maniscalco's avatar
      [kernel][object] Add TimerSlack to JobPolicy and pass explicitly · 955ea770
      Nick Maniscalco authored
      Introduce TimerSlack to encapsulate timer slack.
      
      Extend JobPolicy with TimerSlack
      
      Plumb TimerSlack through from syscall layer to timer subsystem.
      
      No behavior change. A future CL will:
      - provide a mechanism for setting the timer slack in job policy
      - integrate job policy slack with timers
      
      Bug: ZX-931 #comment Add TimerSlack to JobPolicy
      Test: booted, ran "k ut job_policy" and runtests on qemu and vim2
      Change-Id: I1f88533563280c93a15d24c25bed936d04e903ad
      955ea770
    • David Gilhooley's avatar
      [zircon][hid-parser] Wrap the HID parsing lib · 142b4111
      David Gilhooley authored
      Use the HID parsing lib to output the same report
      sizes that this library also expects.
      This is the first step to replacing the current
      HID parsing code.
      
      TEST: No test since the code is connected to anything
            yet
      
      ZX-3148
      
      Change-Id: I9e8472c4487cd2828ecae0156603f01a3934c5d8
      142b4111
    • John Grossman's avatar
      [ktl][unique_ptr] Remove extra support code. · 425f516e
      John Grossman authored
      Remove the intrusive contianer pointer traits defined for
      ktl::unique_ptr.  Currently, ktl::unique_ptr is nothing by an alias
      for std::unique_ptr, and std::unique_ptr now has official support in
      the fbl:: instrusive containers, so the ktl:: definition is no longer
      needed.
      
      If ktl::unique_ptr ever becomes its own thing, different from
      std::unique_ptr, a set of intrusive container pointer traits will need
      to be defined, but that should become pretty obvious at compile time
      if/when that day arrives.
      
      Also, remove the un-needed #include for fbl::recycler.  All unique_ptr
      users of fbl::recycle have been converted to a custom deleter pattern
      instead of using fbl::recycle, so this is no longer needed.
      
      Test: Build and runtests on QEMU
      Change-Id: I4c8894175cee561d3fe325e102cf579d2d3c23f7
      425f516e
    • Andres Oportus's avatar
      [mt8167][emmc] Add missing banjo include for I2C · c6e7bc50
      Andres Oportus authored
      Test: Builds.
      Change-Id: Ic2f83fdb9d18d4a697f71544b2fdd0475eb0b977
      c6e7bc50
    • Doug Evans's avatar
      [trace-engine] Add trace_acquire_context_for_category_cached() · 2ecff019
      Doug Evans authored
      This function is a variation of trace_acquire_context_for_category
      that adds call-site caching of enabled/disabled state.
      
      The first call to a TRACE_*() macro invokes trace_acquire_context_for_category,
      regardless of whether tracing is enabled or not, same as before.
      But now the enabled/disabled state of that lookup is cached for each call
      site, allowing subsequent calls to just do a load/test. This greatly
      speeds up the disabled case, both when tracing is off and when tracing is
      on but the category hasn't been selected by the user.
      
      Benchmark timings on a NUC:
      TRACE_DURATION_BEGIN macro with 0 arguments:
       Before:
        Tracing off: 8ns per call
        Tracing on, category disabled: 41ns per call
        Tracing on, category enabled: 107ns
       After:
        Tracing off: 5ns per call
        Tracing on, category disabled: 5ns per call
        Tracing on, category enabled: 112ns
      
      PT-2877 #done
      
      Tested: CQ
      
      Change-Id: I9f454031e15c27c05da64dceb60dd472b7b76390
      2ecff019
    • John Grossman's avatar
      [kernel] Missed changes from code review feedback. · 0f7ca793
      John Grossman authored
      Land a few additional changes which fell out of code review feedback,
      but somehow failed to get uploaded before landing.  Specifically...
      
      ++ Instead of discussing ways to approach a TODO in the TODO comment
         itself, file a bug instead and have the discussion there.
      ++ Remove the constexpr = default constructor from the custom deleter
         for MessagePackets.  While it is part of the std::default_delete,
         it is currently serving no valuable purpose in our version as far
         as I can tell, so just remove it instead of cargo culting the std::
         library.
      
      Test: Build and runtests on QEMU
      Change-Id: I9c4f0f859184f68a4ac0f6c52929a1c72cfa4806
      0f7ca793
    • Todd Eisenberger's avatar
      [banjo] Rename all banjo files to match their library name · 1b00a3b9
      Todd Eisenberger authored
      This allieviates some pain for the folks working on the zircon GN
      conversion.  The old copies will be removed once references are removed
      from GN.
      
      This is a relanding of fbbabe8e
      
      Test: Compiled
      Change-Id: Iad671b901b345923911e4f8364c2033f8d8b5fe6
      1b00a3b9
    • Suraj Malhotra's avatar
      [mtk-sdmmc] Fix build dep error. · e9a19172
      Suraj Malhotra authored
      Tested: Compiles
      Change-Id: I16303280ddc30cd486caf5d765689a91443bbb30
      e9a19172
    • Suraj Malhotra's avatar
      [aml-ethernet] Convert to use ddktl. · 329e72e9
      Suraj Malhotra authored
      Tested: paved vim2.
      Change-Id: I1da11d74db85581bf50c565fd09d6f2845561f56
      329e72e9
Loading