NAI BSP Guide for VxWorks 7 — 68INT6

VxWorks 25.03 or newer — NAI nai68int6 BSP


Warnings

  • This BSP only works for VxWorks 7 release 25.03 or newer.
  • When booting VxWorks via USB, use a flash drive no larger than 64GB to avoid complications in the boot process.
  • For any questions regarding this BSP, please contact NAI.

Overview

The 68INT6 is supported by its own VxWorks 7 BSP, nai68int6. The BSP configures the board automatically: VxWorks PCI enumeration, PCI auto-configuration, the 115200 serial console, the board device tree, and the NAI VxBus drivers (PRC FPGA, motherboard EEPROM, watchdog) are all built in. Kernel configuration for a VxWorks Image Project is a single bundle, NAI 68INT6 bundle.


1. Install the BSP

Copy the nai68int6 BSP directory into the VxWorks installation:

<install>/vxworks/<release>/source/os/arch/ia/board/intel/nai68int6/

The BSP contains the board configuration files (bsp.vsbl, CDF files, nai68int6.dts, sysLib.c, …) and the NAI VxBus drivers (vxbGspiFpga.c, gspi_fpga_utils.c/.h, vxbI2cWdt.c), which are compiled into every kernel image automatically.


2. Create the VxWorks Source Build (VSB)

Workbench: File > New > Wind River Workbench Project, build type VxWorks Source Build, and select BSP nai68int6 with CPU WILLOWCOVE, LP64, SMP — confirm LP64 is selected rather than taking the wizard default. Build the project.

NOTE: only 64-bit addressing (LP64) has been tested on the 68INT6; every procedure and image in this guide comes from an LP64 VSB. The BSP itself offers ILP32 as well, but no 32-bit build has been tested.

Command line:

cd <workspace>    # your VxWorks project directory (not the
                  # <install>/vxworks/<release>/workspace in Section 6.3)
vxprj vsb create -lp64 -smp -cpu WILLOWCOVE -bsp nai68int6 68int6_src -S
cd 68int6_src
vxprj build

No Source Build Configuration changes are required: the BSP enables _WRS_CONFIG_X86_PCI_ENUMERATION (VxWorks PCI enumeration) by itself.


3. Create the VxWorks Image Project (VIP)

Workbench: File > New > Wind River Workbench Project, build type VxWorks Image Project, based on the VSB built above, profile PROFILE_DEVELOPMENT.

Command line:

cd <workspace>    # the directory that holds 68int6_src
vxprj create -smp nai68int6 68int6_vip -profile PROFILE_DEVELOPMENT -vsb 68int6_src

3.1 Add the NAI 68INT6 bundle

All 68INT6 kernel configuration is gathered in a single bundle. In the Kernel Configuration Bundles tab, add NAI 68INT6 bundle, or from the command line (vxprj resolves the project from the current directory, so change into the VIP directory first):

cd <workspace>/68int6_vip
vxprj vip bundle add BUNDLE_NAI_68INT6

The bundle (BUNDLE_NAI_68INT6) provides:

GroupComponents
Kernel shell (standalone)INCLUDE_STANDALONE_SYM_TBL, INCLUDE_SHELL, INCLUDE_SHELL_EMACS_MODE, INCLUDE_SHELL_VI_MODE, INCLUDE_SHELL_HISTORY_FILE, INCLUDE_LOADER, INCLUDE_DISK_UTIL, INCLUDE_SHOW_ROUTINES, INCLUDE_STAT_SYM_TBL, INCLUDE_DEBUG, INCLUDE_UNLOADER, INCLUDE_MEM_SHOW, INCLUDE_SYM_TBL_SHOW, INCLUDE_CPLUS
Network utilitiesINCLUDE_PING, INCLUDE_IPPING_CMD, INCLUDE_IFCONFIG, INCLUDE_IPATTACH, INCLUDE_NET_BOOT_CONFIG, INCLUDE_NET_DRV, INCLUDE_TELNET_CLIENT
PCIINCLUDE_PCI_AUTOCONF
Serial console / LPSSDRV_INTEL_LPSS, DRV_INTEL_LPSS_PCI_UART, DRV_INTEL_LPSS_PCI_I2C, DRV_INTEL_LPSS_PCI_SPI, DRV_INTEL_EFI, DRV_INTEL_GPIO
MB EEPROMDRV_I2C_EEPROM, INCLUDE_EEPROMDRV
USB bootINCLUDE_USB_GEN2_STORAGE_INIT, INCLUDE_EHCI, INCLUDE_EHCI_INIT, INCLUDE_UHCI, INCLUDE_UHCI_INIT, INCLUDE_OHCI, INCLUDE_OHCI_INIT, INCLUDE_SYNOPSYSHCI, INCLUDE_SYNOPSYSHCI_INIT, INCLUDE_USB_XHCI_HCD, INCLUDE_USB_XHCI_HCD_INIT, INCLUDE_USBTGT_MSC
SATA boot / file systemsPCI_DRV_STORAGE_AHCI, INCLUDE_DOSFS, INCLUDE_DOSFS_FMT, INCLUDE_DOSFS_CHKDSK, INCLUDE_DOSFS_CACHE, INCLUDE_DOSFS_SHOW
Show / debug utilitiesINCLUDE_PCI_SHOW, INCLUDE_VXBUS_SHOW, INCLUDE_VXBUS_IOCTL_SHOW, INCLUDE_FDT_SHOW, INCLUDE_TIMER_SYS_SHOW, INCLUDE_SPY, INCLUDE_TIMEX

The console baud rate (CONSOLE_BAUD_RATE) and the NS16550 instance baud rate default to 115200 — no parameter changes are needed.

3.2 Add the LPSS SPI errata source file

The GSPI (FPGA) controller requires a modified vxbIntelLpssPciSpi.c. Copy the stock file from the VxWorks source tree into the VIP project directory, apply the changes in Section 7 (the errata below — note its 4-byte-only limitation before reusing the file anywhere else), and add the file to the project (Workbench: drag into the project; command line: vxprj file add vxbIntelLpssPciSpi.c). The project-built object overrides the VxWorks library copy at link time; the VxWorks source tree itself is not modified.

3.3 Build

Rebuild the VIP. The resulting kernel automatically includes the NAI VxBus drivers; after boot, devs shows /gspiFpga.0 (PRC FPGA access) and /eeprom/0 (motherboard EEPROM), and vxbDevShow shows the nai-wdt watchdog instance.


4. NAI VxBus drivers

The NAI VxBus drivers are part of the BSP and require no customer action:

  • vxbGspiFpga — enumerates the 68INT6’s PRC FPGA as the I/O device /gspiFpga.0. The FPGA controls functions such as NVM write-protects and peripheral signal pass-throughs.
  • gspi_fpga_utils — readFpgaDevice() / writeFpgaDevice() helper API for FPGA register access through /gspiFpga.0.
  • vxbI2cWdt — driver for the Dallas DS1371 I2C watchdog timer.

4.1 Board utilities

The BSP also carries naiBrdUtils.c (component INCLUDE_NAI_BOARD_UTILS, included by the bundle). Its routines are callable from the kernel shell:

  • naiPciShow — walks the PCI(e) bus and lists every NAI endpoint (vendor 0x15AC): bus/device/function, device ID and board name, the virtual and physical addresses of the common-space BAR and the shared-RAM BAR, and the VXB_DEV_ID. For a Gen5 carrier (68G5, 75G5) the fitted modules follow, with their start address and size in the carrier’s memory space; a PCIe-type module is listed without a window. The mappings are the ones PCI enumeration created, so the virtual addresses printed stay valid from the shell. Pass 1 to print the full PCI topology first, 2 to also dump each NAI device’s configuration header.
  • naiCpuTempShow — TjMax, the package temperature and each core’s temperature from the digital thermal sensor MSRs.
  • naiEepromShow — hex dump of the motherboard EEPROM (/eeprom/0) and its write-protect state; naiEepromCrcCheck / naiEepromCrcUpdate verify or rewrite the MBCore CRC32 at offset 0xFC; naiEepromWpGet / naiEepromWpSet read and change the write protect held in PRC FPGA register 0x0C; naiEepromRead / naiEepromWrite access a byte range.
  • naiPrcRegRead / naiPrcRegWrite — read or write a PRC FPGA register through /gspiFpga.0.
  • naiI2cProbe — scans the LPSS I2C bus for responding addresses (i2cdetect-style grid) and names the known 68INT6 devices.

5. SSK2 downloadable kernel module

The SSK2 (nai_bsp, nai_libs, mbcore_base, nai_sample_apps) builds as a Downloadable Kernel Module project. This section describes the Workbench flow only; there is no command-line equivalent in this guide, so projects created with vxprj in <workspace> have to be imported into Workbench (File > Import) before the SSK2 steps: the VSB, because 5.1 creates the DKM on it, and the VIP, because 5.3 sets the Project References on it. Both have to be visible in the Workbench workspace.

5.1 Create the DKM

File > New > Wind River Workbench Project, “Based on Category” Application Development (or All — the category only filters the build-type list), build type Downloadable Kernel Module, based on the VSB. Delete the automatically created dkm.c and copy the nai_bsp, nai_libs, mbcore_base, and nai_sample_apps folders into the root of the DKM project:

<DKM project>/nai_bsp
<DKM project>/nai_libs
<DKM project>/mbcore_base
<DKM project>/nai_sample_apps

If there are multiple configuration folders in the delivery, bring in only naibsp_config_68int6_vxworks7.

5.2 DKM include paths

Add the following include paths to the DKM project (Build Properties > Paths):

$(PRJ_ROOT_DIR)
$(PRJ_ROOT_DIR)/nai_bsp
$(PRJ_ROOT_DIR)/nai_bsp/naibsp_config_68int6_vxworks7
$(PRJ_ROOT_DIR)/mbcore_base/common/include

Build the DKM (generate the include search paths when prompted).

5.3 Reference the DKM from the VIP

  • Right-click the VIP project > Properties > Project References and check the SSK2 DKM project.
  • In the VIP Build Properties > Paths, add:
<PATH_TO_SSK2_DKM>/nai_bsp/naibsp
<PATH_TO_SSK2_DKM>/nai_bsp/naibsp_config_68int6_vxworks7

Rebuild the VIP.


6. Booting VxWorks 7 with UEFI

The UEFI boot loader (BOOTX64.EFI, Section 6.3) loads a single image file, bootapp.sys, from the boot medium. Either of two kinds of image can be used as bootapp.sys:

  • Self-contained kernel (Section 6.1) — a compressed image of the complete VxWorks kernel. The board boots entirely from the USB drive or SATA disk; no FTP server or network connection is needed.
  • VxWorks boot application (Section 6.2) — a small boot loader that reloads the kernel image (vxWorks) at every boot from FTP, TFTP, a USB drive, or SATA.

6.1 Self-contained compressed kernel image

The kernel VIP from Section 3 can be built as a single compressed image that contains the entire kernel. The BSP selects the image link addresses automatically.

  1. Build the VIP’s default_romCompress build spec and its vxWorks_romCompress.bin target. Rename the result to bootapp.sys.

  2. The boot line in bootapp.cfg (Section 6.3) configures the kernel’s network interface; no host or FTP entries are needed beyond your addressing, for example:

    bootline:gei(0,0)host:vxWorks e=192.168.1.16 o=gei2

NOTE: a warm restart (Ctrl-X or reboot) of a self-contained image passes through the UEFI firmware and follows the firmware boot order. Set the boot order in the BIOS so the EFI USB Device (or EFI Hard Drive for SATA) is first; the board then returns to VxWorks automatically on any restart.

6.2 VxWorks boot application

Create a second VIP (for example 68int6_bootapp) with profile PROFILE_BOOTAPP on the same VSB and add the NAI 68INT6 boot application bundle (BUNDLE_NAI_68INT6_BOOTAPP). From the command line:

cd <workspace>    # the directory that holds 68int6_src and 68int6_vip
vxprj create -smp nai68int6 68int6_bootapp -profile PROFILE_BOOTAPP -vsb 68int6_src
cd 68int6_bootapp
vxprj vip bundle add BUNDLE_NAI_68INT6_BOOTAPP
# next: DEFAULT_BOOT_LINE (below) -- it is compiled into bootapp.sys,
# so it has to be set before the romCompress build

The bundle provides the LPSS serial console, the USB host controllers and mass storage, SATA/DOSFS, the boot application file system loader (INCLUDE_BOOT_FILESYSTEMS, which provides the fs() boot device for any mounted DOSFS volume, and INCLUDE_BOOT_USB_FS_LOADER, which adds the enumeration retry a USB drive needs), the Ethernet END driver (INCLUDE_GEI825XX_VXB_END, with INCLUDE_GENERICPHY and INCLUDE_MII_SYS, for the FTP and TFTP kernel sources), and the LPSS SPI controller — the components the boot application needs to boot from USB, SATA, or the network. PCI auto-configuration, the 115200 console rate, and the boot shell are automatic.

For PRC FPGA access from the boot shell, also add the errata vxbIntelLpssPciSpi.c to the boot application project as described in Section 3.2.

Do not add the kernel bundle (BUNDLE_NAI_68INT6) to a boot application project: it carries the kernel shell and standalone symbol table, which do not belong in a boot application.

Set the active build spec to default_romCompress, build the vxWorks_romCompress.bin target, and rename the result to bootapp.sys.

At every boot the boot application loads vxWorks (the kernel VIP’s default build) from the device named in the boot line. Set DEFAULT_BOOT_LINE for the kernel source you want before the build above — it is compiled into bootapp.sys, so changing the compiled-in value afterwards means rebuilding, though it can be overridden without one (see the c command and the bootapp.cfg note below):

  • FTP (kernel served from a host over the network):

    gei(0,0)host:vxWorks h=192.168.1.5 e=192.168.1.16 u=user pw=user o=gei2
  • TFTP (kernel served from a TFTP server; the f=0x80 flag selects TFTP, and no user or password is needed):

    gei(0,0)host:vxWorks h=192.168.1.5 e=192.168.1.16 o=gei2 f=0x80
  • USB drive (copy the kernel file to the root of the same USB drive that holds bootapp.sys — /vxWorks, not /EFI/BOOT/vxWorks; /bd0a is the DOSFS mount of the first USB block device — confirm the name with devs at the boot shell):

    fs(0,0)host:/bd0a/vxWorks e=192.168.1.16 o=gei2
  • SATA (kernel file copied to the SATA drive, for example into /ata0a):

    fs(0,0)host:/ata0a/vxWorks e=192.168.1.16 o=gei2

The Ethernet unit numbers differ between the two environments: the boot application enumerates the RTM Ethernet port as gei0 (the gei(0,0) boot device in the FTP and TFTP lines), while the kernel’s PCI enumeration names the same port gei2 — o=gei2 tells the kernel which interface to configure with the e= address. All four lines therefore address the same physical RTM port.

The f= field is a bit mask of boot flags (see the VxWorks Boot Loader User’s Guide): 0x08 skips the auto-boot countdown, 0x80 selects TFTP; combine them as needed (for example f=0x88).

From the command line, change into the boot application VIP first — two VIPs exist by now, both accept the command, and setting the parameter in the kernel VIP leaves the boot application on the BSP default boot line with no error from either build:

cd <workspace>/68int6_bootapp
vxprj vip parameter set DEFAULT_BOOT_LINE <value>

<value> keeps the embedded double quotes — on Windows "\"fs(0,0)host:/bd0a/vxWorks e=192.168.1.16 o=gei2\"", on Linux '"fs(0,0)host:/bd0a/vxWorks e=192.168.1.16 o=gei2"'.

The boot line can also be changed at the boot shell (c command) without rebuilding.

NOTE: the UEFI boot loader passes the bootline: entry from bootapp.cfg (Section 6.3) to the boot application, where it overrides the compiled-in DEFAULT_BOOT_LINE. Set the same line in both places.

A warm restart (Ctrl-X or reboot) restores the resident boot application and reloads the kernel without passing through the firmware. No extra component is needed: the BSP adds INCLUDE_FAST_REBOOT to every kernel VIP, and the boot application saves a checksummed copy of itself in RAM that the kernel restores and jumps to on reboot. (A self-contained image, Section 6.1, is loaded directly by the firmware — there is no resident boot application to return to, which is why its warm restart passes through the firmware.) Combined with a USB or SATA kernel source, this gives a deployment that needs no host at any boot and still keeps the fast warm restart.

6.3 UEFI boot loader

Build the Wind River UEFI bootstrap (BOOTX64.EFI): run make in <install>/vxworks/<release>/source/boot/uefi; the output is in <install>/vxworks/<release>/workspace/uefi_x86_64.

For the full procedure, see the Intel itl_generic BSP Supplement Guide (Target Boot Workflows > UEFI Boot Loader > Building and Deploying the UEFI Boot Loader) and the VxWorks Boot Loader User’s Guide (Booting with the UEFI Boot Loader). Both are on the Wind River Support Network: sign in at docs.windriver.com, select your VxWorks release, and search for the guide titles.

Create bootapp.cfg containing a bootline: entry. For a self-contained kernel (Section 6.1) use the network-only line shown there; for a boot application (Section 6.2) use the variant for the kernel source you configured, for example:

bootline:fs(0,0)host:/bd0a/vxWorks e=192.168.1.16 o=gei2

6.4 Boot via USB

Place the three files on a FAT/FAT32 USB drive:

/EFI/BOOT/BOOTX64.EFI
/EFI/BOOT/bootapp.cfg
/EFI/BOOT/bootapp.sys

Insert the USB drive into the RTM, power the 68INT6, press ESC to enter the BIOS, and select the EFI USB Device in the Boot Manager. A self-contained image (Section 6.1) boots straight into VxWorks; a VxWorks boot application (Section 6.2) loads the kernel image (vxWorks) from the source named in its boot line.

If the boot line names the USB kernel source, also copy vxWorks to the root of the drive (/vxWorks, alongside /EFI) — four files in total, not three.

6.5 Boot via SATA

Boot via USB first, then prepare the SATA drive from the VxWorks shell:

-> dosFsVolFormat("/ata0a",0,0)
-> cd "/ata0a"
-> mkdir "EFI"
-> mkdir "EFI/BOOT"

Copy BOOTX64.EFI, bootapp.cfg, and bootapp.sys into /ata0a/EFI/BOOT (from the USB drive or over the network). If the boot line names the SATA kernel source, also copy vxWorks to the root of the volume (/ata0a/vxWorks). Power cycle and select the EFI Hard Drive in the Boot Manager. The USB drive can then be removed.


7. Errata — vxbIntelLpssPciSpi.c

The stock VxWorks LPSS SPI driver does not support the 68INT6’s Tiger Lake UP3 GSPI controller and uses 8-bit transfers; the PRC FPGA requires 32-bit transfers. Four changes are needed.

NOTE: after these changes the transmit and receive paths move exactly one 32-bit FIFO word per call, so the driver is only correct for 4-byte messages — which is what the PRC FPGA always uses (vxbGspiFpgaConstructMsg() builds a 4-byte frame). Shorter transfers are emitted as a 32-bit frame with leading zero bytes, and lengths above 4 produce out-of-range shifts and garbage data. Do not reuse this modified file for other LPSS SPI devices; the XSPI_MEM_XFER_SUPPORT path (lpssPciSpiMemXfer()) in the same file is affected as well.

Copy the stock file into your VIP project directory:

<install>/vxworks/<release>/source/os/psl/intel/itl_x86_common/src/vxbIntelLpssPciSpi.c

Apply the four changes below to the copy, then add it to the project (Section 3.2). Each change gives the exact code to FIND in the stock file and what to do with it.

Change 1 — add the Tiger Lake UP3 device ID

In the lpssPciSpiList[] table, FIND the Tiger Lake H entries:

        /* Tiger Lake - H */
 
        {0x43AA, 0x8086, (void *)&lpssSpiInfoBxt},    /* D30:F2 - GSPI #0 */
        {0x43AB, 0x8086, (void *)&lpssSpiInfoBxt},    /* D30:F3 - GSPI #1 */
        {0x43FB, 0x8086, (void *)&lpssSpiInfoBxt},    /* D18:F6 - GSPI #2 */
        {0x43FD, 0x8086, (void *)&lpssSpiInfoBxt},    /* D19:F0 - GSPI #3 */

and ADD after them (before the {} list terminator entry):

        /* Tiger Lake - UP3 */
 
        {0xA0AA, 0x8086, (void *)&lpssSpiInfoBxt},    /* D30:F2 - GSPI #0 */

Change 2 — 32-bit transfer size in lpssPciSpiInit()

In lpssPciSpiInit(), FIND:

    /* set SSCR0 divider, 8 bit transfer size, and enable */
 
    val32 = CSR_READ_4 (pDrvCtrl, SSCR0);
 
    val32 |= (divider << 8) | 0x80 | 0x7;
 
    CSR_WRITE_4 (pDrvCtrl, SSCR0, val32);

and REPLACE it with:

    /* set SSCR0 divider, 32 bit transfer size, and enable */
 
    val32 = CSR_READ_4 (pDrvCtrl, SSCR0);
 
    val32 |= (1 << 20)      | /* Set EDSS bit; Sets data size to 17-32 bits. */
             (divider << 8) |
             0x80           | /* Enable SSP. */
             0xF;             /* Set data size select. EDSS + DSS value + 1 */
                              /* is the data size, i.e. 0x1F + 1 = 32 bits. */
 
    CSR_WRITE_4 (pDrvCtrl, SSCR0, val32);

Change 3 — single-word transmit in lpssPciSpiTx()

The stock lpssPciSpiXfer() calls lpssPciSpiStateClean() at the start of every transfer, which drains any words left in the receive FIFO by a previous transfer; the errata does not change that. Note the ordering within a single transfer: the transmit below waits for SSSR_RNE but never reads SSDR, so the word clocked in during the command frame is still queued when lpssPciSpiRx() runs, and lpssPciSpiRx() returns that word rather than the one from its own dummy frame. This is what the PRC protocol expects — the FPGA answers in the same 32-bit frame — and it is the dummy frame’s word that is left for the next lpssPciSpiStateClean() to discard.

In lpssPciSpiTx(), after the three parameter-check if blocks, DELETE everything from the line

    while (txLen > 0)

through the end of the function (up to and including the final return OK; and its closing brace), and REPLACE it with:

    /*
     * Pack the transmit bytes into a single 32-bit FIFO word (the
     * controller is configured for 32-bit transfers in
     * lpssPciSpiInit), most-significant byte first.
     */
 
    uint32_t data = 0;
 
    while (txLen > 0)
        {
        data |= (uint32_t) *pTxBuf << ((txLen - 1) * 8);
 
        DBG_MSG("tx: data = 0x%08x, txBuf = 0x%02x, left = %d\n",
                data, *pTxBuf, txLen);
 
        pTxBuf++;
        txLen--;
        }
 
    /* make sure transmit FIFO is not full */
 
    timeout = 0;
    do
        {
        val32 = CSR_READ_4 (pDrvCtrl, SSSR);
        if(timeout++ > TX_RX_TIMEOUT)
            {
            DBG_MSG ("tx: wait timeout and transmit FIFO is full\n");
            return ERROR;
            }
        } while (0x0 == (val32 & SSSR_TNF));
 
    /* write the data to transmit FIFO */
 
    CSR_WRITE_4 (pDrvCtrl, SSDR, data);
 
    /* check for receive FIFO not empty */
 
    timeout = 0;
    do
        {
        val32 = CSR_READ_4 (pDrvCtrl, SSSR);
        if(timeout++ > TX_RX_TIMEOUT)
            {
            DBG_MSG ("tx: wait timeout and receive FIFO is empty\n");
            return ERROR;
            }
        } while (0x0 == (val32 & SSSR_RNE));
 
    DBG_MSG ("%s %s %s %s %s %s %s %s\n",
             ((val32 & SSSR_TNF) ? "TNF" :"---"),
             ((val32 & SSSR_RNE) ? "RNE" :"---"),
             ((val32 & SSSR_BSY) ? "BSY" :"---"),
             ((val32 & SSSR_TFS) ? "TFS" :"---"),
             ((val32 & SSSR_RFS) ? "RFS" :"---"),
             ((val32 & SSSR_PINT)? "PINT":"----"),
             ((val32 & SSSR_TINT)? "TINT":"----"),
             ((val32 & SSSR_TUR) ? "TUR" :"---"));
 
    return OK;
    }

Change 4 — single-word receive in lpssPciSpiRx() and a guard in lpssPciSpiXfer()

In lpssPciSpiRx(), after the three parameter-check if blocks, DELETE everything from the line

    while (rxLen > 0)

through the end of the function (up to and including the final return OK; and its closing brace), and REPLACE it with:

    /*
     * master write dummy data into SO line to drive data be
     * out from slave
     */
 
    CSR_WRITE_4 (pDrvCtrl, SSDR, 0);
 
    /*
     * Before reading data from FIFO, we need to check if data
     * has arrived, this could be done by checking SSSR_RNE bit
     * of SSSR.
     */
 
    timeout = 0;
    do
        {
        val32 = CSR_READ_4 (pDrvCtrl, SSSR);
 
        if(timeout++ > TX_RX_TIMEOUT)
            {
            DBG_MSG("rx: wait timeout and receive FIFO is empty\n");
            return ERROR;
            }
        } while (0x0 == (val32 & SSSR_RNE));
 
    /*
     * Receive FIFO is not empty; read one 32-bit word (the controller
     * is configured for 32-bit transfers in lpssPciSpiInit) and unpack
     * it into the caller's buffer, most-significant byte first.
     */
 
    val32 = CSR_READ_4 (pDrvCtrl, SSDR);
 
    DBG_MSG ("rx: FIFO data = 0x%08x\n", val32);
 
    rxIdx = 0;
 
    while (rxLen > 0)
        {
        pRxBuf[rxIdx++] = (uint8_t)((val32 >> ((rxLen - 1) * 8)) & 0xFF);
        rxLen--;
        }
 
    return OK;
    }

Then in lpssPciSpiXfer(), FIND the unconditional receive call:

    if (lpssPciSpiRx (pDrvCtrl, pTransfer->rxBuf, pTransfer->rxLen) !=OK )
        {
        DBG_MSG ("lpssPciSpiRx() fail\n");
        return ERROR;
        }

and REPLACE it with (transmit-only transfers must skip the receive):

    if ((pTransfer->rxBuf != NULL) && (pTransfer->rxLen != 0))
        {
        if (lpssPciSpiRx (pDrvCtrl, pTransfer->rxBuf, pTransfer->rxLen) !=OK )
            {
            DBG_MSG ("lpssPciSpiRx() fail\n");
            return ERROR;
            }
        }

Verify

Rebuild the VIP. After booting, devs lists /gspiFpga.0, and a read of the PRC revision register (register 0x00) returns data. From the kernel shell:

-> fd = open("/gspiFpga.0", 2, 0)
-> rev = 0
-> readFpgaDevice(fd, 0x00, &rev)
-> printf("PRC revision 0x%04x\n", rev)
PRC revision 0x000c
-> close(fd)

The revision shown will match your board’s PRC. A failed read does not surface as 0xffff, and it does not surface as an error either: vxbGspiFpgaIosRead() returns a read length of 0 rather than a negative value, and readFpgaDevice() then writes the output variable from its own buffer — which on a failed read still holds the register address the caller put there. Reading register 0x00 is therefore the reliable check: PRC revision 0x0000 means the read failed, so re-check devs, the four errata changes, and the boot log. Do not use another register for this test — a failed read of 0x0C reports 0x000c, indistinguishable from data. If the errata was not applied at all, the GSPI controller never attaches, /gspiFpga.0 does not exist, and the open returns -1.

In the shell sequence above, 2 is O_RDWR (the kernel shell’s C interpreter does not know the O_RDWR macro), and rev = 0 creates the shell variable.

readFpgaDevice() and writeFpgaDevice() are described in Section 4.


Revision History

RevDateDescriptionAuthor
12025-06-04Initial ReleaseDN
22025-09-15Modified for clarity and minor errorsCP
32025-10-30Added MBCore instructionsHP
42026-07-28Markdown edition for the nai68int6 BSP, replacing the Rev 3 Word/PDF guide and its manual itl_generic configurationHP
52026-08-11Fixes from the first independent 25.09 bring-up: working directories for the vxprj blocks, boot application VIP procedure, Section 5 Workbench-only note, Section 6 image wording, Section 3.2 errata pointer, Section 2 LP64-only note, Wind River doc referencesHP
62026-08-12Code blocks tagged by language (bash/text); $ prompt prefixes removed from the vxprj command blocks so they copy-paste cleanlyHP
72026-10-27Section 4.1: board utilities (naiPciShow, naiCpuTempShow, MB EEPROM, PRC FPGA register and I2C scan routines) added to the BSP as INCLUDE_NAI_BOARD_UTILS, included by the bundleHP