Module Name:    src
Committed By:   martin
Date:           Sun Dec 31 12:19:23 UTC 2023

Modified Files:
        src/sys/arch/macppc/macppc [netbsd-10]: rbus_machdep.c

Log Message:
Pull up following revision(s) (requested by rin in ticket #527):

        sys/arch/macppc/macppc/rbus_machdep.c: revision 1.19

macppc/cardbus: Belatedly catch up with battable resolution change

Fix pmap_extract() failures on models with cardslot, for direct-mapped
buffers allocated by PMAP_ALLOC_POOLPAGE().

This driver had corrupted battable[] over 11 years, since resolution of
battable was changed from 256MB to 8MB:
https://github.com/NetBSD/src/commit/413fb4c3c505a13900a9dff86f563fc58ff04005

Now, indexes for battable[] should be calculated by (va >> 23), but
rather, use oea_iobat_add() instead of directly modifying battable[].
TODO:
- Add some consistency checks to oea_iobat_add().
- Map reasonable VA space for cardbus(4), if OFW does not. Note that
   hardcoded value of 0x90000000-0x9fffffff should be safe for now, not
   that elegant although. For macppc models, IIUC, RAM is *not* mapped to
   0x80000000-0xffffffff, and VA reserved for kernel and copy{in,out} is
   0xc0000000-0xefffffff.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.18.84.1 src/sys/arch/macppc/macppc/rbus_machdep.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Reply via email to