FSP 1.0 headers throwing warnings

Abierto
#6 3 comentarios 1 reacción 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
38/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
c
Área
embedded-iot

Línea de trabajo

Inspecciona las macros de acceso HOB en 3rdparty/fsp/RangeleyFspBinPkg/Include/fsphob.h y sus sitios de llamada en src/drivers/intel/fsp1_0/hob.c y fsp_util.c. Vuelve a compilar coreboot tratando las advertencias indicadas como errores; se considera terminado cuando el código FSP 1.0 ya no emita las advertencias de strict-aliasing mostradas.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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

Lenguaje dominante
C
Estrellas
366
Forks
143
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de intel/FSP

Todos los issues de intel/FSP

Issues similares

Más issues de C

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.