Use MAX_LFV_ENTRIES constant

This commit is contained in:
Stanislav Shwartsman 2006-05-27 21:44:40 +00:00
parent 938d9c1cbb
commit 8ed9a2fa4e
2 changed files with 5 additions and 5 deletions

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: apic.cc,v 1.86 2006-05-27 15:54:48 sshwarts Exp $
// $Id: apic.cc,v 1.87 2006-05-27 21:44:40 sshwarts Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2001 MandrakeSoft S.A.
@ -927,8 +927,8 @@ void bx_local_apic_c::register_state(bx_param_c *parent)
new bx_shadow_num_c(parent, "shadow_error_status", &shadow_error_status, BASE_HEX);
new bx_shadow_num_c(parent, "icr_hi", &icr_hi, BASE_HEX);
new bx_shadow_num_c(parent, "icr_lo", &icr_lo, BASE_HEX);
bx_list_c *LVT = new bx_list_c(parent, "lvt");
for (i=0; i<6; i++) {
bx_list_c *LVT = new bx_list_c(parent, "lvt", APIC_LVT_ENTRIES);
for (i=0; i<APIC_LVT_ENTRIES; i++) {
sprintf(name, "%d", i);
new bx_shadow_num_c(LVT, strdup(name), &lvt[i], BASE_HEX);
}

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: apic.h,v 1.31 2006-05-27 15:54:48 sshwarts Exp $
// $Id: apic.h,v 1.32 2006-05-27 21:44:40 sshwarts Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2001 MandrakeSoft S.A.
@ -120,7 +120,7 @@ class BOCHSAPI bx_local_apic_c : public bx_generic_apic_c
Bit32u icr_lo;
#define APIC_LVT_ENTRIES 6
Bit32u lvt[6];
Bit32u lvt[APIC_LVT_ENTRIES];
#define APIC_LVT_TIMER 0
#define APIC_LVT_THERMAL 1
#define APIC_LVT_PERFORM 2