diff options
| author | Chris Cain <cjcain@us.ibm.com> | 2017-11-21 19:21:16 -0600 |
|---|---|---|
| committer | Christopher J. Cain <cjcain@us.ibm.com> | 2017-12-01 16:07:38 -0500 |
| commit | 06ef7787e76281b40fb961048bc79b22610241a0 (patch) | |
| tree | 35f959645c4c6eb180070bec907d96ad9dc55019 /src/tools | |
| parent | d0f8e5fb2c5a2cd78453630e869d74d569cad394 (diff) | |
| download | talos-occ-06ef7787e76281b40fb961048bc79b22610241a0.tar.gz talos-occ-06ef7787e76281b40fb961048bc79b22610241a0.zip | |
Handle redundant power supply policy
When redundant power supply policy is disabled:
1. Skip power capping algorithm when in oversubscription
2. No power brake support (don't set the GPIO to enable the automatic HW power
braking)
3. Remove clipping to turbo when in oversubscription
Initialize frequency votes to prevent throttling when booted in
oversubscription.
Allow truncated exception buffer data to be parsed.
Change-Id: I4fef673feb0a3d0025e00d8fd219cf4cc24d8685
CQ: SW408974
CQ: SW409666
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/50071
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Martha Broyles <mbroyles@us.ibm.com>
Reviewed-by: Andres A. Lugo-Reyes <aalugore@us.ibm.com>
Reviewed-by: Christopher J. Cain <cjcain@us.ibm.com>
Diffstat (limited to 'src/tools')
| -rw-r--r-- | src/tools/ffdcparser/ffdcparser.c | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/src/tools/ffdcparser/ffdcparser.c b/src/tools/ffdcparser/ffdcparser.c index e1bcb59..5fcaaa6 100644 --- a/src/tools/ffdcparser/ffdcparser.c +++ b/src/tools/ffdcparser/ffdcparser.c @@ -24,6 +24,7 @@ /* IBM_PROLOG_END_TAG */ #include <stdio.h> #include <stdint.h> +#include <sys/stat.h> // NOTE: This tool is to be used when FFDC is dumped by the OCC, and currently // only accepts input files in binary format. @@ -162,18 +163,6 @@ uint16_t get_uint16(FILE* i_fhndl) return ret; } -int file_length_valid(FILE* i_fhndl, uint16_t i_exp_size) -{ - uint32_t len = 0; - - while(EOF != fgetc(i_fhndl)) - { - len++; - } - - return (len < i_exp_size) ? 0 : 1; -} - void get_thread_data(FILE* i_fhndl, thread_dump_t * i_thrd) { uint32_t i = 0; @@ -297,16 +286,22 @@ int main(int argc, char** argv) } } + // Get file size + fseek(ffdc_file, 0, SEEK_END); + const unsigned int file_size = ftell(ffdc_file); + fseek(ffdc_file, 0, SEEK_SET); + // Binary file is open, parse it data.seq = fgetc(ffdc_file); data.cmd = fgetc(ffdc_file); data.excp = fgetc(ffdc_file); data.len = get_uint16(ffdc_file); - if( (!file_length_valid(ffdc_file, data.len)) ) + if (file_size < data.len) { - fprintf(stderr, "ERROR: FFDC file not valid size\n"); - return -1; + fprintf(stderr, "WARNING: FFDC file size (%d) is less than what was expected (%d)\n", + file_size, data.len); + // fgetc will continue to return 0xFF once the end of file is reached } if(fseek(ffdc_file, 5, SEEK_SET)) |

