AGESA: Refactor eventlog read loop

Also avoid infinite loop.

Change-Id: I7571f9efdc2bf0335788136b8c56e9290581d748
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/20695
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
diff --git a/src/northbridge/amd/agesa/state_machine.h b/src/northbridge/amd/agesa/state_machine.h
index 8711503..86424d1 100644
--- a/src/northbridge/amd/agesa/state_machine.h
+++ b/src/northbridge/amd/agesa/state_machine.h
@@ -23,6 +23,7 @@
 const char *agesa_struct_name(int state);
 const char *heap_status_name(int status);
 void agesawrapper_trace(AGESA_STATUS ret, AMD_CONFIG_PARAMS *StdHeader, const char *func);
+AGESA_STATUS agesawrapper_amdreadeventlog(UINT8 HeapStatus);
 
 struct sysinfo
 {