1 /* 2 * PROJECT: ReactOS API Tests 3 * LICENSE: LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later) 4 * PURPOSE: Dummy card resource tests for the ISA PnP bus driver 5 * COPYRIGHT: Copyright 2024 Dmitry Borisov <di.sean@protonmail.com> 6 */ 7 8 /* INCLUDES *******************************************************************/ 9 10 #include "precomp.h" 11 12 /* GLOBALS ********************************************************************/ 13 14 static UCHAR DrvpTestPnpRom[] = 15 { 16 0x49, 0xF3, // Vendor ID 0xF349 'ROS' 17 0x55, 0x66, // Product ID 0x5566 18 0xFF, 0xFF, 0xFF, 0xFF, // Serial Number 19 0xFF, // Checksum (dummy) 20 21 0x0A, 0x10, 0x10, // PnP version 1.0, vendor version 1.0 22 23 0x82, 6, 0x00, // ANSI identifier 'Test 2' 24 'T', 'e', 's', 't', ' ', '2', 25 26 /* ********************* DEVICE 1 ********************* */ 27 28 0x15, // Logical device ID 29 0x24, 0x08, // Vendor ID 0x0824 'BAD' 30 0x30, 0x00, // Product ID 0x3000 31 0x00, 32 33 0x82, 0xCC, 0xCC, // Long ANSI identifier to verify resource data bounds checking 34 35 /* **************************************************** */ 36 37 0x79, // END 38 0xFF, // Checksum (dummy) 39 }; 40 41 /* FUNCTIONS ******************************************************************/ 42 43 VOID 44 DrvCreateCard2( 45 _In_ PISAPNP_CARD Card) 46 { 47 PISAPNP_CARD_LOGICAL_DEVICE LogDev; 48 49 IsaBusCreateCard(Card, DrvpTestPnpRom, sizeof(DrvpTestPnpRom), 1); 50 51 /* ********************* DEVICE 1 ********************* */ 52 LogDev = &Card->LogDev[0]; 53 54 /* Enable decodes */ 55 LogDev->Registers[0x30] = 0x01; 56 57 /* No DMA is active */ 58 LogDev->Registers[0x74] = 0x04; 59 LogDev->Registers[0x75] = 0x04; 60 } 61