diff mbox series

FWTS Compliance test suit: FACS Firmware ACPI Control Structure test issue

Message ID CAFd313xSzsAH1yAnjv4NQsewWMUC5K3_d=4qWQLZtf+JZHLHWg@mail.gmail.com
State Superseded
Headers show
Series FWTS Compliance test suit: FACS Firmware ACPI Control Structure test issue | expand

Commit Message

Rameshwar Prasad Sahu April 6, 2018, 8 a.m. UTC
Hi All,

This is Rameshwar Prasad Sahu from company called "Ampere Computing".
I am currently running FWTS compliance test suit on our ARM64 arch
based development boards.

I came across below test cases failure:
facs: FACS Firmware ACPI Control Structure test.
------------------------------------------------------------
--------------------
Test 1 of 1: FACS Firmware ACPI Control Structure test.
FACS Firmware ACPI Control Structure:
  Signature:                'FACS'
  Length:                   0x00000040
  Hardware Signature:       0x00000000
  Firmware Waking Vector:   0x00000000
  Global Lock:              0x00000000
  Flags:                    0x00000000
  X-Firmware Waking Vector: 0x0000000000000000
  Version:                  0x02
  Reserved:                 0x00 0x00 0x00
  OSPM Flags:               0x00000000
  Reserved:                 0x00 0x00 0x00 0x00
  Reserved:                 0x00 0x00 0x00 0x00
  Reserved:                 0x00 0x00 0x00 0x00
  Reserved:                 0x00 0x00 0x00 0x00
  Reserved:                 0x00 0x00 0x00 0x00
  Reserved:                 0x00 0x00 0x00 0x00
FAILED [MEDIUM] FACSNotReserved: Test 1, FACS: The FACS does not seem to be
in a
reserved memory region, check that the BIOS memory map is correctly
reserving
the address space 0xbfffd40040-0xbfffd40080

============================================================
====================
0 passed, 1 failed, 0 warning, 0 aborted, 0 skipped, 0 info only.
============================================================
====================


While debugging this test case failure issue I found that our BIOS
code is fine with memory allocation for FACS structure from the
expected reserved memory zone and there is compliance test suit coding
issue, which explained as below:

I am using Linux 4.11.0 kernel to run this test suit, so basically
here is the FWTS coding flow for FACS structure memory check test:

1. First FWTS try to gather the BIOS memory map list info from the sysfs
files
called "/sys/firmware/memmap" which currently doesn't exists for the ARM
arch.
Currently it exists only for x86 arch by the driver module called
"/linux/arch/x86/kernel/e820.c", so in our case we fail here.

2. If it fails in #1 (e.g. in our case it failed) then it try to get BIOS
memory map list info from the klog(kernel log) by searching string
"BIOS-memory_map" in klog and add BIOS memory map  info in the list if
found this in klog but we fail here also because "BIOS-memory_map"
string doesn't exists in klog for 4.11 kernel,so we BIOS memory map
info list is empty.

3. As per my understanding/debugging, the FWTS compliance test suit
code does't take care of #2 failure, I mean it assumes that we got
BIOS memory map list from the klog always even though there is no such
string "BIOS-memory_map" in klog. So before checking FACS structure
address is reserved or not by comparing range in BIOS memory map list,
it should check whether list is empty or not.

Here I attached my patch work to fix above issue, correct me if I am wrong
here.

Also could you people please guide me with you kind suggestions here.

Thanks,
Ram

Running 98 tests, results appended to results.log
Test: Gather kernel system information.                                     
  Gather kernel signature.                                1 skipped, 1 info only
  Gather kernel system information.                       1 info only          
  Gather kernel boot command line.                        1 info only          
  Gather ACPI driver version.                             1 info only          
Test: OPAL Processor Recovery Diagnostics Info                              
  Test skipped, missing features: devicetree                                   
Test: Scan kernel log for Oopses.                                           
  Kernel log oops check.                                  2 passed             
Test: Run OLOG scan and analysis checks.                                    
 Test skipped.                                                                 
Test: Scan kernel log for errors and warnings.                              
  Kernel log error check.                                 1 passed             
Test: BMC Info                                                              
  Test skipped, missing features: IPMI                                         
Test: General ACPI information test.                                        
  Determine Kernel ACPI version.                          1 info only          
  Determine machine's ACPI version.                       1 info only          
  Determine AML compiler.                                 1 info only          
Test: Sanity check UEFI ESRT Table.                                         
  Sanity check UEFI ESRT Table.                           1 passed             
Test: Dump ESRT table.                                                      
  Dump ESRT Table.                                                             
Test: Authenticated variable tests.                                         
 Test aborted.                                                                 
Test: Sanity check for UEFI Boot Path Boot####.                             
  Test UEFI Boot Path Boot####.                           6 passed             
Test: UEFI variable info query.                                             
 Test aborted.                                                                 
Test: UEFI secure boot test.                                                
 Test aborted.                                                                 
Test: UEFI miscellaneous runtime service interface tests.                   
 Test aborted.                                                                 
Test: UEFI Runtime service variable interface tests.                        
 Test aborted.                                                                 
Test: UEFI Runtime service time interface tests.                            
 Test aborted.                                                                 
Test: Dump UEFI variables.                                                  
  Dump UEFI Variables.                                                         
Test: Test firmware has set PCI Express MaxReadReq to a higher value on n.. 
  Test firmware settings MaxReadReq for PCI Express de..  1 passed             
Test: PCIe ASPM test.                                                       
  PCIe ASPM ACPI test.                                                         
  PCIe ASPM registers test.                               4 passed, 9 warnings 
Test: OPAL MTD Info                                                         
  Test skipped, missing features: devicetree                                   
Test: DMI/SMBIOS table tests.                                               
  Find and test SMBIOS Table Entry Points.                4 passed             
  Test DMI/SMBIOS tables for errors.                                           
  Test DMI/SMBIOS3 tables for errors.                     22 passed, 10 failed 
  Test ARM SBBR SMBIOS structure requirements.            12 passed, 5 skipped 
Test: CPU frequency scaling tests.                                          
  CPU frequency table consistency                         1 passed             
  CPU frequency table duplic[   70.556905] rtc-efi rtc-efi: write status is 3  
ates                          1 passed
                                                                [   70.584361] rtc-efi rtc-efi: write status is 3
  CPU frequency firmware limits                           1 passed
                              [   70.612605] rtc-efi rtc-efi: write status is 3
  CPU frequency claimed maximum                           1 passed
  CPU frequency SW_ANY control                            1 skipped            
  CPU frequency SW_ALL control                            1 skipped            
  CPU frequency performance tests.                        1 passed             
Test: XENV Xen Environment Table tests.                                     
 Test skipped.                                                                 
Test: XSDT Extended System Description Table test.                          
  XSDT Extended System Description Table test.            1 passed             
Test: WSMT Windows SMM Security Mitigations Table test.                     
 Test skipped.                                                                 
Test: WPBT Windows Platform Binary Table test.                              
 Test skipped.                                                                 
Test: WDAT Microsoft Hardware Watchdog Action Table test.                   
 Test skipped.                                                                 
Test: ACPI Wakealarm tests.                                                 
  Test existence of RTC with alarm interface.             1 passed             
  Trigger wakealarm for 1 seconds in the future.          1 failed             
  Test if wakealarm is fired.                             1 failed             
  Multiple wakealarm firing tests.                        1 failed             
  Reset wakealarm time.                                   1 passed, 1 failed   
Test: WAET Windows ACPI Emulated Devices Table test.                        
 Test skipped.                                                                 
Test: UEFI Data Table test.                                                 
 Test skipped.                                                                 
Test: TPM2 Trusted Platform Module 2 test.                                  
 Test skipped.                                                                 
Test: TCPA Trusted Computing Platform Alliance Capabilities Table test.     
 Test skipped.                                                                 
Test: Re-assemble DSDT and SSDTs to find syntax errors and warnings.        
  Disassemble and reassemble DSDT and SSDTs.              4 failed             
Test: STAO Status Override Table test.                                      
 Test skipped.                                                                 
Test: SRAT System Resource Affinity Table test.                             
 Test skipped.                                                                 
Test: SPMI Service Processor Management Interface Description Table test.   
 Test skipped.                                                                 
Test: SPCR Serial Port Console Redirection Table test.                      
  SPCR Serial Port Console Redirection Table test.        1 passed             
  SPCR Revision Test.                                     1 passed             
  SPCR GSIV Interrupt Test.                               1 passed             
Test: SLIT System Locality Distance Information test.                       
 Test skipped.                                                                 
Test: SLIC Software Licensing Description Table test.                       
 Test skipped.                                                                 
Test: SDEV Secure Devices Table test                                        
 Test skipped.                                                                 
Test: SDEI Software Delegated Exception Interface Table test                
 Test skipped.                                                                 
Test: SBST Smart Battery Specification Table test.                          
 Test skipped.                                                                 
Test: RSDT Root System Description Table test.                              
 Test skipped.                                                                 
Test: SBBR RSDP Root System Description Pointer tests.                      
  RSDP Root System Description Pointer test.              1 passed             
Test: RSDP Root System Description Pointer test.                            
  RSDP Root System Description Pointer test.              8 passed             
Test: RASF RAS Feature Table test                                           
 Test skipped.                                                                 
Test: PPTT Processor Properties Topology Table test.                        
 Test skipped.                                                                 
Test: PMTT Memory Topology Table test.                                      
 Test skipped.                                                                 
Test: Dump ACPI _PLD (Physical Device Location).                            
  Dump ACPI _PLD (Physical Device Location).                                   
Test: PDTT Platform Debug Trigger Table test.                               
 Test skipped.                                                                 
Test: PCCT Platform Communications Channel test.                            
  Validate PCC table.                                     1 passed             
Test: NFIT NVDIMM Firmware Interface Table test.                            
 Test skipped.                                                                 
Test: ACPI DSDT Method Semantic tests.                                      
  Test Method Names.                                      1 passed             
  Test _AEI.                                              1 passed             
  Test _EVT (Event Method).                               1 passed             
  Test _DLM (Device Lock Mutex).                          1 skipped            
  Test _PIC (Inform AML of Interrupt Model).              1 skipped            
  Test _CID (Compatible ID).                              37 passed, 2 failed  
  Test _DDN (DOS Device Name).                            28 passed            
  Test _HID (Hardware ID).                                98 passed            
  Test _HRV (Hardware Revision Number).                   1 skipped            
  Test _MLS (Multiple Language String).                   1 skipped            
  Test _PLD (Physical Device Location).                   1 skipped            
  Test _SUB (Subsystem ID).                               1 skipped            
  Test _SUN (Slot User Number).                           1 passed             
  Test _STR (String).                                     40 passed            
  Test _UID (Unique ID).                                  94 passed            
  Test _CDM (Clock Domain).                               1 skipped            
  Test _CRS (Current Resource Settings).                  42 passed            
  Test _DSD (Device Specific Data).                                            
  Test _DIS (Disable).                                    1 skipped            
  Test _DMA (Direct Memory Access).                       8 passed             
  Test _FIX (Fixed Register Resource Provider).           1 skipped            
  Test _GSB (Global System Interrupt Base).               1 skipped            
  Test _HPP (Hot Plug Parameters).                        1 skipped            
  Test _PRS (Possible Resource Settings).                 1 skipped            
  Test _PRT (PCI Routing Table).                          8 passed             
  Test _PXM (Proximity).                                  1 skipped            
  Test _CCA (Cache Coherency Attribute).                  49 passed            
  Test _EDL (Eject Device List).                          1 skipped            
  Test _EJD (Ejection Dependent Device).                  1 skipped            
  Test _EJ0 (Eject).                                      1 skipped            
  Test _EJ1 (Eject).                                      1 skipped            
  Test _EJ2 (Eject).                                      1 skipped            
  Test _EJ3 (Eject).                                      1 skipped            
  Test _EJ4 (Eject).                                      1 skipped            
  Test _LCK (Lock).                                       1 skipped            
  Test _RMV (Remove).                                     1 skipped            
  Test _STA (Status).                                     29 passed            
  Test _DEP (Operational Region Dependencies).            1 skipped            
  Test _FIT (Firmware Interface Table).                   1 skipped            
  Test _BDN (BIOS Dock Name).                             1 skipped            
  Test _BBN (Base Bus Number).                            8 passed             
  Test _DCK (Dock).                                       1 skipped            
  Test _INI (Initialize).                                 2 passed             
  Test _GLK (Global Lock).                                1 skipped            
  Test _SEG (Segment).                                    8 passed             
  Test _LSI (Label Storage Information).                  1 skipped            
  Test _OFF (Set resource off).                           1 skipped            
  Test _ON_ (Set resource on).                            1 skipped            
  Test _DSW (Device Sleep Wake).                          1 skipped            
  Test _IRC (In Rush Current).                            1 skipped            
  Test _PRE (Power Resources for Enumeration).            1 skipped            
  Test _PR0 (Power Resources for D0).                     1 skipped            
  Test _PR1 (Power Resources for D1).                     1 skipped            
  Test _PR2 (Power Resources for D2).                     1 skipped            
  Test _PR3 (Power Resources for D3).                     1 skipped            
  Test _PRW (Power Resources for Wake).                   1 skipped            
  Test _PS0 (Power State 0).                              1 skipped            
  Test _PS1 (Power State 1).                              1 skipped            
  Test _PS2 (Power State 2).                              1 skipped            
  Test _PS3 (Power State 3).                              1 skipped            
  Test _PSC (Power State Current).                        1 skipped            
  Test _PSE (Power State for Enumeration).                1 skipped            
  Test _PSW (Power State Wake).                           1 skipped            
  Test _S1D (S1 Device State).                            1 skipped            
  Test _S2D (S2 Device State).                            1 skipped            
  Test _S3D (S3 Device State).                            1 skipped            
  Test _S4D (S4 Device State).                            1 skipped            
  Test _S0W (S0 Device Wake State).                       1 skipped            
  Test _S1W (S1 Device Wake State).                       1 skipped            
  Test _S2W (S2 Device Wake State).                       1 skipped            
  Test _S3W (S3 Device Wake State).                       1 skipped            
  Test _S4W (S4 Device Wake State).                       1 skipped            
  Test _RST (Device Reset).                               1 skipped            
  Test _PRR (Power Resource for Reset).                   1 skipped            
  Test _S0_ (S0 System State).                            1 skipped            
  Test _S1_ (S1 System State).                            1 skipped            
  Test _S2_ (S2 System State).                            1 skipped            
  Test _S3_ (S3 System State).                            1 skipped            
  Test _S4_ (S4 System State).                            1 skipped            
  Test _S5_ (S5 System State).                            1 skipped            
  Test _SWS (System Wake Source).                         1 skipped            
  Test _PSS (Performance Supported States).               1 skipped            
  Test _CPC (Continuous Performance Control).             32 passed            
  Test _CSD (C State Dependencies).                       1 skipped            
  Test _CST (C States).                                   1 skipped            
  Test _PCT (Performance Control).                        1 skipped            
  Test _PDL (P-State Depth Limit).                        1 skipped            
  Test _PPC (Performance Present Capabilities).           1 skipped            
  Test _PPE (Polling for Platform Error).                 1 skipped            
  Test _PSD (Power State Dependencies).                   32 passed            
  Test _PTC (Processor Throttling Control).               1 skipped            
  Test _TDL (T-State Depth Limit).                        1 skipped            
  Test _TPC (Throttling Present Capabilities).            1 skipped            
  Test _TSD (Throttling State Dependencies).              1 skipped            
  Test _TSS (Throttling Supported States).                1 skipped            
  Test _LPI (Low Power Idle States).                      48 passed            
  Test _RDI (Resource Dependencies for Idle).             1 skipped            
  Test _PUR (Processor Utilization Request).              1 skipped            
  Test _MSG (Message).                                    1 skipped            
  Test _SST (System Status).                              1 warning, 1 skipped 
  Test _ALC (Ambient Light Colour Chromaticity).          1 skipped            
  Test _ALI (Ambient Light Illuminance).                  1 skipped            
  Test _ALT (Ambient Light Temperature).                  1 skipped            
  Test _ALP (Ambient Light Polling).                      1 skipped            
  Test _ALR (Ambient Light Response).                     1 skipped            
  Test _LID (Lid Status).                                 1 skipped            
  Test _GTF (Get Task File).                              1 skipped            
  Test _GTM (Get Timing Mode).                            1 skipped            
  Test _MBM (Memory Bandwidth Monitoring Data).           1 skipped            
  Test _UPC (USB Port Capabilities).                      1 skipped            
  Test _UPD (User Presence Detect).                       1 skipped            
  Test _UPP (User Presence Polling).                      1 skipped            
  Test _GCP (Get Capabilities).                           1 skipped            
  Test _GRT (Get Real Time).                              1 skipped            
  Test _GWS (Get Wake Status).                            1 skipped            
  Test _CWS (Clear Wake Status).                          1 skipped            
  Test _SRT (Set Real Time).                              1 skipped            
  Test _STP (Set Expired Timer Wake Policy).              1 skipped            
  Test _STV (Set Timer Value).                            1 skipped            
  Test _TIP (Expired Timer Wake Policy).                  1 skipped            
  Test _TIV (Timer Values).                               1 skipped            
  Test _SBS (Smart Battery Subsystem).                    1 skipped            
  Test _BCT (Battery Charge Time).                        1 skipped            
  Test _BIF (Battery Information).                        1 skipped            
  Test _BIX (Battery Information Extended).               1 skipped            
  Test _BMA (Battery Measurement Averaging).              1 skipped            
  Test _BMC (Battery Maintenance Control).                1 skipped            
  Test _BMD (Battery Maintenance Data).                   1 skipped            
  Test _BMS (Battery Measurement Sampling Time).          1 skipped            
  Test _BST (Battery Status).                             1 skipped            
  Test _BTP (Battery Trip Point).                         1 skipped            
  Test _BTH (Battery Throttle Limit).                     1 skipped            
  Test _BTM (Battery Time).                               1 skipped            
  Test _PCL (Power Consumer List).                        1 skipped            
  Test _PIF (Power Source Information).                   1 skipped            
  Test _PRL (Power Source Redundancy List).               1 skipped            
  Test _PSR (Power Source).                               1 skipped            
  Test _GAI (Get Averaging Level).                        1 skipped            
  Test _GHL (Get Harware Limit).                          1 skipped            
  Test _PMC (Power Meter Capabilities).                   1 skipped            
  Test _PMD (Power Meter Devices).                        1 skipped            
  Test _PMM (Power Meter Measurement).                    1 skipped            
  Test _WPC (Wireless Power Calibration).                 1 skipped            
  Test _WPP (Wireless Power Polling).                     1 skipped            
  Test _FIF (Fan Information).                            1 skipped            
  Test _FPS (Fan Performance States).                     1 skipped            
  Test _FSL (Fan Set Level).                              1 skipped            
  Test _FST (Fan Status).                                 1 skipped            
  Test _ACx (Active Cooling).                             10 skipped           
  Test _ART (Active Cooling Relationship Table).          1 skipped            
  Test _CRT (Critical Trip Point).                        1 skipped            
  Test _CR3 (Warm/Standby Temperature).                   1 skipped            
  Test _DTI (Device Temperature Indication).              1 skipped            
  Test _HOT (Hot Temperature).                            1 skipped            
  Test _MTL (Minimum Throttle Limit).                     1 skipped            
  Test _NTT (Notification Temp Threshold).                1 skipped            
  Test _PSL (Passive List).                               1 skipped            
  Test _PSV (Passive Temp).                               1 skipped            
  Test _RTV (Relative Temp Values).                       1 skipped            
  Test _SCP (Set Cooling Policy).                         1 skipped            
  Test _TC1 (Thermal Constant 1).                         1 skipped            
  Test _TC2 (Thermal Constant 2).                         1 skipped            
  Test _TFP (Thermal fast Sampling Period).               1 skipped            
  Test _TMP (Thermal Zone Current Temp).                  1 skipped            
  Test _TPT (Trip Point Temperature).                     1 skipped            
  Test _TRT (Thermal Relationship Table).                 1 skipped            
  Test _TSN (Thermal Sensor Device).                      1 skipped            
  Test _TSP (Thermal Sampling Period).                    1 skipped            
  Test _TST (Temperature Sensor Threshold).               1 skipped            
  Test _TZD (Thermal Zone Devices).                       1 skipped            
  Test _TZM (Thermal Zone member).                        1 skipped            
  Test _TZP (Thermal Zone Polling).                       1 skipped            
  Test _GPE (General Purpose Events).                     1 skipped            
  Test _EC_ (EC Offset Query).                            1 skipped            
  Test _PTS (Prepare to Sleep).                                                
  Test _TTS (Transition to State).                        1 skipped            
  Test _WAK (System Wake).                                                     
  Test _ADR (Return Unique ID for Device).                9 passed             
  Test _BCL (Query List of Brightness Control Levels S..  1 skipped            
  Test _BCM (Set Brightness Level).                       1 skipped            
  Test _BQC (Brightness Query Current Level).             1 skipped            
  Test _DCS (Return the Status of Output Device).         1 skipped            
  Test _DDC (Return the EDID for this Device).            1 skipped            
  Test _DSS (Device Set State).                           1 skipped            
  Test _DGS (Query Graphics State).                       1 skipped            
  Test _DOD (Enumerate All Devices Attached to Display..  1 skipped            
  Test _DOS (Enable/Disable Output Switching).            1 skipped            
  Test _GPD (Get POST Device).                            1 skipped            
  Test _ROM (Get ROM Data).                               1 skipped            
  Test _SPD (Set POST Device).                            1 skipped            
  Test _VPO (Video POST Options).                         1 skipped            
  Test _CBA (Configuration Base Address).                 8 passed             
  Test _IFT (IPMI Interface Type).                        1 skipped            
  Test _SRV (IPMI Interface Revision).                    1 skipped            
Test: MSDM Microsoft Data Management Table test.                            
 Test skipped.                                                                 
Test: MSCT Maximum System Characteristics Table test.                       
 Test skipped.                                                                 
Test: MPST Memory Power State Table test.                                   
 Test skipped.                                                                 
Test: MCHI Management Controller Host Interface Table test.                 
 Test skipped.                                                                 
Test: MADT Multiple APIC Description Table (spec compliant).                
  MADT checksum test.                                     1 passed             
  MADT revision test.                                     2 passed             
  MADT architecture minimum revision test.                1 passed             
  MADT flags field reserved bits test.                    1 passed             
  MADT subtable tests.                                    205 passed           
Test: LPIT Low Power Idle Table test.                                       
 Test skipped.                                                                 
Test: IORT IO Remapping Table test.                                         
  IORT IO Remapping Table test.                           1 passed             
Test: HMAT Heterogeneous Memory Attribute Table test.                       
 Test skipped.                                                                 
Test: HEST Hardware Error Source Table test.                                
  HEST Hardware Error Source Table test.                  1 passed             
Test: GTDT Generic Timer Description Table test.                            
  GTDT Generic Timer Description Table test.              1 passed             
Test: Dump GPEs.                                                            
  Dump GPEs.                                                                   
Test: FPDT Firmware Performance Data Table test.                            
 Test skipped.                                                                 
Test: SBBR FADT Fixed ACPI Description Table tests.                         
  FADT Revision Test.                                     1 passed             
  FADT Reduced HW Test.                                   4 passed             
  FADT Server Profile Test.                               1 failed             
  FADT PSCI Compliant Test.                               1 passed             
Test: FADT Fixed ACPI Description Table tests.                              
  ACPI FADT Description Table flag info.                  1 info only          
  FADT checksum test.                                     1 passed             
  FADT revision test.                                     1 warning            
  ACPI FADT Description Table tests.                      10 passed            
  Test FADT SCI_EN bit is enabled.                        1 skipped            
  Test FADT reset register.                               1 skipped            
Test: FACS Firmware ACPI Control Structure test.                            
  FACS Firmware ACPI Control Structure test.              1 failed             
Test: ERST Error Record Serialization Table test.                           
 Test skipped.                                                                 
Test: EINJ Error Injection Table test.                                      
 Test skipped.                                                                 
Test: ECDT Embedded Controller Boot Resources Table test.                   
 Test skipped.                                                                 
Test: DRTM D-RTM Resources Table test.                                      
 Test skipped.                                                                 
Test: DPPT DMA Protection Policy Table test                                 
 Test skipped.                                                                 
Test: Wireless power calibration device test                                
 Test skipped.                                                                 
Test: Time and alarm device test                                            
 Test skipped.                                                                 
Test: Ambient light sensor device test                                      
 Test skipped.                                                                 
Test: Lid device test                                                       
 Test skipped.                                                                 
Test: Sleep button device test                                              
 Test skipped.                                                                 
Test: Power button device test                                              
  Test _HID (Hardware ID).                                1 passed             
Test: ACPI embedded controller device test                                  
 Test skipped.                                                                 
Test: ACPI smart battery device test                                        
 Test skipped.                                                                 
Test: ACPI battery device test                                              
 Test skipped.                                                                 
Test: AC adapter device test                                                
 Test skipped.                                                                 
Test: DBG2 (Debug Port Table 2) test.                                       
  DBG2 (Debug Port Table 2) test.                         1 passed             
  DBG2 ARM SBSA Generic UART test,                        1 passed             
Test: DBGP (Debug Port) Table test.                                         
 Test skipped.                                                                 
Test: CSRT Core System Resource Table test.                                 
 Test skipped.                                                                 
Test: Dump ACPI _PRS resources.                                             
  Dump ACPI _PRS (Possible Resource Settings).                                 
Test: Dump ACPI _CRS resources.                                             
  Dump ACPI _CRS (Current Resource Settings).                                  
Test: CPEP Corrected Platform Error Polling Table test.                     
 Test skipped.                                                                 
Test: ACPI table checksum test.                                             
  ACPI table checksum test.                               16 passed            
Test: BOOT Table test.                                                      
 Test skipped.                                                                 
Test: BGRT Boot Graphics Resource Table test.                               
 Test skipped.                                                                 
Test: BERT Boot Error Record Table test.                                    
  BERT Boot Error Record Table test.                      1 passed             
Test: ASPT Table test.                                                      
 Test skipped.                                                                 
Test: ASF! Alert Standard Format Table test.                                
 Test skipped.                                                                 
Test: ACPI table headers sanity tests.                                      
  Test that processors only exist in the _SB namespace.   1 passed             
  Test DSDT and SSDT tables are implemented.              2 passed             
  Check for recommended ACPI tables.                      5 passed, 9 warnings 
Test: ACPI table headers sanity tests.                                      
  Test ACPI headers.                                      14 passed            
Test: Dump ACPI tables.                                                     
  Dump ACPI tables.                                       1 info only          
[root@dhcp-10-48-13-41 apm-benchmark]# 
 CTRL-A Z for help |115200 8N1 | NOR | Minicom 2.5    | VT102 |      Offline

Comments

Alex Hung April 6, 2018, 8:39 p.m. UTC | #1
Hi Rameshwar,

Thanks for providing information and a patch for fwts.

Could you please submit the patch, with signed-off-by, by git, ex. git
send-email --to fwts-devel@lists.ubuntu.com facs.patch? You may want
to have the analysis as part of patch descriptions. It is easier for
maintainers to applying and keeping tracks of new patches.

Please let me know if you still have questions about submitting patches to fwts.

Cheers,
Alex Hung

On Fri, Apr 6, 2018 at 1:00 AM, Rameshwar Sahu <rsahu@apm.com> wrote:
> Hi All,
>
> This is Rameshwar Prasad Sahu from company called "Ampere Computing".
> I am currently running FWTS compliance test suit on our ARM64 arch
> based development boards.
>
> I came across below test cases failure:
> facs: FACS Firmware ACPI Control Structure test.
> --------------------------------------------------------------------------------
> Test 1 of 1: FACS Firmware ACPI Control Structure test.
> FACS Firmware ACPI Control Structure:
>   Signature:                'FACS'
>   Length:                   0x00000040
>   Hardware Signature:       0x00000000
>   Firmware Waking Vector:   0x00000000
>   Global Lock:              0x00000000
>   Flags:                    0x00000000
>   X-Firmware Waking Vector: 0x0000000000000000
>   Version:                  0x02
>   Reserved:                 0x00 0x00 0x00
>   OSPM Flags:               0x00000000
>   Reserved:                 0x00 0x00 0x00 0x00
>   Reserved:                 0x00 0x00 0x00 0x00
>   Reserved:                 0x00 0x00 0x00 0x00
>   Reserved:                 0x00 0x00 0x00 0x00
>   Reserved:                 0x00 0x00 0x00 0x00
>   Reserved:                 0x00 0x00 0x00 0x00
> FAILED [MEDIUM] FACSNotReserved: Test 1, FACS: The FACS does not seem to be
> in a
> reserved memory region, check that the BIOS memory map is correctly
> reserving
> the address space 0xbfffd40040-0xbfffd40080
>
> ================================================================================
> 0 passed, 1 failed, 0 warning, 0 aborted, 0 skipped, 0 info only.
> ================================================================================
>
>
> While debugging this test case failure issue I found that our BIOS
> code is fine with memory allocation for FACS structure from the
> expected reserved memory zone and there is compliance test suit coding
> issue, which explained as below:
>
> I am using Linux 4.11.0 kernel to run this test suit, so basically
> here is the FWTS coding flow for FACS structure memory check test:
>
> 1. First FWTS try to gather the BIOS memory map list info from the sysfs
> files
> called "/sys/firmware/memmap" which currently doesn't exists for the ARM
> arch.
> Currently it exists only for x86 arch by the driver module called
> "/linux/arch/x86/kernel/e820.c", so in our case we fail here.
>
> 2. If it fails in #1 (e.g. in our case it failed) then it try to get BIOS
> memory map list info from the klog(kernel log) by searching string
> "BIOS-memory_map" in klog and add BIOS memory map  info in the list if
> found this in klog but we fail here also because "BIOS-memory_map"
> string doesn't exists in klog for 4.11 kernel,so we BIOS memory map
> info list is empty.
>
> 3. As per my understanding/debugging, the FWTS compliance test suit
> code does't take care of #2 failure, I mean it assumes that we got
> BIOS memory map list from the klog always even though there is no such
> string "BIOS-memory_map" in klog. So before checking FACS structure
> address is reserved or not by comparing range in BIOS memory map list,
> it should check whether list is empty or not.
>
> Here I attached my patch work to fix above issue, correct me if I am wrong
> here.
>
> Also could you people please guide me with you kind suggestions here.
>
> Thanks,
> Ram
>
> --
> fwts-devel mailing list
> fwts-devel@lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/fwts-devel
>
diff mbox series

Patch

diff --git a/src/lib/src/fwts_memorymap.c b/src/lib/src/fwts_memorymap.c
index 099d0a9..4e94645 100644
--- a/src/lib/src/fwts_memorymap.c
+++ b/src/lib/src/fwts_memorymap.c
@@ -157,6 +157,10 @@  fwts_bool fwts_memory_map_is_reserved(fwts_list *memory_map_list, const uint64_t
        if ((memory >= 640 * 1024) && (memory <= 1024*1024))
                return FWTS_TRUE;
 
+       /* if FWTS_MEMORY_MAP info list is empty, then assume all is fair */
+       if (memory_map_list->len == 0)
+               return FWTS_TRUE;
+
        result = fwts_memory_map_type(memory_map_list, memory);
 
        if (result == FWTS_MEMORY_MAP_RESERVED)