115 lines
4.4 KiB
Plaintext
115 lines
4.4 KiB
Plaintext
----------------------------------------------------------------------
|
|
Patch name: patch.highmem
|
|
Author: Zwane Mwaikambo <zwane@linuxpower.ca>
|
|
Date: Tue, 24 Sep 2002 21:13:36 -0400 (EDT)
|
|
|
|
Detailed description:
|
|
|
|
This patch allows me to allocate upto 1G of memory, came very handy when i
|
|
was doing highmem testing in a linux simulation. Yes the 1G stack
|
|
allocation is ugly, but it isn't there for the common case (non debug).
|
|
How does this perform on Windows? On my overcommit 2.4.19-pre5-ac3 box
|
|
bochs starts much faster too.
|
|
|
|
Patch was created with:
|
|
cvs diff -u
|
|
Apply patch to what version:
|
|
cvs checked out on DATE, release version VER
|
|
Instructions:
|
|
To patch, go to main bochs directory.
|
|
Type "patch -p1 < THIS_PATCH_FILE".
|
|
----------------------------------------------------------------------
|
|
From zwane@linuxpower.ca Wed Sep 25 09:30:05 2002
|
|
Date: Tue, 24 Sep 2002 21:13:36 -0400 (EDT)
|
|
From: Zwane Mwaikambo <zwane@linuxpower.ca>
|
|
To: Bochs Devel <bochs-developers@lists.sourceforge.net>
|
|
Subject: [Bochs-developers] [PATCH] bochs-highmem
|
|
|
|
This patch allows me to allocate upto 1G of memory, came very handy when i
|
|
was doing highmem testing in a linux simulation. Yes the 1G stack
|
|
allocation is ugly, but it isn't there for the common case (non debug).
|
|
How does this perform on Windows? On my overcommit 2.4.19-pre5-ac3 box
|
|
bochs starts much faster too.
|
|
|
|
Index: bochs-cvs/config.h.in
|
|
===================================================================
|
|
RCS file: /cvsroot/bochs/bochs/config.h.in,v
|
|
retrieving revision 1.79
|
|
diff -u -r1.79 config.h.in
|
|
--- bochs-cvs/config.h.in 24 Sep 2002 20:01:56 -0000 1.79
|
|
+++ bochs-cvs/config.h.in 25 Sep 2002 00:57:02 -0000
|
|
@@ -287,7 +287,7 @@
|
|
// is not used, and this section can be ignored.
|
|
// =================================================================
|
|
|
|
-#define BX_MAX_DIRTY_PAGE_TABLE_MEGS 64
|
|
+#define BX_MAX_DIRTY_PAGE_TABLE_MEGS 1024
|
|
|
|
// Compile in support for virtual/linear/physical breakpoints.
|
|
// Set to 1, only those you need. Recommend using only linear
|
|
Index: bochs-cvs/main.cc
|
|
===================================================================
|
|
RCS file: /cvsroot/bochs/bochs/main.cc,v
|
|
retrieving revision 1.146
|
|
diff -u -r1.146 main.cc
|
|
--- bochs-cvs/main.cc 24 Sep 2002 22:49:52 -0000 1.146
|
|
+++ bochs-cvs/main.cc 25 Sep 2002 00:57:15 -0000
|
|
@@ -1609,7 +1609,7 @@
|
|
BX_CPU(0)->reset(BX_RESET_HARDWARE);
|
|
#else
|
|
// SMP initialization
|
|
- bx_mem_array[0] = new BX_MEM_C ();
|
|
+ bx_mem_array[0] = new BX_MEM_C (bx_options.memory.Osize->get() * 1024*1024);
|
|
bx_mem_array[0]->init_memory(bx_options.memory.Osize->get () * 1024*1024);
|
|
|
|
// First load the optional ROM images
|
|
Index: bochs-cvs/memory/misc_mem.cc
|
|
===================================================================
|
|
RCS file: /cvsroot/bochs/bochs/memory/misc_mem.cc,v
|
|
retrieving revision 1.30
|
|
diff -u -r1.30 misc_mem.cc
|
|
--- bochs-cvs/memory/misc_mem.cc 19 Sep 2002 19:17:20 -0000 1.30
|
|
+++ bochs-cvs/memory/misc_mem.cc 25 Sep 2002 00:57:15 -0000
|
|
@@ -123,6 +123,7 @@
|
|
BX_DEBUG(("Init $Id: patch.highmem,v 1.1 2002-09-25 13:29:11 bdenney Exp $"));
|
|
// you can pass 0 if memory has been allocated already through
|
|
// the constructor, or the desired size of memory if it hasn't
|
|
+ BX_INFO(("%.2fMB", (float)(BX_MEM_THIS megabytes) ));
|
|
|
|
if (BX_MEM_THIS vector == NULL) {
|
|
// memory not already allocated, do now...
|
|
@@ -131,21 +132,8 @@
|
|
BX_MEM_THIS megabytes = memsize / (1024*1024);
|
|
BX_INFO(("%.2fMB", (float)(BX_MEM_THIS megabytes) ));
|
|
}
|
|
- // initialize all memory to 0x00
|
|
- memset(BX_MEM_THIS vector, 0x00, BX_MEM_THIS len);
|
|
-
|
|
- // initialize ROM area (0xc0000 .. 0xfffff) to 0xff
|
|
- memset(BX_MEM_THIS vector + 0xc0000, 0xff, 0x40000);
|
|
-
|
|
-#if BX_PCI_SUPPORT
|
|
- // initialize PCI shadow RAM area (0xc0000 .. 0xfffff) to 0x00
|
|
- memset(BX_MEM_THIS shadow, 0x00, 0x40000);
|
|
-#endif
|
|
|
|
#if BX_DEBUGGER
|
|
- // initialize dirty pages table
|
|
- memset(dbg_dirty_pages, 0, sizeof(dbg_dirty_pages));
|
|
-
|
|
if (megabytes > BX_MAX_DIRTY_PAGE_TABLE_MEGS) {
|
|
BX_INFO(("Error: memory larger than dirty page table can handle"));
|
|
BX_PANIC(("Error: increase BX_MAX_DIRTY_PAGE_TABLE_MEGS"));
|
|
|
|
|
|
|
|
-------------------------------------------------------
|
|
This sf.net email is sponsored by:ThinkGeek
|
|
Welcome to geek heaven.
|
|
http://thinkgeek.com/sf
|
|
_______________________________________________
|
|
bochs-developers mailing list
|
|
bochs-developers@lists.sourceforge.net
|
|
https://lists.sourceforge.net/lists/listinfo/bochs-developers
|
|
|