Subject: FWARC FastTrack [10/13/2006]: Niagara Crypto & RNG compatible property update I'm sponsoring this fastrack case for Eric Pilmore. The case augments the NCP and RNG compatible properties due to workarounds required for different implementations of the NCP and RNG embedded hardware on different processors. Requested committment level: Sun Private Release binding: minor/micro/patch. -David Template Version: @(#)sac_nextcase 1.2 10/31/08 SMI 1. Introduction 1.1. Project/Component Working Name: Niagara Crypto & RNG compatible property update 1.2. Name of Document Author/Supplier: Author: Eric Pilmore 1.3 Date of This Document: 05 October, 2006 4. Technical Description Version: "@(#)crypto-rng-binding.txt 1.2 06/10/05 SMI" Niagara Crypto & RNG compatibility property update Background In the course of porting the Niagara Crypto Provider (NCP) driver to Niagara-2 we found that the interface to the cryptographic unit, specifically the Modular Arithmetic Unit (MAU), of the Niagara chip changes slightly between Niagara-1 and Niagara-2 (applies to Victoria Falls also). This change only affects about dozen lines of code in the NCP driver. In order to maintain the same binary driver between Niagara-1 (N1) and Niagara-2 (N2) based platforms we would like to introduce a mechanism that allows the driver to determine the platform type that it is bound to. This case introduces new driver "bindings" for NCP which will be applicable to Niagara-2 (Huron) and Victoria Falls (Maramba) platforms. Note that Victoria Falls (VF) is the follow-on derivative processor for Niagara-2 (effectively a Niagara-2 without the Network Interface Unit). The case also introduces new driver bindings for N2CP and N2RNG as a proactive measure for issues going from N2 to VF for those respective drivers. Existing: Driver Name Binding CPU ----------- ------- --- ncp SUNW,sun4v-ncp N1 n2cp SUNW,n2-cwq N2 n2rng SUNW,n2-rng N2 Proposal: Driver Name Binding CPU ----------- ------- --- ncp SUNW,sun4v-ncp N1 ncp SUNW,n2-mau N2 <- new ncp SUNW,vf-mau VF <- new n2cp SUNW,n2-cwq N2 n2cp SUNW,vf-cwq VF <- new n2rng SUNW,n2-rng N2 n2rng SUNW,vf-rng VF <- new References PSARC/2005/125 Niagara Crypto Provider FWARC/2006/174 NCS HV API update FWARC/2006/425 NCS HV API update #2 FWARC/2006/481 Niagara-2 Random Number Generator HV API Niagara PRM, v1.8 (Oct 28, 2005), Chp 20 Modular Arithmetic Niagara-2 PRM, v1.2 (Mar 3, 2006), Chp 15 Stream Processing Unit Bugid 6475000 Asymmetric (RSA) Operation fails the known answer test API Definitions 1. Machine Description: NCP/N2CP/N2RNG virtual-device node Ref: FWARC/2005/173 (ino) FWARC/2006/072 (name, device-type, cfg-handle, compatible) This will be a change to ONLY the "compatible" field of the respective virtual-device MD nodes. Note that these MD nodes exist in the source base on a per-platform basis. 1.1 NCP virtual-device compatible property Name Tag Req Description ---- --- --- ----------- compatible PROP_DATA Y An array of string names for this node. Value to be defined as one of: "SUNW,sun4v-ncp", "SUNW,n2-mau", "SUNW,vf-mau". 1.2 N2CP virtual-device compatible property Name Tag Req Description ---- --- --- ----------- compatible PROP_DATA Y An array of string names for this node. Value to be defined as one of: "SUNW,n2-cwq", "SUNW,vf-cwq". 1.3 N2RNG virtual-device compatible property Name Tag Req Description ---- --- --- ----------- compatible PROP_DATA Y An array of string names for this node. Value to be defined as one of: "SUNW,n2-rng", "SUNW,vf-rng". See Exported Interface below for the specific instances of the full node that will exist for Niagara-1, Niagara-2, and Victoria Falls. 2. Virtual Crypto Device Node This will be a change to ONLY the "compatible" property of the respective OBP device nodes. Only that property is highlighted here as the remaining properties will remain unchanged. 2.1 NCP Properties "compatible" S Type: Prop-encoded-array of prop-encoded-strings Contents: Standard property name, defined devices with which this device is compatible. Value: "SUNW,sun4v-ncp", "SUNW,n2-mau", "SUNW,vf-mau". 2.2 N2CP Properties "compatible" S Type: Prop-encoded-array of prop-encoded-strings Contents: Standard property name, defined devices with which this device is compatible. Value: "SUNW,n2-cwq", "SUNW,vf-cwq". 2.3 N2RNG Properties "compatible" S Type: Prop-encoded-array of prop-encoded-strings Contents: Standard property name, defined devices with which this device is compatible. Value: "SUNW,n2-rng", "SUNW,vf-rng". 2.4 Open Firmware-defined Methods for Device Nodes None. ======================================================================== Exported Interfaces Specific propvals for ncp virtual device node across the possible processors: Niagara-1: name evolving value: "ncp" device_type evolving value: "crypto" interrupts evolving value: chip dependent list of device relative interrupts, 1 per core. compatible evolving value: "SUNW,sun4v-ncp" reg evolving value: unique virtual device register address. Niagara-2: name evolving value: "ncp" device_type evolving value: "crypto" interrupts evolving value: chip dependent list of device relative interrupts, 1 per core. compatible evolving value: "SUNW,n2-mau" reg evolving value: unique virtual device register address. name evolving value: "crypto" device_type evolving value: "crypto" interrupts evolving value: chip dependent list of device relative interrupts, 1 per core. compatible evolving value: "SUNW,n2-cwq" reg evolving value: unique virtual device register address. name evolving value: "random-number-generator" compatible evolving value: "SUNW,n2-rng" reg evolving value: unique virtual device register address. Victoria Falls: name evolving value: "ncp" device_type evolving value: "crypto" interrupts evolving value: chip dependent list of device relative interrupts, 1 per core. compatible evolving value: "SUNW,vf-mau" reg evolving value: unique virtual device register address. name evolving value: "crypto" device_type evolving value: "crypto" interrupts evolving value: chip dependent list of device relative interrupts, 1 per core. compatible evolving value: "SUNW,vf-cwq" reg evolving value: unique virtual device register address. name evolving value: "random-number-generator" compatible evolving value: "SUNW,vf-rng" reg evolving value: unique virtual device register address. NCS MD propvals for ncp/n2cp/n2rng virtual device metadata node across the possible processors: Niagara-1: name evolving value: "ncp" device-type evolving value: "crypto" intr evolving value: list of device relative interrupt numbers. ino evolving value: list of parent devinos. cfg-handle evolving value: devhandle for device compatible evolving value: "SUNW,sun4v-ncp" Niagara-2: name evolving value: "ncp" device-type evolving value: "crypto" intr evolving value: list of device relative interrupt numbers. ino evolving value: list of parent devinos. cfg-handle evolving value: devhandle for device compatible evolving value: "SUNW,n2-mau" name evolving value: "crypto" device-type evolving value: "crypto" intr evolving value: list of device relative interrupt numbers. ino evolving value: list of parent devinos. cfg-handle evolving value: devhandle for device compatible evolving value: "SUNW,n2-cwq" name evolving value: "random-number-generator" cfg-handle evolving value: devhandle for device compatible evolving value: "SUNW,n2-rng" Victoria Falls: name evolving value: "ncp" device-type evolving value: "crypto" intr evolving value: list of device relative interrupt numbers. ino evolving value: list of parent devinos. cfg-handle evolving value: devhandle for device compatible evolving value: "SUNW,vf-mau" name evolving value: "crypto" device-type evolving value: "crypto" intr evolving value: list of device relative interrupt numbers. ino evolving value: list of parent devinos. cfg-handle evolving value: devhandle for device compatible evolving value: "SUNW,vf-cwq" name evolving value: "random-number-generator" cfg-handle evolving value: devhandle for device compatible evolving value: "SUNW,vf-rng" 6. Resources and Schedule 6.4. Steering Committee requested information 6.4.1. Consolidation C-team Name: sysfw 6.5. ARC review type: FastTrack