* vmalloc can clobber framebuffer on sparc32
@ 2006-06-12 6:43 Bob Breuer
2006-06-13 6:54 ` David Miller
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Bob Breuer @ 2006-06-12 6:43 UTC (permalink / raw)
To: sparclinux
David Miller wrote:
> From: Bob Breuer <breuerr@mc.net>
> Date: Sun, 11 Jun 2006 20:21:09 -0500
>
>> David Miller wrote:
>>> But why in the world does the scheduler "lock up" just because the
>>> migration cost is too large?
>> There is an address space collision between the vmalloc area and where
>> the prom maps the framebuffer.
>
> And this is what locks up the scheduler when a bad migration cost
> calculation is made?
The migration cost setup by default did a vmalloc of 10MB therefore
clobbering the address space used by the framebuffer. The next screen
redraw would access something other than the framebuffer, or fail if it
was vfree'd in the meantime. Either way, it silently goes downhill
because the console can't display the error messages to the screen.
> Please start a new thread if you are talking about some new topic,
> it gets confusing :-/
>
>> The vmalloc range is 0xfe600000 to 0xffc00000. I have a cg6 that gets
>> mapped to 0xfee00000, and a cg14 with 8MB vsimm that gets mapped to
>> 0xfe700000. These leave only 8MB and 1MB of usable vmalloc space before
>> bad things happen.
>>
>> We may want to find a different vm hole to put vmalloc into. Is there
>> any documentation on what address spaces are reserved with the different
>> prom versions?
>
> I don't know, but from your report it seems that OBP takes
> 0xfe000000 up to 0xfff00000.
>
> Actually, you can look at the "available" property of the
> virtual-memory node. Or, you can see if there is a "translations"
> node in the /virtual-memory node like there is on sparc64.
Ok, here are the available regions reported with a cg14 framebuffer:
00000000.fff00000.00100000
00000000.fef00000.00e00000
00000000.00000000.fe400000
00000000.ffe3f000.00081000
00000000.ffd00000.00026000
00000000.fe400000.00300000
after rearrange and fill gaps:
start - end ( size ) type
00000000-fe3fffff (fe400000) free
fe400000-fe6fffff (00300000) free
fe600000 = VMALLOC_START
fe700000-feefffff (00800000) unavail (cg14 framebuffer)
fef00000-ffcfffff (00e00000) free
ffc00000 = VMALLOC_END
ffd00000-ffd25fff (00026000) free
ffd26000-ffe3efff (00119000) unavail
ffe3f000-ffebffff (00081000) free
ffec0000-ffefffff (00040000) unavail
fff00000-ffffffff (00100000) free
The framebuffer sitting in the middle of the vmalloc range is what
causes the problem.
Bob
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: vmalloc can clobber framebuffer on sparc32
2006-06-12 6:43 vmalloc can clobber framebuffer on sparc32 Bob Breuer
@ 2006-06-13 6:54 ` David Miller
2006-06-13 9:23 ` Mark Fortescue
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2006-06-13 6:54 UTC (permalink / raw)
To: sparclinux
From: Bob Breuer <breuerr@mc.net>
Date: Mon, 12 Jun 2006 01:43:25 -0500
> after rearrange and fill gaps:
> start - end ( size ) type
> 00000000-fe3fffff (fe400000) free
> fe400000-fe6fffff (00300000) free
> fe600000 = VMALLOC_START
> fe700000-feefffff (00800000) unavail (cg14 framebuffer)
> fef00000-ffcfffff (00e00000) free
> ffc00000 = VMALLOC_END
> ffd00000-ffd25fff (00026000) free
> ffd26000-ffe3efff (00119000) unavail
> ffe3f000-ffebffff (00081000) free
> ffec0000-ffefffff (00040000) unavail
> fff00000-ffffffff (00100000) free
>
> The framebuffer sitting in the middle of the vmalloc range is what
> causes the problem.
Ok. Let's take a peek at what NetBSD thinks about the layout
here... They assume the same start and end address for openprom.
What we should probably do is explicitly sbus_ioremap() the
framebuffer on sparc32 even if OBP has a mapping setup already.
And then just clear out the areas outside of the kernel image
and the reserved OBP area.
I wonder if this will break things like promcons :(
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: vmalloc can clobber framebuffer on sparc32
2006-06-12 6:43 vmalloc can clobber framebuffer on sparc32 Bob Breuer
2006-06-13 6:54 ` David Miller
@ 2006-06-13 9:23 ` Mark Fortescue
2006-06-13 16:09 ` Bob Breuer
2006-07-07 23:38 ` David Miller
3 siblings, 0 replies; 5+ messages in thread
From: Mark Fortescue @ 2006-06-13 9:23 UTC (permalink / raw)
To: sparclinux
Hi,
Why don't you just move the VMALLOC area to say FC000000. I did this on my
sparc32 system to alow me to debug some PROM Console/CG3 issues. I did not
observe any failures/anomalies with this and is gets around any problems
with the PROM memory mapping of frame buffers.
It also has the advantage of alowing you to increase the size of the
VMALLOC area should this be required.
Ideally, the area should be dynamically allocated based on the required
size and the PROM allocations on boot but this may be somewhat
impractical in real life.
Regards
Mark Fortescue.
On Mon, 12 Jun 2006, David Miller wrote:
> From: Bob Breuer <breuerr@mc.net>
> Date: Mon, 12 Jun 2006 01:43:25 -0500
>
> > after rearrange and fill gaps:
> > start - end ( size ) type
> > 00000000-fe3fffff (fe400000) free
> > fe400000-fe6fffff (00300000) free
> > fe600000 = VMALLOC_START
> > fe700000-feefffff (00800000) unavail (cg14 framebuffer)
> > fef00000-ffcfffff (00e00000) free
> > ffc00000 = VMALLOC_END
> > ffd00000-ffd25fff (00026000) free
> > ffd26000-ffe3efff (00119000) unavail
> > ffe3f000-ffebffff (00081000) free
> > ffec0000-ffefffff (00040000) unavail
> > fff00000-ffffffff (00100000) free
> >
> > The framebuffer sitting in the middle of the vmalloc range is what
> > causes the problem.
>
> Ok. Let's take a peek at what NetBSD thinks about the layout
> here... They assume the same start and end address for openprom.
>
> What we should probably do is explicitly sbus_ioremap() the
> framebuffer on sparc32 even if OBP has a mapping setup already.
> And then just clear out the areas outside of the kernel image
> and the reserved OBP area.
>
> I wonder if this will break things like promcons :(
>
> -
> To unsubscribe from this list: send the line "unsubscribe sparclinux" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: vmalloc can clobber framebuffer on sparc32
2006-06-12 6:43 vmalloc can clobber framebuffer on sparc32 Bob Breuer
2006-06-13 6:54 ` David Miller
2006-06-13 9:23 ` Mark Fortescue
@ 2006-06-13 16:09 ` Bob Breuer
2006-07-07 23:38 ` David Miller
3 siblings, 0 replies; 5+ messages in thread
From: Bob Breuer @ 2006-06-13 16:09 UTC (permalink / raw)
To: sparclinux
Mark Fortescue wrote:
> Hi,
>
> Why don't you just move the VMALLOC area to say FC000000. I did this on my
> sparc32 system to alow me to debug some PROM Console/CG3 issues. I did not
> observe any failures/anomalies with this and is gets around any problems
> with the PROM memory mapping of frame buffers.
Sounds like a good idea, but SRMMU_NOCACHE occupies FC000000, and then
highmem mappings (PKMAP_BASE) are after that. However, if the nocache
and highmem mappings are not used on sun4c, we may be able to move them
below F0000000.
> It also has the advantage of alowing you to increase the size of the
> VMALLOC area should this be required.
>
> Ideally, the area should be dynamically allocated based on the required
> size and the PROM allocations on boot but this may be somewhat
> impractical in real life.
>
> Regards
> Mark Fortescue.
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: vmalloc can clobber framebuffer on sparc32
2006-06-12 6:43 vmalloc can clobber framebuffer on sparc32 Bob Breuer
` (2 preceding siblings ...)
2006-06-13 16:09 ` Bob Breuer
@ 2006-07-07 23:38 ` David Miller
3 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2006-07-07 23:38 UTC (permalink / raw)
To: sparclinux
From: Mark Fortescue <mark@mtfhpc.demon.co.uk>
Date: Tue, 13 Jun 2006 10:23:56 +0100 (BST)
> Why don't you just move the VMALLOC area to say FC000000. I did this on my
> sparc32 system to alow me to debug some PROM Console/CG3 issues. I did not
> observe any failures/anomalies with this and is gets around any problems
> with the PROM memory mapping of frame buffers.
As Bob mentioned, we can't do this because the SRMMU no-cache
area lives there.
I have the foundations of a better solution in the current 2.6.18-rc1
tree.
The cg14 et al. drivers always IO map the framebuffer and registers
explicitly, and do not try to use the "address" property based
existing mapping of the device.
The only part missing is the code in the bootup VM initialization
that needs to ignore all existing mappings outside of the designated
OBP area.
Bob, could you work on and test that?
Thanks a lot.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2006-07-07 23:38 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-12 6:43 vmalloc can clobber framebuffer on sparc32 Bob Breuer
2006-06-13 6:54 ` David Miller
2006-06-13 9:23 ` Mark Fortescue
2006-06-13 16:09 ` Bob Breuer
2006-07-07 23:38 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.