kernel maps only one page of FDT. When FDT is more than one page in size, data TLB miss occurs on memmove()
when FDT is moved to kernel storage (sys/powerpc/booke/booke_machdep.c, booke_init())
Details
- Reviewers
jhibbits - Commits
- rS304727: Fix system hang when large FDT is in use
- Build kernel, create uImage
mkimage -A ppc -O linux -e 0x4001000 -a 0x3ffffc0 -C none -d /tftpboot/fbsd /tftpboot/fbsd.uImage
- Boot uImage on the QorIQ system
> tftpboot 0x3ffffc0 k1
Using FM1@DTSEC3 device
TFTP from server 192.168.2.23; our IP address is 192.168.2.22
Filename 'k1'.
Load address: 0x3ffffc0
Loading: #############
- ############# ############# ############# ############# ############# ############# ############# ##############
3.1 MiB/s
done
Bytes transferred = 9380388 (8f2224 hex)
- Boot the image, ensure that kernel successfully reaches mi_startup() (you shall see greeting
when it does)
Bytes transferred = 9380388 (8f2224 hex)
> bootm 0x3ffffc0 - 0xec800000
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
Overall, good work. Just a couple nits and it'll be fine. This should definitely fix the hang problem I've seen booting from ubldr on one of my boards, so I'm excited about it.
sys/powerpc/booke/pmap.c | ||
---|---|---|
3416 | ||
3431 | This will only work right if the mapping completely encloses the region, it won't work if the region spans multiple TLB mappings, which is possible to do in pmap_early_io_map(). Since it's only used in one location right now, I guess it's okay, but just add a comment here that it should be fixed in the future. |
Looks good, I'll see if I can commit it tonight.
I put a few minutes of thought into the pmap_early_io_unmap() problem, and I think it'll be pretty easy to address, but it'll need either a new function (good idea) or some inline asm, to search for each TLB entry by VA. It's more complicated, and not needed right now, but something to think about for later on.