FSP 1.0 headers throwing warnings

Aperta
#6 3 commenti 1 reazione 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
38/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
c
Ambito
embedded-iot

Direzione di ricerca

Ispeziona le macro di accesso HOB in 3rdparty/fsp/RangeleyFspBinPkg/Include/fsphob.h e i relativi punti di chiamata in src/drivers/intel/fsp1_0/hob.c e fsp_util.c. Ricompila coreboot trattando gli avvisi segnalati come errori; il lavoro è completato quando il codice FSP 1.0 non emette più gli avvisi di strict-aliasing mostrati.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

@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);
^~~~~~~~~~~~~~
`

Lingua principale
C
Stelle
366
Fork
143
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di intel/FSP

Tutte le issue di intel/FSP

Issue simili

Altre issue su C

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.