On Tue, 11 Mar 2014, Michael Schmitz wrote:
People that need to use ST RAM because the have too little TT RAM,
could
still use the -s kernel option and enable ST RAM for kernel.
Perhaps an option to specify the video RAM adress space is easier to
implement to the existing memory model?
The address space set aside for video still needs to be mapped. The
current
stram_alloc() interface does reqire that mapping to be set up by the
generic
memory map initialization first. That's what I mentioned below - I
haven't
found a quick and easy way to change that at first glance.
Suggestions welcome
- I can't spend much time on this at present.
Does the hack below (not even compile-tested) work? It maps pool_size
(default 1 MiB) of ST-RAM and makes the pool use that.
Make sure the ST-RAM is not mentioned in your memfile.
diff --git a/arch/m68k/atari/stram.c b/arch/m68k/atari/stram.c
index e8e797e672e0..f658421e9a08 100644
--- a/arch/m68k/atari/stram.c
+++ b/arch/m68k/atari/stram.c
@@ -66,25 +66,17 @@ early_param("stram_pool", atari_stram_setup);
*/
void __init atari_stram_init(void)
{
- int i;
- void *stram_start;
-
/*
- * determine whether kernel code resides in ST-RAM
- * (then ST-RAM is the first memory block at virtual 0x0)
+ * Skip page 0, as the fhe first 2 KiB are supervisor-only!
*/
- stram_start = phys_to_virt(0);
- kernel_in_stram = (stram_start == 0);
-return;
-
- for (i = 0; i < m68k_num_memory; ++i) {
- if (m68k_memory[i].addr == 0) {
- return;
- }
- }
+ void *stram_start = ioremap(PAGE_SIZE, pool_size);
+
+ stram_pool.start = (resource_size_t)stram_start;
+ stram_pool.end = stram_pool.start + pool_size - 1;
+ request_resource(&iomem_resource, &stram_pool);
- /* Should never come here! (There is always ST-Ram!) */
- panic("atari_stram_init: no ST-RAM found!");
+ pr_debug("atari_stram pool: size = %lu bytes, resource = %pR\n",
+ pool_size, &stram_pool);
}
@@ -94,19 +86,6 @@ return;
*/
void __init atari_stram_reserve_pages(void *start_mem)
{
- /*
- * always reserve first page of ST-RAM, the first 2 KiB are
- * supervisor-only!
- */
- if (!kernel_in_stram)
- reserve_bootmem(0, PAGE_SIZE, BOOTMEM_DEFAULT);
-
- stram_pool.start =
(resource_size_t)alloc_bootmem_low_pages(pool_size);
- stram_pool.end = stram_pool.start + pool_size - 1;
- request_resource(&iomem_resource, &stram_pool);
-
- pr_debug("atari_stram pool: size = %lu bytes, resource = %pR\n",
- pool_size, &stram_pool);
}
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
--
To UNSUBSCRIBE, email to debian-68k-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact
listmaster@lists.debian.org
Archive:
https://lists.debian.org/
[🔎] alpine.DEB.2.02.1403110924010.29718@ayla.of.borg