Skip to content

Instantly share code, notes, and snippets.

@RemZapCypher
Last active October 16, 2025 18:41
Show Gist options
  • Select an option

  • Save RemZapCypher/5b64559a8112c6f11e3bcf9668ebfa57 to your computer and use it in GitHub Desktop.

Select an option

Save RemZapCypher/5b64559a8112c6f11e3bcf9668ebfa57 to your computer and use it in GitHub Desktop.
GSOC 2025 QEMU

Google Summer of Code 2025 Final Work Report


  • Name: Soumyajyotii Ssarkar
  • GitHub-Username: RemZapCypher
  • Organisation: QEMU
  • Project: Implementing LASI's Intel 82596 NIC and NCR710 SCSI Controller for the PA-RISC Machines
  • Proposal: GSOC'25 Proposal

Project Goal

QEMU's PA-RISC(HPPA) machines are still under active development and lacked support for the following device models:

  • LASI's Intel 82596 Ethernet Controller
  • LASI's NCR710 SCSI Controller

The objective of this GSoC project was to design, implement, and integrate hardware-accurate device models for these LASI peripherals so that machines like Linux can boot and interact with them under QEMU exactly as they would on real PA-RISC hardware.

Our project included understanding hardware datasheets, existing kernel drivers, and performing low-level debugging with trace instrumentation, GDB, and firmware reverse engineering to match real device behavior.

Work Report

NCR710 SCSI Controller

To begin implementing the LASI NCR710 SCSI Controller device model for QEMU, I initially used the NCR710 emulation from WinUAE by Toni Wilen. This model was hackish implementation of as semi LSI895A and NCR710 nature model. I adapted it to work with the QEMU Object Model(QOM). And did some basic hackish PCI testing. This revealed that we need a seabios code as the Kernel wasnt detecting our NCR710 SCSI at the specified address. After which I started on implementing the NCR710 Support for Seabios code here. Seabios serves as the bios firmware for the PARISC machines in QEMU. Seabios was originally build to support x86 architecture, "seabios-hppa" ie Helge's fork of seabios was adapted to support for PARISC(HPPA) using that I implemented the Seabios module for the NCR710 SCSI Controller. However we encountered an issue, wherein seabios was primarily build for PCI devices and did not have support for non-PCI devices. I implemented some workaround and hackish implementation to overcome that. Now coming back to the NCR710 on the QEMU side I started by implementing the LASI wrapper for NCR710 which would work as the extension of lasi.c managing the NCR710 interaction for the LASI. I faithfully implemented the functionality as mentioned in the documentation lasi_ers.pdf and also using the lasi700.c (kernel module) for reference.

After this, we started cross debugging to make all the above mentioned components and the Linux kernel to work in harmony with each other.

After that, I got all the components to work to a satisfactory level, I started with the NCR710 Core functionality. This involved fully redesigning the NCR710 emulation from WinUAE and adding the following patches:

  • Adding FIFO Support
  • Redesigning the Interrupt logic
  • Redesigning the phase transitions
  • Redesigning the Scripts Engine and adding Store/Load functionality
  • Register ordering
  • DMA Errors
  • Parity
  • Adding proper Endianness conversion among all the four components (Linux Kernel, Seabios, LASI Wrapper, NCR710 Core)
  • Adding proper Request Life Cycle management
  • Adding proper Disconnect/Reconnect functionality
  • Adding proper Wait/Re-select functionality
  • Adding SCSI phase Synchronization.
  • Additional Timers.
  • Proper Queue management

Also, after making the NCR710 SCSI Controller device model work properly, my mentor helped in adding support for the HP 9000 715 Workstations.

PRs: NCR710

82596 Network Interface Card

For the 82596 Network Interface Card, we started with some initial work done during 2019 by my mentor Helge Deller. Based on the existing implementation, I started cross-referencing the code and check what already has been implemented based on the datasheet of the 82596.. Additionally I also started by debugging the existing functionality implemented by my mentor, to find and fix issues related to the existing functionality. The missing functionality which I found is mentioned below and are the ones I added.

  • Monitor Mode
  • Promiscuous Mode
  • Support for linear mode, segmented mode, and flexible memory models
  • RX Timer
  • Bus Throttle Timers
  • Support for Little Endian mode
  • Accurate CU and RU transition State
  • HP-UX Specific Behavior Support
    • Support for Loopback mode
    • Self test
    • Added timing-aware CA (Channel Attention) signaling to match HP firmware expectations
  • Statistical counters
  • VMstate descriptors
  • Polling mechanism

PRs: 82596

Acknowledgement

I would like to give a huge shout-out to my mentor Helge Deller deller@gmx.de who guided and supported me throughout the summer. I was communicating with him on daily basis and he has always been super responsive towards all my queries and doubts and I have learned a lot from him. Even after having a timezone difference I never faced any issues in communicating with him.

Future Work

  • Add NCR710 Support for the HPUX 10.20: This requires minimal work but require ironing out a few changes, it seems that the HPUX is currently facing kernel panic. I have added proper trace functions so it would be easier to debug the NCR710 and add HPUX 10.20 support in future.
  • RX and TX functionality:
    • We got the RX and TX function working for Linux, but not for HPUX 10.20
    • I have added additional debugging for better understand what is happening in the on the HPUX side and will help us debug the RX and TX function on the HPUX side better.
    • Reaching out to Sven Schnelle who developed the tulip NIC which now supports HPUX 10.20 as he mentions, the HPUX 10.20 side needs additional considerations as reverse engineering it would require using the assembly as single point for reference
    • We have already implemented the self test functionality but for the TX and RX we are considering using and implementing special functions in QEMU that provide us with Kernel side information from the QEMU.
    • So this is a trial and error method which is taking some time as I am currently developing it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment