Re: [PATCH RFC] staging: Add driver to communicate with the T2 Security Chip

From: Aditya Garg
Date: Sun Mar 09 2025 - 05:03:46 EST




> On 9 Mar 2025, at 2:24 PM, gregkh@xxxxxxxxxxxxxxxxxxx wrote:
>
> On Sun, Mar 09, 2025 at 08:40:31AM +0000, Aditya Garg wrote:
>> From: Paul Pawlowski <paul@xxxxxxxx>
>>
>> This patch adds a driver named apple-bce, to add support for the T2
>> Security Chip found on certain Macs.
>>
>> The driver has 3 main components:
>>
>> BCE (Buffer Copy Engine) - this is what the files in the root directory
>> are for. This estabilishes a basic communication channel with the T2.
>> VHCI and Audio both require this component.
>
> So this is a new "bus" type? Or a platform resource? Or something
> else?

It's a PCI device
>
>> VHCI - this is a virtual USB host controller; keyboard, mouse and
>> other system components are provided by this component (other
>> drivers use this host controller to provide more functionality).
>
> I don't understand, why does a security chip have a USB virtual
> interface in it? What "devices" hang off of it that are found and
> enumerated by the host OS?

The t2 chip not only handles security, but also has a usb hub, which connects the internal keyboard, trackpad, touchbar, webcam, and other internal devices. The external usb ports are separate.
>
> And what other drivers use this controller, just normal Linux drivers,
> or vendor-specific ones?

The already upstream drivers like hid-Apple etc will use this, basically depending upon what usb device is exposed.
>
>> Audio - a driver for the T2 audio interface, currently only audio
>> output is supported.
>
> Again, is this a platform device or does it sit on the BCE "bus" you
> will create here?
Again, audio video encoders are also a part of this chip.

You can say this chip is more of a co processor.
>
> thanks,
>
> greg k-h