162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 262306a36Sopenharmony_ci#ifndef _UAPI_PARISC_PDC_H 362306a36Sopenharmony_ci#define _UAPI_PARISC_PDC_H 462306a36Sopenharmony_ci 562306a36Sopenharmony_ci/* 662306a36Sopenharmony_ci * PDC return values ... 762306a36Sopenharmony_ci * All PDC calls return a subset of these errors. 862306a36Sopenharmony_ci */ 962306a36Sopenharmony_ci 1062306a36Sopenharmony_ci#define PDC_WARN 3 /* Call completed with a warning */ 1162306a36Sopenharmony_ci#define PDC_REQ_ERR_1 2 /* See above */ 1262306a36Sopenharmony_ci#define PDC_REQ_ERR_0 1 /* Call would generate a requestor error */ 1362306a36Sopenharmony_ci#define PDC_OK 0 /* Call completed successfully */ 1462306a36Sopenharmony_ci#define PDC_BAD_PROC -1 /* Called non-existent procedure*/ 1562306a36Sopenharmony_ci#define PDC_BAD_OPTION -2 /* Called with non-existent option */ 1662306a36Sopenharmony_ci#define PDC_ERROR -3 /* Call could not complete without an error */ 1762306a36Sopenharmony_ci#define PDC_NE_MOD -5 /* Module not found */ 1862306a36Sopenharmony_ci#define PDC_NE_CELL_MOD -7 /* Cell module not found */ 1962306a36Sopenharmony_ci#define PDC_NE_BOOTDEV -9 /* Cannot locate a console device or boot device */ 2062306a36Sopenharmony_ci#define PDC_INVALID_ARG -10 /* Called with an invalid argument */ 2162306a36Sopenharmony_ci#define PDC_BUS_POW_WARN -12 /* Call could not complete in allowed power budget */ 2262306a36Sopenharmony_ci#define PDC_NOT_NARROW -17 /* Narrow mode not supported */ 2362306a36Sopenharmony_ci 2462306a36Sopenharmony_ci/* 2562306a36Sopenharmony_ci * PDC entry points... 2662306a36Sopenharmony_ci */ 2762306a36Sopenharmony_ci 2862306a36Sopenharmony_ci#define PDC_POW_FAIL 1 /* perform a power-fail */ 2962306a36Sopenharmony_ci#define PDC_POW_FAIL_PREPARE 0 /* prepare for powerfail */ 3062306a36Sopenharmony_ci 3162306a36Sopenharmony_ci#define PDC_CHASSIS 2 /* PDC-chassis functions */ 3262306a36Sopenharmony_ci#define PDC_CHASSIS_DISP 0 /* update chassis display */ 3362306a36Sopenharmony_ci#define PDC_CHASSIS_WARN 1 /* return chassis warnings */ 3462306a36Sopenharmony_ci#define PDC_CHASSIS_DISPWARN 2 /* update&return chassis status */ 3562306a36Sopenharmony_ci#define PDC_RETURN_CHASSIS_INFO 128 /* HVERSION dependent: return chassis LED/LCD info */ 3662306a36Sopenharmony_ci 3762306a36Sopenharmony_ci#define PDC_PIM 3 /* Get PIM data */ 3862306a36Sopenharmony_ci#define PDC_PIM_HPMC 0 /* Transfer HPMC data */ 3962306a36Sopenharmony_ci#define PDC_PIM_RETURN_SIZE 1 /* Get Max buffer needed for PIM*/ 4062306a36Sopenharmony_ci#define PDC_PIM_LPMC 2 /* Transfer HPMC data */ 4162306a36Sopenharmony_ci#define PDC_PIM_SOFT_BOOT 3 /* Transfer Soft Boot data */ 4262306a36Sopenharmony_ci#define PDC_PIM_TOC 4 /* Transfer TOC data */ 4362306a36Sopenharmony_ci 4462306a36Sopenharmony_ci#define PDC_MODEL 4 /* PDC model information call */ 4562306a36Sopenharmony_ci#define PDC_MODEL_INFO 0 /* returns information */ 4662306a36Sopenharmony_ci#define PDC_MODEL_BOOTID 1 /* set the BOOT_ID */ 4762306a36Sopenharmony_ci#define PDC_MODEL_VERSIONS 2 /* returns cpu-internal versions*/ 4862306a36Sopenharmony_ci#define PDC_MODEL_SYSMODEL 3 /* return system model info */ 4962306a36Sopenharmony_ci#define PDC_MODEL_ENSPEC 4 /* enable specific option */ 5062306a36Sopenharmony_ci#define PDC_MODEL_DISPEC 5 /* disable specific option */ 5162306a36Sopenharmony_ci#define PDC_MODEL_CPU_ID 6 /* returns cpu-id (only newer machines!) */ 5262306a36Sopenharmony_ci#define PDC_MODEL_CAPABILITIES 7 /* returns OS32/OS64-flags */ 5362306a36Sopenharmony_ci/* Values for PDC_MODEL_CAPABILITIES non-equivalent virtual aliasing support */ 5462306a36Sopenharmony_ci#define PDC_MODEL_OS64 (1 << 0) 5562306a36Sopenharmony_ci#define PDC_MODEL_OS32 (1 << 1) 5662306a36Sopenharmony_ci#define PDC_MODEL_IOPDIR_FDC (1 << 2) 5762306a36Sopenharmony_ci#define PDC_MODEL_NVA_MASK (3 << 4) 5862306a36Sopenharmony_ci#define PDC_MODEL_NVA_SUPPORTED (0 << 4) 5962306a36Sopenharmony_ci#define PDC_MODEL_NVA_SLOW (1 << 4) 6062306a36Sopenharmony_ci#define PDC_MODEL_NVA_UNSUPPORTED (3 << 4) 6162306a36Sopenharmony_ci#define PDC_MODEL_GET_BOOT__OP 8 /* returns boot test options */ 6262306a36Sopenharmony_ci#define PDC_MODEL_SET_BOOT__OP 9 /* set boot test options */ 6362306a36Sopenharmony_ci#define PDC_MODEL_GET_PLATFORM_INFO 10 /* returns platform info */ 6462306a36Sopenharmony_ci#define PDC_MODEL_GET_INSTALL_KERNEL 11 /* returns kernel for installation */ 6562306a36Sopenharmony_ci 6662306a36Sopenharmony_ci#define PA89_INSTRUCTION_SET 0x4 /* capabilities returned */ 6762306a36Sopenharmony_ci#define PA90_INSTRUCTION_SET 0x8 6862306a36Sopenharmony_ci 6962306a36Sopenharmony_ci#define PDC_CACHE 5 /* return/set cache (& TLB) info*/ 7062306a36Sopenharmony_ci#define PDC_CACHE_INFO 0 /* returns information */ 7162306a36Sopenharmony_ci#define PDC_CACHE_SET_COH 1 /* set coherence state */ 7262306a36Sopenharmony_ci#define PDC_CACHE_RET_SPID 2 /* returns space-ID bits */ 7362306a36Sopenharmony_ci 7462306a36Sopenharmony_ci#define PDC_HPA 6 /* return HPA of processor */ 7562306a36Sopenharmony_ci#define PDC_HPA_PROCESSOR 0 7662306a36Sopenharmony_ci#define PDC_HPA_MODULES 1 7762306a36Sopenharmony_ci 7862306a36Sopenharmony_ci#define PDC_COPROC 7 /* Co-Processor (usually FP unit(s)) */ 7962306a36Sopenharmony_ci#define PDC_COPROC_CFG 0 /* Co-Processor Cfg (FP unit(s) enabled?) */ 8062306a36Sopenharmony_ci 8162306a36Sopenharmony_ci#define PDC_IODC 8 /* talk to IODC */ 8262306a36Sopenharmony_ci#define PDC_IODC_READ 0 /* read IODC entry point */ 8362306a36Sopenharmony_ci/* PDC_IODC_RI_ * INDEX parameter of PDC_IODC_READ */ 8462306a36Sopenharmony_ci#define PDC_IODC_RI_DATA_BYTES 0 /* IODC Data Bytes */ 8562306a36Sopenharmony_ci/* 1, 2 obsolete - HVERSION dependent*/ 8662306a36Sopenharmony_ci#define PDC_IODC_RI_INIT 3 /* Initialize module */ 8762306a36Sopenharmony_ci#define PDC_IODC_RI_IO 4 /* Module input/output */ 8862306a36Sopenharmony_ci#define PDC_IODC_RI_SPA 5 /* Module input/output */ 8962306a36Sopenharmony_ci#define PDC_IODC_RI_CONFIG 6 /* Module input/output */ 9062306a36Sopenharmony_ci/* 7 obsolete - HVERSION dependent */ 9162306a36Sopenharmony_ci#define PDC_IODC_RI_TEST 8 /* Module input/output */ 9262306a36Sopenharmony_ci#define PDC_IODC_RI_TLB 9 /* Module input/output */ 9362306a36Sopenharmony_ci#define PDC_IODC_NINIT 2 /* non-destructive init */ 9462306a36Sopenharmony_ci#define PDC_IODC_DINIT 3 /* destructive init */ 9562306a36Sopenharmony_ci#define PDC_IODC_MEMERR 4 /* check for memory errors */ 9662306a36Sopenharmony_ci#define PDC_IODC_INDEX_DATA 0 /* get first 16 bytes from mod IODC */ 9762306a36Sopenharmony_ci#define PDC_IODC_BUS_ERROR -4 /* bus error return value */ 9862306a36Sopenharmony_ci#define PDC_IODC_INVALID_INDEX -5 /* invalid index return value */ 9962306a36Sopenharmony_ci#define PDC_IODC_COUNT -6 /* count is too small */ 10062306a36Sopenharmony_ci 10162306a36Sopenharmony_ci#define PDC_TOD 9 /* time-of-day clock (TOD) */ 10262306a36Sopenharmony_ci#define PDC_TOD_READ 0 /* read TOD */ 10362306a36Sopenharmony_ci#define PDC_TOD_WRITE 1 /* write TOD */ 10462306a36Sopenharmony_ci#define PDC_TOD_CALIBRATE 2 /* calibrate timers */ 10562306a36Sopenharmony_ci 10662306a36Sopenharmony_ci#define PDC_STABLE 10 /* stable storage (sprockets) */ 10762306a36Sopenharmony_ci#define PDC_STABLE_READ 0 10862306a36Sopenharmony_ci#define PDC_STABLE_WRITE 1 10962306a36Sopenharmony_ci#define PDC_STABLE_RETURN_SIZE 2 11062306a36Sopenharmony_ci#define PDC_STABLE_VERIFY_CONTENTS 3 11162306a36Sopenharmony_ci#define PDC_STABLE_INITIALIZE 4 11262306a36Sopenharmony_ci 11362306a36Sopenharmony_ci#define PDC_NVOLATILE 11 /* often not implemented */ 11462306a36Sopenharmony_ci#define PDC_NVOLATILE_READ 0 11562306a36Sopenharmony_ci#define PDC_NVOLATILE_WRITE 1 11662306a36Sopenharmony_ci#define PDC_NVOLATILE_RETURN_SIZE 2 11762306a36Sopenharmony_ci#define PDC_NVOLATILE_VERIFY_CONTENTS 3 11862306a36Sopenharmony_ci#define PDC_NVOLATILE_INITIALIZE 4 11962306a36Sopenharmony_ci 12062306a36Sopenharmony_ci#define PDC_ADD_VALID 12 /* Memory validation PDC call */ 12162306a36Sopenharmony_ci#define PDC_ADD_VALID_VERIFY 0 /* Make PDC_ADD_VALID verify region */ 12262306a36Sopenharmony_ci 12362306a36Sopenharmony_ci#define PDC_DEBUG 14 /* Obsolete */ 12462306a36Sopenharmony_ci 12562306a36Sopenharmony_ci#define PDC_INSTR 15 /* get instr to invoke PDCE_CHECK() */ 12662306a36Sopenharmony_ci 12762306a36Sopenharmony_ci#define PDC_PROC 16 /* (sprockets) */ 12862306a36Sopenharmony_ci 12962306a36Sopenharmony_ci#define PDC_CONFIG 17 /* (sprockets) */ 13062306a36Sopenharmony_ci#define PDC_CONFIG_DECONFIG 0 13162306a36Sopenharmony_ci#define PDC_CONFIG_DRECONFIG 1 13262306a36Sopenharmony_ci#define PDC_CONFIG_DRETURN_CONFIG 2 13362306a36Sopenharmony_ci 13462306a36Sopenharmony_ci#define PDC_BLOCK_TLB 18 /* manage hardware block-TLB */ 13562306a36Sopenharmony_ci#define PDC_BTLB_INFO 0 /* returns parameter */ 13662306a36Sopenharmony_ci#define PDC_BTLB_INSERT 1 /* insert BTLB entry */ 13762306a36Sopenharmony_ci#define PDC_BTLB_PURGE 2 /* purge BTLB entries */ 13862306a36Sopenharmony_ci#define PDC_BTLB_PURGE_ALL 3 /* purge all BTLB entries */ 13962306a36Sopenharmony_ci 14062306a36Sopenharmony_ci#define PDC_TLB 19 /* manage hardware TLB miss handling */ 14162306a36Sopenharmony_ci#define PDC_TLB_INFO 0 /* returns parameter */ 14262306a36Sopenharmony_ci#define PDC_TLB_SETUP 1 /* set up miss handling */ 14362306a36Sopenharmony_ci 14462306a36Sopenharmony_ci#define PDC_MEM 20 /* Manage memory */ 14562306a36Sopenharmony_ci#define PDC_MEM_MEMINFO 0 /* Return PDT info */ 14662306a36Sopenharmony_ci#define PDC_MEM_ADD_PAGE 1 /* Add page to PDT */ 14762306a36Sopenharmony_ci#define PDC_MEM_CLEAR_PDT 2 /* Clear PDT */ 14862306a36Sopenharmony_ci#define PDC_MEM_READ_PDT 3 /* Read PDT entry */ 14962306a36Sopenharmony_ci#define PDC_MEM_RESET_CLEAR 4 /* Reset PDT clear flag */ 15062306a36Sopenharmony_ci#define PDC_MEM_GOODMEM 5 /* Set good_mem value */ 15162306a36Sopenharmony_ci#define PDC_MEM_TABLE 128 /* Non contig mem map (sprockets) */ 15262306a36Sopenharmony_ci#define PDC_MEM_RETURN_ADDRESS_TABLE PDC_MEM_TABLE 15362306a36Sopenharmony_ci#define PDC_MEM_GET_MEMORY_SYSTEM_TABLES_SIZE 131 15462306a36Sopenharmony_ci#define PDC_MEM_GET_MEMORY_SYSTEM_TABLES 132 15562306a36Sopenharmony_ci#define PDC_MEM_GET_PHYSICAL_LOCATION_FROM_MEMORY_ADDRESS 133 15662306a36Sopenharmony_ci 15762306a36Sopenharmony_ci#define PDC_MEM_RET_SBE_REPLACED 5 /* PDC_MEM return values */ 15862306a36Sopenharmony_ci#define PDC_MEM_RET_DUPLICATE_ENTRY 4 15962306a36Sopenharmony_ci#define PDC_MEM_RET_BUF_SIZE_SMALL 1 16062306a36Sopenharmony_ci#define PDC_MEM_RET_PDT_FULL -11 16162306a36Sopenharmony_ci#define PDC_MEM_RET_INVALID_PHYSICAL_LOCATION ~0ULL 16262306a36Sopenharmony_ci 16362306a36Sopenharmony_ci#define PDC_PSW 21 /* Get/Set default System Mask */ 16462306a36Sopenharmony_ci#define PDC_PSW_MASK 0 /* Return mask */ 16562306a36Sopenharmony_ci#define PDC_PSW_GET_DEFAULTS 1 /* Return defaults */ 16662306a36Sopenharmony_ci#define PDC_PSW_SET_DEFAULTS 2 /* Set default */ 16762306a36Sopenharmony_ci#define PDC_PSW_ENDIAN_BIT 1 /* set for big endian */ 16862306a36Sopenharmony_ci#define PDC_PSW_WIDE_BIT 2 /* set for wide mode */ 16962306a36Sopenharmony_ci 17062306a36Sopenharmony_ci#define PDC_SYSTEM_MAP 22 /* find system modules */ 17162306a36Sopenharmony_ci#define PDC_FIND_MODULE 0 17262306a36Sopenharmony_ci#define PDC_FIND_ADDRESS 1 17362306a36Sopenharmony_ci#define PDC_TRANSLATE_PATH 2 17462306a36Sopenharmony_ci 17562306a36Sopenharmony_ci#define PDC_SOFT_POWER 23 /* soft power switch */ 17662306a36Sopenharmony_ci#define PDC_SOFT_POWER_INFO 0 /* return info about the soft power switch */ 17762306a36Sopenharmony_ci#define PDC_SOFT_POWER_ENABLE 1 /* enable/disable soft power switch */ 17862306a36Sopenharmony_ci 17962306a36Sopenharmony_ci#define PDC_ALLOC 24 /* allocate static storage for PDC & IODC */ 18062306a36Sopenharmony_ci 18162306a36Sopenharmony_ci#define PDC_CRASH_PREP 25 /* Prepare system for crash dump */ 18262306a36Sopenharmony_ci#define PDC_CRASH_DUMP 0 /* Do platform specific preparations for dump */ 18362306a36Sopenharmony_ci#define PDC_CRASH_LOG_CEC_ERROR 1 /* Dump hardware registers */ 18462306a36Sopenharmony_ci 18562306a36Sopenharmony_ci#define PDC_SCSI_PARMS 26 /* Get and set SCSI parameters */ 18662306a36Sopenharmony_ci#define PDC_SCSI_GET_PARMS 0 /* Get SCSI parameters for I/O device */ 18762306a36Sopenharmony_ci#define PDC_SCSI_SET_PARMS 1 /* Set SCSI parameters for I/O device */ 18862306a36Sopenharmony_ci 18962306a36Sopenharmony_ci/* HVERSION dependent */ 19062306a36Sopenharmony_ci 19162306a36Sopenharmony_ci/* The PDC_MEM_MAP calls */ 19262306a36Sopenharmony_ci#define PDC_MEM_MAP 128 /* on s700: return page info */ 19362306a36Sopenharmony_ci#define PDC_MEM_MAP_HPA 0 /* returns hpa of a module */ 19462306a36Sopenharmony_ci 19562306a36Sopenharmony_ci#define PDC_EEPROM 129 /* EEPROM access */ 19662306a36Sopenharmony_ci#define PDC_EEPROM_READ_WORD 0 19762306a36Sopenharmony_ci#define PDC_EEPROM_WRITE_WORD 1 19862306a36Sopenharmony_ci#define PDC_EEPROM_READ_BYTE 2 19962306a36Sopenharmony_ci#define PDC_EEPROM_WRITE_BYTE 3 20062306a36Sopenharmony_ci#define PDC_EEPROM_EEPROM_PASSWORD -1000 20162306a36Sopenharmony_ci 20262306a36Sopenharmony_ci#define PDC_NVM 130 /* NVM (non-volatile memory) access */ 20362306a36Sopenharmony_ci#define PDC_NVM_READ_WORD 0 20462306a36Sopenharmony_ci#define PDC_NVM_WRITE_WORD 1 20562306a36Sopenharmony_ci#define PDC_NVM_READ_BYTE 2 20662306a36Sopenharmony_ci#define PDC_NVM_WRITE_BYTE 3 20762306a36Sopenharmony_ci 20862306a36Sopenharmony_ci#define PDC_SEED_ERROR 132 /* (sprockets) */ 20962306a36Sopenharmony_ci 21062306a36Sopenharmony_ci#define PDC_IO 135 /* log error info, reset IO system */ 21162306a36Sopenharmony_ci#define PDC_IO_READ_AND_CLEAR_ERRORS 0 21262306a36Sopenharmony_ci#define PDC_IO_RESET 1 21362306a36Sopenharmony_ci#define PDC_IO_RESET_DEVICES 2 21462306a36Sopenharmony_ci/* sets bits 6&7 (little endian) of the HcControl Register */ 21562306a36Sopenharmony_ci#define PDC_IO_USB_SUSPEND 0xC000000000000000 21662306a36Sopenharmony_ci#define PDC_IO_EEPROM_IO_ERR_TABLE_FULL -5 /* return value */ 21762306a36Sopenharmony_ci#define PDC_IO_NO_SUSPEND -6 /* return value */ 21862306a36Sopenharmony_ci 21962306a36Sopenharmony_ci#define PDC_BROADCAST_RESET 136 /* reset all processors */ 22062306a36Sopenharmony_ci#define PDC_DO_RESET 0 /* option: perform a broadcast reset */ 22162306a36Sopenharmony_ci#define PDC_DO_FIRM_TEST_RESET 1 /* Do broadcast reset with bitmap */ 22262306a36Sopenharmony_ci#define PDC_BR_RECONFIGURATION 2 /* reset w/reconfiguration */ 22362306a36Sopenharmony_ci#define PDC_FIRM_TEST_MAGIC 0xab9ec36fUL /* for this reboot only */ 22462306a36Sopenharmony_ci 22562306a36Sopenharmony_ci#define PDC_LAN_STATION_ID 138 /* Hversion dependent mechanism for */ 22662306a36Sopenharmony_ci#define PDC_LAN_STATION_ID_READ 0 /* getting the lan station address */ 22762306a36Sopenharmony_ci 22862306a36Sopenharmony_ci#define PDC_LAN_STATION_ID_SIZE 6 22962306a36Sopenharmony_ci 23062306a36Sopenharmony_ci#define PDC_CHECK_RANGES 139 /* (sprockets) */ 23162306a36Sopenharmony_ci 23262306a36Sopenharmony_ci#define PDC_NV_SECTIONS 141 /* (sprockets) */ 23362306a36Sopenharmony_ci 23462306a36Sopenharmony_ci#define PDC_PERFORMANCE 142 /* performance monitoring */ 23562306a36Sopenharmony_ci 23662306a36Sopenharmony_ci#define PDC_SYSTEM_INFO 143 /* system information */ 23762306a36Sopenharmony_ci#define PDC_SYSINFO_RETURN_INFO_SIZE 0 23862306a36Sopenharmony_ci#define PDC_SYSINFO_RRETURN_SYS_INFO 1 23962306a36Sopenharmony_ci#define PDC_SYSINFO_RRETURN_ERRORS 2 24062306a36Sopenharmony_ci#define PDC_SYSINFO_RRETURN_WARNINGS 3 24162306a36Sopenharmony_ci#define PDC_SYSINFO_RETURN_REVISIONS 4 24262306a36Sopenharmony_ci#define PDC_SYSINFO_RRETURN_DIAGNOSE 5 24362306a36Sopenharmony_ci#define PDC_SYSINFO_RRETURN_HV_DIAGNOSE 1005 24462306a36Sopenharmony_ci 24562306a36Sopenharmony_ci#define PDC_RDR 144 /* (sprockets) */ 24662306a36Sopenharmony_ci#define PDC_RDR_READ_BUFFER 0 24762306a36Sopenharmony_ci#define PDC_RDR_READ_SINGLE 1 24862306a36Sopenharmony_ci#define PDC_RDR_WRITE_SINGLE 2 24962306a36Sopenharmony_ci 25062306a36Sopenharmony_ci#define PDC_INTRIGUE 145 /* (sprockets) */ 25162306a36Sopenharmony_ci#define PDC_INTRIGUE_WRITE_BUFFER 0 25262306a36Sopenharmony_ci#define PDC_INTRIGUE_GET_SCRATCH_BUFSIZE 1 25362306a36Sopenharmony_ci#define PDC_INTRIGUE_START_CPU_COUNTERS 2 25462306a36Sopenharmony_ci#define PDC_INTRIGUE_STOP_CPU_COUNTERS 3 25562306a36Sopenharmony_ci 25662306a36Sopenharmony_ci#define PDC_STI 146 /* STI access */ 25762306a36Sopenharmony_ci/* same as PDC_PCI_XXX values (see below) */ 25862306a36Sopenharmony_ci 25962306a36Sopenharmony_ci/* Legacy PDC definitions for same stuff */ 26062306a36Sopenharmony_ci#define PDC_PCI_INDEX 147 26162306a36Sopenharmony_ci#define PDC_PCI_INTERFACE_INFO 0 26262306a36Sopenharmony_ci#define PDC_PCI_SLOT_INFO 1 26362306a36Sopenharmony_ci#define PDC_PCI_INFLIGHT_BYTES 2 26462306a36Sopenharmony_ci#define PDC_PCI_READ_CONFIG 3 26562306a36Sopenharmony_ci#define PDC_PCI_WRITE_CONFIG 4 26662306a36Sopenharmony_ci#define PDC_PCI_READ_PCI_IO 5 26762306a36Sopenharmony_ci#define PDC_PCI_WRITE_PCI_IO 6 26862306a36Sopenharmony_ci#define PDC_PCI_READ_CONFIG_DELAY 7 26962306a36Sopenharmony_ci#define PDC_PCI_UPDATE_CONFIG_DELAY 8 27062306a36Sopenharmony_ci#define PDC_PCI_PCI_PATH_TO_PCI_HPA 9 27162306a36Sopenharmony_ci#define PDC_PCI_PCI_HPA_TO_PCI_PATH 10 27262306a36Sopenharmony_ci#define PDC_PCI_PCI_PATH_TO_PCI_BUS 11 27362306a36Sopenharmony_ci#define PDC_PCI_PCI_RESERVED 12 27462306a36Sopenharmony_ci#define PDC_PCI_PCI_INT_ROUTE_SIZE 13 27562306a36Sopenharmony_ci#define PDC_PCI_GET_INT_TBL_SIZE PDC_PCI_PCI_INT_ROUTE_SIZE 27662306a36Sopenharmony_ci#define PDC_PCI_PCI_INT_ROUTE 14 27762306a36Sopenharmony_ci#define PDC_PCI_GET_INT_TBL PDC_PCI_PCI_INT_ROUTE 27862306a36Sopenharmony_ci#define PDC_PCI_READ_MON_TYPE 15 27962306a36Sopenharmony_ci#define PDC_PCI_WRITE_MON_TYPE 16 28062306a36Sopenharmony_ci 28162306a36Sopenharmony_ci#define PDC_RELOCATE 149 /* (sprockets) */ 28262306a36Sopenharmony_ci#define PDC_RELOCATE_GET_RELOCINFO 0 28362306a36Sopenharmony_ci#define PDC_RELOCATE_CHECKSUM 1 28462306a36Sopenharmony_ci#define PDC_RELOCATE_RELOCATE 2 28562306a36Sopenharmony_ci 28662306a36Sopenharmony_ci/* Get SCSI Interface Card info: SDTR, SCSI ID, mode (SE vs LVD) */ 28762306a36Sopenharmony_ci#define PDC_INITIATOR 163 28862306a36Sopenharmony_ci#define PDC_GET_INITIATOR 0 28962306a36Sopenharmony_ci#define PDC_SET_INITIATOR 1 29062306a36Sopenharmony_ci#define PDC_DELETE_INITIATOR 2 29162306a36Sopenharmony_ci#define PDC_RETURN_TABLE_SIZE 3 29262306a36Sopenharmony_ci#define PDC_RETURN_TABLE 4 29362306a36Sopenharmony_ci 29462306a36Sopenharmony_ci#define PDC_LINK 165 /* (sprockets) */ 29562306a36Sopenharmony_ci#define PDC_LINK_PCI_ENTRY_POINTS 0 /* list (Arg1) = 0 */ 29662306a36Sopenharmony_ci#define PDC_LINK_USB_ENTRY_POINTS 1 /* list (Arg1) = 1 */ 29762306a36Sopenharmony_ci 29862306a36Sopenharmony_ci/* cl_class 29962306a36Sopenharmony_ci * page 3-33 of IO-Firmware ARS 30062306a36Sopenharmony_ci * IODC ENTRY_INIT(Search first) RET[1] 30162306a36Sopenharmony_ci */ 30262306a36Sopenharmony_ci#define CL_NULL 0 /* invalid */ 30362306a36Sopenharmony_ci#define CL_RANDOM 1 /* random access (as disk) */ 30462306a36Sopenharmony_ci#define CL_SEQU 2 /* sequential access (as tape) */ 30562306a36Sopenharmony_ci#define CL_DUPLEX 7 /* full-duplex point-to-point (RS-232, Net) */ 30662306a36Sopenharmony_ci#define CL_KEYBD 8 /* half-duplex console (HIL Keyboard) */ 30762306a36Sopenharmony_ci#define CL_DISPL 9 /* half-duplex console (display) */ 30862306a36Sopenharmony_ci#define CL_FC 10 /* FiberChannel access media */ 30962306a36Sopenharmony_ci 31062306a36Sopenharmony_ci/* IODC ENTRY_INIT() */ 31162306a36Sopenharmony_ci#define ENTRY_INIT_SRCH_FRST 2 31262306a36Sopenharmony_ci#define ENTRY_INIT_SRCH_NEXT 3 31362306a36Sopenharmony_ci#define ENTRY_INIT_MOD_DEV 4 31462306a36Sopenharmony_ci#define ENTRY_INIT_DEV 5 31562306a36Sopenharmony_ci#define ENTRY_INIT_MOD 6 31662306a36Sopenharmony_ci#define ENTRY_INIT_MSG 9 31762306a36Sopenharmony_ci 31862306a36Sopenharmony_ci/* IODC ENTRY_IO() */ 31962306a36Sopenharmony_ci#define ENTRY_IO_BOOTIN 0 32062306a36Sopenharmony_ci#define ENTRY_IO_BOOTOUT 1 32162306a36Sopenharmony_ci#define ENTRY_IO_CIN 2 32262306a36Sopenharmony_ci#define ENTRY_IO_COUT 3 32362306a36Sopenharmony_ci#define ENTRY_IO_CLOSE 4 32462306a36Sopenharmony_ci#define ENTRY_IO_GETMSG 9 32562306a36Sopenharmony_ci#define ENTRY_IO_BBLOCK_IN 16 32662306a36Sopenharmony_ci#define ENTRY_IO_BBLOCK_OUT 17 32762306a36Sopenharmony_ci 32862306a36Sopenharmony_ci/* IODC ENTRY_SPA() */ 32962306a36Sopenharmony_ci 33062306a36Sopenharmony_ci/* IODC ENTRY_CONFIG() */ 33162306a36Sopenharmony_ci 33262306a36Sopenharmony_ci/* IODC ENTRY_TEST() */ 33362306a36Sopenharmony_ci 33462306a36Sopenharmony_ci/* IODC ENTRY_TLB() */ 33562306a36Sopenharmony_ci 33662306a36Sopenharmony_ci/* constants for OS (NVM...) */ 33762306a36Sopenharmony_ci#define OS_ID_NONE 0 /* Undefined OS ID */ 33862306a36Sopenharmony_ci#define OS_ID_HPUX 1 /* HP-UX OS */ 33962306a36Sopenharmony_ci#define OS_ID_MPEXL 2 /* MPE XL OS */ 34062306a36Sopenharmony_ci#define OS_ID_OSF 3 /* OSF OS */ 34162306a36Sopenharmony_ci#define OS_ID_HPRT 4 /* HP-RT OS */ 34262306a36Sopenharmony_ci#define OS_ID_NOVEL 5 /* NOVELL OS */ 34362306a36Sopenharmony_ci#define OS_ID_LINUX 6 /* Linux */ 34462306a36Sopenharmony_ci 34562306a36Sopenharmony_ci 34662306a36Sopenharmony_ci/* constants for PDC_CHASSIS */ 34762306a36Sopenharmony_ci#define OSTAT_OFF 0 34862306a36Sopenharmony_ci#define OSTAT_FLT 1 34962306a36Sopenharmony_ci#define OSTAT_TEST 2 35062306a36Sopenharmony_ci#define OSTAT_INIT 3 35162306a36Sopenharmony_ci#define OSTAT_SHUT 4 35262306a36Sopenharmony_ci#define OSTAT_WARN 5 35362306a36Sopenharmony_ci#define OSTAT_RUN 6 35462306a36Sopenharmony_ci#define OSTAT_ON 7 35562306a36Sopenharmony_ci 35662306a36Sopenharmony_ci/* Page Zero constant offsets used by the HPMC handler */ 35762306a36Sopenharmony_ci#define BOOT_CONSOLE_HPA_OFFSET 0x3c0 35862306a36Sopenharmony_ci#define BOOT_CONSOLE_SPA_OFFSET 0x3c4 35962306a36Sopenharmony_ci#define BOOT_CONSOLE_PATH_OFFSET 0x3a8 36062306a36Sopenharmony_ci 36162306a36Sopenharmony_ci/* size of the pdc_result buffer for firmware.c */ 36262306a36Sopenharmony_ci#define NUM_PDC_RESULT 32 36362306a36Sopenharmony_ci 36462306a36Sopenharmony_ci#if !defined(__ASSEMBLY__) 36562306a36Sopenharmony_ci 36662306a36Sopenharmony_ci/* flags for hardware_path */ 36762306a36Sopenharmony_ci#define PF_AUTOBOOT 0x80 36862306a36Sopenharmony_ci#define PF_AUTOSEARCH 0x40 36962306a36Sopenharmony_ci#define PF_TIMER 0x0F 37062306a36Sopenharmony_ci 37162306a36Sopenharmony_cistruct hardware_path { 37262306a36Sopenharmony_ci unsigned char flags; /* see bit definitions below */ 37362306a36Sopenharmony_ci signed char bc[6]; /* Bus Converter routing info to a specific */ 37462306a36Sopenharmony_ci /* I/O adaptor (< 0 means none, > 63 resvd) */ 37562306a36Sopenharmony_ci signed char mod; /* fixed field of specified module */ 37662306a36Sopenharmony_ci}; 37762306a36Sopenharmony_ci 37862306a36Sopenharmony_cistruct pdc_module_path { /* page 1-69 */ 37962306a36Sopenharmony_ci struct hardware_path path; 38062306a36Sopenharmony_ci unsigned int layers[6]; /* device-specific info (ctlr #, unit # ...) */ 38162306a36Sopenharmony_ci} __attribute__((aligned(8))); 38262306a36Sopenharmony_ci 38362306a36Sopenharmony_cistruct pz_device { 38462306a36Sopenharmony_ci struct pdc_module_path dp; /* see above */ 38562306a36Sopenharmony_ci /* struct iomod *hpa; */ 38662306a36Sopenharmony_ci unsigned int hpa; /* HPA base address */ 38762306a36Sopenharmony_ci /* char *spa; */ 38862306a36Sopenharmony_ci unsigned int spa; /* SPA base address */ 38962306a36Sopenharmony_ci /* int (*iodc_io)(struct iomod*, ...); */ 39062306a36Sopenharmony_ci unsigned int iodc_io; /* device entry point */ 39162306a36Sopenharmony_ci short pad; /* reserved */ 39262306a36Sopenharmony_ci unsigned short cl_class;/* see below */ 39362306a36Sopenharmony_ci} __attribute__((aligned(8))) ; 39462306a36Sopenharmony_ci 39562306a36Sopenharmony_cistruct zeropage { 39662306a36Sopenharmony_ci /* [0x000] initialize vectors (VEC) */ 39762306a36Sopenharmony_ci unsigned int vec_special; /* must be zero */ 39862306a36Sopenharmony_ci /* int (*vec_pow_fail)(void);*/ 39962306a36Sopenharmony_ci unsigned int vec_pow_fail; /* power failure handler */ 40062306a36Sopenharmony_ci /* int (*vec_toc)(void); */ 40162306a36Sopenharmony_ci unsigned int vec_toc; 40262306a36Sopenharmony_ci unsigned int vec_toclen; 40362306a36Sopenharmony_ci /* int (*vec_rendz)(void); */ 40462306a36Sopenharmony_ci unsigned int vec_rendz; 40562306a36Sopenharmony_ci int vec_pow_fail_flen; 40662306a36Sopenharmony_ci int vec_pad0[3]; 40762306a36Sopenharmony_ci unsigned int vec_toc_hi; 40862306a36Sopenharmony_ci int vec_pad1[6]; 40962306a36Sopenharmony_ci 41062306a36Sopenharmony_ci /* [0x040] reserved processor dependent */ 41162306a36Sopenharmony_ci int pad0[112]; /* in QEMU pad0[0] holds "SeaBIOS\0" */ 41262306a36Sopenharmony_ci 41362306a36Sopenharmony_ci /* [0x200] reserved */ 41462306a36Sopenharmony_ci int pad1[84]; 41562306a36Sopenharmony_ci 41662306a36Sopenharmony_ci /* [0x350] memory configuration (MC) */ 41762306a36Sopenharmony_ci int memc_cont; /* contiguous mem size (bytes) */ 41862306a36Sopenharmony_ci int memc_phsize; /* physical memory size */ 41962306a36Sopenharmony_ci int memc_adsize; /* additional mem size, bytes of SPA space used by PDC */ 42062306a36Sopenharmony_ci unsigned int mem_pdc_hi; /* used for 64-bit */ 42162306a36Sopenharmony_ci 42262306a36Sopenharmony_ci /* [0x360] various parameters for the boot-CPU */ 42362306a36Sopenharmony_ci /* unsigned int *mem_booterr[8]; */ 42462306a36Sopenharmony_ci unsigned int mem_booterr[8]; /* ptr to boot errors */ 42562306a36Sopenharmony_ci unsigned int mem_free; /* first location, where OS can be loaded */ 42662306a36Sopenharmony_ci /* struct iomod *mem_hpa; */ 42762306a36Sopenharmony_ci unsigned int mem_hpa; /* HPA of the boot-CPU */ 42862306a36Sopenharmony_ci /* int (*mem_pdc)(int, ...); */ 42962306a36Sopenharmony_ci unsigned int mem_pdc; /* PDC entry point */ 43062306a36Sopenharmony_ci unsigned int mem_10msec; /* number of clock ticks in 10msec */ 43162306a36Sopenharmony_ci 43262306a36Sopenharmony_ci /* [0x390] initial memory module (IMM) */ 43362306a36Sopenharmony_ci /* struct iomod *imm_hpa; */ 43462306a36Sopenharmony_ci unsigned int imm_hpa; /* HPA of the IMM */ 43562306a36Sopenharmony_ci int imm_soft_boot; /* 0 = was hard boot, 1 = was soft boot */ 43662306a36Sopenharmony_ci unsigned int imm_spa_size; /* SPA size of the IMM in bytes */ 43762306a36Sopenharmony_ci unsigned int imm_max_mem; /* bytes of mem in IMM */ 43862306a36Sopenharmony_ci 43962306a36Sopenharmony_ci /* [0x3A0] boot console, display device and keyboard */ 44062306a36Sopenharmony_ci struct pz_device mem_cons; /* description of console device */ 44162306a36Sopenharmony_ci struct pz_device mem_boot; /* description of boot device */ 44262306a36Sopenharmony_ci struct pz_device mem_kbd; /* description of keyboard device */ 44362306a36Sopenharmony_ci 44462306a36Sopenharmony_ci /* [0x430] reserved */ 44562306a36Sopenharmony_ci int pad430[116]; 44662306a36Sopenharmony_ci 44762306a36Sopenharmony_ci /* [0x600] processor dependent */ 44862306a36Sopenharmony_ci unsigned int pad600[1]; 44962306a36Sopenharmony_ci unsigned int proc_sti; /* pointer to STI ROM */ 45062306a36Sopenharmony_ci unsigned int pad608[126]; 45162306a36Sopenharmony_ci}; 45262306a36Sopenharmony_ci 45362306a36Sopenharmony_cistruct pdc_chassis_info { /* for PDC_CHASSIS_INFO */ 45462306a36Sopenharmony_ci unsigned long actcnt; /* actual number of bytes returned */ 45562306a36Sopenharmony_ci unsigned long maxcnt; /* maximum number of bytes that could be returned */ 45662306a36Sopenharmony_ci}; 45762306a36Sopenharmony_ci 45862306a36Sopenharmony_cistruct pdc_coproc_cfg { /* for PDC_COPROC_CFG */ 45962306a36Sopenharmony_ci unsigned long ccr_functional; 46062306a36Sopenharmony_ci unsigned long ccr_present; 46162306a36Sopenharmony_ci unsigned long revision; 46262306a36Sopenharmony_ci unsigned long model; 46362306a36Sopenharmony_ci}; 46462306a36Sopenharmony_ci 46562306a36Sopenharmony_cistruct pdc_model { /* for PDC_MODEL */ 46662306a36Sopenharmony_ci unsigned long hversion; 46762306a36Sopenharmony_ci unsigned long sversion; 46862306a36Sopenharmony_ci unsigned long hw_id; 46962306a36Sopenharmony_ci unsigned long boot_id; 47062306a36Sopenharmony_ci unsigned long sw_id; 47162306a36Sopenharmony_ci unsigned long sw_cap; 47262306a36Sopenharmony_ci unsigned long arch_rev; 47362306a36Sopenharmony_ci unsigned long pot_key; 47462306a36Sopenharmony_ci unsigned long curr_key; 47562306a36Sopenharmony_ci unsigned long width; /* default of PSW_W bit (1=enabled) */ 47662306a36Sopenharmony_ci}; 47762306a36Sopenharmony_ci 47862306a36Sopenharmony_cistruct pdc_cache_cf { /* for PDC_CACHE (I/D-caches) */ 47962306a36Sopenharmony_ci unsigned long 48062306a36Sopenharmony_ci#ifdef __LP64__ 48162306a36Sopenharmony_ci cc_padW:32, 48262306a36Sopenharmony_ci#endif 48362306a36Sopenharmony_ci cc_alias: 4, /* alias boundaries for virtual addresses */ 48462306a36Sopenharmony_ci cc_block: 4, /* to determine most efficient stride */ 48562306a36Sopenharmony_ci cc_line : 3, /* maximum amount written back as a result of store (multiple of 16 bytes) */ 48662306a36Sopenharmony_ci cc_shift: 2, /* how much to shift cc_block left */ 48762306a36Sopenharmony_ci cc_wt : 1, /* 0 = WT-Dcache, 1 = WB-Dcache */ 48862306a36Sopenharmony_ci cc_sh : 2, /* 0 = separate I/D-cache, else shared I/D-cache */ 48962306a36Sopenharmony_ci cc_cst : 3, /* 0 = incoherent D-cache, 1=coherent D-cache */ 49062306a36Sopenharmony_ci cc_pad1 : 10, /* reserved */ 49162306a36Sopenharmony_ci cc_hv : 3; /* hversion dependent */ 49262306a36Sopenharmony_ci}; 49362306a36Sopenharmony_ci 49462306a36Sopenharmony_cistruct pdc_tlb_cf { /* for PDC_CACHE (I/D-TLB's) */ 49562306a36Sopenharmony_ci unsigned long tc_pad0:12, /* reserved */ 49662306a36Sopenharmony_ci#ifdef __LP64__ 49762306a36Sopenharmony_ci tc_padW:32, 49862306a36Sopenharmony_ci#endif 49962306a36Sopenharmony_ci tc_sh : 2, /* 0 = separate I/D-TLB, else shared I/D-TLB */ 50062306a36Sopenharmony_ci tc_hv : 1, /* HV */ 50162306a36Sopenharmony_ci tc_page : 1, /* 0 = 2K page-size-machine, 1 = 4k page size */ 50262306a36Sopenharmony_ci tc_cst : 3, /* 0 = incoherent operations, else coherent operations */ 50362306a36Sopenharmony_ci tc_aid : 5, /* ITLB: width of access ids of processor (encoded!) */ 50462306a36Sopenharmony_ci tc_sr : 8; /* ITLB: width of space-registers (encoded) */ 50562306a36Sopenharmony_ci}; 50662306a36Sopenharmony_ci 50762306a36Sopenharmony_cistruct pdc_cache_info { /* main-PDC_CACHE-structure (caches & TLB's) */ 50862306a36Sopenharmony_ci /* I-cache */ 50962306a36Sopenharmony_ci unsigned long ic_size; /* size in bytes */ 51062306a36Sopenharmony_ci struct pdc_cache_cf ic_conf; /* configuration */ 51162306a36Sopenharmony_ci unsigned long ic_base; /* base-addr */ 51262306a36Sopenharmony_ci unsigned long ic_stride; 51362306a36Sopenharmony_ci unsigned long ic_count; 51462306a36Sopenharmony_ci unsigned long ic_loop; 51562306a36Sopenharmony_ci /* D-cache */ 51662306a36Sopenharmony_ci unsigned long dc_size; /* size in bytes */ 51762306a36Sopenharmony_ci struct pdc_cache_cf dc_conf; /* configuration */ 51862306a36Sopenharmony_ci unsigned long dc_base; /* base-addr */ 51962306a36Sopenharmony_ci unsigned long dc_stride; 52062306a36Sopenharmony_ci unsigned long dc_count; 52162306a36Sopenharmony_ci unsigned long dc_loop; 52262306a36Sopenharmony_ci /* Instruction-TLB */ 52362306a36Sopenharmony_ci unsigned long it_size; /* number of entries in I-TLB */ 52462306a36Sopenharmony_ci struct pdc_tlb_cf it_conf; /* I-TLB-configuration */ 52562306a36Sopenharmony_ci unsigned long it_sp_base; 52662306a36Sopenharmony_ci unsigned long it_sp_stride; 52762306a36Sopenharmony_ci unsigned long it_sp_count; 52862306a36Sopenharmony_ci unsigned long it_off_base; 52962306a36Sopenharmony_ci unsigned long it_off_stride; 53062306a36Sopenharmony_ci unsigned long it_off_count; 53162306a36Sopenharmony_ci unsigned long it_loop; 53262306a36Sopenharmony_ci /* data-TLB */ 53362306a36Sopenharmony_ci unsigned long dt_size; /* number of entries in D-TLB */ 53462306a36Sopenharmony_ci struct pdc_tlb_cf dt_conf; /* D-TLB-configuration */ 53562306a36Sopenharmony_ci unsigned long dt_sp_base; 53662306a36Sopenharmony_ci unsigned long dt_sp_stride; 53762306a36Sopenharmony_ci unsigned long dt_sp_count; 53862306a36Sopenharmony_ci unsigned long dt_off_base; 53962306a36Sopenharmony_ci unsigned long dt_off_stride; 54062306a36Sopenharmony_ci unsigned long dt_off_count; 54162306a36Sopenharmony_ci unsigned long dt_loop; 54262306a36Sopenharmony_ci}; 54362306a36Sopenharmony_ci 54462306a36Sopenharmony_ci/* Might need adjustment to work with 64-bit firmware */ 54562306a36Sopenharmony_cistruct pdc_iodc { /* PDC_IODC */ 54662306a36Sopenharmony_ci unsigned char hversion_model; 54762306a36Sopenharmony_ci unsigned char hversion; 54862306a36Sopenharmony_ci unsigned char spa; 54962306a36Sopenharmony_ci unsigned char type; 55062306a36Sopenharmony_ci unsigned int sversion_rev:4; 55162306a36Sopenharmony_ci unsigned int sversion_model:19; 55262306a36Sopenharmony_ci unsigned int sversion_opt:8; 55362306a36Sopenharmony_ci unsigned char rev; 55462306a36Sopenharmony_ci unsigned char dep; 55562306a36Sopenharmony_ci unsigned char features; 55662306a36Sopenharmony_ci unsigned char pad1; 55762306a36Sopenharmony_ci unsigned int checksum:16; 55862306a36Sopenharmony_ci unsigned int length:16; 55962306a36Sopenharmony_ci unsigned int pad[15]; 56062306a36Sopenharmony_ci} __attribute__((aligned(8))) ; 56162306a36Sopenharmony_ci 56262306a36Sopenharmony_ci/* no BLTBs in pa2.0 processors */ 56362306a36Sopenharmony_cistruct pdc_btlb_info_range { 56462306a36Sopenharmony_ci unsigned char res00; 56562306a36Sopenharmony_ci unsigned char num_i; 56662306a36Sopenharmony_ci unsigned char num_d; 56762306a36Sopenharmony_ci unsigned char num_comb; 56862306a36Sopenharmony_ci}; 56962306a36Sopenharmony_ci 57062306a36Sopenharmony_cistruct pdc_btlb_info { /* PDC_BLOCK_TLB, return of PDC_BTLB_INFO */ 57162306a36Sopenharmony_ci unsigned int min_size; /* minimum size of BTLB in pages */ 57262306a36Sopenharmony_ci unsigned int max_size; /* maximum size of BTLB in pages */ 57362306a36Sopenharmony_ci struct pdc_btlb_info_range fixed_range_info; 57462306a36Sopenharmony_ci struct pdc_btlb_info_range variable_range_info; 57562306a36Sopenharmony_ci}; 57662306a36Sopenharmony_ci 57762306a36Sopenharmony_cistruct pdc_mem_retinfo { /* PDC_MEM/PDC_MEM_MEMINFO (return info) */ 57862306a36Sopenharmony_ci unsigned long pdt_size; 57962306a36Sopenharmony_ci unsigned long pdt_entries; 58062306a36Sopenharmony_ci unsigned long pdt_status; 58162306a36Sopenharmony_ci unsigned long first_dbe_loc; 58262306a36Sopenharmony_ci unsigned long good_mem; 58362306a36Sopenharmony_ci}; 58462306a36Sopenharmony_ci 58562306a36Sopenharmony_cistruct pdc_mem_read_pdt { /* PDC_MEM/PDC_MEM_READ_PDT (return info) */ 58662306a36Sopenharmony_ci unsigned long pdt_entries; 58762306a36Sopenharmony_ci}; 58862306a36Sopenharmony_ci 58962306a36Sopenharmony_ci#ifdef __LP64__ 59062306a36Sopenharmony_cistruct pdc_memory_table_raddr { /* PDC_MEM/PDC_MEM_TABLE (return info) */ 59162306a36Sopenharmony_ci unsigned long entries_returned; 59262306a36Sopenharmony_ci unsigned long entries_total; 59362306a36Sopenharmony_ci}; 59462306a36Sopenharmony_ci 59562306a36Sopenharmony_cistruct pdc_memory_table { /* PDC_MEM/PDC_MEM_TABLE (arguments) */ 59662306a36Sopenharmony_ci unsigned long paddr; 59762306a36Sopenharmony_ci unsigned int pages; 59862306a36Sopenharmony_ci unsigned int reserved; 59962306a36Sopenharmony_ci}; 60062306a36Sopenharmony_ci#endif /* __LP64__ */ 60162306a36Sopenharmony_ci 60262306a36Sopenharmony_cistruct pdc_system_map_mod_info { /* PDC_SYSTEM_MAP/FIND_MODULE */ 60362306a36Sopenharmony_ci unsigned long mod_addr; 60462306a36Sopenharmony_ci unsigned long mod_pgs; 60562306a36Sopenharmony_ci unsigned long add_addrs; 60662306a36Sopenharmony_ci}; 60762306a36Sopenharmony_ci 60862306a36Sopenharmony_cistruct pdc_system_map_addr_info { /* PDC_SYSTEM_MAP/FIND_ADDRESS */ 60962306a36Sopenharmony_ci unsigned long mod_addr; 61062306a36Sopenharmony_ci unsigned long mod_pgs; 61162306a36Sopenharmony_ci}; 61262306a36Sopenharmony_ci 61362306a36Sopenharmony_cistruct pdc_initiator { /* PDC_INITIATOR */ 61462306a36Sopenharmony_ci int host_id; 61562306a36Sopenharmony_ci int factor; 61662306a36Sopenharmony_ci int width; 61762306a36Sopenharmony_ci int mode; 61862306a36Sopenharmony_ci}; 61962306a36Sopenharmony_ci 62062306a36Sopenharmony_ci/* Only used on some pre-PA2.0 boxes */ 62162306a36Sopenharmony_cistruct pdc_memory_map { /* PDC_MEMORY_MAP */ 62262306a36Sopenharmony_ci unsigned long hpa; /* mod's register set address */ 62362306a36Sopenharmony_ci unsigned long more_pgs; /* number of additional I/O pgs */ 62462306a36Sopenharmony_ci}; 62562306a36Sopenharmony_ci 62662306a36Sopenharmony_cistruct pdc_tod { 62762306a36Sopenharmony_ci unsigned long tod_sec; 62862306a36Sopenharmony_ci unsigned long tod_usec; 62962306a36Sopenharmony_ci}; 63062306a36Sopenharmony_ci 63162306a36Sopenharmony_ci/* architected results from PDC_PIM/transfer hpmc on a PA1.1 machine */ 63262306a36Sopenharmony_ci 63362306a36Sopenharmony_cistruct pdc_hpmc_pim_11 { /* PDC_PIM */ 63462306a36Sopenharmony_ci unsigned int gr[32]; 63562306a36Sopenharmony_ci unsigned int cr[32]; 63662306a36Sopenharmony_ci unsigned int sr[8]; 63762306a36Sopenharmony_ci unsigned int iasq_back; 63862306a36Sopenharmony_ci unsigned int iaoq_back; 63962306a36Sopenharmony_ci unsigned int check_type; 64062306a36Sopenharmony_ci unsigned int cpu_state; 64162306a36Sopenharmony_ci unsigned int rsvd1; 64262306a36Sopenharmony_ci unsigned int cache_check; 64362306a36Sopenharmony_ci unsigned int tlb_check; 64462306a36Sopenharmony_ci unsigned int bus_check; 64562306a36Sopenharmony_ci unsigned int assists_check; 64662306a36Sopenharmony_ci unsigned int rsvd2; 64762306a36Sopenharmony_ci unsigned int assist_state; 64862306a36Sopenharmony_ci unsigned int responder_addr; 64962306a36Sopenharmony_ci unsigned int requestor_addr; 65062306a36Sopenharmony_ci unsigned int path_info; 65162306a36Sopenharmony_ci unsigned long long fr[32]; 65262306a36Sopenharmony_ci}; 65362306a36Sopenharmony_ci 65462306a36Sopenharmony_ci/* 65562306a36Sopenharmony_ci * architected results from PDC_PIM/transfer hpmc on a PA2.0 machine 65662306a36Sopenharmony_ci * 65762306a36Sopenharmony_ci * Note that PDC_PIM doesn't care whether or not wide mode was enabled 65862306a36Sopenharmony_ci * so the results are different on PA1.1 vs. PA2.0 when in narrow mode. 65962306a36Sopenharmony_ci * 66062306a36Sopenharmony_ci * Note also that there are unarchitected results available, which 66162306a36Sopenharmony_ci * are hversion dependent. Do a "ser pim 0 hpmc" after rebooting, since 66262306a36Sopenharmony_ci * the firmware is probably the best way of printing hversion dependent 66362306a36Sopenharmony_ci * data. 66462306a36Sopenharmony_ci */ 66562306a36Sopenharmony_ci 66662306a36Sopenharmony_cistruct pdc_hpmc_pim_20 { /* PDC_PIM */ 66762306a36Sopenharmony_ci unsigned long long gr[32]; 66862306a36Sopenharmony_ci unsigned long long cr[32]; 66962306a36Sopenharmony_ci unsigned long long sr[8]; 67062306a36Sopenharmony_ci unsigned long long iasq_back; 67162306a36Sopenharmony_ci unsigned long long iaoq_back; 67262306a36Sopenharmony_ci unsigned int check_type; 67362306a36Sopenharmony_ci unsigned int cpu_state; 67462306a36Sopenharmony_ci unsigned int cache_check; 67562306a36Sopenharmony_ci unsigned int tlb_check; 67662306a36Sopenharmony_ci unsigned int bus_check; 67762306a36Sopenharmony_ci unsigned int assists_check; 67862306a36Sopenharmony_ci unsigned int assist_state; 67962306a36Sopenharmony_ci unsigned int path_info; 68062306a36Sopenharmony_ci unsigned long long responder_addr; 68162306a36Sopenharmony_ci unsigned long long requestor_addr; 68262306a36Sopenharmony_ci unsigned long long fr[32]; 68362306a36Sopenharmony_ci}; 68462306a36Sopenharmony_ci 68562306a36Sopenharmony_cistruct pim_cpu_state_cf { 68662306a36Sopenharmony_ci union { 68762306a36Sopenharmony_ci unsigned int 68862306a36Sopenharmony_ci iqv : 1, /* IIA queue Valid */ 68962306a36Sopenharmony_ci iqf : 1, /* IIA queue Failure */ 69062306a36Sopenharmony_ci ipv : 1, /* IPRs Valid */ 69162306a36Sopenharmony_ci grv : 1, /* GRs Valid */ 69262306a36Sopenharmony_ci crv : 1, /* CRs Valid */ 69362306a36Sopenharmony_ci srv : 1, /* SRs Valid */ 69462306a36Sopenharmony_ci trv : 1, /* CR24 through CR31 valid */ 69562306a36Sopenharmony_ci pad : 24, /* reserved */ 69662306a36Sopenharmony_ci td : 1; /* TOC did not cause any damage to the system state */ 69762306a36Sopenharmony_ci unsigned int val; 69862306a36Sopenharmony_ci }; 69962306a36Sopenharmony_ci}; 70062306a36Sopenharmony_ci 70162306a36Sopenharmony_cistruct pdc_toc_pim_11 { 70262306a36Sopenharmony_ci unsigned int gr[32]; 70362306a36Sopenharmony_ci unsigned int cr[32]; 70462306a36Sopenharmony_ci unsigned int sr[8]; 70562306a36Sopenharmony_ci unsigned int iasq_back; 70662306a36Sopenharmony_ci unsigned int iaoq_back; 70762306a36Sopenharmony_ci unsigned int check_type; 70862306a36Sopenharmony_ci struct pim_cpu_state_cf cpu_state; 70962306a36Sopenharmony_ci}; 71062306a36Sopenharmony_ci 71162306a36Sopenharmony_cistruct pdc_toc_pim_20 { 71262306a36Sopenharmony_ci unsigned long long gr[32]; 71362306a36Sopenharmony_ci unsigned long long cr[32]; 71462306a36Sopenharmony_ci unsigned long long sr[8]; 71562306a36Sopenharmony_ci unsigned long long iasq_back; 71662306a36Sopenharmony_ci unsigned long long iaoq_back; 71762306a36Sopenharmony_ci unsigned int check_type; 71862306a36Sopenharmony_ci struct pim_cpu_state_cf cpu_state; 71962306a36Sopenharmony_ci}; 72062306a36Sopenharmony_ci 72162306a36Sopenharmony_ci#endif /* !defined(__ASSEMBLY__) */ 72262306a36Sopenharmony_ci 72362306a36Sopenharmony_ci#endif /* _UAPI_PARISC_PDC_H */ 724