[coreboot] New Defects reported by Coverity Scan for coreboot
Hi, Please find the latest report on new defect(s) introduced to coreboot found with Coverity Scan. 17 new defect(s) introduced to coreboot found with Coverity Scan. 5 defect(s), reported by Coverity Scan earlier, were marked fixed in the recent build analyzed by Coverity Scan. New defect(s) Reported-by: Coverity Scan Showing 17 of 17 defect(s) ** CID 1254658: Out-of-bounds access (ARRAY_VS_SINGLETON) /coreboot-builds/amd_olivehillplus/agesa/amdlib.c: 1407 in IdsErrorStop() ** CID 1254657: Unchecked return value (CHECKED_RETURN) /src/cpu/amd/car/post_cache_as_ram.c: 107 in post_cache_as_ram() ** CID 1254659: Operands don't affect result (CONSTANT_EXPRESSION_RESULT) /src/soc/nvidia/tegra124/sor.c: 555 in tegra_dc_sor_config_panel() ** CID 1254652: Logically dead code (DEADCODE) /src/northbridge/amd/agesa/00730F01/northbridge.c: 1067 in cpu_bus_scan() ** CID 1254650: Division or modulo by zero (DIVIDE_BY_ZERO) /src/northbridge/amd/agesa/00730F01/northbridge.c: 1067 in cpu_bus_scan() /src/northbridge/amd/agesa/00730F01/northbridge.c: 1067 in cpu_bus_scan() ** CID 1254656: Missing break in switch (MISSING_BREAK) /src/soc/nvidia/tegra124/sor.c: 768 in tegra_dc_sor_power_down_unused_lanes() ** CID 1254653: Out-of-bounds read (OVERRUN) /coreboot-builds/amd_olivehillplus/agesa/amdlib.c: 1407 in IdsErrorStop() ** CID 1254646: Uninitialized pointer read (UNINIT) /src/ec/google/chromeec/ec.c: 104 in google_chromeec_check_ec_image() ** CID 1254655: Uninitialized pointer read (UNINIT) /src/ec/google/chromeec/ec.c: 143 in google_chromeec_get_board_version() ** CID 1254654: Structurally dead code (UNREACHABLE) /coreboot-builds/amd_olivehillplus/agesa/AGESA.c: 554 in ImcDisableSurebootTimer() ** CID 1254649: Structurally dead code (UNREACHABLE) /coreboot-builds/amd_olivehillplus/agesa/AGESA.c: 491 in ImcSleep() ** CID 1254645: Structurally dead code (UNREACHABLE) /coreboot-builds/amd_olivehillplus/agesa/AGESA.c: 575 in ImcWakeup() ** CID 1254648: Structurally dead code (UNREACHABLE) /coreboot-builds/amd_olivehillplus/agesa/AGESA.c: 470 in WaitForEcLDN9MailboxCmdAck() ** CID 1254651: Structurally dead code (UNREACHABLE) /coreboot-builds/amd_olivehillplus/agesa/AGESA.c: 400 in AmdIdsRunApTaskLate() ** CID 1254644: Structurally dead code (UNREACHABLE) /coreboot-builds/amd_olivehillplus/agesa/AGESA.c: 533 in ImcEnableSurebootTimer() ** CID 1254643: Structurally dead code (UNREACHABLE) /coreboot-builds/amd_olivehillplus/agesa/AGESA.c: 512 in SoftwareDisableImc() ** CID 1254647: Structurally dead code (UNREACHABLE) /coreboot-builds/amd_olivehillplus/agesa/AGESA.c: 596 in ImcIdle() *** CID 1254658: Out-of-bounds access (ARRAY_VS_SINGLETON) /coreboot-builds/amd_olivehillplus/agesa/amdlib.c: 1407 in IdsErrorStop() 1401} post = {0xDEAD, FileCode, 0xDEAD, FileCode}; 1402UINT16 offset = 0; 1403UINT16 j; 1404 1405while(1) { 1406offset %= sizeof(struct POST) / 2; >>> CID 1254658: Out-of-bounds access (ARRAY_VS_SINGLETON) >>> Using "&post" as an array. This might corrupt or misinterpret adjacent >>> memory locations. 1407WriteIo32(80, *((UINT32*)(&post+offset))); 1408++offset; 1409for (j=0; j<250; ++j) { 1410ReadIo8(80); 1411} 1412} *** CID 1254657: Unchecked return value (CHECKED_RETURN) /src/cpu/amd/car/post_cache_as_ram.c: 107 in post_cache_as_ram() 101 { 102 void *resume_backup_memory = NULL; 103 104 int s3resume = acpi_s3_resume_allowed() && acpi_is_wakeup_early(); 105 if (s3resume) { 106 #if IS_ENABLED(CONFIG_HAVE_ACPI_RESUME) >>> CID 1254657: Unchecked return value (CHECKED_RETURN) >>> Calling "cbmem_recovery" without checking return value (as is done >>> elsewhere 18 out of 20 times). 107 cbmem_recovery(s3resume); 108 resume_backup_memory = cbmem_find(CBMEM_ID_RESUME); 109 #endif 110 } 111 prepare_romstage_ramstack(resume_backup_memory); 112 *** CID 1254659: Operands don't affect result (CONSTANT_EXPRESSION_RESULT) /src/soc/nvidia/tegra124/sor.c: 555 in tegra_dc_sor_config_panel() 549 vblank_start << NV_HEAD_STATE4_VBLANK_START_SHIFT | 550 hblank_start << NV_HEAD_STATE4_HBLANK_START_SHIFT); 551 552 /* TODO: adding interlace mode support */ 553 tegra_sor_writel(sor, NV_HEAD_STATE5(head_num), 0x1); 554 >>> CID 1254659: Operands don't affect r
Re: [coreboot] New Defects reported by Coverity Scan for coreboot
Hi all, Am 16.11.2014 um 00:18 schrieb scan-ad...@coverity.com: > Please find the latest report on new defect(s) introduced to coreboot > found with Coverity Scan. this automated report will now be copied to the mailing list. I run coverity on our tree (in abuild default configuration) about once a week. The reports contains _new_ issues only. Patches are welcome, but please give credit in the commit message (eg. "Found-by: Coverity Scan"). If you want to work with the full list, request access on https://scan.coverity.com/projects/1016 and I'll set things up. Patrick signature.asc Description: OpenPGP digital signature -- coreboot mailing list: coreboot@coreboot.org http://www.coreboot.org/mailman/listinfo/coreboot
[coreboot] USB keyboard wakeup from S3 Baytrail: Bayley Bay CRB
Hi Experts, I am trying to use ACPI_RESUME functionality of coreboot on Bayley Bay CRB and unable to wakeup board with USB Keyboard. Board resumes with power button only. Below is the detailed description. 1. I am using EHCI instead of XHCI as I need to support boot from USB in grub. 2. Enabled S3 support in coreboot File: src/soc/intel/fsp_baytrail/acpi/usb.asl, Chnage: Name (_PRW, Package(){ 13, 3 }) 3. Linux Kernel Version: 3.10 In Linux I see following in /proc/acpi/wakeup root@localhost:~# cat /proc/acpi/wakeup Device S-state Status Sysfs node EHC1 S3*enabled pci::00:1d.0 XHCI S3*disabled When I plugin USB keyboard following are logs root@localhost:~# usb 1-1.2: new low-speed USB device number 3 using ehci-pci input: SIGMACHIP USB Keyboard as /devices/pci:00/:00:1d.0/usb1/1-1/1-1.2/1-1.2:1.0/input/input3 hid-generic 0003:1C4F:0016.0001: input: USB HID v1.10 Keyboard [SIGMACHIP USB Keyboard] on usb-:00:1d.0-1.2/input0 input: SIGMACHIP USB Keyboard as /devices/pci:00/:00:1d.0/usb1/1-1/1-1.2/1-1.2:1.1/input/input4 hid-generic 0003:1C4F:0016.0002: input: USB HID v1.10 Device [SIGMACHIP USB Keyboard] on usb-:00:1d.0-1.2/input1 Based on above information I tried to enable wakeup from USB keyboard as follows echo enabled > /sys/devices/pci\:00/\:00\:1d.0/usb1/power/wakeup echo enabled > /sys/bus/usb/devices/1-1/power/wakeup Still see the same entried in /proc/acpi/wakeup root@localhost:~# cat /proc/acpi/wakeup Device S-state Status Sysfs node EHC1 S3*enabled pci::00:1d.0 XHCI S3*disabled Did pm-suspend. Following are the logs root@localhost:~# pm-suspend ata2.00: configured for UDMA/100 ata2: EH complete PM: Syncing filesystems ... done. Freezing user space processes ... (elapsed 0.01 seconds) done. Freezing remaining freezable tasks ... (elapsed 0.01 seconds) done. Suspending console(s) (use no_console_suspend to debug) At this stage power to USB keyboard is off. No LED for Capslock. Nothing happens when I press any key on the keyboard. System resumes with power button with the following logs. POST: 0x76 Finalize devices... DOMAIN: final FspNotify(EnumInitPhaseAfterPciEnumeration) Devices finalized BS: BS_POST_DEVICE times (us): entry 0 run 12389 exit 0 POST: 0x77 Trying to find the wakeup vector... Looking on 000f for valid checksum Checksum 1 passed Checksum 2 passed all OK RSDP found at 000f RSDT found at 7add7030 ends at 7add7068 FADT found at 7add9cf0 FACS found at 7add7210 OS waking vector is 0009c090 BS: BS_OS_RESUME_CHECK times (us): entry 0 run 26951 exit 0 POST: 0x78 Restore GNVS pointer to 0x7adfb000 POST: 0xfd sd 1:0:0:0: [sda] Synchronizing SCSI cache sd 1:0:0:0: [sda] Stopping disk PM: suspend of devices complete after 601.507 msecs [ cut here ] WARNING: at /home/linux/3.10-r0/linux/drivers/clk/clk.c:842 __clk_disable+0x50/0x70() Modules linked in: CPU: 1 PID: 453 Comm: pm-suspend Not tainted 3.10.38 #1 Hardware name: Intel Bayley Bay CRB/Bayley Bay CRB, BIOS 4.0-7016-g0a66991-dirty 11/15/2014 f407de08 c181ea2c f407de30 c1036c7e c1a1541d c1a80588 034a c16ca130 c16ca130 f4d89420 f4d89420 c13d8bf0 f407de40 c1036d42 0009 f407de4c c16ca130 0246 f407de5c c16ca22a f4d89420 Call Trace: [] dump_stack+0x16/0x18 [] warn_slowpath_common+0x5e/0x80 [] ? __clk_disable+0x50/0x70 [] ? __clk_disable+0x50/0x70 [] ? dw_pci_resume_early+0x20/0x20 [] warn_slowpath_null+0x22/0x30 [] __clk_disable+0x50/0x70 [] clk_disable+0x1a/0x30 [] dw_dma_suspend+0x20/0x30 [] dw_pci_suspend_late+0x12/0x20 [] dpm_run_callback.isra.3+0x2b/0x70 [] ? _raw_spin_unlock_irq+0x17/0x40 [] dpm_suspend_end+0x4d/0x490 [] suspend_devices_and_enter+0xf8/0x440 [] ? printk+0x50/0x52 [] pm_suspend+0x1b0/0x220 [] state_store+0x5b/0xb0 [] ? wakeup_count_show+0x50/0x50 [] kobj_attr_store+0x17/0x30 [] sysfs_write_file+0x9b/0x110 [] ? sysfs_open_file+0x1f0/0x1f0 [] vfs_write+0x99/0x190 [] SyS_write+0x51/0x90 [] sysenter_do_call+0x12/0x12 ---[ end trace d63a3167b6ae1b8f ]--- [ cut here ] WARNING: at /home/linux/3.10-r0/linux/drivers/clk/clk.c:751 __clk_unprepare+0x50/0x70() Modules linked in: CPU: 1 PID: 453 Comm: pm-suspend Tainted: GW3.10.38 #1 Hardware name: Intel Bayley Bay CRB/Bayley Bay CRB, BIOS 4.0-7016-g0a66991-dirty 11/15/2014 f407de0c c181ea2c f407de34 c1036c7e c1a1541d c1a80588 02ef c16cab60 c16cab60 f4d89420 f4c4c064 c13d8bf0 f407de44 c1036d42 0009 f407de50 c16cab60 f4d89420 f407de5c c16cab97 f4d89420 Call Trace: [] dump_stack+0x16/0x18 [] warn_slowpath_common+0x5e/0x80 [] ? __clk_unprepare+0x50/0x70 [] ? __clk_unprepare+0x50/0x70 [] ? dw_pci_resume_early+0x20/0x20 [] warn_slowpath_null+0x22/0x30 [] __clk_unprepare+0x50/0x70 [] clk_unprepare+0x17/0x20 [] dw_dma_suspend+0x27/0x30 [] dw_pci_suspend_late+0x12/0x20 [] dpm_run_callback.isra.3+0x2b/0x70 [] ? _ra
[coreboot] vortex86ex
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Does anyone have a vortex86ex board with coreboot? -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iQEcBAEBAgAGBQJUaTV4AAoJEP9Ft0z50c+UgzwH/3/Jx914Y6e0pFTaSE256oxs eKHigGpiMVpjseYCtMTK8ZulAIydvumY+jclwAzydY0P8IlcTW9teKF5JNxvnf0D EyaOel/pbxhIexOzs/ei8ALSil3+fPIhC2rqVs00l0MrO5DvBwa/fxF4qjWbnuuW KS+k68z2sLbD7UI+LDlJaj/ecZ1lzS/YaN1a7r2Wem1ZPda3ATjV0xMjFChvBkbo kFauxuLeVlBxqJfhkRZijpFrD0cpljCL6LWn/738HZbzXGVlqqKsCQcMBtcUsiEq o8yEI97BesJfXvFGXPsw05swoWxrVF/yJDR8ALM9Dy7Uabqumg/vhRK95EHbtF0= =g3MX -END PGP SIGNATURE- -- coreboot mailing list: coreboot@coreboot.org http://www.coreboot.org/mailman/listinfo/coreboot