Linux MIPS Architecture development
 help / color / mirror / Atom feed
* cause of early indigo2 crash
@ 2000-04-05 20:34 Florian Lohoff
  2000-04-06  8:51 ` Geert Uytterhoeven
  0 siblings, 1 reply; 4+ messages in thread
From: Florian Lohoff @ 2000-04-05 20:34 UTC (permalink / raw)
  To: linux

Hi,
i discovered that the prom of the indigo2 reports 2 MEMTYPE_FREE
segments - One at 08002000 and the other at 88000000 - The second one
at least 16 times larger - If i exclude the first segment from beeing
freed and thus used the kernel boots much further - This is what
i did in the arch/mips/arc/memory.c

        for (i = 0; pblocks[i].size; i++)
                if (pblocks[i].type == MEMTYPE_FREE &&
                                pblocks[i].base != 0x8002000)
                        free_bootmem(pblocks[i].base, pblocks[i].size);

Now i get a very different crash - After SCSI Detection i get

scsi::resize_dma_pool: WARNING, dma_sectors=0, wanted=96, scaling
scsi::resize_dma_pool: WARNING, dma_sectors=0, wanted=80, scaling
scsi::resize_dma_pool: WARNING, dma_sectors=0, wanted=64, scaling
scsi::resize_dma_pool: WARNING, dma_sectors=0, wanted=48, scaling
       WARNING, not enough memory, pool not expanded
Unable to handle kernel paging request at virtual address 00000000, epc == 880cc668, ra == 880cc5d8
[...]

Thats it - Might the first area be DMA bounce buffer only which have to
be initialized in the memory controller ?

Flo
-- 
Florian Lohoff		flo@rfc822.org		      	+49-subject-2-change
"Technology is a constant battle between manufacturers producing bigger and
more idiot-proof systems and nature producing bigger and better idiots."

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

* Re: cause of early indigo2 crash
  2000-04-05 20:34 cause of early indigo2 crash Florian Lohoff
@ 2000-04-06  8:51 ` Geert Uytterhoeven
  2000-04-06 10:08   ` Florian Lohoff
  2000-04-06 21:05   ` Florian Lohoff
  0 siblings, 2 replies; 4+ messages in thread
From: Geert Uytterhoeven @ 2000-04-06  8:51 UTC (permalink / raw)
  To: Florian Lohoff; +Cc: linux

On Wed, 5 Apr 2000, Florian Lohoff wrote:
> i discovered that the prom of the indigo2 reports 2 MEMTYPE_FREE
> segments - One at 08002000 and the other at 88000000 - The second one
> at least 16 times larger - If i exclude the first segment from beeing
> freed and thus used the kernel boots much further - This is what
> i did in the arch/mips/arc/memory.c
> 
>         for (i = 0; pblocks[i].size; i++)
>                 if (pblocks[i].type == MEMTYPE_FREE &&
>                                 pblocks[i].base != 0x8002000)
>                         free_bootmem(pblocks[i].base, pblocks[i].size);
> 
> Now i get a very different crash - After SCSI Detection i get
> 
> scsi::resize_dma_pool: WARNING, dma_sectors=0, wanted=96, scaling
> scsi::resize_dma_pool: WARNING, dma_sectors=0, wanted=80, scaling
> scsi::resize_dma_pool: WARNING, dma_sectors=0, wanted=64, scaling
> scsi::resize_dma_pool: WARNING, dma_sectors=0, wanted=48, scaling
>        WARNING, not enough memory, pool not expanded
> Unable to handle kernel paging request at virtual address 00000000, epc == 880cc668, ra == 880cc5d8
> [...]
  ^^^^^
What's here? Usually it tells the function where it crashes.

> Thats it - Might the first area be DMA bounce buffer only which have to
> be initialized in the memory controller ?

I see these panics sometimes as well. Where does the crash happen? Please
lookup in System.map.

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven ------------- Sony Software Development Center Europe (SDCE)
Geert.Uytterhoeven@sonycom.com ------------------- Sint-Stevens-Woluwestraat 55
Voice +32-2-7248638 Fax +32-2-7262686 ---------------- B-1130 Brussels, Belgium

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

* Re: cause of early indigo2 crash
  2000-04-06  8:51 ` Geert Uytterhoeven
@ 2000-04-06 10:08   ` Florian Lohoff
  2000-04-06 21:05   ` Florian Lohoff
  1 sibling, 0 replies; 4+ messages in thread
From: Florian Lohoff @ 2000-04-06 10:08 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: linux

On Thu, Apr 06, 2000 at 10:51:17AM +0200, Geert Uytterhoeven wrote:
> > scsi::resize_dma_pool: WARNING, dma_sectors=0, wanted=48, scaling
> >        WARNING, not enough memory, pool not expanded
> > Unable to handle kernel paging request at virtual address 00000000, epc == 880cc668, ra == 880cc5d8
> > [...]
>   ^^^^^
> What's here? Usually it tells the function where it crashes.

:) I dont have an System.map available - But i think i know the cause
of the crash - I think the arch/mips/arc/memory.c forgets to
allocate/not-free the memory the kernel - I dont think the ARC Prom is
able to mark the kernel memory different - But i cant see a location
where it explicitly reserves/allocates the kernel pages. Dec and ddb
to something like free_bootmem(bootmap,&_end,size-_end) - Nothing
like that in the arc things ... They free all memory segments
the ARC Prom gives back as "MEMTYPE_FREE" (arc_contigm, arc_freem)
and then it just takes the largest segment (there are 2 segments 
- before and after the arc-prom segment) and installs the bootmem-map
in there. The next alloc and memset causes the crash as it allocates
from 88002000 which is the end of the mem map - My suspicion is (Which
ill try tonight) that the memory map with 2 pages is that small
that is just overwrites parts of the kernel with no effect - The next alloc
and memset is 4MB - This destroys the kernel completely and though causes
a crash.

> I see these panics sometimes as well. Where does the crash happen? Please
> lookup in System.map.

Ill do tonight

Flo
-- 
Florian Lohoff		flo@rfc822.org		      	+49-subject-2-change
"Technology is a constant battle between manufacturers producing bigger and
more idiot-proof systems and nature producing bigger and better idiots."

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

* Re: cause of early indigo2 crash
  2000-04-06  8:51 ` Geert Uytterhoeven
  2000-04-06 10:08   ` Florian Lohoff
@ 2000-04-06 21:05   ` Florian Lohoff
  1 sibling, 0 replies; 4+ messages in thread
From: Florian Lohoff @ 2000-04-06 21:05 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: linux

On Thu, Apr 06, 2000 at 10:51:17AM +0200, Geert Uytterhoeven wrote:
> What's here? Usually it tells the function where it crashes.
> 
> > Thats it - Might the first area be DMA bounce buffer only which have to
> > be initialized in the memory controller ?
> 
> I see these panics sometimes as well. Where does the crash happen? Please
> lookup in System.map.

Its in drivers/scsi/scsi_dma.c 

It happens due to no available scsi dma buffers which is caused by
the fact that MAX_DMA_ADDRESS is below the lowest free memory segment
(Kernel overlaps). If i increase the MAX_DMA_ADDRESS include/asm/dma.h.

As most of the drivers dont use the MAX_DMA_ADDRESS (zone allocator should
have made it obsolete) i suggest leaving it like it is and changing
arch/mips/mm/init.c to:

#if defined(CONFIG_ISA) || defined(CONFIG_PCI)
        if (low < max_dma)
                zones_size[ZONE_DMA] = low;
        else {
                zones_size[ZONE_DMA] = max_dma;
                zones_size[ZONE_NORMAL] = low - max_dma;
        }
#else
        zones_size[ZONE_DMA] = low;
#endif

as the dma.h comment says that this only applies to standard PC 
dma controllers.

If no one objects ill commit this.

Flo
-- 
Florian Lohoff		flo@rfc822.org		      	+49-subject-2-change
"Technology is a constant battle between manufacturers producing bigger and
more idiot-proof systems and nature producing bigger and better idiots."

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

end of thread, other threads:[~2000-04-06 21:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-04-05 20:34 cause of early indigo2 crash Florian Lohoff
2000-04-06  8:51 ` Geert Uytterhoeven
2000-04-06 10:08   ` Florian Lohoff
2000-04-06 21:05   ` Florian Lohoff

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox