CV-Bowen opened a new pull request, #20976:
URL: https://github.com/apache/nuttx/pull/20976

   ## Summary
   
   Add the device side of virtio-rpmb:
   
   - move the RPMB request/response types, results, config space and frame
     layout to `include/nuttx/virtio/virtio-rpmb.h`, declared packed like
     the specification, so both sides can share them
   - add the backend. It reads the path of a local block device holding the
     RPMB partition from the device config space, opens it, publishes the
     capacity and reliable-write count from the eMMC EXT_CSD back into the
     virtio config space, and forwards each request chain as
     `MMC_IOC_MULTI_CMD` on a dedicated kernel thread: request frames are
     written with CMD25 and the response frame is read with CMD18
   
   This lets a core without access to the eMMC controller relay RPMB frames
   to the core that owns it.
   
   ## Impact
   
   New, off by default: `CONFIG_DRIVERS_VHOST_RPMB` (selects
   `DRIVERS_VHOST`), with `_PRIORITY` and `_STACKSIZE`. The protocol
   definitions move from `drivers/virtio/virtio-rpmb.h` (private) to
   `include/nuttx/virtio/virtio-rpmb.h`; the two structs are now packed,
   which does not change their layout.
   
   ## Testing
   
   Host: Ubuntu 22.04.5 LTS x86_64, QEMU version 10.2.1, sim: cc (Ubuntu 
13.1.0-8ubuntu1~22.04) 13.1.0, qemu-armv8a: aarch64-none-elf-gcc (Arm GNU 
Toolchain 12.2.Rel1 (Build arm-12.24)) 12.2.1 20221205
   
   Build only: `qemu-armv8a:rpserver` with `CONFIG_DRIVERS_VHOST_RPMB=y`
   builds without warnings. No in-tree transport creates a device-role
   `VIRTIO_ID_RPMB` vdev yet, so the backend is not exercised at run time
   here; the rpmsg baseline below only shows nothing else regressed.
   
   Baseline (`test.sh`, cases: baseline.yaml):
   
   - host: Ubuntu 22.04.5 LTS x86_64, QEMU version 10.2.1, sim: cc (Ubuntu 
13.1.0-8ubuntu1~22.04) 13.1.0, qemu-armv8a: aarch64-none-elf-gcc (Arm GNU 
Toolchain 12.2.Rel1 (Build arm-12.24)) 12.2.1 20221205
   - tested: nuttx 2b237b982a5 apps ea8addeaf
   - qemu-armv8a built with test-only overlay: disabled LIBC_ENVPATH 
BINFMT_CHECKEXEC
   - sim:rpserver + sim:rpproxy: PASS
     - [x] `uname -a` (server)
     - [x] `rpmsg dump all` (server)
     - [x] `rpmsg ping all 10 1024 3 0` (server)
     - [x] `uname -a` (proxy)
     - [x] `rpmsg ping all 10 1024 3 0` (proxy)
     - [x] `mount -t rpmsgfs -o cpu=server,fs=/proc /sp` (proxy)
     - [x] `cat /sp/version` (proxy)
     - [x] `rpmsg dump all` (proxy)
   - qemu-armv8a:rpserver + qemu-armv8a:rpproxy: PASS
     - [x] `uname -a` (server)
     - [x] `uname -a` (proxy)
     - [x] `rpmsg dump all` (server)
     - [x] `rpmsg ping all 10 1024 3 0` (server)
     - [x] `rpmsg ping all 10 1024 3 0` (proxy)
     - [x] `mount -t rpmsgfs -o cpu=server,fs=/proc /sp` (proxy)
     - [x] `cat /sp/version` (proxy)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to