[coreboot] New Defects reported by Coverity Scan for coreboot
scan-admin at coverity.com
scan-admin at coverity.com
Wed Apr 11 01:32:37 CEST 2018
Hi,
Please find the latest report on new defect(s) introduced to coreboot found with Coverity Scan.
4 new defect(s) introduced to coreboot found with Coverity Scan.
1 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 4 of 4 defect(s)
** CID 1388253: Null pointer dereferences (NULL_RETURNS)
/src/soc/intel/skylake/romstage/romstage_fsp20.c: 254 in platform_fsp_memory_init_params_cb()
________________________________________________________________________________________________________
*** CID 1388253: Null pointer dereferences (NULL_RETURNS)
/src/soc/intel/skylake/romstage/romstage_fsp20.c: 254 in platform_fsp_memory_init_params_cb()
248 const struct device *dev;
249 const struct soc_intel_skylake_config *config;
250 FSP_M_CONFIG *m_cfg = &mupd->FspmConfig;
251 FSP_M_TEST_CONFIG *m_t_cfg = &mupd->FspmTestConfig;
252
253 dev = dev_find_slot(0, PCI_DEVFN(PCH_DEV_SLOT_LPC, 0));
>>> CID 1388253: Null pointer dereferences (NULL_RETURNS)
>>> Dereferencing a null pointer "dev".
254 config = dev->chip_info;
255
256 soc_memory_init_params(m_cfg, config);
257
258 /* Skip creating Management Engine MBP HOB */
259 m_t_cfg->SkipMbpHob = 0x01;
** CID 1361695: Null pointer dereferences (NULL_RETURNS)
/src/northbridge/intel/pineview/early_init.c: 45 in early_graphics_setup()
________________________________________________________________________________________________________
*** CID 1361695: Null pointer dereferences (NULL_RETURNS)
/src/northbridge/intel/pineview/early_init.c: 45 in early_graphics_setup()
39 {
40 u8 reg8;
41 u16 reg16;
42 u32 reg32;
43
44 const struct device *d0f0 = dev_find_slot(0, PCI_DEVFN(0,0));
>>> CID 1361695: Null pointer dereferences (NULL_RETURNS)
>>> Dereferencing a null pointer "d0f0".
45 const struct northbridge_intel_pineview_config *config = d0f0->chip_info;
46
47 pci_write_config8(D0F0, DEVEN, BOARD_DEVEN);
48
49 /* vram size from cmos option */
50 if (get_option(®8, "gfx_uma_size") != CB_SUCCESS)
** CID 1353171: Null pointer dereferences (NULL_RETURNS)
/src/soc/intel/skylake/romstage/romstage.c: 66 in soc_memory_init_params()
________________________________________________________________________________________________________
*** CID 1353171: Null pointer dereferences (NULL_RETURNS)
/src/soc/intel/skylake/romstage/romstage.c: 66 in soc_memory_init_params()
60 {
61 const struct device *dev;
62 const struct soc_intel_skylake_config *config;
63
64 /* Set the parameters for MemoryInit */
65 dev = dev_find_slot(0, PCI_DEVFN(PCH_DEV_SLOT_LPC, 0));
>>> CID 1353171: Null pointer dereferences (NULL_RETURNS)
>>> Dereferencing a null pointer "dev".
66 config = dev->chip_info;
67
68 /*
69 * Set IGD stolen size to 64MB. The FBC hardware for skylake does not
70 * have access to the bios_reserved range so it always assumes 8MB is
71 * used and so the kernel will avoid the last 8MB of the stolen window.
** CID 1255944: (NULL_RETURNS)
/src/northbridge/amd/pi/00730F01/dimmSpd.c: 32 in AmdMemoryReadSPD()
/src/northbridge/amd/pi/00630F01/dimmSpd.c: 32 in AmdMemoryReadSPD()
/src/northbridge/amd/pi/00660F01/dimmSpd.c: 30 in AmdMemoryReadSPD()
________________________________________________________________________________________________________
*** CID 1255944: (NULL_RETURNS)
/src/northbridge/amd/pi/00730F01/dimmSpd.c: 32 in AmdMemoryReadSPD()
26 #define DIMENSION(array)(sizeof(array)/ sizeof(array [0]))
27
28 AGESA_STATUS AmdMemoryReadSPD (UINT32 unused1, UINTN unused2, AGESA_READ_SPD_PARAMS *info)
29 {
30 int spdAddress;
31 DEVTREE_CONST struct device *dev = dev_find_slot(0, PCI_DEVFN(0x18, 2));
>>> CID 1255944: (NULL_RETURNS)
>>> Dereferencing a null pointer "dev".
32 DEVTREE_CONST struct northbridge_amd_pi_00730F01_config *config = dev->chip_info;
33
34 if ((dev == 0) || (config == 0))
35 return AGESA_ERROR;
36
37 if (info->SocketId >= DIMENSION(config->spdAddrLookup ))
/src/northbridge/amd/pi/00630F01/dimmSpd.c: 32 in AmdMemoryReadSPD()
26 #define DIMENSION(array)(sizeof(array)/ sizeof(array [0]))
27
28 AGESA_STATUS AmdMemoryReadSPD (UINT32 unused1, UINTN unused2, AGESA_READ_SPD_PARAMS *info)
29 {
30 int spdAddress;
31 DEVTREE_CONST struct device *dev = dev_find_slot(0, PCI_DEVFN(0x18, 2));
>>> CID 1255944: (NULL_RETURNS)
>>> Dereferencing a null pointer "dev".
32 DEVTREE_CONST struct northbridge_amd_pi_00630F01_config *config = dev->chip_info;
33
34 if ((dev == 0) || (config == 0))
35 return AGESA_ERROR;
36
37 if (info->SocketId >= DIMENSION(config->spdAddrLookup ))
/src/northbridge/amd/pi/00660F01/dimmSpd.c: 30 in AmdMemoryReadSPD()
24 #include "northbridge/amd/pi/dimmSpd.h"
25
26 AGESA_STATUS AmdMemoryReadSPD (UINT32 unused1, UINTN unused2, AGESA_READ_SPD_PARAMS *info)
27 {
28 int spdAddress;
29 DEVTREE_CONST struct device *dev = dev_find_slot(0, PCI_DEVFN(0x18, 2));
>>> CID 1255944: (NULL_RETURNS)
>>> Dereferencing a null pointer "dev".
30 DEVTREE_CONST struct northbridge_amd_pi_00660F01_config *config = dev->chip_info;
31
32 if ((dev == 0) || (config == 0))
33 return AGESA_ERROR;
34 if (info->SocketId >= ARRAY_SIZE(config->spdAddrLookup))
35 return AGESA_ERROR;
________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRbLuoVetFLSjdonCi1EjfHRqWGQvojmmkYaBE-2BPJiTQvQ-3D-3D_q4bX76XMySz3BXBlWr5fXXJ4cvAsgEXEqC7dBPM7O5ZAA-2BqcZtB08tZ0YA-2FRNOR59elv8rSjmpmeovsDZoW4jzD-2FjG-2F7h5y43ucsmGoAdsNcnuz9yMfh-2FKfy656uvsx-2FdIIe4ZLsFDLyyFDbj86-2BHIQqdyGYIztdamJsQHyyPS3oXAYNYhBbCKZnXJ99vzd-2FdRbBhDTVpm15Lc12ydWym2JohoKx1XxFjFTJ3k5cgSk-3D
More information about the coreboot
mailing list