Changeset c074ea2e in rtems for c/src/lib/libcpu/powerpc/mpc6xx/mmu/bat.c
- Timestamp:
- 02/20/03 22:07:54 (21 years ago)
- Children:
- c494deb8
- Parents:
- da1100e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
c/src/lib/libcpu/powerpc/mpc6xx/mmu/bat.c
rda1100e rc074ea2e 44 44 ubat bat; 45 45 46 bl = (size > > 17) - 1;46 bl = (size >= (1<<17)) ? (size >> 17) - 1 : 0; 47 47 /* 603, 604, etc. */ 48 48 wimgxpp = flags & (_PAGE_WRITETHRU | _PAGE_NO_CACHE … … 54 54 bat.bat.batu.vp = 1; 55 55 bat_addrs[bat_index].start = virt; 56 bat_addrs[bat_index].limit = virt + ( (bl + 1) << 17) - 1;56 bat_addrs[bat_index].limit = virt + (bl ? ((bl + 1) << 17) - 1 : 0); 57 57 bat_addrs[bat_index].phys = phys; 58 if ( 0 == bl ) { 59 /* size of 0 tells us to switch it off */ 60 bat.bat.batu.vp = 0; 61 bat.bat.batu.vs = 0; 62 } 58 63 switch (bat_index) { 59 64 case 0 : asm_setdbat0(bat.word[0], bat.word[1]); break;
Note: See TracChangeset
for help on using the changeset viewer.