V9.2-2 Unable to read registers on I/O card


Topic author
mark.foster
Member
Posts: 5
Joined: Tue Apr 30, 2024 1:17 pm
Reputation: 0
Status: Offline

V9.2-2 Unable to read registers on I/O card

Post by mark.foster » Tue Apr 30, 2024 1:49 pm

I’m running VMS x86_64 V9.2-2 on a VMware virtual machine on a host running ESXi 6.7.0. I have 2 PCIe arcnet cards on the host that are configured with VMDirectPath for the virtual machine. VMS on the virtual machine can see both cards. I have a custom driver for the cards, and I can successfully use ‘sysman io connect’ to create VMS devices for the cards. However, whenever the driver calls ioc$read_io to read the cards’ registers, it always gets a status of 1 from ioc$read_io with a data value of 0xFF.

Should I be able to read the cards’ registers in VMS V9.2-2? I know the release notes say user drivers are not supported, but I’d like to go as far as I can in getting the driver to work.

Mark Foster
TMEIC Corporation Americas


roberbrooks
VSI Expert
Active Contributor
Posts: 32
Joined: Thu Jun 20, 2019 11:48 am
Reputation: 0
Status: Offline

Re: V9.2-2 Unable to read registers on I/O card

Post by roberbrooks » Tue Apr 30, 2024 11:30 pm

> Should I be able to read the cards’ registers in VMS V9.2-2?
> I know the release notes say user drivers are not supported, but I’d like to
> go as far as I can in getting the driver to work.

There is nothing that explicitly prohibits user drivers from working.

I assume you've written port drivers before?

I'll run this past a few folks on Wednesday.
--
-- Rob


sms
Master
Posts: 374
Joined: Fri Aug 21, 2020 5:18 pm
Reputation: 0
Status: Offline

Re: V9.2-2 Unable to read registers on I/O card

Post by sms » Wed May 01, 2024 12:20 am

Code: Select all

> [...] I have a custom driver for the cards, [...]

   Debugging invisible code can be difficult.  Knowing nothing about the
device doesn't help much, either.


Topic author
mark.foster
Member
Posts: 5
Joined: Tue Apr 30, 2024 1:17 pm
Reputation: 0
Status: Offline

Re: V9.2-2 Unable to read registers on I/O card

Post by mark.foster » Wed May 01, 2024 7:33 am

roberbrooks wrote:
Tue Apr 30, 2024 11:30 pm
> Should I be able to read the cards’ registers in VMS V9.2-2?
> I know the release notes say user drivers are not supported, but I’d like to
> go as far as I can in getting the driver to work.

There is nothing that explicitly prohibits user drivers from working.

I assume you've written port drivers before?

I'll run this past a few folks on Wednesday.
> I assume you've written port drivers before?
Yes, I ported this driver from VAX to Alpha, and then ported it to Itanium. It's been over 10 years, though. ;)

> I'll run this past a few folks on Wednesday.
Thanks


pocketprobe
Valued Contributor
Posts: 76
Joined: Sat Apr 15, 2023 11:53 pm
Reputation: 0
Status: Offline

Re: V9.2-2 Unable to read registers on I/O card

Post by pocketprobe » Wed May 01, 2024 9:15 am

There are others on this forum who had ethernet adapters passed through when using KVM as a hypervisor which were working fineviewtopic.php?f=21&t=8991, and VSI is planning on supporting VMDirectPath for Fiber Channel at some point. I am curious about the card and/or driver. I too run a configuration that is unsupported (Bare Metal)
Last edited by pocketprobe on Wed May 01, 2024 9:26 am, edited 1 time in total.


Topic author
mark.foster
Member
Posts: 5
Joined: Tue Apr 30, 2024 1:17 pm
Reputation: 0
Status: Offline

Re: V9.2-2 Unable to read registers on I/O card

Post by mark.foster » Wed May 01, 2024 11:59 am

pocketprobe wrote:
Wed May 01, 2024 9:15 am
There are others on this forum who had ethernet adapters passed through when using KVM as a hypervisor which were working fineviewtopic.php?f=21&t=8991, and VSI is planning on supporting VMDirectPath for Fiber Channel at some point. I am curious about the card and/or driver. I too run a configuration that is unsupported (Bare Metal)
Thanks for the info.

The card is a Contemporary Controls PCI20EX Arcnet card. The driver is a custom one originally written in the mid 90's, modified around 2000 for Alpha and modified again around 2005 for Itanium.


pjacobi
VSI Expert
Active Contributor
Posts: 25
Joined: Wed Jun 28, 2023 11:46 am
Reputation: 0
Status: Offline

Re: V9.2-2 Unable to read registers on I/O card

Post by pjacobi » Wed May 01, 2024 12:05 pm

I suspect that there is a wrong parameter on the IO CONNECT command which is associating your driver to the wrong bus. You might be able to use SDA> CLUE CONFIG to obtain the correct parameter, however it is still going to be difficult to determine the correct parameters.

Autoconfigure is a much simpler way to load your driver because it automatically figures out all of the complicated parameters. Look in SYS$SYSTEM:SYS$CONFIG.DAT for examples and add an entry for your driver. In the example below, you will need to change the PCI Vendor ID (0x8086/Intel) to the Vendor ID of your device and replace XXXX with the Device ID.

device = "Your driver"
name = ZZ
driver = SYS$ZZDRIVER
adapter = PCI
id = 0xXXXX8086
end_device


Be sure the adapter parameter matches the bus (PCI/PCIE) as reported in CLUE CONFIG or UEFI Shell>pci command. Some Hypervisors configure physical PCIE devices as virtual PCI devices in pass-through mode!

To edit SYS$CONFIG.DAT, copy the file from the memory disk LDMxxxx:[VMS$COMMON.SYSEXE]SYS$CONFIG.DAT to a local disk, edit the file with a text editor, then COPY/LOG back to the memory disk and verify a new version of the file was created. If you run out of space on the memory disk, purge the file or use COPY/OVERLAY.

Use of SYS$CONFIG.DAT is OK for debug, but you will eventually want to put your device entry in SYS$USER_CONFIG.DAT which is preserved on VMS upgrades.

Copy driver executable to SYS$LOADABLE_IMAGES:

Reboot the system, stop in SYSBOOT and set NOAUTO=1. Continue the boot process for a minimally configure system. If your driver had previously crashed, delete the file from SYS$LOADABLE_IMAGES.

Start the autoconfigure process to load your driver:

$ MCR SYSMAN IO AUTO/LOG/FULL

I suggest using lots of exe$kprintf() to track initialization process of your driver.


Paul A. Jacobi
VMS Software


Topic author
mark.foster
Member
Posts: 5
Joined: Tue Apr 30, 2024 1:17 pm
Reputation: 0
Status: Offline

Re: V9.2-2 Unable to read registers on I/O card

Post by mark.foster » Wed May 01, 2024 3:06 pm

pjacobi wrote:
Wed May 01, 2024 12:05 pm
I suspect that there is a wrong parameter on the IO CONNECT ...

Paul A. Jacobi
VMS Software
Thanks for all the useful information! I'll try your suggestions and reply with the results.

Mark Foster


roberbrooks
VSI Expert
Active Contributor
Posts: 32
Joined: Thu Jun 20, 2019 11:48 am
Reputation: 0
Status: Offline

Re: V9.2-2 Unable to read registers on I/O card

Post by roberbrooks » Wed May 01, 2024 11:23 pm

> VSI is planning on supporting VMDirectPath for Fiber Channel at some point.
> I am curious about the card and/or driver.

The "support" won't require any changes to VMS; we're in the process of testing it now; results look good!

The adapters that we're testing are the 16Gb/sec Qlogic QL2692 and a 32 Gb/sec adapter whose HPE part number is
SN1600Q.

We already support the QL2692 on IA64 systems.
Last edited by roberbrooks on Wed May 01, 2024 11:24 pm, edited 1 time in total.
--
-- Rob


pocketprobe
Valued Contributor
Posts: 76
Joined: Sat Apr 15, 2023 11:53 pm
Reputation: 0
Status: Offline

Re: V9.2-2 Unable to read registers on I/O card

Post by pocketprobe » Thu May 02, 2024 10:16 am

>The "support" won't require any changes to VMS; we're in the process of testing it now; results look good!
Glad to hear!
>The adapters that we're testing are the 16Gb/sec Qlogic QL2692 and a 32 Gb/sec adapter whose HPE part number is
SN1600Q.
Good to know
>We already support the QL2692 on IA64 systems.
And this.

I was asking about Mark's card, and pointing out that VMDirectPath should work well enough in VMS if VSI will support it. :)
Last edited by pocketprobe on Thu May 02, 2024 10:17 am, edited 1 time in total.

Post Reply