[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: amiboot - tlsfmem



On Mon, 5 Jan 2009, mike wrote:
> Ok, got a bit delayed here, but here it is.
> 
> avail
> 
> Type  Available    In-Use   Maximum   Largest
> chip    1678408    414680   2093088   1644460
> fast   29314648   3715496  33030144  27781372
> total  30993056   4130176  35123232  27781372
> 
> avail flush
> 
> Type  Available    In-Use   Maximum   Largest
> chip    1678408    414680   2093088   1644460
> fast   29402264   3627880  33030144  27781372
> total  31080672   4042560  35123232  27781372
> 
> amiboot
> 
> Linux/m68k Amiga Bootstrap version 6.0snapshot May 11 2005
> Copyright 1993,1994 by Hamish Macdonald and Greg Harp
> 
> Amiga model identification:
>     Resource `draco.resource': not present
>     Chipset: AGA
>     Module `A1000 Bonus': not present
>     Module `A4000 bonus': not present
>     Resource `card.resource': 0x78011100
> 
> Type a key to continue...
> 
> 
> Amiga 1200 CPU: 68060 with 68882 FPU, AGA chipset
> 
> Command line is 'root=/dev/ram fb=false
> BOOT_IMAGE=../vmlinuz-2.6.26-1-amiga'
> Vertical Blank Frequency: 50Hz
> Power Supply Frequency: 50Hz
> EClock Frequency: 709379Hz
> 
> Found 1 AutoConfig Device
> Device 0: addr = 0x00ea0000
> 
> Found 4 Blocks of Memory
> Block 0: 0x78154000 to 0x79e94000 (29952K)
> Block 1: 0x780d3000 to 0x78153000 (512K)
> Block 2: 0x79ee8000 to 0x79f68000 (512K)
> Block 3: 0x78000000 to 0x79f80000 (32256K)

Strange, blocks 0-2 overlap with block 3?

> 36K of CHIP memory

That's indeed not much...

Does this match with the output of the AmigaOS `showconfig' utility?

> The kernel will be located at 0x78154000
> Not enough Chip RAM in this system.  Aborting...

Amiboot walks the memory list at SysBase->MemList.lh_Head:

    /* find out the memory in the system */
    for (mnp = (struct MemHeader *)SysBase->MemList.lh_Head;
	 mnp->mh_Node.ln_Succ;
	 mnp = (struct MemHeader *)mnp->mh_Node.ln_Succ) {
	struct MemHeader mh;

	/* copy the information */
	mh = *mnp;

	/* skip virtual memory */
	if (!(mh.mh_Attributes & MEMF_PUBLIC))
	    continue;

	/* if we suspect that Kickstart is shadowed in an A3000,
	   modify the entry to show 512K more at the top of RAM
	   Check first for a MapROMmed A3640 board: overwriting the
	   Kickstart image causes an infinite lock-up on reboot! */
	if ((mh.mh_Upper == (void *)0x07f80000) &&
	    (model_mask & (CLASS_A3000 | CLASS_A4000))) {
	    if ((bi.cputype & CPU_68040) && Supervisor(maprommed))
		Puts("A3640 MapROM detected.\n");
	    else if (model_mask & CLASS_A3000) {
		mh.mh_Upper = (void *)0x08000000;
		Puts("A3000 shadowed Kickstart detected.\n");
	    }
	}

	/* if we suspect that Kickstart is zkicked,
	   modify the entry to show 512K more at the botton of RAM */
	if ((mh.mh_Lower == (void *)0x00280020) &&
	    (model_mask & CLASS_ZKICK)) {
	    mh.mh_Lower = (void *)0x00200000;
	    Puts("ZKick detected.\n");
	}

	/* mask the memory limit values */
	mh.mh_Upper = (void *)((u_long)mh.mh_Upper & 0xfffff000);
	mh.mh_Lower = (void *)((u_long)mh.mh_Lower & 0xfffff000);

	/* if fast memory */
	if (mh.mh_Attributes & MEMF_FAST) {
	    /* set the size value to the size of this block and mask off to a
	       256K increment */
	    u_long size = ((u_long)mh.mh_Upper-(u_long)mh.mh_Lower)&0xfffc0000;
	    if (size > 0) {
		if (bi.num_memory < NUM_MEMINFO) {
		    /* record the start and size */
		    bi.memory[bi.num_memory].addr = (u_long)mh.mh_Lower;
		    bi.memory[bi.num_memory].size = size;
		    /* count this block */
		    bi.num_memory++;
		} else
		    Printf("Warning: too many memory blocks. Ignoring block "
		    	   "of %ldK at 0x%08lx\n", size>>10,
			   (u_long)mh.mh_Lower);
	    }
	} else if (mh.mh_Attributes & MEMF_CHIP)
	    /* if CHIP memory, record the size */
	    bi.chip_size = (u_long)mh.mh_Upper;
    }

>From looking at the code, a possible cause of the apparent lack of Chip RAM is
that there are now multiple memory headers with the MEMF_CHIP flag set. In that
case, bi.chip_size will be set to the size of the last header.

Chris, perhaps you can shed a light on what's going wrong?

Mike, I expect you can get it to work by using a memfile. Create a file
containing:

	2097152
	0x78000000 33554432

and use the Amiboot `--memfile <file>' option.

> 2008/12/29 Geert Uytterhoeven <geert@linux-m68k.org>:
> > On Mon, 29 Dec 2008, mike wrote:
> >> Well it sais out of chip mem for some reason.
> >
> > Can you please post the output of:
> >  - avail
> >  - avail flush
> >  - amiboot, with the parameters you use and the -v option?
> >
> > Thanks!
> >
> >> http://www.platon42.de/files/util/TLSFMem.readme theres the documentation.
> >>
> >> Cheers
> >> -Mike
> >> 2008/12/27 Geert Uytterhoeven <geert@linux-m68k.org>:
> >> > On Sat, 27 Dec 2008, mike wrote:
> >> >> I noticed amiboot and tlsfmem doesnt go well together, has this been looked at?
> >> >
> >> > Can you please elaborate? What happens?
> >> >
> >> > All I know about tlsfmem is what Google told me 5 minutes ago...

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


Reply to: