PCIe VDM message

Hi All,

I am working on Storport Miniport Driver. We use StorportGetDeviceBase() to do Memory map with Device BAR address. When we use StorportCopyMemory or StorportWriteRegisterUlong with memory mapped address. It goes to device as MemWr/MemRd or CfgWr/CfgRd. My doubt is How can I send MsgD or in simple term How can I send a PCIe VDM message.

Thanks and Regards,
Muthu

xxxxx@gmail.com wrote:

I am working on Storport Miniport Driver. We use StorportGetDeviceBase() to do Memory map with Device BAR address. When we use StorportCopyMemory or StorportWriteRegisterUlong with memory mapped address. It goes to device as MemWr/MemRd or CfgWr/CfgRd. My doubt is How can I send MsgD or in simple term How can I send a PCIe VDM message.

You can’t. PCIe devices can send those messages to each other, but
there’s certainly no mechanism to send one from the CPU. Why would you
want to? What purpose would it serve?


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

My device has MCTP PCIe VDM support, Inorder to test the feature, I need to send MsgD packets.
I have seen PLX Packet Generator, Lecroy windows tool s have the support for creating PCIe VDM Packets. I am not sure how these tools are able to send PCIe VDM message if there is no mechanism available.

There is a mechanism in some hardware devices. Like I know some of the PLX bridge chips have test registers that can generate arbitrary TLPs.

The lowest cost hardware I know that might generate a MsgD TLP is a PLX (now Broadcom) USB to PCIe bridge (USB3380). This is a chip often used to make a PCIe device usable over USB, or to virtualize a USB device from a PCIe card. If you configure one of these correctly, you can generate SOME TLPs by sending the correct bytes over the USB link. This would take a device on a board (they are available for about $100), and possibly the docs from Broadcom, and a decent knowledge of how to send USB data over a generic connection. There are online articles on doing PCIe security attacks using this device, which basically sends read TLPs, Google SLOTSCREAMER. Since you have to have physical access, and insert a PCIe card, it’s not exactly a secret attack vector, and might just be a more a useful PCIe test tool. I looked at using this device for some development testing, but concluded you can’t send any TLP, only some, like it didn’t seem like it could send 64-bit address TLPs.

A lightly more expensive option ($300) would be to get a PCIe FPGA prototype card, and program the PCIe endpoint to send the data you need. This would require FPGA/Verilog knowledge.

The time and required knowledge for either of these would be significant, although the USB3380 strategy already has some code to do part of what you want.

For enough cash I assume there are PCIe test devices that just allow you to send whatever TLP you want. These require a lot less time and knowledge but a lot more cash.

The processor, as far as I know, has no way to send arbitrary TLPs. A set of test registers on the root complex would certainly be useful at times.

Jan

On 2/17/17, 5:58 PM, “xxxxx@lists.osr.com on behalf of xxxxx@gmail.com” wrote:

My device has MCTP PCIe VDM support, Inorder to test the feature, I need to send MsgD packets.
I have seen PLX Packet Generator, Lecroy windows tool s have the support for creating PCIe VDM Packets. I am not sure how these tools are able to send PCIe VDM message if there is no mechanism available.

On Feb 17, 2017, at 5:58 PM, xxxxx@gmail.com wrote:

My device has MCTP PCIe VDM support, Inorder to test the feature, I need to send MsgD packets.
I have seen PLX Packet Generator, Lecroy windows tool s have the support for creating PCIe VDM Packets. I am not sure how these tools are able to send PCIe VDM message if there is no mechanism available.

Extra hardware. Think about what you’re asking. The CPU doesn’t know anything about PCIe. All it has is an address bus and a data bus. Based on certain address ranges, the PCIe root complex takes CPU bus cycles and converts them into PCIe memory packets. In order to get a custom packet on PCIe, there has to be a piece of hardware somewhere connected to PCIe that can be told to generate the packet. That’s a chipset extension function. There is no standard built-in mechanism to do that. Some bridges might have that ability, and you can certainly exploit that for your in-house testing, but you certainly cannot release a product into the wild that requires it.

Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Thanks for detailed response.

This is just for testing. So we will internally dicuss for procuring the
hardware if it required.

Thanks for your time.

Muthu

On Feb 19, 2017 1:53 PM, “Tim Roberts” wrote:

> On Feb 17, 2017, at 5:58 PM, xxxxx@gmail.com wrote:
> >
> > My device has MCTP PCIe VDM support, Inorder to test the feature, I need
> to send MsgD packets.
> > I have seen PLX Packet Generator, Lecroy windows tool s have the support
> for creating PCIe VDM Packets. I am not sure how these tools are able to
> send PCIe VDM message if there is no mechanism available.
>
> Extra hardware. Think about what you’re asking. The CPU doesn’t know
> anything about PCIe. All it has is an address bus and a data bus. Based
> on certain address ranges, the PCIe root complex takes CPU bus cycles and
> converts them into PCIe memory packets. In order to get a custom packet on
> PCIe, there has to be a piece of hardware somewhere connected to PCIe that
> can be told to generate the packet. That’s a chipset extension function.
> There is no standard built-in mechanism to do that. Some bridges might
> have that ability, and you can certainly exploit that for your in-house
> testing, but you certainly cannot release a product into the wild that
> requires it.
> —
> Tim Roberts, xxxxx@probo.com
> Providenza & Boekelheide, Inc.
>
>
> —
> NTDEV is sponsored by OSR
>
> Visit the list online at: http:> showlists.cfm?list=ntdev>
>
> MONTHLY seminars on crash dump analysis, WDF, Windows internals and
> software drivers!
> Details at http:
>
> To unsubscribe, visit the List Server section of OSR Online at <
> http://www.osronline.com/page.cfm?name=ListServer&gt;</http:></http:>