Kyösti Mälkki has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/34708 )
Change subject: arch/x86: Handle smm_subregion() failure ......................................................................
arch/x86: Handle smm_subregion() failure
The callers don't necessarily check return value of function. Make sure the parameters are not left uninitialised in that case.
Change-Id: Ic02db2d35b2ec88506320e7df609940de4aef005 Signed-off-by: Kyösti Mälkki kyosti.malkki@gmail.com --- M src/soc/amd/picasso/ramtop.c M src/soc/amd/stoneyridge/ramtop.c M src/soc/intel/apollolake/memmap.c M src/soc/intel/braswell/memmap.c M src/soc/intel/cannonlake/memmap.c M src/soc/intel/denverton_ns/memmap.c M src/soc/intel/icelake/memmap.c M src/soc/intel/skylake/memmap.c 8 files changed, 16 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/08/34708/1
diff --git a/src/soc/amd/picasso/ramtop.c b/src/soc/amd/picasso/ramtop.c index f936dfc..034c30a 100644 --- a/src/soc/amd/picasso/ramtop.c +++ b/src/soc/amd/picasso/ramtop.c @@ -131,6 +131,8 @@ clear_tvalid(); break; default: + *start = 0; + *size = 0; return -1; }
diff --git a/src/soc/amd/stoneyridge/ramtop.c b/src/soc/amd/stoneyridge/ramtop.c index de643cb..4ff22ec 100644 --- a/src/soc/amd/stoneyridge/ramtop.c +++ b/src/soc/amd/stoneyridge/ramtop.c @@ -131,6 +131,8 @@ clear_tvalid(); break; default: + *start = 0; + *size = 0; return -1; }
diff --git a/src/soc/intel/apollolake/memmap.c b/src/soc/intel/apollolake/memmap.c index 7494481..17dfb3f 100644 --- a/src/soc/intel/apollolake/memmap.c +++ b/src/soc/intel/apollolake/memmap.c @@ -68,6 +68,8 @@ sub_size = cache_size; break; default: + *start = 0; + *size = 0; return -1; }
diff --git a/src/soc/intel/braswell/memmap.c b/src/soc/intel/braswell/memmap.c index ab1d6f8..c3dcfbb 100644 --- a/src/soc/intel/braswell/memmap.c +++ b/src/soc/intel/braswell/memmap.c @@ -62,6 +62,8 @@ sub_size = cache_size; break; default: + *start = 0; + *size = 0; return -1; }
diff --git a/src/soc/intel/cannonlake/memmap.c b/src/soc/intel/cannonlake/memmap.c index a80ff58..1a9df41 100644 --- a/src/soc/intel/cannonlake/memmap.c +++ b/src/soc/intel/cannonlake/memmap.c @@ -72,6 +72,8 @@ sub_size = ied_size; break; default: + *start = 0; + *size = 0; return -1; }
diff --git a/src/soc/intel/denverton_ns/memmap.c b/src/soc/intel/denverton_ns/memmap.c index 3d750c7..416b16f 100644 --- a/src/soc/intel/denverton_ns/memmap.c +++ b/src/soc/intel/denverton_ns/memmap.c @@ -96,6 +96,8 @@ sub_size = cache_size; break; default: + *start = 0; + *size = 0; return -1; }
diff --git a/src/soc/intel/icelake/memmap.c b/src/soc/intel/icelake/memmap.c index f8121b8..88debf7 100644 --- a/src/soc/intel/icelake/memmap.c +++ b/src/soc/intel/icelake/memmap.c @@ -70,6 +70,8 @@ sub_size = ied_size; break; default: + *start = 0; + *size = 0; return -1; }
diff --git a/src/soc/intel/skylake/memmap.c b/src/soc/intel/skylake/memmap.c index 5008571..8350134 100644 --- a/src/soc/intel/skylake/memmap.c +++ b/src/soc/intel/skylake/memmap.c @@ -74,6 +74,8 @@ sub_size = ied_size; break; default: + *start = 0; + *size = 0; return -1; }