// 6. Write AAD length & data (if any) pci_write32(bar, AAD_LEN, aad_len); pci_write_burst(bar, AAD_BUF, aad, aad_len);

// 3. Set source and destination addresses (DMA) pci_write64(bar, SRC_ADDR, src_bus_addr); pci_write64(bar, DST_ADDR, dst_bus_addr);

// 4. Set length and algorithm (AES-256-GCM) pci_write32(bar, LENGTH, data_len); pci_write32(bar, ALGO_MODE, 0x30); // 0x30 = AES-256-GCM

// 8. Wait for STATUS.DONE (poll or interrupt) while ((pci_read32(bar, STATUS) & 0x2) == 0);