intel / intel/FSP

FSP 1.0 headers throwing warnings

Open
#6 3 comments 1 reaction 0 assignees View on GitHub
Dominant language
C
Stars
359
Forks
142
PR merge metrics
No merged PRs in 30d

Description

@nate-desimone-intel Intel FSP 1.0 headers throwing warnings which are interpreted as errors in coreboot. It would be great if it gets fixed.

Output:
`src/drivers/intel/fsp1_0/hob.c: In function 'print_hob_type_structure':
3rdparty/fsp/RangeleyFspBinPkg/Include/fsphob.h:318:6: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
((*(EFI_HOB_GENERIC_HEADER **)&(HobStart))->HobType)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3rdparty/fsp/RangeleyFspBinPkg/Include/fsphob.h:361:37: note: in expansion of macro 'GET_HOB_TYPE'
#define END_OF_HOB_LIST(HobStart) (GET_HOB_TYPE (HobStart) == (UINT16)EFI_HOB_TYPE_END_OF_HOB_LIST)
^~~~~~~~~~~~
src/drivers/intel/fsp1_0/hob.c:202:13: note: in expansion of macro 'END_OF_HOB_LIST'
Lasthob = END_OF_HOB_LIST(Currenthob); /* Check for end of HOB list */
^~~~~~~~~~~~~~~
3rdparty/fsp/RangeleyFspBinPkg/Include/fsphob.h:346:13: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
(VOID *)(*(UINT8 **)&(HobStart) + GET_HOB_LENGTH (HobStart))
^~~~~~~~~~~~~~~~~~~~~
src/drivers/intel/fsp1_0/hob.c:204:14: note: in expansion of macro 'GET_NEXT_HOB'
Nexthob = GET_NEXT_HOB(Currenthob); /* Get next HOB pointer */
^~~~~~~~~~~~
3rdparty/fsp/RangeleyFspBinPkg/Include/fsphob.h:332:6: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
((*(EFI_HOB_GENERIC_HEADER **)&(HobStart))->HobLength)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3rdparty/fsp/RangeleyFspBinPkg/Include/fsphob.h:346:37: note: in expansion of macro 'GET_HOB_LENGTH'
(VOID *)(*(UINT8 **)&(HobStart) + GET_HOB_LENGTH (HobStart))
^~~~~~~~~~~~~~
src/drivers/intel/fsp1_0/hob.c:204:14: note: in expansion of macro 'GET_NEXT_HOB'
Nexthob = GET_NEXT_HOB(Currenthob); /* Get next HOB pointer */
^~~~~~~~~~~~

src/drivers/intel/fsp1_0/fsp_util.c: In function 'save_mrc_data':
3rdparty/fsp/RangeleyFspBinPkg/Include/fsphob.h:375:13: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
(VOID *)(*(UINT8 **)&(HobStart) + sizeof (EFI_HOB_GUID_TYPE))
^~~~~~~~~~~~~~~~~~~~~
src/drivers/intel/fsp1_0/fsp_util.c:255:17: note: in expansion of macro 'GET_GUID_HOB_DATA'
mrc_hob_data = GET_GUID_HOB_DATA (mrc_hob);
^~~~~~~~~~~~~~~~~
3rdparty/fsp/RangeleyFspBinPkg/Include/fsphob.h:332:6: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
((*(EFI_HOB_GENERIC_HEADER **)&(HobStart))->HobLength)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/drivers/intel/fsp1_0/fsp_util.c:256:23: note: in expansion of macro 'GET_HOB_LENGTH'
mrc_hob_size = (u32) GET_HOB_LENGTH(mrc_hob);
^~~~~~~~~~~~~~
`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.