Revert the logic behind my last change, and use a function called
`is_physical_memory()' now for the decision whether to dump some region of memory or not. Suggested by: davidg
This commit is contained in:
parent
fde8a8ec46
commit
5167b81f67
@ -38,7 +38,7 @@
|
||||
*
|
||||
* from: @(#)vm_machdep.c 7.3 (Berkeley) 5/13/91
|
||||
* Utah $Hdr: vm_machdep.c 1.16.1.1 89/06/23$
|
||||
* $Id: vm_machdep.c,v 1.87 1997/09/02 20:05:31 bde Exp $
|
||||
* $Id: vm_machdep.c,v 1.88 1997/09/10 12:31:28 joerg Exp $
|
||||
*/
|
||||
|
||||
#include "npx.h"
|
||||
@ -959,7 +959,7 @@ vm_page_zero_idle()
|
||||
}
|
||||
|
||||
/*
|
||||
* Tell whether this address is in some adapter memory region.
|
||||
* Tell whether this address is in some physical memory region.
|
||||
* Currently used by the kernel coredump code in order to avoid
|
||||
* dumping the ``ISA memory hole'' which could cause indefinite hangs,
|
||||
* or other unpredictable behaviour.
|
||||
@ -968,14 +968,14 @@ vm_page_zero_idle()
|
||||
#include "isa.h"
|
||||
|
||||
int
|
||||
is_adapter_memory(addr)
|
||||
is_physical_memory(addr)
|
||||
vm_offset_t addr;
|
||||
{
|
||||
|
||||
#if NISA > 0
|
||||
/* The ISA ``memory hole''. */
|
||||
if (addr >= 0xa0000 && addr < 0x100000)
|
||||
return 1;
|
||||
return 0;
|
||||
#endif
|
||||
|
||||
/*
|
||||
@ -983,5 +983,5 @@ is_adapter_memory(addr)
|
||||
* here
|
||||
*/
|
||||
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
@ -26,7 +26,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: md_var.h,v 1.16 1997/08/09 00:03:14 dyson Exp $
|
||||
* $Id: md_var.h,v 1.17 1997/09/10 12:31:36 joerg Exp $
|
||||
*/
|
||||
|
||||
#ifndef _MACHINE_MD_VAR_H_
|
||||
@ -68,7 +68,7 @@ void doreti_popl_es __P((void)) __asm(__STRING(doreti_popl_es));
|
||||
void doreti_popl_es_fault __P((void)) __asm(__STRING(doreti_popl_es_fault));
|
||||
int fill_regs __P((struct proc *p, struct reg *regs));
|
||||
void fillw __P((int /*u_short*/ pat, void *base, size_t cnt));
|
||||
int is_adapter_memory __P((vm_offset_t addr));
|
||||
int is_physical_memory __P((vm_offset_t addr));
|
||||
u_long kvtop __P((void *addr));
|
||||
void setidt __P((int idx, alias_for_inthand_t *func, int typ, int dpl,
|
||||
int selec));
|
||||
|
@ -38,7 +38,7 @@
|
||||
*
|
||||
* from: @(#)vm_machdep.c 7.3 (Berkeley) 5/13/91
|
||||
* Utah $Hdr: vm_machdep.c 1.16.1.1 89/06/23$
|
||||
* $Id: vm_machdep.c,v 1.87 1997/09/02 20:05:31 bde Exp $
|
||||
* $Id: vm_machdep.c,v 1.88 1997/09/10 12:31:28 joerg Exp $
|
||||
*/
|
||||
|
||||
#include "npx.h"
|
||||
@ -959,7 +959,7 @@ vm_page_zero_idle()
|
||||
}
|
||||
|
||||
/*
|
||||
* Tell whether this address is in some adapter memory region.
|
||||
* Tell whether this address is in some physical memory region.
|
||||
* Currently used by the kernel coredump code in order to avoid
|
||||
* dumping the ``ISA memory hole'' which could cause indefinite hangs,
|
||||
* or other unpredictable behaviour.
|
||||
@ -968,14 +968,14 @@ vm_page_zero_idle()
|
||||
#include "isa.h"
|
||||
|
||||
int
|
||||
is_adapter_memory(addr)
|
||||
is_physical_memory(addr)
|
||||
vm_offset_t addr;
|
||||
{
|
||||
|
||||
#if NISA > 0
|
||||
/* The ISA ``memory hole''. */
|
||||
if (addr >= 0xa0000 && addr < 0x100000)
|
||||
return 1;
|
||||
return 0;
|
||||
#endif
|
||||
|
||||
/*
|
||||
@ -983,5 +983,5 @@ is_adapter_memory(addr)
|
||||
* here
|
||||
*/
|
||||
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
@ -26,7 +26,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: md_var.h,v 1.16 1997/08/09 00:03:14 dyson Exp $
|
||||
* $Id: md_var.h,v 1.17 1997/09/10 12:31:36 joerg Exp $
|
||||
*/
|
||||
|
||||
#ifndef _MACHINE_MD_VAR_H_
|
||||
@ -68,7 +68,7 @@ void doreti_popl_es __P((void)) __asm(__STRING(doreti_popl_es));
|
||||
void doreti_popl_es_fault __P((void)) __asm(__STRING(doreti_popl_es_fault));
|
||||
int fill_regs __P((struct proc *p, struct reg *regs));
|
||||
void fillw __P((int /*u_short*/ pat, void *base, size_t cnt));
|
||||
int is_adapter_memory __P((vm_offset_t addr));
|
||||
int is_physical_memory __P((vm_offset_t addr));
|
||||
u_long kvtop __P((void *addr));
|
||||
void setidt __P((int idx, alias_for_inthand_t *func, int typ, int dpl,
|
||||
int selec));
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)wd.c 7.2 (Berkeley) 5/9/91
|
||||
* $Id: wd.c,v 1.136 1997/09/04 18:49:47 sos Exp $
|
||||
* $Id: wd.c,v 1.137 1997/09/10 12:31:38 joerg Exp $
|
||||
*/
|
||||
|
||||
/* TODO:
|
||||
@ -2106,12 +2106,12 @@ wddump(dev_t dev)
|
||||
return (EIO);
|
||||
}
|
||||
while (blkcnt != 0) {
|
||||
if (is_adapter_memory((vm_offset_t)addr))
|
||||
pmap_enter(kernel_pmap, (vm_offset_t)CADDR1,
|
||||
trunc_page(0), VM_PROT_READ, TRUE);
|
||||
else
|
||||
if (is_physical_memory((vm_offset_t)addr))
|
||||
pmap_enter(kernel_pmap, (vm_offset_t)CADDR1,
|
||||
trunc_page(addr), VM_PROT_READ, TRUE);
|
||||
else
|
||||
pmap_enter(kernel_pmap, (vm_offset_t)CADDR1,
|
||||
trunc_page(0), VM_PROT_READ, TRUE);
|
||||
|
||||
/* Ready to send data? */
|
||||
DELAY(5); /* ATA spec */
|
||||
|
@ -15,7 +15,7 @@
|
||||
*
|
||||
* Ported to run under 386BSD by Julian Elischer (julian@dialix.oz.au) Sept 1992
|
||||
*
|
||||
* $Id: sd.c,v 1.108 1997/09/02 20:06:37 bde Exp $
|
||||
* $Id: sd.c,v 1.109 1997/09/10 12:31:40 joerg Exp $
|
||||
*/
|
||||
|
||||
#include "opt_bounce.h"
|
||||
@ -997,12 +997,12 @@ sddump(dev_t dev)
|
||||
|
||||
blknum = dumplo + blkoff;
|
||||
while (num > 0) {
|
||||
if (is_adapter_memory((vm_offset_t)addr))
|
||||
if (is_physical_memory((vm_offset_t)addr))
|
||||
pmap_enter(kernel_pmap, (vm_offset_t)CADDR1,
|
||||
trunc_page(addr), VM_PROT_READ, TRUE);
|
||||
else
|
||||
pmap_enter(kernel_pmap, (vm_offset_t)CADDR1,
|
||||
trunc_page(0), VM_PROT_READ, TRUE);
|
||||
else
|
||||
pmap_enter(kernel_pmap, (vm_offset_t)CADDR1,
|
||||
trunc_page(addr), VM_PROT_READ, TRUE);
|
||||
/*
|
||||
* Fill out the scsi command
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user