diff options
author | root <root@lamia.panaceas.james.local> | 2017-03-15 13:50:51 +0000 |
---|---|---|
committer | root <root@lamia.panaceas.james.local> | 2017-03-15 13:50:51 +0000 |
commit | 2dd7ea9b7a34fd02c10b67bccebfb3c04b7ab3bf (patch) | |
tree | f145c6f6ad2dd52e271f1b84a4cfb8b8f0c6ce07 /tboot/txt.c | |
parent | f327ade1d0333deee519b2c2977f8edae5b9fa3d (diff) | |
download | tboot-master.tar.gz tboot-master.tar.bz2 tboot-master.zip |
Diffstat (limited to 'tboot/txt.c')
-rw-r--r-- | tboot/txt.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tboot/txt.c b/tboot/txt.c index 3f7dcf1..3cafd68 100644 --- a/tboot/txt.c +++ b/tboot/txt.c @@ -561,6 +561,7 @@ bool txt_prepare_cpu(void) { unsigned long cr0; uint64_t mcg_cap, mcg_stat, msr_efer, rflags; + unsigned int i; /* must be running at CPL 0 => this is implicit in even getting this far */ /* since our bootstrap code loads a GDT, etc. */ @@ -631,7 +632,7 @@ bool txt_prepare_cpu(void) /* check if all machine check regs are clear */ mcg_cap = rdmsr(MSR_MCG_CAP); - for ( unsigned int i = 0; i < (mcg_cap & 0xff); i++ ) { + for ( i = 0; i < (mcg_cap & 0xff); i++ ) { mcg_stat = rdmsr(MSR_MC0_STATUS + 4*i); if ( mcg_stat & (1ULL << 63) ) { printk(TBOOT_ERR"MCG[%u] = %Lx ERROR\n", i, mcg_stat); |