[OpenBIOS] Bug in ESP DMA implementation?

Blue Swirl blauwirbel at gmail.com
Tue Dec 21 22:15:41 CET 2010


On Tue, Dec 21, 2010 at 10:08 AM, Mark Cave-Ayland
<mark.cave-ayland at siriusit.co.uk> wrote:
> Blue Swirl wrote:
>
>>> I notice from the code above there is an explicit comment that mentions
>>> clearing interrupts to prevent the guest from seeing them so I would have
>>> thought that this wouldn't be an issue? I've checked the espdma
>>> structures
>>> to ensure that they are marked volatile (or _volatile_) and this appears
>>> to
>>> be the case - so I'm a little bit stumped. Can anyone point me in the
>>> right
>>> direction or spot the mistake?
>>
>> One tricky case was that when allocating memory for IOMMU, the
>> alignment restrictions concern physical memory, not virtual.
>
> Wow that was it - forcing physical alignment (as well as virtual alignment)
> seems to resolve the issue - thanks a lot! :)

IIRC I was also very, very puzzled by this for a long time.

> After a fairly heavy hacking session I now have a version of SPARC32
> OpenBIOS that runs under OFMEM! Initial tests show that Solaris 8 boot
> doesn't get any further, but it's such a tremendous step forward having
> everything using the same ofmem code (and the debugging that comes with it),
> and means that when we fix up the various /memory and /virtual-memory
> properties then they get fixed on ALL platforms.

Great!

> I think the best thing to do will be to post 2 different patch sets - the
> first containing the OFMEM changes, and the second for the actual conversion
> just to make sure it doesn't cause any regressions.
>
> Note that for this patchset I've taken Andreas' advice and am using git for
> the first time so please go easy on any mistakes in this area :)

The line length of patch descriptions should be ~65 chars for nice git
logs, but since the official repo is still SVN it doesn't matter.
Otherwise I didn't spot any problems.

Tip: for juggling with patch sets, I use StGit with QGit. Of course
other tools exist and 'git rebase --interactive' is cool too.



More information about the OpenBIOS mailing list