dm: cmos: fix a logic error for read to clear range

Signed-off-by: Binbin Wu <binbin.wu@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
This commit is contained in:
Binbin Wu 2018-08-21 22:28:38 +08:00 committed by lijinxia
parent 3e598ebb28
commit 0c630d9003
1 changed files with 1 additions and 1 deletions

View File

@ -92,7 +92,7 @@ cmos_io_handler(struct vmctx *ctx, int vcpu, int in, int port, int bytes,
if (in) { if (in) {
*eax = ctx->cmos_buffer[buf_offset]; *eax = ctx->cmos_buffer[buf_offset];
/* read to clear for Key range */ /* read to clear for Key range */
if ((buf_offset >= CMOS_VRPMB_START) || if ((buf_offset >= CMOS_VRPMB_START) &&
(buf_offset <= CMOS_VRPMB_END)) (buf_offset <= CMOS_VRPMB_END))
ctx->cmos_buffer[buf_offset] = 0; ctx->cmos_buffer[buf_offset] = 0;
} }