1. Introduction 1.1. Project/Component Working Name: Amaranth (VVV2 update) 1.2. Name of Document Author/Supplier: Author: Li Ye 1.3. Date of This Document: 28 May, 2007 2. Project Summary This project, which is an enhancement of VVV2 (PSARC/2006/362) [1], improves the PCI device information collecting method, and provides an add-on module to submit users' Solaris system to the HCL (Hardware Compatibility List) (PSARC/2004/552) [2]. 4. Technical Description: 4.1 Background VVV2 Work Flow -------------- The existing VVV2 (Sun Device Detection Tool) is a device driver detection tool which helps customers and sales people to make sure their component drivers are available on Solaris OS before adoption. VVV2 is a cross-platform utility, the working process is described in PSARC/2005/362 [1]. Firstly, it gets the device information by running specific system commands respectively on Solaris, Linux and Windows OS. ----------------------------------------------------------------- | OS | System Command | ----------------------------------------------------------------- | Solaris | prtconf -pv | | Linux | lspci -vv -n | | Windows | reg query hklm\system\currentcontrolset\enum\pci /s | ----------------------------------------------------------------- (table-1) Then, VVV2 parses the device information collected, by comparing them with a driver database, so as to determine whether the component has a Solaris driver (bundled or third-party driver). Finally, the tool creates and displays a report to users. Limitations ----------- VVV2's device information collecting method depends on the availability and robustness of above system commands, and their output message format. It has the limitations: Firstly, it only runs on a part of Linux distributions, since lspci is not the default command for all distributions. Furthermore, if a command is broken (e.g. the reg.exe program on some Windows system is broken), VVV2 would fail on the system. Secondly, VVV2 parses the output message of system commands to extract device information such as vendor id, device id, etc.. Any change of the output message format will prevent the tool from run successfully. That is why the only Windows edition supported by VVV2 is Windows XP -- the output message format is different on different Windows editions, and each edition requires a separated parsing method. 4.2 Proposal To solve the limitations and to provide more features, Amaranth provides some modification and introduces the new features. Data Collection Enhancement --------------------------- Amaranth enhances the method of collecting device information. Besides VVV2's collection method, Amaranth imports following interfaces to collect device information: ------------------------------------------------------------------- | Os Type | Interface | Solution | ------------------------------------------------------------------- | Solaris | libdevinfo | Looking up PCI nodes in prom tree and | | | | reading device data from the nodes | ------------------------------------------------------------------- | Linux | /proc/bus/pci | Scanning the file of /proc/bus/pci | | | | and reading device data from it | ------------------------------------------------------------------- | Windows | Win32 API | Reading device data from registry | | | | through Win32 API | ------------------------------------------------------------------- (table-2) Amaranth is a Java application, it builds a JNI binding for each of the interfaces to collect device information. The enhancement frees Amaranth from dependence of system commands. For Solaris OS, libdevinfo has a commitment level of evolving (PSARC/1997/127)[3]. It should be more stable than prtconf which was defined unstable interface in PSARC/2001/375 [4]. For Linux OS, Amaranth can run on those distributions which don't install lspci. For Windows OS, Amaranth runs on Windows 2000, Windows 2003, Windows XP, and Windows Vista OS, for the format of device information collected from those editions through Win32 API is identical. Furthermore, Amaranth also runs on Windows systems with a broken reg.exe program. Therefore, the scope of Amaranth is much wider than VVV2's. New Features ------------ 1)Feeding device information into Amaranth from plain text files Amaranth allows device information to be fed into it from plain text files that contain the output message of system commands listed in table-1. The received device information is scanned and parsed by Amaranth to extract device data (vendor id, device id, and so on). This feature enables remote machines, which don't run Amaranth, to use Operating System commands (prtconf, lspci, and reg query) to gather device information. And then the collected information is fed to Amaranth on any OS to generate the report. 2)HCL submission module HCL submission module enables customers submit their Solaris system information to HCL "Report to Work" list. The similar function is provided by Sun BigAdmin web page, http://www.sun.com/bigadmin/hcl/submittal/submit.jsp. This module is available on Solaris 10 and Solaris Express, Developer Edition updates. The feature just benefits Solaris users who have Internet access. HCL submission module provides a graphic UI to receive users' manual-input information that is contact information (name, company and email address), and a few of system information (such as non-standard BIOS settings, mother board revision level, installed patches, and so on). The module automatically detects some system information including manufacturer, model of computer, OS Revision, CPU Type, CPU number, BIOS maker etc.. The auto detection is implemented by scanning /dev/smbios and CPUID 0x80000002 ~ 0x80000004 function. Finally, the module sends all of auto-detected information, manual-input information and the output message of prtconf and prtdiag to Sun. After the information is audited by HCL team members, user's system will be listed into HCL "Report to Work" list. The module automatically detects most mandatory data which requires users extra efforts. It not only prevents submitted data from typo, but also facilitates the submission process. At the same time, combining HCL submission module with Amaranth could improve the extensibility of HCL list. 4.5 Interfaces Newly imported interfaces: ------------------------------------------------------------------- | Os Type | Interface | Purpose | ------------------------------------------------------------------- | Solaris | libdevinfo | Collecting Device Information | | |---------------|---------------------------------------| | | /dev/smbios | Detecting System and BIOS Information | | | CPUID | Detecting CPU Type | ------------------------------------------------------------------- | Linux | /proc/bus/pci | Collecting Device Information | ------------------------------------------------------------------- | Windows | Win32 API | Collecting Device Information | ------------------------------------------------------------------- 4.12 Dependencies Java Platform, Standard Edition (J2SE) Runtime Environment (JRE) 1.4 or later. 6. Resources and Schedule: 6.4 Steering Committee requested information 6.4.1. Consolidation C-team Name: HCTS Consolidation 6.5 ARC review type: FastTrack A. Reference [1] PSARC/2006/362: VVV2 [2] PSARC/2004/552: HCTS 2.4 [3] PSARC/1997/127: libdevinfo reimplementation [4] PSARC/2001/375: Improvements to prtconf