Subject: istream abort bug
To: None <port-arm32@netbsd.org>
From: Ralf Menzel <menzel@sally.cs.uni-dortmund.de>
List: port-arm32
Date: 07/07/1999 15:59:37
Hello,
I have a RiscPC with a rev 2 sa110. To avoid the istream abort bug I used
the option "!sa110.dcache" with the bootloader. This slowed things down but
seemed to work. Since this isn't a nice solution I tried some kernel hacking
to mitigate the bug.
So far I changed .../sys/arch/arm32/arm32/fault.c and replaced the lines
if (rv == KERN_SUCCESS)
goto out;
(That's near line 420) with the following:
if (rv == KERN_SUCCESS) {
#ifdef SA110_ISTREAM_ABORT_BUG
/* try to avoid sa110 < rev 3 istream abort bug */
vm_offset_t last_word_addr;
u_int instruction;
int status;
/* if the last instruction of the page is a */
/* ld or ldm to pc, fault in the next page */
last_word_addr = va + PAGE_SIZE - 4;
status = fetchuserword(last_word_addr, &instruction);
if (status == 0 &&
(((instruction & 0x0c10f000) == 0x0410f00) ||
((instruction & 0x0e108000) == 0x0810800)))
fetchuserword(last_word_addr + 4, &instruction);
#endif /* SA110_ISTREAM_ABORT_BUG */
goto out;
}
Can anyone comment on this? Is this the right place and the right way to do
such a thing?
I'm aware that the page after the ld/ldm to pc might get paged out later on.
But I haven't got an idea where I could catch this.
Greetings,
Ralf Menzel