- Jan 29, 2019
-
-
Brian Bosak authored
This patch adds a new method (device_get_metadata_size) to the DDK API, which allows the retrieval of the size of a given metadata key on a device. Test: runtests -t driver-test Change-Id: Ib2535b17e3e2b6b9bc225835d6ac27e288aadd52
-
George Kulakowski authored
Test: booted with qemu arm under asan Change-Id: Ia758a685c1ad031e090e8d2e16294ff06ef765a8
-
George Kulakowski authored
Test: no functional change Change-Id: Ia9f47f89e010fa8449326a6a3ff0c2070e03f713
-
Bruce Mitchener authored
TEST: No behavior change Change-Id: I4b5a065db7e616c63710076b576872390af6cbb0
-
Venkatesh Srinivas authored
1) Remove support for scanning non-zero channels. virtio-scsi's config space has a field for 'max_channels', but the device can only encode channel 0 targets. Remove the max_channel loop since we can't use non-zero channels. 2) Use <= (rather than <) for max_target/max_lun comparison. QEMU and GCE's hypervisor disagree on the definition of the max_target and max_lun fields. The virtio spec is ambiguous as to which definition is correct. Use <= conservatively to not skip targets. ZX-2314 Tested: 1) QEMU: finds target 0:1:1 ./scripts/run-zircon-x64 -- -drive if=none,id=hd,file=/tmp/blk.img \ -device virtio-scsi-pci,id=scsi -device scsi-hd,drive=hd,scsi-id=1,lun=1 2) GCE -- finds target 1:0. Change-Id: I684d67b8fc7449c72b14290ce88f226e00def672
-
Roland McGrath authored
The script got out of synch when the CIPD package for qemu started using the third_party/ prefix on the package name. Fix it up. Test: ./scripts/download-prebuilt --no-cipd succeeds and prebuilts/downloads/qemu is current Change-Id: I90dafd26a443318e671ba25b3fb9679c9735713f
-
Venkatesh Srinivas authored
Correct a bug in how ExecuteCommandSync called IrqRingUpdate that would cause the scan worker thread to wait forever. virtio ring::IrqRingUpdate will invoke a passed-in functor on descriptor chains completed by the device. However if no descriptor chains were completed, it would not call the functor. (I had assumed at first skim that it would have waited instead). Modify ExecuteCommandSync to keep invoking IrqRingUpdate with 5 mS steps until the command completes with either an error or success. Later we will wire up interrupt mode support, to avoid this 5 mS polling looping. ZX-2314 Tested: 1) Booted on GCE, dm dump displayed the virtio-scsi target at 1-0. 2) Still boots on QEMU (qemu masked the error by synchronously processing control commands). [00:02.0] pid=2006 /boot/driver/bus-pci.so <00:02.0> pid=2884 /boot/driver/bus-pci.proxy.so [virtio-scsi] pid=2884 /boot/driver/virtio.so [scsi-disk-1-1] pid=2884 /boot/driver/virtio.so Both QEMU and GCE tests need the LUN encoding fix included (see 239313) for tests to work. Change-Id: I9a0d8f5860f11cf1f4b900ebe3c5c4cf76a060cd
-
Gianfranco Valentino authored
TEST=zxtest-test,zxtest-integration-test Change-Id: I4e99d431431c3d5a09b5e640a9ec4a49a435ed1b
-
Venkatesh Srinivas authored
virtio-scsi must encode targets/LUNs into a single level LUN structure. Originally we had a bug in the logic that did so (neglected to set ADDRESS METHOD field). The parent commit to this one fixed the bug; add a unit test to ensure it stays fixed. ZX-2314 Tested: Built, run unit tests Change-Id: I2e7468ecb7511890acba8bc17bcb854d75ca6fde
-
Venkatesh Srinivas authored
virtio-scsi requires Target/LUN pairs be encoded into an 8-byte buffer in a particular format -- 1. First byte set to 1 2. Second byte set to target 3. Third and fourth byte representing a 'single level LUN structure' Per the SCSI Architecture Manual, the single-level format we should be using is the flat addressing method (table 6, SAM-3 T10/02-119r0) or (tabel 9, Flat space addressing, SAM-3 T10/02-119r0). Bits 7-6 of the low byte should be '01'. Then we should pack the 6 MSBs of the LUN into the low byte and the 8 LSBs into the high byte. The prior version of this code did not set the address method (implicit Peripheral device address method) and incorrectly mashed the LUN for that mode. ZX-2314 Tested: With the correct loop condition CR, booted on GCE and QEMU. Tested that expected LUNs were found and bound to virtio.so Change-Id: I6b4a53ea16dec0962233d143660744edd012dfc8
-
John Bauman authored
platform-bus.proxy.so is being bound instead of sysmem.proxy.so (probably because it's enumerated first). Test: boot on VIM2 Change-Id: Ib656525fe4dca8b7821d34b7773c268c760aa03a
-
Jocelyn Dang authored
Handles the simple case where all requests complete successfully. Remove old batch_cb API. Also modifies testing so we can specify when we want to set or expect a callback. Currently those fields are equal in the tests, but will not necessarily be when we start testing with set_error=true. Part 2 will track queued / silently completed requests and handle callbacks for the error cases. ZX-932 #comment TEST= plug in FX3 and run: fx shell usb-fwloader && runtests -t usb-test Change-Id: I596c18b3e0edac25638214977e3668b4efccbe38
-
Cristián Donoso authored
This permits userspace to query about how many debug registers the system has. This also removes a hack used in arm64 to pass the information to the debugger. ZX-3038 # Done TEST=manual Change-Id: I2d020b17a146b470a2f76fb97205b6516bc85cad
-
- Jan 28, 2019
-
-
Andres Oportus authored
In order to use mt8167-gpio.cpp in unit tests, the binding for the regular devmgr needs to be done in a different file. Test: Boot on MT8167 ref board. Change-Id: I3fe3aa05bfae11c707199b2b970fbe1f526f5a1e
-
Mike Voydanoff authored
Also removed unnecessary thread and some dead code TEST: LED blinking and GPIO interrupt from button press on VIM2 Change-Id: I139b3dbc4edcb5aeeaf8483c71936086a3312ff3
-
George Kulakowski authored
Bug: ZX-3357 #comment Test: no functional change Change-Id: I042ab4263ec2bf0c155838d7ada13b17e4514224
-
rvargas authored
Test: nand-loader --num-blocks 128 Change-Id: Iecca7dd201dc57674d08034b4411dd069f13eb3e
-
Travis Geiselbrecht authored
Hasn't been used in forever. Change-Id: I2c0ffa8265c6bc5103ec332799b44607e2b7a3e1 Tested: build zircon
-
Adrian Danis authored
Using the reader policy right now through `Guard` will allow for silently violating the thread analysis. ZX-3085 Test: Kernel compiles, no functional changes Change-Id: I727a87b16127413383dc2c50ea5fc83dea176344
-
Gianfranco Valentino authored
Added ASSERT_*/EXPECT_* macros. Added extended version to allows ASSERT*(..., fmt, args) so test errors can capture information about the local variables that might give some insight. C allows EQ for comparing primitive types and ptrs. C++ allows EQ for anything with operator== defined. C has no extension for printing structs. This is, custom types are dumped as hex, primitive types (ptrs included) contents are dumped. In C++ an overload or specialization can be provided to display custom types of zxtest::PrintValue. Added test for ASSERT_/EXPECT_ both in C and C++. TEST=zxtest-test Change-Id: I11230d0adb3d66b4c9f570604b4032441ab78fcc
-
David Pursell authored
It makes the syscall wrapper simpler to have SocketDispatcher use a parameter to select between data and control plane operations rather than separate functions. Test: `runtests -t socket-test` Change-Id: I9050bd50fe36173a38964b10e533c0ec9a687bc8
-
Sean Klein authored
"RamdiskTestReleaseDuringFifoAccess" attempt to test that the ramdisk behaves properly during termination. This behavior is inherentely racy, as observing the test between "unbind" and "release" or "after release" will have different results. Rather than relying on significant implementation detail of the ramdisk server, delete the test. FLK-34 #done Test: /boot/test/sys/ramdisk-test Change-Id: I08193b929e38e092d8a0810ac1c39c82384d112f
-
Yifei Teng authored
Since the llcpp server implementation is not yet ready, for this patch, a simple manual server is written that takes advantage of the raw llcpp APIs and acts as the testing harness for llcpp client code. The garnet CL used to generate the binding code is at: https://fuchsia-review.googlesource.com/c/garnet/+/239196 TEST: /boot/test/sys/fidl-llcpp-interop Change-Id: I960a3282b9f74506f2a5ffafaa3ece6fa6377c69
-
Mike Voydanoff authored
This API will be used to support hardware lights such as indicator LEDs. The lights are identifiable by a board specific name. A light device may implement one or more physical lights, allowing for an array of LEDs grouped together (for example, the LED ring on the Nexus Q music player). Lights may be simple on/off, support a brightness value, or an RGB value. Bug: ZX-3349 TEST: compiles when included in astro board driver. Change-Id: Ib1b19dd27a6cf12f7171debd4a4c8715cdbe2460
-
Yifei Teng authored
Notable optimizations: - In the callee-allocating flavor, automatically stack allocate when message size is < 512. Otherwise use C++ new. No VLAs. - No call to fidl_linearize when a type is completely inline. - No call to fidl_encode when the request type is inline and has no handles. (boring type) - No call to fidl_decode when the response type is inline and has no handles. (boring type) - No reference to coding table for boring types. In the future we could stop generating those coding tables altogether, reducing binary size. - All empty/zero-arg requests/responses share the same struct definition, which is essentially a fidl_message_header_t. Also added a script to easily regenerate all the llcpp binding code. The garnet CL used to generate the binding code is at: https://fuchsia-review.googlesource.com/c/garnet/+/239196 TEST: /boot/test/sys/fidl-llcpp-interop Change-Id: I4a31fe56d25504f3f76ea77c30b88a2f581a39df
-
George Kulakowski authored
fbl::atomic is being removed in lieu of std::atomic. The underlying implementations are identical builtins, so there should be no behavior change. Bug: ZX-3357 #comment Test: no functional change Change-Id: I0538862012c3abb50e4e15e03f0a68564889091e
-
Mike Voydanoff authored
TEST: Added unit test to usb test driver Change-Id: I95aaf3fad2dffc89ba536c40c355992978a5b7b2
-
Jake Ehrlich authored
Test: ./scripts/clang-fmt <some file> and ./scripts/clang-fmt --version Change-Id: Ic8c8a830e3914dc0eba9b05abf4d9a8d5dac2e12
-
Mike Voydanoff authored
TEST: manual testing on NUC and VIM2. Tested USB audio, input and storage. lsusb works. Change-Id: Ia5fea91385f3eb74191fd9a67bbec3242c45bcad
-
Pascal Perez authored
This reverts commit 68817767. Test: revert Change-Id: I5a54da75422f863d431db1580bd9dddafcc1fabc
-
Suraj Malhotra authored
All clients have been migrated to pci_map_bar_buffer. Tested: Compiles. Change-Id: Ide14ba02c112e47f05ec3960a074ac4f1cd2f8fc
-
Gianfranco Valentino authored
Unittest library should also work for hosts. Added both host lib and equivalent host tests. The only dependency we had was zx::time, which is only used for timer purposes. On host we fallback to std C gettimeofday. TEST=zxtest-test,zxtest-integration Change-Id: I937f958dc81eaab7c51b4f0bd6955517730c4139
-
Bruce Mitchener authored
TEST: No behavior change Change-Id: I34fcc6d9b297ebe9633555a82d0584340b094927
-
David Pursell authored
Adds peek option to zx_socket_read() for both standard and control-plane messages. Socket benchmark tests don't show any significant change in speed. ZX-769 # done Test: `runtests -t socket-test` Test: '/pkgfs/packages/zircon_benchmarks/0/test/zircon_benchmarks -p \ --runs 1000000 --filter Socket' Change-Id: Id312eb4889e7c2f052719980c86c75a2a1937ac4
-
Sean Klein authored
Test: /boot/test/sys/ramdisk-test ZX-2674 #done Change-Id: I6ff9c767d30b4eb0a51faca1b7acc2424886f4db
-
- Jan 27, 2019
-
-
Sean Klein authored
Additionally, convert all clients within Zircon. Test: /boot/test/sys/ramdisk-test ZX-2674 #comment In Progress ZX-2866 #done Change-Id: Iff7751579a2a2aa496cc71da57ec002f39f15792
-
Sean Klein authored
Additionally, redirects all usage of "ramdisk_ioctl" interfaces through the ramdisk library (currently located within ulib/fs-management, pending relocation). This will make it easier to convert the ioctl interfaces to FIDL without modifying client code. Test: /boot/test/sys/ramdisk-test ZX-2674 #comment In Progress Change-Id: Ia24192df10b2cb3bb5ee2a95f0b6ef647d515d69
-
Pascal Perez authored
Introducing a generic representation named TypeConstructor to capture all areas where we reference types. This makes it possible to have a single representation, share code around it, and most importantly, defer type construction to a later stage in the compiler, once all constants have been resolved. For instance, with the example: const uint32 MAX_SIZE = 1024; struct MyStruct { string:MAX_SIZE desc; string:1024 other_desc; }; We must first resolve the MAX_SIZE constant to understand that the type for both desc field, and other_desc field are the same. Type constructors create types using type templates, which are looked up by name. So for instance, the name "uint32" looks up a type template, which is an instance of PrimitiveTypeTemplate, and which knows how to instantiate a PrimitiveType representing a uint32. All this machinery moves us closer to 1. canonicalizing types (because their creation is now centralized, and soon easy to memoize), and 2. introducing user-defined templates such as struct pair<L, R> { .... Which would get materialized dynamically. This also makes it natural to extend type aliasing to use any types, not just primitives. Test: make tools -j12 HOST_USE_ASAN=true && ./build-x64/host_tests/fidl-compiler-test Change-Id: Id97c6751b8944b5ee04ff813d2cd0dcc47711f17
-
Mike Voydanoff authored
So we can use system/dev/light for light drivers TEST: still builds Change-Id: Ia7a6684c704390d26cedee8209f076125e7a6fec
-
- Jan 26, 2019
-
-
Jocelyn Dang authored
This will make it easier to add the cb_on_error_only tests, where we'll want to pass in which requests we want callbacks / errors on. TEST= plugged in FX3 and ran usb-fwloader && runtests -t usb-test Change-Id: I6078180c520ea8f61574f04316ff5801e809ece0
-