Fixed comp err with APIC disabled

This commit is contained in:
Stanislav Shwartsman 2009-02-23 17:09:39 +00:00
parent 9e3dd83e85
commit e6685b3557

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: paging.cc,v 1.170 2009-02-18 22:24:58 sshwarts Exp $
// $Id: paging.cc,v 1.171 2009-02-23 17:09:39 sshwarts Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2001 MandrakeSoft S.A.
@ -1655,24 +1655,28 @@ void BX_CPU_C::access_read_linear(bx_address laddr, unsigned len, unsigned curr_
void BX_CPU_C::access_write_physical(bx_phy_address paddr, unsigned len, void *data)
{
#if BX_SUPPORT_APIC
bx_phy_address a20addr = A20ADDR(paddr);
if (BX_CPU_THIS_PTR lapic.is_selected(a20addr)) {
BX_CPU_THIS_PTR lapic.write(a20addr, data, len);
return;
}
#endif
BX_MEM(0)->writePhysicalPage(BX_CPU_THIS, paddr, len, data);
}
void BX_CPU_C::access_read_physical(bx_phy_address paddr, unsigned len, void *data)
{
#if BX_SUPPORT_APIC
bx_phy_address a20addr = A20ADDR(paddr);
if (BX_CPU_THIS_PTR lapic.is_selected(a20addr)) {
BX_CPU_THIS_PTR lapic.read(a20addr, data, len);
return;
}
#endif
BX_MEM(0)->readPhysicalPage(BX_CPU_THIS, paddr, len, data);
}