Fixed bug I introduced with the memory-size code rewrite that broke

floppy DMA buffers...use avail_start not "first". Removed duplicate
(and wrong) declaration of phys_avail[].

Submitted by:	Bruce Evans, but fixed differently by me.
This commit is contained in:
David Greenman 1995-07-28 11:21:06 +00:00
parent 31bdd9d999
commit 6b837e5dda
4 changed files with 8 additions and 10 deletions

View File

@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* from: @(#)machdep.c 7.4 (Berkeley) 6/3/91
* $Id: machdep.c,v 1.132 1995/07/16 10:33:38 phk Exp $
* $Id: machdep.c,v 1.133 1995/07/19 06:37:06 davidg Exp $
*/
#include "npx.h"
@ -180,7 +180,7 @@ long dumplo;
extern int bootdev;
int biosmem;
vm_offset_t phys_avail[10];
vm_offset_t phys_avail[10];
/* must be 2 less so 0 0 can signal end of chunks */
#define PHYS_AVAIL_ARRAY_END ((sizeof(phys_avail) / sizeof(vm_offset_t)) - 2)
@ -1454,7 +1454,7 @@ init386(first)
pa_indx++;
}
for (target_page = first; target_page < ptoa(Maxmem); target_page += PAGE_SIZE) {
for (target_page = avail_start; target_page < ptoa(Maxmem); target_page += PAGE_SIZE) {
int tmp, page_bad = FALSE;
/*

View File

@ -39,7 +39,7 @@
* SUCH DAMAGE.
*
* from: @(#)pmap.c 7.7 (Berkeley) 5/12/91
* $Id: pmap.c,v 1.58 1995/05/30 07:59:38 rgrimes Exp $
* $Id: pmap.c,v 1.59 1995/07/13 08:47:26 davidg Exp $
*/
/*
@ -133,7 +133,6 @@ int protection_codes[8];
struct pmap kernel_pmap_store;
pmap_t kernel_pmap;
vm_offset_t phys_avail[6]; /* 2 entries + 1 null */
vm_offset_t avail_start; /* PA of first available physical page */
vm_offset_t avail_end; /* PA of last available physical page */
vm_size_t mem_size; /* memory size in bytes */

View File

@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* from: @(#)machdep.c 7.4 (Berkeley) 6/3/91
* $Id: machdep.c,v 1.132 1995/07/16 10:33:38 phk Exp $
* $Id: machdep.c,v 1.133 1995/07/19 06:37:06 davidg Exp $
*/
#include "npx.h"
@ -180,7 +180,7 @@ long dumplo;
extern int bootdev;
int biosmem;
vm_offset_t phys_avail[10];
vm_offset_t phys_avail[10];
/* must be 2 less so 0 0 can signal end of chunks */
#define PHYS_AVAIL_ARRAY_END ((sizeof(phys_avail) / sizeof(vm_offset_t)) - 2)
@ -1454,7 +1454,7 @@ init386(first)
pa_indx++;
}
for (target_page = first; target_page < ptoa(Maxmem); target_page += PAGE_SIZE) {
for (target_page = avail_start; target_page < ptoa(Maxmem); target_page += PAGE_SIZE) {
int tmp, page_bad = FALSE;
/*

View File

@ -39,7 +39,7 @@
* SUCH DAMAGE.
*
* from: @(#)pmap.c 7.7 (Berkeley) 5/12/91
* $Id: pmap.c,v 1.58 1995/05/30 07:59:38 rgrimes Exp $
* $Id: pmap.c,v 1.59 1995/07/13 08:47:26 davidg Exp $
*/
/*
@ -133,7 +133,6 @@ int protection_codes[8];
struct pmap kernel_pmap_store;
pmap_t kernel_pmap;
vm_offset_t phys_avail[6]; /* 2 entries + 1 null */
vm_offset_t avail_start; /* PA of first available physical page */
vm_offset_t avail_end; /* PA of last available physical page */
vm_size_t mem_size; /* memory size in bytes */