Menu

#882 Bochs doesn't run with large amounts of memory in bochsrc

closed
nobody
5
2012-10-15
2005-03-05
Renan Birck
No

Host system: 3.06GHz Pentium 4 with 512MB RAM, 80GB
hard drive. Windows XP Professional with Service Pack 1.

Bochs version is builded from CVS from 23/02/2005.

CASE: I wanted to simulate Linux and Windows with high
amounts of RAM.

I know that the host OS would start swapping to hard
drive whenever Bochs used lots of RAM.

Therefore, I decided to give a quick try of what would
happen by changing a 'already made' bochsrc.bxrc (from
DLX LINUX demo).

PROBLEM: When trying to boot Bochs with a modified
bochsrc.bxrc file (plain file from DLX LINUX demo, but
changed to 1536MB (1.5GB) RAM), I get this:

C:\Arquivos de
programas\Bochs-2.1.1.cvs\dlxlinux>..\bochs -q -f
bochsrc.bxrc
00000000000i[APIC?] local apic in initializing
========================================================================
Bochs x86 Emulator 2.1.1.cvs
Build from CVS, after 2.1.1
========================================================================
00000000000i[ ] reading configuration from bochsrc.bxrc
00000000000i[ ] installing win32 module as the
Bochs GUI
00000000000i[ ] using log file bochsout.txt

This application has requested the Runtime to terminate
it in an unusual way.
Please contact the application's support team for more
information.

******,

And when I try to use 4096MB (4GB) RAM, those lines
repeat forever in the BOCHS output:

00000000001i[CPU0 ] WARNING: Encountered an unknown
instruction (signalling illegal instruction)
00000000001i[CPU0 ] BxError: instruction with op1=0xff

00000000001i[CPU0 ] mod was c0, nnn was 7, rm was 7

It seems that the memory is overlapping the BIOS
address and "erasing" the BIOS, since the stable
version of Bochs [2.1.1] complains that it can't load
the BIOS.
(f0000 hex = 983040 KB = 960 MB).

Please confirm, what can I do to simulate large amounts
of RAM?

Discussion

  • Stanislav Shwartsman

    Logged In: YES
    user_id=487634

    Bochs can't emulate 4Gb RAM even if you want it. For speed
    issues it uses only 32bit for physical address encoding inside
    the CPU. I could assume that in case of 4Gb of RAM Bochs
    actually allocated some very small amount of memory
    (overlap). May be we should add some error message which
    will not allow to request 4Gb+ of memory, Bochs anyway not
    support it ...

    About 1.5Gb :

    Bochs allocates all his memory using single 'new' call. If your
    Windows doesn't allow to applications to allocate such big
    amount of memory - it will never succeed.

    On my system - Windows 2003 Server, Pentium 4 1.6Gz with
    512MB RAM it started successfully with 1.5Gb.

    Thanks,
    Stanislav

     
  • Renan Birck

    Renan Birck - 2005-03-06

    Logged In: YES
    user_id=1029034

    "Bochs can't emulate 4Gb RAM even if you want it. For speed
    issues it uses only 32bit for physical address encoding inside
    the CPU. I could assume that in case of 4Gb of RAM Bochs
    actually allocated some very small amount of memory
    (overlap). May be we should add some error message which
    will not allow to request 4Gb+ of memory, Bochs anyway not
    support it ..."

    This now makes sense, given that Bochs emulates a 32-bit CPU.

    "Bochs allocates all his memory using single 'new' call. If
    your
    Windows doesn't allow to applications to allocate such big
    amount of memory - it will never succeed.

    On my system - Windows 2003 Server, Pentium 4 1.6Gz with
    512MB RAM it started successfully with 1.5Gb."

    Here, Bochs seems to get up to 1440MB RAM.
    Anything higher than this causes error.
    This may be a Windows XP limitation.

     
  • Stanislav Shwartsman

    Logged In: YES
    user_id=487634

    I changed Bochs s.t. will report an error when trying to set too
    big value in "megs" param in .bochsrc. The limit choosen
    2048Mb.

    Also this issue and the problem of crash when trying
    allocating too much memory on several host OSes mentioned
    in user manual by Volker.

    So it is nothing to do more with this bug report. Closing it.

    Thanks,
    Stanislav

     

Log in to post a comment.

MongoDB Logo MongoDB