Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pcie subsystem #2

Open
wants to merge 48 commits into
base: feature-pcie
Choose a base branch
from

Conversation

kishorekumarkavuri
Copy link

pcie sub system added into the altera qsys directory

zelenkaj and others added 30 commits February 25, 2015 07:21
- Add CFI flash for host processor to dual Nios II MN design.
- Move flash (EPCS and CFI) to Qsys toplevel.
- Move SDRAM controller to Qsys toplevel.
- Solve warnings by exporting openMAC timer outport.
- Export Nios II reset request port to MN and CN PCP subsystems.
- Add general purpose IRQ bridge to Qsys subsystems.

Change-Id: I1e4d2037f82facd51d52251ff0baa2c5a65bb00d
- Add program-epcs.sh script that programs an EPCS flash without
  connecting to Nios II instance.
- Add EPCS support to driver application scripts.
- Add chain and converter setting files to TERASIC DE2-115 board.

Change-Id: Ia03a2dcd211c150cdb429b8e3dca42377cfdacec
- Combine drivers.sh and apps.sh to have a single code base for creating
  apps and drivers Nios II projects.
- Rename creation scripts and setting files.
- Generated stack library name is forwarded to app.sh via temporary
  file. This avoids searching for the library, what could lead to errors
  if other libraries are created in the working directory.

Change-Id: Iea8b5bc04e6697ec7a94da85344bc233711f0ab2
- Use small device drivers and api.
- Enable small C library.

Change-Id: Ibad2b840464e1093655f6a2b054ab3857de77fd7
Add Altera Nios II EPCS flash bootloader from Quartus II V13.0sp1. The
bootloader is modified as follows:
- Cleanup of makefile and assembler source files. Remove unsupported CFI
  and Cyclone I/II source files.
- Add shell script that sources parameters from sopcinfo file of the
  selected board. Afterwards it replaces the hex file in the board
  project directory.
- Add ability to boot from different offset than zero of EPCS flash. The
  bootloader optains the current boot address from the remote update
  core instance.

Change-Id: I27345817861e00d668661851e615a3ecd8593e86
- Move memory address access routine to target support module.
- Add generic macros for memory operations.
- Add macros to read/write 32 bit variables.
- Add macros to create non-cached memory.
- Add board specific memory configuration file for dualprocshm.

Signed-off-by: Gaurav Kumar Singh <gaurav@kalycito.com>
This adds support for system consisting x86 processor running Windows
as first processor and NIOS2 soft processor on external PCIe
card as second processor.

The memory between the processors is shared over PCIe. The memory
on the PCIe card is mapped for the Windows through 2 BARs. The
dualprocshm uses BAR0 as the shared memory and BAR1 as the common
memory.

This commit adds:

- Target support header for NIOS2 and Windows.
- Target support modules for PCP daemon and PCIe interface.

Signed-off-by: Gaurav Kumar Singh <gaurav@kalycito.com>
The NDIS miniport driver initializes all the hardware resources such as
memory, interrupts etc. for the specified device. It also registers
a virtual adapter with the operating system to which other protocol
drivers like TCP/IP can bind with.

Signed-off-by: Gaurav Kumar Singh <gaurav@kalycito.com>
- Update pointer variables to use fixed 8 byte size. This avoids
  issues with different pointer sizes on 32 bit and 64 bit systems.
- Add compiler options for Windows to use fixed 4 byte packing for
  shared structures with 8 byte variables.

NOTE: This is a workaround commit to avoid issues with 64 bit Windows

Signed-off-by: Gaurav Kumar Singh <gaurav@kalycito.com>
- Add Windows kernel target definitions header and target module.
- Add driver header and update driver.h to support windows kernel.

Signed-off-by: Gaurav Kumar Singh <gaurav@kalycito.com>
This driver uses dualprocshm, ndislib and circbuf libraries to
create the communication interface between user application running
in Windows user space and kernel stack running on a softcore
NIOS2 processor on an external PCIe device.

Signed-off-by: Gaurav Kumar Singh <gaurav@kalycito.com>
Signed-off-by: Gaurav Kumar Singh <gaurav@kalycito.com>
- Add library settings for dual processor CAL.
- Update stackfiles.settings to include CAL modules for dual processor.

Signed-off-by: Gaurav Kumar Singh <gaurav@kalycito.com>
- Add PCIe specific locking macros in target definition.
- Add dual processor lock module for Windows user space.

Signed-off-by: Gaurav Kumar Singh <gaurav@kalycito.com>
The CAL uses Windows IOCTLs to interact with the Windows driver.
The Windows driver is responsible for all communication to the PCIe
device.
Signed-off-by: Gaurav Kumar Singh <gaurav@kalycito.com>
Signed-off-by: Gaurav Kumar Singh <gaurav@kalycito.com>
Signed-off-by: Gaurav Kumar Singh <gaurav@kalycito.com>
- Add installer and uninstaller application for PCIe driver.
- Add NSIS script to prepare openPOWERLINK installer.
- Update Windows driver project to add install path.
Signed-off-by: Gaurav Kumar Singh <gaurav@kalycito.com>
- Add memory mapping routine for target platform.
- Add additional header structure to share base address of shared
  memory between processors.
- Add late release configuration.

Signed-off-by: Gaurav Kumar Singh <gaurav@kalycito.com>

Conflicts:
	hardware/boards/br-antaresif/mn-single-pcie-drv/include/dualprocshm-mem.h
- Add memmap module for PCIe based designs on Windows.
- Add memmap IOCTL support in Windows PCIe driver.

Signed-off-by: Gaurav Kumar Singh <gaurav@kalycito.com>
Change-Id: I49b7d9cf19725453df0b6c88ba91d15e344e994c
The wait enables identification of the device correctly and update or
install the driver removing the old version of the driver.

Signed-off-by: Gaurav Kumar Singh <gaurav@kalycito.com>
- Update the event thread function prototypes to standard Windows
  LPTHREAD types to avoid compiler error using NMAKE command line
  build.
- Add missing function description for kernelEventThread.

Signed-off-by: Gaurav Kumar Singh <gaurav@kalycito.com>
Update thread prototypes to standard Windows prototypes to avoid
compiler issues.

Signed-off-by: Gaurav Kumar Singh <gaurav@kalycito.com>
Signed-off-by: Gaurav Kumar Singh <gaurav@kalycito.com>
This commit adds support to free the circular buffer queues
allocated through dualprocshm libraries.

Signed-off-by: Gaurav Kumar Singh <gaurav@kalycito.com>
- Destroy dualprocshm instance after closing all open
  driver instances.
- Update queue clean up handling in the driver interface.

Signed-off-by: Gaurav Kumar Singh <gaurav@kalycito.com>
Signed-off-by: Gaurav Kumar Singh <gaurav@kalycito.com>
zelenkaj and others added 18 commits March 10, 2015 16:43
Add callback to CTRLk module which is called before a received command
is executed by the CTRLk module. The callback return value informs the
CTRLk module if the command execution shall be skipped. This allows to
handle commands specific to the driver implementation.

Change-Id: Idcd308c5e8ea4813f92b5dc17373f56524ab0830
Add file transfer feature to control module, which allows to write a
file to the kernel stack. The driver must handle the kCtrlWriteFile
command in its command callback function.
- Add interface to CTRLk and CTRLu module.
- Specify transfer buffer structure.
- Add unimplemented interface to CAL modules.
- Add firmware update file type.

Change-Id: I38116cce4a304a380ffda04b08519014b028c1f7
Use host interface user init parameter buffer for file transfer.
- Set user init parameter buffer to 2 kiB size.
- Implement kernel and user CAL file transfer functions.

Change-Id: I0f397e4a1d27c2713e8c468226f3453e3bcb684c
Change-Id: I2b16b8eaa7c0e093f9fdd199844ac37a4dbb0bfd
Add CTRL commands to set the next firmware image to be loaded after the
kernel stack is shut down with kCtrlShutdown command.

Change-Id: I9c0e22e7dc7d63e879eaace5516a2a367633bd2a
Set correct width of zero check for activity counter, which avoids
optimization by the VHDL compilers.

Change-Id: I436dfb25c629a095453d91cbaa5fb66ef002e3f2
Set define ALT_USE_EPCS_FLASH to explicitely use the EPCS flash,
otherwise open the flash will fail.

Change-Id: I680f4caf255ca5249437a47e478b23fc2eb6b45b
Signed-off-by: Gaurav Kumar Singh <gaurav@kalycito.com>
- Update user control CAL module to support file transfer.
- Update Windows PCIe driver to support file transfer using
  dualprocshm library.

Signed-off-by: Gaurav Kumar Singh <gaurav@kalycito.com>
This allows transfer of higher chunk size for firmware update.

Signed-off-by: Gaurav Kumar Singh <gaurav@kalycito.com>
Signed-off-by: Gaurav Kumar Singh <gaurav@kalycito.com>
Signed-off-by: Gaurav Kumar Singh <gaurav@kalycito.com>
Remove unwanted ';' after if statement.

Change-Id: I43008e0e11545a569168db60feb57162b94c663d
Signed-off-by: Gaurav Kumar Singh <gaurav@kalycito.com>
Signed-off-by: Gaurav Kumar Singh <gaurav@kalycito.com>
CMake Install directive to export oplkcfg.h file for libraries is
included. This will allow MN console application to include the
configuration for utilizing the configuration parameters in
application.

Signed-off-by: Gaurav Kumar Singh <gaurav@kalycito.com>
- Added top level parameters.
- Update parameter names for NIOS2 processor in dualprocshm library.

Signed-off-by: Kishore Kumar <kishorekumar.k@kalycito.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants