Linux-m68k Archive on lore.kernel.org
 help / color / Atom feed
* Using more than 1 GB in qemu-m68k-system
@ 2019-12-14 20:20 John Paul Adrian Glaubitz
  2019-12-14 22:36 ` Finn Thain
  0 siblings, 1 reply; 5+ messages in thread
From: John Paul Adrian Glaubitz @ 2019-12-14 20:20 UTC (permalink / raw)
  To: linux-m68k; +Cc: Debian m68k

Hi!

When installing Debian/m68k inside qemu-m68k-system [1], we are currently limited
to 1 GB of physical memory which is due to a limit in the Linux kernel as far
as I know.

However, I also know that it is possible to run the m68k kernel on Aranym with
up to 3.5 GB of RAM. Thus, I was wondering whether there would be chance we could
get the kernel patched to support more than 1 GB of memory also on qemu-m68k-system
which currently emulates an Apple Macintosh Quadra 800 system.

Adrian

> [1] https://wiki.debian.org/M68k/QemuSystemM68k

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaubitz@debian.org
`. `'   Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Using more than 1 GB in qemu-m68k-system
  2019-12-14 20:20 Using more than 1 GB in qemu-m68k-system John Paul Adrian Glaubitz
@ 2019-12-14 22:36 ` Finn Thain
  2019-12-15  1:41   ` Brad Boyer
  0 siblings, 1 reply; 5+ messages in thread
From: Finn Thain @ 2019-12-14 22:36 UTC (permalink / raw)
  To: John Paul Adrian Glaubitz; +Cc: linux-m68k, Debian m68k

On Sat, 14 Dec 2019, John Paul Adrian Glaubitz wrote:

> Hi!
> 
> When installing Debian/m68k inside qemu-m68k-system [1], we are 
> currently limited to 1 GB of physical memory which is due to a limit in 
> the Linux kernel as far as I know.
> 
> However, I also know that it is possible to run the m68k kernel on 
> Aranym with up to 3.5 GB of RAM. Thus, I was wondering whether there 
> would be chance we could get the kernel patched to support more than 1 
> GB of memory also on qemu-m68k-system which currently emulates an Apple 
> Macintosh Quadra 800 system.
> 
> Adrian
> 
> > [1] https://wiki.debian.org/M68k/QemuSystemM68k
> 

I believe that the reason for the limitation is the Mac memory map, as 
Laurent pointed out in the issue tracker,
https://github.com/vivier/qemu-m68k/issues/42

It's theoretically possible to use NuBus slot space for additional RAM. 

The super slot space ($6000 0000 thru $EFFF FFFF) is 2304 MB in size and 
the standard slot space ($F100 0000 thru $FFFF FFFF) is another 239 MB.

I'm not sure about any hardware designs that took advantage of this 
possibility (Radius Rocket perhaps?).

-- 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Using more than 1 GB in qemu-m68k-system
  2019-12-14 22:36 ` Finn Thain
@ 2019-12-15  1:41   ` Brad Boyer
  2019-12-15 11:01     ` Geert Uytterhoeven
  0 siblings, 1 reply; 5+ messages in thread
From: Brad Boyer @ 2019-12-15  1:41 UTC (permalink / raw)
  To: Finn Thain; +Cc: John Paul Adrian Glaubitz, linux-m68k, Debian m68k

On Sun, Dec 15, 2019 at 09:36:33AM +1100, Finn Thain wrote:
> I believe that the reason for the limitation is the Mac memory map, as 
> Laurent pointed out in the issue tracker,
> https://github.com/vivier/qemu-m68k/issues/42
> 
> It's theoretically possible to use NuBus slot space for additional RAM. 
> 
> The super slot space ($6000 0000 thru $EFFF FFFF) is 2304 MB in size and 
> the standard slot space ($F100 0000 thru $FFFF FFFF) is another 239 MB.
> 
> I'm not sure about any hardware designs that took advantage of this 
> possibility (Radius Rocket perhaps?).

On the fundamental issue, yes the Mac uses $0000 0000 to $3FFF FFFF for
RAM, with $4000 0000 the start of ROM and $5000 0000 the start of the
internal devices.

The Radius Rocket does have RAM, but I never checked if it was visible
from the host. It seems like it should be to do a few of the things
it does. I've never tried to poke at mine while in Linux. I'll add it
to the list of things to try. Even then, it would be slower than the
RAM directly on the processor bus.

We could probably emulate a fake NuBus card in qemu that is just memory
in the super slot space for that card. Can a regular driver add RAM, or
would we have to detect that in the core code somewhere?

	Brad Boyer
	flar@allandria.com


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Using more than 1 GB in qemu-m68k-system
  2019-12-15  1:41   ` Brad Boyer
@ 2019-12-15 11:01     ` Geert Uytterhoeven
  2019-12-17  0:26       ` Finn Thain
  0 siblings, 1 reply; 5+ messages in thread
From: Geert Uytterhoeven @ 2019-12-15 11:01 UTC (permalink / raw)
  To: Brad Boyer; +Cc: Finn Thain, John Paul Adrian Glaubitz, linux-m68k, Debian m68k

Hi Brad,

On Sun, Dec 15, 2019 at 3:19 AM Brad Boyer <flar@allandria.com> wrote:
> We could probably emulate a fake NuBus card in qemu that is just memory
> in the super slot space for that card. Can a regular driver add RAM, or
> would we have to detect that in the core code somewhere?

I think a regular driver can do that, if CONFIG_MEMORY_HOTPLUG=y.
However, the latter depends on CONFIG_SPARSEMEM.

The early core code can just call memblock_add(), though.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Using more than 1 GB in qemu-m68k-system
  2019-12-15 11:01     ` Geert Uytterhoeven
@ 2019-12-17  0:26       ` Finn Thain
  0 siblings, 0 replies; 5+ messages in thread
From: Finn Thain @ 2019-12-17  0:26 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Brad Boyer, John Paul Adrian Glaubitz, linux-m68k, Debian m68k

On Sun, 15 Dec 2019, Geert Uytterhoeven wrote:

> Hi Brad,
> 
> On Sun, Dec 15, 2019 at 3:19 AM Brad Boyer <flar@allandria.com> wrote:
> > We could probably emulate a fake NuBus card in qemu that is just 
> > memory in the super slot space for that card. Can a regular driver add 
> > RAM, or would we have to detect that in the core code somewhere?
> 
> I think a regular driver can do that, if CONFIG_MEMORY_HOTPLUG=y. 
> However, the latter depends on CONFIG_SPARSEMEM.
> 
> The early core code can just call memblock_add(), though.
> 

The nubus subsystem isn't available during early boot. The regular driver 
option might be the best option.

BTW, the Nubus memory mapping done in arch/m68k/kernel/head.S (0xf8000000 
through 0xffffffff) covers the standard slot space but not the super slot 
space.

> Gr{oetje,eeting}s,
> 
>                         Geert
> 
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, back to index

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-14 20:20 Using more than 1 GB in qemu-m68k-system John Paul Adrian Glaubitz
2019-12-14 22:36 ` Finn Thain
2019-12-15  1:41   ` Brad Boyer
2019-12-15 11:01     ` Geert Uytterhoeven
2019-12-17  0:26       ` Finn Thain

Linux-m68k Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-m68k/0 linux-m68k/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-m68k linux-m68k/ https://lore.kernel.org/linux-m68k \
		linux-m68k@vger.kernel.org linux-m68k@lists.linux-m68k.org
	public-inbox-index linux-m68k

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-m68k


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git